/* Breathcharge — two themes over one layout.
   Dawn: light, airy, edit the breath on the timeline.
   Nocturne: evening, a warm moon, serif phase words, almost no interface. */

:root,
:root[data-theme='dawn'] {
  --bg: #f3f6f5;
  --bg-image: none;
  --surface: #ffffff;
  --surface-2: #eef2f1;
  --chip-bg: #e3eae8;
  --text: #14242a;
  --text-strong: #14242a;
  --text-dim: #3d5560;
  --text-faint: #566b74;
  --border: #c9d6d3;
  --border-soft: #e1e8e6;
  --accent: #0e6e6e;
  --accent-ink: #ffffff;
  --accent-soft: #e6f3f2;
  --accent-line: #0e6e6e;
  --ring-track: #dbe5e2;
  --shadow: 0 10px 40px rgba(20, 36, 42, 0.08);
  --font-body: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --seg-in: #d3ecea;   --seg-in-ink: #0b4f4f;
  --seg-top: #cdeee0;  --seg-top-ink: #0d5a43;
  --seg-hold: #efe8d6; --seg-hold-ink: #5e4a1a;
  --seg-out: #e3e4f3;  --seg-out-ink: #3a3f86;
  --backdrop: rgba(20, 36, 42, 0.28);
  --sheet-bg: #ffffff;
  --viz-1: #2a78d6;
  --viz-2: #eb6834;
  --hue: 178;
  --level: 0.1;
  --p: 0;
  --moon-o: 1;
  color-scheme: light;
}

:root[data-theme='nocturne'] {
  --bg: #0b0c1a;
  --bg-image: radial-gradient(1100px 760px at 50% 32%, #191a33 0%, #0b0c1a 55%, #05060c 100%);
  --surface: #121327;
  --surface-2: rgba(255, 255, 255, 0.04);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --text: #ece6db;
  --text-strong: #f4ecdf;
  --text-dim: #c9bfae;
  --text-faint: #a39a8b;
  --border: #3a3550;
  --border-soft: #2e2a42;
  --accent: #f0c88f;
  --accent-ink: #1a1408;
  --accent-soft: rgba(240, 200, 143, 0.08);
  --accent-line: #f0c88f;
  --ring-track: transparent;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  --font-body: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --seg-in: rgba(126, 200, 194, 0.14);  --seg-in-ink: #bfe6e1;
  --seg-top: rgba(120, 220, 170, 0.14); --seg-top-ink: #bdeed6;
  --seg-hold: rgba(240, 200, 143, 0.14); --seg-hold-ink: #f0d6ae;
  --seg-out: rgba(170, 160, 240, 0.14); --seg-out-ink: #d4cff7;
  --backdrop: rgba(3, 3, 10, 0.55);
  --sheet-bg: #121327;
  --viz-1: #3987e5;
  --viz-2: #d95926;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.5s;
}

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: var(--accent-line); }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 14px; border-radius: 10px; background: var(--surface); color: var(--text);
}
.skip-link:focus { top: 12px; }

/* Theme-only pieces */
:root[data-theme='dawn'] .readout-below,
:root[data-theme='dawn'] .phase-row,
:root[data-theme='dawn'] .dots,
:root[data-theme='dawn'] .tech-label,
:root[data-theme='dawn'] .halo,
:root[data-theme='dawn'] .moon-shade,
:root[data-theme='dawn'] .i-sun { display: none; }
:root[data-theme='nocturne'] .readout-in,
:root[data-theme='nocturne'] .timeline,
:root[data-theme='nocturne'] .tech-tabs,
:root[data-theme='nocturne'] .ring,
:root[data-theme='nocturne'] .ring-mask,
:root[data-theme='nocturne'] .guide-ring,
:root[data-theme='nocturne'] .i-moon { display: none; }

/* ---------- top bar ---------- */

.app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  padding-top: max(20px, env(safe-area-inset-top));
  transition: opacity 0.6s;
}

.brand {
  display: flex; align-items: center; gap: 10px; flex: none;
  color: var(--text-strong); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em;
}
:root[data-theme='nocturne'] .brand { font-weight: 600; font-size: 16px; letter-spacing: 0.02em; }
.brand-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffffff, var(--accent) 70%);
}
:root[data-theme='nocturne'] .brand-dot { width: 16px; height: 16px; box-shadow: 0 0 14px rgba(240, 200, 143, 0.5); }

.tech-tabs {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.tech-tabs-inner {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--chip-bg);
  overflow-x: auto; scrollbar-width: none; max-width: 100%;
}
.tech-tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  flex: none; border: 0; background: transparent; color: var(--text-dim);
  padding: 9px 15px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-pressed='true'] { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 36, 42, 0.12); }

