/* Chronos — Northlight: dark aurora glass. */
:root {
  --bg: #0a0913;
  --panel: #141221;
  --panel-2: #1b1830;
  --line: #262139;
  --line-2: #342d4f;
  --text: #f1ecf7;
  --muted: #a39db8;
  --faint: #6f6887;
  --mint: #9ff0cf;
  --gold: #ffc98a;
  --sky: #9ed2ff;
  --lav: #c7b8ff;
  --ink: #0a0913;
  --glass: rgba(20, 18, 33, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.075);
  --hi: rgba(255, 255, 255, 0.06);
  --radius: 20px;
  --r-sm: 12px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.75);
  --ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Red Hat Display', 'Figtree', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --rail: 216px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
kbd {
  font: 500 10.5px/1 var(--mono); color: var(--muted);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px;
}
code { font: 12.5px var(--mono); background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 6px; }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.gold { color: var(--gold); }
.mint { color: var(--mint); }
.sky { color: var(--sky); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 8px; }
::selection { background: rgba(199, 184, 255, 0.35); }

.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- aurora backdrop ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 120%, #150f2c 0%, var(--bg) 60%); }
.aurora i { position: absolute; border-radius: 50%; }
/* static glows: soft radial gradients, no blur filter and no animation — the backdrop never repaints */
.aurora i:nth-child(1) { width: 70vw; height: 52vw; left: -18vw; top: -24vw; background: radial-gradient(closest-side, rgba(91, 63, 192, .34), rgba(91, 63, 192, .12) 55%, transparent); }
.aurora i:nth-child(2) { width: 56vw; height: 40vw; right: -18vw; top: 6vh; background: radial-gradient(closest-side, rgba(47, 224, 168, .09), rgba(47, 224, 168, .03) 60%, transparent); }
.aurora i:nth-child(3) { width: 64vw; height: 46vw; left: 22vw; bottom: -30vw; background: radial-gradient(closest-side, rgba(28, 134, 168, .16), rgba(28, 134, 168, .05) 60%, transparent); }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; animation-duration: 0s !important; } }

#app { position: relative; z-index: 1; height: 100%; }

/* ---------- glass ---------- */
.card {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 var(--hi), var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  padding: 18px 20px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-height: 28px; }
.card-head h2 { font: 600 15px/1.2 var(--display); letter-spacing: .02em; margin: 0; }
.card-meta { color: var(--muted); font-size: 13px; margin-left: auto; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--rail) 1fr; height: 100%; }
.nav {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 14px 16px;
  border-right: 1px solid rgba(255,255,255,.05);
  background: linear-gradient(180deg, rgba(20,18,33,.72), rgba(10,9,19,.55));
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font: 700 19px var(--display); letter-spacing: .01em; }
.brand img { width: 28px; height: 28px; }
.nav-items { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px;
  color: var(--muted); font-weight: 550; transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.045); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgba(199,184,255,.16), rgba(199,184,255,.04)); color: var(--text); box-shadow: inset 0 0 0 1px rgba(199,184,255,.14); }
.nav-item.active .nav-ic { color: var(--lav); }
.nav-ic { position: relative; display: grid; place-items: center; }
.nav-ic .ic { width: 20px; height: 20px; }
.nav-key { margin-left: auto; opacity: 0; transition: opacity .15s; }
.nav:hover .nav-key { opacity: .8; }
.badge {
  position: absolute; top: -6px; right: -9px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--gold); color: var(--ink); font: 700 10px/16px var(--mono); text-align: center;
}
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 0 6px; }
.nav-clock { font: 600 30px/1 var(--display); letter-spacing: -.01em; padding-left: 4px; font-variant-numeric: tabular-nums; }
.live { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); padding-left: 5px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live[data-state='live'] i { background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.live[data-state='reconnecting'] i, .live[data-state='connecting'] i { background: var(--gold); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.nav-cap {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px;
  background: rgba(159,240,207,.1); border: 1px solid rgba(159,240,207,.22); color: var(--mint); font-weight: 650;
}
.nav-cap:hover { background: rgba(159,240,207,.16); }
.nav-cap kbd { margin-left: auto; color: var(--mint); border-color: rgba(159,240,207,.3); }

.main { position: relative; overflow-y: auto; overflow-x: hidden; height: 100%; scrollbar-gutter: stable; }
.view { padding: 26px 32px 40px; max-width: 1480px; margin: 0 auto; }
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.vh-left { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.vh-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.view-title { font: 650 30px/1.1 var(--display); margin: 0; letter-spacing: -.005em; }
.view-range { color: var(--muted); font-size: 14px; }
.fab { display: none; }

/* ---------- buttons / chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: var(--r-sm);
  font-weight: 650; font-size: 14px; line-height: 1.1; white-space: nowrap; transition: background .15s, transform .08s, box-shadow .15s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; stroke-width: 1.9; }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-mint { background: var(--mint); color: var(--ink); box-shadow: 0 6px 20px -8px rgba(159,240,207,.6); }
.btn-mint:hover { background: #b8f5dc; }
.btn-lav { background: var(--lav); color: var(--ink); box-shadow: 0 6px 20px -8px rgba(199,184,255,.6); }
.btn-lav:hover { background: #d6caff; }
.btn-sky { background: var(--sky); color: var(--ink); }
.btn-soft { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); }
.btn-soft:hover { background: rgba(255,255,255,.1); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--text); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; color: var(--muted); transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.07); color: var(--text); }
.linkish { text-align: left; }
.linkish:hover { text-decoration: underline; text-decoration-color: rgba(255,255,255,.25); text-underline-offset: 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid rgba(255,255,255,.06); white-space: nowrap;
}
.chip .ic { width: 13px; height: 13px; stroke-width: 1.9; }
.chip-quiet { background: rgba(255,255,255,.04); }
.chip-gold { background: rgba(255,201,138,.13); color: var(--gold); border-color: rgba(255,201,138,.25); }
.chip-mint { background: rgba(159,240,207,.12); color: var(--mint); border-color: rgba(159,240,207,.25); }
.chip-sky { background: rgba(158,210,255,.12); color: var(--sky); border-color: rgba(158,210,255,.25); }
.chip-lav { background: rgba(199,184,255,.13); color: var(--lav); border-color: rgba(199,184,255,.25); }
.chip-btn { cursor: pointer; }
.chip-btn:hover { color: var(--text); background: rgba(255,255,255,.1); }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(159,240,207,.08); } }

.seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 13px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.seg .icon-btn { width: 32px; height: 32px; }
.seg-btn { padding: 6px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: rgba(199,184,255,.16); color: var(--text); box-shadow: inset 0 0 0 1px rgba(199,184,255,.18); }

/* ---------- states ---------- */
.state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 28px 16px; color: var(--muted); }
.state-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.05); margin-bottom: 4px; }
.state-ic .ic { width: 20px; height: 20px; }
.state-missing .state-ic { color: var(--lav); background: rgba(199,184,255,.1); }
.state-offline .state-ic, .state-error .state-ic { color: var(--gold); background: rgba(255,201,138,.1); }
.state-empty .state-ic { color: var(--mint); background: rgba(159,240,207,.08); }
.state-t { color: var(--text); font-weight: 650; }
.state-d { font-size: 13px; max-width: 34ch; }
.spinner { display: flex; justify-content: center; gap: 6px; padding: 30px; }
.spinner i { width: 7px; height: 7px; border-radius: 50%; background: var(--lav); animation: bob 1s ease-in-out infinite; }
.spinner i:nth-child(2) { animation-delay: .15s; } .spinner i:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 50% { transform: translateY(-5px); opacity: .4; } }

/* ---------- Now ---------- */
.now-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: 20px; align-items: start; }
.now-main, .now-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.now-side { position: sticky; top: 0; }

