/* Online Dholak & Tabla (newellabs.com/play/dholak). Self-contained; system fonts only. */
:root {
  color-scheme: light dark;
  --bg: #f6efe4; --well: #ede3d3; --well-2: #e4d6c0; --card: #fffbf5;
  --ink: #1d1a17; --ink-2: #3d3630; --muted: #5f574e; --faint: #a39684;
  --line: #e3d6c2; --line-strong: #cbb89c;
  --accent: #8a4b12; --accent-bright: #e09a3a; --glow: rgba(228, 146, 46, .55);
  --focus: #2459d6; --rec: #c2362b; --rec-on: #c2362b;
  /* pads */
  --bass-1: #8f5630; --bass-2: #6a3a1b; --bass-ink: #fff6e8; --bass-sub: #fbe9d3;
  --treb-1: #f8ecd3; --treb-2: #ead5ae; --treb-ink: #2b1d10; --treb-sub: #5e4528;
  --both-1: #eaa645; --both-2: #d68a25; --both-ink: #231403; --both-sub: #3a2104;
  --syahi: #1e1915; --syahi-ink: #fff8ec;
  --pad-edge: rgba(60, 30, 8, .28); --pad-shadow: rgba(70, 38, 10, .28);
  --veil: rgba(246, 239, 228, .55);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --padh: 84px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16120f; --well: #1f1914; --well-2: #3a2e22; --card: #221c17;
    --ink: #f2eadf; --ink-2: #d8cdc0; --muted: #aa9f92; --faint: #6c6156;
    --line: #342a21; --line-strong: #4b3d2f;
    --accent: #f0b462; --accent-bright: #e49b3c; --glow: rgba(236, 160, 64, .5);
    --focus: #93b4ff; --rec: #ee5b4d; --rec-on: #c0392f;
    --bass-1: #74462a; --bass-2: #4e2c16; --bass-ink: #fdf1e1; --bass-sub: #e6c9a6;
    --treb-1: #dccaa6; --treb-2: #c8b18a; --treb-ink: #20160b; --treb-sub: #4b3720;
    --both-1: #d69133; --both-2: #c27c22; --both-ink: #1c1002; --both-sub: #2a1702;
    --pad-edge: rgba(0, 0, 0, .45); --pad-shadow: rgba(0, 0, 0, .5);
    --veil: rgba(22, 18, 15, .55);
  }
}

* { 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, select, input { font: inherit; color: inherit; }
button { 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); }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
[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: 20px; padding-bottom: 2px; }
h1 { font: 700 clamp(1.9rem, 6.6vw, 3rem)/1.05 var(--serif); letter-spacing: -.01em; margin: 0 0 8px; }
h1 .amp { color: var(--accent-bright); font-style: italic; }
.lede { margin: 0; color: var(--ink-2); max-width: 640px; font-size: 1rem; line-height: 1.5; }
.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; }

