/* Bat & Drum (tricky letters): the screen split down the middle, the bat side (b) on the left and the drum
   side (d) on the right; each half is one big button. The letter drops into a spotlight in the middle,
   under the scoreboard. --tile is the spotlight's size; everything else fits around it. */
.game.batdrum { background: #241a3a; }
.batdrum button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.batdrum .game-top { padding-top: 5px; padding-bottom: 5px; }
.batdrum .bd-back { min-height: 56px; white-space: nowrap; }
.batdrum .bd-stage {
  --tile: clamp(156px, min(25vw, 30vh), 220px); --fanh: clamp(44px, 8vh, 66px);
  flex: 1; min-height: 0; position: relative; overflow: hidden; user-select: none; -webkit-user-select: none;
}

/* ---------- the two halves ---------- */
.batdrum .bd-side { position: absolute; top: 0; bottom: 0; width: 50%; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; overflow: hidden; display: block; touch-action: manipulation; }
.batdrum .bd-side.l { left: 0; }
.batdrum .bd-side.r { right: 0; }
.batdrum .bd-side > span { position: absolute; }
.batdrum .bd-bg, .batdrum .bd-badge, .batdrum .bd-thing { display: block; }
.batdrum .bd-bg { inset: 0; }
.batdrum .bd-side.l::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 5px; background: var(--ink); z-index: 2; }
/* pressed: a quick flash so he sees which side took it */
.batdrum .bd-side::before { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: rgba(255, 255, 255, 0); transition: background .25s; }
.batdrum .bd-side:active::before { background: rgba(255, 255, 255, .12); transition: none; }