.hero { padding: 24px 28px 22px; background:
  radial-gradient(120% 140% at 100% 0%, rgba(199,184,255,.13), transparent 55%),
  radial-gradient(90% 120% at 0% 100%, rgba(159,240,207,.07), transparent 60%), var(--glass); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.hero-date { color: var(--muted); font-weight: 550; padding-top: 8px; }
.hero-clock { font: 600 58px/0.9 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff, #d9cff5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: flex; align-items: center; gap: 7px; font: 700 11.5px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.eyebrow .ic { width: 14px; height: 14px; }
.eyebrow.mint { color: var(--mint); } .eyebrow.sky { color: var(--sky); } .eyebrow.lav { color: var(--lav); }
.hero-now.is-night .hero-title { color: #e4dcff; }
.hero-skel { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 8px; }
.hero-skel i, .skel-rows i { display: block; border-radius: 8px; background: linear-gradient(90deg, rgba(255,255,255,.05), rgba(255,255,255,.09), rgba(255,255,255,.05)); }
.sk-eyebrow { width: 60px; height: 11px; } .sk-title { width: 55%; height: 32px; } .sk-sub { width: 38%; height: 14px; }
.skel-rows { display: flex; flex-direction: column; gap: 8px; } .skel-rows i { height: 46px; border-radius: 14px; }
.hero-title { display: block; font: 650 34px/1.12 var(--display); letter-spacing: -.01em; margin-bottom: 8px; overflow-wrap: anywhere; }
.hero-title.quiet { color: var(--muted); }
.hero-sub { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 15px; flex-wrap: wrap; }
.dot-sep::before { content: '·'; color: var(--faint); }
.hero-acts { display: flex; gap: 8px; margin-top: 14px; }
.progress { height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); margin-top: 14px; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, rgba(159,240,207,.5), var(--mint)); box-shadow: 0 0 12px rgba(159,240,207,.5); }
.progress.tone-lav i { background: linear-gradient(90deg, rgba(199,184,255,.45), var(--lav)); box-shadow: 0 0 12px rgba(199,184,255,.5); }
.progress.tone-gold i { background: linear-gradient(90deg, rgba(255,201,138,.5), var(--gold)); }
.hero-rule { height: 1px; background: linear-gradient(90deg, rgba(255,255,255,.1), transparent); margin: 20px 0 16px; }
.next-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.next-title { display: inline-flex; align-items: center; gap: 9px; font: 600 21px/1.2 var(--display); min-width: 0; }
.next-ic { color: var(--lav); display: inline-grid; }
.next-when { display: flex; align-items: baseline; gap: 10px; }
.next-in { font: 600 19px var(--display); color: var(--sky); }
.leave {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 7px 12px; border-radius: 11px;
  background: rgba(255,201,138,.1); border: 1px solid rgba(255,201,138,.25); color: var(--gold); font-size: 14px;
}
.leave .ic { width: 17px; height: 17px; }
.leave b { font-weight: 700; }
.leave .muted { color: rgba(255,201,138,.7); }
.leave.urgent { background: rgba(255,201,138,.2); box-shadow: 0 0 0 3px rgba(255,201,138,.08); animation: pulseGold 2.4s ease-in-out infinite; }
@keyframes pulseGold { 50% { box-shadow: 0 0 0 6px rgba(255,201,138,.04); } }
.cue-strip { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.cue-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 10px; border-radius: 10px; background: rgba(199,184,255,.08); color: var(--lav); }
.cue-pill .ic { width: 12px; height: 12px; }
.cue-pill.lvl-2 { color: var(--gold); background: rgba(255,201,138,.08); }
.cue-pill.lvl-3 { color: var(--ink); background: var(--gold); }
.cue-pill.is-pending { background: transparent; color: var(--muted); border: 1px dashed rgba(255,255,255,.1); }
.cue-pill .cue-at { font: 500 12px var(--mono); opacity: .8; }

.capture-card { padding: 10px; }
.capture { position: relative; }
.cap-row { display: flex; align-items: flex-end; gap: 6px; background: rgba(10,9,19,.55); border: 1px solid var(--line); border-radius: 15px; padding: 6px 6px 6px 14px; transition: border-color .15s, box-shadow .15s; }
.cap-row:focus-within { border-color: rgba(199,184,255,.45); box-shadow: 0 0 0 4px rgba(199,184,255,.08); }
.cap-input { flex: 1; resize: none; border: 0; outline: 0; background: transparent; padding: 8px 0; min-height: 22px; max-height: 160px; line-height: 1.4; font-size: 15px; }
.cap-input::placeholder { color: var(--faint); }
.cap-send { color: var(--ink); background: var(--lav); }
.cap-send:hover { background: #d6caff; color: var(--ink); }
.cap-mic.rec { color: var(--ink); background: var(--gold); animation: pulseGold 1.2s infinite; }
.cap-status { font-size: 12px; color: var(--gold); padding: 0 6px; min-height: 0; }
.cap-status:empty { display: none; }
.capture.busy { opacity: .6; pointer-events: none; }

.upnext .card-head { flex-wrap: wrap; }
.zone-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; font-weight: 600; color: var(--sky); padding: 4px 10px; border-radius: 10px; background: rgba(158,210,255,.08); border: 1px dashed rgba(158,210,255,.35); }
.zone-tag .ic { width: 15px; height: 15px; }
.tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.task { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10,9,19,.35); }
.task.is-first { border-color: rgba(158,210,255,.3); background: linear-gradient(90deg, rgba(158,210,255,.07), rgba(10,9,19,.35)); }
.task.is-started { border-color: rgba(159,240,207,.4); }
.check {
  width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1.8px solid rgba(241,236,247,.35); display: grid; place-items: center; color: transparent; transition: all .15s;
}
.check .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.check:hover { border-color: var(--mint); color: var(--mint); background: rgba(159,240,207,.08); }
.check.is-done { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.task-t { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); }
.en { text-transform: capitalize; }
.en-high { color: var(--mint); } .en-low { color: var(--lav); }
.start { flex: none; }

