/* Character font, self-hosted (no third-party CDN request, and it works fully offline
   once the service worker has precached the file — see sw.js ASSETS). This is the
   variable-weight file (axis 200-800), so one file covers every weight the app uses
   (400 body / 600 emphasis / 700 timer / 800 stat numbers) without extra requests.
   Bricolage Grotesque is SIL Open Font License — free for commercial use. */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}
/* Round-4 fix: a named FALLBACK face, tuned with metric-override properties so the
   system font that briefly shows during font-display:swap occupies (almost) the same
   box as Bricolage Grotesque — same line-box height and similar average glyph width.
   That's what actually kills layout shift on swap (CLS was 0.132): the browser
   reflows less because the fallback and the webfont measure almost the same.
   Numbers below follow the standard "capsize" fallback-matching formula (same one the
   fontaine tool uses): size-adjust matches average character width (Bricolage
   Grotesque regular: unitsPerEm 1000, xAvgWidth 470 vs Arial: unitsPerEm 2048,
   xAvgWidth 913), then ascent/descent/line-gap are Bricolage's own metrics
   (ascent 930, descent 270, lineGap 0, all /1000) scaled back down by that same
   size-adjust ratio so the resulting line-box height matches Bricolage's. This face
   is listed right after the real font in --font (css/tokens.css) and is never itself
   downloaded — it's pure metrics on a local system font. */
@font-face {
  font-family: "Bricolage Grotesque Fallback";
  src: local("Arial"), local("Helvetica"), local("Segoe UI"), local("Roboto");
  size-adjust: 105.43%;
  ascent-override: 88.21%;
  descent-override: 25.61%;
  line-gap-override: 0%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* must win over .overlay/.view display rules */
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}
[data-reduce="1"] * { transition: none !important; animation: none !important; }
/* Always honour the OS-level reduced-motion preference, independent of the in-app
   toggle above (that toggle is also seeded FROM this same media query at boot — see
   js/app.js boot()/applyReduce — but this rule is a hard floor so motion never leaks
   through before JS runs, or for a user who never opens Settings). Neutralises the
   view fade, sheet rise, checkbox pop and item flash keyframes; the confetti canvas
   loop is separately gated in JS by the same reduceMotion setting. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
h1, h2 { letter-spacing: -0.4px; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }

.app { max-width: var(--maxw); margin: 0 auto; padding: calc(env(safe-area-inset-top) + 16px) var(--space) 24px; }
.view { animation: fade .25s ease; }
/* Round-5 fix: the keyframe no longer animates `opacity` at all. Round-4 tried to fix
   this by starting the fade at opacity .6 instead of 0, but at .6 element-opacity the
   soft-ink text still alpha-composites to well under AA contrast for the ~250ms of the
   animation (axe caught it 2 of 3 loads). Animating `transform` only keeps the same
   gentle "settle into place" mount motion — text is at full, always-AA opacity for the
   entire animation — and reduced-motion still neutralises this the same as every other
   keyframe in the file. */
@keyframes fade { from { transform: translateY(6px); } to { transform: none; } }
.view-head { margin: 4px 0 16px; }
/* min-height reserves the line-box up front (belt-and-braces alongside the fallback
   font metric-overrides above) so a font swap never grows/shrinks the heading and
   pushes the rest of the view down — the other contributor to the Round-4 CLS. */
.view-head h1 { font-size: 30px; margin: 0; min-height: 1.45em; }
.view-head .sub, .sub { color: var(--ink-soft); font-size: 14px; margin: 4px 0 0; }
.mini-h { font-size: 14px; color: var(--ink-soft); margin: 18px 0 8px; font-weight: 600; }
/* short cited micro-tip under a view's subheading (embedded-expertise sourcing) */
.cite { color: var(--ink-soft); font-size: 12px; font-style: italic; margin: 6px 0 0; }

/* layout-utility classes (replace one-off inline style="margin-top:…") */
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-18 { margin-top: 18px; }

