/* ------------------------------------------------------------------------
   Original Games — public site
   Theme tokens: the same three colours a partner's brand kit is built from
   (bg, primary, accent) plus what the site derives from them. The picker in
   site.js swaps four starting palettes; nothing else changes.
   ------------------------------------------------------------------------ */

:root {
  --bg: #0b1020;
  --primary: #3b82f6;
  --accent: #22d3ee;
  --on-primary: #ffffff;
  --on-accent: #041016;

  --surface: color-mix(in oklab, var(--bg) 90%, white);
  --surface-2: color-mix(in oklab, var(--bg) 82%, white);
  --line: color-mix(in oklab, var(--bg) 74%, white);
  --text: #f1f5fb;
  --muted: color-mix(in oklab, var(--text) 60%, var(--bg));
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --glow: 0 0 80px color-mix(in oklab, var(--primary) 35%, transparent);
  --radius: 18px;
  --max: 1200px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: dark;
}

:root[data-mode='light'] {
  --text: #0f172a;
  --surface: color-mix(in oklab, var(--bg) 97%, black);
  --surface-2: color-mix(in oklab, var(--bg) 92%, black);
  --line: color-mix(in oklab, var(--bg) 86%, black);
  --muted: color-mix(in oklab, var(--text) 60%, var(--bg));
  --ok: #059669;
  --warn: #b45309;
  --bad: #dc2626;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --glow: 0 0 80px color-mix(in oklab, var(--primary) 18%, transparent);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 850; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; }
button { font: inherit; }
.gradient-text {
  background: linear-gradient(95deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; }
.eyebrow { display: inline-block; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.76rem; margin-bottom: 12px; }
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface);
}
.badge.accent { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
.badge.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 50%, var(--line)); }
.badge.bad { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 50%, var(--line)); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 18px; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 850; color: var(--text); letter-spacing: -0.02em; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--on-primary); font-size: 15px;
  box-shadow: 0 6px 18px color-mix(in oklab, var(--primary) 45%, transparent);
}
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); padding: 8px 13px; border-radius: 10px; font-weight: 550; font-size: 0.95rem; }
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a.active { color: var(--text); background: var(--surface-2); }
.nav .cta { margin-left: 8px; }
.nav a.btn { color: var(--on-primary); }
.nav a.btn:hover { background: var(--primary); color: var(--on-primary); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 7px 11px; cursor: pointer; }
@media (max-width: 960px) {
  .nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 10px 14px 16px; gap: 2px; }
  .nav.open { display: flex; }
  .menu-btn { display: inline-block; }
  .nav .theme-picker { margin: 10px 0 0; }
}

/* ---------- theme picker ---------- */
.theme-picker { display: flex; align-items: center; gap: 7px; margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.theme-picker .swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0;
  background: var(--sw-bg); position: relative; outline: none; transition: transform 0.15s ease;
}
.theme-picker .swatch::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: linear-gradient(135deg, var(--sw-primary), var(--sw-accent)); }
.theme-picker .swatch:hover { transform: scale(1.15); }
.theme-picker .swatch[aria-pressed='true'] { border-color: var(--text); }
.theme-picker .label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-right: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; font-weight: 650; cursor: pointer; border: 1px solid transparent;
  background: var(--primary); color: var(--on-primary); text-decoration: none !important;
  transition: filter 0.15s, transform 0.15s, box-shadow 0.15s; font-size: 0.97rem; line-height: 1.2;
  box-shadow: 0 8px 24px color-mix(in oklab, var(--primary) 35%, transparent);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface); }
