/* topdown.games — tokens from DESIGN.md */
:root {
  --bg: #07090A;
  --surface: #101517;
  --text: #F4FBFA;
  --text-soft: #B7C7C4;
  --text-muted: #9FB3B0;
  --accent: #6EE7D8;
  --accent-hover: #A5F3EA;
  --accent-shade: #1F9E90;
  --white: #FFFFFF;
  --white-shade: #A9BAB7;
  --line: #1B2325;
  --dash: #35423F;
  --ink: #07090A;
  --danger: #FF9B8A;

  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.7, 0, .2, 1);
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 18px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, p { margin: 0; }
h2 { font: 700 40px/1.05 var(--display); letter-spacing: -0.02em; text-wrap: balance; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, video, canvas, svg { display: block; }
:focus-visible { outline: 3px solid var(--accent-hover); outline-offset: 4px; border-radius: 8px; }
::selection { background: var(--accent); color: var(--ink); }

.wrap { width: 100%; max-width: 1248px; margin-inline: auto; padding-inline: 24px; }
.soft { color: var(--text-soft); }
.accent { color: var(--accent); }
.eyebrow { font: 600 14px/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.08em; }
.lead { font-size: 20px; color: var(--text-soft); max-width: 32em; text-wrap: pretty; }

.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--accent); color: var(--ink);
  padding: 12px 16px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 16px; }

/* ---------- Wordmark ----------
   The two "o"s are the mascot seen from above (a ring with its turquoise dot);
   ".games" is a small tilted 3D block. */
.wordmark { display: inline-flex; align-items: center; gap: .32em; font: 700 24px/1 var(--display);
  letter-spacing: -0.035em; color: var(--text); }
.wm-text { display: inline-flex; align-items: baseline; }
.wm-o { width: .6em; height: .6em; margin: 0 .035em -.045em; flex: none; overflow: visible; }
.wm-dot { transform-box: fill-box; transform-origin: center; }
.wordmark .tag { background: var(--accent); color: var(--ink); border-radius: .42em; padding: .2em .34em .26em;
  letter-spacing: -0.02em; box-shadow: 0 .16em 0 var(--accent-shade); transform: translateY(-.08em) rotate(-4deg);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
.brand:hover .tag { transform: translateY(-.16em) rotate(-7deg); box-shadow: 0 .24em 0 var(--accent-shade); }
/* on hover the dots hop, one after the other */
.brand:hover .wm-dot { animation: wm-hop .55s var(--ease-out); }
.brand:hover .wm-o + .wm-o .wm-dot, .brand:hover .wm-o ~ .wm-o .wm-dot { animation-delay: .14s; }
@keyframes wm-hop { 40% { transform: translateY(-70%) scale(1.25); } 100% { transform: none; } }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 36px;
  border-radius: 18px; background: var(--accent); color: var(--ink); text-decoration: none;
  font: 700 20px/1 var(--display); box-shadow: 0 7px 0 var(--accent-shade);
  transition: transform .12s ease-out, box-shadow .12s ease-out, background-color .15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 9px 0 var(--accent-shade); }
.btn-primary:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--accent-shade); }
.btn-primary[disabled] { opacity: .6; pointer-events: none; }
.btn-block { width: 100%; }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px;
  border: 2px solid var(--accent); border-radius: 14px; color: var(--accent);
  font: 600 16px/1 var(--body); white-space: nowrap; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.btn-outline:hover { background: var(--accent); color: var(--ink); }
.btn-lg { min-height: 56px; padding: 0 28px; border-radius: 16px; font: 700 18px/1 var(--display); }

.link-btn { min-height: 44px; padding: 0 4px; color: var(--accent); font-weight: 600; font-size: 16px;
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: transparent;
  transition: text-decoration-color .15s, color .15s; }