.tech-label {
  flex: 1; border: 0; background: transparent; color: var(--text-dim);
  font-size: 14px; text-align: center; padding: 10px; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tech-label:hover { color: var(--text); }

.top-actions { display: flex; gap: 8px; flex: none; }
.pill-btn, .icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  font-size: 14px; font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.icon-btn { width: 44px; padding: 0; }
.pill-btn:hover, .icon-btn:hover { background: var(--surface-2); }
.pill-btn svg, .icon-btn svg {
  width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.pill-btn svg .fill { fill: currentColor; stroke: none; }
.pill-btn svg .knob { fill: var(--bg); }

/* ---------- session ---------- */

.page { flex: 1; display: flex; flex-direction: column; }

.session {
  min-height: calc(100vh - 150px);
  min-height: calc(100dvh - 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 8px 24px 28px;
}

.stage-home { width: 100%; display: flex; justify-content: center; }
.stage {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.orb-wrap {
  position: relative;
  width: min(440px, 76vw, 52vh);
  aspect-ratio: 1;
}
:root[data-theme='nocturne'] .orb-wrap { width: min(400px, 70vw, 44vh); }

.ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--ring-track) 0);
}
.ring-mask { position: absolute; inset: 4px; border-radius: 50%; background: var(--bg); }
.guide-ring { position: absolute; inset: 7%; border-radius: 50%; border: 1px dashed var(--border); opacity: 0.8; }

.orb {
  position: absolute;
  left: 50%; top: 50%;
  width: calc((0.36 + 0.56 * var(--level)) * 100%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #ffffff 0%, hsl(var(--hue) 50% 82%) 48%, hsl(var(--hue) 42% 46%) 100%);
  box-shadow: 0 30px 90px hsl(var(--hue) 45% 45% / 0.32);
  will-change: width;
}
:root[data-theme='nocturne'] .orb {
  width: calc((0.36 + 0.58 * var(--level)) * 100%);
  background: radial-gradient(circle at 42% 38%, #fff4e0 0%, var(--accent) 40%, #9a6b3e 100%);
  opacity: var(--moon-o);
  box-shadow: 0 0 calc(60px + 110px * var(--level)) rgba(240, 200, 143, calc(0.14 + 0.22 * var(--level)));
}
.halo {
  position: absolute; inset: -18%; border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 200, 143, calc(0.08 + 0.16 * var(--level))), rgba(240, 200, 143, 0) 62%);
  pointer-events: none;
}
.moon-shade {
  position: absolute; left: 50%; top: 50%;
  width: calc((0.36 + 0.58 * var(--level)) * 100%);
  aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 70% 64%, rgba(20, 16, 30, 0.28), rgba(20, 16, 30, 0) 46%);
  pointer-events: none;
}

