/* QuinAI Play — landing of quinailab.online, in the style of the quinailab.com home (G-35). Self-hosted only:
   the page is cross-origin isolated (COOP/COEP) so the games it embeds keep SharedArrayBuffer. */

@font-face { font-family: "Antonio Variable"; font-style: normal; font-display: swap; font-weight: 100 700; src: url(fonts/antonio-latin-wght-normal.woff2) format("woff2-variations"); }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/poppins-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/poppins-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/poppins-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/poppins-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/poppins-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Orbitron"; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/orbitron-latin-700-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --background: #000000;
  --foreground: #fafafa;
  --card: #101012;
  --panel: #070708;
  --primary: #e10600;
  --primary-foreground: #ffffff;
  --primary-text: #ff4a3d;
  --primary-tint: rgba(225, 6, 0, 0.15);
  --muted-foreground: #8a8a8a;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.22);
  --glow: rgba(225, 6, 0, 0.42);
  --text-glow: rgba(225, 6, 0, 0.42);
  --scrim: rgba(0, 0, 0, 0.82);
  --font-sans: "Poppins", ui-sans-serif, system-ui, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --font-display: "Antonio Variable", "Antonio", "Arial Narrow", ui-sans-serif, sans-serif;
  --font-brand: "Orbitron", "Poppins", ui-sans-serif, sans-serif;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
/* Light theme: the system's choice until the visitor picks one with the header button (data-theme on <html>). */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --background: #e4e4e8;
    --foreground: #141416;
    --card: #f3f3f6;
    --panel: #f2f2f5;
    --primary-text: #b80500;
    --primary-tint: rgba(225, 6, 0, 0.1);
    --muted-foreground: #5c5c64;
    --border: rgba(0, 0, 0, 0.14);
    --border-strong: rgba(0, 0, 0, 0.26);
    --glow: rgba(225, 6, 0, 0.22);
  --text-glow: rgba(225, 6, 0, 0.1);
    --text-glow: rgba(225, 6, 0, 0.1);
    --scrim: rgba(10, 10, 12, 0.72);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --background: #e4e4e8;
  --foreground: #141416;
  --card: #f3f3f6;
  --panel: #f2f2f5;
  --primary-text: #b80500;
  --primary-tint: rgba(225, 6, 0, 0.1);
  --muted-foreground: #5c5c64;
  --border: rgba(0, 0, 0, 0.14);
  --border-strong: rgba(0, 0, 0, 0.26);
  --glow: rgba(225, 6, 0, 0.22);
  --scrim: rgba(10, 10, 12, 0.72);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--background); color: var(--foreground); font: 400 16px/1.6 var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary-text); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--primary); color: #fff; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }

/* Header */
.bar { position: fixed; inset: 0 0 auto; z-index: 30; transition: background-color 300ms var(--ease), border-color 300ms var(--ease); border-bottom: 1px solid transparent; }
.bar[data-scrolled] { background: color-mix(in srgb, var(--background) 82%, transparent); backdrop-filter: blur(12px); border-bottom-color: var(--border); }
.bar-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; font: 700 15px/1 var(--font-brand); letter-spacing: 0.08em; }
.brand b { color: var(--primary-text); font-weight: 700; }
.nav { display: none; gap: 28px; margin-left: 24px; font-size: 14px; color: var(--muted-foreground); }
.nav a { transition: color 200ms var(--ease); }
.nav a:hover { color: var(--foreground); }
@media (min-width: 860px) { .nav { display: flex; } }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.lang { position: relative; }
.lang select { appearance: none; height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: var(--foreground); font: 500 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.lang::after { content: ""; position: absolute; right: 12px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid var(--muted-foreground); border-bottom: 1.5px solid var(--muted-foreground); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.lang select option { color: #141416; }
.theme { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--foreground); cursor: pointer;
  transition: border-color 200ms var(--ease), transform 160ms var(--ease); }
.theme:hover { border-color: var(--foreground); }
.theme:active { transform: scale(0.94); }
.theme svg { width: 17px; height: 17px; }
.theme .i-sun { display: none; }
:root[data-theme="dark"] .theme .i-sun, :root:not([data-theme="light"]) .theme .i-sun { display: block; }
:root[data-theme="dark"] .theme .i-moon, :root:not([data-theme="light"]) .theme .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme .i-sun { display: none; }
  :root:not([data-theme]) .theme .i-moon { display: block; }
}
@media (prefers-reduced-motion: no-preference) { .theme svg { transition: transform 400ms var(--ease); } .theme:hover svg { transform: rotate(25deg); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; background: transparent; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 0 0 0 var(--glow); }
.btn-primary:hover { box-shadow: 0 0 28px 0 var(--glow); }
.btn-ghost { border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--foreground); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.arrow { transition: transform 200ms var(--ease); }
.btn:hover .arrow, .more:hover .arrow { transform: translateX(4px); }

/* Type */
.eyebrow { font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary-text); }
.h1 { margin: 18px 0 0; font: 700 clamp(3.2rem, 8.4vw, 6.4rem)/0.92 var(--font-display); letter-spacing: -0.005em; text-transform: uppercase; text-wrap: balance; }
.h1 span { display: block; }
.h1 em, .h2 em { font-style: normal; color: var(--primary-text); text-shadow: 0 0 34px var(--text-glow); }
.h2 { margin: 14px 0 0; font: 600 clamp(2.2rem, 4.6vw, 3.6rem)/0.98 var(--font-display); text-transform: uppercase; text-wrap: balance; }
.h3 { margin: 0; font: 600 clamp(1.3rem, 2vw, 1.6rem)/1.05 var(--font-display); text-transform: uppercase; letter-spacing: 0.01em; text-wrap: balance; }
.sub { margin: 26px 0 0; max-width: 46ch; font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--muted-foreground); text-wrap: pretty; }
.lede { margin: 18px 0 0; max-width: 52ch; color: var(--muted-foreground); text-wrap: pretty; }
:lang(zh) :is(.h1, .h2, .h3, .eyebrow) { font-family: var(--font-sans); text-transform: none; letter-spacing: 0.02em; line-height: 1.2; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; display: grid; align-items: center; min-height: min(100svh, 940px); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; opacity: 0.5;
  background: radial-gradient(60% 50% at 75% 45%, var(--primary-tint), transparent 70%), linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 48px 48px, linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 48px 48px;
  mask-image: radial-gradient(120% 90% at 50% 40%, #000 55%, transparent 100%); }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; padding-block: 112px 72px; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-block: 128px 80px; } }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 34px 0 0; padding: 0; list-style: none; font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 6px; height: 6px; background: var(--primary-text); box-shadow: 0 0 10px var(--glow); }

/* The arcade screen: a small procedural pixel game drawn on a canvas */
.screen { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; padding: 14px; background: linear-gradient(160deg, #1b1b1f, #0b0b0d); border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 0 60px -20px var(--glow); }
.screen-glass { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 10px; background: #050506; }
.screen canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.screen-glass::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px), radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.55)); }
.screen-hud { position: absolute; left: 26px; right: 26px; top: 24px; display: flex; justify-content: space-between; font: 500 11px/1 var(--font-mono); letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.72); pointer-events: none; text-transform: uppercase; }
.screen-hud b { color: #ff4a3d; font-weight: 500; }
.screen-led { position: absolute; right: 22px; bottom: -26px; display: flex; align-items: center; gap: 8px; font: 500 11px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-foreground); }
.screen-led i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); }
@media (prefers-reduced-motion: no-preference) { .screen-led i { animation: blink 2.4s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0.25; } }
.scan { position: absolute; left: -6%; right: -6%; top: 64%; height: 2px; pointer-events: none; z-index: -1;
  background: linear-gradient(90deg, transparent, var(--primary) 22%, var(--primary-text) 50%, var(--primary) 78%, transparent); box-shadow: 0 0 18px 2px rgba(225, 6, 0, 0.55); }