.link-btn:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  border-bottom: 1px solid transparent; transition: background-color .25s, border-color .25s; }
.nav.is-stuck { background: rgba(7, 9, 10, .82); border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand-mark { width: 48px; height: 38px; flex: none; transition: transform .4s var(--ease-out); }
.brand:hover .brand-mark { transform: translateY(-3px); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { font-weight: 500; font-size: 16px; color: var(--text-soft); text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center; transition: color .15s; }
.nav-link:hover { color: var(--accent-hover); }
/* Logged-in player: sapphires + name (replaces "Log in") */
.nav-user { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; max-width: 240px;
  border: 2px solid var(--dash); border-radius: 14px; color: var(--text); text-decoration: none;
  font: 600 16px/1 var(--body); white-space: nowrap; transition: border-color .15s; }
.nav-user:hover { border-color: var(--accent); }
.nav-user .gem { flex: none; }
.nav-user-count { font-variant-numeric: tabular-nums; }
.nav-user-name { color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; }
.btn-outline[disabled] { border-color: var(--dash); color: var(--text-muted); pointer-events: none; }
.account-actions .form-msg { flex: 1 1 100%; margin: 0; }
[hidden] { display: none !important; }
.is-static > .carousel-arrow { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 24px) 0 72px; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center; gap: 24px; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.hero-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--text-muted); }
.cam { font-variant-numeric: tabular-nums; color: var(--accent); border: 1.5px solid var(--dash);
  border-radius: 8px; padding: 6px 8px; min-width: 6.4em; text-align: center; }
.hero-title { font: 700 clamp(52px, 8.4vw, 108px)/0.98 var(--display); letter-spacing: -0.03em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.hero-title .line > span { display: inline-block; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 8px; }

/* Quick play tiles (default hero call to action) */
.quick-wrap { width: 100%; max-width: 580px; display: grid; gap: 14px; }
.quick-label { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }
.quick-label i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.6s steps(2, jump-none) infinite; }
/* A strip of tiles, two in view; app.js slides it one tile at a time. Without JS it scrolls sideways.
   The view is padded (and pulled back with negative margins) so tile depth and glow are not cut off. */
.quick-car { position: relative; min-width: 0; }
.quick-view { margin: -10px -16px -56px; padding: 10px 16px 70px; overflow-x: auto; }
.js .quick-view { overflow: hidden; }
.quick { --gap: 22px; display: flex; gap: var(--gap); }
.quick-tile { flex: 0 0 calc((100% - var(--gap)) / 2); min-width: 0; }
.quick-tile { --shade: var(--accent-shade); position: relative; display: flex; flex-direction: column; gap: 12px; padding: 10px 10px 13px;
  border-radius: 28px; background: var(--accent); color: var(--ink); text-decoration: none;
  box-shadow: 0 11px 0 var(--shade), 0 30px 44px rgba(110, 231, 216, 0.14);
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out); }
.quick-tile.is-white { background: var(--white); --shade: var(--white-shade); }
.quick-tile:hover, .quick-tile:focus-visible { transform: translateY(-6px); box-shadow: 0 17px 0 var(--shade), 0 36px 48px rgba(110, 231, 216, 0.18); }
.quick-tile:active { transform: translateY(8px); box-shadow: 0 3px 0 var(--shade); transition-duration: .08s; }
.quick-tile:focus-visible { border-radius: 28px; }
.quick-tile .cover { border-radius: 19px; aspect-ratio: 16 / 9; }
.quick-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 0 8px; }
.quick-name { font: 700 clamp(18px, 2vw, 24px)/1 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; min-width: 0; }
.quick-go { width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: var(--accent); display: grid; place-items: center; flex: none;
  transition: transform .3s var(--ease-out); }
.quick-go svg { width: 13px; height: 13px; margin-left: 2px; }
.quick-tile:hover .quick-go { transform: scale(1.12); }
/* Which call to action shows: quick tiles by default, the classic button with ?hero=classic */
.hero-cta { display: none; }
.classic .hero-cta { display: flex; }
.classic .quick-wrap { display: none; }

.hero-stage { aspect-ratio: 1 / 0.86; width: 100%; max-height: 68vh; justify-self: center; }

.scroll-cue { position: absolute; left: 50%; bottom: 18px; width: 44px; height: 44px; margin-left: -22px;
  display: grid; place-items: center; }