.sunset { padding: 14px 18px; }
.sun-row { display: flex; align-items: center; gap: 14px; }
.sun-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: rgba(255,201,138,.1); color: var(--gold); flex: none; }
.sun-ic .ic { width: 22px; height: 22px; }
.sun-main { flex: 1; min-width: 0; }
.sun-t { font: 600 18px/1.2 var(--display); }
.sun-t .mono { font-weight: 600; }
.sun-sub { color: var(--muted); font-size: 13px; }
.sun-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rehearse { font-size: 11px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.ph-chip.ph-open { color: var(--mint); background: rgba(159,240,207,.1); border-color: rgba(159,240,207,.2); }
.ph-chip.ph-heads_up, .ph-chip.ph-dimming { color: var(--gold); background: rgba(255,201,138,.1); border-color: rgba(255,201,138,.25); }
.ph-chip.ph-final { color: var(--ink); background: var(--gold); }
.ph-chip.ph-closed { color: var(--lav); background: rgba(199,184,255,.12); }
.sunset.ph-final { border-color: rgba(255,201,138,.35); }
.dim-meter { height: 4px; border-radius: 2px; background: rgba(255,255,255,.06); margin-top: 12px; overflow: hidden; }
.dim-meter i { display: block; height: 100%; background: linear-gradient(90deg, rgba(255,201,138,.3), var(--gold)); }
.sun-acts { display: flex; gap: 8px; margin-top: 12px; }

.timeline-card { padding: 16px 0 0; display: flex; flex-direction: column; }
.timeline-card .card-head { padding: 0 20px; }
.tl-scroll { height: calc(100vh - 250px); min-height: 380px; overflow-y: auto; padding: 4px 12px 16px 0; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

/* ---------- day grid ---------- */
.daygrid { --gut: 46px; position: relative; }
.dg-head { position: sticky; top: 0; z-index: 6; display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(0, 1fr));
  background: #16142a; border-bottom: 1px solid var(--line); }
.dg-dayhead { display: flex; align-items: baseline; justify-content: center; gap: 7px; padding: 10px 4px 9px; color: var(--muted); font-weight: 600; font-size: 13px; }
.dg-dnum { font: 600 20px/1 var(--display); color: var(--text); }
.dg-dayhead.is-today { color: var(--mint); }
.dg-dayhead.is-today .dg-dnum { color: var(--ink); background: var(--mint); border-radius: 9px; padding: 3px 7px; box-shadow: 0 0 16px rgba(159,240,207,.35); }
.dg-allday { position: sticky; top: 45px; z-index: 5; display: grid; grid-template-columns: var(--gut) minmax(0, 1fr); background: #16142a; border-bottom: 1px solid var(--line); }
.dg-ad-label { font-size: 10.5px; color: var(--faint); text-align: right; padding: 7px 8px 0 0; text-transform: uppercase; letter-spacing: .06em; }
.dg-adgrid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: minmax(22px, auto); row-gap: 3px; padding: 4px 0; }
.dg-adcell { border-left: 1px solid var(--line); margin: -4px 0; min-width: 0; }
.dg-adcell.is-today { background: rgba(159,240,207,.025); }
.ad-chip { position: relative; z-index: 1; display: flex; align-items: center; gap: 5px; min-width: 0; margin: 0 3px; font-size: 12px; font-weight: 600; text-align: left; padding: 3px 8px; border-radius: 7px;
  background: rgba(199,184,255,.2); color: var(--text); white-space: nowrap; overflow: hidden; }
.ad-chip:hover { background: rgba(199,184,255,.28); }
.ad-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ad-chip .ic { width: 12px; height: 12px; flex: none; }
.ad-chip.k-task { background: transparent; border: 1px solid rgba(241,236,247,.35); }
.ad-chip.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.ad-chip.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.ad-chip.is-ref { background: rgba(255,255,255,.035); border: 1px dashed rgba(163,157,184,.3); color: var(--muted); font-weight: 500; font-size: 11.5px; padding: 1px 7px; }
.ad-chip.is-ref:hover { background: rgba(255,255,255,.07); color: var(--text); }
.ad-chip.ad-more { justify-content: center; }
.dg-body { display: grid; grid-template-columns: var(--gut) 1fr; }
.dg-gutter { position: relative; }
.dg-hour { position: absolute; right: 8px; transform: translateY(-50%); font: 500 11px var(--mono); color: var(--faint); }
.dg-hour:first-child { transform: translateY(2px); }
.dg-cols { position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
.dg-col { position: relative; border-left: 1px solid var(--line); min-width: 0; container-type: inline-size; }
@container (max-width: 120px) { .zl-m, .zone-time { display: none; } .zone-list { padding: 0 4px 4px; } .blk.is-short .blk-time { display: none; } }
.dg-col.is-today { background: linear-gradient(180deg, rgba(159,240,207,.025), rgba(159,240,207,.012)); }
.dg-line { position: absolute; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,.035); }

/* zones: soft hatched bands */
.zone {
  --zc: 158, 210, 255;
  position: absolute; left: 3px; right: 3px; border-radius: 12px; cursor: pointer; overflow: hidden;
  background: repeating-linear-gradient(135deg, rgba(var(--zc), .085) 0 7px, rgba(var(--zc), .035) 7px 14px);
  border: 1px dashed rgba(var(--zc), .38);
  transition: background .15s;
}
.zone:hover { background: repeating-linear-gradient(135deg, rgba(var(--zc), .13) 0 7px, rgba(var(--zc), .05) 7px 14px); }
.zone.en-high { --zc: 159, 240, 207; }
.zone.en-low { --zc: 199, 184, 255; }
.zone.st-tentative { opacity: .6; }
.zone-head { display: flex; align-items: center; gap: 5px; padding: 5px 8px 3px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: rgb(var(--zc)); white-space: nowrap; overflow: hidden; }
.zone-head .ic { width: 13px; height: 13px; flex: none; }
.zone-name { overflow: hidden; text-overflow: ellipsis; }
.zone-time { margin-left: auto; font: 500 10.5px var(--mono); opacity: .75; }
.zone-list { list-style: none; margin: 0; padding: 0 8px 4px; display: flex; flex-direction: column; gap: 1px; }
.zone-list li { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; color: var(--text); min-width: 0; border-radius: 5px; padding: 0 3px; }
.zone-list li:hover { background: rgba(255,255,255,.06); }
.zl-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid rgba(241,236,247,.6); flex: none; }
.zl-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zl-m { font: 500 10.5px var(--mono); color: var(--muted); }
.zone-list li.is-done { color: var(--faint); text-decoration: line-through; }
.zone-list li.is-done .zl-dot { background: var(--mint); border-color: var(--mint); }
.zl-more { color: var(--muted); font-size: 11px; }

/* background bands: sleep and the derived school day span the column, never take a lane */
.band { position: absolute; left: 0; right: 0; z-index: 0; cursor: pointer; }
.band.b-anchor { background: linear-gradient(90deg, rgba(199,184,255,.1), rgba(199,184,255,.05)); box-shadow: inset 3px 0 0 rgba(199,184,255,.4); }
.band.b-anchor:hover { background: linear-gradient(90deg, rgba(199,184,255,.13), rgba(199,184,255,.06)); }
.band.b-sleep { background: repeating-linear-gradient(90deg, rgba(56,48,100,.28) 0 2px, rgba(28,24,52,.18) 2px 6px); }
.band.b-sleep:hover { background: repeating-linear-gradient(90deg, rgba(56,48,100,.42) 0 2px, rgba(28,24,52,.28) 2px 6px); }
.band-label { position: absolute; left: 9px; right: 6px; display: flex; align-items: center; gap: 6px; height: 18px; margin-top: 2px;
  font: 700 10px/18px var(--ui); letter-spacing: .07em; text-transform: uppercase; color: rgba(199,184,255,.72); white-space: nowrap; overflow: hidden; pointer-events: none; }
.band-label .ic { width: 12px; height: 12px; flex: none; }
.band-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.band-time { font: 500 10px var(--mono); letter-spacing: 0; text-transform: none; opacity: .75; flex: none; }
.band.b-sleep .band-label { color: rgba(163,157,184,.8); }
@container (max-width: 130px) { .band-time { display: none; } }

/* shared calendar, collapsed: thin muted chips */
.shared-chip { position: absolute; right: 3px; z-index: 3; max-width: calc(100% - 10px); height: 19px; display: inline-flex; align-items: center; gap: 5px;
  padding: 0 7px; border-radius: 6px; font-size: 11px; color: var(--muted); background: rgba(20,18,33,.86); border: 1px dashed rgba(163,157,184,.35); white-space: nowrap; overflow: hidden; }
.shared-chip:hover { color: var(--text); border-color: rgba(163,157,184,.6); z-index: 5; }
.shared-chip .ic { width: 12px; height: 12px; flex: none; opacity: .8; }
.sc-t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sc-time { font: 500 10px var(--mono); opacity: .7; flex: none; }
@container (max-width: 130px) { .sc-time { display: none; } }

/* foreground blocks — shape + fill encode kind */
.blk {
  position: absolute; z-index: 2; border-radius: 9px; overflow: clip; cursor: pointer; user-select: none;
  transition: box-shadow .15s, transform .12s; outline-offset: 1px;
}
.blk:hover { z-index: 3; box-shadow: 0 8px 24px -8px rgba(0,0,0,.8); }
.blk-in { position: sticky; top: var(--stick, 0px); display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 5px; padding: 4px 7px; min-width: 0; max-height: 100%; }
.blk-ic { display: inline-grid; flex: none; margin-top: 1px; }
.blk-ic .ic { width: 13px; height: 13px; stroke-width: 1.9; }
.blk-t { font-size: 12.5px; font-weight: 650; line-height: 1.25; flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.blk-time { width: 100%; font: 500 10.5px/1.3 var(--mono); opacity: .8; white-space: nowrap; overflow: hidden; }
.blk.is-short .blk-in { flex-wrap: nowrap; align-items: center; padding: 1px 7px; }
.blk.is-short .blk-t { -webkit-line-clamp: 1; white-space: nowrap; display: block; text-overflow: ellipsis; }
.blk.is-short .blk-time { width: auto; flex: none; }
.blk.is-movable { cursor: grab; }
.blk.dragging { cursor: grabbing; z-index: 10; box-shadow: 0 14px 30px -6px rgba(0,0,0,.9), 0 0 0 2px var(--sky); transform: scale(1.02); }

/* anchor: solid lavender slab — fixed commitments */
.blk.k-anchor { background: linear-gradient(180deg, #4a3d85, #3b3170); color: #fff; box-shadow: inset 3px 0 0 var(--lav), inset 0 1px 0 rgba(255,255,255,.12); }
.blk.k-anchor .blk-ic { color: var(--lav); }
/* task: outlined card — flexible work */
.blk.k-task { background: rgba(12,11,22,.92); border: 1.5px solid rgba(241,236,247,.55); color: var(--text); }
.blk.k-task .blk-ic { color: var(--text); }
/* meal: light gold pill, dashed — a plan, not an appointment */
.blk.k-meal { background: rgba(43,34,48,.55); border: 1px dashed rgba(255,201,138,.5); color: #ffe6c8; border-radius: 16px; }
.blk.k-meal .blk-ic { color: var(--gold); }
.blk.k-meal.is-idea { background: rgba(43,34,48,.3); border-color: rgba(255,201,138,.3); color: rgba(255,230,200,.7); opacity: 1; background-image: none; }
/* workout: mint with pulse edge */
.blk.k-workout { background: linear-gradient(90deg, rgba(159,240,207,.22), rgba(159,240,207,.1)); color: #dcfff0; border-left: 3px solid var(--mint); border-radius: 4px 9px 9px 4px; }
.blk.k-workout .blk-ic { color: var(--mint); }
/* sleep: night stripe */
.blk.k-sleep { background: repeating-linear-gradient(90deg, rgba(40,34,72,.9) 0 2px, rgba(28,24,52,.9) 2px 6px); color: var(--muted); border-radius: 6px; }
.blk.k-sleep .blk-ic { color: var(--lav); }
/* reminder / block */
.blk.k-reminder { background: rgba(10,9,19,.85); border: 1px dashed rgba(158,210,255,.6); color: var(--sky); }
.blk.k-block { background: rgba(58,52,86,.85); color: var(--text); }
.blk.k-block .blk-ic { color: var(--muted); }
/* status */
.blk.st-tentative { opacity: .78; border-style: dashed; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 5px, transparent 5px 10px); }
.blk.k-anchor.st-tentative { box-shadow: none; border: 1.5px dashed rgba(199,184,255,.75); background: rgba(74,61,133,.4); }
/* shared calendar shown in lanes: muted outline */
.blk.is-ref { background: rgba(20,18,33,.8); border: 1px dashed rgba(163,157,184,.4); color: var(--muted); box-shadow: none; }
.blk.is-ref .blk-ic { color: var(--faint); }
.blk.is-ref .blk-t { font-weight: 550; }
/* too narrow for a title: a dot, title on hover */
.blk.is-dot { display: grid; justify-items: center; padding-top: 5px; }
.blk-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
/* extra lanes collapsed */
.blk.more { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 0; padding-top: 3px; background: rgba(20,18,33,.85);
  border: 1px dashed rgba(199,184,255,.45); color: var(--lav); }
.blk.more:hover { background: rgba(40,34,72,.9); }
.more-n { font: 700 13px/1.2 var(--display); }
.more-t { font-size: 10.5px; color: var(--muted); }
.blk.st-done { opacity: .5; }
.blk.st-done .blk-t { text-decoration: line-through; }
.blk.st-done .blk-ic { color: var(--mint); }

/* cues */
.cue { position: absolute; left: -8px; z-index: 4; display: flex; align-items: center; transform: translateY(-50%); padding: 3px; cursor: help; }
.cue i { width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid var(--lav); background: var(--bg); border-radius: 2px; flex: none; }
.cue.ck-leave_by i { border-color: var(--gold); }
.cue.lvl-3 i { background: var(--gold); border-color: var(--gold); }
.cue-t { display: none; position: absolute; left: 16px; font-size: 11px; color: var(--text); background: rgba(27,24,48,.97); border: 1px solid rgba(255,255,255,.1); padding: 3px 8px; border-radius: 7px; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.cue:hover { z-index: 9; }
.cue:hover .cue-t { display: block; }
.cue.ck-leave_by .cue-t { color: var(--gold); }

.now-tag { position: absolute; right: 3px; z-index: 9; transform: translateY(-50%); font: 600 10.5px/1 var(--mono); color: var(--ink); background: var(--mint); padding: 3px 4px; border-radius: 6px; box-shadow: 0 0 10px rgba(159,240,207,.5); }
.now-line { position: absolute; left: -1px; right: 0; z-index: 1; height: 0; border-top: 2px solid var(--mint); box-shadow: 0 0 10px rgba(159,240,207,.7); pointer-events: none; }
.now-line i { display: none; }

/* ---------- Week ---------- */
.week-card { padding: 0; overflow: hidden; }
.week-scroll { height: calc(100vh - 130px); min-height: 480px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 18px; height: 11px; border-radius: 4px; }
.lg-anchor { background: linear-gradient(180deg, #4a3d85, #3b3170); box-shadow: inset 2px 0 0 var(--lav); }
.lg-zone { background: repeating-linear-gradient(135deg, rgba(158,210,255,.25) 0 3px, rgba(158,210,255,.06) 3px 6px); border: 1px dashed rgba(158,210,255,.5); }
.lg-task { border: 1.5px solid rgba(241,236,247,.6); }
.lg-meal { background: rgba(255,201,138,.25); border: 1px solid rgba(255,201,138,.6); border-radius: 8px !important; }
.lg-workout { background: rgba(159,240,207,.2); border-left: 3px solid var(--mint); border-radius: 2px !important; }
.lg-ref { border: 1px dashed rgba(163,157,184,.55); }
.lg-meal { border-style: dashed !important; }

/* view switches (shared calendar, meal ideas) */
.tgl-row, .tl-toggles { display: flex; gap: 6px; align-items: center; }
.tl-toggles { margin-left: auto; }
.tgl { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 8px; border-radius: 10px; font-size: 12.5px; font-weight: 600;
  color: var(--muted); border: 1px solid var(--line-2); background: rgba(10,9,19,.35); white-space: nowrap; }
.tgl:hover { color: var(--text); }
.tgl .ic { width: 14px; height: 14px; }
.tgl-sw { position: relative; width: 22px; height: 12px; border-radius: 6px; background: rgba(255,255,255,.1); flex: none; transition: background .15s; }
.tgl-sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.tgl.on { color: var(--text); border-color: rgba(199,184,255,.4); background: rgba(199,184,255,.08); }
.tgl.on .tgl-sw { background: rgba(199,184,255,.35); }
.tgl.on .tgl-sw::after { transform: translateX(10px); background: var(--lav); }
.tl-toggles .tgl { height: 26px; font-size: 12px; padding: 0 8px 0 7px; }

/* ---------- Queue ---------- */
.add-card { padding: 10px; margin-bottom: 16px; }
.queue-list { display: flex; flex-direction: column; gap: 14px; }
.qgroup { padding: 6px 8px 8px; }
.qg-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 8px; flex-wrap: wrap; }
.qg-title { font: 600 14px var(--display); color: var(--muted); letter-spacing: .02em; }
.qg-zone { display: inline-flex; align-items: center; gap: 7px; font: 650 15px var(--display); color: var(--sky); }
.qg-zone .ic { width: 16px; height: 16px; }
.qg-when { color: var(--muted); font-size: 13px; }
.qg-fill { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.qg-bar { width: 70px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.qg-bar i { display: block; height: 100%; background: var(--sky); border-radius: 3px; }
.qg-fill.over { color: var(--gold); }
.qg-fill.over .qg-bar i { background: var(--gold); }
.q-avoid { display: inline-flex; align-items: center; gap: 4px; color: var(--mint); }
.q-avoid .ic { width: 12px; height: 12px; }
.q-tt { overflow: hidden; text-overflow: ellipsis; }
.grip.off { visibility: hidden; }
.qlist { list-style: none; margin: 0; padding: 0; }
.qrow {
  display: grid; grid-template-columns: 22px 26px minmax(0, 1fr) 110px 44px 86px; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 14px; background: transparent; transition: background .12s;
}
.qrow + .qrow { box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
.qrow:hover { background: rgba(255,255,255,.035); }
.qrow.placeholder { background: rgba(199,184,255,.06); border: 1px dashed rgba(199,184,255,.35); }
.qrow.lifted { position: fixed; z-index: 50; background: var(--panel-2); box-shadow: 0 18px 40px -10px rgba(0,0,0,.9), 0 0 0 1px rgba(199,184,255,.35); pointer-events: none; }
.grip { color: var(--faint); cursor: grab; display: grid; place-items: center; touch-action: none; height: 30px; }
.grip:hover { color: var(--text); }
.qnum { color: var(--faint); font-size: 12px; text-align: center; }
.q-main { display: flex; flex-direction: column; gap: 3px; text-align: left; min-width: 0; }
.q-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prio { color: var(--gold); display: inline-grid; }
.prio .ic { width: 14px; height: 14px; }
.q-meta { display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.q-zone { display: inline-flex; align-items: center; gap: 4px; color: var(--sky); }
.q-zone .ic { width: 13px; height: 13px; }
.q-zone.pinned { color: var(--lav); }
.q-cat { text-transform: lowercase; }
.q-cat::before { content: '#'; opacity: .5; }
.q-est { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.q-est-main { font-size: 14px; font-weight: 600; }
.q-factor { font: 500 10.5px var(--mono); color: var(--muted); }
.q-factor.over { color: var(--gold); }
.q-factor.under { color: var(--mint); }
.q-due { text-align: right; }
.qrow.is-done .q-title { text-decoration: line-through; color: var(--muted); }
.energy { display: inline-flex; align-items: center; gap: 3px; }
.energy i { width: 5px; height: 12px; border-radius: 2px; background: rgba(255,255,255,.12); }
.energy i:nth-child(1) { height: 7px; } .energy i:nth-child(2) { height: 10px; } .energy i:nth-child(3) { height: 13px; }
.energy i.on { background: var(--mint); }
.energy .small { margin-left: 6px; text-transform: capitalize; }

/* ---------- Inbox ---------- */
.cards { columns: 2 380px; column-gap: 16px; }
.cards > .prop { break-inside: avoid; margin-bottom: 16px; }
.prop { position: relative; display: flex; flex-direction: column; gap: 12px; transition: opacity .2s, transform .2s; overflow: hidden; }
.prop::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tone, var(--lav)); opacity: .8; }
.prop.tone-sky { --tone: var(--sky); } .prop.tone-mint { --tone: var(--mint); } .prop.tone-gold { --tone: var(--gold); } .prop.tone-lav { --tone: var(--lav); } .prop.tone-quiet { --tone: var(--faint); }
.prop.leaving { opacity: 0; transform: scale(.97); }
.prop-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.conf { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.conf-dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; }
.conf.cf-likely { color: var(--mint); } .conf.cf-likely .conf-dot { background: currentColor; }
.conf.cf-possible { color: var(--sky); }
.conf.cf-unsure { color: var(--faint); }
.prop-src { color: var(--muted); }
.prop-age { margin-left: auto; }
.prop-reason { margin: 0; font: 600 17px/1.35 var(--display); }
.prop-q { margin: 0; color: var(--text); }
.change { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border-radius: 12px; background: rgba(10,9,19,.45); border: 1px solid var(--line); }
.ch-title { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ch-title .ic { width: 14px; height: 14px; color: var(--sky); }
.ch-title.struck { text-decoration: line-through; color: var(--muted); }
.ch-move { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--mono); flex-wrap: wrap; }
.ch-move .ic { width: 14px; height: 14px; color: var(--faint); }
.ch-from { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(163,157,184,.5); }
.ch-to { color: var(--sky); font: 500 13px var(--mono); }
.draft { border-radius: 12px; border: 1px solid rgba(159,240,207,.2); background: rgba(159,240,207,.04); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.draft-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--mint); width: 100%; }
.draft-head .ic { width: 14px; height: 14px; }
.draft-note { margin-left: auto; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.draft-body { margin: 0; white-space: pre-wrap; font: 14px/1.45 var(--ui); color: var(--text); }
.prop-ev { display: flex; flex-direction: column; gap: 8px; }
.prop-acts { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.prop-exp { margin-left: auto; }

.evidence { margin: 0; padding: 9px 12px; border-left: 2px solid rgba(199,184,255,.45); background: rgba(199,184,255,.05); border-radius: 0 10px 10px 0; }
.evidence blockquote { margin: 0 0 5px; font-size: 14px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.evidence.open blockquote { display: block; -webkit-line-clamp: unset; }
.ev-more { font-size: 12px; font-weight: 600; color: var(--lav); margin: -2px 0 6px; }
.ev-more:hover { text-decoration: underline; }
.evidence.no-quote { padding-top: 7px; padding-bottom: 7px; }
.ch-loc { overflow-wrap: anywhere; }
.evidence blockquote::before { content: '“'; color: var(--lav); }
.evidence blockquote::after { content: '”'; color: var(--lav); }
.evidence figcaption { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.evidence figcaption .ic { width: 12px; height: 12px; }

/* ---------- Side sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(5,4,12,.35); opacity: 0; transition: opacity .22s; }
.scrim.in { opacity: 1; }
.sheet {
  position: fixed; z-index: 41; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px));
  background: rgba(22,20,37,.9); backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid var(--glass-edge); border-radius: 22px; box-shadow: inset 0 1px 0 var(--hi), -20px 0 60px -20px rgba(0,0,0,.8);
  transform: translateX(calc(100% + 24px)); transition: transform .26s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column;
}
.sheet.in { transform: none; }
.sheet-grab { display: none; }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.sheet-body { overflow-y: auto; padding: 22px 24px 28px; display: flex; flex-direction: column; gap: 16px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.ip-kinds { display: flex; gap: 6px; flex-wrap: wrap; padding-right: 40px; }
.kc-anchor { background: rgba(199,184,255,.14); color: var(--lav); }
.kc-zone { background: rgba(158,210,255,.1); color: var(--sky); border-style: dashed; border-color: rgba(158,210,255,.35); }
.kc-task { color: var(--text); border-color: rgba(241,236,247,.35); background: transparent; }
.kc-meal { background: rgba(255,201,138,.12); color: var(--gold); }
.kc-workout { background: rgba(159,240,207,.1); color: var(--mint); }
.st-chip.st-tentative, .st-chip.st-proposed { color: var(--gold); border-style: dashed; border-color: rgba(255,201,138,.4); }
.st-chip.st-done { color: var(--mint); }
.ip-title { font: 650 26px/1.15 var(--display); margin: 0; overflow-wrap: anywhere; }
.ip-when { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; margin-top: -6px; }
.ip-when .ic { width: 15px; height: 15px; }
.ip-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: 96px 1fr; gap: 9px 12px; margin: 0; padding: 14px 16px; border-radius: 14px; background: rgba(10,9,19,.4); border: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.facts dd { margin: 0; min-width: 0; }
.ip-sec h3 { font: 700 11.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.ip-sec h4 { font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 600; }
.ip-notes { margin: 0; white-space: pre-wrap; }
.why { display: flex; flex-direction: column; gap: 8px; }
.why h3 { margin-bottom: 2px; }
.prep { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.prep li { display: flex; gap: 8px; align-items: center; }
.prep .ic { width: 15px; height: 15px; color: var(--gold); }
/* list sheet (crowded / shared events of one slot) */
.list-title { font-size: 21px; padding-right: 40px; }
.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.il-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 13px; border: 1px solid var(--line); background: rgba(10,9,19,.35); text-align: left; }
.il-row:hover { border-color: var(--line-2); background: rgba(255,255,255,.04); }
.il-row > .ic { width: 15px; height: 15px; color: var(--faint); }
.il-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(199,184,255,.1); color: var(--lav); }
.il-ic .ic { width: 15px; height: 15px; }
.il-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.il-t { font-weight: 600; overflow-wrap: anywhere; }
.il-meta { font: 500 12px var(--mono); color: var(--muted); }
.hist-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; font-size: 13px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.04); }
.hist-act { color: var(--lav); font-weight: 600; }
.hist-reason { color: var(--text); }
.hist-st { color: var(--muted); font-size: 12px; }
.ps-declined .hist-reason { color: var(--muted); text-decoration: line-through; }
.move-form { display: grid; grid-template-columns: 1.3fr 1fr .8fr auto; gap: 8px; align-items: end; padding: 12px; border-radius: 14px; background: rgba(158,210,255,.05); border: 1px solid rgba(158,210,255,.2); }
.move-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.move-form input, .pop-input, .g-add, .tok-input {
  background: rgba(10,9,19,.6); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 9px; outline: 0; min-width: 0; width: 100%;
}
.move-form input:focus, .pop-input:focus, .g-add:focus, .tok-input:focus { border-color: rgba(199,184,255,.5); }
input[type='date']::-webkit-calendar-picker-indicator, input[type='time']::-webkit-calendar-picker-indicator { filter: invert(.8); }

/* ---------- popover / modal / toast ---------- */
.popover {
  position: fixed; z-index: 60; min-width: 260px; max-width: calc(100vw - 24px); padding: 14px; border-radius: 16px;
  background: rgba(27,24,48,.96); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.1); box-shadow: 0 20px 50px -10px rgba(0,0,0,.85);
  opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s;
}
.popover.in { opacity: 1; transform: none; }
.pop-title { font: 600 15px var(--display); }
.pop-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pop-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pop-row-end { align-items: center; flex-wrap: nowrap; }
.pop-input { width: 80px; flex: none; }
.preset { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); font: 600 13px var(--mono); }
.preset:hover, .preset:focus-visible { background: rgba(159,240,207,.14); border-color: rgba(159,240,207,.4); color: var(--mint); }
.preset.is-est { border-color: rgba(158,210,255,.35); }
.preset-timed { background: rgba(159,240,207,.14); border-color: rgba(159,240,207,.4); color: var(--mint); }
.preset .ic { width: 13px; height: 13px; }

.modal-scrim { background: rgba(5,4,12,.55); backdrop-filter: blur(3px); }
.modal {
  position: fixed; z-index: 61; left: 50%; top: 18vh; width: min(620px, calc(100vw - 32px)); transform: translate(-50%, -8px) scale(.98); opacity: 0;
  background: rgba(24,21,41,.95); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 22px; padding: 16px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9);
  transition: opacity .18s, transform .18s;
}
.modal.in { opacity: 1; transform: translate(-50%, 0); }
.modal-title { display: flex; align-items: center; gap: 8px; font: 600 16px var(--display); margin: 2px 4px 12px; color: var(--mint); }
.modal-hint { font-size: 12px; color: var(--faint); margin: 10px 4px 0; }

#toasts { position: fixed; z-index: 80; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px; border-radius: 14px; pointer-events: auto;
  background: rgba(30,27,52,.96); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 14px 40px -10px rgba(0,0,0,.9); font-size: 14px;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; max-width: 100%;
}
.toast.in { opacity: 1; transform: none; }
.toast.tone-ok { border-color: rgba(159,240,207,.3); }
.toast.tone-warn { border-color: rgba(255,201,138,.4); color: var(--gold); }
.toast-act { color: var(--sky); font-weight: 700; padding: 4px 8px; border-radius: 8px; }
.toast-act:hover { background: rgba(158,210,255,.12); }

/* ---------- Ritual ---------- */
.tabs-seg .seg-btn { padding: 7px 14px; }
.ritual-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.steps h3 { font: 700 11.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.steps-head { display: flex; justify-content: space-between; align-items: center; }
.steps .progress { margin: 10px 0 14px; height: 4px; }
.chat-opts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.chat-opts .chip { font-size: 13px; padding: 6px 12px; color: var(--lav); border-color: rgba(199,184,255,.3); background: rgba(199,184,255,.08); }
.steps ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--muted); font-weight: 550; }
.st-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 11px var(--mono); border: 1.5px solid var(--line-2); flex: none; }
.st-n .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.steps li.done { color: var(--text); }
.steps li.done .st-n { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.steps li.current { background: rgba(199,184,255,.1); color: var(--text); }
.steps li.current .st-n { border-color: var(--lav); color: var(--lav); }
.chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-log { display: flex; flex-direction: column; gap: 10px; padding: 20px; overflow-y: auto; height: calc(100vh - 260px); min-height: 320px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.bubble { max-width: min(640px, 86%); padding: 11px 15px; border-radius: 18px; white-space: pre-wrap; line-height: 1.5; font-size: 15px; animation: viewIn .2s ease both; }
.bubble.them { align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.06); border-bottom-left-radius: 6px; }
.bubble.me { align-self: flex-end; background: linear-gradient(180deg, rgba(199,184,255,.28), rgba(199,184,255,.18)); border: 1px solid rgba(199,184,255,.25); border-bottom-right-radius: 6px; }
.bubble.err { color: var(--gold); border-color: rgba(255,201,138,.25); }
.bubble.typing { display: flex; gap: 5px; padding: 14px 16px; }
.bubble.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: bob 1s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .15s; } .bubble.typing i:nth-child(3) { animation-delay: .3s; }
.chat-end { align-self: center; display: flex; align-items: center; gap: 6px; color: var(--mint); font-size: 13px; padding: 8px; }
.chat-end .ic { width: 15px; height: 15px; }
.chat-input { display: flex; align-items: flex-end; gap: 6px; margin: 0 12px 12px; background: rgba(10,9,19,.55); border: 1px solid var(--line); border-radius: 15px; padding: 6px 6px 6px 14px; }
.chat-input:focus-within { border-color: rgba(199,184,255,.45); }
.chat-foot { display: flex; justify-content: flex-end; padding: 0 12px 10px; margin-top: -4px; }
.ritual-start { max-width: 560px; margin: 8vh auto 0; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 32px; }
.ritual-start h2 { font: 650 24px var(--display); margin: 6px 0 0; }
.ritual-start p { max-width: 42ch; margin: 0 0 12px; }
.rs-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(199,184,255,.12); color: var(--lav); }
.rs-ic .ic { width: 28px; height: 28px; }

.meal-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.meal-range { font-weight: 600; }
.meal-grid { display: grid; grid-template-columns: 86px repeat(7, minmax(0, 1fr)); gap: 6px; }
.mg-day { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; padding: 4px 0 6px; }
.mg-day.is-today { color: var(--mint); }
.mg-slot { font-size: 12px; color: var(--muted); text-transform: capitalize; padding-top: 10px; font-weight: 600; }
.mg-cell { min-height: 72px; border-radius: 12px; background: rgba(10,9,19,.35); border: 1px solid rgba(255,255,255,.04); padding: 5px; display: flex; flex-direction: column; gap: 5px; }
.mg-cell.is-today { border-color: rgba(159,240,207,.2); }
.meal { border-radius: 12px; padding: 7px 9px; background: rgba(255,201,138,.1); border: 1px solid rgba(255,201,138,.28); display: flex; flex-direction: column; gap: 4px; }
.meal.heft-light { background: rgba(255,201,138,.05); border-color: rgba(255,201,138,.18); }
.meal.heft-heavy { background: rgba(255,201,138,.17); border-color: rgba(255,201,138,.45); }
.meal-t { font-size: 13px; font-weight: 600; line-height: 1.25; }
.meal-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.heft { display: inline-flex; gap: 2px; }
.heft i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.12); }
.heft i.on { background: var(--gold); }
.lefto { color: var(--sky); }
.meal-list { display: flex; flex-direction: column; gap: 12px; }
.ml-date { font-weight: 650; margin-bottom: 6px; }
.ml-day.is-today .ml-date { color: var(--mint); }
.ml-row { display: grid; grid-template-columns: 78px 1fr; gap: 8px; align-items: center; margin-bottom: 5px; }
.ml-slot { font-size: 12px; color: var(--muted); text-transform: capitalize; }

