    /* ============================================================
       FIRST-RUN ACTIVATION — one-tap "hear your first groove" overlay.
       Immersive theme-independent dark surface (like the Jam room).
       ============================================================ */
    .firstrun-overlay {
      position: fixed; inset: 0; z-index: 130;
      display: grid; place-items: safe center;   /* "safe": a too-tall card on a short/landscape iPhone aligns to top instead of clipping */
      overflow-y: auto; -webkit-overflow-scrolling: touch;
      padding: max(24px, env(safe-area-inset-top)) calc(20px + env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) calc(20px + env(safe-area-inset-left));
      opacity: 1;
      /* Gradient is on the FIXED, viewport-filling overlay itself (not a scrolling child) so the page
         behind is never revealed when the content scrolls — the landscape-iPhone bleed-through fix. */
      background: radial-gradient(125% 92% at 50% 14%, #2a2013 0%, #1a1209 46%, #0b0805 100%);
      /* No entrance opacity animation: GPU-layer compositing blurs the subtree mid-fade. */
    }
    .firstrun-overlay.is-leaving { opacity: 0; pointer-events: none; animation: none; transition: opacity 300ms var(--ease-ui); }
    .firstrun-card {
      position: relative; z-index: 1;
      display: grid; justify-items: center; gap: 12px; text-align: center;
      max-width: 420px; width: 100%; color: #f0e8d6;
      /* No transform-based entrance here: a transformed ANCESTOR makes iOS Safari drop the play
         button's rounded clip until a repaint (the square→circle flip). The overlay's opacity fade
         is the entrance instead. */
    }
    .firstrun-mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 30px rgba(0,0,0,.34); }
    .firstrun-mark img { display: block; border-radius: 12px; }
    .firstrun-kicker { margin: 6px 0 0; display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); }
    .firstrun-kicker svg { width: 14px; height: 14px; }
    .firstrun-title { margin: 0; font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.08; color: #fff; letter-spacing: -.01em; }
    .firstrun-sub { margin: 0; max-width: 34ch; color: rgba(240,232,214,.78); line-height: 1.5; font-size: 1rem; }
    /* Play circle is a real SVG <circle>; border-radius AA'd badly at this size. */
    .firstrun-play {
      margin-top: 12px; width: 120px; height: 120px; padding: 0; line-height: 0;
      border: none; background: transparent; cursor: pointer; display: block;
      -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: transparent;
      filter: drop-shadow(0 14px 16px rgba(176,112,31,.5));   /* brass glow, tinted to the button */
      transition: transform var(--motion-fast) var(--ease-ui);
    }
    .firstrun-play-svg { display: block; width: 100%; height: 100%; }
    .firstrun-play:hover { transform: translateY(-1px); }
    .firstrun-play:active { transform: scale(.96); }
    .firstrun-play:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 4px; border-radius: 50%; }
    .firstrun-cta-label { font-weight: 800; font-size: 1.05rem; color: #fff; letter-spacing: .01em; }
    .firstrun-meta { font-size: .85rem; color: rgba(240,232,214,.6); }
    .firstrun-skip { margin-top: 6px; background: transparent; border: none; color: rgba(240,232,214,.62); font-size: .92rem; font-weight: 600; cursor: pointer; padding: 8px 14px; min-height: 44px; text-decoration: underline; text-underline-offset: 3px; -webkit-tap-highlight-color: transparent; }
    .firstrun-skip:hover { color: #f0e8d6; }
    body.firstrun-open { overflow: hidden; }
    /* Short / landscape iPhone: compact the hero so it fits without scrolling. */
    @media (max-height: 560px) {
      .firstrun-card { gap: 8px; }
      .firstrun-mark { width: 48px; height: 48px; border-radius: 12px; }
      .firstrun-mark img { width: 38px; height: 38px; }
      .firstrun-title { font-size: 1.5rem; }
      .firstrun-sub { font-size: 0.92rem; }
      .firstrun-play { width: 92px; height: 92px; margin-top: 4px; }
    }.home-stage .instrument-bar {
      width: min(100%, 560px);
    }
    /* ---- Why-GrooveWithin trust block (Wave 7) ---- */
    .home-trust .trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 14px; }
    /* align-content:start — else the shortest card's stretch surplus lands between title and body */
    .trust-item { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; align-content: start; column-gap: 12px; row-gap: 2px; align-items: start; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-strong); }
    .trust-item svg { grid-row: 1 / 3; width: 24px; height: 24px; color: var(--teal); }
    .trust-item strong { font-size: 0.98rem; }
    .trust-item span { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
    /* First-week guided onboarding arc */
    .first-week { border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(160deg, rgba(176,112,31,0.06), transparent 60%), var(--panel-strong); padding: 18px 20px; display: grid; gap: 14px; }
    .fw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .fw-hide { border: 0; background: transparent; color: var(--muted); font-size: 0.82rem; font-weight: 700; cursor: pointer; padding: 4px 8px; border-radius: 8px; min-height: 32px; }
    .fw-hide:hover { color: var(--ink); background: var(--bg-soft); }
    .fw-dots { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .fw-dot { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-weight: 850; font-size: 0.84rem; }
    /* A finished day is GOLD, not ink. --teal is the ACTION slot and resolves to near-black #2b2114 in
       light, so the black tick sat on a black circle (owner: "black on brown"); it only read in dark,
       where --teal happens to be gold. Canon: actions are ink, gold is music — a practiced day is music. */
    .fw-dot.is-done { background: var(--gold); border-color: var(--gold); color: #141009; }
    .fw-dot.is-done .gi { width: 15px; height: 15px; color: #141009; }
    .fw-dot.is-current { border-color: var(--teal); color: var(--teal-text); box-shadow: 0 0 0 3px rgba(176,112,31,0.15); }
    .fw-current { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
    .fw-current-copy { display: grid; gap: 3px; min-width: 0; }
    .fw-current-copy strong { font-size: 1.02rem; }
    .fw-current-copy span { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
    .fw-current-actions { display: flex; gap: 10px; flex-wrap: wrap; flex: none; }@media (max-width: 560px) { .fw-current-actions { width: 100%; } .fw-current-actions .primary-button, .fw-current-actions .ghost-button { flex: 1 1 auto; } }
    /* ===== THE DARK-STAGE HERO (2026-07-12): a stranger lands inside something alive. ===== */
    .home-stage { border-radius: var(--radius-feature); overflow: hidden; border: 1px solid rgba(240,232,214,.1); box-shadow: var(--shadow); color: #f0e8d6; background: radial-gradient(90% 130% at 16% 30%, rgba(217,169,90,.17), transparent 56%), linear-gradient(135deg, #2a2013 0%, #120e07 100%); }
    .home-stage-inner { display: grid; grid-template-columns: minmax(170px, 290px) minmax(0, 1fr); gap: clamp(18px, 4vw, 46px); align-items: center; padding: clamp(24px, 5vw, 54px); }
    .stage-rings svg { width: 100%; height: auto; display: block; transform-origin: center; animation: gwStageIdle 5.6s ease-in-out infinite; }
    body.is-grooving .stage-rings svg { animation: gwBreathe var(--beat-duration, .7s) ease-in-out infinite; }
    @keyframes gwStageIdle { 0%, 100% { transform: scale(1); opacity: .94; } 50% { transform: scale(1.025); opacity: 1; } }
    .stage-kicker { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: #d9a95a; font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
    .stage-kicker svg { width: 14px; height: 14px; }
    .stage-title { margin: 10px 0 0; font-size: clamp(2rem, 4.9vw, 3.35rem); line-height: 1.02; letter-spacing: -0.01em; color: #f0e8d6; }
    .stage-sub { margin: 12px 0 0; color: #d6cbb2; font-size: clamp(.98rem, 2vw, 1.12rem); line-height: 1.55; max-width: 560px; }
    .stage-chords { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
    .stage-chip { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 8px 16px; border: 1px solid rgba(240,232,214,.32); border-radius: 8px; background: transparent; color: #e9dfc8; font-family: var(--font-display); font-size: 1.18rem; font-weight: 650; transition: background .16s var(--ease-ui), color .16s var(--ease-ui), transform .16s var(--ease-ui), border-color .16s var(--ease-ui); }
    .stage-chip.is-now { background: #e7c266; border-color: #e7c266; color: #1c1509; transform: translateY(-2px); }
    .stage-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 22px; }
    .stage-play { display: inline-flex; align-items: center; gap: 9px; min-height: 58px; padding: 0 30px; border: 1px solid rgba(255,255,255,.26); border-radius: 999px; background: #f4f1e9; color: #16190f; font-weight: 850; font-size: 1.06rem; cursor: pointer; box-shadow: 0 12px 34px rgba(0,0,0,.45); transition: transform .15s var(--ease-ui), background .15s var(--ease-ui); }
    /* THE GOLD LIQUID (owner 2026-07-15): the drifting gold fill on the two buttons that start
       music (gold = music; actions are ink). One palette serves both themes; only
       background-position animates; reduced motion gets steady gold. */
    .stage-play, .rec-stage.is-recording .rec-stop {
      background: linear-gradient(118deg, #8a5613, #e7c266 26%, #b0701f 50%, #f6dc9c 74%, #8a5613);
      background-size: 320% 320%;
      color: #2b2114;
      border-color: rgba(43,33,20,0.22);
      animation: goldLiquid 6s ease-in-out infinite;
    }
    /* the dark theme kept white-on-rose for the stop pill; on gold that reads as mush — ink wins in both */
    body[data-theme="dark"] .rec-stage.is-recording .rec-stop { background-color: transparent; color: #2b2114; }
    .stage-play:hover { transform: translateY(-1px); filter: brightness(1.06); }
    @keyframes goldLiquid { 0% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } 100% { background-position: 0% 40%; } }
    @media (prefers-reduced-motion: reduce) {
      .stage-play, .rec-stage.is-recording .rec-stop { animation: none; background: var(--gold); color: #2b2114; }
    }
    .stage-play svg { width: 20px; height: 20px; }
    body.is-grooving .stage-play { animation: gwBreathe var(--beat-duration, .7s) ease-in-out infinite; }
    /* DARK-SURFACE TRAP #4: these stay dark in BOTH themes; .inline-action's light ink hit 1.23:1
       once the jam unlock made it reachable (fix exposed latent bug, like art170). */
    .home-stage .inline-action, .studio-teaser .inline-action { color: #d6cbb2; }
    .home-stage .inline-action:hover, .studio-teaser .inline-action:hover { color: #f0e8d6; }
    /* Teaser CTA flush LEFT with the copy (owner 2026-07-16: the gold button floated centered
       mid-card — .hero-cta centers for the page hero). Jam link tucks right under the button. */
    .studio-teaser .hero-cta { align-items: flex-start; }
    .studio-teaser .teaser-aside { margin: 10px 0 0; }
    .home-stage .instrument-bar, .studio-hud .instrument-bar { margin: 20px 0 0; background: rgba(255,255,255,.05); border-color: rgba(240,232,214,.16); }
    /* In the HUD it sits between the room title and the band chips — tighter, and it is the card's
       own control now, not a 134px card of its own above the content (owner 2026-07-14). */
    .studio-hud .instrument-bar { margin: 12px 0 0; }
    .home-stage .instrument-bar-label, .studio-hud .instrument-bar-label { color: #b1a488; }
    /* Unselected must look like a control (owner 2026-07-14: "looks empty... a tiny outline you can
       barely see"). .2 alpha on #2a2013 is ~1.8:1 — under the 3:1 a UI boundary needs. */
    /* The phone block in 40-account-modals sets `border:` (shorthand, resets colour) at equal
       specificity but loads LATER, so a 3-class selector lost and the pill took var(--line) —
       a dark 14%-alpha edge on an always-dark stage = invisible. Out-rank it. */
    /* The wrapper carries .seg-row, which paints SOLID WHITE. On these dark surfaces only the buttons
       inside were re-skinned for dark — so pale tan text sat on a white pill and vanished in light mode
       (owner: "you can barely see the text of the instruments"). Re-skin the wrapper too. */
    /* even grid by CONTAINER width: 5-up / symmetric 3+2 / stack */
    .home-stage .instrument-bar { container-type: inline-size; }
    .home-stage .instrument-bar .instrument-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
    .home-stage .instrument-bar .instrument-seg .seg { padding: 8px 4px; font-size: 0.74rem; justify-content: center; }
    @container (min-width: 500px) { .home-stage .instrument-bar .instrument-seg { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
    @container (min-width: 340px) and (max-width: 499px) {
      .home-stage .instrument-bar .instrument-seg { grid-template-columns: repeat(6, minmax(0, 1fr)); }
      .home-stage .instrument-bar .instrument-seg .seg:nth-child(-n+3) { grid-column: span 2; }
      .home-stage .instrument-bar .instrument-seg .seg:nth-child(n+4) { grid-column: span 3; }
    }
    @container (max-width: 339px) { .home-stage .instrument-bar .instrument-seg { grid-template-columns: minmax(0, 1fr); flex: 1 1 100%; } }
    .home-stage .instrument-bar { flex-wrap: wrap; }
    .home-stage .instrument-bar .instrument-seg, .studio-hud .instrument-bar .instrument-seg { background: rgba(240,232,214,.06); border-color: rgba(240,232,214,.28); }
    .home-stage .instrument-bar .instrument-seg .seg, .studio-hud .instrument-bar .instrument-seg .seg { background: rgba(240,232,214,.06); color: #d6cbb2; border-color: rgba(240,232,214,.38); }
    .home-stage .instrument-bar .instrument-seg .seg:hover, .studio-hud .instrument-bar .instrument-seg .seg:hover { color: #f0e8d6; border-color: rgba(240,232,214,.6); }
    .home-stage .instrument-bar .instrument-seg .seg.is-active, .studio-hud .instrument-bar .instrument-seg .seg.is-active { background: rgba(231,194,102,.24); color: #f7e3ad; border-color: #e7c266; }
    /* Badge line (owner: "font colour a little too light"). .stage-badges set colour on the <ul>;
       .hero-badges li wins on specificity, so it rendered var(--soft) = #47392a: 1.44:1 on this
       always-dark stage. Not too light — too DARK, and only in light mode. Target the li. */
    .home-stage .hero-badges li { color: #d6cbb2; }
    /* Invisible ticks: ::before drew from var(--teal), which is near-black #2b2114 under the LIGHT
       palette — 1.01:1 on this theme-independent dark stage. Not faint: INVISIBLE. Literal gold. */
    .home-stage .hero-badges li::before { border-left-color: #e7c266; border-bottom-color: #e7c266; }
    @media (max-width: 760px) {
      .home-stage-inner { grid-template-columns: 1fr; gap: 14px; }
      .stage-rings { width: min(46vw, 185px); margin: 0 auto; }
      .stage-play { width: 100%; justify-content: center; }
    }
    @media (prefers-reduced-motion: reduce) { .stage-rings svg { animation: none; } }
    .hero-badges { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 8px 0 0; padding: 0; list-style: none; }
    .hero-badges li { display: inline-flex; align-items: center; gap: 8px; color: var(--soft); font-size: 0.86rem; font-weight: 700; }
    .hero-badges li::before { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); margin-top: -3px; flex: none; }@keyframes eqBar { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }.inline-action { min-height: 44px; margin: -10px -6px; padding: 10px 6px; border: 0; background: transparent; color: var(--teal-deep); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }.preview-chord-label { color: var(--teal-text); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 850; }.first-chord-help {
      display: grid;
      /* The DIAGRAM is the star (owner 2026-07-12, round 2): it owns the wide right column
         and both rows; copy sits top-left with the utility row tucked UNDER it — no more
         buttons floating in dead space at the card's center. */
      grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
      gap: 10px 16px;
      align-items: center;
      margin-top: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.64);
      min-width: 0;
      max-width: 100%;
      overflow: hidden;
    }
    .first-chord-help.is-compact {
      grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
      padding: 10px;
    }
    .first-chord-copy {
      display: grid;
      gap: 3px;
      min-width: 0;
      grid-column: 1;
      align-self: end;
    }
    .first-chord-copy strong {
      color: var(--ink);
      font-size: 0.98rem;
      overflow-wrap: anywhere;
    }
    .first-chord-copy span:last-child {
      color: var(--soft);
      font-size: 0.84rem;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }
    .first-chord-visual {
      min-width: 0;
      grid-column: 2;
      grid-row: 1 / span 2;
      align-self: center;
    }
    .pk-lh-note { font-size: 0.78rem; color: var(--muted); margin: 6px 2px 0; }
    .first-chord-visual .pkbd {
      height: 132px;
      margin-top: 0;
    }
    .first-chord-visual .fretboard {
      width: 100%;
      max-height: 210px;
    }
    .first-chord-cue {
      grid-column: 1 / -1;
      color: var(--muted);
      font-size: 0.84rem;
      line-height: 1.4;
      margin: 0;
    }
    .preview-chord-label { display: inline-flex; align-items: center; gap: 5px; }
    .preview-chord-label .gi { width: 15px; height: 15px; opacity: 0.85; }
    /* Prev/next between chord diagrams — keeps playback running, no need to close anything.
       Sits under the copy in the LEFT column, left-aligned — the diagram keeps the stage. */
    .first-chord-nav { grid-column: 1; grid-row: 2; display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; opacity: 0.92; align-self: start; }
    /* Owner call (round 2): the arrows must read INSTANTLY — ink-dark label, teal chevron,
       heavier stroke and a slightly larger glyph. Clean, not heavy. */
    .first-chord-nav .chord-nav-btn { min-height: 40px; padding: 4px 12px; font-size: 0.78rem; color: var(--ink); }
    .first-chord-nav .chord-nav-btn svg { stroke-width: 3; width: 16px; height: 16px; color: var(--teal-deep); }
    .mobile-back svg { stroke-width: 3; }
    .first-chord-nav .gi.rot-prev { transform: rotate(90deg); }
    .first-chord-nav .gi.rot-next { transform: rotate(-90deg); }
    .first-chord-pos { font-size: 0.8rem; font-weight: 760; color: var(--soft); min-width: 0; white-space: nowrap; text-align: center; }
    /* Chord-card button: an IN-FLOW middle segment of the tile (an absolute top-right badge
       collided with the Edit column — owner 2026-07-11). Full tile height, WCAG-size hit area. */
    .chord-open-badge {
      display: inline-flex;
      align-items: center;
      opacity: 0.55;
      background: none;
      border: 0;
      border-left: 1px solid var(--line);
      padding: 0 8px;
      color: inherit;
      cursor: pointer; min-width: 40px; justify-content: center; }
    .chord-open-badge:hover, .chord-open-badge:focus-visible { opacity: 1; color: var(--teal); background: var(--accent-soft, rgba(176,112,31,0.12)); }
    .chord-open-badge .gi { width: 13px; height: 13px; }
    .chord-workbench.is-selected .chord-open-badge { opacity: 0.9; color: var(--teal); }
    /* One-time first-use hint that points at the chord diagrams, then remembers dismissal. */
    .coach-mark {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-top: 8px;
      padding: 9px 11px;
      border: 1px solid color-mix(in srgb, var(--teal) 38%, var(--line));
      border-radius: 8px;
      background: color-mix(in srgb, var(--teal) 9%, transparent);
    }
    .coach-mark-text { flex: 1; font-size: 0.82rem; line-height: 1.4; color: var(--ink); display: inline-flex; gap: 6px; }
    .coach-mark-text .gi { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--teal-text, var(--teal)); }
    /* Roomy tap target (the glyph stays small, the hit area is finger-friendly on phones). */
    .coach-mark-x { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; padding: 3px; margin: -4px -4px -4px 0; border: 0; background: transparent; color: var(--soft); cursor: pointer; border-radius: 8px; }
    .coach-mark-x:hover { background: rgba(0,0,0,0.06); color: var(--ink); }
    .coach-mark-x .gi { width: 15px; height: 15px; }
    body[data-theme="dark"] .coach-mark-x:hover { background: rgba(255,255,255,0.1); }
    /* Home FAQ (art226): native details accordion in the quiet-notice language. */
    .home-faq { display: grid; gap: 8px; margin-top: 26px; }
    .faq-title { font-size: 1.3rem; margin-bottom: 4px; }
    .faq-item { border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; background: var(--panel); padding: 0 14px; }
    .faq-item summary { cursor: pointer; min-height: var(--control-min); display: flex; align-items: center; font-weight: 700; }
    .faq-item p { margin: 0 0 12px; color: var(--soft); line-height: 1.55; }
    .account-boundary {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 16px 20px;
      align-items: center;
      padding: 20px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel-strong);
      margin-top: 18px;
    }
    .account-boundary h3 {
      font-size: clamp(1.25rem, 2.4vw, 1.7rem);
      letter-spacing: 0;
      margin-bottom: 6px;
    }
    .account-boundary p {
      color: var(--soft);
      line-height: 1.5;
      max-width: 72ch;
    }
    .account-boundary-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .account-boundary .plan-note {
      grid-column: 1 / -1;
      margin: 0;
      color: var(--muted);
      font-size: 0.82rem;
      line-height: 1.45;
    }
    .home-section-head { display: grid; gap: 7px; max-width: 68ch; }
    .home-section-head h3 { font-size: clamp(1.35rem, 2.8vw, 2rem); letter-spacing: -0.015em; }
    .home-section-head > p:last-child { color: var(--soft); line-height: 1.5; }
    /* In-product demo: CSS-only cross-fading example grooves (no JS, no audio). */
    .home-demo { display: grid; gap: 14px; padding-block: 4px; }
    .demo-loop { position: relative; min-height: 168px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
    .demo-slide { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; text-align: center; gap: 8px; padding: 22px; opacity: 0; animation: demoFade 15s infinite; animation-delay: calc(var(--i) * 5s); }
    .demo-style { font-weight: 800; font-size: 1.15rem; color: var(--teal-deep); }
    .demo-meta { color: var(--muted); font-size: 0.9rem; }
    .demo-chords { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
    .demo-chords b { font-weight: 800; color: var(--ink); font-size: 1.1rem; }
    .demo-chords i { color: var(--muted); font-style: normal; }
    .demo-idea { color: var(--muted); font-size: 0.92rem; }
    @keyframes demoFade {
      0% { opacity: 0; transform: translateY(8px); }
      4% { opacity: 1; transform: translateY(0); }
      28% { opacity: 1; transform: translateY(0); }
      34%, 100% { opacity: 0; transform: translateY(-8px); }
    }@media (prefers-reduced-motion: reduce) {
      .demo-slide { animation: none; opacity: 0; transform: none; }
      .demo-slide:first-child { opacity: 1; position: relative; }
    }
    /* Social-proof cards (rendered only when real quotes exist). */
    .home-proof { display: grid; gap: 14px; padding-block: 4px; }
    .proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
    .proof-card { margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
    .proof-card blockquote { margin: 0 0 12px; font-size: 1.02rem; line-height: 1.5; color: var(--ink); }
    .proof-card figcaption { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
    .home-loop { display: grid; gap: 18px; padding-block: 4px; }
    .home-loop-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
    .home-loop-steps li { min-width: 0; padding: 18px 18px 18px 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 3px 10px; align-content: start; }
    .home-loop-steps li + li { padding-left: 18px; border-left: 1px solid var(--line); }
    .home-loop-steps li > span { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft, rgba(176,112,31,.12)); color: var(--teal-deep); font-weight: 900; }
    .home-loop-steps strong { color: var(--ink); line-height: 1.3; }
    .home-loop-steps small { color: var(--muted); line-height: 1.4; }
    .home-ecosystem { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.28fr); gap: clamp(22px, 4vw, 48px); align-items: start; }
    .home-path-list { display: grid; border-top: 1px solid var(--line); }
    .home-path-row { width: 100%; min-height: 76px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
    .home-path-row:hover { background: var(--bg-soft); }
    .home-path-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-control); color: var(--teal-deep); background: var(--accent-soft, rgba(176,112,31,.12)); }
    .home-path-row strong, .home-path-row small { display: block; }
    .home-path-row strong { color: var(--ink); font-size: 1rem; }
    .home-path-row small { margin-top: 3px; color: var(--muted); line-height: 1.38; }
    .home-path-cta { color: var(--teal-deep); font-size: .8rem; font-weight: 850; white-space: nowrap; }body[data-theme="dark"] .first-chord-help { background: rgba(255,255,255,0.05); }
    body[data-theme="dark"] .account-boundary { background: var(--panel-strong); }
    .home-greeting { margin-bottom: 18px; }
    .home-greeting-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
    .first-home-card { display: grid; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, rgba(176,112,31,0.12), rgba(217,169,40,0.08)), var(--panel-strong); margin-bottom: 18px; }
    .first-home-card h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.01em; }
    .first-home-card p { color: var(--soft); line-height: 1.5; max-width: 62ch; }
    .first-home-actions { display: flex; flex-wrap: wrap; gap: 10px; }
    body[data-theme="dark"] .first-home-card { background: linear-gradient(135deg, rgba(176,112,31,0.18), rgba(217,169,40,0.12)), var(--panel-strong); }
    /* Prominent classroom-invite prompt — the first thing a student sees on Home when invited. */
    .classroom-invite-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border: 1px solid rgba(176,112,31,0.34); border-radius: 12px; background: linear-gradient(150deg, rgba(176,112,31,0.16), transparent 75%), var(--panel-strong); margin-bottom: 18px; box-shadow: var(--shadow); }
    .classroom-invite-banner .cib-ico { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--teal); color: #fff; }
    .classroom-invite-banner .cib-ico svg { width: 20px; height: 20px; }
    .classroom-invite-banner .cib-body { flex: 1 1 240px; min-width: 0; }
    .classroom-invite-banner .cib-body strong { display: block; font-size: 1.02rem; color: var(--ink); }
    .classroom-invite-banner .cib-body span { color: var(--soft); font-size: 0.86rem; }
    .classroom-invite-banner .cib-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .rec-card { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(150deg, rgba(176,112,31,0.08), transparent 70%), var(--panel-strong); margin-bottom: 18px; }
    .rec-card-ico { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; background: var(--teal); color: #fff; }
    .rec-card-ico svg { width: 27px; height: 27px; }
    .rec-card-body strong { display: block; font-size: 1.22rem; color: var(--ink); letter-spacing: -0.01em; }
    .rec-card-body > span { display: block; color: var(--soft); }
    .rec-why { color: var(--muted) !important; font-size: 0.84rem; margin-top: 2px; }
    .rec-card-actions { display: grid; gap: 8px; justify-items: stretch; }@media (max-width: 620px) { .rec-card { grid-template-columns: 1fr; text-align: left; } .rec-card-actions { justify-items: start; } }
    body[data-theme="dark"] .rec-card { background: linear-gradient(150deg, rgba(176,112,31,0.16), transparent 70%), var(--panel-strong); }
    .jrny-card { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-strong); margin-bottom: 18px; }
    .jrny-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .jrny-times { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; }
    .jrny-time { min-height: 32px; padding: 0 12px; border-radius: 8px; background: transparent; color: var(--soft); font-weight: 800; font-size: 0.84rem; cursor: pointer; }
    .jrny-time.is-active { background: var(--teal); color: #fff; -webkit-text-fill-color: #fff; }
    body[data-theme="dark"] .jrny-time.is-active { color: #20160a; -webkit-text-fill-color: #20160a; }   /* dark accents are GOLD post-ONE-METAL — white failed AA (2.15:1, W5 scan 2026-07-12) */
    .jrny-lead { color: var(--muted); font-size: 0.88rem; margin: 6px 0 12px; }
    .jrny-list { display: grid; gap: 8px; }
    .jrny-step { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
    .jrny-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: #fff; font-weight: 850; font-size: 0.82rem; }
    .jrny-step-copy strong { display: block; color: var(--ink); font-size: 0.95rem; }
    .jrny-step-copy span { color: var(--muted); font-size: 0.82rem; }
    body[data-theme="dark"] .jrny-card { background: var(--panel-strong); }
    body[data-theme="dark"] .jrny-step { background: rgba(255,255,255,0.04); }
    .home-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }@media (max-width: 720px) { .home-two-col { grid-template-columns: 1fr; } }
    .home-continue { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-strong); }
    .home-continue .kicker { margin-bottom: 10px; }
    .home-continue .lib-card { cursor: pointer; align-items: center; }
    body[data-theme="dark"] .home-continue { background: var(--panel-strong); }
    .home-recent { margin-bottom: 18px; }
    .home-recent .kicker { margin-bottom: 8px; }
    .home-stat-link { cursor: pointer; }
    .home-stat-link strong { color: var(--teal-deep); }
    /* Shelf duo (owner 2026-07-17): count pill + its own arrow side-pill — flat where they meet. */
    .home-stat-duo { display: flex; align-items: stretch; padding: 0; overflow: hidden; }
    .home-duo-main { flex: 1; min-width: 0; border: 0; background: transparent; cursor: pointer; padding: 14px 4px 14px 10px; text-align: center; border-radius: 12px 0 0 12px; display: grid; gap: 4px; }
    .home-duo-main span { display: block; }
    .home-duo-arrow { border: 0; border-left: 1px solid var(--line); background: rgba(176, 112, 31, 0.08); color: var(--teal-deep); font-size: 1.15rem; font-weight: 800; padding: 0 12px; cursor: pointer; border-radius: 0 12px 12px 0; }
    .home-duo-arrow:hover, .home-duo-arrow:focus-visible { background: rgba(176, 112, 31, 0.16); }
    .welcome-startpoints { display: grid; gap: 8px; margin-top: 12px; }
    .welcome-sp { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
    .welcome-sp-ic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: rgba(176,112,31,0.12); color: var(--teal-deep); flex: 0 0 auto; }
    .welcome-sp-ic svg { width: 16px; height: 16px; }
    .welcome-sp strong { display: block; color: var(--ink); font-size: 0.9rem; }
    .welcome-sp span { color: var(--muted); font-size: 0.82rem; }
    body[data-theme="dark"] .welcome-sp { background: rgba(255,255,255,0.04); }

    .pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      min-height: 34px;
      padding: 7px 10px;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: #ffffff;
      color: var(--muted);
      font-size: 0.82rem;
      white-space: nowrap;
    }

    .hero-grid {
      display: grid;
      grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }

    .panel,
    .groove-card,
    .daily-panel,
    .guide-panel,
    .recent-panel {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--panel);
      box-shadow: var(--shadow);
      backdrop-filter: blur(14px);
    }

    .panel {
      padding: 18px;
    }

    .panel h2,
    .daily-panel h2,
    .guide-panel h2,
    .recent-panel h2,
    .section-title {
      font-size: 0.82rem;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--muted);
    }

    .control-stack {
      display: grid;
      gap: 14px;
      margin-top: 16px;
    }

    label,
    .field {
      display: grid;
      gap: 8px;
      color: var(--soft);
      font-size: 0.86rem;
    }

    input[type="range"] {
      width: 100%;
    }

    .field-label {
      color: var(--soft);
    }
    /* Inline SVG icons (icon() helper) — inherit text color + size, replace decorative emoji. */
    .gi { width: 1.1em; height: 1.1em; vertical-align: -0.16em; display: inline-block; flex: none; }
    .gi-play, .gi-pause { vertical-align: -0.1em; }

    .number-input {
      width: 100%;
      min-height: 46px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #ffffff;
      color: var(--ink);
      padding: 0 12px;
      outline: none;
    }

    .number-input::placeholder {
      color: var(--muted);
    }

    .quick-fields {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }

    .select-wrap {
      position: relative;
    }

    .select-button {
      width: 100%;
      min-height: 46px;
      padding: 0 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #ffffff;
      color: var(--ink);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      text-align: left;
      cursor: pointer;
      transition: border-color 160ms ease, background 160ms ease;
    }

    .select-button:hover,
    .select-wrap.is-open .select-button {
      border-color: rgba(176, 112, 31, 0.42);
      background: #f8fbfb;
    }
    /* dark mode: the open/hovered filter button stays dark — the light hover tint made the
       selected value unreadable (white box, near-white text) */
    body[data-theme="dark"] .select-button:hover,
    body[data-theme="dark"] .select-wrap.is-open .select-button {
      border-color: rgba(231, 194, 102, 0.55);
      background: #2a2115;
    }

    .select-value {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .select-caret {
      width: 8px;
      height: 8px;
      border-right: 2px solid var(--muted);
      border-bottom: 2px solid var(--muted);
      transform: rotate(45deg) translateY(-2px);
      flex: 0 0 auto;
    }

    .select-menu {
      display: none;
      margin-top: 6px;
      max-height: 270px;
      overflow: auto;
      padding: 6px;
      border: 1px solid var(--line-strong);
      border-radius: var(--radius);
      background: #ffffff;
      box-shadow: var(--shadow);
    }

    .select-wrap.is-open .select-menu {
      display: grid;
      gap: 4px;
    }

    .select-option {
      min-height: 42px;
      border-radius: 8px;
      padding: 8px 10px;
      background: transparent;
      color: var(--soft);
      text-align: left;
      cursor: pointer;
    }

    .select-option:hover {
      background: #f1f7f6;
      color: var(--ink);
    }

    .select-option.is-selected {
      background: #e2f4ef;
      color: var(--teal);
    }

    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    a:focus-visible {
      outline: 2px solid rgba(176, 112, 31, 0.45);
      outline-offset: 2px;
    }

    .range-row {
      display: grid;
      gap: 10px;
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #ffffff;
    }

    .range-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      color: var(--soft);
      font-size: 0.86rem;
    }

    input[type="range"] {
      accent-color: var(--teal);
    }

    /* SYSTEM CTA (art225, owner-approved cards): ONE subtle gold in both modes, ink text. */
    .primary-button {
      min-height: 52px;
      border-radius: var(--radius);
      color: #2b2114;
      background: linear-gradient(180deg,#c09a58,#a97f38);
      font-weight: 850;
      cursor: pointer;
      box-shadow: 0 1px 6px rgba(120,90,40,.22);
      transition: transform 170ms ease, box-shadow 170ms ease, filter 170ms ease;
    }

    .primary-button:hover {
      transform: translateY(-2px);
      background: linear-gradient(180deg,#c7a160,#b0873f);
      box-shadow: 0 2px 10px rgba(120,90,40,.28);
    }/* Secondary buttons are token-driven so an on-dark context can recolor the WHOLE state
       matrix — incl. hover — by setting these vars (kills white-on-white hover structurally). */
    .ghost-button, .mini-button {
      --gb-fg: var(--ink);
      --gb-bg: #ffffff;
      --gb-bd: var(--line);
      --gb-bg-hover: #f8fbfb;
      --gb-bd-hover: var(--line-strong);
      border: 1px solid var(--gb-bd);
      border-radius: var(--radius);
      color: var(--gb-fg);
      background: var(--gb-bg);
      cursor: pointer;
      transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
    }.ghost-button:hover, .mini-button:hover {
      transform: translateY(-1px);
      background: var(--gb-bg-hover);
      border-color: var(--gb-bd-hover);
    }

    /* Tactile press feedback — buttons dip on click for a responsive, premium feel (Wave 4). */
    .primary-button:active { transform: translateY(1px); box-shadow: var(--shadow-soft); }.ghost-button:active, .mini-button:active { transform: translateY(1px); }@media (prefers-reduced-motion: reduce) {.primary-button, .ghost-button, .mini-button { transition: none; }.primary-button:hover, .ghost-button:hover, .mini-button:hover, .primary-button:active, .ghost-button:active, .mini-button:active { transform: none; }
    }

    .mini-button {
      min-height: 44px;
      padding: 8px 10px;
      font-size: 0.86rem;
    }
    .mini-button.is-on { background: var(--teal); color: #fff; border-color: var(--teal); }

    .ghost-button {
      min-height: 44px;
      padding: 9px 12px;
    }

    .tab-row {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 5px;
      margin-top: 14px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #eef4f4;
    }

    .tab {
      min-height: 42px;
      border-radius: 8px;
      border: 1px solid transparent;
      background: transparent;
      color: var(--soft);
      cursor: pointer;
    }

    .tab.is-active {
      color: #ffffff;
      background: var(--teal);
      border-color: transparent;
      font-weight: 800;
    }

    .main-column {
      display: grid;
      gap: 18px;
    }

    .groove-card {
      position: relative;
      overflow: hidden;
      padding: clamp(18px, 3vw, 28px);
      background: var(--panel-strong);
      animation: riseIn 320ms ease;
    }

    .groove-card::before {
      content: "";
      position: absolute;
      inset: 0 0 auto;
      height: 3px;
      pointer-events: none;
      background: linear-gradient(90deg, var(--teal), #7fb8ce, var(--gold));
      opacity: 0.78;
    }

    .groove-card > * {
      position: relative;
      z-index: 1;
    }

    .card-head {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: flex-start;
      margin-bottom: 18px;
    }

    .card-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .eyebrow {
      color: var(--teal);
      text-transform: uppercase;
      letter-spacing: 0.14em;
      font-size: 0.78rem;
      font-weight: 750;
      margin-bottom: 8px;
    }

    .groove-title {
      font-size: clamp(2rem, 4.5vw, 4rem);
      line-height: 1;
      letter-spacing: 0;
      max-width: 780px;
    }

    .favorite-toggle {
      min-width: 92px;
      white-space: nowrap;
    }

    .meta-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 10px;
      margin: 18px 0;
    }

    .meta-item {
      min-height: 68px;
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #f8fafb;
      display: grid;
      gap: 4px;
    }

    .meta-label {
      color: var(--muted);
      font-size: 0.74rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
    }

    .meta-value {
      font-weight: 780;
      color: var(--ink);
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .chord-strip {
      margin: 18px 0;
      padding: 16px;
      border-radius: var(--radius);
      border: 1px solid var(--line);
      background: #f3f7f7;
    }
    /* Quick Play + New-groove right under the chords, so the backing track + reroll are
       reachable without scrolling to the player panel (matters most on mobile). */
    .tempo-quick { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
    .tempo-quick-label { color: var(--muted); font-size: 0.74rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.07em; flex: 0 0 auto; }
    .tempo-quick input[type="range"] { flex: 1 1 auto; min-width: 0; margin: 0; }
    .tempo-quick-val { flex: 0 0 auto; font-size: 0.88rem; font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
    body[data-theme="dark"] .tempo-quick { background: rgba(255, 255, 255, 0.05); }
    .accomp-quick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
    .accomp-quick .seg-row { width: auto; flex: 1 1 240px; min-width: min(240px, 100%); }
    /* inherit the 44px --control-min tap target (was a cramped 36px) */
    body[data-theme="dark"] .accomp-quick { background: rgba(255, 255, 255, 0.05); }
    /* Minus-one "Your part" control — sits with the other deck quick-controls; gold accent when engaged. */
    .playalong-quick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); transition: border-color var(--motion-ui, .2s) var(--ease-ui, ease), background var(--motion-ui, .2s) var(--ease-ui, ease); }
    .playalong-quick .seg-row { width: auto; flex: 1 1 240px; min-width: min(240px, 100%); }
    .playalong-quick .seg svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; }
    .playalong-hint { flex: 1 0 100%; color: var(--muted); font-size: 0.78rem; line-height: 1.35; margin: 2px 0 0; }
    .playalong-quick.is-on { border-color: color-mix(in srgb, var(--gold, #c98a23) 55%, var(--line)); background: color-mix(in srgb, var(--gold, #c98a23) 9%, var(--bg-soft)); }
    .playalong-quick.is-on .playalong-hint { color: color-mix(in srgb, var(--gold, #c98a23) 55%, var(--ink)); font-weight: 650; }
    body[data-theme="dark"] .playalong-quick { background: rgba(255, 255, 255, 0.05); }
    .chord-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .chord-quick-actions .quick-play { flex: 1 1 auto; min-height: 44px; }
    .chord-quick-actions .quick-new { flex: 0 0 auto; min-height: 44px; }
    .chord-quick-actions .quick-play.is-playing { background: var(--gold, #e2b657); color: #2a1c06; }

    .compact-transport {
      position: fixed;
      width: auto; max-width: min(560px, calc(100% - 32px));
      left: auto;
      right: max(16px, env(safe-area-inset-right));
      bottom: calc(12px + env(safe-area-inset-bottom));
      z-index: 55;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line-strong);
      border-radius: 12px;
      background: rgba(255,255,255,0.94);
      box-shadow: var(--shadow);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
    }
    body.has-compact-transport .shell { padding-bottom: 112px; }
    .compact-copy { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
    .compact-copy strong, .compact-copy span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .compact-copy strong { font-size: 0.9rem; color: var(--ink); }
    .compact-copy span { font-size: 0.76rem; color: var(--muted); font-weight: 750; }
    /* 46px targets (Apple's 44px minimum + margin) + touch-action so iOS taps register cleanly —
       38px buttons made the Stop button miss on iPhone. */
    .compact-transport .mini-button, .compact-transport .primary-button { min-height: 46px; padding: 10px 16px; white-space: nowrap; touch-action: manipulation; }
    body[data-theme="dark"] .compact-transport { background: rgba(22,18,12,0.94); }@media (max-width: 720px) {
      .compact-transport {
        width: auto;
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(76px + env(safe-area-inset-bottom));
        padding: 8px;
      }
      body.has-compact-transport .shell { padding-bottom: calc(148px + env(safe-area-inset-bottom)); }
    }

    .voicing-section {
      display: grid;
      gap: 10px;
      margin-top: 14px;
    }

    .toggle-button {
      min-height: 36px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #ffffff;
      color: var(--ink);
      padding: 7px 10px;
      font-weight: 800;
      cursor: pointer;
      white-space: nowrap;
    }

    .mini-keys {
      position: relative;
      display: grid;
      grid-template-columns: repeat(7, minmax(0, 1fr));
      height: 72px;
      padding: 0 2px 2px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #d8e0e4;
      overflow: hidden;
    }
    /* Learn "note map": a taller octave with dual-named black keys (F♯/G♭ — same note, two names).
       Black keys keep the real-piano 58% proportion; labelled ones get a touch more width so the
       two tiny names fit, but never the old key-length stretch. */
    .mini-keys.octave-map { height: 100px; }
    .mini-keys.octave-map .mini-key.is-black.has-names { width: 10.5%; }
    .mini-keys.octave-map .bk-names { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: grid; gap: 1px; }
    .mini-keys.octave-map .bk-names b { font-size: 0.52rem; font-weight: 800; color: #f2f5f7; line-height: 1.05; white-space: nowrap; }
    /* Learn "one string, first frets" strip — frets as cells on a horizontal string. */
    .lesson-fretstrip { margin-top: 10px; }
    .lesson-fretstrip .fs-string { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel-strong); }
    .lesson-fretstrip .fs-string::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: var(--teal); opacity: 0.5; }
    .lesson-fretstrip .fs-cell { position: relative; display: grid; place-items: center; gap: 1px; padding: 12px 4px 9px; border-left: 2px solid var(--line); }
    .lesson-fretstrip .fs-cell:first-child { border-left: 0; background: var(--bg-soft); }
    .lesson-fretstrip .fs-cell b { position: relative; z-index: 1; font-size: 0.82rem; color: var(--ink); background: var(--panel-strong); padding: 1px 6px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
    .lesson-fretstrip .fs-cell small { position: relative; z-index: 1; font-size: 0.6rem; color: var(--muted); font-weight: 700; }
    .lesson-fretstrip .fs-note { margin: 7px 0 0; color: var(--soft); font-size: 0.8rem; }

    .mini-key {
      position: relative;
      min-height: 0;
      border: 1px solid rgba(43, 33, 20, 0.18);
      border-top: 0;
      border-radius: 0 0 5px 5px;
      background: #ffffff;
      display: flex;
      align-items: end;
      justify-content: center;
      padding: 0 0 5px;
      color: var(--muted);
      font-size: 0.62rem;
      font-weight: 850;
      z-index: 1;
      cursor: pointer;
      font-family: inherit;
      -webkit-appearance: none;
      appearance: none;
      transition: filter 0.1s ease, transform 0.05s ease;
    }
    .mini-key:hover { filter: brightness(0.95); }
    .mini-key:active { transform: translateY(1px); filter: brightness(0.88); }
    .mini-key:focus-visible { outline: 2px solid var(--accent, var(--blue)); outline-offset: 1px; z-index: 6; }
    .lesson-tap-hint { font-size: 0.78rem; color: var(--muted); margin: 2px 0 0; }

    /* Black keys read like a REAL piano (owner call): narrower, ~58% of the white key's length,
       a subtle top-lit gradient, and a tight bottom radius. height (not min-height) keeps the
       proportion at every widget size. */
    .mini-key.is-black {
      position: absolute;
      top: 0;
      width: 8%;
      height: 44px;
      min-height: 0;
      background: linear-gradient(180deg, #3a322b 0%, #241f1a 55%, #161310 100%);
      color: transparent;
      border-color: rgba(0, 0, 0, 0.4);
      border-radius: 0 0 3px 3px;
      box-shadow: 0 2px 3px rgba(8, 14, 18, 0.35);
      z-index: 3;
      transform: translateX(-50%);
      padding: 0;
    }
    .mini-keys.octave-map .mini-key.is-black { height: 62px; }

    /* Explicit values, both themes — the rule .pkbd states below. var(--teal) FLIPS (near-black light,
       gold dark) and "C major on the map" lights all 7 naturals, so the keyboard painted solid black /
       solid gold and stopped reading as a piano. A lit key must look like a lit WHITE key. */
    .mini-key.is-active {
      background: linear-gradient(180deg, #f2d089 0%, #e7c266 55%, #d9a95a 100%);
      border-color: rgba(43, 33, 20, 0.3);
      color: #2b2114;
      box-shadow: inset 0 -3px 0 rgba(43, 33, 20, 0.16);
    }

    /* A lit black key stays BLACK — the gold rim marks it. Swapping the fill to gold dissolves the
       keyboard's shape. */
    .mini-key.is-black.is-active {
      background: linear-gradient(180deg, #6b5a3a 0%, #4a3d28 55%, #332a1c 100%);
      border-color: #e7c266;
      box-shadow: 0 0 0 1px #e7c266, 0 2px 3px rgba(8, 14, 18, 0.35);
      color: transparent;
    }

    /* Two-hand voicing keyboard (≈3 octaves). Explicit colors → correct in light & dark. */
    .pkbd {
      position: relative;
      width: 100%;
      height: 80px;
      margin-top: 4px;
      border: 1px solid rgba(43, 33, 20, 0.22);
      border-radius: var(--radius);
      background: #c9d2d7;
      overflow: hidden;
    }
    .pk-w {
      position: absolute; top: 0; bottom: 0;
      background: #fbfdfd;
      border-right: 1px solid rgba(43, 33, 20, 0.15);
      display: flex; align-items: flex-end; justify-content: center;
      padding-bottom: 5px;
      font-size: 0.56rem; font-weight: 850; color: #59666f;
      z-index: 1;
    }
    .pk-b {
      position: absolute; top: 0; height: 60%;
      background: #241d18;
      border-radius: 0 0 4px 4px;
      display: flex; align-items: flex-end; justify-content: center;
      padding-bottom: 3px;
      font-size: 0.48rem; font-weight: 850; color: #eef2f3;
      z-index: 2;
    }
    .pk-w.is-lh, .pk-b.is-lh { background: #56688a; color: #ffffff; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.14); }
    .pk-w.is-rh, .pk-b.is-rh { background: #e0a52a; color: #2b2104; box-shadow: inset 0 -3px 0 rgba(0,0,0,0.14); }
    .pk-w b, .pk-b b { color: inherit; }
    /* ----- Chord voicing engine ----- */
    .vc-engine { margin-top: 12px; }
    .vc-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; }
    .vc-toolbar-main { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
    .vc-toolbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .voicing-style-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
    .voicing-style-seg { width: auto; max-width: 320px; }
    .voicing-style-seg .seg { padding: 7px 12px; font-size: 0.8rem; }
    .voicing-adv { width: auto; min-width: 130px; padding: 7px 10px; font-size: 0.82rem; }
    .voicing-adv.is-active { border-color: var(--teal); color: var(--teal-deep); font-weight: 800; }
    .vc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }@media (min-width: 760px) { .vc-grid { grid-template-columns: repeat(2, 1fr); } }   /* 2 per row so the keyboards aren't crammed */
    .vc-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-strong); padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 8px; }
    .vc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
    .vc-name { font-weight: 850; font-size: 1.02rem; color: var(--ink); }
    .vc-diff { font-size: 0.6rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.05em; padding: 2px 6px; border-radius: 999px; }
    .vc-diff.is-beg { color: var(--teal-deep); background: rgba(176, 112, 31, 0.14); }
    .vc-diff.is-int { color: #7b5b05; background: rgba(176, 112, 31, 0.18); }
    .vc-diff.is-adv { color: #6b3bd1; background: rgba(124, 92, 255, 0.14); }
    /* Chord card 2.0: one diagram at a time + instrument tabs + ‹ › voicing cycling. */
    .chord-peek-card .vc-grid { grid-template-columns: 1fr; margin-top: 4px; }
    .chord-peek-card .vc-card-head { justify-content: flex-start; }
    .chord-peek-card .vc-diff { margin-left: auto; }
    .vc-cycle { display: flex; align-items: center; justify-content: center; gap: 10px; }
    .vc-cycle .mini-button { width: 38px; min-height: 34px; font-size: 1.2rem; padding: 0; }
    .vc-cycle-pos { font-size: 0.8rem; font-weight: 750; color: var(--muted); min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
    .vc-root-tag { font-size: 0.62rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.05em; color: var(--teal-deep); background: rgba(176,112,31,0.14); padding: 2px 7px; border-radius: 999px; }
    .vc-why { color: var(--soft); font-size: 0.8rem; line-height: 1.4; margin: 0; }
    .vc-visual { display: flex; justify-content: center; align-items: center; min-height: 96px; }
    .vc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
    .vc-notes { color: var(--soft); font-size: 0.78rem; line-height: 1.3; }
    .vc-notes code { font-family: ui-monospace, Menlo, monospace; color: var(--ink); font-weight: 800; }
    .vc-hands { display: flex; flex-direction: column; gap: 2px; font-size: 0.74rem; line-height: 1.25; }
    .vc-h { font-weight: 800; letter-spacing: 0.01em; }
    .vc-lh { color: #2f6dc0; }
    .vc-rh { color: #a9760f; }
    .vc-legend { display: inline-flex; align-items: center; gap: 4px; font-size: 0.72rem; font-weight: 700; color: var(--muted); margin-left: 2px; }
    .vc-key-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
    .vc-key-dot.is-lh { background: #56688a; }
    .vc-key-dot.is-rh { background: #e0a52a; margin-left: 8px; }
    body[data-theme="dark"] .vc-lh { color: #8db8f2; }
    body[data-theme="dark"] .vc-rh { color: #e7c267; }
    .vc-play { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--teal-deep); cursor: pointer; font-size: 0.8rem; }
    .vc-play:hover { background: var(--teal); color: #fff; border-color: var(--teal); }
    .vc-none { color: var(--muted); font-size: 0.84rem; text-align: center; padding: 18px 6px; }
    /* Fretboard diagram */
    .fretboard { display: block; }
    .fretboard .fb-string { stroke: rgba(43, 33, 20, 0.4); stroke-width: 1.4; }
    .fretboard .fb-fret { stroke: rgba(43, 33, 20, 0.28); stroke-width: 1.4; }
    .fretboard .fb-nut { stroke: var(--ink); stroke-width: 4; }
    .fretboard .fb-dot { fill: var(--teal); }
    .fretboard .fb-barre { fill: var(--teal); opacity: 0.92; }
    .fretboard .fb-finger { fill: #fff; font-size: 11px; font-weight: 800; font-family: Inter, system-ui, sans-serif; }
    .fretboard .fb-marker { fill: var(--muted); font-size: 12px; font-weight: 800; font-family: Inter, system-ui, sans-serif; }
    .fretboard .fb-marker.fb-open { fill: var(--teal-deep); }
    .fretboard .fb-pos { fill: var(--muted); font-size: 11px; font-weight: 800; font-family: Inter, system-ui, sans-serif; }
    /* Theory panel */
    .vc-theory { margin-top: 14px; border: 1px solid var(--line); border-left: 4px solid #7c5cff; border-radius: var(--radius); background: var(--bg-soft); padding: 14px 16px; display: grid; gap: 8px; }
    .vc-th-head { font-weight: 850; color: var(--ink); display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
    .vc-th-key { font-weight: 650; color: var(--muted); font-size: 0.82rem; }
    .vc-th-intro { color: var(--soft); font-size: 0.9rem; line-height: 1.55; margin: 0; }
    .vc-th-intro strong { color: var(--ink); }
    .vc-th-sub { margin: 4px 0 0; font-size: 0.74rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
    .vc-th-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--soft); font-size: 0.9rem; }
    .vc-th-list li { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--panel-strong); border: 1px solid var(--line); }
    .vc-th-chord { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
    .vc-th-chord strong { color: var(--ink); font-size: 0.98rem; }
    .vc-th-rom { display: inline-block; min-width: 26px; color: #6b3bd1; font-weight: 800; }
    .vc-th-role { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: rgba(124, 92, 255, 0.1); padding: 2px 7px; border-radius: 999px; }
    .vc-th-role.is-home { color: var(--teal-deep); background: rgba(176, 112, 31, 0.14); }
    .vc-th-detail { color: var(--soft); line-height: 1.45; font-size: 0.85rem; }
    .vc-th-notes { color: var(--muted); font-weight: 700; }
    .vc-th-notes::before { content: "· notes "; color: var(--muted); font-weight: 400; }
    .vc-th-note { color: var(--soft); font-size: 0.88rem; line-height: 1.5; margin: 0; }
    .vc-th-learn { margin: 4px 0 0; }
    .vc-th-learnlink { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--teal-text, var(--teal)); font-size: 0.86rem; font-weight: 760; cursor: pointer; text-align: left; }
    .vc-th-learnlink:hover { text-decoration: underline; }
    .vc-th-learnlink .gi { width: 15px; height: 15px; }
    body[data-theme="dark"] .vc-card { background: var(--panel-strong); }
    body[data-theme="dark"] .vc-play { background: var(--panel-strong); }
    body[data-theme="dark"] .fretboard .fb-string { stroke: rgba(220, 230, 235, 0.4); }
    body[data-theme="dark"] .fretboard .fb-fret { stroke: rgba(220, 230, 235, 0.26); }
    body[data-theme="dark"] .fretboard .fb-nut { stroke: #dfe7ea; }
    body[data-theme="dark"] .vc-th-rom { color: #b9a3ff; }
    body[data-theme="dark"] .vc-diff.is-adv { color: #c3b0ff; }

    .chord-label {
      color: var(--teal);
      text-transform: uppercase;
      letter-spacing: 0.12em;
      font-size: 0.74rem;
      margin-bottom: 10px;
      font-weight: 760;
    }

    .chords {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      align-items: center;
      /* Sized so four jazzy symbols (e.g. Gmaj9 F13 Em9 Ebmaj9) fit on ONE line inside the
         card column at iPad-landscape and full-screen widths — the old 3.1vw/2.85rem scaled
         with the viewport (not the card) and forced an awkward wrap. */
      font-size: clamp(1.3rem, 2.2vw, 2.1rem);
      line-height: 1.05;
      font-weight: 900;
      letter-spacing: 0;
    }

    .chord {
      display: inline-flex;
      align-items: center;
      min-height: 50px;
      padding: 8px 12px;
      border-radius: var(--radius);
      color: var(--ink);
      background: #ffffff;
      border: 1px solid var(--line);
      box-shadow: none;
    }

    /* One label system for every chord name: the length bucket sets a scale variable that
       composes with the surface's own font size, so long symbols shrink to fit — never
       overflowing or ballooning past the container. */
    .chord-name {
      display: inline-block;
      max-width: 100%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: clip;
      line-height: 1.05;
      font-size: calc(1em * var(--chord-scale, 1));
    }
    .chord-name[data-len="m"]  { --chord-scale: 0.92; }
    .chord-name[data-len="l"]  { --chord-scale: 0.78; letter-spacing: -0.01em; }
    .chord-name[data-len="xl"] { --chord-scale: 0.64; letter-spacing: -0.02em; }

    .slash {
      color: var(--muted);
      font-weight: 700;
    }
    .mission-chip { align-self: flex-start; font-size: 0.62rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-deep); background: rgba(176, 112, 31, 0.12); border: 1px solid rgba(176, 112, 31, 0.28); border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
    body[data-theme="dark"] .mission-chip { color: #e7c266; background: rgba(176, 112, 31, 0.2); }
    /* One-tap save (favorite) right on the deck — a quick path next to the More drawer's Save groove. */
    .card-head-actions { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
    .card-head-actions:empty { display: none; }
    /* Save heart sits inline next to the groove title (cleaner than floating in the corner). */
    .title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
    .title-row .groove-title { flex: 0 1 auto; }
    .title-row .deck-heart { flex: none; align-self: center; }
    .deck-heart { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; flex: none; transition: color .12s, border-color .12s, background .12s, transform .08s; }
    .deck-heart svg { width: 20px; height: 20px; }
    .deck-heart:active { transform: scale(.96); }@media (hover: hover) { .deck-heart:hover { color: var(--gold, #c98a23); border-color: var(--gold, #c98a23); } }
    .deck-heart.is-saved { color: var(--gold, #c98a23); border-color: var(--gold, #c98a23); background: rgba(217,169,40,0.12); }
    .deck-heart.is-saved svg { fill: currentColor; }

    .beat-panel {
      display: grid;
      grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
      gap: 16px;
      align-items: center;
    }

    .pulse-stage {
      min-height: 150px;
      border-radius: var(--radius);
      border: 1px solid var(--line);
      background: var(--panel-strong);   /* was #f8fbfb — a cold cyan-white on the Home beat stage (ONE LIGHT) */
      display: grid;
      gap: 16px;
      place-items: center;
      padding: 22px;
    }

    .pulse-core {
      min-width: 112px;
      min-height: 42px;
      border-radius: 999px;
      border: 1px solid var(--line);
      display: inline-grid;
      place-items: center;
      background: #ffffff;
      color: var(--teal-deep);
      font-weight: 900;
      font-size: 0.95rem;
      box-shadow: var(--shadow-soft);
    }

    .beat-dot {
      min-height: 42px;
      border-radius: var(--radius);
      border: 1px solid var(--line);
      display: grid;
      place-items: center;
      color: var(--muted);
      background: #ffffff;
      font-weight: 850;
      transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
    }

    .beat-dot.is-active {
      color: #ffffff;
      background: var(--teal);
      border-color: transparent;
      box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08);
    }

    .player-copy {
      display: grid;
      gap: 12px;
    }

    .player-copy h2 {
      color: var(--ink);
      font-size: clamp(1.45rem, 3vw, 2.35rem);
      line-height: 1;
      letter-spacing: 0;
      text-transform: none;
    }

    .player-copy p {
      color: var(--muted);
      line-height: 1.5;
    }

    /* ---- backing band mixer ---- */
    .band-mixer {
      margin-top: 4px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: rgba(255, 255, 255, 0.6);
      padding: 12px;
      display: grid;
      gap: 12px;
    }
    .mixer-label {
      font-size: 0.72rem;
      text-transform: uppercase;
      letter-spacing: 0.09em;
      font-weight: 800;
      color: var(--muted);
      margin: 0 0 6px;
    }
    .mix-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .mix-toggle {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
      padding: 9px 6px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #fff;
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 700;
      cursor: pointer;
      min-height: var(--control-min);
      transition: all 0.15s ease;
      opacity: 0.55;
    }
    .mix-toggle .mix-icon { font-size: 1.1rem; filter: grayscale(1); }
    .mix-toggle.is-on {
      opacity: 1;
      color: var(--ink);
      border-color: var(--teal);
      background: rgba(176, 112, 31, 0.08);
      box-shadow: inset 0 0 0 1px rgba(176, 112, 31, 0.25);
    }
    .mix-toggle.is-on .mix-icon { filter: none; }
    /* Per-instrument mixer channels (volume + on/off) */
    .mix-channels { display: grid; gap: 8px; }
    .mix-ch {
      display: grid;
      grid-template-columns: auto 1fr minmax(96px, 150px) auto;
      align-items: center;
      gap: 10px;
      padding: 7px 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #fff;
      transition: opacity 0.15s ease, border-color 0.15s ease;
    }
    .mix-ch.is-muted { opacity: 0.5; }
    .mix-ch.is-extra { border-color: rgba(86, 104, 138, 0.32); background: rgba(86, 104, 138, 0.05); }
    /* Minus-one: the taken part is a statement, not a control. */
    .mix-ch.is-you { grid-template-columns: auto auto 1fr; }
    .mix-ch.is-you .mix-power, .mix-toggle.is-you { cursor: default; }
    .mix-toggle.is-you { opacity: 1; color: var(--ink); border-style: dashed; }
    .mix-power {
      width: 30px; height: 30px;
      display: grid; place-items: center;
      border: 1px solid var(--line);
      border-radius: 50%;
      background: var(--bg-soft);
      font-size: 0.95rem;
      cursor: pointer;
      filter: grayscale(1);
      transition: all 0.15s ease;
    }
    .mix-power.is-on { filter: none; border-color: var(--teal); background: rgba(176, 112, 31, 0.1); box-shadow: inset 0 0 0 1px rgba(176, 112, 31, 0.25); }
    .mix-ch-name { font-size: 0.84rem; font-weight: 700; color: var(--ink); min-width: 0; }
    .mix-slider { width: 100%; accent-color: var(--teal); cursor: pointer; }
    .mix-remove { border: 0; background: transparent; color: var(--muted); font-size: 1.05rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; min-width: 24px; min-height: 24px; }
    .mix-remove:hover { color: var(--rose); background: rgba(184, 92, 80, 0.1); }
    .mix-add { display: grid; gap: 6px; }
    .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
    .add-chip {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 6px 12px;
      border: 1px dashed var(--line-strong);
      border-radius: 999px;
      background: transparent;
      color: var(--soft);
      font-size: 0.8rem; font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .add-chip::before { content: "+"; font-weight: 800; color: var(--teal); }
    .add-chip:hover { border-color: var(--teal); background: rgba(176, 112, 31, 0.06); color: var(--ink); }
    /* Mixer instrument icons are clean SVG now (no platform-variant emoji) — size + tint per state. */
    .mix-power .gi, .mix-icon .gi { width: 17px; height: 17px; color: var(--soft); }
    .mix-power.is-on .gi, .mix-toggle.is-on .mix-icon .gi { color: var(--teal); }
    .add-chip .gi { width: 16px; height: 16px; color: var(--teal); }
    .mix-note { font-size: 0.74rem; color: var(--muted); margin: 0; line-height: 1.4; }
    .mix-extra-row { display: flex; gap: 8px; flex-wrap: wrap; }
    .mix-extra-row .mix-toggle { flex-direction: row; gap: 6px; padding: 7px 12px; opacity: 0.6; }
    .mix-extra-row .mix-toggle.is-on { opacity: 1; }
    body[data-theme="dark"] .mix-ch { background: var(--panel-strong); }
    body[data-theme="dark"] .mix-power { background: rgba(255, 255, 255, 0.06); }@media (max-width: 480px) {
      .mix-ch { grid-template-columns: auto 1fr auto; }
      .mix-ch .mix-slider { grid-column: 1 / -1; grid-row: 2; }
      .mix-ch .mix-remove { grid-column: 3; grid-row: 1; }
    }
    .link-upgrade { border: 0; background: none; padding: 0; color: var(--teal-deep); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
    /* Premium lock panel + nav lock */

    /* THE STUDIO LIGHTS UP (2026-07-12): first-visit walk-in on the signed-out Home. Sections
       wait in the dark below the fold and rise into the light as you reach them; the painted
       practice room brightens like the lamps coming on. body.lights-up + [data-lit] come from
       JS for one browser session only — without JS or under reduced motion nothing dims. */
    body.lights-up section[data-lit] { opacity: .22; transform: translateY(26px); transition: opacity .75s var(--ease-ui), transform .75s var(--ease-ui); }
    body.lights-up section[data-lit].is-lit { opacity: 1; transform: none; }
    body.lights-up section.studio-teaser[data-lit] { filter: brightness(.5) saturate(.85); transition: opacity .75s var(--ease-ui), transform .75s var(--ease-ui), filter 1.2s var(--ease-ui); }
    body.lights-up section.studio-teaser[data-lit].is-lit { filter: none; }
    @media (prefers-reduced-motion: reduce) { body.lights-up section[data-lit] { opacity: 1; transform: none; filter: none; transition: none; } }

    .first-chord-pos { color: var(--muted); font-size: 0.78rem; font-variant-numeric: tabular-nums; }
    /* Owner 2026-07-14: "after Soft there needs to be a space before chords". Already display:block,
       just zero breathing room, so the two lines collided as one lump. */
    /* THE SPACE HE KEPT ASKING FOR (2026-07-15): block/margin-top did nothing inside a flex ROW —
       "Softchords" butted together; a horizontal gap is what a flex row needs. (Build > Energy.) */
    .seg-sub { margin-left: 6px; font-size: 0.62rem; font-weight: 650; color: inherit; opacity: 0.75; letter-spacing: 0.02em; line-height: 1.25; }
    /* Owner 2026-07-14: loop-on chip calmed (full note in git). */
    .arr-loop-chip.is-on { border-color: var(--gold); }
    .tool-pulse-host .home-pulse { margin: 0; }

    /* the activation nudge: the hero play pulses once for scroll-without-play visitors */
    .stage-play.is-nudged { animation: gwCountPulse 0.9s ease-in-out 4; }
    .stage-nudge-note { display: block; margin-top: 10px; color: #d9a95a; font-size: 0.86rem; font-weight: 650; }
    /* the shelf moment's share chip */
    .shelf-mini .shelf-share { flex: 0 0 auto; margin-left: 10px; }
    .shelf-mini { display: flex; align-items: center; }
