/* Basti’s Arcade — couch co-op launcher. Dark-only, TV-first, scales down to phones. */
:root {
  --bg: #0d0f1f;
  --bg-2: #161a33;
  --ink: #141626;
  --cream: #fff4e0;
  --text: #f4f1ff;
  --muted: #b7b6d6;
  --line: rgba(255, 255, 255, .14);
  /* per-game accent, set from games.js */
  --a1: #ff6b5e;
  --a2: #25c5c0;
  --a3: #ffe14d;
  --gutter: clamp(16px, 4.2vw, 72px);
  --tile: clamp(76px, min(8.2vw, 13vh), 150px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --display: "Lilita One", "Nunito", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 600 16px/1.5 "Nunito", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
/* App feel: nothing is selectable or draggable, no long-press callouts, no text cursor. */
html, body {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  cursor: default;
  --cursor-accent: var(--a1);
}
img, svg, canvas { -webkit-user-drag: none; user-drag: none; }
input:not([readonly]), textarea, [contenteditable="true"] { -webkit-user-select: text; user-select: text; cursor: text; }
button { font: inherit; color: inherit; }
a { color: inherit; }
kbd {
  display: inline-block; min-width: 1.7em; padding: .05em .4em; margin: 0 .12em;
  border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px;
  font: 800 .78em/1.4 "Nunito", sans-serif; text-align: center; color: var(--text);
  background: rgba(255, 255, 255, .06);
}

/* ================================================================ backdrop */
#backdrop { position: fixed; inset: 0; z-index: 0; overflow: hidden; }
.bg-layer {
  position: absolute; inset: -3%;
  background: var(--bg-2) center / cover no-repeat;
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.1s ease, transform 9s var(--ease-out);
}
.bg-layer.on { opacity: 1; transform: scale(1); }
.bg-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 15, 31, .97) 0%, rgba(13, 15, 31, .86) 30%, rgba(13, 15, 31, .35) 55%, rgba(13, 15, 31, 0) 72%),
    linear-gradient(0deg, rgba(13, 15, 31, .98) 0%, rgba(13, 15, 31, .6) 22%, rgba(13, 15, 31, 0) 42%),
    linear-gradient(180deg, rgba(13, 15, 31, .7) 0%, rgba(13, 15, 31, 0) 16%);
}
.bg-shade::after { /* accent wash that follows the selected game */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 70% at 8% 30%, color-mix(in srgb, var(--a1) 22%, transparent), transparent 70%);
  transition: background 1s ease;
}
#sparks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ================================================================ splash */
#splash {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center; overflow: hidden;
  background: var(--bg);
  cursor: pointer;
  transition: opacity .7s ease, transform .9s var(--ease-out), filter .7s ease;
}
.splash-hero {
  position: absolute; inset: -4%;
  background: url(art/hub/hero.jpg?v=2) center 70% / cover no-repeat;
  opacity: .55; transform: scale(1.1);
  animation: drift 24s ease-in-out infinite alternate;
}
.splash-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 55% 50% at 50% 42%, rgba(13, 15, 31, .55), rgba(13, 15, 31, .9) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.splash-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.splash-rings i {
  position: absolute; width: 40vmin; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .18);
  animation: ring 4.5s ease-out infinite;
}
.splash-rings i:nth-child(2) { animation-delay: 1.5s; border-color: rgba(42, 212, 255, .25); }
.splash-rings i:nth-child(3) { animation-delay: 3s; border-color: rgba(255, 107, 94, .25); }
.splash-center { position: relative; text-align: center; padding: 0 var(--gutter); }
.hub-mark {
  width: clamp(84px, 11vmin, 132px); aspect-ratio: 1; margin: 0 auto 1.4vmin;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.3) rotate(-25deg);
  animation: pop .9s var(--ease-back) .15s forwards;
}
.hub-couch {
  width: 100%; height: 100%;
  background: url(art/hub/mark.svg) center / contain no-repeat;
  animation: bob 3.2s ease-in-out 1.2s infinite;
}
.hub-logo { margin: 0; line-height: .9; font-weight: 400; }
.hub-logo-top {
  display: block;
  font: 400 clamp(44px, min(13vmin, 15vw), 180px)/.95 var(--display);
  letter-spacing: -.01em;
  color: var(--cream);
  -webkit-text-stroke: clamp(4px, .7vmin, 9px) var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 .07em 0 var(--ink);
}
.hub-logo-top .ch {
  display: inline-block; opacity: 0;
  transform: translateY(-60%) scale(.6) rotate(var(--r, 0deg));
  animation: drop .7s var(--ease-back) forwards;
  animation-delay: calc(.3s + var(--i) * .055s);
}
.hub-logo-top .ch:nth-child(3n+1) { color: var(--cream); }
.hub-logo-top .ch:nth-child(3n+2) { color: #ffe14d; }
.hub-logo-top .ch:nth-child(3n) { color: #5cf2d0; }
.hub-logo-bottom {
  display: inline-block; margin-top: .6vmin; padding: .18em .9em .12em;
  font: 800 clamp(16px, 2.6vmin, 34px)/1 "Nunito", sans-serif; letter-spacing: .6em; text-indent: .6em;
  color: var(--ink); background: linear-gradient(90deg, #ff6b5e, #ff4f8b 50%, #2ad4ff);
  border-radius: 999px;
  opacity: 0; transform: scaleX(.2);
  animation: stretch .6s var(--ease-back) 1.05s forwards;
}
.splash-tag {
  margin: 3.4vmin auto 0; max-width: 34em;
  font-size: clamp(15px, 2vmin, 24px); color: var(--muted);
  opacity: 0; animation: fade-up .8s var(--ease-out) 1.35s forwards;
}
.splash-tag b { color: var(--text); }
.press {
  margin-top: 5vmin; padding: .75em 2.2em;
  font: 800 clamp(14px, 1.9vmin, 22px)/1 "Nunito", sans-serif; letter-spacing: .28em; text-transform: uppercase;
  background: rgba(255, 255, 255, .06); border: 2px solid rgba(255, 255, 255, .35); border-radius: 999px;
  cursor: pointer; backdrop-filter: blur(6px);
  opacity: 0; animation: fade-up .8s var(--ease-out) 1.7s forwards, blink 1.8s ease-in-out 2.6s infinite;
}
.press:hover, .press:focus-visible { background: rgba(255, 255, 255, .14); outline: none; }
body.ready #splash { opacity: 0; transform: scale(1.12); filter: blur(10px); pointer-events: none; }
body.skip-splash #splash { display: none; }

/* ================================================================ launcher */
#launcher {
  position: relative; z-index: 2; height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(14px, 2.4vh, 30px) var(--gutter) 0;
  opacity: 0; transform: translateY(-20px);
  transition: opacity .6s ease .15s, transform .6s var(--ease-out) .15s;
}
.brand {
  display: inline-flex; align-items: center; gap: .45em; text-decoration: none;
  font: 400 clamp(20px, 1.7vw, 30px)/1 var(--display); letter-spacing: .01em;
}
.brand b { font-weight: 400; color: var(--a3); transition: color .6s; }
.brand-dot {
  width: 1.1em; height: 1.1em;
  background: url(art/hub/mark.svg) center / contain no-repeat;
}
.topbar-right { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); color: var(--muted); font-size: clamp(13px, 1vw, 17px); }
.pad-chip { display: inline-flex; align-items: center; gap: .4em; padding: .3em .8em; border-radius: 999px; background: rgba(92, 242, 176, .14); color: #8ff7c9; font-weight: 800; }
#clock { font: 800 clamp(16px, 1.4vw, 24px)/1 "Nunito", sans-serif; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- info */
.info {
  align-self: center;
  width: min(640px, 46vw);
  padding-top: 1vh;
  margin-left: var(--gutter);
  padding-bottom: 2vh;
  max-height: 100%;
}
.info > * { transition: opacity .35s ease, transform .5s var(--ease-out); }
.info.out > * { opacity: 0; transform: translateX(-28px); transition-duration: .18s, .25s; }
.info.in > * { animation: slide-in .6s var(--ease-out) both; }
.info.in > :nth-child(2) { animation-delay: .03s; }
.info.in > :nth-child(3) { animation: logo-pop .75s var(--ease-back) .05s both; }
.info.in > :nth-child(4) { animation-delay: .12s; }
.info.in > :nth-child(5) { animation-delay: .17s; }
.info.in > :nth-child(6) { animation-delay: .22s; }
.info.in > :nth-child(7) { animation-delay: .27s; }
.info.in > :nth-child(8) { animation-delay: .32s; }
.info.in > :nth-child(9) { animation-delay: .37s; }

.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font: 800 clamp(12px, .95vw, 16px)/1 "Nunito", sans-serif; letter-spacing: .2em; text-transform: uppercase;
  color: var(--a3);
}
.kicker-spark { color: var(--a1); font-size: 1.4em; display: inline-block; animation: spin 6s linear infinite; }
.logo-jp {
  margin-top: 1.2vh; min-height: 0;
  font: 800 clamp(18px, min(1.8vw, 3.2vh), 32px)/1 "M PLUS Rounded 1c", "Nunito", sans-serif; letter-spacing: .08em;
  color: var(--cream); -webkit-text-stroke: 5px var(--ink); paint-order: stroke fill;
}
.logo-jp:empty { display: none; }
.game-logo {
  margin: .9vh 0 1.4vh; font-weight: 400;
  font-size: clamp(48px, min(7.4vw, 11.5vh), 140px); line-height: .88;
  color: var(--cream); -webkit-text-stroke: clamp(5px, .5vw, 10px) var(--ink); paint-order: stroke fill;
  filter: drop-shadow(0 .06em 0 var(--ink));
  transform-origin: 0 70%;
}
.game-logo span { display: block; }
/* BongoBongo: chunky rounded sticker, second line in sunny yellow */
/* Quiz!: chunky Nunito, one word */
.logo-quiz { font-family: "Nunito", sans-serif; font-weight: 900; letter-spacing: -.05em; }
/* Tankies: Bangers with an electric cyan face */
.logo-tankies {
  font-family: "Bangers", sans-serif; letter-spacing: .04em; font-size: clamp(60px, min(8.6vw, 15vh), 160px);
  color: #bff4ff;
  filter: drop-shadow(0 .05em 0 var(--ink)) drop-shadow(0 0 .25em color-mix(in srgb, var(--a2) 60%, transparent));
}
/* GOOOAAALL!: Bangers, mint face with a pink drop (long word: a little smaller) */
.logo-goooaaall {
  font-family: "Bangers", sans-serif; letter-spacing: .03em; font-size: clamp(56px, min(7.4vw, 12vh), 140px);
  color: #5cf2b0; filter: drop-shadow(.06em .06em 0 #ff4f8b) drop-shadow(0 .05em 0 var(--ink));
}
/* STRIKE!: Bangers, cream face, electric-cyan drop */
.logo-strike {
  font-family: "Bangers", sans-serif; letter-spacing: .05em; font-size: clamp(80px, min(11vw, 18vh), 200px);
  color: #fff4e0; filter: drop-shadow(.06em .06em 0 #2ad4ff) drop-shadow(0 .05em 0 var(--ink));
}
/* BOOM!: Bangers, hot-pink face with a cyan blast drop */
.logo-boom {
  font-family: "Bangers", sans-serif; letter-spacing: .04em; font-size: clamp(80px, min(11vw, 18vh), 200px);
  color: #ff79a8;
  filter: drop-shadow(.05em .06em 0 #2ad4ff) drop-shadow(0 .05em 0 var(--ink)) drop-shadow(0 0 .25em color-mix(in srgb, #ffd83d 45%, transparent));
}
/* LIAR LIAR LIVE!: Bangers, cream face, fox-orange drop, second line in hot pink */
.logo-liarliar {
  font-family: "Bangers", sans-serif; letter-spacing: .04em; font-size: clamp(56px, min(7.6vw, 13vh), 144px);
  filter: drop-shadow(.06em .06em 0 #ff9a3d) drop-shadow(0 .05em 0 var(--ink));
}
.logo-liarliar span:nth-child(2) { color: #ff4f8b; margin-left: .5em; transform: rotate(-3deg); display: inline-block; }
/* GUESS THE SONG!: Bangers, sunny yellow face with a pink drop, second line in hot pink */
.logo-guessthesong {
  font-family: "Bangers", sans-serif; letter-spacing: .04em; font-size: clamp(56px, min(7.6vw, 13vh), 144px);
  color: #ffd83d; filter: drop-shadow(.06em .06em 0 #ff4f8b) drop-shadow(0 .05em 0 var(--ink));
}
.logo-guessthesong span:nth-child(2) { color: #ff4f8b; margin-left: .6em; transform: rotate(-3deg); display: inline-block; filter: drop-shadow(.06em .06em 0 #2ad4ff); }
/* ADVENTURE!: Bangers, sunny yellow with a mint drop */
.logo-adventure {
  font-family: "Bangers", sans-serif; letter-spacing: .04em; font-size: clamp(66px, min(9vw, 15vh), 170px);
  color: #ffd83d; transform: rotate(-3deg); filter: drop-shadow(.06em .06em 0 #5cf2b0) drop-shadow(0 .05em 0 var(--ink));
}
/* DOODLE!: Bangers, sunny yellow with a hot-pink drop */
.logo-doodle {
  font-family: "Bangers", sans-serif; letter-spacing: .04em; font-size: clamp(76px, min(10.5vw, 17vh), 190px);
  color: #ffd83d; transform: rotate(-2deg);
  filter: drop-shadow(.06em .06em 0 #ff4f8b) drop-shadow(0 .05em 0 var(--ink));
}
.tagline {
  margin: 0 0 1.6vh; max-width: 26em;
  font: 800 clamp(17px, min(1.55vw, 2.9vh), 28px)/1.25 "Nunito", sans-serif; color: var(--text);
}
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.8vh; padding: 0; list-style: none; }
.meta li {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .38em .9em; border-radius: 999px;
  font-size: clamp(13px, .95vw, 16px); font-weight: 800;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); backdrop-filter: blur(8px);
}
.ico { width: 1.15em; height: 1.15em; flex: none; }
.meta .ico { color: var(--a2); transition: color .6s; }
.desc { margin: 0 0 1.8vh; max-width: 34em; color: var(--muted); font-size: clamp(14px, min(1.12vw, 2vh), 19px); line-height: 1.45; }
.features { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 2.6vh; padding: 0; list-style: none; }
.features li { display: inline-flex; align-items: center; gap: .5em; font-weight: 800; font-size: clamp(13px, 1vw, 17px); }
.features li::before {
  content: ""; width: .6em; height: .6em; border-radius: 3px; transform: rotate(45deg);
  background: var(--a2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 25%, transparent);
}
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
.btn-start {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: .7em;
  padding: .72em 1.6em .72em 1.1em;
  font: 400 clamp(20px, min(1.9vw, 3.4vh), 34px)/1 var(--display); letter-spacing: .02em;
  color: var(--ink); background: var(--cream);
  border: 4px solid var(--ink); border-radius: 999px;
  box-shadow: 0 6px 0 var(--ink), 0 0 0 0 color-mix(in srgb, var(--a1) 60%, transparent);
  cursor: pointer;
  transition: transform .18s var(--ease-back), box-shadow .18s ease, background .3s;
  animation: halo 2.4s ease-out infinite;
}
.btn-start:hover, .btn-start:focus-visible { transform: translateY(-3px) scale(1.04); outline: none; }
.btn-start:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn-start-ico {
  display: grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 50%;
  font-size: .7em; padding-left: .12em; color: var(--cream); background: var(--a1);
  transition: background .5s;
}
.btn-start-sheen {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--a3) 70%, #fff) 50%, transparent 65%);
  transform: translateX(-120%); animation: sheen 3.2s ease-in-out 1s infinite;
}
.btn-join {
  display: inline-flex; align-items: center; gap: .5em; padding: .7em 1.2em;
  font-weight: 800; font-size: clamp(14px, 1.05vw, 18px); text-decoration: none;
  border: 2px solid rgba(255, 255, 255, .28); border-radius: 999px;
  background: rgba(13, 15, 31, .4); backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, transform .2s var(--ease-back);
}
.btn-join:hover, .btn-join:focus-visible { background: rgba(255, 255, 255, .12); border-color: #fff; transform: translateY(-2px); outline: none; }
.how { margin: 2.2vh 0 0; font-size: clamp(12px, .9vw, 15px); color: var(--muted); opacity: .8; }

/* ---------------------------------------------------------------- shelf */
.shelf {
  padding: 0 var(--gutter) clamp(18px, 4vh, 48px);
  opacity: 0; transform: translateY(40px);
  transition: opacity .7s ease .3s, transform .8s var(--ease-out) .3s;
}
.shelf-label {
  margin-bottom: calc(var(--tile) * .12 + 16px);
  font: 800 clamp(12px, .9vw, 15px)/1 "Nunito", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.shelf-label span { color: var(--text); margin-left: .5em; }
.tiles {
  display: flex; gap: clamp(14px, 1.6vw, 28px); align-items: flex-end;
  padding: 36px 30px 44px; margin: -36px -30px -44px;
  overflow-x: auto; overflow-y: visible; scrollbar-width: none; scroll-snap-type: x proximity;
}
.tiles::-webkit-scrollbar { display: none; }
.tile {
  position: relative; flex: none; width: var(--tile); aspect-ratio: 1;
  padding: 0; border: 0; border-radius: 26%; cursor: pointer;
  background: var(--bg-2);
  scroll-snap-align: start;
  transform: translateY(0) scale(1);
  transition: transform .35s var(--ease-back), filter .3s, opacity .3s;
  filter: saturate(.75) brightness(.8);
}
.tile img {
  display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
}
.tile::before { /* spinning accent ring on the selected tile */
  content: ""; position: absolute; inset: -7px; border-radius: 30%; z-index: -1;
  background: conic-gradient(from var(--ang, 0deg), var(--a1), var(--a3), var(--a2), var(--a1));
  opacity: 0; transition: opacity .3s;
  animation: ring-spin 3s linear infinite;
}
.tile::after { /* game name under the selected tile */
  content: attr(data-name);
  position: absolute; left: 50%; top: calc(100% + 12px); transform: translate(-50%, -6px);
  white-space: nowrap; font: 800 clamp(12px, .95vw, 16px)/1 "Nunito", sans-serif;
  opacity: 0; transition: opacity .25s, transform .35s var(--ease-out);
}
.tile:hover { filter: none; transform: translateY(-4px); }
.tile.sel { filter: none; transform: translateY(-10px) scale(1.16); z-index: 1; }
.tile.sel::before { opacity: 1; }
.tile.sel::after { opacity: 1; transform: translate(-50%, 0) scale(calc(1 / 1.16)); }
.tile:focus-visible { outline: none; }
.tile.soon {
  cursor: default; filter: none; background: transparent;
  display: grid; place-items: center; align-content: center; gap: 4px;
  border: 2px dashed rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .4);
  font: 800 clamp(11px, .8vw, 13px)/1.1 "Nunito", sans-serif; letter-spacing: .14em; text-transform: uppercase;
}
.tile.soon b { font: 400 clamp(26px, 2.6vw, 44px)/1 var(--display); letter-spacing: 0; }
.tile.soon:hover { transform: none; }
/* tiles enter one by one */
body.ready .tile { animation: tile-in .6s var(--ease-back) both; animation-delay: calc(.4s + var(--i) * .08s); }

body.ready .topbar, body.ready .shelf { opacity: 1; transform: none; }
body.booting .info { opacity: 0; }

/* ================================================================ launch wipe */
#wipe {
  position: fixed; inset: 0; z-index: 30; pointer-events: none;
  display: grid; place-items: center;
  background: var(--a1);
  clip-path: circle(0 at var(--wx, 50%) var(--wy, 50%));
  transition: clip-path .8s cubic-bezier(.7, 0, .3, 1);
}
#wipe.go { clip-path: circle(150% at var(--wx, 50%) var(--wy, 50%)); pointer-events: auto; }
.wipe-art {
  position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0;
  transition: opacity .6s ease .5s, transform 3s var(--ease-out) .4s; transform: scale(1.15);
}
#wipe.go .wipe-art { opacity: .35; transform: scale(1); }
.wipe-text { position: relative; text-align: center; color: var(--ink); }
.wipe-kicker { font: 800 clamp(14px, 1.6vw, 24px)/1 "Nunito", sans-serif; letter-spacing: .4em; text-transform: uppercase; opacity: 0; transition: opacity .4s ease .55s; }
.wipe-title {
  font: 400 clamp(56px, 10vw, 180px)/1 var(--display); color: var(--cream);
  -webkit-text-stroke: clamp(5px, .6vw, 12px) var(--ink); paint-order: stroke fill;
  opacity: 0; transform: scale(.6); transition: opacity .3s ease .55s, transform .6s var(--ease-back) .55s;
}
#wipe.go .wipe-kicker, #wipe.go .wipe-title { opacity: 1; transform: none; }
.wipe-dots { display: flex; justify-content: center; gap: 10px; margin-top: 2vh; }
.wipe-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); animation: dot 1s ease-in-out infinite; }
.wipe-dots i:nth-child(2) { animation-delay: .15s; }
.wipe-dots i:nth-child(3) { animation-delay: .3s; }

.noscript { position: fixed; inset: auto 0 0; padding: 16px; text-align: center; background: var(--bg-2); z-index: 50; }

/* ================================================================ keyframes */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ring-spin { to { --ang: 360deg; } }
@keyframes drift { from { transform: scale(1.1) translate(0, 0); } to { transform: scale(1.18) translate(-2%, -1.5%); } }
@keyframes ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(3.4); opacity: 0; } }
@keyframes pop { to { opacity: 1; transform: none; } }
@keyframes bob { 50% { transform: translateY(-6%) rotate(-3deg); } }
@keyframes drop { 70% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes stretch { to { opacity: 1; transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { border-color: rgba(255, 255, 255, .8); box-shadow: 0 0 30px rgba(255, 255, 255, .2); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
@keyframes logo-pop { from { opacity: 0; transform: scale(.6) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes halo {
  0% { box-shadow: 0 6px 0 var(--ink), 0 0 0 0 color-mix(in srgb, var(--a1) 55%, transparent); }
  70%, 100% { box-shadow: 0 6px 0 var(--ink), 0 0 0 16px color-mix(in srgb, var(--a1) 0%, transparent); }
}
@keyframes sheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes tile-in { from { opacity: 0; transform: translateY(40px) scale(.7); } }
@keyframes dot { 50% { transform: translateY(-10px); } }

/* ================================================================ small screens (phones, portrait tablets) */
@media (max-width: 820px), (max-height: 520px) and (max-width: 1000px) {
  body { overflow-y: auto; }
  #launcher { display: flex; flex-direction: column; height: auto; min-height: 100%; }
  .bg-layer { inset: 0; height: 58vh; background-position: 70% center; }
  .bg-shade {
    background: linear-gradient(0deg, var(--bg) 42%, rgba(13, 15, 31, .55) 70%, rgba(13, 15, 31, .25) 100%);
  }
  .hint-keys, .pad-chip { display: none !important; }
  .shelf { order: 2; padding-top: 30vh; padding-bottom: 8px; }
  .info { order: 3; width: auto; margin: 0; padding: 22px var(--gutter) 40px; }
  .game-logo { font-size: clamp(52px, 15vw, 96px); }
  .logo-tankies { font-size: clamp(60px, 17vw, 110px); }
  .tiles { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding-left: var(--gutter); }
  .tile.sel { transform: translateY(-6px) scale(1.1); }
  .tile.sel::after { transform: translate(-50%, 0) scale(calc(1 / 1.1)); }
  .actions { flex-direction: column; align-items: stretch; }
  .btn-start, .btn-join { justify-content: center; }
}

/* short, wide screens (laptops at 900px and below): drop the helper line */
@media (min-width: 821px) {
  .desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (min-width: 821px) and (max-height: 940px) {
  .how { display: none; }
  .desc { margin-bottom: 1.4vh; }
  .features { margin-bottom: 2vh; gap: 4px 16px; }
  .meta { margin-bottom: 1.4vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
