/* arcadix styles. colours and fonts live in :root, change them there to re-skin */

/* variables */
@font-face { font-family: 'Sora'; src: url('../fonts/sora-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #111115;
  --bg-2: #16161c;
  --surface: #1c1c24;
  --surface-2: #262632;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f3f2f8;
  --muted: #a3a2b6;
  --violet: #8b5cf6;
  --violet-deep: #6d28d9;
  --lavender: #c4b5fd;
  --orange: #f97316;
  --orange-soft: #fb923c;
  --ink: #1a0d02;
  --danger: #f87171;
  --good: #a3e635;

  --grad-brand: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #f97316 100%);
  --grad-action: linear-gradient(135deg, #f97316, #fb923c);
  --grad-panel: linear-gradient(145deg, #2a1757 0%, #1c1c24 60%);

  --font-display: 'Sora', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-pill: 999px;
  --shadow-card: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 12px 30px -14px rgba(0, 0, 0, .7);
  --glow-violet: 0 0 0 1px rgba(139, 92, 246, .5), 0 14px 40px -12px rgba(139, 92, 246, .55);
  --header-h: 68px;
  --wrap: 1200px;
}

/* base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 var(--font-body); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(900px 500px at 85% -120px, rgba(124, 58, 237, .22), transparent 70%), radial-gradient(700px 420px at -10% 8%, rgba(249, 115, 22, .08), transparent 70%);
  background-repeat: no-repeat;
}
body.no-scroll, body.nav-open { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.05rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--orange-soft); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--violet); color: #fff; }
kbd {
  display: inline-block; min-width: 1.8em; padding: .12em .55em; border-radius: 7px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-bottom-width: 3px;
  font: 600 .8rem/1.5 var(--font-body); color: var(--text); white-space: nowrap;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--orange); color: var(--ink); padding: .6rem 1rem; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 12px; }

/* layout */
.container { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.section { padding: clamp(40px, 6vw, 84px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: .35em 0 0; color: var(--muted); max-width: 52ch; }
.link-more { color: var(--lavender); font-weight: 600; font-size: .95rem; padding: .4rem 0; border-bottom: 1px solid transparent; transition: border-color .2s, color .2s; }
.link-more:hover { color: #fff; border-color: var(--orange-soft); }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.page-head { padding: clamp(32px, 5vw, 64px) 0 10px; }
.page-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: .3em; }
.page-head p { color: var(--muted); max-width: 60ch; font-size: 1.05rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); padding-top: 26px; }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: '/'; margin-right: 8px; opacity: .5; }

/* buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em; padding: .8em 1.4em; min-height: 46px;
  border-radius: var(--r-pill); border: 1px solid transparent; font-weight: 600; font-size: .98rem; line-height: 1.1;
  transition: transform .18s, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad-action); color: var(--ink); box-shadow: 0 10px 28px -10px rgba(249, 115, 22, .7); }
.btn-primary:hover { box-shadow: 0 14px 34px -8px rgba(249, 115, 22, .85); transform: translateY(-1px); }
.btn-violet { background: var(--violet-deep); color: #fff; box-shadow: 0 10px 28px -12px rgba(124, 58, 237, .9); }
.btn-violet:hover { background: #7c3aed; }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .3); }
.btn-ghost.is-on { border-color: #f472b6; color: #f9a8d4; }
.btn-ghost.is-on svg { fill: #f472b6; }
.btn-sm { padding: .55em 1em; min-height: 38px; font-size: .88rem; }
.input {
  width: 100%; min-height: 48px; padding: .7em 1em; border-radius: var(--r-md); background: var(--surface);
  border: 1px solid var(--line-strong); color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: #7d7c91; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .25); }
.input[aria-invalid=true] { border-color: var(--danger); }
select.input { appearance: none; padding-right: 2.4em; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23a3a2b6' stroke-width='2'%3E%3Cpath d='m1 1 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1em center; }
.pill { display: inline-block; padding: .25em .75em; border-radius: var(--r-pill); background: rgba(12, 8, 24, .72); backdrop-filter: blur(6px); border: 1px solid var(--line-strong); font-size: .78rem; font-weight: 600; }
.chip {
  display: inline-flex; align-items: center; gap: .5em; padding: .5em 1em; border-radius: var(--r-pill); min-height: 42px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .92rem; color: var(--muted); transition: all .2s;
}
.chip span { font-size: .78rem; background: rgba(255, 255, 255, .08); border-radius: var(--r-pill); padding: .05em .55em; }
.chip:hover { color: #fff; border-color: var(--line-strong); }
.chip.is-active { background: var(--violet-deep); border-color: var(--violet); color: #fff; }
.seg { padding: .6em 1.1em; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--line-strong); font-weight: 600; font-size: .9rem; color: var(--muted); }
.seg.is-active { background: var(--violet-deep); border-color: var(--violet); color: #fff; }

/* header / footer */
.site-header { position: sticky; top: 0; z-index: 60; height: var(--header-h); display: flex; align-items: center; background: rgba(17, 17, 21, .6); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: background .25s, border-color .25s; }
.site-header.is-scrolled { background: rgba(17, 17, 21, .9); border-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: .6em; font: 800 1.25rem/1 var(--font-display); letter-spacing: .04em; }
.brand svg { width: 34px; height: 34px; }
.nav-menu { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav-menu > a { position: relative; padding: .6em .95em; border-radius: var(--r-pill); color: var(--muted); font-weight: 600; font-size: .95rem; transition: color .2s, background .2s; display: inline-flex; gap: .5em; align-items: center; }
.nav-menu > a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-menu > a[aria-current=page] { color: #fff; background: rgba(139, 92, 246, .22); }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #f472b6; color: #2a0a1a; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.search { position: relative; margin-left: auto; width: min(260px, 100%); }
.search input { width: 100%; min-height: 42px; padding: .5em 1em .5em 2.6em; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.search input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 92, 246, .25); }
.search svg { position: absolute; left: 1em; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); stroke: var(--muted); fill: none; stroke-width: 2; pointer-events: none; }
.nav-toggle { display: none; width: 46px; height: 46px; margin-left: auto; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); position: relative; }
.nav-toggle span { position: absolute; left: 13px; right: 13px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, top .25s; }
.nav-toggle span:first-child { top: 18px; } .nav-toggle span:last-child { top: 26px; }
.nav-toggle[aria-expanded=true] span:first-child { top: 22px; transform: rotate(45deg); }
.nav-toggle[aria-expanded=true] span:last-child { top: 22px; transform: rotate(-45deg); }

.site-footer { margin-top: 40px; border-top: 1px solid var(--line); background: var(--bg-2); padding: 56px 0 28px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid h4 { font-size: .95rem; margin-bottom: 1em; color: #fff; }
.foot-grid li { margin-bottom: .55em; }
.foot-grid a { color: var(--muted); transition: color .2s; }
.foot-grid a:hover { color: #fff; }
.foot-brand p { color: var(--muted); max-width: 36ch; margin-top: 1em; font-size: .95rem; }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: .88rem; }

/* cards */
.card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); transition: transform .25s, border-color .25s, box-shadow .25s; }
.card:hover, .card:focus-within { transform: translateY(-4px); border-color: rgba(139, 92, 246, .55); box-shadow: var(--glow-violet); }
.card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #14101f; }
.card-media .thumb { width: 100%; height: 100%; transition: transform .5s; }
.card:hover .thumb { transform: scale(1.05); }
.card-media .pill { position: absolute; left: 12px; bottom: 12px; }
.fav { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(12, 8, 24, .7); backdrop-filter: blur(6px); border: 1px solid var(--line-strong); transition: transform .2s, background .2s; }
.fav svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2; transition: fill .2s, stroke .2s, transform .25s; }
.fav:hover { background: rgba(12, 8, 24, .95); }
.fav.is-on svg { fill: #f472b6; stroke: #f472b6; transform: scale(1.1); }
.card-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 18px; }
.card-text { min-width: 0; }
.card-body h3 { margin: 0 0 .2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-body h3 a::after { content: none; }
.card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; color: var(--muted); font-size: .82rem; }
.card-meta span:first-child { color: #fbbf24; font-weight: 600; }
.play-btn { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-action); color: var(--ink); box-shadow: 0 8px 20px -8px rgba(249, 115, 22, .8); transition: transform .2s; }
.play-btn svg { width: 20px; height: 20px; fill: currentColor; margin-left: 2px; }
.play-btn:hover { transform: scale(1.1); }

/* home page */
.hero { padding: clamp(32px, 5vw, 70px) 0 clamp(30px, 5vw, 60px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero .pill { background: rgba(249, 115, 22, .14); border-color: rgba(249, 115, 22, .4); color: #fdba74; margin-bottom: 20px; }
.hero h1 { margin-bottom: .35em; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 34px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 14px 30px; color: var(--muted); font-size: .92rem; }
.hero-facts strong { color: #fff; font-family: var(--font-display); font-size: 1.15rem; margin-right: .3em; }
.console { position: relative; border-radius: 26px; padding: 12px; background: linear-gradient(160deg, #3b2279, #1c1c24 55%, #5a2a0c); box-shadow: 0 40px 90px -30px rgba(124, 58, 237, .65), 0 0 0 1px rgba(255, 255, 255, .1) inset; transform: rotate(1.5deg); }
.console canvas { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 16px; background: #0c0818; }
.console-chip { position: absolute; left: 24px; bottom: 24px; padding: .5em 1em; border-radius: var(--r-pill); background: rgba(12, 8, 24, .8); backdrop-filter: blur(8px); border: 1px solid var(--line-strong); font-size: .85rem; font-weight: 600; }
.console-chip b { color: var(--orange-soft); }

.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: transform .25s, border-color .25s, background .25s; }
.cat:hover { transform: translateY(-3px); border-color: var(--violet); background: #20202b; }
.cat-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(139, 92, 246, .18); margin-bottom: 8px; }
.cat-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--lavender); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.cat-name { font: 700 1.1rem var(--font-display); }
.cat-blurb { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.cat-count { margin-top: 6px; font-size: .82rem; color: var(--orange-soft); font-weight: 600; }

.versus { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: center; padding: clamp(26px, 4vw, 56px); border-radius: 30px; background: var(--grad-panel); border: 1px solid rgba(139, 92, 246, .35); overflow: hidden; position: relative; }
.versus::after { content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; background: radial-gradient(circle, rgba(249, 115, 22, .28), transparent 65%); pointer-events: none; }
.versus h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.versus p { color: #cfcbe3; max-width: 46ch; }
.versus-keys { display: flex; flex-wrap: wrap; gap: 14px; margin: 22px 0 28px; }
.keyset { padding: 14px 16px; border-radius: var(--r-md); background: rgba(12, 8, 24, .55); border: 1px solid var(--line); }
.keyset small { display: block; color: var(--muted); margin-bottom: 8px; font-size: .8rem; }
.versus-art { position: relative; z-index: 1; border-radius: 20px; overflow: hidden; border: 1px solid var(--line-strong); box-shadow: 0 30px 60px -30px #000; }
.versus-art .thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; }

.scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.scores a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.scores a:hover { border-color: var(--violet); background: #20202b; }
.ms-name { font-weight: 600; }
.ms-score { font: 700 1rem var(--font-display); color: var(--orange-soft); }
.ms-score.is-empty { font: 500 .84rem var(--font-body); color: var(--muted); }

.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; padding: clamp(26px, 4vw, 52px); border-radius: 30px; background: var(--surface); border: 1px solid var(--line); background-image: radial-gradient(500px 240px at 100% 0, rgba(139, 92, 246, .28), transparent 70%); }
.newsletter h2 { margin-bottom: .3em; }
.newsletter p { color: var(--muted); margin: 0; }
.news-row { display: flex; gap: 10px; }
.news-row .input { flex: 1; }
.form-msg { min-height: 1.6em; margin: 10px 4px 0; font-size: .9rem; color: var(--good); }
.form-msg.is-error { color: var(--danger); }

/* most played list */
.rank { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; counter-reset: rank; }
.rank-row { counter-increment: rank; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 14px 10px 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s; }
.rank-row:hover { border-color: var(--violet); background: #20202b; }
.rank-row .no { text-align: center; }
.rank-row .no::before { content: counter(rank); font: 800 1.5rem var(--font-display); color: var(--orange-soft); }
.rank-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rank-thumb { flex: none; width: 104px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; }
.rank-thumb .thumb { width: 100%; height: 100%; }
.rank-text { min-width: 0; display: grid; }
.rank-text strong { font: 700 1.02rem var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-text small { color: var(--muted); font-size: .84rem; }

/* games page */
.toolbar { display: grid; grid-template-columns: 1fr 220px; gap: 14px; margin: 18px 0 16px; }
.field-search { position: relative; }
.field-search .input { padding-left: 2.8em; padding-right: 3em; }
.field-search > svg { position: absolute; left: 1.05em; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; pointer-events: none; }
.field-clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: transparent; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.field-clear:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.result-count { color: var(--muted); font-size: .92rem; margin: 6px 0 20px; }
.load-wrap { display: flex; justify-content: center; margin-top: 36px; }
.empty { text-align: center; padding: clamp(40px, 8vw, 90px) 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: rgba(255, 255, 255, .02); }
.empty h1, .empty h2 { font-size: 1.6rem; }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.5em; }
.empty svg { width: 54px; height: 54px; margin: 0 auto 16px; fill: none; stroke: var(--violet); stroke-width: 1.6; }

/* game page */
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; padding-top: 20px; }
.stage-preview { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong); background: #0c0818; box-shadow: 0 40px 80px -40px rgba(124, 58, 237, .6); aspect-ratio: 16 / 9; }
.stage-preview .thumb { width: 100%; height: 100%; }
.stage-preview:fullscreen { aspect-ratio: auto; border-radius: 0; }
.big-play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(0deg, rgba(10, 6, 20, .55), transparent 55%); }
.big-play span { display: inline-flex; align-items: center; gap: .6em; padding: 1em 1.8em; border-radius: var(--r-pill); background: var(--grad-action); color: var(--ink); font: 700 1.05rem var(--font-display); box-shadow: 0 16px 40px -10px rgba(249, 115, 22, .9); transition: transform .2s; }
.big-play svg { width: 22px; height: 22px; fill: currentColor; }
.big-play:hover span { transform: scale(1.06); }
.game-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.game-title { margin: 22px 0 6px; font-size: clamp(2rem, 4.4vw, 3rem); }
.game-tagline { color: var(--lavender); font-size: 1.15rem; margin-bottom: 1.2em; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.panel h2, .panel h3 { font-size: 1.15rem; }
.facts { display: grid; gap: 0; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.facts a { color: var(--lavender); }
.side-stack { display: grid; gap: 20px; align-content: start; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.ctrl-table { width: 100%; border-collapse: collapse; }
.ctrl-table th, .ctrl-table td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-weight: 400; }
.ctrl-table th { width: 42%; padding-right: 14px; }
.ctrl-table tr:last-child > * { border: 0; }
.ctrl-table td { color: var(--muted); }
.tips li { position: relative; padding: 0 0 .9em 1.4em; color: var(--muted); }
.tips li::before { content: ''; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; border-radius: 2px; background: var(--orange-soft); transform: rotate(45deg); }

/* play page */
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; padding: 18px 0 20px; align-items: start; }
.play-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 22px 0 4px; }
.play-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0; }
.play-head p { margin: .2em 0 0; color: var(--muted); }
.back-link { color: var(--lavender); font-weight: 600; font-size: .92rem; }
.back-link:hover { color: #fff; }
.stage { display: flex; flex-direction: column; gap: 12px; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 12px; box-shadow: 0 40px 80px -40px rgba(124, 58, 237, .5); }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hud { display: flex; gap: 10px; }
.hud div { min-width: 96px; padding: 6px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.hud span { display: block; font-size: .72rem; color: var(--muted); line-height: 1.3; }
.hud strong { font: 700 1.25rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.hud div:first-child strong { color: var(--orange-soft); }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tool { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; padding: .5em 1em; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .88rem; transition: background .2s, border-color .2s; }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool:hover { background: var(--surface-2); border-color: var(--line-strong); }
.tool.is-off { color: var(--muted); }
.tool.is-on { color: #f9a8d4; border-color: #f472b6; }
.tool.is-on svg { fill: #f472b6; stroke: #f472b6; }
.canvas-wrap { position: relative; display: grid; place-items: center; height: clamp(320px, 70vh, 740px); border-radius: var(--r-md); background: #0a0614; overflow: hidden; }
#game-canvas { touch-action: none; border-radius: 6px; user-select: none; -webkit-user-select: none; background: #0a0614; }
.overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: rgba(10, 6, 20, .78); backdrop-filter: blur(6px); text-align: center; }
.ov-card { max-width: 380px; width: 100%; }
.ov-card h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: .2em; }
.ov-card p { color: var(--lavender); margin-bottom: 1.2em; }
.ov-stats { display: flex; justify-content: center; gap: 12px; margin-bottom: 14px; }
.ov-stats div { min-width: 112px; padding: 10px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.ov-stats span { display: block; font-size: .78rem; color: var(--muted); }
.ov-stats strong { font: 700 1.5rem var(--font-display); }
.ov-badge { display: inline-block; margin-bottom: 14px; padding: .35em 1em; border-radius: var(--r-pill); background: rgba(250, 204, 21, .16); border: 1px solid rgba(250, 204, 21, .5); color: #fde047; font-weight: 700; font-size: .9rem; }
.ov-modes { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.ov-hint { margin: 16px 0 0; font-size: .84rem; color: var(--muted); }
.touchpad { display: grid; grid-template-columns: repeat(3, 72px); grid-template-rows: repeat(2, 72px); gap: 8px; justify-content: center; padding: 6px 0 4px; }
.pad-btn { border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-strong); font-size: 1.6rem; font-weight: 700; touch-action: none; user-select: none; -webkit-user-select: none; }
.pad-btn:active { background: var(--violet-deep); }
.pad-ArrowUp { grid-column: 2; grid-row: 1; } .pad-ArrowLeft { grid-column: 1; grid-row: 2; } .pad-ArrowDown { grid-column: 2; grid-row: 2; } .pad-ArrowRight { grid-column: 3; grid-row: 2; }
.stage:fullscreen, .stage.is-expanded { border-radius: 0; border: 0; padding: 10px; background: var(--bg); width: 100%; height: 100%; }
.stage.is-expanded { position: fixed; inset: 0; z-index: 150; }
.stage:fullscreen .canvas-wrap, .stage.is-expanded .canvas-wrap { flex: 1; height: auto; min-height: 0; }
.play-side { display: grid; gap: 18px; }
.play-side .panel { padding: 20px; }
.ctrl-list li { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.ctrl-list li:last-child { border: 0; }
.ctrl-list span { color: var(--muted); }
.shortcuts { color: var(--muted); font-size: .88rem; line-height: 2; }

/* about page */
.about-hero { padding: clamp(36px, 6vw, 84px) 0 20px; max-width: 880px; }
.about-hero p { font-size: 1.2rem; color: var(--muted); max-width: 58ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.stat strong { display: block; font: 800 clamp(2rem, 4vw, 3rem)/1 var(--font-display); margin-bottom: 8px; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .95rem; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.feature-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(139, 92, 246, .18); margin-bottom: 16px; }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--lavender); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.steps li { position: relative; padding: 30px 26px 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; top: -18px; left: 24px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--grad-action); color: var(--ink); font: 800 1rem var(--font-display); }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 40px 16px 0; font: 600 1.05rem var(--font-display); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--orange-soft); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq p { color: var(--muted); padding: 0 40px 18px 0; margin: 0; }
.cta-band { text-align: center; padding: clamp(36px, 6vw, 70px) 24px; border-radius: 30px; background: var(--grad-panel); border: 1px solid rgba(139, 92, 246, .35); }
.cta-band p { color: #cfcbe3; max-width: 48ch; margin: 0 auto 1.6em; }

/* toasts + responsive */
#toasts { position: fixed; left: 50%; bottom: 22px; z-index: 300; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { padding: .8em 1.3em; border-radius: var(--r-pill); background: #fff; color: #17101f; font-weight: 600; font-size: .92rem; box-shadow: 0 16px 40px -10px #000; animation: toast-in .3s ease-out; text-align: center; }
.toast.is-out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 1100px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
  .play-layout { grid-template-columns: 1fr; }
  .play-side { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .site-header, .site-header.is-scrolled { backdrop-filter: none; background: rgba(17, 17, 21, .97); }
  .hero-grid, .versus, .newsletter, .game-layout, .detail-grid { grid-template-columns: 1fr; }
  .console { transform: none; max-width: 640px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: block; }
  .nav-menu { position: fixed; inset: var(--header-h) 0 0 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 20px; background: rgba(17, 17, 21, .98); backdrop-filter: blur(16px); transform: translateY(-10px); opacity: 0; visibility: hidden; transition: transform .25s, opacity .25s, visibility .25s; overflow-y: auto; }
  .nav-menu.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-menu > a { padding: 1em; font-size: 1.1rem; border-radius: var(--r-md); }
  .search { order: -1; width: 100%; margin: 0 0 10px; }
}
@media (max-width: 760px) {
  .rank { grid-template-columns: 1fr; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .steps, .features { grid-template-columns: 1fr; gap: 26px; }
  .steps { gap: 30px; }
  .toolbar { grid-template-columns: 1fr; }
  .news-row { flex-direction: column; }
  .play-side { grid-template-columns: 1fr; }
  .tool span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tool { width: 46px; padding: 0; justify-content: center; }
  .hud div { min-width: 84px; }
}
@media (max-width: 520px) {
  .container, .nav { width: calc(100% - 28px); }
  .grid { grid-template-columns: 1fr; }
  .cats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 18px; }
  .foot-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-cta .btn { flex: 1; }
  .canvas-wrap { height: clamp(300px, 62vh, 620px); }
  .touchpad { grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 64px); }
}
@media (hover: none) { .card:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .console { transform: none; }
}
/* pads only on touch screens */
@media (hover: hover) and (pointer: fine) { .touchpad { display: none !important; } }
