/* Range Day HUD in the Proof of Bonk style: dark navy glass panels, bold
   Space Grotesk numbers, neon accents. Palette and base rules adapted from
   gigabonk 3d/style.css at 987e117. */
:root {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --bg: #070a16; --surface: rgba(10, 14, 32, 0.82); --surface-2: rgba(18, 24, 48, 0.9);
  --border-soft: rgba(148, 163, 204, 0.18);
  --text: #eef1fb; --dim: #9aa4c2; --faint: #6f7a99;
  --lime: #3cf5a7; --magenta: #ff2dbf; --cyan: #22e4ff; --amber: #ffbd2e; --orange: #ff9a3c; --red: #ff4d6d;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--font-body); user-select: none; -webkit-user-select: none; }
canvas#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
canvas#overlay, canvas#reticle { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; }
#scopering { position: fixed; inset: 0; pointer-events: none; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 58%, rgba(0,0,0,0.32) 100%); }
[hidden] { display: none !important; }
kbd { font-family: var(--font-mono); font-size: 10px; padding: 1px 5px; border-radius: 4px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.22); color: var(--text); }

#hud { position: fixed; inset: 0; pointer-events: none; font-family: var(--font-display); }
.hud-tl { position: absolute; left: 18px; top: 16px; }
.brand { font-size: 22px; letter-spacing: 0.05em; text-shadow: 0 2px 10px rgba(0,0,0,0.6); }
.brand b { font-weight: 700; }
.brand span, .logo span { color: var(--amber); font-weight: 700; font-size: 0.7em; vertical-align: 2px; }
.kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.3em; color: var(--lime); margin-top: 2px; text-shadow: 0 1px 4px #000; }
.weapon { margin-top: 10px; display: inline-flex; flex-direction: column; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-soft); border-left: 3px solid var(--amber); }
.wname { font-weight: 700; font-size: 15px; letter-spacing: 0.08em; }
.wcal { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); margin-top: 2px; }

.hud-tr { position: absolute; right: 18px; top: 16px; width: min(360px, 40vw); }
#feed { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.feed-item { font-weight: 700; font-size: 14px; letter-spacing: 0.06em; padding: 7px 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border-soft); border-right: 4px solid var(--dim); box-shadow: 0 6px 18px rgba(0,0,0,0.35); animation: feedIn 320ms var(--ease); white-space: nowrap; transition: opacity 800ms; }
.feed-item.head { border-right-color: var(--amber); color: #fff3c4; font-size: 16px; }
.feed-item.kill { border-right-color: var(--red); }
.feed-item.body { border-right-color: var(--cyan); }
.feed-item.miss { border-right-color: var(--faint); color: var(--dim); font-weight: 600; font-size: 13px; }
.feed-item.old { opacity: 0.45; }
@keyframes feedIn { from { opacity: 0; transform: translateX(24px) scale(0.96); } to { opacity: 1; transform: none; } }

.card { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 236px; padding: 12px 14px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-soft); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.card-h { font-size: 11px; font-weight: 700; letter-spacing: 0.28em; color: var(--dim); margin-bottom: 8px; }
.card .row { display: flex; align-items: baseline; gap: 6px; margin: 4px 0; }
.card .row span { font-size: 11px; letter-spacing: 0.16em; color: var(--dim); width: 58px; font-weight: 700; }
.card .row b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; flex: 1; }
.card .row kbd { font-size: 9px; }
.card .row.big b { font-size: 30px; color: var(--amber); line-height: 1.05; }
.card .sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); margin: -1px 0 4px 64px; min-height: 13px; }
.card .sep { height: 1px; background: var(--border-soft); margin: 8px 0; }
#rc-last { font-size: 14px; }
.card .score { font-family: var(--font-mono); font-size: 10.5px; color: var(--lime); margin-top: 6px; letter-spacing: 0.04em; }

#breath { position: absolute; left: 50%; bottom: 44px; transform: translateX(-50%); width: 260px; text-align: center; }
#breath-label { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; color: var(--dim); margin-bottom: 5px; text-shadow: 0 1px 4px #000; }
#breath .bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,0.1); overflow: hidden; border: 1px solid rgba(255,255,255,0.14); }
#breath-fill { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #22e4ff, #3cf5a7); transition: width 60ms linear; }
#breath[data-state="holding"] #breath-label { color: var(--cyan); }
#breath[data-state="exhausted"] #breath-label { color: var(--red); }
#breath[data-state="exhausted"] #breath-fill { background: linear-gradient(90deg, #ff4d6d, #ff9a3c); }