.readout {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none; gap: 4px;
}
.phase-label {
  font-size: clamp(13px, 3.4vw, 15px); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: #0b3f40;
}
.count {
  font-size: clamp(56px, 16vw, 96px); line-height: 1; font-weight: 300;
  color: var(--text-strong); min-height: 1em; font-variant-numeric: tabular-nums;
}
.hint { font-size: clamp(13px, 3.4vw, 15px); color: #24404a; max-width: 62%; line-height: 1.35; }
.hide-count .count { visibility: hidden; }

.readout-below { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.word {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(54px, 13vw, 88px); line-height: 1; color: var(--text-strong);
}
.sub { font-size: clamp(15px, 4vw, 18px); color: var(--text-dim); max-width: 520px; min-height: 1.4em; }

.mini-controls { display: none; }
.pip-placeholder {
  height: min(52vh, 440px); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: var(--text-dim);
}

/* ---------- controls ---------- */

.controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.primary-btn {
  min-width: 170px; min-height: 52px; padding: 0 30px;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
  font-size: 16px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform 0.15s, filter 0.2s;
}
.primary-btn:hover { filter: brightness(1.06); }
.primary-btn:active { transform: scale(0.98); }
.primary-btn.small { min-width: 0; min-height: 44px; padding: 0 18px; font-size: 14px; }
.ghost-btn {
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 16px; font-weight: 500;
}
:root[data-theme='nocturne'] .ghost-btn { background: transparent; }
.ghost-btn:hover { background: var(--surface-2); }
.ghost-btn.small { min-height: 44px; padding: 0 18px; font-size: 14px; }
.link-btn {
  min-height: 44px; padding: 0 8px; border: 0; background: transparent;
  color: var(--accent-line); font-size: 14px; font-weight: 500;
}
.link-btn:hover { text-decoration: underline; }

.session-meta { margin: -6px 0 0; font-size: 14px; color: var(--text-dim); min-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }

.summary-cards { width: min(620px, 100%); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sum-card {
  background: var(--surface); border: 1px solid var(--border-soft); border-radius: 16px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.sum-card > span { font-size: 13px; color: var(--text-dim); }
.sum-card strong { font-size: 30px; font-weight: 600; color: var(--text-strong); font-variant-numeric: tabular-nums; }
:root[data-theme='nocturne'] .sum-card { background: transparent; }
:root[data-theme='nocturne'] .sum-card strong { font-family: var(--font-display); font-weight: 400; font-size: 40px; }
.sum-card small { font-size: 14px; color: var(--text-dim); font-weight: 400; font-family: var(--font-body); }

/* ---------- timeline (Dawn) ---------- */

.timeline { width: min(760px, 100%); display: flex; flex-direction: column; gap: 10px; }
.timeline-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-dim); flex-wrap: wrap; }
.timeline-track { position: relative; }
.timeline-segs { display: flex; gap: 6px; }
.tseg {
  min-width: 0; min-height: 64px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  padding: 10px 12px; border-radius: 14px; border: 0; text-align: left;
  transition: box-shadow 0.2s, background 0.2s;
}
.tseg .seg-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tseg .seg-dur { font-size: 18px; font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.tseg.k-in { background: var(--seg-in); color: var(--seg-in-ink); }
.tseg.k-top { background: var(--seg-top); color: var(--seg-top-ink); }
.tseg.k-hold { background: var(--seg-hold); color: var(--seg-hold-ink); }
.tseg.k-out { background: var(--seg-out); color: var(--seg-out-ink); }
.tseg.now { box-shadow: inset 0 0 0 2px var(--accent); }
.tseg.editing { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent), 0 6px 18px rgba(20, 36, 42, 0.1); }
.tseg.tight { padding: 10px 6px; align-items: center; }
.tseg.tight .seg-name { font-size: 11px; }
.tseg.tight .seg-dur { font-size: 15px; }
.playhead {
  position: absolute; top: -6px; bottom: -6px; width: 3px; border-radius: 3px;
  background: var(--text-strong); left: 0; opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.playhead.on { opacity: 1; }

.seg-editor {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-soft);
}
.seg-editor-label { font-weight: 600; margin-right: 4px; }
.seg-editor-value { min-width: 64px; text-align: center; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.step-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 20px; line-height: 1;
  display: inline-grid; place-items: center;
}
:root[data-theme='nocturne'] .step-btn { background: transparent; }
.step-btn:hover { background: var(--surface-2); }

.timeline-adds { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.add-chip {
  min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--border);
  background: transparent; color: var(--text-dim); font-size: 13px;
}
.add-chip:hover { color: var(--text); border-style: solid; }

/* ---------- phase row + dots (Nocturne) ---------- */

.phase-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8170; }
.phase-row .now { color: var(--accent); font-weight: 600; }
.dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 320px; min-height: 8px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: #3a3550; transition: background 0.4s; }
.dots span.on { background: var(--accent); }

.shortcuts {
  margin: 4px 0 0; font-size: 12px; color: var(--text-faint);
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center;
}
kbd {
  font-family: inherit; font-size: 11px; padding: 1px 6px; border-radius: 5px;
  border: 1px solid var(--border); color: var(--text-dim); margin-left: 8px;
}
kbd:first-child { margin-left: 0; }

/* ---------- dimmed / focus ---------- */

.topbar, .controls, .session-meta, .timeline, .phase-row, .shortcuts, .scroll-cue, .learn, .techniques, .site-footer {
  transition: opacity 0.8s;
}
.dimmed .topbar, .dimmed .controls, .dimmed .session-meta, .dimmed .timeline, .dimmed .phase-row,
.dimmed .shortcuts, .dimmed .scroll-cue, .dimmed .learn, .dimmed .techniques, .dimmed .site-footer, .dimmed .install-card {
  opacity: 0; pointer-events: none;
}
.dimmed .dots { opacity: 0.5; }
:root.dimmed { --bg: #05060a; }
:root[data-theme='dawn'].dimmed { --bg: #e7ecea; }
:root.dimmed body { overflow: hidden; }

/* ---------- guide (crawlable content below the app) ---------- */

.scroll-cue {
  align-self: center; margin: 0 0 40px; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; color: var(--text-dim); text-decoration: none; border: 1px solid var(--border-soft);
}
.scroll-cue:hover { color: var(--text); border-color: var(--border); }

.learn, .techniques { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }
.learn { scroll-margin-top: 24px; line-height: 1.7; color: var(--text); font-size: 16.5px; }
:root[data-theme='dawn'] .learn { color: #26393f; }
.guide-head { padding: 8px 0 28px; border-bottom: 1px solid var(--border-soft); margin-bottom: 8px; }
.eyebrow { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-line); font-weight: 600; }
:root[data-theme='dawn'] .eyebrow { color: #0b5f5f; }
.learn h1 {
  margin: 0 0 14px; font-family: var(--font-display); font-size: clamp(30px, 5vw, 42px);
  line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; color: var(--text-strong);
}
:root[data-theme='nocturne'] .learn h1 { font-weight: 400; font-style: italic; font-size: clamp(36px, 6vw, 54px); letter-spacing: 0; }
.lede { font-size: 18px; color: var(--text-dim); margin: 0 0 22px; }
.cta {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px;
  font-weight: 600; color: var(--accent-ink); text-decoration: none; background: var(--accent);
}
.cta:hover { filter: brightness(1.06); }
.learn section { padding: 24px 0 6px; }
.learn h2 { margin: 0 0 12px; font-size: 23px; font-weight: 700; color: var(--text-strong); letter-spacing: -0.01em; }
:root[data-theme='nocturne'] .learn h2 { font-family: var(--font-display); font-weight: 400; font-size: 32px; letter-spacing: 0; }
.learn h3 { margin: 18px 0 8px; font-size: 18px; color: var(--text-strong); }
.learn p { margin: 0 0 14px; }
.learn ol, .learn ul { margin: 0 0 14px; padding-left: 22px; }
.learn li { margin-bottom: 8px; }
.learn li::marker { color: var(--accent-line); }
.learn strong { color: var(--text-strong); font-weight: 600; }
.learn a:not(.cta) { color: var(--accent-line); }
:root[data-theme='dawn'] .learn a:not(.cta) { color: #0b5f5f; }
.learn kbd { margin-left: 0; }
.faq details {
  border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 8px;
  background: var(--surface);
}
:root[data-theme='nocturne'] .faq details { background: var(--surface-2); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--text-strong); min-height: 24px; }
.faq details p { margin: 10px 0 0; }
.sources ul { padding-left: 18px; font-size: 13.5px; color: var(--text-dim); }
.sources a { color: var(--text-dim) !important; word-break: break-word; }

/* Illustrations inside the guide (series colours validated for both themes) */
.figure {
  margin: 20px 0 22px; padding: 18px 16px 14px; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--border-soft);
}
:root[data-theme='nocturne'] .figure { background: #161730; }
.figure svg { display: block; width: 100%; max-width: 600px; height: auto; margin: 0 auto; overflow: visible; }
.pathways { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pathways li { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr; align-items: stretch; margin: 0; }
.pw-node {
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 12px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg);
  font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--text-strong);
}
.pw-arrow { position: relative; }
.pw-arrow::before {
  content: ''; position: absolute; left: 4px; right: 9px; top: 50%; height: 2px; background: var(--text-faint);
}
.pw-arrow::after {
  content: ''; position: absolute; right: 3px; top: calc(50% - 5px);
  border: 6px solid transparent; border-left-color: var(--text-faint); border-right: 0;
}
@media (max-width: 560px) {
  .pathways { gap: 22px; counter-reset: route; }
  .pathways li { grid-template-columns: 1fr; grid-auto-rows: auto; counter-increment: route; }
  .pathways li::before { content: 'Route ' counter(route); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; margin-bottom: 6px; }
  .pw-arrow { height: 22px; }
  .pw-arrow::before { left: 50%; right: auto; top: 3px; bottom: 8px; width: 2px; height: auto; }
  .pw-arrow::after { left: calc(50% - 5px); right: auto; top: auto; bottom: 2px; border: 6px solid transparent; border-top-color: var(--text-faint); border-bottom: 0; }
  .figure { margin-left: -8px; margin-right: -8px; padding: 14px 10px 12px; }
}
.figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.figure .f-axis { stroke: var(--border); stroke-width: 1.5; fill: none; }
.figure .f-grid { stroke: var(--border); stroke-width: 1; fill: none; stroke-dasharray: 3 5; opacity: 0.7; }
.figure .f-line { stroke: var(--viz-1); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.figure .f-line-2 { stroke: var(--viz-2); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.figure .f-area { fill: var(--viz-1); opacity: 0.1; }
.figure .f-band-in { fill: var(--seg-in); opacity: 0.7; }
.figure .f-band-top { fill: var(--seg-top); opacity: 0.9; }
.figure .f-band-hold { fill: var(--seg-hold); opacity: 0.7; }
.figure .f-band-out { fill: var(--seg-out); opacity: 0.7; }
.figure .f-text { fill: var(--text-dim); font-family: var(--font-body); }
.figure .f-text-strong { fill: var(--text-strong); font-family: var(--font-body); font-weight: 600; }
.figure .f-dot { fill: var(--viz-1); stroke: var(--surface); stroke-width: 2; }
.figure .f-dot-2 { fill: var(--viz-2); stroke: var(--surface); stroke-width: 2; }
.figure .f-connector { stroke: var(--text-faint); stroke-width: 2; }
.figure .f-node { fill: var(--bg); stroke: var(--border); stroke-width: 1.5; }
.figure .f-arrow { stroke: var(--text-faint); stroke-width: 2; fill: none; }
.figure .f-arrowhead { fill: var(--text-faint); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 10px 0 0; font-size: 13.5px; color: var(--text-dim); }
.legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 6px; background: var(--viz-1); }
.legend i.l2 { background: var(--viz-2); }

.table-scroll { overflow-x: auto; margin: 12px 0 16px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 12px 0 16px; }
.table-scroll .data-table { margin: 0; min-width: 520px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border-soft); }
.data-table thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); font-weight: 600; }
.data-table tbody th { color: var(--text-strong); font-weight: 600; white-space: nowrap; }
.data-table td:last-child { white-space: nowrap; }
.data-table a { color: inherit !important; }

.callout {
  margin: 18px 0; padding: 16px 18px; border-radius: 16px; background: var(--accent-soft);
  border: 1px solid var(--border-soft); font-size: 15.5px;
}
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.stat {
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border-soft); background: var(--surface);
  display: flex; flex-direction: column; gap: 2px;
}
:root[data-theme='nocturne'] .stat { background: var(--surface-2); }
.stat strong { font-size: 24px; color: var(--text-strong); }
:root[data-theme='nocturne'] .stat strong { font-family: var(--font-display); font-weight: 400; font-size: 32px; }
.stat span { font-size: 13px; color: var(--text-dim); line-height: 1.45; }