.btn.accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px color-mix(in oklab, var(--accent) 35%, transparent); }
.btn.sm { padding: 8px 14px; font-size: 0.86rem; border-radius: 9px; box-shadow: none; }
.btn.lg { padding: 16px 30px; font-size: 1.08rem; border-radius: 14px; }
.btn.block { width: 100%; }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section.tight { padding: 48px 0; }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.12rem; }
.alt { background: color-mix(in oklab, var(--bg) 94%, var(--primary)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- hero ---------- */
.hero { padding: 96px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -30% -10% auto; height: 140%; pointer-events: none;
  background:
    radial-gradient(700px 480px at 15% 10%, color-mix(in oklab, var(--primary) 40%, transparent), transparent 70%),
    radial-gradient(600px 420px at 90% 30%, color-mix(in oklab, var(--accent) 32%, transparent), transparent 70%);
  opacity: 0.9;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero p.lead { font-size: 1.25rem; color: var(--muted); max-width: 580px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero .trust { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 30px; color: var(--muted); font-size: 0.9rem; }
.hero .trust span::before { content: '✓ '; color: var(--ok); }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }

/* hero showcase device */
.device { border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow), var(--glow); padding: 18px; position: relative; }
.device .bar { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: var(--muted); margin-bottom: 12px; }
.device .bar b { color: var(--text); }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.tile { aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 1.25rem; transition: background 0.3s, transform 0.3s; }
.tile.gem { background: color-mix(in oklab, var(--accent) 32%, var(--surface-2)); border-color: var(--accent); transform: scale(1.04); }
.tile.mine { background: color-mix(in oklab, var(--bad) 35%, var(--surface-2)); border-color: var(--bad); }
.device .foot { display: flex; justify-content: space-between; margin-top: 14px; align-items: center; }
.device .mult { font-family: var(--mono); font-weight: 700; font-size: 1.4rem; color: var(--accent); }
.device .float { position: absolute; border-radius: 14px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.82rem; }
.device .float.a { top: -18px; right: -20px; }
@media (min-width: 601px) { .device .bar { padding-right: 140px; } }
.device .float.b { bottom: -18px; left: -22px; }
.device .float b { display: block; font-size: 1.05rem; }
@media (max-width: 600px) { .device .float { display: none; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee .track { display: flex; gap: 14px; width: max-content; animation: scroll 38s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee .item { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-weight: 650; white-space: nowrap; }
.marquee .item span:first-child { font-size: 1.3rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.stat b { display: block; font-size: 1.9rem; font-weight: 850; letter-spacing: -0.03em; }
.stat > span { color: var(--muted); font-size: 0.9rem; }
.stat b span { font-size: inherit; color: inherit; }
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .cards, .cards.four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards, .cards.two, .cards.four { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  display: flex; flex-direction: column; gap: 8px; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: color-mix(in oklab, var(--primary) 55%, var(--line)); transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 30%, var(--surface-2)), color-mix(in oklab, var(--accent) 22%, var(--surface-2))); margin-bottom: 6px; }
.card h3 { margin-bottom: 2px; }
.card p { color: var(--muted); margin: 0; font-size: 0.97rem; }
.card .foot { margin-top: auto; padding-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* game cards */
.game-card { position: relative; overflow: hidden; padding: 14px 14px 20px; }
.game-card .art { height: 190px; border-radius: 14px; display: grid; place-items: center; font-size: 66px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 45%, var(--surface-2)), color-mix(in oklab, var(--accent) 30%, var(--surface-2))); }
.game-card .art::before { content: ''; position: absolute; inset: 0; background: radial-gradient(260px 140px at 75% 100%, color-mix(in oklab, var(--accent) 45%, transparent), transparent 70%); }
.game-card .art::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in oklab, white 25%, transparent) 1px, transparent 1px); background-size: 22px 22px; opacity: 0.25; }
.game-card .art span { position: relative; filter: drop-shadow(0 10px 22px rgba(0,0,0,0.4)); transition: transform 0.3s; }
.game-card:hover .art span { transform: scale(1.12) rotate(-4deg); }
.game-card .body { padding: 14px 8px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.game-card .kind { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); font-weight: 700; }
.game-card .play { position: absolute; top: 26px; right: 26px; }
.game-card .specs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- feature list ---------- */
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 30px; padding: 0; margin: 0; }
.feature-list li { list-style: none; padding-left: 30px; position: relative; color: var(--muted); }
.feature-list li::before { content: '✓'; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 0.7rem; color: var(--on-accent); background: var(--accent); font-weight: 800; margin-top: 3px; }
.feature-list li b { color: var(--text); }
@media (max-width: 720px) { .feature-list { grid-template-columns: 1fr; } }

/* ---------- steps / flow ---------- */
.flow-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: step; position: relative; }
.flow-steps .fs { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 20px 22px; position: relative; }
.flow-steps .fs::before { counter-increment: step; content: counter(step); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--on-primary); font-weight: 800; margin-bottom: 14px; }
.flow-steps .fs h3 { font-size: 1.02rem; margin-bottom: 4px; }
.flow-steps .fs p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.flow-steps .fs .icon { position: absolute; top: 22px; right: 20px; font-size: 1.4rem; opacity: 0.8; }
@media (max-width: 1000px) { .flow-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .flow-steps { grid-template-columns: 1fr; } }

.timeline { display: grid; gap: 18px; }
.timeline .t { display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start; }
.timeline .t .n { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-weight: 850; font-size: 1.2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: var(--on-primary); }
.timeline .t .body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.timeline .t .body p { color: var(--muted); margin: 0; }
.timeline .t .body h3 { margin-bottom: 6px; }

/* ---------- brand studio demo ---------- */
.studio { display: grid; grid-template-columns: 340px 1fr; gap: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: var(--shadow); }
@media (max-width: 900px) { .studio { grid-template-columns: 1fr; } }
.studio .controls { display: grid; gap: 14px; align-content: start; }
.studio label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.studio input[type='text'], .studio select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; }
.studio .colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.studio input[type='color'] { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 3px; cursor: pointer; }
.studio .upload { border: 1px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; color: var(--muted); font-size: 0.86rem; cursor: pointer; }
.studio .upload:hover { border-color: var(--primary); color: var(--text); }
.studio .preview { border-radius: 18px; padding: 18px; min-height: 380px; display: flex; flex-direction: column; gap: 14px; background: var(--st-bg, #0b1020); color: var(--st-text, #fff); font-family: var(--st-font, var(--font)); border: 1px solid rgba(128,128,128,0.2); transition: background 0.3s; }
.studio .preview .top { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; opacity: 0.85; }
.studio .preview .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.studio .preview .logo img { height: 28px; max-width: 140px; object-fit: contain; }
.studio .preview .logo .fallback { width: 28px; height: 28px; border-radius: 8px; background: var(--st-primary); }
.studio .preview .board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.studio .preview .board div { aspect-ratio: 1; border-radius: 10px; background: color-mix(in oklab, var(--st-bg) 82%, var(--st-text)); }
.studio .preview .board div.on { background: var(--st-accent); }
.studio .preview .row { display: flex; gap: 10px; align-items: center; }
.studio .preview .btn-prev { flex: 1; padding: 12px; border-radius: 12px; text-align: center; font-weight: 700; background: var(--st-primary); color: var(--st-on-primary, #fff); }
.studio .preview .chip { padding: 8px 12px; border-radius: 999px; background: color-mix(in oklab, var(--st-bg) 82%, var(--st-text)); font-size: 0.85rem; }
.studio .preview .mult { margin-left: auto; font-family: var(--mono); font-weight: 700; color: var(--st-accent); font-size: 1.2rem; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); position: relative; }
.plan.featured::before { content: 'Most popular'; position: absolute; top: -13px; left: 24px; background: linear-gradient(90deg, var(--primary), var(--accent)); color: var(--on-primary); font-size: 0.72rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: 0.06em; text-transform: uppercase; }
.plan .price { font-size: 2.4rem; font-weight: 850; letter-spacing: -0.03em; }
.plan .price small { font-size: 0.9rem; color: var(--muted); font-weight: 500; }
.plan ul { padding: 0; margin: 10px 0 0; list-style: none; display: grid; gap: 9px; color: var(--muted); font-size: 0.95rem; }
.plan ul li::before { content: '✓ '; color: var(--ok); font-weight: 700; }
.plan .btn { margin-top: auto; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px; }
.calc label { display: block; font-size: 0.84rem; color: var(--muted); margin-bottom: 6px; }
.calc input, .field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .calc input:focus { outline: 2px solid color-mix(in oklab, var(--primary) 60%, transparent); border-color: var(--primary); }
.calc .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.calc .out { display: grid; gap: 10px; align-content: start; }
.calc .out div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line); padding: 10px 0; }
.calc .out div.total { font-weight: 850; font-size: 1.3rem; border-bottom: none; color: var(--accent); }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 14px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form .two { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 0.84rem; color: var(--muted); margin-bottom: 6px; }
.notice { border-radius: 12px; padding: 12px 16px; font-size: 0.94rem; border: 1px solid var(--line); background: var(--surface-2); }
.notice.ok { border-color: var(--ok); color: var(--ok); }
.notice.bad { border-color: var(--bad); color: var(--bad); }

/* ---------- FAQ ---------- */
details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 0 20px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 650; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; }
details summary::after { content: '+'; color: var(--muted); font-size: 1.2rem; }
details[open] summary::after { content: '–'; }
details .body { padding: 0 0 18px; color: var(--muted); }

