/* The Beat Lab, and what the DJ Booth shares with it (the benches, the crystals,
   the play button; both rooms carry the class .loop-room). Its layout (the fixed
   overlay, the two-sided grid, the room layers and the creature slot) is shared
   with the other rooms in potions.css, and the plaques and the reset button come
   from kitchen.css; the DJ Booth's own deck is in djbooth.css. */

.loop-room {
  --t-yours: #ff7ac0;
  --beat-cool: #2a5c66;
  --t-drums: #ff8a7a; --t-bass: #ffc46b; --t-chords: #5fd3c8; --t-melody: #b89cff; --t-horns: #8fd94a;
}

/* ---------------------------------------------------------------- the room */

.wall-recess { fill: #15182a; stroke: var(--rock-edge); stroke-width: 6; }
.crystal-base { opacity: 0.85; stroke: rgba(7, 4, 15, 0.35); stroke-width: 1.5; }
.beat-crystal { opacity: 0.35; transition: opacity 0.3s ease; }
.on-beat .beat-crystal { opacity: 0.9; transition: opacity 0.05s ease; }
/* ------------------------------------------------------------ the creature */

.beat-pad-rim { fill: none; stroke: #5fd3c8; stroke-width: 3; opacity: 0.5; }
/* Smaller than in the other rooms (36%), so a winged, horned creature's head and
   wing tips clear the wall and the buttons; the wall sits lower here than the
   other rooms' plates because the title must clear it on the iPad. */
#beatlab .creature-slot { width: 22%; }   /* 28% until five rows (2026-10-12), 25% until six (v1.47.0) */
#b-creature.cheer { animation: cheer 0.8s cubic-bezier(.3, 1.4, .5, 1); }
/* A bob on the beat, here and in the DJ Booth: `scale` and `translate` are separate
   properties, so they add to the breathing instead of replacing it (HANDOFF.md,
   testing rule 14). */
#b-creature.bop, #d-creature.bop, #s-creature.bop { animation: breathe 4.6s ease-in-out infinite, bop 0.5s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes bop { 30% { scale: 1.06 0.93; translate: 0 2%; } 60% { scale: 0.97 1.04; translate: 0 -3%; } }

/* Where a tile can go lights up the moment it is picked up (BEAT-LAB-REVIEW.md,
   C2): the wall breathes teal (the DJ Booth's deck breathes gold, djbooth.css).
   The stronger .over takes over once the picture is on top. */
.song-wall.can-drop:not(.over) { animation: wall-wants 1.2s ease-in-out infinite; }
@keyframes wall-wants {
  0%, 100% { box-shadow: inset 0 0 0 3px rgba(95, 211, 200, 0.6), 0 0 8px rgba(95, 211, 200, 0.25), 0 10px 24px rgba(7, 4, 15, 0.45); }
  50% { box-shadow: inset 0 0 0 3px rgba(95, 211, 200, 0.9), 0 0 24px 4px rgba(95, 211, 200, 0.55), 0 10px 24px rgba(7, 4, 15, 0.45); }
}
/* a tap on a full row: it shakes, and the tile flies home (T9) */
.song-row.nudge { animation: zap-nudge 0.4s ease; }
@media (prefers-reduced-motion: reduce) {
  .song-wall.can-drop:not(.over) { animation: none; box-shadow: inset 0 0 0 3px rgba(95, 211, 200, 0.9), 0 10px 24px rgba(7, 4, 15, 0.45); }
}

/* -------------------------------------------------------------- the benches */

/* Both benches are the same fixed frame, from just under the back button to a
   margin above the bottom, and scroll inside it. The other rooms centre a bench
   and let it grow, which here put a tall drums bench under the back button while
   the right bench stayed short (Nathan's iPad photo, 2026-10-10). */
.loop-room .bench {
  align-self: stretch; max-height: none;
  margin-top: calc(74px + env(safe-area-inset-top, 0px));
  margin-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
}

/* The categories (v1.31.0, loop-benches.js): the left bench is a column of big
   buttons, one per track, each its track's picture on a plaque in its colour with
   three of its tiles fanned underneath. The open one is lit, raised and pushed
   toward the scene; the right bench shows only its tiles, framed in its colour. */
.bench-cats { gap: 12px; }
.cat-button {
  --t: var(--t-melody);
  flex: 1 1 0; min-height: 64px; max-height: 150px; padding: 6px 4px 4px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--t) 22%, #241847);
  border: 3px solid color-mix(in srgb, var(--t) 55%, transparent);
  box-shadow: inset 0 0 18px -8px var(--t);
  transition: transform 0.18s cubic-bezier(.3, 1.4, .5, 1), background 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  filter: saturate(0.7) brightness(0.85);
}
.cat-button.track-drums  { --t: var(--t-drums); }
.cat-button.track-bass   { --t: var(--t-bass); }
.cat-button.track-chords { --t: var(--t-chords); }
.cat-button.track-melody { --t: var(--t-melody); }
.cat-button.track-horns { --t: var(--t-horns); }
.cat-button.track-yours  { --t: var(--t-yours); }
/* her own creature, drawn into a canvas, standing in for a track's picture */
canvas.cat-creature { width: auto; max-width: 90%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(7, 4, 15, 0.55)); }
.cat-button canvas.cat-creature { height: 62%; max-height: 76px; }
.loops-head canvas.cat-creature { height: 38px; }
.cat-pic { height: 52%; max-height: 64px; width: auto; filter: drop-shadow(0 3px 4px rgba(7, 4, 15, 0.55)); pointer-events: none; }
.cat-fans { display: flex; justify-content: center; height: 28%; max-height: 34px; pointer-events: none; }
.cat-fan { height: 100%; width: auto; margin: 0 -3px; filter: drop-shadow(0 2px 2px rgba(7, 4, 15, 0.5)); }
.cat-fan:nth-child(1) { rotate: -12deg; }
.cat-fan:nth-child(3) { rotate: 12deg; }
.cat-button.open {
  filter: none; transform: translateX(6px) scale(1.03);
  background: color-mix(in srgb, var(--t) 48%, #241847);
  border-color: #ffffff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--t) 80%, transparent), 0 0 24px 2px color-mix(in srgb, var(--t) 60%, transparent);
}
.cat-button:active { transform: translateX(6px) scale(0.97); }
.cat-button.said { animation: head-said 0.5s cubic-bezier(.3, 1.5, .5, 1); }
.cat-button.nudge { animation: jar-nudge 0.6s cubic-bezier(.3, 1.5, .5, 1); }
/* the tiles bench wears the open category's colour on its rim */
.bench-tiles { --bench-edge: rgba(255, 255, 255, 0.15); transition: box-shadow 0.25s ease; }
.bench-tiles.track-drums  { --bench-edge: color-mix(in srgb, var(--t-drums) 70%, transparent); }
.bench-tiles.track-bass   { --bench-edge: color-mix(in srgb, var(--t-bass) 70%, transparent); }
.bench-tiles.track-chords { --bench-edge: color-mix(in srgb, var(--t-chords) 70%, transparent); }
.bench-tiles.track-melody { --bench-edge: color-mix(in srgb, var(--t-melody) 70%, transparent); }
.bench-tiles.track-horns { --bench-edge: color-mix(in srgb, var(--t-horns) 70%, transparent); }
.bench-tiles.track-yours  { --bench-edge: color-mix(in srgb, var(--t-yours) 70%, transparent); }
/* Your Beats with none yet: the Studio's drum pad, which says where beats come from */
.yours-empty {
  display: grid; place-items: center; height: 150px; padding: 0; border-radius: 18px;
  background: color-mix(in srgb, var(--t-yours) 10%, transparent);
  border: 3px dashed color-mix(in srgb, var(--t-yours) 55%, transparent);
}
.yours-empty img { width: 62%; height: auto; pointer-events: none; filter: drop-shadow(0 3px 4px rgba(7, 4, 15, 0.5)); }
.yours-empty.nudge { animation: jar-nudge 0.6s cubic-bezier(.3, 1.5, .5, 1); }
.loops-group.track-yours:not(.empty) .yours-empty { display: none; }
.loop-tile.your-beat { border-color: color-mix(in srgb, var(--t-yours) 65%, transparent); }
/* only the open category shows; its tiles slide in from the categories' side */
.bench-tiles .loops-group[hidden] { display: none; }
.bench-tiles .loops-group + .loops-group { padding-top: 0; border-top: 0; }
.loops-group.cat-in { animation: cat-in 0.28s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes cat-in { from { translate: -24px 0; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .loops-group.cat-in, .cat-button.said, .cat-button.nudge { animation: none; }
  .cat-button.open, .cat-button:active { transform: none; }
}

/* Each group is headed by its track's picture on a bar in the track's colour, the
   same picture and colour as its row on the wall, and its plaques wear the colour
   on their rims: coral for drums, gold for bass, teal for chords, violet for melody,
   green for horns (v1.47.0). */
.loops-group { --t: var(--t-melody); display: flex; flex-direction: column; gap: 6px; }
.loops-group.track-drums  { --t: var(--t-drums); }
.loops-group.track-bass   { --t: var(--t-bass); }
.loops-group.track-chords { --t: var(--t-chords); }
.loops-group.track-melody { --t: var(--t-melody); }
.loops-group.track-horns { --t: var(--t-horns); }
.loops-group.track-yours  { --t: var(--t-yours); }
.loops-group + .loops-group { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.loops-head {
  display: grid; place-items: center; height: 44px; border-radius: 12px; padding: 0;
  transition: transform 0.14s ease;
  background: color-mix(in srgb, var(--t) 28%, #241847);
  border: 2px solid color-mix(in srgb, var(--t) 75%, transparent);
  box-shadow: inset 0 0 14px -6px var(--t);
}
.loops-head img { height: 30px; width: auto; filter: drop-shadow(0 2px 3px rgba(7, 4, 15, 0.5)); pointer-events: none; }
.loops-head:active { transform: translateY(-3px); }
/* A tapped head says its track and bobs. */
.loops-head.said, .row-head.said { animation: head-said 0.5s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes head-said { 40% { scale: 1.15; } }
.loop-tile { --t: var(--t-melody); border-color: color-mix(in srgb, var(--t) 55%, transparent); }
.loop-tile.track-drums  { --t: var(--t-drums); }
.loop-tile.track-bass   { --t: var(--t-bass); }
.loop-tile.track-chords { --t: var(--t-chords); }
.loop-tile.track-melody { --t: var(--t-melody); }
.loop-tile.track-horns { --t: var(--t-horns); }
.loop-tile.nudge { animation: jar-nudge 0.6s cubic-bezier(.3, 1.5, .5, 1); }

/* The arrows at a bench's ends: a 48 px bar in the bench's own colour with a
   fade behind it, over the bench's edge, shown only while tiles are out of
   sight that way (beatlab.js, wireBenchArrows). */
.bench-arrows { position: fixed; inset: 0; z-index: 7; pointer-events: none; }
.bench-arrow {
  position: absolute; height: 48px; padding: 0; pointer-events: auto;
  display: grid; place-items: center; font-size: 1.1rem; line-height: 1; color: var(--parchment, #f3ecff);
  /* near-opaque, and whatever sits behind it is blurred as well, so a tile under the
     bar reads as out of reach (Nathan, 2026-10-10) */
  background: linear-gradient(180deg, rgba(36, 24, 71, 0.98), rgba(36, 24, 71, 0.9));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 0; border-radius: 22px 22px 10px 10px;
  box-shadow: inset 0 0 0 2px var(--t, rgba(255, 196, 107, 0.45));
  transition: transform 0.12s ease;
}
.bench-arrow-down { background: linear-gradient(0deg, rgba(36, 24, 71, 0.98), rgba(36, 24, 71, 0.9)); border-radius: 10px 10px 22px 22px; }
.bench-arrow[data-bench="cats"] { --t: rgba(255, 196, 107, 0.55); }
.bench-arrow[data-bench="tiles"] { --t: rgba(201, 166, 255, 0.55); }
.bench-arrow[data-bench="songs"] { --t: rgba(255, 196, 107, 0.55); }
.bench-arrow:active { transform: scale(0.94); }
.bench-arrow[hidden] { display: none; }
/* the glyph bobs toward the hidden tiles, so "more this way" reads at a glance */
.bench-arrow span { display: block; animation: arrow-bob 1.6s ease-in-out infinite; }
.bench-arrow-up span { animation-name: arrow-bob-up; }
@keyframes arrow-bob { 50% { translate: 0 4px; } }
@keyframes arrow-bob-up { 50% { translate: 0 -4px; } }
@media (prefers-reduced-motion: reduce) { .bench-arrow span { animation: none; } }

/* ------------------------------------------------------------ the song wall */

/* A slate of four rows by four parts, lit by a teal rim. Each cell is a button:
   a filled one, tapped, gives its tile back. The lit column is the playhead. */
.song-wall {
  position: absolute; transform: translate(-50%, -50%); z-index: 2;
  display: grid; grid-template-rows: repeat(6, minmax(0, 1fr)); gap: 5px;
  padding: 8px 10px; border-radius: 22px; box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 40%, #2a3350, #181c32 75%);
  box-shadow: inset 0 0 0 3px rgba(95, 211, 200, 0.5), 0 10px 24px rgba(7, 4, 15, 0.45);
  pointer-events: auto; touch-action: none;
}
.song-wall.bump { animation: tablet-bump 0.35s cubic-bezier(.3, 1.5, .5, 1); }
.song-wall.over { box-shadow: inset 0 0 0 3px #5fd3c8, 0 0 22px rgba(95, 211, 200, 0.6), 0 10px 24px rgba(7, 4, 15, 0.45); }
.song-row {
  /* the one inner row is the row's own height: with six rows (v1.47.0) the creature
     heading Your Beats was taller than its row and pushed that row into the drums */
  display: grid; grid-template-columns: max(9%, 44px) repeat(4, minmax(0, 1fr)); grid-template-rows: 100%;
  gap: 1.4%; min-height: 0;
  --t: var(--t-melody);
}
.song-row.track-drums  { --t: var(--t-drums); }
.song-row.track-bass   { --t: var(--t-bass); }
.song-row.track-chords { --t: var(--t-chords); }
.song-row.track-melody { --t: var(--t-melody); }
.song-row.track-horns { --t: var(--t-horns); }
.song-row.track-yours  { --t: var(--t-yours); }
.row-head canvas.cat-creature { height: 82%; max-width: 82%; }
/* The row head is a button: a tap says "Track 1: Drums!". Drawn as nothing but its
   picture, so the row still reads as picture, then four cells. */
.row-head { display: grid; place-items: center; min-width: 0; padding: 0; background: none; border: 0; border-radius: 10px; }
.row-head:active { transform: translateY(-3px); }
.row-head img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(7, 4, 15, 0.5)); pointer-events: none; }
.cell {
  min-width: 0; min-height: 0; padding: 0; display: grid; place-items: center;
  border-radius: 12px; border: 2px dashed color-mix(in srgb, var(--t) 45%, transparent);
  background: color-mix(in srgb, var(--t) 8%, transparent);
  transition: transform 0.14s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.cell img { height: 80%; width: auto; max-width: 80%; object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 2px 3px rgba(7, 4, 15, 0.5)); }
.cell.filled { border-style: solid; border-color: color-mix(in srgb, var(--t) 80%, transparent);
  background: color-mix(in srgb, var(--t) 22%, #241847); animation: tile-in 0.35s cubic-bezier(.3, 1.6, .5, 1); }
.cell.filled:active { transform: translateY(-4px); }
.cell.lit { background: color-mix(in srgb, var(--t) 18%, rgba(255, 255, 255, 0.08)); }
.cell.filled.lit { background: color-mix(in srgb, var(--t) 55%, #241847); box-shadow: 0 0 16px -2px var(--t); }
/* Her beat is two bars, so it fills two cells drawn as one wide tile: the halves lose
   their inner edges and a bridge fills the gap between them. Each half still lights
   with its own column as the song plays. */
.cell.beat-a, .cell.beat-b { position: relative; border-color: color-mix(in srgb, var(--t-yours, #ff7ac0) 80%, transparent); }
.cell.beat-a { border-right-color: transparent; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cell.beat-b { border-left-color: transparent; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cell.beat-a::after {
  content: ''; position: absolute; left: 100%; top: -2px; bottom: -2px; width: 14px; pointer-events: none;
  background: inherit; border-top: 2px solid color-mix(in srgb, var(--t-yours, #ff7ac0) 80%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--t-yours, #ff7ac0) 80%, transparent);
}
.wall-fx { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.wall-loading {   /* for a screen reader only: she cannot read it (T11) */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; pointer-events: none;
}
/* loading: the cells wait dim and glow one by one as the loops arrive */
.song-wall.loading .cell { opacity: 0.4; transition: opacity 0.15s ease, background 0.15s ease; }
.song-wall.loading .cell.load-on { opacity: 1; background: color-mix(in srgb, #5fd3c8 30%, transparent); box-shadow: 0 0 10px -2px #5fd3c8; }

/* ------------------------------------------------------------- the button */

/* The one control: round, big (the Zapper's size), a triangle that becomes a
   square. Lit and raised when there is something to play. */
.play-button {
  position: absolute; transform: translate(-50%, -50%); z-index: 3;
  width: max(56px, 10%); aspect-ratio: 1; border-radius: 50%; padding: 0;
  display: grid; place-items: center; color: #1b1233;
  background: radial-gradient(circle at 38% 32%, #c8fff7, #5fd3c8 55%, #237a73);
  border: 4px solid #2a2150;
  box-shadow: 0 1px 0 #1b1440;
  filter: saturate(0.4) brightness(0.6);
  pointer-events: auto;
  transition: filter 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.play-button svg { width: 64%; height: 64%; display: block; }
.play-button .ic-stop { display: none; }
.play-button.playing .ic-stop { display: block; }
.play-button.playing .ic-play { display: none; }
.play-button.ready, .play-button.playing {
  filter: none; transform: translate(-50%, -54%);
  box-shadow: 0 0 0 4px #ffffff, 0 5px 0 #1b1440, 0 8px 14px rgba(7, 4, 15, 0.5);
}
.play-button.ready { animation: play-ready 1.1s ease-in-out infinite; }
.play-button.playing { background: radial-gradient(circle at 38% 32%, #ffd3cb, #ff8a7a 55%, #a3473c); }
.play-button:active { transform: translate(-50%, -46%); box-shadow: 0 0 0 4px #ffffff, 0 1px 0 #1b1440; }
.play-button.nudge { animation: zap-nudge 0.4s ease; }
@keyframes play-ready { 50% { box-shadow: 0 0 0 4px #ffffff, 0 5px 0 #1b1440, 0 0 26px 8px rgba(95, 211, 200, 0.8); } }

.result-reset-beat { color: #5fd3c8; border-color: rgba(95, 211, 200, 0.55); }


/* --------------------------------------------------------------- narrow */

/* A phone on its side draws the scene so small that a cell would be 20 px; the
   wall is given a fixed size there so every cell is 44 px, and the two buttons
   step down beside the creature. */
@media (max-height: 560px) and (min-aspect-ratio: 5/6) {
  /* six rows of 44 px since v1.47.0: the wall starts just under the title, its gaps and
     padding pared to 2 px, and the two buttons drop to the bottom corners */
  #beatlab .song-wall { width: 72% !important; height: 278px !important; top: 197px !important; padding: 2px 6px; gap: 2px; border-radius: 12px; }
  #beatlab .song-row { gap: 3px; }
  #beatlab .cell { border-radius: 8px; }
  #beatlab .play-button { left: 22% !important; top: calc(100% - 27px) !important; width: 48px; }
  .loop-room .loops-head { height: 44px; }
  .loop-room .loops-head img { height: 26px; }
  .loop-room .bench-cats { gap: 6px; }
  .loop-room .cat-button { min-height: 52px; flex-direction: row; }
  .loop-room .cat-fans { display: none; }
  /* the back button sits in the middle of the top edge here, clear of the benches */
  .loop-room .bench { margin-top: 8px; margin-bottom: 8px; }
  #beatlab .result-reset-beat { left: 78% !important; top: calc(100% - 27px) !important; }
}
/* Tall and narrow: the scene is drawn at the screen's width and is only 350 to
   510 px tall, so the room is re-laid: the wall takes the top (a fixed 196 px, so
   every cell is 44 px, starting under the title), the creature steps to the
   bottom left, and the big button and ↻ go bottom right. */
@media (max-aspect-ratio: 5/6) {
  /* The room keeps the scene's own height (two thirds of the screen's width) and the
     benches share what is left beneath it, scrolling inside it with their arrows. Left to
     size themselves to their tiles, 44 drums pushed the room off the top of the screen. */
  #beatlab, #djbooth {
    grid-template-rows: min(66.667vw, 62%) minmax(0, 1fr);
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  }
  .loop-room .bench { margin-top: 0; }
  .loop-room .bench-cats { gap: 8px; }
  .loop-room .cat-button { flex-direction: row; min-height: 52px; gap: 8px; }
  .loop-room .cat-button .cat-pic { height: 70%; }
  /* six rows of 44 px since v1.47.0, starting under the title */
  #beatlab .song-wall { width: 90% !important; height: 290px !important; top: 205px !important; padding: 4px 8px; gap: 3px; }
  #beatlab .song-row { gap: 4px; }
  /* Smaller than in the other rooms, so its head clears the wall on a portrait
     iPad (a 512 px scene). On a phone it still stands partly behind the wall. */
  #beatlab .creature-slot { left: 25% !important; width: 21% !important; }   /* 24% until the sixth row (v1.47.0) */
  #beatlab .play-button { left: 76% !important; top: 80% !important; width: 72px; }
  /* beside the big button, clear of the taller wall */
  #beatlab .result-reset-beat { left: 93% !important; top: 80% !important; }
}

@media (prefers-reduced-motion: reduce) {
  .cell.filled, .play-button.ready { animation: none; }
}

/* "You got new beats!" (src/new-beats.js): a card over the room with the newest tiles,
   each tappable, and a big green button that puts it away. */
.new-beats {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(7, 4, 15, 0.62); animation: nb-fade 0.25s ease;
}
.new-beats.closing { animation: nb-fade 0.25s ease reverse forwards; }
.nb-card {
  width: min(640px, 100%); max-height: 100%; overflow: auto; box-sizing: border-box;
  padding: clamp(12px, 3vmin, 26px); border-radius: 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 2.4vmin, 18px);
  background: linear-gradient(180deg, #3b2a66, #241847);
  border: 3px solid #ffd36b; box-shadow: 0 18px 44px rgba(7, 4, 15, 0.6), 0 0 0 6px rgba(255, 211, 107, 0.18);
  animation: nb-pop 0.45s cubic-bezier(.3, 1.5, .5, 1);
}
.nb-title {
  font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 5.2vmin, 2.4rem); line-height: 1.1;
  color: #ffd36b; text-shadow: 0 3px 0 #7a4a12; display: flex; align-items: center; gap: 0.4em;
}
.nb-star { color: #fff4c2; animation: nb-twinkle 1.2s ease-in-out infinite; }
.nb-star:last-child { animation-delay: 0.6s; }
.nb-tiles { display: grid; grid-template-columns: repeat(5, auto); gap: clamp(6px, 1.8vmin, 14px); justify-content: center; }
.nb-tile.loop-tile {
  width: clamp(52px, 11vmin, 84px); height: clamp(52px, 11vmin, 84px); border-width: 3px;
  animation: nb-pop 0.4s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(0.25s + var(--i) * 0.07s);
}
.nb-go {
  width: clamp(64px, 14vmin, 92px); height: clamp(64px, 14vmin, 92px); border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; color: #ffffff; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #8ff0a4, #2fbf5a 60%, #1f8f42);
  box-shadow: 0 6px 0 #17703a, 0 10px 20px rgba(7, 4, 15, 0.45);
  animation: nb-bob 1.4s ease-in-out 1s infinite;
}
.nb-go svg { width: 52%; height: 52%; translate: 6% 0; }
.nb-go:active { translate: 0 4px; box-shadow: 0 2px 0 #17703a; }
@keyframes nb-fade { from { opacity: 0; } }
@keyframes nb-pop { from { transform: scale(0.4); opacity: 0; } }
@keyframes nb-twinkle { 50% { transform: scale(1.35) rotate(20deg); opacity: 0.7; } }
@keyframes nb-bob { 50% { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) {
  .new-beats, .nb-card, .nb-tile.loop-tile, .nb-star, .nb-go { animation: none; }
}
