/* GRAND RETARD AUTO: game chrome over the 3D city. Hard borders, pixel fonts, loud toy-city colours. */
@font-face { font-family: 'PS2P'; src: url('/fonts/PressStart2P-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'VT323'; src: url('/fonts/VT323-Regular.ttf') format('truetype'); font-display: swap; }

:root {
  --ink: #0e0e12; --ink2: #1a1a22; --ink3: #262631; --line: #000;
  --pink: #ff2e88; --lime: #b6ff2e; --yellow: #ffe62e; --cyan: #2ee6ff; --orange: #ff8c2e; --red: #ff3b3b; --violet: #c05cff;
  --text: #f4f4ec; --dim: #9b9bab;
  --px: 'PS2P', 'Courier New', monospace; --vt: 'VT323', 'Courier New', monospace;
  --panel-w: 404px; --hud-h: 64px; --tick-h: 26px; --nav-h: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0e0e12; color: var(--text); }
body { font: 21px/1.15 var(--vt); -webkit-font-smoothing: none; font-smooth: never; user-select: none; -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; color: inherit; }
a { color: var(--cyan); }
.hide { display: none !important; }

#world { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; }
#noworld-bg { position: fixed; inset: 0; background:
  repeating-linear-gradient(90deg, transparent 0 46px, #ffe62e18 46px 50px),
  repeating-linear-gradient(0deg, transparent 0 46px, #ffffff08 46px 50px), #1d1f27; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 2; }
#ui > * { pointer-events: auto; }

/* ───────────── windows + buttons ───────────── */
.win { background: var(--ink); border: 4px solid var(--line); box-shadow: 0 0 0 3px var(--yellow), 7px 7px 0 3px var(--line); position: relative; }
.win-bar { display: flex; align-items: center; gap: 8px; background: var(--yellow); color: #000; border-bottom: 4px solid var(--line); padding: 6px 6px 6px 10px; min-height: 40px; }
.win-title { font: 13px/1.3 var(--px); flex: 1; text-transform: uppercase; letter-spacing: 1px; }
.win-body { padding: 12px; }
.x { font: 12px var(--px); background: var(--pink); color: #000; border: 3px solid #000; width: 34px; height: 34px; cursor: pointer; box-shadow: 0 3px 0 #000; }
.x:active { transform: translateY(2px); box-shadow: 0 1px 0 #000; }

.btn { font: 12px/1.2 var(--px); text-transform: uppercase; background: var(--yellow); color: #000; border: 3px solid #000; padding: 11px 14px; min-height: 44px;
  box-shadow: 0 4px 0 #000, inset -3px -3px 0 #0003, inset 3px 3px 0 #fff6; cursor: pointer; position: relative; top: 0; letter-spacing: .5px; }
.btn:hover:not(:disabled) { filter: brightness(1.1); }
.btn:active:not(:disabled) { top: 2px; box-shadow: 0 2px 0 #000, inset -3px -3px 0 #0003, inset 3px 3px 0 #fff6; }
.btn.btn:disabled { background: #4a4a55; color: #8c8c99; cursor: not-allowed; box-shadow: 0 4px 0 #000; }
.btn.pink { background: var(--pink); } .btn.lime { background: var(--lime); } .btn.cyan { background: var(--cyan); } .btn.orange { background: var(--orange); }
.btn.dark { background: var(--ink3); color: var(--text); }
.btn.big { font-size: 15px; padding: 16px 18px; min-height: 56px; }
.btn.small { font-size: 10px; padding: 7px 9px; min-height: 36px; }
.btn.block { display: block; width: 100%; }
.why { font: 18px var(--vt); color: var(--orange); margin: 4px 0 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.split > * { flex: 1; }
.big-txt { font-size: 24px; margin: 4px 0 14px; }
.dim { color: var(--dim); }
.lime-t { color: var(--lime); } .pink-t { color: var(--pink); } .yel-t { color: var(--yellow); } .cyan-t { color: var(--cyan); } .org-t { color: var(--orange); }
h3 { font: 11px/1.4 var(--px); color: var(--yellow); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 1px; }
h3:first-child { margin-top: 2px; }
.px { font-family: var(--px); }
.stars { color: var(--yellow); letter-spacing: 1px; white-space: nowrap; }
.stars i { color: #ffffff30; font-style: normal; }

/* LCD counters */
.lcd { background: #050806; border: 3px solid #000; box-shadow: inset 0 0 0 2px #2b3a2b; color: var(--lime); font: 28px/1 var(--vt); padding: 4px 8px 2px; text-shadow: 0 0 6px #b6ff2e66; white-space: nowrap; }
.lcd.pink { color: var(--pink); text-shadow: 0 0 6px #ff2e8866; } .lcd.yel { color: var(--yellow); text-shadow: 0 0 6px #ffe62e66; } .lcd.cyan { color: var(--cyan); text-shadow: 0 0 6px #2ee6ff66; }
.lcd.huge { font-size: 56px; padding: 10px 12px 6px; text-align: center; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { background: var(--ink2); border: 3px solid #000; padding: 6px 8px; }
.stat .k { font: 8px/1.4 var(--px); color: var(--dim); text-transform: uppercase; display: block; margin-bottom: 4px; }
.stat .v { font-size: 26px; line-height: 1; color: var(--text); }
.note { background: var(--ink2); border: 3px dashed #ffffff30; padding: 8px 10px; font-size: 19px; color: #d8d8e0; margin: 10px 0; }
.note.warn { border-color: var(--orange); color: var(--orange); }
.callout { background: var(--pink); color: #000; border: 3px solid #000; padding: 10px 12px; font-size: 22px; box-shadow: 4px 4px 0 #000; margin: 4px 0 12px; }
.callout b { font: 11px/1.5 var(--px); display: block; margin-bottom: 4px; }
.callout.lime { background: var(--lime); } .callout.cyan { background: var(--cyan); } .callout.yel { background: var(--yellow); }
.bar { height: 22px; background: #050806; border: 3px solid #000; position: relative; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, var(--lime) 0 10px, #8ad11f 10px 14px); }
.bar > span { position: absolute; inset: 0; display: grid; place-items: center; font: 9px var(--px); color: #fff; text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 20px; }
.tbl th { font: 8px var(--px); color: var(--dim); text-align: left; padding: 4px 6px; text-transform: uppercase; }
.tbl td { padding: 5px 6px; border-top: 2px solid #ffffff12; }
.tbl tr.me td { background: #ff2e8833; color: var(--pink); }
.tbl td.r, .tbl th.r { text-align: right; }
.chip { display: inline-block; width: 14px; height: 14px; border: 2px solid #000; vertical-align: -1px; margin-right: 6px; }
.feed { list-style: none; margin: 0; padding: 0; font-size: 19px; }
.feed li { padding: 4px 0; border-top: 2px solid #ffffff10; color: #dcdce4; }
.feed li .t { color: var(--dim); margin-right: 6px; }
.feed li.claim { color: var(--lime); } .feed li.pull { color: var(--cyan); } .feed li.fuse { color: var(--violet); } .feed li.upgrade { color: var(--yellow); }

/* ───────────── logo ───────────── */
.logo { font-family: var(--px); line-height: 1; text-align: center; user-select: none; }
.logo .w { display: inline-block; margin: 0 .22em; white-space: nowrap; }
.logo .l { display: inline-block; font-size: 1em; -webkit-text-stroke: .09em #000; paint-order: stroke fill;
  text-shadow: .06em .06em 0 #000, .12em .12em 0 #000, .12em .12em 0 #000; transform: rotate(var(--r, 0deg)) translateY(var(--y, 0)); }
.logo .w1 .l { color: var(--yellow); } .logo .w2 .l { color: var(--pink); } .logo .w3 .l { color: var(--lime); }
.logo .flip { transform: rotate(calc(180deg + var(--r, 0deg))) translateY(var(--y, 0)); text-shadow: -.06em -.06em 0 #000, -.12em -.12em 0 #000; }
.logo .back { transform: scaleX(-1) rotate(var(--r, 0deg)) translateY(var(--y, 0)); text-shadow: -.06em .06em 0 #000, -.12em .12em 0 #000; }
.logo .sub { display: block; font: 18px var(--vt); color: #fff; margin-top: .6em; letter-spacing: 1px; }
.logo.mini { font-size: 13px; }
.logo.mini .w { margin: 0 .15em; }

/* ───────────── start screen ───────────── */
#start { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 16px;
  background: linear-gradient(180deg, #0e0e12cc 0%, #0e0e1244 40%, #0e0e1244 60%, #0e0e12dd 100%); z-index: 5; }
#start .logo { font-size: clamp(30px, 8vw, 64px); }
.badge { font: 11px var(--px); padding: 7px 10px; border: 3px solid #000; color: #000; box-shadow: 3px 3px 0 #000; display: inline-block; }
.badge.test { background: var(--cyan); } .badge.live { background: var(--lime); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { background: var(--yellow); } }
.start-box { width: min(480px, 100%); }
.start-box .btn { margin-bottom: 14px; }
.howto3 { list-style: none; margin: 4px 0 0; padding: 0; font-size: 21px; }
.howto3 li { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; }
.howto3 li b { font: 11px var(--px); color: #000; background: var(--yellow); border: 2px solid #000; padding: 4px 6px; flex: none; }
.start-foot { font-size: 18px; color: var(--dim); text-align: center; }
.start-foot a { color: var(--dim); }

/* wallet list */
.wallets { display: grid; gap: 10px; }
.wallet-btn { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--ink2); color: var(--text); border: 3px solid #000; box-shadow: 0 4px 0 #000, inset 0 0 0 2px #ffffff14;
  padding: 8px 12px; min-height: 56px; cursor: pointer; font: 12px var(--px); position: relative; top: 0; }
.wallet-btn:hover { background: var(--ink3); outline: 3px solid var(--yellow); outline-offset: -3px; }
.wallet-btn:active { top: 2px; box-shadow: 0 2px 0 #000; }
.wallet-btn img, .wallet-btn .wi { width: 34px; height: 34px; image-rendering: auto; border: 2px solid #000; background: #fff; flex: none; }
.wallet-btn small { display: block; font: 17px var(--vt); color: var(--dim); margin-top: 3px; }
.wallet-btn:disabled { opacity: .6; cursor: wait; }

/* ───────────── HUD ───────────── */
#hud { position: fixed; top: 0; left: 0; right: 0; height: var(--hud-h); display: flex; align-items: stretch; gap: 8px; padding: 8px 10px 0; z-index: 3; pointer-events: none; }
#hud > * { pointer-events: auto; }
.hud-who { background: var(--ink); border: 3px solid #000; box-shadow: 4px 4px 0 #000; display: flex; flex-direction: column; justify-content: center; padding: 3px 10px; min-width: 0; max-width: 240px; cursor: pointer; }
.hud-who .nm { font: 11px/1.4 var(--px); color: var(--yellow); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-who .rl { font-size: 17px; color: var(--dim); white-space: nowrap; }
.hud-who .rl b { font: 8px var(--px); color: #000; background: var(--cyan); padding: 2px 4px; margin-right: 4px; }
.hud-who .rl b.live { background: var(--lime); }
.hud-cab { flex: 1; display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.cnt { background: var(--ink); border: 3px solid #000; box-shadow: 4px 4px 0 #000; padding: 3px 8px 2px; min-width: 0; display: flex; flex-direction: column; justify-content: center; cursor: default; }
.cnt .k { font: 7px/1.3 var(--px); color: var(--dim); text-transform: uppercase; white-space: nowrap; }
.cnt .v { font: 27px/1 var(--vt); color: var(--lime); white-space: nowrap; text-shadow: 0 0 6px #b6ff2e55; }
.cnt.money .v { color: var(--yellow); text-shadow: 0 0 6px #ffe62e55; }
.cnt.earn { cursor: pointer; }
.cnt.earn .v { color: var(--pink); text-shadow: 0 0 6px #ff2e8855; min-width: 5.2em; }
.cnt.earn.ready { animation: readyflash .8s steps(2) infinite; }
@keyframes readyflash { 50% { background: #ff2e8840; } }
.cnt.pool .v { color: var(--cyan); text-shadow: 0 0 6px #2ee6ff55; }
.hud-btns { display: flex; gap: 6px; }
.ibtn { width: 48px; min-height: 48px; background: var(--ink); color: var(--text); border: 3px solid #000; box-shadow: 0 4px 0 #000; cursor: pointer; display: grid; place-items: center; position: relative; top: 0; padding: 0; }
.ibtn:active { top: 2px; box-shadow: 0 2px 0 #000; }
a.ibtn, a.btn { text-decoration: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
a.btn.block { display: flex; }
.xrow { gap: 10px; text-transform: none; }
.xrow .pxi { width: 18px; height: 18px; flex: none; }
/* start page: the X link sits in the top right corner, outside the centred column */
.xcorner { position: absolute; top: 12px; right: 12px; z-index: 2; min-height: 40px; padding: 8px 12px; font-size: 10px; }
@media (max-width: 760px) { .xcorner { top: 8px; right: 8px; } }
@media (max-width: 380px) { .ibtn.xb { display: none; } } /* very narrow phones: the menu still has the X link */
.ibtn.off svg { opacity: .35; }
.ibtn.off::after { content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 4px; background: var(--pink); transform: rotate(-35deg); }
.pxi { width: 24px; height: 24px; shape-rendering: crispEdges; display: block; }

#ticker { position: fixed; top: calc(var(--hud-h) + 6px); left: 10px; right: calc(var(--panel-w) + 26px); height: var(--tick-h); background: var(--yellow); color: #000; border: 3px solid #000; box-shadow: 4px 4px 0 #000;
  overflow: hidden; white-space: nowrap; z-index: 3; font-size: 20px; line-height: 20px; }
#ticker .lbl { position: absolute; left: 0; top: 0; bottom: 0; z-index: 1; background: var(--pink); font: 9px/20px var(--px); padding: 0 8px; border-right: 3px solid #000; }
#ticker .run { display: inline-block; padding-left: 100%; animation: tick var(--dur, 40s) linear infinite; }
#ticker .run span { margin-right: 46px; }
#ticker .run span::before { content: '>> '; color: #b30059; }
@keyframes tick { to { transform: translateX(-100%); } }

/* nav */
#nav { position: fixed; left: 10px; bottom: 10px; right: calc(var(--panel-w) + 26px); display: flex; gap: 6px; z-index: 3; flex-wrap: nowrap; }
.navb { flex: 1 1 0; min-width: 0; background: var(--ink); color: var(--text); border: 3px solid #000; box-shadow: 0 4px 0 #000; cursor: pointer; padding: 6px 4px 5px;
  display: flex; flex-direction: column; align-items: center; gap: 5px; font: 8px/1.2 var(--px); text-transform: uppercase; position: relative; top: 0; min-height: 56px; }
.navb:hover { background: var(--ink3); }
.navb:active { top: 2px; box-shadow: 0 2px 0 #000; }
/* teaser places (next update): construction stripes + a SOON tag */
.navb.soonb { background: repeating-linear-gradient(-45deg, var(--ink) 0 7px, #241f12 7px 14px); color: #e8e2c8; box-shadow: 0 4px 0 #000, inset 0 0 0 2px #ff8c2e66; }
.navb.soonb:hover:not(.on):not(.going) { background: var(--ink3); }
.navb .soon { position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(-5deg); background: var(--orange); color: #000; border: 2px solid #000; font: 7px/1 var(--px); padding: 2px 3px 1px; pointer-events: none; overflow: visible; }
.navb.on { background: var(--yellow); color: #000; }
.navb.going { background: var(--cyan); color: #000; }
.navb .dot { position: absolute; top: -7px; right: -5px; background: var(--pink); color: #000; border: 2px solid #000; font: 8px var(--px); padding: 2px 3px; }
.navb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
/* 9 places: smaller labels on narrow desktops, two rows when the bar gets really short */
@media (min-width: 761px) and (max-width: 1180px) { .navb { font-size: 7px; } }
@media (min-width: 761px) and (max-width: 1000px) { #nav { flex-wrap: wrap; row-gap: 10px; } .navb { flex: 1 1 calc(20% - 6px); min-height: 50px; } }

/* place panel */
#panel { position: fixed; right: 13px; top: calc(var(--hud-h) + 8px); bottom: 14px; width: var(--panel-w); z-index: 3; display: flex; flex-direction: column; }
#panel .win-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--yellow) var(--ink2); user-select: text; }
#panel .win-bar .grip { display: none; }
#panel .blurb { font-size: 19px; color: var(--dim); margin: 0 0 10px; }
body.traveling #panel { opacity: 0; transform: translateX(30px); pointer-events: none; transition: opacity .15s, transform .15s; }
#panel { transition: opacity .2s, transform .2s; }
body.cinema #hud, body.cinema #ticker, body.cinema #nav, body.cinema #panel, body.cinema #toasts { display: none !important; }

/* slots + cards */
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { aspect-ratio: 1; border: 3px solid #000; background: var(--ink2); position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2px; box-shadow: 0 3px 0 #000; overflow: hidden; }
.slot .n { position: absolute; top: 2px; left: 4px; font: 8px var(--px); color: var(--dim); z-index: 2; }
.slot.empty { border-style: dashed; border-color: var(--lime); background: repeating-linear-gradient(45deg, #b6ff2e10 0 6px, transparent 6px 12px); }
.slot.empty b { font: 8px/1.4 var(--px); color: var(--lime); }
.slot.locked { background: repeating-linear-gradient(45deg, #000 0 8px, #ffe62e 8px 16px); }
.slot.locked b { background: #000; color: var(--yellow); font: 8px/1.4 var(--px); padding: 3px 4px; }
.slot.building { background: repeating-linear-gradient(45deg, #ff8c2e 0 8px, #000 8px 16px); }
.slot.building b { background: #000; color: var(--orange); font: 8px/1.4 var(--px); padding: 3px 4px; }
.slot.card { border-color: var(--tc); background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--tc) 45%, transparent), var(--ink2) 70%); }
.slot.card img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; opacity: 0; }
.slot.card img.on { opacity: 1; }
.slot.card .p { position: absolute; bottom: 0; left: 0; right: 0; background: #000c; font-size: 16px; color: var(--lime); z-index: 2; }

.stash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tile { min-width: 0; overflow: hidden; background: var(--ink2); border: 3px solid #000; box-shadow: 0 3px 0 #000, inset 0 0 0 2px var(--tc); cursor: pointer; padding: 0; text-align: left; color: var(--text); position: relative; top: 0; }
.tile:hover { outline: 3px solid var(--yellow); outline-offset: -1px; }
.tile:active { top: 2px; box-shadow: 0 1px 0 #000, inset 0 0 0 2px var(--tc); }
.tile.sel { outline: 3px solid var(--pink); outline-offset: -1px; }
.tile.staked::after { content: 'WORKING'; position: absolute; top: 4px; right: 4px; font: 7px var(--px); background: var(--lime); color: #000; padding: 2px 3px; border: 2px solid #000; }
.thumb { aspect-ratio: 1; position: relative; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--tc) 55%, #000), #101015 72%); border-bottom: 3px solid #000; overflow: hidden; }
.thumb::before { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; font: 22px var(--px); color: #0006; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .2s; }
.thumb img.on { opacity: 1; }
.thumb:has(img.on)::before { display: none; }
.tile .meta { padding: 4px 6px 5px; }
.tile .nm { font-size: 17px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tile .ln { display: flex; justify-content: space-between; font-size: 16px; color: var(--dim); }
.tile .stars { font-size: 12px; }
.tile .lv { position: absolute; top: 4px; left: 4px; font: 8px var(--px); background: #000; color: var(--yellow); padding: 2px 3px; }
.tile.dupe .thumb::after { content: 'x' attr(data-dupes); position: absolute; bottom: 3px; right: 4px; font: 9px var(--px); color: #000; background: var(--violet); border: 2px solid #000; padding: 2px 3px; }

/* card detail */
.detail { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.detail .thumb { border: 4px solid #000; box-shadow: inset 0 0 0 3px var(--tc); }
.detail .tier { font: 10px var(--px); color: #000; background: var(--tc); padding: 4px 6px; border: 2px solid #000; display: inline-block; margin-bottom: 6px; }
.detail .name { font: 15px/1.4 var(--px); color: var(--yellow); margin: 2px 0 6px; }
.detail .bl { font-size: 21px; color: #dcdce4; margin: 0 0 8px; }
.detail .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.modal.wide { width: min(640px, calc(100vw - 28px)); }

/* modals + toasts */
#modals { position: fixed; inset: 0; z-index: 8; pointer-events: none; }
.modal-wrap { position: absolute; inset: 0; background: #000a; display: flex; align-items: center; justify-content: center; padding: 16px; pointer-events: auto; animation: pop .12s steps(3); }
@keyframes pop { from { opacity: 0; } }
.modal { width: min(460px, calc(100vw - 28px)); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.modal .win-body { overflow-y: auto; user-select: text; }
.input { width: 100%; background: #050806; color: var(--lime); border: 3px solid #000; box-shadow: inset 0 0 0 2px #2b3a2b; font: 28px var(--vt); padding: 6px 10px; outline: none; user-select: text; }
.input:focus { box-shadow: inset 0 0 0 2px var(--lime); }
#toasts { position: fixed; z-index: 9; top: calc(var(--hud-h) + 44px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); border: 3px solid #000; box-shadow: 4px 4px 0 #000, inset 0 0 0 2px var(--cyan); padding: 8px 10px; display: flex; gap: 10px; align-items: baseline; font-size: 20px; animation: slidein .18s steps(3); cursor: pointer; }
.toast b { font: 9px var(--px); color: #000; background: var(--cyan); padding: 3px 5px; flex: none; }
.toast.err { box-shadow: 4px 4px 0 #000, inset 0 0 0 2px var(--red); } .toast.err b { background: var(--red); }
.toast.win { box-shadow: 4px 4px 0 #000, inset 0 0 0 2px var(--lime); } .toast.win b { background: var(--lime); }
.toast.big { flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 14px 12px; font-size: 22px; box-shadow: 4px 4px 0 #000, inset 0 0 0 3px var(--yellow); }
.toast.big b { font-size: 14px; padding: 6px 8px; background: var(--yellow); }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .25s; }
@keyframes slidein { from { transform: translateY(-12px); opacity: 0; } }

/* menu */
.menu { display: grid; gap: 10px; }
/* pack panel */
.odds td:first-child { white-space: nowrap; }
.result-strip { display: grid; gap: 8px; }
.res { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: center; background: var(--ink2); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--tc); padding: 4px; }
.res .thumb { border: 2px solid #000; }
.res .nm { font-size: 19px; line-height: 1; }
.pick-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-height: 52vh; overflow-y: auto; }
/* lab */
.fuse-row { display: grid; grid-template-columns: 1fr 40px 1fr; align-items: center; gap: 6px; text-align: center; margin: 10px 0; }
.fuse-row .arrow { font: 16px var(--px); color: var(--violet); }
.fuse-row .lcd { font-size: 30px; }
/* coming-soon panels */
.soon-tape { background: repeating-linear-gradient(45deg, var(--yellow) 0 12px, #000 12px 24px); border: 3px solid #000; padding: 6px; margin: 2px 0 14px; text-align: center; transform: rotate(-1.2deg); box-shadow: 3px 3px 0 #000; }
.soon-tape span { display: inline-block; background: #000; color: var(--yellow); font: 12px/1.3 var(--px); padding: 6px 10px; letter-spacing: 1px; }
.soon-list { list-style: none; margin: 0 0 14px; padding: 0; }
.soon-list li { position: relative; padding: 5px 0 5px 26px; border-top: 2px solid #ffffff10; font-size: 20px; }
.soon-list li::before { content: ''; position: absolute; left: 4px; top: 10px; width: 10px; height: 10px; background: var(--orange); border: 2px solid #000; }
.soon-foot { font-size: 17px; margin: 8px 0 0; }
/* payment window */
.steps { list-style: none; margin: 0 0 10px; padding: 0; }
.steps li { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 22px; color: var(--dim); }
.steps li i { width: 20px; height: 20px; border: 3px solid #000; background: var(--ink3); flex: none; }
.steps li.now { color: var(--yellow); } .steps li.now i { background: var(--yellow); animation: blink2 .5s steps(2) infinite; }
.steps li.ok { color: var(--lime); } .steps li.ok i { background: var(--lime); }
.steps li.bad { color: var(--red); } .steps li.bad i { background: var(--red); }
@keyframes blink2 { 50% { background: var(--ink3); } }
/* fallback pack reveal (no 3D world) */
.reveal { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.reveal .tile { animation: flip .35s steps(4) both; }
@keyframes flip { from { transform: rotateY(90deg); } }

/* ───────────── phone: bottom bar + bottom sheet ───────────── */
@media (max-width: 760px) {
  :root { --hud-h: 98px; --nav-h: 62px; }
  body { font-size: 20px; }
  #hud { flex-wrap: wrap; height: auto; padding: 6px 6px 0; gap: 5px; }
  .hud-who { order: 1; flex: 1; max-width: none; padding: 2px 8px; box-shadow: 3px 3px 0 #000; }
  .hud-btns { order: 2; gap: 4px; }
  .ibtn { width: 44px; min-height: 44px; }
  .hud-cab { order: 3; flex-basis: 100%; gap: 4px; }
  .cnt { flex: 1 1 0; padding: 2px 4px; box-shadow: 3px 3px 0 #000; }
  .cnt .v { font-size: 21px; }
  .cnt .k { font-size: 6px; }
  .cnt.opt { display: none; }
  .cnt.earn .v { min-width: 0; }
  #ticker { top: calc(var(--hud-h) + 2px); left: 6px; right: 6px; height: 24px; font-size: 18px; line-height: 18px; }
  #ticker .lbl { line-height: 18px; }
  #nav { left: 0; right: 0; bottom: 0; gap: 0; background: #000; padding: 4px 3px calc(4px + env(safe-area-inset-bottom)); border-top: 3px solid var(--yellow); }
  .navb { min-height: 52px; box-shadow: none; border-width: 2px; font-size: 6px; padding: 5px 1px 4px; gap: 4px; }
  .navb:active { top: 1px; }
  .navb.soonb { box-shadow: inset 0 0 0 2px #ff8c2e66; }
  .navb .soon { font-size: 6px; top: -9px; padding: 2px 2px 1px; }
  #panel { left: 4px; right: 4px; width: auto; top: auto; bottom: calc(var(--nav-h) + 8px + env(safe-area-inset-bottom)); max-height: 54vh; height: 54vh; }
  #panel.collapsed { height: auto; }
  #panel.collapsed .win-body { display: none; }
  #panel .win-bar { cursor: pointer; }
  #panel .win-bar .grip { display: block; font: 10px var(--px); }
  .win { box-shadow: 0 0 0 3px var(--yellow), 4px 4px 0 3px var(--line); }
  .detail { grid-template-columns: 1fr; }
  .detail .thumb { max-width: 220px; margin: 0 auto; width: 100%; }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .stash, .pick-list { grid-template-columns: repeat(3, 1fr); }
  #toasts { top: calc(var(--hud-h) + 34px); }
  #start { justify-content: flex-start; padding-top: 9vh; gap: 14px; }
  .lcd.huge { font-size: 44px; }
}
@media (max-width: 380px) { .stash, .pick-list { grid-template-columns: repeat(2, 1fr); } .navb { letter-spacing: -.6px; } }
@media (prefers-reduced-motion: reduce) { #ticker .run { animation-duration: 160s; } .badge.live, .cnt.earn.ready { animation: none; } }

/* notice bar under the news ticker: pause (live players), "the game is live" (test players) */
#notice { position: fixed; z-index: 4; top: calc(var(--hud-h) + var(--tick-h) + 18px); left: 10px; right: calc(var(--panel-w) + 26px); display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 3px solid #000; box-shadow: 4px 4px 0 #000; font: 20px/20px var(--vt, 'VT323', monospace); color: #000; }
#notice.hide, #hud.hide ~ #notice, body.cinema #notice { display: none !important; }
#notice b { font: 9px/20px var(--px); background: #000; color: #fff; padding: 0 8px; flex: none; }
#notice span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#notice button { flex: none; font: 9px/20px var(--px); padding: 2px 8px; background: #000; color: var(--yellow); border: 0; cursor: pointer; }
#notice.n-paused { background: #ff4d4d; }
#notice.n-golive { background: var(--cyan, #2ee6ff); }
@media (max-width: 760px) {
  #notice { left: 6px; right: 6px; top: calc(var(--hud-h) + 32px); font-size: 17px; line-height: 17px; gap: 6px; padding: 4px 6px; }
}