.groc-card { max-width: 720px; }
.groc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.groc-count { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; white-space: nowrap; color: var(--gold); }
.g-add { flex: 1; }
.groc-group h3 { font: 700 11.5px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.groc { list-style: none; margin: 0; padding: 0; }
.groc li { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid rgba(255,255,255,.04); }
.gcheck { width: 22px; height: 22px; border-radius: 7px; border: 1.8px solid rgba(241,236,247,.35); display: grid; place-items: center; color: transparent; flex: none; }
.gcheck .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.groc li.got .gcheck { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.groc li.got .g-text { text-decoration: line-through; color: var(--faint); }
.g-text { flex: 1; }
.g-qty { color: var(--muted); font-size: 12.5px; }

/* ---------- Health ---------- */
.health-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 20px; align-items: start; }
.span2 { grid-column: 1 / -1; }
.rd-body { display: flex; align-items: center; gap: 20px; }
.ring { position: relative; width: 124px; height: 124px; flex: none; --rc: var(--muted); }
.ring svg { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: rgba(255,255,255,.07); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--rc); stroke-width: 9; stroke-linecap: round; }
.ring.tone-mint { --rc: var(--mint); } .ring.tone-sky { --rc: var(--sky); } .ring.tone-gold { --rc: var(--gold); }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font: 650 36px var(--display); }
.rd-label { font: 650 22px var(--display); }
.rd-label.mint { color: var(--mint); } .rd-label.gold { color: var(--gold); } .rd-label.sky { color: var(--sky); }
.rd-text p { margin: 4px 0 0; }
.signals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.sig { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(10,9,19,.4); border: 1px solid var(--line); }
.sig-k { font-size: 11.5px; color: var(--muted); }
.sig-v { font-size: 16px; font-weight: 600; }
.sleep-stats { display: flex; gap: 28px; margin-bottom: 18px; }
.stat { display: flex; flex-direction: column; }
.stat-v { font-size: 24px; font-weight: 600; }
.stat-k { font-size: 12px; color: var(--muted); }
.sleep-bars { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; height: 210px; padding-top: 4px; }
.sleep-target { position: absolute; left: 0; right: 0; bottom: calc(38px + (100% - 60px) * var(--f, 0)); border-top: 1px dashed rgba(159,240,207,.5); z-index: 1; pointer-events: none; }
.sleep-target span { display: none; }
.goal-key { display: inline-block; width: 16px; border-top: 1px dashed var(--mint); vertical-align: middle; margin-right: 6px; }
.sb { display: grid; grid-template-rows: 16px 1fr 18px 16px; gap: 2px; align-items: end; text-align: center; min-width: 0; }
.sb-val { font-size: 10.5px; color: var(--muted); }
.sb-track { position: relative; height: 100%; border-radius: 8px; background: rgba(255,255,255,.035); display: flex; align-items: flex-end; overflow: hidden; }
.sb-track i { display: block; width: 100%; border-radius: 8px; background: linear-gradient(180deg, var(--lav), rgba(199,184,255,.35)); }
.sb-track i.ok { background: linear-gradient(180deg, var(--mint), rgba(159,240,207,.3)); }
.sb-track i.low { background: linear-gradient(180deg, var(--gold), rgba(255,201,138,.3)); }
.sb-day { font-size: 12px; color: var(--muted); font-weight: 600; }
.sb-bed { font-size: 10.5px; color: var(--faint); }
.sb-bed.late { color: var(--gold); }
.wk-list { list-style: none; margin: 0; padding: 0; }
.wk { display: grid; grid-template-columns: 34px 1fr 60px 80px 130px; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid rgba(255,255,255,.04); }
.wk:first-child { border-top: 0; }
.wk-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(159,240,207,.1); color: var(--mint); }
.wk-ic .ic { width: 16px; height: 16px; }
.wk { cursor: pointer; border-radius: 10px; }
.wk:hover { background: rgba(255,255,255,.03); }
.wk-t { font-weight: 600; }
.factors { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.factors li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: baseline; }
.f-pts { font-size: 12px; text-align: right; color: var(--muted); }
.f-pts.up { color: var(--mint); } .f-pts.down { color: var(--gold); }
.sig-b.mint { color: var(--mint); } .sig-b.gold { color: var(--gold); } .sig-b.muted { color: var(--muted); }
.sb.is-missing .sb-track { background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 4px, transparent 4px 8px); }
.wk-m, .wk-k, .wk-when { text-align: right; font-size: 13px; }

