/* BITR — "Select your bum" character select screen (index.html).
   Modelled on the Turtles in Time arcade select screen. */

@font-face {
  font-family: 'Press Start 2P';
  src: url('../assets/fonts/press-start-2p-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'DotGothic16';
  src: url('../assets/fonts/dotgothic16-latin-400-normal.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #000;
  --ink: #fff;
  --blue: #2a6cff;
  --blue-hi: #7fb2ff;
  --blue-deep: #0b1f8a;
  --frame: #c8dcff;
  --c: #3ccf6e;           /* the highlighted member's colour, set by js/select.js */
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --text: 'DotGothic16', ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: none;
  -webkit-tap-highlight-color: transparent;
}
img { image-rendering: pixelated; image-rendering: crisp-edges; }
button { font: inherit; color: inherit; }
a { color: var(--blue-hi); }
[hidden] { display: none !important; }

.arcade {
  max-width: 2000px;
  overflow-x: clip;   /* the last slot's slanted stripe pokes past the edge */
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(14px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---------- 1UP score box (one player picks) ---------- */
.hud { display: grid; grid-template-columns: minmax(0, 1fr) 1fr; gap: 12px; font-family: var(--pixel); }
.hud-box {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'up name score' 'lives bar bar';
  align-items: center;
  column-gap: 14px;
  row-gap: 6px;
  padding: 8px 14px 9px;
  border: 3px solid var(--frame);
  border-radius: 10px;
  box-shadow: inset 0 0 0 3px var(--blue-deep), 0 0 0 2px var(--blue-deep);
  background: #000;
  font-size: clamp(14px, 1vw, 20px);
  min-width: 0;
}
.hud-up { grid-area: up; color: var(--blue-hi); font-style: italic; font-size: 0.78em; }
.hud-up b { font-size: 2em; color: var(--blue); font-style: italic; }
.bitr-wordmark { display: inline-block; font-family: var(--pixel); font-weight: 700; font-style: italic; letter-spacing: -0.08em; color: var(--blue-hi); text-shadow: 2px 2px 0 var(--blue-deep), -1px 0 0 var(--blue); }
.hud-up.bitr-wordmark { font-size: 1.2em; }
.hud-name { grid-area: name; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-score { grid-area: score; }
.hud-lives { grid-area: lives; font-size: 1.1em; padding-left: 4px; }
.hud-bar {
  grid-area: bar;
  height: 14px;
  --fill: 10;
  background:
    linear-gradient(90deg, var(--c) calc(var(--fill) / 16 * 100%), transparent 0) 0 0 / 100% 100% no-repeat;
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 8px);
          mask: repeating-linear-gradient(90deg, #000 0 5px, transparent 5px 8px);
  outline: 1px solid #333;
  transition: background 0.2s;
}

/* ---------- Title ---------- */
.select, .details { flex: 1; display: flex; flex-direction: column; }
.select { justify-content: center; gap: clamp(20px, 3vh, 44px); padding-bottom: 2vh; }
.hint-touch { display: none; }
@media (hover: none) { .hint-touch { display: inline; } .hint-mouse { display: none; } }
.select-title {
  font-family: var(--pixel);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-align: center;
}

/* ---------- The whole site is the arcade's CRT ----------
   The whole window is the cabinet's tube, on the select screen and the profiles alike: the 1UP
   line, the title, the roster or profile and the footer all sit on the same electric blue as
   the intro's title screen, fading to navy black at the edges, behind the tube's dotted scan
   lines (js/crt.js) and curved glass, inside a dark plastic bezel. Around the bezel (and under a
   phone's browser toolbars) is the intro's dim arcade room. */
html:has(#arcade) {
  background: #13101b url('../assets/select/arcade-room.webp') center / cover no-repeat;
  image-rendering: pixelated;
}
html:has(#arcade) body { background: transparent; }
@media (orientation: portrait) {
  html:has(#arcade) { background-image: url('../assets/select/arcade-room-tall.webp'); }
}
.arcade {
  --bezel: clamp(6px, 1.4vmin, 16px);
  --ink: #9cc4ff;
  --yellow: #f5d63c;
  --red: #c8141e;
  --red-dark: #6e0a10;
  /* the site's blues, retuned to the tube's electric blue for everything that uses them */
  --frame: #8cb8ff;
  --blue: #2a5cff;
  --blue-hi: #9cc4ff;
  --blue-deep: #071660;
  position: relative;
  isolation: isolate;
  max-width: none;
  min-height: calc(100dvh - 2 * var(--bezel));
  margin: var(--bezel);
  border-radius: clamp(18px, 4vmin, 48px) / clamp(16px, 3.4vmin, 42px);
  /* the intro's title screen: neutral grey through the tube grade (tools/blender/tube_post.py) */
  background: radial-gradient(ellipse 75% 70% at 50% 45%, #0723b1 0, #05188a 40%, #020a40 82%, #01030f 100%) #020a40;
  /* the cabinet's plastic bezel and the black gap before the glass */
  box-shadow:
    0 0 0 3px #000, 0 0 0 var(--bezel) #15121c, 0 0 0 calc(var(--bezel) + 2px) #050407,
    0 0 50px 6px rgba(60, 110, 255, 0.16);
}
/* The tube over everything: the dark falloff of curved glass at the edges and corners, and a faint
   mains flicker; plain scanlines too where js/crt.js can't draw its dotted ones */
.arcade::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: inherit;
  background: radial-gradient(ellipse 78% 72% at 50% 50%, transparent 58%, rgba(0, 2, 12, 0.45) 84%, rgba(0, 0, 0, 0.9) 100%);
  box-shadow: inset 0 0 60px 18px rgba(0, 0, 0, 0.65), inset 0 0 8px 2px rgba(140, 180, 255, 0.16);
  pointer-events: none;
  animation: crt-flicker 0.12s steps(2) infinite;
}
/* The glass in front: the slow bright band of the refresh, and reflections of the room's lights */
.arcade::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 21;
  border-radius: inherit;
  background:
    linear-gradient(180deg, transparent 0, rgba(170, 200, 255, 0.06) 46%, rgba(170, 200, 255, 0.06) 54%, transparent 100%) 0 0 / 100% 22% no-repeat,
    radial-gradient(ellipse 50% 30% at 20% 8%, rgba(255, 255, 255, 0.1), transparent 70%),
    linear-gradient(162deg, rgba(255, 255, 255, 0.06) 0 16%, transparent 30%);
  pointer-events: none;
  animation: crt-roll 7s linear infinite;
}
.arcade:not(.has-tube)::after {
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.32) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 78% 72% at 50% 50%, transparent 58%, rgba(0, 2, 12, 0.45) 84%, rgba(0, 0, 0, 0.9) 100%);
}
@keyframes crt-flicker { 50% { opacity: 0.93; } }
@keyframes crt-roll { from { background-position: 0 -30%, 0 0, 0 0; } to { background-position: 0 130%, 0 0, 0 0; } }

/* The picking screen itself: no box of its own any more, just the game on the tube */
.select {
  position: relative;
  flex: 1 1 auto;
  justify-content: space-evenly;
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: clamp(6px, 1.4dvh, 20px) clamp(10px, 3vw, 56px);
}

/* 1UP line: the score box becomes the game's own status line, in the intro's colours */
.arcade .hud-box {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  text-shadow: 2px 2px 0 #020820;
}
.arcade .hud-up.bitr-wordmark { color: var(--yellow); text-shadow: 2px 2px 0 #5a3c00; }
.arcade .hud-bar { outline-color: #071660; filter: url(#tube-grade); }   /* the member's colour through the tube grade */

/* Title: a red ribbon with white letters, like BLACKEST IN THE ROOM on the intro's title screen */
.select-title {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 4px auto 0;
  padding: 0.35em 0.7em 0.3em;
  font-size: clamp(16px, 3.4vw, 64px);
  color: #fff6e6;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.12) 0 2px, transparent 2px 4px),
    linear-gradient(180deg, #e2262c, var(--red, #c8141e) 55%, #8e0c14);
  text-shadow: 3px 3px 0 #4a0408, -2px 0 0 rgba(80, 220, 255, 0.35), 2px 0 0 rgba(255, 80, 80, 0.35);
  box-shadow: 0 4px 0 #3a0306;
  transform: rotate(-1.2deg);
  filter: drop-shadow(0 0 10px rgba(255, 70, 60, 0.35));
}
/* the ribbon's folded tails */
.select-title::before, .select-title::after {
  content: '';
  position: absolute;
  top: 26%;
  width: 1.5em;
  height: 100%;
  background: var(--red-dark, #6e0a10);
  z-index: -1;
}
.select-title::before { right: calc(100% - 0.6em); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 34% 50%); }
.select-title::after { left: calc(100% - 0.6em); clip-path: polygon(0 0, 100% 0, 66% 50%, 100% 100%, 0 100%); }

/* Hint and credit: PRESS START yellow, blinking like the intro's */
.select-hint {
  margin: 0;
  text-align: center;
  font-family: var(--pixel);
  font-size: clamp(10px, 0.9vw, 16px);
  color: var(--yellow, #f5d63c);
  text-shadow: 2px 2px 0 #3a2a00;
  animation: blink 1.1s steps(1) infinite;
}
.select-credit {
  position: absolute;
  right: clamp(14px, 2vw, 32px);
  bottom: clamp(6px, 1.2dvh, 18px);
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(9px, 0.7vw, 13px);
  color: var(--yellow, #f5d63c);
  text-shadow: 2px 2px 0 #3a2a00;
}

/* The music dock, when it's open over the picking screen: a dark panel in the tube's blues */
.arcade .mixtape {
  position: relative;
  border-color: #7fa8ff;
  box-shadow: 0 0 0 2px #071660;
  background: linear-gradient(110deg, rgba(6, 16, 60, 0.92), rgba(2, 5, 22, 0.92) 70%);
}
/* Footer: small pale-blue text along the bottom of the tube */
.arcade .foot { position: relative; color: #5a78c0; padding-bottom: 6px; }
.arcade .foot a,
.arcade .foot-sound { color: var(--ink); text-shadow: 2px 2px 0 #020820; }
.arcade .foot a:hover,
.arcade .foot a:focus-visible,
.arcade .foot-sound:hover,
.arcade .foot-sound:focus-visible { color: #fff; }

/* ---------- Roster ---------- */
.roster {
  list-style: none;
  margin: 0;
  padding: clamp(48px, 7vh, 90px) 0 clamp(18px, 4vh, 60px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(8px, 1.6vw, 36px);
  align-items: center;
}
.slot { --c: #fff; position: relative; }
.slot-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  outline: none;
}
.slot-frame {
  position: relative;
  display: block;
  aspect-ratio: 1;
  /* as big as the column allows, but never taller than about half the screen */
  width: min(100%, 40dvh);
  margin: 0 auto;
  z-index: 1;
  transition: transform 0.12s steps(3);
}
.slot-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.6));
}
.slot-face { opacity: 0; }
/* the diagonal stripe behind the highlighted fighter, in the intro's PRESS START yellow */
.slot-band {
  position: absolute;
  left: 8%;
  right: 8%;
  top: -18%;
  bottom: -8px;
  transform: skewX(-14deg);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 3px, transparent 3px 11px),
    linear-gradient(180deg, #fff27a, #f5c51c 40%, #a86a00);
  opacity: 0;
  transition: opacity 0.1s steps(2);
}
.slot-name {
  display: block;
  margin-top: 16px;
  font-family: var(--pixel);
  font-size: clamp(9px, 1vw, 20px);
  text-align: center;
  color: var(--c);
  text-shadow: 2px 2px 0 #020820;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}
.slot-up {
  position: absolute;
  left: 50%;
  top: clamp(-64px, -5vh, -40px);
  z-index: 2;
  padding: 2px 6px 3px;
  font-family: var(--pixel);
  font-size: clamp(10px, 0.8vw, 15px);
  font-style: italic;
  color: #fff;
  background: #a8101a;
  border: 2px solid #f5d63c;
  transform: translateX(-50%);
  opacity: 0;
  white-space: nowrap;
}
.slot-up b { font-size: 1.6em; color: #ffd84a; }
.slot-up .bitr-wordmark { color: #fff27a; text-shadow: 2px 2px 0 #4a0408; }
.slot-up::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -9px;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #f5d63c;
  border-bottom: 0;
}

.slot.is-active .slot-face { opacity: 1; }
.slot.is-active .slot-shadow { opacity: 0; }
.slot.is-active .slot-band { opacity: 1; }
.slot.is-active .slot-up { opacity: 1; animation: bob 0.6s steps(2) infinite; }
.slot.is-active .slot-frame { transform: scale(1.08); }
.slot.is-active .slot-name { color: #fff; text-shadow: 2px 2px 0 #6a4300; }
.slot-btn:focus-visible .slot-frame { outline: 3px solid #ffd84a; outline-offset: 4px; }
.slot.is-chosen .slot-frame { animation: flash 0.13s steps(1) 4; }
.slot.is-chosen .slot-band { animation: flash 0.13s steps(1) 4 reverse; }

/* ---------- Pick: centre stage before the profile opens (js/select.js choose) ---------- */
.pick { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
.pick-shade { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.86); opacity: 0; }
.pick-burst {
  --s: min(90vmin, 640px);
  position: absolute; left: 50%; top: 50%;
  width: var(--s); height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%;
  background: radial-gradient(circle, var(--c) 0 17%, transparent 18% 29%, var(--c) 30% 33%, transparent 34% 44%, var(--c) 45% 46%, transparent 47%);
  opacity: 0;
}
.pick-face { position: absolute; display: block; box-sizing: border-box; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.6)); }
.pick-face.is-round { border-radius: 50%; border: 6px solid var(--c); background: #000; box-shadow: 0 0 0 4px #000, 0 0 0 8px var(--blue-deep); filter: none; }
.pick.is-flashing .pick-face { animation: flash 0.14s steps(1) 4; }
.pick-name {
  position: absolute; left: 0; right: 0;
  font-family: var(--pixel);
  font-size: clamp(16px, 3vw, 34px);
  text-align: center;
  text-transform: uppercase;
  color: var(--c);
  text-shadow: 3px 3px 0 #000;
  opacity: 0;
}

/* ---------- Details ---------- */
.details { --c: #3ccf6e; gap: 16px; width: 100%; max-width: 1500px; margin: 0 auto; justify-content: center; }
.details-card {
  flex: 0 0 auto;
  display: grid;
  /* Left: portrait, then the feed. Right: bio and the rest. */
  grid-template-columns: minmax(260px, 32%) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: 'side body' 'feed body';
  gap: 22px 30px;
  border: 3px solid var(--frame);
  border-radius: 10px;
  box-shadow: inset 0 0 0 3px var(--blue-deep), 0 0 0 2px var(--blue-deep);
  padding: 22px;
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 60%),
    #000;
}
.details-side { grid-area: side; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; min-width: 0; }
/* Round portrait in the member's colour, like a fighter's badge. */
.details-portrait {
  flex: none;
  width: 152px;   /* 144px picture (the 72px avatar at 2x) + border */
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 4px solid var(--c);
  box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--blue-deep), inset 0 0 0 3px #000;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 4px),
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 34%, #000), #000 74%);
  overflow: hidden;
}
.details-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
}
.details-id { min-width: 0; }
.details-name {
  margin: 6px 0 4px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 32px);
  color: var(--c);
  text-shadow: 3px 3px 0 #000, 4px 4px 0 var(--blue-deep);
  overflow-wrap: anywhere;
}
.details-home { margin: 0; display: flex; align-items: center; gap: 8px; color: #cfd6ea; }
.details-home img { image-rendering: auto; border: 1px solid #333; }

.details-body {
  grid-area: body;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.stat-cols { columns: var(--cols, 3) 230px; column-gap: 22px; }
/* Members with nothing in their feed yet: a narrow left column with just
   the portrait and name, and everything else spread across the card. */
.details-card.no-feed { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'side body'; grid-template-rows: none; }
.no-feed .details-side { flex-direction: column; align-items: flex-start; align-self: start; max-width: 220px; }
.no-feed .details-feed { display: none; }
.stat-cols > .stat { break-inside: avoid; margin-bottom: 16px; }
.stat-cols > .stat:last-child { margin-bottom: 0; }
.stat { min-width: 0; }
.stat-title {
  margin: 0 0 8px;
  font-family: var(--pixel);
  font-weight: 400;
  font-size: 12px;
  color: #ffd84a;
  letter-spacing: 1px;
  border-bottom: 2px dashed #2a3566;
  padding-bottom: 6px;
}
.stat-bio { margin: 0; font-size: 18px; }
.stat-note { margin: 6px 0 0; font-size: 13px; color: #8790ad; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 2px 8px; border: 2px solid var(--c); color: #fff; font-size: 15px; }
.list { margin: 0; padding: 0 0 0 1.6em; }
.list li { padding: 2px 0; }
.list li::marker { color: var(--c); font-family: var(--pixel); font-size: 10px; }
.osu-stats { list-style: none; margin: 0 0 6px; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.osu-stats span { color: #8790ad; margin-right: 6px; }
.osu-stats b { color: #ff66aa; font-weight: 400; }
.plays li { display: flex; flex-direction: column; }
.play-meta { font-size: 13px; color: #8790ad; }
.tracks { padding-left: 0; list-style: none; }
.track {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
}
.track:hover, .track:focus-visible { background: #0b1450; outline: none; }
.track:focus-visible { box-shadow: inset 0 0 0 2px #ffd84a; }
.track-play { color: var(--c); font-size: 12px; }
.track-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.track-time { color: #8790ad; font-size: 14px; }
.track.is-playing { background: #0b1450; }
.track.is-playing .track-play { animation: blink 0.6s steps(1) infinite; }
.sc iframe { display: block; width: 100%; height: 166px; border: 0; margin-top: 8px; }
.links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.links a {
  display: inline-block;
  padding: 6px 10px;
  border: 2px solid var(--frame);
  color: #fff;
  text-decoration: none;
  background: var(--blue-deep);
}
.links a:hover, .links a:focus-visible { background: var(--blue); outline: none; }

.details-nav { display: flex; justify-content: center; gap: 12px; }
.pad-btn {
  min-width: 52px;
  min-height: 48px;
  padding: 0 16px;
  font-family: var(--pixel);
  font-size: 14px;
  color: #fff;
  background: var(--blue-deep);
  border: 3px solid var(--frame);
  border-radius: 8px;
  cursor: pointer;
}
.pad-btn:hover, .pad-btn:focus-visible { background: var(--blue); outline: none; }
.pad-btn:active { transform: translateY(2px); }

/* ---------- "What I've been up to" feed ---------- */
.details-feed { grid-area: feed; min-width: 0; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 6px;
  border-bottom: 2px dotted #1c2550;
}
.feed-icon { flex: none; width: 22px; text-align: center; color: var(--c); font-size: 17px; line-height: 1.4; }
.feed-main { min-width: 0; display: flex; flex-direction: column; }
.feed-link { display: flex; flex-direction: column; color: inherit; text-decoration: none; }
.feed-link:hover .feed-song, .feed-link:focus-visible .feed-song { text-decoration: underline; }
.feed-song, .feed-text { color: #fff; overflow-wrap: anywhere; }
.feed-text a { color: #fff; }
.feed-artist { color: #9aa6c8; font-size: 15px; overflow-wrap: anywhere; }
.feed-time, .feed-live { margin-top: 3px; font-family: var(--pixel); font-size: 9px; color: #6a7294; }
.feed-live { color: var(--c); animation: blink 1s steps(1) infinite; }
/* The latest scrobble gets a little "now playing" box with chunky cover art. */
.feed-track.is-latest {
  align-items: center;
  margin-bottom: 4px;
  padding: 10px;
  border: 3px solid var(--frame);
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px var(--blue-deep);
  background: linear-gradient(180deg, #0b1f8a, #050c40);
}
.feed-art {
  flex: none;
  width: 68px;
  height: 68px;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
}
.feed-note { padding: 9px 6px; color: #8790ad; font-size: 15px; }
.feed-more { padding: 12px 6px 0; }
.feed-more a { font-family: var(--pixel); font-size: 10px; color: var(--blue-hi); text-decoration: none; }
.feed-more a:hover, .feed-more a:focus-visible { color: #fff; }

/* ---------- Footer ---------- */
.foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-family: var(--pixel);
  font-size: clamp(10px, 0.7vw, 13px);
  color: #6a7294;
}
.foot a { color: #9aa6c8; text-decoration: none; padding: 8px 0; }
.foot a:hover, .foot a:focus-visible { color: #fff; }
.foot-sound { background: none; border: 0; padding: 8px 0; cursor: pointer; font-family: var(--pixel); font-size: inherit; color: #9aa6c8; }
.foot-sound:hover, .foot-sound:focus-visible { color: #fff; }
.noscript { font-family: var(--pixel); font-size: 12px; text-align: center; padding: 20px; }

@keyframes blink { 50% { opacity: 0; } }
@keyframes bob { 50% { transform: translateX(-50%) translateY(-4px); } }
@keyframes flash { 50% { filter: brightness(2.4) saturate(0); } }
@keyframes enter { from { opacity: 0; transform: scale(0.96); } }

/* ---------- Desktop: keep the screen together in the middle ---------- */
@media (min-width: 761px) {
  /* The 1UP box, title and roster sit as one group in the middle of the
     window (with the footer at the bottom) instead of spread top to bottom. */
  .hud { grid-template-columns: minmax(0, 760px); justify-content: center; }
  /* Long profiles share the available height without pushing navigation off-screen. */
  .arcade:has(.details:not([hidden])) { height: calc(100dvh - 2 * var(--bezel)); }
  .hud, .foot, .details-nav { flex-shrink: 0; }
  .details { min-height: 0; }
  .details-card { flex: 0 1 auto; min-height: 0; grid-template-rows: auto minmax(0, 1fr); }
  .details-card.no-feed { grid-template-rows: minmax(0, 1fr); }
  .details-portrait { width: clamp(88px, 15dvh, 152px); }
  .details-body, .details-feed { min-height: 0; overflow-y: auto; scrollbar-gutter: stable; }
  .details-body:focus-visible, .details-feed:focus-visible { outline: 2px solid #ffd84a; outline-offset: 3px; }
}

/* ---------- Phones and narrow windows ---------- */
@media (max-width: 760px) {
  .arcade { gap: 14px; }
  .hud { grid-template-columns: 1fr; }
  .hud-box { padding: 6px 8px 7px; column-gap: 8px; font-size: 10px; border-radius: 8px; }
  .hud-lives { padding-left: 0; }
  .hud-bar { height: 10px; }
  .roster { grid-template-columns: repeat(3, 1fr); row-gap: 56px; column-gap: 18px; padding-top: 44px; }
  .slot-name { font-size: 10px; margin-top: 12px; }
  .slot-up { top: -36px; font-size: 10px; }
  .slot-frame { width: 100%; }
  .select { gap: 12px; padding: 10px 16px 30px; }
  .select-credit { left: 0; right: 0; bottom: 10px; text-align: center; }
  .details-card { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .details-card, .details-card.no-feed { grid-template-columns: 1fr; grid-template-areas: 'side' 'body' 'feed'; grid-template-rows: none; }
  .no-feed .details-side { flex-direction: row; align-items: center; max-width: none; }
  .details-portrait { width: 116px; }   /* 108px picture: 1.5x */
  .details-nav { position: sticky; bottom: max(8px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .roster { column-gap: 12px; }
  .hud-box { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Details extras: speech-box bio, club card, snapshot ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.stat-wide { grid-column: 1 / -1; }
.details-fan {
  display: inline-block;
  margin: 10px 0 0;
  padding: 4px 10px 5px;
  font-family: var(--pixel);
  font-size: 11px;
  color: #fff;
  background: #db0007;
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 #000;
}
.bio-box {
  position: relative;
  padding: 14px 44px 16px 18px;
  border: 3px solid var(--frame);
  border-radius: 8px;
  box-shadow: inset 0 0 0 3px var(--blue-deep);
  background: linear-gradient(180deg, #0b1f8a, #06104d);
}
.bio-box .stat-bio {
  margin: 0;
  font-size: clamp(18px, 1.5vw, 26px);
  line-height: 1.45;
  white-space: pre-line;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  min-height: 1.45em;
}
.bio-more {
  position: absolute;
  right: 16px;
  bottom: 10px;
  color: var(--c);
  font-size: 14px;
  animation: bob-down 0.7s steps(2) infinite;
}
.bio-box.is-typing .bio-more { visibility: hidden; }
.bio-box.is-typing .stat-bio::after { content: '_'; color: var(--c); animation: blink 0.4s steps(1) infinite; }

.club-card {
  position: relative;
  overflow: hidden;
  max-width: 420px;
  padding: 14px 16px 16px;
  color: #fff;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0 6px, transparent 6px 12px),
    #db0007;
  box-shadow: 4px 4px 0 #000;
}
.club-art { display: block; width: 48%; max-width: 170px; height: auto; margin: 0 auto 10px; }
.club-name {
  margin: 0;
  font-family: var(--pixel);
  font-size: clamp(18px, 1.6vw, 28px);
  text-align: center;
  text-shadow: 3px 3px 0 #6b0004;
}
.club-nick { margin: 6px 0 0; text-align: center; font-family: var(--pixel); font-size: 11px; color: #ffe2e2; }
.club-ground { margin: 6px 0 0; text-align: center; font-size: 15px; }
.club-chant {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--pixel);
  font-size: 14px;
  color: #ffd84a;
  text-shadow: 2px 2px 0 #6b0004;
  animation: blink 1s steps(1) infinite;
}

.photo { margin: 0; }
.photo img {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 1;
  border: 3px solid var(--frame);
  box-shadow: 0 0 0 3px var(--blue-deep), 6px 6px 0 3px #000;
}

@keyframes bob-down { 50% { transform: translateY(3px); } }