/* ---------- callouts / CTA ---------- */
.callout { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 14px; padding: 16px 20px; color: var(--muted); margin: 20px 0; }
.callout b { color: var(--text); }
.cta-band { background: linear-gradient(120deg, color-mix(in oklab, var(--primary) 85%, var(--bg)), color-mix(in oklab, var(--accent) 70%, var(--bg))); color: #fff; border-radius: 28px; padding: 56px 48px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -120px; top: -160px; background: rgba(255,255,255,0.12); }
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: rgba(255,255,255,0.88); margin: 0; font-size: 1.05rem; }
.cta-band .btn { background: #fff; color: #0b1020; box-shadow: none; position: relative; }
@media (max-width: 640px) { .cta-band { padding: 36px 26px; } }

/* ---------- quotes ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; font-size: 1.02rem; }
.quote p { color: var(--text); }
.quote .who { color: var(--muted); font-size: 0.88rem; }
.quote .stars { color: var(--warn); letter-spacing: 2px; margin-bottom: 8px; }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 30px; color: var(--muted); font-size: 0.92rem; margin-top: 40px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
/* A grid item's automatic minimum is its min-content width, and one of these columns
   holds an unbreakable address. Without this the column refuses to shrink and pushes
   the whole page wider than the phone — on every page, since this is the footer. */
.site-footer .cols > * { min-width: 0; }
.site-footer a, .site-footer p { overflow-wrap: anywhere; }
.site-footer h4 { color: var(--text); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .site-footer { padding: 40px 0 24px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 26px; }
  .site-footer .legal { flex-direction: column; gap: 8px; }
}

/* ---------- page header ---------- */
.page-head { padding: 72px 0 36px; position: relative; }
.page-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
.page-head p { color: var(--muted); font-size: 1.15rem; max-width: 760px; }

/* ---------- full-view play page ---------- */
body.fullview { overflow: hidden; height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.playbar { height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 16px; border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--bg) 85%, transparent); backdrop-filter: blur(14px); flex: none; }
.playbar .title { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.playbar .title span { font-size: 1.2rem; }
.playbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.playbar .theme-picker { border-left: none; padding-left: 0; margin: 0 6px; }
.playstage { flex: 1; position: relative; background: var(--bg); }
.playstage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.playstage .overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 30px; background: var(--bg); }
.playstage .overlay .inner { max-width: 440px; }
.playstage .overlay .icon { font-size: 64px; margin-bottom: 8px; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.9s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-pill { font-size: 0.78rem; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.status-pill.ok { color: var(--ok); border-color: color-mix(in oklab, var(--ok) 50%, var(--line)); }
.status-pill.bad { color: var(--bad); border-color: color-mix(in oklab, var(--bad) 50%, var(--line)); }
@media (max-width: 640px) { .playbar .hide-sm { display: none; } }

/* ---------- misc ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.anchor { scroll-margin-top: 90px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ======================================================================
   Motion & gaming atmosphere
   ====================================================================== */
.fx-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fx-bg .stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-bg .orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; animation: drift 22s ease-in-out infinite alternate; }
.fx-bg .o1 { width: 60vw; height: 60vw; left: -18vw; top: -22vw; background: color-mix(in oklab, var(--primary) 55%, transparent); }
.fx-bg .o2 { width: 46vw; height: 46vw; right: -14vw; top: 10vh; background: color-mix(in oklab, var(--accent) 45%, transparent); animation-duration: 28s; animation-delay: -8s; }
.fx-bg .o3 { width: 40vw; height: 40vw; left: 30vw; bottom: -24vw; background: color-mix(in oklab, var(--primary) 40%, var(--accent) 20%); animation-duration: 34s; animation-delay: -15s; }
:root[data-mode='light'] .fx-bg .orb { opacity: 0.28; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
.hero::before { display: none; }
body { background: var(--bg); }

/* tilt + glow follow */
[data-tilt] { transition: transform 0.25s ease, border-color 0.2s, box-shadow 0.25s; transform-style: preserve-3d; position: relative; will-change: transform; }
[data-tilt].tilting { transition: transform 0.06s linear, box-shadow 0.25s; }
[data-tilt]::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(240px 240px at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%); }
[data-tilt].tilting::after { opacity: 1; }

/* glowing / shining buttons */
.btn.glow { position: relative; overflow: hidden; }
.btn.glow::before { content: ''; position: absolute; inset: -2px; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn.pulse { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 8px 24px color-mix(in oklab, var(--primary) 35%, transparent); } 50% { box-shadow: 0 8px 40px color-mix(in oklab, var(--primary) 70%, transparent), 0 0 0 6px color-mix(in oklab, var(--primary) 18%, transparent); } }

/* gradient border cards */
.gborder { position: relative; background: var(--surface); border: 1px solid transparent; background-clip: padding-box; }
.gborder::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; z-index: -1; background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary)); background-size: 200% 200%; animation: gmove 6s linear infinite; }
@keyframes gmove { to { background-position: 200% 200%; } }

