/* =========================================================================
   Mello Vibes Games
   Tokens → base → components → sections. Plain CSS, no build step.
   ========================================================================= */

/* The hero's active game drives --accent; registering it lets the whole page ease between colors. */
@property --fc {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff5a3c;
}
@property --accent {
  syntax: "<color>";
  inherits: true;
  initial-value: #ff3d7f;
}

:root {
  --ink-0: #07060f;
  --ink-1: #0f0c1d;
  --ink-2: #171329;
  --ink-3: #221c3b;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f5f2ff;
  --muted: #a8a1c4;
  --faint: #6f6891;

  --pink: #ff3d7f;
  --yellow: #ffd23f;
  --cyan: #3ee8ff;
  --violet: #8b5cff;
  --mint: #6dffae;

  --accent: #ff3d7f;
  --accent-soft: color-mix(in oklab, var(--accent), white 45%);

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --wrap: 1240px;
  --gutter: 16px;

  transition: --accent 0.9s var(--ease-out);
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html:has(dialog[open]) { overflow: hidden; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--ink-0);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: absolute; inset: 0 0 auto; height: 1100px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 78% 18%, color-mix(in oklab, var(--accent) 26%, transparent), transparent 65%),
    radial-gradient(700px 480px at 6% 0%, rgba(139, 92, 255, 0.16), transparent 65%);
}
img, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
kbd {
  font: 600 0.82em var(--font-mono);
  padding: 2px 7px; border-radius: 6px;
  background: var(--ink-3); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.4), inset 0 0 0 1px var(--line-2);
}
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #0b0714; }

/* The tilted marquee and the hero's pop-out props intentionally poke past the edges. */
main { overflow-x: clip; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--yellow); color: #111; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 0.98; }
.h2 { font-size: clamp(28px, 4.4vw, 56px); text-wrap: balance; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-soft);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.hero .eyebrow::before { display: none; }
.accent-line {
  background: linear-gradient(95deg, var(--accent) 5%, var(--accent-soft) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.c-cyan { color: var(--cyan); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 15px/1 var(--font-body); text-decoration: none; white-space: nowrap;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background-color 0.2s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn-primary {
  /* takes the nearest --c (a card's or game's color), falling back to the page accent */
  --bc: var(--c, var(--accent));
  background: var(--bc); color: var(--on, #0b0714);
  box-shadow: 0 5px 0 color-mix(in oklab, var(--bc), black 45%), 0 14px 30px -10px color-mix(in oklab, var(--bc) 70%, transparent);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 7px 0 color-mix(in oklab, var(--bc), black 45%), 0 18px 34px -10px color-mix(in oklab, var(--bc) 80%, transparent); }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in oklab, var(--bc), black 45%); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.11); }
.btn-ghost:active { transform: scale(0.97); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(7, 6, 15, 0.72);
  backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5);
  box-shadow: 0 1px 0 var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand span { font: 800 15px/1 var(--font-display); letter-spacing: -0.01em; white-space: nowrap; }
.brand b { font-weight: 800; color: var(--pink); margin-left: 0.35em; }
.nav-links { display: none; gap: 30px; }
.nav-links a {
  font: 700 12px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); padding: 8px 0; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); }
@media (min-width: 900px) { .nav-links { display: flex; } }
@media (max-width: 560px) {
  .nav .btn .label { display: none; }
  .nav .btn { width: 46px; padding: 0; }
}