/* the ballpark (b) */
.batdrum .k-bat .bd-bg {
  background:
    radial-gradient(ellipse 58% 20% at 34% 100%, #d79a5e 0 72%, #c4884f 73% 77%, transparent 78%),
    repeating-linear-gradient(100deg, #5cbf68 0 46px, #51b25d 46px 92px) 0 100% / 100% 56% no-repeat,
    linear-gradient(180deg, #74c4fb, #c9ecff 44%);
}
.batdrum .k-bat .bd-bg::before { content: ''; position: absolute; left: 0; right: 0; top: 44%; height: 20px; background: #2f7a3b; border-top: 5px solid #ffd23f; border-bottom: 4px solid var(--ink); }
/* the band stage (d, and the piano) */
.batdrum .k-drum .bd-bg, .batdrum .k-piano .bd-bg {
  background:
    linear-gradient(transparent 74%, var(--ink) 74% calc(74% + 4px), #c4844b calc(74% + 4px), #a96c3a),
    conic-gradient(from 168deg at 22% -4%, transparent 0deg, rgba(255, 236, 160, .22) 3deg 20deg, transparent 23deg),
    conic-gradient(from 172deg at 82% -4%, transparent 0deg, rgba(160, 220, 255, .2) 3deg 20deg, transparent 23deg),
    radial-gradient(ellipse at 50% 0%, var(--hall, #60409a), var(--hall2, #24143f) 75%);
}
.batdrum .k-piano .bd-bg { --hall: #1f7d86; --hall2: #0c2e3a; }
.batdrum .k-drum .bd-bg::before, .batdrum .k-piano .bd-bg::before {
  content: ''; position: absolute; top: 0; bottom: 26%; width: 13%;
  background: repeating-linear-gradient(90deg, #b8233a 0 10px, #941a2e 10px 20px); border-bottom: 4px solid var(--ink);
}
.batdrum .bd-side.r .bd-bg::before { right: 0; border-left: 4px solid var(--ink); }
.batdrum .bd-side.l.k-piano .bd-bg::before { left: 0; border-right: 4px solid var(--ink); }
/* the queen's hall (q) */
.batdrum .k-crown .bd-bg {
  background:
    linear-gradient(transparent 76%, var(--ink) 76% calc(76% + 4px), #b52f3a calc(76% + 4px), #8e222c),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(58, 42, 74, .18) 38px 41px),
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(58, 42, 74, .12) 78px 81px),
    linear-gradient(#b7b0cc, #9a92b5);
}
.batdrum .k-crown .bd-bg::before { content: ''; position: absolute; top: calc(var(--fanh) + 4px); right: 16%; width: 15%; height: 30%; background: #6b4bd1; border: 4px solid var(--ink); border-top: 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }

/* the fans in the stands along the top */
.batdrum .bd-side > .bd-fans {
  left: 0; right: 0; top: 0; height: var(--fanh); z-index: 1; display: flex; justify-content: space-evenly; align-items: flex-end; padding: 0 8px; overflow: hidden;
  font-size: calc(var(--fanh) * .8); line-height: 1; background: linear-gradient(#3c5fa6, #2c4a88); border-bottom: 4px solid var(--ink);
}
.batdrum .k-drum .bd-fans, .batdrum .k-piano .bd-fans { background: linear-gradient(#3b2a5c, #2a1d45); }
.batdrum .k-crown .bd-fans { background: linear-gradient(#7d5fd8, #5b40b0); }
.batdrum .bd-fans > span { display: block; margin-bottom: -.14em; transform-origin: 50% 100%; }
.batdrum .bd-fans.cheer > span { animation: bd-hop .45s ease-out 2; }
.batdrum .bd-stage.wild .bd-fans > span { animation: bd-hop .5s ease-in-out infinite; }

/* the letter's badge (its picture fades like the spotlight's) */
.batdrum .bd-badge {
  top: calc(var(--fanh) + 12px); z-index: 1; width: clamp(48px, 7.5vw, 84px); aspect-ratio: 100 / 160; padding: 6px; box-sizing: content-box;
  background: rgba(255, 255, 255, .92); border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
}
.batdrum .bd-side.l .bd-badge { left: 12px; }
.batdrum .bd-side.r .bd-badge { right: 12px; }

/* the things */
.batdrum .bd-thing { z-index: 1; bottom: 1.5%; pointer-events: none; }
.batdrum .bd-art-svg { display: block; width: 100%; height: auto; overflow: visible; }
.batdrum .k-bat .bd-thing { left: 7%; width: clamp(104px, 21vw, 250px); }
.batdrum .k-drum .bd-thing, .batdrum .k-piano .bd-thing { width: clamp(150px, 33vw, 370px); }
.batdrum .bd-side.r .bd-thing { right: 5%; }
.batdrum .bd-side.l.k-piano .bd-thing { left: 5%; }
.batdrum .k-crown .bd-thing { width: clamp(140px, 30vw, 340px); right: 7%; }

/* the batter */
.batdrum .bd-batter { transform-origin: 60% 92%; }
.batdrum .bd-bat { transform-box: view-box; transform-origin: 0 0; transform: translate(93px, 127px) rotate(-78deg); }
.batdrum .bd-side.hit .bd-bat { animation: bd-swing .62s ease-out .11s both; }
.batdrum .bd-side.hit .bd-batter { animation: bd-twist .62s ease-out .11s both; }
.batdrum .bd-side.whiff .bd-bat { animation: bd-whiffbat .8s ease-out .08s both; }
.batdrum .bd-side.whiff .bd-batter { animation: bd-wobble .8s ease-in-out .08s both; }
@keyframes bd-swing {
  0% { transform: translate(93px, 127px) rotate(-78deg); }
  20% { transform: translate(93px, 127px) rotate(0deg); }
  40% { transform: translate(93px, 127px) rotate(70deg); }
  62% { transform: translate(93px, 127px) rotate(84deg); }
  100% { transform: translate(93px, 127px) rotate(-78deg); }
}
@keyframes bd-twist { 0%, 100% { transform: none; } 20% { transform: rotate(4deg) translateX(3%); } }
@keyframes bd-whiffbat {
  0% { transform: translate(93px, 127px) rotate(-78deg); }
  30% { transform: translate(93px, 127px) rotate(90deg); }
  55% { transform: translate(93px, 127px) rotate(200deg); }
  100% { transform: translate(93px, 127px) rotate(282deg); }
}
@keyframes bd-wobble { 0%, 100% { transform: none; } 30% { transform: rotate(10deg); } 55% { transform: rotate(-8deg); } 78% { transform: rotate(4deg); } }

/* the drums */
.batdrum .bd-stick { transform-box: view-box; transform-origin: 0 0; }
.batdrum .bd-stick.l { transform: translate(14px, 40px) rotate(-18deg); }
.batdrum .bd-stick.r { transform: translate(286px, 40px) rotate(198deg); }
.batdrum .bd-side.hit .bd-stick.l { animation: bd-stickl .5s ease-out .1s both; }
.batdrum .bd-side.hit .bd-stick.r { animation: bd-stickr .5s ease-out .1s both; }
.batdrum .bd-side.whiff .bd-stick.l { animation: bd-missl .6s ease-out .05s both; }
.batdrum .bd-side.whiff .bd-stick.r { animation: bd-missr .6s ease-out .05s both; }
@keyframes bd-stickl { 0% { transform: translate(14px, 40px) rotate(-18deg); } 25% { transform: translate(14px, 40px) rotate(38deg); } 55%, 100% { transform: translate(14px, 40px) rotate(-18deg); } }
@keyframes bd-stickr { 0% { transform: translate(286px, 40px) rotate(198deg); } 25% { transform: translate(286px, 40px) rotate(142deg); } 55%, 100% { transform: translate(286px, 40px) rotate(198deg); } }
@keyframes bd-missl { 0%, 100% { transform: translate(14px, 40px) rotate(-18deg); } 30% { transform: translate(14px, 40px) rotate(-34deg); } 60% { transform: translate(14px, 40px) rotate(-8deg); } }
@keyframes bd-missr { 0%, 100% { transform: translate(286px, 40px) rotate(198deg); } 30% { transform: translate(286px, 40px) rotate(214deg); } 60% { transform: translate(286px, 40px) rotate(188deg); } }
.batdrum .bd-snare, .batdrum .bd-bass, .batdrum .bd-cym { transform-box: fill-box; transform-origin: 50% 100%; }
.batdrum .bd-side.hit .bd-bass { animation: bd-squash .45s ease-out .22s; }
.batdrum .bd-side.hit .bd-snare { animation: bd-thump .4s ease-out .34s; }
.batdrum .bd-side.hit .bd-cym { transform-origin: 50% 50%; animation: bd-shimmer .6s ease-out .32s; }
.batdrum .bd-side.whiff .bd-bass { animation: bd-nudge .4s ease-out .22s; }
@keyframes bd-squash { 30% { transform: scale(1.06, .92); } 65% { transform: scale(.98, 1.03); } }
@keyframes bd-thump { 30% { transform: scale(1.05); } }
@keyframes bd-shimmer { 20% { transform: rotate(-9deg); } 45% { transform: rotate(7deg); } 70% { transform: rotate(-3deg); } }
@keyframes bd-nudge { 30% { transform: translateY(-6px) rotate(-3deg); } 60% { transform: rotate(2deg); } }

/* the piano (and the pig) */
.batdrum .bd-key { transform-box: fill-box; transform-origin: 50% 0; }
.batdrum .bd-side.hit .bd-key { animation: bd-key .28s ease-out calc(.22s + var(--i) * .025s); }
.batdrum .bd-side.whiff .bd-piano { transform-origin: 50% 100%; animation: bd-wobble .6s ease-in-out .2s; }
@keyframes bd-key { 40% { transform: scaleY(.9); fill: #ffe27a; } }
.batdrum .bd-side.hit .bd-pig > g { animation: bd-pighop .5s ease-out .2s; }
@keyframes bd-pighop { 40% { transform: translateY(-14px); } }

/* the crown */
.batdrum .bd-crown { transform-box: fill-box; transform-origin: 50% 100%; }
.batdrum .bd-side.hit .bd-crown { animation: bd-crownhop .6s cubic-bezier(.3, 1.6, .5, 1) .22s; }
.batdrum .bd-side.whiff .bd-crown { animation: bd-wobble .6s ease-in-out .2s; }
@keyframes bd-crownhop { 35% { transform: translateY(-18%) scale(1.08); } }

/* after a miss: the side it goes to lights up */
.batdrum .bd-side.pick-me::before { background: rgba(255, 210, 63, .04); box-shadow: inset 0 0 0 9px #ffd23f, inset 0 0 60px rgba(255, 210, 63, .5); animation: bd-glow .7s ease-in-out infinite alternate; }
.batdrum .bd-side.pick-me .bd-thing { animation: bd-bob .7s ease-in-out infinite alternate; }
.batdrum .bd-side.nope::before { background: rgba(255, 90, 95, .25); transition: none; }
@keyframes bd-glow { to { background: rgba(255, 210, 63, .14); box-shadow: inset 0 0 0 14px #ffd23f, inset 0 0 90px rgba(255, 210, 63, .65); } }
@keyframes bd-bob { to { transform: translateY(-10px); } }

/* ---------- the scoreboard ---------- */
.batdrum .bd-board {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 12px;
  padding: 6px 14px; background: #2a2140; border: 4px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 rgba(0, 0, 0, .3);
  color: #fff; pointer-events: none; white-space: nowrap;
}
.batdrum .bd-board small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 1px; color: #bfb3d9; line-height: 1.1; }
.batdrum .bd-clock { text-align: center; min-width: 52px; }
.batdrum .bd-clock b { display: block; font-size: 34px; line-height: 1; color: #ffd23f; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(255, 210, 63, .5); }
.batdrum .bd-clock.hurry b { color: #ff7a7a; text-shadow: 0 0 10px rgba(255, 90, 95, .6); animation: bd-tick 1s ease-in-out infinite; }
@keyframes bd-tick { 50% { transform: scale(1.12); } }
.batdrum .bd-steps { display: flex; gap: 4px; }
.batdrum .bd-steps i { font-style: normal; font-size: 19px; font-weight: 700; line-height: 1.3; padding: 0 7px; border-radius: 9px; background: #3d3260; color: #8f84ad; border: 2px solid #574a80; }
.batdrum .bd-steps i.on { background: #ffd23f; color: var(--ink); border-color: #fff; }
.batdrum .bd-steps i.done { background: #2bb673; color: #fff; border-color: #7fe0a8; }
.batdrum .bd-crowd { text-align: center; position: relative; }
.batdrum .bd-crowd span { display: flex; gap: 4px; margin-top: 3px; }
.batdrum .bd-crowd i { width: 15px; height: 15px; border-radius: 50%; background: #4a3d6e; border: 2px solid #15101f; transition: background .2s, box-shadow .2s; }
.batdrum .bd-crowd i.on { background: #ffd23f; box-shadow: 0 0 8px #ffd23f; }
.batdrum .bd-crowd b { display: none; position: absolute; right: -22px; top: -16px; padding: 0 6px; font-size: 16px; color: var(--ink); background: #ff7eb6; border: 3px solid var(--ink); border-radius: 10px; transform: rotate(12deg); }
.batdrum .bd-crowd.x2 b { display: block; animation: bd-tick .6s ease-in-out infinite; }
.batdrum .bd-crowd.x2 i { animation: bd-rainbow .5s linear infinite; }
@keyframes bd-rainbow { 0% { background: #ffd23f; box-shadow: 0 0 10px #ffd23f; } 33% { background: #ff7eb6; box-shadow: 0 0 10px #ff7eb6; } 66% { background: #5fd3ff; box-shadow: 0 0 10px #5fd3ff; } }

/* ---------- the spotlight ---------- */
.batdrum .bd-tile {
  position: absolute; left: 50%; top: 45%; z-index: 5; width: var(--tile); height: var(--tile); border-radius: 50%; box-sizing: border-box;
  background: radial-gradient(circle at 38% 32%, #fff 0 45%, #fff3d2); border: 5px solid var(--ink);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, .16), 0 0 50px rgba(255, 240, 180, .55), 0 8px 0 rgba(0, 0, 0, .28);
  transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity .12s;
}
.batdrum .bd-tile.show { opacity: 1; }
.batdrum .bd-tile.lesson { box-shadow: 0 0 0 9px #ffd23f, 0 0 60px rgba(255, 210, 63, .8), 0 8px 0 rgba(0, 0, 0, .28); }
.batdrum .bd-tile.other { background: radial-gradient(circle at 38% 32%, #fff 0 45%, #ece4ff); }
.batdrum .bd-ring { position: absolute; left: -16px; top: -16px; width: calc(100% + 32px); height: calc(100% + 32px); transform: rotate(-90deg); overflow: visible; }
.batdrum .bd-ring circle { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 4; }
.batdrum .bd-ring .bd-left { stroke: #ffd23f; stroke-dasharray: 100; stroke-linecap: round; }
.batdrum .bd-ring .bd-left.low { stroke: #ff6b6b; }
.batdrum .bd-tile.lesson .bd-ring { display: none; }
.batdrum .bd-face { position: absolute; inset: 7%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2%; }
.batdrum .bd-glyph { display: block; height: 82%; aspect-ratio: 100 / 160; }
.batdrum .bd-glyph.sm { height: 58%; }
.batdrum .bd-word { display: block; font-size: calc(var(--tile) * .27); font-weight: 700; line-height: 1.1; color: var(--ink); white-space: nowrap; letter-spacing: .01em; }
.batdrum .bd-word.sm { font-size: calc(var(--tile) * .17); }
.batdrum .bd-key { font-weight: 700; background: #ffe98a; border-radius: .16em; padding: 0 .05em; }
.batdrum .bd-tile.lesson .bd-glyph { height: 70%; }
.batdrum .bd-tile.lesson.is-letter .bd-glyph, .batdrum .bd-tile.lesson .bd-face > .bd-glyph:only-child { height: 82%; }
.batdrum .bd-tag { position: absolute; left: 50%; bottom: -12%; width: 32%; transform: translateX(-50%); background: #fff; border: 4px solid var(--ink); border-radius: 50%; aspect-ratio: 1; display: none; place-items: center; }
.batdrum .bd-tag:not(:empty) { display: grid; }
.batdrum .bd-tag .bd-icon { width: 80%; height: 80%; }
.batdrum .bd-fly { position: absolute; left: 0; top: 0; z-index: 7; border-radius: 50%; box-sizing: border-box; background: #fff; border: 5px solid var(--ink); pointer-events: none; will-change: transform; }

/* grow the B (b/d only) */
.batdrum .bd-hint {
  position: absolute; left: 50%; top: calc(45% + var(--tile) / 2 + 22px); z-index: 6; transform: translateX(-50%) scale(.6); opacity: 0; pointer-events: none;
  width: 84px; height: 84px; padding: 0; border-radius: 50%; border: 4px solid var(--ink); background: #ffd23f; color: var(--ink); box-shadow: 0 5px 0 rgba(0, 0, 0, .3);
  font: inherit; font-weight: 800; cursor: pointer; transition: opacity .2s, transform .2s cubic-bezier(.2, 1.5, .4, 1);
}
.batdrum .bd-hint.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
.batdrum .bd-hint:active { transform: translateX(-50%) scale(.92); }
.batdrum .bd-hint.nudge { animation: bd-nudgehint .45s ease-in-out 4; }
@keyframes bd-nudgehint { 50% { transform: translateX(-50%) scale(1.15); box-shadow: 0 0 0 8px rgba(255, 210, 63, .5), 0 5px 0 rgba(0, 0, 0, .3); } }
.batdrum .bd-hint-b { font-size: 48px; line-height: 1; font-family: 'Andika', var(--font); }
.batdrum .bd-hint-q { position: absolute; right: 10px; top: 4px; font-size: 22px; }

/* ---------- hits ---------- */
.batdrum .bd-boom {
  position: absolute; z-index: 8; pointer-events: none; transform: translate(-50%, -150%); white-space: nowrap;
  font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; color: #ffd23f; letter-spacing: 1px;
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); animation: bd-boom .85s ease-out forwards;
}
.batdrum .bd-boom.l { --r: -10deg; } .batdrum .bd-boom.r { --r: 9deg; }
@keyframes bd-boom {
  0% { transform: translate(-50%, -120%) scale(.3) rotate(var(--r)); opacity: 0; }
  20% { transform: translate(-50%, -150%) scale(1.15) rotate(var(--r)); opacity: 1; }
  70% { transform: translate(-50%, -160%) scale(1) rotate(var(--r)); opacity: 1; }
  100% { transform: translate(-50%, -190%) scale(.9) rotate(var(--r)); opacity: 0; }
}
.batdrum .bd-pts { position: absolute; z-index: 8; pointer-events: none; transform: translate(-50%, 0); font-size: 34px; font-weight: 800; color: #7dffb0; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; animation: bd-pts 1s ease-out forwards; }
@keyframes bd-pts { 0% { transform: translate(-50%, 0) scale(.5); opacity: 0; } 25% { transform: translate(-50%, -30px) scale(1.1); opacity: 1; } 100% { transform: translate(-50%, -90px) scale(1); opacity: 0; } }
.batdrum .bd-wave { position: absolute; z-index: 6; width: 60px; height: 24px; margin: -12px 0 0 -30px; border: 5px solid #fff; border-radius: 50%; pointer-events: none; animation: bd-wave .7s ease-out both; }
@keyframes bd-wave { from { transform: scale(.4); opacity: 1; } to { transform: scale(4); opacity: 0; } }
.batdrum .bd-note { position: absolute; z-index: 8; font-style: normal; font-size: 38px; font-weight: 800; color: #fff; text-shadow: 0 3px 0 var(--ink); pointer-events: none; animation: bd-note 1.2s ease-out both; }
@keyframes bd-note { 0% { transform: translate(-50%, 0) scale(.4); opacity: 0; } 20% { opacity: 1; } 100% { transform: translate(-50%, -130px) scale(1.2) rotate(15deg); opacity: 0; } }

/* ---------- banner, start card ---------- */
.batdrum .bd-banner {
  position: absolute; left: 50%; top: 30%; z-index: 9; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; text-align: center; max-width: 92%;
  font-size: clamp(30px, 5.4vw, 60px); font-weight: 800; line-height: 1.05; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink);
}
.batdrum .bd-banner.show { animation: bd-banner 1.2s ease-out forwards; }
.batdrum .bd-banner.wild { color: #ff7eb6; }
.batdrum .bd-banner.stage, .batdrum .bd-banner.go { color: #ffd23f; }
@keyframes bd-banner { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } 25%, 80% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -60%) scale(.95); opacity: 0; } }

.batdrum .bd-start { position: absolute; inset: 0; z-index: 12; display: none; place-items: center; background: rgba(25, 14, 45, .45); padding: 12px; overflow-y: auto; }
.batdrum .bd-start.show { display: grid; }
.batdrum .bd-card { background: #fff; border: 4px solid var(--ink); border-radius: 26px; padding: 14px 18px 16px; box-shadow: var(--shadow); text-align: center; width: min(560px, 100%); box-sizing: border-box; }
.batdrum .bd-how { display: flex; justify-content: center; gap: clamp(14px, 4vw, 36px); flex-wrap: wrap; }
.batdrum .bd-how-pair { display: flex; align-items: center; gap: 8px; }
.batdrum .bd-how-tile { width: 60px; height: 96px; padding: 6px; background: #fff8e6; border: 4px solid var(--ink); border-radius: 16px; }
.batdrum .bd-how-tile .lt-svg { width: 100%; height: 100%; }
.batdrum .bd-how-arrow { font-size: 30px; font-weight: 800; color: var(--grape); }
.batdrum .bd-how-icon { width: 76px; height: 76px; }
.batdrum .bd-icon { display: block; width: 100%; height: 100%; }
.batdrum .bd-pairs { display: flex; justify-content: center; gap: 10px; margin: 14px 0 6px; flex-wrap: wrap; }
.batdrum .bd-pair {
  display: flex; align-items: center; gap: 8px; min-height: 80px; padding: 6px 12px; font: inherit; color: var(--ink); cursor: pointer;
  background: #f4f0fa; border: 4px solid #cfc4e2; border-radius: 20px; box-shadow: 0 4px 0 rgba(58, 42, 74, .15);
}
.batdrum .bd-pair.on { background: #fff4c2; border-color: var(--ink); box-shadow: var(--shadow); }
.batdrum .bd-pair-l { display: flex; flex-direction: column; align-items: center; gap: 0; }
.batdrum .bd-pair-l .rd-word { font-size: 30px; font-weight: 700; line-height: 1; }
.batdrum .bd-pair-l .bd-icon { width: 34px; height: 34px; }
.batdrum .bd-go { font-size: 30px; padding: 8px 46px; margin-top: 8px; min-height: 80px; }
.batdrum .bd-off { font-weight: 700; color: var(--coral-dark); margin: 8px 0 0; }
.batdrum .bd-bestline { margin: 10px 0 0; font-weight: 800; color: var(--ink-soft); }

@keyframes bd-hop { 0%, 100% { transform: none; } 40% { transform: translateY(-28%) rotate(-6deg); } }

/* ---------- smaller screens ---------- */
@media (max-width: 600px) {
  .batdrum .game-top h2 { display: none; }
  .batdrum .game-top { grid-template-columns: auto 1fr; }
  .batdrum .bd-board { gap: 7px; padding: 4px 8px; top: 6px; }
  .batdrum .bd-board small { display: none; }
  .batdrum .bd-clock { min-width: 40px; }
  .batdrum .bd-clock b { font-size: 28px; }
  .batdrum .bd-steps i { font-size: 15px; padding: 0 4px; }
  .batdrum .bd-crowd span { margin: 0; gap: 3px; }
  .batdrum .bd-crowd i { width: 11px; height: 11px; }
  .batdrum .bd-badge { top: calc(var(--fanh) + 54px); border-width: 3px; border-radius: 14px; padding: 4px; }
  .batdrum .bd-how-tile { width: 48px; height: 78px; }
  .batdrum .bd-how-icon { width: 58px; height: 58px; }
  .batdrum .bd-pair { padding: 4px 8px; gap: 4px; }
  .batdrum .bd-pair-l .rd-word { font-size: 26px; }
}
/* tall screens (iPad portrait, phones): more room down there, so bigger things */
@media (max-aspect-ratio: 4/5) {
  .batdrum .k-bat .bd-thing { width: min(31vw, 250px); }
  .batdrum .k-drum .bd-thing, .batdrum .k-piano .bd-thing { width: min(43vw, 370px); }
  .batdrum .k-crown .bd-thing { width: min(40vw, 340px); }
}
@media (max-height: 640px) {
  .batdrum .bd-badge { width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .batdrum .bd-fans > span, .batdrum .bd-side.pick-me .bd-thing { animation: none !important; }
}

/* no countdown ring (careful beats fast); the j, y and g sides are big pictures */
.batdrum .bd-ring { display: none; }
.batdrum .bd-emoji-thing { display: block; font-size: min(26vh, 22vw); line-height: 1; text-align: center; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .18)); }