/* headline word swap */
.swap { display: inline-block; transition: opacity 0.25s, transform 0.25s; }
.swap.out { opacity: 0; transform: translateY(12px); }

/* hero showcase */
.showcase { border: 1px solid var(--line); border-radius: 26px; background: color-mix(in oklab, var(--surface) 86%, transparent); backdrop-filter: blur(10px); box-shadow: var(--shadow), var(--glow); padding: 16px; position: relative; }
.showcase .sc-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.showcase .sc-tabs button { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); padding: 7px 12px; border-radius: 999px; font-size: 0.82rem; font-weight: 650; cursor: pointer; }
.showcase .sc-tabs button[aria-pressed='true'] { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.showcase canvas { width: 100%; height: 330px; display: block; border-radius: 16px; background: color-mix(in oklab, var(--bg) 70%, var(--surface)); }
.showcase .sc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.showcase .sc-label { font-size: 0.82rem; color: var(--muted); }
.showcase .sc-mult { font-family: var(--mono); font-weight: 800; font-size: 1.5rem; color: var(--accent); text-shadow: 0 0 20px color-mix(in oklab, var(--accent) 60%, transparent); }
.showcase .live { position: absolute; top: -12px; right: 22px; background: var(--bad); color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; }
.showcase .live::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #fff; margin-right: 6px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
@media (max-width: 600px) { .showcase canvas { height: 260px; } }

/* activity ticker */
.ticker { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: color-mix(in oklab, var(--surface) 70%, transparent); }
.ticker .track { display: flex; gap: 34px; width: max-content; padding: 12px 0; animation: scroll 60s linear infinite; }
.ticker:hover .track { animation-play-state: paused; }
.ticker .tick { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 0.9rem; color: var(--muted); }
.ticker .tick .g { font-size: 1.1rem; }
.ticker .tick b { color: var(--text); }
.ticker .tick .m { color: var(--accent); }

/* animated game art */
.art .fig { display: inline-block; }
.art[data-game='limbo'] .fig { animation: lift 2.4s ease-in-out infinite; }
.art[data-game='dice'] .fig { animation: spin3 3s ease-in-out infinite; }
.art[data-game='plinko'] .fig { animation: bounce 1.6s cubic-bezier(.3,.7,.4,1.4) infinite; }
.art[data-game='keno'] .fig { animation: pulse2 2s ease-in-out infinite; }
.art[data-game='mines'] .fig, .art[data-game='mines-original'] .fig { animation: wobble 3s ease-in-out infinite; }
@keyframes lift { 0%, 100% { transform: translateY(6px) rotate(-8deg); } 50% { transform: translateY(-14px) rotate(-2deg); } }
@keyframes spin3 { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(14deg) translateY(-4px); } }
@keyframes bounce { 0%, 100% { transform: translateY(-18px); } 50% { transform: translateY(14px) scaleX(1.06); } }
@keyframes pulse2 { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes wobble { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg) translateY(-6px); } }
.art .spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0; animation: spark 2.8s ease-in-out infinite; }
@keyframes spark { 0% { opacity: 0; transform: translateY(0) scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70px) scale(1.2); } }

/* stagger reveal */
.stagger > * { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2) { transition-delay: 0.08s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.24s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.32s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.40s; }

/* big moment section */
.moment { position: relative; border-radius: 30px; overflow: hidden; padding: 64px 40px; text-align: center; background: radial-gradient(800px 400px at 50% 110%, color-mix(in oklab, var(--primary) 45%, transparent), transparent 70%), var(--surface); border: 1px solid var(--line); }
.moment .big { font-family: var(--mono); font-weight: 850; font-size: clamp(3rem, 10vw, 7rem); letter-spacing: -0.04em; line-height: 1; color: var(--accent); text-shadow: 0 0 40px color-mix(in oklab, var(--accent) 60%, transparent); }
.moment .rocket { font-size: 3rem; display: inline-block; animation: lift 2.4s ease-in-out infinite; }
.moment .chips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.moment .chips span { padding: 8px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 0.88rem; }

