/* v2.34: Rhythm puppet lane reservations never inset or hide the Melodic stage. */
/* NS Playback Screen runtime — v2.31 stylesheet.
   An explicitly authored Baby Echo height is measured against the complete 16:9 stage, not
   multiplied against the historic 18% puppet lane. The remaining height belongs to the rhythm
   cards; at 100% the puppet intentionally owns the full stage. v2.30 history follows:
   NS Playback Screen runtime — v2.28 stylesheet.
   Baby Echo size and X/Y placement are independent authoring dimensions. The legacy zero-position
   default preserves existing screens. v2.27 history follows:
   NS Playback Screen runtime — v2.26 stylesheet.
   Forked from immutable v2.25 on 2026-09-21. Superhero barline X now has one
   left/right transform shared by internal, page-edge, and final barlines.
   v2.25 history follows:
   NS Playback Screen runtime — v2.24 stylesheet.
   Forked from immutable v2.23 on 2026-09-11. Reduced-motion presentation retains the
   teacher-authored per-page scene framing while replacing animated panel travel with a crossfade.
   v2.23 history follows:
   NS Playback Screen runtime — v2.19 stylesheet.
   Forked from immutable v2.18 on 2026-09-11. Adds the four-beat Superheroes continuation
   transition, its Space-Time Repeater furniture, and a reduced-motion crossfade.
   v2.18 history follows:
   NS Playback Screen runtime — v2.18 stylesheet.
   Forked from immutable v2.17 on 2026-09-07. Ordinary melodic glyph grid tracks must
   obey their stage-relative height, not a raster image's intrinsic pixel dimensions.
   v2.17 history follows:
   NS Playback Screen runtime — v2.17 stylesheet.
   Forked from immutable v2.16 on 2026-09-06. Movement label size applies to Pulse as well as
   multi-card layouts. Independent label weight, tracking, word spacing and Y offset preserve
   historic defaults; song lyrics and icon positioning are unchanged.

   v2.16 history follows:
   NS Playback Screen runtime — v2.16 stylesheet.
   Forked from immutable v2.15 on 2026-09-05. Playback 2.7.28 drives Baby Echo's unchanged 1.8%
   attack breath from the authored note value and live tempo map. The 175 ms rule below is the
   compatibility fallback for embedded browsers without Web Animations.
   v2.15 and all older stylesheets remain frozen.

   v2.15 history follows:
   NS Playback Screen runtime — v2.15 stylesheet.
   Forked from immutable v2.14 on 2026-09-05. Baby Echo receives a restrained 1.8% onset pulse
   on authored note attacks; rests, sustains, and reduced-motion presentation do not pulse. v2.14
   and all older stylesheets remain frozen.

   v2.14 history follows:
   NS Playback Screen runtime — v2.14 stylesheet.
   Forked from immutable v2.13 on 2026-09-04. Adds the compact BABY ECHO / VOCAL CUE authoring lane
   that sits directly below Parts and above Mode, and the melodic travel path the owl follows during
   an authored octave gliss. v2.13 remains frozen.

   v2.13 history follows:
   NS Playback Screen runtime — v2.13 stylesheet.
   Forked from immutable v2.12 on 2026-09-02. Literal multipart child renderers are excluded from
   the narrow-screen authoring layout: an iframe may be phone-width, but it is a stage region, not
   the editor shell. Each child stage therefore consumes its full assigned region instead of the
   authoring-only 44vh cap. v2.12 remains frozen.

   v2.12 history follows:
   Forked from immutable v2.11 on 2026-09-01. Glyph Score exposes the existing shared notation
   system and engraving rows while remaining on the Rhythm renderer; no projected Stage geometry
   changes outside Glyph Score. v2.11 remains frozen.

   v2.11 history follows:
   Forked from immutable v2.10 on 2026-09-01 for single-line Glyph Score furniture and repeat signs.
   v2.10 remains frozen.

   v2.10 history follows:
   Forked from immutable v2.9 on 2026-09-01 for the Rhythm Glyph Score layout.
   Stage and controls-only consumers retain the existing projected surface. v2.8's shared student
   font-size variable continues to reach Scene captions and titles; Scene caption scale remains an
   independent multiplicative refinement.

   v2.7 history follows:
   NS Playback Screen runtime — v2.7 stylesheet.
   Byte-derived from the certified Playback 2.6 stylesheet on 2026-08-26; v2.7 retains the
   complete-region visual system and restores composition-owned resting on the child surface.

   v2.4 history follows:
   Forked from immutable production v2.3 on 2026-08-23. Adds one centered Melodic layout envelope
   for the shared vertical/horizontal controls and multipart two-card containment.

   v2.3 history follows:
   Carries the full-surface view-mode audit,
   including projector-sized two-card words and full-screen/multipart melodic parity.

   v2.2 history follows:
   Tunes the fixed two-card Baby Echo
   scaffold for balanced classroom projection while retaining the compact, keyboard-operable
   universal tempo cluster to editor transport and every teacher cue card.

   v1.48 history follows:
   NS Playback Screen runtime — v1.45 stylesheet.
   Forked from immutable production v1.44 on 2026-08-21. The visual karaoke wrapper now owns
   lyric-line gap, restoring the Lyric line spacing control after the accessible static transcript
   added an intermediate node. Student lyric rows use a Poppins-safe line box so descenders do not
   clip. v1.44 remains frozen.

   v1.44 history follows:
   Forked from immutable production v1.43 on 2026-08-19 for runtime v1.98's simultaneous
   multipart lyric rows, explicit edit completion, and visible composition-mixer ownership.

   Forked from certified source-only v1.41 on 2026-08-16 for runtime v1.95's persistent
   Ensemble / Part hierarchy and non-color-only selected-region treatment.

   v1.40 history follows:
   Forked from frozen production v1.39 on 2026-08-15 for runtime v1.93 Part Treatments.
   Adds per-part treatment-editing chrome and region-owned lyric typography while retaining the
   stage-scale layout, AA resting palette, and reduced-motion behavior of v1.39.

   v1.39 history follows:
   Forked from frozen production v1.37 on 2026-08-15. Rehearsal pair for runtime v1.92: adds the
   consolidated multipart region system, stage-true datums, aligned lyric rails, lane-fitted
   notation, duration-aware persistent iconic rows, identity tints, and AA-clean role resting.
   Self-hosts Poppins 400/500/600/700 for the G2–5 student-font ruling. v1.37 and the earlier
   never-deployed v1.38 multipart proposal remain frozen.

   Also carries v1.37:
   Forked from frozen v1.36 on 2026-08-10. A divided Pat/Pat beat keeps both hands per onset while
   cropping the source's transparent side padding, with a tighter gutter and less horizontal measure.
   v1.36 remains frozen.
   Forked from frozen v1.35 on 2026-08-10. Movement labels and in-card song lyrics now use shared
   chart-level pixel bases, so a wider divided beat cannot silently enlarge its typography.
   v1.35 remains frozen at its deployed bytes.
   Forked from frozen v1.34 on 2026-08-10. Two-onset movement glyphs keep a wider visual gutter and
   a genuinely wider beat column while remaining hard-contained. Movement labels and song lyrics
   own separate type scales.
   v1.34 remains frozen at its deployed bytes.
   Forked from frozen v1.33 on 2026-08-10. Each mapped Body Movement cue now owns an independent
   optical scale and vertical offset. Divided beats receive a readable two-onset size boost.
   v1.33 remains frozen at its deployed bytes.
   Forked from frozen v1.32 on 2026-08-10. Body Movement song words now occupy the same fixed
   in-card lyric band as heartbeat words. Movement/action labels remain an independent layer.
   v1.32 remains frozen at its deployed bytes.
   Forked from frozen v1.31 on 2026-08-10. Body Movement labels are independently switchable and
   can sit above or below their icons; neither choice changes the separate canonical lyric region.
   v1.31 remains frozen at its deployed bytes.
   Forked from frozen v1.30 on 2026-08-08 for the v1.57 consolidation
   ([[2026-08-08_Runtime_v1_58_Consolidation]]). Carries v1.30's grade-banded student typography
   (all student-facing faces read var(--student-font)) and adds sub-beat body-movement cards.
   A body-movement card is now a column: an art ROW of one .mvglyph per sound in the beat, over a
   word ROW of one .mvword each. Two eighths therefore share one box instead of consuming two
   columns, and each word sits under the sound it belongs to. Every movement icon on the chart is
   sized from ONE shared --mv-h basis (JS-measured, exactly like --car-h) so a divided beat's icons
   match an undivided beat's instead of shrinking to whatever their own narrower card allows.
   Movement art now reads --icon-scale / --icon-fill / --gap-scale, which no movement selector had
   ever referenced; the grid's own gap reads --gap-scale too, so `gap` is live on every head.
   Versioned: never edit in place; cut a new version. */