.scroll-cue span { width: 2px; height: 28px; background: var(--dash); border-radius: 2px; overflow: hidden; position: relative; }
.scroll-cue span::after { content: ''; position: absolute; inset: 0; background: var(--accent);
  animation: cue 1.8s var(--ease-in-out) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* Hero entrance (pure CSS so it runs even if scripts are slow) */
.js .hero-title .line > span { transform: translateY(110%); animation: rise .9s var(--ease-out) forwards; animation-delay: .75s; }
.js .hero-title .line + .line > span { animation-delay: .87s; }
.js .hero-eyebrow, .js .hero-lead, .js .hero-cta, .js .quick-wrap, .js .scroll-cue { opacity: 0; animation: fade-up .8s var(--ease-out) forwards; }
.js .hero-eyebrow { animation-delay: .5s; }
.js .hero-lead { animation-delay: 1.15s; }
.js .hero-cta, .js .quick-wrap { animation-delay: 1.3s; }
.js .scroll-cue { animation-delay: 2.2s; }
@keyframes rise { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.section { padding-block: 52px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 44px; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); }
.live i, .chip i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.live i { animation: blink 1.6s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Scroll reveal */
.js [data-reveal] { opacity: 0; transform: translateY(36px);
  transition: opacity .7s var(--ease-out) var(--d, 0ms), transform .9s var(--ease-out) var(--d, 0ms); }
.js [data-reveal].in { opacity: 1; transform: none; }
/* Game blocks rise out of the page */
.js [data-reveal="block"] { transform: perspective(1400px) translateY(90px) rotateX(38deg) scale(.86); transform-origin: 50% 100%;
  transition-duration: .6s, 1.1s; }
.js .game-slot:nth-child(2)[data-reveal] { --d: 120ms; }

/* ---------- Game block ----------
   One big block per game: large cover (plays the preview) + name, pitch and a big Play button. */
.game-grid { display: grid; gap: 104px; padding-bottom: 48px; }
.game-block {
  --depth: 30px; --shade: var(--accent-shade); --glow: rgba(110, 231, 216, 0.18);
  position: relative; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: stretch; gap: 44px;
  padding: 36px; border-radius: 64px;
  background: var(--accent); color: var(--ink); text-decoration: none;
  box-shadow: 0 var(--depth) 0 var(--shade), 0 70px 90px var(--glow);
  transform: perspective(1800px) rotateX(calc(5deg + var(--rx, 0deg))) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
  will-change: transform;
}
.game-block.is-white { background: var(--white); --shade: var(--white-shade); --glow: rgba(255, 255, 255, 0.09); }
.game-block.is-flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }
.game-block.is-flip .cover { order: 2; }
.game-block:focus-visible { border-radius: 64px; outline-offset: 8px; }
.game-block.is-live { --lift: -14px; --depth: 44px; }
.game-block:active { --lift: 18px; --depth: 10px; transition-duration: .1s; }

.cover { position: relative; aspect-ratio: 16 / 9; border-radius: 36px; overflow: hidden; background: var(--ink);
  isolation: isolate; }
.cover img, .cover video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover img { transition: transform 1.2s var(--ease-out); }
.cover video { opacity: 0; transition: opacity .35s; }
.is-live .cover video.is-ready { opacity: 1; }
.is-live .cover img { transform: scale(1.05); }
/* No clip yet: slow pan across the cover art while hovered */
.cover.kenburns img { transform-origin: 78% 70%; }
.is-live .cover.kenburns img { animation: kenburns 9s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.05); } to { transform: scale(1.5) translateX(4%); } }

.chip { position: absolute; left: 18px; top: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 13px; border-radius: 12px; background: var(--ink); color: var(--text-muted);
  font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase;
  transition: color .2s; }
.game-block.is-live .chip { color: var(--accent); }
.game-block.is-live .chip i { animation: blink 1s steps(2, jump-none) infinite; }

/* Big play badge on the cover; steps aside while the preview runs */
.cover-play { position: absolute; left: 50%; top: 50%; z-index: 2; width: 96px; height: 96px; margin: -48px 0 0 -48px;
  border-radius: 50%; background: var(--ink); color: var(--accent); display: grid; place-items: center;
  box-shadow: 0 0 0 6px rgba(244, 251, 250, .9);
  transition: transform .45s var(--ease-out), opacity .3s; }
.cover-play svg { width: 30px; height: 30px; margin-left: 5px; }
.game-block.is-live .cover-play { transform: scale(.5); opacity: 0; }

.game-info { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 10px 6px 4px; min-width: 0; }
.game-name { font: 700 clamp(40px, 5vw, 68px)/0.98 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; margin-top: 6px; }
.game-line { font-size: 21px; line-height: 1.4; font-weight: 500; max-width: 18em; text-wrap: balance; }
.play-pill { margin-top: auto; align-self: stretch; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 76px; padding: 0 28px; border-radius: 24px;
  background: var(--ink); color: var(--text); font: 700 26px/1 var(--display);
  box-shadow: 0 8px 0 var(--shade);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), color .2s; }
.play-pill svg { width: 16px; height: 16px; transition: transform .3s var(--ease-out); }
.game-block.is-live .play-pill { color: var(--accent); transform: translateY(-3px); box-shadow: 0 11px 0 var(--shade); }
.game-block.is-live .play-pill svg { transform: translateX(6px); }
.game-block:active .play-pill { transform: translateY(6px); box-shadow: 0 2px 0 var(--shade); }

