:root {
  --y: #f5b301; --y2: #ffd23f; --yd: #b88400;
  --g: #1f9d45; --g2: #2fbf5a; --r: #d0342c; --b: #2f6fd6;
  --ink: #121110; --p1: #1c1a17; --p2: #25221e; --p3: #302c27; --line: #3d372f;
  --tx: #f4efe6; --mut: #a39a8c;
  --disp: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --body: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0b0a09; color: var(--tx); font-family: var(--body); overflow: hidden; overscroll-behavior: none; }
body { background: radial-gradient(ellipse at 50% 20%, #2a2318 0%, #0b0a09 70%); }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
.hidden { display: none !important; }

#app { position: relative; margin: 0 auto; width: min(100vw, calc(100dvh * 0.5)); height: 100dvh; overflow: hidden; background: var(--ink); user-select: none; -webkit-user-select: none; touch-action: none; container-type: size; }
@media (min-aspect-ratio: 3/4) { #app { box-shadow: 0 0 0 1px #2a2620, 0 30px 80px rgba(0,0,0,.6); } }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#ui, #hud, #fx, #toasts { position: absolute; inset: 0; pointer-events: none; }
#ui > *, #hud > * { pointer-events: auto; }
#side-help { position: fixed; left: 24px; bottom: 24px; max-width: 240px; color: var(--mut); font-size: 15px; line-height: 1.35; }
#side-help h2 { font-family: var(--disp); color: var(--y); font-weight: 400; margin: 0 0 6px; font-size: 26px; letter-spacing: .5px; }
@media (max-aspect-ratio: 4/5), (max-width: 900px) { #side-help { display: none; } }

/* ---------- boot ---------- */
#boot { position: absolute; inset: 0; display: grid; place-content: center; gap: 22px; background: var(--ink); z-index: 50; transition: opacity .4s; }
#boot.out { opacity: 0; pointer-events: none; }
.boot-logo, .logo { font-family: var(--disp); font-size: 64px; line-height: .9; text-align: center; transform: rotate(-4deg); text-shadow: 0 4px 0 #000; }
.boot-logo span, .logo span { display: block; }
.y { color: var(--y); }
.boot-bar { width: 200px; height: 8px; background: var(--p3); border-radius: 4px; overflow: hidden; margin: 0 auto; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--y); animation: load 1.1s ease-in-out infinite; }
@keyframes load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.boot-tip { text-align: center; color: var(--mut); font-size: 16px; padding: 0 20px; }

/* ---------- shared ---------- */
.scr { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(10px + var(--st)) 12px calc(10px + var(--sb)); }
.scr.solid { background: linear-gradient(180deg, #171512 0%, #0f0e0c 100%); overflow-y: auto; overflow-x: hidden; touch-action: pan-y; }
.scr.dim { background: rgba(10,9,8,.72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.topbar { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.topbar .sp { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.65); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px 4px 6px; font-weight: 800; font-size: 18px; }
.pill .plus { width: 22px; height: 22px; display: grid; place-items: center; background: var(--y); color: #111; border-radius: 4px; font-size: 18px; line-height: 1; }
.ic { width: 22px; height: 22px; flex: none; }
.ic.lg { width: 36px; height: 36px; }
.ic.xl { width: 56px; height: 56px; }
.iconbtn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: rgba(0,0,0,.55); border: 1px solid var(--line); }
.back { font-family: var(--disp); font-size: 20px; background: #f4efe6; color: #111; padding: 6px 16px 6px 12px; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); letter-spacing: .5px; }
.title { font-family: var(--disp); font-size: 44px; line-height: 1; color: var(--y); text-shadow: 0 3px 0 #000; transform: rotate(-2deg); margin: 8px 0 2px; letter-spacing: .5px; }
.title small { display: block; font-size: 22px; color: var(--tx); transform: none; }
.subtitle { color: var(--g2); font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .5px; }
.btn { font-family: var(--disp); font-size: 22px; letter-spacing: .6px; padding: 12px 18px; border-radius: 6px; background: var(--p3); border: 1px solid var(--line); text-transform: uppercase; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s; }
.btn:active, .navb:active, .card:active { transform: scale(.96); }
.btn.y { background: linear-gradient(180deg, var(--y2), var(--y)); color: #141210; border-color: var(--yd); box-shadow: 0 4px 0 var(--yd); }
.btn.g { background: linear-gradient(180deg, #37c463, var(--g)); color: #fff; border-color: #14692d; box-shadow: 0 4px 0 #14692d; }
.btn.r { background: linear-gradient(180deg, #e6493f, var(--r)); color: #fff; border-color: #8a1d17; box-shadow: 0 4px 0 #8a1d17; }
.btn.dark { background: #2b2824; box-shadow: 0 4px 0 #161412; }
.btn.sm { font-size: 17px; padding: 7px 12px; box-shadow: 0 3px 0 var(--yd); }
.btn.sm.dark, .btn.sm.g { box-shadow: 0 3px 0 #161412; }
.btn[disabled] { opacity: .45; filter: grayscale(.7); pointer-events: none; }
.btn.block { width: 100%; }
.brush { clip-path: polygon(1% 8%, 6% 0, 40% 4%, 70% 0, 99% 6%, 100% 50%, 98% 94%, 70% 100%, 35% 96%, 4% 100%, 0 60%); }
.panel { background: rgba(28,26,23,.92); border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.lbl { color: var(--mut); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.big { font-family: var(--disp); font-size: 26px; line-height: 1.05; }
.stars { display: inline-flex; gap: 2px; }
.stars .ic { width: 20px; height: 20px; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 10px; }
.center { text-align: center; }
.tabs { display: flex; gap: 6px; margin: 8px 0; }
.tab { flex: 1; font-family: var(--disp); font-size: 18px; padding: 8px; border-radius: 6px; background: var(--p2); border: 1px solid var(--line); color: var(--mut); text-transform: uppercase; }
.tab.on { background: var(--y); color: #111; border-color: var(--yd); }
.soon { font-family: var(--disp); color: #d8d2c6; background: repeating-linear-gradient(-45deg, #3a3631 0 10px, #34302b 10px 20px); padding: 6px 10px; border-radius: 4px; font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }

/* ---------- home ---------- */
.home-top { display: flex; align-items: center; gap: 8px; }
.avatar { width: 46px; height: 46px; border-radius: 10px; background: linear-gradient(160deg, #3a3228, #1a1612); border: 2px solid var(--y); display: grid; place-items: center; overflow: hidden; }
.who { line-height: 1; }
.who b { font-family: var(--disp); font-weight: 400; font-size: 19px; color: var(--y); letter-spacing: .4px; display: block; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp { display: flex; align-items: center; gap: 5px; margin-top: 4px; }
.xp .lv { background: var(--y); color: #111; font-weight: 800; font-size: 13px; padding: 1px 5px; border-radius: 3px; }
.xp .bar { width: 64px; height: 6px; background: #3a352e; border-radius: 3px; overflow: hidden; }
.xp .bar i { display: block; height: 100%; background: var(--y); }
.home-mid { position: relative; flex: 1; min-height: 0; }
.chipcol { position: absolute; left: 0; top: 8px; display: flex; flex-direction: column; gap: 8px; width: 42%; }
.chip { background: rgba(18,17,15,.82); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; text-align: left; }
.chip .lbl { color: var(--y); }
.promo { position: absolute; right: 0; top: 8px; width: 50%; background: linear-gradient(135deg, #1f8a45, #0f5c2c); border: 1px solid #2fbf5a; border-radius: 10px; padding: 8px 8px 8px 50px; text-align: left; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.promo .bottle { position: absolute; left: 4px; top: 6px; width: 42px; height: 58px; }
.promo b { font-family: var(--disp); font-weight: 400; font-size: 19px; display: block; line-height: 1; }
.promo span { font-size: 13px; font-weight: 700; line-height: 1.1; display: block; margin: 2px 0 5px; text-transform: uppercase; }
.promo .btn { font-size: 14px; padding: 3px 8px; box-shadow: 0 2px 0 var(--yd); }
.paints { background: rgba(14,13,11,.85); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px 8px; }
.paints .lbl { text-align: center; color: #e9e3d6; margin-bottom: 4px; }
.buckets { display: flex; gap: 6px; justify-content: flex-start; touch-action: pan-x; overflow-x: auto; scrollbar-width: none; }
.buckets > :first-child { margin-left: auto; } .buckets > :last-child { margin-right: auto; }
.bucket { position: relative; width: 44px; height: 46px; border-radius: 8px; border: 2px solid transparent; background: #1f1c19; display: grid; place-items: center; flex: none; }
.bucket.on { border-color: var(--y); box-shadow: 0 0 10px rgba(245,179,1,.5); }
.bucket .price { position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); background: #111; color: var(--y); font-size: 11px; font-weight: 800; padding: 0 4px; border-radius: 3px; white-space: nowrap; }
.bucket.locked svg { opacity: .55; }
.distcard { margin-top: 8px; display: flex; align-items: stretch; background: #efe6cf; color: #171512; border-radius: 6px; overflow: hidden; text-align: left; box-shadow: 0 6px 18px rgba(0,0,0,.45); transform: rotate(-.6deg); width: 100%; }
.distcard .info { padding: 8px 10px; flex: 1; }
.distcard .info .k { color: var(--g); font-family: var(--disp); font-size: 15px; letter-spacing: .4px; }
.distcard .info .n { font-family: var(--disp); font-size: 30px; line-height: 1; }
.distcard .info .lbl { color: #6a6152; margin-top: 4px; }
.distcard .info .hs { font-family: var(--disp); font-size: 22px; display: flex; align-items: center; gap: 4px; }
.distcard .art { width: 46%; position: relative; }
.distcard .chev { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--disp); font-size: 28px; color: #fff; text-shadow: 0 2px 4px #000; }
.boosts { display: flex; gap: 6px; margin-top: 8px; }
.boost { flex: 1; position: relative; background: rgba(18,17,15,.88); border: 1px solid var(--line); border-radius: 8px; padding: 4px 2px 3px; display: flex; flex-direction: column; align-items: center; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--mut); }
.boost .ic { width: 26px; height: 26px; }
.boost .n { position: absolute; top: 2px; right: 4px; font-size: 12px; color: var(--tx); }
.boost.on { border-color: var(--g2); background: rgba(31,157,69,.28); color: #fff; }
.boost.on::after { content: 'ON'; position: absolute; top: 2px; left: 4px; font-size: 10px; color: #7dff9f; }
.boost.empty { opacity: .5; }
.start { margin-top: 10px; width: 100%; font-size: 46px; padding: 6px 0 4px; letter-spacing: 1px; }
.nav { display: flex; gap: 4px; margin-top: 10px; background: rgba(14,13,11,.92); border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.navb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 0 3px; font-family: var(--disp); font-size: 13px; letter-spacing: .5px; color: #ddd6c8; border-radius: 7px; position: relative; }
.navb .ic { width: 24px; height: 24px; }
.navb.on { background: var(--y); color: #111; }
.navb .dot { position: absolute; top: 3px; right: 18%; width: 9px; height: 9px; border-radius: 50%; background: var(--g2); box-shadow: 0 0 0 2px #111; }

/* ---------- garage ---------- */
.g-stage { flex: 1; min-height: 120px; position: relative; }
.g-hint { position: absolute; bottom: 4px; width: 100%; text-align: center; color: var(--mut); font-size: 14px; font-weight: 700; }
.g-arrow { position: absolute; top: 45%; width: 44px; height: 54px; background: rgba(0,0,0,.6); border: 1px solid var(--line); border-radius: 8px; font-family: var(--disp); font-size: 26px; }
.vname { font-family: var(--disp); font-size: 40px; line-height: 1; background: var(--y); color: #111; display: inline-block; padding: 2px 18px 0 12px; transform: rotate(-2deg); }
.statbars { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-weight: 800; text-transform: uppercase; font-size: 15px; }
.segs { display: flex; gap: 3px; }
.segs i { flex: 1; height: 12px; background: #3a352e; transform: skewX(-15deg); }
.segs i.on { background: var(--y); }
.vcards { display: flex; gap: 6px; }
.vcard { flex: 1; background: var(--p2); border: 2px solid var(--line); border-radius: 8px; padding: 4px; text-align: center; font-family: var(--disp); font-size: 12px; color: var(--mut); position: relative; }
.vcard.on { border-color: var(--y); color: var(--y); background: #2d2618; }
.vcard .ic { width: 100%; height: 42px; }
.vcard .tag { font-size: 11px; margin-top: 2px; }
.vcard.on .tag { color: var(--g2); }
.paintgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.paintc { background: var(--p2); border: 2px solid var(--line); border-radius: 8px; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; }
.paintc .sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); }
.paintc.on { border-color: var(--y); }
.paintc .pr { color: var(--y); display: flex; align-items: center; gap: 2px; font-weight: 800; }

/* ---------- modes ---------- */
.dgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.card { position: relative; background: #efe6cf; color: #171512; border-radius: 6px; overflow: hidden; text-align: left; box-shadow: 0 4px 12px rgba(0,0,0,.5); border: 3px solid #efe6cf; }
.card .art { height: 88px; position: relative; }
.card .nm { position: absolute; left: 8px; top: 6px; right: 40px; font-family: var(--disp); font-size: 19px; line-height: .95; color: #151515; text-shadow: 0 0 6px rgba(255,255,255,.7); }
.card .nm small { display: block; font-size: 13px; color: var(--g); text-shadow: none; }
.card .stamp { position: absolute; right: 6px; top: 6px; width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(20,20,20,.55); display: grid; place-items: center; font-family: var(--disp); font-size: 8px; color: rgba(20,20,20,.7); transform: rotate(12deg); }
.card .meta { display: flex; justify-content: space-between; padding: 4px 8px 0; font-size: 11px; font-weight: 800; color: #6a6152; text-transform: uppercase; }
.card .vals { display: flex; justify-content: space-between; padding: 0 8px; font-family: var(--disp); font-size: 16px; }
.card .act { margin: 4px 6px 6px; font-family: var(--disp); font-size: 18px; text-align: center; background: var(--y); border-radius: 4px; padding: 3px 0 1px; }
.card.locked .art { filter: grayscale(.85) brightness(.75); }
.card.locked .act { background: #3a352e; color: #f4efe6; display: flex; align-items: center; justify-content: center; gap: 4px; }
.card .lockic { position: absolute; inset: 0; display: grid; place-items: center; }
.modebar { display: flex; align-items: center; justify-content: space-between; background: var(--p1); border: 2px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.modebar b { font-family: var(--disp); font-weight: 400; font-size: 24px; display: block; line-height: 1; }
.modebar span { font-size: 13px; color: var(--mut); font-weight: 700; text-transform: uppercase; }
.daily { background: linear-gradient(135deg, var(--y2), var(--y)); color: #141210; border-radius: 10px; padding: 10px 12px; }
.daily h3 { font-family: var(--disp); font-weight: 400; font-size: 26px; margin: 0; line-height: 1; }
.daily .timer { display: inline-flex; gap: 6px; align-items: center; background: #151515; color: #fff; border-radius: 20px; padding: 2px 10px; font-weight: 800; font-size: 14px; }
.dch { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.1); border-radius: 6px; padding: 6px 8px; margin-top: 6px; font-weight: 800; }
.dch .t { flex: 1; font-size: 15px; }
.dch .pb { height: 6px; background: rgba(0,0,0,.2); border-radius: 3px; overflow: hidden; margin-top: 3px; }
.dch .pb i { display: block; height: 100%; background: #151515; }
.dch .rw { display: flex; align-items: center; gap: 3px; font-family: var(--disp); font-size: 16px; }
.dch .done { color: #0d5c25; }

/* ---------- shop ---------- */
.item { display: flex; align-items: center; gap: 10px; background: var(--p1); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.item .ic { width: 44px; height: 44px; }
.item b { font-family: var(--disp); font-weight: 400; font-size: 20px; display: block; line-height: 1.05; }
.item p { margin: 1px 0 0; color: var(--mut); font-size: 14px; line-height: 1.1; font-weight: 600; }
.item .own { color: var(--g2); font-weight: 800; font-size: 13px; }
.price { display: inline-flex; align-items: center; gap: 4px; }
.price .ic { width: 18px; height: 18px; }

/* ---------- ranks ---------- */
.lb { display: flex; flex-direction: column; gap: 4px; }
.lbr { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; background: var(--p1); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.lbr .rk { font-family: var(--disp); font-size: 20px; text-align: center; }
.lbr.top1 { background: linear-gradient(90deg, #f5b301, #c98d00); color: #111; }
.lbr.top2 { background: #3a3732; }
.lbr.top3 { background: #4a3220; }
.lbr .nm { font-weight: 800; font-size: 16px; line-height: 1; }
.lbr .nm small { display: block; color: var(--mut); font-weight: 600; font-size: 12px; }
.lbr.top1 .nm small { color: #3a2a00; }
.lbr .sc { font-family: var(--disp); font-size: 19px; display: flex; align-items: center; gap: 4px; }
.ach { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.achc { background: var(--p1); border: 1px solid var(--line); border-radius: 10px; padding: 8px; text-align: center; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.achc b { font-family: var(--disp); font-weight: 400; font-size: 17px; line-height: 1; }
.achc p { margin: 0; color: var(--mut); font-size: 13px; font-weight: 600; line-height: 1.1; min-height: 28px; }
.achc .pb { width: 100%; height: 7px; background: #3a352e; border-radius: 4px; overflow: hidden; }
.achc .pb i { display: block; height: 100%; background: var(--y); }
.achc .pv { font-size: 13px; font-weight: 800; }
.achc.claimed { opacity: .6; }
.note { color: var(--mut); font-size: 13px; font-weight: 600; text-align: center; margin: 8px 0; }

/* ---------- settings ---------- */
.set { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--p1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 800; font-size: 17px; text-transform: uppercase; }
.set input[type=range] { width: 50%; accent-color: var(--y); }
.set input[type=text] { width: 55%; background: #111; border: 1px solid var(--line); color: var(--tx); font: inherit; font-size: 17px; padding: 6px 8px; border-radius: 6px; text-transform: none; }
.tog { width: 52px; height: 28px; border-radius: 14px; background: #3a352e; position: relative; flex: none; }
.tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #ddd; transition: transform .15s; }
.tog.on { background: var(--g); }
.tog.on::after { transform: translateX(24px); }
.seg3 { display: flex; gap: 4px; }
.seg3 button { padding: 5px 10px; border-radius: 6px; background: #2b2824; font-weight: 800; font-size: 15px; }
.seg3 button.on { background: var(--y); color: #111; }

/* ---------- HUD ---------- */
#hud { padding: calc(8px + var(--st)) 8px calc(8px + var(--sb)); }
.h-pause { position: absolute; left: 8px; top: calc(8px + var(--st)); width: 46px; height: 46px; border-radius: 8px; background: var(--y); box-shadow: 0 3px 0 var(--yd); display: grid; place-items: center; }
.h-wanted { position: absolute; left: 60px; right: 112px; top: calc(6px + var(--st)); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.h-wanted .hdr { font-family: var(--disp); font-size: 14px; letter-spacing: .6px; text-shadow: 0 2px 2px #000; }
.h-heat { width: 100%; max-width: 210px; height: 14px; border-radius: 3px; background: rgba(0,0,0,.7); border: 2px solid rgba(0,0,0,.8); position: relative; overflow: hidden; }
.h-heat i { position: absolute; inset: 0; background: linear-gradient(90deg, #2fbf5a, #b7d633 25%, #f5d020 45%, #f59a1a 65%, #e8411f 85%, #b0101a); clip-path: inset(0 100% 0 0); transition: clip-path .2s; }
.h-heat::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(0,0,0,.75) calc(10% - 2px) 10%); }
.h-lvl { margin-top: 3px; background: rgba(0,0,0,.78); border-radius: 4px; padding: 1px 8px; font-family: var(--disp); font-size: 13px; letter-spacing: .5px; white-space: nowrap; }
.h-lvl em { font-style: normal; color: #ff7a2a; }
.h-wanted .stars { margin-top: 3px; }
.h-wanted .stars .ic { width: 22px; height: 22px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.8)); }
.h-wanted.flash .h-lvl { animation: flash .5s 3; }
@keyframes flash { 50% { background: #b0101a; } }
.h-stats { position: absolute; right: 8px; top: calc(8px + var(--st)); display: flex; flex-direction: column; gap: 4px; align-items: stretch; width: 100px; pointer-events: none; }
.h-box { background: rgba(10,10,10,.78); border-radius: 4px; padding: 2px 8px 3px; clip-path: polygon(4% 0, 100% 0, 100% 100%, 0 100%); }
.h-box .lbl { color: var(--y); font-size: 11px; font-family: var(--disp); letter-spacing: .5px; font-weight: 400; }
.h-box .v { font-family: var(--disp); font-size: 21px; line-height: 1; }
.h-box.coins { display: flex; align-items: center; gap: 5px; }
.h-mult { align-self: flex-end; background: var(--g); font-family: var(--disp); font-size: 15px; padding: 1px 8px; border-radius: 4px; }
.h-mult.snack { background: #e8641b; }
.h-speedo { position: absolute; left: 6px; bottom: calc(6px + var(--sb)); width: 96px; height: 96px; pointer-events: none; }
.h-speedo .v { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-family: var(--disp); font-size: 25px; line-height: 1; }
.h-speedo .u { position: absolute; left: 0; right: 0; bottom: 42px; text-align: center; font-size: 10px; font-weight: 800; color: var(--mut); }
.h-water { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--sb)); min-width: 104px; height: 60px; background: rgba(10,10,10,.8); border: 2px solid #3a6fa8; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--disp); font-size: 26px; padding: 0 12px; }
.h-water .ic { width: 30px; height: 44px; }
.h-water.empty { opacity: .45; border-color: var(--line); }
.h-water small { position: absolute; top: -16px; left: 0; right: 0; text-align: center; font-family: var(--body); font-weight: 800; font-size: 11px; color: #9fd0ff; text-shadow: 0 1px 2px #000; }
.h-powers { position: absolute; right: 8px; bottom: calc(8px + var(--sb)); display: flex; flex-direction: column-reverse; gap: 6px; align-items: flex-end; pointer-events: none; }
.h-pw { position: relative; width: 58px; height: 58px; border-radius: 50%; background: rgba(10,10,10,.8); display: grid; place-items: center; }
.h-pw svg.ring { position: absolute; inset: 0; transform: rotate(-90deg); }
.h-pw .ic { width: 30px; height: 30px; }
.h-pw.sm { width: 46px; height: 46px; }
.h-pw.sm .ic { width: 24px; height: 24px; }
.h-rain { position: absolute; left: 8px; top: calc(62px + var(--st)); background: rgba(10,10,10,.75); border-radius: 4px; padding: 2px 8px; font-weight: 800; font-size: 13px; color: #9fd0ff; pointer-events: none; }
.h-combo { position: absolute; left: 0; right: 0; top: 30%; text-align: center; pointer-events: none; font-family: var(--disp); }

/* popups / fx */
#fx { overflow: hidden; z-index: 5; }
.pop { position: absolute; left: 50%; top: 36%; transform: translate(-50%, 0); font-family: var(--disp); font-size: 30px; white-space: nowrap; text-shadow: 0 3px 0 #000, 0 0 12px rgba(0,0,0,.6); animation: pop 1.1s ease-out forwards; letter-spacing: .5px; }
.pop.good { color: #7dff9f; } .pop.bad { color: #ff6a50; } .pop.water { color: #8fd6ff; } .pop.info { color: var(--y); } .pop.nm { color: #fff; } .pop.big { font-size: 44px; }
.pop.nm b { color: var(--y); font-weight: 400; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 25% { transform: translate(-50%, 0) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50px); } }
.warn { position: absolute; left: 50%; top: calc(108px + var(--st)); transform: translateX(-50%); background: repeating-linear-gradient(-45deg, #f2c200 0 12px, #151515 12px 24px); padding: 4px; border-radius: 4px; animation: warn 2.4s forwards; }
.warn span { display: block; background: #151515; color: #ffd23f; font-family: var(--disp); font-size: 20px; padding: 3px 12px; white-space: nowrap; letter-spacing: .6px; }
.warn.police span { color: #fff; background: linear-gradient(90deg, #b0101a, #13235a); }
@keyframes warn { 0%, 100% { opacity: 0; } 10%, 85% { opacity: 1; } 20%, 40%, 60% { transform: translateX(-50%) scale(1.06); } 30%, 50% { transform: translateX(-50%) scale(1); } }
.banner { position: absolute; left: 0; right: 0; top: 22%; text-align: center; animation: banner 3.2s forwards; }
.banner b { display: inline-block; font-family: var(--disp); font-weight: 400; font-size: 38px; background: #1a6b3a; color: #fff; padding: 6px 18px 2px; border: 3px solid #fff; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.5); line-height: 1; max-width: 92%; }
.banner span { display: block; margin-top: 6px; font-weight: 800; font-size: 17px; text-shadow: 0 2px 3px #000; text-transform: uppercase; }
@keyframes banner { 0% { opacity: 0; transform: translateY(-20px); } 12%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.count { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font-family: var(--disp); font-size: 110px; color: var(--y); text-shadow: 0 6px 0 #000; animation: count .8s ease-out forwards; }
@keyframes count { 0% { opacity: 0; transform: scale(2); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.8); } }
.tut { position: absolute; left: 0; right: 0; bottom: 26%; text-align: center; pointer-events: none; animation: tut 5s forwards; }
.tut b { font-family: var(--disp); font-weight: 400; font-size: 26px; display: block; text-shadow: 0 3px 0 #000; }
.tut span { font-weight: 800; font-size: 16px; text-shadow: 0 2px 2px #000; }
.tut .hand { font-size: 44px; display: inline-block; animation: swipe 1.2s ease-in-out infinite; }
@keyframes swipe { 0%, 100% { transform: translateX(-50px); } 50% { transform: translateX(50px); } }
@keyframes tut { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
#toasts { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: calc(64px + var(--st)); z-index: 30; }
.toast { background: rgba(14,13,11,.95); border: 1px solid var(--y); color: var(--tx); border-radius: 8px; padding: 8px 14px; font-weight: 800; font-size: 16px; box-shadow: 0 6px 18px rgba(0,0,0,.5); animation: toast 3.2s forwards; max-width: 90%; text-align: center; }
.toast b { color: var(--y); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-10px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* ---------- overlays: pause / continue / results / modal ---------- */
.ov { justify-content: center; align-items: center; }
.ovbox { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.ovtitle { font-family: var(--disp); font-size: 52px; line-height: .95; text-align: center; color: var(--y); text-shadow: 0 4px 0 #000; transform: rotate(-3deg); }
.ovtitle.w { color: #fff; }
.ovsub { text-align: center; font-family: var(--disp); color: #ff5a3c; font-size: 22px; margin-top: -4px; letter-spacing: .4px; }
.ovsub.g { color: var(--g2); }
.statlist { background: rgba(20,18,16,.9); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; }
.statlist .r { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; border-bottom: 1px solid #2c2823; font-weight: 800; font-size: 16px; text-transform: uppercase; color: #cfc7b9; }
.statlist .r:last-child { border-bottom: 0; }
.statlist .r b { font-family: var(--disp); font-weight: 400; font-size: 21px; color: var(--tx); display: flex; align-items: center; gap: 4px; }
.newbest { display: inline-block; color: #ff5a3c; border: 2px solid #ff5a3c; font-family: var(--disp); font-size: 14px; padding: 0 5px; transform: rotate(-8deg); margin-left: 6px; line-height: 1.2; }
.cont-bottle { display: grid; place-items: center; height: 150px; }
.cont-bottle .ic { width: 90px; height: 140px; filter: drop-shadow(0 0 20px rgba(80,180,255,.6)); animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(4deg); } }
.cont-timer { height: 6px; background: #2c2823; border-radius: 3px; overflow: hidden; }
.cont-timer i { display: block; height: 100%; background: var(--y); animation: drain 8s linear forwards; }
@keyframes drain { to { width: 0; } }
.modal { position: absolute; inset: 0; background: rgba(5,5,5,.7); display: grid; place-items: center; z-index: 40; padding: 20px; pointer-events: auto; }
.modal .box { width: 100%; max-width: 320px; background: var(--p1); border: 2px solid var(--y); border-radius: 12px; padding: 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; }
.modal h3 { margin: 0; font-family: var(--disp); font-weight: 400; font-size: 30px; color: var(--y); }
.modal p { margin: 0; color: #d9d1c3; font-weight: 600; font-size: 17px; }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.streak div { background: #2b2824; border-radius: 6px; padding: 4px 0; font-size: 11px; font-weight: 800; }
.streak div.on { background: var(--y); color: #111; }
.streak div.got { background: var(--g); }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; padding-bottom: 8px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.sect { font-family: var(--disp); font-size: 20px; margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; letter-spacing: .5px; }
.sect.g { background: var(--g); display: inline-flex; padding: 2px 12px; transform: rotate(-1.5deg); }
@container (max-height: 640px) {
  .start { font-size: 36px; }
  .promo span { display: none; }
  .distcard .info .n { font-size: 24px; }
  .boost .ic { width: 20px; height: 20px; }
}