/* visually-hidden but still announced by screen readers (icon-only controls, sr summaries) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* buttons */
.btn {
  font: inherit; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 16px; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.96); }
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:active { box-shadow: 0 4px 16px -6px var(--primary); }
/* background is --surface (not transparent) so the --danger text always sits on a
   known light/dark surface colour — verified >=4.72:1 in every theme (peach is the
   floor); a transparent background let it fall to 4.40:1 on the peach page bg. */
.btn-danger { color: var(--danger); border-color: var(--danger); background: var(--surface); }
.btn.big { width: 100%; padding: 15px; font-size: 17px; font-weight: 600; margin-top: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* NOW header + momentum */
.now-head { margin-bottom: 14px; }
.now-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.now-top h1 { font-size: 28px; margin: 0; min-height: 1.45em; }
/* min-height 32px (Round 4, CLS): the static placeholder text has no emoji, but the
   JS-set pill text always does — colour-emoji glyphs sit in a taller line box than
   plain text, so without a reserved minimum the pill (and everything below it) grows
   by a few px the moment JS fills it in. Reserving it up front removes that shift. */
.intention-pill { background: var(--surface-2); color: var(--ink-soft); font-family: inherit; font-size: 12px; padding: 5px 11px; min-height: 32px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; cursor: pointer; max-width: 60%; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; }
.intention-pill:active { transform: scale(.95); }
.momentum { margin-top: 12px; }
.momentum-bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.momentum-bar span { display: block; height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), var(--accent)); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.momentum-label { display: block; font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.big-momentum { margin: 6px 0 18px; }

/* energy */
/* min-height (Round 4, CLS): #energy-ask and #energy-picker both start completely
   EMPTY in the static HTML (filled by renderEnergyPicker() on boot) — that was the
   single biggest remaining layout-shift source (measured: ~0 -> 95px on first
   render), bigger than the font swap itself. Reserving the real populated height up
   front removes the jump entirely. */
.energy { margin: 6px 0 14px; min-height: 95px; }
.energy-ask { font-size: 13px; color: var(--ink-soft); }
.energy-picker { display: flex; gap: 8px; margin-top: 8px; }
.energy-btn { flex: 1; font: inherit; font-size: 14px; cursor: pointer; padding: 10px 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); transition: transform .08s; }
.energy-btn:active { transform: scale(.95); }
.energy-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--primary); }
.energy-btn .e { display: flex; justify-content: center; margin-bottom: 2px; }
.energy-btn .e svg { width: 20px; height: 20px; }

/* inline icon SVGs used in place of emoji-as-icons (mini/task-tag/pick buttons).
   Buttons that pair an icon with a label are inline-flex (see .btn / .mini / .chip-btn),
   so the gap between icon and text is handled by `gap` there — no per-icon margin hacks.
   The two contexts where an icon still sits inline INSIDE running text (the task meta
   `.tag` and the steps `.subbadge`) keep a small right margin + baseline nudge. */
.ic { width: 15px; height: 15px; display: inline-block; flex: 0 0 auto; }
.tag .ic, .subbadge .ic { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }

/* NOW card */
.now-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px; min-height: 224px;
  /* min-height raised from 190px -> 224px (Round 4): #now-card starts EMPTY in the
     static HTML and JS fills it in on boot (renderNow()) — that fill-in, not the font
     swap, was the single largest CLS contributor (measured jump: 190px -> ~224px on
     the empty/first-run state, which is exactly what a fresh install shows and what
     Lighthouse audits). 224px matches that real content height, so there's nothing left
     to reflow; task-with-steps states are naturally taller than this floor already, so
     it never adds visible empty space there. */
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
  box-shadow: 0 8px 30px -22px rgba(0,0,0,.45);
}
/* Round-4 signature micro-interaction: fired from js/app.js when picking an energy
   level surfaces a matching task. A soft accent-coloured ring that blooms and fades —
   confirms the match without moving or resizing anything (box-shadow only, so it can
   never cause layout shift). Neutralised project-wide by the prefers-reduced-motion
   rule above, same as every other keyframe in this file. */
