:root {
  --ink: #111111; --ink-2: #1b1d1b; --ink-3: #2a2d2a;
  --yellow: #FFD400; --yellow-dark: #C9A600;
  --text: #f5f5f0; --muted: #a7a79c;
  --good: #7BE08A; --bad: #FF8A7A;
  --r0: #9BA59A; --r1: #53B94A; --r2: #3D8FE0; --r3: #A462F0; --r4: #F5B400;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { background: var(--ink); color: var(--text); font-family: 'Baloo 2', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif; font-size: 16px; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.good { color: var(--good); } .bad { color: var(--bad); }
.small { font-size: 14px; margin: 14px 0 6px; }
.center { text-align: center; }
#app { max-width: 540px; margin: 0 auto; height: 100dvh; display: flex; flex-direction: column; position: relative; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); gap: 8px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; line-height: 1; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.brand em { color: var(--yellow); font-style: normal; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--ink-3); border-radius: 999px; padding: 3px 12px 1px 6px; font-weight: 800; font-size: 16px; }
.coin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFF2A0, var(--yellow) 55%, var(--yellow-dark)); display: inline-block; flex: none; vertical-align: -2px; }

.screen { display: none; flex: 1; overflow-y: auto; padding: 0 14px 18px; }
.screen.active { display: block; }
#pond.screen { padding: 0; position: relative; }
#pond.screen.active { display: flex; flex-direction: column; }
.screen-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 0 4px; flex-wrap: wrap; }
.screen-head h2 { margin: 0; font-size: 26px; font-weight: 800; }
.kind { color: var(--muted); font-weight: 700; line-height: 1.3; }

