/* Mawed Lustre — restrained content surfaces, luminous floating controls.
   Loaded last as the visual system; state and navigation stay in their owners. */
:root {
  --paper: #f3f4f8;
  --ink: #202431;
  --muted: #606779;
  --surface: #ffffff;
  --input-surface: #f5f6fa;
  --line: #d9dce5;
  --brand: #086b89;
  --ink-2: #086b89;
  --soft: #e9eef8;
  --control: #ebedf3;
  --card: rgba(255,255,255,.8);
  --chrome: rgba(255,255,255,.66);
  --dialog-surface: #f3f4f8;
  --glass-edge: rgba(135,149,177,.22);
  --glass-sheen: rgba(255,255,255,.9);
  --glass-shadow: 0 12px 36px #3a405010, inset 0 1px 0 #fff;
  --focus-tint: #e5eef7;
  --aura-cyan: #00bcd426;
  --aura-violet: #9268e524;
  --aura-rose: #f2a1cb1c;
  --neon-glow: #28bdd52c;
  --neon-edge: #b2e3ec;
  --selected-edge: #79a3bb;
  --button-fill: linear-gradient(135deg,#087891,#3568b5);
  --dock-selection: rgba(54,127,167,.12);
  --rim: linear-gradient(145deg,#ffffffa3,transparent 42%,#ffffff25);
  --app-safe-bottom: max(env(safe-area-inset-bottom,0px),var(--safe-area-inset-bottom,0px));
}
:root[data-theme="dark"] {
  --paper: #090c14;
  --ink: #f3f5fb;
  --muted: #acb3c6;
  --surface: #1a2030;
  --input-surface: #141a27;
  --line: #333b4c;
  --brand: #81e8f4;
  --ink-2: #81e8f4;
  --soft: #283548;
  --control: #1b2333;
  --card: rgba(27,33,48,.88);
  --chrome: rgba(29,37,54,.75);
  --dialog-surface: #101520;
  --glass-edge: rgba(197,216,247,.18);
  --glass-sheen: rgba(239,247,255,.25);
  --glass-shadow: 0 12px 32px #00000030,inset 0 1px 0 #ffffff12;
  --focus-tint: #28364c;
  --aura-cyan: #1cd9e840;
  --aura-violet: #9366fa3b;
  --aura-rose: #e48bce18;
  --neon-glow: #4ddbe32c;
  --neon-edge: #8cdae66b;
  --selected-edge: #668196;
  --button-fill: linear-gradient(135deg,#91f0f0,#91b4f5);
  --dock-selection: rgba(179,224,255,.13);
  --rim: linear-gradient(145deg,#ffffff24,transparent 42%,#ffffff08);
}
body { background: transparent; }
.ambient-light::before {
  background: radial-gradient(ellipse at 100% 2%,var(--aura-cyan),transparent 45%),radial-gradient(ellipse at 0% 55%,var(--aura-violet),transparent 48%);
}
.ambient-light::after { background: radial-gradient(ellipse at 85% 100%,var(--aura-rose),transparent 48%); }
/* The wordmark and heading breathe without a second enclosing card. */
.topbar {
  min-height: 60px; border: 0; border-radius: 0; padding: 4px 0;
  margin: 24px auto 0; max-width: 1024px;
  background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.brand { min-height: 44px; }
.brand strong { font-weight: 650; font-size: 1.05rem; letter-spacing: -.025em; }
.brand small { color: var(--muted); }
.brand-cluster { gap: 12px; }
.clock-menu, .topbar .secondary-btn, .close-btn {
  background: var(--rim),var(--chrome); border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-sheen),0 4px 14px #0000000b;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.clock-menu { border-radius: 50%; color: var(--brand); }
.clock-menu .ui-icon { width: 24px; height: 24px; stroke-width: 1.6; }
.topbar .secondary-btn { border-radius: 999px; padding-inline: 18px; color: var(--ink); }
main { padding-top: 22px; }
.hero {
  padding: 0 2px 24px; min-height: 0; margin-bottom: 0; overflow: visible;
  border: 0; border-radius: 0; background: none; box-shadow: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.hero h1 { font-size: clamp(2rem,4vw,3rem); letter-spacing: -.04em; line-height: 1.35; margin-block: 6px; }
[dir="rtl"] .hero h1 { letter-spacing: 0; }
.hero > div { max-width: 100%; }
.time-art { display: none; }
.eyebrow { font-size: .78rem; font-weight: 500; }
#syncStatus { font-size: .75rem; margin-block: 4px 0; line-height: 1.6; }
/* Small, legible metrics rather than three competing hero panels. */
.summary { gap: 10px; margin-bottom: 22px; }
.stat {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px 4px;
  text-align: start; padding: 16px; border-radius: 22px;
  background: linear-gradient(155deg,color-mix(in srgb,var(--stat-light) 8%,transparent),transparent 70%),var(--card);
  border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-sheen),0 5px 18px #00000008;
}
.stat span { grid-column: 1; grid-row: 1; padding: 0; color: var(--stat-light); font-size: 2rem; line-height: 1.15; font-weight: 650; }
.stat svg, .stat.today svg, .stat.danger svg {
  grid-column: 2; grid-row: 1; width: 23px; height: 23px; padding: 0;
  border: 0; border-radius: 0; background: transparent; color: var(--stat-light); box-shadow: none; stroke-width: 1.65;
}
.stat small { grid-column: 1 / -1; font-size: .76rem; color: var(--muted); }
.stat::after { display: none; }
.stat:hover { transform: none !important; }
/* Focus list: one quiet surface; color belongs to the route into each item. */
.closure-home {
  padding: 20px; margin-block: 0 24px; border-radius: 26px;
  background: var(--card); border: 1px solid var(--glass-edge); box-shadow: var(--glass-shadow);
}
.closure-home::before { inset-inline: 20%; background: linear-gradient(90deg,transparent,var(--glass-sheen),transparent); opacity: 1; }
.closure-heading { gap: 8px; }
.closure-heading h2 { font-size: 1.1rem; font-weight: 650; }
.closure-heading .secondary-btn { border: 0; background: transparent; padding: 4px; min-height: 44px; font-size: .76rem; }
.closure-home > p { font-size: .79rem; color: var(--muted); margin-block: 4px 14px; }
.focus-list { margin-block: 0; }
.focus-list li + li { border-color: color-mix(in srgb,var(--line) 65%,transparent); }
.focus-action { position: relative; grid-template-columns: 1fr; gap: 3px; padding: 14px 0; padding-inline-end: 25px; border: 0; background: transparent; }
.focus-action::after { content: '›'; direction: ltr; unicode-bidi: isolate; position: absolute; right: 2px; left: auto; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--muted); font-weight: 400; }
[dir="rtl"] .focus-action::after { right: auto; left: 2px; transform: translateY(-50%) rotate(180deg); }
.focus-action strong { font-size: .96rem; font-weight: 600; }
.focus-action span { font-size: .73rem; }
.focus-action small { font-size: .72rem; color: var(--brand); }
.closure-home > .field-hint:last-child { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .71rem; }
.toolbar { gap: 12px; margin-bottom: 16px; }
.tabs { gap: 3px; padding: 4px; border-radius: 18px; background: var(--control); border: 0; }
.tab { font-size: .8rem; min-height: 44px; padding: 7px 10px; }
.tab.active, .review-nav [aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: 0 2px 7px #00000012,inset 0 1px 0 var(--glass-sheen); }
.search { border-radius: 16px; background: var(--card); border-color: var(--glass-edge); }
.item-card { padding: 18px; border-radius: 24px; background: var(--card); border-color: var(--glass-edge); box-shadow: var(--glass-shadow); }
.item-main h3 { font-size: 1rem; }
.type-icon { background: var(--soft); border-radius: 14px; }
.primary-btn, .done-btn, .secondary-btn { border-radius: 16px; }
.primary-btn { box-shadow: inset 0 1px 0 #ffffff70,0 6px 20px var(--neon-glow); }
.secondary-btn { background: var(--rim),var(--soft); border: 1px solid var(--glass-edge); }
/* Stable destination symbols and a floating lens-shaped navigation dock. */
.primary-navigation {
  border: 1px solid var(--glass-edge); background: var(--rim),var(--chrome);
  backdrop-filter: blur(28px) saturate(1.45); -webkit-backdrop-filter: blur(28px) saturate(1.45);
  box-shadow: inset 0 1px 0 var(--glass-sheen),inset 0 -1px 0 #ffffff0c,0 10px 34px #00000030,0 0 30px var(--neon-glow);
}
.primary-navigation button { gap: 3px; font-size: .7rem; border-radius: 24px; min-height: 60px; }
.primary-navigation [aria-current="page"] { background: var(--dock-selection); color: var(--brand); box-shadow: inset 0 1px 0 var(--glass-sheen); }
.primary-navigation [aria-current="page"] .nav-icon { border: 0; background: transparent; box-shadow: none; }
.primary-navigation [aria-current="page"] .alarm-symbol { display: none; animation: none; }
.primary-navigation [aria-current="page"] .destination-icon { display: block; }
.primary-navigation [data-destination="add"] { margin: 0; border: 0; }
.primary-navigation [data-destination="add"] .nav-icon { width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 1px 0 #ffffffa0,0 2px 14px var(--neon-glow); }
.nav-icon { height: 30px; width: 34px; }
.nav-icon .ui-icon { width: 23px; height: 23px; stroke-width: 1.65; }
.quick-menu { background: var(--rim),var(--chrome); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); }
.quick-menu button { font-size: .9rem; }
/* Sheets share the same rhythm, with grouped settings and generous touch areas. */
.dialog { background: var(--dialog-surface); border-color: var(--glass-edge); border-radius: 32px; }
.dialog-head { background: color-mix(in srgb,var(--dialog-surface) 86%,transparent); padding-block: 14px; }
.dialog-head h2 { font-size: 1.15rem; font-weight: 650; }
.close-btn { width: 44px; height: 44px; min-height: 44px; color: var(--muted); font-weight: 400; }
.dialog-actions { background: color-mix(in srgb,var(--dialog-surface) 90%,transparent); }
.dialog input, .dialog select, .dialog textarea { border-radius: 14px; min-height: 48px; }
.dialog .checkbox-label input { min-height: 20px; }
.dialog summary { border-radius: 16px; }
.settings-catalog { gap: 0; background: var(--card); border: 1px solid var(--glass-edge); border-radius: 24px; overflow: hidden; margin-block: 16px; }
.settings-entry { border: 0; border-radius: 0; background: transparent; grid-template-columns: 38px minmax(0,1fr) 16px; padding: 15px; gap: 12px; }
.settings-entry + .settings-entry { border-top: 1px solid var(--line); }
.settings-entry strong { font-size: .9rem; font-weight: 600; }
.settings-entry small { font-size: .73rem; line-height: 1.6; margin-top: 3px; }
.settings-entry:hover { transform: none !important; box-shadow: none !important; background: var(--control); }
.settings-symbol { width: 36px; height: 36px; border-radius: 11px; font-size: 1.2rem; color: var(--brand); background: var(--soft); border-color: var(--glass-edge); box-shadow: inset 0 1px 0 var(--glass-sheen); }
.settings-entry:nth-child(2) .settings-symbol { color: var(--danger); }
.settings-entry:nth-child(3) .settings-symbol { color: var(--copper); }
.settings-entry:nth-child(4) .settings-symbol { color: var(--success); }
.profile-cover { height: 108px; border-radius: 24px; background: radial-gradient(ellipse at 85% 0,#53e3ec3b,transparent 70%),radial-gradient(ellipse at 5% 100%,#9969ef40,transparent 65%),var(--surface); box-shadow: inset 0 1px 0 var(--glass-sheen); }
.profile-cover::after { border-color: var(--glass-sheen); box-shadow: 0 0 0 24px #ffffff04,0 0 0 56px #ffffff04; }
.profile-cover .alarm-symbol { width: 82px; height: 82px; top: 12px; opacity: .65; }
.profile-identity { padding-inline: 10px; gap: 14px; }
.profile-avatar { width: 68px; height: 68px; box-shadow: 0 0 0 1px var(--glass-edge); background: var(--rim),var(--surface); }
.profile-avatar .alarm-symbol { width: 32px; height: 32px; }
.profile-intro { font-size: .83rem; color: var(--muted); margin-block: 18px; }
.profile-stats { padding-block: 16px; border: 0; background: var(--card); border-radius: 22px; }
.profile-stats dd { font-weight: 600; color: var(--ink); font-size: 1.65rem; }
.profile-shortcuts { gap: 10px; margin-top: 18px; }
.profile-shortcuts button { min-height: 52px; }
.welcome-clock > div { border-radius: 50%; background: var(--rim),var(--chrome); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
@media (max-width: 1179px) {
  .primary-navigation { bottom: calc(12px + var(--app-safe-bottom)); inset-inline: max(16px,calc((100vw - 540px)/2)); padding: 6px; gap: 3px; border-radius: 32px; }
  main { padding-bottom: calc(116px + var(--app-safe-bottom)); }
  .toast { bottom: calc(106px + var(--app-safe-bottom)); }
}
@media (min-width: 1180px) {
  .topbar { margin-inline: 28px; max-width: none; }
  .primary-navigation { border-radius: 28px; }
  .primary-navigation button { border-radius: 18px; }
}
@media (max-width: 720px) {
  .topbar { margin: calc(8px + var(--app-safe-top)) 22px 0; min-height: 52px; padding: 0; gap: 8px; flex-wrap: nowrap; }
  .topbar .secondary-btn { font-size: .76rem; padding-inline: 14px; min-height: 44px; }
  .clock-menu { width: 44px; height: 44px; min-height: 44px; }
  .brand strong { font-size: .95rem; }
  main { padding-top: 22px; padding-inline: 22px; }
  .hero { padding: 0 0 22px; min-height: 0; margin-bottom: 0; }
  .hero h1 { font-size: 2rem; }
  .stat { padding: 14px 12px; border-radius: 21px; gap: 9px 4px; }
  .stat span { font-size: 1.85rem; }
  .stat small { font-size: .71rem; }
  .stat svg { width: 20px; height: 20px; }
  .summary { gap: 8px; margin-bottom: 20px; }
  .closure-home { padding: 16px; }
  .closure-heading h2 { font-size: 1.03rem; }
  .dialog { border-radius: 30px 30px 0 0; max-height: calc(100dvh - max(16px,var(--app-safe-top))); padding-bottom: max(20px,var(--app-safe-bottom)); }
  .dialog-actions { padding-bottom: max(16px,var(--app-safe-bottom)); }
  .profile-shortcuts { grid-template-columns: 1fr 1fr; }
  .profile-shortcuts button { font-size: .8rem; padding-inline: 10px; }
}
@media (max-width: 360px) {
  main { padding-inline: 16px; }
  .topbar { margin-inline: 16px; }
  .stat { padding: 12px 8px; }
  .stat svg { width: 18px; height: 18px; }
  .closure-heading { align-items: start; }
}
/* Prism refinement: light on the edges, quiet surfaces beneath the words. */
:root {
  --prism-cyan: #1298b526;
  --prism-violet: #8874df24;
  --prism-highlight: #ffffffed;
  --prism-depth: #283d601c;
  --prism-panel: #f8faff;
  --aura-cyan: #00bbd433;
  --aura-violet: #9268e52e;
  --aura-rose: #ef9ac423;
}
:root[data-theme="dark"] {
  --prism-cyan: #65e6f037;
  --prism-violet: #a39bff28;
  --prism-highlight: #e0faff66;
  --prism-depth: #00000055;
  --prism-panel: #151e2d;
  --card: rgba(21,30,45,.91);
  --chrome: rgba(24,35,53,.76);
  --aura-cyan: #1cd9e84d;
  --aura-violet: #9366fa48;
  --aura-rose: #e48bce21;
  --button-fill: linear-gradient(118deg,#a3f6ef 0%,#86def3 48%,#b4c1ff 100%);
}
.clock-menu {
  position: relative; isolation: isolate;
  background: radial-gradient(ellipse at 25% 0,var(--prism-cyan),transparent 66%),var(--rim),var(--chrome);
  box-shadow: inset 0 1px 1px var(--prism-highlight),inset 0 -2px 3px #0000000c,0 6px 20px var(--prism-depth),0 0 24px var(--prism-cyan);
}
.clock-menu::before {
  content: ''; position: absolute; inset: -5px; border-radius: inherit; pointer-events: none;
  border: 1px solid color-mix(in srgb,var(--brand) 20%,transparent);
  border-inline-start-color: transparent; border-block-end-color: transparent;
  transform: rotate(-28deg);
}
.clock-menu .ui-icon { filter: drop-shadow(0 1px 5px var(--prism-cyan)); }
.stat {
  background: radial-gradient(ellipse at 8% 0,color-mix(in srgb,var(--stat-light) 14%,transparent),transparent 75%),var(--rim),var(--card);
  box-shadow: inset 0 1px 0 var(--prism-highlight),inset 0 -1px 0 #ffffff08,0 8px 22px var(--prism-depth);
}
.stat svg, .stat.today svg, .stat.danger svg {
  width: 30px; height: 30px; padding: 5px; border-radius: 10px;
  background: color-mix(in srgb,var(--stat-light) 10%,transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb,var(--stat-light) 25%,transparent);
}
.closure-home, .item-card {
  background: radial-gradient(ellipse at 100% 0,var(--prism-cyan),transparent 46%),linear-gradient(160deg,#ffffff05,transparent 40%),var(--card);
  box-shadow: inset 0 1px 0 var(--prism-highlight),inset 0 -1px 0 #ffffff08,0 16px 32px var(--prism-depth);
}
.closure-home::before { inset-inline: 12%; height: 1px; background: linear-gradient(90deg,transparent,var(--brand),#c4b5ff,transparent); opacity: .7; }
.closure-heading h2 { display: flex; align-items: center; gap: 8px; }
.closure-heading h2::before { content: ''; width: 5px; height: 16px; flex-shrink: 0; border-radius: 8px; background: linear-gradient(var(--brand),#9c9de5); box-shadow: 0 0 12px var(--prism-cyan); }
.focus-action::after { width: 24px; height: 28px; display: grid; place-items: center; border-radius: 10px; font-size: 1.25rem; background: color-mix(in srgb,var(--brand) 5%,transparent); color: var(--brand); }
.focus-action { padding-inline-end: 36px; }
.primary-navigation {
  background: radial-gradient(ellipse at 12% 0,var(--prism-violet),transparent 60%),radial-gradient(ellipse at 90% 100%,var(--prism-cyan),transparent 60%),var(--rim),var(--chrome);
  box-shadow: inset 0 1px 1px var(--prism-highlight),inset 0 -1px 0 #ffffff12,0 12px 40px #00000033,0 0 26px var(--prism-cyan);
}
.primary-navigation [aria-current="page"] {
  background: linear-gradient(140deg,var(--prism-cyan),transparent 75%),var(--dock-selection);
  box-shadow: inset 0 1px 0 var(--prism-highlight),inset 0 -1px 0 var(--glass-edge),0 3px 9px #00000012;
}
.primary-navigation [data-destination="add"] .nav-icon {
  width: 36px; height: 36px; background: linear-gradient(150deg,#ffffff38,transparent 50%),var(--button-fill);
  box-shadow: inset 0 1px 1px #ffffffcf,inset 0 -2px 2px #07325620,0 4px 12px var(--prism-cyan);
}
.primary-btn { background: linear-gradient(165deg,#ffffff20,transparent 45%),var(--button-fill); box-shadow: inset 0 1px 1px #ffffff90,inset 0 -1px 0 #10294420,0 6px 18px var(--prism-cyan); }
.secondary-btn { box-shadow: inset 0 1px 0 var(--glass-sheen),0 3px 10px #00000008; }
.closure-heading .secondary-btn { box-shadow: none; }
.dialog {
  background: var(--dialog-surface);
  box-shadow: inset 0 1px 0 var(--prism-highlight),0 -10px 60px var(--prism-depth);
}
.dialog-head { border-bottom-color: color-mix(in srgb,var(--glass-edge) 65%,transparent); }
.settings-catalog { box-shadow: inset 0 1px 0 var(--prism-highlight),0 8px 24px #0000000a; }
.settings-symbol { background: linear-gradient(145deg,var(--prism-cyan),transparent 80%),var(--soft); }
.profile-cover {
  background: radial-gradient(ellipse at 100% 0,#8eeafc55,transparent 66%),radial-gradient(ellipse at 5% 100%,#a493ff66,transparent 70%),linear-gradient(125deg,var(--surface),var(--prism-panel));
  box-shadow: inset 0 1px 0 var(--prism-highlight),0 10px 25px var(--prism-depth);
}
.profile-cover::after { border-color: color-mix(in srgb,var(--brand) 40%,transparent); box-shadow: 0 0 0 22px #ffffff06,0 0 0 44px #ffffff04,0 0 45px var(--prism-cyan); }
.profile-cover .alarm-symbol { opacity: .85; filter: drop-shadow(0 0 10px var(--prism-cyan)); }
.profile-avatar { background: radial-gradient(ellipse at 20% 0,var(--prism-cyan),transparent 70%),var(--rim),var(--surface); box-shadow: 0 0 0 1px var(--glass-edge),0 4px 18px var(--prism-depth); }
/* Signature entrance stays within its original 1.1s and never intercepts input. */
.welcome-clock { animation-name: prism-welcome; }
.welcome-clock::before { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle,var(--prism-cyan),transparent 68%); }
.welcome-clock > div {
  position: relative; isolation: isolate; width: 148px; height: 148px; transform: none;
  background: radial-gradient(ellipse at 25% 5%,var(--prism-cyan),transparent 70%),var(--rim),var(--chrome);
  border-color: var(--prism-highlight);
  box-shadow: inset 0 2px 2px var(--prism-highlight),inset 0 -4px 12px #00000015,0 24px 60px var(--prism-depth),0 0 55px var(--prism-cyan);
}
.welcome-clock > div::before, .welcome-clock > div::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; }
.welcome-clock > div::before { inset: -13px; border: 1px solid var(--brand); border-inline-start-color: transparent; border-block-end-color: transparent; opacity: .6; animation: prism-orbit 1100ms cubic-bezier(.2,.7,.2,1) both; }
.welcome-clock > div::after { inset: -25px; border: 1px solid var(--glass-sheen); opacity: .5; }
.welcome-clock svg { filter: drop-shadow(0 0 8px var(--prism-cyan)); animation: prism-bell 850ms ease-out both; }
@keyframes prism-welcome { 0% { opacity: 0; transform: scale(.84) translateY(12px); } 22%,70% { opacity: 1; transform: scale(1) translateY(0); } 100% { opacity: 0; transform: scale(1.08) translateY(-9px); } }
@keyframes prism-orbit { from { transform: rotate(-100deg) scale(.94); } to { transform: rotate(12deg) scale(1); } }
@keyframes prism-bell { 0% { transform: rotate(-12deg); } 25% { transform: rotate(9deg); } 48% { transform: rotate(-5deg); } 70%,100% { transform: rotate(0); } }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-visual-motion="still"]):not([data-visual-paused="true"]) :is(.primary-navigation button,.clock-menu,.primary-btn,.secondary-btn,.close-btn) { transition: transform 160ms cubic-bezier(.2,.7,.2,1),box-shadow 180ms ease,background-color 180ms ease; }
  :root:not([data-visual-motion="still"]):not([data-visual-paused="true"]) :is(.primary-navigation button,.clock-menu,.primary-btn,.secondary-btn,.close-btn):active { transform: scale(.96); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .profile-cover,.profile-avatar,.dialog,.secondary-btn,.settings-symbol { background: var(--surface); box-shadow: none; }
  .clock-menu::before,.welcome-clock::before,.welcome-clock > div::before,.welcome-clock > div::after { display: none; }
}

/* A quiet, discoverable command row and consistent directional sheet navigation. */
.topbar .input-row { gap: 6px; flex-wrap: nowrap; }
.topbar .theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.theme-toggle .ui-icon { width: 18px; height: 18px; }
.theme-sun { display: none; }
[data-theme="dark"] .theme-sun { display: block; }
[data-theme="dark"] .theme-moon { display: none; }
.dialog-head { display: grid; grid-template-columns: 86px minmax(0,1fr) 86px; align-items: center; gap: 8px; }
.dialog-head h2 { grid-column: 2; grid-row: 1; margin: 0; text-align: center; line-height: 1.5; }
.dialog-head .screen-back { grid-column: 1; grid-row: 1; display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: auto; min-height: 44px; padding-inline: 10px; border-radius: 22px; font-size: .82rem; color: var(--brand); }
.screen-back svg { width: 20px; height: 20px; }
[dir="rtl"] .screen-back svg { transform: rotate(180deg); }
#settingsBack { display: none; } /* The sheet header now owns the same one-step Back. */
@media (max-width: 390px) {
  .topbar .secondary-btn { padding-inline: 10px; }
  .dialog-head { grid-template-columns: 76px minmax(0,1fr) 76px; gap: 4px; }
}

/* Transparency is progressive enhancement; accessibility always wins. */
@supports not (backdrop-filter: blur(12px)) {
  .primary-navigation, .quick-menu, .clock-menu, .topbar .secondary-btn { background: var(--surface); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .ambient-light { display: none; }
  .primary-navigation, .quick-menu, .clock-menu, .topbar .secondary-btn, .close-btn, .dialog-head, .dialog-actions, .welcome-clock > div { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .stat, .item-card, .closure-home, .settings-catalog, .profile-stats { background: var(--surface); border: 1px solid var(--muted); box-shadow: none; }
  .primary-navigation [aria-current="page"], .tab.active { outline: 2px solid var(--brand); outline-offset: -2px; }
  .primary-btn { background: var(--brand); box-shadow: none; }
}
@media (forced-colors: active) {
  .primary-navigation, .quick-menu, .clock-menu, .topbar .secondary-btn, .close-btn, .stat, .item-card, .closure-home, .settings-catalog, .profile-stats, .primary-btn, .secondary-btn { background: Canvas; color: CanvasText; border: 1px solid CanvasText; box-shadow: none; backdrop-filter: none; }
  .primary-navigation [aria-current="page"], .tab.active { outline: 2px solid Highlight; }
  .stat span, .stat svg, .stat.today svg, .stat.danger svg { color: CanvasText; }
}

@media (prefers-reduced-motion: no-preference) {
  :root:not([data-visual-motion="still"]):not([data-visual-paused="true"]) .dialog[open] { animation: lustre-sheet-in 220ms cubic-bezier(.2,.7,.2,1); }
}
@keyframes lustre-sheet-in { from { opacity: .3; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.settings-chevron { direction: ltr; unicode-bidi: isolate; }

.dialog input:focus, .dialog select:focus, .dialog textarea:focus { border-color: var(--brand); box-shadow: none; }

/* Explanations are available on demand, without hiding controls or warnings. */
.compact-help { margin-block: 10px 0; border-top: 1px solid var(--line); padding-top: 6px; }
.compact-help > summary { min-height: 44px; display: list-item; align-content: center; cursor: pointer; color: var(--muted); font-size: .76rem; padding: 9px 2px; }
.compact-help > p { margin-block: 6px; }
.focus-list { margin-top: 8px; }
