/* يومي: one stylesheet. Warm paper by day, deep night after dark; saffron marks "now". */
@font-face { font-family: "Reem Kufi"; src: url("../fonts/ReemKufi.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Lalezar"; src: url("../fonts/Lalezar-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --bg: #f4efe6; --card: #fffdf8; --ink: #1c2530; --muted: #6b7280; --line: #e5dccb; --soft: #efe7d8;
  --brand: #1f3a5f; --brand-ink: #ffffff; --brand-soft: #dfe7f1;
  --accent: #d9822b; --accent-soft: #fbe9d2;
  --ok: #2c8a66; --ok-soft: #dcefe6; --warn: #b9432b; --warn-soft: #f8e0d9;
  --head: "Reem Kufi", "Noto Kufi Arabic", system-ui, sans-serif;
  --num: "Lalezar", "Reem Kufi", system-ui, sans-serif;
  --body: system-ui, "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --quran: "Noto Naskh Arabic", "Amiri", "Scheherazade New", "Traditional Arabic", serif;
  --r: 18px; --shadow: 0 1px 2px rgba(28, 37, 48, .05), 0 8px 24px rgba(28, 37, 48, .06);
  --k-study: #5562e8; --k-class: #8750d1; --k-work: #2f78d0; --k-exercise: #dd5a34; --k-errand: #b97d10; --k-meal: #2a9870;
  --k-rest: #76828f; --k-social: #cf4f88; --k-chore: #8a6a45; --k-prayer: #17919c; --k-other: #5c6b7d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131a; --card: #161d27; --ink: #edf0f4; --muted: #95a0ae; --line: #263141; --soft: #1c2532;
    --brand: #86b4ee; --brand-ink: #0e131a; --brand-soft: #1d2c40;
    --accent: #f0a14c; --accent-soft: #3a2a17;
    --ok: #5cc79d; --ok-soft: #173327; --warn: #f08a72; --warn-soft: #3b1e18;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --k-study: #8b95ff; --k-class: #b78af0; --k-work: #6aa8f0; --k-exercise: #f58a66; --k-errand: #e0aa45; --k-meal: #5fc9a2;
    --k-rest: #a3adb8; --k-social: #f085b4; --k-chore: #c2a078; --k-prayer: #4fc3cd; --k-other: #93a1b3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e131a; --card: #161d27; --ink: #edf0f4; --muted: #95a0ae; --line: #263141; --soft: #1c2532;
  --brand: #86b4ee; --brand-ink: #0e131a; --brand-soft: #1d2c40;
  --accent: #f0a14c; --accent-soft: #3a2a17;
  --ok: #5cc79d; --ok-soft: #173327; --warn: #f08a72; --warn-soft: #3b1e18;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --k-study: #8b95ff; --k-class: #b78af0; --k-work: #6aa8f0; --k-exercise: #f58a66; --k-errand: #e0aa45; --k-meal: #5fc9a2;
  --k-rest: #a3adb8; --k-social: #f085b4; --k-chore: #c2a078; --k-prayer: #4fc3cd; --k-other: #93a1b3;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15.5px; line-height: 1.6; overscroll-behavior-y: none; }
h1, h2, h3, h4 { font-family: var(--head); margin: 0; line-height: 1.35; font-weight: 600; }
h2 { font-size: 20px; } h3 { font-size: 16.5px; } h4 { font-size: 14.5px; }
p { margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.num { font-family: var(--num); letter-spacing: .3px; }
.warn-text { color: var(--warn); } .ok-text { color: var(--ok); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* ---------------------------------------------------------------- shell */
.shell { max-width: 620px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 104px; min-height: 100%; }
#view { display: flex; flex-direction: column; gap: 12px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 2px 2px; }
.page-head h2 { font-size: 24px; }
.backbtn { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; padding: 6px 2px; }

.bottomnav { position: fixed; inset-inline: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 2px;
  padding: 6px 8px calc(env(safe-area-inset-bottom, 0px) + 8px); background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
.bottomnav button { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 4px;
  border-radius: 14px; color: var(--muted); font-size: 12px; font-weight: 600; }
.bottomnav button svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bottomnav button.on { color: var(--brand); background: var(--brand-soft); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.module-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.module-note { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 14px;
  font-size: 15px; font-weight: 700; border: 1px solid transparent; transition: transform .08s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.accent { background: var(--accent); color: #1c1407; }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn.danger { background: var(--warn-soft); color: var(--warn); }
.btn.wide { width: 100%; }
.btn.sm { min-height: 36px; padding: 5px 12px; font-size: 13px; border-radius: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.list-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: var(--ink); background: var(--soft); flex: none; }
.iconbtn.clear { background: transparent; }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.field > input, .field > select, .field > textarea, .input { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 15.5px; }
textarea { resize: none; }
.field > input:focus, .field > select:focus, .field > textarea:focus, .input:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13.5px; color: var(--ink); }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chip.done { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.mode-chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.mode-chip.notif { background: var(--ok-soft); color: var(--ok); }
.mode-chip.warn { background: var(--warn-soft); color: var(--warn); }
.mode-chip.ai { background: var(--accent-soft); color: var(--accent); }
.code-box { font-family: ui-monospace, Consolas, monospace; font-size: 17px; background: var(--soft); border-radius: 12px; padding: 12px; text-align: center; user-select: all; word-break: break-all; }
.empty { text-align: center; color: var(--muted); padding: 22px 10px; font-size: 14px; }
.bar { height: 8px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--ok); transition: width .3s; }
.bar.accent > i { background: var(--accent); }
.list { display: flex; flex-direction: column; }
.list > .li { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); text-align: start; width: 100%; }
.list > .li:last-child { border-bottom: 0; }
.li .li-t { font-weight: 600; } .li .li-s { font-size: 13px; color: var(--muted); }
.li .chev { color: var(--muted); font-size: 18px; }
.tick { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: inline-flex; align-items: center; justify-content: center; color: transparent; font-size: 15px; background: var(--card); }
.tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.switch { width: 46px; height: 28px; border-radius: 99px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch.on { background: var(--ok); }
.switch.on::after { transform: translateX(-18px); }
[dir="ltr"] .switch.on::after { transform: translateX(18px); }

/* ---------------------------------------------------------------- today: hero */
.hero { border-radius: 24px; padding: 16px 16px 14px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(160deg, #24507f, #3f7fb5 60%, #8fc0dd); }
.hero.dawn { background: linear-gradient(160deg, #2a3a6b, #a05f7d 60%, #f0a868); }
.hero.dusk { background: linear-gradient(160deg, #3a2a63, #b0506a 55%, #ee9550); }
.hero.night { background: linear-gradient(160deg, #0d1626, #1c2d4d 60%, #34497a); }
.hero::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; inset-inline-end: -40px; top: -50px; background: radial-gradient(circle, rgba(255, 240, 200, .55), rgba(255, 240, 200, 0) 70%); pointer-events: none; }
.hero.night::after { background: radial-gradient(circle, rgba(220, 230, 255, .35), rgba(220, 230, 255, 0) 70%); }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: relative; z-index: 1; }
.hero-date { display: flex; align-items: center; gap: 2px; }
.hero-date button { color: #fff; width: 34px; height: 34px; border-radius: 10px; font-size: 20px; opacity: .85; }
.hero-date .d { font-size: 14.5px; font-weight: 600; padding: 0 4px; opacity: .95; }
.hero h1 { font-size: 26px; margin-top: 6px; position: relative; z-index: 1; }
.hero .sub { opacity: .92; font-size: 14px; position: relative; z-index: 1; min-height: 22px; }
.hero .iconbtn { background: rgba(255, 255, 255, .16); color: #fff; }
.hero-prog { display: flex; align-items: center; gap: 10px; margin-top: 12px; position: relative; z-index: 1; }
.hero-prog .bar { flex: 1; background: rgba(255, 255, 255, .25); }
.hero-prog .bar > i { background: #fff; }
.hero-prog .num { font-size: 19px; }
.today-pill { font-size: 12.5px; font-weight: 600; background: rgba(255, 255, 255, .2); border-radius: 99px; padding: 3px 11px; color: #fff; }

/* ---------------------------------------------------------------- today: composer */
.composer textarea { width: 100%; border: 0; background: transparent; font-size: 16.5px; line-height: 1.7; min-height: 84px; padding: 2px; outline: none; color: var(--ink); }
.composer textarea::placeholder { color: var(--muted); opacity: .8; }
.composer .foot { display: flex; align-items: center; gap: 8px; border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 4px; }
.composer.mini textarea { min-height: 46px; }
.composer h3 { margin-bottom: 4px; }
.banner { border-radius: var(--r); padding: 12px 14px; background: var(--accent-soft); border: 1px solid transparent; }
.banner.warn { background: var(--warn-soft); }
.banner.info { background: var(--brand-soft); }
.banner h4 { margin-bottom: 2px; }
.banner .row-actions { margin-top: 8px; justify-content: flex-start; }
.quick { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick .chip { flex: none; }

/* ---------------------------------------------------------------- today: timeline */
.tl { position: relative; display: flex; flex-direction: column; gap: 8px; padding-inline-start: 62px; }
.tl::before { content: ""; position: absolute; inset-inline-start: 53px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item { position: relative; }
.tl-time { position: absolute; inset-inline-start: -62px; top: 10px; width: 46px; text-align: center; font-family: var(--num); font-size: 16px; line-height: 1.15; color: var(--ink); }
.tl-time small { display: block; font-family: var(--body); font-size: 10.5px; color: var(--muted); }
.tl-item::before { content: ""; position: absolute; inset-inline-start: -14px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--kc, var(--muted)); border: 3px solid var(--bg); z-index: 1; }
.tl-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; border-inline-start: 4px solid var(--kc, var(--line)); position: relative; overflow: hidden; }
.tl-body { text-align: start; min-width: 0; }
.tl-card .t { font-weight: 600; font-size: 15.5px; overflow-wrap: anywhere; }
.tl-card .s { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 3px 8px; }
.tl-item.done .tl-card { opacity: .62; }
.tl-item.done .t { text-decoration: line-through; }
.tl-item.sk .tl-card { opacity: .5; border-style: dashed; }
.tl-item.late .tl-card { border-color: var(--warn); }
.tl-item.late .tl-time { color: var(--warn); }
.tl-item.nowon .tl-card { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-item.nowon .tl-card::after { content: ""; position: absolute; inset-inline-start: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: var(--accent); }
.tl-item.prayer .tl-card { background: transparent; border-style: dashed; padding: 7px 12px; }
.tl-item.prayer .t { font-size: 14.5px; font-weight: 600; color: var(--kc); }
.tl-now { position: relative; display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 13px; font-weight: 700; margin: -1px 0; padding-inline-start: 8px; }
.tl-now::before { content: ""; position: absolute; inset-inline-start: -15px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); z-index: 2; }
.tl-now::after { content: ""; flex: 1; height: 2px; background: var(--accent); border-radius: 2px; opacity: .6; }
.tl-gap { font-size: 12px; color: var(--muted); padding: 1px 4px; display: flex; align-items: center; gap: 6px; }
.tl-gap button { color: var(--brand); font-weight: 600; font-size: 12.5px; padding: 6px 8px; }
.tl-end { font-size: 12.5px; color: var(--muted); padding: 4px; }
.kdot { width: 30px; height: 30px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--kc, var(--muted)) 16%, transparent); color: var(--kc, var(--muted)); font-size: 15px; }
.k-study { --kc: var(--k-study); } .k-class { --kc: var(--k-class); } .k-work { --kc: var(--k-work); } .k-exercise { --kc: var(--k-exercise); }
.k-errand { --kc: var(--k-errand); } .k-meal { --kc: var(--k-meal); } .k-rest { --kc: var(--k-rest); } .k-social { --kc: var(--k-social); }
.k-chore { --kc: var(--k-chore); } .k-prayer { --kc: var(--k-prayer); } .k-other { --kc: var(--k-other); } .k-wake, .k-sleep { --kc: var(--k-rest); }
.fab { position: fixed; z-index: 15; inset-inline-end: max(16px, calc(50% - 294px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); width: 56px; height: 56px; border-radius: 20px; background: var(--accent); color: #1c1407; font-size: 30px; line-height: 1; box-shadow: 0 8px 22px rgba(217, 130, 43, .45); display: flex; align-items: center; justify-content: center; }

/* draft (what was understood) */
.draft { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.draft-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); text-align: start; width: 100%; border-inline-start: 4px solid var(--kc, var(--line)); }
.draft-item .x { color: var(--muted); font-size: 20px; width: 34px; height: 34px; flex: none; }
.ai-reply { background: var(--accent-soft); border-radius: 14px; padding: 10px 12px; font-size: 14px; }
.thinking { display: flex; align-items: center; gap: 10px; padding: 18px 6px; justify-content: center; color: var(--muted); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.mic-pulse { width: 84px; height: 84px; margin: 14px auto; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.mic-pulse.on { background: var(--accent-soft); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 130, 43, .45); } 100% { box-shadow: 0 0 0 22px rgba(217, 130, 43, 0); } }
.mic-text { min-height: 48px; font-size: 16px; }

/* ---------------------------------------------------------------- stats, health, study, worship */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--soft); border-radius: 14px; padding: 10px 8px; text-align: center; }
.stat b { display: block; font-family: var(--num); font-size: 24px; line-height: 1.2; font-weight: 400; }
.stat span { font-size: 12px; color: var(--muted); }
.glasses { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.glass { width: 30px; height: 38px; border-radius: 5px 5px 10px 10px; border: 2px solid var(--k-work); opacity: .35; position: relative; }
.glass.on { opacity: 1; background: linear-gradient(to top, var(--k-work) 72%, transparent 72%); }
.week { display: flex; align-items: flex-end; gap: 6px; height: 96px; margin-top: 8px; }
.week .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 100%; font-size: 11px; color: var(--muted); }
.week .col i { width: 100%; max-width: 30px; border-radius: 7px 7px 3px 3px; background: var(--k-study); min-height: 3px; opacity: .85; }
.week .col.today i { background: var(--accent); }
.week .col b { font-weight: 500; font-size: 10.5px; color: var(--ink); }
.pr-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.pr { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 2px; border-radius: 14px; background: var(--soft); font-size: 12.5px; border: 1px solid transparent; }
.pr b { font-family: var(--num); font-size: 16px; font-weight: 400; }
.pr.on { background: var(--ok-soft); color: var(--ok); }
.pr.next { border-color: var(--accent); }
.az-list { display: flex; flex-direction: column; gap: 10px; direction: rtl; }
.az { text-align: start; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px 12px 54px; position: relative; font-family: var(--quran); font-size: 18px; line-height: 2; width: 100%; }
.az .cnt { position: absolute; left: 10px; top: 12px; min-width: 34px; height: 34px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--num); font-size: 16px; }
.az.done { opacity: .5; }
.az .az-title { display: block; font-family: var(--head); font-size: 13px; color: var(--k-prayer); }
.mushaf { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.mushaf-tools { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; direction: rtl; }
.mushaf-tools input { width: 90px; flex: none; }
.mushaf-page { flex: 1; overflow: auto; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 16px 14px; font-family: var(--quran); font-size: 22px; line-height: 2.25; text-align: justify; direction: rtl; min-height: 240px; }
.sura-head { text-align: center; font-family: var(--head); font-size: 17px; color: var(--k-prayer); background: color-mix(in srgb, var(--k-prayer) 14%, transparent); border-radius: 12px; margin: 10px 0 6px; padding: 4px; }
.basmala { text-align: center; margin-bottom: 4px; }
.aya-n { color: var(--k-prayer); font-size: .8em; }
.mushaf-nav { display: flex; gap: 8px; margin-top: 10px; }
.mushaf-nav .btn { flex: 1; }
.perm { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.perm:last-child { border-bottom: 0; }
.days { display: flex; gap: 5px; }
.days .chip { min-width: 36px; padding: 4px 0; justify-content: center; }

/* ---------------------------------------------------------------- sheets, toast */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 14, 20, .5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 620px; max-height: 92%; overflow: auto; background: var(--card); border-radius: 24px 24px 0 0; padding: 8px 16px calc(env(safe-area-inset-bottom, 0px) + 18px); animation: up .2s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; }
.sheet.tall { height: 92%; }
.sheet::before { content: ""; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 2px auto 8px; flex: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-head p { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
@keyframes fade { from { opacity: 0; } }
.toast { position: fixed; z-index: 60; inset-inline: 0; bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); margin: 0 auto; width: fit-content; max-width: min(92%, 520px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-size: 14px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; text-align: center; }
.toast.show { opacity: 1; transform: none; }

/* wizard */
.wiz { min-height: calc(100vh - 60px); display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 10px 4px; }
.wiz .logo { width: 76px; height: 76px; border-radius: 22px; }
.wiz h1 { font-size: 30px; }
.wiz .steps { display: flex; gap: 5px; }
.wiz .steps i { height: 4px; flex: 1; border-radius: 4px; background: var(--line); }
.wiz .steps i.on { background: var(--accent); }

/* ---------------------------------------------------------------- laptop */
@media (min-width: 900px) {
  .shell { max-width: 1040px; padding-inline-start: 110px; padding-bottom: 40px; }
  .bottomnav { inset-inline: auto; inset-inline-start: 0; top: 0; bottom: 0; width: 92px; flex-direction: column; justify-content: flex-start; padding: 22px 8px; border-top: 0; border-inline-end: 1px solid var(--line); gap: 6px; }
  .bottomnav button { flex: none; max-width: none; width: 100%; padding: 10px 2px; }
  .today-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
  .today-side { position: sticky; top: 12px; }
  .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
  .scrim { align-items: center; }
  .sheet { border-radius: 24px; max-height: 88%; }
  .sheet.tall { height: 88%; }
  .sheet::before { display: none; }
  .fab { inset-inline-end: 28px; bottom: 28px; }
  .toast { bottom: 28px; }
}
.today-grid, .today-side, .today-main, .cols { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 900px) { .today-grid { display: grid; } .cols { display: grid; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