/* Sections */
.band { border-top: 1px solid var(--border); padding-block: clamp(80px, 11vw, 150px); }
.band-panel { background: var(--panel); }
.head { display: grid; gap: 18px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
@media (min-width: 860px) { .head { grid-template-columns: minmax(0, 1fr) auto; } }

/* Gallery */
.games { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .games { gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
@media (max-width: 639px) { .game-meta { padding: 12px 12px 14px; } .game-title { font-size: 1.05rem; } .game-info { font-size: 10px; letter-spacing: 0.06em; } .game-new { left: 8px; top: 8px; } }
.game { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); text-align: left; padding: 0; cursor: pointer;
  transition: border-color 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease); }
.game:hover { border-color: var(--primary); box-shadow: 0 18px 50px -24px var(--glow); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .game:hover { transform: translateY(-4px); } }
.game:active { transform: scale(0.985); }
.game-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0c; }
.game-cover img, .game-cover canvas { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; transition: transform 600ms var(--ease); }
.game-cover canvas { image-rendering: pixelated; }
@media (prefers-reduced-motion: no-preference) { .game:hover .game-cover img, .game:hover .game-cover canvas { transform: scale(1.05); } }
.game-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55)); pointer-events: none; }
.game-play { position: absolute; left: 50%; top: 50%; z-index: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; opacity: 0; transform: translate(-50%, -50%) scale(0.8);
  box-shadow: 0 0 30px var(--glow); transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.game-play svg { width: 22px; height: 22px; margin-left: 3px; }
.game:hover .game-play, .game:focus-visible .game-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.game-meta { display: grid; gap: 6px; padding: 16px 18px 18px; }
.game-title { font: 600 1.3rem/1.05 var(--font-display); text-transform: uppercase; letter-spacing: 0.01em; overflow-wrap: anywhere; }
:lang(zh) .game-title { font-family: var(--font-sans); text-transform: none; font-size: 1.05rem; }
.game-info { display: flex; gap: 10px; font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.game-new { position: absolute; left: 12px; top: 12px; z-index: 1; padding: 4px 9px; border-radius: 999px; background: var(--primary); color: #fff; font: 500 10px/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }

.skel { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--card); }
.skel i { display: block; aspect-ratio: 16 / 10; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%) 0 0 / 300% 100%, #0c0c0e; }
.skel b { display: block; height: 14px; margin: 18px; width: 60%; border-radius: 4px; background: var(--border); }
@media (prefers-reduced-motion: no-preference) { .skel i { animation: shimmer 1.6s linear infinite; } }
@keyframes shimmer { from { background-position: 100% 0, 0 0; } to { background-position: -50% 0, 0 0; } }

.empty { grid-column: 1 / -1; display: grid; gap: 18px; justify-items: start; padding: clamp(28px, 5vw, 48px); border: 1px dashed var(--border-strong); border-radius: 14px;
  background: radial-gradient(60% 80% at 100% 0%, var(--primary-tint), transparent 70%); }
.empty p { margin: 0; max-width: 52ch; color: var(--muted-foreground); }
.gallery-foot { display: flex; justify-content: center; margin-top: 36px; }

/* Steps: a horizontal track on wide screens */
.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.step { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; padding-block: 28px; border-bottom: 1px solid var(--border); }
.step-num { grid-row: span 2; font: 500 13px/1.6 var(--font-mono); color: var(--primary-text); }
.step p { margin: 0; color: var(--muted-foreground); max-width: 46ch; }
@media (min-width: 960px) {
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 0; }
  .step { grid-template-columns: 1fr; align-content: start; gap: 16px; padding: 32px 28px 8px 0; border-bottom: 0; border-top: 1px solid var(--border); position: relative; }
  .step-num { grid-row: auto; }
  .step::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--fill, 0)); background: linear-gradient(90deg, var(--primary), var(--primary-text)); box-shadow: 0 0 10px var(--glow); transition: transform 900ms var(--ease); transition-delay: calc(var(--reveal-i, 0) * 140ms); }
  .step[data-shown]::before { --fill: 1; }
}

/* Engines */
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.tag { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; font: 500 12px/1.4 var(--font-mono); color: var(--muted-foreground); transition: border-color 200ms var(--ease), color 200ms var(--ease); }
.tag:hover { border-color: var(--primary); color: var(--foreground); }
.split { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.spec { display: grid; margin: 0; border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--card) 80%, transparent); }
.spec > div { display: grid; gap: 4px; padding: 18px 22px; border-top: 1px solid var(--border); }
.spec > div:first-child { border-top: 0; }
.spec dt { font: 500 11px/1.4 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-foreground); }
.spec dd { margin: 0; font-size: 15px; }

