/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;
  --glass: rgb(14 15 19 / .7);
  --glass-strong: rgb(14 15 19 / .84);
  --glass-line: rgb(255 255 255 / .11);
  --glass-hi: rgb(255 255 255 / .07);
  --text: #f5f0e6;
  --text-2: rgb(245 240 230 / .72);
  --text-3: rgb(245 240 230 / .48);
  --hover: rgb(255 255 255 / .09);
  --active: rgb(255 255 255 / .16);
  --cream: #f2e8d0;
  --navy: #1f2a44;
  --orange: #e2672a;
  --red: #b9412a;
  --sans: "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --paint: #1f2a44;
  --center: #1f2a44;
  --apron: #1f2a44;
  --surround: transparent;
  --lines: #f2e8d0;
  --player: #f2e8d0;
  --player-ink: #1a2030;
  --player-edge: #7c7466;

  font-family: var(--sans);
  color: var(--text);
  background: #3a2414;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; background: #3a2414; overscroll-behavior: none; }
button, input, select { font: inherit; color: inherit; }
button, a, input, select, label, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; padding: 0; border-radius: 999px; transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease), opacity .2s; }
button:active { transform: scale(.94); }
:is(button, a, input, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Frosted, dark glass used by every floating surface. */
.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
  backdrop-filter: blur(24px) saturate(1.15);
  box-shadow: inset 0 0 0 1px var(--glass-line), inset 0 1px 0 var(--glass-hi), 0 12px 40px -12px rgb(0 0 0 / .55), 0 2px 6px rgb(0 0 0 / .18);
}
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; color: var(--text-2); }
.icon-button:hover { background: var(--hover); color: var(--text); }
.icon-button[aria-expanded=true] { background: var(--active); color: var(--text); }
#favorite[aria-pressed=true], #favoritesOnly[aria-pressed=true] { color: #e8c547; }

/* ---------- Floor ---------- */
.floor { position: fixed; inset: 0; transform-origin: 0 0; will-change: transform; }
.floor svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Varnish sheen and vignette sit above the floor in screen space. */
body::after { content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(135deg, rgb(255 255 255 / .1), transparent 40%, rgb(255 255 255 / .03) 80%, transparent), radial-gradient(70% 70% at 50% 50%, transparent 60%, rgb(26 13 3 / .42)); }
#courtBase .only-full, #courtBase .only-half { transition: opacity .45s var(--ease); }
#courtBase .only-half, .half-court #courtBase .only-full { opacity: 0; }
.half-court #courtBase .only-half { opacity: 1; }
#court { touch-action: none; }

