@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
:root { --bg: #0a0a0a; --soft: #161616; --line: #262626; --dim: #9a9a9a; --ink: #f2f2f2; --gutter: 40px; --mono: "Geist Mono", ui-monospace, monospace; color-scheme: dark; }
[data-theme="light"] { --bg: #f3f3f1; --soft: #e8e8e5; --line: #d8d8d5; --dim: #6a6a6a; --ink: #121212; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100svh; height: 100dvh; display: grid; grid-template-rows: 64px minmax(0, 1fr) auto; background: var(--bg); color: var(--ink); font: 400 14px/1.4 "Instrument Sans", system-ui, sans-serif; transition: background-color .4s, color .4s; }
button, input, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, input { font: inherit; }
button { border: 0; border-radius: 0; background: none; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; font-weight: 400; }
.header { padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 22px; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.stretched-o { display: inline-block; transform: scaleX(1.7); margin: 0 5px; }
.utilities { display: flex; align-items: center; gap: 4px; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; color: var(--dim); }
.icon-button:hover, .icon-button[aria-pressed="true"] { color: var(--ink); }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.25; }
.radio { min-height: 0; display: grid; grid-template-columns: min(34.375%, 480px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto auto; }
.radio > * { min-height: 0; }
.queue-panel { grid-column: 1; grid-row: 1; position: static; inset: auto; width: auto; height: 100%; max-width: none; max-height: 100%; min-height: 0; margin: 0; padding: 40px 32px 16px; border: 0; border-right: 1px solid var(--line); background: var(--bg); color: inherit; overflow: hidden; }
.queue-head { display: flex; align-items: center; justify-content: space-between; margin: 0; }
.queue-close, .queue-toggle { display: none; }
.queue-sources { display: flex; gap: 18px; }
.queue-source { padding: 0 0 6px; font: 400 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid transparent; }
.queue-source:hover { color: var(--ink); }
.queue-source[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.queue-status-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 10px 0 0; min-height: 1.5em; }
.queue-status { font-size: 11px; color: var(--dim); }
.clear-custom { flex: none; padding: 0; border: 0; color: var(--dim); font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.clear-custom:hover { color: var(--ink); }
body:has(.queue-panel:modal) { overflow: hidden; }
.eyebrow { font: 400 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
#queue { padding: 0; margin: 22px 0 0; list-style: none; overflow: hidden auto; overscroll-behavior: contain; }
.queue-track { width: 100%; min-height: 68px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; text-align: left; align-items: center; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); }
.queue-track[aria-current="true"] { color: var(--dim); cursor: default; }
.queue-track[aria-current="true"]:hover { background: none; }
.queue-track:hover { background: var(--soft); }
.queue-number, .queue-duration { font: 400 11px var(--mono); color: var(--dim); }
.queue-track strong { display: block; font-size: 14px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-track small { display: block; margin-top: 3px; font-size: 12px; color: var(--dim); }
.muted { font-size: 13px; color: var(--dim); margin-top: 24px; }
.queue-row { display: flex; align-items: center; }
.queue-row .queue-track { border-bottom: 0; }
.queue-remove { flex: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--dim); opacity: .6; border-bottom: 1px solid var(--line); }
.queue-row:last-child .queue-remove { border-bottom: 0; }
.queue-remove:hover { opacity: 1; color: var(--ink); }
.queue-remove svg { width: 16px; height: 16px; }
.queue-add { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.queue-add-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed var(--line); color: var(--dim); }
.queue-add-button:hover { color: var(--ink); border-color: var(--dim); }
.queue-add-button svg { width: 16px; height: 16px; }
#add-music-hint { margin-top: 10px; font-size: 11px; }
.queue-panel[data-dragging="true"] .queue-add-button { color: var(--ink); border-color: var(--ink); background: var(--soft); }
.shelf { grid-column: 1; grid-row: 2; padding: 16px 32px 0; border-right: 1px solid var(--line); }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; }
.shelf-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; min-height: 44px; }
.tile { position: relative; aspect-ratio: 1; padding: 0; background: var(--soft); outline: 1px solid transparent; outline-offset: -1px; overflow: hidden; }
.tile:hover { outline-color: var(--dim); }
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tile canvas { width: 100%; height: 100%; display: block; }
.tile-fallback { position: absolute; width: 60%; height: 48%; left: 20%; top: 25%; border: 10px solid var(--dim); border-radius: 50%; transform: rotate(-32deg) skewY(12deg); }
.tile.rendered .tile-fallback { display: none; }
.shelf-tile .tile-fallback { border-width: 5px; }
.shelf-tile[aria-checked="true"], .totem-use[aria-pressed="true"] { outline-color: var(--ink); }
.shelf-tile::after { content: ""; position: absolute; left: 6px; bottom: 6px; width: 4px; height: 4px; background: var(--ink); border-radius: 50%; opacity: 0; }
.shelf-tile[aria-checked="true"]::after { opacity: 1; }
.stations-section { grid-column: 1; grid-row: 3; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px 32px 32px; border-right: 1px solid var(--line); }
.stations-head { margin-bottom: 10px; }
/* Genre tiles (sculpture in the active totem's form at the genre's sound) with a visible label,
   and the expression row beneath: a segmented line of text buttons for the genre's variants. */
.stations { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.genre-tile { display: grid; grid-template-rows: minmax(0, 1fr) auto; aspect-ratio: auto; }
.genre-tile .tile-canvas { position: relative; aspect-ratio: 1; }
.genre-tile canvas { position: absolute; inset: 0; }
.tile-label { display: block; min-height: 2.6em; padding: 5px 4px 4px; font: 400 9px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); text-align: left; overflow-wrap: anywhere; }
.genre-tile[aria-checked="true"] { outline-color: var(--ink); }
.genre-tile[aria-checked="true"] .tile-label { color: var(--ink); }
.genre-tile::after { content: ""; position: absolute; left: 10px; top: 10px; width: 5px; height: 5px; border: 1px solid var(--ink); border-radius: 50%; opacity: 0; }
.genre-tile[aria-checked="true"]::after { opacity: 1; }
body[data-playing="true"] .genre-tile[aria-checked="true"]::after { background: var(--ink); }
.expressions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; min-height: 22px; }
.expression-tile { padding: 2px 0 4px; font: 400 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid transparent; }
.expression-tile:hover { color: var(--ink); }
.expression-tile[aria-checked="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.sculpture-panel { grid-column: 2; grid-row: 1 / 3; min-height: 250px; position: relative; overflow: hidden; }
#sculpture, .sculpture-fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sculpture-fallback { padding: 8%; stroke: none; }
.sculpture-panel.rendered .sculpture-fallback { display: none; }
#status { position: absolute; bottom: 22px; left: 24px; right: 24px; text-align: center; color: var(--dim); font-size: 12px; text-wrap: balance; }
/* An unlock line (ADR-0014): the same quiet place, in ink, with a small dot; never a dialog. */
#status[data-kind="unlock"] { color: var(--ink); animation: settle-in .5s ease-out; }
#status[data-kind="unlock"]::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 8px 1px 0; background: var(--ink); border-radius: 50%; }
#totems { position: relative; }
#totems[data-new="true"]::after { content: ""; position: absolute; top: 9px; right: 9px; width: 5px; height: 5px; background: var(--ink); border-radius: 50%; }
@keyframes settle-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle-outline { from { outline-color: var(--ink); } to { outline-color: transparent; } }
.sound-controls { grid-column: 2; grid-row: 3; position: relative; border-top: 1px solid var(--line); padding: 14px 40px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 40px; }
.sound-control { display: grid; grid-template-columns: 1fr auto; min-width: 0; font-size: 13px; align-items: baseline; }
output { font: 400 11px/1.5 var(--mono); color: var(--dim); }
.sound-control input { grid-column: 1 / -1; }
input[type="range"] { --fill: 0%; appearance: none; -webkit-appearance: none; display: block; width: 100%; min-width: 0; height: 32px; margin: 0; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(to right, var(--ink) var(--fill), var(--line) var(--fill)); }
input[type="range"]::-moz-range-track { height: 1px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 1px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 5px; height: 5px; margin-top: -2px; border: 0; border-radius: 50%; background: var(--ink); }
input[type="range"]::-moz-range-thumb { width: 5px; height: 5px; border: 0; border-radius: 50%; background: var(--ink); }
input[type="range"]:disabled { opacity: .35; cursor: default; }
.reset { position: absolute; right: 40px; top: -34px; min-height: 32px; padding: 0; color: var(--dim); font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
#prepare-note { grid-column: 1 / -1; margin: 0; font-size: 11px; }
#prepare-note:empty { display: none; }
#retry-sound { position: static; grid-column: 1 / -1; justify-self: start; min-height: 28px; }

/* Stems: the same grammar as Speed/Reverb/Tone above (a label/value header over a control on
   the hairline), so it reads as one family of controls, not a bolted-on extra. The difference is
   deliberately small: rings sized like the slider thumb, sitting on the same 1px line, filling
   left to right as steps instead of one thumb position — distinct enough to never be mistaken
   for a drag-anywhere slider, but clearly a sibling of it. The label/value header is itself a
   button that mutes, since a tap on the rings sets the level instead. The invisible range
   supports keyboard input; a tap or click on the rings sets the level, a drag follows the
   pointer, and a long-press solos. */
.stem-note { grid-column: 1 / -1; margin: 6px 0 0; color: var(--dim); font-size: 11px; }
.stem-rows { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.stem-row { position: relative; display: grid; grid-template-columns: 1fr auto; min-width: 0; font-size: 13px; align-items: baseline; }
/* A lit ring row reads as one continuous line across stems at full volume; a vertical rule in
   the column gap marks where one stem's rings end and the next one's begin. */
.stem-row:not(:first-child)::before { content: ""; position: absolute; top: 0; bottom: 0; left: -20px; width: 1px; background: var(--line); }
.stem-row-toggle {
  grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  min-width: 0; padding: 0; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer;
}
.stem-row-toggle:disabled { cursor: default; }
.stem-row-label { font-size: 13px; }
.stem-steps { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; height: 32px; pointer-events: none; }
.stem-step { width: 6px; height: 6px; border-radius: 50%; border: 1px solid var(--dim); background: transparent; box-shadow: 0 0 0 3px transparent; transition: border-color .12s, background .12s, box-shadow .12s, transform .12s; }
.stem-step[data-lit="true"] { border-color: var(--ink); background: var(--ink); box-shadow: 0 0 6px 0 color-mix(in srgb, var(--ink) 55%, transparent); }
.stem-row[data-muted="true"] .stem-step { border-color: var(--line); background: transparent; box-shadow: none; }
.stem-row[data-muted="true"] .stem-step[data-lit="true"] { border-color: var(--dim); background: transparent; }
.stem-row[data-solo="true"] .stem-step[data-lit="true"] { transform: scale(1.3); }
.stem-row input[type="range"] {
  appearance: none; -webkit-appearance: none;
  grid-column: 1 / -1; position: absolute; inset: 20px 0 0; width: 100%; height: 32px; margin: 0; padding: 0;
  background: transparent; cursor: pointer; opacity: 0; touch-action: none;
}
.stem-row input[type="range"]::-webkit-slider-runnable-track,
.stem-row input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; background: transparent; border: 0; }
.stem-row input[type="range"]::-moz-range-track,
.stem-row input[type="range"]::-moz-range-thumb { background: transparent; border: 0; }
.stem-row input[type="range"]:disabled { cursor: default; }
/* Disabled reads as "waiting", not "broken": keep the ring outline visible, only dim the fill. */
.stem-row:has(input:disabled) .stem-step { border-color: var(--line); }
.stem-row:has(input:disabled) .stem-step[data-lit="true"] { background: var(--line); box-shadow: none; }
.stem-row:has(input:disabled) .stem-row-label,
.stem-row:has(input:disabled) output { opacity: .5; }
/* One readiness language (ADR-0014) for #stems and .totem-card: locked is a blurred afterimage
   of the thing (canvas and rings only, never the focusable button or its text), preparing is
   faded, new settles from an ink outline, ready is plain. */
[data-ready="locked"] canvas, [data-ready="locked"] .tile-fallback, [data-ready="locked"] .stem-steps { filter: blur(4px); opacity: .35; }
[data-ready="locked"] .totem-meta, [data-ready="locked"] .stem-row-label { color: var(--dim); }
[data-ready="preparing"] .stem-steps, [data-ready="preparing"] .stem-row-label { opacity: .55; }
[data-ready="new"] .tile, [data-ready="new"] .stem-steps { animation: settle-outline 1.2s ease-out both; outline: 1px solid transparent; outline-offset: 2px; }
.stem-rows[data-ready="new"] .stem-note, .stem-note { transition: opacity .24s; }
.stem-row:has(input:focus-visible) { outline: 1px solid var(--dim); outline-offset: 4px; }
.stem-row-toggle:focus-visible { outline: 1px solid var(--dim); outline-offset: 4px; }
.player { min-height: 96px; display: flex; align-items: center; gap: 24px; padding: 14px var(--gutter) max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.play-button { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--bg); }
.play-button:hover { background: var(--dim); }
.play-button svg { width: 16px; height: 18px; stroke: none; }
.play-button .pause-icon { display: none; }
body[data-playing="true"] .play-icon { display: none; }
body[data-playing="true"] .pause-icon { display: block; }
.track-meta { width: clamp(150px, 19vw, 260px); min-width: 0; }
#track-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#track-artist { font-size: 12px; color: var(--dim); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline { min-width: 0; flex: 1; padding-top: 7px; }
#time { display: block; text-align: right; white-space: nowrap; }
#seek { height: 24px; }
#seek::-webkit-slider-thumb { opacity: 0; }
#seek::-moz-range-thumb { opacity: 0; }
#seek:hover::-webkit-slider-thumb, #seek:focus-visible::-webkit-slider-thumb { opacity: 1; }
.next-button { width: 32px; }
.desktop-volume { display: flex; width: 110px; gap: 8px; align-items: center; color: var(--dim); }
.desktop-volume svg { flex: none; width: 18px; }
#options-panel { position: fixed; inset: 58px 28px auto auto; min-width: 230px; margin: 0; padding: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); box-shadow: 0 12px 40px #0002; }
#options-panel button, #options-panel a { display: block; text-decoration: none; text-align: left; padding: 12px; width: 100%; }
#options-panel button:hover, #options-panel a:hover { background: var(--soft); }
.menu-heading { padding: 14px 12px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.menu-volume { display: grid; grid-template-columns: 1fr auto; padding: 12px; gap: 0 12px; font-size: 13px; }
.menu-select { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; min-height: 44px; padding: 6px 12px; font-size: 13px; }
select { font: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 0; padding: 6px 8px; min-height: 32px; }
.menu-check { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--ink); width: 16px; height: 16px; margin: 0; }
.menu-volume input { grid-column: 1; grid-row: 2; }
.menu-volume output { grid-row: 2; align-self: center; }
.modal { max-width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 28px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); overflow: auto; }
dialog::backdrop { background: #0009; }
.modal h2 { font-size: 22px; margin-bottom: 24px; }
.modal h3 { font: 400 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 22px 0 8px; }
.modal article p { margin: 0 0 10px; line-height: 1.5; }
.modal article ul { margin: 0 0 10px; padding-left: 18px; line-height: 1.5; }
.modal article strong { font-weight: 500; }
.modal fieldset { border: 0; margin: 20px 0; padding: 0; }
.modal legend { margin-bottom: 12px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: flex; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--line); min-height: 44px; cursor: pointer; }
.choices label:has(:checked) { border-color: var(--ink); }
input[type="radio"] { accent-color: var(--ink); }
.modal .field { display: block; }
.modal .field span { display: block; margin-bottom: 8px; }
.modal .field input { display: block; width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 0; background: var(--soft); color: var(--ink); font: inherit; }
.modal .field input:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.modal .field + .muted { margin-top: 12px; line-height: 1.5; }
.modal menu { display: flex; justify-content: flex-end; gap: 16px; padding: 0; margin: 24px 0 0; }
.modal menu button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line); }
.compendium { position: absolute; inset: 0; z-index: 2; overflow: hidden auto; overscroll-behavior: contain; padding: 22px 40px 32px; background: var(--bg); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.compendium-head { display: flex; align-items: center; justify-content: space-between; margin-right: -12px; }
.compendium-note { margin: 6px 0 0; max-width: 60ch; font-size: 12px; }
#compendium-groups h3 { font: 400 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin: 26px 0 12px; }
.totem-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 24px 20px; }
.totem-card { display: grid; gap: 3px; align-content: start; }
.totem-use { width: 100%; margin-bottom: 6px; }
.totem-meta { display: contents; }
.totem-card strong { font-weight: 400; font-size: 14px; }
.totem-card small.eyebrow { font-size: 10px; }
.totem-card p { font-size: 12px; line-height: 1.45; color: var(--dim); margin: 4px 0 0; }
.totem-pin { justify-self: start; min-height: 28px; padding: 0; font-size: 11px; color: var(--dim); text-decoration: underline; text-underline-offset: 4px; }
.shelf-slot { position: relative; }
.shelf-unpin { position: absolute; top: -7px; right: -7px; z-index: 1; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--dim); opacity: 0; transition: opacity .15s; }
.shelf-unpin svg { width: 9px; height: 9px; stroke-width: 1.6; }
.shelf-slot:hover .shelf-unpin, .shelf-slot:focus-within .shelf-unpin { opacity: 1; }
.shelf-unpin:hover, .shelf-unpin:focus-visible { color: var(--ink); border-color: var(--ink); }
.totem-pin[aria-pressed="true"] { color: var(--ink); }
.totem-card[data-state="locked"] .totem-use { cursor: default; }
.totem-actions { display: flex; gap: 14px; }
.totem-open { min-height: 28px; padding: 0; font-size: 11px; color: var(--dim); text-decoration: underline; text-underline-offset: 4px; }
.totem-open:hover, .totem-pin:hover { color: var(--ink); }
/* The encyclopedia entry: one totem, its lore and how it reads under each genre. */
.compendium-detail { margin-top: 14px; }
.detail-nav { display: flex; align-items: center; justify-content: space-between; }
.detail-steps { display: flex; gap: 2px; }
.detail-grid { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 24px 32px; margin-top: 16px; }
.detail-tile { width: 100%; }
.detail-text h3 { margin: 0; font-size: 22px; font-weight: 400; letter-spacing: -.02em; }
.detail-text h3:focus-visible { outline: none; }
.detail-origin { margin-top: 12px; font-size: 14px; }
#detail-body p, #detail-locked p { margin-top: 12px; font-size: 13px; line-height: 1.55; max-width: 60ch; }
.detail-under { margin-top: 18px; border-collapse: collapse; font-size: 12px; width: 100%; max-width: 60ch; }
.detail-under caption { text-align: left; padding-bottom: 8px; }
.detail-under th, .detail-under td { text-align: left; padding: 6px 12px 6px 0; border-top: 1px solid var(--line); font-weight: 400; vertical-align: top; }
.detail-under th { color: var(--dim); font: 400 10px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.detail-actions { display: flex; gap: 16px; padding: 0; margin: 22px 0 0; }
.detail-actions button { min-height: 40px; padding: 0 16px; border: 1px solid var(--line); }
.detail-actions button:hover:not(:disabled) { border-color: var(--ink); }
dl { display: grid; grid-template-columns: auto 1fr; gap: 14px 22px; }
dt { font: 11px/1.8 var(--mono); color: var(--dim); } dd { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.noscript { position: fixed; inset: auto 20px 110px; text-align: center; }
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  body { height: auto; min-height: 100dvh; grid-template-rows: 64px 1fr auto; grid-template-columns: minmax(0, 1fr); }
  .radio > * { min-width: 0; max-width: 100%; } /* the genre strip scrolls inside its section instead of widening the page */
  .header { border: 0; }
  .wordmark { font-size: 18px; }
  .stretched-o { margin: 0 4px; }
  .utilities { gap: 0; }
  .radio { display: flex; flex-direction: column; }
  .queue-panel:not(:modal) { display: none; }
  .queue-panel:modal { position: fixed; inset: auto 0 0 0; width: 100%; height: auto; max-height: 70dvh; overflow: hidden auto; padding: 6px 20px max(20px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); box-shadow: 0 -12px 40px #0004; transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .2s; }
  @starting-style { .queue-panel:modal { transform: translateY(100%); opacity: 0; } }
  .queue-head { position: sticky; top: 0; z-index: 1; background: var(--bg); padding: 8px 0; }
  .compendium { position: fixed; inset: 64px 0 102px 0; padding: 12px 20px 24px; }
  .totem-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 14px; }
  .queue-close { display: grid; }
  #queue { margin-top: 0; max-height: none; overflow: visible; }
  .queue-sources { gap: 14px; }
  .queue-add { margin-bottom: 8px; }
  .sculpture-panel { order: 0; flex: 1; min-height: max(220px, calc(100svh - 534px)); }
  .shelf { display: none; }
  .stations-section { order: 1; border: 0; padding: 6px 20px 10px; }
  .stations-head { display: none; } /* the mobile strip doubles as the top nav; a label would be redundant */
  .stations { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(84px, 1fr); grid-template-columns: none; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 2px; }
  .stations::-webkit-scrollbar { display: none; }
  .genre-tile { scroll-snap-align: start; }
  .expressions { margin-top: 8px; gap: 2px 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-tile { max-width: 160px; }
  .sound-controls { order: 2; display: flex; flex-direction: column; gap: 0; border: 0; padding: 6px 20px 4px; }
  .sound-control { border-top: 1px solid var(--line); padding-top: 8px; }
  .sound-control input { height: 36px; }
  .stem-rows { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); margin-top: 10px; padding: 0; }
  .stem-row { border-top: 1px solid var(--line); padding-top: 8px; }
  .stem-row:first-child { border-top: 0; }
  .stem-row::before { content: none; } /* stacked stems already have a horizontal divider */
  .stem-row input[type="range"] { height: 36px; }
  .stem-step { width: 6px; height: 6px; }
  .reset { right: 20px; top: -36px; background: var(--bg); padding-left: 8px; }
  .player { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; grid-template-rows: auto auto; gap: 0 14px; padding: 12px 20px max(24px, env(safe-area-inset-bottom)); min-height: 102px; }
  .play-button { width: 52px; height: 52px; grid-row: 1 / 3; }
  .track-meta { width: auto; grid-column: 2; grid-row: 1; }
  .timeline { display: contents; }
  #time { grid-column: 3 / -1; grid-row: 2; font-size: 10px; align-self: center; }
  #seek { grid-column: 2; grid-row: 2; height: 24px; }
  .queue-toggle { display: grid; grid-column: 3; grid-row: 1; justify-self: end; width: 32px; height: 32px; }
  .queue-toggle[aria-expanded="true"] { color: var(--ink); }
  .next-button { grid-column: 4; grid-row: 1; justify-self: end; height: 32px; }
  .desktop-volume { display: none; }
  #options-panel { right: 16px; }
  #status { bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