/* coming soon tiles */
.soon { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.soon .s { aspect-ratio: 1; border-radius: 16px; border: 1px dashed var(--line); display: grid; place-items: center; text-align: center; gap: 4px; padding: 10px; color: var(--muted); font-size: 0.82rem; background: var(--surface); transition: border-color 0.2s, transform 0.2s; }
.soon .s:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.soon .s span:first-child { font-size: 1.8rem; filter: grayscale(0.4); }
@media (max-width: 900px) { .soon { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 500px) { .soon { grid-template-columns: repeat(2, 1fr); } }

/* device screens row */
.screens { display: grid; grid-template-columns: 1.2fr 0.8fr 0.5fr; gap: 18px; align-items: end; }
.screens .scr { border: 1px solid var(--line); border-radius: 22px; background: var(--surface); padding: 10px; box-shadow: var(--shadow); }
.screens .scr .inner { border-radius: 14px; background: linear-gradient(160deg, color-mix(in oklab, var(--primary) 35%, var(--surface-2)), color-mix(in oklab, var(--accent) 25%, var(--surface-2))); display: grid; place-items: center; font-size: 2.4rem; }
.screens .scr.desktop .inner { height: 220px; } .screens .scr.tablet .inner { height: 190px; } .screens .scr.phone .inner { height: 230px; }
@media (max-width: 760px) { .screens { grid-template-columns: 1fr 1fr; } .screens .scr.desktop { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .fx-bg .orb { animation: none; }
}

/* real screenshots as card art */
.art.shot { padding: 0; background: var(--surface-2); }
.art.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s ease; }
.game-card:hover .art.shot img { transform: scale(1.06); }
.art.shot::after { background: linear-gradient(180deg, transparent 55%, color-mix(in oklab, var(--surface) 85%, transparent)); opacity: 1; }
.art.shot .fig { position: absolute; left: 12px; bottom: 10px; font-size: 1.6rem; z-index: 1; }
.art.shot .spark { display: none; }
.screens .scr .inner { overflow: hidden; position: relative; }
.screens .scr .inner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.screens .scr.phone .inner img { object-position: 22% top; transform: scale(1.9); transform-origin: 30% 0; }

/* partner login, social, newsletter, cookie */
.nav a.login { font-size: 0.88rem; border: 1px solid var(--line); margin-left: 6px; }
.social { display: flex; gap: 8px; margin-top: 16px; }
.social a { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 0.85rem; }
.social a:hover { color: var(--text); border-color: var(--primary); text-decoration: none; }
.nl { display: flex; gap: 6px; }
.nl input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; }
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; margin: 0 auto; max-width: 720px; display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.9rem; color: var(--muted); }
.compliance { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.compliance .c { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.compliance .c .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; background: color-mix(in oklab, var(--ok) 18%, var(--surface-2)); flex: none; }
.compliance .c b { display: block; margin-bottom: 2px; }
.compliance .c span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 900px) { .compliance { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .compliance { grid-template-columns: 1fr; } }
.currency-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.currency-strip span { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-family: var(--mono); font-size: 0.85rem; }

/* ======================================================================
   Mobile
   ----------------------------------------------------------------------
   The desktop layout above collapses its grids at the width each one stops
   working. This block is what a phone needs beyond that: room given back to
   content, targets a thumb can hit, panels that behave like panels, and the
   hover-only flourishes turned off where there is no pointer to trigger them.
   ====================================================================== */

/* ---------- foundations ---------- */
html {
  /* iOS enlarges text in landscape unless told not to. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  -webkit-tap-highlight-color: transparent;
  /* The page is a column of sections; nothing in it is meant to scroll sideways.
     A guard, not a fix — anything that actually overflows is fixed at its source. */
  overflow-x: clip;
}
/* Long unbroken strings (addresses, keys, URLs) must wrap rather than widen the page. */
h1, h2, h3, h4, p, li, td, th, dd, dt { overflow-wrap: break-word; }

/* The sticky header is 70px; an in-page anchor must clear it. */
:target, .anchor { scroll-margin-top: 86px; }

/* ---------- header / mobile menu ---------- */
.menu-btn {
  /* A 44px target, and a tap that never selects the glyph. */
  min-width: 44px; min-height: 44px;
  display: none; place-items: center;
  font-size: 1.05rem; line-height: 1;
  -webkit-user-select: none; user-select: none;
}
@media (max-width: 960px) {
  .menu-btn { display: grid; }
  .nav {
    /* The panel scrolls itself rather than running off a short screen (a phone in
       landscape is ~375px tall), and clears the home indicator on a notched device. */
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    box-shadow: var(--shadow);
  }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .nav .cta, .nav a.login { margin-left: 0; margin-top: 6px; }
  .nav a.btn { justify-content: center; padding: 13px 22px; }
  .theme-picker { border-left: none; padding-left: 0; margin-left: 0; }
  /* The page behind an open menu must not scroll under it. */
  html.nav-open, html.nav-open body { overflow: hidden; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  /* Sections are sized for a desktop column. On a phone that vertical air is just
     scrolling, so it comes down — the rhythm is kept, the distance is not. */
  .section { padding: 56px 0; }
  .section.tight { padding: 32px 0; }
  .section-head { margin-bottom: 28px; }
  .section-head p { font-size: 1.02rem; }
  .hero { padding: 48px 0 44px; }
  .hero p.lead { font-size: 1.08rem; }
  .hero .actions { margin-top: 22px; gap: 10px; }
  .hero .trust { gap: 10px 18px; margin-top: 22px; }
  .page-head { padding: 40px 0 22px; }
  .page-head p { font-size: 1.04rem; }
  .wrap { padding: 0 18px; }

  /* A primary action is easier to hit across the column than beside its sibling. */
  .hero .actions .btn, .cta-band .btn { width: 100%; }
  .btn.lg { padding: 15px 24px; font-size: 1.02rem; }

  .card { padding: 20px; }
  .cards { gap: 14px; }
  .cta-band { padding: 30px 22px; border-radius: 22px; text-align: left; }
  .cta-band p { font-size: 0.98rem; }
  .moment { padding: 42px 20px; border-radius: 22px; }
  .stat { padding: 18px; }
  .stat b { font-size: 1.6rem; }
  .quote { padding: 20px; font-size: 0.98rem; }
  details { padding: 0 16px; }
  .callout { padding: 14px 16px; }
  .plan { padding: 24px; }
  .calc, .studio { padding: 20px; }
  .calc .row { grid-template-columns: 1fr; }
  .timeline .t { grid-template-columns: 44px 1fr; gap: 14px; }
  .timeline .t .n { width: 44px; height: 44px; border-radius: 13px; font-size: 1.05rem; }
  .timeline .t .body { padding: 18px 20px; }
  .marquee .item { padding: 10px 16px; font-size: 0.92rem; }
}

/* The catalogue is 30+ titles. One per row turns the page into a 20,000px scroll,
   so on a phone the cards pair up and the art comes down to suit the smaller tile. */
@media (max-width: 620px) {
  /* Matches the specificity of the collapse rule further up, and comes after it. */
  .cards, .cards.two, .cards.four { grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: stretch; }
  /* Prose cards stay full width — two columns of paragraph is unreadable at 390px.
     `.cards.four` is the compact variant (an icon, a title, a line) and pairs up fine. */
  .cards:not(.four) > .card:not(.game-card) { grid-column: 1 / -1; }
  .cards.four .card { padding: 16px; }
  .cards.four .card h3 { font-size: 0.95rem; }
  .cards.four .card p { font-size: 0.82rem; }
  .cards.four .card .icon { width: 38px; height: 38px; border-radius: 11px; font-size: 18px; }

  .game-card { padding: 8px 8px 10px; }
  .game-card .art { height: 112px; border-radius: 10px; font-size: 40px; }
  .game-card .body { padding: 10px 4px 0; gap: 3px; }
  .game-card .body h3 { font-size: 0.98rem; margin: 0; }
  .game-card .kind { font-size: 0.68rem; letter-spacing: 0.08em; }
  .game-card .body p {
    font-size: 0.8rem; line-height: 1.45;
    /* Two lines of blurb, so tiles sharing a row end up the same height. */
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
  }
  /* A 175px tile cannot show five wrapped spec pills, an overlay button and two
     footer buttons. It shows the game and one way in; the sheet carries the detail. */
  .game-card .specs { display: none; }
  .game-card .play { display: none; }
  .game-card .foot { padding-top: 10px; }
  .game-card .foot .btn.ghost { display: none; }
  .game-card .foot .btn {
    width: 100%; min-height: 44px; padding: 10px 8px; font-size: 0.85rem;
    /* Titles run long ("Rock Paper Scissors"); the button must not grow the tile. */
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
    text-align: center; line-height: 24px;
  }
  /* On the home page the card foot holds badges, not buttons — keep those centred. */
  .game-card .foot > .badge { font-size: 0.66rem; padding: 4px 9px; }
}
/* Below this a paired tile is ~145px, too narrow for a screenshot to read. Game and
   prose cards go back to one per row — where there is width again for the art, the
   spec pills and the overlay button. `.cards.four` holds an icon and one line, which
   still reads fine paired, so it stays paired. */
@media (max-width: 380px) {
  .cards, .cards.two { grid-template-columns: 1fr; }
  .game-card .art { height: 160px; }
  .game-card .specs { display: flex; }
  .game-card .play { display: inline-flex; top: 14px; right: 14px; }
}

/* ---------- targets ---------- */
/* A finger is not a cursor. Anything tappable gets a 44px-tall hit area — on the
   link's own box where that is free, and via a padded pseudo-element where making
   the box taller would open up the layout. */
@media (hover: none) and (pointer: coarse) {
  .nav a, .site-footer ul a, .playbar a, .playbar button { min-height: 44px; display: flex; align-items: center; }
  .site-footer ul { gap: 2px; }
  .btn.sm { padding: 11px 15px; }
  .social a { width: 44px; height: 44px; }
  details summary { padding: 18px 0; min-height: 44px; align-items: center; }
  .theme-picker .swatch { width: 28px; height: 28px; }
  .theme-picker .swatch::after { inset: 5px; }
  .brand { min-height: 44px; }
  /* Inline text links in body copy sit inside a line of prose; a taller box would
     break the line. Grow the touch area instead of the box. */
  .site-footer .legal a, .callout a, p > a, .game-card h3 a { position: relative; }
  .site-footer .legal a::after, .callout a::after, p > a::after, .game-card h3 a::after {
    content: ''; position: absolute; left: 0; right: 0; top: 50%;
    height: 44px; transform: translateY(-50%);
  }
  /* The card title and the art above it open the same page, so the title's grown
     target may span the tile without ever covering a different destination. */
  .game-card h3 a::after { left: -8px; right: -8px; }
}

/* ---------- no hover, no hover effects ---------- */
/* Tilt, lift and glow are pointer-follow effects. On a touch screen they either do
   nothing or, worse, stick after a tap — so they are switched off, not left to chance. */
@media (hover: none) {
  .card:hover, .btn:hover, .soon .s:hover { transform: none; box-shadow: none; }
  .btn:hover { filter: none; }
  .card:hover { border-color: var(--line); }
  [data-tilt]::after { display: none; }
  .game-card:hover .art span, .game-card:hover .art.shot img { transform: none; }
  .marquee:hover .track, .ticker:hover .track { animation-play-state: running; }
}

/* The background orbs are three large blurred layers repainting on every scroll
   frame. On a phone GPU that is the difference between smooth and not. */
@media (max-width: 760px) {
  .fx-bg .orb { filter: blur(60px); opacity: 0.4; }
  .fx-bg .o3 { display: none; }
}

/* ---------- tables ---------- */
/* The game sheet's spec table had no styling at all and no room to scroll. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.table-wrap th, .table-wrap td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th { color: var(--muted); font-weight: 600; }
.table-wrap tr:last-child td { border-bottom: none; }
@media (max-width: 640px) {
  .table-wrap { margin-top: 22px; }
  .table-wrap th, .table-wrap td { padding: 10px 8px; font-size: 0.9rem; }
}

/* The game sheet's three-up stat row. At 390px three columns wrap every value onto
   three lines, so below that it pairs up with the headline figure across the top. */
.stats.trio { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) {
  .stats.trio { grid-template-columns: repeat(2, 1fr); }
  .stats.trio > :first-child { grid-column: 1 / -1; }
}

/* The game sheet's hero shot. Tall enough to read on a desktop column, shorter on a
   phone where it sits above the fold and pushes the description down. */
.g-hero-shot { height: 320px; }
@media (max-width: 860px) { .g-hero-shot { height: 240px; } }
@media (max-width: 640px) { .g-hero-shot { height: 190px; } }

/* ---------- full-view play page ---------- */
@media (max-width: 720px) {
  .playbar {
    /* Everything here competes for one 390px line. The picker and the wordmark are
       the parts a player on a phone can do without; the game controls stay. */
    height: 52px; gap: 8px; padding: 0 10px;
    padding-left: calc(10px + env(safe-area-inset-left));
    padding-right: calc(10px + env(safe-area-inset-right));
  }
  .playbar .theme-picker { display: none; }
  .playbar .title { font-size: 0.94rem; min-width: 0; }
  .playbar .title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .playbar .right { gap: 6px; }
  .playbar .btn.sm { padding: 9px 11px; }
  .playstage { padding-bottom: env(safe-area-inset-bottom); }
}
@media (max-width: 480px) {
  /* The title is the one thing here that can give up space, so it does — the game is
     already on screen below. Everything else, including the call to action, stays. */
  .playbar .title { flex: 0 1 auto; overflow: hidden; }
  .playbar .brand { flex: none; }
  .playbar .right { flex: none; }
  .playbar .btn.sm { padding: 9px 10px; font-size: 0.8rem; }
}

/* ---------- cookie notice ---------- */
@media (max-width: 560px) {
  .cookie {
    left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    flex-direction: column; align-items: stretch; gap: 10px;
    padding: 14px; font-size: 0.86rem;
  }
  .cookie .btn { width: 100%; }
}

/* ---------- forms ---------- */
/* Under 16px iOS zooms the page in on focus and never zooms back out. Scoped to
   touch so desktop input sizing is left exactly as it was. */
@media (pointer: coarse) {
  input, select, textarea { font-size: max(16px, 1em); }
}
@media (max-width: 560px) {
  .nl { flex-wrap: wrap; }
  .nl input { flex: 1 1 100%; }
  .nl .btn { width: 100%; }
  .form .btn { width: 100%; }
  /* The news-page subscribe box carries its width inline; let it fill the band. */
  .cta-band .form input[type='email'] { min-width: 0; width: 100%; flex: 1 1 100%; }
}

/* ---------- showcase ---------- */
@media (max-width: 560px) {
  .showcase { padding: 12px; border-radius: 20px; }
  .showcase .sc-tabs { gap: 5px; }
  .showcase .sc-tabs button { padding: 9px 12px; font-size: 0.78rem; }
  .showcase canvas { height: 230px; }
  .showcase .sc-mult { font-size: 1.2rem; }
  /* The live badge sat outside the card's right edge, which is off-screen here. */
  .showcase .live { right: 12px; }
}

/* ---------- landscape phones ---------- */
/* A short viewport makes generous vertical padding the whole screen. */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding: 32px 0; }
  .section { padding: 40px 0; }
  .page-head { padding: 28px 0 18px; }
}

