/* Online Harmonium (newellabs.com/play/harmonium). Self-contained; system fonts only. */
:root {
  color-scheme: light dark;
  --bg: #f6efe4; --well: #ede3d3; --card: #fffcf7;
  --ink: #1d1712; --ink-2: #3f352c; --muted: #5f554b; --faint: #a3978a; --done: #74695e;
  --line: #e3d7c4; --line-strong: #cdbca3;
  --accent: #8a3a12; --accent-bright: #e0892c; --glow: rgba(236, 146, 50, .6);
  --focus: #2459d6; --rec: #c2362b; --rec-on: #c2362b;
  --wood-1: #7d4024; --wood-2: #5c2b15; --wood-3: #3a190a; --grain: rgba(0, 0, 0, .07);
  --case-ink: #f8ead2; --case-muted: #e0c9a6;
  --brass-1: #fff1cc; --brass-2: #d8a650; --brass-3: #865418;
  --ivory: #fcf8ef; --ivory-2: #e8dfcd; --ivory-down: #eedfc3; --ivory-ink: #1d1712; --ivory-muted: #6a5c4d;
  --ebony: #231a15; --ebony-2: #3b2e26; --ebony-down: #4c3b30; --ebony-ink: #f6ead8;
  --sa: #a44a06; --next: #f3a23e; --next-ink: #2a1708; --seg-on: var(--card);
  --veil: rgba(246, 239, 228, .45);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Devanagari", "Kohinoor Devanagari", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110e; --well: #1f1915; --card: #231c17;
    --ink: #f1e9de; --ink-2: #d7ccbf; --muted: #ab9f92; --faint: #645a50; --done: #8f8478;
    --line: #342a22; --line-strong: #4b3e33;
    --accent: #f2b46c; --accent-bright: #e8963a; --glow: rgba(240, 160, 70, .5);
    --focus: #93b4ff; --rec: #ee5b4d; --rec-on: #c0392f;
    --wood-1: #5e2f19; --wood-2: #44200f; --wood-3: #2a1207; --grain: rgba(0, 0, 0, .14);
    --ivory: #ebe3d4; --ivory-2: #cfc4b1; --ivory-down: #e0d2b6;
    --ebony: #17110d; --ebony-2: #30251e; --ebony-down: #45362c;
    --veil: rgba(21, 17, 14, .45);
    --seg-on: #45382d;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--sans); overflow-x: hidden; }
a { color: inherit; text-decoration-color: var(--accent-bright); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button { font: inherit; color: inherit; touch-action: manipulation; }
.seg label { touch-action: manipulation; }
kbd { font: 500 .82em/1 var(--mono); display: inline-block; min-width: 1.6em; padding: .22em .38em; text-align: center; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--card); color: var(--ink); }
/* viewport-fit=cover: keep clear of the notch and rounded corners on phones turned sideways. */
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
[hidden] { display: none !important; }
.fine-only { display: none; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; }
.skip:focus { left: 16px; }

/* Header, hero, footer */
.top { border-bottom: 1px solid var(--line); }
.top-in { min-height: 54px; display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; text-decoration: none; font-weight: 650; font-size: 15px; padding: 8px 0; }
.brand svg { width: 22px; height: 22px; color: var(--accent-bright); }
.brand-sub { color: var(--muted); font-weight: 500; margin-left: 2px; }
.brand-sub::before { content: "/"; margin-right: 6px; color: var(--faint); }
.hero { padding-top: 18px; padding-bottom: 2px; }
h1 { font: 700 clamp(2rem, 7vw, 3rem)/1.05 var(--serif); letter-spacing: -.01em; margin: 0 0 6px; }
.lede { margin: 0; color: var(--ink-2); max-width: 640px; font-size: 1rem; line-height: 1.45; }
.foot { border-top: 1px solid var(--line); margin-top: 56px; padding: 22px 0 32px; color: var(--muted); font-size: .9rem; }
.foot p { margin: 0; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 20px; }
.foot a { color: var(--muted); display: inline-block; padding: 12px 0; }

/* Toolbar */
.stage { padding-top: 14px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; margin: 0 0 12px; }
.field { display: flex; align-items: center; gap: 8px; min-width: 0; }
.field-grow { flex: 1 1 260px; max-width: 420px; }
.field:first-child .cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.cap, .seg-cap { font: 650 11px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.seg-cap { padding: 0 6px; }
#lab-cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.seg { display: inline-flex; align-items: center; background: var(--well); border: 1px solid var(--line); border-radius: 13px; padding: 2px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg label { min-height: 44px; min-width: 44px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s; }
.seg input:checked + label { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px var(--line); }
.seg input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 1px; }
.seg-sm label { min-height: 44px; font-size: 13px; padding: 0 9px; }
.pick { position: relative; flex: 1 1 auto; min-width: 0; display: flex; }
.pick::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -6px; border: solid var(--ink-2); border-width: 0 2px 2px 0; transform: rotate(45deg); pointer-events: none; }
.pick select { -webkit-appearance: none; appearance: none; width: 100%; min-width: 0; min-height: 44px; padding: 0 34px 0 13px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink); font: 600 15px/1.2 var(--sans); cursor: pointer; text-overflow: ellipsis; }
.pick-scale select { border-color: var(--accent-bright); }
.pick select:hover { border-color: var(--accent-bright); }
.pick select.has-item { border-color: var(--accent-bright); box-shadow: inset 0 0 0 1px var(--accent-bright); }
.pick select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--card); font-size: 15px; font-weight: 600; cursor: pointer; transition: border-color .15s, background-color .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; transform: none; border-color: var(--line-strong); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-sm { min-height: 44px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-icon { padding: 0; width: 44px; }
.link-btn { background: none; border: 0; padding: 4px 2px; min-height: 32px; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--accent-bright); text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--rec); flex: none; transition: border-radius .15s; }
.btn-rec[aria-pressed="true"] { background: var(--rec-on); border-color: var(--rec-on); color: #fff; }
.btn-rec[aria-pressed="true"] .rec-dot { background: #fff; border-radius: 2px; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.btn .i-stop { display: none; }
.btn.is-playing .i-stop { display: block; }
.btn.is-playing .i-play { display: none; }
#play.attention:not([disabled]) { border-color: var(--accent-bright); box-shadow: 0 0 0 3px var(--glow); }

/* Practice panel */
.along { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px 8px; margin: 0 0 12px; }
.along-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.along-title { margin: 0; font-size: 15px; line-height: 1.3; }
.along-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; margin-left: 4px; white-space: nowrap; }
.along-actions { display: flex; gap: 6px; }
.strip { position: relative; display: flex; gap: 3px; overflow-x: auto; padding: 12px 2px 12px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent); }
.strip::-webkit-scrollbar { display: none; }
.strip::before, .strip::after { content: ""; flex: none; width: 40%; }
.tok { flex: none; min-width: 34px; padding: 4px 5px 6px; display: inline-flex; justify-content: center; border-radius: 8px; font-weight: 650; font-size: 17px; line-height: 1.1; color: var(--ink-2); transition: background-color .12s, color .12s; }
.tok.bar-end { margin-right: 12px; }
.tok.done { color: var(--done); font-weight: 500; }
.tok.cur { background: var(--next); color: var(--next-ink); }
.along-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.along-hint { margin: 0; font-size: 13px; color: var(--muted); }