.hud-br { position: absolute; right: 18px; bottom: 18px; width: 236px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-soft); }
#stance { font-size: 10px; letter-spacing: 0.26em; font-weight: 700; color: var(--dim); margin-bottom: 6px; }
#pips { display: flex; gap: 5px; margin-bottom: 8px; }
#pips i { flex: 1; height: 22px; border-radius: 4px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); position: relative; }
#pips i.on { background: linear-gradient(180deg, #ffd66b, #d99a1e); border-color: rgba(255, 214, 107, 0.8); box-shadow: 0 0 10px rgba(255, 189, 46, 0.35); }
#pips i.on::after { content: ''; position: absolute; left: 30%; right: 30%; top: 3px; height: 5px; border-radius: 3px 3px 0 0; background: #b87a14; }
.boltbar { position: relative; height: 22px; border-radius: 7px; background: rgba(6, 8, 18, 0.8); border: 1px solid rgba(255,255,255,0.14); overflow: hidden; }
.boltbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #22e4ff, #3cf5a7); }
.boltbar[data-state="cycle"] i { background: linear-gradient(90deg, #8b5cf6, #22e4ff); }
.boltbar[data-state="reload"] i { background: linear-gradient(90deg, #ff9a3c, #ffbd2e); }
.boltbar[data-state="empty"] i { background: #ff4d6d; }
.boltbar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-shadow: 0 1px 3px #000; }

.hud-bl { position: absolute; left: 18px; bottom: 16px; font-family: var(--font-body); font-size: 11px; color: var(--dim); line-height: 1.9; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
#fps { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10px; color: rgba(255,255,255,0.55); text-shadow: 0 1px 2px #000; }

#notice { position: fixed; left: 50%; top: 58px; transform: translateX(-50%); padding: 9px 16px; border-radius: 10px; background: rgba(40, 10, 16, 0.9); border: 1px solid var(--red); color: #ffd0d8; font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; z-index: 6; max-width: 92vw; text-align: center; pointer-events: none; }
#notice[data-kind="info"] { background: rgba(8, 26, 40, 0.9); border-color: var(--cyan); color: #d4f7ff; }
/* [slice] S12: GRID's subtitles (client/announcer.js) */
#subtitle { position: fixed; left: 50%; bottom: 128px; transform: translateX(-50%); padding: 6px 14px; border-radius: 8px; background: rgba(6, 12, 20, 0.78); color: #e8f4ff; font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; z-index: 6; max-width: 92vw; text-align: center; pointer-events: none; }

#start { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(7,10,22,0.35), rgba(7,10,22,0.82)); cursor: pointer; }
.start-box { width: min(620px, 100%); padding: 28px 30px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(34, 228, 255, 0.25); box-shadow: 0 24px 80px rgba(0,0,0,0.6); text-align: center; animation: pop 420ms var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(10px); } to { opacity: 1; transform: none; } }
.logo { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.08em; }
.start-box h1 { font-family: var(--font-display); font-size: clamp(38px, 8vw, 64px); margin: 4px 0 8px; letter-spacing: 0.04em; background: linear-gradient(180deg, #fff, #ffbd2e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--dim); font-size: 14px; line-height: 1.5; margin: 0 auto 16px; max-width: 480px; }
.keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; text-align: left; font-size: 13px; color: var(--text); margin: 0 auto 20px; max-width: 460px; }
#start-go { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.08em; padding: 14px 26px; border-radius: 12px; border: 0; color: #03140e; background: linear-gradient(180deg, #2af0b4, #13b988); box-shadow: 0 6px 24px rgba(60, 245, 167, 0.35); cursor: pointer; }

@media (max-width: 760px) {
  .card { top: auto; bottom: 150px; transform: none; width: 200px; }
  .hud-bl { display: none; }
  .keys { grid-template-columns: 1fr; }
}

/* captures: no CSS animation or transition, so a screenshot shows the final state */
.capture *, .capture *::before, .capture *::after { animation: none !important; transition: none !important; }

/* ================================================================== */
/* The online duel (client/duel.html): everything below is scoped to   */
/* body.duel or to elements only the duel page has.                    */
/* ================================================================== */
body.duel { --team-a: #ff8a2a; --team-b: #1fc7b8; }
.duel .kicker { color: var(--amber); }
.d-net { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); margin-top: 4px; text-shadow: 0 1px 3px #000; }
/* the small text top left (room, ping, fps) and the key hints get a glass backing: bare, they vanished on a bright sky, snow or a lit wall */
body.duel .hud-tl { padding: 8px 12px 9px; border-radius: 12px; background: rgba(7, 10, 22, 0.5); }
body.duel .d-net { color: #c3cbe3; }

/* the round bar, top centre: A score | phase, timer, round | B score */
#d-round { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; align-items: stretch; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.45); border: 1px solid var(--border-soft); }
.d-team { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-width: 92px; font-weight: 700; color: #120a02; }
.d-team.a { background: linear-gradient(180deg, #ffa24f, var(--team-a)); justify-content: flex-start; }
.d-team.b { background: linear-gradient(180deg, #46e0d2, var(--team-b)); justify-content: flex-end; color: #02140f; }
.d-team b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.d-tlabel { font-size: 11px; letter-spacing: 0.2em; opacity: 0.75; }
.d-team.mine { box-shadow: inset 0 -4px 0 rgba(255,255,255,0.85); }
.d-team.mine .d-tlabel::after { content: " \00B7  YOU"; }
.d-mid { background: var(--surface-2); padding: 6px 18px 7px; text-align: center; min-width: 170px; }
.d-phase { font-size: 11px; font-weight: 700; letter-spacing: 0.3em; color: var(--lime); }
.d-phase[data-p="PREP"] { color: var(--amber); }
.d-phase[data-p="END"], .d-phase[data-p="OVER"] { color: var(--magenta); }
.d-timer { font-size: 30px; font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.d-timer.hot { color: var(--red); }
.d-rnd { font-size: 10px; letter-spacing: 0.22em; color: var(--dim); font-weight: 700; }

/* kill feed entries */
.feed-item .ta { color: var(--team-a); }
.feed-item .tb { color: var(--team-b); }
.feed-item .fw { color: var(--dim); font-size: 12px; margin: 0 6px; font-family: var(--font-mono); }
.feed-item.me { border-right-color: var(--amber); background: rgba(40, 26, 6, 0.9); }
.feed-item.reject { border-right-color: var(--magenta); color: #ffd0ef; font-size: 12px; font-weight: 600; }

/* round banners and the Vendetta strip */
#d-banner { position: absolute; left: 50%; top: 27%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; animation: bannerIn 420ms var(--ease); }
.d-b-title { font-size: clamp(34px, 6vw, 72px); font-weight: 700; letter-spacing: 0.05em; line-height: 1; background: linear-gradient(180deg, #fff, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; /* a chunky dark outline, so the white top of the gradient reads on snow and sand */ filter: drop-shadow(0 0 1.5px rgba(5,8,20,0.95)) drop-shadow(0 3px 0 rgba(5,8,20,0.85)) drop-shadow(0 6px 16px rgba(0,0,0,0.55)); }
.d-b-sub { display: inline-block; font-size: 17px; font-weight: 700; letter-spacing: 0.18em; color: var(--text); margin-top: 8px; padding: 4px 14px; border-radius: 8px; background: rgba(5, 8, 20, 0.66); text-shadow: 0 1px 1px #000; } /* a plate: the subtitle reads over sky, gore and pylons */
#d-banner[data-kind="win"] .d-b-title { background-image: linear-gradient(180deg, #fff, var(--lime)); }
#d-banner[data-kind="lose"] .d-b-title { background-image: linear-gradient(180deg, #fff, var(--red)); }
#d-banner[data-kind="vendetta"] .d-b-title { background-image: linear-gradient(180deg, #ffd0d8, #ff2a3a); }
#d-banner[data-kind="rage"] .d-b-title { background-image: linear-gradient(180deg, #ffe7c4, var(--orange)); }
@keyframes bannerIn { from { opacity: 0; transform: translate(-50%, -50%) scale(1.25); } to { opacity: 1; transform: translate(-50%, -50%); } }
#d-vend { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); width: 300px; text-align: center; padding: 6px 12px 8px; border-radius: 10px; background: rgba(8, 10, 22, 0.62); /* readable on snow, sand and sky */ }
.d-v-title { font-size: 12px; font-weight: 700; letter-spacing: 0.24em; color: #ff6b7f; text-shadow: 0 1px 4px #000; }
#d-vend[data-kind="rage"] .d-v-title { color: var(--orange); }
/* [arcade] A13: King of the Castle's hold meter, under the score; the Vendetta bar moves below it while it shows */
#d-hold { position: absolute; left: 50%; top: 86px; transform: translateX(-50%); width: 340px; text-align: center; padding: 4px 10px 6px; border-radius: 10px; background: rgba(8, 10, 22, 0.62); font-size: 11px; letter-spacing: 0.08em; }
#d-hold:not([hidden]) ~ #d-vend { top: 132px; }
#d-hold .d-h-label { font-weight: 700; color: #f4f1ea; }
#d-hold[data-state="1"] .d-h-label { color: var(--team-a); }
#d-hold[data-state="2"] .d-h-label { color: var(--team-b); }
#d-hold[data-state="3"] .d-h-label { color: #ffd23a; }
#d-hold .d-h-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
#d-hold .d-h-row b { min-width: 92px; font-variant-numeric: tabular-nums; }
#d-hold .d-h-bar { flex: 1; height: 6px; border-radius: 4px; background: rgba(255,255,255,0.1); overflow: hidden; display: flex; }
#d-hold .d-h-bar.a { justify-content: flex-end; }
#d-hold .d-h-bar i { display: block; height: 100%; width: 0; }
#d-hold .d-h-bar.a i { background: var(--team-a); }
#d-hold .d-h-bar.b i { background: var(--team-b); }
#d-vend[data-kind="warn"] .d-v-title { color: #ffd0d8; }
.d-v-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.1); margin-top: 4px; overflow: hidden; }
.d-v-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff2a3a, #ff9a3c); }

/* spectating the killer, the read hint, the hit-direction ring */
#d-spec { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); padding: 9px 18px; border-radius: 12px; background: rgba(40, 8, 14, 0.85); border: 1px solid rgba(255, 77, 109, 0.5); font-size: 15px; font-weight: 700; letter-spacing: 0.1em; white-space: nowrap; text-align: center; }
#d-spec small { display: block; font-size: 10px; letter-spacing: 0.25em; color: #ffb3c0; }
#d-read { position: absolute; left: 50%; top: calc(50% + 46px); transform: translateX(-50%); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--text); text-shadow: 0 1px 4px #000; }
/* [barricade] the repair prompt: a barricade in reach, E held nails a plank every 0.8 s (the bar) */
#d-repair { position: absolute; left: 50%; top: calc(50% + 46px); transform: translateX(-50%); min-width: 190px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--text); text-shadow: 0 1px 4px #000; white-space: nowrap; }
#d-repair[data-state="locked"], #d-repair[data-state="blocked"], #d-repair[data-state="short"] { color: #ffcf8a; }
#d-repair .d-r-bar { height: 4px; margin-top: 5px; border-radius: 2px; background: rgba(255, 255, 255, 0.18); overflow: hidden; }
#d-repair .d-r-bar i { display: block; height: 100%; width: 0; background: #c99a5c; }
#dmg { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(255,0,20,0) 45%, rgba(200,0,24,0.55) 100%); }
#d-arrow { position: absolute; left: 50%; top: 50%; width: 210px; height: 210px; margin: -105px 0 0 -105px; pointer-events: none; }
#d-arrow i { position: absolute; left: 50%; top: 0; width: 0; height: 0; margin-left: -16px; border-left: 16px solid transparent; border-right: 16px solid transparent; border-bottom: 26px solid rgba(255, 50, 70, 0.9); filter: drop-shadow(0 0 6px rgba(255,0,30,0.8)); }

/* vitals, bottom left */
.d-vitals { position: absolute; left: 18px; bottom: 18px; width: 250px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-soft); }
.d-hp { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.d-hp b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.d-hp span { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; color: var(--dim); }
.d-hpbar { flex-basis: 100%; height: 10px; border-radius: 6px; background: rgba(255,255,255,0.1); overflow: hidden; margin-top: 6px; border: 1px solid rgba(255,255,255,0.14); }
.d-hpbar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #3cf5a7, #b8ff6b); transition: width 120ms linear; }
.d-hp[data-low="1"] b { color: var(--red); }
.d-hp[data-low="1"] .d-hpbar i { background: linear-gradient(90deg, #ff4d6d, #ff9a3c); }
.d-shield { position: relative; height: 16px; border-radius: 6px; background: rgba(34, 228, 255, 0.12); border: 1px solid rgba(34, 228, 255, 0.5); margin-bottom: 7px; overflow: hidden; }
.d-shield i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #22e4ff, #b6f4ff); }
.d-shield span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: #02141a; }
.d-stance { font-size: 10px; letter-spacing: 0.26em; font-weight: 700; color: var(--dim); margin-top: 7px; }
body.duel .d-keys { bottom: 150px; padding: 5px 10px; border-radius: 10px; background: rgba(7, 10, 22, 0.5); color: #c3cbe3; line-height: 1.8; }
body.duel #notice { top: 132px; }
body.duel #breath { bottom: 34px; }

/* weapon block, bottom right */
.d-weapon { position: absolute; right: 18px; bottom: 18px; width: 300px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border-soft); }
.d-weapon .weapon { margin: 0; padding: 0; border: 0; background: none; display: flex; }
.d-weapon .wcal { font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-weapon .wslots { display: flex; gap: 5px; margin-top: 7px; }
.d-weapon .wslots span { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--faint); padding: 2px 7px 2px 3px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.08); white-space: nowrap; }
.d-weapon .wslots span.on { color: var(--text); border-color: rgba(255, 189, 46, 0.6); background: rgba(255, 189, 46, 0.14); }
.d-weapon .wslots span.dim { opacity: 0.38; }
.d-optic { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.18em; color: var(--dim); font-weight: 700; margin: 8px 0 6px; }
.d-optic b { color: var(--text); font-size: 13px; letter-spacing: 0.04em; }
.d-ammo { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.d-ammo #pips { flex: 1; display: flex; gap: 4px; margin: 0; }
.d-ammo #pips i { flex: 1; height: 20px; border-radius: 4px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); position: relative; }
.d-ammo #pips i.on { background: linear-gradient(180deg, #ffd66b, #d99a1e); border-color: rgba(255, 214, 107, 0.8); box-shadow: 0 0 10px rgba(255, 189, 46, 0.35); }
.d-ammo span { font-family: var(--font-mono); font-size: 12px; color: var(--dim); min-width: 34px; text-align: right; }
.boltbar[data-state="swap"] i { background: linear-gradient(90deg, #6f7a99, #9aa4c2); }
.boltbar[data-state="dead"] i { background: #3a3f4a; }

/* [economy] a HORDE run: funds and medkits in the vitals, the armour plates over the HP, the E prompt, the item reveal, the keep panel */
/* the vitals panel grows by the funds and medkit rows (and the plates' bar): the keys' hint stands above it */
body.duel:has(#d-funds:not([hidden])) .d-keys { bottom: 196px; }
body.duel:has(#d-funds:not([hidden])):has(#d-armour:not([hidden])) .d-keys { bottom: 220px; }
.d-funds { display: flex; align-items: baseline; gap: 6px; margin-top: 7px; }
.d-funds b { font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; color: var(--amber); }
.d-funds span { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: var(--dim); }
.d-funds em { font-style: normal; font-family: var(--font-mono); font-size: 11px; color: var(--lime); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.d-funds em[data-kind="spend"] { color: var(--orange); }
.d-funds em[data-kind="info"] { color: var(--dim); }
.d-kits { font-size: 10px; letter-spacing: 0.18em; font-weight: 700; color: var(--text); margin-top: 6px; }
.d-kits[data-none="1"] { color: var(--faint); }
.d-armour { position: relative; height: 16px; border-radius: 6px; background: rgba(255, 189, 46, 0.12); border: 1px solid rgba(255, 189, 46, 0.5); margin-bottom: 7px; overflow: hidden; }
.d-armour i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ffbd2e, #ffe3a3); }
.d-armour span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; letter-spacing: 0.2em; color: #1a1204; }
#d-prompt { position: absolute; left: 50%; top: calc(50% + 46px); transform: translateX(-50%); font-size: 12px; font-weight: 700; letter-spacing: 0.2em; color: var(--text); text-shadow: 0 1px 4px #000; white-space: nowrap; padding: 4px 12px; border-radius: 8px; background: rgba(8, 10, 22, 0.55); }
#d-banner[data-kind="common"] .d-b-title { background-image: linear-gradient(180deg, #fff, #c3cbe3); }
#d-banner[data-kind="rare"] .d-b-title { background-image: linear-gradient(180deg, #fff, var(--cyan)); }
#d-banner[data-kind="epic"] .d-b-title { background-image: linear-gradient(180deg, #fff, var(--magenta)); }
#d-banner[data-kind="legendary"] .d-b-title { background-image: linear-gradient(180deg, #fff, var(--amber)); }
#keep { position: fixed; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; pointer-events: auto; font-family: var(--font-display); }
.k-box { width: min(560px, 94vw); padding: 14px 16px; border-radius: 16px; background: rgba(10, 14, 32, 0.94); border: 1px solid rgba(255, 189, 46, 0.3); box-shadow: 0 20px 60px rgba(0,0,0,0.55); animation: pop 360ms var(--ease); }
.k-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 700; letter-spacing: 0.28em; color: var(--dim); margin-bottom: 8px; }
.k-h b { font-size: 18px; letter-spacing: 0.04em; color: var(--amber); font-variant-numeric: tabular-nums; }
.k-sec { font-size: 10px; font-weight: 700; letter-spacing: 0.3em; color: var(--faint); margin: 10px 0 4px; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 8px; }
.k-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.k-row span { color: var(--text); }
.k-row em { font-style: normal; font-size: 10px; letter-spacing: 0.2em; color: var(--faint); }
#keep button { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(255, 189, 46, 0.6); background: rgba(255, 189, 46, 0.16); color: var(--text); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
#keep button:disabled { opacity: 0.35; cursor: default; border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); }
.k-foot { font-family: var(--font-body); font-size: 11px; color: var(--dim); margin-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
body:has(#keep:not([hidden])) #d-banner { visibility: hidden; }

/* scoreboard (hold Tab; interactive while paused) */
#scoreboard { position: fixed; inset: 0; z-index: 7; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; pointer-events: none; }
#scoreboard.live { pointer-events: auto; z-index: 11; }
.sb-box { width: min(560px, 94vw); padding: 14px 16px; border-radius: 16px; background: rgba(10, 14, 32, 0.92); border: 1px solid var(--border-soft); box-shadow: 0 20px 60px rgba(0,0,0,0.55); font-family: var(--font-display); }
.sb-h { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: 0.28em; color: var(--dim); margin-bottom: 8px; }
#scoreboard table { width: 100%; border-collapse: collapse; }
#scoreboard th { text-align: left; font-size: 10px; letter-spacing: 0.2em; color: var(--faint); padding: 4px 6px; }
#scoreboard td { padding: 6px; border-top: 1px solid rgba(255,255,255,0.06); font-size: 14px; font-weight: 700; }
#scoreboard td .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
#scoreboard tr.dead td { opacity: 0.5; }
#scoreboard tr.me td { color: var(--amber); }
#scoreboard button { font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; padding: 4px 8px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: var(--text); cursor: pointer; margin-left: 4px; }
#scoreboard button.on { background: rgba(255, 77, 109, 0.3); border-color: var(--red); }
#scoreboard button:disabled { opacity: 0.4; cursor: default; }
.sb-foot { font-family: var(--font-body); font-size: 11px; color: var(--dim); margin-top: 10px; }
/* the round banner steps aside while the scoreboard is open (at round end it sat half behind the panel) */
body:has(#scoreboard:not([hidden])) #d-banner { visibility: hidden; }

/* the tombstone reading card */
#stonecard { position: fixed; left: 50%; top: 50%; transform: translate(calc(-50% + 250px), -50%); z-index: 5; width: 330px; padding: 16px 18px 18px; border-radius: 14px; pointer-events: none; text-align: center;
  background: linear-gradient(180deg, #a9b2bd, #8b949f); color: #2c3037; border: 3px solid #6f7782; box-shadow: 0 20px 50px rgba(0,0,0,0.55), inset 0 2px 0 rgba(255,255,255,0.35); animation: pop 360ms var(--ease); font-family: var(--font-display); }
#stonecard .sc-kicker { font-size: 10px; letter-spacing: 0.32em; font-weight: 700; color: #3c4148; opacity: 0.8; }
#stonecard .sc-title { font-size: 20px; font-weight: 700; margin: 6px 0 8px; line-height: 1.15; }
#stonecard .sc-line { font-size: 13px; font-weight: 700; letter-spacing: 0.04em; margin: 3px 0; }
#stonecard .sc-quote { font-size: 14px; font-style: italic; margin: 9px 0 3px; }
#stonecard .sc-last { font-size: 12px; font-weight: 700; margin-top: 3px; }
#stonecard .sc-avenged { display: inline-block; margin-top: 10px; padding: 3px 12px; border: 3px solid #ff2a3a; color: #ff2a3a; font-weight: 700; letter-spacing: 0.14em; transform: rotate(-6deg); }

/* match over */
#matchend { position: fixed; inset: 0; z-index: 8; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(7,10,22,0.3), rgba(7,10,22,0.8)); }
.me-box { width: min(520px, 100%); padding: 26px 30px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(255, 189, 46, 0.3); box-shadow: 0 24px 80px rgba(0,0,0,0.6); text-align: center; animation: pop 420ms var(--ease); font-family: var(--font-display); }
.me-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.34em; color: var(--dim); }
.me-box h1 { font-size: clamp(44px, 9vw, 76px); margin: 4px 0; letter-spacing: 0.04em; background: linear-gradient(180deg, #fff, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.me-box h1[data-kind="lose"] { background-image: linear-gradient(180deg, #fff, var(--red)); }
.me-score { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; }
.me-sub { color: var(--dim); font-family: var(--font-body); font-size: 13px; margin: 8px 0 18px; min-height: 18px; }
#me-rematch { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.08em; padding: 13px 26px; border-radius: 12px; border: 0; color: #03140e; background: linear-gradient(180deg, #2af0b4, #13b988); box-shadow: 0 6px 24px rgba(60, 245, 167, 0.35); cursor: pointer; }
#me-rematch:disabled { filter: grayscale(0.6); opacity: 0.7; cursor: default; }

/* the join / pause menu */
#menu { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 12px 16px; overflow-y: auto; background: radial-gradient(ellipse at center, rgba(7,10,22,0.28), rgba(7,10,22,0.78)); }
#menu[data-mode="join"][data-panel] { background: rgba(5, 8, 18, 0.9); }
.menu-box { position: relative; width: min(860px, 100%); padding: 16px 22px; text-align: left; margin: auto; }
#menu[data-mode="join"][data-panel] .menu-box { background: transparent; border-color: transparent; box-shadow: none; }
#menu[data-mode="join"][data-panel] .menu-box > :not(.m-panel):not(#m-settings):not(#m-error) { opacity: 0; pointer-events: none; }
.m-topbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: nowrap; margin-bottom: 4px; }
#menu #m-corners { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; margin-left: auto; }
#menu #m-corners .m-corner-btn { display: inline-flex; align-items: center; gap: 6px; margin: 0; min-height: 34px; padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.22); background: rgba(14, 22, 46, 0.85); color: #eef4ff; font-family: var(--font-display); font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em; cursor: pointer; white-space: nowrap; }
#menu #m-corners .m-corner-icon { display: inline-flex; align-items: center; gap: 5px; }
#menu #m-corners .m-corner-btn svg { width: 14px; height: 14px; flex: 0 0 auto; color: var(--cyan); }
#menu #m-corners .m-prof-jump { border-color: rgba(93, 255, 192, 0.55); background: rgba(93, 255, 192, 0.14); color: #e9fff5; }
#menu #m-corners .m-prof-jump b { padding: 2px 7px; border-radius: 999px; font-size: 10.5px; color: #032417; background: linear-gradient(180deg, #9dffd9, #5dffc0); }
#menu #m-corners .m-corner-btn:hover, #menu #m-corners .m-corner-btn[aria-expanded="true"] { border-color: var(--cyan); background: rgba(34, 228, 255, 0.18); color: #fff; }
.m-hero { text-align: center; margin: 2px 0 8px; }
.menu-box h1 { font-size: clamp(28px, 4.2vw, 44px); margin: 2px 0 4px; text-align: center; }
.menu-box .lede { text-align: center; font-size: 13.5px; color: #c8d4ee; margin: 0 auto 6px; max-width: 520px; }
.m-hero-cta { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 6px 0 12px; }
#m-play.m-play-hero { min-width: min(280px, 82vw); font-size: 21px; letter-spacing: 0.14em; padding: 13px 40px; border-radius: 14px; box-shadow: 0 8px 28px rgba(255, 138, 42, 0.42); }
.m-play-sub { font-family: var(--font-display); font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; color: #d4e0f8; text-align: center; }
.m-mode-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.m-mode-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 4px; padding: 10px 6px 9px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.18); background: rgba(14, 20, 42, 0.82); color: var(--text); font-family: var(--font-display); cursor: pointer; min-width: 0; }
.m-mode-tile:hover, .m-mode-tile:focus-within { border-color: var(--cyan); background: rgba(22, 34, 68, 0.94); }
.m-tile-icon { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--amber); }
.m-tile-icon svg { width: 21px; height: 21px; }
.m-tile-name { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; line-height: 1.15; color: #fff; }
.m-tile-desc { font-family: var(--font-body); font-size: 11px; line-height: 1.28; color: #cbd6ee; }
.m-mode-tile:hover .m-tile-desc, .m-mode-tile:focus-within .m-tile-desc { color: #fff; }
.m-tile-last { font-family: var(--font-mono); font-size: 10px; font-weight: 700; color: var(--amber); line-height: 1.2; }
.m-tile-cta { font-family: var(--font-display); font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: var(--cyan); margin-top: auto; padding-top: 2px; opacity: 0.88; }
.m-mode-tile:hover .m-tile-cta, .m-mode-tile:focus-within .m-tile-cta { opacity: 1; color: var(--amber); }
.m-mode-tile-horde { padding: 0; }
.m-tile-hit { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: 4px; padding: 20px 6px 9px; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; border-radius: 12px; }
.m-tile-more { position: absolute; top: 3px; right: 3px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(60, 245, 167, 0.65); background: rgba(8, 26, 22, 0.94); color: var(--lime); font-family: var(--font-display); font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; cursor: pointer; }
.m-tile-more:hover { border-color: #fff; color: #fff; }
.m-secondary-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 6px 0 2px; flex-wrap: wrap; }
#menu .m-friends-toggle { min-height: 44px; padding: 9px 18px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; border-radius: 11px; border: 1.5px solid rgba(34, 228, 255, 0.5); background: rgba(34, 228, 255, 0.12); color: #eef6ff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#menu .m-friends-toggle:hover, #menu .m-friends-toggle[aria-expanded="true"] { border-color: var(--cyan); background: rgba(34, 228, 255, 0.22); color: #fff; }
#menu .m-practice-toggle { min-height: 44px; padding: 9px 18px; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; border-radius: 11px; border: 1px solid rgba(255, 255, 255, 0.24); background: rgba(14, 22, 46, 0.72); color: #d8e4fc; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
/* [Claude, judges polish r1] Practice reads lighter than "Play with friends": a thin, dim outline and smaller type */
#menu .m-practice-toggle { border-color: rgba(255, 255, 255, 0.2); background: transparent; color: #d2dcf0; font-size: 12px; letter-spacing: 0.06em; padding: 8px 14px; }
#menu .m-practice-toggle:hover, #menu .m-practice-toggle[aria-expanded="true"] { border-color: rgba(34, 228, 255, 0.65); background: rgba(22, 34, 68, 0.92); color: #fff; }
.m-link-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 0; color: #7ceeff; font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-decoration: underline; text-underline-offset: 3px; padding: 6px 12px; cursor: pointer; }
.m-link-btn:hover { color: #fff; }
#menu .m-panel, #menu[data-mode="join"] #m-settings[open] {
  position: fixed; left: 50%; top: 56px; transform: translateX(-50%);
  width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 76px);
  overflow-y: auto; overscroll-behavior: contain; z-index: 20;
  margin: 0; padding: 0 18px 0; border-radius: 16px;
  border: 1px solid rgba(34, 228, 255, 0.45); background: #090e1e;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(0px);
  scrollbar-width: thin; scrollbar-color: rgba(34, 228, 255, 0.45) rgba(255, 255, 255, 0.06);
}
#menu #m-horde.m-panel { background: #090e1e; border-color: rgba(34, 228, 255, 0.45); }
#menu #m-practice.m-panel { background: #090e1e; padding-bottom: 16px; }
#menu .m-panel.m-popover, #menu .m-panel.m-locker-panel { width: min(460px, calc(100vw - 24px)); top: 150px; padding-bottom: 16px; }
#menu .m-panel-head, #menu .m-horde-head, #menu[data-mode="join"] #m-settings > summary {
  position: sticky; top: 0; z-index: 7;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 0 10px; margin: 0 0 10px;
  background: #090e1e; border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-display); font-size: 12.5px; letter-spacing: 0.14em; color: var(--cyan);
}
#menu[data-mode="join"] #m-settings > summary { margin-bottom: 0; }
#menu #m-horde .m-horde-head { background: #090e1e; }
#menu[data-mode="join"] #m-settings[open]::after,
#menu #m-horde::after,
#menu #m-profile-drawer::after,
#menu #m-ladder-drawer::after {
  content: ""; display: block; position: sticky; bottom: 0; left: 0; right: 0;
  height: 28px; margin: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(180deg, rgba(9, 14, 30, 0) 0%, rgba(9, 14, 30, 0.88) 55%, #090e1e 100%);
}
#menu[data-mode="join"] #m-settings[open]::after {
  height: 32px;
}
/* [Claude, Grok fix2 note] the scroll cue on the panel's visible bottom edge: a mask on the scroll box itself (the
   sticky ::after above sat after the content, below the fold), with room so the last row can scroll clear of it */
#menu[data-mode="join"] #m-settings[open],
#menu #m-horde.m-panel,
#menu #m-profile-drawer.m-panel,
#menu #m-ladder-drawer.m-panel {
  padding-bottom: 36px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 32px), rgba(0, 0, 0, 0.08) 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 32px), rgba(0, 0, 0, 0.08) 100%);
}
#menu[data-mode="join"] #m-settings[open] {
  padding-bottom: 64px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 32px), rgba(0, 0, 0, 0.06) 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 32px), rgba(0, 0, 0, 0.06) 100%);
}
.m-settings-tabs {
  position: sticky; top: 52px; z-index: 6;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  padding: 8px 0 10px; margin: 0 0 8px;
  background: #090e1e; border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 18px rgba(9, 14, 30, 0.92);
}
#menu[data-mode="pause"] .m-settings-tabs { top: 0; }
.m-settings-tab {
  min-height: 38px; padding: 7px 10px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(14, 22, 46, 0.78);
  color: #b8c6e2; font-family: var(--font-display); font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.06em; cursor: pointer; text-align: center; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.m-settings-tab:hover { border-color: rgba(34, 228, 255, 0.55); color: #fff; }
.m-settings-tab[aria-selected="true"] {
  border-color: var(--cyan); background: rgba(34, 228, 255, 0.18); color: #fff;
  box-shadow: inset 0 -2px 0 var(--cyan);
}
.m-settings-panel > .m-sep:first-child { margin-top: 2px; border-top: 0; padding-top: 2px; }
#menu[data-mode="join"] #m-settings[data-tab="controls"] .m-settings-panel:not([data-tab-panel="controls"]),
#menu[data-mode="join"] #m-settings[data-tab="audio"] .m-settings-panel:not([data-tab-panel="audio"]),
#menu[data-mode="join"] #m-settings[data-tab="gameplay"] .m-settings-panel:not([data-tab-panel="gameplay"]),
#menu[data-mode="join"] #m-settings[data-tab="display"] .m-settings-panel:not([data-tab-panel="display"]),
#menu[data-mode="pause"] #m-settings[data-user-tab][data-tab="controls"] .m-settings-panel:not([data-tab-panel="controls"]),
#menu[data-mode="pause"] #m-settings[data-user-tab][data-tab="audio"] .m-settings-panel:not([data-tab-panel="audio"]),
#menu[data-mode="pause"] #m-settings[data-user-tab][data-tab="gameplay"] .m-settings-panel:not([data-tab-panel="gameplay"]),
#menu[data-mode="pause"] #m-settings[data-user-tab][data-tab="display"] .m-settings-panel:not([data-tab-panel="display"]) {
  display: none;
}
.m-friends-fields { margin: 8px 0 4px; }
#menu .m-buttons.m-friends-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
#menu .m-friends-actions .m-ghost { width: 100%; min-height: 42px; padding: 10px 12px; font-size: 12px; color: #eef4ff; border-color: rgba(34, 228, 255, 0.38); background: rgba(14, 22, 46, 0.82); }
#menu .m-friends-actions .m-ghost:hover { border-color: var(--cyan); background: rgba(34, 228, 255, 0.16); color: #fff; }
.m-rules-fold { margin-top: 10px; border: 1px solid rgba(255, 138, 42, 0.32); border-radius: 12px; background: rgba(255, 138, 42, 0.05); overflow: hidden; }
.m-rules-summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; cursor: pointer; list-style: none; user-select: none;
  font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; color: var(--amber);
}
.m-rules-summary::-webkit-details-marker { display: none; }
.m-rules-summary::after { content: "▾"; font-size: 14px; color: var(--amber); flex: 0 0 auto; transition: transform 140ms var(--ease); }
.m-rules-fold[open] > .m-rules-summary { border-bottom: 1px solid rgba(255, 138, 42, 0.22); background: rgba(255, 138, 42, 0.08); }
.m-rules-fold[open] > .m-rules-summary::after { transform: rotate(180deg); }
.m-rules-summary-text { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 12px; flex: 1 1 auto; flex-wrap: wrap; min-width: 0; }
.m-rules-summary-sub { font-family: var(--font-body); font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--dim); }
.m-rules-fold .m-rules { margin-top: 0; border: 0; border-radius: 0; background: transparent; }
#menu .m-friends-cta {
  position: sticky; bottom: 0; z-index: 6;
  margin: 12px 0 0; padding: 10px 0 14px;
  background: linear-gradient(180deg, rgba(9, 14, 30, 0.88) 0%, #090e1e 28%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#menu .m-friends-cta #m-join-room { width: 100%; min-height: 46px; font-size: 16px; letter-spacing: 0.12em; }
.m-horde-howto { display: block; font-family: var(--font-body); font-size: 11px; letter-spacing: 0; font-weight: 400; color: #9eefff; margin-top: 3px; line-height: 1.35; }
#menu #m-mode-preview.m-panel { width: min(820px, calc(100vw - 24px)); background: #090e1e; border-color: rgba(34, 228, 255, 0.45); padding-bottom: 14px; }
.m-preview-head-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-preview-kicker { font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.24em; color: var(--cyan); opacity: 0.95; }
.m-preview-title { font-family: var(--font-display); font-size: 21px; font-weight: 800; letter-spacing: 0.06em; color: #fff; line-height: 1.15; }
.m-panel-head small.m-preview-pitch { font-size: 13px; color: #e2eeff; margin-top: 2px; line-height: 1.35; }
.m-preview-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; }
.m-preview-pill { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(34, 228, 255, 0.32); background: rgba(14, 22, 46, 0.92); min-width: 0; }
.m-preview-pill-k { font-family: var(--font-display); font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--cyan); }
.m-preview-pill b { font-family: var(--font-display); font-size: 12.5px; font-weight: 700; color: #f4f8ff; line-height: 1.25; overflow-wrap: anywhere; }
.m-preview-body { display: grid; grid-template-columns: 356px minmax(0, 1fr); gap: 12px; align-items: stretch; }
.m-preview-map-card { position: relative; border-radius: 12px; border: 1px solid rgba(34, 228, 255, 0.4); background: #071022; overflow: hidden; display: flex; flex-direction: column; height: 100%; min-height: 196px; }
#m-preview-canvas { display: block; width: 100%; height: 100%; flex: 1 1 auto; min-height: 196px; object-fit: cover; }
.m-preview-map-badge { position: absolute; left: 8px; bottom: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(6, 11, 24, 0.9); border: 1px solid rgba(34, 228, 255, 0.42); font-family: var(--font-display); font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; color: #e8fbff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-preview-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); flex: 0 0 auto; }
.m-preview-cols { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.m-preview-sec { padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(34, 228, 255, 0.22); background: rgba(14, 22, 46, 0.82); }
.m-preview-sec-h { display: block; font-family: var(--font-display); font-size: 11px; font-weight: 800; letter-spacing: 0.16em; color: var(--cyan); margin: 0 0 5px; }
.m-preview-more > summary.m-preview-more-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; user-select: none; margin: 0; }
.m-preview-more > summary.m-preview-more-summary::-webkit-details-marker { display: none; }
.m-preview-more[open] > summary.m-preview-more-summary { margin-bottom: 6px; }
.m-preview-more-tag { font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: #9eefff; padding: 2px 7px; border-radius: 999px; border: 1px solid rgba(34, 228, 255, 0.35); background: rgba(34, 228, 255, 0.1); }
.m-preview-list { margin: 0; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 4px; font-family: var(--font-body); font-size: 12.5px; line-height: 1.38; color: #f2f7ff; }
.m-preview-tips { color: #e2eeff; }
#menu .m-buttons.m-preview-cta {
  position: sticky; bottom: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 10px 0 0; padding: 10px 0 2px;
  background: linear-gradient(180deg, rgba(9, 14, 30, 0.9) 0%, #090e1e 30%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
#menu .m-preview-cta #m-preview-start { flex: 1 1 auto; max-width: 340px; min-height: 46px; font-size: 17px; letter-spacing: 0.14em; }
#menu .m-preview-cta #m-preview-back { min-height: 46px; padding: 10px 20px; font-size: 13px; }
.m-panel-head small { display: block; font-family: var(--font-body); font-size: 11.5px; letter-spacing: 0; font-weight: 400; color: #c4d0ea; margin-top: 2px; }
.m-panel-close { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.28); color: #fff; width: 32px; height: 32px; border-radius: 9px; font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.m-panel-close:hover { border-color: var(--red); background: rgba(255, 77, 109, 0.25); color: #fff; }
.m-practice-controls { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.m-practice-range { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 12.5px; color: #b8c6e2; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-practice-range a { color: #7ceeff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; }
.m-locker-copy { font-size: 13px; color: #ccd6ee; line-height: 1.5; margin: 4px 0 12px; }
#menu[data-mode="join"] #m-settings:not([open]) { display: none; }
#menu #m-settings > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; list-style: none; }
#menu #m-settings > summary::-webkit-details-marker { display: none; }
#menu[data-mode="pause"] #m-settings:not([open]) .m-panel-close { display: none; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 10px 0 4px; }
.m-grid label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--dim); }
.m-grid label small { font-family: var(--font-body); letter-spacing: 0; font-weight: 400; color: #a8b6d2; font-size: 11px; line-height: 1.25; margin-bottom: 4px; }
.m-grid .m-wide { grid-column: 1 / -1; }
.m-grid input, .m-grid select { font-family: var(--font-body); font-size: 14px; color: var(--text); background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.16); border-radius: 9px; padding: 8px 10px; outline: none; user-select: text; -webkit-user-select: text; }
.m-grid select option { background: #101528; }
#menu .m-grid input:focus, #menu .m-grid select:focus { border-color: var(--cyan); }
#menu .m-grid input:focus-visible, #menu .m-grid select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 0px; }
.m-grid input[type="range"] { padding: 0; accent-color: var(--amber); }
.m-grid output { color: var(--amber); letter-spacing: 0.05em; }
.m-grid label.m-check { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; cursor: pointer; }
.m-grid label.m-check small { flex-basis: 100%; }
/* [trackpad] the preset reads as an action (the amber accent), the height of the selects beside it */
.m-trackpad { font: inherit; font-weight: 700; letter-spacing: 0.04em; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.45); background: rgba(255,255,255,0.06); color: #e8ecf4; cursor: pointer; text-align: left; }
.m-trackpad:hover { border-color: var(--amber); }
.m-trackpad[data-on="1"] { border-color: var(--amber); background: var(--amber); color: #14110a; }
.m-grid input[type="checkbox"] { width: 17px; height: 17px; margin: 0; padding: 0; accent-color: var(--amber); }
.m-sep { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.3em; color: var(--lime); margin: 14px 0 2px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.m-error { position: relative; z-index: 25; background: rgba(40, 10, 16, 0.98); border: 1px solid var(--red); color: #ffd0d8; border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 0 0 8px; pointer-events: none; }
#menu[data-mode="join"][data-panel] .m-error { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); width: min(760px, calc(100vw - 24px)); margin: 0; }
.m-buttons { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
.m-go { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.08em; padding: 13px 30px; border-radius: 12px; border: 0; color: #120a02; background: linear-gradient(180deg, #ffb35c, #ff8a2a); box-shadow: 0 6px 24px rgba(255, 138, 42, 0.35); cursor: pointer; }
.m-ghost { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; padding: 12px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.05); color: var(--dim); cursor: pointer; }
#menu[data-mode="join"] #m-resume, #menu[data-mode="join"] #m-leave { display: none; }
#menu[data-mode="pause"] #m-play, #menu[data-mode="pause"] .m-join { display: none; }
#menu[data-mode="join"] #m-players { display: none; }
/* paused, the scoreboard (and its mute, block and report buttons) sits inside the menu */
#m-players #scoreboard { position: static; padding: 0; display: block; pointer-events: auto; }
#m-players .sb-box { width: 100%; box-shadow: none; background: rgba(0, 0, 0, 0.25); }
.m-foot { text-align: center; font-size: 12.5px; color: #b8c6e2; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.m-foot a { color: #7ceeff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; }
.m-pause { display: none; }
#menu[data-mode="pause"] .m-pause { display: flex; }
.m-details { margin-top: 14px; border-top: 1px solid var(--border-soft); padding-top: 12px; }
.m-details summary { cursor: pointer; font-family: var(--font-display); font-size: 13px; color: var(--dim); }
.m-details[open] summary { color: var(--cyan); margin-bottom: 10px; }
.m-help { color: var(--dim); font-size: 12px; line-height: 1.8; }
.m-practice { padding: 14px 16px; border: 1px solid rgba(31,199,184,0.35); border-radius: 12px; background: #090e1e; }
.m-practice b { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.08em; color: var(--cyan); }
.m-practice small { display: block; color: var(--dim); font-size: 11px; line-height: 1.5; margin-top: 4px; }
.m-tier-label { display: flex; flex-direction: column; gap: 4px; color: var(--dim); font-size: 10px; }
.m-tier-label select { background: #101528; border: 1px solid var(--border-soft); border-radius: 8px; color: var(--text); padding: 7px; font-size: 12px; }
.m-practice .m-go { font-size: 14px; padding: 10px 18px; }
.m-invite-link { display: block; width: 100%; margin-top: 8px; padding: 8px; border-radius: 8px; border: 1px solid var(--border-soft); background: #101528; color: var(--text); user-select: text; }
#menu :focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
#menu .m-buttons { flex-wrap: wrap; }
#menu .m-join.m-buttons .m-go { font-size: 15px; padding: 12px 20px; }
#menu .m-join.m-buttons .m-ghost { font-size: 12px; padding: 12px 16px; }
@media (prefers-reduced-motion: reduce) { .menu-box { animation: none; } }
/* the range page's link to the duel */
.duel-link { display: inline-block; margin-top: 14px; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: 0.08em; color: #120a02; background: linear-gradient(180deg, #ffb35c, #ff8a2a); padding: 9px 18px; border-radius: 10px; text-decoration: none; box-shadow: 0 6px 20px rgba(255, 138, 42, 0.3); }

@media (max-width: 760px) {
  .d-weapon { width: 220px; }
  .d-vitals { width: 190px; }
  body.duel .d-keys { display: none; }
  .m-grid { grid-template-columns: 1fr; }
  #stonecard { transform: translate(-50%, -50%); }
  #menu { padding: 6px 8px; }
  .menu-box { padding: 10px 10px; }
  #menu #m-corners { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; margin: 0; }
  #menu #m-corners .m-corner-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 100%; min-width: 0; min-height: 44px; padding: 4px 4px; border-radius: 11px; font-size: 10px; line-height: 1.1; letter-spacing: 0.03em; white-space: nowrap; }
  #menu #m-corners .m-corner-icon { display: inline-flex; align-items: center; justify-content: center; gap: 3px; height: 17px; }
  #menu #m-corners .m-corner-btn svg { width: 13px; height: 13px; }
  #menu #m-corners .m-prof-jump b { padding: 1px 5px; font-size: 9px; line-height: 1.15; }
  #menu #m-corners .m-corner-label { display: block; font-size: 10px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .m-hero { margin: 4px 0 4px; }
  .menu-box h1 { font-size: 25px; margin: 0 0 2px; }
  .menu-box .lede { font-size: 12px; margin: 0 auto 4px; }
  .m-hero-cta { gap: 4px; margin: 4px 0 8px; }
  #m-play.m-play-hero { font-size: 18px; padding: 11px 32px; }
  .m-play-sub { font-size: 11.5px; }
  .m-mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 6px; }
  .m-mode-tile { padding: 7px 4px 6px; gap: 2px; }
  .m-tile-hit { padding: 17px 4px 6px; gap: 2px; }
  .m-tile-icon { width: 19px; height: 19px; }
  .m-tile-icon svg { width: 17px; height: 17px; }
  .m-tile-name { font-size: 11px; }
  .m-tile-desc { font-size: 10px; line-height: 1.2; }
  .m-tile-cta { font-size: 9px; }
  .m-secondary-bar { gap: 8px; margin: 2px 0 0; }
  #menu .m-friends-toggle { min-height: 44px; padding: 8px 14px; font-size: 12.5px; }
  #menu .m-practice-toggle { min-height: 44px; padding: 8px 14px; font-size: 12.5px; }
  .m-link-btn { min-height: 44px; font-size: 12.5px; padding: 6px 10px; }
  .m-foot { margin-top: 2px; font-size: 12px; }
  #menu .m-panel, #menu[data-mode="join"] #m-settings[open] {
    top: 40px; width: calc(100vw - 16px); max-height: calc(100vh - 52px); padding: 0 12px 0;
  }
  #menu .m-panel-head, #menu .m-horde-head, #menu[data-mode="join"] #m-settings > summary {
    padding: 10px 0 9px; margin: 0 0 10px;
  }
  #menu[data-mode="join"] #m-settings > summary { margin-bottom: 0; }
  .m-settings-tabs { top: 56px; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 6px 0 8px; }
  .m-settings-tab { min-height: 36px; padding: 6px 4px; font-size: 10px; letter-spacing: 0.01em; }
  .m-friends-fields { gap: 8px; margin: 4px 0 2px; }
  .m-friends-fields label small { font-size: 10px; margin-bottom: 1px; }
  #menu .m-buttons.m-friends-actions { gap: 8px; margin-top: 8px; }
  .m-rules-fold { margin-top: 8px; }
  .m-rules-summary { padding: 9px 12px; }
  .m-rules-summary-text { flex-direction: column; align-items: flex-start; gap: 2px; }
  .m-rules-summary-sub { font-size: 10.5px; }
  #menu .m-friends-cta { margin-top: 8px; padding: 8px 0 12px; }
  #menu[data-mode="join"] #m-settings[open]::after,
  #menu #m-horde::after,
  #menu #m-profile-drawer::after,
  #menu #m-ladder-drawer::after {
    bottom: 0; margin: 0;
  }
  #menu .m-panel.m-popover, #menu .m-panel.m-locker-panel { width: calc(100vw - 16px); top: 110px; padding-bottom: 14px; }
  .m-panel-close { width: 38px; height: 38px; font-size: 20px; }
  #menu #m-mode-preview.m-panel { top: 20px; max-height: calc(100vh - 28px); padding: 0 10px 10px; }
  #menu #m-mode-preview .m-panel-head { padding: 8px 0 6px; margin: 0 0 6px; }
  .m-preview-kicker { font-size: 9.5px; }
  .m-preview-title { font-size: 17px; }
  .m-panel-head small.m-preview-pitch { font-size: 11.5px; line-height: 1.28; margin-top: 2px; color: #e6f0ff; }
  .m-preview-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin: 0 0 7px; }
  .m-preview-pill { padding: 5px 6px; border-radius: 8px; gap: 1px; }
  .m-preview-pill-k { font-size: 8.5px; letter-spacing: 0.12em; }
  .m-preview-pill b { font-size: 10.5px; line-height: 1.2; color: #f6faff; }
  .m-preview-body { grid-template-columns: 1fr; gap: 7px; }
  .m-preview-map-card { aspect-ratio: 16 / 9; min-height: 164px; max-height: 200px; }
  #m-preview-canvas { aspect-ratio: 16 / 9; min-height: 164px; max-height: 200px; }
  .m-preview-map-badge { left: 6px; right: 6px; bottom: 6px; padding: 3px 7px; font-size: 9px; }
  .m-preview-cols { gap: 6px; }
  .m-preview-sec { padding: 7px 10px; border-radius: 9px; }
  .m-preview-sec-h { font-size: 10px; margin: 0 0 3px; }
  .m-preview-list { font-size: 11.5px; line-height: 1.32; gap: 3px; padding-left: 14px; color: #f2f7ff; }
  #menu .m-buttons.m-preview-cta { margin: 7px 0 0; padding: 7px 0 0; gap: 8px; }
  #menu .m-preview-cta #m-preview-start { min-height: 44px; font-size: 15px; padding: 9px 18px; }
  #menu .m-preview-cta #m-preview-back { min-height: 44px; font-size: 12px; padding: 9px 14px; }
}

/* [arcade] room rules on the join screen (client/roomopts.js, PLAN.md R9) */
.m-rules { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin-top: 12px; padding: 14px 16px; border: 1px solid rgba(255,138,42,0.3); border-radius: 12px; background: rgba(255,138,42,0.06); min-width: 0; }
.m-rules label { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--amber); min-width: 0; }
.m-rules label.m-check { flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; cursor: pointer; align-self: end; padding: 7px 0; color: var(--text); white-space: nowrap; }
.m-rules select { font-family: var(--font-body); font-size: 13px; letter-spacing: 0; font-weight: 400; color: var(--text); background: #101528; border: 1px solid var(--border-soft); border-radius: 8px; padding: 7px; max-width: 100%; }
.m-rules small { grid-column: 1 / -1; color: var(--dim); font-size: 11px; line-height: 1.5; }
/* [arcade] A8: the menu v2's pickers (client/roomopts.js): free-for-all, the modifiers, greyed with their reasons */
.m-rules select option:disabled { color: #6b7088; }
.m-rules label.m-flag { justify-content: flex-end; min-width: 0; }
.m-rules label.m-flag > span { display: inline-flex; align-items: center; flex-wrap: nowrap; gap: 8px; padding: 4px 0; white-space: nowrap; }
.m-rules label.m-flag small { grid-column: auto; letter-spacing: 0; font-weight: 400; font-family: var(--font-body); overflow-wrap: anywhere; }
.m-rules input[type="checkbox"] { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: var(--amber); }
.m-mods { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px; margin: 0; padding: 8px 0 0; border: 0; border-top: 1px solid rgba(255,138,42,0.2); min-width: 0; }
.m-mods legend { font-family: var(--font-display); font-size: 10.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--amber); padding: 0 6px 0 0; }
.m-rules label.m-mod { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 8px; letter-spacing: 0.02em; font-size: 12px; color: var(--text); cursor: pointer; }
.m-rules label.m-mod small { grid-column: auto; flex-basis: 100%; padding-left: 24px; font-size: 10.5px; color: var(--faint); letter-spacing: 0; font-weight: 400; font-family: var(--font-body); }
.m-rules label.m-mod.off { color: #6b7088; cursor: default; }
.m-rules-line { grid-column: 1 / -1; font-family: var(--font-display); font-size: 12px; letter-spacing: 0.06em; color: var(--amber); }
/* [arcade] A8: Hardcore (docs/ARCADE.md section 4.8; client/duelhud.js setHardcore): no vitals, ammo, clock, kill feed or weapon card */
body.hardcore #hud .d-vitals, body.hardcore #hud .d-weapon, body.hardcore #hud .d-ammo, body.hardcore #d-timer, body.hardcore #feed { visibility: hidden !important; }
@media (max-width: 760px) { .m-rules { grid-template-columns: 1fr; } }

/* [4b] the minimap (client/minimap.js): top left under the room line, sized with the screen and the MINIMAP SIZE
   setting ([r6]); on a phone top left under the score and the objective bar; clear of the aim area */
#minimap { position: absolute; left: 18px; top: 110px; width: clamp(220px, 17vw, 300px); height: clamp(220px, 17vw, 300px); pointer-events: none; }
#minimap[data-size="small"] { width: clamp(170px, 13vw, 230px); height: clamp(170px, 13vw, 230px); }
#minimap[data-size="large"] { width: clamp(270px, 21vw, 360px); height: clamp(270px, 21vw, 360px); }
#minimap[hidden] { display: none; }
#minimap[data-style="a"] canvas { border-radius: 11%; } /* [styles] A: the rounded square */
#minimap canvas { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 8px 26px rgba(0, 0, 0, 0.55); }
body.hardcore #hud #minimap { visibility: hidden !important; }
#inventory-hotbar { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 7px 14px; border: 1px solid var(--border-soft); border-radius: 9px; background: var(--surface); color: var(--text); font: 600 11.5px var(--font-mono); white-space: nowrap; }
body.s7-room #inventory-hotbar { left: calc(50vw + 132px); }
body.duel:has(#inventory-hotbar:not([hidden])) #breath { bottom: 54px; }
@media (max-width: 1360px) {
  body.s7-room #inventory-hotbar { bottom: 142px; left: 50%; transform: translateX(-50%); }
  body.duel.s7-room:has(#inventory-hotbar:not([hidden])) #breath { bottom: 180px; }
}
@media (max-width: 1080px) {
  #inventory-hotbar, body.s7-room #inventory-hotbar { bottom: 142px; left: 50%; transform: translateX(-50%); }
  body.duel:has(#inventory-hotbar:not([hidden])) #breath { bottom: 180px; }
}
@media (max-width: 760px) {
  #minimap, #minimap[data-size] { left: 8px; right: auto; top: 138px; bottom: auto; width: 144px; height: 144px; } /* [r8] top left under the score and objective bar, clear of the bottom-left move stick, vitals and item bar */
  #minimap[data-size="small"] { width: 128px; height: 128px; }
  #minimap[data-size="large"] { width: 152px; height: 152px; }
  #inventory-hotbar, body.s7-room #inventory-hotbar { bottom: 100px; left: 50%; transform: translateX(-50%); padding: 4px 10px; font-size: 10px; border-radius: 8px; max-width: calc(100vw - 16px); overflow: hidden; text-overflow: ellipsis; }
  body.duel #hud .hud-tl { display: none; }
  body.duel #hud .hud-tr, body.duel.s7-room #hud .hud-tr { top: 138px; right: 8px; width: calc(100vw - 180px); overflow: hidden; }
  body.duel #hud .feed-item { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 11px; padding: 4px 8px; }
  body.duel #hud #d-hold { top: 84px; width: min(340px, 94vw); padding: 3px 8px 4px; }
  body.duel #hud .s7-compass { top: 48px; height: 22px; }
  body.duel #hud .s7-grid { top: 74px; }
  body.duel #hud #d-vend, body.duel #hud #d-hold:not([hidden]) ~ #d-vend, body.duel #hud:has(#s7:not([hidden])) #d-vend { top: 306px; }
  body.duel #notice { top: 306px; }
  body.duel #hud #d-banner, body.duel #hud:has(#s7:not([hidden])) #d-banner { top: 43%; }
  body.duel #hud #breath, body.duel.s7-room #hud #breath, body.duel:has(#inventory-hotbar:not([hidden])) #hud #breath { bottom: 134px; }
}

/* [ghost] Ghost Mode HUD for dead players (client/ghost.js, docs/GHOST.md) */
body.duel:has(#ghost-hud[data-open="1"]) .s7-robot { display: none; }
body.duel:has(#ghost-hud[data-open="1"]) #inventory-hotbar,
body.duel.s7-room:has(#ghost-hud[data-open="1"]) #inventory-hotbar {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}
body.duel:has(#ghost-hud[data-open="1"]) #d-spec { bottom: 196px; }
.ghost-hud {
  position: fixed;
  left: 50%;
  bottom: 52px;
  transform: translateX(-50%);
  z-index: 12;
  width: min(440px, calc(100vw - 656px));
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 12px 10px;
  border-radius: 14px;
  background: rgba(10, 14, 32, 0.88);
  border: 1px solid rgba(148, 163, 204, 0.24);
  border-top: 2px solid rgba(34, 228, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); /* no outer shadow: it would paint over the 4 px phone gaps */
  backdrop-filter: blur(4px);
  color: var(--text);
  font-family: var(--font-display);
  pointer-events: auto;
}
.ghost-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(148, 163, 204, 0.16);
}
.ghost-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}
.ghost-orb {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d6fbff, #22e4ff 65%, #1fc7b8);
  box-shadow: 0 0 10px rgba(34, 228, 255, 0.85);
  flex: 0 0 auto;
}
.ghost-title b {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #dffaff;
  text-shadow: 0 0 12px rgba(34, 228, 255, 0.45);
}
.ghost-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--dim);
  padding-left: 6px;
  border-left: 1px solid rgba(148, 163, 204, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ghost-hud[data-flying="1"] .ghost-sub {
  color: var(--cyan);
}
.ghost-pred-pill {
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 189, 46, 0.14);
  border: 1px solid rgba(255, 189, 46, 0.48);
  color: #ffe299;
  white-space: nowrap;
}
.ghost-pred-pill[data-state="locked"] {
  background: rgba(34, 228, 255, 0.16);
  border-color: rgba(34, 228, 255, 0.55);
  color: #bdf6ff;
}
.ghost-pred-pill[data-state="won"] {
  background: rgba(60, 245, 167, 0.2);
  border-color: var(--lime);
  color: #b8ffdc;
}
.ghost-pred-pill[data-state="closed"],
.ghost-pred-pill[data-state="lost"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-soft);
  color: var(--dim);
}
.ghost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.ghost-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 36px;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(18, 24, 48, 0.88);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  overflow: hidden;
  touch-action: manipulation;
  transition: transform 100ms ease, filter 120ms ease;
}
.ghost-btn kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(5, 8, 18, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  flex: 0 0 auto;
}
.ghost-btn-label {
  flex: 1 1 auto;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ghost-btn-xp,
.ghost-btn-hint {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffe299;
  white-space: nowrap;
  flex: 0 0 auto;
}
/* Team A (orange) & Team B (teal) prediction buttons matching #d-round */
.ghost-btn.ghost-team-a {
  border-color: rgba(255, 138, 42, 0.65);
  border-left: 4px solid var(--team-a, #ff8a2a);
  background: linear-gradient(180deg, rgba(255, 162, 79, 0.26), rgba(255, 138, 42, 0.14));
}
.ghost-btn.ghost-team-b {
  border-color: rgba(31, 199, 184, 0.65);
  border-left: 4px solid var(--team-b, #1fc7b8);
  background: linear-gradient(180deg, rgba(70, 224, 210, 0.26), rgba(31, 199, 184, 0.14));
}
.ghost-btn.ghost-team-b .ghost-btn-xp {
  color: #a9fff5;
}
.ghost-btn.ghost-team-a[data-picked="1"] {
  background: linear-gradient(180deg, #ffa24f, #ff8a2a);
  border-color: #ffd4a6;
  color: #120a02;
  opacity: 1 !important;
  box-shadow: 0 0 16px rgba(255, 138, 42, 0.5);
}
.ghost-btn.ghost-team-b[data-picked="1"] {
  background: linear-gradient(180deg, #46e0d2, #1fc7b8);
  border-color: #b5fff6;
  color: #02140f;
  opacity: 1 !important;
  box-shadow: 0 0 16px rgba(31, 199, 184, 0.5);
}
.ghost-btn[data-picked="1"] kbd,
.ghost-btn[data-picked="1"] .ghost-btn-xp {
  background: rgba(5, 8, 18, 0.78);
  color: #fff;
}
.ghost-btn[data-picked="0"] {
  opacity: 0.34 !important;
}
/* Drone launch & mark action buttons */
.ghost-btn.ghost-action-drone[data-state="ready"] {
  border-color: rgba(34, 228, 255, 0.58);
  border-left: 4px solid var(--cyan);
  background: linear-gradient(180deg, rgba(34, 228, 255, 0.22), rgba(18, 28, 56, 0.9));
}
.ghost-btn.ghost-action-drone[data-state="ready"] .ghost-btn-hint {
  color: #9bf2ff;
}
.ghost-btn.ghost-action-drone[data-state="flying"] {
  border-color: rgba(60, 245, 167, 0.75);
  border-left: 4px solid var(--lime);
  background: linear-gradient(180deg, rgba(60, 245, 167, 0.25), rgba(14, 38, 34, 0.92));
  color: #e9fff5;
  opacity: 1 !important;
}
.ghost-btn.ghost-action-drone[data-state="flying"] .ghost-btn-hint {
  color: var(--lime);
}
.ghost-btn.ghost-action-drone[data-state="shot"] {
  border-color: rgba(255, 77, 109, 0.55);
  border-left: 4px solid var(--red);
  background: rgba(46, 12, 22, 0.82);
  color: #ffb3c2;
  opacity: 0.85 !important;
}
.ghost-btn.ghost-action-drone[data-state="shot"] .ghost-btn-hint {
  color: #ff8aa0;
}
.ghost-btn.ghost-action-mark[data-state="ready"] {
  border-color: rgba(255, 77, 109, 0.75);
  border-left: 4px solid var(--red);
  background: linear-gradient(180deg, rgba(255, 77, 109, 0.28), rgba(44, 14, 26, 0.92));
}
.ghost-btn.ghost-action-mark[data-state="ready"] .ghost-btn-hint {
  color: #ffc2ce;
}
.ghost-btn.ghost-action-mark[data-state="cooldown"] {
  border-color: rgba(255, 189, 46, 0.55);
  border-left: 4px solid var(--amber);
  background: rgba(28, 22, 14, 0.88);
  opacity: 0.92 !important;
}
.ghost-btn.ghost-action-mark[data-state="cooldown"] .ghost-btn-hint {
  color: var(--amber);
  background: rgba(255, 189, 46, 0.16);
}
/* the drone and mark actions carry their hint on a second line, so the label is never cut */
.ghost-btn.ghost-action-drone,
.ghost-btn.ghost-action-mark {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
}
.ghost-action-drone kbd,
.ghost-action-mark kbd { grid-row: 1 / 3; }
.ghost-action-drone .ghost-btn-label,
.ghost-action-mark .ghost-btn-label { grid-column: 2; line-height: 1.1; }
.ghost-action-drone .ghost-btn-hint,
.ghost-action-mark .ghost-btn-hint {
  grid-column: 2;
  justify-self: start;
  padding: 0;
  background: none;
  font-size: 9px;
  letter-spacing: 0.06em;
  line-height: 1.1;
}
.ghost-cd-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}
.ghost-cd-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--amber), var(--red));
  transition: width 120ms linear;
}
.ghost-btn:hover:not(:disabled) {
  filter: brightness(1.14);
}
.ghost-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

body.s7-room #hud #d-round,
body.duel:has(#d-hold:not([hidden])) #hud #d-round {
  box-shadow: none;
}

/* narrower cards beside the open panel on small desktops only: a portrait phone keeps slice.css's fitted widths */
@media (max-width: 1160px) and (min-width: 761px) and (min-height: 501px) {
  body.duel:has(#ghost-hud[data-open="1"]) .d-vitals { width: 220px; }
  body.duel:has(#ghost-hud[data-open="1"]) .d-weapon { width: 250px; }
}
@media (max-width: 1160px) {
  .ghost-hud {
    width: 396px;
    max-width: calc(100vw - 520px);
  }
}

@media (max-width: 760px) {
  body.duel #hud #d-round,
  body.s7-room #hud #d-round {
    box-shadow: none;
  }
  body.duel #hud .s7-cards .l { display: none; }
  body.duel #hud .s7-cards .s { display: inline; }
  body.duel:has(#ghost-hud[data-open="1"]) #inventory-hotbar,
  body.duel.s7-room:has(#ghost-hud[data-open="1"]) #inventory-hotbar {
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
  }
  body.duel:has(#ghost-hud[data-open="1"]) #d-spec {
    bottom: 282px;
    padding: 5px 12px;
    font-size: 11.5px;
    border-radius: 9px;
  }
  .ghost-hud {
    bottom: 134px;
    width: calc(100vw - 16px);
    max-width: 368px;
    padding: 7px 10px 8px;
    gap: 5px;
  }
  .ghost-btn { min-height: 44px; font-size: 11px; padding: 5px 8px; }
}

/* Phone landscape (844x390 and 667x375): full living-player and dead-player HUD layout so nothing overlaps or clips */
@media (max-height: 500px) {
  body.duel #hud .hud-tl,
  body.s7-room #hud .hud-tl {
    display: block;
    left: 8px;
    top: 4px;
    padding: 3px 7px;
    border-radius: 8px;
    max-width: 152px;
    overflow: hidden;
  }
  body.duel #hud .hud-tl .brand { font-size: 11px; line-height: 1.1; }
  body.duel #hud .hud-tl .kicker {
    font-size: 7.5px;
    letter-spacing: 0.06em;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.duel #hud .hud-tl .d-net {
    font-size: 7.5px;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.duel #hud #d-round,
  body.s7-room #hud #d-round {
    top: 4px;
    border-radius: 10px;
    box-shadow: none;
    transform: translateX(-50%);
  }
  body.duel #hud .d-team,
  body.s7-room #hud .d-team {
    min-width: 54px;
    padding: 0 8px;
    gap: 5px;
  }
  body.duel #hud .d-team b,
  body.s7-room #hud .d-team b {
    font-size: 18px;
    line-height: 1;
  }
  body.duel #hud .d-tlabel,
  body.s7-room #hud .d-tlabel {
    font-size: 8.5px;
    letter-spacing: 0.1em;
  }
  body.duel #hud .d-mid,
  body.s7-room #hud .d-mid {
    min-width: 0;
    padding: 2px 10px 3px;
  }
  body.duel #hud .d-phase,
  body.s7-room #hud .d-phase {
    font-size: 8px;
    line-height: 1.1;
    letter-spacing: 0.18em;
  }
  body.duel #hud .d-timer,
  body.s7-room #hud .d-timer {
    font-size: 15px;
    line-height: 1.05;
  }
  body.duel #hud .d-rnd,
  body.s7-room #hud .d-rnd {
    display: block;
    font-size: 7.5px;
    line-height: 1.15;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
  body.duel #hud .hud-tr,
  body.duel.s7-room #hud .hud-tr {
    top: 6px;
    right: 8px;
    width: calc(50vw - 166px);
    overflow: hidden;
  }
  body.duel #hud .feed-item,
  body.s7-room #hud .feed-item {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    padding: 3px 7px;
  }
  body.duel #hud #d-hold {
    top: 52px;
    width: min(300px, 46vw);
    padding: 2px 8px 3px;
    font-size: 9.5px;
  }
  body.duel #hud .s7-compass {
    top: 52px;
    height: 18px;
    width: 310px;
  }
  body.duel #hud .s7-grid {
    top: 72px;
    width: 300px;
    padding: 2px 6px;
    gap: 5px;
  }
  body.duel #hud .s7-g-mid b { font-size: 14px; min-width: 18px; }
  body.duel #hud .s7-pip { width: 20px; height: 20px; font-size: 11px; }
  body.duel #hud #d-vend,
  body.duel #hud #d-hold:not([hidden]) ~ #d-vend,
  body.duel #hud:has(#s7:not([hidden])) #d-vend {
    top: 100px;
    width: 250px;
    padding: 2px 8px 3px;
  }
  body.duel #hud .d-v-title { font-size: 9px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* one line: a wrapped strip would run into the banner */
  body.duel #hud .d-v-bar { height: 4px; margin-top: 2px; }
  body.duel #notice {
    top: 100px;
    width: 250px;
    padding: 2px 10px 3px;
    font-size: 9.5px;
    line-height: 1.15;
    border-radius: 7px;
    white-space: nowrap; /* one line (the raw-mouse, VIP and prop notices wrap 2-3 lines otherwise, into the banner) */
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* the Vendetta strip and the notice share the one slot under the compass: while the strip is up (30 s) the notice is
     not drawn. An untimed notice (the raw-mouse line) shows again when the Vendetta ends; a timed one (golden gun, VIP,
     prop, infected) can expire meanwhile, a phone-only trade for never covering the Vendetta strip */
  body.duel:has(#d-vend:not([hidden])) #notice { display: none; }
  body.duel #hud #d-banner,
  body.duel #hud:has(#s7:not([hidden])) #d-banner {
    top: 145px; /* 35px banner (y = 127.5..162.5): sits in the band between #d-vend/#notice (y <= 121) and the 34x34 crosshair (y >= 170.5) */
    width: max-content;
    max-width: 300px;
    padding: 3px 10px 3px;
    border-radius: 8px;
    background: rgba(7, 10, 22, 0.86);
    border: 1px solid rgba(255, 200, 50, 0.42);
    box-shadow: none; /* an outer shadow would paint across the 6-8px gaps to the strips and the crosshair */
  }
  body.duel #hud #d-banner .d-b-title {
    filter: none; /* the title drop-shadow would paint outside the 35px banner */
    font-size: 14px;
    letter-spacing: 0.04em;
    line-height: 1.1;
    white-space: nowrap;
  }
  body.duel #hud #d-banner .d-b-sub {
    display: block;
    font-size: 9px;
    letter-spacing: 0.08em;
    line-height: 1.1;
    margin-top: 1px;
    padding: 0;
    background: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.duel #hud #minimap,
  body.duel #hud #minimap[data-size] {
    left: 8px;
    right: auto;
    top: 56px;
    bottom: auto;
    width: 136px;
    height: 136px;
  }
  body.duel #hud .s7-cards {
    left: 8px;
    right: auto;
    top: 50px;
    width: 152px;
    padding: 4px 6px;
    border-radius: 8px;
  }
  body.duel #hud .s7-k-h {
    font-size: 8.5px;
    margin-bottom: 3px;
    letter-spacing: 0.08em;
    white-space: nowrap;
  }
  body.duel #hud .s7-k-row {
    flex-direction: column;
    gap: 2px;
  }
  body.duel #hud .s7-k-row + .s7-k-row {
    margin-top: 3px;
    padding-top: 3px;
  }
  body.duel #hud .s7-card {
    padding: 2px 5px;
    border-radius: 5px;
    gap: 0;
  }
  body.duel #hud .s7-card b {
    font-size: 9.5px;
    line-height: 1.15;
    letter-spacing: 0.04em;
  }
  body.duel #hud .s7-card span {
    font-size: 7.5px;
    line-height: 1.1;
    white-space: nowrap;
  }
  body.duel #hud .s7-cards .l { display: none; }
  body.duel #hud .s7-cards .s { display: inline; }
  body.duel #hud .s7-card i {
    position: absolute;
    right: 5px;
    top: 2px;
    bottom: auto;
    font-size: 7.5px;
  }
  body.duel #hud .s7-k-note {
    font-size: 7.5px;
    line-height: 1.1;
    margin-top: 3px;
    min-height: 10px;
    white-space: nowrap;
  }
  body.duel #hud .d-vitals,
  body.duel.s7-room #hud .d-vitals {
    left: 8px;
    bottom: 8px;
    width: 148px;
    padding: 5px 7px;
    border-radius: 9px;
  }
  body.duel #hud .d-hp b { font-size: 20px; }
  body.duel #hud .d-hpbar { height: 6px; margin-top: 3px; }
  body.duel #hud .d-stance { margin-top: 3px; font-size: 8px; }
  body.duel #hud .s7-robot {
    left: 50%;
    right: auto;
    bottom: 36px;
    transform: translateX(-50%);
    width: min(260px, calc(100vw - 340px));
    padding: 4px 8px;
    border-radius: 9px;
    box-sizing: border-box;
  }
  body.duel #hud .s7-r-label { display: none; }
  body.duel #hud .s7-r-row { gap: 5px; }
  body.duel #hud .s7-r-bar { height: 6px; }
  body.duel #hud .s7-r-pct { font-size: 12px; min-width: 32px; }
  body.duel #hud .s7-r-line {
    font-size: 10px;
    letter-spacing: 0.02em;
    line-height: 1.15;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.duel #hud .s7-r-line .l { display: none; }
  body.duel #hud .s7-r-line .s { display: inline; }
  body.duel #hud .d-weapon,
  body.duel.s7-room #hud .d-weapon {
    right: 8px;
    bottom: 8px;
    width: 156px;
    padding: 5px 7px;
    border-radius: 9px;
  }
  body.duel #hud .d-weapon .wname {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.duel #hud .d-weapon .wcal,
  body.duel #hud .d-weapon .wslots { display: none; }
  body.duel #hud .d-optic { margin: 3px 0; font-size: 8.5px; white-space: nowrap; overflow: hidden; }
  body.duel #hud .d-optic b { font-size: 10px; }
  body.duel #hud .d-ammo { margin-bottom: 3px; overflow: hidden; }
  body.duel #hud .d-ammo #pips i { height: 10px; }
  body.duel #hud .boltbar { height: 14px; }
  body.duel #hud .boltbar span { font-size: 7.5px; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  body.duel #hud #inventory-hotbar,
  body.duel.s7-room #hud #inventory-hotbar,
  body.duel:has(#ghost-hud[data-open="1"]) #inventory-hotbar,
  body.duel.s7-room:has(#ghost-hud[data-open="1"]) #inventory-hotbar {
    bottom: 6px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    padding: 3px 8px;
    font-size: 9px;
    max-width: min(352px, calc(100vw - 340px));
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.duel #hud #breath,
  body.duel.s7-room #hud #breath,
  body.duel:has(#inventory-hotbar:not([hidden])) #hud #breath {
    bottom: 86px;
    width: min(220px, 40vw);
  }
  body.duel:has(#ghost-hud[data-open="1"]) #d-spec {
    bottom: 172px;
    padding: 4px 10px;
    font-size: 10.5px;
    border-radius: 8px;
    max-width: min(352px, calc(100vw - 340px));
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body.duel:has(#ghost-hud[data-open="1"]) #d-spec small { font-size: 7.5px; }
  .ghost-hud {
    bottom: 34px;
    width: min(352px, calc(100vw - 340px));
    max-width: calc(100vw - 340px);
    padding: 6px 8px 7px;
    gap: 4px;
    border-radius: 10px;
  }
  .ghost-head { padding-bottom: 3px; gap: 6px; }
  .ghost-title b { font-size: 11px; }
  .ghost-sub { font-size: 8.5px; }
  .ghost-pred-pill { font-size: 8.5px; padding: 1px 6px; }
  .ghost-row { gap: 5px; }
  .ghost-btn {
    min-height: 44px;
    padding: 5px 6px;
    font-size: 10.5px;
    gap: 4px;
    border-radius: 8px;
  }
  .ghost-btn kbd { font-size: 9px; padding: 2px 4px; }
  .ghost-btn-xp, .ghost-btn-hint { font-size: 8.5px; padding: 1px 4px; }
}

/* [nemesis] during a replay (client/bulletcam.js toggles body.bcam) the banner sits under the letterbox bar, clear of the
   victim and the gore, in every room (it outranks the s7 room's banner placement), and the kill feed and hotbar hide so the
   letterbox bars never clip them */
body.duel.bcam #hud #d-banner,
body.duel.bcam #hud:has(#s7:not([hidden])) #d-banner { top: 17%; }
body.duel.bcam #hud .hud-tr,
body.duel.bcam #hud #feed,
body.duel.bcam #hud #inventory-hotbar { visibility: hidden !important; }