.now-card.pulse-match { animation: energyMatch .7s ease; }
@keyframes energyMatch {
  0% { box-shadow: 0 8px 30px -22px rgba(0,0,0,.45), 0 0 0 0 var(--accent); }
  35% { box-shadow: 0 8px 30px -22px rgba(0,0,0,.45), 0 0 0 5px var(--accent); }
  100% { box-shadow: 0 8px 30px -22px rgba(0,0,0,.45), 0 0 0 0 transparent; }
}
/* Round-6 signature micro-interaction: fired from js/app.js (rolloverCard()) when the
   user taps "Not now" on the Now card. This is the tactile half of the app's
   no-shame rollover mechanic — setting a task down should FEEL like a small, easy
   gesture, not a failure, so the card gives one gentle tilt-and-slide "shrug it off"
   tumble and eases back to resting instead of silently swapping content. Purely
   `transform`/`box-shadow` (never width/height/margin), so it can never shift layout,
   and — like every other keyframe here — it is fully neutralised by the universal
   `[data-reduce="1"] *` rule and the `@media (prefers-reduced-motion: reduce)` block
   above (both select `*`, so this class needs no extra reduced-motion CSS of its own). */
.now-card.rollover { animation: rollover .5s cubic-bezier(.2,.8,.2,1); }
@keyframes rollover {
  0% { transform: none; box-shadow: 0 8px 30px -22px rgba(0,0,0,.45); }
  30% { transform: translateX(-9px) rotate(-2deg); box-shadow: 0 16px 34px -20px rgba(0,0,0,.35); }
  65% { transform: translateX(3px) rotate(1deg); box-shadow: 0 10px 28px -22px rgba(0,0,0,.42); }
  100% { transform: none; box-shadow: 0 8px 30px -22px rgba(0,0,0,.45); }
}
.now-task { font-size: 26px; font-weight: 600; line-height: 1.25; }
.now-step { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--primary); font-weight: 600; }
.now-step .ic { width: 14px; height: 14px; }
.now-empty { color: var(--ink-soft); font-size: 17px; text-align: center; }
.now-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.now-actions .btn { flex: 1; min-width: 130px; text-align: center; }
.now-sub-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.now-sub-actions .mini { flex: 1; }

.quick-add { display: flex; gap: 8px; margin: 16px 0; }
.quick-add input {
  flex: 1; font: inherit; font-size: 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
}
.quick-add input:focus-visible { outline: 3px solid var(--primary); outline-offset: 1px; }
.quick-add .btn { font-size: 20px; padding: 10px 16px; }
.affirm { color: var(--ink-soft); font-size: 15px; text-align: center; margin-top: 16px; font-style: italic; }

/* lists */
.list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
/* Round-5 fix: `flex-wrap: wrap` lets the action-button cluster drop to its own row
   instead of fighting the title for width on the same line. Without this, `.item` had
   no wrap and the (up to 9-button) `.item-actions` box would win the flex negotiation
   and starve `.item-text` down toward a 1-character min-content — see the note on
   `.item-text` below for the other half of the fix. */
.item {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.item.done { opacity: .65; }
.item.done .item-text { text-decoration: line-through; color: var(--ink-soft); }
.item-check {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  border: 2px solid var(--primary); background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--primary-ink); font-size: 16px; transition: transform .12s, background .12s;
}
.item-check:active { transform: scale(.85); }
.item.done .item-check { background: var(--primary); animation: pop .25s ease; }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
/* Round-5 fix: `flex: 1 1 auto` (was `flex: 1`, i.e. flex-basis 0%) plus a real
   `min-width` stops the title being squeezed to nothing when `.item-actions` is wide.
   `overflow-wrap: anywhere` (replaces `word-break: break-word`) still lets a single
   very-long word break so it never overflows the card, but — unlike `word-break`, which
   is willing to break BETWEEN any two characters even when there's room to wrap at a
   word boundary — it only breaks mid-word as a last resort, so a normal multi-word
   title wraps the way a reader expects instead of collapsing to one glyph per line. */
