/* Tanks A Lot!. Navy night, hot orange, chunky friendly controls. */
:root { --navy: #0c1a2e; --ink: #071120; --panel: rgba(10, 20, 38, 0.82); --line: rgba(255, 255, 255, 0.14); --hot: #ff8a1e; --hot2: #ffb02e; --txt: #f3f7ff; --dim: #a9b8d4; --ok: #4cd964; --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Luckiest Guy', 'Arial Black', Impact, system-ui, sans-serif; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--navy); color: var(--txt); font-family: var(--font); font-weight: 800; overscroll-behavior: none; -webkit-user-select: none; user-select: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
[hidden] { display: none !important; }
#field { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }

/* ---- shared bits */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--line); font-weight: 900; font-size: 15px; transition: transform 0.12s, background 0.2s, filter 0.2s; }
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.17); }
.btn:active:not(:disabled) { transform: translateY(2px) scale(0.985); }
.btn.big { min-height: 56px; font-size: 18px; width: 100%; border-radius: 16px; }
.btn.primary { background: linear-gradient(180deg, var(--hot2), var(--hot) 55%, #f0620e); border: 0; color: #2a1200; box-shadow: 0 5px 0 #a8410a, 0 10px 24px rgba(255, 120, 20, 0.35); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4); }
.btn.primary:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 #a8410a; }
.btn.primary:disabled { filter: grayscale(0.8) brightness(0.7); box-shadow: 0 5px 0 #333; }
.btn.primary.done { background: linear-gradient(180deg, #7dffa0, var(--ok)); box-shadow: 0 5px 0 #1f8a3a; color: #062a10; }
.btn.ghost { background: none; border-color: transparent; color: var(--dim); }
.btn.danger { color: #ff9a9a; }
.iconbtn { width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 19px; display: grid; place-items: center; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.hint { color: var(--dim); font-size: 13.5px; font-weight: 700; line-height: 1.45; margin: 6px 0 0; }
.wait { color: var(--dim); text-align: center; margin: 8px 0; }

/* ---- logo */
.logo { position: relative; display: inline-flex; flex-direction: column; align-items: center; font-family: var(--display); line-height: 0.86; letter-spacing: 0.02em; transform: rotate(-3deg); filter: drop-shadow(0 10px 0 rgba(0, 0, 0, 0.35)); }
.logo .l1 { font-size: 64px; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink); }
.logo .l2 { font-size: 78px; background: linear-gradient(180deg, #ffe14a 10%, var(--hot) 55%, #e8380c); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; filter: drop-shadow(0 5px 0 var(--ink)); }
.logo.big .l1 { font-size: clamp(54px, 13vw, 104px); }
.logo.big .l2 { font-size: clamp(66px, 16vw, 128px); }
.logo::before { content: ''; position: absolute; left: -6%; right: -10%; top: -34%; height: 90%; border: 5px dashed rgba(255, 255, 255, 0.75); border-color: rgba(255, 255, 255, 0.75) transparent transparent transparent; border-radius: 50% 50% 0 0 / 100% 100% 0 0; pointer-events: none; }
.logo .shell { position: absolute; right: -11%; top: 12%; width: 0.5em; height: 0.5em; font-size: clamp(40px, 9vw, 70px); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6c9, #ffb02e 40%, #ff4d1e 75%); box-shadow: 0 0 30px #ff8a1e, 0 0 70px rgba(255, 90, 30, 0.6); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.18); } }

/* ---- menus over the drifting sky */
#screen { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); overflow: auto; }
#screen.menu { background: radial-gradient(120% 90% at 50% 30%, rgba(12, 26, 46, 0.25), rgba(7, 17, 32, 0.82)); }
#screen.over { background: rgba(5, 10, 20, 0.5); pointer-events: none; animation: fade 0.4s both; }
#screen.over > * { pointer-events: auto; }
#screen.full { padding: 0; place-items: stretch; grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); background: linear-gradient(180deg, rgba(8, 18, 34, 0.93), rgba(7, 15, 28, 0.97)); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } }
.title { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; animation: rise 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.title-top { align-self: stretch; display: flex; justify-content: flex-start; margin-bottom: 26px; }
.tag { margin: 6px 0 0; font-size: clamp(15px, 3.6vw, 19px); color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); }
.megas { display: grid; gap: 12px; width: 100%; margin-top: 6px; }
.mega { display: flex; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35), 0 14px 30px rgba(0, 0, 0, 0.3); transition: transform 0.15s, border-color 0.2s; }
.mega:hover { transform: translateY(-2px); border-color: var(--hot2); }
.mega:active { transform: translateY(3px); }
.mega .mi { font-size: 34px; }
.mega b { display: block; font-size: 20px; font-weight: 900; }
.mega small { color: var(--dim); font-size: 13.5px; font-weight: 700; }
.mega.host { background: linear-gradient(135deg, rgba(255, 138, 30, 0.34), rgba(10, 20, 38, 0.86) 62%); }
.mega.solo { background: linear-gradient(135deg, rgba(64, 196, 255, 0.34), rgba(10, 20, 38, 0.86) 62%); }
.lobby.solo .codebox b { letter-spacing: 0.03em; font-size: clamp(30px, 7vw, 46px); }
.lobby.solo .field input { font-size: 17px; padding: 9px 12px; }
.mega.rejoin { background: linear-gradient(135deg, rgba(76, 217, 100, 0.34), rgba(10, 20, 38, 0.86) 62%); }
.title-foot { display: flex; gap: 6px; }
.panel { width: min(440px, 100%); display: grid; gap: 12px; padding: 22px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); animation: rise 0.35s both; }
.panel h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: 0.02em; }
.back { justify-self: start; color: var(--dim); font-weight: 900; padding: 6px 2px; }
.field { display: grid; gap: 5px; }
.field span { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dim); }
.field input { font: inherit; font-size: 20px; font-weight: 900; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: rgba(0, 0, 0, 0.35); color: #fff; -webkit-user-select: text; user-select: text; width: 100%; }
.field input.code { text-transform: uppercase; letter-spacing: 0.4em; text-align: center; font-size: 30px; }

/* ---- lobby */
.lobby, .shop { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; min-height: 0; width: min(980px, 100%); margin: 0 auto; }
.lobby-head, .shop-head { display: flex; align-items: center; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 14px 10px; }
.codebox { flex: 1; display: flex; flex-direction: column; line-height: 1; }
.codebox small, .sh-t small { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.codebox b { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 9vw, 58px); letter-spacing: 0.14em; color: var(--hot2); text-shadow: 0 4px 0 rgba(0, 0, 0, 0.4); }
.qr { width: 74px; height: 74px; flex: none; border-radius: 10px; overflow: hidden; background: #fff; padding: 3px; }
.qr svg { width: 100%; height: 100%; display: block; }
.lobby-scroll, .shop-scroll { overflow-y: auto; padding: 4px 14px 16px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.lobby h3, .shop h3 { margin: 16px 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hot2); }
.lobby h3 em { color: var(--dim); font-style: normal; }
.tanks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.tankchip { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); border-left: 6px solid var(--pc); }
.tankchip.me { background: rgba(255, 255, 255, 0.14); }
.tankchip.off { opacity: 0.55; }
.tankchip .tk { width: 30px; height: 15px; border-radius: 8px 8px 5px 5px; background: var(--pc); box-shadow: 0 5px 0 -1px #1c1c22, 12px -7px 0 -5px #2a2a33; flex: none; }
.tankchip .tn { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tankchip em { font-style: normal; font-size: 11px; color: var(--dim); background: rgba(255, 255, 255, 0.1); padding: 1px 6px; border-radius: 6px; }
.tankchip .x { width: 30px; height: 30px; border-radius: 8px; color: var(--dim); }
.tankchip.add { justify-content: center; border: 2px dashed var(--line); border-left-width: 2px; color: var(--dim); }
.swatches { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.sw { width: 38px; height: 38px; border-radius: 50%; background: var(--c); border: 3px solid rgba(0, 0, 0, 0.35); transition: transform 0.15s; }
.sw.on { border-color: #fff; transform: scale(1.14); }
.sw:disabled { opacity: 0.22; }
.maps { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; }
.map { flex: none; width: 172px; min-height: 128px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 12px; border-radius: 16px; border: 2px solid transparent; background: linear-gradient(160deg, #24406e, #10213d); color: #fff; position: relative; overflow: hidden; }
.map::after { content: ''; position: absolute; inset: auto 0 0 0; height: 34%; background: rgba(0, 0, 0, 0.28); clip-path: polygon(0 60%, 14% 30%, 30% 55%, 48% 10%, 66% 50%, 82% 25%, 100% 55%, 100% 100%, 0 100%); }
.map > * { position: relative; z-index: 1; }
.map .mic { font-size: 28px; }
.map b { font-size: 15px; font-weight: 900; }
.map small { font-size: 11.5px; font-weight: 700; opacity: 0.85; line-height: 1.3; }
.map.on { border-color: #fff; box-shadow: 0 0 0 3px var(--hot), 0 10px 24px rgba(0, 0, 0, 0.4); }
.map:disabled { opacity: 0.75; }
.map:disabled.on { opacity: 1; }
.m-random { background: linear-gradient(160deg, #5b3fd0, #1b1247); }
.m-meadow { background: linear-gradient(160deg, #58b6ff, #3f9a2c); }
.m-dunes { background: linear-gradient(160deg, #ff9a4a, #c9984f); }
.m-peaks { background: linear-gradient(160deg, #23408a, #9fc3ea); }
.m-islands { background: linear-gradient(160deg, #3aa0f0, #2f9f7a); }
.m-core { background: linear-gradient(160deg, #2a0d0c, #e0480c); }
.m-moon { background: linear-gradient(160deg, #05060f, #6e6e78); }
.m-city { background: linear-gradient(160deg, #2a0f52, #c0389a); }
.m-cake { background: linear-gradient(160deg, #ff8fc0, #f2c879); color: #3a1830; }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; margin-top: 8px; }
.opts h4 { margin: 0 0 5px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 13px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.seg button { min-height: 38px; border-radius: 10px; font-weight: 900; font-size: 14px; color: var(--dim); }
.seg button.on { background: linear-gradient(180deg, var(--hot2), var(--hot)); color: #2a1200; }
.seg button:disabled:not(.on) { opacity: 0.5; }
.lobby-foot, .shop-foot { padding: 10px 14px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(5, 12, 24, 0.7); }

/* ---- armory */
.sh-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sh-t b { font-family: var(--display); font-weight: 400; font-size: clamp(22px, 5vw, 30px); letter-spacing: 0.02em; }
.sh-t em { font-style: normal; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-timer { font-family: var(--display); font-size: 26px; color: var(--hot2); min-width: 54px; text-align: right; }
.shop-tip { margin: 2px 0 0; font-size: 13px; color: var(--dim); font-weight: 700; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.item { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.item.own { border-color: rgba(255, 176, 46, 0.7); background: rgba(255, 150, 30, 0.1); }
.item .ii { font-size: 28px; text-align: center; }
.item b { font-size: 15px; }
.item b em { font-style: normal; color: var(--hot2); }
.item small { display: block; font-size: 12px; color: var(--dim); font-weight: 700; line-height: 1.3; }
.item .ib { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.item .pr { font-size: 14px; color: #b9ffcb; white-space: nowrap; }
.item .pr i { font-style: normal; color: var(--dim); font-size: 11px; }
.item .pm { display: flex; gap: 5px; }
.item .pm button { width: 38px; height: 34px; border-radius: 10px; background: linear-gradient(180deg, var(--hot2), var(--hot)); color: #2a1200; font-size: 18px; font-weight: 900; }
.item .pm button[data-sell] { background: rgba(255, 255, 255, 0.14); color: #fff; }
.item .pm button:disabled { filter: grayscale(1) brightness(0.55); }
.shop-foot { display: grid; grid-template-columns: auto 1fr minmax(170px, 320px); align-items: center; gap: 12px; }
.cash small { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.cash b { font-family: var(--display); font-weight: 400; font-size: 28px; color: #9dffb4; }
.readies { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; }
.rd { min-width: 14px; height: 14px; border-radius: 8px; background: var(--pc); opacity: 0.3; font-size: 12px; }
.rd.on { opacity: 1; box-shadow: 0 0 10px var(--pc); }
.shop-wait { display: grid; place-content: center; text-align: center; gap: 8px; }
.shop-wait h2 { font-family: var(--display); font-weight: 400; font-size: 38px; margin: 0; }
.shop-wait .rd { height: auto; padding: 5px 12px; color: #08101e; }
@media (max-width: 560px) { .shop-foot { grid-template-columns: auto 1fr; } .shop-foot .btn { grid-column: 1 / -1; } .shop-foot .readies { justify-content: flex-end; } }

/* ---- the fight */
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; display: flex; flex-direction: column; padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); }
#hud > * { pointer-events: auto; }
.top { display: flex; align-items: center; gap: 8px; }
.roundinfo, .turn, .wind { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 5px 11px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); min-height: 44px; display: flex; }
.roundinfo { flex-direction: column; justify-content: center; line-height: 1.1; }
.roundinfo b { font-size: 13px; }
.roundinfo small { font-size: 11px; color: var(--dim); white-space: nowrap; }
#hud.sudden .roundinfo small { color: #ff7a7a; }
.turn { flex: 1; align-items: center; justify-content: center; gap: 9px; font-size: 16px; min-width: 0; border-color: var(--pc); box-shadow: inset 0 0 0 1px var(--pc); }
.turn .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 10px var(--pc); flex: none; }
.turn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.turn b { font-family: var(--display); font-weight: 400; font-size: 22px; color: var(--hot2); min-width: 1.4em; text-align: right; }
.turn b.low { color: #ff5a4d; animation: pulse 0.5s infinite; }
.turn.mine { background: linear-gradient(180deg, rgba(255, 176, 46, 0.3), var(--panel)); }
.wind { flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-width: 84px; }
.wind small { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); line-height: 1; }
.wbar { position: relative; width: 70px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); }
.wbar::after { content: ''; position: absolute; left: 50%; top: -2px; width: 2px; height: 10px; background: #fff; margin-left: -1px; }
.wbar i { position: absolute; top: 0; bottom: 0; background: #7fd4ff; border-radius: 3px; transition: all 0.4s; }
.wind b { font-size: 12px; line-height: 1; }
.roster { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; scrollbar-width: none; pointer-events: none !important; }
.rc { flex: none; min-width: 92px; max-width: 130px; padding: 4px 8px 5px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--pc); font-size: 12px; line-height: 1.15; }
.rc span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc .hp { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.16); margin: 3px 0 2px; overflow: hidden; }
.rc .hp i { display: block; height: 100%; background: var(--ok); transition: width 0.3s; }
.rc em { font-style: normal; color: #9dffb4; font-size: 10.5px; }
.rc.dead { opacity: 0.5; }
.rc.cur { box-shadow: 0 0 0 2px var(--pc), 0 0 16px var(--pc); }
.ctl { margin-top: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; width: min(860px, 100%); align-self: center; animation: rise 0.25s both; }
.ctl .row { display: flex; gap: 7px; }
.pad { flex: 1; display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); min-width: 0; }
.pad > button { width: 46px; height: 46px; flex: none; border-radius: 11px; background: rgba(255, 255, 255, 0.13); font-size: 20px; font-weight: 900; touch-action: none; }
.pad > button:active { background: var(--hot); color: #2a1200; }
.pad > div { flex: 1; text-align: center; line-height: 1.05; min-width: 0; }
.pad small { display: block; font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.pad b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.fbar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.16); overflow: hidden; margin-top: 4px; }
.fbar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd23f, #ff8a1e); transition: width 0.1s; }
.wpn { flex: 1.5; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--hot2); text-align: left; min-width: 0; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wpn > span { font-size: 28px; }
.wpn div { flex: 1; min-width: 0; line-height: 1.1; }
.wpn small { display: block; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wpn b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.wpn em { font-style: normal; font-family: var(--display); font-size: 20px; color: var(--hot2); }
.gear { display: flex; gap: 5px; align-items: center; }
.gear:empty { display: none; }
.gear button { position: relative; width: 48px; height: 56px; border-radius: 13px; background: var(--panel); border: 1px solid var(--line); font-size: 22px; }
.gear button em { position: absolute; right: 3px; bottom: 1px; font-style: normal; font-size: 11px; color: var(--hot2); }
.gear button:disabled { opacity: 0.4; }
.gear .chute { font-size: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 4px 7px; white-space: nowrap; }
.fire { flex: 1; min-width: 110px; min-height: 58px; border-radius: 16px; font-family: var(--display); font-size: 28px; letter-spacing: 0.06em; color: #fff; background: linear-gradient(180deg, #ff6a4d, #e0260c); box-shadow: 0 6px 0 #8a1404, 0 12px 26px rgba(255, 60, 20, 0.45); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); }
.fire:active { transform: translateY(5px); box-shadow: 0 1px 0 #8a1404; }
.watch { margin-top: auto; align-self: center; padding: 8px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.watch:empty { display: none; }
.drawer { position: absolute; left: 8px; right: 8px; bottom: calc(max(8px, env(safe-area-inset-bottom)) + 140px); max-height: min(56vh, 460px); width: min(860px, calc(100% - 16px)); margin: 0 auto; overflow-y: auto; border-radius: 18px; background: rgba(8, 16, 32, 0.96); border: 1px solid var(--hot2); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); animation: rise 0.2s both; }
.dr-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: rgba(8, 16, 32, 0.98); border-bottom: 1px solid var(--line); }
.dr-head button { width: 34px; height: 34px; }
.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 7px; padding: 10px; }
.dr-grid button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2px 8px; text-align: left; padding: 9px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.07); border: 2px solid transparent; }
.dr-grid button.on { border-color: var(--hot2); background: rgba(255, 150, 30, 0.16); }
.dr-grid span { font-size: 22px; }
.dr-grid b { font-size: 13.5px; }
.dr-grid em { font-style: normal; color: var(--hot2); font-size: 13px; }
.dr-grid small { grid-column: 1 / -1; font-size: 11px; color: var(--dim); font-weight: 700; line-height: 1.25; }
@media (max-width: 620px) {
  .roundinfo small { display: none; }
  .ctl .r1 { flex-wrap: wrap; }
  .pad.move { flex-basis: 100%; }
  .pad > button { width: 42px; height: 42px; }
  .wpn small { display: none; }
  .fire { min-width: 96px; font-size: 24px; }
}
/* a phone on its side: one slim row of controls, so the field keeps the screen */
@media (max-height: 480px) {
  .roster { display: none; }
  .ctl { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); width: 100%; gap: 6px; }
  .ctl .row { gap: 5px; flex-wrap: nowrap; }
  .pad { padding: 3px; gap: 3px; border-radius: 12px; }
  .pad.move { flex-basis: auto; flex: 1.15; }
  .pad > button { width: 36px; height: 40px; font-size: 16px; }
  .pad b { font-size: 18px; }
  .wpn { padding: 3px 8px; gap: 6px; }
  .wpn > span { font-size: 22px; }
  .wpn small { display: none; }
  .wpn b { font-size: 13.5px; }
  .fire { min-height: 46px; min-width: 84px; font-size: 22px; flex: 0.8; box-shadow: 0 4px 0 #8a1404; }
  .gear button { width: 40px; height: 46px; font-size: 19px; }
  .drawer { bottom: 64px; max-height: 62vh; }
  .top > * { min-height: 38px; }
  .iconbtn { width: 38px; height: 38px; }
  #banner { top: 38%; }
}

/* ---- results */
.card { width: min(640px, 100%); padding: 22px; border-radius: 24px; background: rgba(8, 16, 32, 0.92); border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); text-align: center; animation: rise 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.card > small { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.card h2 { margin: 4px 0 14px; font-family: var(--display); font-weight: 400; font-size: clamp(26px, 6vw, 40px); color: var(--pc); text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5); }
.card h2.champ { font-size: clamp(32px, 8vw, 54px); }
.card table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.card th { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); padding: 4px 6px; }
.card td { padding: 8px 6px; border-top: 1px solid var(--line); }
.card td:nth-child(2) { text-align: left; white-space: nowrap; }
.card tr.me td { background: rgba(255, 255, 255, 0.07); }
.pip { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.endbtns { display: grid; gap: 9px; margin-top: 16px; }

/* ---- sheets, banner, toast */
#sheet { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: rgba(3, 8, 16, 0.66); animation: fade 0.2s both; }
.sheet-card { width: min(440px, 100%); max-height: 100%; overflow-y: auto; display: grid; gap: 10px; padding: 18px; border-radius: 22px; background: #0d1a30; border: 1px solid var(--line); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); animation: rise 0.25s both; }
.sheet-card.how { width: min(600px, 100%); }
.sheet-card.how p, .sheet-card.how li { font-weight: 700; font-size: 14.5px; line-height: 1.5; color: #d9e4f7; margin: 0; }
.sheet-card.how ul { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.sheet-card.how b { color: #fff; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; font-size: 19px; }
.sheet-head button { width: 38px; height: 38px; border-radius: 10px; background: rgba(255, 255, 255, 0.1); }
.slider { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 10px; font-size: 14px; }
.slider input { accent-color: var(--hot); width: 100%; height: 30px; }
#banner { position: fixed; left: 50%; top: 30%; z-index: 30; transform: translate(-50%, -50%) scale(0.9); display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; opacity: 0; pointer-events: none; width: max-content; max-width: 92vw; }
#banner b { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 9vw, 76px); letter-spacing: 0.03em; color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink), 0 0 40px rgba(255, 150, 40, 0.8); }
#banner small { font-size: clamp(13px, 3vw, 18px); background: rgba(8, 16, 32, 0.8); padding: 5px 14px; border-radius: 999px; }
#banner.show { animation: bannerIn 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) both; opacity: 1; transform: translate(-50%, -50%); }
#banner:not(.show) { transition: opacity 0.5s, transform 0.5s; }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } }
#toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 60; transform: translate(-50%, 30px); opacity: 0; padding: 10px 18px; border-radius: 999px; background: #fff; color: #10203a; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: transform 0.25s, opacity 0.25s; pointer-events: none; max-width: 92vw; text-align: center; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
body.fight #toast { bottom: auto; top: 110px; }
#net { position: fixed; top: 0; left: 50%; z-index: 70; transform: translate(-50%, -110%); padding: 7px 16px; border-radius: 0 0 12px 12px; background: #ffb02e; color: #2a1200; font-size: 13px; transition: transform 0.3s; }
#net.show { transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* early-build label under the title logo */
.title .stage { margin: 14px 0 -2px; padding: 4px 12px; border-radius: 999px; background: repeating-linear-gradient(-45deg, #ffd23c 0 8px, #ffbe1a 8px 16px); color: #1a1000; font-size: 12px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); }

/* scan-to-join in the menu */
.menu-qr { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); }
.menu-qr svg { width: 92px; height: 92px; flex: none; padding: 4px; border-radius: 10px; background: #fff; }
.menu-qr b { display: block; font-size: 17px; }
.menu-qr small { color: var(--dim); }
