:root {
  --bg: #0f212e;
  --bg-2: #0b1a24;
  --surface: #1a2c38;
  --surface-2: #213743;
  --surface-3: #2f4553;
  --line: #2f4553;
  --text: #ffffff;
  --muted: #b1bad3;
  --primary: #1475e1;
  --primary-2: #0f5fbd;
  --accent: #c8ff3d;
  --accent-ink: #0b1a24;
  --win: #00e701;
  --danger: #ff5c7a;
  --gold: #f2b705;
  --wa: #25d366;
  --sq-light: #ecd9b0;
  --sq-dark: #84552f;
  --radius: 14px;
  --gutter: 16px;
  --top: 60px;
  --side: 232px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; margin: 0; }
html, body { min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
button, input, a, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--surface); box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
.topIn { height: var(--top); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logoMark { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--primary), #7c3aed); box-shadow: 0 4px 12px rgba(20, 117, 225, .45); }
.logoMark i { font-style: normal; color: var(--accent); }
.logoWord { font-weight: 900; letter-spacing: .03em; font-size: 20px; }
.logoWord b { color: var(--accent); }
.topRight { display: flex; align-items: center; gap: 8px; }
.guestBtns { display: flex; gap: 8px; }
.guestBtns .btn { padding: 10px 16px; }
.walletChip { display: flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 10px; padding: 3px 3px 3px 12px; }
.wcBal { font-weight: 800; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 8px; }
.walletChip .btn { padding: 8px 12px; border-radius: 8px; }
.iconBtn { position: relative; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); font-size: 18px; display: grid; place-items: center; }
.iconBtn:hover { background: var(--surface-3); }
.me { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 10px; background: var(--surface-2); }
.me:hover { background: var(--surface-3); }
.meText { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.meText b { font-size: 14px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meText small { color: var(--muted); font-size: 11px; }
.avatar {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--accent), #2dd4bf); color: var(--accent-ink); font-weight: 900;
}
@media (max-width: 640px) {
  .logoWord { display: none; }
  .meText { display: none; }
  .me { padding: 4px; }
  .guestBtns .btn { padding: 9px 12px; font-size: 14px; }
  .topRight { gap: 6px; }
  .friendsBtn { display: none; } /* in the bottom bar instead */
}

/* ---------- side menu (wide screens) and bottom bar (phones) ---------- */
.side { display: none; }
@media (min-width: 1100px) {
  .side { display: flex; flex-direction: column; gap: 2px; position: fixed; top: var(--top); left: 0; bottom: 0; width: var(--side); padding: 14px 10px;
    background: var(--surface); overflow-y: auto; z-index: 30; }
  .side button { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; text-align: left; color: var(--muted); }
  .side button:hover { background: var(--surface-2); color: var(--text); }
  .side button.on { background: var(--surface-2); color: var(--text); }
  .side button .gIcon { width: 22px; height: 22px; }
  .sideHead { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; opacity: .7; }
  main { margin-left: var(--side); }
}
.bottomNav { display: none; }
@media (max-width: 899px) {
  .bottomNav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); box-shadow: 0 -4px 16px rgba(0, 0, 0, .35); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomNav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; position: relative; }
  .bottomNav button span { font-size: 20px; line-height: 1; filter: grayscale(.4); }
  .bottomNav button.on { color: var(--text); }
  .bottomNav button.on::before { content: ''; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--text); }
  .bottomNav button.on span { filter: none; }
  .bottomNav .badge { position: absolute; top: 0; right: 24%; }
  main { padding-bottom: 88px !important; }
  body.playing .bottomNav { display: none; }
  body.playing main { padding-bottom: 24px !important; }
}

