/* KROOKED shell styles. Flat, chunky, hard shadows. No blur, no gradients, no rounded web cards.
   Portrait (SPEC 14): everything lives in the app box, a 9:16..9:21 column centred in the visible viewport.
   --u is 1% of the app width: sizes everywhere are in u, so layouts scale with the screen (box = 100u wide). */

@font-face { font-family: 'Permanent Marker'; src: url('../assets/fonts/permanent-marker.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'Sedgwick Ave Display'; src: url('../assets/fonts/sedgwick-ave-display.woff2') format('woff2'); font-display: block; }
@font-face { font-family: 'Press Start 2P'; src: url('../assets/fonts/press-start-2p.woff2') format('woff2'); font-display: block; }

:root {
  --purple: #3b2bb8; --purple-light: #5a4be0; --gold: #8a5a14; --lime: #c8e62a;
  --white: #f4f4f0; --outline: #0a1030; --panel: rgba(10, 24, 60, 0.55); --danger: #ff3b30;
  --display: 'Permanent Marker', 'Sedgwick Ave Display', cursive;
  --pixel: 'Press Start 2P', monospace;
  /* --app-* are set by js/ui/viewport.js to the really visible rectangle (not hidden by browser bars) */
  --app-x: 0px; --app-y: 0px; --app-w: 100vw; --app-h: 100vh;
  --u: calc(var(--app-w) / 100);
  --ol: var(--outline);
}

@supports (height: 100dvh) { :root { --app-w: 100dvw; --app-h: 100dvh; } }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: #000; color: var(--white); position: fixed; inset: 0;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
  font-family: var(--pixel);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; image-rendering: pixelated; }

#app { touch-action: none; overscroll-behavior: none; position: fixed; left: var(--app-x); top: var(--app-y); width: var(--app-w); height: var(--app-h); overflow: hidden; background: #000; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#input-root { position: absolute; inset: 0; z-index: 5; touch-action: none; overscroll-behavior: none; }
.layer { position: absolute; inset: 0; }
.hidden { display: none !important; }

/* hard outline text: eight hard offsets, no blur */
.outlined {
  text-shadow:
    calc(var(--u) * .35) 0 0 var(--ol), calc(var(--u) * -.35) 0 0 var(--ol),
    0 calc(var(--u) * .35) 0 var(--ol), 0 calc(var(--u) * -.35) 0 var(--ol),
    calc(var(--u) * .35) calc(var(--u) * .35) 0 var(--ol), calc(var(--u) * -.35) calc(var(--u) * -.35) 0 var(--ol),
    calc(var(--u) * .35) calc(var(--u) * -.35) 0 var(--ol), calc(var(--u) * -.35) calc(var(--u) * .35) 0 var(--ol),
    calc(var(--u) * .8) calc(var(--u) * .8) 0 var(--ol);
}

/* -------------------------------------------------------------- title (SPEC 32, 38) */
/* The official artwork on its own blue, the start button under it. */
.title { z-index: 20; background: #6eb5c9; color: #111; }
.title .stack {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly;
  padding: calc(var(--u) * 7) 0 calc(calc(var(--u) * 18) + env(safe-area-inset-bottom));
}
/* the picture's own background is the page's blue, so it has no visible edge and may shrink to fit a short box */
.title .art { flex: 0 1 calc(var(--u) * 100); min-height: 0; width: 100%; object-fit: contain; image-rendering: auto; margin: calc(var(--u) * -3) 0; }
.title .press {
  flex: none; display: flex; align-items: center; gap: calc(var(--u) * 2.6); background: #111; color: var(--white);
  border: calc(var(--u) * .7) solid #fff; box-shadow: calc(var(--u) * 1.2) calc(var(--u) * 1.2) 0 #111;
  padding: calc(var(--u) * 2.6) calc(var(--u) * 3.4); font-size: max(calc(var(--u) * 3.1), 10px); line-height: 1.4;
}
.title .press b { font-weight: normal; }
.title .foot {
  position: absolute; left: calc(calc(var(--u) * 3.5) + env(safe-area-inset-left)); bottom: calc(calc(var(--u) * 3.5) + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: calc(var(--u) * 1.4); font-size: max(calc(var(--u) * 1.9), 7px); color: var(--outline);
}
/* the Cráneo skull: line art in the artwork's own black, tucked into the corner */
.title .skull { position: absolute; right: calc(var(--u) * 1.5); bottom: calc(calc(var(--u) * 1.5) + env(safe-area-inset-bottom)); width: calc(var(--u) * 12.5); image-rendering: auto; transform: rotate(8deg); }

/* -------------------------------------------------------------- playlist invitation (SPEC 39, js/ui/invite.js) */
/* Over the title, dimmed like the pause. One picture, one sentence, one green button; SALTAR is plain text under it. */
.invite { z-index: 22; background: rgba(4, 8, 24, .78); display: flex; align-items: center; justify-content: center; padding-top: calc(var(--u) * 12); font-family: var(--pixel); }
.invite .panel {
  width: 86%; display: flex; flex-direction: column; align-items: center; padding: 0 calc(var(--u) * 4) calc(var(--u) * 2.5);
  background: #0a183c; border: calc(var(--u) * .8) solid var(--white); box-shadow: calc(var(--u) * 1.5) calc(var(--u) * 1.5) 0 #000;
}
.invite .cover { position: relative; width: calc(var(--u) * 36); height: calc(var(--u) * 36); margin-top: calc(var(--u) * -15); }
.invite .cover img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: 40% 45%; image-rendering: auto;
  border-radius: 50%; border: calc(var(--u) * .8) solid var(--white); box-shadow: calc(var(--u) * 1.3) calc(var(--u) * 1.3) 0 #000;
}
.invite .badge { position: absolute; right: calc(var(--u) * -1.5); bottom: calc(var(--u) * -1.5); width: calc(var(--u) * 11.3); height: calc(var(--u) * 11.3); display: block; }
.invite .say {
  margin-top: calc(var(--u) * 6.5); display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 2);
  font-weight: normal; font-size: max(calc(var(--u) * 2.8), 9px); line-height: 1.3; color: var(--white); text-align: center;
}
.invite .say b { font-family: var(--display); font-weight: normal; font-size: calc(var(--u) * 12.8); line-height: 1; text-shadow: calc(var(--u) * 1) calc(var(--u) * 1) 0 var(--purple); }
.invite .by { margin-top: calc(var(--u) * 4.5); font-size: max(calc(var(--u) * 2.05), 7px); line-height: 2.2; color: #cfe0ff; text-align: center; }
.invite .by b { font-family: var(--display); font-weight: normal; font-size: calc(var(--u) * 3.85); line-height: 1; color: var(--white); }
.invite .play {
  margin-top: calc(var(--u) * 6); align-self: stretch; height: calc(var(--u) * 15); display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 2.6);
  background: #1ed760; color: #000; border: calc(var(--u) * .8) solid var(--white); box-shadow: calc(var(--u) * 1.3) calc(var(--u) * 1.3) 0 #000;
  font-size: max(calc(var(--u) * 3.3), 11px); line-height: 1;
}
.invite .play svg { width: calc(var(--u) * 3.6); height: calc(var(--u) * 4.1); flex: none; display: block; }
.invite .skip { margin-top: calc(var(--u) * 3.6); align-self: stretch; height: max(calc(var(--u) * 12), 44px); color: #cfe0ff; font-size: max(calc(var(--u) * 2.6), 9px); line-height: 1; }
.invite.keys .sel { outline: calc(var(--u) * .7) solid var(--lime); outline-offset: calc(var(--u) * .7); }
.invite.keys .skip.sel { color: var(--white); outline-offset: calc(var(--u) * -1.5); }

@keyframes blink { 0%, 100% { opacity: 1; } 55% { opacity: 0; } }

/* -------------------------------------------------------------- HUD */
.hud { z-index: 10; pointer-events: none; font-family: var(--pixel); }
.hud .score { position: absolute; left: calc(calc(var(--u) * 3) + env(safe-area-inset-left)); top: calc(calc(var(--u) * 2.2) + env(safe-area-inset-top)); }
.hud .score .lbl { font-size: max(calc(var(--u) * 2.5), 9px); color: #cfe0ff; }
.hud .score .val { font-family: var(--display); font-size: calc(var(--u) * 9); line-height: 1.05; color: var(--white); letter-spacing: calc(var(--u) * .3); }
.hud .score .best { font-size: max(calc(var(--u) * 2.5), 9px); color: var(--lime); margin-top: calc(var(--u) * .6); }
.hud .beat { display: flex; gap: calc(var(--u) * 1.1); align-items: center; height: calc(var(--u) * 3); margin-top: calc(var(--u) * 1); }
.hud .beat i { display: block; width: calc(var(--u) * 1.6); height: calc(var(--u) * 1.6); flex: none; background: rgba(244, 244, 240, .45); box-shadow: 0 0 0 calc(var(--u) * .35) var(--outline, #0a1030); }
.hud .beat i:nth-child(2), .hud .beat i:nth-child(4) { width: calc(var(--u) * 2.4); height: calc(var(--u) * 2.4); background: rgba(200, 230, 42, .5); }
.hud .beat[data-b="0"] i:nth-child(1), .hud .beat[data-b="2"] i:nth-child(3) { background: #fff; }
.hud .beat[data-b="1"] i:nth-child(2), .hud .beat[data-b="3"] i:nth-child(4) { background: var(--lime); }
.hud .beat[data-p="0"] i { opacity: .85; }
.hud .beat[data-p="1"] i { opacity: .9; }
.hud .beat[data-p="2"] i { opacity: .95; }
.hud .beat[data-p="3"] i, .hud .beat[data-p="4"] i { opacity: 1; }
/* buttons (SPEC 26): one column up the right edge, 5u in from it, listed from the thumb up. Its foot is 72u above the bottom:
   20u clear of the right stick's home ring (base top 52u), so a thumb flicking up from the stick has room.
   In a short box (9:16 is 178u tall) the column reaches the top right corner. */
.hud .btns { position: absolute; z-index: 1; right: calc(var(--u) * 5); bottom: calc(var(--u) * 72); display: flex; flex-direction: column-reverse; align-items: center; gap: calc(var(--u) * 1.5); pointer-events: none; }
.hud .btn {
  pointer-events: auto; width: max(calc(var(--u) * 8.4), 36px); height: max(calc(var(--u) * 8.4), 36px); background: rgba(10, 24, 60, .82);
  border: calc(var(--u) * .6) solid var(--white); box-shadow: calc(var(--u) * .7) calc(var(--u) * .7) 0 #000; display: flex; align-items: center; justify-content: center; padding: 0;
}
.hud .btn.on { background: var(--purple); }
.hud .btn.off { opacity: .45; }
.hud .btn.rec { border-color: var(--danger); color: var(--danger); font-size: max(calc(var(--u) * 2.6), 9px); animation: blink 1s steps(1) infinite; }
.hud .btn:active { background: var(--purple); transform: translate(calc(var(--u) * .4), calc(var(--u) * .4)); box-shadow: calc(var(--u) * .3) calc(var(--u) * .3) 0 #000; }
.hud .btn svg { width: 55%; height: 55%; display: block; shape-rendering: crispEdges; }
/* the trick line (SPEC 32): a bar under the sticks (their rings end 20u above the bottom edge). One row of tricks that
   never wraps: js/ui/hud.js folds the older ones into the "+N" chip. */
.hud .line {
  position: absolute; left: calc(calc(var(--u) * 2.5) + env(safe-area-inset-left)); right: calc(calc(var(--u) * 2.5) + env(safe-area-inset-right));
  bottom: max(calc(var(--u) * 2.5), calc(env(safe-area-inset-bottom) - 14px)); height: calc(var(--u) * 14);
  display: flex; background: rgba(10, 24, 60, .9); border: calc(var(--u) * .7) solid var(--white); color: var(--white);
  box-shadow: 0 0 0 calc(var(--u) * .5) var(--outline), calc(var(--u) * 1.4) calc(var(--u) * 1.4) 0 var(--outline);
}
.hud .line .n { flex: none; width: calc(var(--u) * 19); background: var(--purple); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * .8); }
.hud .line .n b { font-family: var(--display); font-weight: normal; font-size: calc(var(--u) * 6.6); line-height: 1; }
.hud .line .n i { font-style: normal; font-size: max(calc(var(--u) * 1.8), 7px); color: #e4ecff; }
.hud .line .t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: calc(var(--u) * .7); padding: 0 calc(var(--u) * 2.4); }
.hud .line .tk { display: flex; align-items: center; column-gap: calc(var(--u) * 1.6); white-space: nowrap; overflow: hidden; font-family: var(--display); font-size: calc(var(--u) * 4.1); line-height: 1.25; color: #b9c8ff; }
.hud .line .tk span { flex: none; }
.hud .line .tk span + span::before { content: '+'; margin-right: calc(var(--u) * 1.6); color: #b9c8ff; }
.hud .line .tk span:last-child { color: var(--white); flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hud .line .tk em { flex: none; font-style: normal; font-family: var(--pixel); font-size: max(calc(var(--u) * 2), 8px); line-height: 1; background: var(--lime); color: var(--outline); padding: calc(var(--u) * 1) calc(var(--u) * 1) calc(var(--u) * .8); }
.hud .line .pt { display: flex; align-items: baseline; gap: calc(var(--u) * 1.5); white-space: nowrap; font-family: var(--display); font-size: calc(var(--u) * 5.6); line-height: 1; color: var(--lime); }
.hud .line .pt small { font-family: var(--pixel); font-size: max(calc(var(--u) * 1.8), 7px); color: #e4ecff; }
.hud .line .pt .eq { font-size: calc(var(--u) * 4.1); color: var(--white); }
.hud .line .m { display: none; flex: 1 1 auto; align-items: center; justify-content: center; text-align: center; font-family: var(--display); font-size: calc(var(--u) * 6.4); line-height: 1; white-space: nowrap; }
.hud .line.land { border-color: var(--lime); }
.hud .line.land .n { background: var(--lime); color: var(--outline); }
.hud .line.land .n i { color: var(--outline); }
.hud .line.msg .n, .hud .line.msg .t { display: none; }
.hud .line.msg .m { display: flex; color: var(--lime); }
.hud .line.bail { border-color: var(--danger); }
.hud .line.bail .m { color: var(--danger); }
.hud .charge { position: absolute; left: 50%; bottom: calc(calc(var(--u) * 34) + env(safe-area-inset-bottom)); transform: translateX(-50%); width: calc(var(--u) * 24); height: calc(var(--u) * 3); background: rgba(10, 24, 60, .82); border: calc(var(--u) * .5) solid var(--white); box-shadow: calc(var(--u) * .5) calc(var(--u) * .5) 0 #000; }
.hud .charge .fill { height: 100%; width: 0; background: var(--purpleLight, #5a4be0); }
.hud .charge.full .fill { background: var(--lime); animation: blink .3s steps(1) infinite; }
.hud .lap { position: absolute; left: 50%; top: calc(calc(var(--u) * 50) + env(safe-area-inset-top)); transform: translateX(-50%); text-align: center; white-space: nowrap; font-family: var(--display); font-size: calc(var(--u) * 6.4); color: var(--white); animation: blink 1s steps(1) infinite; }
.hud .lap .l2 { font-size: calc(var(--u) * 10); color: var(--lime); }
.hud .line.pop { animation: pop .18s steps(3) 1; }
.hud .line.fade { opacity: .5; }
@keyframes pop { 0% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* how-to card */
.howto {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); width: calc(var(--u) * 90); pointer-events: auto;
  background: rgba(10, 24, 60, .92); border: calc(var(--u) * .8) solid var(--white); box-shadow: calc(var(--u) * 1.4) calc(var(--u) * 1.4) 0 #000; z-index: 3;
}
.howto .hh { background: var(--purple); font-family: var(--display); font-size: calc(var(--u) * 8); padding: calc(var(--u) * 1.6) calc(var(--u) * 3); color: var(--white); border-bottom: calc(var(--u) * .5) solid var(--outline); }
.howto ul { list-style: none; padding: calc(var(--u) * 3) calc(var(--u) * 3.4) calc(var(--u) * 2); }
.howto li { font-size: calc(var(--u) * 3.3); line-height: 1.7; margin-bottom: calc(var(--u) * 1.6); color: var(--white); }
.howto li b { color: var(--lime); font-weight: normal; display: block; }
.howto li i { color: var(--lime); font-style: normal; }
.howto .ok { padding: 0 calc(var(--u) * 3.4) calc(var(--u) * 3); text-align: center; font-size: calc(var(--u) * 3); color: #9fb4ff; animation: blink 1s steps(1) infinite; }

/* -------------------------------------------------------------- pause */
.pause { z-index: 30; background: rgba(4, 8, 24, .78); overflow: hidden; }
.pause .panel { position: absolute; left: 6%; top: 50%; transform: translateY(-50%); width: 88%; display: flex; flex-direction: column; }   /* the menu alone (SPEC 26): mid-screen, a thumb's reach from the pause button */
.pause .hdr {
  height: calc(var(--u) * 14); background: var(--purple); display: flex; align-items: center; padding-left: calc(var(--u) * 4);
  font-family: var(--display); font-size: calc(var(--u) * 9.5); line-height: 1; box-shadow: 0 calc(var(--u) * .8) 0 var(--outline);
}
.pause .rows { margin-top: calc(var(--u) * 1.4); background: var(--panel); border-top: calc(var(--u) * .4) solid rgba(255,255,255,.18); }
.pause .row {
  display: flex; align-items: center; justify-content: center; width: 100%; height: calc(var(--u) * 9.6);
  border-bottom: calc(var(--u) * .35) solid rgba(190, 205, 255, .32); font-family: var(--display); font-size: calc(var(--u) * 5.6); line-height: 1; color: var(--white);
  white-space: nowrap; overflow: hidden;
}
.pause .row.sel { color: var(--lime); }
/* -------------------------------------------------------------- help (SPEC 26): AYUDA in the pause menu */
.help { z-index: 31; background: rgba(4, 8, 24, .9); overflow: hidden; display: flex; flex-direction: column; gap: calc(var(--u) * 1.6);
  padding: calc(calc(var(--u) * 3) + env(safe-area-inset-top)) calc(var(--u) * 3) calc(calc(var(--u) * 3) + env(safe-area-inset-bottom)); }
.help .hdr {
  flex: none; height: calc(var(--u) * 11); background: var(--purple); display: flex; align-items: center; padding-left: calc(var(--u) * 4);
  font-family: var(--display); font-size: calc(var(--u) * 8); line-height: 1; box-shadow: 0 calc(var(--u) * .8) 0 var(--outline);
}
.help .tabs { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--u) * 1.4); margin-top: calc(var(--u) * .8); }
.help .tab {
  height: calc(var(--u) * 8.4); background: var(--outline); border: calc(var(--u) * .5) solid #5a6fd0; box-shadow: calc(var(--u) * .7) calc(var(--u) * .7) 0 #000;
  font-family: var(--display); font-size: calc(var(--u) * 4.6); line-height: 1; color: var(--white); white-space: nowrap;
}
.help .tab.sel { background: var(--purple); border-color: var(--lime); color: var(--lime); }
.help .body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.help .page {
  background: rgba(10, 24, 60, .85); border: calc(var(--u) * .6) solid var(--white); box-shadow: calc(var(--u) * 1) calc(var(--u) * 1) 0 #000;
  padding: calc(var(--u) * 1.8) calc(var(--u) * 2.4) calc(var(--u) * 1.8); overflow: hidden;
}
.help .row {
  flex: none; display: flex; align-items: center; justify-content: center; width: 100%; height: calc(var(--u) * 8.4); background: var(--panel);
  border: calc(var(--u) * .35) solid rgba(190, 205, 255, .32); font-family: var(--display); font-size: calc(var(--u) * 5.6); line-height: 1; color: var(--lime);
}
.help h3 { font-family: var(--display); font-weight: normal; font-size: calc(var(--u) * 5); color: var(--lime); margin-bottom: calc(var(--u) * 1); line-height: 1; white-space: nowrap; }
.help .lead { font-size: calc(var(--u) * 1.9); color: var(--white); line-height: 1.6; margin-bottom: calc(var(--u) * .4); }
.help .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 calc(var(--u) * 2.4); }
.help .col { min-width: 0; }
.help .ct { font-size: calc(var(--u) * 2.3); color: var(--white); background: rgba(90, 75, 224, .55); padding: calc(var(--u) * .9) calc(var(--u) * 1); margin: calc(var(--u) * 1) 0 calc(var(--u) * .5); white-space: nowrap; }
.help .trk { display: flex; align-items: center; gap: calc(var(--u) * 1.4); height: calc(var(--u) * 13); border-top: calc(var(--u) * .3) solid rgba(190, 205, 255, .25); min-width: 0; }
.help .col .trk:first-of-type, .help .keys .trk:first-child { border-top: 0; }
.help .trk > div:last-child { min-width: 0; }
.help .trk svg { width: calc(var(--u) * 9); height: calc(var(--u) * 9); flex: none; display: block; shape-rendering: crispEdges; background: rgba(0,0,0,.35); }
.help .trk .nm { font-size: calc(var(--u) * 2.4); color: var(--white); white-space: nowrap; }
.help .trk .hn { font-size: calc(var(--u) * 1.85); color: #9fb4ff; margin-top: calc(var(--u) * .9); line-height: 1.4; white-space: nowrap; }
.help .note { font-size: calc(var(--u) * 2.1); color: var(--lime); margin-top: calc(var(--u) * 1.8); line-height: 1.7; }
/* grinds: three cards a row, each a picture (one cell of assets/help/grinds.png, 8 cells of 112x100) over the left-stick diagram and the name */
.help .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--u) * 1.6); }
.help .gc { min-width: 0; }
.help .pic {
  width: 100%; aspect-ratio: 112 / 100; background: #9fc4e8 url('../assets/help/grinds.png') 0 0 / 800% 100% no-repeat;
  image-rendering: pixelated; border: calc(var(--u) * .4) solid var(--white);
}
.help .gc .trk { height: calc(var(--u) * 7.4); border-top: 0; gap: calc(var(--u) * 1.1); }
.help .gc .trk svg { width: calc(var(--u) * 6.4); height: calc(var(--u) * 6.4); }
.help .gc .trk .nm { font-size: calc(var(--u) * 1.95); }
.help .gc .trk .hn { font-size: calc(var(--u) * 1.75); margin-top: calc(var(--u) * .7); }
/* SPEC 31: how to get out of a grind: one line under the grinds, and on the controls page both sticks drawn side by side */
.help .out { font-size: calc(var(--u) * 1.9); color: var(--lime); margin-top: calc(var(--u) * .6); line-height: 1.2; white-space: nowrap; }
.help .trk svg.duo { width: calc(var(--u) * 13.5); }
.help .outs .trk { border-top: 0; height: calc(var(--u) * 11.6); }
/* controls: the HUD buttons with what they do */
.help .keys .trk { height: calc(var(--u) * 9.4); }
.help .keys .ic {
  flex: none; width: calc(var(--u) * 7.6); height: calc(var(--u) * 7.6); background: rgba(10, 24, 60, .82); border: calc(var(--u) * .5) solid var(--white);
  display: flex; align-items: center; justify-content: center;
}
.help .keys .ic svg { width: 55%; height: 55%; background: none; }

/* clip panel (SPEC 25): the pause panel's header and rows (same look, its own class), with the recording playing under them */
.clip { z-index: 30; background: rgba(4, 8, 24, .78); overflow: hidden; }
.clip .panel { position: absolute; left: 6%; top: calc(var(--u) * 5); width: 88%; display: flex; flex-direction: column; }
.clip .hdr {
  height: calc(var(--u) * 14); background: var(--purple); display: flex; align-items: center; padding-left: calc(var(--u) * 4);
  font-family: var(--display); font-size: calc(var(--u) * 9.5); line-height: 1; box-shadow: 0 calc(var(--u) * .8) 0 var(--outline);
}
.clip .rows { margin-top: calc(var(--u) * 1.4); background: var(--panel); border-top: calc(var(--u) * .4) solid rgba(255,255,255,.18); }
.clip .row {
  display: flex; align-items: center; justify-content: center; width: 100%; height: calc(var(--u) * 8.4);
  border-bottom: calc(var(--u) * .35) solid rgba(190, 205, 255, .32); font-family: var(--display); font-size: calc(var(--u) * 5.6); line-height: 1; color: var(--white);
  white-space: nowrap; overflow: hidden;
}
.clip .row.sel { color: var(--lime); }
.clip .prev { display: block; align-self: center; width: calc(var(--u) * 46); margin-top: calc(var(--u) * 3); border: calc(var(--u) * .6) solid var(--white); box-shadow: calc(var(--u) * 1) calc(var(--u) * 1) 0 #000; background: #000; image-rendering: pixelated; }
.clip .msg { align-self: center; margin-top: calc(var(--u) * 2.4); font-size: calc(var(--u) * 2.3); color: var(--lime); text-align: center; line-height: 1.6; }

/* -------------------------------------------------------------- playground select (after PRESS START) */
.select { z-index: 20; background: #0b1a6e; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(var(--u) * 5); }
.select .hdr { font-family: var(--display); font-size: calc(var(--u) * 11); line-height: 1; color: var(--white); transform: rotate(-3deg); }
.select .cards { width: 86%; display: flex; flex-direction: column; gap: calc(var(--u) * 4); }
.select .card {
  display: block; width: 100%; text-align: left; padding: calc(var(--u) * 3.2) calc(var(--u) * 3.6); background: var(--outline); color: var(--white);
  border: calc(var(--u) * .6) solid #5a6fd0; box-shadow: calc(var(--u) * 1) calc(var(--u) * 1) 0 #000;
}
.select .card.sel { border-color: var(--lime); background: var(--purple); transform: translate(calc(var(--u) * -.6), calc(var(--u) * -.6)); box-shadow: calc(var(--u) * 1.6) calc(var(--u) * 1.6) 0 #000; }
.select .card .nm { font-family: var(--display); font-size: calc(var(--u) * 8.4); line-height: 1; white-space: nowrap; }
.select .card.sel .nm { color: var(--lime); }
.select .card .bl { font-size: calc(var(--u) * 2.2); line-height: 1.7; color: #9fb4ff; margin-top: calc(var(--u) * 2); }
.select .card .bs { font-size: calc(var(--u) * 2.1); color: var(--white); margin-top: calc(var(--u) * 1.6); min-height: calc(var(--u) * 2.2); }
.select .hint { font-size: calc(var(--u) * 2.2); color: #9fb4ff; text-align: center; line-height: 1.8; }

/* -------------------------------------------------------------- rotate overlay */
/* shown on a touch device held in landscape: the game is portrait only */
.rotate {
  position: fixed; inset: 0; z-index: 100; display: none; background: #0b1a6e; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 4vmin; gap: 4vmin;
}
.rotate .big { font-family: var(--display); font-size: min(12vw, 15vh); color: var(--white); line-height: 1.05; }
.rotate .small { font-family: var(--pixel); font-size: min(3.2vw, 3.6vh); color: var(--lime); line-height: 1.6; }
.rotate svg { width: min(30vw, 30vh); height: min(30vw, 30vh); shape-rendering: crispEdges; animation: tilt 1.2s steps(2, jump-none) infinite; }
@keyframes tilt { 0% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
@media (orientation: landscape) and (pointer: coarse) { .rotate { display: flex; } }
.rotate.force { display: flex; }