/* ---------- Ask ---------- */
.ask-card .chat-log { height: calc(100vh - 200px); }
.ask-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 560px; }
.suggest .chip { font-size: 13px; padding: 7px 12px; font-weight: 550; }

/* ---------- sign in ---------- */
.signin-wrap { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.signin { width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 28px 26px; border-radius: 26px;
  background: var(--glass); border: 1px solid var(--glass-edge); box-shadow: inset 0 1px 0 var(--hi), var(--shadow); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.signin-logo { width: 56px; height: 56px; }
.signin h1 { font: 700 28px var(--display); margin: 0 0 8px; }
.signin-label { align-self: flex-start; font-size: 13px; color: var(--muted); font-weight: 600; }
.tok-input { padding: 12px 14px; font: 15px var(--mono); }
.signin-err { color: var(--gold); font-size: 13px; min-height: 18px; }
.signin-help { font-size: 12.5px; color: var(--faint); margin: 0; text-align: center; }

/* ---------- medium ---------- */
@media (max-width: 1180px) {
  .now-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); }
  .legend { display: none; }
  .qrow { grid-template-columns: 22px 26px minmax(0, 1fr) 90px 36px 76px; gap: 10px; }
}
@media (max-width: 980px) {
  :root { --rail: 72px; }
  .brand span, .nav-label, .nav-key, .nav-cap span, .nav-cap kbd, .live span { display: none; }
  .brand { justify-content: center; padding: 4px 0 18px; }
  .nav-item { justify-content: center; }
  .nav-clock { font-size: 17px; text-align: center; padding: 0; }
  .live { justify-content: center; padding: 0; }
  .nav-cap { justify-content: center; padding: 10px; }
  .now-grid { grid-template-columns: 1fr; }
  .now-side { position: static; }
  .tl-scroll { height: 560px; }
  .ritual-grid { grid-template-columns: 1fr; }
  .steps ol { flex-direction: row; flex-wrap: wrap; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; flex-direction: row; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-right: 0; border-top: 1px solid rgba(255,255,255,.07); background: rgba(14,12,26,.88); z-index: 30;
  }
  .brand, .nav-foot { display: none; }
  .nav-items { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .nav-item { flex: 1; flex-direction: column; gap: 3px; padding: 6px 0 4px; border-radius: 12px; min-width: 0; }
  .nav-item.active { background: none; box-shadow: none; color: var(--text); }
  .nav-item.active .nav-ic { background: rgba(199,184,255,.16); }
  .nav-ic { width: 44px; height: 28px; border-radius: 14px; }
  .nav-ic .ic { width: 20px; height: 20px; }
  .nav-label { display: block; font-size: 10.5px; font-weight: 600; }
  .badge { top: -3px; right: 2px; }
  .main { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .view { padding: calc(14px + env(safe-area-inset-top)) 16px 28px; }
  .view-title { font-size: 26px; }
  .view-head { margin-bottom: 14px; gap: 10px; }
  .card { padding: 16px; border-radius: 18px; }
  .fab {
    display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 29;
    width: 54px; height: 54px; border-radius: 18px; background: var(--lav); color: var(--ink); box-shadow: 0 12px 30px -8px rgba(199,184,255,.6);
  }
  .fab .ic { width: 24px; height: 24px; stroke-width: 2.2; }
  body[data-view='now'] .fab, body[data-view='ask'] .fab, body[data-view='ritual'] .fab { display: none; }

  .now-grid { gap: 14px; }
  .now-main, .now-side { gap: 14px; }
  .hero { padding: 18px; }
  .hero-clock { font-size: 44px; }
  .hero-date { font-size: 13.5px; padding-top: 4px; }
  .hero-title { font-size: 27px; }
  .next-title { font-size: 18px; }
  .next-in { font-size: 16px; }
  .task { padding: 9px; gap: 10px; }
  .task-t { font-size: 15px; }
  .start { padding: 6px 9px; }
  .tl-scroll { height: 520px; }

  .week-scroll { height: calc(100vh - 190px - env(safe-area-inset-bottom)); }
  .daygrid { --gut: 38px; }
  .now-tag { font-size: 9.5px; padding: 2px 3px; right: 2px; }
  .dg-allday { top: 41px; }
  .blk-t { font-size: 12px; }
  .blk.is-short .blk-time { display: none; }
  .blk-in { padding: 3px 5px; column-gap: 4px; }
  .zone-list li { font-size: 11.5px; }

  .qrow { grid-template-columns: 20px 26px minmax(0, 1fr) auto; grid-template-areas: 'g c m e' 'g c d d'; row-gap: 4px; padding: 10px 6px; }
  .qrow > .grip, .qrow > .qnum { grid-area: g; } .qrow > .check { grid-area: c; } .q-main { grid-area: m; } .q-est { grid-area: e; }
  .q-energy { display: none; }
  .q-due { grid-area: d; text-align: left; }
  .q-due:empty { display: none; }
  .filters { width: 100%; overflow-x: auto; }
  .filters .seg-btn { flex: 1; white-space: nowrap; }

  .cards { grid-template-columns: 1fr; }
  .sheet {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh; border-radius: 24px 24px 0 0;
    transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom);
  }
  .sheet-grab { display: block; width: 38px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.2); margin: 8px auto 0; }
  .sheet-body { padding: 14px 18px 26px; }
  .move-form { grid-template-columns: 1fr 1fr; }
  .move-form .btn { grid-column: 1 / -1; }
  .modal { top: 10vh; }
  #toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .health-grid { grid-template-columns: 1fr; gap: 14px; }
  .wk { grid-template-columns: 30px 1fr 56px 70px; }
  .wk-k { display: none; }
  .sleep-bars { gap: 6px; }
  .chat-log { height: calc(100vh - 290px - env(safe-area-inset-bottom)); padding: 14px; }
  .ask-card .chat-log { height: calc(100vh - 240px - env(safe-area-inset-bottom)); }
  .tabs-seg { width: 100%; }
  .tabs-seg .seg-btn { flex: 1; padding: 7px 6px; }
  .signals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* workouts: two lists side by side */
.wk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 980px) { .wk-cols { grid-template-columns: 1fr; gap: 12px; } }