/* ---------- hero ---------- */
.hero {
  display: grid; gap: 44px; align-items: center;
  padding-top: clamp(16px, 4vw, 48px); padding-bottom: 72px;
}
@media (min-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: 56px; min-height: calc(100svh - 68px); padding-bottom: 56px; }
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 rgba(109, 255, 174, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(109, 255, 174, 0); } 100% { box-shadow: 0 0 0 0 rgba(109, 255, 174, 0); } }
.hero h1 { font-size: clamp(34px, 9.6vw, 76px); }
@media (min-width: 1080px) { .hero h1 { font-size: clamp(48px, 5vw, 76px); } }
.hero h1 .line { display: block; }
.lede { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); max-width: 33rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.stats {
  display: grid; grid-template-columns: repeat(4, auto); gap: 0; margin-top: 10px;
  border-top: 1px solid var(--line); padding-top: 22px; width: 100%; max-width: 560px;
}
.stats div { display: flex; flex-direction: column-reverse; gap: 6px; padding-right: 14px; }
.stats div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.stats dd { font: 800 clamp(22px, 3vw, 32px)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.stats dt { font: 700 10.5px/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .stats div:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* ---------- cabinet (attract mode) ---------- */
.cab {
  position: relative; border-radius: 30px; padding: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 0 0 1px var(--line-2), 0 50px 120px -50px color-mix(in oklab, var(--accent) 70%, transparent);
  transition: box-shadow 0.9s;
}
.cab-stage { position: relative; aspect-ratio: 16 / 11; }
.cab-bg { position: absolute; inset: 0; border-radius: 20px; overflow: hidden; background: #0a0816; }
.cab-bg > div { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s; }
.cab-bg > div.on { opacity: 1; }
.cab-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(22px) saturate(1.3) brightness(0.55); transform: scale(1.2); }
.cab-bg > div::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 50% 45%, transparent, rgba(7, 6, 15, 0.6)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}
.slide { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.slide.on { visibility: visible; }

.device { position: absolute; transition: opacity 0.6s, translate 0.8s var(--ease-out), scale 0.8s var(--ease-out); opacity: 0; translate: 0 26px; scale: 0.96; }
.slide.on .device { opacity: 1; translate: 0 0; scale: 1; }
.device.wide {
  left: 10%; right: 10%; top: 14%;
  border-radius: 14px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 80px -20px color-mix(in oklab, var(--accent) 60%, transparent);
  transform: perspective(1400px) rotateY(-9deg) rotateX(3deg);
}
.chrome { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; background: #15121f; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.chrome i { width: 8px; height: 8px; border-radius: 50%; background: #3a3450; }
.chrome i:first-child { background: #ff5f57; } .chrome i:nth-child(2) { background: #febc2e; } .chrome i:nth-child(3) { background: #28c840; }
.chrome span {
  margin-left: 10px; flex: 1; max-width: 60%; height: 16px; border-radius: 5px; background: rgba(255, 255, 255, 0.06);
  font: 500 9.5px/16px var(--font-mono); color: var(--muted); padding: 0 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.device.wide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.device.phone {
  /* 90% of the 16:11 stage's height at a 9:19.5 phone ratio = 28.56% of its width, centered */
  top: 5%; left: 35.72%; width: 28.56%; aspect-ratio: 9 / 19.5;
  border-radius: 28px; padding: 5px; background: #0d0b14;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.16), 0 30px 60px -20px rgba(0, 0, 0, 0.85), 0 0 90px -20px color-mix(in oklab, var(--accent) 65%, transparent);
  rotate: -4deg;
}
.device.phone > * { width: 100%; height: 100%; border-radius: 23px; object-fit: cover; object-position: top; }
.device.phone::before {
  content: ""; position: absolute; top: 11px; left: 50%; width: 26%; height: 11px; translate: -50% 0;
  border-radius: 8px; background: #0d0b14; z-index: 2;
}

.cast { position: absolute; z-index: 3; translate: var(--px, 0) var(--py, 0); transition: translate 0.25s linear; }
.cast img, .cast .orb {
  height: 100%; width: auto; max-width: none;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.55));
  opacity: 0; scale: 0.3; rotate: var(--r, 0deg);
  transition: opacity 0.4s, scale 0.7s var(--ease-spring);
  transition-delay: var(--d, 0s);
  animation: bob var(--bob, 5s) ease-in-out infinite; animation-delay: var(--bd, 0s);
}
.cast.flip img { transform: scaleX(-1); }
.cast.px img { image-rendering: auto; }
.cast.spin img { animation: bob var(--bob, 5s) ease-in-out infinite, wobble 6s ease-in-out infinite; }
.slide.on .cast img, .slide.on .cast .orb { opacity: 1; scale: 1; }
.orb { display: block; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff 0 8%, var(--o) 30%, transparent 70%); filter: blur(0.3px) drop-shadow(0 0 18px var(--o)); }
@keyframes bob { 50% { translate: 0 -5%; } }
@keyframes wobble { 50% { rotate: calc(var(--r, 0deg) + 14deg); } }

.cab-info {
  position: relative; z-index: 4;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; align-items: center;
  padding: 20px 10px 14px;
}
.cab-info .icon { grid-row: span 2; width: 60px; height: 60px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line-2); }
.cab-info .genre { font: 700 11.5px/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-soft); }
.cab-info h2 { font: 800 clamp(20px, 2.4vw, 28px)/1.05 var(--font-display); letter-spacing: -0.02em; }
.cab-info p { grid-column: 1 / -1; color: var(--muted); font-size: 15px; margin-top: 8px; min-height: 3.2em; }
.cab-info .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.cab-info.swap > * { animation: rise 0.55s var(--ease-out) both; }
.cab-info.swap > :nth-child(2) { animation-delay: 0.04s; } .cab-info.swap > :nth-child(3) { animation-delay: 0.08s; }
.cab-info.swap > :nth-child(4) { animation-delay: 0.12s; } .cab-info.swap > :nth-child(5) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; translate: 0 12px; } }
@media (min-width: 640px) {
  .cab-info { grid-template-columns: auto minmax(0, 1fr) auto; }
  .cab-info p { grid-column: 2 / 3; margin-top: 0; min-height: 0; }
  .cab-info .acts { grid-column: 3; grid-row: 1 / span 3; margin-top: 0; flex-direction: column; align-items: stretch; }
  .cab-info .icon { grid-row: span 3; align-self: start; }
}

