:root {
  --void: #05070A; --steel: #0e131a; --steel-2: #141b25; --white: #F5F7FA; --silver: #BFC7D5; --muted: #8592a8;
  --cyan: #6FE7FF; --blue: #3FA9FF; --teal: #2EE6A8; --orange: #F7931A; --red: #ff5d73;
  --line: rgba(111, 231, 255, 0.13); --line-2: rgba(111, 231, 255, 0.26);
  --c1: #8e99ad; --c2: #3fcf8e; --c3: #3f9bff; --c4: #a466ff; --c5: #ffb347;
  --disp: Orbitron, "Segoe UI", system-ui, sans-serif; --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--void); color: var(--silver); font: 15px/1.5 var(--body); -webkit-tap-highlight-color: transparent;
  background-image: radial-gradient(1200px 520px at 50% -180px, rgba(63,169,255,.16), transparent 70%), radial-gradient(700px 400px at 100% 30%, rgba(46,230,168,.05), transparent 70%);
  background-repeat: no-repeat; min-height: 100vh; }
a { color: var(--cyan); }
h1, h2 { color: var(--white); margin: 0; }
h2 { font: 700 14px/1.2 var(--disp); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.mt { margin-top: 22px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.glass { background: linear-gradient(180deg, rgba(20,27,37,.78), rgba(14,19,26,.72)); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0,0,0,.35); }
button { font: inherit; color: inherit; cursor: pointer; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border: 0; border-radius: 99px; font: 800 15px var(--disp); letter-spacing: .06em; text-transform: uppercase; color: var(--void); background: linear-gradient(90deg, var(--cyan), var(--teal)); box-shadow: 0 6px 24px rgba(46,230,168,.25); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-primary svg { width: 20px; height: 20px; }
.btn-ghost { min-height: 46px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(111,231,255,.06); color: var(--white); font-weight: 600; }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-ghost.sm, .sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn-danger { border-color: rgba(255,93,115,.5); color: #ffb3bf; }
.lg-badge { width: 52px; height: 52px; }
.lgb svg { width: 100%; height: 100%; display: block; }
.lg-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); margin: 6px 0 3px; overflow: hidden; }
.lg-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--teal)); transition: width .5s; }
.field { display: grid; gap: 4px; max-width: 320px; margin-bottom: 14px; }
.field span { font-size: 12px; color: var(--muted); }
.name-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.name-row b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 20px var(--disp); color: var(--white); }
.name-row .btn-ghost { flex: none; }
input { font: inherit; color: var(--white); background: rgba(5,7,10,.6); border: 1px solid var(--line-2); border-radius: 10px; min-height: 44px; padding: 0 12px; }
input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.critters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 560px; }
.critters button { border: 1px solid var(--line); border-radius: 14px; background: rgba(5,7,10,.4); padding: 6px 4px 8px; display: grid; justify-items: center; gap: 2px; font-size: 12px; color: var(--silver); }
.critters button img { width: 100%; max-width: 70px; aspect-ratio: 1; }
.critters button.on { border-color: var(--white); box-shadow: 0 0 0 2px rgba(111,231,255,.5), 0 0 18px rgba(111,231,255,.3); color: var(--white); }
.stats { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; }
.stats b { color: var(--white); font: 700 16px var(--disp); display: block; }
.loadout { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.slot, .it { position: relative; border: 1px solid var(--line); border-radius: 12px; background: rgba(5,7,10,.4); padding: 6px; text-align: center; font-size: 11px; line-height: 1.25; color: var(--silver); }
.slot img, .it img { width: 100%; max-width: 64px; aspect-ratio: 1; display: block; margin: 0 auto 4px; }
.slot small { display: block; color: var(--muted); font: 700 9px var(--disp); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.slot.on, .it.on { border-color: var(--white); box-shadow: 0 0 0 2px rgba(111,231,255,.45); }
.it .cnt { position: absolute; right: 6px; top: 6px; background: var(--void); border: 1px solid var(--line-2); border-radius: 99px; padding: 0 6px; font-weight: 700; color: var(--white); }
.gear-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.sparks { font: 700 13px var(--disp); color: var(--c5); }
.inv, .shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.inv .empty { grid-column: 1 / -1; }
.r1 { --rc: var(--c1); } .r2 { --rc: var(--c2); } .r3 { --rc: var(--c3); } .r4 { --rc: var(--c4); } .r5 { --rc: var(--c5); }
.it b, .slot b { display: block; color: var(--white); font-size: 12px; }
.rar { color: var(--rc); font: 700 9px var(--disp); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.it:disabled { opacity: .45; cursor: default; }
.sheet { position: fixed; inset: 0; z-index: 2147483100; display: grid; place-items: center; background: rgba(5,7,10,.6); padding: 16px; }
.sheet > div { width: min(420px, 100%); padding: 18px; max-height: 90dvh; overflow: auto; }
.sheet .row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.sheet .big { display: flex; gap: 14px; align-items: center; }
.sheet .big img { width: 84px; height: 84px; }
.fr-panel { margin-bottom: 14px; }
.fr-panel .bzf-card { padding: 12px 12px 14px; border-radius: 16px; }
.fr-login { display: grid; gap: 10px; justify-items: start; padding: 14px; border: 1px solid var(--line-2); border-radius: 14px; }
.fr-login p { margin: 0; }
.party { padding: 14px; border: 1px solid var(--line-2); border-radius: 14px; }
.party .code { font: 900 26px var(--disp); color: var(--white); letter-spacing: .14em; }
.party ul { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.party li { display: flex; gap: 8px; align-items: center; } .party li img { width: 34px; height: 34px; }
.board { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.board li { display: grid; grid-template-columns: 38px 34px 1fr auto auto; gap: 10px; align-items: center; padding: 5px 10px; border-radius: 10px; border: 1px solid transparent; }
.board li:nth-child(odd) { background: rgba(255,255,255,.025); }
.board li.me { border-color: var(--cyan); background: rgba(111,231,255,.08); }
.board .rk { font: 800 14px var(--disp); color: var(--white); text-align: right; }
.board img { width: 34px; height: 34px; }
.board .nm { color: var(--white); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .pts { font: 700 14px var(--disp); color: var(--white); }
.lgb { width: 26px; height: 26px; display: inline-block; vertical-align: middle; }
.board-me { font-size: 13px; }
.guide { padding-left: 18px; display: grid; gap: 6px; }
.codex { display: grid; gap: 14px; }
.codex h3 { font: 700 12px var(--disp); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.codex .list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.codex .ci { display: flex; gap: 10px; align-items: center; font-size: 13px; }
.codex .ci img { width: 42px; height: 42px; flex: none; }
.codex .ci b { color: var(--white); }
.lv-row { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; } .lv-row span { color: var(--rc); border: 1px solid var(--rc); border-radius: 99px; padding: 1px 8px; }
/* race stage: full screen while racing */
.stage { position: fixed; inset: 0; z-index: 2147483000; background: #05070a; touch-action: none; user-select: none; -webkit-user-select: none; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-close { position: absolute; right: calc(10px + env(safe-area-inset-right)); top: calc(10px + env(safe-area-inset-top)); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(5,7,10,.6); color: var(--white); font-size: 18px; z-index: 3; }
.st-item { position: absolute; left: calc(16px + env(safe-area-inset-left)); bottom: calc(56px + env(safe-area-inset-bottom)); width: 86px; height: 86px; border-radius: 50%; border: 2px solid var(--line-2); background: rgba(5,7,10,.55); display: grid; place-items: center; z-index: 3; }
.st-item img { width: 62px; height: 62px; opacity: .25; }
.st-item.has { border-color: var(--rc, var(--cyan)); box-shadow: 0 0 22px var(--rc, var(--cyan)); }
.st-item.has img { opacity: 1; animation: pop .25s; }
@keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
.st-hint { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 12px; color: var(--muted); background: rgba(5,7,10,.5); padding: 4px 10px; border-radius: 99px; white-space: nowrap; pointer-events: none; }
.st-lobby, .st-result { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; padding: 18px; z-index: 4; touch-action: pan-y; }
.st-result h2 { font-size: 18px; text-align: center; }
.places { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.places li { display: grid; grid-template-columns: 30px 36px 1fr auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 10px; }
.places li.me { background: rgba(111,231,255,.1); outline: 1px solid var(--line-2); }
.places img { width: 36px; height: 36px; }
.places .pl { font: 800 15px var(--disp); color: var(--white); }
.places .d { font: 700 13px var(--disp); } .up { color: var(--teal); } .down { color: var(--red); }
.promo { text-align: center; padding: 10px; border-radius: 12px; margin: 8px 0; font: 800 15px var(--disp); }
.promo.up { background: rgba(46,230,168,.12); } .promo.down { background: rgba(255,93,115,.12); }
.drop { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 10px 0; }
.drop img { width: 64px; height: 64px; }
.res-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.st-hint .rot { display: none; }
@media (orientation: portrait) { .st-hint { white-space: normal; text-align: center; width: max-content; max-width: 90vw; } .st-hint .rot { display: inline; } }
@media (max-width: 820px) {
  .loadout { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .critters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board li { grid-template-columns: 30px 30px 1fr auto; } .board .wins { display: none; }
  .st-item { width: 76px; height: 76px; } .st-item img { width: 54px; height: 54px; }
}

/* ---- game screen: the whole page is the game (no page scroll); every section is a glass window over it ---- */
html, body { height: 100%; }
body { overflow: hidden; overscroll-behavior: none; }
.shell { position: fixed; inset: 0; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.shell-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; filter: saturate(1.05); }
.shell::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(900px 420px at 50% 45%, rgba(5,7,10,.15), rgba(5,7,10,.62) 75%), linear-gradient(180deg, rgba(5,7,10,.55), transparent 22%, transparent 62%, rgba(5,7,10,.8)); }
.bar, .home { position: relative; z-index: 1; }
.bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; min-width: 0; }
.pill { white-space: nowrap; flex: none; }
.bar-hub, .pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 12px; border-radius: 14px;
  border: 1px solid var(--line-2); background: rgba(5,7,10,.6); color: var(--white); text-decoration: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.bar-hub { padding: 0 12px 0 8px; gap: 4px; color: var(--cyan); flex: none; font: 700 14px var(--disp); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.bar-hub svg { width: 20px; height: 20px; }
.bar-hub:hover, .bar-hub:focus-visible { border-color: var(--cyan); }
.pill b { font: 700 14px var(--disp); }
.pill.sq { padding: 0; }
.pill .lgb { width: 24px; height: 24px; }
.pill i[data-ic="spark"] { color: var(--c5); }
i[data-ic] { display: inline-grid; place-items: center; font-style: normal; }
i[data-ic] svg { width: 22px; height: 22px; display: block; }
.bar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; margin: 0 auto 0 4px; font: 900 clamp(18px, 3.4vw, 30px)/1 var(--disp); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(90deg, #fff, var(--cyan) 60%, var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(4,25,43,.9)) drop-shadow(0 0 14px rgba(111,231,255,.35)); }
.home { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; gap: 12px; padding: 4px 14px 14px; min-height: 0; }
.me-card { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px 16px 10px 10px; width: min(460px, 100%); color: var(--silver); }
.me-card img { width: 64px; height: 64px; flex: none; }
.me-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.me-txt > b { color: var(--white); font: 800 17px var(--disp); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-line { display: flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; overflow: hidden; }
.lg-line b { font: 800 13px var(--disp); }
.me-card .lgb { width: 22px; height: 22px; }
.me-card small { font-size: 12px; }
.me-card small b { color: var(--white); font-weight: 700; }
.go { display: grid; justify-items: center; gap: 10px; }
.play { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 76px; min-width: min(300px, 80vw); padding: 0 40px; border: 0; border-radius: 24px;
  font: 900 30px var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--void); background: linear-gradient(180deg, #9ff3ff, var(--cyan) 45%, var(--teal));
  box-shadow: 0 8px 0 #0f8a74, 0 18px 40px rgba(46,230,168,.35), inset 0 2px 0 rgba(255,255,255,.6); transition: transform .1s, box-shadow .1s; }
.play svg { width: 34px; height: 34px; }
.play:active { transform: translateY(5px); box-shadow: 0 3px 0 #0f8a74, 0 10px 24px rgba(46,230,168,.3), inset 0 2px 0 rgba(255,255,255,.6); }
.play:disabled { opacity: .6; }
.go .btn-ghost { display: inline-flex; align-items: center; gap: 8px; background: rgba(5,7,10,.6); backdrop-filter: blur(8px); }
.go .btn-ghost svg { width: 20px; height: 20px; }
.free-note { margin: 0; font-size: 12px; color: var(--silver); text-shadow: 0 1px 2px #000; }
.dock { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; width: min(980px, 100%); }
.tile { --tc: var(--cyan); display: grid; justify-items: center; align-content: center; gap: 2px; min-height: 92px; padding: 10px 6px; border-radius: 18px; color: var(--white);
  border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 22%, rgba(14,19,26,.82)), rgba(10,14,20,.82));
  box-shadow: 0 6px 0 -2px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: transform .1s, filter .2s; }
.tile:hover { filter: brightness(1.15); }
.tile:active { transform: translateY(2px) scale(.98); }
.tile i[data-ic] { width: 42px; height: 42px; border-radius: 13px; background: color-mix(in srgb, var(--tc) 22%, rgba(5,7,10,.5)); color: var(--tc); }
.tile i[data-ic] svg { width: 26px; height: 26px; }
.tile b { font: 800 13px var(--disp); letter-spacing: .06em; text-transform: uppercase; }
.tile small { font-size: 11px; color: var(--muted); line-height: 1.2; text-align: center; }
.t-runner { --tc: #6FE7FF; } .t-gear { --tc: #a466ff; } .t-shop { --tc: #ffb347; } .t-board { --tc: #ffd54a; } .t-friends { --tc: #2EE6A8; } .t-wallet { --tc: #F7931A; } .t-guide { --tc: #8fb4ff; }

/* windows */
.win { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); background: rgba(5,7,10,.55); animation: winIn .16s ease-out; }
@keyframes winIn { from { opacity: 0; } to { opacity: 1; } }
.win-box { display: grid; grid-template-rows: auto 1fr; width: min(560px, 100%); max-height: min(760px, 100%); overflow: hidden; border-color: var(--line-2); animation: boxIn .18s ease-out; }
.win-box.wide { width: min(900px, 100%); }
@keyframes boxIn { from { transform: translateY(12px) scale(.98); } to { transform: none; } }
.win-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--line); background: rgba(111,231,255,.05); }
.win-head i[data-ic] { width: 36px; height: 36px; border-radius: 11px; background: rgba(111,231,255,.12); color: var(--cyan); }
.win-head h2 { margin: 0 auto 0 0; font-size: 16px; }
.win-head .sparks, .win-head .muted { white-space: nowrap; }
.win-x { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(5,7,10,.5); color: var(--white); font-size: 18px; }
.win-body { padding: 14px; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
.win-body h3 { font: 700 12px var(--disp); letter-spacing: .1em; text-transform: uppercase; color: var(--white); margin: 16px 0 8px; }
.win-body h3:first-child { margin-top: 0; }
.win-body h3 .muted { text-transform: none; letter-spacing: 0; font: 500 12px var(--body); }
.wallet-state b { font: 800 18px var(--disp); color: var(--teal); }

@media (max-width: 760px) {
  .dock { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tile { min-height: 74px; padding: 8px 4px; border-radius: 16px; }
  .tile small { display: none; }
  .tile i[data-ic] { width: 36px; height: 36px; }
  .tile b { font-size: 11px; }
}
@media (max-width: 480px) { #pillLevel { display: none; } .bar-hub { padding: 0 8px 0 4px; font-size: 12px; } .bar { gap: 6px; padding: 8px; } .bar-title { font-size: 15px; letter-spacing: .02em; } .pill { padding: 0 8px; gap: 4px; } .pill b { font-size: 12px; } .me-card img { width: 52px; height: 52px; } .play { min-height: 68px; font-size: 26px; } }
@media (max-width: 400px) { .tile b { font-size: 10px; letter-spacing: .02em; } }
/* phones held sideways: low height, everything in one screen */
@media (max-height: 520px) and (orientation: landscape) {
  .bar { padding: 6px 10px; }
  .home { grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; gap: 8px 14px; padding: 0 12px 8px; align-items: center; }
  .me-card { grid-column: 1; grid-row: 1; padding: 6px 12px 6px 6px; } .me-card img { width: 44px; height: 44px; }
  .go { grid-column: 2; grid-row: 1 / span 2; }
  .play { min-height: 62px; font-size: 24px; min-width: 220px; padding: 0 26px; }
  .dock { grid-column: 1; grid-row: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-self: end; }
  .tile { min-height: 56px; padding: 4px; grid-template-columns: auto 1fr; justify-items: start; align-items: center; column-gap: 8px; }
  .tile i[data-ic] { width: 32px; height: 32px; } .tile small { display: none; }
  .win-box { max-height: 100%; }
}
.wl{list-style:none;padding:0;margin:8px 0}.wl li{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:8px 0}.wl .lgb{width:26px;height:26px;display:inline-block}

/* ---- juice (v7): home, goals, play button, item button, game over, guide cards ---- */
.home { grid-template-rows: auto auto 1fr auto; }
.bar-title { background-size: 200% 100%; animation: shimmer 6s linear infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
#sndBtn.off { color: var(--muted); }
.play { position: relative; overflow: hidden; animation: playPulse 2.4s ease-in-out infinite; }
.play::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); animation: sweep 3.2s ease-in-out infinite; pointer-events: none; }
@keyframes playPulse { 0%, 100% { box-shadow: 0 8px 0 #0f8a74, 0 18px 40px rgba(46,230,168,.35), inset 0 2px 0 rgba(255,255,255,.6); } 50% { box-shadow: 0 8px 0 #0f8a74, 0 18px 60px rgba(111,231,255,.6), 0 0 0 6px rgba(111,231,255,.12), inset 0 2px 0 rgba(255,255,255,.6); } }
@keyframes sweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.play-t { display: grid; justify-items: start; line-height: 1; gap: 4px; }
.play-t small, .play-again small { font: 800 12px var(--disp); letter-spacing: .06em; text-transform: none; opacity: .8; }
.play-t small:empty, .play-again small:empty { display: none; }
.play-again { flex-direction: column; gap: 2px; min-height: 52px; line-height: 1.1; }
.goals { width: min(460px, 100%); padding: 8px 12px; }
.goals header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.goals header b { font: 800 11px var(--disp); letter-spacing: .12em; text-transform: uppercase; color: var(--white); }
.goal-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.goal { display: flex; gap: 8px; align-items: center; min-width: 0; }
.goal .ring { position: relative; width: 34px; height: 34px; flex: none; }
.goal .ring svg { position: absolute; inset: 0; }
.goal .ring circle:last-child { transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.goal .ring i { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-size: 14px; }
.goal.done .ring i { color: var(--teal); font: 900 15px var(--disp); }
.goal.fresh .ring { animation: goalPop .7s cubic-bezier(.2,1.6,.4,1); }
@keyframes goalPop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.goal .gt { display: grid; min-width: 0; line-height: 1.15; }
.goal .gt b { color: var(--white); font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goal .gt small { color: var(--muted); font: 700 11px var(--disp); }
.goal.done .gt b { color: var(--teal); }
.me-card { transition: transform .15s; } .me-card:hover { transform: translateY(-2px); }
.me-card img { filter: drop-shadow(0 4px 10px rgba(111,231,255,.25)); }
/* item button: rarity ring + ready pulse */
.st-item { transition: transform .1s; }
.st-item:active { transform: scale(.92); }
.st-item.has { border-width: 3px; animation: itemReady 1s ease-in-out infinite; background: radial-gradient(circle, color-mix(in srgb, var(--rc, var(--cyan)) 30%, rgba(5,7,10,.7)), rgba(5,7,10,.7) 70%); }
@keyframes itemReady { 0%, 100% { box-shadow: 0 0 14px var(--rc, var(--cyan)); } 50% { box-shadow: 0 0 34px var(--rc, var(--cyan)), 0 0 0 6px color-mix(in srgb, var(--rc, var(--cyan)) 25%, transparent); } }
/* game over */
.st-result { animation: resIn .35s cubic-bezier(.2,1.3,.4,1); }
@keyframes resIn { from { transform: translate(-50%, -44%) scale(.9); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.st-result.p1 { border-color: rgba(255,213,74,.6); box-shadow: 0 0 60px rgba(255,213,74,.25), 0 10px 40px rgba(0,0,0,.4); }
.res-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 4px; }
.res-head h2 { font-size: 24px; margin: 0; }
.st-result.p1 .res-head h2 { background: linear-gradient(90deg, #fff6c8, #ffd54a, #ff9d3a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.medal { width: 64px; height: 64px; flex: none; animation: medalIn .6s cubic-bezier(.2,1.6,.4,1); filter: drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
@keyframes medalIn { from { transform: scale(.2) rotate(-40deg); } to { transform: none; } }
.places li { animation: rowIn .35s both ease-out; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.places .pl1 { color: #ffd54a; } .places .pl2 { color: #dfe6f2; } .places .pl3 { color: #e0995c; }
.res-pts { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.04); }
.res-pts .lgb { width: 34px; height: 34px; flex: none; }
.res-lv { flex: 1; min-width: 0; }
.res-lvtop { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.res-lvtop b { color: var(--white); font-family: var(--disp); }
.lg-bar.big { height: 10px; border-radius: 5px; }
.lg-bar.big i { transition: width 1.1s cubic-bezier(.2,.8,.2,1) .2s; box-shadow: 0 0 12px rgba(46,230,168,.6); }
.promo.big { font-size: 18px; animation: medalIn .6s cubic-bezier(.2,1.6,.4,1); }
.drop.reveal { perspective: 600px; }
.drop-card { display: flex; gap: 12px; align-items: center; padding: 8px 14px; border-radius: 14px; border: 2px solid var(--rc); background: radial-gradient(circle at 25% 50%, color-mix(in srgb, var(--rc) 28%, transparent), rgba(5,7,10,.6) 70%);
  box-shadow: 0 0 26px color-mix(in srgb, var(--rc) 45%, transparent); animation: flipIn .8s cubic-bezier(.2,1.2,.4,1) .35s both; }
@keyframes flipIn { from { transform: rotateY(90deg) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.res-goals { margin-top: 6px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.03); }
.res-goals .goal .gt b { font-size: 11px; }
/* guide picture cards */
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 8px; }
.gcard { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(5,7,10,.4); }
.gcard img { display: block; width: 100%; aspect-ratio: 240 / 130; }
.gcard figcaption { padding: 8px 10px 10px; display: grid; gap: 2px; font-size: 13px; line-height: 1.35; }
.gcard b { color: var(--white); font: 800 12px var(--disp); letter-spacing: .06em; text-transform: uppercase; }
@media (max-width: 520px) {
  .goals { padding: 7px 8px; } .goal { flex-direction: column; text-align: center; gap: 3px; } .goal .gt b { white-space: normal; font-size: 11px; }
  .guide-cards { grid-template-columns: 1fr 1fr; } .gcard figcaption { font-size: 12px; }
  .res-head h2 { font-size: 20px; } .medal { width: 52px; height: 52px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .home { grid-template-rows: auto auto 1fr; }
  .me-card { grid-row: 1; } .goals { grid-column: 1; grid-row: 2; padding: 4px 10px; } .goals header { display: none; }
  .goal .ring { width: 28px; height: 28px; } .goal .ring svg { width: 28px; height: 28px; }
  .dock { grid-row: 3; } .go { grid-row: 1 / span 3; }
  .st-result { padding: 12px; } .res-head .medal { width: 44px; height: 44px; } .places { margin: 4px 0; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { .play, .play::after, .bar-title, .st-item.has { animation: none; } }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.42) 100%); }

/* ---- design pass 2 (v8): glass dock with icons, icon chips, window + stage transitions, wide game over ---- */
.chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.chip-grp:not([hidden]) { display: contents; }
.chip { display: grid; justify-items: center; gap: 3px; min-width: 74px; min-height: 58px; padding: 8px 10px 6px; border-radius: 16px; border: 1px solid var(--line-2); color: var(--white);
  background: linear-gradient(180deg, rgba(111,231,255,.12), rgba(5,7,10,.6)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 18px rgba(0,0,0,.3); transition: transform .18s cubic-bezier(.2,1.4,.4,1), border-color .15s, box-shadow .2s; }
.chip i[data-ic] { color: var(--cyan); } .chip i[data-ic] svg { width: 24px; height: 24px; }
.chip span { font: 700 10px/1 var(--disp); letter-spacing: .08em; text-transform: uppercase; color: var(--silver); }
.chip:hover { transform: translateY(-3px); border-color: var(--cyan); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 22px rgba(0,0,0,.35), 0 0 18px rgba(111,231,255,.25); }
.chip:active { transform: translateY(1px) scale(.96); }
#practiceBtn i[data-ic] { color: var(--teal); } #topUpBtn i[data-ic] { color: var(--c5); }
.go { gap: 12px; }
/* dock: glass tiles, big glowing icons, one word each */
.dock { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dock .tile { flex: 1 1 0; min-width: 0; }
.tile { position: relative; overflow: hidden; min-height: 86px; gap: 7px; transition: transform .2s cubic-bezier(.2,1.4,.4,1), filter .2s, box-shadow .2s; animation: tileIn .5s cubic-bezier(.2,1.2,.4,1) backwards; }
.tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, rgba(255,255,255,.16), transparent 42%), radial-gradient(80% 60% at 50% 0%, color-mix(in srgb, var(--tc) 22%, transparent), transparent 70%); }
.tile::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -70%; transform: skewX(-18deg); pointer-events: none; background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent); transition: left .55s ease; }
.tile:hover { transform: translateY(-4px); filter: brightness(1.12); box-shadow: 0 10px 0 -4px rgba(0,0,0,.45), 0 0 26px color-mix(in srgb, var(--tc) 35%, transparent), inset 0 1px 0 rgba(255,255,255,.18); }
.tile:hover::after { left: 130%; }
.tile:hover i[data-ic] { animation: icBounce .55s cubic-bezier(.2,1.4,.4,1); }
.tile i[data-ic] { position: relative; width: 48px; height: 48px; border-radius: 15px; box-shadow: 0 0 20px color-mix(in srgb, var(--tc) 30%, transparent), inset 0 1px 0 rgba(255,255,255,.22); }
.tile i[data-ic] svg { width: 30px; height: 30px; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tc) 60%, transparent)); }
.tile b { position: relative; font-size: 11px; letter-spacing: .1em; color: color-mix(in srgb, var(--tc) 30%, #fff); }
.tile small { display: none; }
.dock .tile:nth-child(2) { animation-delay: .04s; } .dock .tile:nth-child(3) { animation-delay: .08s; } .dock .tile:nth-child(4) { animation-delay: .12s; }
.dock .tile:nth-child(5) { animation-delay: .16s; } .dock .tile:nth-child(6) { animation-delay: .2s; } .dock .tile:nth-child(7) { animation-delay: .24s; }
@keyframes tileIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes icBounce { 0% { transform: none; } 35% { transform: translateY(-5px) scale(1.1) rotate(-4deg); } 70% { transform: translateY(1px) scale(.96); } 100% { transform: none; } }
.me-card, .goals { animation: cardIn .45s cubic-bezier(.2,1.1,.4,1) backwards; } .goals { animation-delay: .06s; }
.go { animation: cardIn .5s cubic-bezier(.2,1.2,.4,1) .1s backwards; }
@keyframes cardIn { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
.me-card, .goals { box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 40px rgba(0,0,0,.35); }
/* windows: open with scale + fade, close the same way back */
.win { animation: winIn .2s ease-out; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.win-box { animation: boxIn2 .32s cubic-bezier(.2,1.25,.4,1); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 24px 70px rgba(0,0,0,.55), 0 0 0 1px rgba(111,231,255,.05); }
@keyframes boxIn2 { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.win.closing { animation: winOut .17s ease-in forwards; pointer-events: none; }
.win.closing .win-box { animation: boxOut .17s ease-in forwards; }
@keyframes winOut { to { opacity: 0; } }
@keyframes boxOut { to { opacity: 0; transform: translateY(10px) scale(.96); } }
.win-head i[data-ic] { box-shadow: 0 0 16px rgba(111,231,255,.25), inset 0 1px 0 rgba(255,255,255,.2); }
/* race stage: fade in; dim behind the game over */
.stage:not([hidden]) { animation: winIn .25s ease-out; }
.stage::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .5s; background: radial-gradient(ellipse at 50% 45%, rgba(5,7,10,.35), rgba(5,7,10,.78)); }
.stage.done::before { opacity: 1; }
.stage.done .st-item { opacity: 0; pointer-events: none; transition: opacity .3s; }
/* game over: wide card like Plappy (score left, race right), buttons in a footer that is always visible */
.st-result { width: min(940px, calc(100% - 24px)); max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 0; overflow: hidden; display: grid; grid-template-rows: minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr);
  border-radius: 22px; border-color: var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 80px rgba(0,0,0,.6); }
.res-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; padding: 22px 24px 12px; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.res-main { display: grid; align-content: start; gap: 10px; min-width: 0; }
.res-side { display: grid; align-content: start; gap: 10px; min-width: 0; }
.res-head { justify-content: flex-start; gap: 16px; margin: 0; }
.res-head h2 { font-size: 30px; letter-spacing: .06em; line-height: 1.05; }
.res-kicker { display: block; font: 800 11px var(--disp); letter-spacing: .3em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.res-time { display: inline-block; margin-top: 6px; font: 800 15px var(--disp); color: var(--cyan); letter-spacing: .04em; }
.res-time.dnf { color: var(--muted); font-size: 12px; }
.medal { width: 84px; height: 84px; }
.st-result.p1 .medal { filter: drop-shadow(0 0 18px rgba(255,213,74,.55)) drop-shadow(0 6px 14px rgba(0,0,0,.4)); }
.res-main .res-pts, .res-main .promo, .res-main .drop { margin: 0; }
.res-main .drop { justify-content: flex-start; }
.res-main .drop-card { width: 100%; }
.places { margin: 0; gap: 4px; }
.places li { padding: 5px 10px; border: 1px solid rgba(255,255,255,.04); background: rgba(255,255,255,.025); }
.places li.me { background: rgba(111,231,255,.1); outline: 0; border-color: var(--line-2); box-shadow: 0 0 18px rgba(111,231,255,.12); }
.places .pn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .places .pn b { color: var(--white); }
.res-goals { margin: 0; }
/* under the places (Marlon 01.12.): one compact line, day points + the Claim button (amounts stay in the places list) */
.res-win { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 4px; min-width: 0; min-height: 34px; }
.rw-s { font-size: 12px; color: var(--muted); line-height: 1.3; min-width: 0; } .rw-s b { color: var(--white); }
.res-win.wait .rw-s { animation: pzWait 1s infinite alternate; }
.rw-done { flex: none; color: var(--teal); font: 800 12px var(--disp); letter-spacing: .04em; }
.rw-claim { flex: none; padding: 7px 14px; min-height: 0; font-size: 12px; border-radius: 12px; letter-spacing: .06em; white-space: nowrap; }
/* place = the headline of the game over */
.res-head h2 { font-size: 46px; }
.res-main .res-goals { display: flex; align-items: center; gap: 10px; padding: 6px 10px; margin: 0; border-radius: 12px; background: rgba(255,255,255,.025); }
.res-main .res-goals::before { content: "Today"; flex: none; font: 800 9px var(--disp); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.res-main .res-goals .goal-list { flex: 1; gap: 6px; } .res-main .res-goals .goal { gap: 5px; }
.res-main .res-goals .goal .ring, .res-main .res-goals .goal .ring svg { width: 24px; height: 24px; } .res-main .res-goals .goal .ring i { font-size: 10px; }
.res-main .res-goals .goal .gt b { font-size: 10px; font-weight: 500; color: var(--silver); } .res-main .res-goals .goal .gt small { display: none; }
.res-btns { display: flex; gap: 10px; margin: 0; padding: 12px 24px 16px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(5,7,10,.15), rgba(5,7,10,.45)); flex-wrap: nowrap; }
.res-btns .play-again { white-space: nowrap; min-width: 0; flex: 1 1 auto; flex-direction: row; gap: 12px; min-height: 56px; font-size: 17px; border-radius: 18px; animation: playPulse 2.4s ease-in-out infinite; }
.res-btns .play-again i[data-ic] svg { width: 24px; height: 24px; }
.pa-t { display: grid; justify-items: start; line-height: 1.05; gap: 3px; }
.res-ic { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; min-width: 56px; padding: 0 18px; border-radius: 18px; flex: none; font: 800 12px var(--disp); letter-spacing: .08em; text-transform: uppercase; }
.res-ic.sq { padding: 0; width: 56px; }
.res-ic i[data-ic] svg { width: 22px; height: 22px; }
#resGear i[data-ic] { color: #c9a8ff; } #back i[data-ic] { color: var(--cyan); } #resShare i[data-ic] { color: var(--teal); }
@media (max-width: 640px) { /* phone upright: one column, the footer stays at the bottom of the card */
  .res-grid { grid-template-columns: 1fr; gap: 10px; padding: 16px 14px 8px; }
  .res-head h2 { font-size: 34px; } .medal { width: 58px; height: 58px; }
  .places li { padding: 3px 8px; } .places img { width: 30px; height: 30px; }
  .res-btns { padding: 10px 12px 12px; gap: 8px; }
  .res-ic { padding: 0; width: 52px; min-width: 52px; min-height: 52px; } .res-ic span { display: none; }
  .res-btns .play-again { min-height: 52px; font-size: 14px; letter-spacing: .04em; padding: 0 12px; gap: 8px; }
  .res-side .res-win { order: -1; padding: 6px 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); } /* money line first: on a phone the end of the list sits under the buttons */
  .dock .tile { flex: 0 0 calc((100% - 24px) / 4); min-height: 70px; padding: 8px 4px; gap: 5px; }
  .tile i[data-ic] { width: 40px; height: 40px; border-radius: 13px; } .tile i[data-ic] svg { width: 24px; height: 24px; }
}
@media (max-width: 640px) and (max-height: 760px) { .res-main .res-goals { display: none; } .rw-s { font-size: 11px; } .drop-card img { width: 48px; height: 48px; } }
@media (max-width: 370px) { /* small phones (360 px): the footer must not push the card wider than the screen */
  .res-btns .play-again > i[data-ic] { display: none; } .res-btns .play-again { padding: 0 10px; }
  .res-ic, .res-ic.sq { width: 46px; min-width: 46px; } }
@media (max-height: 520px) and (orientation: landscape) { /* phone sideways: two columns, compact, buttons always visible */
  .st-result { width: min(820px, calc(100% - 16px)); max-height: calc(100dvh - 12px); border-radius: 16px; }
  .res-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 12px; padding: 10px 14px 6px; }
  .res-head { gap: 10px; } .res-head h2 { font-size: 28px; } .res-head .medal, .medal { width: 46px; height: 46px; } .res-kicker { font-size: 9px; margin-bottom: 1px; } .res-time { margin-top: 2px; font-size: 13px; }
  .res-main { gap: 6px; } .res-pts { padding: 5px 8px; } .res-pts .lgb { width: 26px; height: 26px; }
  .rw-s { font-size: 11px; } .rw-claim { padding: 5px 10px; }
  .drop-card { padding: 4px 10px; gap: 8px; } .drop-card img { width: 38px; height: 38px; } .drop-card .muted { display: none; }
  .promo { padding: 4px; font-size: 13px; } .promo.big { font-size: 14px; }
  .places { gap: 2px; } .places li { padding: 1px 8px; } .places img { width: 26px; height: 26px; } .places .pl { font-size: 13px; }
  .res-main .res-goals { display: none; }
  .res-btns { padding: 6px 14px 8px; } .res-btns .play-again, .res-ic { min-height: 46px; } .res-ic.sq { width: 46px; } .res-ic { padding: 0 12px; }
  .dock .tile { min-height: 58px; padding: 5px 2px; gap: 3px; grid-template-columns: none; justify-items: center; }
  .tile i[data-ic] { width: 32px; height: 32px; border-radius: 11px; } .tile i[data-ic] svg { width: 20px; height: 20px; } .tile b { font-size: 9px; letter-spacing: .04em; }
}
/* item button pulse without repaints: a ring that only scales and fades (composited), static glow */
.st-item.has { animation: none; box-shadow: 0 0 22px var(--rc, var(--cyan)); }
.st-item::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--rc, var(--cyan)); opacity: 0; pointer-events: none; will-change: transform, opacity; }
.st-item.has::after { animation: itemRing 1.1s ease-out infinite; }
@keyframes itemRing { from { transform: scale(1); opacity: .8; } to { transform: scale(1.35); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .st-item.has::after { animation: none; } }
@media (prefers-reduced-motion: reduce) { .tile, .me-card, .goals, .go, .win-box, .win.closing, .win.closing .win-box, .res-btns .play-again { animation: none; } }

.res-xp { margin-top: 10px; }
.res-xp .xp-gain { color: var(--teal); }
.res-xp .lg-bar i { transition: width 1s cubic-bezier(.2,.8,.2,1); }
/* ---- «Finding runners» card: ~10 s search before paying, «Wait for humans» keeps looking (glass, no scrolling) ---- */
.wait-box { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(5,7,10,.55); animation: winIn .16s ease-out; }
.wait-box[hidden] { display: none; }
.wait-card { width: min(360px, 100%); display: grid; justify-items: center; gap: 10px; padding: 22px 20px 18px; text-align: center; border-color: var(--line-2); border-radius: 22px; }
.wait-card h2 { margin: 2px 0 0; font: 800 17px var(--disp); letter-spacing: .06em; color: var(--white); display: grid; gap: 2px; }
.wait-card h2 small { font: 700 10px var(--disp); letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.wait-radar { position: relative; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; color: var(--teal);
  background: radial-gradient(circle, rgba(46,230,168,.22), rgba(46,230,168,.04) 70%); border: 1px solid rgba(46,230,168,.4); }
.wait-radar::before, .wait-radar::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 2px solid var(--teal); opacity: 0; animation: waitPing 2s ease-out infinite; }
.wait-radar::after { animation-delay: 1s; }
.wait-radar i[data-ic] svg { width: 42px; height: 42px; }
@keyframes waitPing { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
.wait-time { font: 800 30px var(--disp); color: var(--white); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.wait-stats { display: flex; gap: 10px; justify-content: center; }
.wait-stats span { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 6px; padding: 8px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.wait-stats i[data-ic] { color: var(--cyan); grid-row: span 2; } .wait-stats i[data-ic] svg { width: 22px; height: 22px; }
.wait-stats b { font: 800 18px var(--disp); color: var(--white); line-height: 1; text-align: left; }
.wait-stats small { font: 700 9px var(--disp); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: left; }
.wait-note { margin: 0; display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--silver); }
.wait-note i[data-ic] { color: #ffc94a; } .wait-note i[data-ic] svg { width: 16px; height: 16px; }
.wait-bar { width: 100%; max-width: 240px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.wait-bar[hidden] { display: none; }
.wait-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffc94a, var(--teal)); transform-origin: left; transition: transform .2s linear; }
.wait-note i[data-ic="bot"] { color: var(--silver); }
.wait-chk { display: inline-flex; align-items: center; gap: 8px; padding: 6px 4px; font: 700 12px var(--disp); letter-spacing: .06em; color: var(--silver); cursor: pointer; user-select: none; }
.wait-chk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wait-box-ic { width: 18px; height: 18px; flex: none; border-radius: 5px; border: 2px solid var(--line-2); background: rgba(255,255,255,.05); display: grid; place-items: center; }
.wait-chk input:checked + .wait-box-ic { border-color: var(--teal); background: var(--teal); }
.wait-chk input:checked + .wait-box-ic::after { content: ""; width: 4px; height: 9px; margin-top: -2px; border: solid #05070a; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.wait-chk input:focus-visible + .wait-box-ic { outline: 2px solid var(--cyan); outline-offset: 2px; }
.wait-chk.on { color: var(--teal); cursor: default; }
.wait-time[hidden] { display: none; }
.wait-card.humans .wait-radar { border-color: var(--teal); }
.wait-x { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.wait-x i[data-ic] svg { width: 18px; height: 18px; }
@media (max-height: 520px) and (orientation: landscape) { .wait-card { gap: 6px; padding: 12px 16px; } .wait-stats span { padding: 4px 10px; } .wait-radar::before, .wait-radar::after { display: none; } .wait-x { margin-top: 0; } .wait-radar { width: 64px; height: 64px; } .wait-radar i[data-ic] svg { width: 30px; height: 30px; } .wait-time { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .wait-radar::before, .wait-radar::after { animation: none; } }

.botbank { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(5,7,10,.4); display: grid; gap: 6px; font-size: 13px; line-height: 1.4; }
.botbank[hidden] { display: none; }
.botbank p { margin: 0; color: var(--silver); }
.bb-h { display: flex; align-items: center; gap: 8px; } .bb-h i[data-ic] svg { width: 20px; height: 20px; color: var(--cyan); }
.bb-bal { margin-left: auto; font: 800 16px var(--disp); color: #ffc94a; }
.bb-s { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }

/* game over: wBLOZ per place (exact settle amounts, 0 included; bots pay into the public bot wallet) */
.places.paid li { grid-template-columns: 30px 36px 1fr auto auto; }
.pz { display: grid; justify-items: end; line-height: 1.05; min-width: 58px; }
.pz b { font: 800 15px var(--disp); color: var(--white); letter-spacing: .02em; }
.pz small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.pz.won b { color: #ffc94a; } .pz.won.bot b { color: #dfe6f2; } .pz.zero b { color: var(--muted); } .pz.back b { color: var(--teal); } .pz.wait b { color: var(--muted); animation: pzWait 1s infinite alternate; }
@keyframes pzWait { from { opacity: .35; } to { opacity: 1; } }
@media (max-width: 400px) { .places.paid li { gap: 6px; } .pz { min-width: 48px; } .pz b { font-size: 13px; } .pz small { font-size: 9px; } }
/* lobby of a public race: «Wait for other players» + Cancel under the canvas lobby panel (panel centre at 42 % height) */
.st-wait { position: absolute; left: 50%; top: calc(42% + 98px); transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: 14px; background: rgba(10,14,20,.82); border: 1px solid rgba(111,231,255,.3); white-space: nowrap; }
.st-wait .wait-x { min-height: 0; padding: 6px 12px; font-size: 12px; }
.st-wait .wait-x i { width: 14px; height: 14px; display: inline-grid; }
.st-wait .wait-chk.on span { color: var(--teal); }
@media (max-height: 420px) { .st-wait { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); } }
.rw-act { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; } .rw-act .btn-primary { padding: 5px 12px; font-size: 12px; }