/* Sargam glyphs: komal = bar below, tivra = tick above, octave dots above/below */
.sv { position: relative; display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; }
.sv .nm { position: relative; display: inline-block; }
.sv .up, .sv .dn { display: block; height: 7px; font-size: 9px; line-height: 7px; letter-spacing: 1px; }
.sv.komal .nm::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: -3px; height: 2px; border-radius: 1px; background: currentColor; }
.sv.tivra .nm::before { content: ""; position: absolute; left: 50%; top: -6px; width: 2px; height: 5px; margin-left: -1px; border-radius: 1px; background: currentColor; }
.sv sub { font-size: .62em; font-weight: 600; vertical-align: baseline; position: relative; top: .12em; margin-left: .5px; }
.komal-demo { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* The instrument */
.harmonium { position: relative; margin: 0 -8px; }
.case {
  --kw: 34px; --ws: 0; --kh: 148px;
  position: relative; padding: 0 6px 8px; border-radius: 18px;
  background:
    repeating-linear-gradient(90deg, var(--grain) 0 2px, transparent 2px 9px, var(--grain) 9px 10px, transparent 10px 23px),
    linear-gradient(180deg, var(--wood-1), var(--wood-2) 70%, var(--wood-3));
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 14px 30px -18px rgba(40, 14, 2, .7), 0 2px 4px rgba(40, 14, 2, .25);
  color: var(--case-ink);
}
.bellows { position: relative; height: 12px; margin: 0 10px; overflow: hidden; border-radius: 0 0 6px 6px; }
.pleats { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, #1e0d05 0 2px, #6b3b22 2px 7px, #2a140a 7px 9px); transform-origin: 50% 0; transform: scaleY(calc(.35 + .65 * var(--air, 1))); transition: transform .25s ease-out; opacity: .9; }
.case.breathing .pleats { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scaleY(.7); } }

.panel { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 6px 6px 6px; }
.knobs { display: grid; grid-template-columns: repeat(3, auto); grid-template-rows: auto auto; column-gap: 2px; }
.knobs-cap { grid-column: 1 / -1; font: 650 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--case-muted); padding: 2px 0 2px 6px; }
.knob { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 46px; min-height: 48px; padding: 3px 2px; border: 0; border-radius: 12px; background: transparent; color: var(--case-ink); font-size: 12.5px; font-weight: 600; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.knob:hover { background: rgba(255, 235, 200, .07); }
.knob-face { position: relative; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6b4a36 0, #3a2418 55%, #1e110a 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 2px 3px rgba(0, 0, 0, .45); transition: transform .15s, box-shadow .15s; }
.knob-face::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.knob[aria-pressed="true"] .knob-face { background: radial-gradient(circle at 35% 30%, var(--brass-1) 0, var(--brass-2) 50%, var(--brass-3) 100%); box-shadow: 0 0 0 2px rgba(255, 196, 110, .55), 0 3px 6px rgba(0, 0, 0, .45); transform: scale(1.08); }
.knob[aria-pressed="true"] .knob-face::after { background: rgba(255, 255, 255, .35); }
.knob[aria-pressed="false"] { color: var(--case-muted); }
.knob:focus-visible { outline-color: #ffd28a; outline-offset: 0; }

.kb-nav { display: flex; align-items: center; gap: 6px; padding: 0 0 6px; }
.nav-btn { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .22); color: var(--case-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn[disabled] { opacity: .35; cursor: default; }
.mini { position: relative; flex: 1 1 auto; height: 38px; border-radius: 6px; overflow: hidden; background: var(--ivory-2); cursor: pointer; touch-action: none; }
.mini-keys { position: absolute; inset: 0; display: flex; }
.mini-keys i { flex: 1 1 0; border-right: 1px solid rgba(60, 40, 20, .25); background: var(--ivory); position: relative; }
.mini-keys b { position: absolute; top: 0; height: 58%; width: 2.2%; margin-left: -1.1%; background: var(--ebony); border-radius: 0 0 2px 2px; }
.mini-keys i.sa::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--sa); }
.mini-keys i.nx { background: var(--next); }
.mini-keys i.dn { background: var(--ivory-down); }
.mini-win { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; border: 3px solid var(--accent-bright); border-radius: 6px; background: rgba(255, 170, 60, .12); box-shadow: 0 0 0 999px rgba(30, 12, 2, .38); transition: left .2s; pointer-events: none; }

.kb-view { position: relative; overflow: hidden; border-radius: 4px 4px 10px 10px; touch-action: none; background: var(--ebony); box-shadow: 0 -2px 0 rgba(0, 0, 0, .35); }
.keys { position: relative; display: flex; height: var(--kh); width: calc(var(--kw) * 25); transform: translateX(calc(var(--ws) * var(--kw) * -1)); transition: transform .22s ease-out; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.key { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; margin: 0; padding: 0 0 8px; border: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.key.w { flex: none; width: var(--kw); height: 100%; background: linear-gradient(180deg, var(--ivory-2) 0, var(--ivory) 7%, var(--ivory) 88%, var(--ivory-2) 100%); color: var(--ivory-ink); border-right: 1px solid rgba(60, 40, 20, .28); border-radius: 0 0 5px 5px; box-shadow: 0 -3px 0 rgba(0, 0, 0, .2) inset; }
.key.b { position: absolute; top: 0; z-index: 2; left: calc(var(--kw) * var(--wx) - var(--kw) * .31); width: calc(var(--kw) * .62); height: 60%; padding-bottom: 6px; background: linear-gradient(180deg, var(--ebony-2), var(--ebony) 85%); color: var(--ebony-ink); border-radius: 0 0 4px 4px; box-shadow: 0 3px 4px rgba(0, 0, 0, .45), 0 -4px 0 rgba(255, 255, 255, .06) inset; }
.key.w.down { background: linear-gradient(180deg, var(--ivory-2) 0, var(--ivory-down) 10%, var(--ivory-down) 100%); box-shadow: 0 -1px 0 rgba(0, 0, 0, .2) inset, 0 -5px 0 var(--accent-bright) inset; }
.key.b.down { background: var(--ebony-down); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 -4px 0 var(--accent-bright) inset; }
.key.next.w { background: linear-gradient(180deg, var(--ivory-2) 0, var(--next) 14%, var(--next) 100%); color: var(--next-ink); }
.key.next.b { background: var(--next); color: var(--next-ink); }
.key.next::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 3px #fff3dc inset; animation: pulse 1.1s ease-in-out infinite; pointer-events: none; }
@keyframes pulse { 50% { opacity: .25; } }
.key:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; z-index: 3; }
/* Label sizes follow the key width (--kw) on the narrowest keys (phones turned sideways); capped at the usual sizes. */
.key .lab { display: flex; flex-direction: column; align-items: center; font-size: clamp(12.5px, calc(var(--kw) * .5), 15px); font-weight: 650; pointer-events: none; }
.key.b .lab { font-size: clamp(10px, calc(var(--kw) * .4), 12px); font-weight: 600; }
.key .lab[lang="hi"] { font-size: clamp(13px, calc(var(--kw) * .54), 16px); }
.key.b .lab[lang="hi"] { font-size: clamp(11px, calc(var(--kw) * .44), 13px); }
.key .west { font-size: 10px; font-weight: 500; color: var(--ivory-muted); margin-top: 3px; pointer-events: none; }
.key.b .west { color: #cdbfae; }
.key.next .west { color: var(--next-ink); }
.key.sa .lab .nm { color: var(--sa); font-weight: 800; }
.key.b.sa .lab .nm { color: #ffb366; }
.key.next.sa .lab .nm { color: var(--next-ink); }
.key .mark { display: none; }
.key.sa0 .mark { display: block; width: 9px; height: 9px; margin-bottom: 6px; border-radius: 50%; background: var(--sa); box-shadow: 0 0 0 2px rgba(215, 107, 18, .25); pointer-events: none; }
.key.next.sa0 .mark { background: var(--next-ink); }
.key .kc { display: none; margin-top: 6px; min-width: 18px; padding: 1px 3px; border: 1px solid rgba(60, 40, 20, .3); border-radius: 4px; font: 600 10px/1.3 var(--mono); color: var(--ivory-muted); pointer-events: none; }
.key.b .kc { border-color: rgba(255, 235, 210, .3); color: #d9cbb8; }
.key .kc:empty { visibility: hidden; }

.pump-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px 0; }
.pump { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 12px; background: linear-gradient(180deg, var(--brass-1), var(--brass-2)); color: #2b1606; font-weight: 750; font-size: 16px; cursor: pointer; box-shadow: 0 3px 0 var(--brass-3), 0 6px 12px -6px rgba(0, 0, 0, .6); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pump svg { width: 20px; height: 20px; }
.pump:active, .pump.pumping { transform: translateY(2px); box-shadow: 0 1px 0 var(--brass-3); }
.air { flex: 1 1 auto; height: 12px; border-radius: 999px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.air-fill { display: block; height: 100%; width: 100%; border-radius: 999px; background: linear-gradient(90deg, #f6c46a, #ffe2a6); transform-origin: 0 50%; transform: scaleX(var(--air, 1)); transition: transform .12s linear; }
.air-txt { flex: none; min-width: 74px; font-size: 13px; font-weight: 600; color: var(--case-ink); font-variant-numeric: tabular-nums; }

.start { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 0; margin: 0; padding: 16px; border-radius: 18px; background: var(--veil); -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.start-pill { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 17px; font-weight: 650; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); transition: transform .15s; }
.start-pill svg { width: 22px; height: 22px; fill: currentColor; }
.start:hover .start-pill { transform: scale(1.03); }
.start-sub { font-size: 13px; font-weight: 500; color: var(--ink); background: var(--card); padding: 4px 10px; border-radius: 999px; text-align: center; }
.start:focus-visible { outline-offset: -3px; }

.turn-hint { display: none; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.turn-hint svg { width: 20px; height: 20px; flex: none; color: var(--accent); }
@media (pointer: coarse) and (orientation: portrait) and (max-width: 559px) { .turn-hint { display: flex; } }

/* Deck */
.deck { margin-top: 14px; }
.deck-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.deck-set { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 12px; }
.vol { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.vol input { width: 140px; accent-color: var(--accent-bright); min-height: 44px; margin: 0; }
.status { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; min-height: 2.9em; }
.keyhint { margin: 4px 0 0; color: var(--muted); font-size: 13px; max-width: 760px; }

/* Content */
.prose { margin-top: 44px; }
.prose > * { max-width: 720px; }
.prose h2 { font: 700 1.5rem/1.2 var(--serif); margin: 36px 0 12px; }
.prose h3 { font-size: 1.02rem; margin: 22px 0 4px; line-height: 1.35; }
.prose p { margin: 0 0 10px; color: var(--ink-2); }
.prose ul { padding-left: 1.2em; margin: 0 0 10px; color: var(--ink-2); }
.prose li { margin: 0 0 10px; }
.prose li::marker { color: var(--accent-bright); }
.prose strong { color: var(--ink); }
.table-box { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.scales { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.scales th, .scales td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.scales th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.scales tr:last-child td { border-bottom: 0; }
.scales td:nth-child(3), .scales th:nth-child(3) { border-left: 1px solid var(--line); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; width: max-content; max-width: calc(100vw - 32px); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast input { display: block; width: min(560px, calc(100vw - 64px)); margin-top: 8px; padding: 8px; border-radius: 8px; border: 0; font: 13px var(--mono); color: var(--ink); background: var(--card); }

/* More toys */
.more-toys { margin-top: 48px; }
.more-toys h2 { font: 700 1.4rem/1.2 var(--serif); margin: 0 0 12px; }
.more-toys ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.more-toys a { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; column-gap: 14px; min-height: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; }
.more-toys a:hover { border-color: var(--accent-bright); color: var(--ink); }
.more-toys img { grid-row: 1 / 3; display: block; width: 112px; height: 63px; border-radius: 10px; object-fit: cover; background: var(--well); }
.more-toys b { align-self: end; font-weight: 700; }
.more-toys span { align-self: start; font-size: 0.88rem; line-height: 1.35; color: var(--muted); }
.more-toys + .foot { margin-top: 40px; }

/* Wider screens */
@media (min-width: 420px) {
  .harmonium { margin: 0; }
  .case { padding: 0 8px 10px; }
}
@media (min-width: 600px) {
  .case { --kh: 176px; padding: 0 14px 12px; border-radius: 22px; }
  .start { border-radius: 22px; }
  .panel { justify-content: flex-start; gap: 4px 28px; padding: 8px 4px 8px; }
  .knob { min-width: 56px; font-size: 13px; }
  .seg label { padding: 0 10px; }
  .stage { padding-top: 22px; }
  .hero { padding-top: 30px; }
  .wrap { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
  #lab-cap { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .key .lab { font-size: clamp(12.5px, calc(var(--kw) * .5), 16px); }
}
@media (min-width: 900px) {
  .case { --kh: 196px; }
}
@media (hover: hover) and (pointer: fine) {
  .key .kc { display: block; }
  .fine-only { display: revert; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .top-in { min-height: 40px; }
  .brand { padding: 4px 0; }
  .hero { padding-top: 6px; padding-bottom: 0; }
  h1 { font-size: 1.5rem; margin: 0; }
  .lede { display: none; }
  .stage { padding-top: 8px; }
  .toolbar { margin-bottom: 8px; }
  .panel { padding-top: 2px; padding-bottom: 2px; }
  .knobs { grid-template-columns: auto repeat(3, auto); grid-template-rows: auto; align-items: center; }
  .knobs-cap { grid-column: auto; padding: 0 4px 0 6px; }
  .knob { min-height: 44px; flex-direction: row; gap: 6px; }
  .knob-face { width: 20px; height: 20px; }
  .case { --kh: clamp(110px, calc(100vh - 222px), 176px); }
  .along-hint { display: none; }
}
@supports (height: 100svh) {
  @media (orientation: landscape) and (max-height: 500px) {
    .case { --kh: clamp(110px, calc(100svh - 222px), 176px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .key.next::before { animation: none; opacity: .6; }
  .case.breathing .pleats { animation: none; }
  .btn-rec[aria-pressed="true"] .rec-dot { animation: none; }
}