.cab-rail { display: flex; align-items: center; gap: 10px; padding: 4px 6px 4px; }
.cab-tabs { display: flex; flex: 1; gap: 8px; min-width: 0; }
.cab-tab {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 8px 4px 10px; border: 0; border-radius: 14px; background: transparent; cursor: pointer;
  transition: background-color 0.2s;
}
.cab-tab:hover { background: rgba(255, 255, 255, 0.05); }
.cab-tab img { width: 40px; height: 40px; border-radius: 11px; opacity: 0.55; filter: saturate(0.6); transition: opacity 0.3s, filter 0.3s, scale 0.3s var(--ease-spring); }
.cab-tab[aria-selected="true"] img { opacity: 1; filter: none; scale: 1.08; box-shadow: 0 0 0 2px var(--ink-0), 0 0 0 4px var(--accent); }
.cab-tab .bar { width: 100%; max-width: 64px; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.cab-tab .bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.cab-tab[aria-selected="true"] .bar i { animation: fill var(--dwell, 7s) linear forwards; }
.cab.paused .cab-tab[aria-selected="true"] .bar i { animation-play-state: paused; }
.cab.stopped .cab-tab[aria-selected="true"] .bar i { animation: none; width: 100%; }
@keyframes fill { to { width: 100%; } }
.cab-pause {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px var(--line-2);
}
.cab-pause svg { width: 16px; height: 16px; fill: currentColor; }
.cab-pause .i-play, .cab-pause[aria-pressed="true"] .i-pause { display: none; }
.cab-pause[aria-pressed="true"] .i-play { display: block; }
@media (max-width: 480px) {
  .cab { padding: 8px; border-radius: 24px; }
  .cab-tab { padding-inline: 0; }
  .cab-tab img { width: 34px; height: 34px; }
  .cab-rail { gap: 4px; padding-inline: 0; }
  .cab-tabs { gap: 2px; }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; rotate: -2deg; margin: 8px -20px 0; padding: 16px 0;
  background: linear-gradient(90deg, var(--pink), var(--violet) 45%, var(--cyan));
  box-shadow: 0 20px 60px -20px rgba(139, 92, 255, 0.6);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-item {
  display: flex; align-items: center; gap: 26px; padding-right: 26px;
  font: 800 clamp(24px, 4vw, 44px)/1 var(--font-display); letter-spacing: -0.02em; text-transform: uppercase; color: #0b0714; white-space: nowrap;
}
.marquee-item.o { color: transparent; -webkit-text-stroke: 1.5px #0b0714; }
.marquee-item img { width: clamp(30px, 4vw, 44px); height: auto; border-radius: 10px; box-shadow: 0 0 0 2px #0b0714; }
@keyframes marquee { to { translate: -50% 0; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(80px, 11vw, 140px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 40px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head > div:first-child { display: flex; flex-direction: column; gap: 16px; }
.section-sub { color: var(--muted); max-width: 32rem; font-size: 17px; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 16px;
  border: 0; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px;
  background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--muted);
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.chip:hover { color: var(--text); }
.chip .n { font: 700 11px/1 var(--font-mono); padding: 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.chip[aria-pressed="true"] { background: var(--text); color: #0b0714; box-shadow: none; }
.chip[aria-pressed="true"] .n { background: rgba(0, 0, 0, 0.1); }

/* ---------- lineup cards ---------- */
.lineup { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .lineup { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .lineup { grid-template-columns: repeat(3, 1fr); gap: 26px; } }
.lineup > li { display: flex; }
.lineup > li[hidden] { display: none; }
.card {
  --c: var(--pink); --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; width: 100%;
  border-radius: var(--r-lg); background: var(--ink-1);
  box-shadow: inset 0 0 0 1px var(--line);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease-out), box-shadow 0.3s;
}
.card.tilting { transition: transform 0.08s linear, box-shadow 0.3s; }
.card:hover, .card:focus-within {
  box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--c) 70%, transparent), 0 30px 60px -24px color-mix(in oklab, var(--c) 55%, transparent);
}
.card-art { position: relative; display: block; aspect-ratio: 1200 / 630; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; background: var(--bg, #000); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.6s var(--ease-out); }
.card:hover .card-art img { scale: 1.05; }
.card-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.22), transparent 45%);
}
.card:hover .card-art::after { opacity: 1; }
.card-icon {
  position: absolute; left: 20px; width: 62px; height: 62px; border-radius: 17px; z-index: 2;
  box-shadow: 0 0 0 4px var(--ink-1), 0 10px 24px rgba(0, 0, 0, 0.5);
}
.card-body { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 44px 22px 22px; flex: 1; }
.card-body .card-icon { top: -31px; }
.card .genre { font: 700 11.5px/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in oklab, var(--c), white 25%); }
.card h3 { font: 800 22px/1.05 var(--font-display); letter-spacing: -0.02em; margin-top: -4px; }
.card .pitch { color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12.5px; font-weight: 500; padding: 5px 10px; border-radius: 999px; background: var(--ink-2); color: #d8d1ef; box-shadow: inset 0 0 0 1px var(--line); }
.card .acts { display: flex; gap: 10px; margin-top: auto; padding-top: 8px; }
.badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font: 800 11px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 999px; background: var(--yellow); color: #1a1030;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.badge.last { background: #fff; left: 14px; right: auto; }
.card-body .players { position: absolute; right: 22px; top: 22px; }
.players { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--font-mono); color: var(--faint); }
.players svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ---------- roster ---------- */
.roster-sec {
  --fc: #ff5a3c;
  position: relative;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--fc) 7%, transparent) 50%, transparent);
  transition: --fc 0.6s;
}
.roster { display: grid; gap: 22px; }
@media (min-width: 1000px) { .roster { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: stretch; } }
.spot {
  position: relative; overflow: hidden; border-radius: 30px; min-height: 460px;
  background:
    radial-gradient(60% 55% at 70% 72%, color-mix(in oklab, var(--fc) 42%, transparent), transparent 70%),
    linear-gradient(180deg, var(--ink-1), var(--ink-2));
  box-shadow: inset 0 0 0 1px var(--line-2);
  display: grid; grid-template-columns: 1fr; transition: background 0.6s;
}
.spot-name-bg {
  position: absolute; left: -2%; right: -2%; top: 50%; translate: 0 -50%; text-align: center; pointer-events: none;
  font: 800 clamp(90px, 16vw, 210px)/0.8 var(--font-display); letter-spacing: -0.04em; text-transform: uppercase; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1.5px color-mix(in oklab, var(--fc) 30%, transparent); opacity: 0.8;
}
.spot-fig { position: relative; display: grid; place-items: end center; min-height: 300px; padding-top: 28px; }
.spot-fig::after {
  content: ""; position: absolute; bottom: 18px; left: 50%; width: 62%; height: 36px; translate: -50% 0;
  border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--fc) 60%, transparent), transparent);
}
.spot-fig img { position: relative; z-index: 1; height: min(340px, 62vw); width: auto; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, 0.55)); animation: enter 0.6s var(--ease-spring) both, bob 4.5s 0.6s ease-in-out infinite; }
@keyframes enter { from { opacity: 0; translate: 50px 0; scale: 0.85; } }
.spot-info { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 14px; padding: 0 26px 26px; }
@media (max-width: 699px) {
  /* stacked: keep the watermark behind the fighter, not between the button and the figure */
  .spot-name-bg { top: auto; bottom: 22%; translate: none; }
}
@media (min-width: 700px) {
  .spot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .spot-info { order: -1; justify-content: center; padding: 34px; }
  .spot-fig { padding-top: 40px; }
}
.spot-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cls { font: 800 11px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; padding: 7px 10px; border-radius: 999px; background: var(--fc); color: #0b0714; }
.from { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1 var(--font-body); color: var(--muted); }
.from img { width: 22px; height: 22px; border-radius: 6px; }
.spot-info h3 { font: 800 clamp(36px, 5vw, 58px)/0.95 var(--font-display); letter-spacing: -0.03em; text-transform: uppercase; animation: rise 0.5s var(--ease-out) both; }
.statbars { display: grid; gap: 10px; margin: 6px 0 8px; }
.statbars div { display: grid; grid-template-columns: 76px 1fr 34px; align-items: center; gap: 12px; font: 700 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.statbars .track { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.statbars .track i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: linear-gradient(90deg, color-mix(in oklab, var(--fc), black 25%), var(--fc)); transition: width 0.7s var(--ease-out); }
.statbars b { color: var(--text); text-align: right; font-weight: 700; }
.spot-info .btn { align-self: flex-start; }

.picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-content: center; }
.pick {
  --tc: #fff;
  position: relative; aspect-ratio: 3 / 4; border: 0; border-radius: 18px; cursor: pointer; padding: 0; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 100%, color-mix(in oklab, var(--tc) 35%, transparent), transparent 70%), var(--ink-1);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow 0.25s, translate 0.25s var(--ease-out);
}
.pick img { position: absolute; left: 50%; bottom: 20%; height: 72%; width: auto; max-width: none; translate: -50% 0; transition: translate 0.3s var(--ease-out), scale 0.3s var(--ease-out); }
.pick:hover img { translate: -50% -5%; scale: 1.06; }
.pick span {
  position: absolute; left: 0; right: 0; bottom: 8px; text-align: center;
  font: 700 clamp(8.5px, 1vw, 11px)/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.pick[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--tc), 0 14px 30px -10px color-mix(in oklab, var(--tc) 60%, transparent); translate: 0 -4px; }
