:root {
  --bg-0: #050823;
  --bg-1: #0a1446;
  --bg-2: #13227a;
  --glow: #2f7bff;
  --glow-2: #38b6ff;
  --warm-1: #ffc93c;
  --warm-2: #ff8a1f;
  --warm-3: #ff4fa0;
  --warm-4: #9b5cff;
  --warm: linear-gradient(120deg, var(--warm-1), var(--warm-2) 40%, var(--warm-3) 75%, var(--warm-4));
  --ink: #f2f5ff;
  --muted: #9aa6d6;
  --line: rgba(130, 165, 255, 0.18);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-2: rgba(255, 255, 255, 0.09);
  --red: #f2384a;
  --green: #22b55e;
  --yellow: #ffc21a;
  --blue: #2f7bff;
  --ok: #2ee6a8;
  --radius: 22px;
  --nav-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg-0); }
body {
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(47, 123, 255, 0.35), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(155, 92, 255, 0.22), transparent 60%),
    radial-gradient(600px 500px at 50% 110%, rgba(255, 138, 31, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 70%);
  background-attachment: fixed;
  overscroll-behavior: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; color: inherit; }
h1, h2, h3, .display { font-family: 'Baloo Bhaijaan 2', 'Tajawal', system-ui, sans-serif; margin: 0; letter-spacing: 0; }
:focus-visible { outline: 3px solid var(--glow-2); outline-offset: 2px; border-radius: 12px; }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 24px); position: relative; }
.app.full { padding: 0; max-width: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 18px; font-weight: 800; font-size: 17px;
  background: var(--glass-2); border: 1px solid var(--line); transition: transform 0.12s ease, filter 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  background: var(--warm); color: #1a0f2e; border: 0;
  box-shadow: 0 10px 30px -8px rgba(255, 106, 60, 0.65), inset 0 2px 0 rgba(255, 255, 255, 0.45);
}
.btn.blue { background: linear-gradient(180deg, #4d8dff, #1f55e0); border: 0; box-shadow: 0 10px 28px -10px rgba(47, 123, 255, 0.9), inset 0 2px 0 rgba(255,255,255,.3); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; font-size: 15px; padding: 0 14px; border-radius: 14px; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--glass); border: 1px solid var(--line); }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 2px 12px; }
.section-title h2 { font-size: 21px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--glass-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.chip.dev { color: #cbd3f5; background: rgba(155, 92, 255, 0.16); border-color: rgba(155, 92, 255, 0.35); }
.chip.bot { background: rgba(56, 182, 255, 0.16); border-color: rgba(56, 182, 255, 0.4); color: #bfe6ff; }
.coin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #ffc93c 45%, #e08a00); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 16px 10px; margin: 0 -16px 8px; background: rgba(7, 11, 45, 0.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid rgba(130,165,255,.12); }
.topbar .who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.topbar .name { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvl { font-size: 12px; font-weight: 800; color: #1a0f2e; background: var(--warm); padding: 2px 8px; border-radius: 999px; }
.xpbar { height: 5px; width: 90px; background: rgba(255,255,255,.12); border-radius: 9px; overflow: hidden; margin-top: 4px; }
.xpbar i { display: block; height: 100%; background: var(--warm); }
.balance { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--line); font-weight: 800; }
.brandmark { display: flex; align-items: center; gap: 8px; }
.brandmark img { width: 34px; height: 34px; border-radius: 10px; }

/* ---------- avatar ---------- */
.avatar { position: relative; border-radius: 50%; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.18), 0 6px 18px -6px rgba(0,0,0,.6); }
.avatar svg { width: 62%; height: 62%; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 22px; min-height: 210px;
  background: radial-gradient(420px 260px at 15% 20%, rgba(255, 79, 160, 0.45), transparent 70%), radial-gradient(400px 300px at 100% 100%, rgba(47, 123, 255, 0.6), transparent 70%), linear-gradient(135deg, #1b1f7a, #0d1450);
  border: 1px solid rgba(160, 190, 255, 0.25);
  box-shadow: 0 30px 60px -30px rgba(47, 123, 255, 0.8);
}
.hero h1 { font-size: 34px; line-height: 1.1; }
.hero .art { position: absolute; inset-inline-end: -26px; top: -18px; width: 150px; height: 150px; pointer-events: none; opacity: .95; }
.hero .cta .btn.sm { background: rgba(10, 16, 70, 0.75); }
.hero .cta { margin-top: 18px; position: relative; z-index: 2; }

/* ---------- game tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { position: relative; border-radius: 22px; overflow: hidden; min-height: 168px; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; text-align: start; border: 1px solid rgba(255,255,255,.14); isolation: isolate; }
.tile .bg { position: absolute; inset: 0; z-index: -1; }
.tile h3 { font-size: 20px; }
.tile p { margin: 4px 0 0; font-size: 13px; color: rgba(255,255,255,.82); }
.tile .chip { position: absolute; top: 12px; inset-inline-start: 12px; }
.tile.locked { filter: saturate(0.55); }
.tile.locked .bg::after { content: ''; position: absolute; inset: 0; background: rgba(5, 8, 35, 0.35); }
.tile:not(.locked):active { transform: scale(0.98); }
.tile.wide { grid-column: 1 / -1; min-height: 190px; }

.cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { padding: 9px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-weight: 700; white-space: nowrap; }
.cats button.on { background: var(--warm); color: #1a0f2e; border: 0; }

/* ---------- daily ---------- */
.daily { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 12px; }
.daily div { text-align: center; padding: 8px 0; border-radius: 12px; background: rgba(0,0,0,.22); font-size: 12px; font-weight: 700; border: 1px solid transparent; }
.daily div.done { background: rgba(46, 230, 168, 0.14); color: var(--ok); }
.daily div.next { border-color: var(--warm-1); box-shadow: 0 0 16px -4px var(--warm-1); }

/* ---------- bottom nav ---------- */
.nav { position: fixed; z-index: 40; bottom: 0; left: 0; right: 0; padding: 8px 12px calc(8px + var(--safe-b)); background: rgba(6, 10, 40, 0.86); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.nav .in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; color: var(--muted); text-decoration: none; padding: 6px 0; }
.nav a.on { color: var(--ink); }
.nav a svg { width: 24px; height: 24px; }
.nav a.center { transform: translateY(-14px); color: #1a0f2e; }
.nav a.center span.ring { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: var(--warm); box-shadow: 0 10px 26px -6px rgba(255, 106, 60, 0.8), 0 0 0 5px rgba(6, 10, 40, 0.9); }
.nav a.center span.label { color: var(--ink); }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(3, 5, 22, 0.7); backdrop-filter: blur(6px); display: grid; place-items: end center; padding: 16px; animation: fade 0.2s ease; }
.sheet { width: 100%; max-width: 520px; border-radius: 28px; padding: 22px; background: linear-gradient(180deg, #16207a, #0b1248); border: 1px solid rgba(160,190,255,.25); animation: up 0.28s cubic-bezier(.2,.9,.3,1.2); margin-bottom: var(--safe-b); }
@media (min-width: 700px) { .overlay { place-items: center; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

.toast { position: fixed; z-index: 80; top: 16px; left: 50%; transform: translateX(-50%); background: #1d2a8c; border: 1px solid rgba(160,190,255,.35); padding: 12px 18px; border-radius: 16px; font-weight: 700; box-shadow: 0 16px 40px -14px #000; animation: up 0.25s ease; max-width: calc(100% - 32px); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 700; }
.input { min-height: 52px; border-radius: 16px; padding: 0 16px; background: rgba(0,0,0,.28); border: 1px solid var(--line); outline: none; font-size: 17px; }
.input:focus { border-color: var(--glow-2); }
.avatars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.avatars button { border-radius: 50%; padding: 4px; border: 2px solid transparent; }
.avatars button.on { border-color: var(--warm-1); box-shadow: 0 0 18px -4px var(--warm-1); }

/* ---------- search / lobby ---------- */
.radar { position: relative; width: 220px; height: 220px; margin: 20px auto; }
.radar i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(56, 182, 255, 0.5); animation: ping 2.4s ease-out infinite; }
.radar i:nth-child(2) { animation-delay: 0.8s; }
.radar i:nth-child(3) { animation-delay: 1.6s; }
.radar .me { position: absolute; inset: 0; display: grid; place-items: center; }
@keyframes ping { from { transform: scale(0.35); opacity: 1; } to { transform: scale(1.1); opacity: 0; } }
.seats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.seat { border-radius: 20px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--glass); border: 1px dashed var(--line); min-height: 140px; justify-content: center; }
.seat.filled { border-style: solid; }
.seat.ready { border-color: var(--ok); box-shadow: 0 0 22px -8px var(--ok); }
.countdown { height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.countdown i { display: block; height: 100%; background: var(--warm); transition: width 0.25s linear; }
.codebox { font-family: ui-monospace, monospace; font-size: 34px; letter-spacing: 8px; font-weight: 800; text-align: center; padding: 14px; border-radius: 18px; background: rgba(0,0,0,.3); border: 1px dashed var(--warm-1); direction: ltr; }

/* ---------- game screen ---------- */
.game { position: fixed; inset: 0; display: flex; flex-direction: column; background: radial-gradient(700px 500px at 50% 45%, #1a2a9a, #070b33 70%); overflow: hidden; }
.game-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 6px; gap: 8px; }
.game-mid { flex: 1; display: grid; place-items: center; padding: 6px; min-height: 0; }
.board-wrap { position: relative; width: min(96vw, calc(100dvh - 270px), 620px); aspect-ratio: 1; }
.board-wrap svg.board { width: 100%; height: 100%; display: block; filter: drop-shadow(0 24px 40px rgba(0,0,0,.55)); }
.token { transition: transform 0.32s cubic-bezier(.3,1.4,.5,1); }
.token.can { cursor: pointer; }
.token.can .halo { animation: halo 0.9s ease-in-out infinite alternate; }
@keyframes halo { from { opacity: .25; transform: scale(.9); } to { opacity: .9; transform: scale(1.15); } }
.game-bottom { padding: 8px 12px calc(14px + var(--safe-b)); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.pp { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 18px; background: rgba(0,0,0,.28); border: 2px solid transparent; min-width: 0; }
.pp.turn { border-color: var(--warm-1); box-shadow: 0 0 22px -6px var(--warm-1); }
.pp.off { opacity: 0.5; }
.pp .nm { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.pp .sub { font-size: 11px; color: var(--muted); }
.players-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px; }
.timer-ring { position: absolute; inset: -4px; }
.dice-btn { width: 86px; height: 86px; border-radius: 24px; display: grid; place-items: center; background: linear-gradient(160deg, #ffffff, #dfe6ff); box-shadow: 0 12px 28px -8px rgba(0,0,0,.6), inset 0 -6px 0 rgba(0, 20, 120, .15); color: #1a1f5c; position: relative; }
.dice-btn.active { animation: bob 0.9s ease-in-out infinite; box-shadow: 0 0 0 4px var(--warm-1), 0 0 34px -2px var(--warm-2); }
.dice-btn.rolling svg { animation: spin 0.55s cubic-bezier(.3,.7,.4,1); }
.dice-btn:disabled { opacity: 1; cursor: default; filter: saturate(.6) brightness(.85); }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes spin { 0% { transform: rotate(0) scale(.6); } 60% { transform: rotate(400deg) scale(1.1); } 100% { transform: rotate(360deg) scale(1); } }
.status-line { text-align: center; font-weight: 800; font-size: 16px; min-height: 22px; }
.chat-drawer { position: absolute; inset-inline: 0; bottom: 0; z-index: 30; max-height: 55%; display: flex; flex-direction: column; background: rgba(8, 12, 50, 0.96); border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 12px 12px calc(12px + var(--safe-b)); animation: up 0.2s ease; }
.chat-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.chat-list .m { background: var(--glass-2); padding: 8px 12px; border-radius: 14px; max-width: 85%; }
.chat-list .m.mine { align-self: flex-end; background: rgba(47, 123, 255, 0.35); }
.result-place { font-size: 64px; line-height: 1; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall 2.6s linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

.empty { text-align: center; padding: 22px; color: var(--muted); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats div { text-align: center; padding: 14px 6px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.stats b { display: block; font-size: 24px; font-family: 'Baloo Bhaijaan 2', system-ui; }
.splash { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 24px 0; }
.splash .logo { width: 132px; height: 132px; border-radius: 34px; margin: 0 auto; box-shadow: 0 30px 70px -20px rgba(47, 123, 255, 0.9); animation: float 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px) rotate(-2deg); } }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 90; text-align: center; padding: 6px; font-weight: 700; font-size: 13px; background: #8a2b3a; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- billiards ---------- */
.pool { position: relative; flex: 1; min-height: 0; display: flex; }
.pool-canvas { position: relative; flex: 1; min-width: 0; margin: 30px 50px calc(10px + var(--safe-b)); }
.pool-canvas canvas { display: block; }
.pool-hint { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); color: var(--muted); padding: 4px 8px; font-size: 13px; font-weight: 700; width: 96%; text-align: center; line-height: 1.3; pointer-events: none; }
.power { position: absolute; inset-inline-start: 8px; top: 8%; bottom: 14%; width: 36px; border-radius: 18px; background: rgba(0,0,0,.4); border: 1px solid var(--line); overflow: hidden; }
.power.off, .fine.off { opacity: .35; pointer-events: none; }
.power-fill { position: absolute; left: 0; right: 0; top: 0; background: linear-gradient(180deg, #2ee6a8, #ffc93c 55%, #ff4f4f); opacity: .85; }
.power-stick { position: absolute; left: 50%; top: 4%; width: 10px; height: 80%; margin-left: -5px; border-radius: 5px; background: linear-gradient(90deg, #f6e1b8, #c89150 60%, #6b3c12); box-shadow: 0 4px 10px rgba(0,0,0,.5); }
.power-label { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font-size: 11px; font-weight: 800; }
.fine { position: absolute; inset-inline-end: 8px; top: 90px; bottom: 14%; width: 34px; border-radius: 17px; border: 1px solid var(--line); background: repeating-linear-gradient(180deg, rgba(255,255,255,.18) 0 2px, rgba(0,0,0,.35) 2px 9px); }
.spin-btn { position: absolute; inset-inline-end: 6px; top: 34px; width: 40px; height: 40px; border-radius: 50%; padding: 0; }
.spin-btn:disabled { opacity: .35; }
.cueball { position: relative; display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e7e3d6 55%, #a9a497); box-shadow: 0 4px 12px rgba(0,0,0,.5); }
.cueball i { position: absolute; width: 22%; height: 22%; border-radius: 50%; background: #e0245e; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.cueball.big { width: 220px; height: 220px; touch-action: none; }
.cueball.big::before, .cueball.big::after { content: ''; position: absolute; background: rgba(0,0,0,.15); }
.cueball.big::before { left: 50%; top: 8%; bottom: 8%; width: 1px; }
.cueball.big::after { top: 50%; left: 8%; right: 8%; height: 1px; }
.minirack { display: flex; gap: 2px; margin-top: 3px; }
.minirack i { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset -1px -1px 2px rgba(0,0,0,.4); }
.minirack i.gone { opacity: .18; }

/* ---------- kids: kart ---------- */
.kart-menu { position: fixed; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: safe center; gap: 14px; padding: 24px; background: radial-gradient(600px 400px at 50% 0%, #59b8ff, transparent 70%), linear-gradient(180deg, #1c3fd1, #0a1446); text-align: center; }
.kart-title h1 { font-size: 42px; text-shadow: 0 6px 24px rgba(0,0,0,.4); }
.kart-title p { margin: 4px 0 0; color: #dfe8ff; }
.kart-cover { width: min(92vw, 520px, 62vh); max-height: 38vh; object-fit: cover; border-radius: 26px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); border: 3px solid rgba(255,255,255,.3); }
.kart-diff { display: flex; gap: 8px; }
.kart-diff button { padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.12); border: 2px solid transparent; font-weight: 800; font-size: 17px; }
.kart-diff button.on { border-color: var(--warm-1); background: rgba(255,201,60,.18); }
.kart-go { min-width: 240px; min-height: 62px; font-size: 22px; }
.kart-best { font-size: 14px; color: #dfe8ff; }
.kart-help { font-size: 13px; color: #b8c4f0; max-width: 420px; margin: 0; }
.kart-race { position: fixed; inset: 0; background: #000; user-select: none; -webkit-user-select: none; touch-action: none; }
.kart-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kart-err { position: absolute; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; background: #0a1446; padding: 24px; }
.kart-hud { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; align-items: flex-start; justify-content: space-between; pointer-events: none; direction: ltr; }
.kart-pos { font-family: 'Baloo Bhaijaan 2', system-ui; font-weight: 800; color: #fff; text-shadow: 0 3px 0 #1a1f5c, 0 6px 16px rgba(0,0,0,.4); }
.kart-pos b { font-size: 42px; line-height: 1; } .kart-pos span { font-size: 17px; }
.kart-lap { font-weight: 800; font-size: 14px; color: #fff; text-align: center; background: rgba(10,20,70,.45); padding: 4px 12px; border-radius: 12px; text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.kart-lap span { font-variant-numeric: tabular-nums; font-size: 14px; color: #dfe8ff; }
.kart-item { width: 48px; height: 48px; border-radius: 14px; border: 2px solid rgba(255,255,255,.6); background: rgba(10,20,70,.5); display: grid; place-items: center; font-size: 24px; pointer-events: auto; }
.kart-item.has { border-color: var(--warm-1); box-shadow: 0 0 22px var(--warm-1); }
.kart-pause { pointer-events: auto; position: absolute; top: 58px; right: 0; width: 36px; height: 36px; border-radius: 12px; font-size: 13px; background: rgba(10,20,70,.55); font-weight: 900; color: #fff; }
.kart-map { position: absolute; left: 10px; top: 70px; width: 84px; opacity: .9; pointer-events: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.kart-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Baloo Bhaijaan 2', system-ui; font-size: 150px; font-weight: 800; color: #fff; text-shadow: 0 8px 0 #ff4fa0, 0 16px 40px rgba(0,0,0,.5); pointer-events: none; animation: pop 1s ease infinite; }
@keyframes pop { 0% { transform: scale(1.4); opacity: 0; } 20% { transform: scale(1); opacity: 1; } 100% { opacity: .9; } }
.kart-banner { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font-family: 'Baloo Bhaijaan 2', system-ui; font-size: 44px; font-weight: 800; color: #fff; text-shadow: 0 5px 0 #2f4bff, 0 10px 30px rgba(0,0,0,.5); pointer-events: none; animation: up .3s ease; }
.kart-speed { position: absolute; bottom: calc(14px + var(--safe-b)); left: 50%; transform: translateX(-50%); font-weight: 900; font-size: 20px; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); pointer-events: none; direction: ltr; display: flex; align-items: center; gap: 8px; }
.kart-speed small { font-size: 13px; }
.kart-speed i { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 12px #fff; }
.kart-speed i.b { background: #38b6ff; box-shadow: 0 0 16px #38b6ff; } .kart-speed i.o { background: #ff8a1f; box-shadow: 0 0 18px #ff8a1f; }
.kart-controls { position: absolute; left: 0; right: 0; bottom: calc(12px + var(--safe-b)); display: flex; justify-content: space-between; align-items: flex-end; padding: 0 14px; direction: ltr; pointer-events: none; }
.kart-controls button { pointer-events: auto; border-radius: 18px; background: rgba(10,20,70,.35); border: 1.5px solid rgba(255,255,255,.45); color: #fff; font-weight: 900; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; }
.kart-controls button:active { background: rgba(255,201,60,.45); }
.kart-steer { display: flex; gap: 10px; }
.kart-steer button { width: 60px; height: 60px; font-size: 24px; border-radius: 18px !important; }
.kart-actions { display: grid; grid-template-columns: auto auto; gap: 8px; align-items: end; }
.kart-actions .drift { width: 72px; height: 60px; font-size: 14px; grid-row: span 2; align-self: end; background: rgba(255,79,160,.4); border-radius: 18px !important; }
.kart-actions .brake { width: 54px; height: 32px; font-size: 12px; border-radius: 12px !important; }
.kart-actions .use { width: 54px; height: 44px; font-size: 18px; border-radius: 14px !important; }
.kart-actions .use.has { border-color: var(--warm-1); box-shadow: 0 0 18px var(--warm-1); }
@media (max-height: 500px) { .kart-title h1 { font-size: 30px; } .kart-menu { gap: 8px; padding: 12px; } .kart-go { min-height: 50px; } }
