/* ==========================================================================
   OpenArc Games: portal styles
   Layout mirrors the reference portal (see docs/RESEARCH.md); identity is ours:
   midnight-blue surfaces, neon pink primary, cyan accent.
   ========================================================================== */

/* Nunito (SIL Open Font License 1.1, see /fonts/LICENSE.txt), self-hosted: no third-party font requests. */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/nunito-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/nunito-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }


:root {
  --bg: #060a1d;
  --panel: #0b1129;
  --header: #0e1534;
  --drawer: #0e1534;
  --surface: #141c43;
  --input: #212b5b;
  --input-hover: #2a3670;
  --frame: rgba(140, 170, 255, 0.08);
  --line: rgba(130, 160, 255, 0.14);
  --line-strong: rgba(130, 160, 255, 0.24);
  --text: #f3f6ff;
  --muted: #a3acd2;
  --dim: #9099c6;   /* 4.5:1 on input fields (WCAG AA) */
  --brand: #ff2e97;
  --brand-hover: #ff5aae;
  --brand-deep: #c4136f;
  --brand-glow: rgba(255, 46, 151, 0.45);
  --cyan: #29e7ff;
  --cyan-glow: rgba(41, 231, 255, 0.35);
  --violet: #8b5cff;
  --lime: #b6ff3b;
  --amber: #ffb02e;
  --red: #ff4d6d;
  --green: #3dffa8;

  --header-h: 60px;
  --sb-collapsed: 60px;
  --sb-expanded: 200px;
  --sb-w: var(--sb-collapsed);
  --drawer-w: 400px;
  --radius: 16px;
  --font: "Nunito", "Nunito Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-width: none; -webkit-text-size-adjust: 100%; }
html::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
body.sb-expanded { --sb-w: var(--sb-expanded); }
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 900; line-height: 1.2; }
p { margin: 0 0 12px; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
::selection { background: rgba(255, 46, 151, 0.4); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; flex: none; }
svg.inline { width: 16px; height: 16px; vertical-align: -3px; }
svg.big { width: 48px; height: 48px; }

/* Nebula backdrop: faint neon glows plus a perspective grid near the bottom. */
.nebula {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(41, 231, 255, 0.10), transparent 60%),
    radial-gradient(800px 520px at 100% 0%, rgba(255, 46, 151, 0.10), transparent 60%),
    radial-gradient(1000px 700px at 60% 120%, rgba(139, 92, 255, 0.12), transparent 60%),
    var(--bg);
}
.nebula::after {
  content: ""; position: absolute; left: -50%; right: -50%; bottom: -10%; height: 46%;
  background-image:
    linear-gradient(rgba(41, 231, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 231, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  transform: perspective(500px) rotateX(62deg);
  transform-origin: bottom;
  mask-image: linear-gradient(transparent, #000 70%);
  -webkit-mask-image: linear-gradient(transparent, #000 70%);
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 8px 16px; border-radius: 30px;
  font-size: 16px; font-weight: 800; white-space: nowrap; line-height: 1;
  transition: background-color .2s, box-shadow .2s, opacity .2s, transform .1s, border-color .2s;
  user-select: none;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-hover); box-shadow: 0 0 18px var(--brand-glow); }
.btn-grey { background: var(--input); color: var(--text); }
.btn-grey:hover:not(:disabled) { background: var(--input-hover); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.14); }
.btn-outline { border: 2px solid var(--line-strong); color: var(--text); background: transparent; }
.btn-outline:hover:not(:disabled) { border-color: var(--cyan); box-shadow: 0 0 14px var(--cyan-glow); }
.btn-cyan { background: var(--cyan); color: #04122a; }
.btn-cyan:hover:not(:disabled) { box-shadow: 0 0 18px var(--cyan-glow); }
.btn-danger { background: rgba(255, 77, 109, 0.14); color: #ff8aa0; }
.btn-danger:hover:not(:disabled) { background: rgba(255, 77, 109, 0.26); }
.btn-sm { height: 32px; padding: 6px 12px; font-size: 14px; }
.btn-lg { height: 52px; padding: 12px 28px; font-size: 18px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 30px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.1); color: var(--text); position: relative;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.18); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.active { color: var(--cyan); box-shadow: inset 0 0 0 2px rgba(41, 231, 255, 0.45); }
.badge-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--header);
}
.link { color: var(--cyan); font-weight: 700; }
.link:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .field-label { font-weight: 800; font-size: 14px; color: var(--text); }
.field .hint { font-size: 12px; color: var(--dim); }
.field .error-text { font-size: 13px; color: #ff8aa0; font-weight: 700; }
.input, .select, .textarea {
  width: 100%; background: var(--input); border: 2px solid transparent; border-radius: 12px;
  padding: 10px 14px; font-size: 15px; font-weight: 700; color: var(--text); outline: none;
  transition: border-color .2s, background-color .2s;
}
.input { height: 46px; }
.input::placeholder, .textarea::placeholder { color: var(--dim); font-weight: 700; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--cyan); background: var(--input-hover); }
.input.invalid, .textarea.invalid, .select.invalid { border-color: var(--red); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { height: 46px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3acd2' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; cursor: pointer; }
.select option { background: var(--surface); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 800; user-select: none; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle .track { width: 44px; height: 26px; border-radius: 13px; background: var(--input); position: relative; transition: background-color .2s; flex: none; }
.toggle .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform .2s, background-color .2s; }
.toggle input:checked + .track { background: var(--brand); }
.toggle input:checked + .track::after { transform: translateX(18px); background: #fff; }
.toggle input:focus-visible + .track { outline: 2px solid var(--cyan); outline-offset: 2px; }
.segmented { display: inline-flex; background: var(--input); border-radius: 30px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.segmented button { height: 34px; padding: 0 16px; border-radius: 30px; font-weight: 800; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.segmented button svg { width: 18px; height: 18px; }
.segmented button.on { background: var(--brand); color: #fff; box-shadow: 0 0 12px var(--brand-glow); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 14px;
  background: var(--input); font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap;
}
.pill svg { width: 16px; height: 16px; }
.pill-green { background: rgba(61, 255, 168, 0.14); color: var(--green); }
.pill-amber { background: rgba(255, 176, 46, 0.14); color: var(--amber); }
.pill-red { background: rgba(255, 77, 109, 0.14); color: #ff8aa0; }
.pill-cyan { background: rgba(41, 231, 255, 0.12); color: var(--cyan); }
.pill-pink { background: rgba(255, 46, 151, 0.14); color: #ff7cbf; }

/* ---------------------------------------------------------------- header */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); z-index: 300;
  display: flex; align-items: center; background: var(--header);
  box-shadow: 0 3px 3px -2px rgba(0, 0, 0, .2), 0 3px 4px 0 rgba(0, 0, 0, .14), 0 1px 8px 0 rgba(0, 0, 0, .12);
  border-bottom: 1px solid rgba(41, 231, 255, 0.10);
}
.header-left { display: flex; align-items: center; height: 100%; flex: none; }
.burger { width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.burger svg { width: 26px; height: 26px; }
.burger:hover { color: var(--cyan); }
.logo { display: flex; align-items: center; gap: 8px; height: 36px; }
.logo-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 0 6px rgba(255, 46, 151, 0.45)); }
.logo-word { display: flex; flex-direction: column; line-height: .86; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; }
.logo-word b { font-size: 19px; background: linear-gradient(90deg, #6ff3ff, #29e7ff 30%, #ff5aae 70%, #ff2e97); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 18px rgba(41, 231, 255, 0.25); }
.logo-word span { font-size: 15px; color: #fff; letter-spacing: 3.6px; }
.header-search { position: absolute; left: 50%; transform: translateX(-50%); width: 460px; max-width: calc(100% - 520px); z-index: 2; }
.search-box { position: relative; height: 40px; }
.search-input {
  width: 100%; height: 40px; border-radius: 30px; border: 2px solid transparent; background: var(--input);
  padding: 1px 46px 1px 16px; font-size: 16px; font-weight: 700; color: var(--text); outline: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--cyan); box-shadow: 0 0 14px rgba(41, 231, 255, 0.25); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-go { position: absolute; right: 6px; top: 4px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.search-go:hover { color: var(--cyan); }
.search-go svg { width: 20px; height: 20px; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 16px; padding-right: 16px; flex: none; }
.header-right .label-btn { display: none; }
.label-btn { height: 40px; padding: 0 16px 0 12px; border-radius: 30px; background: rgba(255, 255, 255, 0.1); display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; transition: background-color .2s; position: relative; }
.label-btn:hover { background: rgba(255, 255, 255, 0.18); }
.label-btn svg { width: 22px; height: 22px; }
.mobile-search-btn { display: none; }
.avatar-btn { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 2px var(--line-strong); transition: box-shadow .2s; position: relative; }
.avatar-btn:hover, .avatar-btn.active { box-shadow: 0 0 0 2px var(--cyan), 0 0 14px var(--cyan-glow); }
.avatar-btn img, .avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar { border-radius: 50%; overflow: hidden; flex: none; background: var(--surface); display: inline-block; }

.menu {
  position: fixed; top: 64px; right: 12px; width: 260px; z-index: 520; background: var(--drawer);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 18px 48px rgba(0, 0, 0, .55);
  animation: pop .14s ease-out;
}
.menu-head { display: flex; gap: 12px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head .avatar { width: 44px; height: 44px; }
.menu-head b { display: block; font-size: 16px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 10px; font-weight: 800; text-align: left; }
.menu-item:hover { background: rgba(255, 255, 255, 0.08); }
.menu-item svg { width: 20px; height: 20px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- search dropdown */
.search-backdrop { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(2, 4, 14, 0.72); z-index: 250; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.search-panel {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%); width: 100%; min-width: 460px;
  background: var(--drawer); border-radius: 0 0 16px 16px; padding: 12px; z-index: 260;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6); border: 1px solid var(--line); border-top: 0;
  max-height: calc(100vh - 80px); overflow-y: auto;
}
.search-panel.wide { width: 920px; left: 50%; }
.search-intents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.search-intents .intent-card { width: auto; height: 120px; }
.suggest-term, .suggest-game {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 12px; border-radius: 10px; font-weight: 800; font-size: 15px; text-align: left;
}
.suggest-term svg { width: 22px; height: 22px; color: var(--muted); }
.suggest-term .count { color: var(--cyan); font-weight: 900; }
.suggest-game img { width: 64px; height: 36px; border-radius: 8px; object-fit: cover; background: var(--surface); }
.suggest-term.sel, .suggest-game.sel, .suggest-term:hover, .suggest-game:hover { background: rgba(255, 255, 255, 0.08); }
.suggest-all { display: block; width: 100%; text-align: left; padding: 10px 12px; font-weight: 900; border-radius: 10px; }
.suggest-all:hover, .suggest-all.sel { background: rgba(255, 255, 255, 0.08); color: var(--cyan); }
.suggest-empty { padding: 10px 12px; color: var(--muted); font-weight: 700; }
.suggest-sep { height: 1px; background: var(--line); margin: 8px 0; }

/* ---------------------------------------------------------------- sidebar */
.sidebar {
  position: fixed; top: var(--header-h); bottom: 0; left: 0; width: var(--sb-w); z-index: 200;
  background: var(--bg); overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  padding: 16px 0 24px; transition: width .2s ease;
}
.sidebar::-webkit-scrollbar { display: none; }
.sb-link {
  display: flex; align-items: center; height: 34px; width: 100%; color: var(--text); font-weight: 700; font-size: 14px;
  white-space: nowrap; position: relative; transition: color .15s, background-color .15s;
}
.sb-link .sb-ico { width: 60px; flex: none; display: flex; justify-content: center; }
.sb-link svg { width: 22px; height: 22px; }
.sb-link .sb-label { overflow: hidden; text-overflow: ellipsis; opacity: 1; transition: opacity .15s; }
.sb-link:hover { color: var(--cyan); background: rgba(41, 231, 255, 0.05); }
.sb-link.active { color: var(--cyan); }
.sb-link.active::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.sb-link.active svg { filter: drop-shadow(0 0 6px var(--cyan-glow)); }
.sb-link.disabled { color: var(--dim); }
.sb-divider { height: 1px; background: var(--line); margin: 8px 14px; }
.sb-extra { padding: 12px 12px 0; }
.sb-extra .btn { width: 100%; height: 36px; font-size: 15px; }
.sb-foot { padding: 12px 12px 0 22px; display: flex; flex-direction: column; gap: 2px; }
.sb-foot a { color: var(--muted); font-weight: 700; font-size: 13px; line-height: 24px; }
.sb-foot a:hover { color: var(--text); }
.sb-copy { color: var(--dim); font-size: 12px; margin-top: 8px; }
body:not(.sb-expanded) .sidebar:not(.overlay) .sb-label,
body:not(.sb-expanded) .sidebar:not(.overlay) .sb-extra,
body:not(.sb-expanded) .sidebar:not(.overlay) .sb-foot { display: none; }
body:not(.sb-expanded) .sidebar:not(.overlay) .sb-divider { margin: 8px 12px; }
.sb-tip {
  position: fixed; left: 64px; z-index: 600; background: var(--surface); color: var(--text); font-weight: 800; font-size: 13px;
  padding: 6px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
  border: 1px solid var(--line); transform: translateY(-50%);
}
.sidebar-backdrop { position: fixed; inset: var(--header-h) 0 0 0; background: rgba(2, 4, 14, 0.6); z-index: 190; animation: fade .15s; }

/* ---------------------------------------------------------------- main */
.main { margin-left: var(--sb-w); padding-top: var(--header-h); min-height: 100vh; transition: margin-left .2s ease; }
.page { padding: 0 16px 24px 8px; min-height: calc(100vh - var(--header-h)); }
.page-pad { padding: 20px 24px 40px; }
.page-narrow { max-width: 1200px; margin: 0 auto; padding: 24px 24px 48px; }
.home { padding: 20px 0 20px 8px; display: flex; flex-direction: column; gap: 8px; }

/* ---------------------------------------------------------------- rows & carousels */
.row { position: relative; }
.row-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; min-height: 24px; }
.row-title { font-size: 19.2px; font-weight: 900; display: inline-flex; align-items: center; gap: 4px; }
.row-title a { display: inline-flex; align-items: center; gap: 4px; }
.row-title a:hover { color: var(--cyan); }
.row-title svg { width: 22px; height: 22px; }
.row-title .flag { font-size: 18px; }
.carousel { position: relative; container-type: inline-size; }
.car-track {
  --n: 6.1; --gap: 4px;
  --card-w: calc((100cqw - 16px - var(--gap) * 6) / var(--n));
  display: flex; gap: var(--gap); overflow-x: auto; overflow-y: visible; scroll-behavior: smooth;
  padding: 12px 8px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding: 0 8px;
}
.car-track::-webkit-scrollbar { display: none; }
.car-track > li { flex: 0 0 var(--card-w); scroll-snap-align: start; min-width: 0; }
@container (min-width: 1500px) { .car-track { --n: 6.6; } .grid { --cols: 7; } }
@container (max-width: 1100px) { .car-track { --n: 4.6; } }
@container (max-width: 820px) { .car-track { --n: 3.5; } }
@container (max-width: 560px) { .car-track { --n: 2.3; } }
.car-btn {
  position: absolute; top: 50%; z-index: 20; width: 40px; height: 40px; border-radius: 50%; transform: translateY(-50%);
  background: rgba(14, 21, 52, 0.92); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .55), 0 0 0 1px var(--line-strong); opacity: 0; transition: opacity .2s, background-color .2s;
}
.car-btn svg { width: 22px; height: 22px; }
.car-btn.prev { left: 4px; }
.car-btn.next { right: 4px; }
.carousel:hover .car-btn:not(:disabled) { opacity: 1; }
.car-btn:hover { background: var(--brand); }
.car-btn:disabled { opacity: 0 !important; pointer-events: none; }

/* Highlighted 2-row grid with big 2x2 cards ("Top games today"). */
.car-track.highlight {
  display: grid; grid-auto-flow: column dense; grid-template-rows: repeat(2, auto);
  grid-auto-columns: var(--card-w); row-gap: 8px;
}
.car-track.highlight > li.big { grid-row: span 2; grid-column: span 2; }
.car-track.highlight > li.big .thumb, .car-track.highlight > li.big .thumb-media { height: 100%; }
.car-track.highlight > li.big .thumb-media { aspect-ratio: auto; }

/* ---------------------------------------------------------------- thumbnails */
.thumb { display: block; border-radius: var(--radius); background: var(--frame); padding: 2px; position: relative; z-index: 1; }
.thumb-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  transition: transform .22s ease, box-shadow .22s ease; transform-origin: center;
}
.thumb.portrait .thumb-media { aspect-ratio: 271 / 401; }
.thumb-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.thumb-media img.loading, .thumb-media img[data-src] { opacity: 0; }
.thumb:hover { z-index: 15; }
.thumb:hover .thumb-media { transform: scale(1.09); box-shadow: 0 10px 30px rgba(0, 0, 0, .65), 0 0 0 2px var(--brand), 0 0 22px var(--brand-glow); }
li:first-child > .thumb:hover .thumb-media, .thumb.edge-left:hover .thumb-media { transform-origin: left center; }
li:last-child > .thumb:hover .thumb-media, .thumb.edge-right:hover .thumb-media { transform-origin: right center; }
.thumb-hover {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; z-index: 3; pointer-events: none;
  background: linear-gradient(rgba(255, 46, 151, 0), rgba(196, 19, 111, 0.6) 40%, rgb(196, 19, 111) 80%);
  transform: translateY(100%); transition: transform .2s ease;
}
.thumb:hover .thumb-hover, .thumb:focus-visible .thumb-hover { transform: none; }
.thumb-title { font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.thumb-sub { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 10px; font-weight: 700; }
.thumb-sub .cat { padding: 2px 6px; border-radius: 8px; background: rgba(0, 0, 0, .4); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-sub .stat { display: inline-flex; align-items: center; gap: 3px; }
.thumb-sub svg { width: 11px; height: 11px; }
.thumb-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; z-index: 2; }
.tbadge {
  height: 24px; min-width: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px; font-size: 10px; font-weight: 900; letter-spacing: .3px; color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.tbadge svg { width: 16px; height: 16px; }
.tbadge.original { background: linear-gradient(135deg, var(--brand), var(--violet)); }
.tbadge.updated { background: #1592c9; }
.tbadge.hot { background: linear-gradient(135deg, #ff7a2e, #ff2e5a); }
.tbadge.new { background: var(--lime); color: #12210a; padding: 0 7px; }
.tbadge.unlisted { background: rgba(0, 0, 0, .7); padding: 0 7px; }
.thumb-skel { border-radius: var(--radius); background: var(--frame); padding: 2px; }
.thumb-skel > div { aspect-ratio: 16 / 9; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 0%, #1b2554 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.thumb-skel.portrait > div { aspect-ratio: 271 / 401; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------------------------------------------------------------- grids */
.grid-wrap { container-type: inline-size; }
.grid { --cols: 6; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 16px 16px; }
@container (max-width: 1100px) { .grid { --cols: 5; } }
@container (max-width: 900px) { .grid { --cols: 4; } }
@container (max-width: 680px) { .grid { --cols: 3; } }
@container (max-width: 460px) { .grid { --cols: 2; gap: 10px; } }
.grid .thumb:hover .thumb-media { transform: scale(1.06); }
.load-more { display: flex; justify-content: center; padding: 28px 0 8px; }

/* ---------------------------------------------------------------- intents */
.intent-card {
  position: relative; display: block; width: 230px; height: 120px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(285deg, #0e1534 20%, var(--tint-dark) 100%);
  transition: transform .2s, box-shadow .2s;
}
.intent-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0, 0, 0, .5), 0 0 0 2px var(--tint), 0 0 20px color-mix(in srgb, var(--tint) 35%, transparent); }
.intent-card .intent-name { position: absolute; left: 14px; bottom: 14px; color: var(--tint); font-weight: 900; font-size: 16px; text-shadow: 0 0 14px color-mix(in srgb, var(--tint) 45%, transparent); }
.intent-card .intent-art { position: absolute; right: 14px; top: 12px; width: 60px; height: 60px; transition: transform .25s; }
.intent-card:hover .intent-art { transform: rotate(-6deg) scale(1.08); }
.intent-track { display: flex; gap: 8px; overflow-x: auto; padding: 0 8px 10px; scrollbar-width: none; scroll-behavior: smooth; }
.intent-track::-webkit-scrollbar { display: none; }
.intent-track > li { flex: none; }
.intent-section {
  position: relative; margin: 6px 8px 6px 8px; border-radius: 20px; padding: 16px 0 4px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--tint) 16%, var(--panel)) 0%, var(--panel) 45%, color-mix(in srgb, var(--tint) 6%, var(--panel)) 100%);
  border: 1px solid color-mix(in srgb, var(--tint) 18%, transparent);
}
.intent-section .carousel .car-track { padding-left: 8px; padding-right: 8px; }
.intent-head { display: flex; align-items: center; gap: 12px; padding: 0 16px; }
.intent-head .intent-art { width: 44px; height: 44px; flex: none; }
.intent-head h2 { color: var(--tint); font-size: 19.2px; display: inline-flex; align-items: center; gap: 4px; }
.intent-head h2 a:hover { filter: brightness(1.2); }
.intent-head h2 svg { width: 22px; height: 22px; }
.intent-head p { margin: 2px 0 0; color: var(--text); font-weight: 700; font-size: 13px; opacity: .9; }

/* ---------------------------------------------------------------- leaderboard banner */
.lb-banner {
  margin: 6px 8px; border-radius: 20px; padding: 16px 0 4px; position: relative; overflow: hidden;
  background: radial-gradient(600px 200px at 85% 0%, rgba(255, 176, 46, 0.18), transparent 70%),
              linear-gradient(100deg, #2a1a10 0%, #171230 45%, #0f1640 100%);
  border: 1px solid rgba(255, 176, 46, 0.22);
}
.lb-banner .intent-head h2 { color: #ffd27a; }
.lb-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.lb-meta .pill { height: 24px; font-size: 12px; }
.lb-meta span.txt { font-weight: 700; font-size: 13px; }
.trophy-art { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 0 10px rgba(255, 176, 46, .5)); }

/* ---------------------------------------------------------------- SEO block & footer buttons */
.seo-block { display: grid; grid-template-columns: minmax(280px, 1fr) 2fr; gap: 8px; padding: 18px 8px 8px; }
.seo-card { background: var(--panel); border-radius: var(--radius); padding: 20px 24px; border: 1px solid var(--line); }
.seo-card h1 { font-size: 24px; margin-bottom: 10px; }
.seo-card h2 { font-size: 18px; margin: 16px 0 8px; }
.seo-text { color: var(--text); font-size: 14px; max-height: 84px; overflow: hidden; position: relative; }
.seo-text.open { max-height: none; }
.seo-text:not(.open)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: linear-gradient(transparent, var(--panel)); }
.seo-text a { color: var(--cyan); font-weight: 700; }
.seo-text ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.learn-more { color: var(--cyan); font-weight: 900; margin-top: 8px; display: inline-block; }
.tag-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.tag-tile {
  background: var(--panel); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 98px;
  font-weight: 800; border: 1px solid var(--line); transition: border-color .2s, transform .2s, box-shadow .2s;
}
.tag-tile svg { width: 26px; height: 26px; color: var(--cyan); }
.tag-tile:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 0 16px var(--cyan-glow); }
.tag-tile .n { color: var(--dim); font-size: 12px; margin-top: auto; }
.home-foot { display: flex; justify-content: center; gap: 16px; padding: 28px 8px 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- list pages */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; font-weight: 800; color: var(--muted); }
.crumbs a { color: var(--cyan); }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--dim); }
.list-head { padding: 16px 8px 16px; }
.list-head h1 { font-size: 48px; letter-spacing: -.5px; margin: 6px 0 8px; text-shadow: 0 0 24px rgba(41, 231, 255, 0.15); }
.list-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.list-desc { color: var(--text); max-width: 1100px; display: flex; gap: 6px; align-items: baseline; }
.list-desc p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-desc.open p { white-space: normal; }
.list-desc button { color: var(--cyan); font-weight: 900; flex: none; }
.dropdown { position: relative; flex: none; }
.dropdown-btn { height: 40px; min-width: 190px; padding: 0 14px 0 16px; border-radius: 12px; background: var(--panel); border: 2px solid var(--line-strong); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 800; font-size: 15px; }
.dropdown-btn svg { width: 20px; height: 20px; transition: transform .2s; }
.dropdown.open .dropdown-btn svg { transform: rotate(180deg); }
.dropdown-btn:hover, .dropdown.open .dropdown-btn { border-color: var(--cyan); }
.dropdown-menu { position: absolute; right: 0; top: 46px; min-width: 100%; background: var(--drawer); border-radius: 12px; border: 1px solid var(--line); padding: 6px; z-index: 50; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); animation: pop .12s ease-out; }
.dropdown-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; font-weight: 800; }
.dropdown-menu button:hover, .dropdown-menu button.on { background: rgba(255, 255, 255, 0.08); }
.dropdown-menu button.on { color: var(--cyan); }
.list-body { padding: 0 8px; }
.collection-hero { display: flex; align-items: center; gap: 18px; }
.collection-hero .intent-art { width: 76px; height: 76px; flex: none; }
.collection-hero h1 { color: var(--tint); }
.term-tile { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 16 / 9; border-radius: var(--radius); padding: 12px 14px; background: linear-gradient(135deg, var(--brand), #9b1c86); font-weight: 900; font-size: 15px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .08); transition: box-shadow .2s, transform .2s; }
.term-tile:hover { box-shadow: 0 0 22px var(--brand-glow); transform: translateY(-2px); }
.term-tile .n { align-self: flex-end; font-size: 13px; opacity: .85; }
.term-tile.tag { background: linear-gradient(135deg, #1a8fd1, #5b3bd9); }
.empty {
  text-align: center; padding: 56px 20px; border-radius: 20px; background: var(--panel); border: 1px dashed var(--line-strong); margin: 8px 0;
}
.empty svg.big { width: 56px; height: 56px; color: var(--cyan); margin-bottom: 8px; filter: drop-shadow(0 0 12px var(--cyan-glow)); }
.empty h3 { font-size: 20px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 18px; }
.error-box { text-align: center; padding: 80px 20px; }
.error-box h2 { font-size: 28px; margin-bottom: 8px; }
.error-box p { color: var(--muted); margin-bottom: 20px; }
.tags-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.tags-page-grid .tag-tile { min-height: 0; flex-direction: row; align-items: center; }
.tags-page-grid .tag-tile .n { margin: 0 0 0 auto; }
.az-letter { font-size: 28px; color: var(--cyan); margin: 24px 0 10px; }
.az-list { columns: 4 220px; column-gap: 24px; }
.az-list a { display: block; padding: 4px 0; font-weight: 700; break-inside: avoid; }
.az-list a:hover { color: var(--cyan); }

/* ---------------------------------------------------------------- game page */
.gp { display: grid; grid-template-columns: minmax(0, 1fr) 356px; min-height: calc(100vh - var(--header-h)); }
.gp.theater { grid-template-columns: minmax(0, 1fr) 0; }
.gp.theater .gp-rail { display: none; }
.gp-main { padding: 16px; min-width: 0; }
.gp-rail { background: var(--panel); padding: 16px; border-left: 1px solid var(--line); min-width: 0; }
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #02040e; border-radius: 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 0 0 1px var(--line); }
.gp.theater .player { max-height: calc(100vh - var(--header-h) - 32px); aspect-ratio: auto; height: calc((100vw - var(--sb-w) - 32px) * 9 / 16); }
.player-stage { position: relative; flex: 1; min-height: 0; background: #02040e; }
.player-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.player-cover { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.player-cover .blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) saturate(1.3) brightness(.55); transform: scale(1.1); }
.player-cover .veil { position: absolute; inset: 0; background: radial-gradient(circle at 50% 40%, rgba(6, 10, 29, .2), rgba(6, 10, 29, .85)); }
.cover-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 20px; }
.cover-card img { width: min(300px, 40vw); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; box-shadow: 0 16px 40px rgba(0, 0, 0, .6), 0 0 0 2px rgba(255, 255, 255, .1); }
.cover-card h2 { font-size: 26px; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.cover-card .btn-lg { min-width: 200px; }
.cover-card .btn-lg svg { width: 22px; height: 22px; }
.cover-best:empty { display: none; }
.cover-best { display: inline-flex; align-items: center; gap: 6px; margin-top: -6px; padding: 4px 12px; border-radius: 999px; background: rgba(255, 176, 46, .14); color: var(--amber); font-weight: 800; font-size: 14px; }
.cover-best svg { width: 15px; height: 15px; }
.draft-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; margin: 0 0 18px; border-radius: 12px; background: rgba(255,176,46,.1); border: 1px solid rgba(255,176,46,.3); color: #ffd28a; font-weight: 700; font-size: 14px; }
.draft-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.cover-warn { display: flex; align-items: center; gap: 6px; max-width: 340px; margin: -2px auto 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255,176,46,.12); border: 1px solid rgba(255,176,46,.35); color: #ffd28a; font-weight: 800; font-size: 13px; text-align: left; }
.cover-warn svg { width: 16px; height: 16px; flex: none; }
.player-trouble { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; padding: 16px; border-radius: 14px; background: rgba(9,14,38,.96); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.5); color: var(--text); font-weight: 700; z-index: 3; }
.player-trouble > svg { width: 26px; height: 26px; color: #ffb02e; }
.player-trouble span { color: var(--muted); font-size: 14px; }
.player-trouble .pt-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.cover-note { display: flex; gap: 14px; color: var(--muted); font-weight: 700; font-size: 13px; flex-wrap: wrap; justify-content: center; }
.cover-note span { display: inline-flex; align-items: center; gap: 5px; }
.cover-note svg { width: 15px; height: 15px; }
.player-loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; background: #02040e; color: var(--muted); font-weight: 800; pointer-events: none; transition: opacity .3s; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(41, 231, 255, .15); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-bar { height: 56px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--header); border-top: 1px solid var(--line); }
.player-bar .pb-game { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.player-bar .pb-game img { width: 56px; height: 32px; border-radius: 8px; object-fit: cover; flex: none; }
.player-bar .pb-title { font-weight: 900; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .pb-dev { font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar .pb-dev a:hover { color: var(--cyan); }
.pb-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.vote { height: 40px; border-radius: 30px; background: rgba(255, 255, 255, 0.1); display: inline-flex; align-items: center; overflow: hidden; }
.vote button { height: 40px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; transition: color .15s, background-color .15s; }
.vote button:hover { background: rgba(255, 255, 255, 0.08); }
.vote button svg { width: 20px; height: 20px; }
.vote button.on.up { color: var(--green); }
.vote button.on.down { color: #ff8aa0; }
.vote .sep { width: 1px; height: 22px; background: var(--line-strong); }
.icon-btn.fav.on { color: var(--brand); }
.icon-btn.fav.on svg { fill: currentColor; }
.player:fullscreen { aspect-ratio: auto; width: 100vw; height: 100vh; }
.player:-webkit-full-screen { width: 100vw; height: 100vh; }

.gp-promo {
  display: flex; align-items: center; justify-content: center; gap: 18px; margin: 16px auto 0; max-width: 728px; min-height: 90px;
  border-radius: 16px; padding: 14px 22px; position: relative; overflow: hidden;
  background: linear-gradient(110deg, rgba(41, 231, 255, .12), rgba(139, 92, 255, .14) 50%, rgba(255, 46, 151, .16));
  border: 1px solid rgba(41, 231, 255, .22);
}
.gp-promo svg.ico { width: 38px; height: 38px; color: var(--cyan); flex: none; filter: drop-shadow(0 0 10px var(--cyan-glow)); }
.gp-promo b { font-size: 17px; display: block; }
.gp-promo span { color: var(--muted); font-weight: 700; font-size: 13px; }
.gp-promo .btn { margin-left: auto; }
.gp-info { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 16px; margin-top: 16px; }
.info-panel { background: var(--panel); border-radius: var(--radius); padding: 22px 24px; border: 1px solid var(--line); min-width: 0; }
.info-panel h1 { font-size: 24px; margin: 8px 0 12px; }
.gp-summary { margin: -4px 0 14px; color: var(--muted); font-weight: 700; font-size: 15px; line-height: 1.5; }
.best-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 10px; background: rgba(255, 176, 46, .12); color: var(--amber); font-weight: 800; font-size: 13px; }
.best-chip[hidden] { display: none; }
.best-chip svg { width: 15px; height: 15px; }
.info-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 12px; font-size: 14px; margin-bottom: 18px; }
.kv dt { color: var(--muted); font-weight: 700; }
.kv dd { margin: 0; font-weight: 800; }
.kv dd a { color: var(--cyan); }
.kv dd small { color: var(--muted); font-weight: 700; font-size: 11px; margin-left: 4px; }
.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 16px; background: var(--input); font-weight: 800; font-size: 14px; transition: background-color .2s, box-shadow .2s; }
.tag-pill b { color: var(--cyan); font-weight: 900; }
.tag-pill:hover { background: var(--input-hover); box-shadow: 0 0 0 1px var(--cyan); }
.side-card { background: var(--panel); border-radius: var(--radius); padding: 18px; border: 1px solid var(--line); }
.side-card h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.side-card h3 svg { width: 20px; height: 20px; color: var(--amber); }
.dev-card { display: flex; flex-direction: column; gap: 14px; }
.dev-card .who { display: flex; align-items: center; gap: 12px; }
.dev-card .who .avatar { width: 52px; height: 52px; box-shadow: 0 0 0 2px var(--line-strong); }
.dev-card .who b { display: block; font-size: 16px; }
.dev-card .who span { color: var(--muted); font-weight: 700; font-size: 13px; }
.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-game { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; font-weight: 800; }
.mini-game:hover { background: rgba(255, 255, 255, 0.06); }
.mini-game img { width: 72px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.mini-game span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desc-panel { margin-top: 16px; }
.desc-panel h2 { font-size: 20px; margin: 4px 0 10px; }
.desc-panel h3 { font-size: 17px; margin: 20px 0 8px; }
.desc-body { color: var(--text); font-size: 15px; line-height: 1.6; }
.desc-body p { margin-bottom: 12px; }
.controls-table { width: 100%; border-collapse: collapse; margin-top: 4px; }
.controls-table td { padding: 10px 12px; border-top: 1px solid var(--line); font-weight: 700; vertical-align: top; }
.controls-table td:first-child { width: 40%; }
.kbd { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--input); border-bottom: 2px solid #0a1030; font-weight: 900; font-size: 13px; margin: 1px 2px; }
.rail-title { font-size: 16px; font-weight: 900; margin: 4px 0 10px; }
.rail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rail-grid .thumb:hover .thumb-media { transform: scale(1.05); }
.rail-lb { margin-bottom: 16px; }
.more-games { margin-top: 24px; }
.more-games h2 { font-size: 19.2px; margin: 0 0 12px; }

/* leaderboard table/widget */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; }
.lb-row + .lb-row { margin-top: 2px; }
.lb-row:hover { background: rgba(255, 255, 255, 0.05); }
.lb-row.me { background: rgba(41, 231, 255, 0.10); box-shadow: inset 0 0 0 1px rgba(41, 231, 255, 0.3); }
.lb-rank { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; background: var(--input); flex: none; }
.lb-rank.r1 { background: linear-gradient(135deg, #ffe27a, #ffb02e); color: #3a2400; box-shadow: 0 0 12px rgba(255, 196, 46, .5); }
.lb-rank.r2 { background: linear-gradient(135deg, #f1f4ff, #9aa7c9); color: #1b2238; }
.lb-rank.r3 { background: linear-gradient(135deg, #ffbe8a, #c96a2c); color: #2e1404; }
.lb-row .avatar { width: 30px; height: 30px; }
.lb-name { flex: 1; min-width: 0; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-name:hover { color: var(--cyan); }
.lb-score { font-weight: 900; color: var(--cyan); font-variant-numeric: tabular-nums; }
.lb-empty { color: var(--muted); font-weight: 700; padding: 6px 0 4px; font-size: 13px; }
.lb-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.lb-tabs button { height: 28px; padding: 0 12px; border-radius: 14px; font-weight: 800; font-size: 13px; color: var(--muted); background: var(--input); }
.lb-tabs button.on { background: var(--cyan); color: #04122a; }
.lb-foot { margin-top: 10px; font-size: 12px; color: var(--muted); font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }

/* ---------------------------------------------------------------- drawers */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(2, 4, 14, 0.62); z-index: 400; animation: fade .15s; }
.drawer {
  position: fixed; top: 68px; right: 8px; bottom: 8px; width: var(--drawer-w); max-width: calc(100vw - 16px); z-index: 410;
  background: var(--drawer); border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); border: 1px solid var(--line);
  display: flex; flex-direction: column; animation: slidein .2s ease-out; overflow: hidden;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px 56px; flex: none; }
.drawer-head h2 { font-size: 16px; font-weight: 900; }
.drawer-close { position: absolute; right: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text); }
.drawer-close:hover { background: rgba(255, 255, 255, 0.08); }
.drawer-close svg { width: 24px; height: 24px; }
.drawer-back { position: absolute; left: 8px; top: 8px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.drawer-back:hover { background: rgba(255, 255, 255, 0.08); }
.drawer-back svg { width: 24px; height: 24px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 28px 24px; scrollbar-width: thin; scrollbar-color: var(--input) transparent; }
.drawer-tabs { display: flex; border-bottom: 1px solid var(--line); flex: none; padding: 0 20px; }
.drawer-tabs button { flex: 1; height: 44px; font-weight: 800; color: var(--muted); border-bottom: 3px solid transparent; transition: color .2s, border-color .2s; }
.drawer-tabs button.on { color: var(--text); border-color: var(--brand); }
.drawer-tabs button:hover { color: var(--text); }
.auth-title { text-align: center; font-size: 22px; margin: 18px 0 18px; }
.auth-sub { text-align: center; color: var(--muted); font-weight: 700; margin: -8px 0 18px; }
.auth-email-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--input); border-radius: 12px; padding: 10px 14px; font-weight: 800; margin-bottom: 16px; }
.auth-email-chip button { color: var(--cyan); font-weight: 900; }
.or-sep { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 900; font-size: 13px; margin: 16px 0; }
.or-sep::before, .or-sep::after { content: ""; height: 1px; flex: 1; background: var(--line-strong); }
.auth-perks { display: grid; gap: 10px; margin: 6px 0 20px; }
.auth-perks div { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.auth-perks svg { width: 22px; height: 22px; color: var(--cyan); flex: none; }
.auth-legal { font-size: 12px; color: var(--dim); text-align: center; margin-top: 14px; }
.auth-legal a { color: var(--muted); text-decoration: underline; }
.link-btn { color: var(--cyan); font-weight: 800; text-decoration: underline; font-size: inherit; }
.auth-page { max-width: 460px; margin: 32px auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 8px 24px 24px; }
.auth-page .auth-title { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 24px; }
.auth-page .auth-title svg { width: 24px; height: 24px; color: var(--cyan); }
.reset-link { display: flex; gap: 8px; align-items: center; }
.reset-link .input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.drawer-links { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.drawer-links a { color: var(--muted); font-size: 13px; font-weight: 700; }
.drawer-links a:hover { color: var(--text); }
.prompt-box { text-align: center; padding: 22px 6px 6px; }
.prompt-box svg.big { width: 44px; height: 44px; color: var(--text); margin-bottom: 10px; }
.prompt-box h3 { font-size: 20px; margin-bottom: 16px; line-height: 1.3; }
.drawer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 12px; }
.drawer-grid .thumb:hover .thumb-media { transform: scale(1.04); }
.drawer-grid .gname { font-weight: 800; font-size: 13px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.drawer-section-title { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 18px 0 8px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.person:hover { background: rgba(255, 255, 255, 0.05); }
.person .avatar { width: 42px; height: 42px; box-shadow: 0 0 0 2px var(--line); }
.person .who { flex: 1; min-width: 0; }
.person .who b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .who span { color: var(--muted); font-size: 12px; font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .acts { display: flex; gap: 6px; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 4px; box-shadow: 0 0 6px var(--green); }
.notif { display: flex; gap: 12px; padding: 12px 10px; border-radius: 12px; cursor: pointer; position: relative; width: 100%; text-align: left; }
.notif:hover { background: rgba(255, 255, 255, 0.05); }
.notif .n-ico { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--input); color: var(--cyan); overflow: hidden; }
.notif .n-ico svg { width: 20px; height: 20px; }
.notif .n-ico img { width: 100%; height: 100%; object-fit: cover; }
.notif .n-text { font-weight: 700; font-size: 14px; line-height: 1.35; }
.notif .n-time { color: var(--dim); font-size: 12px; font-weight: 700; margin-top: 3px; }
.notif.unread .n-text { color: #fff; font-weight: 800; }
.notif.unread::after { content: ""; position: absolute; right: 10px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.drawer-note { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 10px 12px; border-radius: 12px; background: rgba(41, 231, 255, .08); color: var(--muted); font-weight: 700; font-size: 13px; }
.drawer-note svg { width: 16px; height: 16px; color: var(--cyan); flex: none; }
.drawer-note .link { color: var(--cyan); font-weight: 800; }
.drawer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 4px 0 8px; }
.drawer-toolbar button { color: var(--cyan); font-weight: 800; font-size: 13px; }
.drawer-toolbar button:disabled { color: var(--dim); cursor: default; }

/* ---------------------------------------------------------------- modal & toast */
.modal-backdrop { position: fixed; inset: 0; background: rgba(2, 4, 14, 0.72); z-index: 700; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--drawer); border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .7); animation: pop .16s ease-out; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px 24px; }
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 12px 24px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; flex-wrap: wrap; }
.radio-list { display: grid; gap: 8px; margin-bottom: 16px; }
.radio-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--input); cursor: pointer; font-weight: 800; border: 2px solid transparent; }
.radio-item input { accent-color: var(--brand); width: 18px; height: 18px; }
.radio-item:has(input:checked) { border-color: var(--brand); }
.share-row { display: flex; gap: 8px; }
.share-row .input { flex: 1; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 900; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; padding: 12px 16px; font-weight: 800; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); animation: toastin .2s ease-out; max-width: 520px; }
.toast svg { width: 22px; height: 22px; flex: none; }
.toast.success svg { color: var(--green); }
.toast.error svg { color: #ff8aa0; }
.toast.info svg { color: var(--cyan); }
.toast .btn { margin-left: 6px; }
.toast.out { animation: toastout .2s ease-in forwards; }
@keyframes toastin { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastout { to { transform: translateY(14px); opacity: 0; } }

/* ---------------------------------------------------------------- profile */
.profile { max-width: 1200px; margin: 0 auto; padding: 16px 16px 48px; }
.profile-cover { height: 260px; border-radius: 24px; position: relative; overflow: hidden; border: 1px solid var(--line); }
.profile-cover::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 40px 40px; mask-image: linear-gradient(transparent 20%, #000); -webkit-mask-image: linear-gradient(transparent 20%, #000); }
.cover-c1 { background: radial-gradient(circle at 80% 30%, #ff2e97 0, transparent 45%), radial-gradient(circle at 20% 80%, #29e7ff 0, transparent 45%), linear-gradient(135deg, #1a0b4a, #0b1240); }
.cover-c2 { background: radial-gradient(circle at 70% 120%, #ffb02e 0, transparent 50%), linear-gradient(160deg, #3a0b5e 0%, #ff2e97 120%); }
.cover-c3 { background: radial-gradient(circle at 50% 120%, #29e7ff 0, transparent 55%), linear-gradient(180deg, #050a24, #0b2a6b); }
.cover-c4 { background: radial-gradient(circle at 20% 20%, #b6ff3b 0, transparent 40%), linear-gradient(135deg, #062b2a, #0b1240 70%); }
.cover-c5 { background: radial-gradient(circle at 85% 70%, #8b5cff 0, transparent 50%), radial-gradient(circle at 10% 10%, #ff2e97 0, transparent 35%), #0c0a2e; }
.cover-c6 { background: linear-gradient(115deg, #ff5a5a 0%, #8b2cff 50%, #29e7ff 100%); }
.cover-c7 { background: radial-gradient(circle at 50% -20%, #ffe14d 0, transparent 50%), linear-gradient(180deg, #2a1a06, #06081e); }
.cover-c8 { background: repeating-linear-gradient(135deg, #0b1240 0 22px, #101a55 22px 44px), #0b1240; }
.profile-top { display: flex; align-items: flex-end; gap: 22px; padding: 0 28px; margin-top: -70px; position: relative; z-index: 2; flex-wrap: wrap; }
.profile-avatar { width: 150px; height: 150px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 6px var(--bg), 0 0 0 8px var(--cyan), 0 0 30px var(--cyan-glow); flex: none; background: var(--surface); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-id { flex: 1; min-width: 220px; padding-bottom: 8px; }
.profile-id h1 { font-size: 32px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-id .handle { color: var(--muted); font-weight: 800; }
.profile-actions { display: flex; gap: 10px; padding-bottom: 12px; flex-wrap: wrap; }
.profile-bio { padding: 16px 28px 0; max-width: 760px; color: var(--text); font-size: 15px; white-space: pre-line; }
.profile-stats { display: flex; gap: 10px; padding: 18px 28px 0; flex-wrap: wrap; }
.stat-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; min-width: 120px; }
.stat-tile b { display: block; font-size: 22px; font-weight: 900; color: var(--text); }
.stat-tile span { color: var(--muted); font-weight: 800; font-size: 13px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 24px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { height: 46px; padding: 0 16px; font-weight: 800; font-size: 15px; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.tabs button .n { background: var(--input); border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.tabs button.on { color: var(--text); border-color: var(--brand); }
.tabs button:hover { color: var(--text); }
.score-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.score-card { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.score-card img { width: 96px; height: 54px; object-fit: cover; border-radius: 10px; }
.score-card b { display: block; }
.score-card .sc { color: var(--cyan); font-weight: 900; font-size: 18px; }
.picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.picker button { aspect-ratio: 1; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px var(--line); transition: box-shadow .15s, transform .15s; }
.picker button:hover { transform: scale(1.05); }
.picker button.on { box-shadow: 0 0 0 3px var(--brand), 0 0 14px var(--brand-glow); }
.picker img { width: 100%; height: 100%; }
.cover-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cover-picker button { height: 54px; border-radius: 12px; box-shadow: 0 0 0 2px var(--line); }
.cover-picker button.on { box-shadow: 0 0 0 3px var(--brand); }
.danger-zone { border: 1px solid rgba(255, 77, 109, .35); border-radius: 14px; padding: 16px; margin-top: 22px; }
.danger-zone h3 { color: #ff8aa0; font-size: 16px; margin-bottom: 6px; }

/* ---------------------------------------------------------------- developer */
.dev-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 48px 44px; margin-bottom: 24px; border: 1px solid var(--line);
  background: radial-gradient(500px 300px at 90% 10%, rgba(255, 46, 151, .25), transparent 70%), radial-gradient(500px 300px at 0% 100%, rgba(41, 231, 255, .2), transparent 70%), var(--panel); }
.dev-hero h1 { font-size: 40px; margin-bottom: 10px; max-width: 700px; }
.dev-hero p { color: var(--muted); font-size: 17px; font-weight: 700; max-width: 640px; margin-bottom: 22px; }
.dev-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 28px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.feature svg { width: 30px; height: 30px; color: var(--cyan); margin-bottom: 10px; filter: drop-shadow(0 0 8px var(--cyan-glow)); }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-weight: 700; margin: 0; }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { font-size: 32px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 24px; }
.stat-row .stat-tile b { font-size: 26px; }
.dev-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.dev-table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; padding: 0 12px; font-weight: 900; }
.dev-table td { background: var(--panel); padding: 10px 12px; font-weight: 800; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.dev-table td:first-child { border-left: 1px solid var(--line); border-radius: 14px 0 0 14px; }
.dev-table td:last-child { border-right: 1px solid var(--line); border-radius: 0 14px 14px 0; }
.dev-game { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.dev-game img { width: 96px; height: 54px; object-fit: cover; border-radius: 10px; flex: none; }
.dev-game b { display: block; font-size: 15px; }
.row-acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.row-acts .icon-btn { width: 36px; height: 36px; }
.row-acts .icon-btn svg { width: 18px; height: 18px; }
.code { background: #050820; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; color: #c9d4ff; overflow-x: auto; white-space: pre; line-height: 1.55; }
.docs { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-top: 28px; }
.docs h2 { font-size: 22px; margin-bottom: 12px; }
.docs h3 { font-size: 16px; margin: 18px 0 8px; }
.docs ul { list-style: disc; padding-left: 20px; color: var(--text); }
.docs li { margin-bottom: 6px; }
.docs code { background: var(--input); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin-bottom: 16px; }
.form-card h2 { font-size: 18px; margin-bottom: 4px; display: flex; align-items: center; gap: 10px; }
.form-card h2 .step { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 12px var(--brand-glow); }
.form-card .sub { color: var(--muted); font-weight: 700; margin-bottom: 18px; }
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: 16px; padding: 28px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background-color .2s; background: rgba(255, 255, 255, 0.02); position: relative;
}
.dropzone:hover, .dropzone.drag { border-color: var(--cyan); background: rgba(41, 231, 255, 0.05); }
.dropzone svg { width: 40px; height: 40px; color: var(--cyan); margin-bottom: 8px; }
.dropzone b { display: block; font-size: 16px; margin-bottom: 4px; }
.dropzone span { color: var(--muted); font-weight: 700; font-size: 13px; }
.dropzone.has-file { border-style: solid; border-color: rgba(61, 255, 168, .5); background: rgba(61, 255, 168, .05); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-chip { display: inline-flex; align-items: center; gap: 10px; background: var(--input); padding: 8px 12px; border-radius: 10px; font-weight: 800; margin-top: 10px; position: relative; z-index: 2; }
.file-chip button { color: var(--muted); display: inline-flex; }
.file-chip button svg { width: 18px; height: 18px; margin: 0; color: inherit; }
.img-drop { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; }
.img-drop.portrait { grid-template-columns: 110px 1fr; }
.img-preview { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.img-drop.portrait .img-preview { aspect-ratio: 271 / 401; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--input); border-radius: 12px; padding: 7px 8px; min-height: 46px; border: 2px solid transparent; cursor: text; }
.chips-input:focus-within { border-color: var(--cyan); }
.chips-input input { flex: 1; min-width: 120px; background: none; border: 0; outline: none; font-weight: 700; font-size: 15px; height: 28px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 6px 0 12px; border-radius: 14px; background: rgba(41, 231, 255, 0.14); color: var(--cyan); font-weight: 800; font-size: 13px; }
.chip button { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; }
.chip button:hover { background: rgba(255, 255, 255, 0.12); }
.chip button svg { width: 14px; height: 14px; }
.chip-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-suggest button { height: 26px; padding: 0 10px; border-radius: 13px; background: var(--input); font-size: 12px; font-weight: 800; color: var(--muted); }
.chip-suggest button:hover { color: var(--text); background: var(--input-hover); }
.controls-editor .ctl-row { display: grid; grid-template-columns: 1fr 1.6fr 40px; gap: 8px; margin-bottom: 8px; }
.controls-editor .ctl-row .icon-btn { width: 40px; height: 46px; border-radius: 12px; }
.counter { font-size: 12px; color: var(--dim); text-align: right; font-weight: 700; }
.radio-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pills label { cursor: pointer; }
.radio-pills input { position: absolute; opacity: 0; pointer-events: none; }
.radio-pills span { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 20px; background: var(--input); font-weight: 800; border: 2px solid transparent; }
.radio-pills span svg { width: 18px; height: 18px; }
.radio-pills input:checked + span { border-color: var(--brand); background: rgba(255, 46, 151, .12); }
.radio-pills input:focus-visible + span { outline: 2px solid var(--cyan); }
.settings-grid { display: grid; gap: 18px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.setting > div b { display: block; }
.setting > div span { color: var(--muted); font-weight: 700; font-size: 13px; }
.preview-col { position: sticky; top: calc(var(--header-h) + 16px); }
.preview-col .side-card + .side-card { margin-top: 14px; }
.checklist { display: grid; gap: 10px; }
.checklist div { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--muted); }
.checklist div svg { width: 20px; height: 20px; flex: none; color: var(--dim); }
.checklist div.ok { color: var(--text); }
.checklist div.ok svg { color: var(--green); }
.progress { height: 10px; border-radius: 5px; background: var(--input); overflow: hidden; margin: 12px 0 6px; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--brand)); box-shadow: 0 0 12px var(--brand-glow); transition: width .2s; }
.form-error { background: rgba(255, 77, 109, .12); border: 1px solid rgba(255, 77, 109, .4); color: #ffb3c1; border-radius: 12px; padding: 12px 14px; font-weight: 800; margin-bottom: 14px; display: flex; gap: 10px; align-items: flex-start; }
.form-error svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.submit-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- leaderboards page */
.lb-hero { display: flex; align-items: center; gap: 22px; padding: 28px; border-radius: 24px; margin-bottom: 22px; flex-wrap: wrap;
  background: radial-gradient(600px 240px at 80% 0%, rgba(255, 176, 46, .22), transparent 70%), linear-gradient(110deg, #2a1a10, #141236 50%, #0f1640); border: 1px solid rgba(255, 176, 46, .25); }
.lb-hero .trophy-art { width: 84px; height: 84px; }
.lb-hero h1 { font-size: 36px; color: #ffd27a; }
.lb-hero p { margin: 4px 0 10px; color: var(--text); font-weight: 700; }
.lb-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.lb-games { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 10px; position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - 100px); overflow-y: auto; }
.lb-game-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border-radius: 12px; font-weight: 800; text-align: left; }
.lb-game-btn img { width: 64px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; }
.lb-game-btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-game-btn small { color: var(--muted); font-weight: 800; }
.lb-game-btn:hover { background: rgba(255, 255, 255, 0.06); }
.lb-game-btn.on { background: rgba(255, 176, 46, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 176, 46, .4); }
.lb-board { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.lb-board-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.lb-board-head img { width: 140px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.lb-board-head h2 { font-size: 24px; }
.lb-board .lb-row { padding: 10px 10px; }
.lb-board .lb-row .avatar { width: 36px; height: 36px; }
.lb-board .lb-score { font-size: 16px; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.podium a { background: var(--surface); border-radius: 14px; padding: 14px; text-align: center; border: 1px solid var(--line); }
.podium .avatar { width: 54px; height: 54px; margin: 6px auto 8px; display: block; }
.podium b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- static & admin */
.prose { max-width: 820px; font-size: 16px; line-height: 1.7; }
.prose h1 { font-size: 40px; margin-bottom: 14px; }
.prose h2 { font-size: 22px; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--text); }
.prose ul { list-style: disc; padding-left: 22px; margin-bottom: 14px; }
.prose a { color: var(--cyan); font-weight: 700; }
.prose .lead { font-size: 19px; color: var(--muted); font-weight: 700; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.admin-table { width: 100%; border-collapse: collapse; }
.review-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; display: grid; gap: 14px; }
.review-top { display: flex; gap: 14px; align-items: flex-start; }
.review-top img { width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; flex: none; }
.review-top h3 { font-size: 19px; margin: 0 0 4px; }
.review-meta { font-weight: 700; font-size: 13px; }
.review-body { font-size: 14px; }
.review-body .desc-body { max-height: 140px; overflow: auto; color: var(--muted); }
.review-issues { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.review-issues li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.review-issues li svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.review-issues li.error svg, .review-issues li.error b { color: var(--red); }
.review-issues li.warn svg, .review-issues li.warn b { color: var(--amber); }
.review-ok { display: flex; gap: 8px; align-items: center; color: var(--green); font-weight: 800; }
.review-ok svg { width: 16px; height: 16px; }
.review-acts { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.review-acts .textarea { min-height: 40px; height: 40px; resize: vertical; }
.review-h { font-size: 18px; margin: 22px 0 8px; }
@media (max-width: 720px) {
  .review-top { flex-direction: column; }
  .review-top img { width: 100%; }
  .review-acts { grid-template-columns: 1fr; }
}
.admin-table th, .admin-table td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.admin-table td img { width: 80px; height: 45px; object-fit: cover; border-radius: 8px; }
.admin-msg { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.admin-msg.unread { border-color: rgba(255, 46, 151, .5); }
.admin-msg header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.admin-msg p { white-space: pre-wrap; margin: 6px 0 10px; }
.not-found { text-align: center; padding: 90px 20px; }
.not-found .big404 { font-size: 120px; font-weight: 900; line-height: 1; background: linear-gradient(90deg, var(--cyan), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 30px rgba(255, 46, 151, .35)); }

/* ---------------------------------------------------------------- developer game manager */
.mgr-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 6px; flex-wrap: wrap; }
.mgr-head > img { width: 240px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); flex: none; }
.mgr-id { flex: 1; min-width: 260px; }
.mgr-id h1 { font-size: 30px; margin: 8px 0 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mgr-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.mgr-warn, .mgr-note { display: flex; gap: 8px; align-items: center; font-weight: 800; margin: 14px 0 0; }
.mgr-warn { color: #ffb3c1; }
.mgr-warn.review-note { align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: rgba(255, 77, 109, .1); border: 1px solid rgba(255, 77, 109, .3); line-height: 1.5; }
.mgr-warn.review-note svg { flex: none; margin-top: 2px; }
.mgr-note { color: var(--cyan); }
.mgr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.test-stage { background: #02040e; border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; justify-content: center; align-items: center; min-height: 420px;
  background-image: radial-gradient(circle at 50% 0%, rgba(41, 231, 255, .08), transparent 60%); }
.device { position: relative; background: #000; overflow: hidden; box-shadow: 0 0 0 2px var(--line-strong), 0 20px 50px rgba(0, 0, 0, .5); }
.device.desktop { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; }
.device.phone { width: 300px; height: 560px; border-radius: 28px; box-shadow: 0 0 0 10px #161d3f, 0 0 0 12px var(--line-strong), 0 20px 50px rgba(0, 0, 0, .5); }
.device.phone-land { width: 560px; max-width: 100%; height: 300px; border-radius: 28px; box-shadow: 0 0 0 10px #161d3f, 0 0 0 12px var(--line-strong), 0 20px 50px rgba(0, 0, 0, .5); }
.device iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.device .cover-card img { width: min(220px, 60%); }
.device.phone .cover-card .btn-lg, .device.phone-land .cover-card .btn-lg { min-width: 0; height: 44px; font-size: 16px; }
.report { display: grid; gap: 8px; }
.report-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.report-item > svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.report-item b { font-size: 14px; }
.report-item p { margin: 3px 0 0; color: var(--muted); font-weight: 700; font-size: 13px; }
.report-item.ok > svg { color: var(--green); }
.report-item.info > svg { color: var(--cyan); }
.report-item.warn { border-color: rgba(255, 176, 46, .35); } .report-item.warn > svg { color: var(--amber); }
.report-item.error { border-color: rgba(255, 77, 109, .5); background: rgba(255, 77, 109, .08); } .report-item.error > svg { color: #ff8aa0; }
.chart { width: 100%; height: 180px; display: block; }
.chart rect { fill: var(--cyan); opacity: .85; }
.chart rect:hover { fill: var(--brand); opacity: 1; }
.chart-axis { display: flex; justify-content: space-between; color: var(--dim); font-weight: 700; font-size: 12px; margin-top: 6px; }
.version-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-top: 1px solid var(--line); }
.whats-new { background: linear-gradient(110deg, rgba(41, 231, 255, .1), rgba(255, 46, 151, .1)); border: 1px solid rgba(41, 231, 255, .25); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; }
.whats-new b { display: flex; align-items: center; gap: 8px; color: var(--cyan); }
.whats-new p { margin: 6px 0 0; font-weight: 700; }
a.feature { transition: border-color .2s, transform .2s; }
a.feature:hover { border-color: var(--cyan); transform: translateY(-2px); }
@media (max-width: 1100px) { .mgr-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .mgr-head > img { width: 100%; } .device.phone { width: 260px; height: 480px; } .test-stage { padding: 12px; min-height: 0; } }

/* ---------------------------------------------------------------- mobile bottom nav */
.bottom-nav { display: none; }

/* ---------------------------------------------------------------- responsive */
@media (min-width: 1600px) {
  .header-right .label-btn { display: inline-flex; }
  .header-right .icon-btn.labelled { display: none; }
}
@media (max-width: 1300px) {
  .gp { grid-template-columns: minmax(0, 1fr) 300px; }
  .gp-info { grid-template-columns: minmax(0, 1fr); }
  .tag-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .upload-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 1100px) {
  .seo-block { grid-template-columns: 1fr; }
  .gp { grid-template-columns: minmax(0, 1fr); }
  .gp-rail { border-left: 0; border-top: 1px solid var(--line); }
  .rail-grid { grid-template-columns: repeat(4, 1fr); }
  .upload-layout, .contact-grid, .lb-layout { grid-template-columns: 1fr; }
  .preview-col, .lb-games { position: static; max-height: none; }
  .header-search { max-width: calc(100% - 400px); }
}
@media (max-width: 1023px) {
  :root { --sb-w: 0px; }
  body.sb-expanded { --sb-w: 0px; }
  .sidebar { width: var(--sb-expanded); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 10px 0 40px rgba(0, 0, 0, .5); }
  .sidebar.overlay { transform: none; }
  .main { margin-left: 0; }
  .header-search { position: static; transform: none; flex: 1; max-width: none; width: auto; margin: 0 16px; }
  .search-panel, .search-panel.wide { width: calc(100vw - 24px); min-width: 0; position: fixed; top: 56px; left: 12px; transform: none; }
  .search-intents { grid-template-columns: repeat(2, 1fr); }
  .list-head h1 { font-size: 36px; }
}
@media (max-width: 720px) {
  :root { --header-h: 56px; }
  .header-search { display: none; }
  .header.searching .header-search { display: block; position: absolute; inset: 8px 8px auto 8px; margin: 0; z-index: 5; }
  .header.searching .search-cancel { display: inline-flex; }
  .mobile-search-btn { display: inline-flex; }
  .header-right { gap: 8px; padding-right: 10px; }
  .header-right .hide-sm { display: none; }
  .burger { width: 52px; }
  .logo-word b { font-size: 16px; }
  .logo-word span { font-size: 12.5px; letter-spacing: 3px; }
  .logo-mark { width: 30px; height: 30px; }
  .home { padding-top: 12px; }
  .page { padding: 0 8px 80px 0; }
  .page-narrow, .page-pad { padding: 16px 14px 90px; }
  .tag-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-head h1 { font-size: 30px; }
  .list-head-row { flex-direction: column; gap: 12px; }
  .gp-main { padding: 0 0 16px; }
  .gp-info, .desc-panel, .more-games, .gp-promo { margin-left: 10px; margin-right: 10px; }
  .gp-promo { flex-wrap: wrap; text-align: left; }
  .gp-promo .btn { margin-left: 0; }
  .player { aspect-ratio: 4 / 3.4; }
  /* While a game runs on a phone, it gets the whole screen between the header and the bottom bar
     (iPhones can't use real fullscreen for web pages). */
  .player.playing { aspect-ratio: auto; height: calc(100vh - var(--header-h) - 60px); height: calc(100dvh - var(--header-h) - 60px - env(safe-area-inset-bottom)); }
  .player-bar { padding: 0 8px; gap: 6px; }
  .gp-promo { display: none; }
  .player-bar .pb-game img, .player-bar .hide-sm { display: none; }
  .pb-actions { gap: 4px; }
  .pb-actions .icon-btn { width: 36px; height: 36px; }
  .vote button { padding: 0 9px; }
  .rail-grid { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .info-panel { padding: 18px; }
  .dev-hero { padding: 30px 22px; }
  .dev-hero h1 { font-size: 30px; }
  .form-row { grid-template-columns: 1fr; }
  .img-drop { grid-template-columns: 1fr; }
  .img-drop.portrait { grid-template-columns: 110px 1fr; }
  .dev-table thead { display: none; }
  .dev-table, .dev-table tbody, .dev-table tr, .dev-table td { display: block; width: 100%; }
  .dev-table tr { margin-bottom: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
  .dev-table td { border: 0 !important; border-radius: 0 !important; background: none; padding: 6px 8px; }
  .dev-table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
  .row-acts { justify-content: flex-start; }
  .profile-cover { height: 150px; border-radius: 18px; }
  .profile-top { margin-top: -50px; padding: 0 12px; gap: 14px; }
  .profile-avatar { width: 104px; height: 104px; }
  .profile-id h1 { font-size: 24px; }
  .profile-bio, .profile-stats { padding-left: 12px; padding-right: 12px; }
  .stat-tile { min-width: 0; flex: 1 1 40%; }
  .drawer { top: 0; right: 0; bottom: 0; max-width: 100vw; width: 100vw; border-radius: 0; }
  .drawer-body { padding: 8px 18px 24px; }
  .podium { grid-template-columns: 1fr; }
  .picker { grid-template-columns: repeat(4, 1fr); }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 60px; z-index: 290;
    background: var(--header); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 800; color: var(--muted); }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .on { color: var(--cyan); }
  .toasts { bottom: 76px; }
  .home-foot { padding-bottom: 80px; }
}
.search-cancel { display: none; position: absolute; right: -2px; top: 0; height: 40px; padding: 0 12px; font-weight: 800; color: var(--cyan); }
.header.searching .search-input { padding-right: 90px; }
.header.searching .search-go { right: 72px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.noscript-seo { max-width: 860px; margin: 90px auto 0; padding: 0 24px; line-height: 1.6; }
.noscript-seo a { color: var(--cyan); }

/* ---------------------------------------------------------------- ad slots (see public/js/ads.js) */
.ad-slot { width: min(100%, var(--ad-w)); height: var(--ad-h); margin: 14px auto; }
.ad-slot.ad-rectangle { margin: 0 auto 14px; }
.ad-slot { position: relative; }
.ad-slot .ad-label { position: absolute; top: -15px; left: 0; font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .7; }
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
@media (max-width: 760px) { .ad-slot.ad-leaderboard { width: min(100%, 320px); height: 100px; } }
.ad-box { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border-radius: 12px; border: 1px dashed var(--line-strong); background: rgba(255, 255, 255, .03); color: var(--dim); font-weight: 800; font-size: 13px; text-align: center; padding: 8px; }
.ad-box small { font-weight: 700; font-size: 11px; opacity: .8; }
.ad-box.house { border-style: solid; background: linear-gradient(120deg, rgba(255, 46, 151, .12), rgba(41, 231, 255, .1)); color: var(--text); }
.ad-box.house svg { width: 22px; height: 22px; color: var(--cyan); }
.ad-box.house small { color: var(--muted); }
.preroll { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: rgba(4, 7, 20, .92); }
.preroll-card { width: min(420px, 88%); padding: 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-align: center; display: grid; gap: 8px; }
.preroll-card b { font-size: 18px; }
.preroll-card p { margin: 0; color: var(--muted); font-weight: 700; }
.preroll-label { justify-self: center; font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.preroll-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: var(--muted); font-weight: 800; font-size: 13px; }
.stat-tile.wide { grid-column: span 2; }
@media (max-width: 720px) { .stat-tile.wide { grid-column: auto; } }

/* ---------------------------------------------------------------- daily retention card (public/js/retention.js) */
.daily-card { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin: 4px 0 18px; padding: 14px 18px; border-radius: var(--radius); background: linear-gradient(120deg, rgba(255, 46, 151, .14), rgba(41, 231, 255, .1)); border: 1px solid var(--line-strong); }
.daily-streak { display: flex; align-items: center; gap: 12px; }
.daily-streak .flame { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 176, 46, .16); color: var(--amber); }
.daily-streak .flame svg { width: 24px; height: 24px; }
.daily-streak b { display: block; font-size: 18px; }
.daily-streak small { color: var(--muted); font-weight: 700; }
.daily-missions { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.daily-missions li { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.daily-missions .tick { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; }
.daily-missions li.done .tick { background: var(--green); border-color: var(--green); color: #052; }
.daily-missions li.done .lbl { color: var(--muted); text-decoration: line-through; }
.daily-missions .tick svg { width: 14px; height: 14px; }
.daily-missions .cnt { margin-left: auto; color: var(--muted); font-size: 12px; }
.daily-foot { grid-column: 1 / 3; color: var(--muted); font-weight: 800; font-size: 12px; }
.daily-pick { grid-row: 1 / 3; grid-column: 3; width: 150px; }
.daily-pick .pick-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--cyan); }
@media (max-width: 760px) { .daily-card { grid-template-columns: 1fr; } .daily-foot { grid-column: auto; } .daily-pick { grid-row: auto; grid-column: auto; width: 100%; max-width: 220px; } }
