/* css/tokens.css — DTP MIXSHARE design system */
/* ★ EVERY FACE IS NAMED FOR THE FILE IT LOADS, and that is not a convention to
   trade away: a family called U47 loads U47.otf. The remap in v0.2.141 changed
   which face each VARIABLE points at and left these alone, precisely so that
   reading a resolved font-family still tells you which file is on screen.

   ⚠️ U45, U55 and U65 are DORMANT — registered, referenced by nothing. Kept
   because face selection is still being decided: an unreferenced @font-face is
   never fetched, so they cost nothing, and pointing --font-body back at 'U45' in
   devtools is how you compare roman against condensed without a build. */
@font-face { font-family: 'U45'; src: url('../fonts/U45.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'U47'; src: url('../fonts/U47.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'U55'; src: url('../fonts/U55.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'U57'; src: url('../fonts/U57.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'U65'; src: url('../fonts/U65.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'U67'; src: url('../fonts/U67.otf') format('opentype'); font-display: swap; }

:root {
  /* The one place the version lives. The footer renders it via content: below, so
     bumping here (plus the ?v= cache-busters) updates every page at once. */
  --app-version: "0.2.185";

  --accent: #ffff00;
  /* ★★ "NOT MINE" — the colour of a file that is not the signed-in user's.
     Covers BOTH an imported foreign share and a file played while acting as
     someone else: one concept, one colour, no precedence rule to get wrong.

     ⚠️ IT MUST STAY DISTINCT FROM --accent, and that is the whole reason it
     exists as its own token. Acting-as REMAPS --accent to cyan (see
     html.impersonating in css/style.css), so a player that reached for --accent
     would go yellow again the moment you stopped acting as someone — while the
     file it is playing is still not yours. The colour follows the FILE, so it
     cannot be read from a token the MODE moves.

     Tunable on its own: change this and every not-mine surface moves together —
     waveform, now-playing row, and the picker's edges. */
  --unowned-accent: #2ad4e6;
  /* IMPERSONATION (v0.2.50). Cyan, and only ever reached through the one
     override in css/style.css — declared here so it sits with the palette
     rather than hidden in a state rule. Far enough from --accent's yellow that
     the two can never be confused at a glance, which is the entire job.
     ★ Derived, since v0.2.96: "you are acting as someone" and "this file is not
     yours" are the same idea wearing the same cyan, so there is ONE value to
     tune rather than two that must be kept in step by hand. */
  --impersonation-accent: var(--unowned-accent);
  --accent-text: #111111;
  --bg: #12161c;
  --panel: #1b212a;
  --panel-border: #2a323d;
  --input-bg: #0e1217;
  --text: #e6e9ee;
  --text-dim: #8b95a1;
  --wave: #5b6b7a;
  /* The third text tone, between --text and --text-dim: icon glyphs and the
     toggle knob, which want to read as controls rather than as prose. */
  --icon: #aeb9c6;
  --danger: #d9534f;
  /* ★★ CONDENSED IS THE HOUSE FACE (v0.2.141). U47 is Univers Light CONDENSED,
     where this was U45 Light; U57 is Roman Condensed, where --font-row-name was
     U55 Roman. Remapped HERE, at the four declarations, because every
     font-family in the app is var(--font-*) and not one names a face literally —
     so changing these four lines moved every instance and nothing had to be
     swept. ⚠️ EVERYTHING THAT WAS ROMAN IS NOW CONDENSED: a broad visual change,
     not a local one. */
  --font-body: 'U47', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-title: 'U57', 'U47', sans-serif;
  /* ★ THE APP TITLE ONLY — the masthead and its pre-login twin, nothing else.
     U67 is Univers Bold Condensed. Deliberately NOT --font-title, which dresses
     every heading, button and badge in the app: pointing that at a bold face
     would make the whole interface shout. */
  --font-app-title: 'U67', 'U57', sans-serif;

  /* ★★ TEXT AN AUTHOR MARKED AS BOLD (v0.2.154) — the `*bold*` of the WhatsApp
     subset js/notes.js renders, wherever that reads on an undimmed surface.
     ⚠️ IT IS A FACE, NOT A WEIGHT, AND THAT IS THE WHOLE POINT. The Univers
     faces are registered as SEPARATE @font-face FAMILIES per weight (U45 / U47 /
     U57 / U67), not as weight variants of one family — so `font-weight: bold` on
     U47 produces SYNTHETIC bold, the smeared faux weight this app avoids
     everywhere else. Naming the bold face is the only way to get a real one.
     ⚠️ A SEPARATE TOKEN FROM --font-app-title even though the stack is identical:
     that one says "THE APP TITLE ONLY, nothing else" two lines up, and it means
     it. Two roles that happen to share a face today must not share a dial, or
     restyling the masthead silently restyles every author's emphasis.
     ★ The fallback degrades to U57 (Roman Condensed) — still heavier than the
     U47 body it sits in, so the emphasis survives a failed U67 fetch. */
  --font-strong: 'U67', 'U57', sans-serif;
  /* The library row's entity name, and nothing else (v0.2.20). U57 is Univers
     Roman Condensed against --font-body's U47 Light Condensed — the SAME size, a
     heavier face. That is the two-line row's contrast: the name carries weight,
     the artist line under it stays Light, and neither has to grow to be told
     apart. (It was U55 against U45 until v0.2.141; the pairing is the same
     relationship one width narrower.)
     Its own token because this is an experiment: point it back at --font-body
     and the rows revert, without hunting for a selector. */
  --font-row-name: 'U57', 'U47', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ★★ THE ROW'S SECOND LINE, SPLIT OUT (v0.2.145). It read --font-body until
     now, which is the face of every piece of body text in the app — so the
     condensed/roman toggle could not move the subtitle without restyling
     paragraphs, modals and forms along with it. Its own variable is what makes
     the switch below possible at all, and it defaults to exactly what
     --font-body already gave it, so this split changes nothing on its own. */
  --font-row-artist: 'U47', -apple-system, BlinkMacSystemFont, sans-serif;

  /* THE DATA READOUT'S FACE (v0.2.138). U57 is Univers CONDENSED — the same
     family as --font-title, chosen here for width rather than for voice: the
     abbreviated line carries four labelled figures across a waveform, and a
     condensed face is what makes that fit. ⚠️ FIT IS THE FACE'S JOB, NOT A
     MEASUREMENT'S: nothing shrinks this to suit a container, and nothing should
     start. If it stops fitting, that is a design decision, not a bug to paper
     over with a fit test. */
  --font-data: 'U57', 'U47', sans-serif;

  /* ★ ONE DIAL FOR EVERY PIECE OF TEXT OVERLAID ON A WAVEFORM (v0.2.138): the
     data readout, the filename, the elapsed/total time and the listening level.
     They are one visual band along the top and bottom edges of a wave box, so
     they scale together or they look wrong together — set on .play-head and
     .play-foot, and every readout inside them inherits rather than naming a size
     of its own. Left at --text-ui's value so this build changes nothing until
     somebody turns it. */
  --data-body-size: 14px;

  /* ★★ THE DATA LINE'S TWO CLASSES (v0.2.142), split by BEHAVIOUR rather than by
     grammar: what CHANGES against what does not. The rendition prefix counts as
     data because it changes when the Lossless switch moves.

     ⚠️ FACE AND COLOUR ONLY — NO SIZE. Size comes from --data-body-size above,
     which both classes sit under, so the whole overlaid band still scales on one
     dial. Putting a size on either of these forks that dial in two.

     The legend's face is a dial of its own because U47 Light Condensed at 14px
     over a waveform may read too faint: flip it to 'U57' in devtools and the
     labels firm up without touching the values. */
  --dataline-data-font: var(--font-data);
  --dataline-data-colour: #ffffff;
  /* ★ THE CLIP'S IN/OUT READOUT (v0.2.170). Its own dial: these two figures are
     the subject of the clip row, and the row's other text is a button label at
     --text-row-artist. Expect to want them larger than that, which is exactly
     why this is not just a reuse of it. */
  --clip-range-size: 15px;

  --dataline-legend-font: var(--font-body);
  --dataline-legend-opacity: 0.9;

  /* ★★★ THE ANTI-JUMP SLOT. S-LUFS is the only figure that moves, and a number
     that changes width shoves every field after it along the line ten times a
     second. The slot is wide enough for the widest value the series can produce
     — loudCenti floors at -100, so "-99.9" is the extreme — and MEASURED at that
     width rather than guessed: see scripts/dataline-check.mjs, which asserts the
     neighbours do not move across values.
     In `ch`, so it follows --data-body-size like everything else in the band. */
  --dataline-live-width: 4.4ch;

  /* ★ THE DIVIDER BETWEEN FIELDS (v0.2.143). It was a literal " | "; it is now
     horizontal space, and this is how much. Defaulted to the width that " | "
     actually occupied in the legend's own face at the default size — MEASURED by
     scripts/dataline-check.mjs, not rounded to something plausible: " | " in the
     legend's face at 14px occupies 9.33px, so the line keeps the same amount of
     horizontal room it had.

     ⚠️ SAME ROOM IS NOT THE SAME LOOK. The old divider had a PIPE in the middle
     of that space doing the separating; pure whitespace of the same width reads
     tighter, because nothing is holding the fields apart but the gap itself.
     Expect to want this larger — which is the entire reason it is a dial.

     ⚠️ A LENGTH, in px, and deliberately not `em`: it is a gap between columns
     of figures rather than a piece of type, and pinning it lets the spacing stay
     put while --data-body-size moves the text. */
  --dataline-space: 12px;

  /* THE CENTRE TRANSPORT on the library's wave box (v0.2.140). Two dials: the
     square's side, and the type size the ICON follows from — .play-half already
     draws its glyph at 1.2em, so setting a font-size here scales the icon
     through the component's own rule rather than through a second one that
     would then have to be kept in step with it. */
  /* ★ THE CENTRE BUTTON'S COLOURS, as three dials (v0.2.140). It stopped simply
     inheriting .play-half here: on the transport strip that control sits on a
     panel, and over a waveform a yellow glyph on an unfilled square competes
     with the wave behind it. The ICON is black; the other two are hoisted with
     it so that if black-on-open does not read against a particular waveform, the
     fill and the outline can be found in devtools rather than in another build.
     ⚠️ Colours ONLY. The square, its position, its layer, its glyphs and what
     pressing it does are all unchanged — see .dropzone.player .wave-play. */
  --centre-play-icon-colour: #000000;
  --centre-play-border-colour: var(--accent);
  --centre-play-fill: transparent;

  --wave-play-size: 44px;
  --wave-play-icon: 20px;

  /* ★★ THE PLAY CARD'S SIX EXPERT GLYPHS, ON ONE DIAL (v0.2.162).
     |< and >| in the cue slot, backwards and forwards in the play slot, share
     and scissors in the share slot — six icons across three slots that were six
     renderings of one hardcoded 1.2em, tunable only by editing the rule they
     share with something else. This is that number, hoisted.

     A LENGTH, deliberately, and not a transform scale: these are <svg> boxes, so
     a length re-renders the vector at the new size while a scale would resample
     the strokes and soften them.

     ⚠️ 1.2em IS WHAT THE RULE ALWAYS SAID, so the default ships pixel-identical
     — but it is NOT the size you see, and the two differ by more than rounding.
     The em sets the box; the equal-width row squeezes that box narrower than it
     is tall; and an <svg> paints its viewBox letterboxed inside whatever box it
     ends up with, so the glyph you see is the SMALLER of the two. Measured on
     the standard card: 1.2em paints 13.9px, 2em paints 22.3px, 3em paints
     32.8px. The dial is monotonic and smooth — it is simply not 1:1, so pick a
     value by looking, not by arithmetic. (Full mechanism at the use site.)

     ⚠️⚠️ IT MOVES THE CARD, NOT ONLY THE GLYPH. The control row is content-sized
     and all six boxes are part of that content, so the card widens by ~6px for
     every 1px added here and the row grows taller roughly 1:1. That coupling is
     the row's own long-standing behaviour rather than anything this token adds —
     turning the squeeze off instead gives the identical geometry at every value
     — but a large number here buys a wider card along with the bigger glyph. */
  --playcard-icon-size: 1.2em;

  /* ★★ THE MULTIMIX SEAMLESS READOUT (v0.2.165, S5) — "Seamless switching:
     AAC 47 %", under the wave. Three dials, because all three are the kind of
     value that gets nudged once it is on a phone and seen next to the slot
     letters below it.
     ⚠️ SIZE IS --text-meta's VALUE, NOT --text-meta. This is a status line, so it
     starts where .bt-status starts — but it is the one piece of status a
     listener actually reads while waiting, and the whole point of hoisting it is
     that it can grow without dragging every other status line with it. */
  /* ★★ THE MULTIMIX INTERSTITIAL (v0.2.166, S6) — the "you may hear a jump"
     heads-up over the wave. DWELL is the one that will actually get nudged: long
     enough to read two short lines, short enough not to sit over the waveform
     while someone is trying to scrub.
     ⚠️ READ FROM JS at fire time (js/blindtest-player.js), so it can be tuned in
     DevTools and seen on the next notice without a reload — which is the whole
     reason it is a token and not a constant. In ms or s; the reader accepts
     either. The FADE is CSS's own and is deliberately separate: the dwell is how
     long you can read it, the fade is how it arrives and leaves. */
  --bt-notice-dwell: 4200ms;
  --bt-notice-fade: 220ms;
  /* ⚠️ SIZE AND PADDING ARE A HEIGHT BUDGET, NOT A TASTE. The notice sits inside
     a 96px wave box with the time readout pinned to its bottom-right, so the
     type size, the padding and the length of the copy together decide whether it
     collides with that readout — and the budget is tightest on a phone, where
     the body wraps to more lines. css/players.css re-points both of these at the
     narrow breakpoint; the rules themselves never change. Nudge them together,
     and re-run scripts/btnotice-check.mjs, which measures the fit at BOTH
     widths and is the only reason this is known to fit at all. */
  --bt-notice-size: 13px;
  --bt-notice-pad: 8px 12px;

  --bt-readyline-size: 13px;
  --bt-readyline-colour: var(--text-dim);
  --bt-readyline-gap: 2px;

  /* ★★ TRACKING, ON ONE DIAL (v0.2.144). Every letter-spacing in the app that
     actually tracks text out now reads this — 31 declarations that had been six
     different hand-picked values (0.04 / 0.05 / 0.06 / 0.08 / 0.1 / 0.14em)
     spread across two stylesheets and three inline <style> blocks.

     ⚠️ THE RESETS ARE NOT HERE, AND MUST NOT BE. Sixteen rules say
     `letter-spacing: 0` / `normal` / `inherit`, and they are not small values of
     tracking — they are the opposite instruction, turning it OFF for lowercase
     left-aligned text: filenames, notes, switch labels, menu items, the search
     field. Pointing those at this dial would track out running prose and undo
     the `font: inherit` guards that exist because letter-spacing sails straight
     through that shorthand. They stay literal because they mean "none".

     ⚠️ ONE VALUE FIRST, OVERRIDES AFTER. The small uppercase micro-labels used
     to carry 0.08-0.1em and will read tight here; when they earn it back it
     should be a SECOND TOKEN, never a literal. */
  --tracking: 0.04em;

  /* --- Type scale -----------------------------------------------------------
     Named by ROLE, not by t-shirt size. The real distribution is a 1px ramp
     (11-12-13-14-15-16), not a ratio scale, so "sm/md/lg" would imply a
     mathematical relationship that isn't there and would leave you guessing
     which step a thing belongs to. A role name answers that directly.

     Anchored on the three highest-count sizes — 14px (19 uses), 13px (18) and
     12px (15) — so the bulk of the app does not move. Every value here is the
     one already in use; the only size that changed in v0.1.4 is the lone
     11.5px on the library sub-line (since retired), snapped up to
     --text-fine. */
  --text-badge: 9px;    /* uppercase micro-labels: type badges, "you are here" */

  /* ★★ THE FILTER ROW'S ONE HEIGHT DIAL (v0.2.62).
     
     ALL SIX buttons on that line are this tall: the four filter chips (heart,
     MIX, stack, list) AND the gear AND SPY. Change this number and every one of
     them moves together — that is the whole reason it exists, and the reason it
     is named for the ROW rather than for the chips it started out driving.
     
     26.6px is inherited, not invented: it is what the chips rendered at from the
     beginning until v0.2.58, when the row was flex-stretched and this was its
     tallest child (6px padding + 1px border + 1.4em of icon at 9px type = 12.6
     + 1px + 6px). Keeping it means the four chips do not move at all in this
     build; only the gear and SPY, which were 3.6px short, come up to meet them.
     27px is the tidier round alternative and is 0.4px from what is on screen. */
  --row-btn-h: 26.6px;
  --text-micro: 11px;   /* field labels, trailing hints, raw sample counts */
  --text-fine: 12px;    /* tertiary: dates, back links, loudness table body */
  --text-meta: 13px;    /* secondary: statuses, counts, facts, totals */
  --text-ui: 14px;      /* the working size: buttons, rows, notes, footer */
  --text-body: 15px;    /* reading size: body, list titles, panel headings */
  /* 16px is a FUNCTIONAL floor, not a taste: iOS Safari auto-zooms any focused
     input below it and the zoom then sticks. Never lower this for a field. */
  --text-field: 16px;
  --text-title: 20px;   /* the blind test / sequence player titles */
  --text-hero: 22px;    /* the play card's track title */

  /* ── the recipient header stack (v0.2.172, player cleanup S1) ─────────────
     Two dials, both expected to be hand-tuned on glass. The first is the gap
     BETWEEN the two big lines (name -> artist), the second the gap under the
     reference subtitle before the artwork. Separate because they do different
     jobs: the first holds one title together, the second separates the header
     from what follows. */
  --player-head-gap: 6px;
  --player-head-mixref-gap: 20px;

  /* The encoded MixRef line: the space between its parts, the seat held for the
     colour chip, and the info mark. All three are hand-tuning candidates. */
  --mixref-gap: 7px;
  /* The chip. ★ ALL FOUR ARE ON-GLASS DIALS: -l and -c for punch (raise them
     together for more pop, lower for calm), -hue-offset to spin the whole wheel
     if a common revision lands on a colour Phil dislikes, -ring so the swatch
     never melts into the card. Lightness and chroma are FIXED across every hue
     — that evenness is what OKLCH buys and what a literal-hex chip could not. */
  --mixref-chip-size: 12px;
  --mixref-chip-radius: 3px;
  --mixref-chip-oklch-l: 0.65;
  --mixref-chip-oklch-c: 0.15;
  --mixref-chip-hue-offset: 0deg;
  --mixref-chip-ring: rgba(255, 255, 255, 0.22);
  /* ★ The chip sits INSIDE A SENTENCE in the explainer ("— [] on this one"), and
     a 12px inline-block box lands on the baseline, which reads a touch low next
     to lowercase text. A dial rather than a literal because the right nudge
     depends on the body font, which is itself a token. */
  --mixref-chip-inline-shift: -1px;
  --mixref-info-size: 14px;

  /* The gap ABOVE the footer. Was a hardcoded 28px; tokenised (v0.2.172, S1) so
     the footer can be pulled tight under whatever the last item happens to be —
     the controls in Simple, the loudness table in Expert. */
  --footer-gap: 12px;
  --text-head: 28px;    /* masthead on small screens and standalone pages */
  --text-mast: 40px;    /* masthead */

  /* The library row's artist line, and nothing else (v0.2.21). NOT part of the
     scale above: that ramp is 1px steps chosen from what the app already used,
     and this one is DERIVED — one step down from the 15px name on the ratio the
     typeface itself gives, Univers' x-height/cap-height ≈ 0.69. 15 × 0.69 =
     10.35. Fractional px is deliberate and legal; the browser resolves it to the
     nearest device pixel and a retina screen shows the difference.
     v0.2.20 shipped this line at --text-ui (14px), which is 93% of the name —
     near enough the same size to read as a second title rather than a subtitle.
     Its own dial, like --font-row-name, because it is a value to nudge on glass.
     NUDGED to 11.35px in v0.2.23: 10.35 was the principled step but sat under
     the legibility floor on a non-retina screen, where it resolved to 10px. The
     ratio was the starting point, not the rule. */
  --text-row-artist: 11.35px;
  /* The subtitle's "Type•Artist" separator (v0.2.29). In em, so it tracks
     --text-row-artist rather than needing a second nudge whenever that moves.
     0.62 is the point where the bullet reads as punctuation between two words
     instead of as a third element sitting between them — at 1em it was a dot
     with words either side. Its own dial: raise it if it disappears on a
     non-retina screen, drop it if it still reads as a bullet point. */
  --row-sep-size: 0.62em;
  /* The space either side of that separator (v0.2.30). v0.2.29 set it tight —
     "Mix•Sebastopol" — which read as one compound word rather than two facts
     with a divider between them. A full space each side is the starting point;
     0.25em per side is what a space is at this size. Halving it is one number,
     which is the whole reason it is a token and not a margin written twice. */
  --row-sep-gap: 0.25em;

  /* ★ THE LOSSY-FORMAT BADGE. Its own dials, because it is the one thing on the
     title line that is neither the name nor an icon — every value here is a
     hand-tuning candidate and none of them is shared with anything else.
     The grey is NEUTRAL by intent: lossy is a fact, not a warning. */
  --format-badge-bg: #2f3742;
  --format-badge-ink: #e6e9ee;
  --format-badge-size: 9px;
  --format-badge-pad-x: 5px;
  --format-badge-pad-y: 2px;
  --format-badge-gap: 8px;
  /* The plays count trailing a library row's title (v0.2.29). DIM on purpose:
     it is metadata sitting on the title's baseline, and at the title's own
     brightness it would read as part of the name. Its own dial — point it at
     --text for a louder number, or --icon for something between. */
  --row-plays-colour: var(--text-dim);
  /* The queue badge's corner (v0.2.41). Deliberately NOT --btn-radius, which is
     0: every button in this app is square, but a small filled token reads as a
     label rather than a button precisely because it is not. Its own dial. */
  --qbadge-radius: 4px;
  /* The unit suffix in the Expert loudness table (v0.2.34) — smaller and dimmer
     than the figure it qualifies, because it repeats down every row. Both are
     dials; raise the size if the units disappear on a phone. */
  --lt-unit-size: 0.85em;
  --lt-unit-colour: var(--text-dim);

  /* Library row geometry, consumed by .library-row in css/style.css.
     --lib-row-h is the height the row had while it still reserved space for the
     "Show info" sub-line, kept verbatim so v0.1.19 changed nothing about the
     library's rhythm:
         7 (pad) + 22 (title line) - 2 (sub-line offset) + 14.4 (sub-line box)
       + 7 (pad) = 48.4px
     The .4 is real: the sub-line's box was 12px x the 1.2 line-height factor of
     U45 (U47 since v0.2.141 — narrower, so the fit only eased). Rounding it
     would be a resize, and this build is a centring fix. */
  /* One standard button height. The base button computes to 16.8px of line box
     (14px x the 1.2 factor of U45) + 9px padding either side + 1px border =
     36.8px — but a button containing an icon grows its line box, so a SEQ chip
     with a padlock came out 37.26px against 36.8px for PLAY/EDIT/SAVE beside
     it. Pinning both rows to one figure is what stops them drifting again. */
  --btn-h: 37px;

  /* The jog strip's geometry (js/jog.js). Deliberately NOT --btn-h: that is
     37px, the app's standard button, and a strip you drag under a thumb wants
     the bigger 46px target. It also sets the handle, which is half this wide —
     one token so the two cannot drift apart. */
  --transport-btn-size: 46px;

  /* Every button in this app is square. Named so that anything which has to
     MATCH a button — the jog strip and its handle, which sit in the same
     family — can say so instead of repeating the value and drifting from it.
     (It used to: --transport-btn-radius was 6px, left behind when the 46px
     transport buttons it was named for were retired in v0.1.36, so the strip
     was visibly rounder than everything around it.) */
  --btn-radius: 0;

  --lib-row-pad: 7px;         /* row padding, top and bottom */

  /* ── ★ THE AUTOGROUP SPINE — A TWO-VALUE AXIS, NOT TWO DESIGNS (v0.2.87) ──
     The vertical line that marks a group and its versions, replacing the old
     disclosure triangle. Option A and Option B are the SAME design at two
     points on one axis, so both ends are reachable by moving two numbers here
     and nothing else:

       --group-spine-inset   how far IN from the list's left edge the spine sits
       --group-child-offset  how far the version rows are indented

     TUNED AGAIN in v0.2.89 (Phil, from DevTools) — 27/38 with a heavier 6px line
     and a deeper 9px cap. Previously 30/30 in v0.2.88 — the spine sits inboard of
     the far-left gutter and the versions indent to match it. These are the
     CURRENT defaults, not a final answer: the heart dial below arrived with
     them and may move them again, which is a one-line change here.

     ★ BOTH ARE REAL DIALS EVEN AT ZERO. A zero here is a chosen position on the
     axis, not an absence, which is why the offset MECHANISM exists and is
     simply set to nothing — the alternative (hardcode the zeros, add the indent
     later) makes tuning a code change instead of a number.

     ⚠️ inset is CLAMPED at 0 by max() where it is used: the spine may move
     right (inward, always safe) but can never travel left past the panel edge.
     --group-spine-cap keeps its ends clear of the panel's rounded corners. */
  --group-spine-w: 1px;
  --group-spine-inset: 1px;
  --group-child-offset: 38px;
  --group-spine-cap: 9px;

  /* ★ THE HEAD ROW'S OWN INDENT — 0 today, and 0 is a CHOICE.
     A group head currently sits flush with every ordinary row: the SPINE is what
     says "this is a group", so the head needs no indent to say it again. Only
     the version rows are inset (--group-child-offset).

     Named at its current value so the dial exists for the redesign — the same
     move --group-child-offset made, and the same reasoning: zero is a point on
     the axis, so the MECHANISM is present and simply set to nothing. Nothing
     moves until this number does.

     ⚠️⚠️ IT DOES NOT MOVE THE SPINE, AND THAT IS MEASURED, NOT ASSUMED.
     The spine is placed by --group-spine-inset from the GROUP WRAPPER's left
     edge; this pads the head's CONTENT inside that wrapper. At the shipped
     values the spine spans 27..33px (centre 30) while the head's avatar sits at
     65..93 (centre 79) — they are independent, and the spine was never aligned
     to the avatar despite three comments in this repo that said so (corrected).
     So turning this indents the head's contents and leaves the spine where it
     is. If you want them to move together, --group-spine-inset is the other
     half and has to move too. */
  --group-head-inset: 0px;
  /* ★ THE SPINE'S OWN COLOUR (v0.2.89). It was var(--accent) — a token, but the
     WRONG one: the accent is the app's yellow everywhere, so tuning the spine
     through it would have repainted every button and badge with it. A dial for
     one thing has to belong to that thing. White reads as structure rather than
     as another control. */
  --group-spine-color: #ffffff;

  /* ★ THE GROUP HEAD'S COUNT, held off the right margin (v0.2.91).
     v0.2.90 dropped the two stand-in slots that had been parking "N versions" in
     the duration column, which left it flush against the row's right content
     edge. This is the breathing space it gets back — a margin on the count
     alone, so the track rows' durations (inset by their own share and ⋯ buttons)
     are untouched.
     A token rather than a 4px literal because it is precisely the kind of value
     that gets nudged in DevTools and then persisted. */
  --group-count-inset: 10px;

  /* ── ★ THE HEART'S OWN DIAL — LAYOUT-NEUTRAL (v0.2.88) ────────────────────
     Slides the favourite heart horizontally on EVERY track row — ordinary,
     group head and version alike — without moving anything else.

     ★ IT IS A TRANSFORM, AND THAT IS THE WHOLE REQUIREMENT. The heart lives in
     .row-lead, a `flex: 0 0 30px` item, and the avatar / name / meta are its
     flex SIBLINGS. A margin or padding here would push all of them right; a
     transform is applied AFTER layout, so the slot keeps its 30px and the row's
     geometry is untouched while the heart alone slides into the gap toward the
     avatar. The hit area travels with it — a transform moves the painted box and
     the hit-test box together — so the favourite toggle still lands.

     STACKS with --group-child-offset, deliberately: a version row's whole
     content is already shifted by that (padding on the row), so a CHILD heart
     ends up displaced by BOTH. That is the intent, not a double-count.

     Tuned to 4px in v0.2.89 (Phil) — a nudge toward the avatar, not a leap onto
     it: the slot is 30px and the gap to the avatar 10px, so the useful range is
     small. Shipped at 0 in v0.2.88. */
  --track-heart-inset: 4px;
  --lib-row-h: 48.4px;        /* pinned; see the derivation above */

  /* Artwork frame: a proportional white border. border-width can't take a %, so
     the mechanism is padding-% on a white box with the art filling the content
     box — which is why this is a token rather than a fixed pixel value. */
  /* One radius for artwork everywhere it appears in the app. Deliberately a
     fixed 10px, not a percentage: the play card renders art at ~280px and the
     Edit modal at 168px, and a proportional radius would visibly differ between
     them. The generated share card does NOT use this — its artwork bleeds
     square into the chevrons. */
  --art-radius: 10px;

  /* --- The play card's FRAME (v0.2.8) --------------------------------------
     The card is mounted by js/playcard.js into two different hosts — .player on
     the public listen.html page and the shared .modal in the library — which
     until now carried their own, differing, surface and geometry. These five
     are the single definition both read, so the card is one object with one
     look wherever it appears, and so the frame can be re-tuned in one place
     (and bound to a config page later) rather than in two stylesheets.

     Deliberately NOT part of the internal vertical rhythm — the title/artwork/
     wave/row margins are still literal, and tokenising those is the separate
     spacing-scale pass. This is the frame only: surface, side padding, width,
     and the artwork's size and shadow. */

  /* FLAT. The card's surface is the page's own ground, not --panel: v0.2.8
     retires the "panel floating on a darker page" reading in favour of one
     continuous surface. Pointing this at --panel restores the old look. */
  --card-surface: var(--bg);
  /* Tight side padding. Was 24px public / 20px library (14px under 600px). */
  --card-side: 16px;

  /* THE STICKY WAVEFORM (v0.2.43) ------------------------------------------
     The wave box pins to the top of the scroller so it stays visible — and
     scrubbable — while the tech table and notes scroll past behind it.

     --wave-pin-top is the gap it keeps from the top of the scroller once
     pinned, and it defaults to --card-side so the floating box sits the SAME
     distance from the top as it does from the left and right. On a phone, where
     the 560px column is wider than the viewport and the card fills it, those
     side gaps ARE --card-side, so all four are equal — which is the case this
     was drawn for. On a wide desktop the card is centred with far more room at
     the sides, and a top gap that tried to match THAT would push the wave into
     the middle of the screen.

     ⚠️ The library's modal overrides it — css/style.css, where the sticky ✕ row
     already owns the top of the viewport.

     Radius is 0 because the card is: --btn-radius and every .panel are square,
     so a rounded wave box would be the only curved rectangle on the surface.
     Left as a token rather than a literal so it is one line to soften. */
  --card-head-h: 46px;     /* the modal's sticky ✕ row: 12px padding + a 34px button */
  --wave-pin-top: var(--card-side);
  --wave-pin-radius: 0;
  /* Only ever painted while pinned. Down and soft, so it reads as the box
     lifting off the surface rather than as a border. */
  --wave-pin-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.6);
  /* One width for both hosts. Was 560px public / 520px library. */
  --card-max: 560px;

  /* Artwork as a PROPORTION of the card rather than a pixel cap, so it holds
     its share of the frame at every width instead of dominating a narrow card
     and floating in a wide one. */
  --art-width: 60%;
  /* Soft and downward — the art lifts off the flat surface, which is the only
     depth cue left once the panel edge is gone. Neutral black, not a tint:
     the ambient-colour work is a later slice and must not find a colour here
     it has to fight. */
  --art-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

  /* --- The artwork tint (v0.2.9) -------------------------------------------
     js/playcard.js sets --card-raw-tint on the card to rgb(r,g,b), the colour
     sampled from the artwork at UPLOAD (js/artcolour.js) and stored per track.
     It is deliberately the RAW mean; the muting happens right here, so how
     strong the wash is stays one number in this file rather than a value baked
     into every row of the database.

     --tint-strength is that number: the percentage of the raw colour left
     standing against the card's own surface. 22% (v0.2.9) then 45% (v0.2.13)
     were both chosen blind and both read as weak next to Spotify's, which is the
     reference. 85% is nearly the raw colour, and it works because the tint no
     longer has to be gentle everywhere: the hold-and-decay shape below keeps it
     bold only where the artwork and the large white title are, and the height is
     now cut so it is gone before any small text.

     --card-tint itself is NOT here — it is declared on .play-card, and v0.2.10
     moved it there because putting it in :root silently broke the whole feature.
     The reason is worth keeping written down: a custom property's var()s are
     substituted at the scope where the property is DECLARED, not where it is
     used. Declared here, `var(--card-raw-tint, var(--card-surface))` resolves
     against :root — where --card-raw-tint is unset — so it took the fallback and
     inherited down as a baked-in surface-mixed-with-surface. js/playcard.js
     setting --card-raw-tint on the card afterwards could not retroactively
     change a value that had already been computed above it. */
  --tint-strength: 85%;

  /* Where the ramp reaches the surface. On a straight line that fixes the
     residual tint under everything above it:

         residual at offset y  =  1 - y / --tint-height

     ANCHORED TO THE WAVEFORM, NOT THE TITLE. Both were tried. Pinning the title
     to Spotify's measured 28% is the tempting one, but it cannot be had here: it
     puts the fade's end BELOW the waveform on most hosts, and the wave box's
     corners carry the small readouts ("Source: …" top-right, "0:00 / …"
     bottom-right). Spotify gets away with 28% because its track list sits ~1.65x
     the title's offset down the header; our card is compact and the same ratio
     runs 1.24-1.52, so the two constraints genuinely conflict. Readout legibility
     wins, so the fade completes at the wave and the title lands where it lands.

     It lands well: 22% at the cap, 27% at 430, 29% at 390, 33% on an SE —
     averaging about 28%, which is Spotify's figure arrived at as a consequence of
     the real constraint rather than in spite of it. Do not re-pin it.

     WHY min(px, calc(...)) AND NOT min(px, k·vw). The wave-top offset is a line
     with an intercept, not a proportion — the artwork is --art-width (60%) of the
     card, but the fixed type and margins below it add a constant:

         library wave-top  =  0.6·vw + 116      (card = vw - 32 up to the cap)

     A bare k·vw can only match that at one width; 87vw was right at 430 and
     overshot by 19px at 500. The calc tracks it exactly at every width, and the
     min caps it once the card stops growing at --card-max. The 6px shortfall in
     both numbers is margin, so the top readout row is clear rather than exactly
     level with the end of the fade.

     Library host only. The PUBLIC card has a different geometry and its own
     override — see .player > .play-card in css/listen.css. */
  --tint-height: min(446px, calc(60vw + 110px));

  /* --- The PLAY pulse (v0.2.16) --------------------------------------------
     The breathing glow on PLAY before a card's first play. Tokenised rather than
     written inline because these are taste dials, not mechanism — the shape of
     the animation lives in @keyframes play-pulse further down, and everything
     anyone would actually want to change is here.

     One breath every 3s, which is roughly a resting breathing rate and reads as
     an invitation. Under about 2s it starts to feel like an alert; over about
     5s the movement stops registering as movement at all. */
  --play-pulse-duration: 3s;
  /* The glow's colour and reach. Accent at 55% so it reads as light coming off
     the button rather than a second, larger button behind it. */
  --play-pulse-glow: color-mix(in srgb, var(--accent) 55%, transparent);
  --play-pulse-spread: 16px;
  /* Deliberately tiny. The glow is the signal; the scale is what makes it feel
     alive. Much past 1.04 and a button in an equal-width row visibly outgrows
     its neighbours at the top of each breath. */
  --play-pulse-scale: 1.03;

  /* The app's one interaction duration — hovers, colour changes, the knob
     slide. Distinct longer values (0.18s, 0.2s) are deliberate and stay
     literal. */
  --t-fast: 0.15s;
  /* The autogroup accordion (v0.2.69). Slower than --t-fast on purpose: --t-fast
     is for a colour or an opacity settling, and a row of rows sliding open over
     150ms reads as a jump rather than as a movement. */
  --t-group: 0.22s;

  /* Every disabled control dims by exactly this much. */
  --disabled-opacity: 0.4;

  /* Canonical per-type colours. These are THE identity colours for the three
     kinds of thing in the library — used by the row badges today, and meant to
     be reused anywhere else a type needs colouring. White text on all three. */
  /* Filled heart: the accent. Yellow now carries two meanings — "playing" (a
     title reversed out of a yellow fill) and "favourited" (a solid heart) — but
     the shapes and contexts are different enough that they never compete for
     the same glance. Phil's call, v0.1.15. */
  --fav: var(--accent);

  /* --- Scrims. TWO families, deliberately not unified -----------------------
     SURFACE scrims are the app's own ground colour at alpha. They tint WITHIN a
     component — a fade at the edge of a wave box, a chip behind the eject × —
     so they must track the surface they sit on. Re-skin --input-bg and they
     follow, which is the point.
     BACKDROP scrims are black, and stay black. They darken everything behind a
     modal, and a backdrop must DARKEN whatever the theme is: derive them from
     --input-bg and a light theme would make the backdrop lighten the page.
     Named by role rather than by number so a new use picks the right one. */
  --scrim-edge: color-mix(in srgb, var(--input-bg) 92%, transparent);
  --scrim-text: color-mix(in srgb, var(--input-bg) 90%, transparent);
  --scrim-chip: color-mix(in srgb, var(--input-bg) 60%, transparent);
  --scrim-backdrop: color-mix(in srgb, #000 70%, transparent);
  --scrim-shadow: color-mix(in srgb, #000 45%, transparent);

  /* The upload/prepare barber-pole stripe. Its own token, NOT --type-mix, even
     though the two are within 1% of each other — a loading stripe is not a
     content type, and re-skinning the MIX badge must not restyle the upload
     animation. The near-match was drift; naming it stops the drift spreading. */
  --stripe: rgba(74, 85, 102, .55);

  /* --- Stacking. Named for what the layer IS, and ordered as it already was;
     nothing is renumbered, so nothing changes what wins.
     The first four are LOCAL — inside a positioned component. The last three
     are page-level, on document.body. */
  /* ══ THE LUFS METERS ═══════════════════════════════════════════════════════
     
     Four readings over the waveform. EVERY value below is an absolute, editable
     number: none is computed from another, and there is no font metric anywhere
     in the component. Turn one, and exactly one thing moves.
     
     ⚠️ THAT IS THE WHOLE DESIGN RULE. An earlier attempt derived the box height
     from its width, the type size from the box height, and the unit's size from
     the number's — so "make the box wider" could not be done without dragging
     three other things with it, and four passes went into working around that
     instead of removing it. Do not reintroduce a derivation here.
     
     ⚠️ NO @media, ANYWHERE. One set of values at every width. Boxes may overlap
     on a narrow screen; that is allowed and is not guarded against.
     
     ── the two sign conventions, which differ ON PURPOSE ──
       number / unit baseline offsets:  POSITIVE = DOWN from the box's centre
       subtitle vertical offset:        NEGATIVE = DOWN from the box's centre
     At the defaults: number and unit baselines both 5px below centre (so they
     share a baseline), subtitle baseline 20px below centre. */
  --meter-box-width: 74px;
  --meter-box-height: 38px;
  --meter-box-colour: #000000;
  --meter-box-opacity: 0.3;

  --meter-large-fontsize: 18px;
  --meter-large-colour: #FFFFFF;
  --meter-large-baseline-offset: -4px;    /* + = down from the box's v-centre */

  --meter-unit-fontsize: 9px;
  --meter-unit-dimmed-amount: 0.55;
  --meter-unit-offset: 15px;             /* unit's LEFT edge, right of the centre line */
  --meter-unit-baseline-offset: 0px;     /* + = down from the box's v-centre */

  --meter-subtitle-fontsize: 9px;
  --meter-subtitle-dimmed-amount: 1.0;
  --meter-subtitle-verticaloffset: -10px; /* NEGATIVE = down from the box's v-centre */

  /* Each box's horizontal CENTRE sits on its anchor, as a share of the wave's
     width. Positions, not rules — nothing is drawn on them. */
  --meter-anchor-1: 20%;
  --meter-anchor-2: 40%;
  --meter-anchor-3: 60%;
  --meter-anchor-4: 80%;

  --z-under: -1;      /* the gradient behind an overlay label */
  --z-base: 1;        /* a component's full-bleed layer (wave, stripes) */
  --z-raised: 2;      /* content sitting on that layer */
  --z-overlay: 3;     /* the corner readouts and the eject control */
  /* Above the readouts, because it is the one thing in a wave box you can press.
     Those overlays are inert by design and the LUFS boxes sit near the middle —
     a control underneath them would be painted over by the very readings it
     shares a rectangle with. */
  --z-control: 4;     /* an interactive control ON a wave box */
  --z-sticky: 4;      /* a modal's sticky head */
  /* ★★ THE PAGE FOOTER (v0.2.177). Above every CARD layer, below every MODAL
     one — it is page chrome, so it must not be painted over by content and must
     not paint over a dialog. See the note on .app-footer for why a static footer
     needed a z-index at all. */
  --z-footer: 5;
  --z-modal: 50;      /* the modal backdrop */
  --z-popover: 60;    /* row menus and the sequence picker — above a modal */
  --z-toast: 80;      /* transient messages — above everything */

  /* How strongly an owner's colour tints their rows in the LIBRARIAN's view.
     Unitless because it drives `opacity` on an overlay, not a colour mix — so
     the same figure works for any owner colour without a second token. */
  --owner-tint: 0.12;

  --type-mix: #4b5763;
  --type-blindtest: #c23843;
  --type-sequence: #3563c9;

  /* ── SPACING SCALE (v0.2.65) ────────────────────────────────────────────────
     
     The top-of-page vertical rhythm, from the v0.2.64 audit. Every one of these
     was a hardcoded literal scattered across two files; the values here are
     UNCHANGED — this build only gave them names, so the numbers below are what
     the page already measured.
     
     ⚠️ THE ONLY TOKENS IN THIS FILE THAT ARE NOT AREA-SCOPED. Everything else is
     named for the thing it belongs to (--card-side, --lib-row-pad, --row-btn-h);
     these are a SHARED scale that several unrelated areas reference, so an area
     prefix would be a lie about who owns them. Hence --sp-.
     
     ★ SCOPE: the top-of-page stack ONLY (S1-S12 in the audit). Row internals,
     the play card, the modals and the listen page still hold their own literals
     and get folded onto this scale in later passes. --lib-row-pad stays as it
     is: it is a row's internal padding, not part of this rhythm.
     
     Mobile values are overridden at the bottom of this file, in one place, so
     the whole scale reads together instead of half of it living in a media
     query in another stylesheet. */
  --sp-page-top: 56px;   /* S1  page top -> masthead          (main padding-top) */
  --sp-stack: 28px;      /* S3 + S7  the gaps between masthead, upload, library  */
  --sp-panel-y: 24px;    /* S4 + S6 + S8  a panel's own top and bottom padding   */
  --sp-title: 18px;      /* S5 + S9  a panel heading -> the first thing under it */
  --sp-content: 12px;    /* S10 + S11 + S12  create -> search -> filters -> list */
  --sp-subtitle: 10px;   /* S2  masthead -> the signed-in line                   */

  /* THE LOGIN GATE'S OWN RHYTHM (v0.2.116, Google SSO). Its own dials rather
     than borrowed ones: this panel is the first thing anybody sees, it is the
     only screen with three stacked blocks (Google / gate / legacy), and it is
     the most likely thing to be nudged on glass. */
  --sp-login-block: 18px;  /* the Google button -> the signup gate / legacy fold */
  --sp-gate-gap: 10px;     /* inside the signup gate: line -> hint -> field      */

  /* THE WELCOME OVERLAY (v0.2.117). Its own dials: it is the widest body of
     prose in the app, it is the first thing a new user reads, and the line
     length and list rhythm are exactly the things worth nudging on glass. */
  --welcome-max-w: 560px;    /* wider than .modal's 520 — ten bullets need it   */
  --sp-welcome-sub: 4px;     /* title -> "Access this screen at any time…"      */
  --sp-welcome-heading: 20px;/* subtitle -> "Why is Mixshare better?"           */
  --sp-welcome-item: 10px;   /* between bullets                                 */
  --welcome-bullet-gap: 10px;/* the marker -> its text                          */

  /* ★ THE PANEL'S HORIZONTAL INSET, SPLIT OUT (v0.2.65).
     
     .panel used to say `padding: 24px` — one value, so the same number was the
     vertical rhythm AND the gutter AND the library panel's bottom. Tuning the
     rhythm moved the gutter with it, which is the coupling the audit flagged as
     the most surprising in the map. Separate token, same 24px: nothing moves
     today, and --sp-panel-y is now a rhythm dial that cannot touch the sides. */
  --panel-x: 24px;

  /* ★ THE DETAILS PANEL'S IDENTIFIER COLUMN (v0.3.0) — the SHA-256 and the
     source filename. Wider than the 6.4em figure column those tables use for
     numbers, because these are not figures: a 64-character hash squeezed into a
     number-sized slot wrapped into a tall thin stack six lines deep. In em, so
     it tracks --text-fine rather than pinning a pixel count to one font size,
     and a PREFERRED width like its neighbour — a short filename still hands the
     space back to the label column. */
  --details-id-col-w: 26em;

  /* The gap between the Details facts line's two groups (timing | file sizes).
     It IS the separator, so it wants to read as wider than a word space and
     narrower than a paragraph indent. */
  --facts-gap: 14px;

  /* ★ The Multimix slot-name field in the Details modal (v0.2.152). Sized to
     hold a full 24-character label (BT_LABEL_MAX) without asking for the whole
     row: most slot names are four characters, so a full-width box would promise
     room the slot BUTTON does not have. In em so it tracks the field's own type
     rather than pinning a pixel count to one font size. */
  --slot-field-w: 14em;

}

/* ★★ "USE CONDENSED FONT FOR TRACK NAMES", OFF (v0.2.145).
   The default is ON and lives in :root above; this is the other state, and it
   moves exactly TWO variables — the row name and the row subtitle. U55 and U45
   are the dormant roman faces registered at the top of this file, which is what
   they were kept for.

   ⚠️ FACE ONLY. --tracking is deliberately untouched: roman is wider than
   condensed and may eventually want its own tracking, but that is a separate
   decision and folding it in here would make one switch do two things.

   ⚠️ AND --font-body IS NOT IN THIS BLOCK. That is the whole reason
   --font-row-artist exists: the subtitle used to read --font-body, and moving
   that would have restyled every paragraph in the app to say "roman track
   names". Asserted in scripts/rowfont-check.mjs. */
html.rows-roman {
  --font-row-name: 'U55', 'U45', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-row-artist: 'U45', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--text-body); line-height: 1.5; }

h1, h2, h3, .title { font-family: var(--font-title); text-transform: uppercase; letter-spacing: var(--tracking); font-weight: normal; margin: 0; }

button {
  font-family: var(--font-title); text-transform: uppercase; letter-spacing: var(--tracking); font-size: var(--text-ui);
  background: var(--accent); color: var(--accent-text); border: 1px solid var(--accent); border-radius: var(--btn-radius);
  padding: 9px 20px; cursor: pointer; transition: opacity var(--t-fast) ease, background var(--t-fast) ease, color var(--t-fast) ease;
}
button:hover { opacity: 0.85; }
/* Each :disabled rule below stays where it is rather than being merged into one
   selector list: every one of them must sit AFTER its component's :hover rule,
   which has equal specificity. Hoisting them into a shared earlier rule would
   let :hover win and light a disabled control up. The token is what unifies
   them. */
button:disabled { opacity: var(--disabled-opacity); cursor: default; }
button.secondary { background: transparent; color: var(--text); border-color: var(--panel-border); }
button.secondary:hover { border-color: var(--accent); color: var(--accent); opacity: 1; }
button.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
button.danger:hover { background: var(--danger); color: #fff; opacity: 1; }

/* 16px is the minimum: iOS Safari auto-zooms any focused input below it, and the
   zoom then sticks. Do not drop this back to 15px. */
input[type="text"], input[type="password"], input[type="email"] {
  font-family: var(--font-body); font-size: var(--text-field); background: var(--input-bg);
  border: 1px solid var(--panel-border); border-radius: 0; color: var(--text); padding: 9px 12px;
}
/* textarea is not an input, so it needs naming explicitly — every form field
   focuses the same way. */
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 0;
         padding: var(--sp-panel-y) var(--panel-x); }

.loudness-headline { font-family: var(--font-body); font-size: var(--text-meta); color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* Sits close under the switch rows (v0.2.34). The visible gap was never this
   margin — it was the empty .status line between them, which reserves its own
   height whether or not it has anything to say. Collapsed when empty below, so
   the table moves up; when a status message does arrive it reappears and pushes
   the table down, which is what a status line is for. */
.loudness-detail { margin-top: 4px; overflow-x: auto; }
.play-card .status:empty { display: none; }

/* The table's own name. Quiet — it labels a block rather than announcing one —
   and inside .loudness-detail, so the Expert gate hides both together. */
.loudness-heading {
  font-family: var(--font-title);
  font-size: var(--text-badge);
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: left;
  margin-bottom: 6px;
}
/* FULL WIDTH (v0.2.34), which is what pushes the two data columns to the card's
   right edge. The table used to shrink to its content and sit left, leaving the
   right third of the card empty while the figures floated in the middle. The
   label column takes all the slack, so the numbers land where the eye already
   goes for a value and the row reads label……value. */
.loudness-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: var(--text-fine); color: var(--text-dim); }
/* Padding on the LEADING edge, not the trailing one.
   With `padding-right: 12px` every right-aligned value — numbers and the em-dash
   placeholders alike — sat 12px short of its own column's right edge, and the
   last column left a 12px gutter hanging off the end of the table. Moving the
   space in front of each column instead means every cell ends flush on one
   shared edge, and the gap lands between the columns where it belongs. */
.loudness-table th, .loudness-table td { text-align: right; padding: 2px 0 2px 18px; white-space: nowrap; }
.loudness-table th:first-child { text-align: left; font-weight: normal; padding-left: 0; }
/* One snug width for both data columns so they read as a pair rather than
   drifting apart across the panel. A preferred width, not a cap: nowrap content
   wider than this (a long header) still wins, so nothing can be clipped. */
/* Each data cell is now a number slot plus a unit slot, so the column has to be
   wide enough for both — but only just: a PREFERRED width, so the label column
   still absorbs the remaining space and pushes these right. */
.loudness-table th:not(:first-child),
.loudness-table td:not(:first-child) { width: 6.4em; }

/* TWO FIXED SLOTS per value. The numbers right-align against a common edge and
   the units start at a common x beside them — which right-aligning the combined
   "number + unit" string could not do, because LUFS, dBTP and LU are different
   widths and the figures would have raggedly stepped in and out.
   The label column is what the reader scans down; the figures are what they
   compare. Both need their own alignment. */
.loudness-table .lt-num {
  display: inline-block;
  width: 3.1em;
  text-align: right;
}
.loudness-table .lt-unit {
  display: inline-block;
  width: 2.9em;
  padding-left: 0.4em;
  text-align: left;
  /* Quieter and smaller than the figure it qualifies — it repeats down the
     column and should not compete with the numbers. Both dialable. */
  font-size: var(--lt-unit-size);
  color: var(--lt-unit-colour);
}
.loudness-table td { color: var(--text); }
/* Lining, fixed-width digits so a column of figures reads as a column rather
   than as ragged text. The alignment itself was already right — see the shared
   th/td rule above. */
.loudness-table td, .loudness-table th { font-variant-numeric: tabular-nums; }

/* --- EXPERT (v0.2.5) --------------------------------------------------------
   Every purely technical surface on the card, gated by one class on the card
   itself. The default is calm: title, artwork, wave, transport, and the two
   switches that change what you HEAR. Everything that only DESCRIBES the audio
   waits behind the EXPERT button.

   Written as "hide unless expert" rather than "show when expert" so a surface
   added later is gated by adding a selector here — never by remembering to. */
/* ⚠️ .play-head IS NO LONGER HERE (v0.2.138). The data readout across the top of
   the wave is shown to EVERYONE now — Expert/Simple is a layer that has not been
   built, and gating this one surface on a half-existing mode would decide the
   shape of that layer by accident. When the mode is designed, it decides; until
   then the line is always on. The metric BOXES stay gated below, untouched. */
.play-card:not(.is-expert) .play-listening,
.play-card:not(.is-expert) .loudness-detail,
/* v0.2.16: the whole switch COLUMN, not the individual switches. SIMPLE now
   shows no toggles at all — Lossless included, which reverses v0.2.6's decision
   to keep it always-visible. Gating the container rather than listing switches
   does two things: it catches --card-switches' own margin-top, which gating the
   inner row would have stranded as a 10px orphan; and any switch added later is
   gated by existing inside it rather than by remembering to add a line here.
   The .max-vol-switch and .awesome-switch selectors that used to be listed are
   gone because they were exactly that — both live inside this container, so
   they were already covered and would only rot. Switch STATE is untouched by
   hiding: display:none does not reset a toggle, so collapsing to SIMPLE and
   reopening EXPERT shows what you left. */
.play-card:not(.is-expert) .card-switches { display: none; }

/* No ring. As of v0.2.6 the button names its DESTINATION — EXPERT to open,
   SIMPLE to close — so the word already says which way the door goes. A second
   signal for the same state only invites the question of which one to believe
   ("is SIMPLE the mode I am in, or the one I would get?").
   Its width cannot move between the two words either: .u-equal-row gives every
   button in the row `flex: 1 1 0`, so all four are the same width whatever they
   say — the pinning is structural, not a min-width to maintain. */

/* --- iOS-style sliding switch: slider left, label right ---------------------
   Lifted out of the CSS that js/blindtest-player.js injects at mount time, so
   listen.html can use the same component without loading the whole player. The
   player still owns its own .bt-player.bt-busy dimming rule. text-transform:none
   is what keeps a label like "Max Volume -14 LUFS" in title case against the
   uppercase base button rule. */
.bt-switches { display: flex; flex-direction: column; gap: 2px; }
.bt-switch { display: flex; align-items: center; gap: 12px; width: 100%;
             background: transparent; border: none; padding: 7px 0; cursor: pointer;
             font-family: var(--font-body); font-size: var(--text-ui); text-transform: none;
             letter-spacing: 0; color: var(--text); text-align: left; }
.bt-switch:hover { opacity: 1; }
/* ⚠️⚠️ `display: flex` ABOVE BEATS THE `hidden` ATTRIBUTE, and silently. The UA
   sheet's `[hidden] { display: none }` is a (0,1,0) rule on a bare attribute
   selector, so ANY class rule that sets `display` out-ranks it — a switch marked
   hidden went on occupying its full 148x40 box with `hidden="true"` sitting
   right there in the DOM saying otherwise. Restated at (0,2,0), which wins
   without reaching for !important. Clip mode hides the Awesome switch this way
   (v0.2.172); anything else that sets its own display and can be hidden needs
   the same line. */
.bt-switch[hidden] { display: none; }
.bt-track { flex: 0 0 44px; width: 44px; height: 26px; border-radius: 999px;
            background: var(--panel-border); position: relative; display: block;
            transition: background 0.18s ease; }
.bt-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
           border-radius: 50%; background: #fff; transition: transform 0.18s ease; }
.bt-switch[aria-checked="true"] .bt-track { background: var(--accent); }
.bt-switch[aria-checked="true"] .bt-knob { transform: translateX(18px); }
.bt-switch:disabled { opacity: var(--disabled-opacity); cursor: default; }
.bt-switch-label { min-width: 0; overflow-wrap: anywhere; }

/* --- Waveform overlay strip: name left, elapsed/total right ------------------
   One definition for all three waveform surfaces — the library box player
   (js/boxplayer.js), the play card (js/listen.js) and the blindtest scrubber
   (js/blindtest-player.js) — so the time readout sits in the same place at the
   same size everywhere. The parent must be position:relative. Where there is no
   name to show, leave .play-name empty and space-between still pins the time to
   the bottom-right. */
.play-foot {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: var(--z-overlay);
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 0 10px 3px;
}

/* Dark fade so the labels stay legible over the bars. */
.play-foot::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px;
  /* The transparent end stays a literal rgba of the SAME rgb: fading to the
     `transparent` keyword (rgba(0,0,0,0)) can grey the midpoint. */
  z-index: var(--z-under); background: linear-gradient(to top, var(--scrim-edge), rgba(14, 18, 23, 0));
}

/* The name strip at the bottom-left of the box. .proc-name is the same slot in
   the same rectangle during an upload; the two are meant to be indistinguishable
   as the box changes state, so they share one rule. */
/* ★ THE SIZE OF THE WHOLE OVERLAID BAND, IN ONE PLACE. Everything inside these
   two bars inherits it — see --data-body-size. The bars are the common container
   the readouts already shared; giving each child its own font-size again would
   put the dial back to four. */
.play-head,
.play-foot { font-size: var(--data-body-size); }

/* The name strip at the bottom-left of the box, and the upload's name in the
   same rectangle.
   ⚠️ SPLIT IN v0.2.138. These shared one declaration, but .proc-name is NOT a
   child of .play-foot — it is the dropzone's own label during a transcode — so
   inheriting the overlay dial would have left it sized by a token about text on
   a waveform, which it is not. Same look, two owners. */
.play-name {
  font-size: inherit; color: var(--text); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.proc-name {
  font-size: var(--text-ui); color: var(--text); text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* All three readouts share one declaration so they cannot drift apart: top-right
   data line, bottom-left listening level and bottom-right time are a matched
   set. Sized by the bar above them, not individually. */
.play-time,
.play-detail,
.play-listening {
  font-size: inherit; color: var(--text); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ★ THE DATA LINE'S OWN FACE. Condensed, because it is the one readout carrying
   four labelled figures rather than a word or a clock. The two classes below
   override it per element; this stays as the fallback for anything in the line
   that is neither — and as the face a reader gets if the spans never build. */
.play-detail { font-family: var(--font-data); }

/* --- The data line's taxonomy (v0.2.142) ------------------------------------
   ⚠️ NEITHER CLASS SETS font-size, AND NEITHER MAY. --data-body-size on
   .play-head/.play-foot is the one dial for every piece of text overlaid on a
   waveform; a size here would fork it. Face and colour only. */
.dataline-data {
  font-family: var(--dataline-data-font);
  color: var(--dataline-data-colour);
}
.dataline-legend {
  font-family: var(--dataline-legend-font);
  opacity: var(--dataline-legend-opacity);
}

/* ★★★ THE ONE FIGURE THAT MOVES, HELD STILL.
   inline-block is what lets a width apply at all; right-alignment keeps the
   decimal in the same column as the value narrows, which is the half that
   actually stops the eye jumping. Tabular figures on every value — the digits
   are then all one width, so "-9.9" and "-11.1" differ only by their sign and
   dot rather than by five different digit widths. */
.play-detail { font-variant-numeric: tabular-nums; }
.dataline-live {
  display: inline-block;
  min-width: var(--dataline-live-width);
  text-align: right;
}

/* ★★ THE FIELD DIVIDER (v0.2.143) — space, not a pipe.
   The span holds a single space so COPIED TEXT and a screen reader still get a
   separator between "S-LUFS -15.2" and "S-LUFS MAX"; the WIDTH is this token and
   has nothing to do with how wide that space would have been.
   ⚠️ inline-block is what lets a width apply to it at all. It sits BETWEEN
   fields and never inside one, so it cannot disturb the fixed S-LUFS slot — the
   neighbour-stability check measures the position after that slot and would say
   so if it did. */
.dataline-gap {
  display: inline-block;
  width: var(--dataline-space);
}

/* ★★ THE READOUT STRIPS DO NOT EAT TAPS.
   
   .play-head and .play-foot are full-width bars pinned across the top and bottom
   of a wave box, and the box they cover is the SEEK SURFACE. Left as they were,
   they swallow every pointer that lands on them — a dead strip along both edges
   of every waveform in the app, where a tap does nothing at all. Nobody had
   reported it because the bars are thin and their text sits in the corners; the
   LUFS meters made it visible, because a subtitle sitting 20px below the horizon
   lands inside the bottom bar and its taps died there.
   
   ⚠️ SAFE BECAUSE THEY HOLD ONLY TEXT. Every child of either bar, in all four
   players, is a <span> readout — .play-name / .play-time / .play-detail /
   .play-listening. The eject × is a SIBLING of these bars, not a child, so it
   keeps its own pointer events and still closes the player.
   The cost is that the duration text can no longer be selected with the mouse;
   an ephemeral readout that updates on every frame is not text anyone selects. */
.play-head,
.play-foot { pointer-events: none; }

/* Mirror of .play-foot along the top edge. Three-corner scheme inside a wave box:
   top-right source figures, bottom-left listening level, bottom-right time.
   flex-end because the head holds one child — space-between would park it left. */
.play-head {
  position: absolute; left: 0; right: 0; top: 0; z-index: var(--z-overlay);
  display: flex; justify-content: flex-end; align-items: baseline;
  gap: 12px; padding: 3px 10px 0;
}

/* Same legibility treatment as the foot, flipped. */
.play-head::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 30px;
  z-index: var(--z-under); background: linear-gradient(to bottom, var(--scrim-edge), rgba(14, 18, 23, 0));
}

/* Occupies .play-name's slot in the foot; min-width:0 lets it yield to the time
   rather than push it out on a narrow card. */
.play-listening { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Pinned to the right EDGE, not to a space-between that needs two children.
   .play-foot is space-between, which puts a lone child at flex-START — so the
   moment EXPERT hid the penalty beside it, the time slid to the left. An auto
   start-margin makes it flex-end on its own account, and changes nothing when
   the penalty is back. */
.play-time { margin-inline-start: auto; }

/* --- Artwork ----------------------------------------------------------------
   Shared by the library's Edit modal and the public play card, so it lives here
   rather than in either page's stylesheet. Those are the only two places the app
   renders artwork, which is why one rule keeps them consistent.

   No white matte: the artwork fills the box edge to edge. overflow:hidden makes
   this box the clip, and the radius is repeated on the img below so the real
   image element is rounded rather than merely sitting behind a rounded box. */
.art-frame {
  position: relative;
  width: 100%;
  /* Square regardless of what is inside — the box is sized before the image
     loads, so nothing reflows when it arrives. */
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  border-radius: var(--art-radius);
  overflow: hidden;
}

.art-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--art-radius);
}

/* --- Shared utilities ------------------------------------------------------
   Applied as an extra CLASS in JS rather than by comma-grouping selectors
   across files: grouping would move a rule's cascade position and can flip a
   specificity tie, which is the trap Pass 2 documented. A class adds the same
   declarations wherever the element already sits. */

/* A row of equal-width buttons, none of which may be pushed out by a long
   label. Used by the blind test's A/B/C/D slots and the play card's transport —
   a mirror the v0.0.54 comment described but could not share. Values are the
   originals; tokenising them is the spacing-scale pass. */
.u-equal-row { display: flex; gap: 8px; width: 100%; }
.u-equal-row button { flex: 1 1 0; min-width: 0; padding: 9px 6px; }
@media (max-width: 600px) {
  .u-equal-row { gap: 6px; }
  .u-equal-row button { padding: 8px 4px; }
}

/* Dim text carrying FIGURES — durations, byte counts, loudness, counts. Tabular
   numerals so columns of them line up.
   Comma-grouped rather than applied as a class in JS: .modal-empty alone is
   constructed at ten call sites, and a utility every future call site must
   remember to add is a utility that will be forgotten. Only the two shared
   declarations live here; font-size stays local, because the sizes genuinely
   differ (12px beside a name, 13px on its own line) and the type scale is a
   later pass. Verified not to shift any tie — see the v0.1.3 report. */
.u-figure,
.select-count,
.member-loud,
.modal-facts,
.modal-empty,
.bt-detail-loud,
.pl-info-line { color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* --- The play card ----------------------------------------------------------
   js/playcard.js mounts this on the public listen.html page AND in the library's
   "Open" modal, so the rules live here rather than in css/listen.css, which only
   listen.html loads. Everything below is scoped to .play-card, the class the
   component puts on its own container. */
.play-card .title {
  font-size: var(--text-hero);
  margin: 0 0 22px;
  word-break: break-word;
}

/* Positioned parent for the .play-head / .play-foot overlays; carries the wave's
   bottom margin so spacing below is unchanged. */
/* STICKY, not relative (v0.2.43). Both are positioned values, so the four
   corner overlays this box absolutely places inside itself are unaffected.
   Sticky works here because nothing between this element and either host's
   scroller has overflow, transform, filter or contain — checked on both chains;
   .card-frame's isolation:isolate creates a stacking context, which sticky does
   not care about.

   z-index lifts it over two things: the tint vignette (.card-frame::before,
   z-index 0) and every LATER sibling, which would otherwise paint over a pinned
   box in DOM order. It cannot escape the card — .card-frame isolates — so the
   modal's ✕ at --z-sticky still wins wherever they meet.

   The background is what makes content scroll cleanly BEHIND it. Almost a
   no-op at rest: .wave already paints --input-bg over the same box, so this
   only covers the 1px transparent border and guarantees opacity if that ever
   changes.

   margin-bottom is --card-side so the resting gap below matches the gap above
   and at the sides. It was 22px before this build. Since v0.2.85 nothing zeroes
   it: the jog moved BELOW the button row, so the wave keeps its ordinary margin
   in every state and the ordinary transport sits flush under it. */
.play-card .wave-wrap {
  position: sticky;
  top: var(--wave-pin-top);
  z-index: 1;
  background: var(--input-bg);
  border-radius: var(--wave-pin-radius);
  margin-bottom: var(--card-side);
}

/* Elevation only while actually pinned — js/wavepin.js toggles the class from an
   IntersectionObserver. Decorative and fail-soft: without it the box still pins,
   it just does not lift. The radius rides along so a softened box keeps its
   corners under the shadow. */
.play-card .wave-wrap.is-pinned { box-shadow: var(--wave-pin-shadow); }
.play-card .wave-wrap.is-pinned .wave { border-radius: var(--wave-pin-radius); }

.play-card .wave {
  width: 100%;
  min-height: 96px;
  margin-bottom: 0;
  background: var(--input-bg);
  /* TRANSPARENT, not removed (v0.2.19). The pale hairline goes, but the border
     BOX stays, so the wave keeps its exact height and nothing below it shifts —
     and --tint-height, which is calibrated to the wave's top edge, stays true.
     The element's own background paints under a transparent border, so what you
     see is 1px more --input-bg rather than 1px of card surface. */
  border: 1px solid transparent;
}

/* Equal-width, in-line, no wrapping — the same geometry as the blindtest slot row
   (.bt-slots in js/blindtest-player.js): flex:1 1 0 so every button gets an
   identical share of the row, min-width:0 so a long label shrinks its button
   instead of pushing the row wider, and the reduced side padding that makes that
   survive a full row on a phone. Vertical padding is unchanged, so the height
   still matches every other button on the page.
   ★ THE COUNT IS NEVER DECLARED HERE, AND THAT IS THE FEATURE (v0.2.147). The
   slot row went from a fixed four to one button per member (2..8); `flex: 1 1 0`
   divided the row correctly for every N with no rule added and no per-count
   branch. Keep it that way — a width or an :nth-child here is what would turn
   the next count change into a CSS edit. Measured at 8 on a 390px phone by
   scripts/btslots-check.mjs. */
/* Geometry comes from .u-equal-row; only the card's own spacing is local. */
.play-card .player-controls { margin-top: 18px; }

/* Artwork sits above the title, sized as a SHARE of the card. The size lives on
   a WRAPPER rather than on .art-frame: it was originally forced there by the
   white matte's percentage padding, which resolved against the card rather than
   the image. The matte is gone as of v0.0.59, but the wrapper stays — it keeps
   the sizing and the 1:1 box as separate concerns, which is what lets the frame
   below own the shadow without also owning the width.

   v0.2.8: a proportion (--art-width), not the old 280px cap. max-width:100% is
   the guard that a token set above 100% cannot push the art wider than the card
   it sits in. */
/* --- The artwork tint (v0.2.9) ----------------------------------------------
   A pseudo-element, not a wrapper: the card's parts are flat siblings of the
   container, and threading a background element in among them would mean
   restructuring the DOM that six other rules and the transport already position
   against. ::before costs nothing and sits behind all of them.

   position:relative is what the absolute ::before resolves against — and it is
   also why this cannot be put on the HOST instead: the modal host scrolls, and a
   tint anchored to it would slide away from the header it belongs to.

   isolation:isolate is load-bearing, not decoration. The obvious spelling is
   z-index:-1 on the ::before, the way --z-under is used elsewhere — but those
   uses sit inside a parent that already establishes a stacking context, and
   .play-card does not. A negative z-index would therefore escape the card
   entirely and paint behind the HOST's background, which is opaque
   --card-surface, so the tint would be invisible in both hosts. Isolating the
   card gives the wash a floor to sit on: 0 for the tint, --z-base for content.

   pointer-events:none so the wash can never eat a click. */
/* .card-frame is the SHARED frame (v0.2.17). Everything from here down that is
   about the card as a CONTAINER — its surface, its stacking, its artwork, the
   ambient vignette — keys on this class rather than on .play-card, and all three
   renderers put it on their root: mountPlayCard (.play-card), mountBlindtestPlayer
   (.bt-player) and mountPlaylistPlayer (.pl-player). They share no other markup —
   their internals are entirely different vocabularies — so the frame is the one
   layer that could be unified, and unifying it is what carries card-v2 to the
   blind test and the sequence without touching either player's guts.

   text-align stays on .play-card and does NOT move here: the standard card is a
   centred column, but the sequence's track list and the blind test's slot rows
   are left-aligned and centring them would be a redesign, not a frame. */
.play-card { text-align: center; }
.card-frame {
  /* The readable column, and the frame's whole geometry (v0.2.17). Hosted here
     rather than per-host: the surface behind the card goes edge to edge, but the
     CONTENT stays a 560px column with a --card-side gutter, and that is true in
     the modal, on listen.html and on the blind test / sequence pages alike. Both
     hosts previously declared their own copy; the library's was identical and
     the public one is reconciled to it in css/listen.css.
     No top padding: the library's sticky ✕ head supplies it, and the standalone
     pages add their own — a top gutter is host chrome, the sides are the frame. */
  max-width: var(--card-max);
  margin: 0 auto;
  padding: 0 var(--card-side) 24px;
  position: relative;
  isolation: isolate;
  /* DECLARED HERE, and it must stay here (v0.2.10). This is the element that
     js/playcard.js sets --card-raw-tint on, and a custom property substitutes
     its var()s at the scope it is DECLARED in — so this is the only scope where
     var(--card-raw-tint) can see the card's own inline value. In :root, where
     this lived in v0.2.9, --card-raw-tint is unset, so it silently took the
     fallback and every card inherited surface-mixed-with-surface: invisible.
     Moving this line back up would not error, it would just switch the feature
     off again.

     The fallback still does its job from here: a card with no artwork never gets
     --card-raw-tint set, so the mix resolves to the surface and the gradient
     fades background-to-background — flat, exactly as in v0.2.8. */
  --card-tint: color-mix(in srgb, var(--card-raw-tint, var(--card-surface)) var(--tint-strength), var(--card-surface));
}
.card-frame::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--tint-height);
  /* PURE LINEAR — two stops, straight ramp, no plateau. v0.2.14 held the tint
     flat for the first 28% on the theory that Spotify's header does; sampling
     both vignettes down a clean column showed it does not. Spotify's is a
     straight line from full to surface, deviating from a pure ramp by about 2%.
     A held plateau is a shape ours had and theirs never did, so it is gone, and
     the top's boldness is --tint-strength's job alone.

     Fades to the SURFACE, not to `transparent`. The transparent keyword is
     rgba(0,0,0,0), so interpolating to it drags a warm tint through darker greys
     on the way down — the same trap .play-foot::before documents above. Both
     stops opaque and in the same family keeps the fade clean, and it lands
     exactly on the colour the card is painted anyway. It is also what makes the
     no-artwork case free: --card-tint falls back to --card-surface, so all three
     stops become the surface and the whole gradient is invisible. */
  background: linear-gradient(180deg, var(--card-tint) 0%, var(--card-surface) 100%);
  z-index: 0;
  pointer-events: none;
}
/* Everything real sits above the wash. The card's children are otherwise
   auto-z-indexed and would tie with the ::before rather than beat it. */
.card-frame > * { position: relative; z-index: var(--z-base); }
.card-frame .art-hold { width: var(--art-width); max-width: 100%; margin: 0 auto; }
/* The shadow is scoped to the CARD, not put on the shared .art-frame: the same
   frame renders the library's Edit modal (js/library.js) and the blindtest /
   sequence item meta (js/item-meta.js), and neither of those is being lifted off
   its surface. Outset shadows draw outside the border box, so the frame's own
   overflow:hidden clips the image without touching this. */
.card-frame .art-frame { margin-bottom: 18px; box-shadow: var(--art-shadow); }
.play-card .track-artist { font-family: var(--font-body); font-size: var(--text-body);
                           color: var(--text); margin: -14px 0 18px;
                           overflow-wrap: anywhere; }

/* ── THE RECIPIENT HEADER STACK (v0.2.172, player cleanup S1) ───────────────
   Three centred lines: name, artist, reference. The first two are the SAME
   size and face — they are one two-line title, not a title and a caption — so
   the artist is restated at the title's own scale here rather than inheriting
   the library's small body treatment. The reference is the only subtitle. */
.play-card.is-recipient .title { margin-bottom: var(--player-head-gap); }
.play-card.is-recipient .track-artist {
  font-family: var(--font-title);
  font-size: var(--text-hero);
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  margin: 0 0 var(--player-head-gap);
}
/* The reference. Small, dim, and uppercased with the rest of the block — if the
   "MIXREF:" prefix reads wrong on glass, THIS text-transform is the one dial. */
.play-card.is-recipient .track-mixref {
  font-family: var(--font-body);
  font-size: var(--text-ui);
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 var(--player-head-mixref-gap);
  overflow-wrap: anywhere;
}
/* ★ THE OVER-WAVE DATA LINE IS EXPERT-ONLY HERE (S1). It is four measurements
   in a technical shorthand; Simple is the mode for someone who just opened a
   link. Expert keeps it, and the table below carries the same figures in full.
   Library cards are unaffected — the gate needs BOTH classes. */
.play-card.is-recipient:not(.is-expert) .play-head { display: none; }

/* ── THE ENCODED MixRef LINE (v0.2.181) ─────────────────────────────────────
   Legend, reference, the held chip's seat, and the info mark — one row, and the
   WHOLE row is the button. The icon only signals that an explanation exists;
   a 12px target would not be a control on a phone. */
.play-card .track-mixref.is-encoded { margin-bottom: var(--player-head-mixref-gap); }
.mixref-line {
  display: inline-flex; align-items: center; gap: var(--mixref-gap);
  /* Inherits the header block's face, size, tracking and UPPERCASE transform —
     it is the same subtitle, now pressable. No per-element exemption. */
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: inherit; background: none; border: 0; padding: 0;
  cursor: pointer;
}
.mixref-line:hover .mixref-info,
.mixref-line:focus-visible .mixref-info { color: var(--accent); }
.mixref-line:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* The legend and value ride ~2px high of the chip and info mark: all four items
   centre on the same line, but a glyph sits high in its line-box while the two
   marks fill theirs. Nudge the ink down to meet them — optics, not layout. */
.mixref-legend,
.mixref-value { transform: translateY(2px); }
/* ★★ THE COLOUR CHIP (v0.2.182) — it fills the seat, and the seat's size is
   unchanged, so the line does not move now that it is occupied.
   ⚠️ The element is ALWAYS this size; `.has-chip` only adds the paint. A code
   the codec will not vouch for leaves an empty box rather than a wrong colour. */
.mixref-chip-gap { display: inline-block; width: var(--mixref-chip-size); height: var(--mixref-chip-size); }
.mixref-chip-gap.has-chip {
  border-radius: var(--mixref-chip-radius);
  /* ★★ OKLCH, NOT HSL, and that is the whole reason for a controlled wheel over
     literal hex: at a FIXED lightness and chroma every hue reads equally bright
     on the dark player. In HSL a yellow at L 65% is glaring and a blue at the
     same number is nearly invisible — the chip would shout for some revisions
     and vanish for others, which is worse than no chip.
     ⚠️ JS supplies --mixref-chip-hue and nothing else. */
  background: oklch(
    var(--mixref-chip-oklch-l)
    var(--mixref-chip-oklch-c)
    calc(var(--mixref-chip-hue, 0deg) + var(--mixref-chip-hue-offset))
  );
  /* Defensive, and deliberately so: an INSET ring means a chip can never melt
     into the card even if the tokens above are later pushed toward the player's
     own colour. Inset rather than a border, so it costs no layout. */
  box-shadow: inset 0 0 0 1px var(--mixref-chip-ring);
}
/* A browser with no OKLCH gets the same wheel through HSL. Not the same
   perceptual evenness — that is the point of the primary rule — but a chip
   rather than a blank box. */
@supports not (color: oklch(0.65 0.15 250deg)) {
  .mixref-chip-gap.has-chip {
    background: hsl(calc(var(--mixref-chip-hue, 0deg) + var(--mixref-chip-hue-offset)) 55% 58%);
  }
}
/* Only in running text — on the card the chip is a grid/flex item and the
   baseline never applies. */
.help-body .mixref-chip-gap { vertical-align: var(--mixref-chip-inline-shift); }
.mixref-info { display: inline-flex; color: var(--text-dim); }
.mixref-info svg { width: var(--mixref-info-size); height: var(--mixref-info-size); display: block; }

/* ── THE SHARED HELP MODAL (js/help-modal.js) ───────────────────────────────
   Its own class, NOT .modal-backdrop: js/welcome.js decides whether a key press
   belongs to it by looking for that selector, and two overlays answering to one
   name would make Escape ambiguous. */
.help-backdrop {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: var(--scrim-edge, rgba(0, 0, 0, 0.72));
  display: flex; align-items: center; justify-content: center;
  padding: var(--card-side);
}
.help-panel {
  background: var(--panel, var(--card-surface)); color: var(--text);
  border: 1px solid var(--panel-border); border-radius: 10px;
  max-width: var(--card-max); width: 100%;
  max-height: 80vh; overflow-y: auto;
  padding: 20px; text-align: left;
}
.help-title {
  font-family: var(--font-title); text-transform: uppercase;
  letter-spacing: var(--tracking); font-size: var(--text-body);
  margin: 0 0 12px;
}
.help-body { font-family: var(--font-body); font-size: var(--text-ui); line-height: 1.55;
             color: var(--text-dim); }
.help-body p { margin: 0 0 12px; }
.help-close { margin-top: 4px; }
.play-card .notes-body { margin-top: 16px; }

/* --- The transport area (js/transport.js) ------------------------------------
   Library play card only, and only with the feature flag on — js/listen.js never
   asks for it, so none of this renders on the public share page.

   v0.1.36: the transport no longer has a button row of its own. The split play
   lives in the card's existing REW/PLAY/SHARE/MORE row (see .play-slot below)
   and the switch on the card's bottom toggle line, so this wrap holds only the
   jog strip. */
.transport-wrap { margin-top: 0; }

/* --- The jog's slot, BELOW the button row (v0.2.85) -------------------------

   It used to be a RESERVED fixed-height band BETWEEN the waveform and the
   buttons — always the same height whether the strip showed or not, so engaging
   Awesome moved nothing. The cost was an empty band on every card that could
   have a transport, and the advanced surface sitting ABOVE the ordinary one:
   the row everybody uses was pushed down by a control most people never enable.

   Now the ordinary transport is flush under the waveform and the strip lands
   underneath it. Nothing above it moves when it appears — which is what the
   reservation existed to protect — because the variable-height thing is simply
   LAST rather than held space for.

   ⚠️ NO HEIGHT AND NO MARGIN HERE. The slot must collapse to nothing while the
   strip is display:none (see .transport-wrap > .jog), or Simple mode would carry
   an empty band at the foot of the card — the very gap this build removes, moved
   rather than deleted. The spacing therefore belongs to the STRIP, which only
   exists when engaged. */
/* (No rule for .jog-slot itself, and none for .has-jog any more: both used to
   reserve and compensate for the old band, and a rule that exists to do nothing
   is worse than none. .has-jog remains on the card as a state marker.)

   The strip owns the gap above itself, so it is present exactly when the strip
   is. 18px matches the button row's own top margin, so wave -> buttons -> jog
   reads as one rhythm rather than two. */
.play-card .jog-slot .jog { margin-top: 18px; }

/* --- The jog strip (js/jog.js) ----------------------------------------------
   Live since v0.1.35: dragging it drives the playback rate, and releasing it
   springs the handle home while the audio ramps to the base mode. Geometry comes
   from the --transport-btn-* tokens, which also size the handle at half the
   strip's height — one source for both so they cannot drift. */
.jog {
  position: relative;
  height: var(--transport-btn-size);
  margin-top: 8px;
  border: 1px solid var(--accent);
  border-radius: var(--btn-radius);
  /* Outline only — the card's own ground shows through. */
  background: none;
  box-sizing: border-box;
  overflow: hidden;          /* the handle can never paint over the outline */
}

.jog-box {
  position: absolute;
  /* Absolute positioning resolves against the PADDING box, so 0/0 here is the
     inside face of the outline — the handle fills the interior height exactly
     without having to know the border width. */
  top: 0;
  bottom: 0;
  /* Half a transport button wide, centred at rest. The translate is what the
     drag moves, so `left` stays put and no layout is recalculated per frame. */
  width: calc(var(--transport-btn-size) / 2);
  left: calc(50% - var(--transport-btn-size) / 4);
  background: var(--accent);
  border-radius: var(--btn-radius);
  cursor: grab;
  /* Without this a horizontal drag on a phone is claimed by the page scroller
     before the first pointermove ever arrives. */
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.jog.is-dragging .jog-box { cursor: grabbing; }

/* --- Split controls, IN PLACE (v0.1.36; REW joined them in v0.1.45) ----------
   A slot in the standard REW / PLAY / SHARE / MORE row. It takes the single
   button's share of the equal-width geometry, and whichever occupant is showing
   fills it — so turning the transport on and off never moves or resizes
   anything else in the row.

   BOTH the PLAY slot and the REW slot carry .play-slot, so the half-widths and
   the gutter between the halves are literally the same rules. Two selectors
   that happened to agree would not stay agreeing. */
.u-equal-row > .play-slot { flex: 1 1 0; min-width: 0; display: flex; }
.play-slot > .play-single { flex: 1 1 0; min-width: 0; }

/* Two halves and a small gutter, inside PLAY's slot. */
.play-slot > .play-split { display: none; flex: 1 1 0; min-width: 0; gap: 4px; }
.play-slot > .play-split > button { flex: 1 1 0; min-width: 0; }

.play-slot.is-split > .play-single { display: none; }
.play-slot.is-split > .play-split { display: flex; }

/* Three states, and only three:
     ACTIVE   solid yellow fill, dark glyph — this direction is the base mode
     IDLE     no fill, yellow outline, yellow glyph
     STOPPED  neither engaged, so BOTH read as idle
   Painted from the base mode, not from what is sounding, so scrubbing the jog
   the other way does not make the lit button flicker. */
.play-half {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: none;
  color: var(--accent);
}
/* 1.2em is the line box its lettered siblings get from font-size x the body
   face's 1.2
   factor, so a glyph button is EXACTLY as tall as a text button — at every
   breakpoint, without pinning a height that would have to be maintained. */
.play-half svg { width: 1.2em; height: 1.2em; display: block; }

/* ★★ THE CARD'S SIX EXPERT GLYPHS TAKE THE DIAL (v0.2.162).
   |< >| · backwards · forwards · share · scissors. Three slots, two halves each,
   six <svg>s that were six renderings of the 1.2em above — so making them bigger
   meant editing a rule and hoping nothing else was leaning on it. One length,
   one place. They have different viewBoxes (24 for five of them, 16 for the
   scissors) and different paint modes (stroke for share, fill for the rest), but
   the RENDERED box is set by width/height, so a single size token really does
   give one uniform size across all six.

   ⚠️ SCOPED TO THE CARD, AND THAT IS THE WHOLE POINT OF THE EXTRA RULE. The
   1.2em above is NOT only the card's: index.html's centre transport button is a
   .play-half too — deliberately, so the two cannot drift — and it already has
   its own dial in --wave-play-icon, which it spends as a font-size precisely
   because .play-half draws its glyph at 1.2em. Writing the card's token onto the
   shared rule would have quietly made the card's dial the library's as well.

   ⚠️⚠️ WHAT YOU SEE IS THE WIDTH, NOT THE em. Worth knowing before turning this
   up and being underwhelmed. The button is 6px-padded inside an equal-width row,
   which leaves 13.89px of content box against the 16.8px this asks for, and the
   svg is a shrinkable flex item, so the box that survives is 13.89 x 16.8 — not
   square. An <svg> then paints its viewBox letterboxed inside that box, so the
   glyph is drawn at the SMALLER dimension: 13.9px, set by the width. The em only
   ever governed the height, and the height only ever governed the line box —
   which is what the note above is really describing.
   ★ The dial still works, because the row is content-sized: a bigger box asks
   the row for more width, the row grows, and the squeezed width grows with it.
   Measured 1.2em -> 13.9px, 1.4 -> 16.0, 1.6 -> 18.1, 2 -> 22.3, 3 -> 32.8.
   ⚠️ Turning the squeeze off (`flex: 0 0 auto`) would make the glyph exactly the
   token — 1.2em -> 16.8px — and was NOT done: it is a 21% jump on a build whose
   job is to change nothing, and it buys no geometry (the card, row and slot
   measure the same at every value either way, because the unsqueezed width is
   what the row was sizing itself from all along). If a glyph that IS the number
   is wanted later, that one declaration is the whole change. */
.play-card .play-half svg {
  width: var(--playcard-icon-size);
  height: var(--playcard-icon-size);
}
.play-half.is-active { background: var(--accent); color: var(--accent-text); }
/* ⚠️⚠️ THE HOVER AFFORDANCE IS SCOPED TO DEVICES THAT HAVE HOVER (v0.2.161).
   It used to apply everywhere and be CANCELLED afterwards in an
   `@media (hover: none)` block — and that cancel was the rewind bug: it said
   `background: none`, which is the right resting state for THIS rule's subject
   (an idle .play-half is an outline) and the wrong one for every pair whose rest
   is SOLID. `.cue-slot .play-half` is (0,2,0) and `.cue-slot .play-half:hover`
   is (0,4,0) — the cancel was also (0,4,0) and came LATER in the file, so it won
   both. Tap REWIND on a phone: touch asserts :hover and holds it, the fill went
   transparent, and it stayed that way until you tapped something else.
   ★ Declaring the tint only where hover is a real input mode fixes it for every
   pair at once, present and future, with no exclusion list to maintain and no
   third copy of "solid accent" to keep in step. A touch device now has NO rule
   that touches these backgrounds, so whatever the resting rule says, stands. */
@media (hover: hover) {
  .play-half:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
  .play-half.is-active:not(:disabled):hover { background: var(--accent); }
}
.play-half:disabled { opacity: var(--disabled-opacity); cursor: default; }

/* The CUE pair is different, and has to look different.
   |< and >| are momentary ACTIONS — they fire and are done. They are not a
   choice between two states, so the outline/solid grammar the PLAY pair uses to
   say "this direction is selected" has nothing to say about them, and rendering
   them permanently outlined reads as the unchosen half of a pair they are not
   part of. Solid always, like the plain REW button they replace.
   The hover is spelled out because .play-half:not(:disabled):hover would
   otherwise out-specify this and wash the fill away. */
.cue-slot .play-half,
.cue-slot .play-half:not(:disabled):hover {
  background: var(--accent);
  color: var(--accent-text);
}

/* ★★ THE EXPERT SHARE PAIR (v0.2.160) — Apple share | scissors, in SHARE's slot.
   Same grammar as the cue pair and for the same reason: both halves are
   momentary ACTIONS, not a choice between two states, so the outline/solid
   language the PLAY pair uses to say "this direction is selected" has nothing to
   say here. Solid accent always, dark glyph, like the lettered SHARE it replaces.

   ⚠️⚠️ THE HOVER IS SPELLED OUT, AND THAT IS THE STUCK-STATE FIX. The base
   `.play-half:not(:disabled):hover` washes the fill to a 22% tint — which on a
   TOUCH device sticks after the tap, because :hover has nothing to move away to.
   That is the transparent-fill-that-persists shape; restating the hover as the
   same solid fill means there is no state to get stuck in. The cue pair has
   carried this defence since it was built; this is not a new trick.
   ⚠️ NO :active or :focus fill of its own, deliberately — every extra painted
   state is another one that can be left behind on a phone. */
.share-slot .play-half,
.share-slot .play-half:not(:disabled):hover,
.share-slot .play-half:not(:disabled):active {
  background: var(--accent);
  color: var(--accent-text);
}

/* ★★★ EXCEPT THE SCISSORS, WHICH STOPPED BEING A MOMENTARY ACTION (v0.2.170).
   The rule above is right for a button you PRESS and are done with, and the
   note on it says so: "both halves are momentary ACTIONS, not a choice between
   two states, so the outline/solid grammar the PLAY pair uses to say 'this
   direction is selected' has nothing to say here."
   ⚠️ CLIP SLICE 1 MADE ONE OF THEM A TOGGLE, and that reasoning stops applying
   to it: the scissors now IS a choice between two states — in clip mode or not
   — and it is the ONLY affordance saying which, since Done is gone. So it takes
   the transport's own engaged/idle grammar, unchanged and not reinvented:
   OUTLINE when idle, SOLID ACCENT when engaged, exactly as .play-half and
   .play-half.is-active already read across the card.
   ★ The SHARE half beside it keeps the solid rule above — it is still a press
   and forget. Two halves, two behaviours, each dressed as what it is.
   ⚠️ (0,3,0), so it beats the (0,2,0) group above regardless of order. */
.share-slot .play-half[aria-pressed="false"],
.share-slot .play-half[aria-pressed="false"]:not(:disabled):hover {
  background: none;
  color: var(--accent);
}
@media (hover: hover) {
  .share-slot .play-half[aria-pressed="false"]:not(:disabled):hover {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
  }
}

/* --- SIMPLE mode: one solid button, and it is PLAY (v0.2.16) ----------------
   Every button on the card is solid accent by default, which gives four equally
   loud controls and no answer to "what do I press". In SIMPLE the answer should
   be obvious at a glance, so PLAY keeps the fill and everything else drops to
   the yellow OUTLINE the transport's idle .play-half already uses — the app's
   existing quiet-but-available grammar, not a new one. EXPERT is unchanged: all
   solid, because by then you know what the buttons do.

   The selectors are shaped around one trap: the cue slot carries BOTH classes
   (`play-slot cue-slot`), so anything written as `.play-slot ...` hits REWIND as
   well as PLAY. Hence `.player-controls > button` for the bare SHARE/EXPERT
   buttons — the two slots are divs, so they are not matched — and `.cue-slot`
   by name for REWIND. PLAY needs no rule at all: it is simply the one thing
   here that is never selected, so it keeps the base fill. */
/* ⚠️ `.share-slot > .play-single` JOINED THE LIST IN v0.2.160. SHARE used to be
   a bare button in the row and was matched by `.player-controls > button`;
   moving it into a slot (so it can split in Expert) took it out of that match,
   and without this line Simple would have shown TWO solid buttons and no answer
   to "what do I press" — the exact thing this rule exists to prevent. */
.play-card:not(.is-expert) .player-controls > button,
.play-card:not(.is-expert) .cue-slot > .play-single,
.play-card:not(.is-expert) .share-slot > .play-single {
  background: none;
  color: var(--accent);
  border-color: var(--accent);
}
.play-card:not(.is-expert) .player-controls > button:not(:disabled):hover,
.play-card:not(.is-expert) .share-slot > .play-single:not(:disabled):hover,
.play-card:not(.is-expert) .cue-slot > .play-single:not(:disabled):hover {
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  opacity: 1;
}
/* The cue PAIR follows REWIND, which is what it replaces — its own rule above
   is solid-always precisely because the plain REW button was, so when that goes
   to outline these have to as well or the row disagrees with itself. Written at
   (0,4,0) to beat `.cue-slot .play-half:not(:disabled):hover`, and the hover is
   spelled out for the same reason that rule spells its own out. */
.play-card:not(.is-expert) .cue-slot .play-half,
.play-card:not(.is-expert) .cue-slot .play-half:not(:disabled):hover {
  background: none;
  color: var(--accent);
}

/* --- The PLAY pulse (v0.2.16) ----------------------------------------------
   A slow breath of glow and scale on PLAY, to answer "where do I start" for
   someone who has never seen this card. Three conditions, all necessary:

     :not(.is-expert)    SIMPLE only. In EXPERT every button is solid and one of
                         them quietly throbbing reads as a fault, not a hint.
     :not(.has-played)   Before the first play only. js/playcard.js sets the
                         class on wavesurfer's first `play` and never clears it,
                         so this invites once and then leaves you alone.
     :not(.cue-slot)     PLAY, not REWIND — both slots carry .play-slot.

   transform:scale is a paint-only change on a flex item, so nothing around it
   reflows as it breathes. */
@keyframes play-pulse {
  from { transform: scale(1);                        box-shadow: 0 0 0 0 transparent; }
  to   { transform: scale(var(--play-pulse-scale));  box-shadow: 0 0 var(--play-pulse-spread) var(--play-pulse-glow); }
}
.play-card:not(.is-expert):not(.has-played) .play-slot:not(.cue-slot) > .play-single {
  animation: play-pulse var(--play-pulse-duration) ease-in-out infinite alternate;
}
/* Reduced motion: keep the SIGNAL, drop the MOVEMENT. A static glow still puts
   the eye on PLAY, which is the whole job; the breathing was only ever the
   pleasant way of doing it. Not `animation: none` alone — that would leave the
   button with no emphasis at all and quietly remove the affordance for exactly
   the people most likely to need it. */
@media (prefers-reduced-motion: reduce) {
  .play-card:not(.is-expert):not(.has-played) .play-slot:not(.cue-slot) > .play-single {
    animation: none;
    transform: none;
    box-shadow: 0 0 var(--play-pulse-spread) var(--play-pulse-glow);
  }
}

/* The bottom toggle LINE: Lossless and the Awesome transport, side by side.
   Wraps rather than overflows on a narrow card. */
/* One switch per row, left-aligned (v0.2.16). It was a centred wrapping line,
   which is fine for two chips but reads as a ragged cluster once all three are
   revealed together — and a control panel is a list, not a caption.

   text-align:left is doing real work here, not tidying: the subtree inherits
   centring from .play-card AND, on the public page, again from .player. An
   inherited value loses to any declaration on the element itself, so stating it
   once on this row beats both without needing to out-specify either. */
.card-switch-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
}

/* OFF is the default and the resting state: the jog is not merely inert but
   absent, and PLAY's slot holds the ordinary single button. */
.transport-wrap > .jog { display: none; }
.transport-wrap.is-awesome > .jog { display: block; }

/* Discreet, centred under the transport row. Holds the -14 ceiling and the
   Lossless pill, stacked — the same column the sequence player uses for its
   Match/Lossless pair. The switch itself is the shared .bt-switch below. */
/* stretch, not centre (v0.2.16): the column below left-aligns its switches, and
   a centred parent would keep re-centring the whole block on the card. */
.card-switches { align-items: stretch; margin-top: 10px; }
.card-switches .bt-switch { width: auto; font-size: var(--text-meta); color: var(--text-dim); }
.card-switches .bt-switch:not(:disabled):hover { color: var(--text); }

.status {
  margin-top: 16px;
  font-size: var(--text-ui);
  color: var(--text-dim);
  min-height: 18px;
}

/* Artwork / artist / notes above a blindtest or sequence player, built by
   js/item-meta.js. Centred like the play card, and capped narrower than the
   track card because it sits above a whole player rather than being the
   subject. .art-frame supplies the 1:1 box, the 10px radius and the clip. */
.item-meta {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 18px; text-align: center;
}
.item-meta .art-hold { width: 100%; max-width: 220px; margin: 0 auto; }
/* ...but inside a card frame the frame's sizing wins (v0.2.17). This rule and
   .card-frame .art-hold are both (0,2,0) and this one comes later, so without
   the extra class the blind test and the sequence would keep the old 220px cap
   while the standard card used --art-width — the two would look like different
   components again, which is the thing this build exists to stop. */
.card-frame .item-meta .art-hold { width: var(--art-width); max-width: 100%; }
/* The artist NAME is full-brightness (v0.2.19), the same white as the title
   above it — it is a name, not metadata, and --text-dim read as an afterthought
   next to the artwork. Only the name: "Album · date" and the rest of the
   sub-text stay dim, which is what separates them. */
.item-artist {
  font-family: var(--font-body); font-size: var(--text-body); color: var(--text);
  overflow-wrap: anywhere;
}

/* Artist line under a Details panel's member list, above its notes. */
.modal-artist {
  font-family: var(--font-body); font-size: var(--text-ui); color: var(--text-dim);
  overflow-wrap: anywhere; margin-bottom: 6px;
}

/* Rendered notes. The renderer emits only strong/em/del/br, so this is the whole
   surface it needs to style. */
.notes-body {
  font-family: var(--font-body); font-size: var(--text-ui); line-height: 1.55;
  color: var(--text-dim); overflow-wrap: anywhere; white-space: normal;
  text-align: center;
}
/* The title face has no bold, so <strong> reads as BRIGHTER, not heavier —
   wherever it appears. */
.notes-body strong,
.dropzone strong { color: var(--text); font-weight: normal; }
.notes-body em { font-style: italic; }
.notes-body del { opacity: 0.7; }

/* --- Footer: every page, text generated from --app-version ------------------ */
.app-footer {
  /* ★★★ WHY A STATIC FOOTER CARRIES A Z-INDEX (v0.2.177) — it was INVISIBLE on
     desktop without one, and the reason is paint order, not layout.
     
     `.card-frame::before` is the header vignette: position:absolute, z-index:0,
     an OPAQUE gradient, and `--tint-height` tall — 438px at a wide viewport. It
     deliberately BLEEDS past its own parent (the card frame ends ~284px down),
     so it extends over the page below the card. The footer sat at y=330-406,
     entirely inside that band.
     
     ⚠️⚠️ DOM ORDER DOES NOT SAVE IT. The footer is a later sibling of
     <main class="player">, but paint order is CSS 2.1 Appendix E, not source
     order: an in-flow NON-POSITIONED block paints in layer 3, while a POSITIONED
     element with z-index:0 paints in layer 6. Layer 6 is on top. So the vignette
     covered a footer that measured perfectly — right position, right size, right
     colour, nothing "overlapping" it by any element-level test, because a
     pseudo-element is not an element and never shows up in one.
     
     ⚠️ AND IT WAS DESKTOP-ONLY, which is what made it so slippery:
     --tint-height is min(438px, 60vw + 102px). Narrow viewport -> the shorter
     arm wins AND the card is taller, so the footer falls below the band. Wide
     viewport -> the 438px cap, and the footer is inside it.
     
     ★ THE FIX IS IN-FLOW, NOT PINNED. position:relative keeps the footer exactly
     where it was — it still sits under the last item and scrolls with the page —
     and only changes which layer it paints into. sticky/fixed would also have
     worked and was the fallback; it was not needed, and it would have changed
     the layout to fix a paint bug. */
  position: relative; z-index: var(--z-footer);
  /* ★ SITS UNDER THE LAST ITEM (v0.2.172, S1). The gap is a token now, and the
     side padding is what stops the slogan running into the viewport edge on a
     narrow phone — it is a full sentence and it must never be cropped. The line
     wraps rather than truncating: no nowrap, no ellipsis, anywhere on the page. */
  margin-top: var(--footer-gap); padding: 16px var(--card-side) 8px; text-align: center;
  font-family: var(--font-body); font-size: var(--text-ui); letter-spacing: var(--tracking);
  color: var(--text-dim);
}
/* TWO lines, each its own block:
     1  Professionals share mixes using mixsha.re
        (gap)
     2  DTP MIXSHARE · Build X.Y.Z

   The wordmark lives on .app-footer-brand, NOT on the <footer> itself. A
   ::before on the footer renders ahead of every child, so with a block-level
   slogan in between it split line 2 in half and produced three lines — the
   v0.1.16 bug. Giving line 2 its own element makes "DTP MIXSHARE · " and the
   link one unbreakable line by construction.

   Same font throughout: both blocks inherit from .app-footer and neither sets
   a family or size. --app-version remains the one place the version lives. */
.app-footer-slogan { display: block; }
.app-footer-slogan::after { content: "Professionals share mixes using mixsha.re"; }

.app-footer-brand { display: block; margin-top: 10px; }   /* the gap */
.app-footer-brand::before { content: "DTP MIXSHARE · "; }

/* ONLY this is the link — not the slogan, not the wordmark. */
.app-footer-build {
  color: inherit;
  text-decoration: none;
}
.app-footer-build::after {
  /* Just the version. The trailing "b" was a constant beta marker; it read as
     part of the number rather than as a status, so "Build 0.2.98b" looked like a
     typo in the version rather than a statement about the build. */
  content: "Build " var(--app-version);
}
.app-footer-build:hover { color: var(--accent); }

/* A lossy source, badged. Quiet — it is a fact about the file, not a warning —
   but never absent, so a reference copy is never taken for a master. */
.play-card .lossy-badge {
  display: inline-block;
  font-family: var(--font-title);
  font-size: var(--text-badge);
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
  border-radius: var(--btn-radius);
  padding: 3px 7px 2px;
  margin: -8px 0 16px;
}

/* --- Sticky :hover on touch (v0.2.18) ---------------------------------------
   SYMPTOM: tap REWIND, the playhead rewinds correctly, and the button then sits
   there looking dimmed instead of returning to rest.

   CAUSE, and it is not REWIND's: a touch browser asserts :hover on whatever you
   last tapped and HOLDS it until you tap something else. There is no :focus or
   :active styling anywhere in this app, and nothing in js/playcard.js ever
   disables or reclasses rewBtn — the only rule that can dim a button is
   `button:hover { opacity: 0.85 }` above, and on a phone that is exactly what
   stays applied after the tap.

   It affects every button equally; REWIND is simply the one where you notice,
   because PLAY becomes PAUSE, SHARE becomes COPIED and EXPERT becomes SIMPLE —
   each of those visibly changes and you move on, while REWIND's only feedback is
   the playhead moving somewhere else on the card.

   FIX: neutralise the hover affordances where hover is not a real input mode.
   The resting appearance is untouched in both directions — SIMPLE's outline and
   EXPERT's solid fill both come from rules with no :hover in them, so this
   cannot flatten the slice-2 grammar. Desktop is untouched: a device with a
   real pointer never matches (hover: none).

   Not scoped to REWIND on purpose. The stuck state is the base button rule's,
   and fixing it only for one button would leave the same trap on the other three
   and on every button in the app. */
@media (hover: none) {
  button:hover { opacity: 1; }
  /* The card's control row also tints on hover (v0.2.16's SIMPLE grammar), which
     sticks in the same way and reads as "still pressed". */
  .play-card:not(.is-expert) .player-controls > button:not(:disabled):hover,
  .play-card:not(.is-expert) .cue-slot > .play-single:not(:disabled):hover { background: none; }
  /* ⚠️ THE .play-half CANCEL THAT LIVED HERE IS GONE (v0.2.161), AND ITS REMOVAL
     IS THE REWIND FIX. It read `.play-half:not(.is-active):not(:disabled):hover
     { background: none }` — correct for a PLAY half, whose rest is an outline,
     and wrong for the CUE and SHARE pairs, whose rest is a solid accent fill: at
     (0,4,0) and later in the file it beat both of their resting rules, so a tap
     on a phone left them transparent until you tapped elsewhere.
     Cancelling an affordance after the fact can only guess at what to restore.
     The tint is now declared inside `@media (hover: hover)` instead, so on touch
     there is nothing to cancel — see the .play-half rules above. */
}

/* ── SPACING SCALE: small screens ──────────────────────────────────────────────
   
   The same four values the 600px block in css/style.css used to set directly on
   main, #appShell and .panel. Moved here so the scale is legible in one place —
   and so those three rules could go, rather than each restating a number the
   token already knows.
   
   ⚠️ S2, S5, S9, S10, S11 and S12 are ABSENT on purpose: they do not change on a
   phone today and this build changes nothing. The outer rhythm compresses; the
   library's inner rhythm is fixed at every width. */
@media (max-width: 600px) {
  :root {
    --sp-page-top: 32px;
    --sp-stack: 20px;
    --sp-panel-y: 16px;
    --panel-x: 14px;
  }
}
