/* =====================================================================
   Fizz — "sorbet zine" design system
   Instrument Serif for display, DM Mono for everything you read and tap.
   Pastel colour blocks with ink outlines, pill buttons, a ticker and a
   checkered strip. Five themes (two dark) and a calm mode.
   ===================================================================== */
:root {
  --serif: "Instrument Serif", "Didot", Georgia, serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --r: 18px; --r-sm: 12px; --bw: 1.5px;
  --red: #E0484F; --amber: #E9A23B; --green: #4FAE66;
  --on: #2A2421;               /* text on pastel blocks, in every theme */
}
:root, [data-theme="sorbet"] {
  --bg: #FBF5E6; --surface: #FFFCF4; --surface-2: #F5EEDC; --ink: #2A2421; --ink-2: #4E443E; --muted: #7C716A; --line: #2A2421; --hair: #E3D9C4;
  --pink: #F4A6C8; --lime: #CBE47A; --sky: #B5D3EE; --butter: #F6E08A; --lilac: #D6C6F0; --peach: #F8BE9C; --mint: #BDE5C8;
  --accent: #2A2421; --accent-ink: #FBF5E6; --head: var(--lime); --hero: var(--pink); --tick: var(--lime);
}
[data-theme="pistachio"] {
  --bg: #F3F6EA; --surface: #FCFDF7; --surface-2: #E8EEDA; --ink: #22302A; --ink-2: #3F4E46; --muted: #6C7A71; --line: #22302A; --hair: #D5DEC6;
  --pink: #F2B6CF; --lime: #B9E3C6; --sky: #BCD8F0; --butter: #F6E58D; --lilac: #D7C8F2; --peach: #F7C6A6; --mint: #A8DDB8;
  --accent: #22302A; --accent-ink: #F3F6EA; --head: var(--lime); --hero: var(--lilac); --tick: var(--butter);
}
[data-theme="peach"] {
  --bg: #FDF3EA; --surface: #FFFAF5; --surface-2: #F7E8DB; --ink: #33231C; --ink-2: #57423A; --muted: #8A736A; --line: #33231C; --hair: #EDD9C8;
  --pink: #F6B3C2; --lime: #D3E58A; --sky: #A9CDEB; --butter: #F6E08A; --lilac: #D8C9EE; --peach: #F8B998; --mint: #BFE3CB;
  --accent: #33231C; --accent-ink: #FDF3EA; --head: var(--butter); --hero: var(--peach); --tick: var(--sky);
}
[data-theme="disco"] {
  --bg: #221827; --surface: #2C2032; --surface-2: #35283C; --ink: #F7ECF2; --ink-2: #DCCBD6; --muted: #A893A2; --line: #F2DDE9; --hair: #463751;
  --pink: #F59BC6; --lime: #C9EB6B; --sky: #9DCBF5; --butter: #F4DB72; --lilac: #CDB8F5; --peach: #F7B08E; --mint: #9FE0B6;
  --accent: #F59BC6; --accent-ink: #221827; --head: #2C2032; --hero: #3A2741; --tick: var(--lime);
  --red: #FF7A80; --amber: #F7C062; --green: #7FD892;
}
[data-theme="midnight"] {
  --bg: #131A26; --surface: #1A2333; --surface-2: #222D40; --ink: #EEF2F8; --ink-2: #C9D3E2; --muted: #8E9AB0; --line: #DCE5F2; --hair: #2E3A50;
  --pink: #F3A9CB; --lime: #C9EB6B; --sky: #9DCBF5; --butter: #F6DE7E; --lilac: #C9BBF2; --peach: #F5B996; --mint: #A3E0BC;
  --accent: #C9EB6B; --accent-ink: #131A26; --head: #1A2333; --hero: #1E2A3D; --tick: var(--butter);
  --red: #FF7A80; --amber: #F7C062; --green: #7FD892;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--ink); font: 400 14.5px/1.6 var(--mono); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; margin: 0; line-height: 1; }
h1 { font-size: clamp(3.2rem, 9vw, 6.2rem); letter-spacing: -.03em; }
h2 { font-size: clamp(2rem, 4vw, 2.7rem); }
h3 { font-size: 1.55rem; }
em, .it { font-style: italic; }
p { margin: 0 0 .8rem; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.ic { width: 18px; height: 18px; flex: none; }
.label { font: 500 .7rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.spark { width: 26px; height: 26px; fill: var(--lime); stroke: var(--line); stroke-width: 1.4; flex: none; }
.spark.pink { fill: var(--pink); } .spark.sky { fill: var(--sky); } .spark.butter { fill: var(--butter); }
.bg-pink { background: var(--pink); color: var(--on); } .bg-lime { background: var(--lime); color: var(--on); } .bg-sky { background: var(--sky); color: var(--on); }
.bg-butter { background: var(--butter); color: var(--on); } .bg-lilac { background: var(--lilac); color: var(--on); } .bg-peach { background: var(--peach); color: var(--on); }
.bg-mint { background: var(--mint); color: var(--on); } .bg-ink { background: var(--ink); color: var(--bg); }
.sw-pink { --c: var(--pink); } .sw-lime { --c: var(--lime); } .sw-sky { --c: var(--sky); } .sw-butter { --c: var(--butter); } .sw-lilac { --c: var(--lilac); } .sw-peach { --c: var(--peach); } .sw-mint { --c: var(--mint); } .sw-ink { --c: var(--ink); }

/* ---------- Controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: .4rem 1.15rem; border: var(--bw) solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: 500 .76rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .12s, background .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn .ic { width: 16px; height: 16px; }
.btn.pink { background: var(--pink); color: var(--on); } .btn.lime { background: var(--lime); color: var(--on); } .btn.sky { background: var(--sky); color: var(--on); } .btn.butter { background: var(--butter); color: var(--on); }
.btn.pink:hover, .btn.lime:hover, .btn.sky:hover, .btn.butter:hover { filter: brightness(.96); }
.btn.solid { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.solid:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--red); border-color: currentColor; background: transparent; }
.btn.sm { min-height: 32px; padding: .3rem .85rem; font-size: .68rem; }
.btn[disabled] { opacity: .45; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: var(--bw) solid transparent; border-radius: 999px; background: none; cursor: pointer; color: var(--ink); }
.icon-btn:hover { border-color: var(--line); background: var(--surface); }
.icon-btn.outlined { border-color: var(--line); background: var(--surface); }
.link { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: .8rem; }
.link:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.field { display: grid; gap: .35rem; }
.field > span { font: 500 .68rem/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.input { width: 100%; min-height: 44px; padding: .55rem .85rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
select.input { appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%); background-position: right 17px top 52%, right 12px top 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.55; }
.input:focus { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 70%, transparent); }
.input::placeholder { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border: var(--bw) solid var(--line); border-radius: 999px; font: 500 .68rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--surface); color: var(--ink); cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked), .chip[aria-pressed="true"], .chip.on { background: var(--lime); color: var(--on); }
.chip:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.chip .ic { width: 14px; height: 14px; }
.seg { display: inline-flex; border: var(--bw) solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { all: unset; cursor: pointer; padding: .45rem .9rem; font: 500 .68rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.seg button + button { border-left: var(--bw) solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--pink); color: var(--on); }
.seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: -4px; }
.error-text { color: var(--red); font-size: .82rem; }
.light { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.light.red { background: var(--red); } .light.yellow { background: var(--amber); } .light.green { background: var(--green); }
.light-label { display: inline-flex; align-items: center; gap: .4rem; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Shell ---------- */
.demo-band { background: var(--ink); color: var(--bg); font-size: .72rem; text-align: center; padding: .4rem 1rem; letter-spacing: .05em; }
.demo-band a { color: inherit; }
.top { position: sticky; top: 0; z-index: 40; background: var(--head); border-bottom: var(--bw) solid var(--line); color: var(--ink); }
[data-theme="sorbet"] .top, [data-theme="pistachio"] .top, [data-theme="peach"] .top { color: var(--on); }
.top-in { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 1rem; padding: .6rem 1.4rem; }
.mono-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: var(--bw) solid var(--line); background: var(--pink); color: var(--on); font: italic 400 1.45rem/1 var(--serif); text-decoration: none; flex: none; }
.nav { display: flex; gap: .15rem; flex-wrap: wrap; margin-left: auto; }
.nav a { padding: .45rem .7rem; border-radius: 999px; font: 500 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; border: var(--bw) solid transparent; }
.nav a:hover { border-color: var(--line); }
.nav a[aria-current="page"] { background: var(--surface); border-color: var(--line); color: var(--ink); }
.top .icon-btn { color: inherit; }
.top-tools { display: flex; gap: .3rem; align-items: center; }
.tabbar { display: none; }
main { max-width: 1240px; margin: 0 auto; padding: 0 1.4rem 6rem; }
@media (max-width: 1080px) {
  .nav { display: none; }
  .top-tools { margin-left: auto; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 40; background: var(--surface); border-top: var(--bw) solid var(--line); padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { all: unset; display: grid; justify-items: center; gap: 2px; padding: .35rem 0; font: 500 .6rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; color: var(--muted); border-radius: 14px; }
  .tabbar .ic { width: 22px; height: 22px; }
  .tabbar [aria-current="page"] { color: var(--on); background: var(--pink); }
  main { padding: 0 1rem calc(88px + env(safe-area-inset-bottom)); }
}
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.more-grid a { display: grid; justify-items: center; gap: .4rem; padding: 1rem .4rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); text-decoration: none; font: 500 .66rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.more-grid a .ic { width: 24px; height: 24px; }

/* Ticker and checkered strip */
.ticker { overflow: hidden; border-bottom: var(--bw) solid var(--line); background: var(--tick); color: var(--on); margin-inline: calc(50% - 50vw); }
.ticker-in { display: flex; width: max-content; animation: tick 40s linear infinite; }
.ticker span { white-space: nowrap; padding: .55rem 1.2rem; font: 500 .72rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.ticker span::after { content: "•"; margin-left: 2.4rem; }
@keyframes tick { to { transform: translateX(-50%); } }
.checker { height: 14px; margin-inline: calc(50% - 50vw); border-top: var(--bw) solid var(--line); border-bottom: var(--bw) solid var(--line);
  background: repeating-linear-gradient(90deg, var(--pink) 0 14px, var(--lime) 14px 28px); }
@media (max-width: 1080px) { .ticker, .checker { margin: 0 -1rem; } }

/* Page heads */
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: end; padding: 2.4rem 0 1.8rem; }
.page-head h1 { font-size: clamp(3rem, 8vw, 5.4rem); }
.page-head h1 em { font-style: italic; }
.page-head .kicker { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .8rem; padding: .3rem .8rem; border: var(--bw) solid var(--line); border-radius: 999px; background: var(--sky); color: var(--on); font: 500 .66rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; transform: rotate(-2deg); }
.page-head .lede { max-width: 52ch; margin: .9rem 0 0; color: var(--ink-2); }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
@media (max-width: 700px) { .page-head { grid-template-columns: minmax(0, 1fr); padding: 1.6rem 0 1.2rem; } }

/* Cards */
.card { position: relative; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--surface); padding: 1.2rem 1.3rem; min-width: 0; }
.card.bg-pink { background: var(--pink); color: var(--on); } .card.bg-lime { background: var(--lime); color: var(--on); } .card.bg-sky { background: var(--sky); color: var(--on); } .card.bg-butter { background: var(--butter); color: var(--on); } .card.bg-lilac { background: var(--lilac); color: var(--on); } .card.bg-peach { background: var(--peach); color: var(--on); } .card.bg-mint { background: var(--mint); color: var(--on); } .card.bg-ink { background: var(--ink); color: var(--bg); }
.card > h2, .card-head h2 { font-size: 2rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head .label { display: block; }
.card .spark.corner { position: absolute; right: -11px; top: -13px; }
.grid { display: grid; gap: 1.1rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 960px) { .g2, .g3, .g-main { grid-template-columns: minmax(0, 1fr); } }
.section { margin-top: 2.2rem; }
.empty { padding: 1.6rem 1rem; text-align: center; border: var(--bw) dashed var(--line); border-radius: var(--r); }
.empty h3 { margin-bottom: .4rem; }
.empty p { color: var(--muted); margin: 0 auto .9rem; max-width: 40ch; font-size: .85rem; }

/* ---------- Today ---------- */
.hello { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem; align-items: end; padding: 2.2rem 0 1.4rem; }
.hello h1 { font-size: clamp(3.4rem, 10vw, 7rem); }
.hello h1 em { display: block; }
.hello .date { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.hello .tag { display: inline-block; padding: .3rem .8rem; border: var(--bw) solid var(--line); border-radius: 999px; background: var(--sky); color: var(--on); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; transform: rotate(-4deg); margin-bottom: .6rem; }
@media (max-width: 700px) { .hello { grid-template-columns: minmax(0, 1fr); } }
.daybar { padding: 1.1rem 1.3rem 1.2rem; background: var(--hero); }
[data-theme="sorbet"] .daybar, [data-theme="pistachio"] .daybar, [data-theme="peach"] .daybar { color: var(--on); }
.daybar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.daybar-big { font: 400 clamp(2.4rem, 6vw, 3.6rem)/1 var(--serif); }
.daybar-big small { font: 400 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; margin-left: .4rem; }
.track { position: relative; height: 34px; margin-top: .9rem; border: var(--bw) solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.track .gone { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--ink) 16%, transparent) 0 6px, transparent 6px 12px); border-right: var(--bw) solid var(--line); }
.track .hours { position: absolute; inset: 0; display: flex; }
.track .hours i { flex: 1; border-left: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); }
.track .hours i:first-child { border-left: 0; }
.track .now { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--ink); transform: translateX(-1px); }
.track-legend { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .68rem; letter-spacing: .06em; }
.top3 { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; counter-reset: t; }
.spend { display: grid; gap: .4rem; }
.spend-big { font: 400 clamp(2.8rem, 7vw, 4.2rem)/1 var(--serif); }
.spend-big.neg { color: var(--red); }
.maths { margin-top: .6rem; padding: .8rem 1rem; border: var(--bw) dashed var(--line); border-radius: var(--r-sm); font-size: .8rem; }
.maths div { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem 0; }
.maths div.total { border-top: var(--bw) solid var(--line); margin-top: .3rem; padding-top: .45rem; font-weight: 500; }
.energy { display: flex; gap: .4rem; flex-wrap: wrap; }
.energy button { all: unset; cursor: pointer; display: grid; justify-items: center; gap: .3rem; padding: .55rem .5rem .45rem; min-width: 58px; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; }
.energy button .ic { width: 22px; height: 22px; }
.energy button[aria-pressed="true"] { background: var(--butter); color: var(--on); }
.energy button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rings { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.ring { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.ring svg { width: 58px; height: 58px; }
.ring .bgc { fill: none; stroke: var(--surface-2); stroke-width: 8; }
.ring .fgc { fill: none; stroke: var(--pink); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset .5s; }
.ring.evening .fgc { stroke: var(--sky); }
.ring svg circle.edge { fill: none; stroke: var(--line); stroke-width: 1.5; }
.ring b { display: block; font: 400 1.5rem/1 var(--serif); }
.ring small { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.triage { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.triage a { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .55rem .7rem; border: var(--bw) solid var(--hair); border-radius: var(--r-sm); text-decoration: none; }
.triage a:hover { border-color: var(--line); }
.triage a > span { min-width: 0; } .triage b { display: block; font-weight: 500; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.triage small { color: var(--muted); font-size: .72rem; display: block; }
.triage .kind { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.legend span { display: inline-flex; gap: .35rem; align-items: center; }
.treat { display: flex; gap: .8rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.treat b { font: 400 1.4rem/1.15 var(--serif); }

/* ---------- Tasks ---------- */
.task { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: .75rem; align-items: start; padding: .75rem .85rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.task + .task { margin-top: .5rem; }
.task.done .t-title { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.tick { all: unset; cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border: var(--bw) solid var(--line); border-radius: 50%; background: var(--surface); color: var(--on); }
.tick .ic { width: 16px; height: 16px; opacity: 0; transform: scale(.4); transition: transform .35s cubic-bezier(.3, 1.8, .5, 1), opacity .15s; }
.tick:hover .ic { opacity: .35; transform: scale(1); }
.tick[aria-pressed="true"] { background: var(--lime); }
.tick[aria-pressed="true"] .ic { opacity: 1; transform: scale(1); }
.tick:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tick.bounce { animation: bounce .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bounce { 0% { transform: scale(1); } 40% { transform: scale(1.28); } 100% { transform: scale(1); } }
.t-body { min-width: 0; display: grid; gap: .3rem; }
.t-title { all: unset; cursor: pointer; font-weight: 500; font-size: .92rem; line-height: 1.35; overflow-wrap: anywhere; }
.t-title:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.t-meta { display: flex; flex-wrap: wrap; gap: .35rem .7rem; align-items: center; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.t-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.t-meta .ic { width: 13px; height: 13px; }
.t-next { font-size: .8rem; color: var(--ink-2); }
.t-next b { font-weight: 500; }
.t-steps { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .25rem; }
.t-steps label { display: flex; gap: .5rem; align-items: flex-start; font-size: .82rem; cursor: pointer; }
.t-steps input { margin-top: .2rem; width: 16px; height: 16px; accent-color: var(--ink); }
.t-steps .done span { text-decoration: line-through; color: var(--muted); }
.t-acts { display: flex; gap: .2rem; align-items: center; }
.t-acts .icon-btn { width: 32px; height: 32px; }
.t-acts .ic { width: 16px; height: 16px; }
.en-pill { padding: .1rem .5rem; border: 1px solid var(--line); border-radius: 999px; font-size: .62rem; }
.en-low { background: var(--mint); color: var(--on); } .en-medium { background: var(--butter); color: var(--on); } .en-high { background: var(--pink); color: var(--on); }

/* Week strip and month pull-down */
.strip-wrap { position: sticky; top: 61px; z-index: 30; background: var(--bg); padding: .8rem 0 .6rem; margin-bottom: .8rem; border-bottom: var(--bw) solid var(--line); }
@media (max-width: 1080px) { .strip-wrap { top: 61px; } }
.strip-tools { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .6rem; flex-wrap: wrap; }
.strip { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(64px, 1fr)); gap: .45rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.strip::-webkit-scrollbar { display: none; }
.sday { all: unset; box-sizing: border-box; cursor: pointer; scroll-snap-align: start; display: grid; justify-items: center; gap: .2rem; padding: .55rem .3rem .5rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.sday .d { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.sday .n { font: 400 1.8rem/1 var(--serif); }
.sday .c { font-size: .62rem; color: var(--muted); min-height: .9em; }
.sday.today { background: var(--ink); color: var(--bg); }
.sday.today .c { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.sday.sel:not(.today) { background: var(--pink); color: var(--on); }
.sday.sel.today { box-shadow: 0 0 0 3px var(--pink); }
.sday:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }
.ultra .strip { --n: 2; }
.pull { all: unset; cursor: pointer; display: flex; justify-content: center; width: 100%; padding: .2rem 0 0; color: var(--muted); }
.pull .ic { width: 20px; height: 20px; transition: transform .25s; }
.pull[aria-expanded="true"] .ic { transform: rotate(180deg); }
.pull:focus-visible { outline: 2px solid var(--ink); }
.month { margin-top: .6rem; padding: .9rem; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--surface); animation: drop .22s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
.month-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.month-head b { font: 400 1.6rem/1 var(--serif); }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mgrid .dow { text-align: center; font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-bottom: .2rem; }
.mday { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 3px; padding: .35rem 0 .3rem; border-radius: 10px; border: 1px solid transparent; }
.mday:hover { border-color: var(--line); }
.mday .n { font-size: .82rem; }
.mday.out { opacity: .35; }
.mday.today .n { background: var(--ink); color: var(--bg); border-radius: 999px; padding: 0 .4rem; }
.mday.sel { background: var(--pink); color: var(--on); }
.mday:focus-visible { outline: 2px solid var(--ink); }
.dots { display: flex; gap: 2px; min-height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); }
.dots.red i { background: var(--red); }

.plan-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 960px) { .plan-grid { grid-template-columns: minmax(0, 1fr); } }
.dump { display: flex; gap: .5rem; }
.dump .input { flex: 1; }
.inbox-list { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .4rem; }
.inbox-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .5rem .5rem .5rem .8rem; border: var(--bw) dashed var(--line); border-radius: var(--r-sm); font-size: .86rem; }
.inbox-list .t-acts .btn { min-height: 30px; }
.picker { display: grid; gap: .8rem; }
.picker-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.picker-row .label { min-width: 6.5rem; }
.pick-result { display: grid; gap: .5rem; }
.pick-hero { padding: 1rem 1.1rem; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--lime); color: var(--on); }
.pick-hero b { display: block; font: 400 1.7rem/1.1 var(--serif); margin: .3rem 0 .4rem; }
.daylist-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1.2rem 0 .6rem; }
.daylist-head h2 { font-size: 2.2rem; }
.done-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.done-list li { display: flex; gap: .6rem; align-items: center; font-size: .84rem; }
.done-list .ic { width: 16px; height: 16px; color: var(--green); }
.fresh { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 1rem 1.2rem; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--mint); color: var(--on); }
.fresh b { font: 400 1.5rem/1.1 var(--serif); display: block; }

/* ---------- Focus ---------- */
.focus-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 960px) { .focus-grid { grid-template-columns: minmax(0, 1fr); } }
.disc-wrap { display: grid; justify-items: center; gap: 1rem; padding: 1.4rem 1rem 1.6rem; }
.disc { width: min(380px, 78vw); aspect-ratio: 1; }
.disc .face { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.5; }
.disc .wedge { fill: var(--pink); stroke: var(--line); stroke-width: 1.5; stroke-linejoin: round; }
.disc .tickmark { stroke: var(--line); stroke-width: 1.5; }
.disc .hub { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.disc-time { font: 400 clamp(3.2rem, 9vw, 4.8rem)/1 var(--serif); font-variant-numeric: tabular-nums; }
.presets { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }
.f-task { display: flex; gap: .5rem; align-items: center; font-size: .86rem; }
.sounds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.sound { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: .3rem; width: 100%; padding: .85rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); min-height: 92px; }
.sound .ic { width: 22px; height: 22px; }
.sound b { font: 400 1.25rem/1.1 var(--serif); }
.sound small { font-size: .68rem; color: var(--muted); }
.sound[aria-pressed="true"] { background: var(--sky); color: var(--on); }
.sound[aria-pressed="true"] small { color: var(--on); opacity: .75; }
.sound:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.vol { display: flex; gap: .6rem; align-items: center; margin-top: .8rem; font-size: .72rem; }
.vol input { flex: 1; accent-color: var(--ink); }
.reward { padding: 1rem 1.2rem; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--butter); color: var(--on); }
.reward b { display: block; font: 400 1.6rem/1.15 var(--serif); margin: .2rem 0 .6rem; }

/* ---------- Routines ---------- */
.routine-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.routine-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: .7rem; align-items: center; padding: .55rem .7rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.routine-list li.done span.rt { text-decoration: line-through; color: var(--muted); }
.week7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; margin-top: 1rem; }
.w7 { display: grid; justify-items: center; gap: .25rem; font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.w7 .cup { width: 100%; max-width: 38px; height: 46px; border: var(--bw) solid var(--line); border-radius: 8px 8px 12px 12px; background: var(--surface); position: relative; overflow: hidden; }
.w7 .cup i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c, var(--pink)); }
.w7.skip .cup { border-style: dashed; opacity: .5; }
.w7.today { color: var(--ink); font-weight: 500; }
.kind-words { margin: .8rem 0 0; font: italic 400 1.25rem/1.3 var(--serif); }

/* ---------- Money ---------- */
.quick-spend { display: grid; gap: .9rem; }
.amount-in { display: flex; align-items: center; gap: .5rem; border: var(--bw) solid var(--line); border-radius: var(--r); padding: .4rem 1rem; background: var(--surface); }
.amount-in span { font: 400 2rem/1 var(--serif); color: var(--muted); }
.amount-in input { all: unset; width: 100%; font: 400 clamp(2.4rem, 7vw, 3.4rem)/1.1 var(--serif); }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .45rem; }
.cat-tile { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: .15rem; padding: .7rem .75rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--c); color: var(--on); min-height: 64px; }
.cat-tile b { font-weight: 500; font-size: .84rem; }
.cat-tile small { font-size: .66rem; opacity: .8; }
.cat-tile:hover { filter: brightness(.96); }
.cat-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.cat-tile.none { background: var(--surface); color: var(--ink); }
.battery { display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 0; }
.battery .cell { height: 64px; border: var(--bw) solid var(--line); border-radius: 14px; padding: 5px; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; background: var(--surface); }
.battery .cell i { border-radius: 6px; background: var(--surface-2); }
.battery .cell i.on { background: var(--lime); border: 1px solid var(--line); }
.battery.low .cell i.on { background: var(--butter); } .battery.empty .cell i.on { background: var(--red); }
.battery .nub { width: 10px; height: 24px; border: var(--bw) solid var(--line); border-left: 0; border-radius: 0 6px 6px 0; background: var(--surface); }
.budgets { display: grid; gap: .9rem; }
.budget { display: grid; gap: .45rem; }
.budget-top { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; font-size: .84rem; }
.budget-top b { font-weight: 500; display: inline-flex; gap: .5rem; align-items: center; }
.blocks { display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 3px; }
.blocks i { height: 18px; border-radius: 4px; border: 1px solid var(--line); background: var(--c, var(--lime)); }
.blocks i.used { background: transparent; border-style: dashed; opacity: .45; }
.blocks i.over { background: var(--red); border-style: solid; opacity: 1; }
.bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; align-items: end; height: clamp(150px, 22vw, 240px); padding-top: 10px; border-bottom: var(--bw) solid var(--line); }
.bars .b { position: relative; background: var(--pink); border: 1px solid var(--line); border-bottom: 0; border-radius: 4px 4px 0 0; min-height: 0; }
.bars .b.today { background: var(--lime); }
.bars .b.future { background: transparent; border: 0; }
.bars .b:hover::after, .bars .b:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: .68rem; padding: .25rem .45rem; border-radius: 6px; white-space: nowrap; z-index: 2; }
.bars-labels { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; font-size: .58rem; color: var(--muted); text-align: center; margin-top: .3rem; }
.ex-list { list-style: none; margin: 0; padding: 0; }
.ex-list li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: .7rem; align-items: center; padding: .5rem 0; border-bottom: 1px dashed var(--hair); font-size: .84rem; }
.ex-list .sw { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); background: var(--c, var(--surface)); }
.ex-list small { display: block; color: var(--muted); font-size: .7rem; }
.tax-big { font: 400 clamp(2.6rem, 6vw, 3.6rem)/1 var(--serif); }
.tax-kinds { display: grid; gap: .35rem; margin-top: .8rem; }
.tax-kinds div { display: flex; justify-content: space-between; font-size: .8rem; padding: .3rem 0; border-bottom: 1px dashed var(--hair); }