.techniques { padding-top: 32px; padding-bottom: 8px; }
.techniques h2 { margin: 0 0 14px; font-size: 22px; font-weight: 700; color: var(--text-strong); }
:root[data-theme='nocturne'] .techniques h2 { font-family: var(--font-display); font-weight: 400; font-size: 30px; }
.tech-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tech-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border-soft); background: var(--surface); color: var(--text-strong); text-decoration: none;
  transition: border-color 0.2s;
}
:root[data-theme='nocturne'] .tech-card { background: var(--surface-2); }
.tech-card span { font-size: 13.5px; color: var(--text-dim); line-height: 1.5; }
.tech-card:hover { border-color: var(--border); }
.tech-card[aria-current='page'] { border-color: var(--accent-line); }

.site-footer {
  width: 100%; max-width: 760px; margin: 40px auto 0; padding: 24px 24px calc(48px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-soft); font-size: 14px; color: var(--text-dim); line-height: 1.6;
}
.site-footer .fine { font-size: 12.5px; color: var(--text-faint); }
.noscript { text-align: center; color: var(--text-dim); padding: 16px; }

/* ---------- settings sheet ---------- */

.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: var(--backdrop); animation: fade-in 0.2s; }
.sheet {
  position: fixed; z-index: 41; top: 0; right: 0; bottom: 0;
  width: min(480px, 100vw);
  display: flex; flex-direction: column;
  background: var(--sheet-bg); color: var(--text);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.18);
  animation: slide-in 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