.item-text { flex: 1 1 auto; min-width: 10ch; font-size: 16px; overflow-wrap: anywhere; }
.item-text .tag { font-size: 13px; margin-right: 4px; }
.item-text.must { font-weight: 600; }
/* Round-5 fix: `flex-basis: 100%` forces the actions cluster onto its own full-width
   row (enabled by `flex-wrap: wrap` on `.item` above) whenever it can't fit beside the
   title, instead of sharing the row and squeezing it. */
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; flex-basis: 100%; justify-content: flex-start; margin-top: 10px; }
/* Round-10: Today rows now show at most 3 inline actions — a labelled "Now"/"Undo",
   the must-star, and a "···" overflow — so each is a comfortable target with a clear
   name, not one of nine cryptic glyphs. */
/* Round-10 (Gate 2): raised from 34px to a full 44px touch target (house standard,
   also covers icon-only `.mini` buttons which need min-width too); padding rebalanced
   so the label stays vertically centred at the new height. */
.mini { display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font: inherit; font-size: 12.5px; min-height: 44px; min-width: 44px; padding: 9px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease; }
.mini:active { transform: scale(.94); }
.mini:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.mini .ic { width: 14px; height: 14px; }
/* the one primary inline action per row (pull into Now) — filled so the eye lands on it */
.mini-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 600; }
.mini-primary:hover { filter: brightness(1.04); }

/* Brain-dump triage chips (Now / Today / delete) — consistent icon+label affordances */
/* Round-10 (Gate 2): raised from 34px to a full 44px touch target; padding rebalanced
   so the label stays vertically centred at the new height. */
.chip-btn { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12.5px;
  font-weight: 500; min-height: 44px; padding: 9px 15px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  transition: transform .08s ease, background .15s ease, border-color .15s ease; }
.chip-btn:hover { border-color: var(--primary); }
.chip-btn:active { transform: scale(.95); }
.chip-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.chip-btn .ic { width: 14px; height: 14px; }
.chip-btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); font-weight: 600; }
.chip-btn.ghost { background: transparent; border-color: transparent; color: var(--ink-soft); min-width: 44px; padding: 9px 11px; }
.chip-btn.ghost:hover { border-color: var(--danger); color: var(--danger); }
.dump-actions { gap: 8px; }
.empty { color: var(--ink-soft); text-align: center; padding: 28px 10px; }

/* task options menu (Today overflow) — big, labelled, vertically stacked rows */
.menu-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  font: inherit; font-size: 15px; cursor: pointer; padding: 13px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  transition: transform .08s ease, background .15s ease, border-color .15s ease; }
.menu-item:hover { border-color: var(--primary); }
.menu-item:active { transform: scale(.98); }
.menu-item:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.menu-item .menu-ic { width: 20px; height: 20px; flex: 0 0 auto; color: var(--primary); }
.menu-label { display: flex; flex-direction: column; gap: 2px; }
.menu-sub { font-size: 12px; color: var(--ink-soft); font-weight: 400; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .menu-ic { color: var(--danger); }
.menu-item.danger:hover { border-color: var(--danger); }

/* focus ring */
.focus-task { text-align: center; font-weight: 600; font-size: 17px; min-height: 22px; margin: 4px 0 6px; }
.ring-wrap { position: relative; width: 240px; height: 240px; margin: 6px auto 8px; }
.ring { width: 240px; height: 240px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--primary); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 339.292; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.timer-display { position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 52px; font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: -1px; }
.timer-presets, .timer-controls { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.timer-controls .btn { flex: 1; max-width: 150px; }
.chip { font: inherit; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip.active { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

/* wins */
.stats { display: flex; gap: 12px; margin-bottom: 8px; }
.stat { flex: 1; background: var(--surface-2); border-radius: var(--radius-sm); padding: 16px 8px; text-align: center; }
.stat-n { display: block; font-size: 30px; font-weight: 800; }
.stat-l { font-size: 12px; color: var(--ink-soft); }
#wins-chart { width: 100%; display: block; }

/* settings */
.setting-group { margin: 20px 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.setting-group h2 { font-size: 16px; margin: 0 0 10px; }
.toggle { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 15px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--primary); }
.field-label { display: block; font-size: 14px; margin: 12px 0 6px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); font-weight: 400; font-size: 12px; }
.hint { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; margin: 6px 0 2px; }
.field { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); }
input[type="range"] { width: 100%; accent-color: var(--primary); }
.theme-picker { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-picker.center { justify-content: center; margin: 14px 0; }
.swatch { width: 46px; height: 46px; border-radius: 13px; border: 2px solid var(--line); cursor: pointer; transition: transform .1s; }
.swatch:active { transform: scale(.9); }
.swatch[aria-pressed="true"] { outline: 3px solid var(--primary); outline-offset: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.chip-x button { background: none; border: none; cursor: pointer; color: var(--ink-soft); font-size: 14px; line-height: 1; }
.version { color: var(--ink-soft); font-size: 12px; text-align: center; margin-top: 20px; }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: var(--maxw); z-index: 20; display: flex;
  background: var(--surface); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 24px -18px rgba(0,0,0,.5); }
.tab { flex: 1; background: none; border: none; cursor: pointer; color: var(--ink-soft);
  padding: 9px 2px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; font-size: 11px; transition: transform .08s; }
.tab:active { transform: scale(.9); }
.tab .ti { width: 22px; height: 22px; display: block; opacity: .8; transition: opacity .12s; }
.tab[aria-current="true"] { color: var(--primary); font-weight: 600; }
.tab[aria-current="true"] .ti { opacity: 1; }

/* overlay sheets */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; padding: 16px; }
.sheet { position: relative; background: var(--bg); width: 100%; max-width: var(--maxw); border-radius: 22px;
  max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); animation: rise .3s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 6px 0 6px; font-size: 22px; }
/* Round-10: sheets used to open with a big decorative emoji (🌱🪄✨🌅💾💛📲💡). Replaced
   with a soft tinted badge holding an SVG from the same icon set — same warm anchor, no
   emoji, and it renders identically on every OS. */
.sheet-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--primary); border: 1px solid var(--line); margin-bottom: 4px; }
.sheet-ic { width: 24px; height: 24px; }
/* Round-10 (Gate 2): raised from 34px to a full 44px touch target; the SVG icon inside
   keeps its own size (.ic) and stays centred via the existing grid placement. */
