/* PlayWebGames — retro arcade theme. One stylesheet for the site and the admin panel. */

@font-face { font-family: 'Press Start 2P'; src: url(/static/fonts/press-start-2p.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url(/static/fonts/chakra-petch-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url(/static/fonts/chakra-petch-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Chakra Petch'; src: url(/static/fonts/chakra-petch-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'VT323'; src: url(/static/fonts/vt323.woff2) format('woff2'); font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b0a1a;
  --bg-2: #141133;
  --bg-3: #1d1948;
  --bg-4: #262062;
  --line: #2d2869;
  --line-2: #433b9c;
  --text: #efebff;
  --muted: #a8a2dc;
  --dim: #7d77b8;
  --neon: #39ff14;
  --pink: #ff2bd6;
  --cyan: #00e5ff;
  --yellow: #ffe600;
  --orange: #ff7a00;
  --red: #ff3b5c;
  --violet: #a46bff;
  --ok: #4dffb8;
  --series-1: #3987e5;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --led: 'VT323', ui-monospace, monospace;
  --sans: 'Chakra Petch', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 4px;
  --shadow: 4px 4px 0 #000;
  --gutter: 16px;
  --maxw: 1280px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(1px 1px at 12% 18%, #ffffff55 50%, transparent 51%),
    radial-gradient(1px 1px at 67% 42%, #ffffff44 50%, transparent 51%),
    radial-gradient(1px 1px at 38% 77%, #ffffff33 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 88%, #ffffff44 50%, transparent 51%),
    linear-gradient(transparent 31px, #ffffff06 32px),
    linear-gradient(90deg, transparent 31px, #ffffff06 32px),
    radial-gradient(ellipse at 50% -10%, #2b1f6e 0%, transparent 60%);
  background-size: 420px 420px, 380px 380px, 460px 460px, 520px 520px, 32px 32px, 32px 32px, 100% 900px;
  background-repeat: repeat, repeat, repeat, repeat, repeat, repeat, no-repeat;
  color: var(--text);
  font: 16px/1.55 var(--sans);
}
body::after { /* CRT scanlines */
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, #00000022 2px 3px);
  z-index: 100;
}
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--yellow); }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h2 { font-size: 1.3rem; }
code, pre { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .9em; }
code { background: var(--bg-3); padding: 1px 5px; border-radius: 3px; }
pre { background: #07061a; border: 1px solid var(--line); padding: 12px; overflow: auto; border-radius: var(--radius); }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 2px dashed var(--line); margin: 24px 0; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--yellow); color: #000; padding: 8px 12px; font-weight: 700; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--red); display: block; margin-top: 4px; font-size: .9rem; }
.hint { color: var(--muted); font-size: .88rem; }
.inline { display: inline; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

main { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 24px var(--gutter) 48px; flex: 1; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: #0b0a1aee;
  backdrop-filter: blur(6px);
  border-bottom: 3px solid #000;
  box-shadow: 0 2px 0 var(--line-2), 0 6px 24px #0008;
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 8px var(--gutter);
  display: flex; align-items: center; gap: 12px;
}
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.logo-icon {
  display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--neon); color: #000;
  font-size: 15px; border: 2px solid #000; box-shadow: 3px 3px 0 #000; border-radius: 2px;
}
.logo-text { font: 12px/1 var(--pixel); letter-spacing: 1px; color: var(--text); }
.logo-text em { font-style: normal; color: var(--pink); }
.logo:hover .logo-icon { background: var(--yellow); }
.logo.small .logo-icon { width: 24px; height: 24px; font-size: 12px; }
.logo.small .logo-text { font-size: 10px; }
.search { display: flex; flex: 1; max-width: 560px; min-width: 0; margin: 0 8px 0 12px; }
.search input {
  flex: 1; width: auto; min-width: 0; background: var(--bg-3); border: 2px solid var(--line-2); border-right: 0; color: var(--text);
  padding: 7px 12px; border-radius: var(--radius) 0 0 var(--radius); font: inherit; font-size: .95rem;
}
.search input:focus { outline: none; border-color: var(--cyan); box-shadow: none; }
.search button { background: var(--line-2); border: 2px solid var(--line-2); color: var(--text); padding: 0 12px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.top-systest { margin-left: auto; }
.top-systest.active { border-color: var(--cyan); }
.btn-add { flex-shrink: 0; }
.userchip {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); flex-shrink: 0;
  background: var(--bg-3); border: 2px solid var(--line-2); padding: 3px 10px 3px 3px; border-radius: 999px; max-width: 230px;
}
.userchip:hover { border-color: var(--cyan); color: var(--text); }
.userchip-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userchip-tag { font: 7px/1 var(--pixel); color: #000; background: var(--yellow); padding: 3px 4px; border-radius: 2px; }
.avatar {
  display: inline-grid; place-items: center; width: var(--s, 32px); height: var(--s, 32px); flex-shrink: 0;
  border-radius: 4px; overflow: hidden; background: #1a1433; font-size: calc(var(--s, 32px) * .6); line-height: 1;
  border: 2px solid #000; vertical-align: middle;
}
.avatar svg { width: 100%; height: 100%; display: block; }
.nav-toggle { display: none; background: var(--bg-3); color: var(--text); border: 2px solid var(--line-2); border-radius: var(--radius); padding: 4px 10px; font-size: 1.1rem; cursor: pointer; }

.subnav { border-top: 1px solid var(--line); background: #0e0c26; }
.subnav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 2px; }
.subnav-inner > a, .menu > summary {
  display: block; padding: 8px 11px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem;
  white-space: nowrap; cursor: pointer; list-style: none; border-bottom: 3px solid transparent;
}
.menu > summary::-webkit-details-marker { display: none; }
.subnav-inner > a:hover, .menu > summary:hover, .menu[open] > summary { color: var(--text); background: var(--bg-3); }
.subnav-inner > a.active, .menu > summary.active { color: var(--text); border-bottom-color: var(--neon); }
.subnav-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 6px; }
.menu { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  background: var(--bg-2); border: 2px solid #000; box-shadow: var(--shadow), 0 0 0 1px var(--line-2) inset;
  padding: 10px; border-radius: var(--radius);
}
.genres-menu { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 2px; width: max-content; max-width: 90vw; }
.genres-menu a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; color: var(--text); text-decoration: none; border-radius: 3px; border-left: 3px solid transparent; }
.genres-menu a:hover { background: var(--bg-3); border-left-color: var(--gc, var(--neon)); }
.genres-menu small { margin-left: auto; color: var(--dim); }
.genres-menu a.all { grid-column: 1 / -1; justify-content: center; color: var(--cyan); }
.genres-link, .sub-systest { display: none !important; }

@media (max-width: 1100px) {
  .topbar .top-systest { display: none; }
  .sub-systest { display: block !important; }
  .search { margin-right: auto; }
}
@media (max-width: 860px) {
  .subnav-inner { overflow-x: auto; scrollbar-width: none; }
  .subnav-inner::-webkit-scrollbar { display: none; }
  .genres-dd { display: none; }
  .genres-link { display: block !important; }
}
@media (max-width: 680px) {
  .topbar { position: relative; }
  .topbar-inner { flex-wrap: wrap; gap: 8px 10px; }
  .search { order: 10; flex-basis: 100%; max-width: none; margin: 0; }
  .btn-add { margin-left: auto; }
  .userchip-name { max-width: 110px; }
}
@media (max-width: 420px) {
  .logo-text { font-size: 9px; }
  .btn-add { padding: 6px 10px; }
  .topbar .btn-add-text { display: none; }
  .userchip-name, .userchip-tag { display: none; }
  .userchip { padding-right: 3px; }
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 .95rem/1.1 var(--sans); text-decoration: none; cursor: pointer;
  background: var(--yellow); color: #000; border: 2px solid #000; border-radius: var(--radius);
  padding: 9px 14px; box-shadow: var(--shadow); transition: transform .06s, box-shadow .06s, background .15s;
  white-space: nowrap;
}
.btn:hover { background: #fff36b; color: #000; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #000; }
.btn[disabled], .btn.loading { opacity: .55; cursor: not-allowed; }
.btn-alt { background: var(--cyan); }
.btn-alt:hover { background: #7ff3ff; }
.btn-ghost { background: var(--bg-3); color: var(--text); border-color: var(--line-2); box-shadow: 3px 3px 0 #000; }
.btn-ghost:hover { background: var(--bg-4); color: var(--text); border-color: var(--cyan); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #ff6b85; color: #fff; }
.btn-small { padding: 6px 10px; font-size: .85rem; box-shadow: 3px 3px 0 #000; }
.btn-tiny { padding: 4px 8px; font-size: .78rem; box-shadow: 2px 2px 0 #000; }
.btn-big { padding: 13px 20px; font-size: 1.05rem; }
.btn-wide { width: 100%; }
.btn-play {
  width: 100%; padding: 18px; font: 16px/1 var(--pixel); background: var(--neon); color: #000;
  animation: pulse 2.4s ease-in-out infinite;
}
.btn-play:hover { background: #8dff73; }
@keyframes pulse { 0%, 100% { box-shadow: var(--shadow), 0 0 0 0 #39ff1466; } 50% { box-shadow: var(--shadow), 0 0 22px 4px #39ff1455; } }
.btn-oauth { background: #fff; color: #222; width: 100%; }
.btn-oauth:hover { background: #f1f1f1; color: #000; }
.linkbtn { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: .88rem; padding: 2px 4px; }
.linkbtn:hover { color: var(--yellow); }

/* ------------------------------------------------------------------ flashes / banners */
.flashes { max-width: var(--maxw); margin: 12px auto 0; padding: 0 var(--gutter); display: grid; gap: 8px; }
.flash {
  position: relative; padding: 10px 40px 10px 14px; border: 2px solid #000; border-radius: var(--radius);
  background: var(--bg-3); box-shadow: 3px 3px 0 #000; border-left: 6px solid var(--cyan); margin-bottom: 12px;
}
.flashes .flash { margin: 0; }
.flash-ok { border-left-color: var(--neon); }
.flash-error { border-left-color: var(--red); background: #2a1030; }
.flash-warn { border-left-color: var(--yellow); background: #2a2410; }
.flash-x { position: absolute; right: 8px; top: 8px; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; }
.announce { position: relative; padding: 8px 44px 8px var(--gutter); text-align: center; font-weight: 600; border-bottom: 2px solid #000; }
.announce p { margin: 0; }
.announce a { color: inherit; }
.announce-info { background: var(--series-1); color: #fff; }
.announce-warn { background: var(--yellow); color: #000; }
.announce-party { background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan)); color: #000; }
.announce .flash-x { color: inherit; top: 6px; }
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg-2); border: 2px solid #000; box-shadow: var(--shadow);
}
.cookie p { margin: 0; flex: 1; font-size: .9rem; }

/* ------------------------------------------------------------------ ads */
.ad { max-width: var(--maxw); margin: 16px auto; padding: 0 var(--gutter); text-align: center; position: relative; min-height: 50px; }
.ad-tag { position: absolute; top: 0; right: var(--gutter); font: 7px var(--pixel); color: var(--dim); }
.card-ad { display: grid; place-items: center; padding: 8px; min-height: 250px; }
.card-ad .ad { margin: 0; padding: 0; width: 100%; }

/* ------------------------------------------------------------------ hero & home */
.hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 32px; align-items: center; margin: 8px 0 28px; }
.kicker { font: 11px/1 var(--pixel); color: var(--pink); letter-spacing: 2px; margin: 0 0 14px; animation: blink 1.2s steps(1) infinite; }
.hero h1 { font-size: clamp(1.8rem, 4.4vw, 3rem); line-height: 1.12; margin-bottom: 14px; }
.glow { color: var(--neon); text-shadow: 0 0 18px #39ff1488; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 60ch; margin: 0 0 20px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-guest { margin: 18px 0 0; color: var(--muted); font-size: .95rem; }
.scoreboard { background: #050414; border: 3px solid #000; box-shadow: var(--shadow), inset 0 0 0 2px var(--line-2); padding: 18px 20px; border-radius: 6px; }
.sb-title { font: 12px/1 var(--pixel); color: var(--yellow); text-align: center; margin-bottom: 14px; letter-spacing: 2px; }
.scoreboard dl { margin: 0; display: grid; gap: 6px; }
.scoreboard dl > div { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed #ffffff18; padding-bottom: 4px; }
.scoreboard dt { font: 10px var(--pixel); color: var(--cyan); }
.scoreboard dd { margin: 0; font: 34px/1 var(--led); color: var(--neon); text-shadow: 0 0 10px #39ff1477; letter-spacing: 2px; }
.genre-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 18px; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--bg-3); border: 2px solid var(--line-2); color: var(--text); text-decoration: none; font-size: .88rem; font-weight: 600;
}
.chip small { color: var(--dim); font-weight: 400; }
.chip:hover, .chip.active { border-color: var(--gc, var(--cyan)); color: var(--text); background: var(--bg-4); }
.chip-tag { color: var(--muted); font-weight: 400; }
.chip-flag { cursor: default; font-weight: 400; color: var(--muted); }
.chip-all { color: var(--cyan); }
.shelf { margin: 0 0 34px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.shelf-head h2 { font: 13px/1.4 var(--pixel); margin: 0; letter-spacing: 1px; text-transform: uppercase; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .9rem; }
.chatter-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.chatter-list li { display: flex; gap: 10px; background: var(--bg-2); border: 2px solid var(--line); padding: 10px 12px; border-radius: var(--radius); }
.chatter-list p { margin: 0; font-size: .9rem; }
.chatter-list .who { font-weight: 700; }
.chatter-list time { color: var(--dim); font-size: .8rem; }
.said { color: var(--muted); font-style: italic; margin-top: 2px !important; overflow-wrap: anywhere; }
.cta-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: repeating-linear-gradient(45deg, #1a153f 0 12px, #16123a 12px 24px); border: 3px solid #000; box-shadow: var(--shadow);
  padding: 22px 24px; border-radius: 6px; margin-top: 12px;
}
.cta-strip h2 { margin: 0 0 4px; }
.cta-strip p { margin: 0; color: var(--muted); }

/* ------------------------------------------------------------------ cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--bg-2);
  border: 2px solid #000; border-radius: 6px; overflow: hidden;
  box-shadow: 4px 4px 0 #000, inset 0 0 0 1px var(--line);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover, .card:focus-within { transform: translate(-2px, -3px); box-shadow: 6px 7px 0 #000, 0 0 0 2px var(--gc, var(--neon)), 0 0 24px -4px var(--gc, var(--neon)); }
.card-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: #07061a; overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; image-rendering: auto; transition: transform .3s; }
.card:hover .card-cover img { transform: scale(1.04); }
.card-play {
  position: absolute; inset: 0; display: grid; place-items: center; font: 14px var(--pixel); color: var(--yellow);
  background: #0009; opacity: 0; transition: opacity .15s; text-shadow: 2px 2px 0 #000;
}
.card:hover .card-play { opacity: 1; }
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; pointer-events: none; }
.badge { font: 8px/1 var(--pixel); padding: 4px 5px; border: 2px solid #000; color: #000; border-radius: 2px; }
.badge.new { background: var(--neon); }
.badge.feat { background: var(--yellow); }
.badge.upd { background: var(--cyan); }
.badge.st { background: var(--orange); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-genre { font-size: .76rem; font-weight: 700; color: var(--gc, var(--muted)); text-decoration: none; text-transform: uppercase; letter-spacing: .5px; }
.card-title { font-size: 1.08rem; margin: 0; line-height: 1.25; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.card-genre { position: relative; z-index: 2; }
.card-sum { margin: 0; color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.pill { font-size: .78rem; background: var(--bg-3); border: 1px solid var(--line-2); padding: 2px 7px; border-radius: 999px; color: var(--muted); white-space: nowrap; }
.pill.rating.pos { color: #001a07; background: var(--neon); border-color: #000; font-weight: 700; }
.pill.rating.mix { color: #000; background: var(--yellow); border-color: #000; font-weight: 700; }
.pill.rating.neg { color: #fff; background: var(--red); border-color: #000; font-weight: 700; }
.card-flags { margin-left: auto; font-size: .85rem; letter-spacing: 2px; }
.card-compact .card-sum { display: none; }
@media (max-width: 720px) {
  .shelf-row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 14px; padding: 4px 4px 14px; margin: 0 -4px; }
  .shelf-row > .card { flex: 0 0 76%; max-width: 300px; scroll-snap-align: start; }
  .grid:not(.shelf-row) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; }
  .hero { grid-template-columns: 1fr; gap: 20px; }
}

.empty { text-align: center; padding: 40px 16px; color: var(--muted); border: 2px dashed var(--line-2); border-radius: 6px; }
.empty-ghost { font-size: 44px; animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ------------------------------------------------------------------ browse */
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pagehead h1 { margin: 0; }
.pagehead .sub { margin: 6px 0 0; color: var(--muted); }
.filters { background: var(--bg-2); border: 2px solid #000; box-shadow: inset 0 0 0 1px var(--line); border-radius: 6px; padding: 12px; margin-bottom: 14px; }
.sorttabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 10px; scrollbar-width: thin; }
.sorttabs a { padding: 6px 10px; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; font-size: .9rem; }
.sorttabs a:hover { background: var(--bg-3); color: var(--text); }
.sorttabs a.active { background: var(--neon); color: #000; }
.filter-row { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.inline-field { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--muted); }
.inline-field input, .inline-field select { width: auto; min-width: 0; }
.inline-field input[type=search] { width: 200px; }
.flagset { border: 0; padding: 0; margin: 0; display: flex; gap: 4px 12px; flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: .92rem; }
.check input { accent-color: var(--neon); width: 16px; height: 16px; }
.resultcount { color: var(--dim); font-size: .88rem; margin: 0 0 10px; min-height: 1em; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 28px 0 0; flex-wrap: wrap; }
.pager a, .pager .cur, .pager .gap { padding: 7px 12px; border-radius: var(--radius); font-weight: 700; text-decoration: none; }
.pager a { background: var(--bg-3); color: var(--text); border: 2px solid var(--line-2); }
.pager a:hover { border-color: var(--cyan); }
.pager .cur { background: var(--yellow); color: #000; border: 2px solid #000; }
.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.genre-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 12px; align-items: center;
  padding: 14px; text-decoration: none; color: var(--text); background: var(--bg-2); border: 2px solid #000;
  border-left: 6px solid var(--gc); box-shadow: var(--shadow); border-radius: 6px; transition: transform .1s;
}
.genre-tile:hover { transform: translate(-2px, -2px); color: var(--text); box-shadow: 6px 6px 0 #000, 0 0 18px -6px var(--gc); }
.gt-emoji { grid-row: 1 / 4; font-size: 34px; }
.gt-name { font-weight: 700; font-size: 1.05rem; }
.gt-count { color: var(--muted); font-size: .85rem; }
.gt-desc { color: var(--dim); font-size: .82rem; }

/* ------------------------------------------------------------------ forms */
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-3); border: 2px solid var(--line-2);
  border-radius: var(--radius); padding: 8px 10px; width: 100%; max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px #00e5ff33; }
input[type=checkbox], input[type=radio] { width: auto; }
input[type=color] { padding: 2px; height: 38px; width: 52px; }
textarea { resize: vertical; min-height: 70px; line-height: 1.45; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.field { display: block; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field-label { display: block; font-weight: 700; margin-bottom: 5px; font-size: .92rem; }
.field .hint { display: block; margin-top: 4px; }
.req { color: var(--pink); }
.stack { display: grid; gap: 4px; }
.stack > .btn { justify-self: start; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ panels / prose */
.panel {
  background: var(--bg-2); border: 2px solid #000; box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  border-radius: 6px; padding: 16px 18px; margin-bottom: 18px; min-width: 0;
}
.panel-title { font: 11px/1.4 var(--pixel); letter-spacing: 1px; color: var(--cyan); margin: 0 0 12px; text-transform: uppercase; }
.prose { overflow-wrap: anywhere; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 .8em; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.2em; }
.prose blockquote { border-left: 4px solid var(--line-2); padding: 2px 12px; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose > :last-child { margin-bottom: 0; }
.spoiler { background: var(--text); color: transparent; border-radius: 2px; cursor: pointer; padding: 0 2px; }
.spoiler:hover, .spoiler:focus, .spoiler.show { background: var(--bg-4); color: var(--text); }
.page-content { max-width: 820px; margin: 0 auto; }

/* ------------------------------------------------------------------ game page */
.crumbs { font-size: .88rem; color: var(--dim); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.game-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.game-head h1 { margin: 0 0 6px; text-shadow: 3px 3px 0 #000; }
.game-sum { color: var(--muted); font-size: 1.1rem; margin: 0 0 10px; }
.game-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .game-grid { grid-template-columns: 1fr; } .game-side { order: -1; } }
.gallery { margin-bottom: 20px; }
.gallery-main { position: relative; background: #000; border: 3px solid #000; box-shadow: var(--shadow), 0 0 0 1px var(--line-2); border-radius: 6px; overflow: hidden; aspect-ratio: 16 / 9; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-zoom { position: absolute; right: 10px; bottom: 10px; background: #000a; color: #fff; border: 2px solid #fff6; border-radius: 4px; font-size: 1.1rem; padding: 2px 8px; cursor: zoom-in; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs button { padding: 0; border: 2px solid var(--line-2); background: #000; border-radius: 4px; cursor: pointer; flex: 0 0 auto; width: 120px; aspect-ratio: 16/9; overflow: hidden; opacity: .7; }
.gallery-thumbs button.active, .gallery-thumbs button:hover { border-color: var(--yellow); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.theater { margin-bottom: 20px; background: #000; border: 3px solid #000; box-shadow: var(--shadow), 0 0 0 2px var(--gc); border-radius: 6px; overflow: hidden; }
.theater-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: var(--bg-3); flex-wrap: wrap; }
.theater-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.theater-frame { aspect-ratio: 16 / 9; background: #000; }
.theater-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.theater .hint { padding: 6px 10px; margin: 0; }
.theater:fullscreen .theater-frame { aspect-ratio: auto; height: calc(100% - 48px); }
.game-desc { background: var(--bg-2); border: 2px solid var(--line); border-radius: 6px; padding: 16px 18px; margin-bottom: 24px; }
.play-panel { display: grid; gap: 10px; }
.play-host { margin: 0; font-size: .82rem; color: var(--dim); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.vote {
  font: 700 1.1rem/1 var(--sans); padding: 12px; border-radius: var(--radius); cursor: pointer; color: var(--text);
  background: var(--bg-3); border: 2px solid var(--line-2); box-shadow: 3px 3px 0 #000; transition: transform .06s;
}
.vote:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.vote-up:hover, .vote-up.on { background: var(--neon); color: #000; border-color: #000; }
.vote-down:hover, .vote-down.on { background: var(--red); color: #fff; border-color: #000; }
.vote.pop { animation: pop .35s; }
@keyframes pop { 40% { transform: scale(1.12); } }
.ratingbar-label { font-size: .9rem; margin-bottom: 6px; }
.ratingbar-label span { color: var(--muted); }
.ratingbar.pos strong { color: var(--neon); }
.ratingbar.mix strong { color: var(--yellow); }
.ratingbar.neg strong { color: var(--red); }
.ratingbar-track { height: 10px; background: var(--red); border: 2px solid #000; border-radius: 3px; overflow: hidden; }
.ratingbar.none .ratingbar-track { background: var(--bg-4); }
.ratingbar-track span { display: block; height: 100%; background: var(--neon); }
.facts { margin: 0 0 12px; display: grid; gap: 6px; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 5px; font-size: .92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.share { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.report summary { cursor: pointer; color: var(--dim); font-size: .85rem; list-style: none; display: inline-block; }
.report summary::-webkit-details-marker { display: none; }
.report summary:hover { color: var(--red); }
.report[open] summary { color: var(--red); margin-bottom: 8px; }
.report-form { background: var(--bg-3); padding: 10px; border-radius: var(--radius); border: 1px solid var(--line-2); margin-top: 6px; }
.c-actions .report { display: inline-block; }
.c-actions .report[open] { display: block; width: 100%; }

/* comments */
.comments h2 small { color: var(--dim); font-size: .9rem; }
.comment-form { background: var(--bg-2); border: 2px solid var(--line-2); border-radius: 6px; padding: 12px; margin-bottom: 20px; }
.cf-who { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .9rem; color: var(--muted); }
.cf-replying { font-size: .88rem; color: var(--yellow); margin-bottom: 6px; }
.cf-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.comment-list, .replies { list-style: none; margin: 0; padding: 0; }
.comment { border-left: 3px solid var(--line-2); padding: 4px 0 4px 14px; margin-bottom: 16px; }
.comment.flash-new { animation: newc 1.6s; }
@keyframes newc { from { background: #39ff1422; } to { background: transparent; } }
.comment.is-pending, .comment.is-shadow, .comment.is-hidden { opacity: .65; }
.replies { margin-top: 12px; }
.replies .comment { border-left-color: var(--line); }
.c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-name { font-weight: 700; color: var(--text); text-decoration: none; }
.c-time { color: var(--dim); font-size: .82rem; text-decoration: none; }
.c-edited { color: var(--dim); font-size: .8rem; }
.c-body { margin: 6px 0 4px 40px; }
.c-actions { display: flex; gap: 6px; align-items: center; margin-left: 36px; flex-wrap: wrap; }
.lvl { font: 7px/1 var(--pixel); padding: 3px 4px; border-radius: 2px; border: 1px solid #000; vertical-align: middle; white-space: nowrap; }
.lvl-guest, .lvl-visitor { background: var(--bg-4); color: var(--muted); border-color: var(--line-2); }
.lvl-reg, .lvl-registered { background: var(--cyan); color: #000; }
.lvl-verified { background: var(--neon); color: #000; }
.lvl-op { background: var(--pink); color: #000; }
.lvl-pend { background: var(--orange); color: #000; }

/* lightbox */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: #000d; }
.lightbox img { max-width: 96vw; max-height: 92vh; display: block; border: 3px solid #000; }
.lightbox button { position: fixed; background: #000a; color: #fff; border: 2px solid #fff5; font-size: 1.4rem; padding: 6px 14px; cursor: pointer; border-radius: 4px; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; }
.lb-next { right: 16px; top: 50%; }

/* ------------------------------------------------------------------ submit form */
.submit-form { max-width: 880px; }
.step { background: var(--bg-2); border: 2px solid #000; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); border-radius: 6px; padding: 18px; margin-bottom: 20px; }
.step h2 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 14px; }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; font: 12px var(--pixel); background: var(--pink); color: #000; border: 2px solid #000; border-radius: 3px; }
.url-row { display: flex; gap: 10px; align-items: flex-start; }
.url-row .field { flex: 1; margin-bottom: 6px; }
.url-row .btn { margin-top: 27px; }
@media (max-width: 560px) { .url-row { flex-direction: column; } .url-row .btn { margin-top: 0; } }
.autofill-status { min-height: 1.4em; font-size: .9rem; margin-bottom: 10px; color: var(--muted); }
.autofill-status.ok { color: var(--neon); }
.autofill-status.bad { color: var(--red); }
.genre-options { display: flex; flex-wrap: wrap; gap: 6px; }
.genre-options label { cursor: pointer; }
.genre-options input { position: absolute; opacity: 0; }
.genre-options span { display: inline-block; padding: 6px 10px; border-radius: 999px; border: 2px solid var(--line-2); background: var(--bg-3); font-size: .9rem; font-weight: 600; }
.genre-options label:hover span { border-color: var(--gc); }
.genre-options input:checked + span { background: var(--gc); color: #000; border-color: #000; box-shadow: 2px 2px 0 #000; }
.genre-options input:focus-visible + span { outline: 3px solid var(--yellow); }
.md-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.md-tabs button { background: var(--bg-3); border: 2px solid var(--line-2); color: var(--muted); padding: 4px 10px; border-radius: var(--radius); cursor: pointer; font: inherit; font-size: .85rem; }
.md-tabs button.active { color: #000; background: var(--cyan); border-color: #000; }
.md-preview { background: var(--bg-3); border: 2px solid var(--line-2); border-radius: var(--radius); padding: 10px 12px; min-height: 120px; }
.flag-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.dropzone {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 26px 16px; text-align: center;
  border: 3px dashed var(--line-2); border-radius: 6px; background: var(--bg-3); cursor: pointer; color: var(--muted);
}
.dropzone:hover, .dropzone.drag { border-color: var(--neon); color: var(--text); background: #1d2a48; }
.dz-icon { font-size: 30px; }
.shots { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shots li { position: relative; aspect-ratio: 16 / 9; border: 2px solid var(--line-2); border-radius: 4px; overflow: hidden; background: #000; cursor: grab; }
.shots li:first-child { border-color: var(--yellow); }
.shots li:first-child::before { content: 'COVER'; position: absolute; left: 4px; top: 4px; font: 7px var(--pixel); background: var(--yellow); color: #000; padding: 3px 4px; z-index: 1; }
.shots li.dragging { opacity: .4; }
.shots li.uploading::after { content: attr(data-progress); position: absolute; inset: 0; display: grid; place-items: center; background: #000a; font: 10px var(--pixel); color: var(--neon); }
.shots img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot-x { position: absolute; right: 4px; top: 4px; background: #000c; color: #fff; border: 1px solid #fff5; border-radius: 3px; cursor: pointer; padding: 0 6px; z-index: 2; }
.submit-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
.submit-bar .hint { margin: 0; }

/* ------------------------------------------------------------------ player panel */
.player-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.player-head > div { flex: 1; min-width: 200px; }
.player-head h1 { margin: 0; overflow-wrap: anywhere; }
.player-head p { margin: 4px 0 0; }
.player-head .kicker { margin-bottom: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 8px 12px; color: var(--muted); text-decoration: none; font-weight: 600; border-radius: var(--radius) var(--radius) 0 0; white-space: nowrap; }
.tabs a:hover { color: var(--text); background: var(--bg-3); }
.tabs a.active { color: #000; background: var(--yellow); }
.tabs.small { margin: 14px 0; }
.callout { border-color: #000; box-shadow: var(--shadow), inset 0 0 0 2px var(--yellow); }
.callout h2 { color: var(--yellow); }
.callout-key { box-shadow: var(--shadow), inset 0 0 0 2px var(--neon); }
.secure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.secure-grid h3 { font-size: 1rem; margin-top: 4px; }
@media (max-width: 720px) { .secure-grid { grid-template-columns: 1fr; } }
.oauth { display: grid; gap: 8px; margin-bottom: 14px; }
.statrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.statrow > div { background: #050414; border: 2px solid #000; box-shadow: 3px 3px 0 #000; padding: 10px; text-align: center; border-radius: 4px; }
.statrow b { display: block; font: 34px/1 var(--led); color: var(--neon); }
.statrow span { color: var(--muted); font-size: .82rem; }
@media (max-width: 560px) { .statrow { grid-template-columns: repeat(2, 1fr); } }
.avatar-options { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.avatar-options label, .color-options label { cursor: pointer; position: relative; }
.avatar-options input, .color-options input { position: absolute; opacity: 0; }
.avatar-options .avatar { --s: 40px; }
.avatar-options input:checked + .avatar, .avatar-options input:checked + span { outline: 3px solid var(--yellow); outline-offset: 1px; }
.color-options { display: flex; gap: 6px; }
.color-options span { display: block; width: 28px; height: 28px; border: 2px solid #000; border-radius: 4px; }
.color-options input:checked + span { outline: 3px solid var(--text); outline-offset: 1px; }
.recovery { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.recovery code { font-size: 1.1rem; padding: 8px 12px; letter-spacing: 1px; user-select: all; background: #050414; border: 2px dashed var(--neon); }
.linked { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.linked li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.linked svg { vertical-align: middle; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.danger-zone { box-shadow: var(--shadow), inset 0 0 0 1px #ff3b5c55; }
.danger-zone summary { cursor: pointer; color: var(--red); }
.mylist { list-style: none; padding: 0; margin: 0; }
.mylist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.mylist p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.auth-box { max-width: 480px; margin: 10px auto; }
.auth-box .pagehead { margin-bottom: 14px; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--line-2); padding: 8px; white-space: nowrap; }
.table td { border-bottom: 1px solid var(--line); padding: 8px; vertical-align: middle; }
.table tr.current td { background: #39ff1410; }
.table.compact td, .table.compact th { padding: 5px 8px; }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.wrap { max-width: 420px; overflow-wrap: anywhere; }
.table input { padding: 4px 6px; }

/* ------------------------------------------------------------------ error page */
.errorpage { text-align: center; padding: 40px 0; }
.err-code { font: 14px var(--pixel); color: var(--dim); margin: 0; }
.err-title { font: clamp(26px, 6vw, 56px)/1.2 var(--pixel); color: var(--red); text-shadow: 4px 4px 0 #000, 0 0 30px #ff3b5c66; margin: 18px 0; }
.err-text { color: var(--muted); font-size: 1.15rem; }
.err-continue { font: 14px var(--pixel); color: var(--yellow); margin: 26px 0; }
.errorpage .hero-cta { justify-content: center; }

/* ------------------------------------------------------------------ footer */
.footer { border-top: 3px solid #000; box-shadow: 0 -2px 0 var(--line-2); background: #07061a; margin-top: 24px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 10px; display: flex; gap: 30px; justify-content: space-between; flex-wrap: wrap; }
.footer-brand { max-width: 340px; }
.footer-brand p { color: var(--muted); font-size: .9rem; }
.insert-coin { font: 9px var(--pixel) !important; color: var(--yellow) !important; animation: blink 1.4s steps(1) infinite; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-links h4 { font: 10px var(--pixel); color: var(--pink); margin-bottom: 10px; }
.footer-links a { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; font-size: .92rem; }
.footer-links a:hover { color: var(--yellow); }
.copy { text-align: center; color: var(--dim); font-size: .8rem; padding: 12px var(--gutter) 22px; margin: 0; }

/* ================================================================== ADMIN */
body.admin { background-image: none; }
body.admin::after { display: none; }
.adm-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #07061a; border-bottom: 3px solid #000; box-shadow: 0 2px 0 var(--line-2); }
.adm-tag { font: 8px var(--pixel); background: var(--red); color: #fff; padding: 4px 6px; border: 2px solid #000; }
.adm-spacer { flex: 1; }
.adm-toggle { display: none; }
.adm-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); flex: 1; }
.adm-nav { background: var(--bg-2); border-right: 2px solid var(--line); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 52px; height: calc(100vh - 52px); overflow-y: auto; }
.adm-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.adm-nav a:hover { background: var(--bg-3); color: var(--text); }
.adm-nav a.active { background: var(--yellow); color: #000; }
.adm-badge { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; padding: 1px 6px; border-radius: 999px; }
.adm-main { padding: 22px 24px 60px; min-width: 0; }
@media (max-width: 860px) {
  .adm-wrap { grid-template-columns: 1fr; }
  .adm-toggle { display: block; }
  .adm-nav { display: none; position: static; height: auto; }
  .adm-nav.open { display: flex; }
  .adm-main { padding: 16px; }
  .adm-top .logo-text { display: none; }
}
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; gap: 4px; background: var(--bg-2); border: 2px solid #000; box-shadow: 3px 3px 0 #000, inset 0 0 0 1px var(--line); border-radius: 6px; padding: 12px 14px; text-decoration: none; color: var(--text); }
a.tile[href]:hover { box-shadow: 3px 3px 0 #000, inset 0 0 0 2px var(--cyan); color: var(--text); }
.tile.warn { box-shadow: 3px 3px 0 #000, inset 0 0 0 2px var(--orange); }
.tile-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.tile-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.tile-sub { color: var(--dim); font-size: .8rem; }
.chart { margin: 0; }
.chart figcaption { font-weight: 700; margin-bottom: 8px; color: var(--text); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--series-1); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:hover { fill: #ffffff0d; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .xl, .chart .yl { fill: var(--muted); font: 11px var(--sans); font-variant-numeric: tabular-nums; }
.chart .xl { text-anchor: middle; }
.chart .yl { text-anchor: end; }
.chart-table { margin-top: 8px; font-size: .85rem; }
.chart-table summary { cursor: pointer; color: var(--muted); }
.tooltip { position: fixed; z-index: 300; pointer-events: none; background: #050414; color: var(--text); border: 2px solid var(--line-2); padding: 6px 9px; border-radius: 4px; font-size: .85rem; box-shadow: 3px 3px 0 #000; white-space: nowrap; }
.barlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.barlist li { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) auto; align-items: center; gap: 10px; font-size: .88rem; }
.bl-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-track { height: 10px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
.bl-track i { display: block; height: 100%; background: var(--series-1); border-radius: 0 3px 3px 0; }
.bl-val { color: var(--text); font-variant-numeric: tabular-nums; text-align: right; }
.adm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.adm-grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 18px; }
@media (max-width: 1000px) { .adm-cols { grid-template-columns: 1fr; } }
.adm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; }
.adm-list li { border-bottom: 1px dashed var(--line); padding-bottom: 6px; overflow-wrap: anywhere; }
.seg { display: inline-flex; gap: 2px; background: var(--bg-3); border: 2px solid var(--line-2); padding: 3px; border-radius: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.seg a { padding: 5px 10px; border-radius: 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .88rem; }
.seg a.active { background: var(--cyan); color: #000; }
.seg small { opacity: .8; }
.adm-search { display: flex; gap: 8px; margin-bottom: 12px; max-width: 520px; }
.bulkbar { display: flex; gap: 8px; margin-bottom: 8px; max-width: 360px; }
.actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.spill { font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.spill-ok { background: #4dffb822; color: var(--ok); }
.spill-warn { background: #ffe60022; color: var(--yellow); }
.spill-bad { background: #ff3b5c26; color: #ff8aa0; }
.spill-muted { background: var(--bg-4); color: var(--muted); }
img.mini { width: 72px; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; border: 1px solid var(--line-2); display: block; }
.ucell { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.ucell .avatar { border-width: 1px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumbs img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 3px; border: 1px solid var(--line-2); display: block; }
.upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.upload-grid .up { padding: 8px; margin: 0; }
.upload-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; border-radius: 3px; }
.upload-grid figcaption { font-size: .82rem; margin-top: 6px; display: grid; gap: 4px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.inline-form .field { margin: 0; min-width: 160px; }
.inline-form .grow { flex: 1; }
.checks { display: grid; gap: 6px; margin-bottom: 12px; }
.check.big { font-size: 1.1rem; }
.genre-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.genre-row input { width: 150px; padding: 5px 7px; }
.genre-row .w-emoji { width: 52px; text-align: center; }
.genre-row .w-num { width: 64px; }
.genre-row .grow { flex: 1; min-width: 160px; }
.genre-head { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.genre-head span:nth-child(2), .genre-head span:nth-child(3) { width: 150px; }
.genre-head span:nth-child(4) { width: 52px; }
.mail summary { cursor: pointer; }
.mail-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 10px 0 0; }
.admin-login { display: grid; place-items: center; padding: 16px; }
.login-box { width: 100%; max-width: 380px; margin-top: 12vh; display: grid; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) {
  .chart .bar, .bl-track i { fill: CanvasText; background: CanvasText; }
}