:root[data-theme='nocturne'] .sheet { border-left: 1px solid var(--border-soft); }
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet-grab { display: none; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 22px 24px 12px; padding-top: max(22px, env(safe-area-inset-top));
}
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--text-strong); }
:root[data-theme='nocturne'] .sheet-head h2 { font-weight: 400; font-style: italic; font-size: 34px; }
.sheet-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  margin: 0 24px; padding: 4px; border-radius: 999px; background: var(--chip-bg);
}
.sheet-tabs button {
  min-height: 40px; border: 0; border-radius: 999px; background: transparent;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
}
.sheet-tabs button[aria-selected='true'] { background: var(--surface); color: var(--text-strong); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 36, 42, 0.12); }
:root[data-theme='nocturne'] .sheet-tabs { background: transparent; border-radius: 0; border-bottom: 1px solid var(--border-soft); padding: 0; gap: 0; }
:root[data-theme='nocturne'] .sheet-tabs button { border-radius: 0; border-bottom: 2px solid transparent; }
:root[data-theme='nocturne'] .sheet-tabs button[aria-selected='true'] { background: transparent; color: var(--accent); border-bottom-color: var(--accent); box-shadow: none; }
.sheet-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 18px 24px calc(32px + env(safe-area-inset-bottom));
}
.panel { display: flex; flex-direction: column; gap: 6px; }
.panel-intro { margin: 0 0 6px; font-size: 14px; color: var(--text-dim); }
.panel-note { font-size: 13px; color: var(--text-faint); margin: 4px 0 0; }
.panel-h3 { margin: 22px 0 8px; font-size: 16px; color: var(--text-strong); }
:root[data-theme='nocturne'] .panel-h3 { font-family: var(--font-display); font-weight: 400; font-size: 26px; }
.panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; }