main { max-width: 1440px; padding: 0 var(--gutter) 40px; }
@media (min-width: 1100px) { main { padding: 0 28px 40px; } }
.screen { animation: screenIn .35s var(--ease); }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px; border-radius: 10px; font-weight: 700; text-decoration: none;
  background: var(--primary); color: #fff; transition: background .15s, transform .08s, filter .15s;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
}
.btn:hover { background: var(--primary-2); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .5; }
.btn.ghost { background: var(--surface-3); color: var(--text); box-shadow: none; }
.btn.ghost:hover { background: #3d5564; }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.big { width: 100%; padding: 15px 18px; font-size: 16px; }
.btn.wide { width: 100%; margin-top: 12px; }
.btn.wa { background: var(--wa); color: #06210f; }
.btn.danger { color: var(--danger); }
.link { color: var(--primary); font-weight: 700; font-size: 14px; }
.link:hover { text-decoration: underline; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > .btn { flex: 1; }

/* ---------- home ---------- */
.resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(20, 117, 225, .35), rgba(20, 117, 225, .1)); border: 1px solid var(--primary); font-weight: 700; }
.hero { position: relative; overflow: hidden; margin-top: 16px; border-radius: 18px; padding: 26px 24px; min-height: 230px;
  background: radial-gradient(90% 120% at 85% 20%, #2563eb 0%, transparent 55%), radial-gradient(80% 100% at 100% 100%, #7c3aed 0%, transparent 55%), linear-gradient(135deg, #16324a, #0f212e);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); align-items: center; gap: 12px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 46px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; }
.hero h1 span { color: var(--accent); }
.hero p { color: #d4dbef; margin-top: 10px; max-width: 460px; }
.heroCta { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; max-width: 380px; }
.heroCta .btn { font-size: 16px; padding: 14px; }
.orWith { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.orWith::before, .orWith::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, .15); }
.social { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.social button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 6px; border-radius: 10px; background: rgba(255, 255, 255, .1); font-weight: 700; font-size: 14px; }
.social button:hover { background: rgba(255, 255, 255, .18); }
.social svg { width: 20px; height: 20px; flex: none; }
.heroArt { width: 100%; height: auto; display: block; }
.heroStats { display: flex; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.heroStats div { display: flex; flex-direction: column; }
.heroStats b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.heroStats small { color: #c9d2ea; font-size: 12px; }
.float { animation: bob 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.float.f2 { animation-delay: -1.3s; animation-duration: 4.6s; }
.float.f3 { animation-delay: -2.4s; animation-duration: 5.2s; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(2deg); } }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding: 20px 18px; }
  .hero .heroArt { position: absolute; right: -40px; top: -10px; width: 220px; opacity: .35; pointer-events: none; }
  .heroCta { max-width: none; }
}

.search { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 0 14px; border-radius: 999px; background: var(--bg-2); border: 2px solid var(--surface-3); }
.search:focus-within { border-color: var(--primary); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 12px 0; font-size: 15px; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin-top: 14px; padding: 4px; background: var(--bg-2); border-radius: 999px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; display: flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.chips button.on { background: var(--surface-3); color: var(--text); }
.chips button:hover:not(.on) { color: var(--text); }

.rowHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.rowHead h3 { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; }
.rowHead h3 .gIcon { width: 24px; height: 24px; }
.rowHead h4 { font-size: 15px; font-weight: 800; }
.rowHead .more { color: var(--muted); font-weight: 700; font-size: 14px; }
.rowHead .more:hover { color: var(--text); }
.liveDot { width: 9px; height: 9px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 0 rgba(0, 231, 1, .6); animation: live 1.8s infinite; display: inline-block; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(0, 231, 1, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 231, 1, 0); } }

.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 20px) / 3); gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tiles::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .tiles { grid-auto-columns: 168px; } }
.tiles.grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-columns: auto; overflow: visible; }
@media (max-width: 639px) { .tiles.grid { grid-template-columns: repeat(3, 1fr); } }
.tile { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; text-align: left; min-width: 0; }
.tile .poster { width: 100%; height: auto; display: block; border-radius: 10px; box-shadow: 0 6px 16px rgba(0, 0, 0, .35); transition: transform .25s var(--ease), box-shadow .25s; }
.tile:hover .poster { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(0, 0, 0, .5); }
.tile .tp { position: relative; }
.tile small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small b { color: var(--text); }
.tile .gdot { width: 7px; height: 7px; border-radius: 50%; background: var(--win); flex: none; }
.tile.soon .poster { filter: grayscale(.85) brightness(.7); }
.tile.soon .tp::after { content: 'SOON'; position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 900; letter-spacing: .08em; padding: 3px 7px; border-radius: 6px; background: rgba(0, 0, 0, .65); color: #fff; }
.tile .hot { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 900; letter-spacing: .06em; padding: 3px 7px; border-radius: 6px; background: var(--win); color: #00320a; }
.empty { color: var(--muted); padding: 20px 0; text-align: center; }

/* ---------- game page ---------- */
.back { color: var(--muted); padding: 12px 0 6px; font-weight: 600; }
.back:hover { color: var(--text); }
.stage { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px; border-radius: 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--stage, #213743) 0%, var(--surface) 70%); }
.stage .poster { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 8px 20px rgba(0, 0, 0, .45); }
.stage h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 900; line-height: 1.1; }
.stage p { color: #d4dbef; margin-top: 4px; font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .3); color: #e5e9f5; display: inline-flex; align-items: center; gap: 6px; }
.pill.live { color: #b9ffb9; }
.gameCols { display: grid; gap: 14px; align-items: start; }
@media (min-width: 960px) { .gameCols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 17px; }
.card.inner { background: var(--surface-2); padding: 14px; gap: 8px; }
.modeTabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); overflow-x: auto; scrollbar-width: none; }
.modeTabs button { flex: 1; padding: 10px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.modeTabs button.on { background: var(--surface-3); color: var(--text); }
.pane { display: flex; flex-direction: column; gap: 10px; animation: screenIn .3s var(--ease); }
.fieldLabel { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.chipsRow { display: flex; flex-wrap: wrap; gap: 6px; }
.chipsRow button { flex: 1 0 auto; min-width: 64px; padding: 9px 12px; border-radius: 8px; background: var(--bg-2); border: 2px solid var(--surface-3); font-weight: 700; font-size: 14px; color: var(--muted); }
.chipsRow button:hover { color: var(--text); }
.chipsRow button.on { border-color: var(--primary); color: var(--text); background: rgba(20, 117, 225, .15); }
.chipsRow button small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.chipsRow button.locked { opacity: .45; }
.amount { display: flex; align-items: stretch; border-radius: 10px; background: var(--bg-2); border: 2px solid var(--surface-3); overflow: hidden; }
.amount:focus-within { border-color: var(--primary); }
.amount input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 12px; font-size: 17px; font-weight: 800; }
.amount .unit { align-self: center; padding: 0 10px; color: var(--muted); font-weight: 800; }
.amount button { padding: 0 14px; background: var(--surface-3); font-weight: 800; }
.amount button + button { border-left: 1px solid var(--surface-2); }
.amount button:hover { background: #3d5564; }
.levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lvl { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 6px; border-radius: 12px; background: var(--surface-2); font-weight: 800; transition: transform .15s, background .15s; }
.lvl b { font-size: 28px; }
.lvl:hover { background: var(--surface-3); transform: translateY(-2px); }
.challengeBox { display: flex; flex-direction: column; gap: 10px; }
.challengeBox input, .wideInput, .field input, .findInput, .authForm input {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 2px solid var(--surface-3); background: var(--bg-2); color: var(--text); outline: 0; }
.challengeBox input:focus, .field input:focus, .findInput:focus, .authForm input:focus { border-color: var(--primary); }
.wideInput { font-family: ui-monospace, monospace; font-size: 13px; }
.field { display: flex; gap: 8px; }
.field input { flex: 1; min-width: 0; }

/* how to play slides */
.slides { display: flex; flex-direction: column; gap: 10px; }
.howtoArt { width: 100%; height: auto; display: block; border-radius: 14px; }
.slideText h4 { font-size: 17px; font-weight: 800; }
.slideText p { color: #d4dbef; font-size: 14px; margin-top: 4px; min-height: 42px; }
.slideNav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slideNav .dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.slideNav .dots button { width: 8px; height: 8px; border-radius: 4px; background: var(--surface-3); transition: width .3s var(--ease), background .3s; padding: 0; }
.slideNav .dots button.on { width: 22px; background: var(--primary); }
.slideNav .arrow { width: 38px; height: 38px; border-radius: 10px; background: var(--surface-3); font-size: 18px; font-weight: 800; flex: none; }
.slideNav .arrow:hover { background: #3d5564; }
.slideBar { height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.slideBar i { display: block; height: 100%; width: 100%; background: var(--primary); transform-origin: left; animation: slideBar 7s linear forwards; }
.slides.paused .slideBar i { animation-play-state: paused; }
@keyframes slideBar { from { transform: scaleX(0); } }
.slideIn { animation: slideIn .4s var(--ease); }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } }
.rulesText { gap: 14px; }
.rulesText h4 { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.rulesText ul { padding-left: 18px; display: flex; flex-direction: column; gap: 5px; color: #d4dbef; font-size: 14px; line-height: 1.45; }

/* ---------- sign in ---------- */
.authTabs { margin-bottom: 4px; }
.authForm { display: flex; flex-direction: column; gap: 8px; }
.authForm label { font-size: 13px; font-weight: 700; color: var(--muted); }
.pwWrap { position: relative; }
.pwWrap button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; font-weight: 700; padding: 6px; }
.authErr { color: var(--danger); font-size: 13px; font-weight: 600; min-height: 18px; }
.authAlt { display: flex; flex-direction: column; gap: 8px; }
.altBtn { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface-3); font-weight: 700; }
.altBtn:hover { background: #3d5564; }
.altBtn svg { width: 22px; height: 22px; }
.gsi { display: flex; justify-content: center; min-height: 44px; }
.walletLinks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.devBox { border: 1px dashed var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.methods { display: flex; flex-direction: column; gap: 6px; }
.method { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.method b { display: block; }
.method small { color: var(--muted); }
.method .ok { color: var(--win); font-weight: 800; }

/* ---------- searching ---------- */
.radar { position: relative; width: 120px; height: 120px; display: grid; place-items: center; }
.radar span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--primary); opacity: 0; animation: radar 2.4s var(--ease) infinite; }
.radar span:nth-child(2) { animation-delay: .8s; } .radar span:nth-child(3) { animation-delay: 1.6s; }
.radar b { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-2); box-shadow: 0 0 0 4px var(--surface-3); }
.radar b .gIcon { width: 44px; height: 44px; }
@keyframes radar { 0% { transform: scale(.45); opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
.searchTime { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- effects layer (confetti) ---------- */
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

/* play */
.arena {
  display: grid; gap: 10px; margin: 4px auto 0;
  grid-template-areas: "top" "board" "bottom" "actions";
  width: min(100%, calc(100dvh - 250px));
  min-width: min(100%, 300px);
}
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .arena {
    width: auto; max-width: 1100px;
    grid-template-columns: min(calc(100dvh - 110px), 680px) minmax(280px, 340px);
    grid-template-rows: auto 1fr auto;
    grid-template-areas: "board top" "board actions" "board bottom";
    column-gap: 20px; justify-content: center;
  }
}
#barTop { grid-area: top; }
@media (max-width: 899px), (max-aspect-ratio: 5/4) { .arena.cards { width: 100%; max-width: 640px; } }
#barBottom { grid-area: bottom; }
.boardWrap { grid-area: board; }
.actions { grid-area: actions; display: flex; flex-direction: column; gap: 10px; justify-content: center; }

.pbar {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.pbar.turn { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.pbar .who { flex: 1; min-width: 0; }
.pbar .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar .who small { color: var(--muted); }
.pbar .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 4px; }
.pbar .dot.on { background: var(--accent); }
.disc { width: 22px; height: 22px; border-radius: 50%; flex: none; }
.disc.w { background: radial-gradient(circle at 35% 30%, #fff, #e6dccb 60%, #b9ab92); }
.disc.b { background: radial-gradient(circle at 35% 30%, #5a5a63, #1d1d22 65%); border: 1px solid #444; }
.clock {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 20px;
  padding: 4px 10px; border-radius: 10px; background: var(--bg); min-width: 76px; text-align: center;
}
.pbar.turn .clock { background: var(--accent); color: var(--accent-ink); }
.clock.low { background: var(--danger) !important; color: #fff !important; }
.bubble {
  position: absolute; left: 50%; top: -14px; transform: translate(-50%, -100%);
  background: #fff; color: #111; font-weight: 700; padding: 8px 12px; border-radius: 14px;
  white-space: nowrap; z-index: 5; animation: pop 3s forwards; pointer-events: none;
}
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #fff; }
#barBottom .bubble { top: auto; bottom: -14px; transform: translate(-50%, 100%); }
#barBottom .bubble::after { bottom: auto; top: -6px; border-top: 0; border-bottom: 6px solid #fff; }
@keyframes pop { 0% { opacity: 0; scale: .7; } 8% { opacity: 1; scale: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }

.status { text-align: center; font-weight: 700; min-height: 22px; }
.status.must { color: var(--accent); }
.emotes { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.emotes button { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; }
.emotes button:hover { border-color: var(--accent); }

/* board */
.board {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 6px #3a2615, 0 0 0 7px #5b3b20, 0 24px 60px rgba(0, 0, 0, .5);
  touch-action: manipulation; user-select: none;
}
.cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(10, 1fr); }
.cell { position: relative; background: var(--sq-light); }
.cell.dark { background: var(--sq-dark); cursor: pointer; }
.cell.last { box-shadow: inset 0 0 0 100px rgba(200, 255, 61, .22); }
.cell.sel { box-shadow: inset 0 0 0 100px rgba(200, 255, 61, .45); }
.cell.dest::after {
  content: ''; position: absolute; inset: 36%; border-radius: 50%; background: rgba(200, 255, 61, .85);
}
.cell.dest.cap::after { inset: 8%; background: none; border: 4px solid rgba(255, 92, 122, .9); }
.cell.via::after { content: ''; position: absolute; inset: 40%; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.cell .num { position: absolute; left: 3px; top: 1px; font-size: 9px; color: rgba(255, 255, 255, .35); pointer-events: none; }

.pieces { position: absolute; inset: 0; pointer-events: none; }
.piece {
  position: absolute; left: 0; top: 0; width: 10%; height: 10%; padding: 0.9%;
  transition: transform .18s ease-out, opacity .25s;
}
.piece::before {
  content: ''; display: block; width: 100%; height: 100%; border-radius: 50%;
}
.piece::before { box-shadow: 0 3px 4px rgba(0, 0, 0, .45); }
.piece.w::before { background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(0,0,0,.12) 50%, transparent 54%), radial-gradient(circle at 35% 30%, #fffdf7, #eadfca 60%, #b9a888); }
.piece.b::before { background: radial-gradient(circle at 50% 50%, transparent 48%, rgba(255,255,255,.08) 50%, transparent 54%), radial-gradient(circle at 35% 30%, #5d5d68, #1c1c21 65%); }
.piece.king::after {
  content: '♛'; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: min(4.2vw, 30px); line-height: 1;
}
.piece.w.king::after { color: #b8892a; }
.piece.b.king::after { color: #e9c46a; }
.piece.can::before { box-shadow: 0 0 0 3px var(--accent), 0 3px 4px rgba(0, 0, 0, .45); }
.piece.gone { opacity: 0; }

/* overlays */
.overlay { position: fixed; inset: 0; background: rgba(5, 6, 10, .72); backdrop-filter: blur(6px); display: grid; place-items: center; z-index: 50; padding: var(--gutter); }
.sheet { width: min(100%, 440px); max-height: 90dvh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.sheet.center { align-items: center; text-align: center; }
.sheet h2 { font-size: 28px; font-weight: 900; }
.sheet .big:not(.btn) { font-size: 40px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }
.delta { font-size: 22px; font-weight: 800; }
.delta.up { color: var(--accent); }
.delta.down { color: var(--danger); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.mine td { color: var(--accent); }
.list { display: flex; flex-direction: column; gap: 6px; }
.list .item { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.win { color: var(--accent); } .loss { color: var(--danger); } .draw { color: var(--muted); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60;
  background: var(--text); color: var(--bg); font-weight: 600; padding: 10px 16px; border-radius: 12px;
  max-width: calc(100% - 32px); text-align: center;
}
.net { position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: var(--danger); color: #fff; text-align: center; font-weight: 700; padding: 6px; font-size: 14px; }
.stakes button small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.stakes button.on small { color: var(--accent-ink); opacity: .7; }

/* blackjack table */
.bj {
  grid-area: board; display: flex; flex-direction: column; gap: 14px; justify-content: space-between;
  padding: 16px; border-radius: 18px; min-height: min(70dvh, 560px);
  background: radial-gradient(120% 90% at 50% 40%, #1f6b45, #0f3b27 70%, #0a2a1c);
  box-shadow: inset 0 0 0 6px #4a2f17, inset 0 0 0 7px #6b4523, 0 24px 60px rgba(0, 0, 0, .5);
}
.bjInfo { display: flex; justify-content: space-between; font-weight: 700; color: #d9f5e5; font-size: 14px; }
.bjHands { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; min-height: 120px; }
.bjHand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bjHand.active .cardRow { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 10px; }
.cardRow { display: flex; }
.cardRow .pc + .pc { margin-left: -28px; }
.pc {
  width: 62px; height: 88px; border-radius: 9px; background: #fff; color: #15171c; position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .35); font-weight: 800; animation: deal .25s ease-out both;
  display: flex; flex-direction: column; justify-content: space-between; padding: 6px 7px; font-size: 18px; line-height: 1;
}
.pc.red { color: #d22d47; }
.pc .suit { align-self: flex-end; font-size: 26px; }
.pc.back {
  background: repeating-linear-gradient(45deg, #24304f 0 6px, #1b2440 6px 12px); border: 3px solid #fff;
}
.handTag { font-size: 13px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: #fff; }
.handTag.bust { background: var(--danger); }
.handTag.bj21 { background: var(--accent); color: var(--accent-ink); }
.bjMid { text-align: center; color: #d9f5e5; font-weight: 700; min-height: 24px; }
.bjMid .pts { font-size: 26px; font-weight: 900; }
.bjMid .pts.up { color: var(--accent); } .bjMid .pts.down { color: #ff8da1; }
.bjActions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bjActions .btn { padding: 12px 6px; }
.bjActions .btn:disabled { opacity: .35; filter: none; cursor: default; }
@media (max-width: 420px) { .pc { width: 52px; height: 74px; font-size: 16px; } .pc .suit { font-size: 22px; } }

/* whot table */
.whot {
  grid-area: board; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  padding: 16px; border-radius: 18px; min-height: min(70dvh, 560px);
  background: radial-gradient(120% 90% at 50% 40%, #6b1e2c, #3d0f19 70%, #2a0a11);
  box-shadow: inset 0 0 0 6px #2b1a10, inset 0 0 0 7px #5a3a22, 0 24px 60px rgba(0, 0, 0, .5);
}
.wc {
  --w: 64px; width: var(--w); height: calc(var(--w) * 1.42); border-radius: 9px; flex: none; position: relative;
  background: #fffaf0; color: #8c1b2f; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); border: 0;
  display: grid; place-items: center; font-weight: 900; padding: 0; animation: deal .25s ease-out both;
}
.wc svg { width: 58%; height: 58%; fill: currentColor; }
.wc .n { position: absolute; font-size: 15px; line-height: 1; }
.wc .n.tl { top: 6px; left: 7px; } .wc .n.br { bottom: 6px; right: 7px; transform: rotate(180deg); }
.wc .whotWord { font-size: 15px; letter-spacing: .05em; }
.wc.back { background: repeating-linear-gradient(45deg, #8c1b2f 0 6px, #771526 6px 12px); border: 3px solid #fffaf0; color: #fffaf0; }
.wc.back span { font-size: 11px; font-weight: 900; letter-spacing: .1em; }
.wc.big { --w: 86px; } .wc.big .n { font-size: 19px; }
.wOpp { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 70px; }
.wOpp .fan { display: flex; } .wOpp .fan .wc { --w: 40px; } .wOpp .fan .wc + .wc { margin-left: -26px; }
.wOpp b { color: #ffe9ec; }
.wCenter { display: flex; justify-content: center; align-items: center; gap: 28px; }
.wMarket { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #ffe9ec; }
.wMarket:disabled { cursor: default; }
.wMarket:not(:disabled) .wc { box-shadow: 0 0 0 3px var(--accent), 0 4px 10px rgba(0, 0, 0, .35); }
.wMarket small { color: #e8b9c1; }
.wPile { position: relative; }
.wReq { position: absolute; right: -14px; top: -14px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 4px 8px; font-weight: 800; font-size: 12px; display: flex; align-items: center; gap: 4px; }
.wReq svg { width: 14px; height: 14px; fill: currentColor; }
.wInfo { text-align: center; color: #ffe9ec; font-weight: 700; min-height: 22px; font-size: 14px; }
.wInfo .warn { color: var(--accent); }
.wHand { display: flex; gap: 6px; overflow-x: auto; padding: 10px 4px 6px; scrollbar-width: thin; justify-content: safe center; }
.wHand .wc { cursor: default; opacity: .6; transition: transform .12s; }
.wHand .wc.can { opacity: 1; cursor: pointer; }
.wHand .wc.can:hover { transform: translateY(-6px); }
.shapePick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.shapePick button { aspect-ratio: 1; border-radius: 12px; background: #fffaf0; color: #8c1b2f; display: grid; place-items: center; }
.shapePick svg { width: 60%; height: 60%; fill: currentColor; }
@media (max-width: 420px) { .wc { --w: 54px; } .wc.big { --w: 74px; } }

/* bets */
.offerForm { display: flex; flex-direction: column; gap: 8px; }
.offerUsd { align-self: center; white-space: nowrap; }
.tcPick { flex-wrap: wrap; }
.tcPick button { min-width: 64px; }
.mineOffer { border: 1px solid var(--accent); align-items: center; }
.mineOffer small, #offerList small { font-weight: 400; }
#offerList .item { align-items: center; }
.betBig { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; }
.betBig b { font-size: 34px; font-weight: 900; }
.betRules { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.pot small { color: var(--muted); }

/* bigger tables: a strip of opponents along the top */
.pbar.multi { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; padding: 6px; }
.pbar.multi .seat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 10px; background: var(--bg); position: relative; min-width: 0; }
.pbar.multi .seat b { font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar.multi .seat small { color: var(--muted); font-size: 12px; }
.pbar.multi .seat.turn { box-shadow: 0 0 0 2px var(--accent) inset; }
.pbar.multi .clock { font-size: 13px; min-width: 0; padding: 2px 8px; }
.pbar.multi .dot { margin-right: 4px; }
.disc.none { display: none; }
.wOpp { flex-wrap: wrap; gap: 14px; }
.wSeat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; border-radius: 12px; }
.wSeat.turn { box-shadow: 0 0 0 2px var(--accent); }
.wSeat b { font-size: 13px; }

/* game screen: a move list / log beside the board on wide screens */
.feed { grid-area: feed; display: none; }
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .arena {
    grid-template-rows: auto 1fr auto auto;
    grid-template-areas: "board top" "board feed" "board actions" "board bottom";
  }
  .feed {
    display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 14px;
  }
  .whot, .bj { min-height: min(calc(100dvh - 110px), 680px); }
}
.feed h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.feed .row2 { display: grid; grid-template-columns: 34px 1fr 1fr; gap: 6px; font-variant-numeric: tabular-nums; padding: 2px 0; }
.feed .row2 .n { color: var(--muted); }
.feed .line { padding: 3px 0; border-bottom: 1px solid var(--line); }
.feed .line:last-child { border-bottom: 0; }
.feed .empty { color: var(--muted); }

/* jackpot table */
.jp {
  grid-area: board; display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 18px;
  background: radial-gradient(120% 90% at 50% 40%, #233a7a, #101a3d 70%, #0b1230);
  box-shadow: inset 0 0 0 6px #1a2240, inset 0 0 0 7px #3a4a80, 0 24px 60px rgba(0, 0, 0, .5);
}
@media (min-width: 900px) and (min-aspect-ratio: 5/4) { .jp { min-height: min(calc(100dvh - 110px), 680px); } }
.jpTop { display: flex; justify-content: space-between; font-weight: 700; color: #dfe6ff; font-size: 14px; }
.jpSeats { display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 6px; }
.jpSeat { position: relative; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.jpSeat.partner { border-color: var(--accent); }
.jpSeat .nm { font-weight: 800; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jpSeat small { color: #b9c3e6; font-size: 11px; }
.jpSeat .order { font-size: 10px; color: #8d9acb; line-height: 1; }
.team { display: inline-block; font-size: 10px; font-weight: 900; padding: 1px 6px; border-radius: 6px; color: #0b0d12; }
.team.A { background: #c8ff3d; } .team.B { background: #ff8fa3; } .team.C { background: #7dd3fc; } .team.D { background: #fcd34d; }
.jpSeat .suspect { font-size: 11px; padding: 4px 8px; border-radius: 8px; background: rgba(255, 92, 122, .2); color: #ffb3c1; font-weight: 700; }
.jpSeat .gest { position: absolute; top: -12px; right: -6px; font-size: 24px; animation: pop 3s forwards; pointer-events: none; }
.jpMid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; flex: 1; }
.jpCenter { display: flex; align-items: center; gap: 16px; }
.jpPile { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #b9c3e6; }
.jpPile .jc { --w: 46px; }
.jc.back { background: repeating-linear-gradient(45deg, #2a3a7a 0 6px, #22306a 6px 12px); border: 3px solid #f6f8ff; }
.jpNews { color: #fff; font-weight: 700; max-width: 360px; font-size: 15px; }
.jpSignal { font-size: 13px; color: #dfe6ff; background: rgba(0, 0, 0, .3); padding: 6px 12px; border-radius: 999px; }
.jpSignal b { color: var(--accent); }
.jpCall {
  font-size: 22px; font-weight: 900; letter-spacing: .06em; padding: 14px 34px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe066, #f2b705); color: #3a2a00; box-shadow: 0 6px 0 #a87c00, 0 12px 30px rgba(242, 183, 5, .35);
}
.jpCall:active { transform: translateY(3px); box-shadow: 0 3px 0 #a87c00; }
.jpInfo { color: #dfe6ff; font-weight: 700; font-size: 14px; text-align: center; min-height: 20px; }
.jpHand { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.jc {
  --w: 60px; width: var(--w); height: calc(var(--w) * 1.4); border-radius: 9px; background: #f6f8ff; color: #23306b; border: 0;
  display: grid; place-items: center; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); position: relative; animation: deal .25s ease-out both;
}
.jc svg { width: 62%; height: 62%; fill: currentColor; }
.jc.new::after { content: 'NEW'; position: absolute; top: -8px; font-size: 9px; font-weight: 900; background: var(--accent); color: var(--accent-ink); padding: 1px 5px; border-radius: 6px; }
.jc.can { cursor: pointer; }
.jc.can:hover { transform: translateY(-6px); }
.jc.match { box-shadow: 0 0 0 3px #ffe066, 0 4px 10px rgba(0, 0, 0, .35); }
.jpGestures { display: flex; gap: 6px; overflow-x: auto; justify-content: safe center; padding-bottom: 2px; }
.jpGestures button { flex: none; font-size: 22px; width: 44px; height: 44px; border-radius: 12px; background: rgba(0, 0, 0, .3); position: relative; }
.jpGestures button.mine::after { content: '★'; position: absolute; right: 2px; top: 0; font-size: 10px; color: var(--accent); }
.jpGestures button:hover { background: rgba(255, 255, 255, .12); }
@media (max-width: 420px) { .jc { --w: 52px; } .jpCall { font-size: 19px; padding: 12px 26px; } }
/* grid items grow to fit their content by default; let long rows (gestures, big Whot hands) scroll instead */
.whot, .bj, .jp, .boardWrap, .actions, .feed { min-width: 0; }
.jpNews { overflow-wrap: anywhere; }

/* wallet */
.wTabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: var(--bg); padding: 4px; border-radius: 12px; }
.wTabs button { padding: 8px 4px; border-radius: 9px; font-size: 13px; font-weight: 700; color: var(--muted); }
.wTabs button.on { background: var(--surface-2); color: var(--text); }
.warnBox { background: rgba(255, 200, 61, .12); border: 1px solid rgba(255, 200, 61, .4); color: #ffe29a; border-radius: 10px; padding: 8px 10px; font-size: 13px; }


/* waiting board */
.waitList { display: flex; flex-direction: column; gap: 6px; }
.waitRow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.waitRow .wi { font-size: 22px; }
.waitRow .wt { flex: 1; min-width: 0; }
.waitRow .wt b { display: block; font-size: 14px; }
.waitRow .wt small { color: var(--muted); font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waitRow .stakeTag { font-weight: 800; color: var(--accent); white-space: nowrap; }
.searchOthers { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.searchOthers h4 { font-size: 13px; color: var(--muted); }

/* chat */
.chatBox { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.chatLog { max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.chatLog .msg b { color: var(--accent); margin-right: 4px; }
.chatLog .msg.mine b { color: #5ce1e6; }
.chatLog .empty { color: var(--muted); font-size: 13px; }
.chatForm { display: flex; gap: 6px; }
.chatForm input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; }
#micBtn.on, #speakerBtn.on { background: var(--accent); color: var(--accent-ink); }
.vIcon { font-size: 12px; margin-left: 4px; cursor: pointer; padding: 0 2px; }
.vIcon.dim { opacity: .6; cursor: default; }
.vIcon.muted { opacity: .4; text-decoration: line-through; }

/* 4 in a row */
.c4 { grid-area: board; display: grid; place-items: center; padding: 8px; min-width: 0; }
.c4Board {
  width: 100%; max-width: 560px; aspect-ratio: 7 / 6.2; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 10px;
  background: linear-gradient(180deg, #2552c9, #1a3b94); border-radius: 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 -6px 0 rgba(0, 0, 0, .25);
}
.c4Col { display: grid; grid-template-rows: repeat(6, 1fr); gap: 6px; border-radius: 12px; cursor: pointer; }
.c4Col:hover { background: rgba(255, 255, 255, .08); }
.c4Cell { border-radius: 50%; background: #0b1230; box-shadow: inset 0 3px 6px rgba(0, 0, 0, .6); position: relative; overflow: hidden; }
.c4Disc { position: absolute; inset: 6%; border-radius: 50%; }
.c4Disc.w { background: radial-gradient(circle at 35% 30%, #ff8a8a, #e3262e 60%, #a3121a); }
.c4Disc.b { background: radial-gradient(circle at 35% 30%, #fff2a0, #f5c518 60%, #b38a00); }
.c4Disc.win { box-shadow: 0 0 0 4px #fff, 0 0 18px #fff; }
.disc.c4w { background: radial-gradient(circle at 35% 30%, #ff8a8a, #e3262e 60%); }
.disc.c4b { background: radial-gradient(circle at 35% 30%, #fff2a0, #f5c518 60%); }

/* word hunt */
.wh { grid-area: board; display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 14px; border-radius: 18px; min-width: 0;
  background: radial-gradient(120% 90% at 50% 30%, #3c7a3a, #1f4a1e 70%, #143313); }
.whTop { width: 100%; display: flex; justify-content: space-between; color: #e8ffe0; font-weight: 800; }
.whWord { min-height: 40px; font-size: 26px; font-weight: 900; letter-spacing: .08em; color: #fff; }
.whWord.ok { color: var(--accent); } .whWord.bad { color: #ffb3c1; }
.whGrid { width: min(100%, 380px); aspect-ratio: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; touch-action: none; user-select: none; }
.whTile { display: grid; place-items: center; border-radius: 14px; background: #fdf3d6; color: #2a2a2a; font-size: 30px; font-weight: 900; box-shadow: 0 4px 0 #c8b37a; }
.whTile.on { background: var(--accent); box-shadow: 0 4px 0 #8fb52a; }
.whFound { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; max-height: 120px; overflow-y: auto; }
.whFound span { background: rgba(0, 0, 0, .3); color: #e8ffe0; border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 700; }

/* archery */
.ar { grid-area: board; display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 12px; border-radius: 18px; min-width: 0;
  background: linear-gradient(180deg, #87c6ff, #cde8ff 55%, #6aa84f 56%, #3d7a2a); }
.arTop { width: 100%; display: flex; justify-content: space-between; gap: 8px; font-weight: 800; color: #0b2340; font-size: 14px; }
#arCanvas { width: min(100%, 440px); aspect-ratio: 1; touch-action: none; cursor: crosshair; }
.arInfo { font-weight: 800; color: #0b2340; text-align: center; min-height: 20px; }
@media (min-width: 900px) and (min-aspect-ratio: 5/4) { .c4, .wh, .ar { min-height: min(calc(100dvh - 110px), 680px); } }

/* ---------- result screen ---------- */
.followRow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.sharePreview { width: 100%; max-width: 360px; border-radius: 14px; display: block; margin: 0 auto 10px; }

/* ---------- friends and alerts ---------- */
.iconBtn .badge, .friendsBtn .badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.friendsBtn .badge.hidden { display: none; }
.alertBar { position: fixed; top: 10px; left: 50%; transform: translateX(-50%); z-index: 65; width: min(560px, calc(100% - 32px));
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-size: 14px; font-weight: 600; }
.alertBar > span { flex: 1; min-width: 0; }
.alertBar .x { padding: 4px 8px; color: var(--muted); }
.pa { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.people { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.person .pt { flex: 1; min-width: 0; }
.person .pt b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.person .pt small { color: var(--muted); font-size: 12px; }
.person .tag { background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 1px 6px; font-size: 10px; vertical-align: middle; }
.person .dot { width: 9px; height: 9px; border-radius: 50%; background: #4a5164; flex: none; }
.person .dot.online { background: #3ddc84; }
.person .dot.playing { background: #f2b705; }
.person .dot.searching, .person .dot.offer { background: var(--accent); box-shadow: 0 0 0 3px rgba(200, 255, 61, .2); }
.bell { font-size: 18px; padding: 4px 6px; border-radius: 8px; }
.inviteGames { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; }
.inviteGames .ig { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
@media (max-width: 420px) { .person { flex-wrap: wrap; } .person .pa { width: 100%; } }

/* ---------- shared pickers ---------- */
.tcPick { display: flex; flex-wrap: wrap; gap: 6px; }
.tcPick button { flex: 1 0 auto; min-width: 64px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); border: 2px solid var(--surface-3); font-weight: 700; font-size: 13px; color: var(--muted); }
.tcPick button:hover { color: var(--text); border-color: var(--primary); }
.tabs { display: flex; gap: 4px; background: var(--bg-2); border-radius: 999px; padding: 4px; }
.tabs button { flex: 1; padding: 8px 4px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: 13px; }
.tabs button.on { background: var(--surface-3); color: var(--text); }

/* ---------- overlays ---------- */
.overlay { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { background: var(--surface); border: 0; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); animation: sheetIn .35s var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
.sheet h2 { font-size: 26px; }
.toast { background: var(--surface-3); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); bottom: 96px; animation: toastIn .3s var(--ease); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* ---------- result: celebrate a win, soften a loss ---------- */
.resultHead { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding-top: 6px; }
.resultHead .emblem { font-size: 68px; line-height: 1; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .4)); }
.resultHead.win .emblem { animation: trophy 1.1s var(--ease) both; }
.resultHead.win h2 { background: linear-gradient(180deg, #fff6c2, #f2b705); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 34px; animation: popIn .6s .15s var(--ease) both; }
.resultHead.loss .emblem { animation: sink 1.2s var(--ease) both; }
.resultHead.loss h2 { color: #d4dbef; animation: popIn .5s var(--ease) both; }
.resultHead.draw .emblem { animation: shake2 1s ease both; }
.resultHead .money { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; animation: popIn .5s .35s var(--ease) both; }
.resultHead .money.up { color: var(--win); text-shadow: 0 0 24px rgba(0, 231, 1, .45); }
.resultHead .money.down { color: var(--danger); }
.resultHead .sub2 { color: var(--muted); font-size: 14px; }
@keyframes trophy { 0% { transform: scale(0) rotate(-30deg); } 60% { transform: scale(1.25) rotate(8deg); } 80% { transform: scale(.95) rotate(-3deg); } 100% { transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.7); } }
@keyframes sink { 0% { transform: translateY(-20px); opacity: 0; } 60% { transform: translateY(4px); opacity: 1; } 100% { transform: none; } }
@keyframes shake2 { 25% { transform: rotate(-12deg); } 50% { transform: rotate(10deg); } 75% { transform: rotate(-6deg); } }
.sheet.winSheet { box-shadow: 0 0 0 2px rgba(242, 183, 5, .6), 0 0 60px rgba(242, 183, 5, .25), 0 24px 60px rgba(0, 0, 0, .55); }
.sheet.lossSheet { box-shadow: 0 0 0 1px var(--surface-3), 0 24px 60px rgba(0, 0, 0, .55); }
body.lost .arena { animation: lost 0.6s ease; filter: saturate(.55) brightness(.85); transition: filter 1s; }
@keyframes lost { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }
body.won .arena { animation: won .9s var(--ease); }
@keyframes won { 30% { transform: scale(1.02); } }
.resultGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.resultGrid .btn { width: 100%; margin: 0; }
.resultGrid .btn:first-child { grid-column: 1 / -1; padding: 15px; font-size: 16px; }

/* ---------- calmer, smoother game motion ---------- */
.piece { transition: transform .42s var(--ease), opacity .45s ease; }
.piece::before { transition: transform .45s var(--ease); }
.piece.gone::before { transform: scale(.35); }
.pbar.turn { animation: turnGlow 1.8s ease-in-out infinite; }
@keyframes turnGlow { 50% { box-shadow: 0 0 0 1px var(--accent) inset, 0 0 18px rgba(200, 255, 61, .25); } }
.c4Disc.drop { animation: c4drop .7s cubic-bezier(.45, 0, .55, 1); }
@keyframes c4drop { 0% { transform: translateY(-700%); } 62% { transform: translateY(0); } 76% { transform: translateY(-14%); } 88% { transform: translateY(0); } 94% { transform: translateY(-4%); } 100% { transform: none; } }
.c4Disc.win { animation: winPulse 1s ease-in-out infinite; }
@keyframes winPulse { 50% { box-shadow: 0 0 0 5px #fff, 0 0 26px #fff; } }
@keyframes deal { from { transform: translateY(-26px) rotate(-6deg) scale(.92); } }
.pc, .wc, .jc { animation-duration: .45s; animation-timing-function: var(--ease); }
.cardRow .pc:nth-child(2), .wHand .wc:nth-child(2), .jpHand .jc:nth-child(2) { animation-delay: .07s; }
.cardRow .pc:nth-child(3), .wHand .wc:nth-child(3), .jpHand .jc:nth-child(3) { animation-delay: .14s; }
.cardRow .pc:nth-child(4), .wHand .wc:nth-child(4), .jpHand .jc:nth-child(4) { animation-delay: .21s; }
.cardRow .pc:nth-child(5), .wHand .wc:nth-child(5), .jpHand .jc:nth-child(5) { animation-delay: .28s; }
.wHand .wc:nth-child(n+6), .jpHand .jc:nth-child(n+6) { animation-delay: .32s; }
.wPile .wc.land { animation: land .55s var(--ease) both; }
.wPile .wc.landTop { animation: landTop .55s var(--ease) both; }
@keyframes land { from { transform: translateY(120px) rotate(-14deg) scale(1.08); } }
@keyframes landTop { from { transform: translateY(-120px) rotate(12deg) scale(.9); } }
.wHand .wc.can { box-shadow: 0 0 0 2px var(--accent), 0 6px 14px rgba(0, 0, 0, .4); }
.wHand .wc.can:hover, .jc.can:hover { transform: translateY(-10px) rotate(-2deg); transition: transform .2s var(--ease); }
.whTile { transition: transform .15s var(--ease), background .15s; }
.whTile.on { transform: scale(1.06); }
.whWord.ok { animation: popIn .4s var(--ease); }
.bjMid .pts { animation: popIn .45s var(--ease); display: inline-block; }
.jpCall:not(:disabled) { animation: callPulse 1.4s ease-in-out infinite; }
@keyframes callPulse { 50% { transform: scale(1.04); } }
.status { font-size: 16px; }
.status.must, .status.turnNow { color: var(--accent); }
.actRow .btn { flex: 1 1 auto; }

/* game page stage colours */
.stage.g-draft { --stage: #6b4320; } .stage.g-connect4 { --stage: #1f4fd1; } .stage.g-whot { --stage: #8c1b2f; }
.stage.g-jackpot { --stage: #2a1a7a; } .stage.g-blackjack { --stage: #1f7a4c; } .stage.g-wordhunt { --stage: #1f6b3a; } .stage.g-archery { --stage: #2a7ad1; }
@media (max-width: 520px) { .stage { grid-template-columns: 84px minmax(0, 1fr); padding: 12px; gap: 12px; } }

/* home welcome for signed-in players */
.welcome { display: flex; flex-direction: column; gap: 4px; }
.welcome .bal { font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; margin-top: 6px; }
.welcome .row { margin-top: 12px; max-width: 420px; }

/* ---------- chess ---------- */
.chess { grid-area: board; display: grid; place-items: center; min-width: 0; }
.chessBoard { width: min(100%, 640px); aspect-ratio: 1; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 6px #2b3a2a, 0 24px 60px rgba(0, 0, 0, .5); user-select: none; touch-action: manipulation; }
.cSq { position: relative; display: grid; place-items: center; padding: 0; border: 0; cursor: default; min-width: 0; min-height: 0; overflow: hidden; }
.cp { font-size: min(8.4vw, 54px) !important; }
.cSq.l { background: #eeeed2; } .cSq.d { background: #769656; }
.cSq.can { cursor: pointer; }
.cSq.last.l { background: #f6f68a; } .cSq.last.d { background: #baca44; }
.cSq.sel { box-shadow: inset 0 0 0 100px rgba(20, 117, 225, .45); }
.cSq.check { background: radial-gradient(circle, #ff3b3b 0%, #e01f1f 40%, transparent 75%) !important; }
.cSq.dest::after { content: ''; position: absolute; width: 30%; height: 30%; border-radius: 50%; background: rgba(0, 0, 0, .22); }
.cSq.cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 5px solid rgba(0, 0, 0, .22); }
.cSq.dest, .cSq.cap { cursor: pointer; }
.cSq i { position: absolute; font-style: normal; font-size: 10px; font-weight: 800; opacity: .7; pointer-events: none; }
.cSq.l i { color: #769656; } .cSq.d i { color: #eeeed2; }
.cSq i.rk { left: 3px; top: 1px; } .cSq i.fl { right: 3px; bottom: 0; }
.cp { font-size: min(9.5vw, 58px); line-height: 1; font-family: 'Segoe UI Symbol', 'Apple Symbols', 'Noto Sans Symbols 2', 'DejaVu Sans', serif; pointer-events: none; }
.cp.w { color: #fff; -webkit-text-stroke: 1.6px #2b2b2b; text-shadow: 0 3px 4px rgba(0, 0, 0, .35); }
.cp.b { color: #222; -webkit-text-stroke: 1px #000; text-shadow: 0 3px 4px rgba(0, 0, 0, .35); }
@media (min-width: 900px) and (min-aspect-ratio: 5/4) { .chess { min-height: min(calc(100dvh - 110px), 680px); } }
.promoPick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.promoPick button { aspect-ratio: 1; border-radius: 12px; background: #eeeed2; font-size: 48px; pointer-events: auto; }
.promoPick .cp { pointer-events: auto; }

/* ---------- ludo ---------- */
.ludo { grid-area: board; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.ludoBoard { width: min(100%, 600px); aspect-ratio: 1; border-radius: 14px; box-shadow: 0 0 0 6px #e9e3d3, 0 24px 60px rgba(0, 0, 0, .5); }
.lTok { transition: transform .16s ease; }
.lTok.can { cursor: pointer; }
.lTok.can .ring { animation: ringPulse 1s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes ringPulse { 50% { transform: scale(1.18); opacity: .5; } }
.ludoBar { display: flex; align-items: center; gap: 14px; width: min(100%, 600px); }
.dice { width: 64px; height: 64px; border-radius: 16px; background: var(--c, #fff); padding: 6px; flex: none; box-shadow: 0 6px 0 rgba(0, 0, 0, .3); transition: transform .2s; }
.dice svg { width: 100%; height: 100%; display: block; }
.dice:disabled { opacity: .75; box-shadow: none; }
.dice.ready { animation: diceCall 1.2s ease-in-out infinite; }
@keyframes diceCall { 50% { transform: translateY(-4px) rotate(-6deg); } }
.dice.rolling { animation: diceRoll .65s cubic-bezier(.2, .8, .2, 1); }
@keyframes diceRoll { 0% { transform: rotate(0) scale(1); } 40% { transform: rotate(320deg) scale(1.2); } 100% { transform: rotate(720deg) scale(1); } }
#ludoInfo { font-weight: 700; }

/* ---------- 8-ball ---------- */
.pool, .hoops, .tanks { grid-area: board; display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
#poolCanvas { width: 100%; max-width: 900px; height: auto; border-radius: 16px; touch-action: none; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); cursor: crosshair; }
.poolTop { width: 100%; display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.poolTop b { color: var(--text); }
.poolBar { width: 100%; max-width: 900px; display: flex; gap: 12px; align-items: center; }
.poolBar .slider { flex: 1; }
.poolBar .btn { min-width: 120px; }
.slider { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; color: var(--muted); }
.slider b { color: var(--text); min-width: 36px; }
.slider input { flex: 1; accent-color: var(--primary); min-width: 0; }
.poolInfo { text-align: center; font-weight: 700; color: var(--muted); font-size: 14px; min-height: 20px; }

/* ---------- basketball ---------- */
#hoopsCanvas { width: min(100%, 420px); height: auto; border-radius: 18px; touch-action: none; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.hoopsTop { width: min(100%, 420px); display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; }
.hoopsTop b { color: var(--accent); font-size: 20px; }
#hoopsTime.low { color: var(--danger); animation: pulse .8s infinite; }

/* ---------- tanks ---------- */
#tanksCanvas { width: 100%; max-width: 960px; height: auto; border-radius: 16px; touch-action: none; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); cursor: crosshair; }
.tankCtl { width: 100%; max-width: 960px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; align-items: center; }
.tankCtl .chipsRow, .tankCtl .btn { grid-column: 1 / -1; }
.tankCtl .chipsRow button small { display: block; font-size: 11px; color: var(--muted); }
@media (max-width: 560px) { .tankCtl { grid-template-columns: 1fr; } }

/* ---------- racing ---------- */
.arena.race { width: 100%; max-width: 1180px; }
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .arena.race { grid-template-columns: minmax(0, 860px) minmax(260px, 320px); }
}
.racing { grid-area: board; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rcView {
  position: relative; width: 100%; height: clamp(320px, calc(100dvh - 150px), 600px); border-radius: 16px; overflow: hidden;
  background: #8cc8f5; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
@media (max-width: 899px), (max-aspect-ratio: 5/4) { .rcView { height: clamp(320px, calc(100dvh - 190px), 680px); } }
.rcView.hurt::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 80px 20px rgba(255, 40, 60, .7); animation: fadeOut .6s forwards; }
@keyframes fadeOut { to { opacity: 0; } }
.rc3d, .rcFlat { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rcNo3d { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(11, 26, 36, .85); padding: 6px 12px; border-radius: 10px; font-size: 13px; z-index: 2; width: max-content; max-width: 90%; }
.rcHud { position: absolute; left: 10px; top: 10px; display: flex; gap: 8px; align-items: stretch; pointer-events: none; }
.rcHud > div { background: rgba(11, 26, 36, .78); border-radius: 12px; padding: 6px 10px; line-height: 1.15; }
.rcPos b { font-size: 30px; font-weight: 900; color: var(--accent); }
.rcPos small { color: var(--muted); font-weight: 700; }
.rcLap { font-size: 13px; font-weight: 700; }
.rcLap b { font-size: 18px; }
.rcLap small { color: var(--muted); font-variant-numeric: tabular-nums; }
.rcOrder { position: absolute; left: 10px; top: 68px; list-style: none; padding: 6px 8px; background: rgba(11, 26, 36, .6); border-radius: 10px; font-size: 12px; font-weight: 700; pointer-events: none; max-width: 46%; }
.rcOrder li { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcOrder li.me { color: var(--accent); }
.rcOrder i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.rcMap { position: absolute; right: 10px; top: 10px; width: 104px; height: 104px; background: rgba(11, 26, 36, .55); border-radius: 12px; pointer-events: none; }
.rcSpeed { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); background: rgba(11, 26, 36, .7); border-radius: 12px; padding: 4px 12px; pointer-events: none; font-variant-numeric: tabular-nums; }
.rcSpeed b { font-size: 22px; font-weight: 900; }
.rcSpeed small { color: var(--muted); margin-left: 4px; font-weight: 700; }
.rcCount { position: absolute; inset: 0; display: grid; place-items: center; font-size: 120px; font-weight: 900; color: #fff; text-shadow: 0 6px 30px rgba(0, 0, 0, .6); pointer-events: none; }
.rcCount.go { color: var(--accent); }
.rcCount.pop { animation: rcPop .9s var(--ease); }
@keyframes rcPop { 0% { transform: scale(1.8); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 100% { transform: scale(.9); opacity: .9; } }
.rcMsg { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); background: rgba(11, 26, 36, .85); border: 1px solid var(--line); padding: 8px 14px; border-radius: 14px; font-weight: 800; text-align: center; pointer-events: none; max-width: 88%; }
.rcMsg.pop { animation: pop 2.2s forwards; }
.rcItem {
  position: absolute; right: 12px; bottom: 12px; width: 76px; height: 76px; border-radius: 50%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: rgba(11, 26, 36, .7); border: 2px dashed rgba(255, 255, 255, .35); touch-action: none;
}
.rcItem span { font-size: 30px; line-height: 1; }
.rcItem span.empty { font-size: 24px; color: rgba(255, 255, 255, .4); font-weight: 900; }
.rcItem small { font-size: 10px; font-weight: 800; color: var(--muted); }
.rcItem.full { border: 2px solid var(--accent); background: rgba(200, 255, 61, .2); animation: rcGlow 1s ease-in-out infinite; cursor: pointer; }
.rcItem.full small { color: #fff; }
@keyframes rcGlow { 50% { box-shadow: 0 0 0 6px rgba(200, 255, 61, .25); } }
.rcPads { position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; }
.rcSteer { position: absolute; left: 10px; bottom: 12px; display: flex; gap: 10px; }
.rcPads button {
  pointer-events: auto; width: 72px; height: 72px; border-radius: 18px; background: rgba(11, 26, 36, .6); border: 2px solid rgba(255, 255, 255, .3);
  font-size: 28px; font-weight: 900; touch-action: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.rcPads button.on { background: rgba(200, 255, 61, .45); border-color: var(--accent); }
.rcBrake { position: absolute; right: 12px; bottom: 100px; width: 64px !important; height: 64px !important; font-size: 22px !important; }
.rcBrake small { font-size: 10px; font-weight: 800; }
.rcView.touch .rcSpeed { bottom: auto; top: 10px; left: auto; right: 124px; transform: none; }
@media (max-width: 560px) { .rcView.touch .rcSpeed { right: 104px; } }
.rcGarage { position: absolute; inset: 0; background: rgba(11, 26, 36, .93); overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; z-index: 3; }
.rcGHead { display: flex; justify-content: space-between; align-items: center; }
.rcTimer { font-weight: 900; font-size: 20px; color: var(--accent); font-variant-numeric: tabular-nums; }
.rcCars { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rcCar { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 8px; text-align: left; display: flex; flex-direction: column; gap: 2px; }
.rcCar svg { align-self: center; max-width: 100%; height: auto; }
.rcCar.on { border-color: var(--accent); background: var(--surface-2); }
.rcCar b { font-size: 14px; }
.rcCar > small { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.rcCar:disabled:not(.on) { opacity: .45; }
.rcBar { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.rcBar i { height: 5px; border-radius: 3px; background: var(--bg); overflow: hidden; }
.rcBar b { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.rcGFoot { display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center; position: sticky; bottom: -12px; background: rgba(11, 26, 36, .96); padding: 8px 0; }
.rcGFoot .btn { min-width: 220px; }
@media (max-width: 560px) {
  .rcCars { grid-template-columns: 1fr 1fr; }
  .rcMap { width: 84px; height: 84px; }
  .rcPos b { font-size: 24px; }
  .rcCount { font-size: 90px; }
}
