@font-face {
  font-family: 'Soz Wordmark';
  src: url('/wordmark-italic.woff') format('woff');
  font-style: italic;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --yellow: #ffe14f;
  --navy: #192853;
  --ice: #ecf4f7;
  --bg: var(--ice);
  --ink: var(--navy);
  --muted: #505e78;
  --quiet: #52627b;
  --surface: #f3f8fa;
  --glass: rgb(247 251 253 / .54);
  --button: rgb(255 255 255 / .43);
  --hover: rgb(255 255 255 / .88);
  --rim: rgb(255 255 255 / .94);
  --edge: rgb(37 59 101 / .18);
  --line: rgb(31 51 89 / .14);
  --shine: rgb(255 255 255 / .93);
  --shadow: rgb(27 46 80 / .12);
  --shade: rgb(27 46 80 / .07);
  --tint: rgb(25 40 83 / .065);
  --field: rgb(255 255 255 / .57);
  --focus: #365496;
  --primary: var(--yellow);
  --on-primary: var(--navy);
  --active-mode: rgb(255 255 255 / .78);
  --menu-glass: rgb(230 239 244 / .77);
  --menu-scrim: rgb(25 40 83 / .12);
  --menu-shadow: rgb(29 48 78 / .24);
  --featured-glass: linear-gradient(107deg,rgb(255 230 112 / .65),rgb(255 246 198 / .63) 60%,rgb(255 252 233 / .52));
  --featured-edge: rgb(164 140 55 / .30);
  --theme-lens: rgb(255 255 255 / .90);
  --glaze: linear-gradient(150deg,rgb(255 255 255 / .48),transparent 34%,transparent 68%,rgb(255 255 255 / .19));
  --sky: radial-gradient(ellipse at 91% 2%,rgb(166 196 215 / .35),transparent 48%),radial-gradient(ellipse at 9% 57%,rgb(255 225 79 / .16),transparent 36%);
  --desk-light: radial-gradient(ellipse at 0% 105%, rgb(255 225 79 / .13), transparent 38%),radial-gradient(ellipse at 100% 6%, rgb(171 205 221 / .35), transparent 58%);
  --modal-back: rgb(18 30 58 / .25);
  --danger: #842e36;
  --glass-shadow: inset 0 1px 1px var(--shine),inset 0 -1px 1px var(--line),0 2px 4px var(--shade);
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
:root[data-theme=ocean] {
  color-scheme: dark;
  --bg: var(--navy);
  --ink: var(--ice);
  --muted: #c3d0e3;
  --quiet: #b3c5dc;
  --surface: #25375e;
  --glass: rgb(54 74 109 / .53);
  --button: rgb(202 224 239 / .09);
  --hover: rgb(205 229 246 / .17);
  --rim: rgb(232 246 255 / .38);
  --edge: rgb(8 20 46 / .52);
  --line: rgb(213 231 245 / .18);
  --shine: rgb(235 249 255 / .20);
  --shadow: rgb(4 13 33 / .32);
  --shade: rgb(4 13 33 / .18);
  --tint: rgb(223 237 250 / .09);
  --field: rgb(16 30 58 / .38);
  --focus: var(--yellow);
  --active-mode: rgb(230 242 250 / .19);
  --menu-glass: rgb(39 58 88 / .81);
  --menu-scrim: rgb(6 15 34 / .21);
  --menu-shadow: rgb(7 15 32 / .48);
  --featured-glass: linear-gradient(108deg,rgb(255 225 100 / .19),rgb(255 239 165 / .085) 67%,rgb(255 245 206 / .045));
  --featured-edge: rgb(255 228 120 / .35);
  --theme-lens: rgb(210 232 248 / .21);
  --glaze: linear-gradient(150deg,rgb(230 246 255 / .10),transparent 36%,transparent 70%,rgb(222 244 255 / .04));
  --sky: radial-gradient(ellipse at 88% 3%,rgb(105 151 171 / .33),transparent 48%),radial-gradient(ellipse at 6% 68%,rgb(108 128 132 / .16),transparent 44%);
  --desk-light: radial-gradient(ellipse at 100% 0%, rgb(171 212 222 / .14), transparent 65%);
  --modal-back: rgb(8 16 38 / .48);
  --danger: #ffc8c5;
}
*,*::before,*::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh;
  margin: 0; background: var(--sky),var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.scroll-lock { overflow: hidden; }
button,input,textarea,select { font: inherit; color: inherit; }
button,a,summary,input,textarea { -webkit-tap-highlight-color: transparent; }
button,a,summary { touch-action: manipulation; }
button { border: 0; padding: 0; background: transparent; cursor: pointer; }
a { text-decoration: none; color: inherit; }
button:disabled { cursor: wait; opacity: .64; }
button, a, summary { transition: background-color 150ms,box-shadow 150ms,color 150ms,transform 150ms; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { color: var(--navy); background: var(--yellow); }
svg { display: block; width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.65; flex: none; }
[data-icon] { display: inline-grid; place-items: center; flex: none; }
h1,h2,h3,h4,p { margin: 0; }
h1,h2,h3,h4 { text-wrap: pretty; }
button strong { font-weight: 580; }
:root { --page-gutter: 2.5rem; --header-height: 5.25rem; }
.shell { width: min(calc(100% - var(--page-gutter) - var(--page-gutter)),68rem); margin-inline: auto; }
main { flex: 1 0 auto; }
/* The skip link focuses content inside the page, never a viewport-sized frame. */
#main:focus { outline: none; }
.sr-only,.skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; left: .8rem; top: .8rem; background: var(--surface); padding: .65rem 1rem; border-radius: 1rem; }
.muted,.small,.settings-note,.count-label,.intro,.session-guide,.info-copy,.session-instruction,.result-subtitle { color: var(--muted); }
.small,.settings-note,.count-label { font-size: .8125rem; line-height: 1.5; }
.site-header { flex: none; padding-top: env(safe-area-inset-top,0px); }
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.brand {
  display: inline-flex; align-items: center; gap: .62rem; width: fit-content;
  font-family: 'Soz Wordmark',Georgia,'Times New Roman',serif; font-style: italic; font-weight: 700;
  font-size: clamp(2.125rem,3.6vw,2.625rem); line-height: 1.08; letter-spacing: -.025em;
}
.brand-name {
  display: flex; flex-direction: column; align-items: flex-start; gap: .02em;
  white-space: nowrap; line-height: 1.02;
}
.brand-descriptor { font-size: .67em; line-height: 1.05; }
.brand-mark { display: block; flex: none; width: 2.4rem; height: 2.4rem; border-radius: .86rem; background: var(--yellow); box-shadow: 0 2px 5px #19285313; }
.brand-period { color: inherit; }
[data-theme=ocean] .brand-period { color: var(--yellow); }
.menu-trigger,.theme-switch {
  color: var(--ink); background: var(--glaze),var(--button); border: 1px solid var(--edge);
  border-top-color: var(--rim); border-left-color: var(--rim); border-radius: 99rem; box-shadow: var(--glass-shadow);
}
.menu-trigger {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.875rem; padding: .52rem 1rem; font-size: .94rem; font-weight: 550;
}
.menu-trigger svg { width: 1.12rem; height: 1.12rem; }
.theme-switch { position: relative; isolation: isolate; display: inline-grid; grid-template-columns: repeat(2,2.75rem); }
.theme-switch::before {
  content: ''; position: absolute; pointer-events: none; top: .19rem; bottom: .19rem; left: .19rem;
  width: calc(50% - .25rem); border-radius: inherit; background: var(--glaze),var(--theme-lens);
  border: 1px solid var(--edge); border-top-color: var(--rim); box-shadow: var(--glass-shadow);
  transition: transform .2s ease;
}
:root[data-theme=ocean] .theme-switch::before { transform: translateX(calc(100% + .125rem)); }
.theme-switch button {
  position: relative; display: grid; place-items: center; width: 100%; min-height: 2.75rem;
  color: var(--muted); border-radius: inherit;
}
.theme-switch button svg { width: 1.13rem; height: 1.13rem; }
.theme-switch [aria-pressed=true] { color: var(--ink); }
:root[data-theme=ocean] .theme-switch [aria-pressed=true] { color: var(--yellow); }
.theme-switch button:focus-visible { outline-offset: -2px; }
.icon-btn,.btn-light,.text-link,.reading-button {
  background: var(--glaze),var(--button); color: var(--ink);
  border: 1px solid var(--edge); border-top-color: var(--rim); border-left-color: var(--line); box-shadow: var(--glass-shadow);
}
.icon-btn,.btn,.text-link { display: inline-flex; justify-content: center; align-items: center; gap: .55rem; line-height: 1.25; }
.icon-btn { width: 2.72rem; height: 2.72rem; padding: .55rem; border-radius: 50%; flex: none; }
.icon-btn.theme-compact { display: none; width: 2.875rem; height: 2.875rem; }
.icon-btn svg { width: 1.12rem; height: 1.12rem; }
.icon-btn.active { color: var(--navy); background: var(--yellow); border-color: rgb(25 40 83 / .12); }
.icon-btn.active svg { fill: rgb(25 40 83 / .10); }
.btn { min-height: 3rem; border-radius: 1.65rem; padding: .78rem 1.35rem; font-size: .9375rem; font-weight: 600; }
.btn-primary {
  color: var(--on-primary); background: linear-gradient(180deg,rgb(255 255 255 / .20),transparent 58%),var(--primary);
  border: 1px solid rgb(139 110 7 / .24); border-top-color: #fff19d;
  box-shadow: inset 0 1px 1px #fff6bd,inset 0 -1px 2px #dcb83570,0 3px 8px rgb(80 68 15 / .12);
}
.btn:active:not(:disabled),.icon-btn:active:not(:disabled),.menu-row:active,.text-link:active { transform: translateY(1px); }
.text-link { min-height: 2.67rem; padding: .6rem .95rem; border-radius: 2rem; font-size: .875rem; font-weight: 500; }
.text-link svg,.btn svg { width: 1.05rem; height: 1.05rem; }
#view-practice {
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height) - env(safe-area-inset-top,0px));
  display: grid; place-items: center; padding: 1.25rem 0 max(1.25rem,env(safe-area-inset-bottom,0px));
}
.exercise-panel { width: 100%; min-width: 0; }
.launch-screen {
  position: relative; isolation: isolate; display: grid; place-items: center;
  min-height: 13rem; width: 100%; transform: translateY(calc(var(--header-height) * -.5));
}
.launch-screen::before {
  position: absolute; content: ''; z-index: -1; pointer-events: none;
  width: min(100%,31rem); height: 17rem; top: 50%; left: 50%; transform: translate(-50%,-64%);
  background: radial-gradient(ellipse,rgb(255 255 255 / .47),transparent 69%);
}
[data-theme=ocean] .launch-screen::before { background: radial-gradient(ellipse,rgb(153 194 215 / .13),transparent 69%); }
.launch-art {
  position: absolute; width: clamp(8.25rem,21vw,12.1rem); max-height: min(22svh,10.2rem);
  bottom: calc(50% + 2.95rem); height: auto; object-fit: contain; pointer-events: none;
}
.launch-button {
  width: min(calc(100% - .5rem),23rem); min-height: clamp(4rem,7.8vw,4.8rem); padding: .75rem 1.35rem;
  gap: .77rem; border-radius: 99rem; font-weight: 610; line-height: 1.15;
  font-size: clamp(1.3rem,3vw,1.62rem); letter-spacing: -.03em;
  box-shadow: inset 0 2px 2px #fff4b3,inset 0 -2px 3px #c09b264f,0 7px 20px -6px #81733748;
}
.launch-button svg { width: 1.4rem; height: 1.4rem; stroke-width: 1.8; }
.launch-caption { position: absolute; top: calc(50% + 3.15rem); text-align: center; font-size: .9rem; color: var(--muted); }
.topic-screen { max-width: 45rem; width: 100%; margin-inline: auto; text-align: center; padding: 1.5rem 0; }
.prompt-card { min-width: 0; }
.topic-tools {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; column-gap: .7rem;
}
.topic-save {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center;
  gap: .36rem; min-height: 2.75rem; min-width: 6.25rem; padding: .4rem .7rem;
  border-radius: 2rem; color: var(--ink); font-size: .875rem; line-height: 1.25; font-weight: 550;
}
.topic-save::before {
  content: ''; position: absolute; z-index: -1; inset: .3rem 0; border-radius: inherit;
  background: var(--glaze),var(--button); border: 1px solid var(--line); border-top-color: var(--rim);
  box-shadow: var(--glass-shadow);
}
.topic-save svg { width: .98rem; height: .98rem; }
.topic-save[aria-pressed=true]::before { background: var(--featured-glass); border-color: var(--featured-edge); }
[data-action=favorite][aria-pressed=true] svg { fill: currentColor; }
.topic-mode { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.word-line { margin: .5rem auto 1.1rem; max-width: 100%; }
#prompt-word { display: inline-block; max-width: 100%; line-height: 1.2; font-size: clamp(2.1rem,6.2vw,4.3rem); letter-spacing: -.055em; font-weight: 610; vertical-align: top; overflow-wrap: anywhere; }
#prompt-text,.session-question { white-space: pre-line; overflow-wrap: anywhere; }
#prompt-text { margin: 0 auto; max-width: 42rem; font-size: clamp(1.15rem,2.2vw,1.58rem); line-height: 1.46; text-wrap: pretty; letter-spacing: -.018em; }
#prompt-hint,.session-guide { margin: .65rem auto 0; max-width: 39rem; font-size: 1rem; line-height: 1.55; color: var(--muted); }
.reading-button { min-height: 2.75rem; padding: .5rem .98rem; font-size: .94rem; margin-top: .95rem; }
.practice-bottom { margin-top: 1.8rem; }
.timing-pill { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: .48rem; color: var(--muted); font-size: .89rem; line-height: 1.5; }
.timing-pill b { font-weight: 550; }
.timing-pill svg { width: 1rem; height: 1rem; }
.timing-pill i { width: .19rem; height: .19rem; background: currentColor; border-radius: 50%; opacity: .58; }
.exercise-actions,.session-tools,.result-actions { display: flex; justify-content: center; align-items: center; gap: .62rem; flex-wrap: wrap; margin-top: .95rem; }
.exercise-actions .btn { min-height: 3.35rem; }
.exercise-actions .btn-primary { min-width: min(100%,13rem); }
.is-spinning .practice-bottom,.is-spinning .topic-tools { visibility: hidden; }
.white-panel,.stat-card,.saved-card,.empty-state {
  background: var(--glaze),var(--glass); border: 1px solid var(--edge);
  border-top-color: var(--rim); border-left-color: var(--rim);
  box-shadow: inset 0 1px 2px var(--shine),inset 0 -1px 1px var(--line),0 12px 30px -13px var(--shadow);
}
.reel-slot { display: inline-block; position: relative; overflow: hidden; overflow: clip; height: 1.2em; vertical-align: top; }
.reel-width { visibility: hidden; }
.reel-rail { display: block; position: absolute; inset: 0 0 auto; will-change: transform; }
.reel-rail > span { width: 100%; display: block; height: 1.2em; line-height: 1.2; text-align: center; }
.is-spinning #prompt-word { white-space: nowrap; }
.page-heading { padding: clamp(2.4rem,7vw,4.5rem) 0 1.5rem; }
.page-heading h1 { font-size: clamp(2.3rem,5vw,3.9rem); letter-spacing: -.055em; font-weight: 600; line-height: 1.06; }
.page-heading .intro { margin-top: .75rem; font-size: 1rem; line-height: 1.5; }
.stats-grid,.saved-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem; }
.stat-card,.saved-card,.white-panel,.empty-state { border-radius: 1.4rem; padding: 1.3rem; }
.stat-card > span,.history-copy p,.timer-subtitle { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.stat-card strong { display: block; font-size: 2rem; font-weight: 600; margin-top: 1rem; letter-spacing: -.05em; }
.stat-card small { font-size: .875rem; letter-spacing: 0; font-weight: 500; }
.white-panel { margin-top: 1.05rem; }
.section-heading,.saved-top { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.section-heading h2 { font-size: 1.4rem; font-weight: 590; letter-spacing: -.04em; }
.week-chart { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); align-items: end; gap: .55rem; min-height: 10.8rem; margin-top: .65rem; }
.chart-column { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .5rem; }
.chart-bar { background: var(--line); width: 48%; max-width: 3.1rem; border-radius: .4rem .4rem 0 0; }
.chart-column.today .chart-bar { background: var(--focus); }
.chart-day,.chart-value { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.history-heading { margin: 1.8rem 0 .8rem; }
#history-list,#favorites-list { margin-bottom: 2.5rem; }
.history-item { display: flex; align-items: center; gap: .8rem; }
.history-item { border-bottom: 1px solid var(--line); padding: .95rem .2rem; }
.history-copy { flex: 1; min-width: 0; }
.history-copy h3,.saved-card h3 { font-size: 1.04rem; font-weight: 520; line-height: 1.46; }
.history-copy p { margin-top: .35rem; }
.history-duration { font-size: .875rem; font-variant-numeric: tabular-nums; }
.direction-icon,.empty-icon,.result-check { display: inline-grid; place-items: center; border-radius: 50%; background: var(--tint); }
.direction-icon { width: 2.55rem; height: 2.55rem; }
.saved-grid { grid-template-columns: repeat(auto-fill,minmax(min(100%,16.7rem),1fr)); margin-top: 1rem; }
.saved-card { display: flex; flex-direction: column; gap: .9rem; align-items: flex-start; }
.saved-top { width: 100%; }
.prompt-type { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .86rem; }
.saved-card .btn { margin-top: auto; }
.empty-state { grid-column: 1/-1; width: 100%; display: grid; justify-items: center; gap: .7rem; padding: 2.2rem 1.1rem; text-align: center; }
.empty-state h2 { font-size: 1.36rem; font-weight: 580; }
.empty-state p { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.empty-icon,.result-check { width: 3rem; height: 3rem; }
.empty-state .btn { margin-top: .4rem; }
.modal {
  max-width: min(100% - 2rem,36rem); width: 36rem; max-height: calc(100dvh - 2.4rem);
  margin: auto; padding: 1.65rem; color: var(--ink); border-radius: 1.7rem;
  border: 1px solid var(--edge); border-top-color: var(--rim); border-left-color: var(--rim);
  background: var(--glaze),var(--menu-glass); box-shadow: inset 0 1px 1px var(--shine),inset 0 -1px 1px var(--line),0 16px 48px -12px var(--menu-shadow);
  -webkit-backdrop-filter: blur(28px) saturate(135%); backdrop-filter: blur(28px) saturate(135%);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain; overflow: auto;
}
.modal::backdrop { background: var(--modal-back); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: .35; transform: translateY(.35rem); } to { opacity: 1; transform: none; } }
.modal-top { display: flex; align-items: center; justify-content: space-between; gap: .9rem; margin-bottom: 1.2rem; }
.modal-top > h2 { font-size: clamp(1.35rem,2.6vw,1.75rem); line-height: 1.23; letter-spacing: -.039em; font-weight: 610; }
.modal-top [tabindex="-1"]:focus { outline: none; }
.modal-top .dialog-close,.menu-top #menu-back {
  position: relative; isolation: isolate; display: grid; place-items: center; flex: none;
  width: max(44px,2.75rem); height: max(44px,2.75rem); margin-inline-start: auto; padding: 0;
  border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--ink);
}
.modal-top .dialog-close::before,.menu-top #menu-back::before {
  content: ''; position: absolute; z-index: -1; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--button); border: 1px solid var(--line); border-top-color: var(--rim);
}
.modal-top .dialog-close svg { width: 1rem; height: 1rem; stroke-width: 1.8; }
.menu-top #menu-back { margin: 0; }
.menu-top #menu-back svg { width: .87rem; height: .87rem; }
.modal-top .dialog-close:focus-visible,.menu-top #menu-back:focus-visible { outline: none; }
.modal-top .dialog-close:focus-visible::before,.menu-top #menu-back:focus-visible::before {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
/* The glass panel aligns with the menu button at every viewport width. */
.modal.menu-dialog {
  --menu-top: calc(var(--header-height) + env(safe-area-inset-top,0px) - .25rem);
  --menu-right: max(var(--page-gutter),env(safe-area-inset-right,0px),calc((100% - 68rem) / 2));
  position: fixed; inset: var(--menu-top) var(--menu-right) auto auto; margin: 0;
  width: 18.25rem; max-width: calc(100% - var(--menu-right) - var(--page-gutter));
  max-height: calc(100vh - var(--menu-top) - .65rem);
  max-height: calc(100dvh - var(--menu-top) - max(.65rem,env(safe-area-inset-bottom,0px)));
  padding: .6rem; border-radius: 1.55rem; background: var(--glaze),var(--menu-glass);
  box-shadow: inset 0 1px 1px var(--shine),inset 0 -1px 1px var(--line),0 14px 40px -12px var(--menu-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(145%); backdrop-filter: blur(24px) saturate(145%);
  transform-origin: top right; overflow: hidden;
}
.menu-dialog[open] { display: flex; flex-direction: column; animation: menu-reveal .17s ease-out; }
.menu-pages { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.menu-pages :is(button,a,summary):focus-visible { outline-offset: -3px; }
@keyframes menu-reveal { from { opacity: .2; transform: translateY(-.25rem) scale(.98); } to { opacity: 1; transform: none; } }
.menu-dialog::backdrop { background: var(--menu-scrim); -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-top { flex: none; gap: .28rem; min-height: 2.75rem; margin: 0 0 .2rem; }
.menu-top h2 { flex: 1; padding-left: .72rem; font-size: 1.05rem; letter-spacing: -.025em; line-height: 1.3; }
.menu-top #menu-back + h2 { padding-left: 0; }
.menu-top #menu-back[hidden] + h2 { padding-left: .72rem; }
.menu-list,.menu-options { display: grid; }
.menu-list { margin-top: .25rem; }
.menu-utilities { margin: .27rem .18rem 0; padding-top: .27rem; border-top: 1px solid var(--line); }
.menu-utilities .menu-row { padding-inline: .55rem; }
.menu-row {
  display: flex; align-items: center; gap: .72rem; padding: .5rem .73rem; min-height: 2.75rem; width: 100%;
  border: 1px solid transparent; border-radius: .85rem; text-align: left; line-height: 1.35; font-size: .96rem;
}
.menu-row > [data-icon]:first-child { color: var(--muted); }
.menu-row svg { width: 1.13rem; height: 1.13rem; }
.menu-value,.mode-check { margin-left: auto; }
.menu-value { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.menu-chevron svg,.mode-check svg { width: .88rem; height: .88rem; }
.menu-chevron { color: var(--muted); }
.mode-check { color: var(--ink); visibility: hidden; }
.menu-row[aria-pressed=true] .mode-check { visibility: visible; }
.menu-options [aria-pressed=true],.menu-row[aria-current=page] {
  background: var(--glaze),var(--active-mode); border-color: var(--line); border-top-color: var(--rim); box-shadow: var(--glass-shadow);
}
.menu-row[aria-pressed=true] > [data-icon]:first-child { color: var(--ink); }
[data-theme=ocean] .menu-row[aria-pressed=true] > [data-icon]:first-child { color: var(--yellow); }
.menu-row.mode-link {
  gap: .72rem; padding: .66rem .75rem; border-radius: 1.03rem;
  background: var(--featured-glass); border: 1px solid var(--featured-edge);
  box-shadow: inset 0 1px 1px var(--shine),0 2px 5px var(--shade);
}
.mode-link > .mode-icon:first-child {
  width: 2.26rem; height: 2.26rem; border-radius: .75rem; color: var(--navy);
  background: linear-gradient(145deg,#fff3a7,var(--yellow) 75%);
  box-shadow: inset 0 1px 1px #fffae4,0 2px 4px rgb(103 81 14 / .14);
}
.mode-icon svg { width: 1.22rem; height: 1.22rem; stroke-width: 1.8; }
.mode-copy { display: grid; gap: .08rem; min-width: 0; }
.mode-copy strong { color: var(--ink); font-size: 1.075rem; font-weight: 670; letter-spacing: -.02em; }
.mode-copy > span { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.mode-link .menu-chevron { margin-left: auto; }
.info-copy,.reading-copy { font-size: 1rem; line-height: 1.62; }
.info-copy p + p,.reading-copy p + p { margin-top: .82rem; }
.reading-copy p { color: var(--ink); }
.reading-copy h3,.reading-copy h4 { font-size: 1.04rem; line-height: 1.45; }
.reading-copy h3:not(:first-child),.reading-copy h4:not(:first-child) { margin-top: 1.15rem; }
.reading-copy h3 + p,.reading-copy h4 + p { margin-top: .5rem; }
.reading-copy { padding-bottom: .35rem; }
.search-wrap { position: relative; display: flex; align-items: center; background: var(--field); border: 1px solid var(--line); box-shadow: inset 0 1px 2px var(--shade); border-radius: 1rem; }
.search-wrap > [data-icon] { margin-left: .95rem; color: var(--muted); }
.search-wrap input { width: 100%; border: 0; padding: .82rem .75rem; background: transparent; font-size: 1rem; min-height: 2.85rem; border-radius: inherit; }
.search-wrap:focus-within { outline: 2px solid var(--focus); }
.search-wrap input:focus { outline: none; }
input::placeholder,textarea::placeholder { color: var(--quiet); opacity: 1; }
.setting-row {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center;
  gap: .6rem; padding: .53rem .58rem; min-height: 3.4rem; cursor: pointer; border-radius: .85rem;
}
.setting-icon {
  width: 1.82rem; height: 1.82rem; border-radius: .6rem; color: var(--muted);
  background: var(--tint); box-shadow: inset 0 1px 0 var(--line);
}
.setting-icon svg { width: 1rem; height: 1rem; }
.setting-row strong { display: block; font-size: .92rem; line-height: 1.3; font-weight: 570; letter-spacing: -.012em; }
.setting-row small { display: block; font-size: .77rem; line-height: 1.36; color: var(--muted); margin-top: .16rem; }
.setting-row input {
  appearance: none; -webkit-appearance: none; margin: 0; width: 2.18rem; height: 1.3rem; position: relative;
  border-radius: 1rem; border: 1px solid var(--edge); background: var(--tint);
  box-shadow: inset 0 1px 2px var(--shade); cursor: pointer;
}
.setting-row input::before {
  content: ''; position: absolute; width: .91rem; height: .91rem; left: .13rem; top: 50%;
  transform: translateY(-50%); border-radius: 50%; background: white; box-shadow: 0 1px 3px rgb(20 35 64 / .32);
  transition: transform .16s;
}
.setting-row input:checked { background: var(--yellow); border-color: #d9bb37; }
.setting-row input:checked::before { transform: translate(.88rem,-50%); background: var(--navy); }
.menu-footnote {
  display: flex; align-items: flex-start; gap: .5rem; margin: .35rem .3rem 0; padding: .67rem .3rem .32rem;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; line-height: 1.45;
}
.menu-footnote svg { width: .9rem; height: .9rem; margin-top: .1rem; }
.menu-detail { border-radius: .85rem; }
.menu-detail summary { list-style: none; cursor: pointer; font-size: .92rem; }
.menu-detail summary::-webkit-details-marker { display: none; }
.disclosure-arrow { margin-inline-start: auto; color: var(--quiet); }
.disclosure-arrow svg { width: .8rem; height: .8rem; transition: transform .16s; }
.menu-detail[open] { background: var(--button); box-shadow: inset 0 0 0 1px var(--line); }
.menu-detail[open] .disclosure-arrow svg { transform: rotate(180deg); }
.menu-detail p { padding: 0 .9rem .8rem; font-size: .855rem; line-height: 1.53; color: var(--muted); }
.menu-detail + .menu-detail { margin-top: .12rem; }
.menu-start { width: 100%; min-height: 2.75rem; margin-top: .55rem; font-size: .93rem; }
.menu-start svg { width: .95rem; height: .95rem; }
.record-option,.self-review label { display: flex; align-items: center; gap: .78rem; font-size: 1rem; line-height: 1.4; }
.record-option small { display: block; font-size: .875rem; color: var(--muted); margin-top: .22rem; line-height: 1.4; }
.settings-note { margin-top: 1rem; }
.session-step,.session-category { font-size: .8125rem; color: var(--muted); font-weight: 550; line-height: 1.4; }
.session-category { margin-bottom: .4rem; }
.session-question,.result-title { font-weight: 555; font-size: clamp(1.38rem,2.5vw,1.75rem); line-height: 1.32; letter-spacing: -.034em; }
.timer-ring { --progress: 1; position: relative; width: 8.5rem; height: 8.5rem; margin: 1.2rem auto .7rem; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(from 0turn,var(--navy) 0 calc(var(--progress)*1turn),var(--line) 0 1turn); }
[data-theme=ocean] .timer-ring { background: conic-gradient(from 0turn,var(--yellow) 0 calc(var(--progress)*1turn),var(--line) 0 1turn); }
.timer-inner { width: calc(100% - .45rem); height: calc(100% - .45rem); border-radius: 50%; background: var(--surface); box-shadow: inset 0 1px 1px var(--shine); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .15rem; }
.timer-value { font-weight: 550; font-size: 2.15rem; letter-spacing: -.065em; font-variant-numeric: tabular-nums; }
.timer-subtitle { font-size: .78rem; }
.session-instruction,.result-subtitle { font-size: 1rem; line-height: 1.49; text-align: center; }
.notes-label { display: block; font-size: .875rem; margin: .95rem 0 .4rem; }
.notes-field { background: var(--field); border: 1px solid var(--line); border-radius: .9rem; width: 100%; min-height: 3.3rem; resize: vertical; padding: .65rem .8rem; font-size: 1rem; }
.record-option { margin-top: .75rem; }
.record-option input,.self-review input { width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--navy); }
[data-theme=ocean] .record-option input,[data-theme=ocean] .self-review input { accent-color: var(--yellow); }
.session-tools,.result-actions { justify-content: center; }
.session-tools .icon-btn { width: 3rem; height: 3rem; }
.record-indicator { width: fit-content; margin: .75rem auto; display: flex; align-items: center; gap: .45rem; font-size: .875rem; color: var(--danger); }
.record-indicator .dot { width: .5rem; height: .5rem; background: currentColor; border-radius: 50%; }
.no-record { color: var(--muted); }
.no-record .dot { display: none; }
.repeat-counter { text-align: center; margin: .9rem 0; }
.repeat-counter p { font-size: .875rem; color: var(--muted); line-height: 1.5; }
.counter-controls { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: .6rem; }
.counter-controls strong { min-width: 2ch; font-variant-numeric: tabular-nums; }
.result-check { margin: .2rem auto .6rem; display: grid; color: var(--navy); background: var(--yellow); }
.result-title,.result-subtitle { text-align: center; }
.result-subtitle { margin-top: .45rem; }
.result-stats { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: 1rem 0; text-align: center; }
.result-stats > div,.self-review { background: var(--tint); padding: .9rem; border-radius: 1rem; }
.result-stats strong,.result-stats span { display: block; }
.result-stats strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.result-stats span { font-size: .83rem; color: var(--muted); margin-top: .2rem; }
.self-review { margin-top: .85rem; }
.self-review h3 { font-size: 1.02rem; margin-bottom: .5rem; }
.self-review label { min-height: 2.1rem; }
.audio-player { display: grid; justify-items: center; gap: .5rem; margin: .8rem 0; }
.audio-player audio { max-width: 100%; }
.audio-player a { display: flex; gap: .55rem; align-items: center; color: var(--ink); font-size: .875rem; padding: .5rem; }
.microphone-error { margin-top: .8rem; color: var(--danger); font-size: .9375rem; line-height: 1.45; }
.microphone-error .btn { margin-top: .55rem; }
.confirm-modal { width: 25rem; }
.confirm-modal .result-actions { justify-content: flex-end; }
.toast { position: fixed; z-index: 10; bottom: max(1.35rem,env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%,.65rem); max-width: min(calc(100% - 2rem),32rem); width: max-content; opacity: 0; pointer-events: none; padding: .73rem 1.15rem; font-size: .9rem; line-height: 1.45; border-radius: 1.15rem; background: var(--navy); color: var(--ice); border: 1px solid #ecf4f766; box-shadow: 0 6px 25px var(--shadow); transition: opacity .15s,transform .15s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
@supports ((backdrop-filter:blur(10px)) or (-webkit-backdrop-filter:blur(10px))) {
  .menu-trigger,.theme-switch,.white-panel,.stat-card,.saved-card { -webkit-backdrop-filter: blur(16px) saturate(125%); backdrop-filter: blur(16px) saturate(125%); }
}
@media(hover:hover) {
  .btn-light:hover,.icon-btn:not(.active):where(:not(.dialog-close,#menu-back)):hover,.text-link:hover,.setting-row:hover,.menu-row:hover,.menu-trigger:hover,.theme-switch button:not([aria-pressed=true]):hover { background-color: var(--hover); }
  .modal-top .dialog-close:hover::before,.menu-top #menu-back:hover::before { background: var(--hover); }
  .topic-save:hover::before { background-color: var(--hover); }
  .btn-primary:hover { box-shadow: inset 0 1px 2px #fffacf,0 4px 13px rgb(105 88 16 / .20); }
}
@media (max-width:780px) {
  :root { --header-height: 4.5rem; --page-gutter: 1.25rem; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:650px) {
  :root { --header-height: 4.25rem; --page-gutter: 1rem; }
  .header-actions { gap: .42rem; }
  .brand-mark { width: 2.18rem; height: 2.18rem; border-radius: .76rem; }
  .launch-button { width: min(86%,20rem); }
  .launch-caption { top: calc(50% + 2.85rem); }
  .topic-screen { padding: 1rem .3rem; }
  .exercise-actions .btn { font-size: .95rem; padding-inline: 1.05rem; }
  .modal { padding: 1.2rem; max-height: calc(100dvh - 1.5rem); }
  .history-item { gap: .45rem; }
  .history-item > .direction-icon { display: none; }
}
@media (max-width:580px) {
  :root { --header-height: 4.875rem; }
  .header-inner { gap: .5rem; }
  .header-actions { flex-shrink: 0; }
  .brand { gap: .45rem; font-size: clamp(1.8rem,7.8vw,2.2rem); }
}
@media (max-width:500px) {
  .menu-trigger { padding-inline: .64rem; min-width: 2.875rem; }
  .menu-trigger > [data-icon] { display: none; }
}
@media (max-width:428px) {
  .theme-switch { display: none; }
  .icon-btn.theme-compact { display: inline-flex; }
}
@media (max-width:370px) {
  :root { --page-gutter: .75rem; }
  .header-inner { gap: .5rem; }
  .menu-trigger { position: relative; width: 2.875rem; padding: 0; }
  .menu-trigger > [data-icon] { display: inline-grid; }
  .menu-trigger > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .exercise-actions { flex-direction: column; }
  .exercise-actions .btn { width: min(100%,16.5rem); }
}
@media (max-height:500px) {
  .launch-art { width: 5.5rem; bottom: calc(50% + 2.6rem); }
  .launch-screen { transform: none; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: 0s !important; transition-duration: 0s !important; }
}
@media(prefers-reduced-transparency:reduce) {
  .modal,.modal.menu-dialog,.menu-trigger,.theme-switch,.white-panel,.stat-card,.saved-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--surface); }
}
@media(forced-colors:active) {
  button,a,summary,.modal,.timer-ring { border: 1px solid ButtonText; }
  .active,[aria-pressed=true],.setting-row input:checked { outline: 2px solid Highlight; }
}