/* pattern rows */
.prow { padding: 12px 0; border-bottom: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 8px; }
.prow-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prow-title { font-weight: 600; color: var(--text-strong); display: flex; align-items: center; gap: 10px; }
.prow-title small { font-weight: 400; color: var(--text-dim); font-size: 13px; }
.prow .swatch-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input {
  width: 64px; min-height: 40px; text-align: center; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text-strong); font-variant-numeric: tabular-nums;
}
:root[data-theme='nocturne'] .stepper input { background: transparent; font-family: var(--font-display); font-size: 22px; }
.stepper .step-btn { width: 40px; height: 40px; font-size: 18px; }
.prow input[type='range'] { width: 100%; }
.prow.featured { margin: 6px -10px; padding: 12px 10px; border-radius: 14px; background: var(--accent-soft); border-bottom: 0; }
.prow.off .prow-body { display: none; }
.hold-actions { display: flex; gap: 8px; }

input[type='range'] { accent-color: var(--accent); min-height: 28px; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--accent); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border-soft); cursor: pointer;
}
.t-title { display: block; font-weight: 600; color: var(--text-strong); }
.t-sub { display: block; font-size: 13px; color: var(--text-dim); margin-top: 2px; line-height: 1.45; }
:root[data-theme='nocturne'] .t-title { font-weight: 500; font-size: 16.5px; }

.switch {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 46px; height: 28px; border-radius: 999px; margin: 0;
  background: var(--border); position: relative; cursor: pointer; transition: background 0.2s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #ffffff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
:root[data-theme='nocturne'] .switch:checked::after { background: #1a1408; }

.field { margin: 10px 0 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 10px; }
.field legend { padding: 0 0 10px; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); font-weight: 600; }
.range-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; color: var(--text-strong); }
.range-label span { font-weight: 400; color: var(--text-dim); }
.inline-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; }
.num {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-dim); font-size: 13px;
}
:root[data-theme='nocturne'] .num { background: transparent; }
.num input { width: 64px; min-height: 38px; border: 0; background: transparent; text-align: right; color: var(--text-strong); font-variant-numeric: tabular-nums; outline: none; }
.num.small input { width: 48px; min-height: 32px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500;
}
:root[data-theme='nocturne'] .chip { background: transparent; border-radius: 16px; }
.chip[aria-pressed='true'] { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--text-strong); font-weight: 700; }

.seg { display: grid; gap: 4px; padding: 4px; border-radius: 14px; background: var(--chip-bg); }
.seg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg button {
  min-height: 48px; border: 0; border-radius: 10px; background: transparent; color: var(--text-dim);
  font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--text-strong); font-weight: 600; box-shadow: 0 1px 3px rgba(20, 36, 42, 0.12); }
