/* VOICE  occasion: a loud, cheerful browser .io game
   IDEA   a rail yard at dusk seen from the signal box: switches, lamps, station signs
   PICTURE the live yard itself is always behind the menus; trains crash in it
   COLOUR night navy #0f1a23 panels, signal yellow #ffd23f, crash red #ff3b2f, grass #4f8a3c
   TYPE   Bungee (station-sign lettering) + Rubik
   LAYOUT game full screen, HUD in corners; menu = top bar, tabs, one panel; phone = bottom tab bar */
@font-face { font-family: Bungee; src: url(fonts/bungee-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-800-normal.woff2) format('woff2'); font-weight: 800; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #0f1a23; --panel: #13202a; --panel2: #1a2d3a; --line: #26404f; --well: #0b141b; --ink: #fff; --soft: #a9bccb;
  --yel: #ffd23f; --yel-d: #b8860b; --red: #ff3b2f; --red-d: #8a1a12; --green: #3ddc84; --blue: #3d9bff; --hud: rgba(11, 21, 29, .84);
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px); --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; min-width: 0; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.45 Rubik, system-ui, sans-serif; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
input, select { user-select: text; -webkit-user-select: text; }
:focus-visible { outline: 3px solid var(--yel); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -.01em; }
h2 { font: 400 clamp(24px, 4vw, 32px)/1.05 Bungee, sans-serif; }
h3 { font-size: 18px; font-weight: 800; }
.muted { color: var(--soft); }
.small { font-size: 13px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.coin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, #ffd23f 45%, #c99a06); box-shadow: inset 0 -2px 0 rgba(0,0,0,.2); flex: none; }
.coin::after { content: ''; display: block; width: 8px; height: 8px; margin: 5px; border-radius: 50%; border: 2px solid rgba(150,100,0,.45); box-sizing: border-box; }

/* Buttons that press down like a keyboard key */
.btn { --c: #22394a; --d: #0c171e; --t: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--c); color: var(--t); font-weight: 600; box-shadow: 0 5px 0 var(--d); transform: translateY(0); transition: transform .08s, box-shadow .08s, filter .15s; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); transform: translateY(-2px); box-shadow: 0 7px 0 var(--d); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--d); }
.btn.yellow { --c: var(--yel); --d: var(--yel-d); --t: #13202a; }
.btn.red { --c: var(--red); --d: var(--red-d); }
.btn.green { --c: #2fbf6f; --d: #156b3a; }
.btn.big { min-height: 58px; width: 100%; font: 400 22px Bungee, sans-serif; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; box-shadow: 0 4px 0 var(--d); }
.btn.ghost { --c: rgba(255,255,255,.1); --d: rgba(0,0,0,.4); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.btn-row.wide > * { flex: 1 1 160px; }
.ico { width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.ico svg { width: 20px; height: 20px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--yel); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.boot { position: fixed; inset: 0; z-index: 50; display: grid; place-content: center; gap: 18px; background: var(--bg); transition: opacity .4s; }
.boot i { width: 46px; height: 46px; margin: 0 auto; border-radius: 50%; border: 5px solid rgba(255,255,255,.12); border-top-color: var(--yel); animation: spin .8s linear infinite; }
.boot.out { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.logo { font: 400 30px/1 Bungee, sans-serif; color: var(--yel); text-shadow: 0 3px 0 #9a7000, 0 6px 14px rgba(0,0,0,.4); white-space: nowrap; }
.logo em { font-style: normal; color: #fff; text-shadow: 0 3px 0 #61717e; }
.boot .logo { font-size: 46px; }

/* ---------- Menu ---------- */
.menu { position: fixed; inset: 0; z-index: 5; display: grid; grid-template-rows: auto auto minmax(0, 1fr); background: linear-gradient(180deg, rgba(9,17,23,.86), rgba(9,17,23,.5) 34%, rgba(9,17,23,.82)); padding: var(--st) var(--sr) 0 var(--sl); }
.menu.out { display: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px max(16px, 3vw) 8px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-name { display: grid; justify-items: start; gap: 3px; }
.by { font-size: 12px; font-weight: 600; color: var(--soft); text-decoration: none; }
.by:hover { color: var(--yel); }
.boot-by { text-align: center; color: var(--soft); font-weight: 600; margin-top: -8px; }
.online { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,.35); font-size: 14px; color: var(--soft); white-space: nowrap; }
.online i { width: 9px; height: 9px; border-radius: 50%; background: #8a99a6; }
.online.live i { background: var(--green); box-shadow: 0 0 0 4px rgba(61,220,132,.2); }
.online.live b { color: #fff; }
.chips { display: flex; gap: 8px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border-radius: 12px; border: 0; background: rgba(15,27,36,.9); box-shadow: 0 4px 0 #070d12; font-weight: 600; font-variant-numeric: tabular-nums; transition: transform .08s, box-shadow .08s; }
.chip:active { transform: translateY(3px); box-shadow: 0 1px 0 #070d12; }
.chip.coins b { color: var(--yel); }
.chip.lvl b { color: var(--yel); }
.chip .av, .av { width: 28px; height: 28px; border-radius: 50%; background: #22394a center/220% no-repeat; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--yel); }
.chip.acct b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; justify-content: center; gap: 8px; padding: 6px 16px 12px; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: rgba(15,27,36,.88); color: var(--soft); font-weight: 600; box-shadow: 0 4px 0 #070d12; transition: transform .08s, box-shadow .08s, color .15s; }
.tabs button svg { width: 19px; height: 19px; }
.tabs button:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 6px 0 #070d12; }
.tabs button.on { background: var(--yel); color: #13202a; box-shadow: 0 4px 0 var(--yel-d); }
.panels { overflow-y: auto; overscroll-behavior: contain; padding: 4px max(16px, 3vw) 40px; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.panel { display: none; max-width: 1180px; margin: 0 auto; animation: rise .25s ease-out; }
.panel.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card { background: linear-gradient(180deg, #1a2d3a, #13202a); border: 2px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 6px 0 #081016, 0 18px 34px rgba(0,0,0,.28); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 14px; flex-wrap: wrap; }
.panel-head p { margin: 6px 0 0; }
.have { display: inline-flex; align-items: center; gap: 8px; font: 400 24px Bungee, sans-serif; color: var(--yel); }
.have .coin { width: 24px; height: 24px; }
.have .coin::after { margin: 7px; }
.sec-title { margin: 22px 0 10px; }

/* Play */
.play-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.hero { position: relative; padding: 0; overflow: hidden; min-height: 290px; display: flex; flex-direction: column; justify-content: flex-end; }
#heroCv { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-info { position: relative; padding: 46px 18px 16px; background: linear-gradient(rgba(10,18,24,0), rgba(10,18,24,.9)); }
.hero-info h2 { margin: 8px 0 4px; }
.hero-info p { margin: 0; color: var(--soft); }
.hero-change { position: absolute; top: 12px; right: 12px; }
.rar { --rc: #a7b6c2; display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--rc); color: #13202a; font-size: 12px; font-weight: 800; }
.go { display: flex; flex-direction: column; gap: 10px; }
.go label { font-size: 14px; color: var(--soft); font-weight: 600; }
.go input, .join input, .af input, .af select, .field-row select, #sortSel { width: 100%; height: 48px; padding: 0 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--well); color: #fff; font-size: 17px; font-weight: 600; }
.go input:focus, .join input:focus, .af input:focus, .af select:focus { border-color: var(--yel); outline: 0; }
.go input:disabled { opacity: .8; }
.friends { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.join { display: flex; gap: 8px; }
.join input { text-transform: uppercase; letter-spacing: .12em; text-align: center; }
.join .btn { flex: none; }
.room-box { background: var(--well); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.room-box p { margin: 0; }
.room-box b { color: var(--yel); letter-spacing: .08em; }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row code { flex: 1; background: #071017; padding: 9px 10px; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.hint { margin: 2px 0 0; font-size: 14px; color: var(--soft); }
.hint .link { font-size: 14px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }
.day { display: grid; justify-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; background: var(--well); border: 2px solid transparent; font-size: 13px; color: var(--soft); }
.day b { color: #fff; font-size: 14px; }
.day em { font-style: normal; }
.day.got { background: rgba(61,220,132,.14); color: var(--green); }
.day.today { border-color: var(--yel); color: #fff; }
.day .coin { width: 16px; height: 16px; }
.earn-list { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid #22394a; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; font-size: 14px; }
.earn-list li { display: flex; justify-content: space-between; gap: 8px; color: var(--soft); }
.earn-list b { color: var(--yel); white-space: nowrap; }
.earn-head { margin: 14px 0 0; font-size: 14px; font-weight: 800; }
.day .coin::after { margin: 4px; width: 8px; height: 8px; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ch-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; background: var(--well); border-radius: 12px; padding: 10px 12px; }
.ch-list .bar { grid-column: 1 / -1; }
.ch-list .rw { display: inline-flex; gap: 6px; align-items: center; color: var(--yel); font-weight: 800; }
.ch-list li.done { background: rgba(61,220,132,.12); }
.ch-list li.done .rw { color: var(--green); }
.bar { height: 10px; border-radius: 999px; background: #22394a; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffb020, var(--yel)); transition: width .6s; }
.done .bar i { background: var(--green); }

/* Shop */
.deals { margin-bottom: 16px; }
.deal-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filters button { height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--line); background: rgba(15,27,36,.9); font-weight: 600; color: var(--soft); }
.filters button.on { background: #fff; color: #13202a; border-color: #fff; }
#sortSel { width: auto; height: 38px; font-size: 14px; margin-left: auto; padding: 0 10px; }
.count { margin: 0 0 10px; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.sk { --rc: #a7b6c2; position: relative; display: flex; flex-direction: column; text-align: left; gap: 2px; padding: 0 0 10px; border-radius: 16px; border: 2px solid color-mix(in srgb, var(--rc) 55%, #26404f); background: linear-gradient(180deg, #1a2d3a, #12202a); overflow: hidden; box-shadow: 0 5px 0 #081016; transition: transform .12s, box-shadow .12s; }
.sk:hover { transform: translateY(-3px); box-shadow: 0 8px 0 #081016, 0 0 0 3px color-mix(in srgb, var(--rc) 40%, transparent); }
.sk:active { transform: translateY(3px); box-shadow: 0 2px 0 #081016; }
.sk img { width: 100%; aspect-ratio: 300 / 120; display: block; }
.sk b { padding: 6px 10px 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk .from { padding: 0 10px; font-size: 13px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk .price { margin: 6px 10px 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--yel); font-variant-numeric: tabular-nums; }
.sk .price s { color: var(--soft); font-weight: 400; font-size: 13px; }
.sk .price.own { color: var(--green); }
.sk .price.lock { color: #ff8db0; font-weight: 600; font-size: 13px; }
.sk .price svg { width: 15px; height: 15px; }
.sk .tag { position: absolute; top: 8px; left: 8px; }
.sk .eq { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 999px; background: var(--yel); color: #13202a; font-size: 12px; font-weight: 800; }
.sk .off { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 999px; background: var(--red); font-size: 12px; font-weight: 800; }

/* Profile */
.prof-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.av-big { width: 96px; height: 96px; border-radius: 24px; background: #4f8a3c center/190% no-repeat; border: 3px solid var(--yel); box-shadow: 0 5px 0 var(--yel-d); }
.prof-main p { margin: 6px 0 10px; }
.xp { display: grid; gap: 6px; }
.xp-bar { height: 14px; border-radius: 999px; background: #0a1319; overflow: hidden; border: 2px solid #22394a; }
.xp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3d9bff, #7cc4ff); border-radius: inherit; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.xp span { font-size: 14px; color: var(--soft); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.stat { background: linear-gradient(180deg, #1a2d3a, #13202a); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.stat b { display: block; font: 400 26px/1.1 Bungee, sans-serif; font-variant-numeric: tabular-nums; }
.stat span { font-size: 14px; color: var(--soft); }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.ach { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--well); border: 2px solid #1d3341; }
.ach.got { border-color: #c99a06; background: linear-gradient(180deg, #2c2a14, #1a1c12); }
.ach b { font-size: 15px; }
.ach small { color: var(--soft); font-size: 13px; }
.ach .rw { font-size: 13px; color: var(--yel); font-weight: 600; }
.hist { display: grid; gap: 8px; }
.hrow { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 8px; align-items: center; background: var(--well); border-radius: 12px; padding: 10px 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.hrow b { color: #fff; }
.hrow span { color: var(--soft); white-space: nowrap; }
.hrow .cr { color: var(--yel); font-weight: 800; }
.empty { padding: 18px; text-align: center; color: var(--soft); background: var(--well); border-radius: 14px; }

/* Ranks */
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.seg button { height: 40px; padding: 0 14px; border-radius: 12px; border: 0; background: rgba(15,27,36,.9); color: var(--soft); font-weight: 600; box-shadow: 0 4px 0 #070d12; }
.seg button.on { background: #fff; color: #13202a; box-shadow: 0 4px 0 #8c9aa5; }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ranks li { display: grid; grid-template-columns: 44px 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 14px 8px 8px; border-radius: 14px; background: linear-gradient(180deg, #1a2d3a, #13202a); border: 2px solid var(--line); }
.ranks li.me { border-color: var(--yel); }
.ranks .n { font: 400 20px Bungee, sans-serif; text-align: center; color: var(--soft); }
.ranks li:nth-child(1) .n { color: #ffd23f; } .ranks li:nth-child(2) .n { color: #d5dde3; } .ranks li:nth-child(3) .n { color: #e39a5b; }
.ranks .pic { width: 52px; height: 34px; border-radius: 8px; background: #4f8a3c center/220% no-repeat; }
.ranks .who { overflow: hidden; }
.ranks .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranks .who small { color: var(--soft); font-size: 13px; }
.ranks .val { font: 400 20px Bungee, sans-serif; color: var(--yel); font-variant-numeric: tabular-nums; }

/* Settings */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.set-grid h3 { margin-bottom: 10px; }
.tog { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; border-bottom: 1px solid #1f3442; cursor: pointer; }
.tog input { position: absolute; opacity: 0; pointer-events: none; }
.tog i { width: 52px; height: 30px; border-radius: 999px; background: #2a3e4d; position: relative; flex: none; transition: background .2s; }
.tog i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.tog input:checked + i { background: var(--green); }
.tog input:checked + i::after { transform: translateX(22px); }
.tog input:focus-visible + i { outline: 3px solid var(--yel); outline-offset: 2px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.field-row select { width: auto; height: 42px; font-size: 15px; }
.acct-line { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.acct-line b { font-size: 18px; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: max(12px, var(--st)) 12px max(12px, var(--sb)); background: rgba(5,10,14,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; width: min(460px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; background: linear-gradient(180deg, #1a2d3a, #12202a); border: 3px solid #26404f; border-radius: 22px; padding: 22px; box-shadow: 0 10px 0 #070d12, 0 30px 60px rgba(0,0,0,.45); animation: pop .22s cubic-bezier(.2,.9,.3,1.2); touch-action: pan-y; }
@keyframes pop { from { transform: scale(.94) translateY(10px); opacity: 0; } }
.close { position: absolute; top: 12px; right: 12px; }
.skin-sheet { width: min(560px, 100%); padding: 0; overflow: hidden auto; }
#smCv { width: 100%; height: 170px; display: block; }
.sm-body { padding: 16px 20px 22px; display: grid; gap: 8px; }
.sm-body p { margin: 0; }
.sm-body .rar { justify-self: start; }
.sm-body .btn { margin-top: 8px; }
.auth h2 { margin: 6px 0 12px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .eu { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #3d9bff, #1b4fb0); font: 400 18px Bungee, sans-serif; box-shadow: 0 4px 0 #0d2a66; }
.auth-brand small { display: block; color: var(--soft); font-size: 13px; }
.af { display: grid; gap: 12px; }
.af label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--soft); }
.af label small, .born small { font-weight: 400; font-size: 13px; }
.af p { margin: 0; }
.born { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--soft); }
.born-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px; }
.af label.check { display: flex; align-items: flex-start; gap: 10px; color: #fff; font-weight: 400; font-size: 15px; }
.af label.check input { width: 22px; height: 22px; flex: none; margin: 1px 0 0; accent-color: var(--yel); }
.links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #0b1820; border: 2px solid #22394a; font-size: 14px; }
.note.warn { border-color: #8a6a12; background: #221c0b; }
.note.err { border-color: #8a1a12; background: #2a0f0c; color: #ffb4ad; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.codes code { padding: 9px; border-radius: 10px; background: var(--well); text-align: center; font: 600 17px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .06em; user-select: all; -webkit-user-select: all; }
.dead .sheet { width: min(520px, 100%); text-align: left; }
.red { font: 400 clamp(36px, 9vw, 52px)/1 Bungee, sans-serif; color: var(--red); text-shadow: 0 4px 0 #6f130c; }
.red.left-ok { color: var(--yel); text-shadow: 0 4px 0 #8a6a00; }
.why { margin: 10px 0 14px; color: var(--soft); font-size: 17px; }
.d-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.d-stats div { background: var(--well); border-radius: 12px; padding: 9px 12px; }
.d-stats b { display: block; font: 400 24px Bungee, sans-serif; font-variant-numeric: tabular-nums; }
.d-stats span { font-size: 13px; color: var(--soft); }
.earn { margin: 12px 0; padding: 12px; border-radius: 14px; background: var(--well); display: grid; gap: 10px; }
.earn-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.big-cr { display: inline-flex; align-items: center; gap: 8px; font: 400 26px Bungee, sans-serif; color: var(--yel); }
.big-cr .coin { width: 24px; height: 24px; }
.big-cr .coin::after { margin: 7px; }
.d-extra { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.d-extra li { display: flex; justify-content: space-between; gap: 10px; }
.d-extra li b { color: var(--yel); white-space: nowrap; }
.d-extra li.lv { color: #7cc4ff; }
.ad { border: 2px dashed #3d5a72; border-radius: 12px; padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; margin-bottom: 14px; }
.ad span { font-weight: 800; }
.ad small { font-size: 13px; color: var(--soft); }
.ad b { grid-row: 1 / 3; grid-column: 2; font: 400 30px Bungee, sans-serif; color: var(--yel); }
.rules ul { padding-left: 20px; margin: 8px 0 14px; }
.rules li { margin: 4px 0; }
.rules h3 { margin-top: 14px; }
.rules a { color: var(--yel); }

/* Toasts */
.toasts { position: fixed; top: calc(12px + var(--st)); left: 50%; transform: translateX(-50%); z-index: 40; display: grid; gap: 8px; width: min(420px, calc(100% - 24px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; background: #0f1b24; border: 2px solid #2a4556; box-shadow: 0 6px 0 #060b0f, 0 12px 24px rgba(0,0,0,.35); font-weight: 600; animation: tin .25s cubic-bezier(.2,.9,.3,1.3); }
.toast.gold { border-color: #c99a06; }
.toast.good { border-color: #2fbf6f; }
.toast.bad { border-color: #b8281e; }
.toast.go { animation: tout .3s forwards; }
@keyframes tin { from { transform: translateY(-14px) scale(.96); opacity: 0; } }
@keyframes tout { to { transform: translateY(-10px); opacity: 0; } }

/* ---------- HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.hud .pill { background: var(--hud); border-radius: 14px; padding: 8px 12px; box-shadow: 0 4px 0 rgba(0,0,0,.3); }
.hud-tl { position: absolute; top: calc(12px + var(--st)); left: calc(12px + var(--sl)); display: grid; gap: 8px; max-width: calc(100vw - 250px); }
.stats { display: flex; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.stats span { display: grid; line-height: 1.1; }
.stats small { font-size: 12px; color: var(--soft); }
.stats b { font: 400 20px Bungee, sans-serif; color: var(--yel); font-variant-numeric: tabular-nums; }
.stats .ico { pointer-events: auto; width: 36px; height: 36px; }
#feed { display: grid; gap: 4px; font-size: 13px; justify-items: start; }
#feed div { background: rgba(11,21,29,.72); padding: 4px 9px; border-radius: 8px; max-width: 100%; animation: tin .2s; }
#feed .me { color: var(--yel); font-weight: 600; }
.hud-tr { position: absolute; top: calc(12px + var(--st)); right: calc(12px + var(--sr)); width: 210px; }
.hud-tr h3 { font: 400 14px Bungee, sans-serif; color: var(--yel); margin-bottom: 4px; }
#lb { margin: 0; padding: 0; list-style: none; font-size: 14px; }
#lb li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 4px; padding: 1px 0; }
#lb li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#lb li span:last-child { font-variant-numeric: tabular-nums; }
#lb li.me { color: var(--yel); font-weight: 600; }
#lb li.gap { color: var(--soft); }
.hud-br { position: absolute; right: calc(12px + var(--sr)); bottom: calc(12px + var(--sb)); padding: 5px !important; }
#mini { width: 140px; height: 140px; display: block; border-radius: 9px; }
.horns { position: absolute; left: calc(12px + var(--sl)); bottom: calc(12px + var(--sb)); display: flex; gap: 8px; pointer-events: auto; }
.horns button { min-width: 56px; height: 42px; padding: 0 8px; border-radius: 12px; border: 2px solid rgba(255,255,255,.14); background: var(--hud); font-weight: 800; font-size: 14px; box-shadow: 0 4px 0 rgba(0,0,0,.35); transition: transform .06s; }
.horns button:active { transform: translateY(3px); background: var(--yel); color: #13202a; }
.pad { display: none; position: absolute; bottom: calc(18px + var(--sb)); left: calc(16px + var(--sl)); grid-template-columns: repeat(3, 58px); grid-template-rows: repeat(3, 58px); grid-template-areas: ". u ." "l . r" ". d ."; pointer-events: auto; touch-action: none; }
.pad button { border-radius: 14px; border: 2px solid rgba(255,255,255,.18); background: var(--hud); font-size: 22px; box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.pad button.on { background: var(--yel); color: #13202a; }
.pad .u { grid-area: u; } .pad .l { grid-area: l; } .pad .r { grid-area: r; } .pad .d { grid-area: d; }
.pad.right { left: auto; right: calc(16px + var(--sr)); }
.boost { display: none; position: absolute; right: calc(18px + var(--sr)); bottom: calc(26px + var(--sb)); width: 96px; height: 96px; border-radius: 50%; border: 0; background: radial-gradient(circle at 40% 35%, #ff6a5f, var(--red)); font: 400 16px Bungee, sans-serif; box-shadow: 0 6px 0 var(--red-d); pointer-events: auto; touch-action: none; }
.boost.on, .boost:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--red-d); }
.boost.left { right: auto; left: calc(18px + var(--sl)); }
.popup { position: absolute; left: 50%; top: 28%; transform: translate(-50%, -50%); text-align: center; font: 400 clamp(22px, 5vw, 34px)/1.1 Bungee, sans-serif; color: var(--yel); text-shadow: 0 4px 0 #6b4f00, 0 0 24px rgba(0,0,0,.5); pointer-events: none; opacity: 0; }
.popup small { display: block; font: 800 16px Rubik, sans-serif; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.6); margin-top: 6px; }
.popup.show { animation: popup 1.4s ease-out; }
@keyframes popup { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -62%); } }
.room-tag { position: absolute; left: 50%; bottom: calc(12px + var(--sb)); transform: translateX(-50%); font-size: 14px; pointer-events: auto; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.room-tag b { color: var(--yel); letter-spacing: .08em; }

@media (pointer: coarse) {
  .pad { display: grid; }
  .pad.off { display: none; }
  .boost { display: grid; place-items: center; }
  .hud-br { display: none; }
  .horns { left: auto; right: calc(12px + var(--sr)); bottom: calc(136px + var(--sb)); flex-direction: column; }
  .horns.left { right: auto; left: calc(12px + var(--sl)); }
  .horns button { height: 38px; min-width: 60px; }
  .horns button:nth-child(n+5) { display: none; }
  .room-tag { display: none !important; }
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .menu { grid-template-rows: auto minmax(0, 1fr); }
  .top { padding: 10px 12px 6px; }
  .logo { font-size: 22px; }
  .brand { gap: 8px; }
  .online { font-size: 12px; padding: 4px 8px; }
  .chip { height: 36px; padding: 0 9px; }
  .chip.acct b { max-width: 70px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; justify-content: space-around; gap: 0; padding: 6px 4px calc(6px + var(--sb)); background: rgba(9,16,22,.96); border-top: 2px solid #1d3240; }
  .tabs button { flex-direction: column; gap: 2px; height: 54px; padding: 0 6px; flex: 1; box-shadow: none; background: none; font-size: 12px; border-radius: 12px; }
  .tabs button:hover { transform: none; box-shadow: none; }
  .tabs button.on { background: rgba(255,210,63,.14); color: var(--yel); box-shadow: none; }
  .tabs button svg { width: 22px; height: 22px; }
  .panels { padding: 4px 12px calc(92px + var(--sb)); }
  .play-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hero { min-height: 210px; }
  .day em { display: none; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .earn-list { grid-template-columns: minmax(0, 1fr); }
  .deal-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .prof-head { grid-template-columns: auto minmax(0, 1fr); }
  .prof-cta { grid-column: 1 / -1; }
  .av-big { width: 72px; height: 72px; border-radius: 18px; }
  .hrow { grid-template-columns: minmax(0, 1fr) repeat(2, auto); }
  .hrow .hx { display: none; }
  .ranks li { grid-template-columns: 34px 46px minmax(0, 1fr) auto; gap: 8px; }
  .hud-tl { max-width: calc(100vw - 180px); }
  .hud-tr { width: 150px; }
  #lb { font-size: 13px; }
  #lb li:nth-child(n+5):not(.me) { display: none; }
  .stats { gap: 2px 10px; }
  .stats b { font-size: 16px; }
  .stats span:nth-of-type(4) { display: none; }
  .filters button { height: 36px; padding: 0 11px; font-size: 14px; }
  #sortSel { margin-left: 0; }
}
@media (max-width: 420px) {
  .online { display: none; }
  .chip.lvl { display: none; }
  .friends { grid-template-columns: minmax(0, 1fr); }
}