/* ---------- Top bar ---------- */
.top {
  position: fixed; z-index: 10; left: 0; right: 0; top: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand { justify-self: start; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 18px 0 6px; border-radius: 999px; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: block; border-radius: 12px; box-shadow: 0 0 0 1px rgb(255 255 255 / .08); }
.wordmark { font-size: 19px; font-weight: 750; letter-spacing: -.035em; color: var(--text); }
.wordmark span { color: var(--orange); }
.title { justify-self: center; display: flex; align-items: center; gap: 8px; height: 48px; max-width: min(46vw, 520px); padding: 0 16px 0 22px; font-size: 16px; font-weight: 600; letter-spacing: -.015em; color: var(--text); }
.title:hover { background: var(--glass-strong); }
.title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title .caret { width: 18px; height: 18px; color: var(--text-3); transition: transform .25s var(--ease); }
.title[aria-expanded=true] .caret { transform: rotate(180deg); }
.actions { justify-self: end; display: flex; gap: 2px; padding: 4px; border-radius: 999px; }

/* ---------- Dock ---------- */
.dock {
  position: fixed; z-index: 10; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(720px, calc(100vw - 24px)); padding: 12px 12px 10px; border-radius: 28px;
}
.instruction { margin: 2px 8px 10px; min-height: 22px; display: flex; gap: 10px; font-size: 15px; line-height: 1.45; letter-spacing: -.005em; color: var(--text); text-wrap: pretty; }
.step-count { font: 600 12px/1 var(--mono); color: var(--text-3); padding-top: 4px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.chip { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin: 0 1px; border-radius: 999px; font: 700 12px/1 var(--sans); vertical-align: 1px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .2); }
.control-row { display: flex; align-items: center; gap: 2px; }
.play-button { width: 46px; height: 46px; margin: 0 2px; display: grid; place-items: center; background: var(--cream); color: var(--navy); box-shadow: 0 6px 18px -6px rgb(0 0 0 / .6); }
.play-button:hover { background: #fff; }
.play-button .icon { width: 19px; height: 19px; }
.timeline { flex: 1; display: flex; gap: 4px; height: 30px; align-items: center; margin: 0 12px; cursor: pointer; touch-action: none; border-radius: 6px; }
.timeline i { flex: 1; height: 4px; border-radius: 999px; background: rgb(255 255 255 / .16); overflow: hidden; transition: height .2s var(--ease); }
.timeline:hover i { height: 6px; }
.timeline b { display: block; height: 100%; width: 0; background: var(--cream); border-radius: inherit; }
.speed-button { min-width: 42px; height: 40px; padding: 0 8px; font: 600 13px/1 var(--mono); color: var(--text-2); }
.speed-button:hover { background: var(--hover); color: var(--text); }

/* ---------- Tokens & notation (SVG) ---------- */
.token-body { fill: var(--player); stroke: var(--player-edge); stroke-width: .3; }
.token-inner { fill: none; stroke: var(--player-edge); stroke-width: .13; opacity: .45; }
.no-numbers .token-number { display: none; }
.token-number { font: 700 2.85px var(--sans); fill: var(--player-ink); font-variant-numeric: tabular-nums; }
.token-ring { fill: none; stroke: #1a2030; stroke-width: .3; opacity: 0; transition: opacity .25s var(--ease); }
.token.has-ball .token-ring { opacity: .75; }
.ghost { fill: none; stroke: #1d2a24; stroke-opacity: .32; stroke-width: .22; stroke-dasharray: .7 .55; }
.move .stroke { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.move-cut .stroke, .move-dribble .stroke, .move-screen .stroke { stroke: #1b2823; stroke-width: .48; stroke-opacity: .88; }
.move-cut .head, .move-dribble .head { fill: #1b2823; fill-opacity: .9; stroke: #1b2823; stroke-width: .15; stroke-linejoin: round; }
.move-pass .stroke { stroke: #9d3f12; stroke-width: .46; stroke-dasharray: 1.1 .85; }
.move-pass .head { fill: #9d3f12; stroke: #9d3f12; stroke-width: .15; stroke-linejoin: round; }
.move-shot .stroke { stroke: var(--orange); stroke-width: .5; stroke-dasharray: .2 .9; }
.move-shot .head { fill: var(--orange); stroke: var(--orange); stroke-width: .15; stroke-linejoin: round; }
.rim-target { fill: rgb(226 103 42 / .14); stroke: var(--orange); stroke-width: .3; stroke-dasharray: .55 .4; }
.move-screen .bar { stroke: var(--red); stroke-width: .95; stroke-linecap: round; fill: none; }
.court-label { cursor: grab; user-select: none; opacity: .85; letter-spacing: .04em; }
.court-label.dragging { cursor: grabbing; opacity: 1; }

/* ---------- Sheets ---------- */
.docked .dock { left: calc((100vw - 404px) / 2); width: min(720px, calc(100vw - 404px - 24px)); }
.docked .title { transform: translateX(-202px); }
.docked .sheet.right { top: 74px; }
.scrim { position: fixed; inset: 0; z-index: 20; background: rgb(10 6 2 / .3); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.scrim.visible { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 21; top: max(12px, env(safe-area-inset-top)); bottom: max(12px, env(safe-area-inset-bottom));
  width: min(380px, calc(100vw - 24px)); border-radius: 28px; overflow: hidden;
  display: flex; flex-direction: column; --glass: var(--glass-strong);
  opacity: 0; visibility: hidden; transition: transform .38s var(--ease), opacity .25s var(--ease), visibility .38s;
}
.sheet.left { left: 12px; transform: translateX(-24px) scale(.98); transform-origin: left center; }
.sheet.right { right: 12px; transform: translateX(24px) scale(.98); transform-origin: right center; }
.sheet.open { transform: none; opacity: 1; visibility: visible; }
.sheet-head { display: flex; align-items: center; gap: 6px; padding: 14px 12px 8px 20px; }
.sheet-head h2 { flex: 1; }
.sheet-head .meta { flex: 1; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.sheet-body { overflow-y: auto; padding: 4px 20px 24px; flex: 1; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .2) transparent; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; margin: 0; }
h3 { font-size: 11.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin: 0 0 12px; }

/* Library */
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; background: rgb(255 255 255 / .08); transition: box-shadow .2s var(--ease); }
.search:focus-within { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35); }
.search .icon { width: 17px; height: 17px; color: var(--text-3); }
.search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search input:focus-visible { outline: none; }
.search input::placeholder { color: var(--text-3); }
.search input::-webkit-search-cancel-button { filter: invert(1); opacity: .5; }
.filter-row { display: flex; gap: 6px; padding: 4px 20px 10px; }
select {
  appearance: none; flex: 1; min-width: 0; height: 34px; border: 0; border-radius: 999px;
  background: rgb(255 255 255 / .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f0e6' stroke-opacity='.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m8 10 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  padding: 0 30px 0 14px; font-size: 13px; cursor: pointer; color: var(--text);
}
select option { background: #1b1d24; color: var(--text); }
.play-list { flex: 1; overflow-y: auto; padding: 0 10px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgb(255 255 255 / .2) transparent; }
.play-item { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: 16px; }
.play-item:hover { background: var(--hover); }
.play-item.active { background: var(--active); }
.play-item > span { flex: 1; min-width: 0; }
.play-item strong { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play-item small { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.play-item .icon { width: 16px; height: 16px; color: #e8c547; }
.empty { color: var(--text-3); font-size: 14px; padding: 20px 12px; }
.link-button { align-self: flex-start; margin: 10px 22px 16px; padding: 4px 0; border-radius: 4px; font-size: 13px; color: var(--text-3); }
.link-button:hover { color: var(--text); }

/* Lesson */
.aliases { font-size: 13px; color: var(--text-3); margin: 6px 0 16px; }
.lead { font-size: 15.5px; line-height: 1.6; margin: 0 0 16px; color: var(--text); }
.read { background: rgb(255 255 255 / .06); border-radius: 18px; padding: 14px 16px; font-size: 14px; line-height: 1.55; margin-bottom: 18px; color: var(--text-2); }
.read strong { display: block; font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.steps { list-style: none; margin: 0 0 20px; padding: 0; counter-reset: step; }
.step { width: 100%; display: flex; gap: 12px; text-align: left; padding: 9px 10px; border-radius: 14px; font-size: 14px; line-height: 1.5; color: var(--text-2); counter-increment: step; }
.step::before { content: counter(step); flex-shrink: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgb(255 255 255 / .08); font: 600 11.5px/1 var(--mono); color: var(--text-3); }
.step:hover { background: var(--hover); }
.step.active { color: var(--text); background: var(--active); }
.step.active::before { background: var(--cream); color: var(--navy); }
.legend { list-style: none; margin: 0 0 16px; padding: 14px 0 0; border-top: 1px solid var(--glass-line); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend svg { width: 28px; height: 10px; overflow: visible; }
.lg-cut, .lg-pass { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.lg-cut { stroke: var(--text); }
.lg-cut-head { fill: var(--text); }
.lg-pass { stroke: #f08a52; stroke-dasharray: 3.5 2.5; }
.lg-pass-head { fill: #f08a52; }
.lg-screen-bar { stroke: #e0634a; stroke-width: 2.6; stroke-linecap: round; }
.note { font-size: 12.5px; color: var(--text-3); line-height: 1.5; margin: 0; }

/* Settings */
.group { padding: 18px 0; border-top: 1px solid var(--glass-line); }
.group:first-child { border-top: 0; padding-top: 6px; }
.targets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; background: rgb(255 255 255 / .07); border-radius: 20px; margin-bottom: 16px; }
.target { display: flex; align-items: center; justify-content: center; gap: 5px; height: 34px; border-radius: 17px; font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.target i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
.target[aria-checked=true] { background: rgb(255 255 255 / .16); color: var(--text); box-shadow: inset 0 1px 0 rgb(255 255 255 / .1); }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 10px; }
.swatch { aspect-ratio: 1; width: 100%; border-radius: 50%; position: relative; cursor: pointer; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16), inset 0 -4px 8px rgb(0 0 0 / .18); }
.swatch:hover { transform: scale(1.08); }
.swatch[aria-checked=true], .swatch.custom.active { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16), 0 0 0 2px rgb(20 20 24), 0 0 0 4px var(--cream); }
.swatch.bare { background: repeating-linear-gradient(90deg, #dcb27e 0 4px, #d5a870 4px 8px, #e0b885 8px 11px); }
.swatch.custom { background: conic-gradient(#c8622b, #e8c547, #2e7d4f, #8db3d9, #2f5aa8, #4b2e83, #6e2233, #c8622b); transition: transform .2s var(--ease); }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.token-picker { margin: -4px 0 14px; }
.token-buttons { display: flex; justify-content: space-between; gap: 6px; }
.token-button { flex: 1; aspect-ratio: 1; max-width: 44px; display: grid; place-items: center; }
.token-button svg { width: 100%; height: 100%; overflow: visible; }
.token-button[aria-checked=true] { box-shadow: 0 0 0 2px var(--cream); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; cursor: pointer; color: var(--text); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i { width: 44px; height: 26px; border-radius: 999px; background: rgb(255 255 255 / .14); position: relative; flex-shrink: 0; transition: background-color .25s var(--ease); }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / .3); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--orange); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--cream); outline-offset: 2px; }
.woods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wood { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px 6px 8px; font-size: 13px; font-weight: 550; color: var(--text-2); border-radius: 16px; }
.wood i { width: 100%; height: 34px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.wood[data-wood=light] i { background: repeating-linear-gradient(90deg, #ecd6b0 0 6px, #e6cda3 6px 12px, #efdbb8 12px 17px); }
.wood[data-wood=natural] i { background: repeating-linear-gradient(90deg, #dcb27e 0 6px, #d5a870 6px 12px, #e0b885 12px 17px); }
.wood[data-wood=dark] i { background: repeating-linear-gradient(90deg, #a77548 0 6px, #a27044 6px 12px, #b07f52 12px 17px); }
.wood:hover { background: var(--hover); }
.wood[aria-checked=true] { color: var(--text); }
.wood[aria-checked=true] i { box-shadow: 0 0 0 2px rgb(20 20 24), 0 0 0 4px var(--cream); }
details.group summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; border-radius: 8px; }
details.group summary::-webkit-details-marker { display: none; }
details.group summary h3 { margin: 0; }
details.group summary .icon { color: var(--text-3); transition: transform .25s var(--ease); }
details[open] summary .icon { transform: rotate(180deg); }
.text-form { display: flex; gap: 6px; margin-top: 14px; }
.text-form input { flex: 1; min-width: 0; height: 42px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .08); padding: 0 16px; outline: 0; font-size: 15px; }
.text-form input::placeholder { color: var(--text-3); }
.text-form .icon-button { background: var(--cream); color: var(--navy); width: 42px; height: 42px; }
.text-options { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.text-options select { flex: 0 0 auto; }
.text-options input[type=range] { flex: 1; min-width: 0; accent-color: var(--orange); }
.text-options input[type=color] { appearance: none; -webkit-appearance: none; width: 32px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.text-options input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.text-options input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
.text-options input[type=color]::-moz-color-swatch { border: 0; border-radius: 50%; }
.text-item { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 2px 0; }
.text-item span { flex: 1; overflow-wrap: anywhere; }
.text-item .icon-button { width: 34px; height: 34px; color: var(--text-3); }
.text-item .icon-button:hover { color: #f08a72; }
#settings .link-button { margin: 4px 0 0; }

/* Dialog & toast */
dialog { width: min(460px, calc(100vw - 24px)); max-height: 86dvh; border: 0; border-radius: 28px; padding: 22px 24px; color: var(--text); --glass: var(--glass-strong); }
dialog::backdrop { background: rgb(10 6 2 / .35); }
dialog p { font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sources { display: flex; flex-direction: column; gap: 6px; }
.source { display: block; text-decoration: none; padding: 12px 14px; border-radius: 16px; background: rgb(255 255 255 / .06); }
.source:hover { background: rgb(255 255 255 / .1); }
.source strong { font-size: 14px; font-weight: 600; }
.source small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 3px; line-height: 1.45; }
#toast { position: fixed; left: 50%; top: 80px; z-index: 30; max-width: 90vw; color: var(--text); border-radius: 999px; padding: 11px 18px; font-size: 14px; opacity: 0; transform: translate(-50%, -6px); pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .top { grid-template-columns: 1fr auto; grid-template-areas: "brand actions" "title title"; row-gap: 8px; padding-top: max(10px, env(safe-area-inset-top)); padding-left: 10px; padding-right: 10px; }
  .brand { grid-area: brand; height: 44px; padding-right: 14px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .wordmark { font-size: 17px; }
  .actions { grid-area: actions; padding: 2px; }
  .title { grid-area: title; height: 42px; max-width: 100%; font-size: 15px; }
  .icon-button { width: 38px; height: 38px; }
  .dock { padding: 10px 8px 8px; border-radius: 24px; }
  .instruction { font-size: 14px; margin: 2px 8px 8px; min-height: 41px; }
  .timeline { margin: 0 6px; }
  .speed-button { min-width: 36px; padding: 0 4px; }
}
@media (max-width: 380px) {
  .wordmark { display: none; }
  .brand { padding-right: 6px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .top { padding-top: max(8px, env(safe-area-inset-top)); }
  .brand, .title { height: 40px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .wordmark { font-size: 16px; }
  .title { font-size: 14.5px; }
  .actions { padding: 2px; }
  .icon-button { width: 36px; height: 36px; }
  .dock { width: calc(100vw - 24px); bottom: max(8px, env(safe-area-inset-bottom)); padding: 6px 8px 6px 16px; border-radius: 999px; display: flex; align-items: center; gap: 12px; }
  .instruction { flex: 1; min-width: 0; margin: 0; min-height: 0; font-size: 13px; line-height: 1.35; }
  .control-row { flex-shrink: 0; }
  .timeline { flex: 0 0 110px; margin: 0 8px; }
  .play-button { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgb(22 24 30 / .94); }
}