:root[data-theme='nocturne'] .seg button[aria-pressed='true'] { background: rgba(240, 200, 143, 0.12); color: var(--accent); }
.swatch { width: 16px; height: 16px; border-radius: 50%; }
.swatch-dawn { background: radial-gradient(circle at 40% 35%, #ffffff, #5fb3ae); }
.swatch-noc { background: radial-gradient(circle at 40% 35%, #fff4e0, #f0c88f 50%, #9a6b3e); box-shadow: 0 0 0 2px #0b0c1a; }

/* sound */
.track-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.track-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer; min-width: 0;
}
:root[data-theme='nocturne'] .track-card { background: transparent; }
.track-card.selected { border: 2px solid var(--accent); background: var(--accent-soft); }
.track-card .tc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.track-card strong { font-size: 14.5px; color: var(--text-strong); line-height: 1.3; }
.track-card .tc-sub { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }
.track-card .tc-play {
  align-self: flex-start; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 13px;
}
:root[data-theme='nocturne'] .track-card .tc-play { background: transparent; }
.track-card input { width: 18px; height: 18px; margin: 0; flex: none; }
.track-card .tc-text { display: flex; flex-direction: column; gap: 2px; }

.envelope { margin: 10px 0 4px; }
.env-shape { display: flex; align-items: flex-end; height: 70px; border-bottom: 2px solid var(--border); }
.env-shape span { height: 100%; }
.env-in { flex: 0.8 1 0; background: linear-gradient(to top left, var(--seg-in) 50%, transparent 50%); }
.env-full { flex: 2.2 1 0; background: var(--seg-in); }
.env-out { flex: 2 1 0; background: linear-gradient(to top right, var(--seg-in) 50%, transparent 50%); }
.env-gap { flex: 0.3 1 0; background: repeating-linear-gradient(45deg, var(--surface-2) 0 4px, transparent 4px 8px); }
.envelope figcaption { display: flex; font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.envelope figcaption span:nth-child(1) { flex: 0.8 1 0; }
.envelope figcaption span:nth-child(2) { flex: 2.2 1 0; }
.envelope figcaption span:nth-child(3) { flex: 2 1 0; }
.envelope figcaption span:nth-child(4) { flex: 0.3 1 0; white-space: nowrap; }

/* presets */
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.preset-card {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 16px; text-align: left;
  border: 1px solid var(--border-soft); background: var(--surface); color: var(--text);
}
:root[data-theme='nocturne'] .preset-card { background: transparent; }
.preset-card[aria-pressed='true'] { border: 2px solid var(--accent); background: var(--accent-soft); }
.preset-card .pc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.preset-card strong { font-size: 15px; color: var(--text-strong); }
:root[data-theme='nocturne'] .preset-card strong { font-family: var(--font-display); font-weight: 400; font-size: 22px; }
.preset-card .pc-counts { font-size: 12.5px; color: var(--text-dim); white-space: nowrap; }
.preset-card .pc-blurb { font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.mini-bars { display: flex; gap: 3px; height: 8px; }
.mini-bars span { border-radius: 4px; min-width: 3px; }
.mini-bars .k-in { background: #7cc9c2; }
.mini-bars .k-top { background: #5bcf9f; }
.mini-bars .k-hold { background: #d8c48f; }
.mini-bars .k-out { background: #9ea2dc; }
.my-presets { display: flex; flex-direction: column; gap: 8px; }
.my-preset {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 6px 6px 16px; border-radius: 16px; border: 1px solid var(--border-soft); background: var(--surface);
}
:root[data-theme='nocturne'] .my-preset { background: transparent; }
.my-preset.active { border-color: var(--accent); }
.my-preset .mp-load { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; text-align: left; color: var(--text); display: flex; flex-direction: column; justify-content: center; }
.my-preset .mp-load strong { color: var(--text-strong); }
.my-preset .mp-load span { font-size: 13px; color: var(--text-dim); }
.my-preset .mp-del { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-dim); font-size: 18px; }
.empty-note { font-size: 14px; color: var(--text-dim); margin: 0; }
.save-form { display: flex; gap: 8px; padding: 6px 6px 6px 14px; margin-top: 10px; border-radius: 16px; border: 1px dashed var(--border); align-items: center; }
.save-form input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--text); outline: none; font-size: 16px; }

/* ---------- home-screen install ---------- */

.install-card {
  position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: start;
  padding: 16px; border-radius: 22px; background: var(--sheet-bg); color: var(--text);
  border: 1px solid var(--border-soft); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  animation: slide-up 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.install-icon { width: 52px; height: 52px; border-radius: 13px; }
.install-text { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; color: var(--text-dim); }
.install-text > strong { color: var(--text-strong); font-size: 16px; }
:root[data-theme='nocturne'] .install-text > strong { font-family: var(--font-display); font-weight: 400; font-style: italic; font-size: 22px; }
.install-text ol { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--text); }
.install-text ol strong { color: var(--text-strong); font-weight: 600; }
.inline-icon {
  display: inline-block; width: 18px; height: 18px; vertical-align: -3px; margin: 0 2px;
  fill: none; stroke: var(--accent-line); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.inline-icon circle { fill: var(--accent-line); stroke: none; }
.install-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.install-open {
  display: flex; align-items: center; gap: 14px; width: 100%; margin: 6px 0 0; padding: 14px;
  border-radius: 16px; border: 1px solid var(--border); background: var(--accent-soft); color: var(--text); text-align: left;
}
.install-open img { border-radius: 10px; flex: none; }
.standalone .topbar { padding-top: max(14px, env(safe-area-inset-top)); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); max-width: calc(100vw - 32px);
  padding: 10px 18px; border-radius: 999px; background: var(--text-strong); color: var(--bg);
  font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.25s; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- floating (document picture-in-picture) window ---------- */

body.pip { overflow: hidden; }
body.pip .stage { height: 100vh; justify-content: center; gap: 8px; padding: 12px; }
body.pip .orb-wrap { width: min(70vmin, 230px); }
:root[data-theme='nocturne'] body.pip .orb-wrap { width: min(52vmin, 170px); }
body.pip .word { font-size: 40px; }
body.pip .sub { font-size: 13px; }
body.pip .count { font-size: 56px; }
body.pip .phase-label, body.pip .hint { font-size: 12px; }
body.pip .mini-controls { display: flex; gap: 6px; align-items: center; justify-content: center; }
.mini-btn {
  min-height: 36px; padding: 0 16px; border-radius: 999px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600;
}
.mini-btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.mini-clock { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  .tab { padding: 9px 12px; }
}

@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; padding: 14px 16px 8px; padding-top: max(14px, env(safe-area-inset-top)); gap: 10px; }
  .tech-tabs { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .tech-tabs-inner { width: 100%; }
  .tech-label { order: 3; flex-basis: 100%; padding: 4px 10px; }
  .brand { flex: 1; }
  .hide-mobile { display: none !important; }
  .pill-btn span { display: none; }
  .pill-btn { width: 44px; padding: 0; }
  .session { padding: 4px 16px 24px; gap: 18px; min-height: calc(100dvh - 120px); }
  .learn, .techniques { padding: 0 16px; }
  .site-footer { padding-left: 16px; padding-right: 16px; }

  /* settings become a bottom sheet */
  .sheet {
    top: auto; left: 0; width: 100vw; height: min(88dvh, 760px);
    border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    animation: slide-up 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  :root[data-theme='nocturne'] .sheet { border-left: 0; border-top: 1px solid var(--border-soft); }
  .sheet-grab { display: block; align-self: center; width: 40px; height: 5px; border-radius: 5px; background: var(--border); margin-top: 10px; }
  .sheet-head { padding: 10px 18px 10px; }
  .sheet-tabs { margin: 0 18px; }
  .sheet-body { padding: 14px 18px calc(28px + env(safe-area-inset-bottom)); }
  .track-cards { grid-template-columns: 1fr; }
  .track-card { flex-direction: row; align-items: center; }
  .track-card .tc-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
  .preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@keyframes slide-up { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 480px) {
  .primary-btn { min-width: 0; flex: 1; }
  .primary-btn.small { flex: none; }
  .prow-title small { display: none; }
  .controls { width: 100%; }
  .tseg { min-height: 58px; }
  .summary-cards { gap: 6px; }
  .sum-card { padding: 12px; }
  .sum-card strong { font-size: 24px; }
  .preset-grid { grid-template-columns: 1fr; }
  .timeline-head span:first-child { display: none; }
  .timeline-head { justify-content: center; }
}

@media (max-height: 700px) and (min-width: 861px) {
  .orb-wrap { width: min(360px, 46vh); }
  :root[data-theme='nocturne'] .orb-wrap { width: min(320px, 38vh); }
}

/* phones in landscape and other short screens: orb beside the words */
@media (max-height: 520px) and (orientation: landscape) {
  .topbar { flex-wrap: nowrap; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
  .tech-tabs, .tech-label { order: 0; flex-basis: auto; }
  .session { min-height: calc(100dvh - 64px); gap: 10px; padding: 0 16px 12px; }
  .stage { flex-direction: row; justify-content: center; gap: 32px; }
  .orb-wrap, :root[data-theme='nocturne'] .orb-wrap { width: min(56dvh, 240px); }
  .readout-below { align-items: flex-start; text-align: left; max-width: 46vw; }
  .word { font-size: clamp(40px, 11dvh, 60px); }
  .sub { font-size: 15px; }
  .count { font-size: 48px; }
  .controls { width: auto; }
  .primary-btn { flex: none; min-width: 150px; min-height: 46px; }
  .ghost-btn { min-height: 46px; }
  .tseg { min-height: 50px; padding: 6px 10px; }
  .scroll-cue { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .sheet, .sheet-backdrop { animation: none; }
}