/* ---------- Games carousel ----------
   Slides sit on top of each other; app.js slides them in and out. The box is widened and padded
   so the blocks' depth and glow are not cut off while they travel across the screen. */
.carousel { position: relative; }
.carousel-arrow { display: none; }
.js .carousel { margin: -40px calc(50% - 50vw) -122px; padding: 40px calc(50vw - 50%) 170px; overflow: hidden; touch-action: pan-y; }
.carousel-track { position: relative; }
.js .carousel > .carousel-track { gap: 0; padding-bottom: 0; }
.js .carousel-slide { grid-area: 1 / 1; min-width: 0; visibility: hidden; transform: translateX(100vw); }
.js .carousel-slide.is-active, .js .carousel-slide.is-leaving { visibility: visible; }
.js .carousel-slide.is-active { transform: none; }
/* Arrows: appear when the pointer nears the left or right side (always shown on touch) */
.js .carousel-arrow { position: absolute; z-index: 3; top: 50%; width: 64px; height: 64px; margin-top: -32px;
  display: grid; place-items: center; border-radius: 20px; background: var(--ink); color: var(--accent); border: 2px solid var(--accent);
  box-shadow: 0 6px 0 var(--accent-shade); opacity: 0; pointer-events: none; transform: scale(.7);
  transition: opacity .2s, transform .3s var(--ease-out), background-color .15s, color .15s, box-shadow .12s; }
.carousel-arrow.is-prev { left: -20px; }
.carousel-arrow.is-next { right: -20px; }
.carousel-arrow svg { width: 24px; height: 24px; }
[data-carousel].show-prev .is-prev, [data-carousel].show-next .is-next, .js .carousel-arrow:focus-visible { opacity: 1; pointer-events: auto; transform: none; }
.js .carousel-arrow:hover { color: var(--white); border-color: var(--white); transform: scale(1.08); }
.js .carousel-arrow:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-shade); }
@media (hover: none) { .js .carousel-arrow { opacity: 1; pointer-events: auto; transform: none; } }
/* wheel (popular games): app.js places every card on a circle; the track is padded by --peek
   (set by app.js) to make room for the small previous / next cards above and below the big one.
   Arrows sit on the top and bottom edge of the big card. */
