:root {
  --bg: #0d110c; --panel: #151a13; --panel2: #1f271b; --line: #34402c;
  --text: #f3f6ee; --muted: #9fae95; --accent: #ffd23f; --accent2: #3ee08f; --danger: #ff5a5f; --blue: #58a6ff;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
input { font: inherit; color: inherit; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.h { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }

/* ------------------------------------------------------------ screens */
.screen { position: fixed; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y;
  background: linear-gradient(180deg, rgba(13, 17, 12, .55), rgba(13, 17, 12, .82) 45%, rgba(13, 17, 12, .94)); }
#help, #pick, #tour { background: rgba(13, 17, 12, .9); }
.screen.overlay { background: rgba(8, 12, 8, .86); backdrop-filter: blur(3px); }
.wrap { max-width: 520px; margin: 0 auto; padding: calc(18px + var(--sat)) calc(14px + var(--sar)) calc(28px + var(--sab)) calc(14px + var(--sal)); display: flex; flex-direction: column; gap: 10px; }
.wrap.narrow { max-width: 380px; padding-top: 20vh; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.head .t { font-size: 26px; }
.card { background: rgba(21, 26, 19, .92); border: 1px solid #ffffff1c; border-radius: 14px; padding: 12px; box-shadow: 0 6px 20px #0006; text-align: left; }
.card p { font-size: 13px; line-height: 1.45; color: #d6dfcc; }
.card ul { padding-left: 18px; font-size: 13px; line-height: 1.5; color: #d6dfcc; display: flex; flex-direction: column; gap: 4px; }
.card b { color: #fff; }
.lbl { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; display: flex; justify-content: space-between; }
.lbl .r { color: var(--accent); }
.mt { margin-top: 10px; }
.note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.center { text-align: center; }
.btn { padding: 9px 14px; border-radius: 11px; background: var(--panel2); border: 1px solid #ffffff22; font-weight: 800; font-size: 14px; }
.btn.ghost { background: transparent; }
.btn.strike { background: var(--accent); color: #2a1d00; border: 0; }
.go { height: 58px; border-radius: 16px; font-size: 24px; color: #2a1d00; background: linear-gradient(180deg, #ffe476, #ffd23f 55%, #e8b300); box-shadow: 0 5px 0 #8a6700, 0 10px 26px #ffd23f40; flex: 1; }
.go:active { transform: translateY(3px); box-shadow: 0 2px 0 #8a6700; }
.go2 { height: 50px; border-radius: 14px; font-size: 17px; background: var(--panel2); border: 1px solid #ffffff22; flex: 1; }
.btnrow { display: flex; gap: 8px; }
.foot { display: flex; justify-content: center; gap: 18px; margin-top: 4px; }
.link { color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.ggs-foot { text-align: center; font-size: 11px; } .ggs-foot a { color: #ffffff55; }
.waiting { text-align: center; font-size: 13px; color: var(--muted); font-weight: 700; padding: 8px; }
.mperr { background: #3a1418; border: 1px solid var(--danger); color: #ffd0d2; border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 700; }

/* logo */
.logo { text-align: center; line-height: .86; margin: 10px 0 6px; }
.logo span { display: block; font-weight: 900; font-style: italic; letter-spacing: .04em; -webkit-text-stroke: 3px #0b0710; paint-order: stroke fill; }
.logo .l1 { font-size: 68px; color: var(--accent); text-shadow: 0 7px 0 #0b0710, 0 0 30px #ffd23f55; transform: rotate(-3deg); }
.logo .l2 { font-size: 44px; color: #fff; text-shadow: 0 6px 0 #0b0710; margin-top: 4px; }
.logo .l3 { margin-top: 12px; font-size: 11px; letter-spacing: .42em; color: #e0e8d8; -webkit-text-stroke: 0; text-shadow: 0 2px 0 #000; }

/* menu */
.golembtn { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; width: 100%; }
.golembtn canvas { width: 54px; height: 54px; border-radius: 12px; background: #090c08; border: 2px solid var(--danger); flex: 0 0 auto; }
.golembtn div { flex: 1; text-align: left; }
.golembtn small { display: block; font-size: 9px; font-weight: 900; letter-spacing: .14em; color: var(--muted); }
.golembtn b { display: block; font: italic 900 20px/1.1 system-ui; text-transform: uppercase; }
.golembtn em { font-style: italic; font-weight: 800; font-size: 12px; color: var(--danger); }
.chev { font-size: 11px; font-weight: 900; letter-spacing: .08em; color: var(--accent); }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode { position: relative; text-align: left; background: rgba(31, 39, 27, .95); border: 1px solid #ffffff16; border-radius: 13px; padding: 10px 11px 11px; min-height: 104px; }
.mode b { display: block; font-size: 18px; line-height: 1; }
.mode p { font-size: 11.5px; line-height: 1.3; font-weight: 700; color: #cdd8c3; margin-top: 5px; }
.mode.sel { border: 2px solid var(--accent); background: linear-gradient(160deg, #3a3315, #1f271b 70%); }
.mode p span { color: var(--accent); font-weight: 900; }
.live { display: block; margin-top: 6px; font-size: 9px; font-weight: 900; letter-spacing: .08em; color: var(--accent2); }
.settings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.set { background: var(--panel2); border-radius: 10px; padding: 9px 8px; font-size: 12px; font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.set b { color: var(--accent); font-weight: 900; font-size: 13px; }

/* pick */
.hero { position: relative; height: 280px; border-radius: 16px; overflow: hidden; border: 2px solid #07060c; background: #1a1428; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .hn { position: absolute; left: 14px; top: 12px; }
.hero .hn b { display: block; font: italic 900 32px/1 system-ui; text-transform: uppercase; -webkit-text-stroke: 2px #07060c; paint-order: stroke fill; text-shadow: 0 3px 0 #07060c; }
.hero .hn small { display: block; font: italic 900 12px/1 system-ui; letter-spacing: .08em; color: var(--danger); margin-top: 5px; text-shadow: 0 1px 0 #000; }
.stats { position: absolute; right: 10px; top: 10px; width: 128px; display: flex; flex-direction: column; gap: 5px; padding: 8px 9px; background: rgba(14, 19, 12, .9); border-radius: 10px; border: 1px solid #ffffff22; }
.stat { display: grid; grid-template-columns: 44px 1fr; align-items: center; font: 900 9px/1 system-ui; letter-spacing: .1em; color: var(--muted); }
.stat .pp { display: flex; gap: 2px; } .stat .pp i { flex: 1; height: 8px; border-radius: 2px; background: #ffffff1c; } .stat .pp i.on { background: var(--accent); }
.special { display: flex; gap: 10px; align-items: center; }
.special .ic { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 900 18px system-ui; background: radial-gradient(circle at 36% 30%, #fff3b0, var(--accent) 50%, #a87d00); border: 2.5px solid #07060c; color: #2a1d00; }
.special b { display: block; font: italic 900 15px/1.1 system-ui; text-transform: uppercase; }
.special small { display: block; font-size: 12px; font-weight: 700; color: #cdd8c3; margin-top: 2px; }
.roster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tile { position: relative; height: 96px; border-radius: 11px; background: linear-gradient(180deg, #26331f, #141b11); border: 2px solid #07060c; overflow: hidden; }
.tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile .tn { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 0 4px; text-align: center; font: italic 900 10.5px/1 system-ui; letter-spacing: .05em; text-transform: uppercase; background: linear-gradient(0deg, #07060cee, #07060c00); }
.tile.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--danger), 0 0 16px #ff5a5f88; }
.tile.taken { opacity: .45; }
.skins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.skin { background: var(--panel2); border: 2px solid transparent; border-radius: 10px; padding: 8px; font-size: 12px; font-weight: 800; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.skin i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #07060c; }
.skin.sel { border-color: var(--accent); } .skin small { font-size: 9px; color: var(--muted); font-weight: 900; letter-spacing: .08em; }

/* tour */
.regions { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; touch-action: pan-x; }
.region { flex: 0 0 auto; min-width: 118px; text-align: left; padding: 8px 10px; border-radius: 11px; background: var(--panel2); border: 2px solid transparent; }
.region b { display: block; font: italic 900 14px/1.1 system-ui; text-transform: uppercase; white-space: nowrap; }
.region small { font-size: 10px; color: var(--muted); font-weight: 800; }
.region.sel { border-color: var(--accent); background: linear-gradient(160deg, #3a3315, #1f271b 70%); }
.region.lock { opacity: .45; }
.cities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.city { text-align: left; padding: 8px 9px; border-radius: 10px; background: var(--panel2); border: 2px solid transparent; min-height: 58px; }
.city b { display: block; font-size: 12.5px; font-weight: 900; line-height: 1.15; }
.city small { display: block; font-size: 13px; color: var(--accent); letter-spacing: .1em; margin-top: 3px; }
.city small i { color: #ffffff30; font-style: normal; }
.city.sel { border-color: var(--accent); } .city.lock { opacity: .4; } .city.cap b::after { content: " ♛"; color: var(--accent); }
.crew { display: flex; align-items: center; gap: 10px; }
.crew .btn { width: 46px; height: 46px; font-size: 22px; padding: 0; }
.crewn { flex: 1; text-align: center; } .crewn b { display: block; font: italic 900 19px/1.1 system-ui; text-transform: uppercase; } .crewn small { font-size: 10px; font-weight: 900; letter-spacing: .12em; color: var(--accent); }
.scalebar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin: 10px 0 8px; }
.scalebar div { position: relative; height: 28px; border-radius: 6px; background: #ffffff10; display: grid; place-items: center; font: 900 10px/1 system-ui; color: var(--muted); overflow: hidden; }
.scalebar div i { position: absolute; left: 0; right: 0; bottom: 0; background: #ffffff1c; }
.scalebar div.on { background: #ffd23f22; color: #fff; box-shadow: inset 0 0 0 2px var(--accent); } .scalebar div.on i { background: #ffd23f55; }
.scalebar span { position: relative; }
.seg { display: flex; gap: 4px; } .seg button { flex: 1; padding: 8px 0; border-radius: 9px; background: var(--panel2); font-weight: 900; font-size: 13px; border: 2px solid transparent; }
.seg button.sel { border-color: var(--accent); color: var(--accent); }

/* rooms */
.tabs { display: flex; gap: 4px; background: var(--panel); border-radius: 12px; padding: 4px; }
.tabs button { flex: 1; padding: 9px 0; border-radius: 9px; font-weight: 900; font-size: 14px; color: var(--muted); }
.tabs button.sel { background: var(--panel2); color: var(--text); box-shadow: inset 0 0 0 1px #ffffff22; }
.slist { display: flex; flex-direction: column; gap: 6px; }
.srv { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 10px; background: var(--panel2); text-align: left; width: 100%; }
.srv b { flex: 1; font-size: 14px; } .srv small { font-size: 11px; color: var(--muted); font-weight: 800; } .srv .n { font-weight: 900; color: var(--accent); font-size: 13px; }
.row { display: flex; gap: 8px; }
.inp { flex: 1; min-width: 0; background: #090c08; border: 1px solid #ffffff2a; border-radius: 11px; padding: 10px 12px; font-size: 16px; font-weight: 800; }
.inp.code { text-transform: uppercase; letter-spacing: .3em; font-size: 22px; text-align: center; }
.roomcard { text-align: center; }
.roomcode { font-size: 52px; color: var(--accent); letter-spacing: .08em; text-shadow: 0 5px 0 #000, 0 0 26px #ffd23f44; }
.plist { display: flex; flex-direction: column; gap: 5px; }
.prow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--panel2); font-size: 13px; font-weight: 800; }
.prow canvas { width: 34px; height: 34px; border-radius: 8px; border: 2px solid var(--pc); background: #090c08; flex: 0 0 auto; }
.prow .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow .nm em { font-style: italic; color: var(--pc); font-size: 10px; margin-left: 5px; }
.prow .ps { font-size: 10px; color: var(--muted); font-weight: 900; letter-spacing: .06em; }
.tag { font-size: 9px; font-weight: 900; letter-spacing: .08em; padding: 3px 5px; border-radius: 5px; background: #07060c; color: #d9d6ee; }
.tag.y { background: var(--accent); color: #1a1400; }
.setgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.setgrid button { background: var(--panel2); border-radius: 10px; padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 800; color: var(--muted); }
.setgrid button b { display: block; color: var(--accent); font: italic 900 14px/1.15 system-ui; text-transform: uppercase; margin-top: 2px; }
.setgrid button:disabled { opacity: 1; cursor: default; }

/* ------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button, #hud .stickzone { pointer-events: auto; }
.chips { position: absolute; top: calc(8px + var(--sat)); left: calc(56px + var(--sal)); right: calc(56px + var(--sar)); display: flex; gap: 5px; justify-content: center; flex-wrap: nowrap; }
.chip { position: relative; flex: 0 1 150px; min-width: 0; height: 40px; border-radius: 9px; border: 2px solid #07060c;
  background: linear-gradient(180deg, color-mix(in srgb, var(--pc) 55%, #120e18), color-mix(in srgb, var(--pc) 22%, #0c0a12)); box-shadow: 0 3px 0 #0009, inset 0 1px 0 #ffffff40; }
.chip canvas { position: absolute; left: 0; bottom: 0; width: 36px; height: 44px; border-bottom-left-radius: 7px; }
.chip .pn { position: absolute; left: 3px; top: -8px; font: italic 900 9px/1 system-ui; background: var(--pc); color: #0b0710; padding: 2px 4px; border-radius: 4px; border: 1.5px solid #07060c; z-index: 2; }
.chip .tg { position: absolute; left: 28px; top: -8px; font: 900 8px/1 system-ui; letter-spacing: .06em; background: #07060c; color: #d9d6ee; padding: 3px 4px; border-radius: 4px; z-index: 2; }
.chip .sc { position: absolute; right: 6px; top: 3px; font: italic 900 15px/1 system-ui; -webkit-text-stroke: 1.5px #07060c; paint-order: stroke fill; text-shadow: 0 2px 0 #07060c; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip .nm { position: absolute; left: 40px; top: 5px; font: 900 8px/1 system-ui; letter-spacing: .06em; text-shadow: 0 1px 0 #000; white-space: nowrap; overflow: hidden; max-width: 40%; }
.chip .lv { position: absolute; left: 40px; bottom: 5px; display: flex; gap: 3px; align-items: center; }
.chip .lv i { width: 7px; height: 7px; transform: rotate(45deg); border-radius: 2px; background: #07060c99; border: 1.5px solid #07060c; }
.chip .lv i.on { background: linear-gradient(135deg, #fff, var(--pc)); }
.chip .lv em { display: flex; gap: 2px; margin-left: 4px; }
.chip .lv em b { width: 4px; height: 10px; border-radius: 2px; background: #07060c99; border: 1px solid #07060c; }
.chip .lv em b.on { background: #7cf2a9; }
.chip .gn { position: absolute; right: 5px; bottom: 4px; min-width: 18px; height: 17px; padding: 0 3px; border-radius: 6px; display: grid; place-items: center; background: #07060c; border: 1.5px solid var(--gc); color: var(--gc); font: italic 900 12px/1 system-ui; }
.chip .gn small { position: absolute; bottom: -7px; font: 900 8px/1 system-ui; letter-spacing: -.05em; color: var(--gc); text-shadow: 0 1px 0 #000; }
.chip .rr { position: absolute; left: 39px; right: 28px; bottom: 17px; height: 3px; border-radius: 2px; background: #ffffff18; overflow: hidden; }
.chip .rr i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--rr, 0%); background: #a77bff; }
.chip.me { box-shadow: 0 0 0 2px #fff, 0 3px 0 #0009; }
.chip.out { filter: grayscale(.7) brightness(.8); }
.chip .bub { position: absolute; right: -4px; top: -12px; font: italic 900 10px/1 system-ui; padding: 2px 5px; border-radius: 6px; border: 1.5px solid #07060c; background: #fff; color: #c22a30; transform: rotate(5deg); white-space: nowrap; }
.chips.small .nm, .chips.small .tg { display: none; }
.chips.small .chip { height: 34px; } .chips.small .chip canvas { width: 30px; height: 38px; } .chips.small .chip .lv, .chips.small .chip .rr { left: 32px; } .chips.small .chip .sc { font-size: 12px; } .chips.small .chip .lv em { display: none; }
.hudrow { position: absolute; top: calc(56px + var(--sat)); left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: stretch; width: min(560px, calc(100vw - 24px)); }
.alert, .clock { background: rgba(14, 19, 12, .88); border: 1px solid #ffffff26; border-radius: 10px; padding: 4px 9px; text-align: center; flex: 0 0 auto; }
.alert small, .clock small { display: block; font: 900 8px/1 system-ui; letter-spacing: .14em; color: var(--muted); }
.alert b { display: block; font: 900 13px/1 system-ui; letter-spacing: .04em; color: var(--danger); margin-top: 3px; } .alert b i { font-style: normal; color: #ffffff30; }
.clock b { display: block; font: italic 900 16px/1 system-ui; margin-top: 2px; font-variant-numeric: tabular-nums; } .clock.hot b { color: var(--danger); }
.mini { flex: 1; min-width: 0; background: rgba(14, 19, 12, .88); border: 1px solid #ffffff26; border-radius: 10px; padding: 3px 6px 4px; }
.mini .ml { display: flex; justify-content: space-between; font: 900 8px/1 system-ui; letter-spacing: .1em; color: var(--muted); margin-bottom: 2px; white-space: nowrap; } .mini .ml b { color: var(--accent); }
.mini canvas { display: block; width: 100%; height: 24px; }
.boss { position: absolute; top: calc(104px + var(--sat)); left: 50%; transform: translateX(-50%); width: min(420px, calc(100vw - 24px)); text-align: center; pointer-events: none;
  background: rgba(14, 19, 12, .86); border: 1px solid #ffd23f55; border-radius: 10px; padding: 4px 10px 5px; }
.boss b { display: block; font: italic 900 12px/1.1 system-ui; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.boss .cores { display: flex; gap: 4px; margin: 3px 0 2px; }
.boss .cores span { flex: 1; height: 8px; border-radius: 4px; background: #07060c; border: 1.5px solid #07060c; overflow: hidden; }
.boss .cores span i { display: block; height: 100%; width: var(--hp, 100%); background: linear-gradient(90deg, #ff3b6a, #ff9ab0); transition: width .3s; }
.boss .cores span.dead i { background: #ffffff22; width: 100%; }
.boss small { display: block; font: 800 9.5px/1.2 system-ui; color: #d6dfcc; }
.boss.warn { border-color: var(--danger); box-shadow: 0 0 18px #ff5a5f88; }
body.port .boss { top: calc(100px + var(--sat)); }
@media (max-height: 500px) { .boss { width: min(300px, 50vw); padding: 2px 8px 3px; } .boss small { display: none; } .boss b { font-size: 10px; } .boss .cores span { height: 6px; } }
.pause { position: absolute; top: calc(8px + var(--sat)); left: calc(10px + var(--sal)); width: 38px; height: 38px; border-radius: 10px; border: 1px solid #ffffff2a; background: rgba(14, 19, 12, .82); font-weight: 900; display: grid; place-items: center; font-size: 12px; }
.banner { position: absolute; left: 0; right: 0; top: 32%; text-align: center; pointer-events: none; }
.banner .big { font-size: 44px; color: var(--accent); -webkit-text-stroke: 3px #0b0710; paint-order: stroke fill; text-shadow: 0 5px 0 #0b0710, 0 0 30px #ffd23f88; transform: rotate(-4deg); }
.banner .small { font: 900 13px/1.3 system-ui; letter-spacing: .1em; color: #fff; text-shadow: 0 2px 0 #000; margin-top: 8px; }
.keys { position: absolute; left: 50%; bottom: calc(12px + var(--sab)); transform: translateX(-50%); display: flex; gap: 12px; padding: 6px 12px; border-radius: 12px; background: rgba(14, 19, 12, .85); border: 1px solid #ffffff22; font-size: 11px; font-weight: 800; color: #d6dfcc; white-space: nowrap; }
.keys kbd { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; margin-right: 3px; border-radius: 5px; background: #2a3524; border: 1px solid #ffffff30; box-shadow: 0 2px 0 #000; font: 900 10px/1 system-ui; color: #fff; }

/* touch controls: landscape, over the street */
.stickzone { position: absolute; left: 0; bottom: 0; width: 44vw; max-width: 300px; height: 62vh; touch-action: none; }
.stick { position: absolute; left: calc(24px + var(--sal)); bottom: calc(26px + var(--sab)); width: 112px; height: 112px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff10 0 58%, #ffffff1c 59% 100%); border: 2px solid #ffffff40; box-shadow: inset 0 0 18px #0006; }
.knob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #ffffffcc, #c7c3e0 40%, #77739a); border: 2px solid #07060c; box-shadow: 0 4px 8px #0009; }
.stick .lbl { position: absolute; left: 50%; bottom: -17px; transform: translateX(-50%); font-size: 9px; font-weight: 900; letter-spacing: .14em; color: #ffffffbb; white-space: nowrap; text-shadow: 0 1px 0 #000; margin: 0; }
.tb { position: absolute; border-radius: 50%; display: grid; place-items: center; text-align: center; touch-action: none;
  background: radial-gradient(circle at 36% 30%, color-mix(in srgb, var(--c) 45%, #fff), var(--c) 46%, color-mix(in srgb, var(--c) 60%, #000));
  border: 3px solid #07060c; box-shadow: 0 5px 0 #07060c, 0 8px 16px #000a, inset 0 2px 0 #ffffff70; opacity: .93; }
.tb span { font: italic 900 14px/1 system-ui; color: #fff; -webkit-text-stroke: 1.5px #07060c; paint-order: stroke fill; text-shadow: 0 2px 0 #07060c; }
.tb small { display: block; font: 900 8px/1 system-ui; letter-spacing: .1em; color: #ffffffdd; margin-top: -10px; }
.tb.down { transform: translateY(3px); box-shadow: 0 2px 0 #07060c, 0 0 0 4px #ffffff55; }
.tb.fire { --c: #ff5a5f; width: 86px; height: 86px; right: calc(22px + var(--sar)); bottom: calc(20px + var(--sab)); }
.tb.fire span { font-size: 18px; } .tb.fire small { margin-top: 2px; }
.tb.jump { --c: #58a6ff; width: 62px; height: 62px; right: calc(120px + var(--sar)); bottom: calc(10px + var(--sab)); }
.tb.swap { --c: #5d6a52; width: 58px; height: 58px; right: calc(20px + var(--sar)); bottom: calc(120px + var(--sab)); }
.tb.swap span { font-size: 11px; }
.slots { display: flex; gap: 3px; justify-content: center; margin-top: 3px; }
.slots i { font: italic 900 11px/1 system-ui; width: 17px; height: 17px; display: grid; place-items: center; border-radius: 5px; background: #07060ccc; color: var(--gc, #fff); border: 1.5px solid var(--gc, #fff); -webkit-text-stroke: 0; font-style: italic; }
.slots i.dim { opacity: .5; }
.tb.salvo { --c: #a77bff; width: 52px; height: 52px; right: calc(98px + var(--sar)); bottom: calc(88px + var(--sab)); }
.tb.salvo span { font-size: 11px; }
.tb.salvo::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; background: conic-gradient(var(--accent) var(--m, 0%), #ffffff22 0);
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 4px), #000 calc(50% - 3px)); mask: radial-gradient(circle, transparent calc(50% - 4px), #000 calc(50% - 3px)); }
.tb.salvo.ready { box-shadow: 0 5px 0 #07060c, 0 0 22px var(--accent), inset 0 2px 0 #ffffff70; }
.tb.salvo small { margin-top: 0; position: absolute; bottom: -16px; color: #fff; }
.tb.lock { --c: #3a4632; width: 46px; height: 46px; left: calc(150px + var(--sal)); bottom: calc(16px + var(--sab)); opacity: .82; }
.tb.lock span { font-size: 10px; }
.tb.lock.on { box-shadow: 0 2px 0 #07060c, 0 0 0 3px var(--accent); opacity: 1; }
.deck { display: none; }

/* portrait phones: the play area on top, a control deck below */
body.port .deck { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: var(--deck, 34vh);
  background: linear-gradient(180deg, #1f2a1a, #151d12 30%, #0d130b); border-top: 3px solid #000; box-shadow: inset 0 2px 0 #ffffff14; pointer-events: none; }
body.port .deck::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--accent) 0 14px, #151d12 14px 28px); opacity: .85; }
body.port .stickzone { height: var(--deck, 34vh); width: 50vw; max-width: none; }
body.port .stick { width: 126px; height: 126px; bottom: calc(30px + var(--sab)); }
body.port .knob { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: radial-gradient(circle at 38% 32%, #ff9a9d, #ff5a5f 45%, #a8262b); }
body.port .tb.fire { width: 94px; height: 94px; bottom: calc(34px + var(--sab)); }
body.port .tb.jump { right: calc(130px + var(--sar)); bottom: calc(18px + var(--sab)); width: 66px; height: 66px; }
body.port .tb.swap { bottom: calc(146px + var(--sab)); right: calc(28px + var(--sar)); width: 62px; height: 62px; }
body.port .tb.salvo { right: calc(118px + var(--sar)); bottom: calc(106px + var(--sab)); width: 56px; height: 56px; }
body.port .tb.lock { left: calc(160px + var(--sal)); bottom: calc(150px + var(--sab)); }
body.port .hudrow { width: calc(100vw - 16px); }
body.port .banner { top: 22%; }
body.desk #touch { display: none !important; }

/* results */
.banner2 { text-align: center; margin-top: 10px; }
.banner2 .h { display: block; font-size: 42px; line-height: .95; color: var(--accent); -webkit-text-stroke: 3px #0b0710; paint-order: stroke fill; text-shadow: 0 6px 0 #0b0710, 0 0 30px #ffd23f66; transform: rotate(-3deg); }
.banner2 small { display: block; margin-top: 12px; font: 900 11px/1.3 system-ui; letter-spacing: .14em; color: #eef4e8; }
.stars { text-align: center; font-size: 34px; letter-spacing: .1em; color: var(--accent); text-shadow: 0 3px 0 #000; } .stars i { font-style: normal; color: #ffffff22; }
.lev { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.lev small { display: block; font: 900 8.5px/1 system-ui; letter-spacing: .1em; color: var(--muted); }
.lev b { display: block; font: italic 900 18px/1.1 system-ui; margin-top: 3px; } .lev b.y { color: var(--accent); }
.standings { padding: 6px 10px; }
.srow { display: grid; grid-template-columns: 20px 34px 1fr 44px 44px 70px; align-items: center; gap: 6px; height: 40px; border-top: 1px solid #ffffff12; font-size: 12px; font-weight: 800; }
.srow.hd { height: 22px; border: 0; font: 900 8.5px/1 system-ui; letter-spacing: .1em; color: var(--muted); }
.srow canvas { width: 32px; height: 32px; border-radius: 8px; border: 2px solid var(--pc); background: #090c08; }
.srow .pl { font: italic 900 16px/1 system-ui; color: var(--accent); }
.srow .nmc { font: italic 900 13px/1.05 system-ui; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-align: left; }
.srow .nmc small { display: block; font: 900 8px/1 system-ui; letter-spacing: .06em; color: var(--muted); margin-top: 3px; text-transform: none; }
.srow span { text-align: right; font-variant-numeric: tabular-nums; } .srow .pts { font: italic 900 14px/1 system-ui; color: #fff; }
.srow.me { background: linear-gradient(90deg, #ff5a5f22, transparent); border-radius: 8px; }
.awards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.award { border-radius: 11px; padding: 7px 9px; background: var(--panel); border: 1px solid #ffffff1a; }
.award small { display: block; font: 900 8.5px/1.2 system-ui; letter-spacing: .1em; color: var(--muted); }
.award b { display: block; font: italic 900 13px/1.1 system-ui; margin-top: 3px; color: var(--pc); }
.award em { font-style: normal; font-size: 10px; font-weight: 800; color: #c7d2bd; }

@media (min-width: 900px) and (hover: hover) { .wrap { max-width: 620px; } }

/* Salvo */
.startgun { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.startgun .gl, .tile .tgn { font: italic 900 16px/1 system-ui; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #07060c; color: var(--gc); border: 2px solid var(--gc); flex: 0 0 auto; }
.tile .tgn { position: absolute; right: 4px; bottom: 20px; width: 20px; height: 20px; font-size: 12px; border-width: 1.5px; z-index: 2; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.city small.bn { color: #ff7a95; letter-spacing: .04em; font-size: 10px; font-weight: 900; }
.city.big b::after { content: " ☠"; color: #ff7a95; }
.mini canvas { height: 22px; }
.boss .wave { color: var(--accent); }