/* ---------- brand studio: the visitor's logo in the games ---------- */
.brand-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; padding: 6px 12px 6px 7px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text);
  font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; transition: background 0.15s, border-color 0.15s;
  white-space: nowrap; flex: none;
}
/* The desktop header is a full row already, so there the button is the logo alone, beside
   the swatches it belongs with, and takes the room the "Theme" label had. */
@media (min-width: 961px) {
  .nav .theme-picker .label { display: none; }
  .nav .theme-picker { margin-left: 6px; padding-left: 10px; }
  .nav .brand-btn { margin-left: 0; padding: 0; border: 0; border-radius: 999px; }
  .nav .brand-btn .chip { width: 40px; height: 24px; padding: 3px 5px; border: 1px solid var(--line); }
  .nav .brand-btn .chip[data-empty='true'] { width: 24px; }
  .nav .brand-btn .txt { display: none; }
}
.brand-btn:hover { background: var(--surface); border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); }
.brand-btn .chip {
  width: 46px; height: 22px; border-radius: 999px; background: var(--surface-2) center / contain no-repeat;
  background-origin: content-box; padding: 3px 6px; box-sizing: border-box;
}
.brand-btn .chip[data-empty='true'] { width: 22px; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.playbar .brand-btn { margin: 0 2px; }
@media (max-width: 960px) { .nav .theme-picker { flex-wrap: wrap; } .nav .brand-btn { margin: 0 0 0 6px; } }
@media (max-width: 640px) { .playbar .brand-btn { padding: 6px; min-height: 44px; } .playbar .brand-btn .txt { display: none; } }

.brand-dialog {
  width: min(880px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border-radius: 22px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); box-shadow: var(--shadow); overflow: auto;
}
.brand-dialog::backdrop { background: rgb(0 0 0 / 0.62); backdrop-filter: blur(3px); }
.brand-panel { display: grid; gap: 18px; padding: 22px; }
.brand-panel header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.brand-panel h3 { margin: 4px 0 0; font-size: 1.3rem; }
.brand-panel .x { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; }
.brand-panel .x:hover { background: var(--surface); }
.brand-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 720px) { .brand-grid { grid-template-columns: 1fr; } }
.brand-controls { display: grid; gap: 12px; }
.brand-drop {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; cursor: pointer;
  border: 1.5px dashed var(--line); background: var(--surface); transition: border-color 0.15s, background 0.15s;
}
.brand-drop:hover, .brand-drop[data-over='true'], .brand-drop:focus-within { border-color: var(--accent); background: var(--surface-2); }
.brand-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.brand-drop .thumb {
  flex: none; width: 96px; height: 56px; border-radius: 12px; box-sizing: border-box; padding: 8px;
  background: var(--bg) center / contain no-repeat; background-origin: content-box; border: 1px solid var(--line);
}
.brand-drop .thumb.square { width: 56px; margin: 0 20px; }
.brand-drop .thumb[data-empty='true'] { background: var(--bg); display: grid; place-items: center; }
.brand-drop .thumb[data-empty='true']::after { content: '+'; font-size: 1.6rem; color: var(--muted); }
.brand-drop .copy { display: grid; gap: 3px; min-width: 0; }
.brand-drop small { color: var(--muted); font-size: 0.82rem; }
.brand-msg { margin: 0; min-height: 1.2em; font-size: 0.86rem; color: var(--ok); }
.brand-msg[data-tone='bad'] { color: var(--bad); }
.brand-row { display: flex; gap: 8px; flex-wrap: wrap; }
.brand-controls fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
.brand-controls legend { padding: 0 6px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.brand-controls .check { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 30px; }
.brand-controls .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.brand-controls .pick { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-controls select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.brand-panel footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand-panel .try { color: var(--muted); font-size: 0.9rem; }

/* The preview: a game in miniature, in the site's own palette. The card back is the
   game's card back, colour for colour, so what is seen here is what is dealt there. */
.brand-preview { display: grid; gap: 10px; }
.brand-preview small { color: var(--muted); font-size: 0.8rem; text-align: center; }
.bp-head { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; background: var(--surface); font-size: 0.82rem; letter-spacing: 0.04em; }
.bp-head i { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.bp-head-logo { width: 84px; height: 22px; background: left center / contain no-repeat; }
.bp-table {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 250px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden;
}
.bp-mark { position: absolute; width: 22%; height: 34px; background: center / contain no-repeat; opacity: 0.62; }
.bp-mark[data-pos='off'] { display: none; }
.bp-mark[data-pos='top-left'] { top: 12px; left: 14px; background-position: left top; }
.bp-mark[data-pos='top-right'] { top: 12px; right: 14px; background-position: right top; }
.bp-mark[data-pos='bottom-left'] { bottom: 12px; left: 14px; background-position: left bottom; }
.bp-mark[data-pos='bottom-right'] { bottom: 12px; right: 14px; background-position: right bottom; }
.bp-mark[data-pos='center'] { inset: 0; margin: auto; width: 64%; height: 38%; opacity: 0.1; }
.bp-card { position: relative; width: 112px; height: 158px; border-radius: 12px; box-shadow: 0 18px 36px rgb(0 0 0 / 0.45); display: grid; place-items: center; overflow: hidden; }
.bp-card.face { background: linear-gradient(160deg, #ffffff, #e9edf5); color: #14161f; align-content: center; }
.bp-card.face b { font-size: 44px; font-weight: 900; line-height: 1; }
.bp-card.face span { font-size: 26px; line-height: 1; margin-top: 4px; }
/* A card back: the colourway here, the design from the table in site.js. */
.cardback {
  --cb-line: var(--accent);
  --cb-from: color-mix(in oklab, var(--primary) 72%, var(--surface-2));
  --cb-to: color-mix(in oklab, var(--primary) 34%, var(--bg));
  background: linear-gradient(160deg, var(--cb-from), var(--cb-to));
}
.cardback[data-color='accent'] {
  --cb-line: var(--on-accent);
  --cb-from: color-mix(in oklab, var(--accent) 72%, var(--surface-2));
  --cb-to: color-mix(in oklab, var(--accent) 34%, var(--bg));
}
.cardback[data-color='neutral'] {
  --cb-from: color-mix(in oklab, var(--bg) 78%, white);
  --cb-to: color-mix(in oklab, var(--bg) 95%, white);
}
:root[data-mode='light'] .cardback { --cb-from: color-mix(in oklab, var(--primary) 90%, white); --cb-to: color-mix(in oklab, var(--primary) 70%, #0b0e14); }
:root[data-mode='light'] .cardback[data-color='accent'] { --cb-from: color-mix(in oklab, var(--accent) 90%, white); --cb-to: color-mix(in oklab, var(--accent) 70%, #0b0e14); }
:root[data-mode='light'] .cardback[data-color='neutral'] { --cb-from: color-mix(in oklab, var(--bg) 80%, black); --cb-to: color-mix(in oklab, var(--bg) 95%, black); }
.brand-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.cb-pick {
  display: grid; justify-items: center; gap: 5px; padding: 6px 6px 5px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid transparent; background: transparent; color: var(--muted); font: inherit;
}
.cb-pick:hover { background: var(--surface); }
.cb-pick[aria-pressed='true'] { border-color: var(--accent); color: var(--text); background: var(--surface); }
.cb-pick .cardback { width: 38px; height: 52px; border-radius: 6px; box-shadow: 0 4px 10px rgb(0 0 0 / 0.35); }
.cb-pick.wide .cardback { width: 58px; height: 26px; }
.cb-pick small { font-size: 0.72rem; }
.bp-card.back::before {
  content: ''; position: absolute; inset: 5%; border-radius: 7px;
  border: 1px solid color-mix(in oklab, var(--cb-line) 62%, transparent);
}
.bp-card.back::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 24%; aspect-ratio: 1; transform: rotate(45deg); border-radius: 3px;
  border: 1.5px solid var(--cb-line); background: color-mix(in oklab, var(--cb-line) 22%, transparent);
}
.bp-card.back[data-icon='true']::after {
  inset: 27% 20%; margin: 0; width: auto; aspect-ratio: auto; transform: none; border: 0; border-radius: 0;
  background: var(--icon) center / contain no-repeat;
  filter: drop-shadow(0 1px 3px rgb(0 0 0 / 0.4));
}