/* Final CTA */
.final { position: relative; overflow: hidden; isolation: isolate; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 70% at 15% 60%, var(--primary-tint), transparent 70%); }
/* The row of game screens fills the right side; the text stays on the dark left half. */
.final-img { position: absolute; top: 0; bottom: 0; right: 0; left: 30%; z-index: -2; width: 70%; height: 100%; object-fit: cover; object-position: 75% 50%; opacity: 0.8;
  mask-image: linear-gradient(90deg, transparent 0%, transparent 25%, rgba(0, 0, 0, 0.6) 50%, #000 75%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 25%, rgba(0, 0, 0, 0.6) 50%, #000 75%); }
:root[data-theme="light"] .final-img { opacity: 0.25; }
@media (prefers-color-scheme: light) { :root:not([data-theme]) .final-img { opacity: 0.25; } }
@media (max-width: 759px) { .final-img { left: 0; width: 100%; opacity: 0.35; object-position: 85% 50%; } }
.final .hero-cta { margin-top: 30px; }

/* Footer */
.foot { border-top: 1px solid var(--border); padding-block: 36px 48px; font-size: 14px; color: var(--muted-foreground); }
.foot-in { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot a:hover { color: var(--foreground); }
.foot p { margin: 0; }

/* Player */
.player { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto 1fr; background: var(--scrim); backdrop-filter: blur(8px); padding: clamp(0px, 2vw, 24px); }
.player[hidden] { display: none; }
.player-bar { display: flex; align-items: center; gap: 10px; padding: 10px clamp(12px, 2vw, 4px) 12px; color: #fafafa; }
.player-title { flex: 1; min-width: 0; font: 600 1.25rem/1.1 var(--font-display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:lang(zh) .player-title { font-family: var(--font-sans); text-transform: none; }
.player .btn-ghost { border-color: rgba(255, 255, 255, 0.28); color: #fafafa; }
.player .btn-ghost:hover { border-color: #fff; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.28); background: transparent; color: #fafafa; cursor: pointer; transition: border-color 200ms var(--ease), transform 160ms var(--ease); }
.icon-btn:hover { border-color: #fff; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; }
.player-frame { position: relative; min-height: 0; border-radius: clamp(0px, 1vw, 12px); overflow: hidden; background: #000; border: 1px solid rgba(255, 255, 255, 0.12); }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player-hide-sm { display: none; }
@media (min-width: 640px) { .player-hide-sm { display: inline-flex; } }
@media (prefers-reduced-motion: no-preference) {
  .player:not([hidden]) { animation: fade 200ms var(--ease) both; }
  .player:not([hidden]) .player-frame { animation: pop 320ms var(--ease) both; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; padding: 10px 16px; border-radius: 999px; background: var(--foreground); color: var(--background); font-size: 14px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease); }
.toast[data-show] { opacity: 1; transform: translate(-50%, 0); }

/* Entrances */
@media (prefers-reduced-motion: no-preference) {
  .h1 > span { animation: rise 0.7s var(--ease) both; }
  .h1 > span:nth-child(2) { animation-delay: 80ms; }
  .hero .sub { animation: rise 0.7s 0.18s var(--ease) both; }
  .hero-cta, .hero-facts { animation: rise 0.7s 0.26s var(--ease) both; }
  .screen { animation: screen-in 1s 0.2s var(--ease) both; }
  [data-reveal-ready] [data-reveal]:not([data-shown]) { opacity: 0; transform: translateY(18px); }
  [data-reveal-ready] [data-reveal] { transition: opacity 650ms var(--ease), transform 650ms var(--ease); transition-delay: calc(var(--reveal-i, 0) * 70ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes screen-in { from { opacity: 0; transform: perspective(1200px) rotateX(8deg) translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }

/* Inner pages (/abuse): a shorter hero, a checklist and three steps a row. */
.hero-page { min-height: 0; padding-block: 140px 72px; }
.hero-page .h1 { font-size: clamp(3rem, 7vw, 5.4rem); }
.split-top { align-items: start; }
.checks { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.checks li { position: relative; padding: 20px 0 20px 34px; border-bottom: 1px solid var(--border); font-size: 1.05rem; text-wrap: pretty; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 29px; width: 8px; height: 8px; background: var(--primary-text); box-shadow: 0 0 10px var(--glow); }
@media (min-width: 960px) { .steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step p a, .lede a { color: var(--primary-text); }
/* Phones: brand, language and theme fill the bar; "Make a game" is already in the page. */
@media (max-width: 479px) { .bar-end > .btn-primary { display: none; } }
/* 404: the arcade can be played. */
.screen-wrap { display: grid; gap: 14px; }
canvas[data-playable] { touch-action: none; cursor: crosshair; }
.screen-hint { margin: 0; text-align: center; font: 500 12px/1.5 var(--font-mono); letter-spacing: 0.06em; color: var(--muted-foreground); }
.screen-hint::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); vertical-align: 1px; }
