/* Layout: a night-time arcade hall. Sticky marquee header, a featured "cabinet" hero,
   then shelves of game cards outlined in the logo's cyan neon. Single dark look by design. */
:root {
  --night: #0a1130;        /* page ground, the logo's navy */
  --night-2: #0e1740;      /* raised panels */
  --night-3: #16215a;      /* hover / inset */
  --line: #24306e;         /* hairlines */
  --ink: #eef0ff;          /* main text */
  --ink-2: #a6addb;        /* secondary text */
  --ink-3: #6f78ad;        /* captions */
  --royal: #8b3dff;        /* the purple G */
  --royal-2: #5d1fc2;
  --crown: #ffc22e;        /* gold crown */
  --crown-2: #e89a12;
  --neon: #37dcf5;         /* cyan outline */
  --btn-x: #3d7bff; --btn-y: #ffd23f; --btn-b: #ff4d5e; --btn-a: #3ccf6e;

  --f-display: 'Bungee', 'Arial Black', Impact, sans-serif;
  --f-body: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --f-pixel: 'Press Start 2P', 'Courier New', monospace;

  --r: 14px;
  --wrap: 1240px;
  --gut: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--night); scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 500 16px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
}
body::after { /* faint pixel grid + royal glow */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(139, 61, 255, .28), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(55, 220, 245, .10), transparent 60%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--night);
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--night);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.05; text-wrap: balance; margin: 0; letter-spacing: .01em; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--crown); color: var(--night); padding: 8px 14px; border-radius: 8px; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.skip:focus { left: 16px; }

.wrap {
  width: 100%; max-width: calc(var(--wrap) + 64px); margin: 0 auto;
  padding-left: var(--gut); padding-right: var(--gut-r);
}
@media (min-width: 900px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }

/* ---------- Header ---------- */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(10, 17, 48, .82);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.top::after { /* pixel trim from the logo */
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--crown) 0 6px, transparent 6px 12px, var(--royal) 12px 18px, transparent 18px 24px, var(--btn-x) 24px 30px, transparent 30px 42px);
  opacity: .55;
}
.top-in {
  max-width: calc(var(--wrap) + 64px); margin: 0 auto;
  display: flex; align-items: center; gap: 28px;
  padding-block: 10px;
  padding-left: var(--gut); padding-right: var(--gut-r);
}
@media (min-width: 900px) { .top-in { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 40px; height: auto; filter: drop-shadow(0 0 10px rgba(55,220,245,.35)); transition: transform .3s; }
.brand:hover img { transform: rotate(-6deg) scale(1.06); }
.brand-word {
  font-family: var(--f-display); font-size: 22px; line-height: .9; letter-spacing: .02em;
  background: linear-gradient(180deg, #ffe58a 0%, var(--crown) 45%, var(--crown-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: flex; flex-direction: column;
}
.brand-word small { font-size: 10px; letter-spacing: .3em; color: var(--neon); -webkit-text-fill-color: var(--neon); }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; padding: 8px 14px; border-radius: 10px;
  font-weight: 600; font-size: 15px; color: var(--ink-2); white-space: nowrap;
  transition: color .15s, background .15s;
}
/* six menu buttons: on narrower laptops the menu moves to its own row under the logo and search */
@media (max-width: 1320px) and (min-width: 861px) {
  .top-in { flex-wrap: wrap; gap: 10px 20px; }
  .nav { order: 3; width: 100%; }
}
.nav a:hover { color: var(--ink); background: var(--night-3); }
.nav a[aria-current="page"] { color: var(--night); background: var(--crown); }
.search { position: relative; margin-left: auto; flex: 0 1 300px; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2.4; stroke-linecap: round; pointer-events: none; }
.search input {
  width: 100%; height: 42px; padding: 0 40px 0 38px;
  background: var(--night-2); color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  font: 500 15px var(--f-body); outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--neon); box-shadow: 0 0 0 4px rgba(55,220,245,.15); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd {
  position: absolute; right: 10px; top: 50%; translate: 0 -50%;
  font: 600 12px var(--f-body); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px;
}
.q-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 280px;
  background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 20px 50px rgba(0,0,0,.5); padding: 6px; z-index: 70;
}
.q-results a { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; text-decoration: none; }
.q-results a:hover, .q-results a.on { background: var(--night-3); }
.q-results img { width: 64px; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; }
.q-results b { display: block; font-size: 15px; }
.q-results span { font-size: 13px; color: var(--ink-3); }
.q-results .none { padding: 12px; color: var(--ink-2); font-size: 14px; }
.q-results .all { justify-content: center; color: var(--neon); font-weight: 600; font-size: 14px; }

@media (max-width: 860px) {
  .top-in { flex-wrap: wrap; gap: 10px 14px; }
  .search { flex: 1 1 160px; }
  .search kbd { display: none; }
  .nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; padding: 6px 12px; font-size: 14px; }
}
@media (max-width: 420px) { .brand-word { font-size: 18px; } .brand img { width: 34px; } }

/* ---------- Shared bits ---------- */
main { flex: 1; outline: none; }
.pix { font-family: var(--f-pixel); font-size: 10px; letter-spacing: .08em; line-height: 1.6; text-transform: uppercase; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--neon); }
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--crown); box-shadow: 10px 0 0 var(--royal), 20px 0 0 var(--btn-x); margin-right: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px; border-radius: 12px; border: 0; cursor: pointer;
  font: 700 16px var(--f-body); letter-spacing: .02em; text-decoration: none; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, background .15s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-gold {
  color: #2a1700; background: linear-gradient(180deg, #ffe07a, var(--crown) 50%, var(--crown-2));
  box-shadow: 0 4px 0 #a96400, 0 10px 30px rgba(255, 194, 46, .28);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #a96400, 0 14px 36px rgba(255, 194, 46, .38); }
.btn-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 #a96400; }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--night-3); border-color: var(--neon); }
.btn-sm { min-height: 44px; height: 44px; padding: 0 16px; font-size: 14px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }

.section { padding-block: 56px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(24px, 3.4vw, 34px); }
.sec-head p { color: var(--ink-2); margin-top: 6px; }
.sec-head .more { color: var(--neon); font-weight: 600; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; padding-block: 8px; padding-inline: 4px; }
.sec-head .more:hover { text-decoration: underline; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 99px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.06); color: var(--ink-2); border: 1px solid var(--line); }
.chip i { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--neon)); }