/* ==== END HEADER ==== */

  /* Poppins is student-facing at G2–5 and is served from project-owned static assets. The second
     URL resolves from lib/ps-runtime/ when the sandbox or pilot is served below a non-root base. */
  @font-face{font-family:'Poppins';font-style:normal;font-weight:400;font-display:swap;src:url('/_Assets/fonts/poppins-regular.woff2') format('woff2'),url('../../_Assets/fonts/poppins-regular.woff2') format('woff2')}
  @font-face{font-family:'Poppins';font-style:normal;font-weight:500;font-display:swap;src:url('/_Assets/fonts/poppins-medium.woff2') format('woff2'),url('../../_Assets/fonts/poppins-medium.woff2') format('woff2')}
  @font-face{font-family:'Poppins';font-style:normal;font-weight:600;font-display:swap;src:url('/_Assets/fonts/poppins-semibold.woff2') format('woff2'),url('../../_Assets/fonts/poppins-semibold.woff2') format('woff2')}
  @font-face{font-family:'Poppins';font-style:normal;font-weight:700;font-display:swap;src:url('/_Assets/fonts/poppins-bold.woff2') format('woff2'),url('../../_Assets/fonts/poppins-bold.woff2') format('woff2')}

  /* Fredoka is student-facing at K–1 (--student-font's default face) and, like Poppins above, is
     served from project-owned static assets rather than depending on the pseditor.html <link> to
     fonts.googleapis.com. That remote stylesheet is one more network round-trip this stylesheet
     should not require for correct layout: any environment that blocks/omits it (offline authoring,
     a strict CSP, a sandboxed certification run) silently falls back to Fredoka's declared fallback
     chain (`Fredoka, system-ui, sans-serif` → system-ui), whose wider glyph metrics were observed to
     make Part Treatments' aligned word-rail floor check (MP_MIN_FONT, v1.96.js) refuse dense-lyric
     card layouts that clear cleanly once the actual (narrower) Fredoka face is what gets measured.
     Self-hosting removes that dependency the same way Poppins already does, for every consumer of
     --student-font, not a chosen few. */
  @font-face{font-family:'Fredoka';font-style:normal;font-weight:400;font-display:swap;src:url('/_Assets/fonts/fredoka-regular.woff2') format('woff2'),url('../../_Assets/fonts/fredoka-regular.woff2') format('woff2')}
  @font-face{font-family:'Fredoka';font-style:normal;font-weight:500;font-display:swap;src:url('/_Assets/fonts/fredoka-medium.woff2') format('woff2'),url('../../_Assets/fonts/fredoka-medium.woff2') format('woff2')}
  @font-face{font-family:'Fredoka';font-style:normal;font-weight:600;font-display:swap;src:url('/_Assets/fonts/fredoka-semibold.woff2') format('woff2'),url('../../_Assets/fonts/fredoka-semibold.woff2') format('woff2')}
  @font-face{font-family:'Fredoka';font-style:normal;font-weight:700;font-display:swap;src:url('/_Assets/fonts/fredoka-bold.woff2') format('woff2'),url('../../_Assets/fonts/fredoka-bold.woff2') format('woff2')}

  :root{--accent:#ea7a17;--ink:#15161a;--lit:#e2231a;--hl:#ffd23f;--student-font:Fredoka,system-ui,sans-serif}
  *{box-sizing:border-box;margin:0;padding:0}
  html,body{height:100%}
  body{height:100vh;overflow:hidden;font-family:var(--student-font);color:var(--ink);
    background:linear-gradient(160deg,#bfe0ff,#eaf5ff);display:flex;flex-direction:column}

  /* Owner ruling: default author-view split under-used the viewport — .screen was capped at a flat
     56vh regardless of viewport size, so a 16:9-locked stage (sizeStage()'s existing min(width,
     height*16/9) aspect math, UNCHANGED here) had far less room to work with than was actually
     available, producing large black letterbox margins even though .console (flex:1 1 auto,
     overflow:auto — already scrolls; its natural content is 1128px tall at every viewport tested,
     so it was NEVER relying on getting the full 44vh leftover share) had room to spare. Raising the
     default share to 70vh does not touch --sh's definition (still stageEl.clientHeight/100 — a
     LARGER stage now, not a different formula) or the 16:9 math; it only gives the aspect-fit more
     room to fill, same as dragging the divider up used to. The manual divider drag (--stage-h, set
     as an explicit px value) is untouched and still overrides this fallback exactly as before.
     80vh was tried first and reverted: it shrank .console enough that its sticky chrome (.moderow
     top bar + .sbar bottom bar, ~80-100px combined) could cover the ONLY visible scrollable band,
     making controls scrolled-to land invisibly underneath a sticky bar (confirmed via
     elementFromPoint at #mpcolumns's own rect returning .sbar, not the button) — a real click-
     blocking regression, not just a smaller pane. 70vh + the .console min-height floor below keeps
     a genuine non-sticky-covered working band at both viewports this ruling was measured against.

     2026-08-17 addendum — owner: "it's still not all the way to the top and bottom of the screen."
     Measured on-page at 1680x1050 and 1280x720 (default stagelock=on): the stage pane was ALREADY
     flush with the viewport top and with .divider at the bottom (0px gap either side) — the 70vh
     split itself left no dead band; what remained was the fixed 30vh-8px given to .console, sized
     as a FRACTION OF THE VIEWPORT rather than to what .console actually needs. That's brittle at a
     viewport this ruling was never measured against (a very short one: 70vh + .console's
     min-height:120px floor can together exceed 100vh, and .screen's old flex-shrink:0 refused to
     yield, silently clipping the bottom of .console under body{overflow:hidden} instead of showing
     a gap). Flipped which side is the fixed one: .console now sizes to ITS OWN content
     (flex:0 0 auto) capped by max-height so it can never claim more than the SAME 30vh-8px this
     ruling already proved click-safe, and .screen (flex:1 1 auto) takes whatever is left, full stop
     — no vh constant on the stage side at all, so it now holds (shrinks instead of overflowing)
     at any viewport, including ones far outside 1280x720–1680x1050. Byte-identical pixels at both
     previously-measured viewports (verified); only extreme viewports behave differently, and only
     by degrading safely instead of clipping. */
  .screen{flex:1 1 auto;min-height:0;display:flex;align-items:center;justify-content:center;position:relative}
  /* draggable splitter: stage (top) ⇄ console (bottom) */
  .divider{flex:0 0 26px;background:#15131f;color:#c9c5ea;cursor:row-resize;display:flex;align-items:center;justify-content:center;gap:7px;border-top:1px solid #3d3869;border-bottom:1px solid #3d3869;font:700 10px/1 system-ui,sans-serif;letter-spacing:.05em;text-transform:uppercase;user-select:none}
  .divider::before,.divider::after{content:"";width:42px;height:2px;border-radius:2px;background:#69639f}
  .divider small{font:600 8px/1 system-ui,sans-serif;color:#817ca7;letter-spacing:.08em}
  .divider:hover,.divider:focus-visible{background:#211d39;color:#fff;outline:2px solid #8c80ff;outline-offset:-2px}
  body.mode-stage .divider{display:none}
  /* per-card crossfade ghost (beat ↔ rhythm flip) */
  .cardghost{position:absolute;inset:0;z-index:6;pointer-events:none;opacity:1;transition:opacity .2s ease}
  /* .stage = the actual projected surface (gradient + container). In author mode it fills .screen and stays
     responsive; when LOCKED (toggle) or ?mode=stage it becomes a 16:9 box (JS-sized) and .screen letterboxes it. */
  .stage{position:relative;width:100%;height:100%;container-type:size;
    background:linear-gradient(160deg,#bfe0ff,#eaf5ff);overflow:hidden}
  /* count-in lane: always reserved at the top (every screen), so the chart is offset down by the same amount and never reflows */
  .countin-lane{position:absolute;top:0;left:0;right:0;height:var(--ci-lane,18%);display:flex;align-items:center;justify-content:center;gap:4cqmin;z-index:4}
  .stage.ci-live .countin-lane{justify-content:space-around}   /* during the count-in: woodblock to the left half, Baby Echo to the right */
  /* Baby Echo puppet card (own card → WCAG-separate, aria-hidden). Owls stacked in one cell so the beak-swap never shifts. */
  .ci-card.puppet{visibility:visible;box-sizing:border-box;aspect-ratio:566/657;height:calc(96% * var(--puppet-frame-scale,1));padding:0;align-self:flex-start;left:var(--puppet-x,0%);top:var(--puppet-y,0%);transform:none;border:3px solid #000;border-radius:7cqmin;box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26);overflow:hidden}
  .ci-card.puppet .echo-bob{height:min(calc(80% * var(--puppet-scale,1)),100%);width:min(calc(80% * var(--puppet-scale,1)),100%);display:grid;place-items:center;transition:transform .1s ease}
  .ci-card.puppet .owl{height:100%;width:100%;max-width:100%;object-fit:contain}
  .puppet.bob .echo-bob{transform:translateY(-6%)}
  .puppet .owl{grid-area:1/1;height:100%;width:auto;display:block}
  .puppet .owl-sing,.puppet .owl-fly{visibility:hidden}
  .puppet.sing .owl-rest,.puppet.flying .owl-rest{visibility:hidden}
  .puppet.sing .owl-sing{visibility:visible}
  .puppet.flying .owl-fly{visibility:visible}
  /* Baby Echo moves between immutable MIDI anchors with one brief singer-like arrival. Ordinary
     notes never float through the interval; only an authored gliss updates continuously. */
  .psvel.puppet{transition:top 110ms cubic-bezier(.2,.75,.35,1)}
  @media (prefers-reduced-motion:reduce){.psvel.puppet{transition:none}}
  .stagebody{position:absolute;left:0;right:0;top:calc(var(--ci-lane,18%) + var(--chart-offset,0%));bottom:0;display:flex;align-items:center;justify-content:center;padding:0}
  .ci-card{position:relative;height:88%;aspect-ratio:2.1;background:#fff;border:3px solid #000;border-radius:5cqmin;box-shadow:1cqmin 1.2cqmin 2cqmin rgba(0,0,0,.24);display:flex;align-items:center;justify-content:center;visibility:hidden;transform:scale(var(--woodblock-scale,1));transform-origin:center top}
  .ci-img{position:absolute;max-width:86%;max-height:80%;object-fit:contain}   /* rest/play woodblock art, cross-toggled by data-state */
  .ci-card[data-state="rest"] .ci-play{opacity:0}
  .ci-card[data-state="play"] .ci-rest{opacity:0}
  .screen.locked,body.mode-stage .screen{background:#000;padding:0}
  .screen.locked .stage,body.mode-stage .stage{flex:0 0 auto}   /* JS sets width/height to the 16:9 box */
  body.mode-stage .console{display:none}
  body.mode-stage{background:#000}
  /* embedded in NS Studio (?bg=transparent): no baked background — the deck/page background shows through */
  body.bg-transparent, body.bg-transparent.mode-stage{background:transparent}
  body.bg-transparent .stage{background:transparent}
  body.bg-transparent .screen, body.bg-transparent.mode-stage .screen, body.bg-transparent .screen.locked{background:transparent}
  /* v1.30 — the grid's gap reads --gap-scale. It was hardcoded at 2cqmin, so the `gap` slider moved
     nothing on ANY head except the rhythm card's internal .glyphrow. Default 1 keeps every shipped
     screen byte-identical. */
  .grid{display:grid;gap:calc(2cqmin * var(--gap-scale,1));width:var(--gridw,100%);height:var(--gridh,54%);--icon-scale:1;--text-scale:1.06;--gap-scale:1;--icon-y:0%}

  .card{position:relative;overflow:visible;min-height:0;min-width:0;container-type:size;cursor:pointer}
  .slot{position:absolute;inset:0;background:#fff;border:3px solid #000;border-radius:7cqmin;box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26)}
  /* one-box framing: a single white box behind the whole grid (per-card boxes hidden), same footprint */
  .grid.one-box{background:#fff;border:3px solid #000;border-radius:4cqmin;box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26)}
  .grid.one-box .slot{display:none}
  /* Rhythm Glyph Score: ordinary Rhythm cards regrouped by authored measures in one white score card. */
  .grid.rhythm-glyph-score{position:relative;height:var(--gridh,86%);padding:3cqmin 4cqmin;gap:3cqmin;overflow:hidden}
  .rhythm-score-system{display:flex;align-items:stretch;min-width:0;min-height:0}
  .rhythm-score-measure{position:relative;display:flex;min-width:0;min-height:0;padding:0 1.1cqmin}
  .rhythm-score-beats{display:grid;flex:1;min-width:0;min-height:0;gap:.7cqmin}
  /* Glyph Score furniture uses the ordinary single-line engraving metric: barlines are centered on
     the implied rhythm line and extend `barh` staff spaces above/below it. They are not card dividers. */
  .rhythm-score-measure.has-barline::after,.rhythm-score-measure.section-end::before{content:'';position:absolute;top:50%;height:var(--score-bar-height,9cqmin);transform:translateY(-50%);background:#15161a;z-index:7}
  .rhythm-score-measure.has-barline::after{right:0;width:var(--score-thin,.7cqmin)}
  .rhythm-score-measure.section-end::before{right:var(--score-double-gap,1.8cqmin);width:var(--score-thin,.7cqmin)}
  .rhythm-score-measure.song-end::after{right:0;width:var(--score-thick,2.25cqmin)}
  .rhythm-score-measure.song-end::before{right:var(--score-final-gap,3.6cqmin);width:var(--score-thin,.7cqmin)}
  .rhythm-score-measure.repeat-end::before,.rhythm-score-measure.repeat-end::after{display:none}
  .rhythm-score-measure.repeat-start{padding-left:calc(1.1cqmin + var(--score-repeat-width,8cqmin))}
  .rhythm-score-measure.repeat-end{padding-right:calc(1.1cqmin + var(--score-repeat-width,8cqmin))}
  .rhythm-score-repeat{position:absolute;top:50%;height:var(--score-bar-height,9cqmin);transform:translateY(-50%);display:flex;align-items:stretch;z-index:8;pointer-events:none}
  .rhythm-score-repeat i{display:block;position:relative;font-style:normal}
  .rhythm-score-repeat .repeat-thin{width:var(--score-thin,.7cqmin);background:#15161a}
  .rhythm-score-repeat .repeat-thick{width:var(--score-thick,2.25cqmin);background:#15161a}
  .rhythm-score-repeat .repeat-dots{width:var(--score-vsp,4.5cqmin)}
  .rhythm-score-repeat .repeat-dots b{position:absolute;left:50%;width:var(--score-repeat-dot,1.5cqmin);height:var(--score-repeat-dot,1.5cqmin);transform:translate(-50%,-50%);border-radius:50%;background:#15161a}
  .rhythm-score-repeat .repeat-dots b:first-child{top:32%}.rhythm-score-repeat .repeat-dots b:last-child{top:68%}
  .repeat-start-sign{left:0;gap:var(--score-repeat-gap,1.35cqmin)}
  .repeat-end-sign{right:0;gap:var(--score-repeat-gap,1.35cqmin)}
  .rhythm-score-signature{flex:0 0 var(--score-signature-width,9cqmin);align-self:stretch;position:relative;min-width:0;z-index:6}
  .rhythm-score-signature-svg{display:block;width:100%;height:100%;overflow:visible}
  .rhythm-score-stage-warning{position:absolute;left:50%;bottom:2.5%;transform:translateX(-50%);z-index:9;max-width:90%;padding:1.2cqmin 2cqmin;border-radius:1.2cqmin;background:#fff3cd;color:#5c4300;border:.2cqmin solid #9a7200;font:700 2.4cqmin/1.2 system-ui,sans-serif;text-align:center}
  .rhythm-score-status{font-size:10px;color:#aeb2bd}.rhythm-score-status.warning{color:#ffd36a;font-weight:700}
  #rhythm-score-controls[hidden]{display:none!important}
  .grid.rhythm-glyph-score .card{overflow:hidden}.grid.rhythm-glyph-score .slot{display:none}
  .grid.rhythm-glyph-score .art{inset:7% 3% 28%}.grid.rhythm-glyph-score .lyric,.grid.rhythm-glyph-score .rhythm-duration-label{font-size:calc(7.2cqmin * var(--text-scale,1))}
  .art{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
    z-index:2;pointer-events:none;transition:transform .07s ease;transform-origin:center;transform:translateY(var(--icon-y,0%))}   /* icon ↕ — lift the icon off the word (legacy --icony) */

  /* Body movement is the beat-grid's event-mapped presentation: one current icon for first contact,
     then a four-beat frame. A score-authored two-beat cymbal event spans two columns rather than
     duplicating the wiggle icon, making duration visible before standard notation is introduced. */
  body.movement-mode .grid{height:var(--gridh,70%)}
  /* v1.45 — a movement card is a COLUMN: an art ROW of one .mvglyph per sound in the beat, over a
     word ROW of one .mvword each. .slot stays an absolute backdrop beneath both. Both rows use
     `flex:1 1 0` children so every cell takes an equal share of the width — that, not
     space-around, is what puts each word exactly under the sound it belongs to regardless of how
     wide the icon or how long the word. */
  body.movement-mode .movement-card{min-width:0;display:flex;flex-direction:column;align-items:stretch;justify-content:center;
    /* `pad` drives this: --icon-fill is (1 - pad), so the padding IS the pad fraction. Default
       .86 → 4.2cqmin, within a hair of the 4cqmin this was hardcoded to before it was adjustable. */
    padding:calc((1 - var(--icon-fill,.86)) * 30cqmin)}
  body.movement-mode .movement-card>.movement-art{position:relative;inset:auto;flex:1 1 auto;min-height:0;padding:0;
    display:flex;flex-direction:row;align-items:center;justify-content:center;gap:calc(3cqmin * var(--gap-scale,1))}
  body.movement-mode .movement-card>.movement-art[data-onsets="2"]{gap:calc(4cqmin * var(--gap-scale,1))}
  /* A BLANK CUE IS AN EMPTY SLOT, NOT A MISSING ONE. It carries no <img> on purpose (Landon: "a rest
     can be a blank in the card"), and it must keep holding its share of the row — remove it and the
     other sound in a divided beat slides to the centre, showing an eighth in the middle of the beat
     instead of on its own half. It is deliberately still `display:flex` with no children. */
  .mvglyph.blank{pointer-events:none}
  .mvglyph{flex:1 1 0;min-width:0;display:flex;align-items:center;justify-content:center;height:100%;
    transition:transform .07s ease;transform-origin:center;transform:translateY(calc(var(--icon-y,0%) + var(--cue-y,0%)))}
  .movement-words{flex:0 0 auto;z-index:3;display:flex;flex-direction:row;align-items:baseline;
    transform:translateY(calc(var(--movement-label-y,0) * 1cqh));
    gap:calc(3cqmin * var(--gap-scale,1));padding-top:1cqmin}
  body.movement-labels-off .movement-words{display:none}
  body.movement-labels-above .movement-card>.movement-words{order:-1;padding-top:0;padding-bottom:1cqmin}
  body.movement-card-lyrics .movement-card{padding-bottom:max(calc((1 - var(--icon-fill,.86)) * 30cqmin),18cqmin)}
  body.movement-card-lyrics .movement-card>.movement-song-lyric{font-size:calc(var(--movement-lyric-base,16cqmin) * var(--movement-lyric-scale,1));bottom:5%}
  body.movement-card-lyrics .movement-card>.movement-words{margin-bottom:10cqmin}
  body.movement-card-lyrics.movement-labels-above .movement-card>.movement-words{margin-bottom:0}
  .mvword{flex:1 1 0;min-width:0;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
    font:var(--movement-label-weight,700) calc(var(--movement-label-base,14cqmin) * var(--movement-label-scale,1))/1 var(--student-font);color:var(--ink);text-shadow:0 1px 0 #fff;
    letter-spacing:var(--movement-label-tracking,0em);word-spacing:var(--movement-label-word-space,0em)}
  /* Pat uses motion only. The attempted glow/aura treatment was intentionally retired after
     classroom-scale review; neither the asset nor its static card receives a shadow or halo. */
  .movement-art[data-motion="pat"]::before{content:none}
  .movement-art[data-motion="rest"]{opacity:1}   /* rest is a real cue (Shh), never a dimmed card */
  /* v1.45 — sized from ONE shared --mv-h (JS-measured across the whole chart) times --icon-scale,
     so a divided beat's two sounds match the undivided beat beside them instead of each card sizing
     its icons off its own width. max-width is the backstop when a beat divides three or four ways.
     Before this, no movement selector referenced --icon-scale at all: the `size` slider was inert. */
  /* --mv-ar is 1/sqrt(aspect), written per glyph by sizeMovementIcons: it turns the shared --mv-h
     basis into EQUAL AREA rather than equal height, so a wide cue and a square one carry the same
     optical weight instead of the wide one dominating the row. Defaults to 1 (= equal height) for
     any glyph JS has not measured yet. */
  .mvglyph>img.movement-icon{display:block;
    height:calc(var(--mv-h,64px) * var(--mv-ar,1) * var(--icon-scale,1) * var(--cue-scale,1));width:auto;
    max-width:100%;object-fit:contain;filter:drop-shadow(0 .3cqmin .55cqmin rgba(0,0,0,.18))}
  .mvglyph[data-motion="pat"]>img.movement-icon{position:relative;z-index:1;filter:none}
  /* The Pat source contains TWO hands plus wide transparent margins. Each eighth-note onset keeps
     the full pair (four hands across Pat/Pat), but zooms only enough to crop that empty padding. */
  .mvglyph[data-action="pat"]>.pat-pair{position:relative;display:block;width:min(100%,calc(100% * var(--cue-scale,1)));height:min(100%,calc(100% * var(--cue-scale,1)));overflow:hidden}
  .mvglyph[data-action="pat"]>.pat-pair>img{position:absolute;left:50%;top:50%;width:157%;height:auto;max-width:none;transform:translate(-50%,-50%);filter:none}
  .movement-lit .mvglyph[data-motion="pat"]>img.movement-icon{filter:none}
  .mvglyph>svg.movement-wave{display:block;width:calc(90% * var(--icon-scale,1) * var(--cue-scale,1));height:calc(72% * var(--icon-scale,1) * var(--cue-scale,1));
    max-width:100%;overflow:visible;filter:drop-shadow(0 .3cqmin .45cqmin rgba(0,0,0,.16))}
  .mvglyph>.chuff{height:calc(86% * var(--icon-scale,1) * var(--cue-scale,1));max-width:100%}
  .movement-wave path{fill:none;stroke:#173f5f;stroke-width:12;stroke-linecap:round;stroke-linejoin:round}
  .grid[data-beats="1"] .movement-wave{display:none}
  .grid[data-beats="1"] .mvword{font-size:calc(12cqmin * var(--movement-label-scale,1))}
  /* Animated-asset doctrine: the white card is a permanent backdrop below the art, never the
     active state. Movement uses .movement-lit (not generic .lit), so card outlines, shadows,
     and transforms cannot flicker during a score hit. JS owns only the asset's inline motion. */
  body.movement-mode .movement-card>.slot{z-index:0;pointer-events:none}
  /* First-contact movement is a labeled action cue, not a cycling card. Keep the action artwork
     and label, but remove the rebuilt white box and its heavy shadow. Four-beat movement notation
     still uses cards so duration remains visible. */
  body.movement-mode .grid[data-beats="1"] .movement-card>.slot{display:none}
  body.movement-mode .movement-card>.movement-art{z-index:2;isolation:isolate}
  body.movement-mode .movement-card.movement-lit>.slot{outline:0;filter:none}
  @media (prefers-reduced-motion:reduce){.movement-art,.mvglyph{transition:none!important}}

  .art > svg.heart{width:auto;height:calc(92% * var(--icon-scale,1));display:block;filter:none}
  .art > svg.heart .hb{fill:#ffbfbf;stroke:#000;stroke-width:8;transition:fill .05s}
  /* swappable beat icon (non-heart, screen-owned): rendered as <img>; recolor isn't possible so it pulses + glows when lit */
  /* CSS v1.24 — an <img> beat icon FITS a padded box in both directions instead of being sized off
     height alone with width:auto. Height-only sizing meant a wide glyph (T-Rex, turtle, an uploaded
     landscape image) filled vertically and then spilled sideways over its neighbours, so raising
     `size` made it overflow rather than fill. --icon-fill is the fraction of the card the icon may
     occupy and is driven by the `pad` slider (fill = 1 - pad); its per-grid historic values now live
     in the JS layout table instead of shadowing that variable from here. The inline heart keeps its
     own sizing basis untouched — it has a fixed aspect and never overflowed. */
  .art > img.beaticon{width:calc(100% * var(--icon-fill,.86) * var(--icon-scale,1));height:calc(100% * var(--icon-fill,.86) * var(--icon-scale,1));object-fit:contain;display:block;filter:none;transition:filter .05s}
  .card.lit .art{transform:translateY(var(--icon-y,0%)) scale(1.07)}   /* keep the icon ↕ offset under the lit pulse */
  .card.lit .art > svg.heart .hb{fill:var(--lit)}
  .card.lit .art > img.beaticon{filter:brightness(1.1)}   /* active emphasis without a resting or offset icon shadow */
  @keyframes entrainPulse{0%{transform:scale(1)}24%{transform:scale(1.16)}100%{transform:scale(1)}}

  .glyphrow{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(4cqmin * var(--gap-scale,1));width:100%;height:100%;padding:5cqmin}
  .cars{display:flex;align-items:center;justify-content:center;gap:6cqmin}
  /* real train-car SVGs as <img>; ALL cars share ONE height basis (--car-h, set in JS) so long & short scale equally */
  .glyph img.car{height:calc(var(--car-h,64px) * var(--icon-scale,1));width:auto;display:block;
    transition:transform .08s ease;transform-origin:center;filter:none}
  .glyph.lit img.car{transform:scale(1.12);            /* pulse only the car; optional glow is screen-owned below */
    filter:brightness(1.04)}
  /* Trigger glow is supplementary, never the state signal by itself. The normal icon scale/fill
     remains, and the card gains a dark outline that stays legible when reduced motion removes scale.
     Gold is therefore atmosphere; the shape/outline change carries the accessible state. */
  body.trigger-glow .card.lit .slot,
  body.trigger-glow .card.pulse-lit .slot,
  body.trigger-glow .card.rhythm-lit .slot{outline:max(2px,.65cqmin) solid #173f5f;outline-offset:calc(-1 * max(2px,.65cqmin))}
  body.trigger-glow .card.lit .art{transform:translateY(var(--icon-y,0%)) scale(1.16)}
  body.trigger-glow .card.lit .art > svg.heart,
  body.trigger-glow .card.lit .art > img.beaticon,
  body.trigger-glow .card.pulse-lit .art > svg.heart,
  body.trigger-glow .card.pulse-lit .art > img.beaticon{
    filter:drop-shadow(0 0 max(2px,1cqmin) #173f5f) drop-shadow(0 0 max(8px,4cqmin) var(--glow-color,#ffd23f))}
  /* The filled heart carries more visual mass than line-based rhythm artwork. Keep its halo clear
     but slightly tighter than the clap halo so simultaneous beat and rhythm read as partners. */
  body.trigger-glow .grid[data-beats="1"] .card.pulse-lit .art > svg.heart{
    filter:drop-shadow(0 0 max(2px,.8cqmin) #173f5f) drop-shadow(0 0 max(6px,3cqmin) var(--glow-color,#ffd23f))}
  body.trigger-glow .glyph.lit img.car{
    transform:scale(1.22);
    filter:drop-shadow(0 0 max(2px,1cqmin) #173f5f) drop-shadow(0 0 max(8px,4cqmin) var(--glow-color,#ffd23f)) brightness(1.06)}
  /* one centered label line under the cars — keeps the hyphen centered between the syllables */
  .rlabel{width:100%;font-weight:var(--ply-weight,500);letter-spacing:calc(.012em + var(--ply-letter,0em));font-size:calc(16cqmin * var(--text-scale,1));line-height:1;white-space:nowrap;color:var(--ink);text-shadow:0 1px 0 #fff;text-align:center}

  /* Long / Short-short vocabulary is an independent layer, parallel to movement words. It never
     replaces the icon, rhythm glyph, or canonical lyric band. With those layers off, it becomes the
     sole centered content instead of clinging to the top of an otherwise empty card. */
  .rhythm-duration-label{position:absolute;left:4%;right:4%;top:4%;z-index:5;text-align:center;
    font-family:var(--student-font);font-weight:600;color:var(--ink);line-height:1.05;white-space:nowrap;
    font-size:calc(9cqmin * var(--text-scale,1));text-shadow:0 1px 0 #fff;pointer-events:none}
  .card.duration-only .rhythm-duration-label{inset:0;display:flex;align-items:center;justify-content:center;
    white-space:normal;font-size:calc(17cqmin * var(--text-scale,1))}
  .grid[data-beats="16"] .rhythm-duration-label{font-size:calc(12cqmin * var(--text-scale,1))}

  .lyric{position:absolute;left:0;right:0;bottom:6%;z-index:3;text-align:center;font-weight:var(--ply-weight,500);white-space:nowrap;
    letter-spacing:calc(.012em + var(--ply-letter,0em));word-spacing:calc(var(--ply-word,.5em) - .3em);color:var(--ink);font-size:calc(16cqmin * var(--text-scale,1));text-shadow:0 1px 0 #fff}
  /* words-only (lyric card): no icon → center the word in the box, allow it to wrap, give it a touch more size */
  .card.wordsonly .lyric{top:0;bottom:0;display:flex;align-items:center;justify-content:center;white-space:normal;line-height:1.05;font-size:calc(19cqmin * var(--text-scale,1))}
  /* 16-beat cards are short: ease the icon down and bring the word up for legibility */
  .grid[data-beats="16"] .art > svg.heart{height:calc(74% * var(--icon-scale,1))}
  .grid[data-beats="16"] .lyric{font-size:calc(20cqmin * var(--text-scale,1));bottom:4%}
  .grid[data-beats="16"] .rlabel{font-size:calc(20cqmin * var(--text-scale,1))}
  .grid[data-beats="16"] .card[data-mode="rhythm"] .glyphrow{transform:translateY(-8%)}   /* nudge 16-grid rhythm cars up a touch */
  /* entrainment — single pulsing icon (grid 1): no box, big icon, fills the card */
  .grid[data-beats="1"] .slot{display:block}   /* entrainment is boxed (icon-only + words) */
  .grid[data-beats="1"] .art > svg.heart{height:calc(92% * var(--icon-scale,1))}
  /* Pulse + Rhythm: one stable action image carrying rhythm through time. Long pulses once and
     short-short pulses the SAME image twice; side-by-side icon groups remain exclusive to notation. */
  .grid[data-beats="1"] .card.pulse-rhythm .pulse-rhythm-art{position:absolute;inset:7%;display:flex;align-items:center;justify-content:center;z-index:2}
  .grid[data-beats="1"] .card.pulse-rhythm .glyphrow{padding:0;gap:0}
  .grid[data-beats="1"] .card.pulse-rhythm .cars{gap:10cqmin}
  /* Pulse heartbeat is a temporal anchor, not a continuously "on" decoration: pink is the clear
     between-beat state and red is the brief quarter-note attack. This remains visible when motion
     is reduced or Glow is off. */
  .grid[data-beats="1"] .art > svg.heart .hb{fill:#ffbfbf}
  .grid[data-beats="1"] .card.pulse-lit .art > svg.heart .hb{fill:var(--lit)}
  /* One-card study uses GRID=1 for geometry only. It remains a normal heartbeat/rhythm card,
     never inheriting Pulse's always-lit heart or lyric-follow composition. */
  body.single-card-mode .grid[data-beats="1"] .art > svg.heart .hb{fill:#ffbfbf}
  body.single-card-mode .grid[data-beats="1"] .card.lit .art > svg.heart .hb{fill:var(--lit)}
  body.single-card-mode .grid[data-beats="1"] .art{inset:7% 8% 19%}
  body.single-card-mode .grid[data-beats="1"] .lyric{bottom:5%;font-size:calc(15cqmin * var(--text-scale,1));white-space:normal;line-height:1.02}
  body.single-card-mode .grid[data-beats="1"] .glyphrow{padding:8cqmin 10cqmin 18cqmin}
  /* One-card instruction pairs the active card with the existing Baby Echo puppet. They are peers
     across the stage, not a tiny puppet lane stacked above a full-width card. */
  body.single-card-mode.puppet-on .countin-lane{left:0;right:50%;top:0;height:100%;justify-content:center;gap:2cqmin}
  body:not(.head-pitch).single-card-mode.puppet-on .stagebody{left:50%;right:0;top:0;bottom:0}
  body.single-card-mode.puppet-on .ci-card.puppet{align-self:center;height:calc(var(--single-card-pair-height,84%) * var(--puppet-frame-scale,1))}
  body.single-card-mode.puppet-on .grid{width:96%;height:var(--single-card-pair-height,84%)}
  /* Direct authoring contract: 60 means 60% of the complete student stage. This rule is later
     than both legacy and single-card sizing so the percentage is literal in every layout. */
  .stage.puppet-height-authored .ci-card.puppet{height:var(--puppet-stage-height,20cqh)}
  body:not(.single-card-mode) .stage.puppet-height-authored .countin-lane{height:100%;align-items:flex-start}
  body:not(.head-pitch):not(.single-card-mode) .stage.puppet-height-authored .stagebody{top:var(--puppet-stage-height,20cqh)}
  body:not(.head-pitch):not(.single-card-mode) .stage.puppet-height-authored.puppet-full-stage .stagebody{visibility:hidden}
  /* train chuff — both frames overlaid, crossfade on the beat */
  /* train crossfade — legacy k_u3_m7 technique: a FIXED-aspect box (the train canvas), both frames absolutely pinned + object-fit:contain so they overlay perfectly (no off-center jump) */
  .chuff{position:relative;display:inline-block;aspect-ratio:1522/1869;height:calc(86% * var(--icon-scale,1));max-width:100%;transform-origin:50% 70%}
  .chuff .beaticon{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
  .chuff .cp{opacity:0}   /* the puff frame; its opacity is driven per-frame by the beat envelope (the chuff) */
  .grid[data-beats="1"] .chuff{height:calc(90% * var(--icon-scale,1))}
  /* Pulse + Words = lyric-follow: one box wrapping the pulsing icon (top) + the whole-song lyrics, highlighting on the beat/syllable */
  .grid[data-beats="1"] .pulse-lyric .slot{display:block}
  .card.pulse-lyric{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2cqmin;padding:3cqmin;overflow:hidden}
  /* words-mode icon size — flex:0 0 auto so the height is HONORED (not shrunk to fit the lyrics); the slider can drive it past half-screen to full */
  .card.pulse-lyric .art{flex:0 0 auto;position:relative;inset:auto;height:calc(30% * var(--pulse-icon,1));width:auto;z-index:2}
  .card.pulse-lyric .art > svg.heart,.card.pulse-lyric .chuff{height:100%}
  .card.pulse-lyric .art > img.beaticon{width:100%;height:100%}   /* the art block is already the sized box here; contain does the rest */
  .card.pulse-lyric .plyrics{flex:0 1 auto;min-height:0}   /* lyrics yield space as the icon grows */
  .plyrics{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;width:100%;text-align:center;font-family:var(--student-font)}
  /* The visual lyric lines live inside this aria-hidden karaoke wrapper. It became the
     direct flex child when the static screen-reader transcript was added, so line spacing
     belongs here; putting gap on .plyrics only spaces the wrapper from the transcript and
     leaves the actual lines touching. */
  .playback-karaoke{display:flex;flex-direction:column;justify-content:center;gap:var(--ply-line,1.6cqmin);width:100%;min-height:0;overflow:visible}
  /* One static whole-word transcript remains available to assistive technology while the visual
     karaoke row stays aria-hidden. v2.5 removed the old combined .mp-transcript selector with the
     mini-renderer and accidentally removed this half of that rule too. */
  .playback-transcript{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
  /* word gap = space between WORDS (slider); letter spacing = kerning within text (slider) */
  .pline{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:center;gap:var(--ply-word,.5em);font-size:calc(7.5cqmin * var(--text-scale,1));font-weight:var(--ply-weight,600);letter-spacing:var(--ply-letter,0em);color:var(--ink);line-height:1.15}
  .pword{display:inline-flex;align-items:baseline}
  .lyric-hyphen{display:inline-block;margin-inline:.14em;flex:0 0 auto}
  .plw{padding:.04em .06em;border-radius:.22em;transition:color .07s,background .07s,transform .07s}
  /* A pword is one canonical word: keep syllable highlight targets, not gaps between them.
     Outer padding still separates whole words; authored hyphens remain independent. */
  .pword>.plw{padding-inline:0}
  .pword>.plw:first-child{padding-inline-start:.06em}
  .pword>.plw:last-child{padding-inline-end:.06em}
  .plw.hl{color:var(--ink);background:var(--hl,#ffd23f);transform:scale(1.05)}   /* karaoke: dark text on an amber highlight (easy to read; very high contrast) */
  .plyrics .psec{display:contents}
  .plyrics .ptitle{font-weight:700;opacity:.9;margin-bottom:2cqmin;font-size:calc(7.5cqmin * var(--text-scale,1) * var(--title-scale,1.2));transform:translateY(var(--title-y,0cqmin))}
  body.lyricwin-section .plyrics .psec{display:none}
  body.lyricwin-section .plyrics .psec.on{display:contents}
  body.lyricwin-beats .plyrics .psec{display:contents!important}
  body.lyricwin-beats .plyrics .pline{display:none}
  body.lyricwin-beats .plyrics .pline.on{display:flex}

  /* Standalone Lyrics is one calm reading surface. The card itself owns the frame so the
     inner beat slot cannot create a second edge or clip its own shadow. Highlight color
     remains active, but words do not resize and page-turn clones never overlay the text. */
  body.bus-lyrics .grid{height:calc(var(--gridh,54%) - 5cqmin)}
  /* The Lyrics card is adjustable geometry, not the typography's size container. Let its
     cqmin-based type resolve against the stage so box width/height never silently rescale or
     clamp the font-size control. Rhythm/movement cards retain their per-card containers. */
  body.bus-lyrics .card.pulse-lyric{container-type:normal;overflow:visible;background:#fff;border:3px solid #000;border-radius:4cqmin;box-shadow:0 .9cqmin 2.2cqmin rgba(0,0,0,.20)}
  body.bus-lyrics .card.pulse-lyric .slot{display:none}
  body.bus-lyrics .plw{transition:color .07s,background .07s}
  body.bus-lyrics .plw.hl{transform:none}

  /* v1.25 — same beat-grid renderer, composed as two independently sized regions.
     The upper `.grid` remains the canonical visual/action renderer. The lower host reuses the
     existing Pulse lyric markup/highlight functions; it is not a second screen or musical clock. */
  body.split-regions .stagebody{padding:2cqmin;flex-direction:column;align-items:center;justify-content:center;gap:var(--split-gap,3cqmin)}
  body.split-regions .grid{flex:0 0 var(--split-visual-h,54%);width:var(--split-visual-w,72%);height:var(--split-visual-h,54%);min-height:0}
  body.split-regions.movement-mode .grid[data-beats="1"]{position:relative}
  body.split-regions.movement-mode .grid[data-beats="1"]::before{content:'';position:absolute;inset:0;z-index:0;pointer-events:none;background:#fff;border:3px solid #000;border-radius:7cqmin;box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26)}
  body.split-regions.movement-mode .grid[data-beats="1"] .movement-card{z-index:1}
  body.split-regions.movement-mode .grid[data-beats="1"] .movement-card>.slot{display:none}
  .split-lyrics{display:none}
  body.split-regions .split-lyrics{position:relative;z-index:3;display:flex;flex:0 0 var(--split-lyrics-h,28%);width:var(--split-lyrics-w,86%);height:var(--split-lyrics-h,28%);min-height:0;align-items:center;justify-content:center;overflow:hidden;padding:2cqmin 3cqmin;background:#fff;border:3px solid #000;border-radius:3cqmin;box-shadow:0 .9cqmin 2.2cqmin rgba(0,0,0,.20)}
  body.split-regions .split-lyrics .plyrics{width:100%;max-height:100%;overflow:hidden}
  body.split-regions .split-lyrics .pline{font-size:calc(7.5cqmin * var(--split-lyrics-scale,1))}
  body.split-regions .split-lyrics .ptitle{font-size:calc(7.5cqmin * var(--split-lyrics-scale,1) * var(--title-scale,1.2))}
  body.split-regions.split-lyrics-auto .plyrics .psec{display:contents!important}
  body.split-regions.split-lyrics-auto .plyrics .pline{display:none}
  body.split-regions.split-lyrics-auto .plyrics .pline.on{display:flex}
  body.split-regions .split-lyrics .plw.hl{transform:none}
  body.split-regions .grid .movement-icon,
  body.split-regions .grid .movement-wave,
  body.split-regions .grid .art>img.beaticon,
  body.split-regions .grid .art>svg.heart,
  body.split-regions .grid .chuff{scale:var(--split-visual-scale,1)}
  body.split-regions .grid .mvword,
  body.split-regions .grid .pline{font-size:calc(12cqmin * var(--text-scale,1) * var(--split-visual-scale,1))}
  body.bus-lyrics .ghost{display:none}

  /* page turn = quick crossfade: a frozen ghost clone of the OLD window dissolves to reveal the new one beneath */
  .ghost{ position:absolute; margin:0; pointer-events:none; z-index:5; transition:opacity .22s ease }
  /* The split-region grid is explicitly `position:relative`. Its selector outranked `.ghost`,
     so a temporary page-turn clone became a third flex item and shoved both real regions upward
     until the clone was removed. Keep the clone on the overlay plane; inline left/top/size from
     turnTo()/ghostGrid() still place it exactly over the outgoing grid. */
  body.split-regions .stagebody>.grid.ghost{position:absolute;flex:none}

  @media (prefers-reduced-motion:reduce){
    .card .art,.glyph img.car{transition:none}
    .card.lit .art{transform:translateY(var(--icon-y,0%))}   /* no scale pulse, but keep the icon ↕ offset */
    .glyph.lit img.car{transform:none}
    .card.lit .slot{outline:0.9cqmin solid var(--lit);outline-offset:-0.9cqmin}
    .ghost{transition:none}
  }

  /* ---- production console (NOT part of the screen) — dark Logic-style desk ----
     flex:0 0 auto + max-height (not flex:1 1 auto) — .console is now the FIXED side of the split
     (see the .screen comment above): it renders at its own natural content height up to the cap,
     never more, so .screen always gets everything else. max-height reproduces the exact 30vh-8px
     this pane was already proven click-safe at (100vh - .screen's old 70vh - the 8px divider);
     min-height is the pre-existing floor, unchanged. */
  .console{flex:0 0 auto;min-height:120px;max-height:calc(30vh - 8px);overflow:auto;background:#17152b;color:#e9e7f6;padding:10px;display:flex;flex-direction:column;gap:9px;
    font:500 13px ui-sans-serif,system-ui,'Segoe UI',sans-serif}
  .console .lbl{font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#928dc2}
  .console .read{font:500 12px ui-monospace,Menlo,monospace;color:#bdb8e8;white-space:pre}
  .console button{font:inherit;padding:6px 11px;border-radius:7px;border:1px solid #423e74;background:#251f4d;color:#e9e7f6;cursor:pointer}
  .console button:hover{border-color:#5b56a0}
  .console button.on{background:var(--accent);color:#1a1a1a;border-color:var(--accent)}
  .console button:disabled{opacity:.4;cursor:default}
  .console input[type=range]{width:96px;accent-color:var(--accent)}
  .console input[type=text],.console select{font:inherit;padding:6px 8px;border-radius:7px;border:1px solid #423e74;background:#211c45;color:#fff}
  .console input[type=file]{font-size:11px;color:#bdb8e8;width:118px}
  .console .sep{width:1px;height:22px;background:#3a3668}
  .console .chk{display:flex;gap:6px;align-items:center;cursor:pointer;font-size:12px;color:#cfcbef;user-select:none}
  /* 3-way app-switch launcher (lives in the console chrome → hidden in ?mode=stage; SSO via shared ns_* localStorage) */
  .appbar{display:flex;align-items:center;gap:10px;padding:0 2px 8px;margin-bottom:4px;border-bottom:1px solid #2c2856;flex-wrap:wrap}
  /* load bar: in-UI song / arrangement / saved-screen picker — sits below the app-switch, hidden in ?mode=stage with the rest of the console */
  .loadbar{display:flex;align-items:center;gap:14px;padding:6px 2px 8px;margin-bottom:6px;border-bottom:1px solid #2c2856;flex-wrap:wrap;font:700 11px/1.2 system-ui,sans-serif;color:#9b95d6;letter-spacing:.04em;text-transform:uppercase}
  .loadbar label{display:inline-flex;align-items:center}
  .loadbar select{margin-left:6px;background:#1a1733;color:#e8e6f7;border:1px solid #3a356b;border-radius:6px;padding:4px 8px;font:500 12px/1 system-ui,sans-serif;text-transform:none;letter-spacing:0;max-width:320px}
  .loadbar>button{padding:5px 9px;border:1px solid #625ca0;border-radius:6px;background:#2d2856;color:#fff;font:700 11px/1 system-ui,sans-serif;cursor:pointer}
  .loadbar>button:not(:disabled):hover{background:#393269}
  .screen-recall{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding-left:10px;border-left:1px solid #3a3668}
  .screen-recall button{padding:5px 9px;border:1px solid #625ca0;border-radius:6px;background:#2d2856;color:#fff;font:700 11px/1 system-ui,sans-serif;cursor:pointer}
  .screen-recall button:not(:disabled):hover{background:#393269}
  #screenrecallstate{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:none;letter-spacing:0;color:#b9b5d7}
  #gridcustom{width:46px;margin-left:4px;background:#1a1733;color:#e8e6f7;border:1px solid #3a356b;border-radius:6px;padding:4px 6px;font:600 12px/1 system-ui,sans-serif}
  [data-beats]:disabled{opacity:.3;cursor:not-allowed}   /* grid size larger than the whole song → grayed out (a bigger window can't show more beats than exist) */
  .moderow{display:flex;align-items:center;gap:8px;padding:6px 2px 8px;border-bottom:1px solid #2c2856;margin-bottom:6px}
  .moderow .modelbl{font:700 11px/1 system-ui,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#9b95d6;margin-right:4px}
  .preset-empty{padding:10px 8px;color:#8a85bf;font:500 12px/1.3 system-ui,sans-serif}
  .appbrand{font-weight:700;font-size:13px;color:#cfcbef;letter-spacing:.02em}
  .appswitch{padding:5px 11px;border-radius:6px;background:#2d6cdf;color:#fff;text-decoration:none;font-size:12px;font-weight:600;white-space:nowrap}
  .appswitch:hover{background:#1b5fbf}
  .appswitch.active{background:#3a3668;color:#cfcbef;cursor:default}
  .appgrow{flex:1}
  .appwho{font-size:11px;color:#928dc2}
  /* include-in-chrome picker modal ("what controls should the teacher have?") */
  .chromemodal{position:fixed;inset:0;background:rgba(10,8,24,.66);display:flex;align-items:center;justify-content:center;z-index:1000}
  .chromemodal .cm-box{background:#1e1b3a;color:#e9e7f6;border:1px solid #3a3668;border-radius:12px;padding:18px 20px;max-width:560px;width:92%;box-shadow:0 18px 60px rgba(0,0,0,.5)}
  .chromemodal h3{margin:0 0 4px;font-size:16px}
  .chromemodal .cm-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:12px 0}
  .chromemodal .cm-h{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#928dc2;margin-bottom:6px}
  .chromemodal .cm-row{display:flex;align-items:center;gap:8px;font-size:13px;padding:3px 0;cursor:pointer}
  .chromemodal .cm-mut{color:#928dc2;font-size:11px}
  .chromemodal .cm-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}
  .chromemodal .cm-actions button{font:inherit;padding:7px 14px;border-radius:8px;border:1px solid #423e74;background:#251f4d;color:#e9e7f6;cursor:pointer}
  .chromemodal .cm-actions .cm-ok{background:#54c759;color:#0c2a12;border-color:#54c759;font-weight:700}
  /* ?mode=controls — the teacher cue card (light, fills the dashboard slot; only the picked controls show) */
  .cuecard{display:none}
  /* TEACHER CHROME TYPEFACE (2026-07-21). The grade-banded student face is projected; this cue card
     is read by an adult, at a glance, mid-lesson, often
     on a phone propped on a piano. It gets the system UI stack instead: tighter, better hinted at
     small sizes, and no webfont round-trip before the teacher can act. Kid surfaces are untouched. */
  body.mode-controls{background:#fff;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-font-smoothing:antialiased}
  body.mode-controls button,body.mode-controls select,body.mode-controls input,body.mode-controls label,body.mode-controls .cuecard{font-family:inherit}
  body.mode-controls>main.screen,body.mode-controls>.divider,body.mode-controls>section.console{display:none!important}
  /* The dock is height-constrained by the host, so the card must be able to fill it and let its own
     inner regions take the overflow — hence the flex chain down from html/body rather than block. */
  html:has(body.mode-controls),body.mode-controls{height:100%}
  body.mode-controls .cuecard{display:flex;flex-direction:column;padding:8px;height:100%;box-sizing:border-box;overflow:hidden}
  /* Teacher cue card (2026-07-21 rebuild). The host docks this in a slot it clamps to 48–420px
     (js/12-settings.js, ns-mixer-size), so the card is a WIDE SHORT DOCK, not a tall column. Three
     bands, fixed order: transport across the top in one horizontal row, an optional beat strip, and
     the mixer — which never scrolls out of reach, because a teacher reaching for a fader mid-song
     cannot be asked to scroll first. Only the two inner regions scroll; the bands themselves don't.
     Font is the system UI stack throughout because this surface is read by an adult glancing down
     from the room. */
  .cc-card{font-family:inherit;width:100%;box-sizing:border-box;min-width:0;color:#1a1a1a;background:#fff;border:1px solid #d4d8dc;border-radius:12px;padding:10px 12px;margin:0 auto;display:flex;flex-direction:column;gap:8px;max-height:100%}
  .cc-title{font-weight:600;font-size:11px;color:#6b7480;letter-spacing:.03em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:0 0 auto}
  /* band 1 — transport. One horizontal row; wraps only when genuinely too narrow. */
  .cc-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;flex:0 0 auto;min-width:0}
  .cc-grp{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
  .cc-sep{width:1px;align-self:stretch;background:#e2e6ea;margin:0 2px}
  .cc-lbl{font-size:11px;font-weight:600;color:#6b7480;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
  .cc-btn{font:600 14px inherit;font-family:inherit;padding:9px 14px;border-radius:8px;border:1px solid #c2c8cf;background:#f4f6f8;color:#1a1a1a;cursor:pointer;white-space:nowrap;min-height:38px}
  .cc-btn:hover{background:#e9edf1}
  .cc-btn.on,.cc-play{background:#ea7a17;color:#1a1a1a;border-color:#ea7a17;font-weight:700}
  .cc-tempo-step{min-width:38px;padding:9px 11px;font-size:18px;line-height:1}
  .cc-tempo-value{min-width:76px;font-variant-numeric:tabular-nums}
  .cc-tempo-value.on{background:#fff3e6;border-color:#ea7a17;color:#7a3700}
  .cc-play{padding:9px 20px;font-size:15px}
  .cc-chk{display:flex;align-items:center;gap:6px;font-size:13px;color:#1a1a1a;white-space:nowrap}
  .cc-sel{font-family:inherit;font-size:13px;padding:7px 8px;border-radius:8px;border:1px solid #c2c8cf;background:#f4f6f8;min-height:38px}
  /* band 2 — beat strip. One line that scrolls sideways; never pushes the mixer down. */
  .cc-beats{display:flex;align-items:center;gap:8px;flex:0 1 auto;min-height:0;min-width:0}
  .cc-strip{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;min-width:0;flex:1 1 auto}
  .cc-chip{font-family:inherit;font-weight:700;font-size:14px;min-width:34px;height:34px;flex:0 0 auto;border-radius:8px;border:1px solid #c2c8cf;background:#f4f6f8;color:#1a1a1a;cursor:pointer}
  .cc-chip.on{background:#ea7a17;border-color:#ea7a17}
  /* band 3 — mixer. Always on screen; if there are many stems the ROWS scroll, the band does not. */
  .cc-mix{border-top:1px solid #d4d8dc;padding-top:7px;display:flex;flex-direction:column;gap:4px;flex:1 1 auto;min-height:0}
  /* ~4 stems visible before the rows scroll — keeps the card's NATURAL height inside the host's
     420px clamp, so the height handshake settles instead of oscillating against the cap. */
  .cc-mixrows{display:flex;flex-direction:column;gap:5px;overflow-y:auto;min-height:0;max-height:152px}
  .cc-strip-row{display:flex;align-items:center;gap:8px;min-width:0}
  .cc-tnm{min-width:88px;max-width:140px;font-size:13px;font-weight:600;color:#1a1a1a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .cc-mini{font-family:inherit;font-weight:700;font-size:12px;width:32px;height:30px;flex:0 0 auto;border-radius:7px;border:1px solid #c2c8cf;background:#f4f6f8;color:#1a1a1a;cursor:pointer}
  .cc-mini.on{background:#1a1a1a;color:#fff}
  /* Capped: a fader stretched across a 1400px dock makes a 5% volume change a 70px drag. */
  .cc-vol{flex:1 1 auto;min-width:90px;max-width:280px;accent-color:#ea7a17}
  .tbar,.sbar{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;flex:0 0 auto;background:#211c45;border:1px solid #353063;border-radius:10px;padding:9px 12px}
  .tgroup{display:flex;align-items:center;gap:6px}
  /* colour-coded transport (Logic/AE): play green · record red · auto blue · modes accent */
  .console #audio{border-color:#2f7a4e;color:#8fe6ad}
  .console #audio.on{background:#1f9d57;border-color:#27b566;color:#06210f}
  .console #rec{border-color:#7a2f2f;color:#ff9a90}
  .console button#rec.on{background:#c62828;border-color:#e53935;color:#fff}
  .console #auto.on{background:#2f6fb0;border-color:#4a8fd0;color:#fff}
  .console button.save{background:#1f7a44;border-color:#2aa15c;color:#fff}
  .rack{display:flex;gap:14px;align-items:flex-start;justify-content:center;flex:0 0 auto;min-height:0}   /* natural height → console scrolls instead of squishing */
  .panel{background:#1d1940;border:1px solid #353063;border-radius:10px;padding:10px}
  .panel.scene{flex:0 1 460px;display:flex;flex-direction:column;gap:9px;min-width:0}
  .disc{border-top:1px solid #2f2b57;padding-top:7px}
  .disc>summary{cursor:pointer;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:#928dc2;list-style:none}
  .disc>summary::-webkit-details-marker{display:none}
  .disc[open]>summary{color:#cfcbef}
  .disc .row{margin-top:8px}
  .phead{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#958fd0}
  .scene .row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
  .scene .row > .lbl{width:62px;flex:0 0 auto}
  .mini{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:#bdb8e8}
  .mini input[type=range]{width:72px}
  .gap{width:8px}
  .mixer-panel{flex:0 0 auto;display:flex;flex-direction:column;gap:5px;padding:8px}   /* condensed */
  .strips{display:flex;gap:5px;align-items:flex-start;flex:0 0 auto;min-height:0}
  .strip{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:0;background:#251f4d;border:1px solid #3a3668;border-radius:8px;padding:5px 5px}
  .sname{font-size:11px;text-transform:capitalize;color:#cfcbef;flex:0 0 auto}
  /* width:20px!important (v1.43 fix) — `.console input[type=range]{width:96px}` (0,2,1) outranks
     `.vfader{width:20px}` (0,1,0) under the cascade's specificity rules, so every fader was
     rendering at 96px instead of 20px: a ~108px-wide strip instead of ~58px, which is what forced
     the mixer into horizontal scroll at the ordinary 3-4 strip count. */
  .vfader{-webkit-appearance:slider-vertical;appearance:slider-vertical;writing-mode:vertical-lr;direction:rtl;width:20px!important;flex:none;height:118px;accent-color:var(--accent)}
  .mix-buses{display:flex;flex-direction:column;gap:5px;margin-top:3px;padding-top:7px;border-top:1px solid #41444b;min-width:340px}
  .mix-bus-row{display:grid;grid-template-columns:70px minmax(82px,1fr) minmax(80px,1fr) 39px 28px;gap:6px;align-items:center;min-height:34px;padding:4px 5px;background:#191a1e;border:1px solid #34363c}
  .mix-bus-name{display:flex;flex-direction:column;min-width:0}.mix-bus-name strong{font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:#e0e2e7}.mix-bus-name small{font-size:8px;color:#858b96;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mix-bus-fader{display:grid;grid-template-columns:auto minmax(46px,1fr) 29px;gap:4px;align-items:center;color:#9fa4ad;font-size:8px;text-transform:uppercase}.mix-bus-fader input{width:100%!important;min-width:46px;accent-color:#8c80ff}.mix-bus-fader span{font-size:8px;color:#c5c9d0;text-align:right}
  .level-meter{position:relative;height:11px;overflow:hidden;background:#090a0c;border:1px solid #4b4e55;border-radius:2px;--meter-level:0%;--meter-peak:0%}
  .level-meter-fill{position:absolute;inset:1px;background:linear-gradient(90deg,#36b86a 0 68%,#e4b83f 68% 86%,#e05252 86% 100%);clip-path:inset(0 calc(100% - var(--meter-level)) 0 0)}
  .level-meter-peak{position:absolute;top:0;bottom:0;left:var(--meter-peak);width:2px;background:#fff;transform:translateX(-1px);opacity:.9}
  .meter-read{font:700 8px/1 DM Mono,ui-monospace,monospace;color:#aeb3bd;text-align:right;white-space:nowrap}
  .mix-bus-row>button{width:28px;height:25px;padding:0;border-radius:3px;font-size:9px;font-weight:800}.mix-bus-row>button.on{background:#c62828;color:#fff;border-color:#e53935}
  .master-bus-row{grid-template-columns:70px minmax(0,1fr) 39px 42px;border-color:#555a66;background:#202227}.master-bus-row .master-meter{grid-column:2}.clip-reset{width:42px!important;color:#8b8f99!important}.clip-reset.clipped{background:#d32f2f!important;border-color:#ff6b62!important;color:#fff!important;box-shadow:0 0 0 2px rgba(255,107,98,.22)}
  .loudness-readouts{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(72px,auto)) minmax(110px,1fr);gap:5px;align-items:center;padding-top:4px;border-top:1px solid #383b43}.loudness-readouts>span{display:grid;grid-template-columns:auto minmax(28px,auto) auto;gap:3px;align-items:baseline;font:700 8px/1 DM Mono,ui-monospace,monospace;color:#aeb3bd}.loudness-readouts b{color:#8c80ff}.loudness-readouts output{font-size:10px;color:#f0f1f4;text-align:right}.loudness-readouts small{font-size:7px;color:#7f8590}.loudness-readouts em{font:500 8px/1.15 DM Sans,system-ui,sans-serif;color:#8d929d;text-align:right}.loudness-readouts.measuring em{color:#e4b83f}.loudness-readouts.complete em{color:#64ce8b}.loudness-readouts.warning output{color:#ffba76}.loudness-reference{grid-column:1/-1;margin:0;padding-top:3px;border-top:1px dotted #383b43;font:500 8px/1.2 DM Sans,system-ui,sans-serif;color:#8d929d}.loudness-reference strong{color:#b8bdc7}.master-bus-row:has(.loudness-readouts){min-height:74px}
  /* Templates live in a modal so the head module owns the full left edge and horizontal work area.
     Selection remains inert until Use selected template is pressed. */
  .moderow .template-open{margin-left:auto;min-width:auto;background:#2a3150;border-color:#6473ad;color:#e9edff}
  .moderow .template-open:hover{background:#35416b}
  .template-modal[hidden]{display:none}
  .template-modal{position:fixed;inset:0;z-index:950;background:rgba(7,8,12,.78);display:flex;align-items:center;justify-content:center;padding:24px}
  .template-dialog{width:min(1180px,96vw);max-height:92vh;overflow:hidden;background:#17181c;color:#eceef2;border:1px solid #555a66;border-radius:12px;box-shadow:0 24px 80px rgba(0,0,0,.68);display:flex;flex-direction:column}
  .template-titlebar{display:flex;align-items:flex-start;gap:18px;padding:16px 18px;border-bottom:1px solid #363941;background:#202227}
  .template-titlebar h2{margin:0 0 4px;font:800 18px/1.2 system-ui,sans-serif}
  .template-titlebar p{margin:0;color:#aeb3bd;font:500 12px/1.4 system-ui,sans-serif}
  .template-close{margin-left:auto;flex:0 0 auto;width:36px;height:36px;padding:0;border-radius:8px;font-size:24px;line-height:1}
  .template-close{border:1px solid #555a66;background:#292c33;color:#eef0f4;cursor:pointer}.template-close:hover{background:#3a3e48}.template-close:focus-visible{outline:2px solid #8c80ff;outline-offset:2px}
  .template-workspace{display:grid;grid-template-columns:minmax(230px,300px) minmax(0,1fr);gap:14px;padding:14px;min-height:0;overflow:auto}
  .template-library{display:flex;flex-direction:column;min-height:0;padding:10px;border:1px solid #363941;background:#1d1f24}
  .template-preview{min-width:0;padding:10px;border:1px solid #363941;background:#1d1f24;display:flex;flex-direction:column}
  .template-preview-head{display:flex;align-items:baseline;gap:10px;margin-bottom:8px}
  .template-preview h3{margin:0;font:800 12px/1 system-ui,sans-serif;text-transform:uppercase;letter-spacing:.07em;color:#d8dbe2}
  .template-preview-head span,.template-preview>p{margin:0;color:#9ea4ae;font:500 11px/1.35 system-ui,sans-serif}
  .template-preview-frame{width:100%;aspect-ratio:16/9;overflow:hidden;background:#000;border:1px solid #4b4f59;border-radius:6px;margin-bottom:8px}
  .template-preview-frame iframe{display:block;width:100%;height:100%;border:0;background:#000}
  .preset-list{display:flex;flex-direction:column;gap:4px;overflow:auto;min-height:0;flex:1 1 auto;max-height:300px}
  .preset-item{text-align:left;padding:6px 8px;border-radius:7px;border:1px solid #423e74;background:#251f4d;color:#e9e7f6;cursor:pointer;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .preset-item.on{background:#2d6cdf;border-color:#2d6cdf;font-weight:600}
  .preset-item .pstar{color:#928dc2;font-size:10px}
  .preset-actions{display:flex;flex-wrap:wrap;gap:5px}
  .preset-actions button{font-size:11px;padding:5px 8px;border-radius:6px;border:1px solid #423e74;background:#251f4d;color:#e9e7f6;cursor:pointer}
  .preset-actions button:disabled{opacity:.42;cursor:default}
  .preset-actions button:hover{background:#2d2a55}
  .preset-actions button.primary{flex:1 0 100%;background:#2f7d3d;border-color:#53a864;color:#fff;font-weight:800}
  .preset-actions button.primary:not(:disabled):hover{background:#3b914b}
  .cm-input{width:100%;box-sizing:border-box;padding:9px 11px;border-radius:8px;border:1px solid #c2c8cf;font:500 14px var(--student-font);margin:4px 0 2px}
  .sbtns{flex:0 0 auto}
  .sbtns{display:flex;gap:4px}
  .sbtns button{padding:0;width:22px;height:22px;border-radius:5px;font-size:11px}
  .sbtns button[data-mx=solo].on{background:#e0a32e;border-color:#f0b94a;color:#1a1a1a}
  .sbtns button[data-mx=mute].on{background:#c62828;border-color:#e53935;color:#fff}

  /* ===== PITCH HEAD (melodic) — render root, gated by body.head-pitch; beat-grid untouched when off ===== */
  .staff-host{position:absolute;inset:0;display:none}
  body.head-pitch #grid{display:none}
  body.head-pitch .staff-host{display:block}
  /* mode-aware controls: rhythm-only hidden in Melodic, melodic-only hidden in Rhythm (shared controls stay) */
  /* Gating follows the BUS, not the render head. Stick notation on 0 or 1 lines is RHYTHM reading
     (Landon, 2026-07-21) even though it renders through the pitch head — see psBus(). */
  body.bus-melodic .rhythm-only{display:none!important}
  body:not(.bus-melodic) .melodic-only{display:none!important}
  /* Staff-attribute rows (engrave · score · system) belong to ANY engraved staff — melodic
     notation OR rhythm stick — so they follow the pitch-head render root + the notation gate,
     not the bus. head-pitch is false in Cards even if ps-notate lingers after a Stick detour.
     (2026-07-21 bus/head split: stick on 0/1 lines is the RHYTHM bus; see psBus().) */
  body:not(.head-pitch):not(.rhythm-score-mode) .staff-attr{display:none!important}
  body.rhythm-score-mode .pitch-only-furniture{display:none!important}
  body.bus-lyrics .lyrics-na{display:none!important}
  body.ps-vert .vert-na{display:none!important}      /* not applicable in vertical (one centred glyph): the ↔ staff inset */
  body.head-pitch .mel-na{display:none!important}    /* not applicable in melodic: the Lyric-type icon size (glyph uses size/card) */
  body.head-pitch .countin-lane{display:none}        /* melodic has no count-in puppet lane (beat-grid only) */
  body.head-pitch .stagebody{top:0}                  /* melodic render fills the FULL 16:9 stage — drops the beat-grid count-in + chart-offset top reservation (§3a: the pitch head is NOT assigned the rhythm chart-offset) */
  /* Item D (2026-08, region alignment): multipart regions are NOT assigned the rhythm chart-offset
     either — each region already carries its own per-part --mp-chart-offset (horizontal only). But
     .stagebody was still shared unconditionally, so its dynamic top:calc(ci-lane + chart-offset)
     picked up whatever GLOBAL --chart-offset the #offset slider last happened to leave on #stage —
     a value with a completely different meaning per state: in Ensemble it's a leftover/unrelated
     figure, and the instant you enter part-edit for a melodic part, body.head-pitch's top:0 rule
     (above) fires and zeroes it. Measured: entering edit on a part with offset=11 moved every
     region's top from 141px to 0px (regionTop), a real vertical jump on every visible region, not
     just the one being edited — this is likely the mechanism behind the reported "shifts when I hit
     edit" (offset=0 is a false negative: both branches compute to the same 0, hiding the bug).
     The fix keeps --ci-lane (Item A's real, still-needed count-in/puppet reservation) but drops the
     chart-offset addend for multipart the same way pitch-head already does — regions must render
     identically whether you're looking at Ensemble or mid part-edit. */
  body.mp-regions-on .stagebody{top:var(--ci-lane,18%)}
  #staff>.pstaff{position:absolute;left:50%;top:50%;width:var(--ps-layout-w,100%);height:var(--ps-layout-h,100%);transform:translate(-50%,-50%)}
  #staff .psline{position:absolute;left:7%;right:6%;height:3px;background:#5b6b7a;opacity:0;z-index:2;transition:opacity .25s,top .2s}
  #staff.ps-staff .psline{opacity:.9}
  #staff .psbig{position:absolute;background:#fff;border:3px solid #000;border-radius:2.4cqmin;box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26);opacity:0;z-index:1;transition:opacity .25s,top .2s,height .2s}
  #staff.ps-one .psbig,#staff.ps-staff .psbig{opacity:1}
  #staff .pn{position:absolute;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;transition:transform .1s ease,left .2s,width .2s,top .2s}
  #staff .pn .pbox{position:absolute;inset:0;background:#fff;border:3px solid #000;border-radius:2.6cqmin;box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26);transition:opacity .25s,border-color .2s}
  #staff.ps-one .pn .pbox,#staff.ps-staff .pn .pbox{opacity:0}
  #staff .pn .pg{position:relative;z-index:2;height:calc(56% * var(--ps-iscale,1));max-height:55%;flex-shrink:0;display:grid;place-items:center;transform:scale(var(--ps-icon-fill,1));transition:transform .09s ease,filter .09s ease}   /* Cards: glyph CAPPED at 55% of the card so word room is always reserved → the [icon+word] pair CENTRES (justify-content:center) at any size/grid. Narrow cards width-constrain it smaller; both still centre. For a bigger icon use card-size (grows the whole card). flex-shrink:0 (2026-08-17, Item 6) — .pg is a flex sibling of .psy (the syllable label, sized off --ps-tscale/--text-scale) inside .pn's FIXED-HEIGHT flex column. Without this, growing the text slider grew .psy's flex-basis, and the browser's default flex-shrink:1 stole that room back from .pg, silently resizing/deforming the notehead glyph every time someone moved the font-size control — the exact "moving the font size slider changes the oval character of note heads" report. Pinning the glyph's own height here decouples it from the label; .psy (default flex-shrink:1) absorbs any overflow instead, which is safe since .pn sets no overflow:hidden. */
  #staff.ps-one .pn .pg,#staff.ps-staff .pn .pg{height:calc(var(--ps-glyphabs,11cqmin) * var(--ps-iscale,1))}
  #staff .pn .pg img,#staff .pn .pg svg,#staff .pn .pg .chuff{height:100%;width:auto;display:block;filter:drop-shadow(0 2px 3px rgba(0,0,0,.22))}
  #staff .pn .pg svg.heart .hb{fill:#ffbfbf;stroke:#000;stroke-width:8;transition:fill .06s}
  #staff .pn .pc{position:relative;z-index:2;width:38%;height:5%;min-height:3px;border-radius:2cqmin;margin-top:2%}
  body.ps-color-off #staff .pn .pc{display:none}
  #staff .pn .psy{position:relative;z-index:2;margin-top:2%;font-weight:var(--ply-weight,600);letter-spacing:var(--ply-letter,0em);font-size:calc(3cqmin*var(--ps-tscale,1));color:#15161a;text-shadow:0 1px 0 #fff;white-space:nowrap}
  #staff.ps-one .pn .psy,#staff.ps-staff .pn .psy{display:none}
  /* active note emulates the beat-grid card: icon pops + card lifts (heart fills red; other icons glow) — no playhead line */
  #staff .pn.lit{transform:translateY(-7%)}
  #staff .pn.lit .pg{transform:scale(1.13)}
  #staff .pn.lit .pbox{border-color:#e2231a}
  #staff .pn.lit .pg svg.heart .hb{fill:#e2231a}
  #staff .pn.lit .pg img,#staff .pn.lit .pg .chuff{filter:drop-shadow(0 0 7px var(--glow-color,rgba(255,200,40,.92))) drop-shadow(0 2px 3px rgba(0,0,0,.22)) brightness(1.05)}
  @media (prefers-reduced-motion:reduce){ #staff .pn.lit{transform:none} #staff .pn.lit .pg{transform:none} #staff .pn.lit .pbox{outline:.7cqmin solid #e2231a} }
  #staff .phl{position:absolute;left:0;right:0;display:none;z-index:3}
  #staff.ps-one .phl,#staff.ps-staff .phl{display:block}
  body.ps-words-off #staff .pn .psy,body.ps-words-off #staff .phl{display:none}
  #staff .phw{position:absolute;transform:translateX(-50%);font-weight:var(--ply-weight,600);letter-spacing:var(--ply-letter,0em);font-size:calc(3cqmin*var(--ps-tscale,1));color:#15161a;text-shadow:0 1px 0 #fff;white-space:nowrap;padding:.03em .2em;border-radius:.22em;transition:background .08s,color .08s}
  #staff .phw.hl{background:#ffd23f;color:#1a1a1a}
  #staff .pph{position:absolute;top:16%;height:66%;width:3px;background:#e2231a;opacity:0;z-index:5}
  #staff .pph.on{opacity:.8}
  /* ---- NOTATION MODE (G1+ stick / standard) — active only when #staff carries .ps-notation; the K iconic path never matches these ---- */
  /* Geometry is drawn in staff-space (sp) units: 1 sp = PS_GAP% of stage height (stage locked 16:9, so px-per-sp is uniform in both axes). Metrics = Bravura engravingDefaults; see [[2026-07-08_Stick_and_Standard_Notation_Live_Head]]. */
  @font-face{font-family:'BravuraNS';src:url('/Bravura.woff2') format('woff2'),url('../../Bravura.woff2') format('woff2');font-display:swap}
  body:not(.ps-notate):not(.rhythm-score-mode) .notation-only{display:none!important}
  #staff.ps-notation .psline{opacity:1;background:#15161a;left:4%;right:3%;transition:opacity .25s}
  #staff.ps-notation .psbig,#staff.ps-notation .pn{display:none}
  #staff .nsym{position:absolute;z-index:3;transition:background .06s,border-color .06s,color .06s,transform .09s ease}
  #staff .nhead{background:#15161a;border-radius:50%;transform:rotate(-20deg);z-index:4}   /* head z-order ABOVE stems/beams — colored heads never clipped by ink */
  #staff .nhead.nbrav{background:none;border-radius:0;transform:none;color:#15161a}   /* Bravura glyph head: no box/rotation (the glyph carries its own shape+tilt) */
  #staff .nhead.nbrav svg{width:100%;height:100%;display:block;overflow:visible}
  #staff .nhead.nbrav svg text{fill:currentColor}
  #staff .nstem,#staff .nstick,#staff .nbeam{background:#15161a}
  #staff .nbeam{position:absolute;z-index:2;border-radius:.4cqmin}
  #staff .nstick{border-radius:.8cqmin}
  #staff .nrest{color:#15161a}
  #staff .nrest svg{width:100%;height:100%;display:block;overflow:visible}
  #staff .nflag{color:#15161a;z-index:3}   /* lone-eighth flag: Bravura glyph, no box — same treatment as a rest */
  #staff .nflag svg{width:100%;height:100%;display:block;overflow:visible}
  #staff .nsolf{position:absolute;transform:translateX(-50%);font-size:calc(2.6cqmin*var(--ps-tscale,1));font-weight:700;color:#15161a;text-align:center;white-space:nowrap;z-index:3;font-family:inherit}   /* solfège letter under a tone */
  #staff .nfurn{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:2;pointer-events:none}   /* clef/keysig/timesig/barlines overlay (sp-unit viewBox); behind noteheads */
  #staff .nledger{position:absolute;background:#15161a;z-index:1;border-radius:.4cqmin}   /* ledger line beyond the staff */
  #staff .ndot{position:absolute;z-index:4;border-radius:50%}   /* augmentation dot (dotted-half) */
  #staff .ntie{position:absolute;z-index:3;pointer-events:none} #staff .ntie svg{width:100%;height:100%;overflow:visible}   /* tie arc */
  #staff .nswatch{position:absolute;z-index:2;border-radius:.8cqmin;border:.14cqmin solid rgba(0,0,0,.35)}
  body.ps-color-off #staff .nswatch{display:none}
  /* active onset: heads/stems/sticks/rests flip to the engine red — a COLOR cue (reduced-motion safe); the pop is motion-gated */
  #staff .nhead.lit{background:#e2231a;transform:rotate(-20deg) scale(1.14)}   /* black heads have no inline bg so this wins; BW heads keep their inline fill and flip the outline below */
  #staff .nhead.nbrav.lit{background:none!important;color:#e2231a!important;transform:scale(1.12)}   /* Bravura head: highlight recolors the glyph (beats the inline BW color) */
  @media (prefers-reduced-motion:reduce){ #staff .nhead.nbrav.lit{transform:none} }
  #staff .nhead.bwh.lit{border-color:#e2231a}
  #staff .nstem.lit,#staff .nstick.lit,#staff .nbeam.lit{background:#e2231a}   /* beam stays red across the whole beat (both beamed eighths) */
  #staff .nstick.lit{transform:scaleY(1.05);transform-origin:bottom}
  #staff .nrest.lit{color:#e2231a}
  #staff .nflag.lit{color:#e2231a}
  @media (prefers-reduced-motion:reduce){ #staff .nhead.lit{transform:rotate(-20deg)} #staff .nstick.lit{transform:none} }
  /* VERTICAL emergent: hide horizontal; one centred moving glyph + fixed lyric block + fixed one card */
  #staff.arr-v .pn,#staff.arr-v .psline,#staff.arr-v .psbig,#staff.arr-v .phl,#staff.arr-v .pph{display:none}
  #staff .psvbig{position:absolute;background:#fff;border:3px solid #000;border-radius:2.4cqmin;box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26);display:none;z-index:0}
  #staff.arr-v .psvbig{display:block}
  #staff .pstaff.baby-echo-open-stage .psvlyr{display:none!important}
  #staff .psvlyricbig{position:absolute;background:#fff;border:3px solid #000;border-radius:2.4cqmin;box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26);display:none;z-index:0}
  #staff.arr-v.ps-two .psvlyricbig{display:block}
  #staff .psvel{position:absolute;left:50%;transform:translate(-50%,-50%);display:none;z-index:3}
  #staff.arr-v .psvel{display:block}
  #staff.arr-v.form-spots .psvel{transition:none}   /* spots = instant cut; glide drives top per-frame */
  #staff .psvel .pg{height:calc(var(--ps-velemh,28cqmin) * var(--ps-iscale,1));display:grid;place-items:center;transform:scale(var(--ps-icon-fill,1))}
  #staff .psvel .pg img,#staff .psvel .pg svg,#staff .psvel .pg .chuff{height:100%;width:auto;display:block;filter:drop-shadow(0 3px 6px rgba(0,0,0,.28))}
  #staff .psvel .pg svg.heart .hb{fill:#e2231a;stroke:#000;stroke-width:8}   /* vertical glyph heart = red (matches the kid-facing heart; was unstyled/black) */
  #staff.arr-v:is(.ps-one,.ps-two) .psvel.puppet{height:clamp(17cqmin,calc(14cqmin + 9.2cqmin * var(--puppet-scale,1)),35cqmin);width:22%;display:grid;place-items:center}
  #staff.arr-v.ps-one .pstaff.baby-echo-open-stage .psvel.puppet{height:clamp(32cqmin,calc(25cqmin + 18cqmin * var(--puppet-scale,1)),52cqmin);width:40%}
  #staff.arr-v:is(.ps-one,.ps-two) .psvel.puppet .echo-bob{height:100%;min-height:0;width:100%;display:grid;place-items:center;transition:none}
  #staff.arr-v:is(.ps-one,.ps-two) .psvel.puppet.bob .echo-bob{transform:none} /* the melodic contour owns vertical motion; mouth attacks never add a second bob */
  @keyframes babyEchoAttackBreath{0%{transform:scale(1)}28%{transform:scale(1.018)}100%{transform:scale(1)}}
  #staff.arr-v:is(.ps-one,.ps-two) .psvel.puppet.attack-pulse .echo-bob{animation:babyEchoAttackBreath 175ms cubic-bezier(.18,.72,.28,1)}
  @media (prefers-reduced-motion:reduce){#staff.arr-v:is(.ps-one,.ps-two) .psvel.puppet.attack-pulse .echo-bob{animation:none}}
  #staff.arr-v:is(.ps-one,.ps-two) .psvel.puppet .owl{grid-area:1/1;height:100%;min-height:0;max-width:100%;width:auto;object-fit:contain;filter:none}
  #staff .psvlyr{position:absolute;left:50%;transform:translateX(-50%);display:none;flex-direction:column;align-items:center;gap:var(--ply-line,1.2cqmin);width:92%;text-align:center;z-index:3}
  #staff.arr-v .psvlyr{display:flex}
  #staff.arr-v.ps-two .psvlyr{left:50%;width:72%;transform:translate(-50%,-50%)}
  #staff.arr-v.ps-two .psvline{font-size:clamp(3.8cqmin,calc(3.4cqmin + 1.1cqmin * var(--ps-tscale,1)),6cqmin);line-height:1.08;gap:.46em}
  #staff.arr-v.ps-two .psvline .phw{font-size:inherit;line-height:inherit}
  body.puppet-on .puppet-scale-control,body.puppet-on .puppet-position-control{display:inline-flex!important}
  body.ps-words-off #staff .psvlyr{display:none}
  #staff .psvline{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--ply-word,.45em);font-weight:var(--ply-weight,600);letter-spacing:var(--ply-letter,0em);font-size:calc(5cqmin*var(--ps-tscale,1));line-height:1.1;color:#15161a;text-shadow:0 1px 0 #fff}
  #staff .psvlyr .phw{position:static;transform:none}   /* vertical lyric words flow inline (override the absolute horizontal .phw) */

  /* ===== PARALLAX RENDER HEAD (gated: body.head-parallax) — additive; beatgrid/pitch untouched ===== */
  body.head-parallax .countin-lane{display:none}
  body.head-parallax .stagebody{display:none}
  #plxstage{display:none;position:absolute;inset:0;overflow:hidden;background:linear-gradient(#bfe3ff,#eaf6ff);z-index:2}
  body.head-parallax #plxstage{display:block}
  #plxworld{position:absolute;top:0;left:0;width:1600px;height:900px;transform-origin:top left;will-change:transform}
  #plxcamera{position:absolute;inset:0;transform-origin:center center;will-change:transform}
  #plxscene{position:absolute;top:0;left:0;transform-origin:top left;transition:opacity .5s ease}
  #plxbed{position:absolute;inset:0;overflow:hidden;opacity:0;transition:opacity .5s ease;pointer-events:none;z-index:1}
  .plxbedimg{position:absolute;left:50%;top:50%;height:110%;width:auto;transform:translate(-50%,-50%);will-change:transform,filter}
  #plxflat{position:absolute;inset:0;overflow:hidden;opacity:0;transition:opacity .5s ease;pointer-events:none;z-index:1;background-repeat:repeat-x;background-position:center}
  #plxstage.bed #plxscene{opacity:0}
  #plxstage.bed #plxbed{opacity:1}
  #plxstage.flat #plxscene{opacity:0}
  #plxstage.flat #plxflat{opacity:1}
  #plxlayers{position:absolute;inset:0;overflow:hidden;opacity:0;transition:opacity .5s ease;pointer-events:none;z-index:1}
  #plxstage.layers #plxscene{opacity:0}
  #plxstage.layers #plxlayers{opacity:1}
  #plxlayers .plxlayer{position:absolute;top:0;left:0;will-change:transform,filter}
  #plxlayers .plxlayer img{position:absolute;top:0}
  #plxlayersfront{position:absolute;left:0;top:0;overflow:visible;opacity:0;pointer-events:none;z-index:6;transition:opacity .5s ease}
  #plxstage.layers #plxlayersfront{opacity:1}
  #plxlayersfront .plxlayer{position:absolute;top:0;left:0;will-change:transform,filter}
  #plxlayersfront .plxlayer img{position:absolute;top:0}
  #plxlayerpanel{display:flex;flex-direction:column;gap:2px}
  .plxlrow{display:flex;align-items:center;gap:6px;font-size:10px;line-height:1.35}
  .plxlname{width:88px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.85}
  .plxlbar{position:relative;flex:1;min-width:40px;height:18px;background:rgba(120,120,140,.22);border-radius:4px;cursor:move;touch-action:none}
  .plxlbar::before{content:'';position:absolute;left:0;right:0;top:50%;height:1px;background:rgba(120,120,140,.45)}
  .plxlblue{position:absolute;left:0;top:0;height:100%;background:rgba(59,130,246,.30);border-radius:4px 0 0 4px}
  .plxlorange{position:absolute;top:0;height:100%;background:rgba(249,115,22,.45)}
  .plxltrav{position:absolute;width:10px;height:10px;background:#22c55e;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 1px rgba(0,0,0,.4);pointer-events:none}
  .plxldepth{width:44px;text-align:right;opacity:.7;font-variant-numeric:tabular-nums;white-space:nowrap}
  #plxsign{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:7;opacity:0;transition:opacity var(--sign-dur,.4s) ease;pointer-events:none}
  #plxsign.on{opacity:1}
  #plxsign svg{width:var(--sign-w,48%);height:auto;filter:drop-shadow(0 8px 20px rgba(0,0,0,.35));transform:translate(var(--sign-x,0),var(--sign-y,0)) var(--sign-enter,none);transition:transform var(--sign-dur,.4s) ease}
  #plxsign.tr-fade svg{--sign-enter:none}
  #plxsign.tr-pop svg{--sign-enter:scale(.82)}
  #plxsign.tr-drop svg{--sign-enter:translateY(-6%)}
  #plxsign.on svg{--sign-enter:none}
  #plxscene .plyr{position:absolute;left:0;will-change:transform}
  #plxscene .plyr img{position:absolute;top:0}
  #plxcaption{position:absolute;left:50%;transform:translateX(-50%);width:var(--cap-w,90%);z-index:12;pointer-events:none;display:flex;flex-wrap:wrap;justify-content:center;align-content:center;row-gap:var(--ply-line,.12em);column-gap:var(--ply-word,.28em);text-align:center;top:var(--cap-top,4%);transition:opacity var(--cap-fade,.6s) ease}
  #plxcaption .plcw{font-size:calc(clamp(20px,4.2cqmin,44px) * var(--text-scale,1) * var(--cap-scale,1));font-weight:var(--ply-weight,600);letter-spacing:var(--ply-letter,0em);color:#15161a;background:rgba(255,255,255,.72);padding:.02em .22em;border-radius:.35em;transition:background .12s,color .12s}
  #plxcaption .plcw.hl{background:var(--ply-hl,#ffd23f);color:#1a1200}
  /* one-box caption: single rounded box behind the whole phrase; words plain, active word highlighted inside */
  #plxcaption.boxed{width:var(--cap-w,86%);max-width:100%;box-sizing:border-box;background:rgba(255,255,255,var(--cap-bg-a,.82));border-radius:var(--cap-radius,20px);padding:var(--cap-pady,.30em) .70em;box-shadow:0 6px 26px rgba(0,0,0,.20)}
  #plxcaption.boxed .plcw{background:transparent;box-shadow:none;padding:.02em .14em}
  #plxcaption.boxed .plcw.hl{background:var(--ply-hl,#ffd23f);color:#1a1200}
  #plxrig{position:absolute;inset:0;z-index:5;will-change:transform;pointer-events:none;visibility:hidden;opacity:0}
  body.head-parallax.plxplaying #plxrig,body.head-parallax.plxexiting #plxrig,body.head-parallax.plxpreview #plxrig{visibility:visible;opacity:1}
  #plxsprite{position:absolute;left:0;top:0;z-index:6;transform-origin:50% 100%;will-change:transform;pointer-events:none;display:none}
  body.head-parallax #plxsprite.on{display:block}
  #plxspriteimg{background-repeat:no-repeat}
  #plxflyer{will-change:transform}
  body:not(.plxplaying):not(.plxexiting) #plxspriteimg,body:not(.plxplaying):not(.plxexiting) #plxspriteshadow{animation-play-state:paused!important}
  #plxsprite.mode-sheet #plxspriteimg{animation:plxflap var(--plx-flapdur,.7s) steps(var(--plx-frames,8)) infinite, plxbob 2.6s ease-in-out infinite}
  #plxsprite.mode-wiggle #plxspriteimg{animation:plxwiggle var(--plx-flapdur,.7s) ease-in-out infinite;transform-origin:50% 90%}
  #plxsprite.mode-fig8 #plxspriteimg{animation:plxfig8 calc(var(--plx-flapdur,.7s)*2.4) ease-in-out infinite}
  #plxsprite.mode-chug #plxspriteimg{animation:plxflap var(--plx-flapdur,.7s) steps(var(--plx-frames,8)) infinite, plxpush var(--plx-flapdur,.7s) ease-in-out infinite}
  @keyframes plxpush{0%,100%{transform:translateX(-0.15%)}50%{transform:translateX(0.15%)}}
  @keyframes plxwiggle{0%,100%{transform:rotate(-3.5deg)}50%{transform:rotate(3.5deg)}}
  @keyframes plxfig8{0%{transform:translate(0,0) rotate(0)}25%{transform:translate(12%,-9%) rotate(5deg)}50%{transform:translate(0,-2%) rotate(0)}75%{transform:translate(-12%,-9%) rotate(-5deg)}100%{transform:translate(0,0) rotate(0)}}
  @keyframes plxflap{from{background-position-x:0}to{background-position-x:var(--plx-stripneg,-1000px)}}
  @keyframes plxbob{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
  #plxspriteshadow{position:absolute;left:0;top:0;z-index:5;pointer-events:none;background-repeat:no-repeat;display:none}
  body.head-parallax #plxspriteshadow.on{display:block}
  @media (prefers-reduced-motion:reduce){#plxspriteimg{animation:none!important}}
  #plxcaption .plcbrk{flex-basis:100%;height:0}
  #plxcaption .plctitle{flex-basis:100%;text-align:center;font-weight:700;color:#15161a;font-size:calc(clamp(24px,5.2cqmin,52px) * var(--text-scale,1) * var(--title-scale,1.2) * var(--cap-scale,1));transform:translateY(var(--title-y,0));margin-bottom:.12em;text-shadow:0 1px 0 rgba(255,255,255,.6)}
  body.head-parallax .scene-na{display:none!important}
  .scene-only{display:none!important}
  body.head-parallax .scene-only{display:inline-flex!important}
  body.head-parallax details.scene-only{display:block!important}
  @media (prefers-reduced-motion:reduce){#plxcaption .plcw{transition:none}}
  /* 2026-07-12 fixed-geography control surface. Existing IDs remain the config contract. */
  .programhud{position:absolute;left:10px;top:10px;z-index:30;display:flex;align-items:center;gap:6px;background:rgba(16,17,20,.88);color:#eee;padding:5px 7px;border:1px solid rgba(255,255,255,.18);font:600 10px system-ui,sans-serif;letter-spacing:.05em}
  .programhud b{background:#c62828;padding:3px 6px;color:#fff}.programhud button{border:1px solid #565862;background:#27282c;color:#ddd;padding:3px 7px;cursor:pointer;font:inherit}.programhud button.on{background:#2f6fb0;color:#fff}
  body.mode-stage .programhud,body.mode-controls .programhud{display:none}
  .console{background:#151619;gap:7px}
  /* padding-left/right 2px→8px (v1.43 paper-cut) — every other bar in the console (.loadbar, .tbar,
     .moderow, .timelinebus, .sbar) insets its content 8-12px from the console edge; .appbar alone
     sat at 2px, so the app-switch pills hugged the left edge a visible few pixels out of line with
     every bar stacked below it. */
  .appbar{margin:0;padding:0 8px 8px}.loadbar{background:#1e2024;border:1px solid #383b42;padding:8px;margin:0}.loadbar::before{content:'SOURCE';color:#737780;font-size:10px;font-weight:800}
  /* position:sticky;top:0 retired (v1.43, mode-bus reorder) — it assumed .moderow was the FIRST bar
     in the console's scroll list, pinning it visibly at top while everything else scrolled beneath.
     The owner's hierarchy ruling (Song > Arrangement > Section > Parts > screen type > controls)
     moved it below #partsbus, no longer first; left sticky, it would snap to the console's top edge
     once scrolled past and paint OVER teacherbus/FORM-TIMELINE/PARTS, which sit earlier in DOM but
     visually above it once pinned — exactly the kind of position-order assumption this reorder had
     to catch. Now an ordinary in-flow bar, matching .timelinebus/.teacherbus around it. */
  .moderow{background:#1a1b1f;border:1px solid #41444b;padding:8px;margin:0}.moderow .modelbl::after{content:' BUS'}
  .moderow button{min-width:100px;font-weight:800;letter-spacing:.04em}.moderow button.on{box-shadow:inset 0 -3px #fff,0 0 12px rgba(234,122,23,.24)}
  .tbar{justify-content:flex-start;border-radius:2px;background:#1d1f23;border-color:#3b3e45}.tbar::before{content:'TRANSPORT / INTENT';font-size:9px;color:#8b8f99;font-weight:800;align-self:flex-start}
  /* max-width:1500px removed (v1.43) — at wide viewports (~2000px) the cap left ~240px of dead
     margin on each side of the rack while .panel.scene (minmax(520px,1fr)) had room to use it. The
     grid's own column tracks (210px presets, auto mixer, 1fr scene) already give deliberate,
     bounded flexing without an outer straitjacket; width:100% now fills whatever the console offers. */
  .rack{display:grid;grid-template-columns:minmax(520px,1fr) auto;width:100%;align-items:start;gap:8px}.panel{border-radius:3px;background:#202126;border-color:#3b3e45}
  /* align-items:start (v1.43) — a CSS Grid row stretches every item in it to the tallest by default.
     Layout and Lyric type sit side by side; in Melodic mode Layout's rhythm-only rows collapse to
     almost nothing while Lyric type stays full, and the default stretch inflated Layout's box to
     match anyway — a header followed by a wall of dead whitespace. align-items:start lets each
     section size to its own content instead of its tallest sibling. */
  .panel.scene{width:auto;max-width:none;min-height:370px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;align-items:start;gap:7px}.panel.scene>.phead{grid-column:1/-1}.panel.scene>.row,.panel.scene>details{border:1px solid #34363c;background:#1b1c20;padding:8px;margin:0;min-height:43px}.panel.scene>details.scene-only{grid-column:1/-1}.panel.scene>details[open]>summary{border-bottom:1px solid #34363c;padding-bottom:6px;margin-bottom:6px}
  /* A .row that is structurally composed ONLY of .rhythm-only (or .melodic-only) children has
     nothing left to show once that utility class hides them — the row itself was still rendering
     as an empty box (an 8px-margin sliver of dead space; the Layout "↕/↔" row in Melodic mode is the
     concrete case). Collapse it in lockstep with the SAME condition that already hides its content,
     so this can never fire while the row has real visible content. */
  body.bus-melodic .panel.scene .row:has(>.rhythm-only):not(:has(>:not(.rhythm-only))){display:none}
  body:not(.bus-melodic) .panel.scene .row:has(>.melodic-only):not(:has(>:not(.melodic-only))){display:none}
  #movementlyrics{display:none}
  body.movement-mode #movementlyrics{display:inline-flex}
  body.movement-mode #movementAudioPanel{grid-column:1/-1;align-items:flex-start;min-width:0}
  .movement-type-control{display:none!important}
  body.movement-mode .movement-type-control{display:inline-flex!important}
  .movement-label-typography{display:none}
  body.movement-mode .movement-label-typography{display:block}
  body.movement-mode .generic-text-scale{display:none!important}
  .movement-panel-grid{display:grid;grid-template-columns:minmax(155px,.3fr) minmax(420px,1fr);gap:8px 12px;align-items:start;flex:1;min-width:0}
  .movement-source-field{white-space:nowrap}
  #movementMapRoutes{display:grid;grid-template-columns:repeat(2,minmax(250px,1fr));gap:7px;align-items:start;min-width:0}
  .movement-cue-route{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:5px;align-items:center;padding:7px;border:1px solid rgba(255,255,255,.14);border-radius:6px;min-width:0}
  .movement-cue-route input[type="range"]{width:100%;min-width:0}
  #movementAudioRoutes{display:grid;grid-template-columns:auto minmax(190px,1fr) auto auto;gap:5px;align-items:center;min-width:0}
  .mixer-panel .phead::after{content:' / TEACHER SENDS'}
  /* overflow-x only (v1.43) — vertical scroll was never needed here and blocked the vertical faders'
     own travel from ever feeling like part of the panel. With the .vfader width fix above, the
     ordinary 3-4 strip case now fits inside max-width:320px without scrolling at all; a thin,
     unobtrusive scrollbar remains for the rarer 5+ stem case. */
  .mixer-panel{max-width:390px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#423e74 transparent}
  .mixer-panel::-webkit-scrollbar{height:7px}.mixer-panel::-webkit-scrollbar-track{background:transparent}.mixer-panel::-webkit-scrollbar-thumb{background:#423e74;border-radius:4px}.mixer-panel::-webkit-scrollbar-thumb:hover{background:#5b56a0}
  .strip{border-radius:2px;background:#1b1c20;border-color:#41444b}.strip .tchsend{width:auto;height:22px;padding:0 5px;color:#d99a3b;border-color:#735523}.strip .tchsend.on{background:#d99a3b;color:#17120a;border-color:#d99a3b}
  .teacherbus{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,.45fr);gap:8px;border:1px solid #554526;background:#211e17;padding:8px}.teacherbus-head{display:flex;align-items:center;gap:8px;grid-column:1/-1;color:#d7a44b;font:800 10px system-ui,sans-serif;letter-spacing:.08em}.teacherbus-head button{margin-left:auto}.teacher-sends{display:flex;gap:5px;flex-wrap:wrap}.teacher-send{display:flex;gap:5px;align-items:center;background:#171719;border:1px solid #4b4335;padding:5px 7px;color:#b8b2a7;font-size:11px;cursor:pointer}.teacher-send input{accent-color:#d99a3b}.teacher-send.on{border-color:#d99a3b;color:#fff}.teacherpreview{display:none;background:#f5f6f7;color:#17181a;border:1px solid #c9cdd2;padding:8px;min-height:42px}.teacherpreview.on{display:block}.teacherpreview strong{display:block;font-size:10px;color:#59616a;margin-bottom:5px}.teacherpreview span{display:inline-block;background:#fff;border:1px solid #c9cdd2;padding:4px 6px;margin:2px;font-size:10px}.teacherpreview .mix{border-color:#d99a3b}
  /* flex-shrink:0 — v1.43 fix. .timelinebus is a .console flex-column child; .console's default
     flex-shrink:1 was squeezing this bar back down to its min-height:44px floor whenever a wrapped
     second line (e.g. #partsbus > #mppartrows, flex-basis:100%) pushed its natural content taller
     than 44px — the min-height stopped being a floor and became the actual collapsed height, so the
     wrapped row rendered past the bar's own bottom edge and under whatever sat next in the console.
     Matches the same reasoning already applied to .rack ("natural height → console scrolls instead
     of squishing"). gap/padding normalized to 8px to match .moderow immediately above it. */
  .timelinebus{display:flex;align-items:center;gap:8px;min-height:44px;flex-shrink:0;border:1px solid #3b3e45;background:#1b1c20;padding:8px}.timelinebus>strong{color:#8b8f99;font-size:9px;letter-spacing:.08em}.timelinebus #sectiontimeline{flex:1;min-width:0}.timelinebus .gbar{margin:0;width:100%;display:flex;gap:6px;align-items:stretch;overflow-x:auto}.timelinebus .sec{display:flex;flex-direction:column;align-items:flex-start;min-width:72px;padding:5px 9px;border:1px solid #4b4f59;background:#26282e;color:#d8d9dd;border-radius:5px}.timelinebus .sec span{font-weight:700}.timelinebus .sec small{font-size:8px;letter-spacing:.08em;color:#8d929d}.timelinebus .sec.on{border-color:#8c80ff;box-shadow:inset 0 0 0 1px #8c80ff}.timelinebus .sec.program{background:#263a2c;border-color:#54c759}.timelinebus .sec.review{border-color:#e0a64b}.timelinebus .sec.review small{color:#f0bd6b}.timelinebus .sec.orphan{opacity:.65;border-style:dashed}.timeline-reserve{margin-left:auto;color:#8b8f99;font-size:9px;white-space:nowrap}.transport-nav{padding-left:4px;border-left:1px solid #3c3f46}.transport-nav button{white-space:nowrap}.transport-nav #transportpos{min-width:92px;color:#d2d5db}
  .timelinebus .sec.on small{color:#2c313c}
  .treatment-ghost{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;z-index:40!important;pointer-events:none!important;opacity:1;transition:opacity .25s ease}.treatment-ghost.out{opacity:0}
  @media (prefers-reduced-motion:reduce){.treatment-ghost{display:none!important}}
  #plxstage.asset-fallback::after{content:attr(data-asset-error);position:absolute;left:50%;top:50%;z-index:35;transform:translate(-50%,-50%);padding:18px 24px;border-radius:14px;background:rgba(31,41,55,.88);color:#fff;font:700 20px/1.25 var(--student-font);text-align:center;box-shadow:0 8px 30px rgba(0,0,0,.28)}
  .stage.author-preview::after{content:'';position:absolute;inset:4%;z-index:25;pointer-events:none;border:1px dashed rgba(255,255,255,.65);background:linear-gradient(90deg,transparent 49.9%,rgba(255,255,255,.18) 50%,transparent 50.1%),linear-gradient(transparent 49.9%,rgba(255,255,255,.18) 50%,transparent 50.1%)}
  .sbar{position:sticky;bottom:0;z-index:25;justify-content:flex-end;border-radius:2px;background:#1d1f23;border-color:#4b4e55}.sbar::before{content:'OUTPUT';color:#8b8f99;font-size:9px;font-weight:800;margin-right:auto}
  /* Keep the final authoring rows physically scrollable above the sticky Output bar. Without this
     clearance, Puppet Size and the lowest melodic controls can render underneath the bar at the
     console's maximum scroll position: visually present, but pointer-blocked. */
  .console>.rack{padding-bottom:72px}
  .nondefault{box-shadow:0 0 0 1px #d99a3b!important}
  @media(max-width:1100px){.movement-panel-grid{grid-template-columns:1fr}#movementMapRoutes{grid-template-columns:1fr}.movement-sounds-label{margin-top:4px}}
  @media(max-width:920px){.rack{grid-template-columns:minmax(440px,1fr)}.mixer-panel{grid-column:1/-1;max-width:none}.teacherbus{grid-template-columns:1fr}.teacherbus-head{grid-column:1}.panel.scene{grid-template-columns:1fr}.programhud{display:none}.template-workspace{grid-template-columns:220px minmax(0,1fr)}}
  @media(max-width:600px){.screen{flex-basis:38vh}.console{padding:6px}.rack{grid-template-columns:minmax(0,1fr)}.panel.scene,.mixer-panel{grid-column:1;max-width:none;width:100%}.preset-list{display:grid;grid-template-columns:1fr 1fr;max-height:150px}.moderow{overflow-x:auto}.moderow button{min-width:82px}.moderow .template-open{margin-left:0}.template-modal{padding:8px}.template-workspace{grid-template-columns:1fr}.template-preview{min-height:260px}.loadbar label,.screen-recall{width:100%;justify-content:space-between}.screen-recall{padding:6px 0 0;border-left:0;border-top:1px solid #3a3668}.loadbar select{max-width:68%;min-width:0}.teacherbus-head{flex-wrap:wrap}.teacherbus-head button{margin-left:0}.sbar{justify-content:flex-start}.sbar::before{width:100%;margin:0}.console input[type=text]{max-width:100%}.tbar{gap:8px}.panel.scene>.row{overflow-x:auto}.strips{overflow-x:auto}}

  /* ==================== NOTE SUPERHERO MODE (v1.19) ==================== */
  /* Hero rides ON the portal: absolutely positioned over the card art, feet at the portal's lower
     third. pointer-events:none so card taps keep hitting the card. z-index below .cardghost (6). */
  .card .hero-art{position:absolute;left:0;right:0;margin:0 auto;bottom:22%;width:62%;height:64%;
    display:flex;align-items:flex-end;justify-content:center;pointer-events:none;z-index:4}
  .card .hero-art img.hero{max-width:100%;max-height:100%;display:block;
    filter:drop-shadow(0 1cqmin 2cqmin rgba(0,0,0,.35))}
  /* superhero console row: cascade controls only surface while the mode is on */
  .nshero-only{display:none}
  body.ns-superhero .nshero-only{display:inline-flex;align-items:center;gap:4px}
  #nshero-toggle.on{background:var(--accent);color:#fff}
  /* superhero measure lines: a bar centered in the grid gap at TRUE metrical boundaries (cqw = card width units) */
  .card.measure-end::after{content:'';position:absolute;top:8%;bottom:8%;right:-3.6cqw;width:2.1cqw;
    background:var(--ink);border-radius:1cqw;pointer-events:none;z-index:5}
  /* "say the notes" register band: rides revealed glyph cards in the selected student face, ink-on-white ≥4.5:1 */
  .card .rsyl{position:absolute;left:0;right:0;top:5%;z-index:3;text-align:center;
    font-family:var(--student-font);font-weight:600;color:var(--ink);
    font-size:calc(9cqmin * var(--text-scale,1));pointer-events:none}
  /* echo (call & response) cue chip — teacher/kid-visible pass indicator, selected student face, ≥4.5:1 on both states */
  .echo-cue{position:absolute;top:2.5%;right:2.5%;z-index:7;padding:1.2cqmin 3cqmin;border-radius:5cqmin;
    background:#15161a;color:#fff;font-family:var(--student-font);font-weight:600;
    font-size:3.6cqmin;pointer-events:none;box-shadow:0 .5cqmin 1.5cqmin rgba(0,0,0,.25)}
  .echo-cue.response{background:#ea7a17;color:#15161a}

  /* ==================== SUPERHEROES HEAD (dedicated training screen; 2026-07-25 pivot) ==================== */
  /* PPT-verified scale: characters ~35–46% of stage height, ONE row across the middle, no card boxes.
     Sky gradient placeholder until Notetropolis art lands. Slots center via margins, never translateX,
     so entry keyframes compose from identity (the landing cannot nudge sideways). */
  #herostage{display:none}
  body.head-heroes #grid,body.head-heroes #staff{display:none!important}
  body.head-heroes #herostage{position:absolute;inset:0;display:block;overflow:hidden;
    background:linear-gradient(#bfe3ff 0%,#e8f5ff 62%,#cfeccf 100%)}
  .hsequence{position:absolute;inset:0;z-index:1;overflow:hidden}
  .hpanel{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:2cqmin;padding:0 4cqmin;
    transition:transform var(--hero-page-ms,320ms) cubic-bezier(.4,0,.2,1),opacity var(--hero-page-ms,320ms) ease}
  #herostage.hero-all-beats .hpanel{gap:.7cqmin;padding-left:3cqmin;padding-right:3cqmin}
  #herostage.hero-all-beats .hslot{max-width:none}
  #herostage.hero-repeat .hpanel{padding-right:12cqmin}
  #herostage.hero-panel-snap .hpanel,#herostage.hero-panel-snap .hscene{transition:none!important}
  .hslot{position:relative;flex:1 1 0;max-width:24%;height:72%;pointer-events:none;overflow:visible}
  .hportal-frame,.hhero-frame{position:absolute;inset:0;overflow:visible;transform:translate(var(--item-x,0%),var(--item-y,0%)) scale(var(--item-scale,1));transform-origin:center}
  .hportal{position:absolute;left:0;right:0;margin:0 auto;bottom:6%;width:min(100%,46cqmin);aspect-ratio:1;
    display:flex;align-items:center;justify-content:center;transition:opacity .2s}
  .hportal img{width:100%;height:100%;object-fit:contain}
  .hportal.gone{opacity:0;visibility:hidden}
  .hhero{position:absolute;left:0;right:0;margin:0 auto;bottom:10%;height:var(--hero-h,55%);width:100%;
    display:flex;align-items:flex-end;justify-content:center;visibility:hidden}
  /* EQUAL HEIGHTS (Landon 2026-07-25). Sizing by max-width/max-height let each character be bound by a
     different axis: Titan's art is portrait (709×939) so it filled the box height, while the TaDi
     Twins' is landscape (900×731) and hit the WIDTH limit first — rendering visibly shorter. Musically
     they must match: a quarter and a beamed eighth-pair carry the same stem height. So height is the
     single controlling axis for both and width follows; TaDi is simply the wider glyph, and is allowed
     to breathe past the slot edge rather than being shrunk to fit it. */
  .hhero img{height:100%;width:auto;max-width:none;max-height:none;
    filter:drop-shadow(0 1.2cqmin 2.4cqmin rgba(0,0,0,.35))}
  .hslot[data-mode="hero"] .hhero,.hslot[data-mode="glyph"] .hhero{visibility:visible}
  .hslot.hlit .hhero img{filter:drop-shadow(0 0 2.4cqmin rgba(226,35,26,.8)) drop-shadow(0 1.2cqmin 2.4cqmin rgba(0,0,0,.3))}
  .hslot.hlit .hportal img{filter:brightness(1.25)}
  /* Portal-counting view: the same metrical boundary remains visible before the heroes become notes.
     It sits in the flex gap, never steals beat width, and yields to the engraved barline in glyph mode. */
  .hslot.hero-measure-end::after{content:'';position:absolute;right:-1cqmin;top:var(--hero-bar-top,25%);height:var(--hero-bar-h,50%);width:var(--hero-bar-w,.34cqmin);
    min-width:3px;background:#15161a;border-radius:.2cqmin;box-shadow:0 0 .85cqmin rgba(255,220,92,.78);z-index:6}
  #herostage.hero-all-beats .hslot.hero-measure-end::after{right:-.5cqmin}
  #herostage.hero-glyphs .hslot.hero-measure-end::after{display:none}
  /* heroes bus: the panel shows only the heroes rows */
  .heroes-row{display:none!important}
  body.bus-heroes .panel.scene>.row{display:none!important}
  body.bus-heroes .panel.scene>details{display:none!important}
  body.bus-heroes .panel.scene>.row.heroes-row{display:flex!important;align-items:center;gap:8px}
  body.bus-heroes .panel.scene>.row.nshero-panel-b-row{display:none!important}
  body.bus-heroes.nshero-continue .panel.scene>.row.nshero-panel-b-row{display:flex!important}
  #nshero-play.on{background:var(--accent);color:#fff}
  .hrepeat{position:absolute;right:2.5%;top:31%;z-index:4;width:auto;height:38%;object-fit:contain;
    filter:drop-shadow(0 0 1.2cqmin rgba(255,220,92,.72));pointer-events:none}
  .hmetercue{position:absolute;left:2.1%;top:34%;z-index:5;display:flex;flex-direction:column;align-items:center;
    color:#15161a;font-family:BravuraNS,serif;font-weight:700;font-size:6.2cqmin;line-height:.72;pointer-events:none}
  .hmetercue.illuminated,.hstave .htimesig.illuminated{filter:drop-shadow(0 0 .65cqmin rgba(255,220,92,.98)) drop-shadow(0 0 1.35cqmin rgba(255,184,36,.84))}
  .hstave .hmeterhalo{fill:#ffe06a;fill-opacity:.72;stroke:#d99d00;stroke-width:.12}
  #herostage.hero-glyphs .hmetercue{display:none}
  #herostage.hero-panel-turn .hrepeat{animation:nsHeroRepeatCue var(--hero-page-ms,320ms) ease-out both}
  @keyframes nsHeroRepeatCue{0%{transform:scale(.9);opacity:.68}45%{transform:scale(1.08);opacity:1}100%{transform:scale(1);opacity:.82}}

  /* portal ambience (2026-07-25, Landon's AE recipe): NOT an object — a portal bending space.
     TWO semi-transparent layers of the same energy ring: the base, plus a smaller copy in front
     spinning faster; both softly blurred, so the overlap swirls. The IMGs spin while the .hportal
     wrapper owns the exit explosion — separate elements, the transforms never fight. Constant blur +
     transform-only rotation stays compositor-cheap. Tunables for the live demo: */
  #herostage{--portal-spin:2s;--portal-spin-front:1.2s;--portal-blur:0.3cqmin;--portal-alpha:.4;--portal-alpha-front:.5}
  /* each layer is a slightly ECCENTRIC ellipse (rotate-then-scale: the squash axes ride the rotated
     frame), so with the baked halo cut from the asset the glow visibly TUMBLES — the composite
     outline wanders instead of sitting in a too-symmetrical circle. Opposite squashes per layer. */
  .hportal img{position:absolute;inset:0;margin:auto;width:100%;height:100%;object-fit:contain;
    animation:nsPortalTumbleA var(--portal-spin) linear infinite;filter:blur(var(--portal-blur));opacity:var(--portal-alpha)}
  .hportal img.pfront{width:64%;height:64%;animation-name:nsPortalTumbleB;animation-duration:var(--portal-spin-front);opacity:var(--portal-alpha-front)}
  @keyframes nsPortalTumbleA{from{transform:rotate(0deg) scale(1.07,.94)}to{transform:rotate(360deg) scale(1.07,.94)}}
  @keyframes nsPortalTumbleB{from{transform:rotate(0deg) scale(.95,1.06)}to{transform:rotate(360deg) scale(.95,1.06)}}
  @media (prefers-reduced-motion: reduce){
    .hportal img{animation:none;filter:none}
    .hpanel{transform:none!important;transition:opacity 120ms linear}
    .hpanel[aria-hidden="true"]{opacity:0!important}
    .hpanel[aria-hidden="false"]{opacity:1!important}
    #herostage.hero-panel-turn .hrepeat{animation:none}
  }

  /* Notetropolis scene plate: the episode composites portals over a BLURRED street with real depth of
     field — the blur is what keeps the characters readable, so it is treatment, not decoration.
     Slight desaturate + lift keeps the pink energy dominant against the city. */
  #herostage{--scene-blur:1.6cqmin;--scene-dim:.82}
  .hscene{position:absolute;inset:0;background-size:cover;background-position:center 62%;
    filter:blur(var(--scene-blur)) saturate(.88) brightness(var(--scene-dim));
    transform:translate(var(--hero-scene-x,0%),var(--hero-scene-y,0%)) scale(var(--hero-scene-scale,1.02));transition:transform var(--hero-page-ms,320ms) ease,filter 240ms ease;pointer-events:none;z-index:0}
  #herostage.hero-has-landed .hscene{filter:blur(calc(var(--scene-blur) + .28cqmin)) saturate(.88) brightness(var(--scene-dim))}
  #herostage.hero-sequenced .hscene{inset:-3% -7%}
  /* Parallax scenes defocus PER PLANE (JS sets each plane's blur from depth + focal plane), so the
     group must not carry a blur of its own or the near plane can never be sharp. */
  .hscene.plx{filter:saturate(.88) brightness(var(--scene-dim))}
  #herostage.hero-has-landed .hscene.plx{filter:blur(.28cqmin) saturate(.88) brightness(var(--scene-dim))}
  #herostage.has-scene{background:#0f1116}
  .hslot{z-index:1}

  /* Tunnel depth, measured off the episode (frame @210s, radial luma profile across the diameter):
     bright RIM (r≈.75–.95) → dark ANNULUS (r≈.25–.55, luma drops ~40%) → bright CORE (r≈±.15).
     The AE ring art alone reads as a flat glowing disc; this darkened mid-ring is what makes it a
     hole in space rather than a ball of light. Rides the .hportal wrapper so it scales with the
     exit explosion, and sits under the heroes (z-index below .hhero). */
  .hportal::after{content:'';position:absolute;inset:0;border-radius:50%;pointer-events:none;
    background:radial-gradient(circle closest-side,
      rgba(26,0,10,0) 0%, rgba(26,0,10,0) 16%,
      rgba(26,0,10,.50) 36%, rgba(26,0,10,.42) 54%,
      rgba(26,0,10,0) 74%, rgba(26,0,10,0) 100%)}

  /* Real AE portal (alpha WebM). It already carries glow, swirl, tunnel and its own float, so when it
     plays we suppress the CSS ring rig, the tumble gradient and the spin — otherwise every treatment
     lands twice. `.vid` is added only after the first frame decodes, so a browser without VP9-alpha
     keeps the CSS rings rather than showing a black square. */
  .hportal .pvid{position:absolute;inset:0;margin:auto;width:100%;height:100%;object-fit:contain;display:none}
  .hportal.vid .pvid{display:block}
  .hportal.vid .pback,.hportal.vid .pfront{display:none}
  .hportal.vid::after{display:none}

  /* Landon 2026-07-25: portals a little bigger + more transparent. The video carries its own glow, so
     transparency here reads as "energy you can see through" rather than a washed-out sticker. */
  #herostage{--portal-size:56cqmin;--portal-vid-alpha:.72;--hero-h:55%}
  .hportal{width:min(var(--portal-fill,140%),var(--portal-size))}
  /* "a little bigger, almost overlapping" (Landon 2026-07-25). Measured off the shipped video: the
     substantive ring (alpha>50%) is 73% of the frame and the faint glow reaches 92%, so the BOX has to
     run well past the slot for the rings to nearly touch. At 4-up this lands the rings ~10px apart
     with the glows blending; the min() keeps dense patterns in check — at 8-up the % cap binds and
     everything scales down together. */
  .hportal.vid .pvid{opacity:var(--portal-vid-alpha)}

  /* Parallax scene: the three Illustrator planes stacked pixel-registered. Depth comes from different
     SWAY amplitudes rather than scroll — sky nearly still, near city most — so no plane ever has to
     tile, and a slight overscale keeps the edges covered at full swing. Transform-only, compositor
     cheap. Reduced motion stops the drift and leaves the composed still, which is the whole picture. */
  /* THE SWAY IS NOT A CSS ANIMATION ANY MORE (2026-07-26 — Landon: "the background is the one
     jumping"). It used to be:
         @keyframes nsPlxSway{ 0%,100%{ transform:scale(var(--plx-zoom))
                                        translateX(calc(var(--amp) * var(--plx-depth) * -1%)) } … }
     and Chrome REFUSED TO COMPOSITE it, for two independent reasons: keyframe values that read custom
     properties have to be resolved on the main thread every frame, and a PERCENTAGE translate depends
     on the layout box so it can never go to the compositor either. Proven, not guessed: blocking the
     main thread for 400ms advanced the animation's own clock by 0ms. So the drift was running on the
     main thread, and every style recalc, stave re-render, portal video frame and audio callback
     showed up as a stutter in the background — a general jitter with no single trigger, which is
     exactly what Landon kept seeing.
     plxSway() in the runtime now drives each plane with the Web Animations API using CONCRETE PIXEL
     keyframes and a plain-number scale. Those composite, so the drift runs off the main thread and is
     immune to whatever else the frame is doing. Per-plane --amp (by stacking order, far→near) still
     carries the depth ratio and is read from here, so adding a 4th or 5th plane still needs no new
     code; depth, speed and zoom now live in HERO_FX, which was always their real source of truth.
     Reduced motion leaves the composed still, which is the whole picture. */
  .hscene.plx{background-image:none}
  .hplane{position:absolute;inset:0;background-size:cover;background-position:center 62%;
    will-change:transform}
  .hscene.plx .hplane:nth-child(1){--amp:.15}
  .hscene.plx .hplane:nth-child(2){--amp:.7}
  .hscene.plx .hplane:nth-child(3){--amp:1.4}
  .hscene.plx .hplane:nth-child(4){--amp:2.2}
  .hscene.plx .hplane:nth-child(5){--amp:3.0}

  /* ---- ENGRAVED STAVE (2026-07-26) -------------------------------------------------------------
     ONE stage-wide SVG in staff-space units, exactly like the notation lane's furniture overlay:
     viewBox = the stage measured in sp with preserveAspectRatio="none", so 1 unit = 1 sp on BOTH axes
     and every element — staff line, clef, time signature, noteheads, stems, beams, barlines — is
     engraved in the same coordinate system. The old per-slot .hnote boxes each carried their own
     viewBox, so the furniture could only line up with the notes by coincidence. */
  .hstavewrap{position:absolute;inset:0;pointer-events:none;z-index:2}
  .hstave{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
  /* LEGIBILITY OVER THE PLATE (2026-07-26 — Landon: "where did the noteheads and symbols go?").
     The engraving is `--ink` (#15161a) and the Notetropolis plates are a dark street, so black ink on
     dark brick simply vanished — and once the stave started spanning the full width, the outer beats
     landed on the dark buildings rather than the bright road, which is when it stopped reading at all.
     The ink stays ink: a white halo sits UNDER the glyphs, the standard caption treatment, so the
     notation separates from whatever is behind it without recolouring a single notehead. Two stacked
     shadows — a tight one for the edge, a soft one for the lift. Whiteboard mode already has its card,
     so it drops the halo (below) rather than double-treating. */
  .hstave{filter:drop-shadow(0 0 .5cqmin rgba(255,255,255,.98)) drop-shadow(0 0 1.6cqmin rgba(255,255,255,.75))}
  /* THE ONE CARD. Same language the project already uses for a single framed reading surface —
     `.psbig` behind the melodic one-card staff and `.grid.one-box` behind the beat grid: white, a 3px
     black border, a soft drop shadow. Notation belongs on paper; on paper the halo is redundant, so a
     carded stave drops it. Whiteboard mode has its own full card and hides this one rather than
     stacking two. */
  .hcard{position:absolute;background:#fff;border:3px solid #000;border-radius:2.4cqmin;
    box-shadow:1.2cqmin 1.6cqmin 2.6cqmin rgba(0,0,0,.26);pointer-events:none}
  .hstavewrap.carded .hstave{filter:none}
  #herostage.board .hcard{display:none}
  .hstave .hn{transition:filter .12s}
  .hstave .hn.lit{filter:drop-shadow(0 0 2.2cqmin rgba(226,35,26,.85))}
  /* The stave reserves its own header in sp and draws the clef, the time signature AND the say-the-
     notes syllable line on its own staff — no flex spacer, no slot-mounted caption band. Landon,
     2026-07-26: the heroes do not have to line up with the notes, so the engraving is free to lay
     itself out and the character row keeps its own. */

  /* WHITEBOARD (accessibility): the scene goes dark and a single high-contrast card carries the
     notation, so the rhythm reads as ink-on-white rather than art-over-street. Characters and portals
     are hidden here — this view is for reading, and contrast is the whole point. */
  #herostage.board .hscene{filter:brightness(.18) saturate(.5) blur(1.2cqmin)}
  /* the card must out-rank the scene: .hscene is a real element inserted first, so at equal z-index
     it would paint straight over a ::before card */
  /* bottom clears the syllable line (staff + 2.2 sp ≈ 86% at the default size), or "say the notes"
     hangs off the card */
  #herostage.board::before{content:'';position:absolute;left:2%;right:2%;top:14%;bottom:8%;
    background:#fff;border-radius:2.5cqmin;box-shadow:0 1.5cqmin 4cqmin rgba(0,0,0,.55);z-index:1}
  #herostage.board .hstavewrap{z-index:2}
  #herostage.board .hportal,#herostage.board .hhero{display:none}
  #herostage.board .hstave{--ink:#15161a;filter:none}   /* the card IS the contrast — no halo on top of it */

/* v1.38 — consolidated multipart partwork (runtime v1.84). One structural system serves
   stack/columns/grid; 1sh is written as 1% of the actual projected stage height. */
.mp-regions{display:none;position:absolute;inset:0;z-index:8;box-sizing:border-box;
  /* Owner ruling (2026-08, "every square inch"): 1.9sh read as a chunky gutter once regions are the
     whole stage — measured ~14px of dead blue at 1050px stage height, doubled again visually by each
     region's own drop-shadow (box-shadow below, ~1.7sh blur). 1.0sh keeps a clean seam between
     regions without reading as reserved space; supersedes the prior "keep 1.9" ruling. */
  padding:0;gap:calc(var(--sh,7.2px)*1);
  --mp-ink:#15243a;--mp-hl:var(--hl,#ffd23f);--mp-lit:#e2231a;
  --id0:#d9ebfb;--id1:#ffe4d2;--id2:#dcf2dc;--id3:#eae4f8;
  --chip0:#1d4f7c;--chip1:#9c4514;--chip2:#1f6b33;--chip3:#5b3fa3}
body.mp-regions-on .mp-regions{display:grid;visibility:visible}
body.mp-regions-on .stagebody>.grid,
body.mp-regions-on .stagebody>.split-lyrics,
body.mp-regions-on .stagebody>.staff-host{visibility:hidden}
.mp-region.mp-full-instance{display:block;padding:0;background:transparent}
.mp-region.mp-full-instance>.mp-surface{display:block;width:100%;height:100%;border:0;background:transparent}
body.ns-region-instance{background:transparent}
body.ns-region-instance>.cuecard,
body.ns-region-instance>.programhud,
body.ns-region-instance>header,
body.ns-region-instance>.divider,
body.ns-region-instance>.console{display:none!important}
body.ns-region-instance>main.screen{position:absolute;inset:0;width:100%;height:100%;padding:0;background:transparent;opacity:0}
body.ns-region-instance.ns-region-instance-ready>main.screen{opacity:1}
/* The master keeps its 16:9 composition. Only a literal child renderer fills the dimensions its
   Columns/Stack/Grid placement assigned; the child must not nest another 16:9 letterbox. */
body.ns-region-instance>main.screen.locked>.stage{width:100%!important;height:100%!important;flex:1 1 auto!important}
/* The master owns the one continuous projected background. A child stage must not restart the
   gradient inside a square iframe and reveal its region boundary behind rounded/smaller cards. */
body.ns-region-instance>main.screen>.stage{background:transparent}
.mp-regions[data-mode="stack"]{grid-template-columns:1fr;grid-template-rows:repeat(var(--mp-count),minmax(0,1fr))}
.mp-regions[data-mode="columns"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:1fr}
.mp-regions[data-mode="grid"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
.mp-regions[data-mode="lowerthird"]{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,2fr) minmax(0,1fr)}
.mp-regions[data-mode="lowerthird"]>.mp-region:nth-child(3){grid-column:1/-1}
/* A region is only a placement boundary. Its iframe contains the ordinary full playback surface;
   the boundary must never paint a full-region card/shadow around a smaller authored card. */
.mp-region{position:relative;container-type:size;min-width:0;min-height:0;display:grid;
  grid-template-rows:minmax(0,1fr);overflow:hidden;color:var(--mp-ink);
  background:transparent;border:0;border-radius:0;box-shadow:none}
/* Role/resting remains composition-owned: fade the complete ordinary child surface as one unit.
   The placement region itself stays transparent and never grows a replacement card or shadow. */
.mp-region.mp-full-instance>.mp-surface{opacity:1;transition:opacity .18s ease-out}
.mp-region.mp-full-instance.is-resting>.mp-surface{opacity:.28}
@media (prefers-reduced-motion:reduce){.mp-region.mp-full-instance>.mp-surface{transition:none}}
.mp-error{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:0;padding:3cqmin;
  border:4px solid #b42318;border-radius:2cqmin;background:#fff0ed;color:#8b1d14;text-align:center;
  font:700 clamp(18px,4cqmin,44px) var(--student-font)}
/* v1.43 — part rows read as structured entries of the PARTS bar rather than a floating
   "source [select]" cluster: fixed row height, an 8-column grid so every row's source / role /
   treatment / edit / label / group / scale / remove lands in the same place as its neighbors, and
   background+border pulled from the same dark-chrome family as .timelinebus internals (.sec uses
   #26282e on #4b4f59) instead of the old, unrelated blue (#17283b/#40556e). Column order matches
   mpRenderRows()'s fixed emission order exactly. */
.mp-part-rows{display:flex;flex-direction:column;gap:6px;width:100%}
.mp-part-row{display:grid;grid-template-columns:minmax(140px,1.05fr) 88px 78px 112px minmax(140px,1.05fr) minmax(108px,.78fr) 132px 64px;align-items:center;column-gap:10px;min-height:38px;padding:6px 10px;border:1px solid #41444b;border-radius:6px;background:#26282e}
.mp-part-row label{display:flex;align-items:center;gap:5px;font-size:11px;color:#c7cad2;min-width:0;white-space:nowrap}
.mp-part-row label>select,.mp-part-row label>input{flex:1 1 auto;min-width:0}
.mp-part-row input[type="text"]{width:100%}
.mp-part-row input[type="range"]{width:100%}
/* Ruling C — role became a "rest fade" checkbox (checked <=> role present); the checkbox must not
   inherit the generic flex:1 1 auto stretch meant for text/select/range controls in this row. */
.mp-role-check>input[type="checkbox"]{flex:0 0 auto;width:auto}
.mp-part-row button{padding:5px 7px;font-size:11px;white-space:nowrap}
.mp-part-row .mp-staff-lines[hidden]{display:none}
.mp-treatment-summary{padding:5px 8px;border-radius:999px;background:#33343b;border:1px solid #45474e;color:#d8d9dd;font-size:11px;font-weight:700;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-part-edit-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:7px 0;padding:10px 12px;border:2px solid #68a9dc;border-radius:10px;background:#102f4a;color:#eaf5ff;font-size:12px}
.mp-part-edit-bar[hidden]{display:none}.mp-part-edit-bar span{flex:1 1 280px}.mp-part-edit-bar button{background:#ffd23f;color:#17283b;border-color:#ffd23f;font-weight:800}
.mixer-scope{margin-left:.5em;color:#b9c1cb;font-size:10px;font-weight:600;text-transform:none;letter-spacing:0}
body.mp-part-editing #head-scene,body.mp-part-editing #head-heroes,body.mp-part-editing #persection{opacity:.42;cursor:not-allowed}
body.mp-regions-on #words,body.mp-regions-on [data-beats],body.mp-regions-on #bus-melodic,body.mp-regions-on #bus-scene,body.mp-regions-on #bus-heroes{opacity:.48}
body.mp-part-editing #words,body.mp-part-editing [data-beats],body.mp-part-editing #bus-melodic{opacity:1}
.mp-region.is-selected{outline:calc(var(--sh,7.2px)*.55) solid #102f4a;outline-offset:calc(var(--sh,7.2px)*-.75);z-index:2}
/* v1.43 Ruling A — floating chip: .mp-edit-badge is now .mp-region's direct child (its old header
   bar is gone), so it is positioned off .mp-region's own position:relative rather than a flex slot
   inside .mp-header, and sits above the notation instead of in a dedicated header row.
   Owner ruling (exit affordance) — it is now a real <button> (native keyboard/AT semantics), so the
   default button chrome (font inheritance, border-box sizing) is reset to keep the same chip look,
   plus a visible hover/focus state since it is genuinely clickable now, not just a status label. */
.mp-edit-badge{position:absolute;top:calc(var(--sh,7.2px)*.9);right:calc(var(--sh,7.2px)*.9);z-index:3;
  padding:.3em .75em;border:2px solid currentColor;border-radius:999px;background:#fff;color:#102f4a;
  font:800 calc(var(--sh,7.2px)*2.6)/1 var(--student-font);letter-spacing:.04em;text-transform:uppercase;
  box-shadow:0 calc(var(--sh,7.2px)*.3) calc(var(--sh,7.2px)*.9) rgba(16,34,56,.25);cursor:pointer}
.mp-edit-badge:hover{background:#f2f6fa}
.mp-edit-badge:focus-visible{outline:calc(var(--sh,7.2px)*.4) solid #ffd23f;outline-offset:2px}
.mp-part-row.is-selected{outline:3px solid #ffd23f;outline-offset:2px}
#partselectwrap select{min-width:190px;font-weight:750}
#partselectstate{min-width:190px}
/* Parts bar sits in the composition hierarchy directly below the Section strip; the
   region rows and edit bar break to full width inside the flex bar. */
#partsbus{flex-wrap:wrap}
#partsbus .mp-part-rows,#partsbus .mp-part-edit-bar{flex-basis:100%;width:100%}

/* ==================== iPhone authoring surface (CSS v2.9) ====================
   The projected stage remains byte-for-byte governed by the existing stage selectors. These rules
   apply only to the full authoring shell: an iPhone receives the same controls and configuration
   paths as desktop, arranged as one readable document instead of a fixed-height DAW split.

   The breakpoint covers current iPhone portrait widths plus landscape phones. It intentionally
   requires a narrow portrait OR a short landscape viewport, so ordinary desktop authoring retains
   the certified fixed split. */
.mobile-author-nav{display:none}
@media (max-width:700px), (max-width:980px) and (orientation:landscape) and (max-height:540px){
  html:has(>body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance)){overflow-x:hidden}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance){
    --mobile-safe-top:env(safe-area-inset-top,0px);
    --mobile-safe-right:env(safe-area-inset-right,0px);
    --mobile-safe-bottom:env(safe-area-inset-bottom,0px);
    --mobile-safe-left:env(safe-area-inset-left,0px);
    height:auto;min-height:100%;overflow-x:hidden;overflow-y:auto;display:block;background:#0d0e10;
    -webkit-text-size-adjust:100%;overscroll-behavior-y:contain
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance)>header{height:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance)>.screen{
    width:100%;height:min(56.25vw,44vh);min-height:180px;max-height:none;flex:none;aspect-ratio:auto;
    scroll-margin-top:calc(112px + var(--mobile-safe-top));background:#000
  }
  body.stage-h-manual:not(.mode-stage):not(.mode-controls):not(.ns-region-instance)>main.screen{
    flex:0 0 clamp(180px,var(--stage-h),70vh)!important;
    height:clamp(180px,var(--stage-h),70vh)!important
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance)>.divider{
    height:44px;min-height:44px;display:flex;touch-action:none;cursor:ns-resize;
    padding-inline:var(--mobile-safe-left) var(--mobile-safe-right)
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance)>.console,
  body.stage-h-manual:not(.mode-stage):not(.mode-controls):not(.ns-region-instance)>section.console{
    width:100%;height:auto;min-height:0;max-height:none!important;overflow:visible;display:flex;
    padding:8px max(8px,var(--mobile-safe-right)) calc(16px + var(--mobile-safe-bottom)) max(8px,var(--mobile-safe-left));
    gap:10px;font-size:15px
  }

  /* Two compact sticky rails replace hunting through a desktop-width surface. Both are ordinary
     links and leave the editor's control handlers untouched. */
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .appbar{
    position:sticky;top:0;z-index:80;height:calc(56px + var(--mobile-safe-top));min-height:calc(56px + var(--mobile-safe-top));
    padding:var(--mobile-safe-top) 8px 0;margin:0 -8px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;
    background:#151619;border-bottom:1px solid #454951;scrollbar-width:none;-webkit-overflow-scrolling:touch
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .appbar::-webkit-scrollbar,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mobile-author-nav::-webkit-scrollbar{display:none}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .appbar .appswitch{
    flex:0 0 auto;min-height:44px;display:inline-flex;align-items:center;white-space:nowrap
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .appbar .appgrow{display:none}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .appbar .appwho{flex:0 0 auto;white-space:nowrap;padding-right:8px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mobile-author-nav{
    position:sticky;top:calc(56px + var(--mobile-safe-top));z-index:79;height:52px;display:flex;align-items:center;
    gap:6px;margin:0 -8px;padding:4px max(8px,var(--mobile-safe-right)) 4px max(8px,var(--mobile-safe-left));
    overflow-x:auto;overflow-y:hidden;background:#202227;border-bottom:1px solid #454951;
    scrollbar-width:none;-webkit-overflow-scrolling:touch
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mobile-author-nav a{
    flex:0 0 auto;min-height:44px;display:inline-flex;align-items:center;padding:0 13px;border:1px solid #50545e;
    border-radius:999px;background:#292c33;color:#f4f5f7;text-decoration:none;font:750 13px/1 system-ui,sans-serif
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mobile-author-nav a:focus-visible{
    outline:3px solid #ffd23f;outline-offset:1px
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) :is(#loadbar,#transportbar,#partsbus,#moderow,#controlrack,#mixBuses,#outputbar){
    scroll-margin-top:calc(116px + var(--mobile-safe-top))
  }

  /* iOS zooms form controls below 16px. Every editable field and action also receives a 44px touch
     target; compact visual readouts remain compact because they are not interactive. */
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console button,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console select,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console input[type="text"],
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console input[type="number"]{
    min-height:44px;font-size:16px
  }
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console input[type="checkbox"]{width:22px;height:22px;flex:0 0 auto}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console input[type="range"]{min-height:44px;touch-action:pan-y}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console input[type="file"]{width:100%;min-height:44px;font-size:14px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console details>summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .console .chk{min-height:44px;font-size:14px}

  /* Source and recall become one-field-per-row. Nothing is hidden; long values truncate inside the
     row instead of widening the document. */
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .loadbar{display:grid;grid-template-columns:1fr;gap:8px;padding:10px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .loadbar::before{font-size:11px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .loadbar>label,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .screen-recall{width:100%;display:grid;grid-template-columns:minmax(82px,.34fr) minmax(0,1fr);gap:8px;align-items:center}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .loadbar select{width:100%;max-width:none;min-width:0;margin-left:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .screen-recall{padding:8px 0 0;border:0;border-top:1px solid #3a3e46}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .screen-recall label{display:contents}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .screen-recall button{grid-column:1/-1;width:100%}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #screenrecallstate,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #partselectstate{grid-column:1/-1;max-width:100%;min-width:0;white-space:normal}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #datarefresh{width:100%}

  /* Transport is a vertical stack of complete intent groups. Dense navigation remains horizontally
     scrollable inside its own row, never across the page. */
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .tbar{display:grid;grid-template-columns:1fr;gap:8px;padding:10px;overflow:hidden}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .tbar::before{display:block;width:100%;font-size:11px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .tbar>.sep{display:none}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .tbar>.tgroup,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .tbar>.chk{width:100%;display:flex;align-items:center;gap:7px;flex-wrap:wrap}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .tbar>.transport-nav{flex-wrap:nowrap;overflow-x:auto;padding:4px 0 8px;border:0;-webkit-overflow-scrolling:touch}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .transport-nav button{flex:0 0 auto}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #playbackrangegroup select{flex:1 1 150px;min-width:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #playbackmeasures{display:flex;flex-wrap:wrap;gap:6px}

  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .teacherbus{grid-template-columns:1fr;padding:10px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .teacherbus-head{grid-column:1;align-items:center;flex-wrap:wrap}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .teacherbus-head button{width:100%;margin:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .teacher-sends{display:grid;grid-template-columns:1fr}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .teacher-send{min-height:44px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .timelinebus{align-items:flex-start;flex-wrap:wrap;padding:10px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .timelinebus>strong{width:100%;font-size:11px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .timelinebus #sectiontimeline{flex-basis:100%;order:3}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .timeline-reserve{width:100%;margin:0;white-space:normal;order:4}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #multipartcontrols{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #multipartcontrols button{width:100%}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mp-part-row{grid-template-columns:1fr;gap:8px;padding:10px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mp-part-row>*{min-width:0;max-width:100%}

  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .moderow{display:flex;align-items:center;gap:7px;overflow-x:auto;padding:8px;-webkit-overflow-scrolling:touch}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .moderow .modelbl{flex:0 0 auto}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .moderow button{flex:0 0 auto;min-width:108px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .moderow .template-open{margin-left:0}

  /* The head and mixer are a single-column editing stack. Rows wrap controls; specialized mapping
     matrices and audio routes collapse to one column instead of requiring page-level zoom. */
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .rack{display:grid;grid-template-columns:minmax(0,1fr);width:100%;gap:10px;padding-bottom:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mixer-panel{grid-column:1;width:100%;max-width:none;min-width:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene{display:grid;grid-template-columns:minmax(0,1fr);min-height:0;padding:8px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene>.phead,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene>.row,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene>details{grid-column:1/-1;min-width:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene>.row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;overflow:visible}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene>.row>select{flex:1 1 170px;min-width:0;max-width:100%}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene>.row>.mini{flex:1 1 145px;min-width:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .panel.scene>.row>.mini input[type="range"]{width:100%}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .movement-panel-grid,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #movementMapRoutes,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) #movementAudioRoutes{display:grid;grid-template-columns:minmax(0,1fr);width:100%;gap:8px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .movement-cue-route{grid-template-columns:minmax(0,1fr);gap:7px}

  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mixer-panel{overflow-x:hidden;overflow-y:visible;padding:10px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .strips{display:flex;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .strip{min-width:92px;scroll-snap-align:start}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .strip button{min-width:44px;min-height:44px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .vfader{height:150px;min-height:150px!important}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mix-buses{width:100%;min-width:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mix-bus-row{grid-template-columns:68px minmax(0,1fr) 48px 44px;gap:7px;min-height:0;padding:8px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mix-bus-name{grid-column:1;grid-row:1}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mix-bus-fader{grid-column:2/-1;grid-row:1;grid-template-columns:auto minmax(0,1fr) 38px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mix-bus-row>.level-meter{grid-column:1/3;grid-row:2;height:16px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mix-bus-row>.meter-read{grid-column:3;grid-row:2;font-size:10px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .mix-bus-row>button{grid-column:4;grid-row:2;width:44px;height:44px;font-size:12px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .master-bus-row .mix-bus-name{grid-column:1/3}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .master-bus-row>.master-meter{grid-column:1/3;grid-row:2}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .master-bus-row>.meter-read{grid-column:3;grid-row:2}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .master-bus-row>.clip-reset{grid-column:4;grid-row:2;width:44px!important}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .loudness-readouts{grid-column:1/-1;grid-row:3;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .loudness-readouts>span{display:flex;flex-wrap:wrap;justify-content:center}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .loudness-readouts em,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .loudness-reference{grid-column:1/-1;text-align:left}

  /* Output remains the final authority rather than a screen-covering fixed dock. The section rail
     jumps here instantly, and every save/deploy field has full phone width. */
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar{position:relative;bottom:auto;z-index:1;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:12px 10px calc(12px + var(--mobile-safe-bottom));justify-content:stretch}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar::before,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar>.read,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar>label:has(input[type="file"]){grid-column:1/-1;width:100%}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar>.sep{display:none}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar>.lbl{align-self:center}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar #slug,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar #usedin{width:100%!important;min-width:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar #save,
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar #deploy{width:100%}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .sbar #deploy{grid-column:1/-1}

  /* Template recall becomes a safe-area-aware full-screen sheet. Preview remains the real stage. */
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-modal{padding:0;background:#151619}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-dialog{width:100vw;height:100dvh;max-height:none;border:0;border-radius:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-titlebar{padding:calc(10px + var(--mobile-safe-top)) max(12px,var(--mobile-safe-right)) 10px max(12px,var(--mobile-safe-left))}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-close{width:44px;height:44px;min-height:44px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-workspace{grid-template-columns:1fr;overflow:auto;padding:0}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-library{border-right:0;border-bottom:1px solid #343840;padding:12px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .preset-list{display:flex;max-height:30vh;grid-template-columns:none}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-preview{min-height:0;padding:12px}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-footer{padding:10px max(12px,var(--mobile-safe-right)) calc(10px + var(--mobile-safe-bottom)) max(12px,var(--mobile-safe-left));align-items:stretch}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-footer .preset-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}
  body:not(.mode-stage):not(.mode-controls):not(.ns-region-instance) .template-footer>#presetRecall{width:100%;min-height:48px}
}

/* Baby Echo lane — sits between PARTS and Mode. Deliberately quiet: it is a composition-level
   instrument row, not a mode selector, so it borrows the moderow rhythm without competing with it
   for attention. Hidden outright on any song without a Baby Echo stem. */
.babyecholane{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;padding:6px 10px;
  border:1px solid var(--rule,#d8dee7);border-radius:4px;margin:6px 0}
.babyecholane[hidden]{display:none!important}
.babyecholane .belbl{font-size:11px;letter-spacing:.06em;text-transform:uppercase;opacity:.62}
.babyecholane input[type=range]{width:104px}
.babyecholane .bestat{font-size:11px;opacity:.62;font-variant-numeric:tabular-nums}
.babyecholane .bestat.warn:not(:empty){opacity:1;color:#bf372a;font-weight:600}

/* Baby Echo is a separate performance mode, not a Melodic sub-option. It shares the proven pitch
   renderer but exposes only its meaningful author controls: Open sky / 2 cards, contour spacing,
   position, and owl size. */
body.head-baby-echo .baby-echo-hide,
body.head-baby-echo [data-baby-echo-hide]{display:none!important}
body.head-baby-echo #head-baby-echo.on{background:#1687a7;color:#fff;border-color:#0f6f8b}

/* Ordinary vertical glyphs: an implicit grid row's automatic minimum used the uploaded
   raster's intrinsic height (e.g. 420px), even while .pg shrank with the 16:9 stage.
   Give the row a zero minimum and a definite available height. The image can then resolve
   height:100% against that row, preserving its aspect and the existing stage-relative scale.
   Dedicated Baby Echo uses .echo-bob, not .pg, and is intentionally outside this rule. */
#staff .psvel .pg{grid-template-rows:minmax(0,1fr)}
#staff .psvel .pg > img,#staff .psvel .pg > svg,#staff .psvel .pg > .chuff{min-height:0}

/* v2.25 candidate: hero effects never leak into the standard reading surface. */
#herostage .hslot.hero-final-end::after{content:'';position:absolute;right:0;top:var(--hero-bar-top,25%);height:var(--hero-bar-h,50%);width:calc(var(--hero-bar-w,.34cqmin)*2.6);border-left:var(--hero-bar-w,.34cqmin) solid #15161a;border-right:calc(var(--hero-bar-w,.34cqmin)*1.8) solid #15161a;filter:drop-shadow(0 0 .85cqmin #ffdc5c);z-index:6;box-sizing:content-box}
#herostage .hslot.hero-measure-end.hero-page-end::after{right:0}
#herostage.hero-glyphs .hslot::after{display:none}
#herostage.hero-glyphs .hrepeat{filter:none}
#herostage.hero-panel-b .hmetercue{display:none}
/* The structural `right` values identify the musical boundary. Center the complete painted box on
   that boundary before applying the author's stage-relative nudge. This matters most for a heavy
   final double bar: growing its border box must add weight on both sides, not only back into the
   last superhero. */
#herostage .hslot.hero-measure-end::after,#herostage .hslot.hero-final-end::after{transform:translate(calc(50% + var(--hero-bar-x,0cqmin)),var(--hero-bar-y,0cqh))}
/* Ground plane, not an image-attached shadow: stationary until actual touchdown. */
#herostage .hslot.hero-landed[data-mode="hero"] .hhero-frame::before{content:'';position:absolute;bottom:7%;left:16%;width:68%;height:2.2cqmin;border-radius:50%;background:radial-gradient(ellipse,rgba(0,0,0,.58),rgba(0,0,0,.24) 40%,transparent 72%);pointer-events:none}
#herostage .hslot.hero-landed[data-mode="hero"] .hhero img{animation:nsHeroHover 2.4s ease-in-out infinite}
#herostage .hslot.hero-landed[data-mode="hero"]:nth-child(2n) .hhero img{animation-delay:-.8s;animation-duration:2.6s}
#herostage .hslot.hero-landed[data-mode="hero"]:nth-child(3n) .hhero img{animation-delay:-1.55s}
#herostage .hhero img{filter:none}
#herostage .hslot.hlit .hhero img{filter:drop-shadow(0 0 2.4cqmin rgba(226,35,26,.8))}
#herostage .hhero.resttrap img{filter:drop-shadow(0 0 .65cqmin #ff79cf) drop-shadow(0 0 1.4cqmin rgba(255,78,184,.75))}
#herostage .hslot.hlit .hhero.resttrap img{filter:drop-shadow(0 0 1cqmin #ffb5e6) drop-shadow(0 0 2cqmin #ff4eb8)}
#herostage.hero-no-hover .hslot .hhero img{animation:none!important}
@keyframes nsHeroHover{0%,100%{transform:translateY(0)}50%{transform:translateY(-.3cqmin)}}
@media(prefers-reduced-motion:reduce){#herostage .hhero img{animation:none!important;transform:none!important}}

/* v2.32: horizontal melodic uploaded glyphs must use the authored slot, never
   the bitmap's intrinsic grid minimum. Keep pitch centres and aspect ratio.
   Scope excludes standard notation, vertical movement and Baby Echo. */
#staff.arr-h:not(.ps-notation) .pn .pg{
  width:100%;min-width:0;min-height:0;
  grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);
}
#staff.arr-h:not(.ps-notation) .pn .pg > img,
#staff.arr-h:not(.ps-notation) .pn .pg > svg{
  width:100%;height:100%;min-width:0;min-height:0;object-fit:contain;
}
#staff.arr-h:not(.ps-notation) .pn.lit .pg{
  transform:scale(calc(var(--ps-icon-fill,1) * 1.13));
}
@media (prefers-reduced-motion:reduce){
  #staff.arr-h:not(.ps-notation) .pn.lit .pg{transform:scale(var(--ps-icon-fill,1))}
}

/* v2.33: staff icon SIZE is a shared glyph size, not a duration-cell width.
   A narrow eighth-note timing slot must not shrink the same art. At large
   authored sizes icons may overlap; the author controls size and staff spacing. */
#staff.arr-h:not(.ps-notation).ps-staff .pn .pg,
#staff.arr-h:not(.ps-notation).ps-one .pn .pg{
  width:calc(var(--ps-glyphabs,11cqmin) * var(--ps-iscale,1));
  height:calc(var(--ps-glyphabs,11cqmin) * var(--ps-iscale,1));max-height:none;
}
#staff.arr-h:not(.ps-notation) .psline{
  background:var(--ps-staff-ink,#5b6b7a);height:var(--ps-staff-thickness,3px);
}

/* Optional movement glow follows only the currently sounding action, not its card. */
body.trigger-glow.movement-mode .movement-card .mvglyph.lit{filter:drop-shadow(0 0 max(2px,1cqmin) #173f5f) drop-shadow(0 0 max(8px,4cqmin) var(--glow-color,#ffd23f))}

/* v2.37 (paired with runtime v2.7.99): highlight-ON is instant. A transition on the incoming highlight
   made each note, heart, glyph and lyric reach full brightness 60–100 ms after its sound. The browser
   uses the destination state's transition, so these rules make lighting up instant while the base rules
   still fade the highlight OFF smoothly. */
.lit,.lit *,.hl,.hl *,.rhythm-lit,.rhythm-lit *,.movement-lit,.movement-lit *,.pulse-lit,.pulse-lit *{transition-duration:0s!important;transition-delay:0s!important}


/* v2.38 (paired with runtime v2.7.101): "Fill the card" (body.icon-fill, screen.icon_fill). */
body.icon-fill .grid[data-beats="1"] .card.pulse-rhythm img.car{max-height:86cqh!important;max-width:86cqw!important}
/* 84% keeps a 3% card margin at the top of the 6% bob: (100-H)/2 - 0.06H >= 3 */
body.icon-fill .ci-card.puppet .echo-bob{height:84%;width:84%}
body.icon-fill #staff.arr-v:is(.ps-one,.ps-two) .psvel.puppet{height:35cqmin}


/* v2.39 (paired with runtime v2.7.102): Note Superheroes portal videos stay transparent. The shared
   full-width background script injects video{background:#000} for letterboxed authored video; that
   painted a dark box behind every portal. */
.hportal.vid .pvid{background:transparent}
/* Accessible screen description (screen.description): read by assistive technology, never displayed. */
.ps-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.ps-description-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px}
.ps-description-row textarea{flex:1 1 320px;min-width:240px;font:inherit;resize:vertical}


/* v2.40 (paired with runtime v2.7.103): "Fluid captions" (body.cap-fluid, lyric_type.cap_fluid). */
body.cap-fluid #plxcaption .plcw{font-size:calc(4.9cqmin * var(--text-scale,1) * var(--cap-scale,1))}
body.cap-fluid #plxcaption .plctitle{font-size:calc(6.07cqmin * var(--text-scale,1) * var(--title-scale,1.2) * var(--cap-scale,1))}
/* v2.40: highlight glow color is the --glow-color var in the halo rules above (unset = the old gold).
   Highlight zoom (body.lit-zoom, --lit-zoom) replaces each element's built-in lit pulse. Motion-only:
   reduced-motion keeps the existing no-scale rules, where outline/recolor carries the state. */
@media (prefers-reduced-motion:no-preference){
  body.lit-zoom .card.lit .art,body.lit-zoom.trigger-glow .card.lit .art{transform:translateY(var(--icon-y,0%)) scale(var(--lit-zoom,1.07))}
  body.lit-zoom .glyph.lit img.car,body.lit-zoom.trigger-glow .glyph.lit img.car{transform:scale(var(--lit-zoom,1.12))}
  body.lit-zoom #staff .pn.lit .pg{transform:scale(var(--lit-zoom,1.13))}
  body.lit-zoom #staff.arr-h:not(.ps-notation) .pn.lit .pg{transform:scale(calc(var(--ps-icon-fill,1) * var(--lit-zoom,1)))}
  body.lit-zoom #staff .nhead.lit{transform:rotate(-20deg) scale(var(--lit-zoom,1.14))}
  body.lit-zoom #staff .nhead.nbrav.lit{transform:scale(var(--lit-zoom,1.12))}
}

/* v2.41 (paired with runtime v2.7.104): Measure focus. Tappable stage layers show a pointer. */
body.mf-tap.mf-practice #stage #grid [data-songbeat],body.mf-tap.mf-practice #stage #staff{cursor:pointer}
body.mf-tap.mf-practice #stage{touch-action:none}
#mf-chips{position:absolute;top:1.6cqmin;right:1.6cqmin;z-index:40;display:flex;gap:1.2cqmin}
#mf-chips[hidden],#mf-chips button[hidden]{display:none}
#mf-chips button{font:700 max(14px,2.3cqmin)/1 "DM Sans",system-ui,sans-serif;min-height:44px;padding:0 max(14px,2cqmin);border-radius:999px;
  border:2px solid #16324f;background:#fff;color:#16324f;box-shadow:0 2px 6px rgba(0,0,0,.18);cursor:pointer}
#mf-chips button:focus-visible{outline:3px solid #2f6fde;outline-offset:2px}
#stage .mf-range{outline:max(3px,.7cqmin) solid #2f6fde;outline-offset:3px;border-radius:10px}
.cc-hint{font-size:12px;opacity:.75;margin-right:4px}
/* v2.42 (paired with runtime v2.7.105): tap cursor and touch capture apply only while Practice is on. */