/* ask: suggested actions (never auto-applied) */
.suggestions { align-self: flex-start; display: flex; flex-direction: column; gap: 6px; max-width: min(640px, 86%); margin-top: -2px; }
.sugg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; border: 1px dashed rgba(199,184,255,.3); background: rgba(199,184,255,.05); font-size: 13.5px; }
.sugg-t { flex: 1; min-width: 160px; }
.sugg.applied { opacity: .55; }

@media (max-width: 760px) {
  .view-ritual .view-head .vh-right { width: 100%; }
  .view-ritual .tabs-seg .seg-btn { white-space: nowrap; }
}

/* week header on a phone: switches and day nav share one row */
@media (max-width: 760px) {
  .view-week .view-head .vh-right { width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 8px; }
  .view-week .tgl { height: 32px; padding: 0 8px 0 7px; }
  .view-week .tgl .ic { display: none; }
  .view-week .seg .btn-sm { padding: 6px 8px; }
  .tl-toggles .tgl .ic { display: none; }
}
.suggest .chip-btn, .chat-opts .chip-btn { white-space: normal; max-width: 100%; text-align: center; height: auto; line-height: 1.3; }

/* decline with a reason */
.decline-panel{display:grid;gap:10px;margin-top:4px}
.decline-chips{display:flex;flex-wrap:wrap;gap:8px}
.decline-chip{font:500 14px var(--ui);color:var(--text);background:rgba(199,184,255,.14);border:1px solid rgba(199,184,255,.38);border-radius:999px;padding:6px 14px;line-height:1.3}
.decline-chip:hover{background:rgba(199,184,255,.24);border-color:rgba(199,184,255,.6)}
.decline-chip:focus-visible,.decline-in:focus-visible{outline:2px solid #9ed2ff;outline-offset:2px}
.decline-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.decline-in{flex:1 1 220px;min-width:0;font:15px var(--ui);color:var(--text);background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.22);border-radius:10px;padding:8px 12px}
.decline-in::placeholder{color:var(--muted)}
.decline-cancel{color:var(--muted);padding:6px 10px}
.decline-cancel:hover{color:var(--text)}

/* accept with changes */
.edit-panel{display:grid;gap:10px;margin-top:4px}
.edit-row{display:flex;flex-wrap:wrap;gap:10px}
.edit-l{display:grid;gap:4px;font:500 12px var(--ui);color:var(--muted);flex:1 1 130px;min-width:0}
.edit-l.grow{flex:1 1 100%}
.edit-in{font:15px var(--ui);color:var(--text);background:rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.22);border-radius:10px;padding:8px 10px;min-width:0;color-scheme:dark}
.edit-in:focus-visible{outline:2px solid #9ed2ff;outline-offset:1px}