.sheet-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); font-size: 15px; cursor: pointer;
  display: grid; place-items: center; }
.sheet-close:active { transform: scale(.9); }

/* banner + toast + confetti */
.banner { background: var(--primary); color: var(--primary-ink); padding: 12px 16px; font-size: 14px; text-align: center; }
.banner button { margin-left: 8px; background: var(--primary-ink); color: var(--primary); border: none; border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; }
.banner .close { background: transparent; color: var(--primary-ink); float: right; font-size: 16px; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px;
  font-size: 14px; z-index: 70; max-width: 90%; text-align: center; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); animation: rise .25s ease; }
.toast-btn { margin-left: 4px; background: var(--bg); color: var(--ink); border: none; border-radius: 999px;
  padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.toast-btn:active { transform: scale(.94); }

/* about sheet */
.about-h { font-size: 15px; margin: 18px 0 4px; }
.about-p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); margin: 0; }
.about-p a { color: var(--primary); }

/* install guide steps */
.steps-guide { margin: 12px 0 4px; padding-left: 22px; }
.steps-guide li { font-size: 15px; line-height: 1.55; padding: 6px 0; color: var(--ink); }
.ios-share { display: inline-grid; place-items: center; width: 22px; height: 22px; vertical-align: -5px;
  border: 1.5px solid var(--primary); border-radius: 6px; color: var(--primary); }
.ios-share svg { width: 13px; height: 13px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 65; }

/* help + badges + feedback */
.help-fab { position: fixed; right: 14px; bottom: calc(94px + env(safe-area-inset-bottom)); z-index: 25;
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line);
  color: var(--primary); font-size: 20px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px -8px rgba(0,0,0,.5); }
.help-fab:active { transform: scale(.9); }
.legend { list-style: none; padding: 0; margin: 10px 0 8px; }
.legend li { font-size: 14px; line-height: 1.5; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.subbadge { display: inline-block; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-right: 6px; vertical-align: 1px; }
.item.flash { animation: flashitem 1.1s ease; }
@keyframes flashitem { 0% { background: var(--surface-2); transform: scale(.98); } 35% { background: var(--accent); } 100% { background: var(--surface); transform: scale(1); } }
.mini[title] { position: relative; }