.js .carousel.is-wheel .carousel-track { padding-block: var(--peek, 0px); }
.js .carousel.is-wheel .carousel-slide { visibility: visible; will-change: transform, opacity; }
.js .carousel.is-wheel .carousel-arrow { z-index: 20; }
.js .carousel[data-carousel="wheel"] {
  -webkit-mask-image: linear-gradient(transparent, #000 30px, #000 calc(100% - 110px), transparent);
  mask-image: linear-gradient(transparent, #000 30px, #000 calc(100% - 110px), transparent); }
.js .carousel-arrow.is-up, .js .carousel-arrow.is-down { left: calc(50% - 32px); right: auto; margin-top: 0; }
.js .carousel-arrow.is-up { top: calc(var(--peek, 0px) - 8px); }
.js .carousel-arrow.is-down { top: auto; bottom: calc(var(--peek, 0px) - 46px); }
.head-link { margin-left: auto; align-self: center; gap: 8px; }
.head-link svg { width: 14px; height: 14px; transition: transform .3s var(--ease-out); }
.head-link:hover svg { transform: translateX(4px); }

/* ---------- All games page ---------- */
.all { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 40px; min-height: 100vh; min-height: 100svh; }
.all-head { display: grid; gap: 18px; margin-bottom: 48px; }
.all-title { font: 700 clamp(52px, 7.4vw, 100px)/0.98 var(--display); letter-spacing: -0.03em; }
.all-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 36px; padding-bottom: 24px; }
.all-grid .quick-tile { padding: 14px 14px 18px; border-radius: 36px; gap: 16px; }
.all-grid .quick-tile .cover { aspect-ratio: 16 / 9; border-radius: 24px; }
.all-grid .quick-name { font-size: clamp(19px, 2.6vw, 32px); }
.all-grid .quick-foot { padding: 0 4px 0 10px; }
.js .all-head, .js .all-grid .quick-tile { opacity: 0; animation: fade-up .8s var(--ease-out) backwards; opacity: 1; }
.js .all-grid .quick-tile:nth-child(1) { animation-delay: .15s; }
.js .all-grid .quick-tile:nth-child(2) { animation-delay: .22s; }
.js .all-grid .quick-tile:nth-child(3) { animation-delay: .29s; }
.js .all-grid .quick-tile:nth-child(4) { animation-delay: .36s; }
.js .all-grid .quick-tile:nth-child(n+5) { animation-delay: .43s; }

/* small arrows for the hero strip */
.js .carousel-arrow.is-sm { top: 38%; width: 44px; height: 44px; margin-top: -22px; border-radius: 14px; box-shadow: 0 4px 0 var(--accent-shade); }
.carousel-arrow.is-sm.is-prev { left: -18px; }
.carousel-arrow.is-sm.is-next { right: -18px; }
.carousel-arrow.is-sm svg { width: 18px; height: 18px; }

/* ---------- Contact page ---------- */
.contact { padding: calc(var(--nav-h) + 56px) 0 40px; min-height: 100vh; min-height: 100svh; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: start; }
.contact-copy { display: grid; gap: 24px; justify-items: start; position: sticky; top: calc(var(--nav-h) + 32px); }
.contact-copy .eyebrow { color: var(--accent); }
.contact-title { font: 700 clamp(52px, 7.4vw, 100px)/0.98 var(--display); letter-spacing: -0.03em; }
.contact-mark { width: min(300px, 70%); aspect-ratio: 180 / 144; margin-top: 20px; animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-12px); } }
.contact-panel { background: var(--surface); border-radius: 48px; padding: 44px; }
.contact-form { display: grid; gap: 22px; }
.contact-form[hidden], .contact-done[hidden] { display: none; }
.who { border: 0; padding: 0; margin: 0; min-width: 0; }
.who legend { padding: 0; margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--text-soft); }
.who-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-bottom: 8px; }
.who-opt { position: relative; display: block; }
.who-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.who-card { display: grid; align-content: start; gap: 6px; height: 100%; padding: 16px 16px 18px; border-radius: 20px;
  border: 2px dashed var(--dash); color: var(--text-soft);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), background-color .15s, border-color .15s, color .15s; }
.who-card b { font: 700 20px/1.1 var(--display); color: var(--text); transition: color .15s; }
.who-card small { font-size: 14px; line-height: 1.35; }
.who-opt:hover .who-card { border-color: var(--accent); }
.who-opt input:checked + .who-card { background: var(--accent); border: 2px solid var(--accent); color: var(--ink);
  box-shadow: 0 7px 0 var(--accent-shade); transform: translateY(-4px); }