.pick[aria-checked="true"] span { color: var(--text); }
.pick[aria-checked="true"]::before {
  content: "P1"; position: absolute; top: 7px; left: 7px; z-index: 1;
  font: 800 10px/1 var(--font-mono); padding: 4px 6px; border-radius: 6px; background: var(--tc); color: #0b0714;
}
@media (max-width: 520px) { .picker { gap: 6px; } .pick { border-radius: 12px; } .pick span { bottom: 5px; } }

/* ---------- try ORBYT ---------- */
.try { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .try { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; } }
.try-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.try-scores { display: flex; gap: 12px; }
.try-scores div { min-width: 110px; padding: 14px 18px; border-radius: 16px; background: var(--ink-1); box-shadow: inset 0 0 0 1px var(--line); }
.try-scores .k { display: block; font: 700 10.5px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.try-scores .v { font: 800 28px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.fine { color: var(--faint); font-size: 14px; }
.try-play { display: grid; place-items: center; }
.try-frame {
  position: relative; width: 100%; max-width: 520px; aspect-ratio: 1; border-radius: 36px; overflow: hidden; cursor: pointer;
  background: #0b0620; touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(62, 232, 255, 0.25), 0 40px 100px -40px rgba(62, 232, 255, 0.55), 0 0 0 10px rgba(255, 255, 255, 0.03);
}
.try-frame canvas { width: 100%; height: 100%; }
.try-frame:focus-visible { outline-offset: 6px; border-radius: 36px; }
.try-overlay {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center;
  background: radial-gradient(circle, rgba(11, 6, 32, 0.35), rgba(11, 6, 32, 0.8)); transition: opacity 0.3s;
}
.try-overlay strong { font: 800 clamp(20px, 3vw, 28px)/1 var(--font-display); text-transform: uppercase; letter-spacing: -0.01em; margin-top: 14px; }
.try-overlay span:last-child { color: var(--muted); font: 600 13px/1 var(--font-mono); }
.tap-ring { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--cyan); box-shadow: 0 0 30px var(--cyan); animation: tap 1.6s var(--ease-out) infinite; }
@keyframes tap { 0% { scale: 0.7; opacity: 1; } 100% { scale: 1.4; opacity: 0; } }
.try-frame.playing .try-overlay { opacity: 0; pointer-events: none; }

/* ---------- bento ---------- */
.bento { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .t-net, .t-size { grid-column: span 2; }
}
@media (min-width: 1080px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .t-net { grid-column: 1 / 3; grid-row: 1 / 3; }
  .t-synth { grid-column: 3; grid-row: 1 / 3; }
  .t-input { grid-column: 4; grid-row: 1; }
  .t-rooms { grid-column: 4; grid-row: 2; }
  .t-size { grid-column: 1 / 3; }
  .t-fair { grid-column: 3 / 5; }
}
.tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 12px;
  padding: 26px; border-radius: var(--r-lg); background: var(--ink-1); box-shadow: inset 0 0 0 1px var(--line);
}
.tile-k { font: 700 11px/1.2 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.tile h3 { font: 800 clamp(20px, 2vw, 24px)/1.1 var(--font-display); letter-spacing: -0.02em; }
.tile > p { color: var(--muted); font-size: 15px; }
.tile .btn { align-self: flex-start; margin-top: auto; }

.t-net { background: radial-gradient(80% 60% at 100% 0%, rgba(255, 61, 127, 0.14), transparent 60%), var(--ink-1); }
.net-viz { display: grid; gap: 10px; align-content: center; flex: 1; margin: 14px 0 6px; font: 700 10px/1 var(--font-mono); letter-spacing: 0.08em; }
.lane { display: grid; grid-template-columns: 52px repeat(16, minmax(0, 1fr)); gap: 3px; align-items: center; }
.lane > b { color: var(--faint); font-weight: 700; }
.cell { height: clamp(26px, 4vw, 48px); border-radius: 6px; background: rgba(255, 255, 255, 0.05); transition: background-color 0.25s, box-shadow 0.25s; }
.cell.you { background: rgba(255, 61, 127, 0.75); }
.cell.conf { background: rgba(62, 232, 255, 0.7); }
.cell.pred { background: repeating-linear-gradient(135deg, rgba(62, 232, 255, 0.35) 0 4px, rgba(62, 232, 255, 0.12) 4px 8px); }
.cell.bad { background: #ffd23f; box-shadow: 0 0 14px rgba(255, 210, 63, 0.7); }
.cell.head { box-shadow: 0 0 0 2px #fff; }
.net-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; color: var(--faint); }
.net-legend span { display: inline-flex; align-items: center; gap: 6px; }
.net-legend i { width: 12px; height: 12px; border-radius: 3px; }
.net-status { height: 18px; margin-top: 6px; color: var(--yellow); letter-spacing: 0.12em; text-transform: uppercase; transition: opacity 0.3s; }
.net-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.net-stats div { display: flex; flex-direction: column-reverse; gap: 6px; }
.net-stats dd { font: 800 clamp(18px, 2.4vw, 28px)/1 var(--font-display); white-space: nowrap; }
.net-stats dt { font: 600 11px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }

.t-synth { background: radial-gradient(80% 50% at 50% 100%, rgba(139, 92, 255, 0.22), transparent 70%), var(--ink-1); }
.scope { width: 100%; height: 150px; margin: auto 0 8px; }

.inputs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.inputs li { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 12px; background: var(--ink-2); font-size: 13px; font-weight: 600; }
.inputs svg { width: 18px; height: 18px; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.bars { display: grid; gap: 10px; margin-top: 6px; }
.bars li { display: grid; grid-template-columns: 130px 1fr 62px; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 600; }
.bars .nm { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.bars .nm img { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.bars .track { height: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bars .track i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c); transition: width 1.1s var(--ease-out); transition-delay: var(--d); }
.t-size.in .bars .track i { width: var(--v); }
.bars .val { font: 700 12.5px/1 var(--font-mono); color: var(--muted); text-align: right; }
@media (max-width: 480px) { .bars li { grid-template-columns: 118px 1fr 50px; gap: 8px; font-size: 12.5px; } .bars .val { font-size: 11.5px; } }

.room {
  display: grid; gap: 8px; margin-top: auto; padding: 14px 16px; border-radius: 14px; background: var(--ink-0);
  box-shadow: inset 0 0 0 1px var(--line-2); font: 600 12px/1 var(--font-mono); white-space: nowrap;
}
.room-host { color: var(--faint); }
.room-q { font-size: 18px; color: var(--muted); }
.room-code { color: var(--yellow); letter-spacing: 0.12em; font-weight: 700; }
.checks { display: grid; gap: 8px; margin-top: auto; }
.checks li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.checks li::before {
  content: ""; width: 20px; height: 20px; border-radius: 6px; flex: none;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2303190c' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (min-width: 720px) { .t-fair .checks { grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 22px; } }

/* ---------- closer + footer ---------- */
.closer { text-align: center; padding-block: clamp(40px, 8vw, 100px) clamp(90px, 12vw, 150px); display: grid; justify-items: center; gap: 40px; }
.closer h2 { max-width: 14em; }
.dock { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 2vw, 16px); }
.dock a { position: relative; display: block; border-radius: 22px; transition: translate 0.3s var(--ease-spring), scale 0.3s var(--ease-spring); }
.dock img { width: clamp(44px, 12vw, 84px); height: auto; border-radius: 22px; box-shadow: 0 16px 34px -12px rgba(0, 0, 0, 0.7); }
.dock a:hover, .dock a:focus-visible { translate: 0 -10px; scale: 1.08; }
.dock span {
  position: absolute; left: 50%; bottom: calc(100% + 16px); translate: -50% 6px; opacity: 0; pointer-events: none;
  padding: 6px 10px; border-radius: 8px; background: var(--text); color: #0b0714; font: 700 12px/1 var(--font-body); white-space: nowrap;
  transition: opacity 0.2s, translate 0.2s;
}
.dock a:hover span, .dock a:focus-visible span { opacity: 1; translate: -50% 0; }

.foot { border-top: 1px solid var(--line); padding: 56px 0 36px; background: linear-gradient(180deg, transparent, rgba(139, 92, 255, 0.05)); }
.foot-in { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .foot-in { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.foot-brand { grid-column: 1 / -1; display: grid; gap: 14px; align-content: start; }
@media (min-width: 900px) { .foot-brand { grid-column: auto; } }
.foot-brand p { color: var(--muted); max-width: 22rem; font-size: 15px; }
.foot h3 { font: 700 11px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.foot li { margin-bottom: 10px; font-size: 14.5px; color: var(--muted); }
.foot li a { text-decoration: none; transition: color 0.2s; }
.foot li a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.foot-copy { margin-top: 44px; color: var(--faint); font-size: 13px; }

/* ---------- game sheet (dialog) ---------- */
.sheet {
  --c: var(--pink);
  width: min(760px, calc(100% - 32px)); max-height: min(88vh, 900px); padding: 0; border: 0; border-radius: 28px;
  background: var(--ink-1); color: var(--text); box-shadow: 0 0 0 1px var(--line-2), 0 60px 120px -30px rgba(0, 0, 0, 0.9);
  overflow: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(4, 3, 10, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.sheet[open] { animation: sheet-in 0.45s var(--ease-out); }
.sheet[open]::backdrop { animation: fade 0.3s; }
@keyframes sheet-in { from { opacity: 0; translate: 0 30px; scale: 0.97; } }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 640px) {
  .sheet { width: 100%; max-width: 100%; max-height: 92vh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet[open] { animation: sheet-up 0.45s var(--ease-out); }
  @keyframes sheet-up { from { translate: 0 100%; } }
}
.sheet-art { position: relative; aspect-ratio: 1200 / 540; overflow: hidden; background: var(--bg, #000); }
.sheet-art img { width: 100%; height: 100%; object-fit: cover; }
.sheet-art::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, var(--ink-1)); }
.sheet-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: rgba(7, 6, 15, 0.7); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px var(--line-2);
}
.sheet-close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.sheet-body { position: relative; display: grid; gap: 26px; padding: 0 28px 28px; margin-top: -54px; }
@media (max-width: 480px) { .sheet-body { padding: 0 18px 22px; } }
.sheet-head { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; }
.sheet-head img { grid-row: span 2; width: 72px; height: 72px; border-radius: 20px; box-shadow: 0 0 0 4px var(--ink-1); }
.sheet-head .genre { font: 700 11.5px/1.2 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: color-mix(in oklab, var(--c), white 25%); align-self: end; }
.sheet-head h2 { font: 800 clamp(24px, 4vw, 34px)/1 var(--font-display); letter-spacing: -0.02em; align-self: start; }
.sheet h3 { font: 700 11px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 14px; }
.steps { display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; color: #dcd6f1; font-size: 15.5px; counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  font: 800 12px/1 var(--font-mono); background: color-mix(in oklab, var(--c) 18%, transparent); color: color-mix(in oklab, var(--c), white 30%);
}
.controls-wrap { overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.controls { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 460px; }
.controls th, .controls td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.controls tr:last-child td { border-bottom: 0; }
.controls th { font: 700 10.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); background: var(--ink-2); }
.controls td:first-child { font-weight: 600; color: var(--text); }
.controls td { color: var(--muted); }
.sheet-acts { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }

/* ---------- scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out); transition-delay: var(--rd, 0s); }
.js .reveal.in { opacity: 1; translate: 0 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; translate: none; }
}