/* Stage layout */
.stage { padding-top: 16px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; }
.kit-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; flex: 1 1 200px; }
.seg { display: inline-flex; align-items: center; background: var(--well); border: 1px solid var(--line); border-radius: 14px; padding: 3px; }
.seg-cap { font: 650 11px/1 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 0 8px 0 6px; white-space: nowrap; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.seg label { min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; border-radius: 11px; font-weight: 650; font-size: 15px; color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background-color .15s, color .15s; touch-action: manipulation; }
.seg label svg { width: 30px; height: 19px; flex: none; }
.seg input:checked + label { background: var(--card); 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; }
.ic-body { fill: var(--bass-1); }
.ic-skin { fill: var(--treb-1); stroke: var(--bass-2); stroke-width: .9; }
.ic-dot { fill: var(--syahi); }
.ic-rope { stroke: var(--treb-1); stroke-width: .8; opacity: .8; fill: none; }

/* The drum */
.drum { position: relative; }
.pad-wrap { position: relative; }
.heads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; margin: 0 0 6px; font: 650 11px/1.2 var(--sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.head-treble { grid-column: 2 / 4; }
.pads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, var(--padh)); gap: 9px 10px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pad[data-slot="0"] { grid-area: 1 / 1; } .pad[data-slot="1"] { grid-area: 2 / 1; } .pad[data-slot="2"] { grid-area: 3 / 1; }
.pad[data-slot="3"] { grid-area: 1 / 2; } .pad[data-slot="4"] { grid-area: 1 / 3; }
.pad[data-slot="5"] { grid-area: 2 / 2; } .pad[data-slot="6"] { grid-area: 2 / 3; }
.pad[data-slot="7"] { grid-area: 3 / 2; } .pad[data-slot="8"] { grid-area: 3 / 3; }

.pad {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 0; margin: 0; padding: 6px 4px; border-radius: 20px; border: 1px solid var(--pad-edge); cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: none;
  box-shadow: 0 3px 0 var(--pad-shadow), inset 0 1px 0 rgba(255, 255, 255, .22);
  transition: transform .09s ease-out, box-shadow .09s ease-out, filter .12s;
}
.pad[data-head="bass"] { background: radial-gradient(120% 95% at 50% 40%, var(--bass-1), var(--bass-2)); color: var(--bass-ink); }
.pad[data-head="treble"] { background: radial-gradient(120% 95% at 50% 40%, var(--treb-1), var(--treb-2)); color: var(--treb-ink); }
.pad[data-head="both"] { background: radial-gradient(120% 95% at 50% 40%, var(--both-1), var(--both-2)); color: var(--both-ink); }
.pad .skin { display: grid; place-items: center; min-width: 0; max-width: 100%; }
.bol { font: 700 clamp(19px, 5.6vw, 27px)/1.05 var(--serif); white-space: nowrap; letter-spacing: .01em; }
.what { font-size: 12px; line-height: 1.2; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; padding: 0 2px; }
.pad[data-head="bass"] .what { color: var(--bass-sub); }
.pad[data-head="treble"] .what { color: var(--treb-sub); }
.pad[data-head="both"] .what { color: var(--both-sub); }
.kc { position: absolute; top: 6px; right: 7px; display: none; font-size: 11px; min-width: 1.5em; padding: .15em .3em; background: rgba(255, 255, 255, .3); border-color: rgba(0, 0, 0, .25); color: inherit; }
.pad[data-head="bass"] .kc { background: rgba(0, 0, 0, .22); border-color: rgba(255, 255, 255, .28); }

/* The tabla skins carry the black syahi circle; the bol sits on it. */
.drum[data-kit="tabla"] .pad[data-head="bass"] .skin,
.drum[data-kit="tabla"] .pad[data-head="treble"] .skin { --s: clamp(46px, 13vw, 62px); min-width: var(--s); height: var(--s); padding: 0 9px; border-radius: 999px; background: radial-gradient(circle at 42% 38%, #3a322b, var(--syahi) 70%); color: var(--syahi-ink); box-shadow: 0 0 0 3px rgba(0, 0, 0, .08); }
.drum[data-kit="tabla"] .pad[data-head="bass"] .skin { transform: translateX(-8%); }
.drum[data-kit="tabla"] .pad .skin .bol { font-size: clamp(16px, 4.6vw, 22px); }
.drum[data-kit="tabla"] .pad[data-head="treble"] { background: radial-gradient(120% 95% at 50% 40%, #fbf1df, #ead9b8); }

/* Hit feedback */
.pad.hit { transform: translateY(2px) scale(.975); box-shadow: 0 1px 0 var(--pad-shadow), 0 0 0 3px var(--glow); filter: brightness(1.08); }
.pad.ghost { box-shadow: 0 3px 0 var(--pad-shadow), 0 0 0 3px var(--accent-bright); }
.ripple { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(255, 255, 255, .5); pointer-events: none; transform: scale(0); animation: rip .5s ease-out forwards; }
.pad[data-head="treble"] .ripple { background: rgba(140, 80, 20, .28); }
@keyframes rip { to { transform: scale(9); opacity: 0; } }
.bendbar { position: absolute; left: 7px; top: 10px; bottom: 10px; width: 5px; border-radius: 3px; background: rgba(255, 255, 255, .18); display: none; }
.bendbar i { position: absolute; left: 0; right: 0; bottom: 0; height: 0; border-radius: 3px; background: var(--accent-bright); }
.pad.bending .bendbar { display: block; }

/* Start overlay (sound needs one tap first) */
.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: 20px; background: var(--veil); -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); 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.loading .start-pill svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.start:focus-visible { outline-offset: -3px; }
.bend-hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Taal panel */
.taal { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px 8px; }
.taal-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pick { position: relative; flex: 1 1 150px; min-width: 0; display: flex; }
.pick::after { content: ""; position: absolute; right: 16px; 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 38px 0 14px; border-radius: 12px; 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 select:hover { border-color: var(--accent-bright); }
.tempo { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; min-width: 0; }
.tempo input[type="range"] { flex: 1 1 auto; min-width: 60px; height: 44px; margin: 0; accent-color: var(--accent-bright); cursor: pointer; }
.tempo output { min-width: 2.4em; text-align: right; font: 700 17px/1 var(--sans); font-variant-numeric: tabular-nums; }
.bpm-unit { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .05em; }
.btn.btn-icon { width: 44px; min-height: 44px; padding: 0; font-size: 20px; font-weight: 600; flex: none; }
.btn.btn-loop { background: var(--ink); color: var(--bg); border-color: var(--ink); min-width: 128px; }
.btn.btn-loop:hover { border-color: var(--ink); opacity: .92; }
.btn.btn-loop[aria-pressed="true"] { background: var(--accent-bright); border-color: var(--accent-bright); color: #1d1104; }
.theka { display: flex; flex-wrap: wrap; gap: 6px 0; margin: 10px 0 4px; }
.vib { display: inline-flex; padding: 0 4px; border-left: 2px solid var(--line-strong); }
.vib:first-child { border-left-color: transparent; padding-left: 0; }
.cell { min-width: 34px; padding: 2px 3px 4px; display: inline-flex; flex-direction: column; align-items: center; border-radius: 9px; transition: background-color .08s; }
.mark { height: 14px; font: 700 11px/14px var(--sans); color: var(--accent); }
.bols { display: inline-flex; gap: 2px; font: 650 14px/1.2 var(--sans); color: var(--ink-2); white-space: nowrap; }
.bols .b { padding: 1px 2px; border-radius: 5px; }
.bols .rest { color: var(--muted); }
.cell.now { background: var(--well-2); box-shadow: inset 0 -3px 0 var(--accent-bright); }
.cell.now .bols { color: var(--ink); }
.bols .b.on { background: var(--accent-bright); color: #1d1104; }
.theka-note { margin: 2px 0 2px; font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Buttons and deck */
.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: 38px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-sm svg { width: 16px; height: 16px; }
.tempo .btn-sm { min-height: 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: pulse 1.2s ease-in-out infinite; }
.btn .i-stop { display: none; }
.btn.is-playing .i-stop, .btn[aria-pressed="true"] .i-stop { display: block; }
.btn.is-playing .i-play, .btn[aria-pressed="true"] .i-play { display: none; }
#play.attention:not([disabled]) { border-color: var(--accent-bright); box-shadow: 0 0 0 3px var(--glow); }
.deck { margin-top: 14px; }
.deck-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.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; }

/* Shared-rhythm banner */
.sent { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 12px; padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--accent-bright); box-shadow: 0 0 0 3px var(--glow); }
.sent-txt { margin: 0; font-size: 15px; line-height: 1.35; }
#sent-meta { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.btn-accent { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn-accent:hover { border-color: var(--ink); opacity: .92; }

/* Article */
.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 6px; line-height: 1.35; }
.prose p { margin: 0 0 10px; color: var(--ink-2); }
.prose ul { padding-left: 1.2em; margin: 0; color: var(--ink-2); }
.prose li { margin: 0 0 10px; }
.prose li::marker { color: var(--accent-bright); }
.prose strong { color: var(--ink); }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); margin: 0 0 8px; }
.tbl table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; line-height: 1.45; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
/* Phones: each stroke becomes a small card (bol · hand, then how it's played), so nothing hides off to the side. */
@media (max-width: 599px) {
  .tbl table { min-width: 0; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .tbl tr:last-child { border-bottom: 0; }
  .tbl td { display: inline; padding: 0; border: 0; }
  .tbl td:nth-child(2) { color: var(--muted); font-size: 14px; }
  .tbl td:nth-child(2)::before { content: " · "; }
  .tbl td:nth-child(3) { display: block; margin-top: 3px; }
}
.taals dt { font: 700 1.08rem/1.3 var(--serif); margin: 18px 0 4px; }
.taals dd { margin: 0; color: var(--ink-2); }
.tk { display: block; margin: 0 0 6px; padding: 7px 11px; border-radius: 10px; background: var(--well); color: var(--ink); font: 600 15px/1.45 var(--sans); overflow-wrap: anywhere; }

/* 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%, 280px), 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; }

/* 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); }

/* Bigger screens */
@media (min-width: 420px) { :root { --padh: 90px; } }
@media (min-width: 600px) {
  :root { --padh: 100px; }
  .tempo { flex: 1 1 260px; }
  .what { font-size: 13px; }
}
@media (hover: hover) and (pointer: fine) {
  .fine-only { display: block; }
  span.fine-only { display: inline; }
  .kc { display: inline-block; }
  .pad:hover { filter: brightness(1.05); }
}
/* Wide screens and phones held sideways: drum on the left, taal and recorder on the right. */
@media (min-width: 960px), (orientation: landscape) and (max-height: 520px) and (min-width: 560px) {
  .stage { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  .sent { grid-column: 1 / -1; grid-row: 1; }
  .toolbar { grid-column: 1 / -1; grid-row: 2; }
  .drum, .bend-hint { grid-column: 1; }
  .taal, .deck, #sr { grid-column: 2; }
  .drum { grid-row: 3 / span 3; }
  .taal { grid-row: 3; margin-top: 22px; }
  .deck { grid-row: 4; }
  .bend-hint { grid-row: 6; }
}
@media (min-width: 960px) { :root { --padh: 112px; } }
@media (orientation: landscape) and (max-height: 520px) and (min-width: 560px) {
  /* the drum gets the full height on the left; the drum switch moves to the right column */
  .toolbar { grid-column: 2; grid-row: 2; margin: 0 0 8px; }
  .drum { grid-row: 2 / span 4; }
  .taal { grid-row: 3; }
  .deck { grid-row: 4; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .lede, .bend-hint, .kit-note { display: none; }
  .hero { padding-top: 8px; }
  h1 { font-size: 1.6rem; margin: 0; }
  .top-in { min-height: 44px; }
  .stage { padding-top: 8px; }
  .toolbar { margin-bottom: 6px; }
  :root { --padh: max(56px, calc((100vh - 136px) / 3)); }
  .taal { margin-top: 0; padding: 8px 10px 6px; }
  .deck { margin-top: 8px; }
  .status { min-height: 0; }
  .btn.btn-loop { min-width: 0; padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pad, .btn, .start-pill, .toast { transition: none; }
  .ripple { display: none; }
  .start.loading .start-pill svg, .btn-rec[aria-pressed="true"] .rec-dot { animation: none; }
  .pad.hit { transform: none; }
}
@media (forced-colors: active) {
  .pad { border: 2px solid ButtonText; }
  .pad.hit, .pad.ghost, .cell.now { outline: 3px solid Highlight; }
}
