:root {
  --bg: #0d0e15;
  --top: #17191f;
  --rail: #0b0c12;
  --panel: #171922;
  --panel2: #1f2230;
  --line: rgba(255, 255, 255, .08);
  --text: #f3f4fa;
  --muted: #9aa1bb;
  --accent: #7c5cff;
  --accent2: #ffd23f;
  --radius: 16px;
  --topH: 60px;
  --sideW: 68px;
  color-scheme: dark;
}
body.side-open { --sideW: 192px; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; }
:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; border-radius: 8px; }
.muted { color: var(--muted); }
.small { color: var(--muted); font-size: .85rem; }
.lead { color: var(--muted); font-size: 1.05rem; }

/* ---------------------------------------------------------------- top bar */
.top {
  position: fixed; inset: 0 0 auto 0; height: var(--topH); z-index: 50;
  display: flex; align-items: center; gap: 12px; padding: 0 14px 0 10px;
  background: var(--top); border-bottom: 1px solid var(--line);
}
.burger {
  flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.burger:hover { background: rgba(255, 255, 255, .08); }
.burger span { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: #d8dbea; }
.burger span:nth-child(2) { width: 14px; align-self: flex-start; margin-left: 12px; }
.brand { display: flex; align-items: center; gap: 9px; flex: none; text-decoration: none; font-weight: 800; font-size: 1.1rem; letter-spacing: .2px; }
.search { position: relative; flex: 0 1 460px; margin: 0 auto; min-width: 0; }
.search input {
  width: 100%; height: 40px; border: 0; border-radius: 30px; background: #373952; color: #fff;
  padding: 0 16px 0 42px; font: inherit; font-size: 14px;
}
.search input::placeholder { color: #a7abc8; }
.search input:focus { outline: 2px solid var(--accent); background: #3f4163; }
.search .s-ic { position: absolute; left: 15px; top: 11px; color: #a7abc8; pointer-events: none; }
.results { position: absolute; top: 46px; left: 0; right: 0; background: var(--panel2); border-radius: 16px; overflow: hidden; box-shadow: 0 14px 40px rgba(0, 0, 0, .55); border: 1px solid var(--line); }
.results[hidden] { display: none; }
.results a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; text-decoration: none; }
.results a:hover, .results a.sel { background: rgba(255, 255, 255, .08); }
.results img { width: 64px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: #000; }
.results .r-t { font-weight: 700; font-size: 14px; }
.results .r-s { color: var(--muted); font-size: 12px; }
.results .r-ic { width: 64px; text-align: center; font-size: 22px; flex: none; }
.results .none { padding: 14px; color: var(--muted); font-size: 14px; }
.search-btn { display: none; flex: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: #d8dbea; cursor: pointer; margin-left: auto; align-items: center; justify-content: center; }

/* ---------------------------------------------------------------- left rail */
.side {
  position: fixed; top: var(--topH); bottom: 0; left: 0; width: var(--sideW); z-index: 40;
  background: var(--rail); border-right: 1px solid var(--line); padding: 10px 8px; overflow-x: hidden; overflow-y: auto;
  transition: width .2s ease; scrollbar-width: thin; scrollbar-color: #2b2e42 transparent;
}
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 10px; border-radius: 12px; text-decoration: none;
  color: var(--muted); white-space: nowrap; font-weight: 600;
}
.side nav a .ic { width: 24px; text-align: center; font-size: 20px; flex: none; }
.side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a.on { background: rgba(124, 92, 255, .22); color: #fff; }
.side hr { border: 0; border-top: 1px solid var(--line); margin: 8px 6px; width: auto; }
.side-h { margin: 6px 12px 2px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6f7592; }
.side-foot { display: none; padding: 14px 10px; font-size: 12px; }
.side-foot a { display: inline-block; margin: 0 10px 6px 0; color: #7f86a3; text-decoration: none; }
.side-foot a:hover { color: #fff; }
body:not(.side-open) .lb, body:not(.side-open) .side-h { display: none; }
body.side-open .side-foot { display: block; }
body:not(.side-open) .side hr { margin: 8px 10px; }
.scrim { display: none; }

.main { min-width: 0; margin-left: var(--sideW); padding: calc(var(--topH) + 18px) 24px 0; transition: margin-left .2s ease; min-height: 100vh; display: flex; flex-direction: column; }
.main > main { flex: 1; min-width: 0; }
.tile, .rowsec, .about-game, .player, .game-side { min-width: 0; }

/* ---------------------------------------------------------------- content */
.page-h { font-size: clamp(1.5rem, 3vw, 2rem); margin: 6px 0 4px; }
.sub-h { margin: 28px 0 10px; }
.rowsec { margin: 0 0 22px; }
.rowsec > h2 { font-size: 1.2rem; margin: 6px 0 10px; }
.rowsec > h2 a { text-decoration: none; }
.rowsec > h2 .chev { color: var(--muted); margin-left: 2px; }
.rowsec > h2 a:hover .chev { color: var(--accent2); }
.rowsec[hidden] { display: none; }

.chips { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; min-width: 168px; height: 64px; padding: 0 16px; border-radius: 14px; text-decoration: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-weight: 800; font-size: 15px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .35); transition: transform .15s ease, filter .15s ease;
}
.chip:hover { transform: translateY(-2px); filter: brightness(1.1); }
.chip .ci { font-size: 32px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }

/* tiles */
.tile {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; text-decoration: none;
  background: rgba(255, 255, 255, .07); transition: transform .18s ease, box-shadow .18s ease;
}
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile:hover, .tile:focus-visible { transform: scale(1.045); box-shadow: 0 12px 32px rgba(0, 0, 0, .6); z-index: 3; }
.tile-info {
  position: absolute; inset: auto 0 0 0; padding: 30px 12px 9px; display: flex; flex-direction: column; gap: 1px;
  background: linear-gradient(to top, rgba(6, 7, 14, .88), rgba(6, 7, 14, 0));
  transition: opacity .15s ease;
}
.tile-info b { font-size: 14px; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.tile-info i { font-style: normal; font-size: 11px; color: #c6cadf; }
.badge { position: absolute; right: 9px; bottom: 9px; background: var(--accent2); color: #221a00; font-weight: 800; font-size: 10px; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
@media (hover: hover) {
  .tile-info { opacity: 0; }
  .tile:hover .tile-info, .tile:focus-visible .tile-info { opacity: 1; }
  .side-grid .tile-info, .grid .tile-info { opacity: 0; }
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 12px; margin-top: 14px; }

.top-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.top-grid .tile.big { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.top-grid .tile.big .tile-info { padding: 60px 18px 14px; }
.top-grid .tile.big .tile-info b { font-size: 22px; }
.top-grid .tile.big .tile-info i { font-size: 13px; }
@media (hover: hover) { .top-grid .tile.big .tile-info { opacity: 1; } }

.row { --cols: 7; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--cols) - 1) * 10px) / var(--cols)); gap: 10px; overflow-x: auto; padding: 8px 2px 16px; margin: -8px -2px -4px; scroll-snap-type: x proximity; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > .tile { scroll-snap-align: start; }
.row-wrap { position: relative; }
.row-btn { position: absolute; top: calc(50% - 22px); z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(20, 22, 32, .92); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .15s; }
.row-btn.prev { left: -14px; } .row-btn.next { right: -14px; }
.row-wrap:hover .row-btn:not([hidden]) { opacity: 1; }
.row-btn[hidden] { display: none; }
@media (max-width: 1500px) { .row { --cols: 6; } }
@media (max-width: 1180px) { .row { --cols: 5; } }
@media (max-width: 860px) { .row { --cols: 3.4; } }
@media (max-width: 640px) { .row { --cols: 2.15; } }

/* ---------------------------------------------------------------- game page */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.game-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "player side" "about side"; gap: 18px; max-width: 1480px; margin: 0 auto; align-items: start; }
.player { grid-area: player; min-width: 0; }
.game-side { grid-area: side; }
.about-game { grid-area: about; min-width: 0; }
.stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #05060b; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.5) blur(3px); transform: scale(1.04); }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: #000; }
.play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 999px; padding: 14px 34px 14px 16px; cursor: pointer; color: #fff; font: 800 1.25rem/1 inherit;
  background: linear-gradient(135deg, #8d6bff, #5a3bff); box-shadow: 0 12px 40px rgba(90, 59, 255, .55), 0 0 0 6px rgba(255, 255, 255, .12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.play-btn:hover { transform: translate(-50%, -50%) scale(1.06); }
.play-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #5a3bff; font-size: 18px; padding-left: 3px; }
.player-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--panel); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.pb-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pb-ico { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.player-bar h1 { font-size: clamp(1.05rem, 2vw, 1.4rem); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-actions { display: flex; align-items: center; gap: 6px; }
.pbtn { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, .06); color: #cfd3ea; cursor: pointer; transition: background .15s, color .15s, transform .1s; }
.pbtn svg { width: 22px; height: 22px; fill: currentColor; }
.pbtn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.pbtn:active { transform: scale(.94); }
.pbtn[aria-pressed="true"], .pbtn[aria-expanded="true"] { background: rgba(124, 92, 255, .35); color: #fff; }
.pbtn.warn { color: #ff6a6a; }
.pbtn.warn:hover, .pbtn.warn[aria-expanded="true"] { background: rgba(255, 90, 90, .22); color: #ff8a8a; }
.pop { position: absolute; right: 8px; bottom: calc(100% + 8px); z-index: 30; width: min(360px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 14px 16px; background: #181a27; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0, 0, 0, .6); }
.pop[hidden] { display: none; }
.pop h3 { margin: 0 0 8px; font-size: 1rem; }
.pop p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.pop label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pop select, .pop textarea, .pop-url input { width: 100%; margin-top: 4px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: #0f1018; color: #fff; font: inherit; font-size: 14px; }
.pop textarea { resize: vertical; }
.pop-url { display: flex; gap: 8px; }
.pop-url input { margin: 0; }
.pop-copy, .fb-send { flex: none; padding: 9px 14px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.pop .controls { width: 100%; font-size: 13px; }
.pagehead h1 { margin: 6px 0 4px; }
.toastmsg { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; background: #232640; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.game-side h2 { font-size: 1.05rem; margin: 0 0 10px; }
.side-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.about-game { background: var(--panel); border-radius: var(--radius); padding: 22px 26px 26px; }
.about-game h2 { font-size: 1.25rem; margin: 1.5em 0 .5em; }
.about-game .lead { margin-top: 0; color: #c9cde2; }
.about-game ol, .about-game ul { padding-left: 1.3em; }
.about-game li { margin: .25em 0; }
.controls { border-collapse: collapse; width: 100%; max-width: 640px; }
.controls th, .controls td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.controls th { width: 45%; font-weight: 700; color: #dfe2f2; }
.controls td { color: var(--muted); }
.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: #cfd3ea; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: .6em 0 0; color: var(--muted); }

.doc { max-width: 780px; margin: 8px auto; background: var(--panel); border-radius: var(--radius); padding: 26px 30px 30px; }
.doc h1 { margin-top: 0; }
.doc a { color: #b6a4ff; }

.foot { border-top: 1px solid var(--line); margin: 40px -24px 0; padding: 26px 24px 30px; text-align: center; color: var(--muted); font-size: 13px; }
.foot .links { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }
.foot a { color: var(--muted); }
.foot a:hover { color: #fff; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1180px) {
  .game-wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "player" "side" "about"; }
  .side-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
}
@media (max-width: 900px) {
  :root { --sideW: 0px; }
  .side { width: 264px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
  body.drawer .side { transform: none; }
  body.drawer .scrim { display: block; position: fixed; inset: var(--topH) 0 0 0; background: rgba(0, 0, 0, .55); z-index: 39; }
  body .lb, body .side-h { display: inline !important; }
  body .side-h { display: block !important; }
  .side-foot { display: block; }
  .main { margin-left: 0; padding: calc(var(--topH) + 12px) 14px 0; }
  .foot { margin: 30px -14px 0; }
  .search { display: none; }
  .search-btn { display: flex; }
  body.search-open .brand span { display: none; }
  body.search-open .search { display: block; flex: 1 1 auto; margin: 0; }
  body.search-open .search-btn { margin-left: 0; }
  .top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top-grid .tile.big { grid-row: span 1; aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .stage { aspect-ratio: 4 / 5; max-height: 80vh; border-radius: 12px 12px 0 0; }
  .player-bar { border-radius: 0 0 12px 12px; }
  .about-game { padding: 18px 16px 22px; }
  .doc { padding: 20px 18px 24px; }
  .grid { gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .row-btn { display: none; }
}

.pbtn:has(.cnt:not(:empty)) { width: auto; min-width: 42px; padding: 0 10px; gap: 6px; grid-auto-flow: column; }
.cnt { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.comments { margin-top: 18px; background: var(--panel); border-radius: var(--radius); padding: 16px; }
.comments h2 { margin: 0 0 12px; font-size: 1.15rem; }
.cnt-total { color: var(--muted); font-weight: 600; font-size: .95rem; }
.cform { display: grid; gap: 8px; margin-bottom: 14px; }
.cform input, .cform textarea { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0f1018; color: #fff; font: inherit; font-size: 14px; }
.cform input { max-width: 260px; }
.cform textarea { resize: vertical; min-height: 56px; }
.crow { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.cmsg { margin-right: auto; font-size: 13px; color: #ff9a9a; }
.cmsg.ok { color: #8ee6a3; }
.cleft { font-size: 12px; color: var(--muted); }
.csend, .cmore { border: 0; border-radius: 999px; padding: 9px 20px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.csend:disabled { opacity: .5; cursor: default; }
.cmore { background: var(--panel2); display: block; margin: 12px auto 0; }
.cmore[hidden] { display: none; }
.citem { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.cav { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 15px; }
.cmeta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
.cmeta b { color: #fff; font-size: 14px; }
.cbody { margin: 3px 0 4px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.crep { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 0; }
.crep:hover { color: #ff8a8a; }
.cnote, .cempty { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

.acct { position: relative; margin-left: 10px; flex: none; }
.acct[hidden] { display: none; }
.login-btn { border: 0; border-radius: 12px; padding: 0 18px; height: 40px; background: var(--accent); color: #fff; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); background: #5a3bff; color: #fff; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; }
.acct-menu { position: absolute; right: 0; top: 48px; min-width: 200px; background: #181a27; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0, 0, 0, .6); padding: 10px; z-index: 80; }
.acct-menu[hidden] { display: none; }
.am-name { font-weight: 800; padding: 4px 8px 0; }
.am-mail { font-size: 12px; color: var(--muted); padding: 0 8px 8px; overflow: hidden; text-overflow: ellipsis; }
.acct-menu a, .acct-menu button { display: block; width: 100%; text-align: left; padding: 9px 8px; border: 0; border-radius: 8px; background: none; color: #e8eaf5; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.acct-menu a:hover, .acct-menu button:hover { background: rgba(255, 255, 255, .08); }
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(5, 6, 12, .72); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { position: relative; width: min(400px, 100%); background: #171925; border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px 18px; box-shadow: 0 24px 80px rgba(0, 0, 0, .7); }
.modal-box h2 { margin: 0 0 6px; font-size: 1.3rem; }
.modal-x { position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; border: 0; background: none; color: #aab; font-size: 26px; cursor: pointer; }
.modal-box form { display: grid; gap: 10px; margin-top: 14px; }
.modal-box label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.modal-box input { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0f1018; color: #fff; font: inherit; font-size: 16px; }
.modal-box .csend { justify-self: stretch; padding: 12px; }
.lm-back { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.lm-sent { margin: 0; font-size: 14px; color: #cfd3ea; }
.lm-msg { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: #ff9a9a; }
.lm-msg.ok { color: #8ee6a3; }
.lm-fine { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
#g-btn { margin-top: 12px; display: flex; justify-content: center; }
.cask { font-size: 13px; color: var(--muted); }
.cdel { margin-left: 10px; }
@media (max-width: 640px) { .login-btn { padding: 0 12px; } }

.tile[hidden] { display: none !important; }
.race-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 12px 0 18px; }
.race-form input, .race-form select { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0f1018; color: #fff; font: inherit; }
.race-wrap { overflow-x: auto; }
.race-table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 860px; }
.race-table th, .race-table td { padding: 9px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.race-table th:nth-child(2), .race-table td:nth-child(2), .race-table td.adv, .race-table th:last-child { text-align: left; }
.race-table td.adv { white-space: normal; min-width: 260px; color: var(--muted); font-size: 13px; }
.race-table th { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.st { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.st-winner { background: rgba(80, 220, 120, .22); color: #8ee6a3; } .st-ok { background: rgba(255, 255, 255, .1); color: #cfd3ea; } .st-testing { background: rgba(110, 180, 255, .2); color: #9fcfff; }
.st-cover, .st-gameplay, .st-retention { background: rgba(255, 190, 80, .22); color: #ffd48a; } .st-retire { background: rgba(255, 90, 90, .22); color: #ff9a9a; }
.race-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.race-card { background: var(--panel); border-radius: 14px; padding: 12px 16px; min-width: 150px; }
.race-card b { display: block; font-size: 1.4rem; } .race-card span { color: var(--muted); font-size: 12px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 46px; margin: 4px 0 18px; } .spark i { display: block; width: 14px; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; }
@media (max-width: 640px) {
  .pb-title { flex: 1 1 100%; }
  .pb-actions { width: 100%; justify-content: space-between; gap: 2px; }
  .pbtn { width: 100%; max-width: 48px; height: 40px; flex: 1 1 0; min-width: 0; }
  .pbtn:has(.cnt:not(:empty)) { width: auto; max-width: none; flex: 1.4 1 0; padding: 0 4px; }
  .pop { left: 8px; right: 8px; width: auto; }
}

.rot-hint{margin:6px 0;padding:8px 12px;border-radius:10px;background:rgba(255,255,255,.1);color:#fff;font-size:.9rem;text-align:center}
.lm-view label { display: block; margin: 10px 0 0; font-size: 13px; color: #cfd3ea; }
.lm-view input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #0f111b; color: #fff; font: inherit; box-sizing: border-box; }
.lm-view .csend { margin-top: 14px; width: 100%; }
.lm-links { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0 0; }
.lm-links button { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.lm-or { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.lm-step2[hidden], .lm-view[hidden] { display: none; }
#g-btn { display: flex; justify-content: center; margin-top: 8px; }
.gh-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 280px; max-width: 100%; margin: 10px auto 0; padding: 10px 14px; border-radius: 4px; background: #24292f; border: 1px solid #3d444d; color: #fff; font: 500 14px system-ui, sans-serif; text-decoration: none; box-sizing: border-box; }
.gh-btn:hover { background: #2f363d; }
.gh-btn[hidden] { display: none; }

.hovercard { position: fixed; z-index: 90; display: block; border-radius: 16px; overflow: hidden; background: #181a27; box-shadow: 0 0 0 2px #8b5cf6, 0 18px 48px rgba(0, 0, 0, .7); opacity: 0; transform: scale(.78); transition: opacity .15s ease, transform .15s ease; text-decoration: none; color: #fff; }
.hovercard[hidden] { display: none; }
.hovercard.on { opacity: 1; transform: none; }
.hovercard img, .hovercard video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hovercard video { opacity: 0; transition: opacity .25s ease; }
.hovercard.vid video { opacity: 1; }
.hc-info { position: absolute; inset: auto 0 0 0; padding: 34px 12px 10px; background: linear-gradient(to top, rgba(6, 7, 14, .92), rgba(6, 7, 14, 0)); display: flex; flex-direction: column; gap: 3px; }
.hc-info b { font-size: 15px; line-height: 1.2; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.hc-meta { display: flex; gap: 10px; font-size: 12px; color: #d3d7ee; }
.hc-meta i { font-style: normal; }
.hc-meta i[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .tile:hover, .tile:focus-visible { transform: none; box-shadow: none; } }
