:root {
  --ink: #1c1c1e;
  --brand: #0062cc;
  --on-brand: #ffffff;
  --muted: #62626b;
  --input-surface: #ffffff;
  --soft: #e9f1ff;
  --glow: #e8effb;
  --warning-surface: #fff4e4;
  --warning-ink: #714915;
  --accent: #996000;
  --ink-2: #005ac1;
  --paper: #f2f2f7;
  --surface: #ffffff;
  --line: #d8d8de;
  --copper: #996000;
  --danger: #c42b28;
  --shadow: 0 12px 40px rgba(23, 63, 55, 0.09);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
textarea:focus-visible {
  outline: 3px solid #996000;
  outline-offset: 3px;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 12px 0;
  padding: 12px;
}
.dialog .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dialog .checkbox-label input {
  width: 20px;
  margin: 0;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.attachments {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  .topbar {
    height: auto;
    min-height: 76px;
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 8px;
  }
  .topbar .secondary-btn {
    padding: 10px;
  }
  .item-main {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .item-actions button {
    min-height: 44px;
  }
  .tabs {
    max-width: 100%;
  }
  .brand strong {
    font-size: 17px;
  }
  .dialog {
    max-height: 90dvh;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: auto;
  padding: 0 28px;
  border-bottom: 1px solid rgba(23, 63, 55, 0.12);
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 600;
  box-shadow: 0 7px 18px rgba(23, 63, 55, 0.2);
}
.brand strong,
.brand small {
  display: block;
}
.brand strong {
  font-size: 20px;
}
.brand small {
  font-size: 11px;
  color: var(--muted);
  margin-top: -2px;
}
.icon-btn,
.close-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 48px 28px 100px;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 32px;
}
.eyebrow {
  margin: 0 0 7px;
  color: var(--copper);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.625rem);
  line-height: 1.1;
  margin: 0 0 10px;
}
.hero > div > p:last-child {
  margin: 0;
  color: var(--muted);
}
.primary-btn,
.secondary-btn,
.done-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
}
.primary-btn {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 63, 55, 0.18);
}
.primary-btn:hover {
  background: #0f302a;
}
.secondary-btn {
  border: 1px solid var(--line);
  background: var(--input-surface);
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 34px;
}
.stat {
  text-align: start;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 254, 249, 0.82);
  cursor: pointer;
  transition: 0.2s;
}
.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat span,
.stat small {
  display: block;
}
.stat span {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}
.stat small {
  margin-top: 7px;
  font-weight: 700;
  color: var(--muted);
}
.stat.danger span {
  color: var(--danger);
}
.stat.today span {
  color: var(--copper);
}
.stat.upcoming span {
  color: #567199;
}
.toolbar {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.tabs {
  display: flex;
  gap: 6px;
  overflow: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tab {
  white-space: nowrap;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 9px 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.tab.active {
  background: var(--ink);
  color: #fff;
}
.search {
  min-width: 250px;
  background: var(--input-surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  gap: 8px;
}
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}
.items {
  display: grid;
  gap: 11px;
}
.item-card {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 3px 14px rgba(23, 63, 55, 0.035);
}
.item-card.overdue {
  border-inline-start: 3px solid var(--danger);
}
.item-card.done {
  opacity: 0.68;
}
.type-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
}
.item-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.category-dot:before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 6px;
}
.item-main h3 {
  margin: 3px 0;
  font-size: 17px;
}
.due-date {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.due-date strong {
  margin-inline-start: 8px;
  color: var(--copper);
}
.overdue .due-date strong {
  color: var(--danger);
}
.notes {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.item-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.done-btn {
  background: var(--soft);
  color: var(--ink);
  padding: 9px 16px;
}
.more-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 2px;
}
.done-stamp {
  font-size: 12px;
  font-weight: 600;
  color: #3b7b65;
}
.empty {
  text-align: center;
  padding: 70px 20px;
}
.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: auto;
  background: var(--glow);
  font-size: 28px;
}
.empty h2 {
  margin-bottom: 4px;
}
.empty p,
.muted {
  color: var(--muted);
}
.floating-add {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  border: 0;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--ink);
  color: white;
  font-size: 30px;
  box-shadow: 0 14px 30px rgba(23, 63, 55, 0.3);
}
.dialog {
  width: min(580px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  background: var(--surface);
  padding: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}
.dialog::backdrop {
  background: rgba(15, 36, 31, 0.55);
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 22px;
}
.dialog-head h2 {
  margin: 0;
}
.dialog label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 14px 0;
}
.dialog input,
.dialog select,
.dialog textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--input-surface);
  padding: 11px;
  margin-top: 6px;
  outline: 0;
}
.dialog input:focus,
.dialog select:focus,
.dialog textarea:focus {
  border-color: var(--copper);
}
.input-row {
  display: flex;
  gap: 8px;
  align-items: end;
}
.input-row > * {
  flex: 1;
}
.input-row button {
  flex: 0 0 auto;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.setting-card h3,
.setting-card p {
  margin: 0;
}
.setting-card h3 {
  font-size: 15px;
}
.setting-card p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.small-dialog {
  width: min(480px, calc(100% - 28px));
}
.category-list > div,
.history-list > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.category-list strong {
  flex: 1;
}
.category-list button {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
}
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}
.history-list span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
}
.history-list p,
.history-list small {
  display: block;
  margin: 0;
}
.history-list small {
  color: var(--muted);
}
.toast {
  width: max-content;
  max-width: min(90vw, 32rem);
  position: fixed;
  bottom: 28px;
  right: 50%;
  transform: translate(50%, 30px);
  background: #111113;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 10;
}
.toast.show {
  opacity: 1;
  transform: translate(50%, 0);
}
@media (max-width: 720px) {
  .topbar {
    height: 70px;
    padding: 0 18px;
  }
  .brand small {
    display: none;
  }
  main {
    padding: 30px 16px 100px;
  }
  .hero {
    align-items: start;
  }
  .hero .primary-btn {
    display: none;
  }
  .summary {
    gap: 8px;
  }
  .stat {
    padding: 15px;
  }
  .stat span {
    font-size: 28px;
  }
  .toolbar {
    display: block;
  }
  .tabs {
    margin-bottom: 12px;
  }
  .search {
    min-width: 0;
  }
  .item-card {
    grid-template-columns: 42px 1fr;
    padding: 15px 12px;
    gap: 10px;
  }
  .type-icon {
    width: 40px;
    height: 40px;
  }
  .item-actions {
    grid-column: 2;
    justify-content: flex-end;
  }
  .floating-add {
    display: block;
  }
  .dialog {
    padding: 20px;
  }
  .setting-card {
    align-items: flex-start;
  }
  .input-row {
    flex-wrap: wrap;
  }
}
[hidden] {
  display: none !important;
}