/* ---------- Hero ---------- */
.hero { padding-block: 44px 8px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero .hero-title { font-size: clamp(36px, 5.6vw, 66px); }
.hero .hero-title .gold { background: linear-gradient(180deg, #ffe58a, var(--crown) 55%, var(--crown-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: 18px; color: var(--ink-2); max-width: 46ch; }
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }

.cabinet { position: relative; perspective: 1400px; min-width: 0; }
.cabinet-screen {
  position: relative; display: block; border-radius: 18px; overflow: hidden;
  border: 3px solid var(--neon);
  box-shadow: 0 0 0 6px rgba(93,31,194,.55), 0 0 40px rgba(55,220,245,.35), 0 40px 80px rgba(0,0,0,.55);
  transform: rotateY(-8deg) rotateX(3deg); transform-origin: left center;
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
  aspect-ratio: 1248 / 800; max-width: 100%; background: #000;
}
.cabinet:hover .cabinet-screen { transform: rotateY(-2deg) rotateX(1deg); }
.cabinet-screen img { width: 100%; height: 100%; object-fit: cover; }
.cabinet-screen::after { /* scanlines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.12) 0 2px, transparent 2px 4px);
  mix-blend-mode: multiply;
}
.cabinet-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: var(--crown); color: #2a1700; box-shadow: 0 0 0 8px rgba(255,194,46,.25), 0 10px 30px rgba(0,0,0,.4);
  transition: transform .2s;
}
.cabinet-play svg { width: 34px; height: 34px; margin-left: 5px; }
.cabinet-screen:hover .cabinet-play { transform: scale(1.1); }
.cabinet-badge {
  position: absolute; z-index: 2; top: -16px; right: 18px;
  background: var(--royal); color: #fff; padding: 9px 14px 8px; border-radius: 10px;
  border: 2px solid var(--neon); box-shadow: 0 8px 20px rgba(0,0,0,.35);
  animation: bob 3s ease-in-out infinite;
}
.pads { position: absolute; z-index: 2; left: -18px; bottom: -22px; display: grid; grid-template-columns: repeat(3, 26px); grid-template-rows: repeat(3, 26px); }
.pads span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--f-body); color: #111; box-shadow: inset 0 -3px 0 rgba(0,0,0,.25), 0 4px 10px rgba(0,0,0,.4); }
.pads .y { grid-area: 1/2; background: var(--btn-y); }
.pads .x { grid-area: 2/1; background: var(--btn-x); color: #fff; }
.pads .b { grid-area: 2/3; background: var(--btn-b); color: #fff; }
.pads .a { grid-area: 3/2; background: var(--btn-a); }
@keyframes bob { 50% { transform: translateY(-6px); } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .cabinet { order: -1; margin: 10px 10px 0; }
  .cabinet-screen { transform: none; }
}

/* Featured-game slideshow: slides share one grid cell, so the hero keeps its height as they change. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-slides { display: grid; }
.hero-slide { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center;
  opacity: 0; visibility: hidden; transform: translateX(24px); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1), visibility 0s .6s; }
.hero-slide.on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.7,.2,1), visibility 0s; }
.hero-nav { display: flex; align-items: center; gap: 12px; margin-top: 40px; }
.hero-arrow { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink); transition: background .15s, border-color .15s; }
.hero-arrow:hover { background: var(--night-3); border-color: var(--neon); }
.hero-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hero-dots { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 4px; min-width: 0; }
.hero-dots::-webkit-scrollbar { display: none; }
.hero-dot { position: relative; flex: none; display: flex; align-items: center; gap: 10px; height: 52px; padding: 5px 14px 5px 5px; border-radius: 12px; cursor: pointer;
  background: var(--night-2); border: 1px solid var(--line); color: var(--ink-2); font: 600 14px var(--f-body); overflow: hidden; transition: border-color .15s, color .15s, background .15s; }
.hero-dot img { width: 64px; height: 40px; object-fit: cover; border-radius: 7px; opacity: .7; transition: opacity .15s; }
.hero-dot:hover { border-color: var(--ink-3); color: var(--ink); }
.hero-dot[aria-current] { border-color: var(--neon); color: var(--ink); background: var(--night-3); box-shadow: 0 0 0 1px var(--neon), 0 0 18px rgba(55,220,245,.25); }
.hero-dot[aria-current] img { opacity: 1; }
.hero-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--crown); transform: scaleX(0); transform-origin: left; }
.hero-nav.paused .hero-dot[aria-current] .hero-bar { transform: scaleX(1); opacity: .5; }
@keyframes heroBar { to { transform: scaleX(1); } }
.hero-arrow:focus-visible, .hero-dot:focus-visible { outline: 3px solid var(--crown); outline-offset: 2px; }
@media (max-width: 900px) {
  .hero-slide { grid-template-columns: minmax(0, 1fr); gap: 36px; align-content: start; }
  .hero-nav { margin-top: 28px; }
}
@media (max-width: 600px) {
  .hero-dot { padding-right: 5px; }
  .hero-dot-name { display: none; }
}

/* ---------- Ticker ---------- */
.ticker { margin-top: 56px; border-block: 1px solid var(--line); background: rgba(14,23,64,.6); overflow: hidden; }
.ticker-track { display: flex; gap: 44px; width: max-content; padding-block: 14px; animation: tick 40s linear infinite; }
.ticker span { color: var(--ink-2); white-space: nowrap; display: inline-flex; gap: 12px; align-items: center; }
.ticker span::before { content: ""; width: 8px; height: 8px; background: var(--crown); transform: rotate(45deg); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cat {
  --c: var(--neon);
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 18px; min-height: 148px; border-radius: var(--r); text-decoration: none;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 18%, var(--night-2)) 0%, var(--night-2) 70%);
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
  overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s;
}
.cat:hover { transform: translateY(-4px); border-color: var(--c); box-shadow: 0 14px 30px rgba(0,0,0,.35), 0 0 24px color-mix(in srgb, var(--c) 30%, transparent); }
.cat svg { width: 38px; height: 38px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cat h3 { font-size: 20px; }
.cat .count { margin-top: auto; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.cat .count b { color: var(--c); }
.cat::after { /* corner pixels */
  content: ""; position: absolute; right: 14px; top: 14px; width: 6px; height: 6px; background: var(--c);
  box-shadow: -8px 8px 0 color-mix(in srgb, var(--c) 50%, transparent), 0 8px 0 color-mix(in srgb, var(--c) 25%, transparent);
}
@media (max-width: 860px) { .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Game cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; overflow: hidden;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cw { position: relative; display: flex; min-width: 0; transition: transform .2s; }
.cw > .card { flex: 1; }
.cw:hover { transform: translateY(-5px); }
.card:hover { border-color: var(--neon); box-shadow: 0 0 0 1px var(--neon), 0 0 30px rgba(55,220,245,.25), 0 20px 40px rgba(0,0,0,.4); }
.card-art { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #000; }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s, transform .5s; }
.card-art img.alt { opacity: 0; }
.card:hover .card-art img.alt { opacity: 1; }
.card:hover .card-art img { transform: scale(1.04); }
.card-art .tag-new { position: absolute; left: 10px; top: 10px; background: var(--crown); color: #2a1700; padding: 6px 8px 5px; border-radius: 6px; }
.card-art .playhint {
  position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--crown); color: #2a1700; display: grid; place-items: center;
  opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
}
.card-art .playhint svg { width: 18px; height: 18px; margin-left: 3px; }
.card:hover .playhint, .card:focus-visible .playhint { opacity: 1; transform: none; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-body h3 { font-family: var(--f-body); font-weight: 700; font-size: 18px; line-height: 1.25; }
.card-body p { color: var(--ink-2); font-size: 14px; }
.card-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: rgba(10,17,48,.75); backdrop-filter: blur(6px); color: var(--ink);
}
.fav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.fav-btn[aria-pressed="true"] { color: var(--crown); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }

.card.locked { border-style: dashed; background: repeating-linear-gradient(135deg, rgba(255,255,255,.015) 0 10px, transparent 10px 20px), var(--night); }
.card.locked:hover { transform: none; border-color: var(--line); box-shadow: none; }
.card.locked .card-art { background: transparent; display: grid; place-items: center; }
.lock { display: grid; place-items: center; gap: 12px; color: var(--ink-3); text-align: center; }
.lock svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; }
.card.locked h3 { color: var(--ink-2); }

/* ---------- Page heads ---------- */
.page-head { padding-block: 40px 8px; display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-size: clamp(32px, 5vw, 52px); }
.page-head p { color: var(--ink-2); font-size: 17px; max-width: 60ch; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink-3); flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--neon); }
.cat-head { --c: var(--neon); display: flex; gap: 20px; align-items: center; }
.cat-head .ico { flex: none; width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, var(--night-2)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.cat-head .ico svg { width: 42px; height: 42px; fill: none; stroke: var(--c); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.toolbar-wrap { margin-block: 24px 16px; display: flex; flex-direction: column; gap: 10px; }
.toolbar-wrap .toolbar { margin-block: 0; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-block: 24px; }
.mode-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mode-toolbar .filter { height: 32px; padding: 0 12px; font-size: 13px; border-style: dashed; }
.mode-toolbar .filter[aria-pressed="true"] { border-style: solid; background: var(--gold); color: var(--night); border-color: var(--gold); }
.filter { height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--night-2); color: var(--ink-2); cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.filter i { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--neon)); }
.filter:hover { color: var(--ink); border-color: var(--ink-3); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--night); border-color: var(--ink); }
.toolbar select { margin-left: auto; height: 38px; border-radius: 10px; background: var(--night-2); color: var(--ink); border: 1px solid var(--line); padding: 0 12px; font: 600 14px var(--f-body); }
.result-note { color: var(--ink-3); font-size: 14px; margin-bottom: 14px; }

.empty {
  border: 1px dashed var(--line); border-radius: var(--r); padding: 40px 24px; text-align: center;
  display: grid; justify-items: center; gap: 12px; color: var(--ink-2);
}
.empty h3 { font-size: 22px; color: var(--ink); }
.empty .pix { color: var(--crown); }

/* ---------- Game page ---------- */
.play-wrap { padding-block: 24px 0; }
.play-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 10px 0 18px; }
.play-head h1 { font-size: clamp(28px, 4.2vw, 44px); }
.play-head .sub { color: var(--ink-2); margin-top: 8px; }
.stage {
  position: relative; border-radius: 16px; overflow: hidden; background: #000;
  border: 2px solid var(--neon); box-shadow: 0 0 0 5px rgba(93,31,194,.45), 0 0 50px rgba(55,220,245,.2);
}
.stage-box { position: relative; width: 100%; aspect-ratio: var(--ratio, 16/10); max-height: calc(100vh - 220px); margin: 0 auto; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #1c110b; }
.stage-cover { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; border: 0; padding: 0; background: #000; }
.stage-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.45) saturate(1.1); transition: filter .3s, transform .6s; }
.stage-cover:hover img { filter: brightness(.6) saturate(1.2); transform: scale(1.02); }
.stage-cover .go { position: relative; display: grid; justify-items: center; gap: 16px; }
.stage-cover .go .cabinet-play { position: static; translate: none; width: 96px; height: 96px; }
.stage-cover .go .pix { color: #fff; text-shadow: 0 2px 0 #000; }
.stage:fullscreen { border: 0; border-radius: 0; display: grid; place-items: center; }
.stage:fullscreen .stage-box { max-height: 100vh; height: 100vh; width: auto; max-width: 100vw; }
.stage-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 14px; }
.stage-bar .spacer { flex: 1; }
.stage-bar .btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage-bar .btn[aria-pressed="true"] { color: var(--crown); border-color: var(--crown); }
.stage-bar .btn[aria-pressed="true"] svg { fill: currentColor; }
.phone-tip { display: none; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
@media (max-width: 700px), (pointer: coarse) { .phone-tip { display: block; } }

.info { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; margin-top: 40px; align-items: start; }
.panel { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; min-width: 0; }
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 22px; margin-bottom: 14px; }
.panel > p { color: var(--ink-2); max-width: 65ch; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; counter-increment: s; }
.steps li::before { content: counter(s); width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-family: var(--f-display); background: var(--royal); color: #fff; box-shadow: inset 0 -3px 0 var(--royal-2); }
.steps b { display: block; }
.steps span { color: var(--ink-2); font-size: 15px; }
.feat { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.feat li { display: flex; gap: 10px; color: var(--ink-2); }
.feat li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; background: var(--crown); transform: rotate(45deg); }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--ink-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
td kbd { font: 600 13px var(--f-body); background: var(--night-3); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
dl.facts { margin: 0; display: grid; gap: 0; }
dl.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
dl.facts div:last-child { border-bottom: 0; }
dt { color: var(--ink-3); font-size: 14px; }
dd { margin: 0; text-align: right; font-weight: 600; font-size: 14px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.shots img { border-radius: 10px; border: 1px solid var(--line); aspect-ratio: 16/10; object-fit: cover; width: 100%; }
@media (max-width: 900px) { .info { grid-template-columns: minmax(0, 1fr); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: center; margin-top: 18px; }
.about-grid .panel p + p { margin-top: 12px; }
.about-grid img { width: 100%; max-width: 280px; filter: drop-shadow(0 0 30px rgba(139,61,255,.45)); }
@media (max-width: 760px) { .about-grid { grid-template-columns: minmax(0, 1fr); } .about-grid img { max-width: 200px; margin: 0 auto; order: -1; } }

/* ---------- Footer ---------- */
.foot { margin-top: 88px; border-top: 1px solid var(--line); background: rgba(6, 10, 32, .7); }
.foot-in {
  max-width: calc(var(--wrap) + 64px); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px;
  padding-block: 44px 28px; padding-left: var(--gut); padding-right: var(--gut-r);
}
.foot-brand { display: flex; gap: 20px; align-items: flex-start; }
.foot-brand img { width: 92px; height: auto; aspect-ratio: 720 / 882; object-fit: contain; flex: none; }
.foot-brand p { color: var(--ink-3); font-size: 14px; max-width: 34ch; }
.foot-col { display: flex; flex-direction: column; gap: 4px; }
.foot-col #foot-cats { display: flex; flex-direction: column; gap: 4px; }
.foot h4 { margin: 0 0 4px; font: 400 13px var(--f-display); color: var(--crown); letter-spacing: .06em; }
.foot a { color: var(--ink-2); text-decoration: none; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.foot a:hover { color: var(--neon); }
.foot-base {
  max-width: calc(var(--wrap) + 64px); margin: 0 auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); padding-left: var(--gut); padding-right: var(--gut-r);
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px;
}
.foot-base .pix { color: var(--royal); }
@media (min-width: 900px) { .foot-in, .foot-base { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
@media (max-width: 860px) { .foot-in { grid-template-columns: repeat(3, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 90;
  background: var(--ink); color: var(--night); font-weight: 700; padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.5); animation: pop .25s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px); } }

/* ---------- View transition ---------- */
.view-in { animation: viewIn .35s ease-out; }
@keyframes viewIn { from { opacity: .4; transform: translateY(8px); } }

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

@media (max-width: 600px) {
  .cat { padding: 14px; min-height: 128px; }
  .cat h3 { font-size: 15px; }
  .grid .locked ~ .locked { display: none; }
  .pads { left: -10px; transform: scale(.8); transform-origin: left bottom; }
}

/* Phones: the game adds its own touch buttons under (portrait) or beside (landscape) the scene, so give the frame room. */
@media (pointer: coarse) and (max-width: 1000px) {
  .stage-box { aspect-ratio: auto; height: min(88svh, 860px); max-height: none; }
}

/* ---------- Chat pop-up ---------- */
.chat-pop { position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 60px);
  width: min(380px, calc(100vw - 32px)); height: min(520px, calc(100dvh - 120px)); display: flex; flex-direction: column;
  background: var(--night-2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(55,220,245,.15), 0 24px 60px rgba(0,0,0,.6); animation: chatIn .18s ease-out; }
.chat-pop[hidden] { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.18); }
.chat-head b { font-family: var(--f-display); font-weight: 400; font-size: 18px; }
.chat-head .chat-live { margin-right: auto; }
.chat-close { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.chat-close:hover { border-color: var(--neon); }
.chat-close:focus-visible { outline: 3px solid var(--crown); outline-offset: 2px; }
.chat-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.chat-pop .chat-log { flex: 1; height: auto; min-height: 0; }
.chat-pop .chat-form { flex-wrap: wrap; }
.chat-pop .chat-name { width: 100%; }
.chat-rules { margin: 0; padding: 0 14px 10px; font-size: 12px; color: var(--ink-3); }
.chat-fab.on { filter: brightness(.92); }
@media (max-width: 600px) {
  .chat-pop { right: 8px; left: 8px; width: auto; bottom: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 56px); height: min(560px, calc(100dvh - 90px)); }
}
/* ---------- Homepage chat ---------- */
.chat { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.chat-log { height: 340px; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; overscroll-behavior: contain; }
.chat-msg { display: grid; grid-template-columns: auto auto 1fr; gap: 8px; align-items: baseline; line-height: 1.4; padding: 3px 8px; border-radius: 8px; }
.chat-msg.mine { background: rgba(55,220,245,.08); }
.chat-msg.admin { background: rgba(255,194,46,.12); box-shadow: inset 3px 0 0 var(--gold, #ffc22e); }
.chat-msg.admin b { color: var(--gold, #ffc22e); }
.chat-crowns { font-style: normal; display: flex; flex-wrap: wrap; gap: 4px; grid-column: 2 / -1; margin-top: 1px; }

.crown { font: 700 11px/1 system-ui, sans-serif; color: #2a1700; background: linear-gradient(180deg, #ffe07a, #ffb703); border-radius: 999px; padding: 3px 7px 3px 5px; box-shadow: 0 0 10px rgba(255,194,46,.45); white-space: nowrap; }
.crown-neon { background: linear-gradient(180deg, #8ff4ff, #37dcf5); box-shadow: 0 0 10px rgba(55,220,245,.45); color: #04202a; }
.crown-ali { background: linear-gradient(180deg, #ffb39a, #ff6b4a); box-shadow: 0 0 10px rgba(255,107,74,.45); color: #2a0a00; }
.chat-msg time { font: 10px var(--f-pixel); color: var(--ink-3); }
.chat-msg b { font-weight: 700; white-space: nowrap; }
.chat-msg b::after { content: ":"; color: var(--ink-3); }
.chat-msg span { color: var(--ink); word-break: break-word; min-width: 0; }
.chat-empty { color: var(--ink-2); margin: auto; text-align: center; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: rgba(0,0,0,.15); }
.chat-form input { font: 600 15px var(--f-body); color: var(--ink); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: 40px; min-width: 0; }
.chat-form input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(55,220,245,.2); }
.chat-name { width: 150px; flex: none; }
.chat-text { flex: 1; }
.chat-note { min-height: 0; padding: 0 14px; color: var(--crown); font-size: 14px; }
.chat-note:not(:empty) { padding: 0 14px 12px; }
.chat-live { display: inline-flex; align-items: center; gap: 8px; font: 10px var(--f-pixel); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.chat-live i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.chat-live.on i { background: var(--btn-a); box-shadow: 0 0 8px var(--btn-a); }
.chat-live.off i { background: var(--btn-b); }
@media (max-width: 600px) {
  .chat-log { height: 300px; padding: 10px; }
  .chat-msg { grid-template-columns: auto 1fr; }
  .chat-crowns { grid-column: 1 / -1; }
  .chat-msg time { display: none; }
  .chat-form { flex-wrap: wrap; }
  .chat-name { width: 100%; }
}
.chat-fab { position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px 0 14px; border-radius: 999px; text-decoration: none;
  font: 700 15px var(--f-body); color: #2a1700; background: linear-gradient(180deg, #ffe07a, var(--crown) 50%, var(--crown-2));
  box-shadow: 0 4px 0 #a96400, 0 10px 26px rgba(0,0,0,.45); transition: transform .12s; }
.chat-fab:hover { transform: translateY(-2px); }
.chat-fab:focus-visible { outline: 3px solid var(--neon); outline-offset: 3px; }
.chat-fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; }
.nav-chat { display: none; align-items: center; gap: 6px; background: var(--night-3); border: 1px solid var(--line); color: var(--crown); padding: 6px 12px; border-radius: 10px; font: 600 14px var(--f-body); cursor: pointer; white-space: nowrap; }
.nav-chat svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.nav-chat:hover, .nav-chat.on { background: var(--night-2); border-color: var(--crown); }
@media (max-width: 600px) {
  .chat-fab { display: none !important; }
  .nav-chat { display: inline-flex; }
  main { padding-bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 16px); }
}
/* ---------- Admin jumpscare ---------- */
#jumpscare { position: fixed; inset: 0; z-index: 1000; background: #000; display: grid; place-items: center; overflow: hidden; }
#jumpscare .js-face { width: min(92vw, 92vh * .83); height: auto; animation: jsZoom .22s cubic-bezier(.2,1.6,.4,1) both, jsShake .09s linear .22s 16; }
#jumpscare.done .js-face { animation: none; opacity: .25; transform: scale(.9); transition: opacity .4s, transform .4s; }
#jumpscare .js-after { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: #fff; }
#jumpscare .js-after b { font: 400 clamp(40px, 10vw, 80px) var(--f-display); color: var(--crown); text-shadow: 0 6px 0 #6b3d00; }
#jumpscare .js-after span { font-size: 18px; color: var(--ink-2); }
@keyframes jsZoom { from { transform: scale(.15); } to { transform: scale(1.08); } }
@keyframes jsShake { 0%, 100% { translate: 0 0; } 25% { translate: -10px 6px; } 50% { translate: 8px -8px; } 75% { translate: -6px -4px; } }
@media (prefers-reduced-motion: reduce) { #jumpscare .js-face { animation: none; } }

/* ---------- Accounts: coin pill, profile, shop ---------- */
.acct-pill { position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px 0 5px; border-radius: 999px;
  background: var(--night-2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; transition: border-color .15s, background .15s; }
.acct-pill:empty { width: 42px; padding: 0; }
.acct-pill:hover { border-color: var(--crown); background: var(--night-3); }
.acct-pill .pill-in { padding-left: 8px; color: var(--crown); }
.acct-pill .pill-coins { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.acct-pill .pill-coins i { font-style: normal; }
.acct-pill.bump .pill-coins b { animation: coinBump .5s ease; }
@keyframes coinBump { 40% { transform: scale(1.35); color: var(--crown); } }
.coin-pop { position: absolute; right: 8px; top: -4px; font: 700 13px var(--f-body); color: var(--crown); pointer-events: none; animation: coinPop 1.3s ease-out forwards; }
@keyframes coinPop { from { opacity: 0; transform: translateY(6px); } 20% { opacity: 1; } to { opacity: 0; transform: translateY(-26px); } }
@media (max-width: 860px) { .acct-pill { height: 40px; } }

/* avatar circle + frames */
.pf-av { --s: 32px; width: var(--s); height: var(--s); flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: radial-gradient(circle at 35% 30%, #2a3a8a, #121b4d); border: 2px solid var(--line); position: relative; vertical-align: middle; }
.pf-av > span { font-size: calc(var(--s) * .56); line-height: 1; }
.pf-av-xs { --s: 20px; border-width: 1px; margin-right: 5px; }
.pf-av-sm { --s: 30px; }
.pf-av-md { --s: 44px; }
.pf-av-lg { --s: 64px; border-width: 3px; }
.pf-av-xl { --s: 104px; border-width: 4px; }
.fr-f-neon { border-color: var(--neon); box-shadow: 0 0 0 2px rgba(55,220,245,.25), 0 0 14px rgba(55,220,245,.7); }
.fr-f-pixel { border-radius: 22%; border-color: var(--crown); border-style: dashed; box-shadow: 0 0 0 2px var(--royal); }
.fr-f-fire { border-color: #ff7a2e; box-shadow: 0 0 10px #ff5a1f, 0 0 22px rgba(255,59,48,.6); animation: fireGlow 1.4s ease-in-out infinite alternate; }
@keyframes fireGlow { to { box-shadow: 0 0 16px #ffb02e, 0 0 30px rgba(255,59,48,.8); border-color: #ffc22e; } }
.fr-f-royal { border-color: var(--crown); box-shadow: 0 0 0 2px var(--night), 0 0 0 4px var(--crown), 0 0 18px rgba(255,194,46,.6); background: radial-gradient(circle at 35% 30%, #6a2bd1, #2b0d6b); }
.fr-f-royal::before { content: "👑"; position: absolute; top: calc(var(--s) * -.36); font-size: calc(var(--s) * .34); line-height: 1; }
.pf-av-xs.fr-f-royal::before { display: none; }

/* names */
.pf-name { font-weight: 700; }
.pf-badge { margin-left: 4px; font-size: .95em; }
.nc-c-cyan { color: #37dcf5 !important; }
.nc-c-lime { color: #a6ff4d !important; }
.nc-c-pink { color: #ff5fc0 !important; }
.nc-c-sunset, .nc-c-gold, .nc-c-rainbow { -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; }
.nc-c-sunset { background-image: linear-gradient(90deg, #ffb03a, #ff4f7a); }
.nc-c-gold { background-image: linear-gradient(180deg, #fff1a8, #ffc22e 50%, #e08a00); filter: drop-shadow(0 0 6px rgba(255,194,46,.45)); }
.nc-c-rainbow { background-image: linear-gradient(90deg, #ff4d5e, #ffd23f, #3ccf6e, #37dcf5, #8b3dff, #ff4d5e); background-size: 200% 100%; animation: rainbow 3s linear infinite; }
@keyframes rainbow { to { background-position: 200% 0; } }

/* profile card + banners */
.pf-card { position: relative; border-radius: calc(var(--r) + 4px); border: 1px solid var(--line); background: var(--night-2); padding: 28px 24px 22px; overflow: hidden; }
.pf-card > * { position: relative; }
.pf-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.pf-who h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(26px, 4vw, 36px); line-height: 1.1; word-break: break-word; }
.pf-title { display: inline-block; margin-top: 6px; font: 10px var(--f-pixel); letter-spacing: .08em; color: var(--night); background: var(--neon); padding: 6px 9px; border-radius: 6px; }
.bn-bn-grid { background: linear-gradient(180deg, rgba(10,17,48,.2), rgba(10,17,48,.85) 75%), linear-gradient(rgba(55,220,245,.35) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(55,220,245,.35) 1px, transparent 1px) 0 0 / 28px 28px, #0b1440; }
.bn-bn-sunset { background: linear-gradient(180deg, rgba(10,17,48,0) 30%, rgba(10,17,48,.85) 80%), radial-gradient(circle at 75% 85%, #ffd23f 0 60px, transparent 61px), repeating-linear-gradient(180deg, transparent 0 10px, rgba(10,17,48,.25) 10px 13px), linear-gradient(180deg, #2b0d6b, #ff3c78 60%, #ffb03a); }
.bn-bn-galaxy { background: radial-gradient(1.5px 1.5px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(2px 2px at 85% 60%, #cfe9ff, transparent), radial-gradient(1px 1px at 40% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 45%, #fff, transparent), radial-gradient(ellipse at 30% 40%, rgba(139,61,255,.7), transparent 60%), radial-gradient(ellipse at 80% 70%, rgba(55,220,245,.45), transparent 55%), #070b24; background-size: 160px 160px, 210px 210px, 190px 190px, 130px 130px, 240px 240px, auto, auto, auto; }
.bn-bn-gold { background: linear-gradient(180deg, rgba(10,17,48,0) 20%, rgba(10,17,48,.8) 85%), repeating-linear-gradient(115deg, rgba(255,255,255,.18) 0 2px, transparent 2px 22px), linear-gradient(135deg, #7a4a00, #ffc22e 45%, #fff1a8 55%, #e08a00); }
.pf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-top: 22px; }
.pf-stats div { background: rgba(10,17,48,.7); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.pf-stats dt { font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.pf-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 18px; }
.pf-games { margin-top: 14px; display: grid; gap: 8px; }
.pf-games > b { font-size: 13px; color: var(--ink-2); }
.pf-games a { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); background: rgba(10,17,48,.7); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 6px 6px; }
.pf-games a:hover { border-color: var(--neon); }
.pf-games img { width: 56px; height: 36px; object-fit: cover; border-radius: 6px; }
.pf-games small { color: var(--ink-3); }

.acct-body { padding-block: 24px 64px; }
.acct-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
.acct-grid.one { grid-template-columns: minmax(0, 720px); }
.acct-grid > div > * + * { margin-top: 16px; }
@media (max-width: 900px) { .acct-grid { grid-template-columns: minmax(0, 1fr); } }
.today > div:first-child { display: flex; justify-content: space-between; gap: 10px; }
.today .bar { height: 12px; border-radius: 99px; background: var(--night); border: 1px solid var(--line); margin: 10px 0; overflow: hidden; }
.today .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--crown-2), var(--crown)); border-radius: 99px; }
.small { font-size: 13px; color: var(--ink-3); }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.own-slot + .own-slot { margin-top: 18px; }
.own-slot h3 { font-size: 15px; color: var(--ink-2); margin-bottom: 8px; }
.own-row { display: flex; flex-wrap: wrap; gap: 8px; }
.own { width: 92px; min-height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--night); color: var(--ink); cursor: pointer; font: inherit; text-decoration: none; text-align: center; }
.own:hover { border-color: var(--neon); }
.own.on { border-color: var(--crown); box-shadow: 0 0 0 2px rgba(255,194,46,.35); }
.own small { font-size: 11px; color: var(--ink-2); line-height: 1.2; }
.own-prev { font-size: 26px; line-height: 1; min-height: 44px; display: grid; place-items: center; font-weight: 700; }
.own-more { border-style: dashed; color: var(--ink-3); }
.own-title { font: 8px var(--f-pixel); color: var(--neon); }
.own-banner { width: 70px; height: 40px; border-radius: 8px; min-height: 0; }
.acct-more { margin-top: 20px; }
.acct-more summary { cursor: pointer; font-weight: 700; }
.acct-more form, .acct-auth form { display: grid; gap: 12px; max-width: 380px; margin-top: 14px; }
.acct-body label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.acct-body input { height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--night); color: var(--ink); font: 16px var(--f-body); }
.acct-body input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(55,220,245,.2); }
.form-note { color: #ffb3bd; font-size: 14px; min-height: 1em; }
.form-note:empty { display: none; }
.acct-auth { max-width: 520px; }
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--night); border: 1px solid var(--line); border-radius: 12px; }
.seg button { border: 0; background: none; color: var(--ink-2); font: 600 14px var(--f-body); padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--crown); color: var(--night); }
.acct-why { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.acct-why ul { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--ink-2); }
.social-btns { display: grid; gap: 10px; max-width: 380px; margin-top: 16px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 10px; font: 600 15px var(--f-body); text-decoration: none; border: 1px solid transparent; transition: filter .15s, transform .15s; }
.social-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.social-btn:focus-visible { outline: 3px solid var(--neon); outline-offset: 2px; }
.social-btn svg { width: 20px; height: 20px; flex: none; }
.social-google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.social-facebook { background: #1877f2; color: #fff; }
.social-or { display: flex; align-items: center; gap: 12px; max-width: 380px; margin: 16px 0 0; color: var(--ink-3); font-size: 13px; }
.social-or::before, .social-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.social-pick { display: flex; gap: 14px; align-items: flex-start; }
.social-pick h2 { margin: 0 0 4px; }
.social-pick-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none; }
.social-pick-ico svg { width: 22px; height: 22px; }
.social-linked { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.social-linked h3 { margin: 0 0 10px; font-size: 15px; }
.social-linked ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; max-width: 420px; }
.social-linked li { display: flex; align-items: center; gap: 12px; }
.social-linked li b { flex: 1; }
.social-linked .social-pick-ico { width: 34px; height: 34px; }

.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.shop-bar > div { display: flex; align-items: center; gap: 12px; }
.shop-bar > div > div { display: grid; gap: 2px; }
.shop-coins { font-family: var(--f-display); font-size: 28px; color: var(--crown); }
.shop-sec { margin-top: 36px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-top: 14px; }
.shop-item { display: flex; flex-direction: column; gap: 6px; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.shop-item.owned { border-color: rgba(255,194,46,.45); }
.shop-item .btn { margin-top: auto; justify-content: center; }
.shop-item .btn[aria-disabled="true"] { filter: grayscale(.7); opacity: .65; }
.shop-prev { height: 96px; display: grid; place-items: center; background: var(--night); border-radius: 10px; margin-bottom: 6px; overflow: hidden; }
.mini-card { width: 100%; height: 100%; display: flex; align-items: center; padding-left: 14px; }
.mini-title { display: flex; align-items: center; gap: 10px; }
.mini-title > span { display: grid; gap: 4px; }
.mini-title i { font: 8px var(--f-pixel); font-style: normal; color: var(--night); background: var(--neon); padding: 4px 6px; border-radius: 4px; }
.mini-chat { font-size: 15px; padding: 0 8px; text-align: center; }
.mini-chat > span:last-child { color: var(--ink-2); }

/* chat: account names */
.chat-msg b a { color: inherit; text-decoration: none; }
.chat-msg b a:hover .pf-name { text-decoration: underline; }
.chat-who { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; padding: 4px 2px; }
@media (prefers-reduced-motion: reduce) { .nc-c-rainbow, .fr-f-fire, .acct-pill.bump .pill-coins b, .coin-pop { animation: none; } }
.pf-card { padding-top: 46px; }
.chat-pop .chat-who { width: 100%; flex: 1 1 100%; }
@media (max-width: 860px) {
  .search { flex: 1 1 0; }
  .acct-pill { padding-right: 10px; gap: 6px; }
}
@media (max-width: 420px) { .acct-pill .pill-in { padding-left: 4px; font-size: 14px; } .acct-pill .pf-av-sm { --s: 26px; } }

/* ---------- Homepage leaderboards ---------- */
.boards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .boards { grid-template-columns: minmax(0, 1fr); } }
.board { display: flex; flex-direction: column; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; min-width: 0; }
.board-head { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); background: linear-gradient(180deg, rgba(55,220,245,.06), transparent); }
a.board-head:hover h3 { color: var(--neon); }
.board-head img { width: 64px; height: 40px; object-fit: cover; border-radius: 8px; flex: none; }
.board-ico { width: 64px; height: 40px; display: grid; place-items: center; font-size: 24px; background: var(--night); border-radius: 8px; flex: none; }
.board-head h3 { font-size: 16px; line-height: 1.2; }
.board-head span { font-size: 12px; color: var(--ink-3); }
.board-rows { list-style: none; margin: 0; padding: 8px 12px; display: grid; gap: 2px; flex: 1; }
.board-rows li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; font-size: 14px; }
.board-rows li.first { background: rgba(255,194,46,.1); box-shadow: inset 3px 0 0 var(--crown); }
.board-rows li.first b { color: var(--crown); }
.board-rows .rk { text-align: center; font-weight: 700; color: var(--ink-3); }
.board-rows .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.board-rows .nm a { color: inherit; text-decoration: none; }
.board-rows b { font-variant-numeric: tabular-nums; }
.board-rows .board-wait { display: block; color: var(--ink-3); font-size: 14px; padding: 12px 8px; }
.board-play { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 4px 12px 12px; height: 38px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.board-play:hover { border-color: var(--crown); color: var(--crown); }
.board-play svg { width: 16px; height: 16px; fill: currentColor; }
.hero { overflow-x: clip; }

/* ---------- Tags, daily bonus, achievements, ways to earn ---------- */
.gp-tag { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 5px; font: 700 10px/1.3 var(--f-body); letter-spacing: .06em; vertical-align: 2px; white-space: nowrap; -webkit-text-fill-color: currentColor; }
.gp-tag-admin { background: linear-gradient(180deg, #ff5a6a, #d61f35); color: #fff; box-shadow: 0 0 10px rgba(255,77,94,.45); }
.gp-tag-mod { background: linear-gradient(180deg, #5b8cff, #2c5be0); color: #fff; }
.gp-tag-vip { background: linear-gradient(180deg, #c58bff, #8b3dff); color: #fff; }
.pf-who h2 .gp-tag { font-size: 12px; vertical-align: 6px; }
.acct-pill .pill-gift { margin-left: -2px; animation: giftBob 1.6s ease-in-out infinite; }
@keyframes giftBob { 50% { transform: translateY(-3px) rotate(-8deg); } }
.acct-daily { display: flex; align-items: center; gap: 14px; }
.acct-daily > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.acct-daily-ico { font-size: 30px; }
.acct-daily.ready { border-color: var(--crown); box-shadow: 0 0 0 1px rgba(255,194,46,.35), 0 0 24px rgba(255,194,46,.12); }
.acct-daily-done { color: var(--btn-a); font-weight: 700; font-size: 20px; }
.ach { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ach li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--night); border: 1px solid var(--line); opacity: .7; }
.ach li.done { opacity: 1; border-color: rgba(255,194,46,.45); }
.ach-ico { font-size: 20px; text-align: center; }
.ach b { display: block; font-size: 14px; }
.ach li span:not(.ach-ico) { font-size: 12px; color: var(--ink-3); }
.ach em { font-style: normal; font-weight: 700; color: var(--crown); font-size: 13px; }
.earn ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.earn li { display: flex; gap: 10px; align-items: flex-start; background: var(--night); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.earn li > span { font-size: 22px; line-height: 1; }
.earn li b { display: block; color: var(--ink); font-size: 14px; }
.acct-body > .panel, .acct-body > .acct-daily { margin-top: 16px; }
/* leaderboards: 3 game boards on one row, the 2 player boards under them */
.boards { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.boards .board { grid-column: span 2; }
.boards .board-ppl { grid-column: span 2; }
@media (max-width: 1000px) { .boards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .boards .board, .boards .board-ppl { grid-column: auto; } }
@media (max-width: 560px) { .boards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Levels ---------- */
.lv { display: inline-block; margin-left: 5px; min-width: 20px; padding: 1px 5px; border-radius: 5px; font: 700 10px/1.4 var(--f-body); text-align: center; vertical-align: 2px;
  color: var(--night); background: var(--neon); -webkit-text-fill-color: var(--night); white-space: nowrap; }
.lv::before { content: "Lv "; opacity: .75; }
.pf-who h2 .lv { font-size: 12px; vertical-align: 6px; }
.lvl { display: flex; align-items: center; gap: 16px; }
.lvl > div { flex: 1; display: grid; gap: 4px; min-width: 0; }
.lvl .bar { height: 12px; border-radius: 99px; background: var(--night); border: 1px solid var(--line); overflow: hidden; }
.lvl .bar i { display: block; height: 100%; background: linear-gradient(90deg, #1aa6c4, var(--neon)); border-radius: 99px; }
.lvl-num { width: 64px; height: 64px; flex: none; border-radius: 16px; display: grid; place-items: center; align-content: center; font-family: var(--f-display); font-size: 26px; line-height: 1;
  color: var(--night); background: linear-gradient(180deg, #8ff4ff, var(--neon)); box-shadow: 0 0 18px rgba(55,220,245,.4); }
.lvl-num small { font: 9px var(--f-pixel); margin-bottom: 3px; }
.rename { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.rename > div { flex: 1 1 220px; display: grid; gap: 2px; }
.rename-ico { font-size: 30px; }
.rename form { flex: 1 1 320px; display: flex; gap: 10px; }
.rename input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--night); color: var(--ink); font: 16px var(--f-body); }
.rename input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 0 3px rgba(55,220,245,.2); }
.rename .btn[aria-disabled="true"] { filter: grayscale(.7); opacity: .65; }
.rename .form-note { flex-basis: 100%; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* Count Combo, the site mascot */
.mascot-hi { display: flex; align-items: center; gap: 28px; padding: 22px 28px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(120deg, rgba(139,61,255,.18), rgba(14,23,64,.7) 60%); }
.mascot-hi img { width: 150px; height: auto; flex: none; filter: drop-shadow(0 10px 24px rgba(139,61,255,.45)); animation: mascotBob 3.2s ease-in-out infinite; }
.mascot-hi .pix { font-size: 10px; letter-spacing: .14em; color: var(--neon); text-transform: uppercase; }
.mascot-hi h2 { margin: 10px 0 8px; font-size: clamp(24px, 3.4vw, 34px); }
.mascot-hi p { color: var(--ink-2); font-size: 17px; max-width: 56ch; margin: 0; }
.mascot-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mascot-head > div { display: flex; flex-direction: column; gap: 12px; }
.mascot-head img { width: 140px; height: auto; flex: none; filter: drop-shadow(0 10px 24px rgba(255,194,46,.3)); }
.mascot-sad { width: 150px; height: auto; margin: 0 auto 6px; display: block; }
@keyframes mascotBob { 50% { transform: translateY(-8px); } }
@media (max-width: 640px) {
  .mascot-hi { flex-direction: column; text-align: center; padding: 20px 16px; gap: 14px; }
  .mascot-hi img { width: 120px; }
  .mascot-head img { width: 96px; }
}
@media (prefers-reduced-motion: reduce) { .mascot-hi img { animation: none; } }

/* ================= Design polish, round 2 ================= */
::selection { background: var(--royal); color: #fff; }
html { scrollbar-color: var(--royal-2) var(--night); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--night); }
::-webkit-scrollbar-thumb { background: var(--royal-2); border: 3px solid var(--night); border-radius: 8px; }

/* Header gets a deeper glass and a glow once the page scrolls */
.top { transition: background .25s, box-shadow .25s; }
.top.scrolled { background: rgba(8, 13, 38, .92); box-shadow: 0 10px 30px rgba(0,0,0,.35), 0 1px 0 rgba(55,220,245,.18); }
.nav a { position: relative; }
.nav a[aria-current="page"] { box-shadow: 0 3px 0 var(--crown-2), 0 0 18px rgba(255,194,46,.35); }

/* Section eyebrows */
.sec-eye { display: block; color: var(--crown); margin-bottom: 10px; font-size: 9px; }
.sec-eye::before { content: "▶ "; color: var(--neon); }

/* Hero: ambient pixels, stats, cabinet base */
.hero { position: relative; overflow: hidden; }
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid { position: relative; }
.hero h1 { text-shadow: 0 4px 0 rgba(0,0,0,.35); }
.hero h1 .gold { filter: drop-shadow(0 4px 0 #6a3d00) drop-shadow(0 0 24px rgba(255,194,46,.25)); }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(14,23,64,.55); max-width: 460px; overflow: hidden; }
.hero-stats div { padding: 10px 12px; display: flex; flex-direction: column-reverse; gap: 2px; border-left: 1px solid var(--line); }
.hero-stats div:first-child { border-left: 0; }
.hero-stats dd { margin: 0; font: 400 24px/1 var(--f-display); color: var(--crown); font-variant-numeric: tabular-nums; }
.hero-stats dt { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.cabinet-base {
  margin: 14px auto 0; width: 62%; height: 34px; border-radius: 0 0 16px 16px;
  background: linear-gradient(180deg, var(--royal-2), #3a1384); border: 2px solid var(--neon); border-top: 0;
  display: flex; align-items: center; justify-content: center; gap: 14px; color: #fff;
  box-shadow: 0 16px 30px rgba(0,0,0,.4); transform: perspective(600px) rotateX(18deg);
}
.cabinet-base .pix { font-size: 8px; color: var(--crown); }
.cabinet-base .led { width: 8px; height: 8px; border-radius: 50%; background: var(--btn-a); box-shadow: 0 0 10px var(--btn-a); animation: blink 1.6s steps(2) infinite; }
.cabinet-base .coin { width: 16px; height: 6px; border-radius: 3px; background: #111a44; box-shadow: inset 0 0 0 1px var(--crown); }
@keyframes blink { 50% { opacity: .25; } }

/* Ticker edges fade out */
.ticker { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }

/* Category tiles: a big faint icon watermark and a light sweep on hover */
.cat { isolation: isolate; }
.cat > svg:first-child { position: relative; z-index: 1; }
.cat::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, color-mix(in srgb, var(--c) 22%, transparent) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s ease;
}
.cat:hover::before { transform: translateX(120%); }
.cat .wm { position: absolute; right: -14px; bottom: -18px; width: 104px !important; height: 104px !important; opacity: .1; transform: rotate(-12deg); stroke-width: 1.6 !important; transition: transform .4s, opacity .3s; }
.cat:hover .wm { opacity: .2; transform: rotate(-4deg) scale(1.06); }

/* Game cards: shine sweep, gold corner for new games */
.card-art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%);
  transform: translateX(-130%); transition: transform .7s ease;
}
.card:hover .card-art::after { transform: translateX(130%); }
.card-art { box-shadow: inset 0 -40px 40px -30px rgba(10,17,48,.9); }
.card-body h3 { transition: color .2s; }
.card:hover .card-body h3 { color: var(--crown); }
.fav-btn { transition: transform .15s, color .15s; }
.fav-btn:hover { transform: scale(1.1); }
.fav-btn[aria-pressed="true"] { animation: pulseHeart .35s ease-out; }
@keyframes pulseHeart { 50% { transform: scale(1.3); } }

/* "How it works" band */
.steps-band {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 2fr) auto; gap: 32px; align-items: center;
  padding: 32px; border-radius: 22px; position: relative; overflow: hidden;
  background: radial-gradient(600px 300px at 0% 0%, rgba(139,61,255,.35), transparent 70%), linear-gradient(135deg, var(--night-2), #1a1050);
  border: 1px solid color-mix(in srgb, var(--royal) 50%, var(--line));
}
.steps-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: repeating-linear-gradient(90deg, var(--crown) 0 8px, var(--royal) 8px 16px, var(--neon) 16px 24px, transparent 24px 32px); opacity: .7; }
.sb-head h2 { font-size: clamp(24px, 3vw, 32px); }
.sb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: sb; }
.sb-steps li { counter-increment: sb; display: flex; flex-direction: column; gap: 4px; padding-top: 44px; position: relative; min-width: 0; }
.sb-steps li::before { content: counter(sb); position: absolute; top: 0; left: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-family: var(--f-display); color: #2a1700; background: var(--crown); box-shadow: inset 0 -3px 0 var(--crown-2); }
.sb-steps b { font-size: 16px; }
.sb-steps span { color: var(--ink-2); font-size: 14px; }
@media (max-width: 980px) { .steps-band { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
@media (max-width: 600px) { .sb-steps { grid-template-columns: minmax(0, 1fr); } .sb-steps li { padding: 0 0 0 48px; } .steps-band { padding: 24px 20px; } }

/* Game page: an arcade marquee above the player */
.marquee {
  display: flex; align-items: center; justify-content: center; gap: 14px; height: 34px;
  background: linear-gradient(180deg, #2a0f6a, #160847); border-bottom: 2px solid var(--neon);
}
.marquee .pix { color: var(--crown); font-size: 9px; text-shadow: 0 0 10px rgba(255,194,46,.6); }
.marquee .bulbs { flex: 1; max-width: 240px; height: 8px;
  background: radial-gradient(circle, var(--crown) 0 3px, transparent 3.5px) 0 50% / 16px 8px repeat-x;
  animation: chase .8s steps(2) infinite; opacity: .9; }
@keyframes chase { to { background-position: 16px 50%; } }
.stage:fullscreen .marquee { display: none; }
.panel { position: relative; }
.panel h2 { display: flex; align-items: center; gap: 10px; }
.panel h2::before { content: ""; width: 8px; height: 8px; background: var(--crown); box-shadow: 8px 0 0 var(--royal); margin-right: 8px; }

/* Footer: pixel trim on top */
.foot { position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 4px;
  background: repeating-linear-gradient(90deg, var(--crown) 0 8px, transparent 8px 16px, var(--royal) 16px 24px, transparent 24px 32px, var(--neon) 32px 40px, transparent 40px 56px); opacity: .5; }

@media (max-width: 600px) {
  .hero-stats dd { font-size: 20px; }
  .hero-stats div { padding: 8px 10px; }
  .cabinet-base { width: 74%; }
}
.hero { padding-bottom: 36px; }

/* ================= Round 3: profile, leaderboard, ratings, header tools ================= */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link { color: var(--neon); text-decoration: none; }
.link:hover { text-decoration: underline; }
.link-gold { color: var(--crown); }
.av { display: block; border-radius: 8px; image-rendering: pixelated; }

/* Header tools */
.top-in { gap: 18px; }
.search { flex: 0 1 260px; }
.tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tool {
  height: 44px; min-width: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--night-2); color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
  font: 700 13px var(--f-body); letter-spacing: .06em; transition: color .15s, border-color .15s;
}
.tool:hover { color: var(--ink); border-color: var(--neon); }
.tool svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#snd-btn[aria-pressed="false"] { color: var(--ink-3); }
.tools .me {
  display: flex; align-items: center; gap: 8px; height: 44px; min-width: 44px; padding: 0 12px 0 5px; border-radius: 12px;
  background: var(--night-2); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink);
  max-width: 160px; transition: border-color .15s;
}
.tools .me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tools .me:hover, .tools .me[aria-current="page"] { border-color: var(--crown); }
.tools .me .av { border-radius: 7px; }
@media (max-width: 1180px) { .search kbd { display: none; } .search { flex-basis: 200px; } .tools .me span { display: none; } .tools .me { padding: 0 5px; } }
@media (max-width: 860px) {
  .tools { margin-left: auto; }
  .search { order: 4; flex: 1 1 100%; }
  .nav { order: 5; }
}

/* Hero carousel */
.hero-nav { position: relative; display: flex; align-items: center; gap: 14px; margin-top: 26px; }
.hn-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--night-2); color: var(--ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.hn-btn:hover { border-color: var(--crown); color: var(--crown); }
.hn-btn svg { width: 20px; height: 20px; }
.hn-dots { display: flex; gap: 4px; align-items: center; overflow-x: auto; scrollbar-width: none; max-width: calc(100% - 110px); }
.hn-dots::-webkit-scrollbar { display: none; }
.hn-dots button {
  position: relative; width: 44px; height: 44px; border: 0; padding: 0; border-radius: 6px; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.hn-dots button::after {
  content: ""; display: block; width: 12px; height: 12px; border-radius: 3px; background: var(--line); transition: width .25s, background .25s;
}
.hn-dots button[aria-current="true"]::after { width: 32px; background: var(--crown); }
.slide-in { animation: slideIn .45s cubic-bezier(.2,.7,.2,1); }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px); } }

/* Card meta: ratings */
.card-meta { flex-wrap: wrap; }
.rate-chip { display: inline-flex; align-items: center; gap: 4px; color: var(--crown); font-weight: 700; }
.mini-stars svg { width: 14px; height: 14px; fill: var(--crown); stroke: none; display: block; }

/* Rating box on the game page */
.rate {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 18px; padding: 16px 20px;
  background: linear-gradient(90deg, rgba(255,194,46,.08), transparent 60%), var(--night-2);
  border: 1px solid var(--line); border-radius: var(--r);
}
.rate-stars { display: flex; gap: 4px; }
.rate-stars button { width: 40px; height: 40px; padding: 6px; border: 0; background: none; cursor: pointer; color: var(--ink-3); transition: transform .12s, color .12s; }
.rate-stars svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.rate-stars button[aria-pressed="true"], .rate-stars button.hot { color: var(--crown); }
.rate-stars button[aria-pressed="true"] svg, .rate-stars button.hot svg { fill: currentColor; filter: drop-shadow(0 0 8px rgba(255,194,46,.5)); }
.rate-stars button:hover { transform: scale(1.15) rotate(-6deg); }
.rate-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rate-text b { font-size: 16px; }
.rate-text span { color: var(--ink-2); font-size: 14px; }
.rate-text .rate-sum { color: var(--ink-3); font-size: 13px; }

/* Leaderboard */
.board-card { margin-top: 24px; background: var(--night-2); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.bc-head { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
  background: radial-gradient(500px 160px at 0 0, rgba(139,61,255,.3), transparent 70%); }
.bc-head img { width: 96px; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; border: 2px solid var(--neon); }
.bc-head > div { flex: 1; min-width: 160px; }
.bc-head h2 { font-size: 22px; }
.bc-head p { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
#board-body { padding: 22px; }
.board-loading { color: var(--ink-3); padding: 30px 0; text-align: center; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; max-width: 620px; margin: 6px auto 28px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; text-align: center; }
.pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-av .av { border-radius: 12px; box-shadow: 0 0 0 3px var(--pc, var(--line)); }
.pod-score { font: 400 20px var(--f-display); color: var(--crown); font-variant-numeric: tabular-nums; }
.pod-block { width: 100%; display: grid; place-items: center; border-radius: 10px 10px 0 0; color: #2a1700; font-size: 18px;
  background: linear-gradient(180deg, var(--pc), color-mix(in srgb, var(--pc) 60%, #000)); }
.pod-1 { --pc: var(--crown); } .pod-1 .pod-block { height: 96px; }
.pod-2 { --pc: #c9d2ff; } .pod-2 .pod-block { height: 68px; }
.pod-3 { --pc: #ff9a3c; } .pod-3 .pod-block { height: 48px; }
.pod-1 .pod-av .av { width: 72px; height: 72px; }
.board-table td, .board-table th { padding: 10px 12px; }
.board-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.board-table .rank { width: 56px; color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
.board-table tbody tr:nth-child(1) .rank { color: var(--crown); }
.board-table tr.me td { background: rgba(255,194,46,.08); }
.board-table em { font-style: normal; font-size: 11px; font-weight: 700; color: #2a1700; background: var(--crown); padding: 1px 6px; border-radius: 99px; margin-left: 6px; }
.who { display: inline-flex; align-items: center; gap: 10px; }
.board-note { color: var(--ink-3); font-size: 13px; margin-top: 16px; max-width: 70ch; }
.filter[aria-selected] { cursor: pointer; }

/* Profile */
.profile-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 24px; margin-top: 24px; align-items: start; }
.profile-card { display: flex; flex-direction: column; gap: 14px; }
.pc-top { display: flex; align-items: center; gap: 16px; }
.pc-av .av { width: 96px; height: 96px; border-radius: 18px; box-shadow: 0 0 0 3px var(--neon), 0 0 30px rgba(55,220,245,.3); }
.pc-top b { display: block; font: 400 22px var(--f-display); word-break: break-word; }
.pc-top span { color: var(--ink-3); font-size: 14px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-weight: 700; font-size: 14px; }
.field input {
  height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--night);
  color: var(--ink); font: 600 16px var(--f-body); outline: none;
}
.field input:focus { border-color: var(--neon); box-shadow: 0 0 0 4px rgba(55,220,245,.15); }
.hint { color: var(--ink-3); font-size: 13px; margin-top: -6px; }
.av-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.av-grid button { padding: 3px; border-radius: 10px; border: 2px solid transparent; background: none; cursor: pointer; transition: transform .12s, border-color .12s; }
.av-grid button .av { width: 100%; height: auto; aspect-ratio: 1; }
.av-grid button:hover { transform: translateY(-2px); }
.av-grid button[aria-checked="true"] { border-color: var(--crown); box-shadow: 0 0 14px rgba(255,194,46,.35); }
.field .btn-sm { align-self: flex-start; }
.btn-sm svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.p-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; }
.p-stats div { background: var(--night-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column-reverse; gap: 4px; }
.p-stats dd { margin: 0; font: 400 28px/1 var(--f-display); color: var(--crown); font-variant-numeric: tabular-nums; }
.p-stats dt { color: var(--ink-3); font-size: 13px; font-weight: 600; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.badge { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 14px; border: 1px dashed var(--line); background: rgba(255,255,255,.015); min-width: 0; }
.badge .medal {
  flex: none; width: 52px; height: 52px; display: grid; place-items: center; font: 400 22px var(--f-display);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  background: repeating-linear-gradient(135deg, #1a2457 0 6px, #141d4c 6px 12px); color: transparent;
}
.badge b { display: block; font-size: 15px; }
.badge div span { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.35; }
.badge em { font-style: normal; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.badge.got { border-style: solid; border-color: color-mix(in srgb, var(--c) 45%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 12%, transparent), transparent 70%); }
.badge.got .medal { background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), var(--c); color: #1a1030; box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); }
.badge.got div span { color: var(--ink-2); }
@media (max-width: 900px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } .p-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .podium { gap: 8px; } .pod-score { font-size: 16px; } .pod b { font-size: 13px; } }
.cat-blurb { color: var(--ink-2); font-size: 14px; position: relative; z-index: 1; }

/* ---------- Round 4: privacy policy and contact ---------- */
.legal { max-width: 820px; padding: 32px 36px; }
.legal .legal-intro { font-size: 17px; color: var(--ink); }
.legal section { margin-top: 28px; }
.legal h2 { font-family: 'Bungee', sans-serif; font-weight: 400; font-size: 19px; letter-spacing: .01em; margin-bottom: 10px; color: var(--ink); }
.legal p, .legal li { color: var(--ink-2); line-height: 1.65; }
.legal p + p, .legal ul + p { margin-top: 10px; }
.legal ul { margin: 10px 0 0; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.legal li { position: relative; padding-left: 22px; }
.legal li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; background: var(--crown); box-shadow: 0 0 8px rgba(255,194,46,.5); }
.legal a, .about-grid a { overflow-wrap: anywhere; }
.about-grid .panel h2 { font-family: 'Bungee', sans-serif; font-weight: 400; font-size: 18px; margin: 22px 0 8px; }
@media (max-width: 600px) { .legal { padding: 22px 18px; } .legal h2 { font-size: 17px; } }
.data-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 20px; }
.data-panel h2 { margin-bottom: 4px; }
.data-panel p { color: var(--ink-2); font-size: 14px; }
.btn-danger { flex: none; }
.btn-danger:hover, .btn-danger.armed { border-color: #ff5470; color: #ff8aa0; }
.btn-danger.armed { background: rgba(255,84,112,.12); }
.tips { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
.tips li { position: relative; padding-left: 30px; color: var(--ink-2); line-height: 1.55; }
.tips li::before { content: '★'; position: absolute; left: 4px; top: 0; color: var(--crown); text-shadow: 0 0 8px rgba(255,194,46,.5); }
@media (max-width: 600px) { .data-panel { flex-direction: column; align-items: flex-start; } }

/* ---------- Round 5: blog and FAQ ---------- */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 18px; }
.post-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.post-card { display: flex; flex-direction: column; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .2s, border-color .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--crown); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.post-card .pc-img { aspect-ratio: 1200 / 630; overflow: hidden; background: var(--night); }
.post-card .pc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.post-card:hover .pc-img img { transform: scale(1.04); }
.post-card .pc-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.post-card time { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.post-card b { font-size: 18px; line-height: 1.3; }
.post-card .pc-body > span:not(.more) { color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.post-card .more { margin-top: auto; padding-top: 6px; color: var(--crown); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.post-card .more svg { width: 16px; height: 16px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-2); }
.post-meta span { color: var(--ink-3); }
.post { max-width: 820px; padding: 0 0 30px; overflow: hidden; }
.post-cover { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.post > :not(.post-cover) { margin-left: 36px; margin-right: 36px; }
.post .post-lead { font-size: 18px; color: var(--ink); margin-top: 26px; line-height: 1.6; }
.post h2 { font-family: 'Bungee', sans-serif; font-weight: 400; font-size: 20px; margin-top: 28px; margin-bottom: 10px; }
.post p { color: var(--ink-2); line-height: 1.7; margin-top: 12px; }
.post ul { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 8px; }
.post li { position: relative; padding-left: 22px; color: var(--ink-2); line-height: 1.6; }
.post li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; background: var(--crown); box-shadow: 0 0 8px rgba(255,194,46,.5); }
.post-nav { max-width: 820px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; margin-top: 22px; }
.post-nav > a:not(.btn) { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; }
.post-nav > a:not(.btn):hover { color: var(--crown); }
.post-nav small { color: var(--ink-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.post-nav .older { text-align: right; }
.faq { max-width: 860px; margin-top: 18px; }
.faq .panel h2 { margin-bottom: 8px; }
.qa { border-top: 1px solid var(--line); }
.qa:first-of-type { border-top: 0; }
.qa summary { list-style: none; cursor: pointer; padding: 15px 36px 15px 0; position: relative; font-weight: 600; font-size: 16px; color: var(--ink); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--night); border: 1px solid var(--line); color: var(--crown); font-weight: 700; transition: transform .2s; }
.qa[open] summary::after { content: '−'; }
.qa summary:hover { color: var(--crown); }
.qa summary:focus-visible { outline: 2px solid var(--crown); outline-offset: 2px; border-radius: 6px; }
.qa > div { padding: 0 36px 16px 0; }
.qa p { color: var(--ink-2); line-height: 1.65; }
.faq-more { margin-top: 22px; color: var(--ink-2); }
@media (max-width: 900px) { .post-row { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
@media (max-width: 600px) {
  .post-list { grid-template-columns: minmax(0, 1fr); }
  .post > :not(.post-cover) { margin-left: 18px; margin-right: 18px; }
  .post-nav { grid-template-columns: 1fr 1fr; }
  .post-nav .btn { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
/* Six nav links: keep them on one line, tighten on mid-size screens, and stack the header earlier */
.nav a { white-space: nowrap; }
@media (max-width: 1360px) { .nav { gap: 2px; } .nav a { padding: 8px 10px; font-size: 14px; } }
@media (max-width: 1180px) { .search { flex-basis: 170px; } }
@media (max-width: 1060px) {
  .top-in { flex-wrap: wrap; gap: 10px 14px; }
  .tools { margin-left: auto; }
  .search { order: 4; flex: 1 1 100%; }
  .nav { order: 5; width: 100%; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
  .nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 1180px) { .search input { padding-right: 12px; } }

/* ---------- Round 6: language menu ---------- */
.lang-wrap { position: relative; }
.lang-btn { display: flex; align-items: center; gap: 6px; }
.lang-btn svg { width: 17px; height: 17px; }
.lang-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--crown); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 190px; padding: 6px;
  background: var(--night-2); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02); display: grid; gap: 2px;
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 9px;
  background: none; color: var(--ink-2); font: 600 14px var(--f-body); text-align: left; cursor: pointer;
}
.lang-menu button b { width: 28px; font-size: 11px; letter-spacing: .08em; color: var(--ink-3); }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--night-3); color: var(--ink); outline: none; }
.lang-menu button[aria-checked="true"] { color: var(--crown); }
.lang-menu button[aria-checked="true"] b { color: var(--crown); }
.lang-menu button[aria-checked="true"]::after { content: '✓'; margin-left: auto; color: var(--crown); }
@media (max-width: 860px) { .lang-btn svg { display: none; } }
/* Long words (German, Turkish) must never push the page sideways on phones */
h1, h2, h3 { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.hero-stats { max-width: 540px; }
.hero-stats dt { letter-spacing: .04em; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; line-height: 1.25; }
@media (max-width: 480px) {
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stats div:nth-child(3) { border-left: 0; }
  .hero-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Daily challenge */
.daily {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center;
  padding: 24px 28px; border-radius: 20px; position: relative; overflow: hidden;
  background: radial-gradient(520px 260px at 100% 0%, rgba(255,154,60,.22), transparent 70%), linear-gradient(135deg, var(--night-2), #1a1446);
  border: 1px solid color-mix(in srgb, #ff9a3c 45%, var(--line));
}
.panel + .daily, .daily + .panel { margin-top: 20px; }
.play-wrap .daily { margin-bottom: 20px; }
.daily h2 { font-size: clamp(22px, 2.6vw, 30px); overflow-wrap: break-word; }
.daily .dl-main > p { color: var(--ink-2); margin: 6px 0 14px; font-size: 15px; }
.dl-bar { height: 14px; border-radius: 7px; background: var(--night); border: 1px solid var(--line); overflow: hidden; }
.dl-bar i { display: block; height: 100%; min-width: 0; background: repeating-linear-gradient(90deg, var(--crown) 0 10px, #ffb627 10px 20px); box-shadow: 0 0 12px rgba(255,194,46,.5); transition: width .4s; }
.daily.done .dl-bar i { background: var(--btn-a); box-shadow: 0 0 12px rgba(60,207,110,.5); }
.dl-count { display: block; margin-top: 8px; color: var(--ink-3); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dl-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; min-width: 0; }
.dl-streak { display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.dl-streak svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.8; flex: none; }
.dl-streak.lit { color: #ff9a3c; }
.dl-streak.lit svg { fill: rgba(255,154,60,.25); filter: drop-shadow(0 0 8px rgba(255,154,60,.6)); }
.dl-streak b { font: 400 34px/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.dl-streak span { display: flex; flex-direction: column; font-weight: 600; font-size: 14px; color: var(--ink-2); line-height: 1.25; }
.dl-streak small { color: var(--ink-3); font-size: 12px; }
.dl-week { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.dl-week li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; }
.dl-week i { width: 22px; height: 22px; border-radius: 6px; background: var(--night); border: 1px solid var(--line); }
.dl-week .hit i { background: #ff9a3c; border-color: #ff9a3c; box-shadow: inset 0 -3px 0 #d0671c; }
.dl-week .today span { color: var(--crown); }
.dl-week .today i { outline: 2px solid var(--crown); outline-offset: 1px; }
.dl-tomorrow { font-size: 9px; color: var(--btn-a); }
@media (max-width: 760px) {
  .daily { grid-template-columns: minmax(0, 1fr); padding: 22px 20px; }
  .dl-side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; justify-content: space-between; width: 100%; }
}

/* Random, install and the "Surprise me" button */
.page-head > .btn { align-self: flex-start; }
.sb-cta { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.foot-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--ink-2); text-align: left; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; }
.foot-btn:hover { color: var(--neon); }
[hidden] { display: none !important; }

/* ---------- Header search: the bar has no room for a full box, so on desktop it is an icon that opens over the menu ---------- */
@media (min-width: 1321px) {
  .top-in { gap: 14px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 14px; }
  .tools .me span { display: none; }
  .tools .me { padding: 0 5px; }
  .search { flex: 0 0 42px; width: 42px; height: 42px; }
  .search kbd { display: none; }
  .search svg { z-index: 2; transition: left .18s ease, stroke .15s; }
  .search input { position: absolute; right: 0; top: 0; width: 42px; padding: 0 0 0 42px; cursor: pointer; z-index: 1; transition: width .18s ease, border-color .15s, box-shadow .15s; }
  .search input::placeholder { color: transparent; }
  .search:hover input { border-color: var(--neon); }
  .search:hover svg { stroke: var(--ink); }
  .search:focus-within input { width: 320px; padding: 0 14px 0 40px; cursor: text; }
  .search:focus-within input::placeholder { color: var(--ink-3); }
  .search:focus-within svg { left: -266px; }
  .q-results { left: auto; right: 0; width: 320px; }
}
@media (prefers-reduced-motion: reduce) { .search svg, .search input { transition: none; } }

/* Japanese and Korean: the display fonts stay for Latin letters and each system's own font draws the rest */
html:lang(ja) {
  --f-display: 'Bungee', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans JP', Meiryo, sans-serif;
  --f-body: 'Chakra Petch', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Noto Sans JP', Meiryo, sans-serif;
  --f-pixel: 'Press Start 2P', 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', Meiryo, monospace;
  line-break: strict;
}
html:lang(ko) {
  --f-display: 'Bungee', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --f-body: 'Chakra Petch', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --f-pixel: 'Press Start 2P', 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', monospace;
  word-break: keep-all; overflow-wrap: anywhere;
}
html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3,
html:lang(ko) h1, html:lang(ko) h2, html:lang(ko) h3 { font-weight: 800; font-synthesis: none; letter-spacing: 0; }
.lang-menu { max-height: calc(100vh - 90px); overflow-y: auto; }

/* ---------- Bottom bar navigation & compact phone header (Item 30) ---------- */
.bottom-bar, .more-sheet { display: none; }

@media (max-width: 600px) {
  .top {
    position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  }
  .top-in {
    flex-wrap: nowrap !important;
    gap: 8px !important;
    padding-block: 6px !important;
    padding-inline: 10px !important;
  }
  .top-in .brand { flex: 0 0 auto; gap: 6px; min-height: 44px; display: inline-flex; align-items: center; }
  .top-in .brand img { width: 30px; height: auto; }
  .top-in .brand-word { font-size: 15px; }
  .top-in .brand-word small { display: none; }
  .top-in .nav { display: none !important; }
  .top-in .acct-pill { display: none !important; }
  .top-in .search {
    order: 2 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    width: auto !important;
    height: 44px !important;
  }
  .top-in .search input {
    position: relative !important;
    width: 100% !important;
    height: 44px !important;
    font-size: 13.5px !important;
    padding: 0 8px 0 32px !important;
    border-radius: 10px !important;
    cursor: text !important;
  }
  .top-in .search input::placeholder { color: var(--ink-3) !important; }
  .top-in .search svg {
    left: 8px !important;
    top: 50% !important;
    translate: 0 -50% !important;
    width: 16px !important;
    height: 16px !important;
  }
  .top-in .tools {
    order: 3 !important;
    gap: 4px !important;
    margin-left: 0 !important;
    flex: 0 0 auto !important;
  }
  .top-in .tool {
    height: 44px !important;
    min-width: 44px !important;
    padding: 0 4px !important;
    border-radius: 10px !important;
  }
  .top-in #rand-btn { display: none !important; }
  .top-in #snd-btn { display: none !important; }
  .top-in .lang-btn { font-size: 11.5px; padding: 0 6px; min-width: 44px !important; height: 44px !important; }
  .top-in .me { height: 44px !important; min-width: 44px !important; padding: 0 4px; display: grid; place-items: center; }
  .top-in .me .av { width: 28px; height: 28px; }

  /* Fixed bottom bar on phones */
  .bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 95;
    background: rgba(10, 17, 48, 0.96);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-top: 1px solid var(--line);
    align-items: stretch;
    justify-content: space-around;
    padding-top: 5px;
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  }
  .bottom-bar a, .bottom-bar button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 1px;
    color: var(--ink-2);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    transition: color .15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-bar svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .bottom-bar a:hover, .bottom-bar button:hover { color: var(--ink); }
  .bottom-bar a[aria-current="page"] { color: var(--crown); }
  .bottom-bar a[aria-current="page"] svg { stroke: var(--crown); }

  /* More sheet modal */
  .more-sheet {
    position: fixed; inset: 0; z-index: 100;
    display: flex; flex-direction: column; justify-content: flex-end;
  }
  .more-sheet[hidden] { display: none !important; }
  .more-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .more-card {
    position: relative; z-index: 1;
    background: var(--night-2);
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 40px rgba(0,0,0,.6);
    max-height: 80vh; overflow-y: auto;
  }
  .more-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 10px;
  }
  .more-title { font-family: var(--f-display); font-size: 18px; color: var(--crown); text-transform: uppercase; }
  .more-close {
    background: var(--night-3); border: 1px solid var(--line); border-radius: 50%;
    width: 32px; height: 32px; color: var(--ink-2); cursor: pointer; font-size: 15px;
    display: grid; place-items: center; font-family: inherit;
  }
  .more-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .more-links a {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    background: var(--night); border: 1px solid var(--line); border-radius: 12px;
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; min-height: 44px;
  }
  .more-links a svg { width: 20px; height: 20px; stroke: var(--neon); fill: none; stroke-width: 2; flex: none; }
  .more-links a:hover { border-color: var(--neon); background: var(--night-3); }

  main#view {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }
}

/* Signed in: the guest profile (the local name/avatar card and the pixel-avatar Profile button) is hidden;
   the account card and the coins pill take its place. Signed-out visitors still see it. */
.signed-in .tools .me, .signed-in #profile-form { display: none !important; }
.signed-in .profile-grid { grid-template-columns: minmax(0, 1fr); }

/* ---------- Shop: more name colours ---------- */
.nc-c-orange { color: #ff9b3d !important; }
.nc-c-lavender { color: #c9a6ff !important; }
.nc-c-ice { color: #a8ecff !important; text-shadow: 0 0 8px rgba(168,236,255,.45); }
.nc-c-red { color: #ff4d5e !important; }
.nc-c-ocean, .nc-c-toxic, .nc-c-aurora, .nc-c-candy, .nc-c-lava, .nc-c-platinum { -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; }
.nc-c-ocean { background-image: linear-gradient(90deg, #37dcf5, #3d6bff); }
.nc-c-toxic { background-image: linear-gradient(90deg, #d8ff3d, #3ccf6e); filter: drop-shadow(0 0 5px rgba(166,255,77,.4)); }
.nc-c-candy { background-image: linear-gradient(90deg, #ff8ac8, #fff, #8be8ff); }
.nc-c-lava { background-image: linear-gradient(90deg, #ff3b30, #ffb02e, #ff3b30); background-size: 200% 100%; animation: rainbow 2.4s linear infinite; }
.nc-c-aurora { background-image: linear-gradient(90deg, #3ccf6e, #37dcf5, #8b3dff, #3ccf6e); background-size: 200% 100%; animation: rainbow 4s linear infinite; }
.nc-c-platinum { background-image: linear-gradient(100deg, #9aa3c7 20%, #ffffff 45%, #9aa3c7 70%); background-size: 200% 100%; animation: rainbow 2.6s linear infinite; filter: drop-shadow(0 0 6px rgba(255,255,255,.35)); }

/* ---------- Shop: more avatar frames ---------- */
.fr-f-ice { border-color: #a8ecff; box-shadow: 0 0 0 2px rgba(168,236,255,.25), 0 0 14px rgba(168,236,255,.7); background: radial-gradient(circle at 35% 30%, #3a6aa8, #13254d); }
.fr-f-toxic { border-color: #a6ff4d; box-shadow: 0 0 12px rgba(166,255,77,.75), inset 0 0 8px rgba(166,255,77,.35); }
.fr-f-pink { border-color: #ff5fc0; border-style: dotted; box-shadow: 0 0 0 2px rgba(255,95,192,.3), 0 0 14px rgba(255,95,192,.6); }
.fr-f-shadow { border-color: #3b2a6e; box-shadow: 0 0 0 2px #000, 0 0 16px 4px rgba(0,0,0,.85), 0 0 26px rgba(139,61,255,.5); background: radial-gradient(circle at 35% 30%, #2b1a4f, #05030d); }
.fr-f-rainbow { border-color: transparent; background: radial-gradient(circle at 35% 30%, #2a3a8a, #121b4d) padding-box, conic-gradient(from var(--fr-a, 0deg), #ff4d5e, #ffd23f, #3ccf6e, #37dcf5, #8b3dff, #ff4d5e) border-box; animation: frSpin 4s linear infinite; }
@property --fr-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes frSpin { to { --fr-a: 360deg; } }
.fr-f-diamond { border-color: #dff6ff; box-shadow: 0 0 0 2px var(--night), 0 0 0 4px #9fe6ff, 0 0 22px rgba(159,230,255,.75); background: radial-gradient(circle at 35% 30%, #4a8ad6, #10285a); }
.fr-f-diamond::before { content: "💎"; position: absolute; top: calc(var(--s) * -.34); font-size: calc(var(--s) * .3); line-height: 1; }
.pf-av-xs.fr-f-diamond::before { display: none; }

/* ---------- Shop: more profile banners ---------- */
.bn-bn-hills { background: linear-gradient(180deg, rgba(10,17,48,0) 35%, rgba(10,17,48,.85) 85%), radial-gradient(ellipse 60% 40% at 20% 100%, #1f9a5a 98%, transparent 100%), radial-gradient(ellipse 55% 45% at 75% 100%, #2fbf6a 98%, transparent 100%), radial-gradient(circle at 80% 25%, #fff6c8 0 18px, transparent 19px), linear-gradient(180deg, #37b4f5, #9fe6ff); }
.bn-bn-ocean { background: linear-gradient(180deg, rgba(10,17,48,0) 25%, rgba(10,17,48,.85) 85%), repeating-radial-gradient(circle at 50% 120%, rgba(255,255,255,.12) 0 3px, transparent 3px 26px), linear-gradient(180deg, #0a6fb0, #0b2e6b 70%, #081a40); }
.bn-bn-city { background: linear-gradient(180deg, rgba(10,17,48,0) 40%, rgba(10,17,48,.85) 90%),
  repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,210,63,.55) 7px 9px) 8% 100% / 14% 62% no-repeat,
  repeating-linear-gradient(0deg, transparent 0 7px, rgba(55,220,245,.5) 7px 9px) 30% 100% / 12% 80% no-repeat,
  repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,95,192,.5) 7px 9px) 55% 100% / 16% 52% no-repeat,
  repeating-linear-gradient(0deg, transparent 0 7px, rgba(255,210,63,.5) 7px 9px) 80% 100% / 13% 72% no-repeat,
  linear-gradient(#141d52, #141d52) 8% 100% / 18% 64% no-repeat, linear-gradient(#1a2466, #1a2466) 30% 100% / 16% 82% no-repeat,
  linear-gradient(#141d52, #141d52) 55% 100% / 20% 54% no-repeat, linear-gradient(#1a2466, #1a2466) 80% 100% / 17% 74% no-repeat,
  linear-gradient(#10184a, #10184a) 100% 100% / 14% 40% no-repeat, linear-gradient(#10184a, #10184a) 0 100% / 8% 36% no-repeat,
  linear-gradient(180deg, #2b0d6b, #ff3c9a 78%, #ffb03a); }
.bn-bn-aurora { background: linear-gradient(180deg, rgba(10,17,48,0) 25%, rgba(10,17,48,.85) 85%), radial-gradient(ellipse 70% 35% at 30% 30%, rgba(60,207,110,.75), transparent 70%), radial-gradient(ellipse 60% 30% at 70% 40%, rgba(55,220,245,.6), transparent 70%), radial-gradient(ellipse 50% 30% at 55% 20%, rgba(139,61,255,.6), transparent 70%), #050a22; }
.bn-bn-lava { background: linear-gradient(180deg, rgba(10,17,48,0) 25%, rgba(10,17,48,.82) 85%), radial-gradient(circle at 20% 70%, #ffb02e 0 14px, transparent 15px), radial-gradient(circle at 65% 55%, #ffd23f 0 9px, transparent 10px), radial-gradient(circle at 85% 80%, #ff7a2e 0 18px, transparent 19px), linear-gradient(180deg, #2a0505, #8a1300 55%, #ff4a1c); }
.bn-bn-matrix { background: linear-gradient(180deg, rgba(10,17,48,0) 25%, rgba(10,17,48,.88) 85%), repeating-linear-gradient(90deg, rgba(60,255,120,.0) 0 14px, rgba(60,255,120,.55) 14px 16px, rgba(60,255,120,0) 16px 30px), repeating-linear-gradient(180deg, rgba(0,0,0,.55) 0 6px, transparent 6px 12px), #02140a; }
@media (prefers-reduced-motion: reduce) { .nc-c-lava, .nc-c-aurora, .nc-c-platinum, .fr-f-rainbow { animation: none; } }

/* ---------- Shop: second batch ---------- */
.nc-c-mint { color: #6dffc8 !important; }
.nc-c-sakura { -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; background-image: linear-gradient(90deg, #ffc2e2, #ff6fb1, #ffc2e2); }
.fr-f-gold { border-color: #ffc22e; box-shadow: 0 0 0 2px rgba(255,194,46,.3), 0 0 12px rgba(255,194,46,.6); }
.fr-f-zap { border-color: #fff36b; border-style: dashed; box-shadow: 0 0 10px #37dcf5, 0 0 22px rgba(55,220,245,.6); animation: zapFlicker 1.1s steps(2, jump-none) infinite; }
@keyframes zapFlicker { 50% { border-color: #37dcf5; box-shadow: 0 0 14px #fff36b, 0 0 26px rgba(255,243,107,.55); } }
.bn-bn-candy { background: linear-gradient(180deg, rgba(10,17,48,0) 30%, rgba(10,17,48,.82) 85%), repeating-linear-gradient(135deg, #ff8ac8 0 16px, #fff 16px 32px, #8be8ff 32px 48px, #fff 48px 64px); }
.bn-bn-sakura { background: linear-gradient(180deg, rgba(10,17,48,0) 30%, rgba(10,17,48,.82) 85%), radial-gradient(circle at 15% 30%, #ffd6ea 0 5px, transparent 6px), radial-gradient(circle at 45% 55%, #ffb3d6 0 4px, transparent 5px), radial-gradient(circle at 78% 25%, #ffd6ea 0 6px, transparent 7px), radial-gradient(circle at 88% 65%, #ffb3d6 0 4px, transparent 5px), radial-gradient(circle at 30% 80%, #ffd6ea 0 3px, transparent 4px), linear-gradient(180deg, #ff9cc9, #b34a8a 70%, #4a1a5a); }
@media (prefers-reduced-motion: reduce) { .fr-f-zap { animation: none; } }

/* ---------- Count Combo outfits ---------- */
.pf-top { position: relative; }
.pf-buddy { margin-left: auto; width: 128px; flex: none; align-self: flex-end; filter: drop-shadow(0 8px 16px rgba(0,0,0,.45)); }
.pf-buddy svg { width: 100%; height: auto; display: block; animation: mascotBob 3.2s ease-in-out infinite; }
.shop-combo { display: grid; place-items: center; height: 100%; }
.shop-combo svg { width: 92px; height: 92px; }
.own-combo svg { width: 48px; height: 48px; }
@media (max-width: 860px) { .pf-buddy { position: absolute; top: -18px; right: -6px; width: 104px; margin: 0; } }
@keyframes mascotBob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .pf-buddy svg { animation: none; } }

/* ---------- Mystery boxes ---------- */
.box-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.box-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 18px 16px 16px; border-radius: var(--r); border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 30%, rgba(139,61,255,.28), transparent 65%), var(--night-2); }
.box-card .gift { width: 110px; height: 110px; transition: transform .2s; }
.box-card:hover .gift { transform: translateY(-4px) rotate(-3deg); }
.box-card b { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.box-gold { border-color: rgba(255,194,46,.55); box-shadow: 0 0 24px rgba(255,194,46,.15); }
.box-odds { font-size: 12px; color: var(--neon); margin-bottom: 6px; }
.box-ex { margin-top: 16px; padding: 14px 16px; border: 1px dashed rgba(139,61,255,.6); border-radius: var(--r); background: rgba(139,61,255,.08); }
.box-ex h3 { font-size: 15px; margin: 0 0 10px; }
.box-ex h3 .small { color: var(--ink-3); font-weight: 500; margin-left: 6px; }
.box-ex-row { display: flex; gap: 10px; flex-wrap: wrap; }
.box-ex-item { width: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 12px; background: var(--night-2); border: 1px solid var(--line); filter: grayscale(.25) brightness(.85); }
.box-ex-item small { font-size: 11px; color: var(--ink-2); text-align: center; }
.box-ex-item.owned { filter: none; border-color: var(--crown); }
.box-ex-item.owned small::after { content: " ✓"; color: var(--crown); }
.box-modal { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(5,8,26,.82); backdrop-filter: blur(4px); }
.box-stage { position: relative; z-index: 1; width: min(360px, 100%); text-align: center; padding: 26px 22px 22px; border-radius: 22px; background: var(--night-2); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.box-shake .gift { width: 150px; height: 150px; animation: boxShake .5s ease-in-out infinite; }
@keyframes boxShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg) scale(1.03); } 75% { transform: rotate(8deg) scale(1.03); } }
.box-msg { color: var(--ink-2); margin-top: 8px; }
.box-open { animation: boxPop .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes boxPop { from { transform: scale(.6); opacity: 0; } }
.box-burst { position: absolute; left: 50%; top: 50%; width: 640px; height: 640px; margin: -320px 0 0 -320px; z-index: 0; pointer-events: none; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc, #ffc22e) 45%, transparent) 0 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%); animation: boxSpin 14s linear infinite; }
.box-burst.is-ex { background: repeating-conic-gradient(from 0deg, rgba(139,61,255,.5) 0 9deg, transparent 9deg 16deg, rgba(255,95,192,.4) 16deg 25deg, transparent 25deg 32deg); }
@keyframes boxSpin { to { transform: rotate(360deg); } }
.box-prize { min-height: 110px; display: grid; place-items: center; margin: 4px auto 6px; width: 180px; border-radius: 14px; background: var(--night); overflow: hidden; }
.box-prize .mini-card { min-height: 110px; }
.box-stage h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; margin: 6px 0 0; color: var(--crown); }
.box-stage .row-btns { justify-content: center; margin-top: 14px; }
.box-tag { display: inline-block; font: 10px var(--f-pixel); letter-spacing: .08em; color: #fff; background: linear-gradient(90deg, #8b3dff, #ff5fc0); padding: 6px 10px; border-radius: 8px; margin-bottom: 10px; }
@media (max-width: 760px) { .box-grid { grid-template-columns: minmax(0, 1fr); } .box-card { flex-direction: row; flex-wrap: wrap; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .box-shake .gift, .box-burst, .box-open { animation: none; } }
/* box exclusives */
.nc-c-galaxy { -webkit-background-clip: text; background-clip: text; color: transparent !important; -webkit-text-fill-color: transparent; background-image: linear-gradient(90deg, #8b3dff, #ff5fc0, #37dcf5, #8b3dff); background-size: 300% 100%; animation: rainbow 5s linear infinite; filter: drop-shadow(0 0 6px rgba(139,61,255,.6)); }
.fr-f-cosmic { border-color: #c9a6ff; background: radial-gradient(1px 1px at 30% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent), radial-gradient(circle at 35% 30%, #5b2bd1, #12052e); box-shadow: 0 0 12px rgba(139,61,255,.9), 0 0 26px rgba(255,95,192,.5); animation: cosmicPulse 2.4s ease-in-out infinite alternate; }
@keyframes cosmicPulse { to { box-shadow: 0 0 18px rgba(55,220,245,.9), 0 0 32px rgba(139,61,255,.7); border-color: #8be8ff; } }
.bn-bn-vault { background: linear-gradient(180deg, rgba(10,17,48,0) 25%, rgba(10,17,48,.85) 85%), radial-gradient(circle at 50% 40%, rgba(139,61,255,.55), transparent 60%), repeating-linear-gradient(45deg, rgba(255,194,46,.08) 0 2px, transparent 2px 24px), linear-gradient(135deg, #12052e, #2b0d6b 55%, #12052e); }
@media (prefers-reduced-motion: reduce) { .nc-c-galaxy, .fr-f-cosmic { animation: none; } }

/* CS:GO style case opening */
.box-modal { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.case { position: relative; z-index: 1; width: min(860px, 100%); min-width: 0; padding: 20px 0 18px; border-radius: 22px; background: var(--night-2); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6); text-align: center; }
.case-head { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.case-head .gift { width: 54px; height: 54px; }
.case-head b { font-family: var(--f-display); font-weight: 400; font-size: 24px; }
.reel { position: relative; height: 168px; overflow: hidden; background: #070b22; border-block: 1px solid var(--line);
  -webkit-mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.reel-strip { display: flex; gap: 8px; padding: 14px 0; will-change: transform; }
.reel-tile { flex: none; width: 132px; height: 140px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, #121a4a, color-mix(in srgb, var(--rc) 22%, #121a4a)); border-bottom: 5px solid var(--rc); box-shadow: inset 0 -30px 40px -30px var(--rc); }
.reel-tile small { font-size: 12px; font-weight: 600; color: var(--ink); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-prev { height: 78px; display: grid; place-items: center; }
.reel-prev .own-prev { font-size: 40px; min-height: 0; }
.reel-prev .own-combo svg { width: 76px; height: 76px; }
.reel-prev .own-banner { width: 110px; height: 60px; }
.reel-prev .own-title { font-size: 11px; }
.reel-tile.lit { animation: reelLit .8s ease-out forwards; }
@keyframes reelLit { to { transform: scale(1.08); box-shadow: 0 0 0 3px var(--rc), 0 0 34px var(--rc); } }
.reel-mark { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: #ffc22e; box-shadow: 0 0 12px #ffc22e; z-index: 2; }
.reel-mark::before, .reel-mark::after { content: ""; position: absolute; left: 50%; margin-left: -9px; border: 9px solid transparent; }
.reel-mark::before { top: 0; border-top-color: #ffc22e; }
.reel-mark::after { bottom: 0; border-bottom-color: #ffc22e; }
.box-stage { border-top: 4px solid var(--rc, var(--line)); }
.box-stage .box-tag { background: var(--rc, #8b3dff); }
@media (max-width: 560px) { .reel { height: 138px; } .reel-tile { width: 104px; height: 112px; } .reel-prev { height: 60px; } .reel-prev .own-combo svg { width: 58px; height: 58px; } .reel-prev .own-banner { width: 88px; height: 48px; } }

/* ---------- Ranked tiers ---------- */
.tier-tag { display: inline-flex; vertical-align: -3px; margin-left: 4px; }
.tier-ico { flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.rank-ladder { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.rung { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: var(--r); background: var(--night-2); border: 1px solid var(--line); text-align: center; }
.rung b { font-family: var(--f-display); font-weight: 400; font-size: 17px; }
.rung span { font-size: 12px; color: var(--ink-3); }
.rung-emperor { border-color: rgba(180,107,255,.7); box-shadow: 0 0 22px rgba(139,61,255,.25); }
.rank-how { color: var(--ink-2); font-size: 14px; margin: 12px 0; }
.rank-table { list-style: none; margin: 0; padding: 8px; display: grid; gap: 4px; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--r); counter-reset: none; }
.rank-table li { display: grid; grid-template-columns: 30px 26px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.rank-table li:nth-child(-n+3) { background: rgba(139,61,255,.12); }
.rk-pos { font: 12px var(--f-pixel); color: var(--ink-3); text-align: center; }
.rk-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--ink); font-weight: 600; }
.rk-tier { font-size: 12px; color: var(--ink-3); }
.rk-pts { font-variant-numeric: tabular-nums; }
.rk-emperor .rk-tier, .rk-big.rk-emperor { color: #c99bff; } .rk-diamond .rk-tier, .rk-big.rk-diamond { color: #8be8ff; } .rk-gold .rk-tier, .rk-big.rk-gold { color: var(--crown); }
.rk-silver .rk-tier, .rk-big.rk-silver { color: #d7deef; } .rk-bronze .rk-tier, .rk-big.rk-bronze { color: #e6a06a; }
.rank-card { margin-top: 16px; }
.rank-top { display: flex; align-items: center; gap: 14px; }
.rank-top b { display: block; }
.rk-big { font-family: var(--f-display); font-weight: 400; font-size: 28px; line-height: 1.1; }
.rank-bar { margin: 12px 0 4px; }
.rank-games { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.rank-games li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; font-size: 14px; }
.rank-games img { width: 52px; aspect-ratio: 16/10; object-fit: cover; border-radius: 6px; }
.rank-games small { color: var(--ink-3); }
.rank-games b { color: var(--neon); font-variant-numeric: tabular-nums; }
.duel-cta { margin-top: 14px; justify-self: start; }
.rank-bar { height: 10px; border-radius: 99px; background: var(--night); border: 1px solid var(--line); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--neon), var(--crown)); }
@media (max-width: 760px) { .rank-ladder { grid-template-columns: repeat(5, minmax(64px, 1fr)); overflow-x: auto; } .rung { padding: 10px 4px; } .rung b { font-size: 13px; } .rank-table li { grid-template-columns: 24px 22px minmax(0, 1fr) auto; } .rk-tier { display: none; } }

/* ---------- Duels ---------- */
.duel-body { display: grid; gap: 24px; padding-bottom: 40px; }
.duel-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.duel-form h2, .duel-form p { grid-column: 1 / -1; margin: 0; }
.duel-form select, .duel-form input { width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--night); color: var(--ink); padding: 0 10px; font: inherit; }
.duel-sec h2 { margin: 0 0 10px; font-size: 20px; }
.duel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.duel-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r); background: var(--night-2); border: 1px solid var(--line); }
.duel-card p { margin: 0; }
.duel-card a:not(.btn) { color: var(--neon); }
.duel-live { border-color: rgba(255,194,46,.6); box-shadow: 0 0 20px rgba(255,194,46,.12); }
.duel-pending:not(:has([data-duel=cancel])) { border-color: rgba(55,220,245,.6); }
.duel-game { display: flex; align-items: center; gap: 10px; }
.duel-game img { width: 64px; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; }
.duel-game b { display: block; }
.duel-vs { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; gap: 8px; }
.duel-vs > div { padding: 8px; border-radius: 10px; background: var(--night); border: 1px solid var(--line); min-width: 0; }
.duel-vs small { display: block; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel-vs b { font-family: var(--f-display); font-weight: 400; font-size: 22px; }
.duel-vs .lead { border-color: var(--crown); box-shadow: 0 0 14px rgba(255,194,46,.25); }
.duel-vs > span { font: 12px var(--f-pixel); color: var(--crown); }
.duel-won { color: var(--crown); } .duel-lost { color: #ff6b7a; } .duel-draw { color: var(--ink-2); }
@media (max-width: 760px) { .duel-form { grid-template-columns: minmax(0, 1fr); } }
