/* sound·design gallery — one stylesheet for every page */
:root {
  color-scheme: dark;
  --bg: #0b0d11; --bg2: #10131a; --panel: #151922; --panel2: #1b202b; --panel3: #222836;
  --line: #262d3b; --line2: #333c4e;
  --text: #e9ecf2; --muted: #a3acbd; --faint: #707b8f;
  --accent: #ffb547; --accent-ink: #1a1204; --accent2: #4fd1c5;
  --ok: #5ad19a; --warn: #ffcc66; --bad: #ff6b6b;
  --sec: var(--accent);
  --radius: 14px; --radius-s: 9px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -12px rgba(0,0,0,.6);
}
body[data-sec=physics] { --sec: #ffb547; } body[data-sec=sand] { --sec: #e9c46a; } body[data-sec=cinematic] { --sec: #ff7a6b; }
body[data-sec=game] { --sec: #7aa2ff; } body[data-sec=speech] { --sec: #c792ea; } body[data-sec=ambience] { --sec: #5ad19a; }
body[data-sec=analysis] { --sec: #4fd1c5; } body[data-sec=ref] { --sec: #4fd1c5; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); min-height: 100vh; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--sec) 10%, transparent), transparent 70%),
              radial-gradient(900px 420px at -10% 10%, rgba(79,209,197,.06), transparent 70%); }
a { color: var(--sec); text-decoration: none; } a:hover { text-decoration: underline; }
code, pre, kbd { font-family: var(--mono); font-size: .86em; }
:not(pre) > code { background: var(--panel2); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; color: #f3d9a8; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: .5em 0; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: .86em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────── top bar ───────── */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11,13,17,.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 9px 20px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; letter-spacing: -.02em; white-space: nowrap; font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand b { color: var(--sec); font-weight: 700; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); padding: 6px 10px; border-radius: 8px; white-space: nowrap; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a[aria-current=page] { color: var(--text); background: var(--panel2); box-shadow: inset 0 -2px 0 var(--sec); }
.master { display: flex; align-items: center; gap: 8px; flex: none; }
.master .vol { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.master .vol svg { width: 18px; height: 18px; }
.master input[type=range] { width: 92px; }
#meter { width: 64px; height: 10px; border-radius: 3px; background: var(--panel2); display: block; }
.btn-stop { background: #2a1416; color: #ffb3b3; border: 1px solid #5a2a2e; }
.btn-stop:hover { background: #3a1a1e; }

/* ───────── layout ───────── */
main { max-width: 1280px; margin: 0 auto; padding: 0 20px 120px; }
.hero { padding: 38px 0 18px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 750; letter-spacing: -.025em; }
.hero h1 .dot { color: var(--sec); }
.hero .lead { font-size: 17px; color: var(--muted); max-width: 64rem; margin-top: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); padding: 3px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel); }
.chip b { color: var(--text); font-weight: 600; }
.notice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line2); background: var(--panel); border-radius: var(--radius-s); padding: 10px 14px; margin: 12px 0; color: var(--muted); font-size: 14px; }
.notice.warn { border-color: #6b5520; background: #221c0e; color: #f5dc9c; }
.notice.bad { border-color: #6b2a2a; background: #241213; color: #ffc4c4; }
.notice svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.sect { margin-top: 34px; }
.sect > header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sect > header h2 { font-size: 22px; font-weight: 700; }
.sect > header h2::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--sec); margin-right: 10px; vertical-align: 2px; }
.sect > header p { color: var(--muted); margin: 0; flex-basis: 100%; max-width: 62rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.grid.wide { grid-template-columns: 1fr; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }

/* ───────── cards ───────── */
.card { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 12px; box-shadow: var(--shadow); min-width: 0; position: relative; }
.card.span2 { grid-column: 1 / -1; }
.card > .hd { display: flex; align-items: flex-start; gap: 10px; }
.card > .hd h3 { font-size: 17px; font-weight: 650; flex: 1; }
.card > .desc { color: var(--muted); font-size: 14px; margin: 6px 0 10px; }
.tag { font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; padding: 5px 7px; border-radius: 6px; border: 1px solid var(--line2); color: var(--muted); white-space: nowrap; flex: none; }
.tag.k { color: #9ff0e6; border-color: #24574f; background: #0f2523; }
.tag.o { color: #ffd9a1; border-color: #5b4521; background: #221a0d; }
.tag.g { color: #c8d6ff; border-color: #2f3f6b; background: #121a2e; }
.tag.d { color: #e5c9ff; border-color: #4b3366; background: #1c1428; }

/* ───────── controls ───────── */
.ctls { display: grid; gap: 2px 0; margin: 6px 0 4px; }
.card.span2 > .ctls { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); column-gap: 32px; }
.card.span2 > .ctls > .ctl.txt, .card.span2 > .ctls > .ctl.seg { grid-column: 1 / -1; }
.ctl { display: grid; grid-template-columns: minmax(7rem, 10.5rem) 1fr 5.4rem; gap: 2px 12px; align-items: center; padding: 3px 0; }
.ctl .lbl { font-size: 13.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.ctl .val { font: 12.5px var(--mono); color: var(--sec); text-align: right; white-space: nowrap; }
.ctl .hint { grid-column: 1 / -1; font-size: 12px; color: var(--faint); margin-top: -3px; line-height: 1.4; display: none; }
.ctls.hints .ctl .hint { display: block; }
.ctl.sel, .ctl.tog, .ctl.seg, .ctl.txt { grid-template-columns: minmax(7rem, 10.5rem) 1fr; }
.ctl.txt { grid-template-columns: 1fr; }
.hint-toggle { font-size: 12px; color: var(--faint); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; }
.hint-toggle:hover { color: var(--muted); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; cursor: pointer; --p: 50%; touch-action: pan-y; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--sec) var(--p), var(--line2) var(--p)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line2); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--sec); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #f4f6fa; margin-top: -5.5px; border: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sec) 22%, transparent), 0 1px 3px rgba(0,0,0,.5); }
input[type=range]::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: #f4f6fa; border: 0; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sec) 22%, transparent); }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px color-mix(in srgb, var(--sec) 45%, transparent); }

select, input[type=number], input[type=text], textarea { font: 13.5px var(--sans); color: var(--text); background: var(--panel2); border: 1px solid var(--line2); border-radius: 8px; padding: 5px 8px; min-width: 0; width: 100%; }
select:focus, input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--sec) 55%, transparent); outline-offset: 0; }
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
input[type=number] { width: 6.5rem; font-family: var(--mono); }
.segs { display: flex; flex-wrap: wrap; gap: 4px; }
.segs button { font: 13px var(--sans); padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); cursor: pointer; }
.segs button:hover { color: var(--text); }
.segs button[aria-pressed=true] { background: color-mix(in srgb, var(--sec) 18%, var(--panel2)); border-color: color-mix(in srgb, var(--sec) 60%, transparent); color: var(--text); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; color: var(--muted); user-select: none; }
.switch input { appearance: none; -webkit-appearance: none; width: 32px; height: 18px; border-radius: 99px; background: var(--line2); position: relative; cursor: pointer; transition: background .15s; margin: 0; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #dfe4ec; transition: transform .15s; }
.switch input:checked { background: var(--sec); }
.switch input:checked::after { transform: translateX(14px); }

/* ───────── buttons ───────── */
button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 13.5px/1 var(--sans); padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); cursor: pointer; white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--panel3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.primary { background: var(--sec); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary.playing { background: #f4f6fa; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; }
.btn.icon { padding: 7px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0 4px; }
.actions .sp { flex: 1; }
.seed { display: inline-flex; align-items: center; gap: 4px; font: 12px var(--mono); color: var(--faint); }
.seed input { width: 4.6rem; padding: 4px 6px; font-size: 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.presets button { font: 12.5px var(--sans); padding: 4px 10px; border-radius: 99px; border: 1px dashed var(--line2); background: transparent; color: var(--muted); cursor: pointer; }
.presets button:hover { color: var(--text); border-style: solid; border-color: color-mix(in srgb, var(--sec) 60%, transparent); }
.presets button[aria-pressed=true] { color: var(--text); border-style: solid; border-color: var(--sec); background: color-mix(in srgb, var(--sec) 12%, transparent); }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.status { font-size: 12.5px; color: var(--faint); min-height: 1.2em; }
.status.err { color: var(--bad); }

/* ───────── visuals ───────── */
.viz { position: relative; margin: 8px 0 6px; border-radius: 10px; overflow: hidden; background: #07080b; border: 1px solid var(--line); }
.viz canvas { display: block; width: 100%; height: clamp(128px, 15vw, 196px); }
.viz.short canvas { height: clamp(64px, 7vw, 92px); }
.viz.blank canvas { height: 64px; }
.viz .ph { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); pointer-events: none; display: none; }
.viz .empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 13px; text-align: center; padding: 10px; }
.stage { position: relative; border-radius: 12px; overflow: hidden; background: #07080b; border: 1px solid var(--line); touch-action: manipulation; user-select: none; cursor: crosshair; }
.stage canvas { display: block; width: 100%; }
.stage .overlay { position: absolute; left: 10px; top: 8px; font-size: 12px; color: var(--muted); pointer-events: none; text-shadow: 0 1px 2px #000; }

/* measurements */
.meas { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.m { font: 12px var(--mono); background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 3px 7px; color: var(--muted); white-space: nowrap; }
.m b { color: var(--text); font-weight: 600; }
.m.ok { border-color: #245c43; color: #a8f0cc; } .m.bad { border-color: #6b2a2a; color: #ffc4c4; } .m.hi { border-color: color-mix(in srgb, var(--sec) 50%, transparent); }
.bands { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 6px 0; }
.band { font: 11px var(--mono); color: var(--faint); text-align: center; }
.band .bar { height: 34px; background: var(--panel2); border-radius: 4px; position: relative; overflow: hidden; margin-bottom: 2px; }
.band .bar i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, color-mix(in srgb, var(--sec) 75%, #000), var(--sec)); }
.lens { margin: 6px 0; font-size: 12.5px; }
.lens h5 { margin: 0 0 4px; font: 600 11px var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.verdict { font-size: 13px; padding: 6px 10px; border-radius: 8px; margin: 6px 0; }
.verdict.ok { background: #0f2a1f; color: #a8f0cc; border: 1px solid #245c43; }
.verdict.bad { background: #2a1416; color: #ffc4c4; border: 1px solid #6b2a2a; }
details.more { margin: 4px 0; }
details.more > summary, details.code > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; user-select: none; }
details.more > summary::-webkit-details-marker, details.code > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; font-size: 10px; transition: transform .15s; display: inline-block; }
details[open] > summary::before { transform: rotate(90deg); }
details.code { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
pre.code { position: relative; margin: 6px 0 2px; padding: 12px 14px; background: #08090d; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.55; color: #d6deeb; tab-size: 2; }
pre.code .copy { position: absolute; top: 6px; right: 6px; font: 11px var(--sans); padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); cursor: pointer; }
pre.report { margin: 6px 0; padding: 10px 12px; background: #08090d; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; font-size: 11.5px; line-height: 1.45; color: #c9d1dc; white-space: pre; }
.tok-k { color: #c792ea; } .tok-s { color: #c3e88d; } .tok-n { color: #f78c6c; } .tok-c { color: #6b7585; font-style: italic; } .tok-f { color: #82aaff; }
table.params { width: 100%; border-collapse: collapse; font-size: 12px; margin: 6px 0; }
table.params th, table.params td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.params th { color: var(--faint); font-weight: 600; }
table.params td.n { font-family: var(--mono); color: var(--sec); white-space: nowrap; }
table.params td.v { font-family: var(--mono); color: var(--muted); white-space: nowrap; }
.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--faint); font-weight: 600; font-size: 12.5px; }

/* rack (ambience) */
.rack { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.strip { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.strip.on { border-color: color-mix(in srgb, var(--sec) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--sec) 20%, transparent) inset; }
.strip .top { display: flex; align-items: center; gap: 8px; }
.strip .top h4 { font-size: 14.5px; font-weight: 650; flex: 1; min-width: 0; }
.strip .top h4 small { display: block; font: 11px var(--mono); color: var(--faint); font-weight: 400; }
.strip .lvl { display: grid; grid-template-columns: 3.2rem 1fr 3.6rem; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 4px; }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); flex: none; }
.strip.on .led { background: var(--sec); box-shadow: 0 0 8px var(--sec); }

/* timeline */
.timeline { position: relative; height: 46px; border-radius: 10px; overflow: hidden; display: flex; border: 1px solid var(--line); margin: 8px 0; }
.timeline > div { position: relative; display: flex; align-items: center; justify-content: center; font-size: 12.5px; color: #0b0d11; font-weight: 650; text-align: center; padding: 0 4px; line-height: 1.15; min-width: 0; overflow: hidden; }
.timeline .head { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 10px #fff; left: 0; display: none; }
.zones { display: flex; flex-wrap: wrap; gap: 6px; }
.zones .btn[aria-pressed=true] { background: var(--sec); color: var(--accent-ink); border-color: transparent; }
.karaoke { font-size: 18px; line-height: 1.6; padding: 10px 12px; background: var(--panel2); border-radius: 10px; margin: 8px 0; min-height: 3em; }
.karaoke span { transition: color .08s, background .08s; border-radius: 4px; padding: 0 2px; color: var(--muted); }
.karaoke span.on { color: var(--accent-ink); background: var(--sec); }
.karaoke span.done { color: var(--text); }
.modes { margin: 6px 0; }

/* index */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; margin-top: 18px; }
.cat { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel), var(--bg2)); color: var(--text); position: relative; overflow: hidden; }
.cat:hover { text-decoration: none; border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.cat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 28%, transparent), transparent 70%); }
.cat h3 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.cat h3 span.n { font: 600 12px var(--mono); color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); border-radius: 6px; padding: 2px 6px; }
.cat p { color: var(--muted); font-size: 14px; margin: 0; }
.cat ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.cat .go { color: var(--c); font-weight: 600; font-size: 13.5px; margin-top: auto; }
.modesrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-top: 12px; }
.mode { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel); }
.mode h4 { font-size: 16px; margin-bottom: 6px; }

/* docked scope */
.dock { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 330px; background: rgba(16,19,26,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line2); border-radius: 14px; box-shadow: 0 20px 40px -10px rgba(0,0,0,.7); overflow: hidden; display: none; }
.dock.show { display: block; }
.dock .bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.dock .bar b { color: var(--text); font-weight: 600; }
.dock .bar .lv { margin-left: auto; font: 11.5px var(--mono); color: var(--muted); }
.dock canvas { display: block; width: 100%; height: 110px; }
.dock.min canvas { display: none; }
.dock .lbls { display: flex; justify-content: space-between; font: 10px var(--mono); color: var(--faint); padding: 2px 10px 6px; }
.dock.min .lbls { display: none; }

footer.site { max-width: 1280px; margin: 0 auto; padding: 24px 20px 40px; color: var(--faint); font-size: 13px; border-top: 1px solid var(--line); }
footer.site a { color: var(--muted); }

/* reference pages */
.ref { max-width: 900px; }
.ref h1 { font-size: 32px; margin: 30px 0 12px; } .ref h2 { font-size: 22px; margin: 30px 0 10px; } .ref h3 { font-size: 17px; margin: 22px 0 8px; }
.ref table { border-collapse: collapse; font-size: 13.5px; margin: 10px 0; display: block; overflow-x: auto; }
.ref th, .ref td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; vertical-align: top; }
.ref th { background: var(--panel2); }
.ref pre { background: #08090d; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 12.5px; }
.ref li { margin: 3px 0; }
.ref blockquote { border-left: 3px solid var(--sec); margin: 10px 0; padding: 2px 14px; color: var(--muted); }

@media (max-width: 860px) {
  .topbar .in { flex-wrap: wrap; gap: 6px 10px; padding: 8px 14px; }
  .brand { order: 1; }
  .master { order: 2; margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; }
  .master input[type=range] { width: 74px; }
  #meter { display: none; }
  main { padding: 0 14px 120px; }
  html { scroll-padding-top: 112px; }
}
@media (max-width: 520px) {
  body { font-size: 14.5px; }
  .ctl { grid-template-columns: 1fr auto; gap: 0 10px; }
  .ctl input[type=range] { grid-column: 1 / -1; grid-row: 2; }
  .ctl .val { grid-column: 2; grid-row: 1; }
  .ctl.sel, .ctl.tog, .ctl.seg { grid-template-columns: 1fr; gap: 4px; }
  .card { padding: 14px 12px 10px; }
  .dock { left: 10px; right: 10px; width: auto; bottom: 10px; }
  .dock canvas { height: 80px; }
  .btn { padding: 8px 11px; }
  .master .vol svg { display: none; }
  .brand span.full { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