/* ---------- Bills ---------- */
.bill-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.bill { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; gap: .8rem; align-items: center; padding: .75rem .9rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.bill b { font-weight: 500; }
.bill small { display: block; color: var(--muted); font-size: .72rem; }
.bill .amt { font: 400 1.4rem/1 var(--serif); }
.bill .acts { display: flex; gap: .3rem; }
@media (max-width: 600px) { .bill { grid-template-columns: 12px minmax(0, 1fr) auto; } .bill .acts { grid-column: 2 / -1; } }
.nudge { display: grid; gap: .3rem; padding: .9rem 1rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--butter); color: var(--on); }
.nudge + .nudge { margin-top: .5rem; }
.nudge b { font: 400 1.3rem/1.15 var(--serif); }
.nudge .head-actions { margin-top: .3rem; }

/* ---------- Goals ---------- */
.jars { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.jar { display: grid; justify-items: center; gap: .5rem; text-align: center; }
.jar svg { width: 120px; height: 150px; }
.jar .glass { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.jar .lid { fill: var(--c, var(--sky)); stroke: var(--line); stroke-width: 2; }
.jar .fill { fill: var(--c, var(--sky)); }
.jar b { font: 400 1.35rem/1.1 var(--serif); }
.jar small { font-size: .72rem; color: var(--muted); }
.wish { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 1rem; align-items: center; padding: .8rem .9rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.wish + .wish { margin-top: .5rem; }
.wish b { font-weight: 500; }
.wish small { display: block; font-size: .72rem; color: var(--muted); }
.wish .price { font: 400 1.4rem/1 var(--serif); }
.wish .bar { grid-column: 1 / -1; height: 8px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.wish .bar i { display: block; height: 100%; background: var(--lilac); }
.wish .acts { grid-column: 1 / -1; display: flex; gap: .4rem; flex-wrap: wrap; }
.kept { display: grid; gap: .3rem; padding: 1.2rem; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--lilac); color: var(--on); }
.kept b { font: 400 clamp(2.6rem, 6vw, 3.8rem)/1 var(--serif); }

/* ---------- Dopamine menu ---------- */
.menu-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.course h3 { font-size: 2rem; }
.course h3 em { font-style: italic; }
.course p.small { margin: .2rem 0 .7rem; color: var(--muted); }
.dish { display: flex; justify-content: space-between; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px dashed var(--hair); font-size: .86rem; }
.dish .acts { display: flex; gap: .1rem; }

/* ---------- Settings ---------- */
.settings { display: grid; gap: 1rem; max-width: 900px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.theme-opt { all: unset; box-sizing: border-box; cursor: pointer; display: grid; gap: .5rem; padding: .6rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.theme-opt[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--pink); }
.theme-opt:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.theme-sw { display: flex; height: 40px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.theme-sw i { flex: 1; }
.theme-opt b { font: 400 1.2rem/1 var(--serif); }
.theme-opt small { font-size: .66rem; color: var(--muted); }
.switch { display: flex; gap: .7rem; align-items: center; cursor: pointer; font-size: .86rem; }
.switch input { appearance: none; width: 44px; height: 26px; border: var(--bw) solid var(--line); border-radius: 999px; background: var(--surface-2); position: relative; cursor: pointer; flex: none; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); transition: left .18s; }
.switch input:checked { background: var(--lime); }
.switch input:checked::after { left: 21px; }
.switch input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Modal, toast, confetti ---------- */
dialog#modal { border: var(--bw) solid var(--line); padding: 0; border-radius: 22px; background: var(--surface); color: var(--ink); width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); }
dialog#modal.narrow { width: min(460px, calc(100vw - 24px)); }
dialog#modal[open] { animation: popin .2s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes popin { from { opacity: 0; transform: translateY(8px) scale(.98); } }
dialog#modal::backdrop { background: color-mix(in srgb, var(--ink) 40%, transparent); }
.modal-inner { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 40px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem .6rem; }
.modal-head h2 { font-size: 2.1rem; }
.modal-body { overflow-y: auto; padding: .4rem 1.3rem 1.3rem; }
.modal-foot { display: flex; gap: .5rem; justify-content: space-between; align-items: center; padding: .9rem 1.3rem; border-top: var(--bw) solid var(--line); flex-wrap: wrap; }
.modal-foot .right { display: flex; gap: .5rem; margin-left: auto; }
@media (max-width: 600px) { dialog#modal, dialog#modal.narrow { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 92dvh; } .modal-inner { max-height: 92dvh; } .modal-foot { padding-bottom: calc(.9rem + env(safe-area-inset-bottom)); } }
#toasts { position: fixed; z-index: 100; left: 50%; bottom: calc(1.4rem + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: .5rem; width: max-content; max-width: calc(100vw - 2rem); }
@media (max-width: 1080px) { #toasts { bottom: calc(5.6rem + env(safe-area-inset-bottom)); } }
.toast { background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 999px; font-size: .8rem; display: flex; gap: 1rem; align-items: center; animation: popin .2s ease; }
.toast.err { background: var(--red); color: #fff; }
.toast button { all: unset; cursor: pointer; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.pop { position: fixed; z-index: 120; width: 0; height: 0; pointer-events: none; }
.pop i { position: absolute; width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--line); animation: burst .8s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes burst { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--x), calc(var(--y) + 26px)) rotate(var(--r)); opacity: 0; } }

/* ---------- Dock (focus timer and sound on every page) ---------- */
#dock { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; gap: .5rem; align-items: center; padding: .45rem .5rem .45rem .9rem; border: var(--bw) solid var(--line); border-radius: 999px; background: var(--surface); font-size: .78rem; }
#dock a { text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
#dock .ic { width: 16px; height: 16px; }
#dock b { font: 400 1.2rem/1 var(--serif); font-variant-numeric: tabular-nums; }
@media (max-width: 1080px) { #dock { right: 10px; bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-art { background: var(--pink); color: var(--on); border-right: var(--bw) solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 2.4rem; overflow: hidden; position: relative; }
.auth-art h1 { font-size: clamp(4rem, 9vw, 8rem); }
.auth-art p { max-width: 30ch; }
.auth-form { display: grid; place-items: center; padding: 2rem 1.2rem; }
.auth-card { width: min(380px, 100%); display: grid; gap: 1rem; }
.auth-card h2 { font-size: 2.6rem; }
.key-input { letter-spacing: .2em; text-transform: uppercase; text-align: center; font-size: 1.05rem; }
@media (max-width: 860px) { .auth { grid-template-columns: minmax(0, 1fr); } .auth-art { display: none; } }
.boot { min-height: 100vh; display: grid; place-items: center; font: italic 400 2.4rem var(--serif); }

/* ---------- Tutorial ---------- */
.tour-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .8rem; }
.tour-card { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: center; padding: 1rem 1.1rem; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--surface); }
.tour-card:hover { background: var(--surface-2); }
.tour-card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tour-card.first { grid-column: 1 / -1; background: var(--lime); color: var(--on); }
.tour-card strong { display: block; font: 400 1.6rem/1.1 var(--serif); }
.tour-card small { font-size: .74rem; }
.tour-card > .ic { width: 36px; height: 36px; padding: 9px; border: var(--bw) solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); }
#tour { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.tour-spot { position: fixed; border-radius: var(--r-sm); box-shadow: 0 0 0 9999px color-mix(in srgb, var(--ink) 55%, transparent); outline: 3px solid var(--pink); transition: top .25s, left .25s, width .25s, height .25s; }
.tour-spot.none { top: 50% !important; left: 50% !important; width: 0 !important; height: 0 !important; outline: 0; }
#tour .tour-box { position: fixed; pointer-events: auto; display: grid; gap: .55rem; padding: 1rem 1.1rem; background: var(--surface); color: var(--ink); border: var(--bw) solid var(--line); border-radius: var(--r); transition: top .25s, left .25s; }
#tour .tour-box.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); }
#tour .tour-box h3 { font-size: 1.8rem; }
#tour .tour-box p { margin: 0; font-size: .86rem; color: var(--ink-2); }
.tour-top { display: flex; justify-content: space-between; align-items: center; }
.tour-dots { display: flex; gap: 4px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--line); }
.tour-dots i.on { background: var(--pink); width: 18px; border-radius: 4px; } .tour-dots i.done { background: var(--ink-2); }
.tour-foot { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.tour-foot > span { display: flex; gap: .4rem; }
.tour-offer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; background: var(--sky); color: var(--on); }
.tour-offer b { font: 400 1.6rem/1.1 var(--serif); }

/* ---------- Calm mode: no motion, softer colour ---------- */
html.calm *, html.calm *::before, html.calm *::after { animation: none !important; transition: none !important; }
html.calm .ticker-in { transform: none; }
html.calm { --pink: color-mix(in srgb, #F4A6C8 55%, var(--bg)); --lime: color-mix(in srgb, #CBE47A 55%, var(--bg)); --sky: color-mix(in srgb, #B5D3EE 60%, var(--bg)); --butter: color-mix(in srgb, #F6E08A 55%, var(--bg)); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 520px) { .triage .kind { display: none; } .triage a { grid-template-columns: 12px minmax(0, 1fr); } }

/* =====================================================================
   Version 2: day plan, countdowns, habits, meals, weekly reset
   ===================================================================== */
.spark.peach { fill: var(--peach); } .spark.lilac { fill: var(--lilac); }
.nav-more { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .7rem; border-radius: 999px; font: 500 .7rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; border: var(--bw) solid transparent; }
.nav-more:hover { border-color: var(--line); }
.nav-more[aria-current="page"] { background: var(--surface); border-color: var(--line); }
.nav-more .ic { width: 13px; height: 13px; }
.nav-more:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.more-label { display: block; margin: 1rem 0 .5rem; } .more-label:first-child { margin-top: 0; }
.more-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .more-grid a { padding: .65rem .4rem; grid-template-columns: auto auto; justify-content: center; align-items: center; } .more-grid a .ic { width: 20px; height: 20px; } }
.more-grid a[aria-current="page"] { background: var(--pink); color: var(--on); }

.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.tabs a { padding: .45rem .9rem; border: var(--bw) solid var(--line); border-radius: 999px; text-decoration: none; font: 500 .68rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; background: var(--surface); display: inline-flex; gap: .4rem; align-items: center; }
.tabs a[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.tabs .count { background: var(--pink); color: var(--on); border-radius: 999px; padding: 0 .4rem; }
.lede { color: var(--ink-2); }
.day-nav { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0 0 1rem; }
.day-nav b { font: 400 1.6rem/1 var(--serif); }
.icon-btn[disabled] { opacity: .35; pointer-events: none; }

/* Day plan */
.day-sum { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1rem; color: var(--ink-2); }
.day-sum b { color: var(--ink); }
.timeline { position: relative; margin-left: 4.2rem; border-left: var(--bw) solid var(--line); }
.tl-hour { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--hair); }
.tl-hour span { position: absolute; left: -4.2rem; top: -.55rem; width: 3.7rem; text-align: right; font-size: .66rem; color: var(--muted); }
.blk { all: unset; box-sizing: border-box; position: absolute; left: .5rem; right: .3rem; padding: .35rem .7rem; border: var(--bw) solid var(--line); border-radius: 10px; background: var(--c); color: var(--on); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 1px; box-shadow: 2px 2px 0 var(--line); }
.blk b { font: 500 .8rem/1.25 var(--mono); display: flex; gap: .3rem; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk small { font-size: .66rem; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.short { flex-direction: row; align-items: center; gap: .6rem; padding-block: 0; }
.blk.k-break { background: repeating-linear-gradient(135deg, var(--c) 0 8px, color-mix(in srgb, var(--c) 55%, #fff) 8px 16px); }
.blk.past { opacity: .55; } .blk.done b { text-decoration: line-through; }
.blk.clash { outline: 2px dashed var(--red); outline-offset: 1px; }
.blk:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.blk .ic { width: 14px; height: 14px; }
.tl-now { position: absolute; left: -6px; right: 0; height: 0; border-top: 2px solid var(--red); z-index: 2; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; left: -1px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.tl-now span { position: absolute; right: 0; top: -1.15rem; font-size: .62rem; background: #B3262D; color: #fff; padding: 0 .4rem; border-radius: 6px; letter-spacing: .06em; text-transform: uppercase; }

.nownext { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; margin-top: 1rem; }
.nn-cell { display: grid; gap: .15rem; padding: .8rem 1rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface); text-decoration: none; }
.nn-cell:first-child { background: var(--sky); color: var(--on); } .nn-cell:first-child .label { color: inherit; }
.nn-cell b { font: 400 1.45rem/1.1 var(--serif); overflow-wrap: anywhere; }
.nn-cell small { font-size: .72rem; color: inherit; opacity: .85; }
.reset-nudge { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .8rem; align-items: center; margin: 0 0 1rem; padding: .8rem 1rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--lilac); color: var(--on); text-decoration: none; font-size: .84rem; }
.reset-nudge b { font: 400 1.25rem/1.1 var(--serif); }

/* Countdowns */
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.cd { position: relative; display: flex; flex-direction: column; padding: 1rem 1.1rem 1.1rem; border: var(--bw) solid var(--line); border-radius: var(--r); background: var(--c); color: var(--on); box-shadow: 3px 3px 0 var(--line); }
.cd header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .4rem; min-height: 26px; }
.cd-kind { display: inline-flex; gap: .35rem; align-items: center; font: 500 .64rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.cd-kind .ic, .cd-pin .ic { width: 15px; height: 15px; }
.cd-num { font: 400 4.2rem/.9 var(--serif); letter-spacing: -.03em; }
.cd-unit { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6rem; }
.cd h3 { font-size: 1.4rem; margin-bottom: .3rem; overflow-wrap: anywhere; }
.cd p { margin: 0; }
.cd-bar { height: 8px; margin-top: .7rem; border: 1px solid var(--on); border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.45); }
.cd-bar i { display: block; height: 100%; background: var(--on); }
.cd-prep { display: flex; gap: .35rem; align-items: center; margin-top: .55rem !important; font-weight: 500; }
.cd-prep .ic { width: 14px; height: 14px; }
.cd-tools { display: inline-flex; gap: .4rem; align-items: center; margin: -.3rem -.4rem 0 0; }
.cd-note { margin-top: .45rem !important; font-style: italic; }
.cd-edit { all: unset; cursor: pointer; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--on); }
.cd-edit:focus-visible { outline: 2px solid var(--on); outline-offset: 2px; }
.cd.is-today { animation: cdpulse 2.4s ease-in-out infinite; }
@keyframes cdpulse { 50% { box-shadow: 6px 6px 0 var(--line); } }
.cd-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .7rem; margin-top: 1rem; }
.cd-link { text-decoration: none; display: block; }
.cd.small { padding: .7rem .85rem; box-shadow: 2px 2px 0 var(--line); height: 100%; }
.cd.small .cd-num { font-size: 2.6rem; }
.cd.small .cd-unit { margin-bottom: .3rem; font-size: .62rem; }
.cd.small h3 { font-size: 1.1rem; padding: 0; }
.cd.small p.small { font-size: .7rem; }

/* Habits */
.hab-table { display: grid; gap: .35rem; overflow-x: auto; }
.hab-row { display: grid; grid-template-columns: minmax(110px, 240px) repeat(7, minmax(34px, 52px)) minmax(70px, 90px); justify-content: start; gap: .35rem; align-items: center; min-width: 470px; }
.hab-headrow span { font: 500 .62rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; }
.hab-headrow span:first-child { text-align: left; }
.hab-headrow small { display: block; font-size: .68rem; color: var(--ink-2); }
.hab-headrow .is-today { color: var(--ink); } .hab-headrow .is-today small { background: var(--pink); color: var(--on); border-radius: 999px; }
.hab-row [role="rowheader"] .link { font-size: .86rem; text-decoration: none; text-align: left; }
.hab-cell { all: unset; box-sizing: border-box; width: 100%; aspect-ratio: 1; max-height: 44px; display: grid; place-items: center; border: var(--bw) solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.hab-cell[aria-pressed="true"] { background: var(--c); color: var(--on); }
.hab-cell[disabled] { opacity: .3; cursor: default; }
.hab-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.hab-target { display: grid; justify-items: end; font-size: .8rem; }
.hab-target small { display: inline-flex; gap: .2rem; align-items: center; font-size: .64rem; color: var(--muted); }
.hab-target.hit small { color: var(--ink); } .hab-target .ic { width: 12px; height: 12px; }
.heat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.heat i { aspect-ratio: 1; border-radius: 4px; border: 1px solid var(--hair); background: var(--surface-2); }
.heat i.some { background: color-mix(in srgb, var(--c) calc(var(--a) * 70%), var(--surface-2)); border-color: var(--line); }
.heat i.hit { background: var(--c); border-color: var(--line); }
.hab-ticks { display: grid; gap: .45rem; }
.hab-tick { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .45rem .7rem; border: var(--bw) solid var(--line); border-radius: 999px; cursor: pointer; font-size: .84rem; }
.hab-tick::before { content: ""; grid-row: 1; grid-column: 1; width: 22px; height: 22px; border: var(--bw) solid var(--line); border-radius: 50%; background: var(--surface); }
.hab-tick .ic { grid-row: 1; grid-column: 1; justify-self: center; width: 14px; height: 14px; position: relative; color: var(--on); }
.hab-tick[aria-pressed="true"]::before { background: var(--c); }
.hab-tick span { grid-column: 2; } .hab-tick small { grid-column: 3; font-size: .7rem; color: var(--muted); }
.hab-tick:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Meals */
.meal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6rem; }
@media (max-width: 1080px) { .meal-week { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.meal-day { padding: .8rem; display: grid; gap: .5rem; align-content: start; }
.meal-day header { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; }
.meal-day header b { font: 400 1.3rem/1 var(--serif); } .meal-day header small { font-size: .66rem; color: var(--muted); }
.meal-day.is-today { background: var(--butter); color: var(--on); } .meal-day.is-today .label, .meal-day.is-today small { color: inherit; }
.meal-day.past { opacity: .72; }
.meal-slot { display: grid; gap: .25rem; }
.meal-slot .label { font-size: .58rem; }
.meal-pill { all: unset; box-sizing: border-box; cursor: pointer; padding: .35rem .6rem; border: var(--bw) solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: .76rem; overflow-wrap: anywhere; }
.meal-pill.safe { background: var(--mint); color: var(--on); }
.meal-add { all: unset; box-sizing: border-box; cursor: pointer; display: grid; place-items: center; height: 30px; border: 1.5px dashed var(--hair); border-radius: 10px; color: var(--muted); }
.meal-add:hover { border-color: var(--line); color: var(--ink); }
.meal-pill:focus-visible, .meal-add:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.meal-card .label .ic { width: 13px; height: 13px; vertical-align: -2px; }
.pick-big { text-align: center; padding: 1rem 0; }
.pick-big b { display: block; font: 400 clamp(2.4rem, 8vw, 3.6rem)/1 var(--serif); margin: .6rem 0; }
.quick-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.shop-list { list-style: none; margin: .9rem 0 0; padding: 0; }
.shop-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px dashed var(--hair); }
.shop-list label { display: flex; gap: .7rem; align-items: center; cursor: pointer; font-size: .9rem; }
.shop-list input { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.shop-list small { font-size: .7rem; }
.shop-list li.done span { text-decoration: line-through; color: var(--muted); }

/* Weekly reset */
.rv-steps { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
.rv-steps button { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; gap: .5rem; align-items: center; padding: .5rem .7rem; border: var(--bw) solid var(--line); border-radius: 999px; background: var(--surface); font: 500 .64rem/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.rv-steps b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); flex: none; font-size: .7rem; }
.rv-steps .on button { background: var(--ink); color: var(--bg); } .rv-steps .on b { border-color: var(--bg); }
.rv-steps .past b { background: var(--lime); color: var(--on); }
.rv-steps button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 760px) { .rv-steps span { display: none; } .rv-steps button { justify-content: center; } .rv-steps .on span { display: inline; } .rv-steps { grid-template-columns: repeat(4, auto) 1fr; } .rv-steps .on { grid-column: auto; } }
.rv-card { max-width: 760px; }
.rv-card h2 { margin: .3rem 0 1rem; }
.rv-card .field { display: grid; gap: .3rem; }
.rv-card .field > span { font-size: .78rem; color: var(--ink-2); }
.rv-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
@media (max-width: 600px) { .rv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rv-stats div { padding: .8rem; border: var(--bw) solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); display: grid; }
.rv-stats b { font: 400 2.2rem/1 var(--serif); }
.rv-stats small { font-size: .68rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.rv-focus { display: grid; gap: .6rem; }
.rv-focus .field { grid-template-columns: 2rem minmax(0, 1fr); align-items: center; }
.rv-focus .field > span { font: 400 1.8rem/1 var(--serif); color: var(--ink); }
.rv-foot { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1.5px dashed var(--hair); }
.rv-list { margin: .3rem 0 .8rem; padding-left: 1.6rem; font: 400 1.5rem/1.3 var(--serif); }
.rv-list li::marker { font-family: var(--mono); font-size: .8rem; }
@media (max-width: 600px) { .timeline { margin-left: 3.4rem; } .tl-hour span { left: -3.4rem; width: 3rem; } }
@media (max-width: 600px) {
  .hab-row { grid-template-columns: repeat(7, minmax(0, 1fr)) 52px; min-width: 0; row-gap: .25rem; }
  .hab-row [role="rowheader"] { grid-column: 1 / -1; margin-top: .4rem; }
  .hab-headrow span:first-child { display: none; }
  .hab-cell { max-height: 40px; }
}
.tl-hour span { white-space: nowrap; }
@media (max-width: 600px) { .tl-hour span { font-size: .58rem; } .blk.short small { display: none; } .blk { left: .35rem; } }