/* Appearance follows the device until the saved preference is applied. */
:root[data-theme="dark"] {
  --ink: #f5f5f7;
  --ink-2: #93c5ff;
  --paper: #000000;
  --surface: #1c1c1e;
  --input-surface: #2c2c2e;
  --line: #454549;
  --muted: #b5b5bf;
  --brand: #78b3ff;
  --on-brand: #111113;
  --copper: #ffc477;
  --danger: #ff8a80;
  --soft: #20324c;
  --glow: #202b3b;
  --warning-surface: #3d3021;
  --warning-ink: #f2c692;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #f5f5f7;
    --paper: #000000;
    --surface: #1c1c1e;
    --input-surface: #2c2c2e;
    --line: #454549;
    --muted: #b5b5bf;
    --brand: #78b3ff;
    --on-brand: #111113;
    --copper: #ffc477;
    --danger: #ff8a80;
    --soft: #20324c;
    --glow: #202b3b;
    color-scheme: dark;
  }
}
body {
  line-height: 1.65;
}
html:has(dialog[open]),
body:has(dialog[open]) {
  overflow: hidden;
}
button,
select,
summary {
  touch-action: manipulation;
}
button {
  min-height: 44px;
}
button:disabled {
  opacity: 0.6;
  cursor: progress;
}
a {
  color: var(--ink);
}
.topbar {
  border-color: var(--line);
}
.primary-btn,
.brand-mark,
.tab.active,
.floating-add {
  background: var(--brand);
  color: var(--on-brand);
}
.primary-btn:hover {
  background: color-mix(in srgb, var(--brand) 88%, var(--ink));
}
.secondary-btn,
.icon-btn,
.close-btn {
  background: var(--input-surface);
}
.stat {
  background: var(--surface);
}
.stat.upcoming span {
  color: var(--ink-2);
}
.dialog {
  color: var(--ink);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.dialog input,
.dialog select,
.dialog textarea {
  font-size: max(16px, 1rem);
  min-height: 46px;
}
.dialog input[type="checkbox"] {
  min-height: 22px;
  height: 22px;
  width: 22px;
  accent-color: var(--brand);
  flex: 0 0 auto;
}
.dialog label {
  font-size: 14px;
  line-height: 1.55;
}
.dialog .checkbox-label {
  font-weight: 500;
  align-items: start;
}
.dialog-head {
  position: sticky;
  top: -26px;
  z-index: 3;
  background: var(--surface);
  padding-block: 14px;
  margin-top: -14px;
  margin-bottom: 12px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 21px;
}
.close-btn {
  flex: 0 0 44px;
  height: 44px;
}
.form-intro,
.field-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  margin: 7px 0 12px;
}
small.field-hint {
  display: block;
}
.form-group,
.reminder-step {
  margin-block: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
summary {
  min-height: 48px;
  padding: 13px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
summary small {
  display: block;
  margin-inline-start: 20px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.group-body {
  padding: 0 14px 14px;
}
.group-body > label:first-child {
  margin-top: 10px;
}
.form-group[open] > summary,
.reminder-step[open] > summary {
  border-bottom: 1px solid var(--line);
}
.reminder-step {
  background: var(--input-surface);
}
.reminder-step .group-body {
  padding-inline: 12px;
}
.step-options {
  border-top: 1px solid var(--line);
  margin-block: 12px;
}
.step-options > summary {
  padding-inline: 0;
}
.work-states {
  margin-block: 8px;
  padding: 10px;
}
.work-states legend {
  font-size: 13px;
}
.add-level {
  width: 100%;
}
.text-danger {
  background: transparent;
  border: 0;
  color: var(--danger);
  padding: 10px 4px;
  font-weight: 700;
  cursor: pointer;
}
.reminder-preview {
  border-inline-start: 3px solid var(--copper);
  background: var(--soft);
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 18px;
  font-size: 14px;
}
.reminder-preview p {
  margin: 3px 0;
}
.reminder-preview small {
  color: var(--muted);
  font-size: 12px;
}
.quiet-shift {
  font-weight: 700;
}
.permission-warning {
  border: 1px solid var(--copper);
  border-radius: 12px;
  padding: 14px;
  margin-block: 16px;
  background: var(--warning-surface);
  color: var(--warning-ink);
  font-size: 14px;
}
.permission-warning p {
  margin: 0 0 10px;
  white-space: pre-line;
}
.permission-warning .input-row {
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.form-error {
  color: var(--danger);
  font-size: 14px;
  white-space: pre-wrap;
}
.dialog-actions {
  position: sticky;
  bottom: -26px;
  background: var(--surface);
  z-index: 2;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.appearance-settings {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.input-row > * {
  min-width: 0;
}
.date-fields > label {
  flex: 1 1 135px;
}
@media (max-width: 720px) {
  .topbar {
    height: auto;
    min-height: 76px;
    padding: max(12px, env(safe-area-inset-top)) 16px 12px;
    flex-wrap: wrap;
  }
  .topbar > .input-row {
    gap: 6px;
  }
  .topbar .secondary-btn {
    font-size: 13px;
    padding: 9px 10px;
  }
  .hero h1 {
    font-size: 30px;
    line-height: 1.4;
  }
  .dialog {
    width: calc(100% - 16px);
    max-height: calc(100dvh - 16px);
    padding: 18px 16px max(18px, env(safe-area-inset-bottom));
    border-radius: 18px;
  }
  .dialog-head {
    top: -18px;
  }
  .dialog-actions {
    bottom: -18px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .dialog-actions .primary-btn {
    flex: 1;
  }
  .group-body {
    padding-inline: 10px;
  }
  .setting-card {
    flex-wrap: wrap;
  }
  .floating-add {
    bottom: max(24px, env(safe-area-inset-bottom));
    inset-inline-start: 20px;
    inset-inline-end: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

/* Focus surface: one next step, detail on demand. */
.closure-home {
  margin-block: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.closure-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.closure-heading h2 { font-size: 1.15rem; margin: 0; }
.closure-calm { color: var(--ink); }
.focus-list { list-style: none; padding: 0; margin-block: 12px; display: grid; gap: 8px; }
.focus-action { display: grid; gap: 4px; width: 100%; text-align: start; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--input-surface); cursor: pointer; overflow-wrap: anywhere; }
.focus-action span, .focus-action small { color: var(--muted); }
.review-nav, .template-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.review-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.review-nav button { padding: 10px 6px; font-size: .875rem; }
.review-nav [aria-pressed="true"] { background: var(--brand); color: var(--on-brand); }
.review-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.review-stats > div { border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.review-stats dd { font-size: 1.8rem; font-weight: bold; margin: 0; }
.review-entry { border-block-start: 1px solid var(--line); padding-block: 16px; display: grid; gap: 8px; }
.review-entry h3, .review-entry p { margin: 0; overflow-wrap: anywhere; }
.closure-home button, #reviewDialog button, .template-chips button, .close-btn, .item-actions button { min-width: 48px; min-height: 48px; }
.completion-toast::before { content: '✓'; margin-inline-end: 10px; }
.completion-toast { animation: completion-arrive 180ms ease-out; }
@keyframes completion-arrive { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 480px) { .closure-home { padding: 16px; } .closure-heading > button { width: 100%; } }

/* Mawed Aurora: quiet light, clear content, glass on navigation and controls. */
:root {
  --ink: #19243e; --muted: #53617c; --paper: #eef2fa;
  --surface: #ffffff; --input-surface: #f9fbff; --line: #c3cde1;
  --brand: #126b82; --ink-2: #126b82; --on-brand: #ffffff;
  --soft: #e5edff; --control: #e8edf7; --success: #21714e;
  --danger: #b83752; --copper: #875300;
  --chrome: rgba(250,252,255,.70); --card: rgba(255,255,255,.91);
  --dialog-surface: #f4f7fd; --glass-edge: rgba(43,130,156,.38);
  --selected-edge: #829bd5; --focus-tint: #e0eafa;
  --glass-shadow: 0 10px 30px #3b4e7a12, 0 0 22px #32c9e010, inset 0 1px 0 #ffffffb3;
  --neon-edge: #20b9d569; --neon-glow: #24b8d326; --glass-sheen: #ffffff80;
  --aura-cyan: #32c9e047; --aura-violet: #9869e83b; --aura-rose: #e18ec632;
  --button-fill: linear-gradient(115deg,#106a85,#4352ae);
}
:root[data-theme="dark"] {
  --ink: #edf3ff; --muted: #aab8d4; --paper: #080e1e;
  --surface: #131e34; --input-surface: #101a2d; --line: #35445f;
  --brand: #7cf1ff; --ink-2: #7cf1ff; --on-brand: #062139;
  --soft: #223657; --control: #111d33; --success: #86dfb9;
  --danger: #ff9fae; --copper: #efcd8b;
  --chrome: rgba(10,24,39,.64); --card: rgba(16,29,48,.85);
  --dialog-surface: #101a2d; --glass-edge: rgba(83,218,241,.40);
  --selected-edge: #5c78aa; --focus-tint: #22385a;
  --glass-shadow: 0 14px 38px #00000030, 0 0 26px #00dafa0d, inset 0 1px 0 #c1f7ff30;
  --neon-edge: #66efff94; --neon-glow: #00dafa38; --glass-sheen: #b9f5ff24;
  --aura-cyan: #00dafa58; --aura-violet: #8561fb4d; --aura-rose: #df72b536;
  --button-fill: linear-gradient(115deg,#57edfa,#9bb6ff);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { --paper: #080e1e; --ink: #edf3ff; --surface: #131e34; --dialog-surface: #101a2d; --card: #131e34; --chrome: #131e34; --control: #111d33; }
}
body { isolation: isolate; }
.ambient-light { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient-light::before, .ambient-light::after {
  content: ""; position: absolute; inset: -8%;
  background: radial-gradient(ellipse at 90% 4%,var(--aura-cyan),transparent 48%), radial-gradient(ellipse at 4% 40%,var(--aura-violet),transparent 55%);
  animation: aurora-drift 24s ease-in-out infinite alternate;
}
.ambient-light::after { background: radial-gradient(ellipse at 65% 85%,var(--aura-rose),transparent 52%); animation-duration: 32s; animation-direction: alternate-reverse; }
@keyframes aurora-drift { from { transform: translate3d(-2%,-1%,0) scale(1); opacity: .65; } to { transform: translate3d(2%,2%,0) scale(1.06); opacity: 1; } }
:root[data-visual-motion="still"] *, :root[data-visual-motion="still"] *::before, :root[data-visual-motion="still"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
:root[data-visual-paused="true"] .ambient-light::before, :root[data-visual-paused="true"] .ambient-light::after { animation-play-state: paused; }
body { line-height: 1.6; }
button, input, select, textarea { font-size: 1rem; }
button { min-height: 48px; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, select, textarea, summary):focus-visible,
.dialog :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--brand); outline-offset: 3px;
}
.topbar { max-width: 1024px; min-height: 76px; height: auto; margin: 20px auto 0; padding: 12px 24px; gap: 16px; border: 1px solid var(--glass-edge); border-radius: 24px; background: var(--chrome); box-shadow: var(--glass-shadow); }
.brand { gap: 10px; }
.brand strong { font-size: 1.125rem; font-weight: 600; }
.brand small { font-size: .75rem; margin: 0; }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; box-shadow: none; background: var(--soft); color: var(--brand); border: 1px solid var(--glass-edge); }
.topbar .secondary-btn, .topbar .icon-btn { border: 0; color: var(--brand); background: transparent; }
.icon-btn, .close-btn { width: 48px; height: 48px; border-radius: 50%; }
.ui-icon { width: 22px; height: 22px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
main { max-width: 1080px; padding-top: 36px; }
.hero { margin-bottom: 28px; gap: 20px; }
.hero h1 { letter-spacing: -.025em; line-height: 1.35; font-weight: 700; }
.eyebrow { color: var(--muted); font-size: .8125rem; font-weight: 500; letter-spacing: 0; }
#syncStatus { font-size: .875rem; overflow-wrap: anywhere; }
.primary-btn, .secondary-btn, .done-btn { border-radius: 12px; font-weight: 600; box-shadow: none; }
.secondary-btn { color: var(--brand); border-color: transparent; background: var(--soft); }
.summary { gap: 12px; margin-bottom: 24px; }
.stat { position: relative; overflow: hidden; padding: 20px; border: 1px solid var(--glass-edge); border-radius: 24px; background: var(--card); box-shadow: var(--glass-shadow); }
.stat span { font-size: 2.25rem; font-variant-numeric: tabular-nums; padding-top: 8px; }
.stat small { font-size: .8125rem; font-weight: 500; }
.stat svg { color: var(--brand); width: 36px; height: 36px; padding: 7px; border-radius: 12px; background: var(--soft); }
.stat.danger svg { color: var(--danger); }
.stat.today svg { color: var(--copper); }
.stat:hover { transform: none; box-shadow: inset 0 0 0 2px var(--line); }
.closure-home { position: relative; overflow: hidden; border: 1px solid var(--glass-edge); border-radius: 28px; margin-block: 24px; padding: 24px; background: linear-gradient(120deg, var(--focus-tint), transparent 70%), var(--card); box-shadow: var(--glass-shadow); }
.closure-heading h2 { font-size: 1.125rem; font-weight: 600; }
.closure-heading .secondary-btn { background: var(--soft); padding: 8px 16px; font-size: .8125rem; border: 1px solid var(--glass-edge); border-radius: 999px; }
.focus-list { gap: 0; }
.focus-list li + li { border-top: 1px solid var(--line); }
.focus-action { border: 0; background: transparent; padding-inline: 0; border-radius: 8px; }
.focus-action strong { font-size: 1rem; font-weight: 600; }
.focus-action span, .focus-action small { font-size: .8125rem; }
.toolbar { flex-wrap: wrap; gap: 12px; }
.tabs, .review-nav { background: var(--control); border: 1px solid var(--glass-edge); border-radius: 18px; padding: 5px; gap: 3px; }
.tabs { flex-wrap: wrap; overflow: visible; }
.tab { padding: 8px 12px; font-size: .875rem; color: var(--ink); font-weight: 500; }
.tab.active, .review-nav [aria-pressed="true"] { background: var(--soft); color: var(--brand); box-shadow: inset 0 0 0 1px var(--selected-edge); border-radius: 12px; }
.review-nav button { background: transparent; border: 0; color: var(--muted); }
.search { background: var(--control); border: 1px solid var(--glass-edge); border-radius: 18px; min-height: 48px; align-items: center; flex: 1 1 220px; }
.search span { font-size: .875rem; color: var(--muted); }
.search:focus-within { outline: 3px solid var(--brand); outline-offset: 3px; }
.items { gap: 12px; background: transparent; }
.item-card { border: 1px solid var(--glass-edge); border-radius: 22px; background: var(--card); box-shadow: var(--glass-shadow); padding: 20px; }

.item-card:first-child { border-start-start-radius: 20px; border-start-end-radius: 20px; }
.item-card:last-child { border-end-start-radius: 20px; border-end-end-radius: 20px; }
.item-card.done { opacity: 1; }
.type-icon { border-radius: 12px; font-size: 1.375rem; }
.item-main h3 { font-size: 1.0625rem; font-weight: 600; }
.item-meta { flex-wrap: wrap; gap: 4px 10px; font-size: .75rem; }
.due-date, .notes { font-size: .8125rem; }
.more-btn { min-width: 48px; color: var(--brand); }
.done-btn { color: var(--brand); }
.done-stamp { color: var(--success); }
.dialog { background: var(--dialog-surface); border: 1px solid var(--glass-edge); border-radius: 28px; padding: 24px; box-shadow: 0 32px 100px #00000055, inset 0 1px 0 var(--glass-edge); }
.dialog::backdrop { background: rgba(0, 0, 0, .38); backdrop-filter: blur(4px); }
.dialog-head, .dialog-actions { background: var(--chrome); backdrop-filter: blur(16px); }
.dialog-head { top: -24px; margin-inline: -24px; padding-inline: 24px; border-bottom: 0; }
.dialog-head h2 { font-size: 1.1875rem; font-weight: 600; }
.close-btn { background: var(--control); border: 0; color: var(--muted); font-size: 1.625rem; }
.dialog-actions { bottom: -24px; margin-inline: -24px; padding-inline: 24px; }
.dialog input, .dialog select, .dialog textarea { background: var(--input-surface); border: 1px solid var(--line); border-radius: 10px; }
.dialog label { font-size: .875rem; font-weight: 500; }
.form-group, .reminder-step { border: 0; border-radius: 16px; }
summary { font-size: .9375rem; font-weight: 500; padding-block: 16px; }
summary::marker { color: var(--muted); }
summary small { font-size: .8125rem; }
.form-intro, .field-hint, .setting-card p { font-size: .8125rem; }
.appearance-settings { background: var(--surface); padding: 16px; border: 0; border-radius: 16px; margin-block: 16px; }
.setting-card { background: var(--surface); padding: 16px; border-radius: 12px; margin-block: 8px; }
.setting-card h3 { font-size: .9375rem; font-weight: 500; }
.review-stats > div { background: var(--surface); border: 0; }
.toast { background: var(--ink); color: var(--paper); border-radius: 18px; border: 1px solid var(--glass-edge); }
.empty { padding-block: 48px; }
.empty h2 { font-size: 1.125rem; font-weight: 600; }
.empty p { font-size: .9375rem; max-width: 34rem; margin-inline: auto; }
.floating-add { box-shadow: 0 4px 16px #00000024; border-radius: 50%; width: 56px; height: 56px; }
@media (max-width: 720px) {
  .topbar { margin: 10px 12px 0; padding: 8px 12px; gap: 6px; border-radius: 22px; }
  .topbar .input-row { flex-wrap: nowrap; gap: 0; }
  .topbar .secondary-btn { font-size: .8125rem; padding-inline: 8px; }
  .brand strong { font-size: 1rem; }
  .brand-mark { display: none; }
  main { padding: 28px 18px calc(104px + env(safe-area-inset-bottom)); }
  .hero h1 { font-size: 2.125rem; }
  .summary { gap: 8px; }
  .stat { padding: 14px 10px; border-radius: 20px; }
  .stat small { font-size: .75rem; }
  .closure-home { padding: 16px; }
  .closure-heading > button { width: auto; text-align: start; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tab { white-space: normal; padding-inline: 4px; line-height: 1.5; }
  .item-card { padding: 16px; }
  .dialog { width: 100%; max-width: 100%; max-height: calc(100dvh - max(16px, env(safe-area-inset-top))); margin: auto 0 0; border-radius: 24px 24px 0 0; padding: 20px 20px max(20px, env(safe-area-inset-bottom)); }
  .dialog-head { top: -20px; margin-inline: -20px; padding-inline: 20px; }
  .dialog-actions { bottom: -20px; margin-inline: -20px; padding-inline: 20px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .floating-add { inset-inline-start: auto; inset-inline-end: 20px; left: auto; }
  [dir="rtl"] .floating-add { left: 20px; right: auto; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .dialog-head, .dialog-actions { background: var(--dialog-surface); backdrop-filter: none; }
  .dialog::backdrop { backdrop-filter: none; background: #000000aa; }
  .secondary-btn, .form-group, .stat, .item-card { border: 1px solid var(--line); }
}
@media (forced-colors: active) {
  .tab.active, .review-nav [aria-pressed="true"], .stat, .item-card, .form-group { border: 1px solid CanvasText; }
  .ui-icon { forced-color-adjust: auto; }
}

.stat[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--brand); }

/* Color stays decorative; labels and status colors never animate. */
.primary-btn, .floating-add { background: var(--button-fill); color: var(--on-brand); border: 1px solid var(--glass-edge); box-shadow: 0 6px 24px #597bd325; }
.primary-btn:hover, .floating-add:hover { background: var(--button-fill); filter: brightness(1.06); }
button { transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
button:active:not(:disabled) { transform: scale(.985); }
.stat::after { content: ""; position: absolute; bottom: 0; inset-inline-start: 18px; height: 2px; width: 36%; background: linear-gradient(90deg,var(--brand),transparent); opacity: .65; }
.stat.danger::after { background: linear-gradient(90deg,var(--danger),transparent); }
.stat.today::after { background: linear-gradient(90deg,var(--copper),transparent); }
.stat.danger svg { background: color-mix(in srgb,var(--danger) 10%,transparent); }
.stat.today svg { background: color-mix(in srgb,var(--copper) 10%,transparent); }
.stat:hover, .item-card:hover { box-shadow: var(--glass-shadow), inset 0 0 0 1px var(--selected-edge); }
.stat[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--brand); }
.hero h1 { font-size: clamp(2.15rem,5vw,3rem); margin-block: 8px; }
#syncStatus { margin-block: 8px 0; color: var(--muted); }
.eyebrow { margin: 0; }
.closure-home > .muted { font-size: .8125rem; }
.empty-icon { width: 72px; height: 72px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 24px; background: linear-gradient(140deg,var(--soft),var(--surface)); border: 1px solid var(--glass-edge); color: var(--brand); box-shadow: 0 0 42px var(--aura-cyan); font-size: 2rem; }
.empty { border: 1px dashed var(--glass-edge); border-radius: 24px; margin-top: 12px; padding: 32px 20px; }
.form-group, .reminder-step, .appearance-settings, .setting-card { border: 1px solid var(--glass-edge); background: var(--surface); }
.form-group[open] { box-shadow: inset 3px 0 0 var(--selected-edge); }
.form-intro { color: var(--muted); line-height: 1.8; }
@supports (backdrop-filter: blur(12px)) {
  .topbar, .dialog-head, .dialog-actions { backdrop-filter: blur(20px) saturate(1.15); -webkit-backdrop-filter: blur(20px) saturate(1.15); }
}
@media (max-width: 720px) {
  .hero h1 { font-size: 2.15rem; }
  .hero .primary-btn { width: 100%; }
  .summary { margin-bottom: 20px; }
  .stat span { font-size: 2rem; }
  .stat svg { width: 32px; height: 32px; }
  .closure-home { border-radius: 22px; }
  .dialog { border-radius: 28px 28px 0 0; }
  .topbar .input-row { min-width: 0; }
}
@media (max-width: 360px) {
  .topbar { margin-inline: 8px; padding-inline: 10px; }
  .topbar .secondary-btn { padding-inline: 6px; font-size: .75rem; }
  .brand strong { font-size: .9375rem; }
  main { padding-inline: 14px; }
  .stat small { font-size: .6875rem; }
}
@media (prefers-reduced-transparency: reduce) {
  .ambient-light { display: none; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .topbar, .dialog-head, .dialog-actions { background: var(--dialog-surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .stat, .item-card, .closure-home { background: var(--surface); border-color: var(--muted); }
  .primary-btn, .floating-add { background: var(--brand); }
}
@media (forced-colors: active) {
  .ambient-light { display: none; }
  .primary-btn, .floating-add, .topbar, .closure-home, .search, .empty { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
}

/* OraGoal reference study: original time illustration and clearer material depth. */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 28px; min-height: 204px; border: 1px solid var(--glass-edge); border-radius: 28px; background: linear-gradient(115deg,var(--focus-tint),transparent 70%),var(--card); box-shadow: var(--glass-shadow); }
.hero > div, .hero > button { position: relative; z-index: 1; }
.hero > div { max-width: 64%; }
.time-art { position: absolute; inset-inline-end: 20%; top: -36px; width: 290px; height: 290px; color: var(--brand); opacity: .32; pointer-events: none; z-index: 0; }
.time-art .orbit { transform-origin: 150px 150px; animation: time-orbit 48s linear infinite; }
@keyframes time-orbit { to { transform: rotate(360deg); } }
:root[data-visual-paused="true"] .time-art .orbit { animation-play-state: paused; }
.topbar, .hero { border-top-color: color-mix(in srgb,var(--brand) 34%,var(--surface)); }
.stat { --stat-light: var(--brand); background: radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--stat-light) 12%,transparent),transparent 70%),var(--card); box-shadow: inset 0 1px 0 #ffffff18,0 8px 24px #0000000b; }
.stat.danger { --stat-light: var(--danger); }
.stat.today { --stat-light: var(--copper); }
.stat svg, .stat.today svg, .stat.danger svg { color: #fff; background: linear-gradient(145deg,#16859c,#4155a7); border: 1px solid #ffffff40; box-shadow: 0 4px 14px color-mix(in srgb,var(--stat-light) 20%,transparent),inset 0 1px 0 #ffffff40; }
.stat.danger svg { background: linear-gradient(145deg,#c74970,#853d7d); }
.stat.today svg { background: linear-gradient(145deg,#a96d17,#88501c); }
.stat::after { width: 58%; height: 2px; }
.closure-home { border-color: color-mix(in srgb,var(--brand) 42%,var(--glass-edge)); box-shadow: inset 0 1px 0 #ffffff16,0 0 26px color-mix(in srgb,var(--brand) 7%,transparent),0 14px 34px #0000000a; }
.closure-home::before { content: ""; position: absolute; top: 0; inset-inline: 18%; height: 1px; background: linear-gradient(90deg,transparent,var(--brand),transparent); opacity: .7; pointer-events: none; }
.item-card { background: linear-gradient(135deg,color-mix(in srgb,var(--brand) 5%,transparent),transparent 50%),var(--card); border-top-color: color-mix(in srgb,var(--brand) 30%,var(--glass-edge)); }
:root[data-theme="dark"] .brand-mark { color: #8bedfa; background: linear-gradient(145deg,#184050,#17243e); box-shadow: inset 0 1px 0 #96eeff4d,0 0 18px #00dafa18; }
:root[data-theme="dark"] .primary-btn, :root[data-theme="dark"] .floating-add { box-shadow: 0 4px 24px #00dafa26,inset 0 1px 0 #ffffff60; }
@supports (backdrop-filter: blur(12px)) {
  .hero { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :root:not([data-visual-motion="still"]) .stat:hover, :root:not([data-visual-motion="still"]) .item-card:hover { transform: translateY(-2px); }
}
@media (max-width: 720px) {
  .hero { padding: 18px 20px; min-height: 140px; margin-bottom: 14px; border-radius: 24px; }
  .hero > div { max-width: 100%; }
  .time-art { width: 210px; height: 210px; inset-inline-end: -72px; top: -8px; opacity: .16; }
  .hero h1 { font-size: 2rem; }
  .stat svg { width: 36px; height: 36px; }
  .summary { margin-bottom: 20px; }
}
.native-permission-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.native-permission-actions > button { flex: 1 1 140px; }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .hero, .stat, .item-card, .closure-home { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .time-art { opacity: .12; }
  .stat svg, .stat.today svg, .stat.danger svg { background: var(--soft); color: var(--stat-light); border-color: var(--stat-light); box-shadow: none; }
}
@media (forced-colors: active) {
  .time-art, .closure-home::before { display: none; }
  .hero, .stat, .stat svg { background: Canvas; color: CanvasText; border-color: CanvasText; }
}

/* Personal space: a familiar navigation rhythm, expressed through Mawed's clock. */
.skip-link { position: fixed; inset-block-start: -100px; inset-inline-start: 16px; z-index: 110; padding: 14px; background: var(--paper); color: var(--ink); }
.skip-link:focus { inset-block-start: 8px; }
.topbar { position: relative; z-index: 40; }
.brand-cluster { display: flex; align-items: center; gap: 10px; min-width: 0; }
.menu-anchor { position: relative; }
.clock-menu { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 18px; color: var(--brand); border: 1px solid var(--glass-edge); background: radial-gradient(circle at 25% 15%,var(--focus-tint),transparent 70%),var(--surface); box-shadow: inset 0 1px 0 var(--glass-edge),0 5px 20px var(--aura-cyan); }
.clock-menu .ui-icon { width: 27px; height: 27px; }
.clock-menu[aria-expanded="true"] .alarm-symbol { transform: rotate(-8deg); }
.quick-menu { position: absolute; inset-block-start: calc(100% + 12px); inset-inline-start: 0; width: min(260px,calc(100vw - 36px)); padding: 8px; border-radius: 20px; border: 1px solid var(--glass-edge); background: var(--dialog-surface); box-shadow: var(--glass-shadow),0 24px 50px #0003; z-index: 60; }
.quick-menu button { display: block; width: 100%; min-height: 48px; text-align: start; border: 0; border-radius: 12px; background: transparent; color: var(--ink); padding: 10px 16px; }
.quick-menu button:hover { background: var(--soft); color: var(--brand); }
.topbar .brand-mark { display: none; }
.primary-navigation { position: fixed; z-index: 30; bottom: 0; inset-inline: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 8px 10px max(10px,env(safe-area-inset-bottom)); border-top: 1px solid var(--glass-edge); background: var(--chrome); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2); box-shadow: 0 -8px 36px #0000000c; }
.primary-navigation button { border: 0; background: transparent; color: var(--muted); min-width: 0; min-height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 2px; border-radius: 16px; font-size: .72rem; line-height: 1.4; }
.nav-icon { height: 34px; width: 40px; display: grid; place-items: center; border-radius: 14px; }
.nav-icon .alarm-symbol { display: none; }
.primary-navigation [aria-current="page"] { color: var(--brand); font-weight: 700; }
.primary-navigation [aria-current="page"] .nav-icon { border: 1px solid var(--selected-edge); background: radial-gradient(circle at 20% 0,var(--focus-tint),transparent 70%),var(--surface); box-shadow: inset 0 1px 1px var(--glass-edge),0 3px 12px var(--aura-cyan); }
.primary-navigation [aria-current="page"] .alarm-symbol { display: block; animation: clock-settle 260ms ease-out; }
.primary-navigation [aria-current="page"] .destination-icon { display: none; }
.primary-navigation [data-destination="add"] .nav-icon { background: var(--button-fill); color: var(--on-brand); }
.floating-add { display: none; }
main { padding-bottom: calc(122px + env(safe-area-inset-bottom)); }
.toast { bottom: calc(106px + env(safe-area-inset-bottom)); }
.settings-browser > label { margin-top: 12px; }
.settings-catalog { display: grid; gap: 10px; margin-block: 20px; }
.settings-entry { width: 100%; display: grid; grid-template-columns: 44px minmax(0,1fr) 18px; gap: 12px; align-items: center; padding: 16px 12px; border-radius: 20px; border: 1px solid var(--glass-edge); background: var(--surface); color: var(--ink); text-align: start; }
.settings-entry strong, .settings-entry small { display: block; }
.settings-entry strong { font-size: .94rem; }
.settings-entry small { margin-top: 5px; font-size: .78rem; color: var(--muted); line-height: 1.7; }
.settings-symbol { display: grid; place-items: center; width: 42px; height: 42px; font-size: 1.4rem; color: var(--brand); border: 1px solid var(--glass-edge); border-radius: 14px; background: linear-gradient(140deg,var(--focus-tint),var(--surface)); box-shadow: inset 0 1px 0 var(--glass-edge); }
.settings-chevron { color: var(--muted); font-size: 1.5rem; }
[dir="rtl"] .settings-chevron { transform: scaleX(-1); }
#settingsSectionTitle { margin-block: 24px 12px; color: var(--brand); }
[data-settings-panel]:not([hidden]) { animation: panel-arrive 180ms ease-out; }
#settingsLanguage { display: block; width: 100%; margin-bottom: 18px; text-align: start; }
.profile-dialog { max-width: 650px; }
.profile-cover { height: 132px; position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--glass-edge); background: radial-gradient(ellipse at 80% 15%,var(--aura-cyan),transparent 65%),radial-gradient(ellipse at 15% 80%,var(--aura-violet),transparent 65%),var(--surface); }
.profile-cover::after { content: ''; position: absolute; width: 250px; height: 250px; border-radius: 50%; border: 1px solid var(--selected-edge); inset-inline-end: -55px; top: -120px; box-shadow: 0 0 0 24px var(--focus-tint),0 0 0 56px var(--focus-tint); }
.profile-cover .alarm-symbol { position: absolute; width: 100px; height: 100px; inset-inline-end: 42px; top: 20px; color: var(--brand); opacity: .35; transform: rotate(-12deg); stroke-width: .7; }
.profile-identity { position: relative; display: flex; align-items: center; gap: 16px; margin-top: -28px; padding-inline: 16px; }
.profile-avatar { flex-shrink: 0; height: 76px; width: 76px; border: 5px solid var(--dialog-surface); border-radius: 50%; display: grid; place-items: center; color: var(--brand); background: var(--surface); box-shadow: 0 0 0 1px var(--selected-edge); }
.profile-avatar .alarm-symbol { width: 38px; height: 38px; }
.profile-identity > div { min-width: 0; padding-top: 28px; }
.profile-identity h3 { font-size: 1.1rem; margin: 0; overflow-wrap: anywhere; }
.profile-identity p { font-size: .8rem; color: var(--muted); margin-block: 6px; }
.profile-intro { line-height: 1.8; font-size: .9rem; margin-block: 22px; }
.profile-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,5rem),1fr)); border-block: 1px solid var(--line); padding-block: 20px; }
.profile-stats > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; padding-inline: 4px; text-align: center; }
.profile-stats > div + div { border-inline-start: 1px solid var(--line); }
.profile-stats dt { font-size: .75rem; color: var(--muted); max-width: 100%; overflow-wrap: anywhere; }
.profile-stats dd { font-size: 1.8rem; font-weight: 700; color: var(--brand); margin: 0; }
.profile-shortcuts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 24px; }
.profile-shortcuts button { min-height: 52px; font-size: .875rem; }
.welcome-clock { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; pointer-events: none; animation: welcome-fade 1100ms ease both; }
.welcome-clock > div { display: grid; place-items: center; width: 140px; height: 140px; border-radius: 44px; color: var(--brand); background: var(--dialog-surface); border: 1px solid var(--selected-edge); box-shadow: 0 20px 80px #0003,0 0 50px var(--aura-cyan),inset 0 2px 0 var(--glass-edge); transform: rotate(-7deg); }
.welcome-clock svg { width: 78px; height: 78px; stroke-width: 1.2; }
@keyframes welcome-fade { 0% { opacity: 0; transform: scale(.88) translateY(12px); } 25%,65% { opacity: 1; transform: scale(1) translateY(0); } 100% { opacity: 0; transform: scale(1.06) translateY(-12px); } }
@keyframes clock-settle { from { transform: rotate(-12deg) scale(.9); } to { transform: rotate(0) scale(1); } }
@keyframes panel-arrive { from { opacity: .6; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (min-width: 1180px) {
  .primary-navigation { inset-inline-start: max(18px,calc((100vw - 1400px)/2)); inset-inline-end: auto; top: 140px; bottom: auto; width: 156px; grid-template-columns: 1fr; padding: 12px; border: 1px solid var(--glass-edge); border-radius: 24px; }
  .primary-navigation button { flex-direction: row; justify-content: flex-start; min-height: 58px; gap: 10px; font-size: .85rem; padding: 5px; }
  main { max-width: 960px; margin-inline-start: max(190px,calc((100vw - 1020px)/2)); margin-inline-end: 24px; padding-bottom: 60px; }
  .topbar { max-width: none; margin-inline: 24px; }
  .toast { bottom: 24px; }
}
@media (max-width: 720px) {
  .brand strong { font-size: .94rem; }
  .brand small, .topbar #accountBtn { display: none; }
  .brand-cluster { gap: 8px; }
  .topbar { overflow: visible; }
  .profile-shortcuts { grid-template-columns: 1fr; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :root:not([data-visual-motion="still"]) .settings-entry:hover { transform: translateY(-2px); border-color: var(--selected-edge); box-shadow: var(--glass-shadow); }
}
:root[data-visual-motion="still"] .welcome-clock, :root[data-visual-paused="true"] .welcome-clock { display: none; }
@media (prefers-reduced-motion: reduce) { .welcome-clock { display: none; } }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .primary-navigation, .quick-menu { background: var(--dialog-surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .settings-entry, .clock-menu, .profile-cover { border-color: var(--muted); }
}
@media (forced-colors: active) {
  .primary-navigation, .settings-entry, .clock-menu, .profile-cover { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
  .primary-navigation [aria-current="page"] { outline: 2px solid Highlight; }
  .welcome-clock { display: none; }
}

/* More luminous glass on navigation; readable, quiet surfaces behind body text. */
.primary-navigation { border-color: var(--neon-edge); background: linear-gradient(160deg,var(--glass-sheen),transparent 42%),var(--chrome); box-shadow: 0 -6px 32px var(--neon-glow),inset 0 1px 0 var(--glass-sheen); }
.primary-navigation [aria-current="page"] .nav-icon, .clock-menu { border-color: var(--neon-edge); box-shadow: 0 0 20px var(--neon-glow),inset 0 1px 1px var(--glass-sheen); }
.primary-navigation [data-destination="add"] { border-inline: 1px solid var(--glass-edge); margin-inline: 4px; border-radius: 18px; }
.primary-navigation [data-destination="add"] .nav-icon { width: 44px; height: 40px; box-shadow: 0 4px 22px var(--neon-glow); }
.topbar, .hero, .profile-cover { border-top-color: var(--neon-edge); }
.topbar { background: linear-gradient(150deg,var(--glass-sheen),transparent 30%),var(--chrome); }
.quick-menu { max-height: 70dvh; overflow-y: auto; }
.profile-cover { box-shadow: inset 0 1px 0 var(--glass-sheen),0 0 30px var(--neon-glow); }
.settings-symbol, .profile-avatar { box-shadow: inset 0 1px 0 var(--glass-sheen),0 0 18px var(--neon-glow); }
.topbar #settingsBtn { display: none; }
/* Keep editable names usable on a phone instead of squeezing them beside actions. */
@media (max-width: 480px) {
  #librarySettings .input-row { flex-direction: column; align-items: stretch; }
  #librarySettings .input-row > * { width: 100%; min-width: 0; }
}
@supports (backdrop-filter: blur(12px)) {
  .primary-navigation, .topbar { backdrop-filter: blur(28px) saturate(1.4); -webkit-backdrop-filter: blur(28px) saturate(1.4); }
  .hero { backdrop-filter: blur(12px) saturate(1.15); -webkit-backdrop-filter: blur(12px) saturate(1.15); }
}
@supports not (backdrop-filter: blur(12px)) {
  .primary-navigation, .topbar { background: var(--surface); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .primary-navigation, .topbar, .hero, .profile-cover { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; border-color: var(--muted); box-shadow: none; }
  .primary-navigation [aria-current="page"] .nav-icon, .clock-menu, .settings-symbol, .profile-avatar { box-shadow: none; }
}
@media (forced-colors: active) {
  .primary-navigation, .topbar, .hero, .profile-cover, .clock-menu { background: Canvas; color: CanvasText; border-color: CanvasText; box-shadow: none; backdrop-filter: none; }
}

/* Keep scrolling content clear of Android's transparent status bar. */
:root { --app-safe-top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px)); }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: var(--app-safe-top); background: var(--paper); pointer-events: none; z-index: 100; }
@media (max-width: 720px) {
  .topbar { margin-top: calc(10px + var(--app-safe-top)); }
  .dialog { max-height: calc(100dvh - max(16px, var(--app-safe-top))); }
}

/* Programmatic section headings retain a calm visible focus cue. */
.dialog :is(h2,h3)[tabindex="-1"]:focus { outline: none; text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: .25em; }