.who-opt input:checked + .who-card b { color: var(--ink); }
.who-opt input:focus-visible + .who-card { outline: 3px solid var(--accent-hover); outline-offset: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { display: grid; gap: 18px; justify-items: start; padding-block: 28px; }
.contact-done h2 { color: var(--accent); }
.js .contact-copy > :not(.contact-mark), .js .contact-panel { opacity: 0; animation: fade-up .8s var(--ease-out) forwards; }
.js .contact-copy > :nth-child(1) { animation-delay: .1s; }
.js .contact-copy > :nth-child(2) { animation-delay: .2s; }
.js .contact-copy > :nth-child(3) { animation-delay: .32s; }
.js .contact-panel { animation-delay: .4s; }

/* ---------- Soon ---------- */
.soon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 32px; }
.soon-box { position: relative; aspect-ratio: 1 / 1; border: 2px dashed var(--dash); border-radius: 44px;
  display: grid; place-items: center; color: var(--text-muted);
  font: 600 14px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.soon-no { position: absolute; left: 28px; top: 26px; font: 700 20px/1 var(--display); letter-spacing: 0; color: var(--dash); }

/* ---------- Account ---------- */
.account-panel { background: var(--surface); border-radius: 48px; padding: 64px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px 48px; }
.account-copy { flex: 1 1 380px; display: grid; gap: 16px; max-width: 560px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* ---------- Text pages (/privacy, /terms) ---------- */
.doc { max-width: 808px; padding-top: calc(var(--nav-h) + 56px); padding-bottom: 40px; }
.doc .eyebrow { color: var(--text-muted); margin-bottom: 16px; }
.doc-title { font: 700 clamp(44px, 6vw, 76px)/1 var(--display); letter-spacing: -0.03em; margin-bottom: 28px; }
.doc .lead { max-width: none; }
.doc h2 { font-size: 26px; letter-spacing: -0.01em; margin: 48px 0 12px; }
.doc p, .doc li { color: var(--text-soft); line-height: 1.65; }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 12px 0; padding-left: 22px; display: grid; gap: 8px; }
.doc li::marker { color: var(--accent-shade); }
.doc b { color: var(--text); font-weight: 600; }
.doc a { color: var(--accent); text-underline-offset: 4px; }
.doc a:hover { color: var(--accent-hover); }

/* ---------- Game page (game.html): a slim bar above the game ---------- */
body.play { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.play-bar { flex: none; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: var(--bg); }
.play-bar .brand { min-height: 40px; }
.play-bar .brand-mark { width: 38px; height: 30px; }
.play-bar .wordmark { font-size: 19px; }
.play-home, .play-full { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 14px 0 10px;
  border: 2px solid var(--dash); border-radius: 12px; color: var(--text); text-decoration: none;
  font: 600 15px/1 var(--body); white-space: nowrap; transition: border-color .15s, color .15s; }
.play-full { padding: 0 14px 0 12px; }
.play-home:hover, .play-full:hover { border-color: var(--accent); color: var(--accent); }
.play-home svg, .play-full svg { width: 16px; height: 16px; flex: none; }
.play-games { flex: 1 1 0; min-width: 0; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.play-games::-webkit-scrollbar { display: none; }
.play-track { display: flex; justify-content: flex-end; gap: 8px; width: max-content; min-width: 100%; }
.play-tile { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 3px 12px 3px 3px;
  border-radius: 10px; background: var(--surface); border: 2px solid transparent; color: var(--text-soft); text-decoration: none;
  font: 600 14px/1 var(--body); white-space: nowrap; transition: border-color .15s, color .15s; }
.play-tile:hover { border-color: var(--dash); color: var(--text); }
.play-tile[aria-current] { border-color: var(--accent); color: var(--text); }
.play-tile img, .play-tile .play-thumb { width: 54px; height: 30px; flex: none; border-radius: 6px; object-fit: cover; background: var(--line); }
.play-tile small { font: 600 11px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.play-frame { flex: 1 1 auto; min-height: 0; width: 100%; border: 0; display: block; background: #0b1016; }
@media (max-width: 760px) {
  .play-bar { gap: 10px; padding: 0 10px; }
  .play-bar .brand, .play-full span { display: none; }
  .play-full { padding: 0 11px; }
}
/* Phones held sideways: the screen is too short to share, so the game gets all of it. */
@media (max-height: 480px) and (orientation: landscape) { .play-bar { display: none; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 52px; padding-block: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.footer-links a { color: var(--text-soft); text-decoration: none; font-size: 16px; min-height: 44px;
  display: inline-flex; align-items: center; transition: color .15s; }
.footer-links a:hover { color: var(--accent-hover); }
.copyright { color: var(--text-muted); font-size: 14px; }

/* ---------- Auth dialog ---------- */
.auth { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: var(--text); overflow: hidden;
  --ox: 100%; --oy: 0%; }
.auth::backdrop { background: transparent; }
.auth-wipe, .auth-shell { position: absolute; inset: 0; clip-path: circle(0 at var(--ox) var(--oy));
  transition: clip-path .75s var(--ease-in-out); }
.auth-wipe { background: var(--accent); }
.auth-shell { background: var(--bg); display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); }
.auth.is-open .auth-wipe, .auth.is-open .auth-shell { clip-path: circle(150vmax at var(--ox) var(--oy)); }
.auth.is-open .auth-shell { transition-delay: .14s; }
.auth.is-closing .auth-wipe { transition-delay: .1s; }
.auth.is-closing .auth-wipe, .auth.is-closing .auth-shell { transition-duration: .5s; }

.auth-side { background: var(--accent); color: var(--ink); padding: 64px; display: flex; flex-direction: column;
  justify-content: flex-end; gap: 16px; overflow: hidden; }
.auth-mark { width: min(340px, 80%); aspect-ratio: 180 / 144; margin-bottom: auto; margin-top: 6vh;
  transform: translateY(40px); opacity: 0; transition: transform 1s var(--ease-out) .45s, opacity .5s .45s; }
.auth.is-open .auth-mark { transform: none; opacity: 1; }
.auth-side-title { font: 700 clamp(40px, 4.6vw, 68px)/0.98 var(--display); letter-spacing: -0.03em; }
.auth-side-text { font-size: 20px; font-weight: 500; }

.auth-main { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 0 24px max(24px, env(safe-area-inset-bottom)); }
.auth-top { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); flex: none; }
.auth-close { width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--line); display: grid; place-items: center;
  color: var(--text-soft); transition: border-color .15s, color .15s, transform .3s var(--ease-out); }
.auth-close:hover { border-color: var(--accent); color: var(--accent); transform: rotate(90deg); }
.auth-close svg { width: 16px; height: 16px; }
.auth-body { width: 100%; max-width: 440px; margin: auto; padding-block: 24px 40px; display: grid; gap: 28px;
  opacity: 0; transform: translateY(24px); transition: opacity .5s .4s, transform .8s var(--ease-out) .4s; }
.auth.is-open .auth-body { opacity: 1; transform: none; }
.auth-title { font-size: clamp(36px, 5vw, 48px); }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; background: var(--surface); border-radius: 18px; }
.auth-tabs button { min-height: 48px; border-radius: 12px; font: 600 16px/1 var(--body); color: var(--text-soft);
  transition: background-color .2s, color .2s; }
.auth-tabs button[aria-selected="true"] { background: var(--accent); color: var(--ink); }
.auth-tabs button:not([aria-selected="true"]):hover { color: var(--text); }

.auth-form { display: grid; gap: 20px; }
.auth-form[hidden] { display: none; }
.field { display: grid; gap: 8px; }
.field > span:first-child { font-size: 15px; font-weight: 600; color: var(--text-soft); }
.field em { font-style: normal; font-weight: 400; color: var(--text-muted); margin-left: 6px; }
.field input, .field textarea { width: 100%; min-height: 56px; padding: 0 18px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--surface); color: var(--text); font: 500 18px/1.2 var(--body);
  transition: border-color .15s; }
.field textarea { display: block; min-height: 160px; padding: 16px 18px; line-height: 1.45; resize: vertical; }
.contact-panel .field input, .contact-panel .field textarea { background: var(--bg); }
.field input:hover, .field textarea:hover { border-color: var(--dash); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field input:-webkit-autofill { -webkit-text-fill-color: var(--text); box-shadow: 0 0 0 100px var(--surface) inset; caret-color: var(--text); }
.field-pass { position: relative; display: block; }
.field-pass input { padding-right: 84px; }
.pass-toggle { position: absolute; right: 6px; top: 6px; height: 44px; min-width: 68px; padding: 0 12px; border-radius: 12px;
  color: var(--accent); font-size: 15px; font-weight: 600; }
.pass-toggle:hover { color: var(--accent-hover); }
.form-msg { color: var(--danger); font-size: 16px; font-weight: 500; }
.legal { font-size: 14px; color: var(--text-muted); }
.legal a { color: var(--text-soft); }
.legal a:hover { color: var(--accent-hover); }
.guest { justify-self: center; }

/* ---------- Responsive ---------- */
/* Short laptop screens: keep the quick-play tiles fully inside the first screen */
@media (min-width: 861px) and (max-height: 820px) {
  .hero { padding: calc(var(--nav-h) + 8px) 0 44px; }
  .hero-copy { gap: 20px; }
  .hero-title { font-size: clamp(52px, 6.4vw, 84px); }
  .quick-tile .cover { aspect-ratio: 2 / 1; }
  .scroll-cue { bottom: 2px; }
}
@media (max-width: 860px) {
  .hero { align-items: flex-start; padding-bottom: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-copy { gap: 22px; }
  .hero-stage { max-width: 520px; max-height: none; aspect-ratio: 1 / 0.8; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .account-panel { padding: 40px 28px; border-radius: 40px; }
  .game-grid { gap: 88px; }
  .game-block, .game-block.is-flip { grid-template-columns: 1fr; gap: 24px; padding: 28px; border-radius: 52px; }
  .game-block.is-flip .cover { order: 0; }
  .cover { aspect-ratio: 16 / 10; border-radius: 30px; }
  .game-info { padding: 0 6px 6px; gap: 14px; }
  .play-pill { margin-top: 10px; }
  /* single-column cards: arrows sit beside the cover, not the text */
  .js .carousel-arrow { top: calc(28px + (100vw - 104px) * .3125); width: 52px; height: 52px; margin-top: -26px; border-radius: 16px; }
  .js .carousel-arrow.is-up, .js .carousel-arrow.is-down { left: calc(50% - 26px); }
  .js .carousel-arrow.is-up { top: calc(var(--peek, 0px) - 8px); }
  .js .carousel-arrow.is-down { top: auto; bottom: calc(var(--peek, 0px) - 38px); }
  .all { padding-top: calc(var(--nav-h) + 32px); }
  .all-head { margin-bottom: 36px; }
  .all-grid { gap: 32px 20px; }
  .all-grid .quick-tile { padding: 10px 10px 14px; border-radius: 28px; gap: 12px; }
  .all-grid .quick-tile .cover { border-radius: 19px; }
  .contact { padding-top: calc(var(--nav-h) + 32px); }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .contact-copy { position: static; gap: 18px; }
  .contact-mark { display: none; }
  .contact-panel { padding: 28px; border-radius: 40px; }
}
@media (max-width: 560px) {
  :root { --nav-h: 64px; }
  body { font-size: 17px; }
  h2 { font-size: 34px; }
  .lead { font-size: 18px; }
  .brand-mark { width: 40px; height: 32px; }
  .nav-links { gap: 14px; }
  .nav-link { display: none; }
  .btn-outline { padding: 0 14px; }
  .nav-user { padding: 0 12px; max-width: 170px; }
  .hero-eyebrow > span:last-child { display: none; }
  .hero-cta .btn-primary { width: 100%; }
  .quick { --gap: 14px; }
  .quick-view { margin-inline: -12px; padding-inline: 12px; }
  .quick-tile { padding: 8px 8px 10px; border-radius: 22px; gap: 9px; box-shadow: 0 8px 0 var(--shade); }
  .quick-tile .cover { border-radius: 15px; aspect-ratio: 4 / 3; }
  .quick-foot { padding: 2px 6px 0; }
  .quick-name { font-size: 19px; }
  /* no room beside the name on a phone: the play badge sits on the cover instead */
  .quick-go { position: absolute; right: 16px; bottom: 50px; z-index: 2; width: 36px; height: 36px; border-radius: 12px; }
  .quick-go svg { width: 11px; height: 11px; }
  .hero-cta { justify-content: center; width: 100%; }
  .section { padding-block: 40px; }
  .section-head { margin-bottom: 32px; }
  .wordmark { font-size: 20px; }
  .game-grid { gap: 72px; }
  .game-block, .game-block.is-flip { padding: 18px; gap: 20px; border-radius: 42px; --depth: 20px; }
  .game-block.is-live { --lift: -6px; --depth: 28px; }
  .cover { border-radius: 26px; aspect-ratio: 4 / 3; }
  .cover-play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
  .cover-play svg { width: 22px; height: 22px; }
  .chip { left: 12px; top: 12px; }
  .game-line { font-size: 18px; }
  .play-pill { min-height: 64px; font-size: 22px; border-radius: 20px; }
  .js .carousel-arrow { top: calc(18px + (100vw - 84px) * .375); width: 44px; height: 44px; margin-top: -22px; border-radius: 14px; }
  .carousel-arrow.is-prev { left: -18px; }
  .carousel-arrow.is-next { right: -18px; }
  .carousel-arrow svg { width: 18px; height: 18px; }
  .js .carousel-arrow.is-sm { top: 34%; width: 34px; height: 34px; margin-top: -17px; border-radius: 11px; }
  .carousel-arrow.is-sm.is-prev { left: -14px; }
  .carousel-arrow.is-sm.is-next { right: -14px; }
  .carousel-arrow.is-sm svg { width: 14px; height: 14px; }
  .js .carousel-arrow.is-up, .js .carousel-arrow.is-down { left: calc(50% - 22px); }
  .js .carousel-arrow.is-up { top: calc(var(--peek, 0px) - 8px); }
  .js .carousel-arrow.is-down { top: auto; bottom: calc(var(--peek, 0px) - 30px); }
  .head-link { margin-left: 0; }
  .all-grid { gap: 26px 14px; }
  .all-grid .quick-tile { padding: 8px 8px 10px; border-radius: 22px; gap: 9px; }
  .all-grid .quick-tile .cover { border-radius: 15px; aspect-ratio: 16 / 9; }
  .all-grid .quick-go { bottom: 46px; }
  .contact-panel { padding: 20px; border-radius: 32px; }
  .who-grid { grid-template-columns: 1fr; }
  .who-card { grid-template-columns: auto 1fr; align-items: baseline; gap: 12px; padding: 14px 16px; }
  .soon-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .soon-box { border-radius: 32px; }
  .soon-no { left: 20px; top: 18px; }
  .account-actions { width: 100%; }
  .account-actions .btn-outline { flex: 1 1 100%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important;
    animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js [data-reveal="block"] { opacity: 1; transform: none; }
}
