/* neme.world — one stylesheet, no build step. A dark storefront throughout. */

:root {
  color-scheme: dark;
  /* The brand palette: mint #43E5AD, near-black #09110F, near-white #F3F8F5. Everything else is drawn from these. */
  --bg: #09110f;
  --surface: #0f1a17;
  --surface-2: #15231f;
  --surface-3: #1d302a;
  --border: #1e2f2a;
  --text: #f3f8f5;
  --muted: #8fa59c;
  --accent: #43e5ad;
  --accent-strong: #2ccf96;
  --on-accent: #09110f;
  --danger: #ff8a80;
  --ok-bg: #0f2a20;
  --err-bg: #2c1716;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 50px rgb(0 0 0 / 0.55);
  --glow: 0 0 0 1px rgb(67 229 173 / 0.6), 0 14px 44px rgb(67 229 173 / 0.2);
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
html.no-scroll { overflow: hidden; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 520px at 10% -10%, rgb(67 229 173 / 0.13), transparent 62%),
    radial-gradient(700px 460px at 100% 0%, rgb(67 229 173 / 0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.55 var(--font);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2rem); font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 750; margin-bottom: 14px; }
h3 { font-size: 1rem; }
p { margin: 0 0 12px; }
code, pre { font-family: var(--mono); font-size: 0.875em; }
code { background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 6px; }
pre { background: #0b1512; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; }
pre code { background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgb(67 229 173 / 0.3); }

/* ── chrome ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap;
  padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  background: rgb(9 17 15 / 0.78);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { display: block; height: auto; }

.nav .search {
  flex: 1 1 220px; max-width: 420px; margin: 0 auto 0 8px;
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 38px;
  background: rgb(255 255 255 / 0.05); border: 1px solid rgb(255 255 255 / 0.08); border-radius: 999px; color: var(--muted);
  transition: border-color 0.15s, background 0.15s;
}
.search:focus-within { border-color: var(--accent); background: rgb(255 255 255 / 0.08); color: var(--text); }
.search input { all: unset; flex: 1; min-width: 0; font: 400 0.95rem/1 var(--font); color: var(--text); }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(0.7); }

.nav nav { display: flex; align-items: center; gap: clamp(12px, 2.2vw, 24px); font-size: 0.95rem; font-weight: 500; }
.nav nav a, .nav nav button { white-space: nowrap; }
.nav nav > a:not(.btn) { color: var(--muted); }
.nav nav > a:not(.btn):hover { color: var(--text); text-decoration: none; }
.nav form { margin: 0; }

main { flex: 1; width: 100%; max-width: 780px; margin: 0 auto; padding: 28px 20px 64px; }
main.wide { max-width: 1240px; }
main > section, main > article { margin-bottom: 52px; }
main > h1 { margin-bottom: 20px; }

.foot {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px 40px;
  padding: 40px max(20px, calc((100vw - 1200px) / 2)) 28px;
  border-top: 1px solid var(--border); background: rgb(0 0 0 / 0.35); color: var(--muted); font-size: 0.9rem;
}
.foot-brand p { margin: 10px 0 0; max-width: 34ch; }
.foot nav { display: grid; gap: 8px; align-content: start; }
.foot h2 { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); margin: 0 0 4px; }
.foot nav a { color: var(--muted); }
.foot nav a:hover { color: var(--text); text-decoration: none; }
.foot-legal { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid var(--border); font-size: 0.82rem; }

/* ── controls ───────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 700 0.95rem/1 var(--font); cursor: pointer;
  box-shadow: 0 6px 22px rgb(67 229 173 / 0.22);
  transition: transform 0.15s var(--ease), box-shadow 0.15s, filter 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 10px 30px rgb(67 229 173 / 0.34); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: rgb(255 255 255 / 0.05); color: var(--text); border-color: rgb(255 255 255 / 0.14); box-shadow: none; }
.btn.ghost:hover { background: rgb(255 255 255 / 0.1); filter: none; }
.btn.danger { background: var(--err-bg); color: var(--danger); border-color: rgb(248 113 113 / 0.4); box-shadow: none; }
.btn.danger:hover { filter: brightness(1.25); box-shadow: none; }
.btn.small { min-height: 34px; padding: 0 15px; font-size: 0.875rem; }
.btn.big { min-height: 54px; padding: 0 30px 0 24px; font-size: 1.1rem; }

.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.link:hover { color: var(--text); text-decoration: underline; }
.link.danger { color: var(--danger); }

label { display: block; font-size: 0.9rem; font-weight: 600; }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  background: #0b1512; color: var(--text); border: 1px solid var(--border); border-radius: 10px;
  font: 400 1rem/1.4 var(--font);
}
input[type='file'] { padding: 8px; }
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.stack { display: grid; gap: 16px; max-width: 620px; }
.checks { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks legend { padding: 0; margin-bottom: 8px; font-size: 0.9rem; font-weight: 600; }
.checks label { display: inline-flex; align-items: center; gap: 7px; font-weight: 400; cursor: pointer; }
.checks input { width: auto; margin: 0; accent-color: var(--accent); }
.checks.column { flex-direction: column; gap: 10px; }
.row-actions { display: inline-flex; gap: 14px; align-items: center; justify-content: flex-end; }
.stack .btn { justify-self: start; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; }
.inline input { flex: 1 1 220px; margin: 0; width: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.fine { color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.empty { color: var(--muted); padding: 28px 0; }
.center { text-align: center; padding: 72px 0; }
.center p { color: var(--muted); margin-bottom: 20px; }
.crumbs { color: var(--muted); font-size: 0.9rem; }
.eyebrow { margin: 0 0 10px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }

.notice { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; border: 1px solid var(--border); }
.notice.ok { background: var(--ok-bg); border-color: rgb(67 229 173 / 0.3); }
.notice.error { background: var(--err-bg); border-color: rgb(248 113 113 / 0.3); }
.notice pre { margin: 8px 0 0; user-select: all; }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.badge.live { background: var(--ok-bg); color: var(--accent); }
.storage { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 4px 0 0; }
.storage progress { width: 120px; height: 8px; accent-color: var(--accent); }
.storage.is-full { color: var(--danger); }
.badge.down { background: var(--err-bg); color: var(--danger); }
.notice p { margin: 0 0 8px; }
.notice p:last-child { margin-bottom: 0; }
a.quiet { color: var(--muted); }
a.quiet:hover { color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 14px; border-radius: 999px; background: rgb(255 255 255 / 0.04); border: 1px solid rgb(255 255 255 / 0.09); color: var(--muted); font-size: 0.875rem; text-transform: capitalize; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.chip:hover { color: var(--text); text-decoration: none; border-color: rgb(255 255 255 / 0.3); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }

.seg { display: inline-flex; padding: 3px; background: rgb(255 255 255 / 0.04); border: 1px solid rgb(255 255 255 / 0.09); border-radius: 999px; }
.seg a { padding: 5px 14px; border-radius: 999px; color: var(--muted); font-size: 0.875rem; }
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.on { background: var(--surface-3); color: var(--text); font-weight: 600; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h1, .section-head h2 { margin: 0; }
.section-head h2 { font-size: 1.45rem; font-weight: 800; }
.section-head > a { font-size: 0.9rem; font-weight: 600; }
#games .chips { margin-bottom: 22px; }

/* ── home: intro and spotlight ──────────────────────────────────────────── */

.intro { margin: 8px 0 22px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.intro h1 {
  font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.7rem); letter-spacing: -0.035em;
  background: linear-gradient(92deg, var(--text) 35%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.intro p { margin: 0; color: var(--muted); font-size: 1.02rem; }

.hero { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 22px; align-items: stretch; margin-bottom: 26px; }

.hero-stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000;
  border-radius: var(--radius-lg); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), var(--shadow), 0 30px 90px rgb(67 229 173 / 0.1);
}
.hero-slide { container-type: inline-size; position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0.6s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-slide .cover { transform: scale(1.02); }
.hero-slide.is-active .cover { animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(1.09) translate(-1%, -1%); } }
.hero-stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 -70px 80px -40px rgb(0 0 0 / 0.55); }

.hero-live {
  position: absolute; z-index: 3; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; background: rgb(0 0 0 / 0.62); backdrop-filter: blur(6px);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
}
.hero-live[hidden] { display: none; }
.hero-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* A live preview is the real game running, display only. */
.preview { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; background: #000; pointer-events: none; opacity: 0; transition: opacity 0.45s var(--ease); }
.preview.is-ready { opacity: 1; }

.hero-side { display: flex; flex-direction: column; min-width: 0; padding: 22px; border-radius: var(--radius-lg); background: linear-gradient(160deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.02)); border: 1px solid rgb(255 255 255 / 0.08); }
.hero-panel { display: none; flex: 1; flex-direction: column; min-width: 0; }
.hero-panel.is-active { display: flex; animation: rise 0.45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.hero-panel h2 { font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.2rem); font-weight: 850; letter-spacing: -0.035em; margin-bottom: 10px; }
.hero-desc { color: #b9c9c1; font-size: 0.98rem; margin-bottom: 20px; }
.hero-panel .btn { align-self: flex-start; margin-top: auto; }
.hero-stat { margin: 12px 0 0; color: var(--muted); font-size: 0.85rem; }

.hero-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-top: 20px; }
.hero-thumb { container-type: inline-size; position: relative; aspect-ratio: 16 / 9; border-radius: 9px; overflow: hidden; opacity: 0.5; outline: 1px solid rgb(255 255 255 / 0.1); transition: opacity 0.2s, transform 0.2s var(--ease), outline-color 0.2s; }
.hero-thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.hero-thumb.is-active { opacity: 1; outline: 2px solid var(--accent); }
.hero-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.is-rotating .hero-thumb.is-active .hero-bar { animation: fill 8s linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.perks { list-style: none; margin: 0 0 52px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.perks li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: rgb(255 255 255 / 0.03); border: 1px solid rgb(255 255 255 / 0.06); color: var(--muted); font-size: 0.86rem; line-height: 1.35; }
.perks svg { flex: none; color: var(--accent); }
.perks strong { display: block; color: var(--text); font-size: 0.94rem; }

/* ── cards ──────────────────────────────────────────────────────────────── */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 270px); gap: 18px; overflow-x: auto; padding: 6px 2px 14px; margin: -6px -2px 0; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.rail > * { scroll-snap-align: start; }

.card { display: block; color: var(--text); border-radius: var(--radius); background: var(--surface); outline: 1px solid rgb(255 255 255 / 0.07); overflow: hidden; transition: transform 0.22s var(--ease), box-shadow 0.22s, outline-color 0.22s; }
.card:hover, .card:focus-visible { text-decoration: none; transform: translateY(-5px); outline-color: transparent; box-shadow: var(--glow), var(--shadow); }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; container-type: inline-size; }
.card-media .cover { transition: transform 0.5s var(--ease), filter 0.3s; }
.card:hover .cover { transform: scale(1.07); }
.card-media::after { content: ''; position: absolute; inset: auto 0 0 0; height: 46%; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.5)); }
.card-badge { position: absolute; z-index: 3; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; background: rgb(0 0 0 / 0.6); backdrop-filter: blur(6px); color: #fff; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.card-badge.warn { background: rgb(9 17 15 / 0.82); color: #ffd28a; }
.card-badge.new { left: auto; right: 10px; bottom: auto; top: 10px; background: var(--accent); color: var(--on-accent); }
.card.is-unsuited .cover { filter: saturate(0.45) brightness(0.7); }
.card-play {
  position: absolute; z-index: 3; right: 12px; bottom: 12px; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px rgb(0 0 0 / 0.5);
  opacity: 0; transform: translateY(8px) scale(0.9); transition: opacity 0.2s, transform 0.22s var(--ease);
}
.card:hover .card-play, .card:focus-visible .card-play { opacity: 1; transform: none; }
.card-body { padding: 13px 15px 15px; }
.card-body h3 { font-size: 1.02rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body p { margin: 4px 0 0; color: var(--muted); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cover { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A generated cover for games that ship without art: the title, set like a poster. */
.cover.placeholder { position: relative; display: grid; place-items: center; padding: 8cqw; overflow: hidden; text-align: center; }
.cover.placeholder::before { content: ''; position: absolute; inset: -40%; background: repeating-linear-gradient(115deg, rgb(255 255 255 / 0.07) 0 2px, transparent 2px 22px); transform: rotate(-4deg); }
.cover.placeholder::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 90% at 80% 110%, rgb(0 0 0 / 0.5), transparent 70%), radial-gradient(50% 60% at 15% 0%, rgb(255 255 255 / 0.22), transparent 70%); }
.cover.placeholder span {
  position: relative; z-index: 1; max-width: 100%; overflow-wrap: anywhere; text-wrap: balance;
  font-size: clamp(0.5rem, 10cqw, 4.2rem); font-weight: 900; line-height: 0.98; letter-spacing: -0.035em; text-transform: uppercase;
  color: #fff; text-shadow: 0 0.06em 0 rgb(0 0 0 / 0.25), 0 0.3em 0.9em rgb(0 0 0 / 0.4);
}
.tint-0 { background: radial-gradient(120% 120% at 20% 10%, #14b8a6, #134e4a 70%); }
.tint-1 { background: radial-gradient(120% 120% at 20% 10%, #6366f1, #312e81 70%); }
.tint-2 { background: radial-gradient(120% 120% at 20% 10%, #ec4899, #701a75 70%); }
.tint-3 { background: radial-gradient(120% 120% at 20% 10%, #f59e0b, #7c2d12 70%); }
.tint-4 { background: radial-gradient(120% 120% at 20% 10%, #0ea5e9, #1e3a8a 70%); }
.tint-5 { background: radial-gradient(120% 120% at 20% 10%, #84cc16, #14532d 70%); }

.tag-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 190px), 1fr)); gap: 14px; }
.tag-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 104px; padding: 16px; border-radius: var(--radius); color: #fff; overflow: hidden; transition: transform 0.22s var(--ease), box-shadow 0.22s, filter 0.2s; }
.tag-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgb(0 0 0 / 0.45)); }
.tag-tile > * { position: relative; z-index: 1; }
.tag-tile strong { font-size: 1.15rem; font-weight: 800; text-transform: capitalize; letter-spacing: -0.02em; }
.tag-tile span { font-size: 0.8rem; opacity: 0.85; }
.tag-tile:hover { text-decoration: none; transform: translateY(-4px); filter: brightness(1.12); box-shadow: var(--shadow); }

/* ── home: developer band ───────────────────────────────────────────────── */

.dev-band {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 36px; align-items: center;
  padding: clamp(24px, 4vw, 44px); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgb(67 229 173 / 0.16), rgb(67 229 173 / 0.03) 70%), var(--surface);
  border: 1px solid rgb(255 255 255 / 0.09);
}
.dev-band h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); font-weight: 850; letter-spacing: -0.035em; text-wrap: balance; }
.dev-band p { color: #b9c9c1; max-width: 54ch; }
.dev-band .actions { margin-top: 20px; }
.terminal { border-radius: 14px; background: #060c0a; border: 1px solid rgb(255 255 255 / 0.1); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.terminal-bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid rgb(255 255 255 / 0.07); }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #25382f; }
.terminal pre { margin: 0; border: 0; border-radius: 0; background: none; padding: 18px; font-size: 0.86rem; line-height: 1.75; color: #9db3aa; }
.terminal b { color: var(--accent); font-weight: 400; }
.terminal em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ── game page ──────────────────────────────────────────────────────────── */

.player {
  position: relative; width: 100%; margin: 0 auto; overflow: hidden;
  background: #000; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), var(--shadow);
  /* Never taller than the viewport, whatever the game's shape. */
  max-height: calc(100dvh - 170px); max-width: calc((100dvh - 170px) * var(--ratio));
  aspect-ratio: var(--ratio);
}
.aspect-16-9 { --ratio: 16 / 9; }
.aspect-4-3 { --ratio: 4 / 3; }
.aspect-1-1 { --ratio: 1; }
.aspect-3-4 { --ratio: 3 / 4; }
.aspect-9-16 { --ratio: 9 / 16; }
@media (max-width: 640px) {
  /* Phones are tall: give wide games more room than a letterbox strip. */
  .aspect-16-9, .aspect-4-3 { --ratio: 4 / 5; }
}

/* Shown whole, never cropped: the player's shape is the game's, which may not be the cover's. */
.player .cover { position: absolute; inset: 0; object-fit: contain; filter: brightness(0.5) saturate(1.15); }
/* A generated poster would put its title right behind the Play button. */
.player .cover.placeholder span { opacity: 0.18; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player.is-playing .cover, .player.is-playing .play { display: none; }

.device-note {
  position: absolute; z-index: 2; left: 50%; bottom: 7%; transform: translateX(-50%); margin: 0; width: max-content; max-width: 88%;
  padding: 9px 14px; border-radius: 10px; background: rgb(9 17 15 / 0.86); border: 1px solid rgb(255 210 138 / 0.4); color: #ffd28a;
  font-size: 0.88rem; text-align: center; backdrop-filter: blur(6px);
}
.device-note[hidden] { display: none; }
.notice.challenge { background: rgb(67 229 173 / 0.08); border-color: rgb(67 229 173 / 0.35); }
.preview-banner { background: rgb(255 210 138 / 0.08); border-color: rgb(255 210 138 / 0.35); color: #ffe2b0; }

.play {
  position: absolute; inset: 0; margin: auto; width: fit-content; height: fit-content;
  display: flex; align-items: center; gap: 10px; padding: 18px 34px 18px 26px;
  border: 0; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font: 800 1.25rem/1 var(--font); cursor: pointer; box-shadow: 0 10px 50px rgb(67 229 173 / 0.45);
  transition: transform 0.18s var(--ease), filter 0.15s;
}
.play:hover { transform: scale(1.06); filter: brightness(1.08); }

.player.is-expanded { position: fixed; inset: 0; z-index: 50; max-width: none; max-height: none; width: 100vw; height: 100dvh; aspect-ratio: auto; border-radius: 0; }
body.embed { margin: 0; height: 100dvh; display: flex; flex-direction: column; background: #000; }
body.embed .player { flex: 1; width: 100%; max-width: none; max-height: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.embed-bar { margin: 0; padding: 6px 12px; font-size: 0.8rem; text-align: right; background: var(--bg); }
.embed-bar a { color: var(--muted); }
.player:fullscreen { max-width: none; max-height: none; width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.exit { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 10px; z-index: 2; padding: 8px 14px; border: 0; border-radius: 999px; background: rgb(0 0 0 / 0.7); color: #fff; font: 600 0.85rem var(--font); cursor: pointer; }

main > .game-bar { margin-bottom: 28px; }
.game-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 20px 0 8px; }
.by { color: var(--muted); margin: 6px 0 0; font-size: 0.95rem; }
.game-info { max-width: 720px; display: grid; gap: 14px; margin-top: 14px; }
.desc { white-space: pre-line; margin: 0; color: #c8d6cf; }
.toast { display: inline-block; padding: 8px 14px; border-radius: 10px; background: var(--ok-bg); border: 1px solid rgb(67 229 173 / 0.3); font-size: 0.9rem; word-break: break-all; }
.toast[hidden] { display: none; }
.btn[hidden] { display: none; }
.board { max-width: 720px; margin-top: 18px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.board h2 { margin: 0 0 8px; font-size: 1.05rem; }
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 6px 28px; }
.boards h3 { margin: 4px 0 2px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.board-list { margin: 0 0 10px; padding-left: 2.1em; }
.board-list li { padding: 5px 0; border-bottom: 1px solid var(--border); }
.board-list li:last-child { border-bottom: 0; }
.board-list li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.board-list li:first-child .who { color: var(--accent); }
.board-row { display: flex; align-items: baseline; gap: 12px; }
.board-row .who { flex: 1; min-width: 0; font-weight: 600; }
.board-row .num { font-variant-numeric: tabular-nums; }
.board-row form { margin: 0; font-size: 0.85rem; }
.board .fine { margin: 6px 0 0; }
.board .fine .link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ── forms & dashboard ──────────────────────────────────────────────────── */

.form-card { max-width: 410px; margin: 36px auto; padding: 30px; background: linear-gradient(160deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.02)); border: 1px solid rgb(255 255 255 / 0.09); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.form-card h1 { font-size: 1.45rem; margin-bottom: 20px; }
.form-card.wide-card { max-width: 560px; }
.form-card form { display: grid; gap: 16px; margin-bottom: 18px; }
.form-card .btn { width: 100%; }

.panel { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel > summary { cursor: pointer; }
.panel > summary h3 { display: inline; }
.disclosure { margin-top: 16px; }
.disclosure summary { cursor: pointer; font-weight: 600; margin-bottom: 14px; color: var(--accent); }

.table { width: 100%; border-collapse: collapse; font-size: 0.925rem; margin: 8px 0 12px; }
/* A table with more columns than a phone is wide scrolls inside its panel, not the page with it. */
.table-scroll { overflow-x: auto; }
.table-scroll .table { min-width: 520px; }
.table th { text-align: left; color: var(--muted); font-weight: 500; font-size: 0.8rem; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; padding-left: 10px; }
.table form { margin: 0; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; margin-bottom: 14px; }
.tile { padding: 16px 16px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.tile-label { color: var(--muted); font-size: 0.85rem; margin: 0; }
.tile-value { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin: 2px 0 0; font-variant-numeric: tabular-nums; }
.tiles.small .tile-value { font-size: 1.35rem; }
.tile .fine { margin: 0; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; align-items: start; }
h2 .fine { margin-left: 8px; letter-spacing: 0; }

.chart { display: block; width: 100%; height: 64px; margin-top: 12px; overflow: visible; }
.chart .axis { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .bar { fill: var(--accent-strong); }
.chart .hit { fill: transparent; }
.chart .day:hover .hit { fill: var(--surface-2); }
.chart .day:hover .bar { fill: var(--accent); }

/* ── docs ───────────────────────────────────────────────────────────────── */

.prose h1 { margin-bottom: 14px; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.5rem); letter-spacing: -0.035em; }
.prose h2 { margin: 36px 0 10px; }
.prose > p:first-of-type { font-size: 1.1rem; color: var(--muted); }
.prose.legal { max-width: 720px; }
.prose.legal li { margin-bottom: 8px; }

/* ── staff ──────────────────────────────────────────────────────────────── */

.report-group { padding: 16px 0; border-top: 1px solid var(--border); }
.report-group:first-of-type { border-top: 0; }
.report-group h3 { margin: 0 0 4px; }
.report-text { white-space: pre-line; overflow-wrap: anywhere; color: #c8d6cf; }

/* ── smaller screens ────────────────────────────────────────────────────── */

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 14px; }
  .hero-side { padding: 18px; }
  .hero-panel .btn { margin-top: 4px; }
  .perks { grid-template-columns: repeat(2, 1fr); margin-bottom: 40px; }
  .dev-band { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  main { padding: 18px 16px 48px; }
  main > section, main > article { margin-bottom: 40px; }
  .nav { padding-left: 16px; padding-right: 16px; }
  .nav .brand img { width: 126px; }
  /* The search field takes its own row; Games and Developers stay reachable from the page and footer. */
  .search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
  .nav nav { margin-left: auto; }
  .nav nav > a:nth-child(-n + 2) { display: none; }
  .intro p { font-size: 0.95rem; }
  .hero-stage { border-radius: var(--radius); }
  .hero-side { border-radius: var(--radius); }
  .hero-panel .btn { align-self: stretch; }
  .perks { gap: 8px; }
  .perks li { padding: 11px 12px; gap: 10px; font-size: 0.8rem; }
  .perks strong { font-size: 0.86rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 10px 11px 12px; }
  .card-body h3 { font-size: 0.92rem; }
  .card-body p { font-size: 0.78rem; }
  .card-badge { font-size: 0.6rem; left: 7px; bottom: 7px; }
  .section-head h2 { font-size: 1.25rem; }
  .row { grid-template-columns: 1fr; }
  .table { font-size: 0.85rem; }
  .foot { grid-template-columns: 1fr 1fr; padding: 32px 16px 24px; }
  .foot-brand { grid-column: 1 / -1; }
}

/* Touch screens have no hover: keep the play button visible instead. */
@media (hover: none) {
  .card-play { opacity: 1; transform: none; width: 34px; height: 34px; right: 8px; bottom: 8px; }
  .card-play svg { width: 16px; height: 16px; }
}

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