/* ---------- pond scenes ---------- */
.scene { flex: 1; position: relative; overflow: hidden; }
.bg-pond { background: radial-gradient(ellipse 40% 18% at 20% 12%, rgba(255,255,255,.08), transparent 70%), radial-gradient(ellipse 50% 20% at 80% 60%, rgba(255,255,255,.06), transparent 70%), linear-gradient(180deg, #2A9384, #1F6F66); }
.bg-jungle { background: radial-gradient(circle at 15% 20%, #2E6B2A 0 12%, transparent 13%), radial-gradient(circle at 85% 70%, #2E6B2A 0 14%, transparent 15%), radial-gradient(circle at 60% 30%, #3B2A1A 0 8%, transparent 9%), linear-gradient(180deg, #1E3A1A, #122A12); }
.bg-moon { background: radial-gradient(circle at 80% 10%, #FFF7D6 0 5%, rgba(255,247,214,.25) 6%, transparent 22%), linear-gradient(180deg, #0E1B3A, #0A2A3A); }
.bg-sunset { background: radial-gradient(circle at 50% 0%, #FFB14E 0 10%, transparent 40%), linear-gradient(180deg, #E0702A, #7A2A5A 55%, #2A1A3A); }
.bg-neon { background: repeating-linear-gradient(90deg, rgba(255,79,176,.25) 0 1px, transparent 1px 40px), repeating-linear-gradient(0deg, rgba(30,200,255,.25) 0 1px, transparent 1px 40px), #0B0B14; }
.bg-vault { background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 30%), linear-gradient(135deg, #F5C518, #9C7400 60%, #F2B90F); }
.pond-bar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px 0; }
.pond-bar .muted { color: rgba(255,255,255,.75); font-weight: 700; font-size: 14px; }
.pond-bar .ghost { background: rgba(0,0,0,.35); border-color: transparent; }
.pads { position: absolute; inset: 40px 0 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 4px; padding: 4px 8px 40px; z-index: 1; }
.pad { position: relative; aspect-ratio: 1 / 1.08; display: flex; align-items: center; justify-content: center; }
.pad::before { content: ''; position: absolute; inset: 20% 4% 4%; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #6DB43E, #4E9A2A 60%, #336B18); clip-path: polygon(50% 50%, 58% 0, 100% 0, 100% 100%, 0 100%, 0 0, 42% 0); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.pad:nth-child(3n+2)::before { transform: rotate(40deg); }
.pad:nth-child(3n)::before { transform: rotate(-35deg); }
.pad .frog { position: relative; width: 84%; margin-top: -8%; filter: drop-shadow(0 5px 5px rgba(0,0,0,.45)); animation: breathe 3.4s ease-in-out infinite; }
.pad:nth-child(2n) .frog { animation-delay: -1.4s; }
.pad .frog.baby { width: 50%; margin-top: 0; }
.pad.picked .frog { filter: drop-shadow(0 0 10px var(--yellow)); }
.pad.dim { opacity: .4; }
.pad:active .frog { transform: scale(.94); }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025, .975); } }
.frog-svg { width: 100%; height: auto; display: block; overflow: visible; }
.tag { position: absolute; bottom: 1%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.65); border-radius: 999px; padding: 1px 9px 0; font-size: 13px; font-weight: 700; white-space: nowrap; max-width: 96%; overflow: hidden; text-overflow: ellipsis; }
.worth { position: absolute; top: 4%; right: 2%; display: flex; align-items: center; gap: 3px; background: rgba(0,0,0,.6); border-radius: 999px; padding: 1px 7px 0 3px; font-size: 12px; font-weight: 800; }
.worth .coin { width: 12px; height: 12px; }
.grow-ring { position: absolute; top: 12%; right: 10%; width: 30px; height: 30px; }
.grow-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pad.add::before { opacity: .35; }
.pad.add span { position: relative; font-weight: 800; font-size: 14px; color: #fff; text-align: center; line-height: 1.15; }
.pad.add b { display: block; font-size: 30px; line-height: 1; }
.pad.add small { opacity: .8; font-size: 12px; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; font-weight: 700; }
.banner .ghost { color: var(--ink); border-color: rgba(0,0,0,.35); }

/* ---------- nav ---------- */
.bottom { display: grid; grid-template-columns: 1fr 1fr 1.25fr 1fr 1fr; gap: 4px; padding: 8px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--ink-3); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 6px 2px 2px; border-radius: 12px; line-height: 1.1; }
.tab.active { color: var(--text); }
.tab.race-tab { background: var(--yellow); color: var(--ink); font-size: 14px; font-weight: 800; }
.tab i { width: 24px; height: 24px; display: block; background: currentColor; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; }
.i-pond { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 12 L15 3 A9 9 0 1 1 9 3 Z'/%3E%3C/svg%3E"); }
.i-flag { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 21V4M5 4h13l-3 4 3 4H5'/%3E%3C/svg%3E"); }
.i-book { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h13v16H6a2 2 0 0 0-2 2z M4 19V5'/%3E%3C/svg%3E"); }
.i-wrench { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.2L3 17.8V21h3.2l6.3-6.3a4 4 0 0 0 5.2-5.4l-2.6 2.6-2.5-.6-.6-2.5z'/%3E%3C/svg%3E"); }
.i-dice { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='3' width='18' height='18' rx='4'/%3E%3Ccircle cx='8' cy='8' r='1.3' fill='%23000'/%3E%3Ccircle cx='16' cy='16' r='1.3' fill='%23000'/%3E%3Ccircle cx='12' cy='12' r='1.3' fill='%23000'/%3E%3C/svg%3E"); }

/* ---------- buttons, fields ---------- */
.primary, .secondary, .ghost { border-radius: 12px; font-weight: 800; padding: 10px 16px 8px; }
.primary { background: var(--yellow); color: var(--ink); }
.primary:disabled { background: var(--ink-3); color: var(--muted); }
.secondary { background: var(--ink-3); color: var(--text); }
.ghost { border: 1.5px solid var(--ink-3); padding: 5px 12px 3px; font-size: 14px; }
.big { width: 100%; font-size: 20px; padding: 14px 16px 12px; margin-top: 12px; }
.primary:active, .secondary:active { transform: scale(.98); }
.field { display: block; margin-top: 12px; }
.field span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
input { width: 100%; font: inherit; font-size: 18px; font-weight: 700; background: var(--ink-2); color: var(--text); border: 1.5px solid var(--ink-3); border-radius: 12px; padding: 9px 12px 7px; }
input:focus { outline: none; border-color: var(--yellow); }
.status { color: var(--muted); text-align: center; margin: 12px 0 0; min-height: 22px; }
.err { color: var(--bad); font-size: 14px; margin-top: 6px; }
.empty { color: var(--muted); padding: 14px; text-align: center; background: var(--ink-2); border-radius: 12px; }
.rar { display: inline-block; border-radius: 999px; padding: 1px 10px 0; font-size: 13px; font-weight: 800; color: #111; }
.r0 { background: var(--r0); } .r1 { background: var(--r1); } .r2 { background: var(--r2); color: #fff; } .r3 { background: var(--r3); color: #fff; } .r4 { background: var(--r4); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--ink-3); border-radius: 999px; padding: 6px 14px 4px; font-weight: 800; font-size: 15px; border: 2px solid transparent; display: inline-flex; align-items: center; gap: 5px; }
.chip.on { border-color: var(--yellow); color: var(--yellow); }
.chip.locked { opacity: .55; }
.lock { width: 12px; height: 12px; display: inline-block; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v10H5V11a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V7a5 5 0 0 1 10 0v3h1a1 1 0 0 1 1 1v10H5V11a1 1 0 0 1 1-1zm2 0h6V7a3 3 0 0 0-6 0z'/%3E%3C/svg%3E") center/contain no-repeat; }
.frogchip { border-style: dashed; border-color: var(--ink-3); }
.frogchip.on { border-style: solid; }

/* ---------- sheet ---------- */
.sheet-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 20; }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 540px; max-height: 90dvh; overflow-y: auto; background: var(--ink-2); border-radius: 22px 22px 0 0; z-index: 21; padding: 18px 16px; padding-bottom: max(18px, env(safe-area-inset-bottom)); animation: up .22s ease-out; }
@keyframes up { from { transform: translate(-50%, 40px); opacity: 0; } }
.sheet h3 { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.1; }
.sheet-frog { width: 170px; margin: -6px auto 2px; filter: drop-shadow(0 8px 8px rgba(0,0,0,.5)); }
.sheet-frog.pair { display: flex; width: auto; justify-content: center; align-items: center; gap: 6px; }
.sheet-frog.pair > div { width: 120px; }
.sheet-frog.pair b { font-size: 30px; color: var(--yellow); }
.hatch { animation: hatch .7s ease-out; }
@keyframes hatch { 0% { transform: scale(.2) rotate(-20deg); opacity: 0; } 60% { transform: scale(1.12) rotate(6deg); } 100% { transform: none; } }
.worth-big { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; background: var(--ink-3); border-radius: 999px; padding: 3px 14px 1px 8px; font-weight: 800; color: var(--yellow); }
.newkind { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 800; border-radius: 999px; padding: 2px 12px 0; margin-top: 6px; }
.row { display: flex; gap: 8px; margin-top: 12px; }
.row > button { flex: 1; }
.stat { display: grid; grid-template-columns: 74px 1fr 44px; align-items: center; gap: 8px; margin-top: 7px; font-weight: 700; font-size: 15px; }
.stat > span:last-child { text-align: right; }
.bar { position: relative; height: 10px; background: var(--ink-3); border-radius: 99px; overflow: hidden; }
.bar i { position: absolute; left: 0; top: 0; height: 100%; background: var(--yellow); border-radius: 99px; }
.bar i.up { background: var(--good); border-radius: 0 99px 99px 0; }
.bar i.down { background: var(--bad); opacity: .8; border-radius: 0 99px 99px 0; }
.note { background: var(--ink-3); border-radius: 12px; padding: 8px 12px 6px; margin-top: 12px; font-size: 15px; line-height: 1.35; }
.parts-line { color: var(--muted); font-size: 13px; margin-top: 8px; text-align: center; }
.egg { width: 54px; height: 64px; margin: 0 auto; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: radial-gradient(circle at 35% 30%, #fff, #EDE6CE 45%, #C7B98E); position: relative; }
.egg::after { content: '?'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 26px; color: #7A6A3A; }
.big-egg { width: 80px; height: 96px; margin-bottom: 8px; }
.odds { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 12px; text-align: center; font-size: 14px; }
.odds .rar { font-size: 10.5px; padding: 1px 6px 0; }
.odds b { display: block; margin-top: 2px; }
.swatches { display: flex; gap: 8px; }
.sw { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--ink-3); }
.sw.on { border-color: var(--yellow); }
.donors { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.donor { display: flex; align-items: center; gap: 10px; background: var(--ink-3); border-radius: 14px; padding: 6px 10px; text-align: left; }
.donor .f { width: 58px; flex: none; }
.donor b { display: block; font-size: 17px; }
.donor .diff { font-size: 13px; font-weight: 800; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; top: 120px; transform: translateX(-50%); background: #fff; color: #111; font-weight: 800; border-radius: 999px; padding: 8px 18px 6px; z-index: 40; box-shadow: 0 6px 24px rgba(0,0,0,.35); max-width: 92%; text-align: center; animation: pop .25s ease-out; }
@keyframes pop { from { transform: translate(-50%, -12px); opacity: 0; } }

/* ---------- garage ---------- */
.grid-frogs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gcard { background: var(--ink-2); border-radius: 14px; padding: 8px 6px 6px; text-align: center; font-size: 13px; line-height: 1.2; }
.gcard .f { width: 76px; margin: 0 auto 2px; }
.gcard b { display: block; font-size: 15px; }
.gcard span { color: var(--muted); font-size: 12px; }
.garage-stage { margin: 4px -14px 0; padding: 14px 0 6px; background: radial-gradient(ellipse at 50% 90%, #3a3a30 0 30%, transparent 62%), repeating-linear-gradient(90deg, #1a1a17 0 60px, #1e1e1b 60px 61px); display: flex; justify-content: center; }
.gfrog { width: 190px; filter: drop-shadow(0 10px 8px rgba(0,0,0,.6)); }
.garage-stage + .center h3 { margin: 4px 0 0; font-size: 24px; }
.parts { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.part-row { display: flex; align-items: center; gap: 10px; background: var(--ink-2); border: 2px solid transparent; border-radius: 14px; padding: 8px 12px; text-align: left; }
.part-row.on { border-color: var(--yellow); }
.part-row div { flex: 1; line-height: 1.2; }
.part-row b { display: block; font-size: 17px; }
.part-row div span { color: var(--muted); font-size: 13px; }
.part-row .from { font-weight: 800; font-size: 14px; color: var(--yellow); text-align: right; max-width: 45%; }
.chev { width: 8px; height: 8px; border-right: 2.5px solid var(--muted); border-top: 2.5px solid var(--muted); transform: rotate(45deg); flex: none; }
.confirm-bar { position: sticky; bottom: 0; margin-top: 12px; background: #26240F; border: 2px solid var(--yellow); border-radius: 16px; padding: 10px 12px; line-height: 1.3; }

/* ---------- casino ---------- */
.seg { display: grid; grid-template-columns: 1fr 1.4fr; background: var(--ink-2); border-radius: 14px; padding: 4px; margin-top: 6px; }
.seg button { border-radius: 10px; padding: 8px 4px 6px; font-weight: 800; color: var(--muted); }
.seg button.on { background: var(--yellow); color: var(--ink); }
.machine { margin-top: 12px; background: linear-gradient(180deg, #3A1A5A, #1A0E2A); border: 3px solid var(--yellow); border-radius: 22px; padding: 14px 12px 10px; box-shadow: 0 0 0 4px #1A0E2A inset; }
.reels { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.reel { height: 192px; overflow: hidden; background: linear-gradient(180deg, #d8d4c8, #fffdf5 30%, #fffdf5 70%, #d8d4c8); border-radius: 12px; }
.strip { will-change: transform; }
.sym { height: 64px; display: flex; align-items: center; justify-content: center; }
.sym svg { width: 50px; height: 50px; }
.payline { position: absolute; left: -4px; right: -4px; top: 64px; height: 64px; border: 3px solid rgba(255,212,0,.85); border-radius: 12px; pointer-events: none; }
.boxmeter { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 10px; font-weight: 800; font-size: 14px; }
.boxmeter .bar i { background: #A677EE; }
.result { margin-top: 12px; border-radius: 16px; padding: 10px 14px 8px; text-align: center; background: var(--ink-2); line-height: 1.35; font-weight: 600; min-height: 74px; }
.result .big { font-size: 26px; font-weight: 800; line-height: 1.1; }
.result.win { background: #26240F; border: 2px solid var(--yellow); }
.result.win .big { color: var(--yellow); }
.result.lose .big { color: var(--bad); }
.result.idle { color: var(--muted); display: flex; align-items: center; justify-content: center; }
.result .extra { margin-top: 6px; color: #C9A8FF; font-weight: 800; }
.stake { margin-top: 4px; }
.onthe { display: flex; align-items: center; gap: 10px; margin-top: 8px; background: #2A1414; border: 2px solid var(--bad); border-radius: 14px; padding: 6px 10px; line-height: 1.2; }
.onthe .f { width: 46px; flex: none; }
.onthe b { display: block; }
.onthe span { color: var(--muted); font-size: 13px; }
.paytable { margin-top: 14px; background: var(--ink-2); border-radius: 14px; padding: 10px 12px; }
.paytable summary { font-weight: 800; cursor: pointer; }
.pt { display: grid; grid-template-columns: 34px 1fr auto 1fr auto; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 700; }
.pt .ico svg { width: 30px; height: 30px; }
.pt b { color: var(--yellow); }
.wheel-wrap { position: relative; width: min(300px, 86vw); margin: 10px auto 0; }
.wheel-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 12px rgba(0,0,0,.5)); }
.betboard { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.bb { background: var(--ink-2); border: 2px solid transparent; border-radius: 12px; padding: 8px 6px 6px; font-weight: 800; font-size: 17px; line-height: 1.1; }
.bb small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.bb.pink { background: #4A1830; } .bb.green { background: #183A18; }
.bb.on, .nb.on { border-color: var(--yellow); }
.numgrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; margin-top: 8px; }
.nb { border: 2px solid transparent; border-radius: 8px; padding: 5px 0 3px; font-weight: 800; font-size: 14px; color: #fff; }
.nb.pink { background: #B8407A; } .nb.green { background: #2E7A2A; } .nb.gold { background: #C9A200; color: #2A1E00; }

/* ---------- frogdex ---------- */
.tier-head { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 13px; }
.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 8px; }
.dex-cell { position: relative; background: var(--ink-2); border-radius: 14px; padding: 8px 6px 6px; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.15; }
.dex-cell .f { width: 72px; margin: 0 auto 2px; }
.dex-cell.no .nm { color: var(--muted); }
.dart { position: absolute; top: 6px; right: 6px; background: #3A0E0E; color: #FF8A7A; font-size: 10px; font-weight: 800; border-radius: 99px; padding: 0 6px; }

/* ---------- lobby ---------- */
.code-card { background: var(--ink-2); border-radius: 14px; padding: 12px; text-align: center; margin-top: 6px; }
.code { font-size: 54px; font-weight: 800; letter-spacing: .12em; color: var(--yellow); line-height: 1.1; }
.racer-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; }
.racer { flex: none; width: 104px; background: var(--ink-2); border: 2px solid transparent; border-radius: 14px; padding: 6px; text-align: center; font-size: 13px; font-weight: 700; scroll-snap-align: start; line-height: 1.15; }
.racer .f { width: 62px; margin: 0 auto; }
.racer.on { border-color: var(--yellow); }
.racer .st { color: var(--muted); font-size: 11.5px; }
.lobby-list { display: flex; flex-direction: column; gap: 6px; }
.lp { display: flex; align-items: center; gap: 10px; background: var(--ink-2); border-radius: 12px; padding: 6px 10px; }
.lp .f { width: 42px; flex: none; }
.lp div { flex: 1; line-height: 1.2; min-width: 0; }
.lp b { display: block; }
.lp .muted { font-size: 13px; }
.lp .host { font-size: 11px; color: var(--yellow); font-weight: 800; }

/* ---------- race ---------- */
#race.screen { padding: 0; }
#race.screen.active { display: flex; flex-direction: column; }
.race-top { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px; font-weight: 800; font-size: 20px; }
.move-dots { display: flex; gap: 4px; }
.move-dots { gap: 6px; }
.mv { display: flex; align-items: center; gap: 5px; background: var(--yellow); color: var(--ink); border-radius: 999px; padding: 2px 12px 0 4px; font-size: 15px; }
.mv b { background: var(--ink); color: var(--yellow); border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.mv.splash { background: #8FD8FF; }
.mv.splash b { color: #8FD8FF; }
.mv.out { background: var(--ink-3); color: var(--muted); }
.mv.out b { color: var(--muted); }
.track { flex: 1; position: relative; display: flex; margin: 0 8px; border-radius: 12px 12px 0 0; overflow: hidden; touch-action: manipulation; }
/* maps: scenery per race map */
.map-creek { background: linear-gradient(90deg, #3E8A23 0 8px, #B4553A 8px calc(100% - 8px), #3E8A23 calc(100% - 8px)); }
.map-logjam { background: radial-gradient(circle at 20% 30%, rgba(0,0,0,.12) 0 6%, transparent 7%), radial-gradient(circle at 70% 70%, rgba(0,0,0,.12) 0 5%, transparent 6%), linear-gradient(90deg, #24481A 0 8px, #5E4A2C 8px calc(100% - 8px), #24481A calc(100% - 8px)); }
.map-waterfall { background: repeating-linear-gradient(180deg, rgba(255,255,255,.08) 0 3px, transparent 3px 22px), linear-gradient(90deg, #4A5A62 0 8px, #6E808A 8px calc(100% - 8px), #4A5A62 calc(100% - 8px)); }
.map-lilyhop { background: radial-gradient(circle at 25% 20%, #5DA83A 0 9%, transparent 10%), radial-gradient(circle at 75% 55%, #5DA83A 0 9%, transparent 10%), radial-gradient(circle at 40% 85%, #5DA83A 0 8%, transparent 9%), linear-gradient(90deg, #2F6E14 0 8px, #4E9A2A 8px calc(100% - 8px), #2F6E14 calc(100% - 8px)); }
.map-mud { background: radial-gradient(ellipse at 30% 40%, rgba(0,0,0,.15) 0 8%, transparent 9%), linear-gradient(90deg, #4A4A1E 0 8px, #8A7A48 8px calc(100% - 8px), #4A4A1E calc(100% - 8px)); }
.map-dash { background: repeating-linear-gradient(180deg, rgba(255,255,255,.35) 0 4px, transparent 4px 70px), linear-gradient(90deg, #C9A200 0 8px, #E2C58A 8px calc(100% - 8px), #C9A200 calc(100% - 8px)); }
.mudz { position: absolute; left: 8px; right: 8px; z-index: 1; border-radius: 10px; background: radial-gradient(circle at 20% 40%, #3A2A14 0 6%, transparent 7%), radial-gradient(circle at 70% 60%, #3A2A14 0 5%, transparent 6%), #5A3F1E; box-shadow: inset 0 0 0 3px rgba(0,0,0,.25); }
.gap { position: absolute; left: 8px; right: 8px; z-index: 1; background: repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 6px, transparent 6px 24px), linear-gradient(180deg, #1F6FA0, #2A8AC0); box-shadow: inset 0 3px 6px rgba(0,0,0,.35); }
/* lane colors (casino prizes): your own lane on every map */
.lane.me.lc-clay { background: rgba(255, 212, 0, .18); }
.lane.me.lc-mud { background: rgba(255, 110, 30, .25); }
.lane.me.lc-ice { background: rgba(170, 225, 255, .3); }
.lane.me.lc-neon { background: rgba(255, 79, 176, .22); box-shadow: inset 0 0 0 2px #FF4FB0, inset 0 0 14px #1EC8FF; }
.lane.me.lc-gold { background: linear-gradient(180deg, rgba(255,212,0,.35), rgba(201,162,0,.2)); box-shadow: inset 0 0 0 2px #FFD400; }
.track::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 16px; background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0/16px 16px; z-index: 1; }
.lane { flex: 1; position: relative; border-right: 3px solid rgba(255,255,255,.7); z-index: 2; }
.lane:last-child { border-right: 0; }
.lane .who { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; background: rgba(0,0,0,.6); border-radius: 99px; padding: 0 6px; white-space: nowrap; max-width: 96%; overflow: hidden; text-overflow: ellipsis; z-index: 4; }
.lane.me .who { background: var(--yellow); color: var(--ink); }
.log { position: absolute; left: 8px; right: 8px; height: 14px; margin-bottom: -7px; border-radius: 7px; background: repeating-linear-gradient(90deg, #7A4A22 0 18px, #6A3E1A 18px 21px); box-shadow: 0 3px 0 #3A220E, inset 0 2px 0 rgba(255,255,255,.2); z-index: 1; }
.log.h12 { height: 18px; margin-bottom: -9px; }
.log.h13 { height: 22px; margin-bottom: -11px; box-shadow: 0 4px 0 #3A220E, inset 0 2px 0 rgba(255,255,255,.2); }
.wet { position: absolute; left: 8px; right: 8px; z-index: 1; background: radial-gradient(ellipse 14% 30% at 12% 40%, #8FA6B4 0 60%, transparent 62%), radial-gradient(ellipse 12% 34% at 38% 60%, #7C94A3 0 60%, transparent 62%), radial-gradient(ellipse 14% 28% at 64% 35%, #8FA6B4 0 60%, transparent 62%), radial-gradient(ellipse 12% 32% at 88% 62%, #7C94A3 0 60%, transparent 62%), rgba(60,140,200,.45); border-radius: 8px; }
.runner { position: absolute; left: 50%; bottom: 22px; width: min(46px, 92%); transform: translate(-50%, 0); transition: transform .26s cubic-bezier(.3, 1.4, .5, 1); z-index: 3; }
.runner .f { filter: drop-shadow(0 3px 3px rgba(0,0,0,.45)); }
.runner.hop .f { animation: hop .3s ease-out; }
@keyframes hop { 0% { transform: scale(1, 1); } 35% { transform: scale(.82, 1.3); } 100% { transform: scale(1, 1); } }
.runner.bonk .f { animation: bonk .45s ease-out; }
@keyframes bonk { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(6px) rotate(-8deg); } 60% { transform: translateY(-2px) rotate(6deg); } }
.runner.slip .f { animation: slip .4s ease-out; }
@keyframes slip { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-22deg); } 65% { transform: rotate(16deg); } }
.runner.tired .f { filter: saturate(.55) drop-shadow(0 3px 3px rgba(0,0,0,.45)); }
.runner .place { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); background: #fff; color: #111; font-weight: 800; border-radius: 99px; padding: 0 7px; font-size: 13px; }
.dfly { position: absolute; left: 50%; width: 30px; margin-left: -15px; margin-bottom: -15px; z-index: 2; animation: hover 1s ease-in-out infinite alternate; }
.dfly svg { width: 100%; height: auto; display: block; }
.dfly.gone { animation: caught .4s ease-out forwards; }
@keyframes hover { to { transform: translateY(-4px); } }
@keyframes caught { to { transform: translateY(-40px) scale(.2); opacity: 0; } }
.fx { position: absolute; left: 50%; pointer-events: none; z-index: 5; font-weight: 800; font-size: 13px; transform: translateX(-50%); white-space: nowrap; animation: rise 1s ease-out forwards; text-shadow: 0 1px 3px #000; }
@keyframes rise { to { transform: translate(-50%, -36px); opacity: 0; } }
.splash-ring { position: absolute; left: 50%; width: 60px; height: 60px; margin-left: -30px; border: 4px solid #BFE9FF; border-radius: 50%; pointer-events: none; z-index: 5; animation: ring .6s ease-out forwards; }
@keyframes ring { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.race-help { text-align: center; color: var(--muted); font-size: 14px; padding: 8px 10px; }
.race-help b { color: var(--text); }
.countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 110px; font-weight: 800; color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.35); z-index: 6; pointer-events: none; }

/* ---------- results ---------- */
.res-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.res { display: flex; align-items: center; gap: 10px; background: var(--ink-2); border-radius: 14px; padding: 8px 10px; border: 2px solid transparent; }
.res .pl { font-size: 26px; font-weight: 800; width: 30px; text-align: center; color: var(--muted); }
.res:first-child .pl { color: var(--yellow); }
.res .f { width: 50px; flex: none; }
.res .info { flex: 1; line-height: 1.2; min-width: 0; }
.res .info b { display: block; }
.res .why { color: var(--muted); font-size: 13px; }
.res .prize { font-weight: 800; color: var(--yellow); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.res.pickable { border-color: var(--yellow); cursor: pointer; }
.res.taken { border-color: var(--bad); }
.res.me { background: #26240F; }

/* lobby map card */
.map-card { margin-top: 10px; }
.map-now { border-radius: 14px; padding: 10px 12px; line-height: 1.25; background: var(--ink-2); border-left: 0; }
.map-now div > * { display: block; }
.map-now b { font-size: 20px; }
.map-now span:last-child { color: #e8e8e0; font-size: 14px; }
.map-now .muted { font-size: 12px; font-weight: 800; }
.map-now.map-creek, .map-now.map-logjam, .map-now.map-waterfall, .map-now.map-lilyhop, .map-now.map-mud, .map-now.map-dash { text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.map-now.map-random { background: repeating-linear-gradient(135deg, #2a2d2a 0 14px, #232523 14px 28px); }
.map-chips { margin-top: 8px; }
