:root {
[hidden] { display: none !important; }
  --bg: #05070d; --panel: rgba(11, 18, 32, 0.92); --line: #24365a; --text: #dbe8ff; --dim: #8296b8;
  --accent: #5ee0b0; --warn: #ffb454; --bad: #ff6b6b; --t0: #ff7a3d; --t1: #4fb3ff;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 14px/1.4 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; -webkit-user-select: none; user-select: none; }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; }
button, select, input { font: inherit; color: var(--text); background: #101b30; border: 1px solid var(--line); border-radius: 4px; padding: 6px 12px; }
input, select { font-size: 16px; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:hover:not(:disabled) { border-color: var(--accent); }
button.primary { background: #123a2e; border-color: var(--accent); color: var(--accent); }
button.warn { color: var(--warn); }
button.small { padding: 1px 8px; font-size: 12px; }
button.link { background: none; border: none; color: var(--accent); padding: 0; text-decoration: underline; }
a { color: var(--accent); }
.dim { color: var(--dim); } .good { color: var(--accent); } .bad { color: var(--bad); } .warn { color: var(--warn); }
@media (pointer: coarse) { button { min-height: 40px; } }

/* ---------- menu ---------- */
/* The panel sits on the left on wide screens and low on phones, so the match behind it stays in view. */
#menu { position: fixed; inset: 0; display: flex; align-items: center; justify-content: flex-start; padding: 16px 16px 16px max(16px, 4vw);
  padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(90deg, rgba(5, 7, 13, 0.7), rgba(5, 7, 13, 0.15) 560px, rgba(5, 7, 13, 0)); overflow-y: auto; }
#menu .panel { width: min(440px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 22px; margin: auto 0; backdrop-filter: blur(4px); }
#menu h1 { margin: 0; font-size: 40px; letter-spacing: 9px; color: #fff; text-shadow: 0 0 18px rgba(94, 224, 176, 0.6), 3px 3px 0 var(--t0), -3px -3px 0 var(--t1); }
#menu .tag { margin: 2px 0 16px; color: var(--dim); }
#menu label.name { display: block; margin-bottom: 4px; }
#menu label.name input { display: block; width: 100%; margin-top: 4px; }
#menu .go { display: flex; gap: 8px; margin-top: 4px; }
#menu .go > button { flex: 1; padding: 10px; font-size: 15px; }
#menu .join { margin-top: 8px; }
.join { display: flex; gap: 8px; }
.join input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 3px; }
.msg { min-height: 20px; margin: 6px 0 0; color: var(--warn); }
#menu h3 { margin: 16px 0 6px; font-size: 14px; color: var(--dim); display: flex; gap: 10px; align-items: center; }
#menu h3 .dim { font-weight: normal; font-size: 12px; }
#menu h3 > button.small { margin-left: auto; }
.rooms { display: flex; flex-direction: column; gap: 4px; max-height: 236px; overflow-y: auto; }
.room { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "nm pl go" "mp pl go"; gap: 0 12px; align-items: center;
  border: 1px solid var(--line); border-radius: 4px; padding: 5px 6px 5px 10px; cursor: pointer; background: rgba(16, 27, 48, 0.6); }
.room:hover { border-color: var(--accent); }
.room .nm { grid-area: nm; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .mp { grid-area: mp; color: var(--dim); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .pl { grid-area: pl; color: var(--dim); font-size: 13px; text-align: right; }
.room.live .nm::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 2px; box-shadow: 0 0 6px var(--accent); }
.room.live .pl { color: var(--accent); }
.room button { grid-area: go; padding: 3px 10px; }
.courses { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.course { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 5px 8px; min-width: 0; background: #0d1628; }
.course .nm { font-weight: bold; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.course .bt { color: var(--dim); font-size: 11px; }
.course.done .bt { color: var(--warn); }
#menu h3 label.pacers { margin-left: auto; font-weight: normal; display: flex; gap: 6px; align-items: center; font-size: 12px; }
#menu h3 label.pacers select { font-size: 12px; padding: 2px 6px; }
/* phones: the match shows in the top part of the screen, the menu scrolls up over it */
@media (max-width: 700px) {
  body:has(#menu:not([hidden])) #view { height: 46vh; height: 46dvh; }
  #menu { display: block; padding: 0 10px calc(10px + env(safe-area-inset-bottom)); background: none; }
  #menu .panel { margin: 40vh auto 0; padding: 16px; }
  #menu h1 { font-size: 30px; letter-spacing: 7px; }
  .courses { grid-template-columns: repeat(2, 1fr); }
}
.links { margin-top: 16px; color: var(--dim); }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--accent); border-radius: 8px;
  width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; padding: 18px; }
dialog.wide { width: min(680px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
dialog h2 { margin-top: 0; color: var(--accent); }
dialog h3 { margin: 14px 0 6px; font-size: 14px; }
dialog label { display: block; margin: 10px 0; }
dialog label select, dialog label input:not([type=checkbox]) { display: block; width: 100%; margin-top: 4px; }
dialog label.check { display: flex; gap: 10px; align-items: flex-start; }
dialog .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
dialog .col { display: flex; flex-direction: column; gap: 8px; }
dialog .fine { color: var(--dim); font-size: 12px; }
dialog ul { padding-left: 18px; } dialog li { margin: 4px 0; }
.keys td { padding: 2px 10px 2px 0; } .keys td:nth-child(odd) { color: var(--accent); white-space: nowrap; }
.invite { border: 1px dashed var(--line); padding: 8px 10px; border-radius: 6px; margin-bottom: 12px; }
.invite p { margin: 0 0 6px; } .invite b { color: var(--accent); letter-spacing: 3px; font-size: 18px; }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; cursor: pointer; flex: 1 1 180px; background: #0d1628; }
.opt.on { border-color: var(--accent); background: #0f2a26; }
.opt.off { opacity: 0.35; cursor: default; }
.opt b { display: block; } .opt span { color: var(--dim); font-size: 12px; }
.wh { margin: 6px 0; } .wh b { color: var(--accent); }
.pl { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; font-weight: bold; text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, 0.6); }
/* the glassy plates behind HUD text */
.tscore, #clock, #feed div, #chatlog div, #weapons div, #station div, #vgs, #chatbox {
  background: rgba(6, 10, 20, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
#hud > * { position: absolute; }
#cross { left: 50%; top: 50%; width: 0; height: 0; }
#cross i { position: absolute; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 2px #000, 0 0 6px rgba(94, 224, 176, 0.35); border-radius: 1px; }
#cross i:nth-child(1) { left: -1px; top: -14px; width: 2px; height: 8px; }
#cross i:nth-child(2) { left: -1px; top: 6px; width: 2px; height: 8px; }
#cross i:nth-child(3) { left: -14px; top: -1px; width: 8px; height: 2px; }
#cross i:nth-child(4) { left: 6px; top: -1px; width: 8px; height: 2px; }
#cross b { position: absolute; left: -2px; top: -2px; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 4px rgba(255, 255, 255, 0.6); }
#hitmark { left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; opacity: 0; transition: opacity 0.25s;
  background: linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%);
  -webkit-mask: radial-gradient(circle, transparent 7px, #000 8px); mask: radial-gradient(circle, transparent 7px, #000 8px); }
#hitmark.on { opacity: 1; transition: none; }
#hitmark.kill { background: linear-gradient(45deg, transparent 44%, #ff5040 44%, #ff5040 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #ff5040 44%, #ff5040 56%, transparent 56%); }
#dmgdir { inset: 0; }
#dmgdir i { position: absolute; left: 50%; top: 50%; width: 160px; height: 160px; margin: -80px; border-radius: 50%; border-top: 6px solid rgba(255, 60, 40, 0.85); transition: opacity 0.6s; }
#markers { inset: 0; }
.mk { position: absolute; transform: translate(-50%, -100%); text-align: center; font-size: 11px; white-space: nowrap; }
.mk .ic { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; transform: rotate(45deg); margin-bottom: 2px; }
.mk.flag .ic { width: 16px; height: 16px; border-radius: 2px; background: currentColor; transform: none; clip-path: polygon(0 0, 100% 25%, 0 55%); border: none; }
.mk.mate { font-weight: normal; opacity: 0.85; }
.mk.foe { color: #ff5a4a; }
#top { left: 50%; top: calc(8px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; gap: 14px; align-items: center; font-size: 18px; }
.tscore { display: flex; align-items: center; gap: 8px; padding: 3px 12px; border-radius: 6px; }
.tscore b { font-size: 26px; text-shadow: 0 0 10px currentColor, 0 1px 2px #000; }
.tscore.t0 { color: var(--t0); border-left: 3px solid var(--t0); } .tscore.t1 { color: var(--t1); border-right: 3px solid var(--t1); }
.tname { font-size: 12px; opacity: 0.8; }
.fl { font-size: 11px; min-width: 64px; text-align: center; }
.fl.away { color: #fff; animation: blink 0.8s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }
body.course .tscore.t0, body.course .tscore.t1 { color: var(--accent); border-color: var(--accent); }
body.course .tscore.t1 .tname { color: var(--warn); }
body.course .fl { color: var(--dim); }
body.course #clock { font-size: 24px; min-width: 96px; }
.mk.gate { color: var(--accent); font-size: 13px; } .mk.gate .ic { border-radius: 50%; transform: none; width: 14px; height: 14px; }
.mk.gate.soon { opacity: 0.75; font-size: 11px; }
.mk.tgt { font-size: 10px; opacity: 0.85; }
.sc.one { grid-template-columns: 1fr; }
#clock { font-size: 16px; color: #fff; min-width: 64px; text-align: center; padding: 6px 8px; border-radius: 6px; letter-spacing: 1px; }
#radar { right: calc(10px + env(safe-area-inset-right)); top: calc(10px + env(safe-area-inset-top)); width: 150px; height: 150px; opacity: 0.92; }
#feed { right: calc(170px + env(safe-area-inset-right)); top: calc(10px + env(safe-area-inset-top)); text-align: right; font-size: 13px; display: flex; flex-direction: column; gap: 2px; max-width: 40vw; }
#feed div { padding: 1px 8px; border-radius: 4px; }
#center { left: 50%; top: 24%; transform: translateX(-50%); font-size: 24px; text-align: center; white-space: nowrap; transition: opacity 0.4s; letter-spacing: 2px; text-shadow: 0 2px 4px #000, 0 0 18px rgba(0, 0, 0, 0.8), 0 0 24px currentColor; }
#sub { left: 50%; top: calc(24% + 36px); transform: translateX(-50%); font-size: 15px; text-align: center; color: #fff; opacity: 0.9; }
#chatlog { left: calc(14px + env(safe-area-inset-left)); bottom: 120px; font-size: 13px; font-weight: normal; max-width: 50vw; display: flex; flex-direction: column; gap: 2px; }
#chatlog div { padding: 1px 6px; border-radius: 4px; }
#bars { left: calc(14px + env(safe-area-inset-left)); bottom: calc(14px + env(safe-area-inset-bottom)); width: 260px; }
.bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; }
.bar span { width: 56px; opacity: 0.8; letter-spacing: 1px; font-size: 10px; }
.bar div { flex: 1; height: 12px; background: rgba(6, 10, 20, 0.55); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 6px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6); }
.bar i { display: block; height: 100%; width: 100%; border-radius: 6px; background: linear-gradient(180deg, #a8f58a, #4bd36b 55%, #35a84f); box-shadow: 0 0 8px rgba(75, 211, 107, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); transition: width 0.15s; }
.bar.en i { background: linear-gradient(180deg, #8fe8ff, #2c8cff 55%, #1f6fd0); box-shadow: 0 0 8px rgba(44, 140, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.bar i.low { background: linear-gradient(180deg, #ffb09a, #ff3b30 55%, #c42418); box-shadow: 0 0 10px rgba(255, 59, 48, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35); animation: blink 0.8s infinite; }
.bar b { width: 30px; text-align: right; font-size: 13px; }
#speed { margin-top: 6px; font-size: 12px; opacity: 0.9; } #speed b { font-size: 20px; letter-spacing: 1px; }
#weapons { right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 3px; align-items: flex-end; font-size: 13px; }
#weapons div { padding: 2px 10px; border-radius: 4px; opacity: 0.7; }
#weapons div.on { opacity: 1; background: rgba(94, 224, 176, 0.22); border-color: rgba(94, 224, 176, 0.7); box-shadow: 0 0 10px rgba(94, 224, 176, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
#weapons div.empty { color: var(--bad); }
#weapons .pk { opacity: 1; color: #ffe08a; }
#station { left: 50%; top: 62%; transform: translateX(-50%); text-align: center; display: none; }
#station div { width: 220px; height: 8px; margin: 4px auto 0; border-radius: 4px; overflow: hidden; }
#station i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
#dead { left: 50%; top: 40%; transform: translateX(-50%); text-align: center; font-size: 15px; }
#dead b { display: block; font-size: 30px; color: var(--bad); letter-spacing: 3px; text-shadow: 0 2px 4px #000, 0 0 20px rgba(255, 107, 107, 0.6); }
#roomtag { left: calc(14px + env(safe-area-inset-left)); top: calc(10px + env(safe-area-inset-top)); font-size: 12px; opacity: 0.8; font-weight: normal; }
#net { left: calc(14px + env(safe-area-inset-left)); top: calc(28px + env(safe-area-inset-top)); font-size: 12px; color: var(--warn); }
#fps { left: calc(14px + env(safe-area-inset-left)); top: calc(46px + env(safe-area-inset-top)); font-size: 11px; opacity: 0.7; font-weight: normal; }
#chatbox { left: calc(14px + env(safe-area-inset-left)); bottom: 96px; pointer-events: auto; display: flex; gap: 6px; align-items: center; padding: 4px 8px; border-radius: 6px; }
#chatbox input { width: min(420px, 60vw); }

#scores, #over { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 18px; min-width: min(640px, calc(100vw - 24px)); max-height: 80dvh; overflow-y: auto; pointer-events: none; }
#over { pointer-events: auto; text-align: center; }
#over h2 { font-size: 30px; margin: 4px 0 10px; }
.sc { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; }
.sc table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sc th { text-align: left; font-size: 11px; color: var(--dim); font-weight: normal; }
.sc td, .sc th { padding: 2px 4px; } .sc td:not(:first-child), .sc th:not(:first-child) { text-align: right; }
.sc tr.me td { color: #fff; background: rgba(255, 255, 255, 0.08); }
.sc h3 { margin: 0 0 6px; }
#bigmap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; background: rgba(0, 0, 0, 0.35); }
#mapc { width: min(80vmin, 640px); height: min(80vmin, 640px); border: 1px solid var(--line); border-radius: 6px; }
#loading { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 18px; }

/* ---------- touch ---------- */
#touch { position: fixed; inset: 0; pointer-events: none; }
#stick { position: absolute; left: calc(24px + env(safe-area-inset-left)); bottom: calc(30px + env(safe-area-inset-bottom)); width: 130px; height: 130px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25); background: rgba(0, 0, 0, 0.15); pointer-events: auto; touch-action: none; }
#stick i { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); }
#tbtns { position: absolute; right: calc(16px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; pointer-events: auto; }
#tbtns button { height: 52px; padding: 0; background: rgba(16, 27, 48, 0.55); border-color: rgba(255, 255, 255, 0.25); font-size: 12px; touch-action: none; }
#tbtns button.big { height: 72px; grid-row: span 1; background: rgba(94, 224, 176, 0.2); }
#tbtns button.down { background: rgba(94, 224, 176, 0.5); }
#tmenu { position: absolute; left: 50%; top: calc(54px + env(safe-area-inset-top)); transform: translateX(-50%); pointer-events: auto; padding: 4px 14px; background: rgba(0, 0, 0, 0.4); }
body.touch #bars { bottom: calc(170px + env(safe-area-inset-bottom)); width: 200px; }
body.touch #weapons { bottom: calc(160px + env(safe-area-inset-bottom)); }
body.touch #chatlog { bottom: 250px; }
@media (max-width: 700px) {
  #radar { width: 110px; height: 110px; }
  #feed { right: calc(126px + env(safe-area-inset-right)); font-size: 11px; }
  #top { font-size: 14px; } .tscore b { font-size: 20px; } .tname { display: none; }
  body.course #clock { font-size: 18px; min-width: 72px; } body.course .tscore { padding: 3px 8px; } body.course .fl { min-width: 0; }
  #center { font-size: 18px; }
  .sc { grid-template-columns: 1fr; }
  /* phones held upright: bars stay left of the buttons, the weapon in hand sits above them */
  body.touch #bars { width: 140px; } body.touch .bar { margin-top: 3px; font-size: 9px; } body.touch .bar span { width: 44px; } body.touch .bar b { font-size: 11px; }
  body.touch #speed { font-size: 10px; } body.touch #speed b { font-size: 14px; }
  body.touch #weapons { bottom: calc(228px + env(safe-area-inset-bottom)); font-size: 11px; gap: 2px; }
  body.touch #weapons div:not(.on):not(.pk) { display: none; }
  body.touch #chatlog { bottom: calc(280px + env(safe-area-inset-bottom)); }
  body.touch #roomtag { display: none; }
  body.touch #radar { top: calc(56px + env(safe-area-inset-top)); width: 100px; height: 100px; }
}
/* phones held sideways: short screens need a tighter HUD */
@media (max-height: 520px) {
  #top { font-size: 12px; gap: 8px; } .tscore { padding: 2px 8px; } .tscore b { font-size: 18px; } .tname { display: none; } #clock { font-size: 13px; }
  #radar { width: 96px; height: 96px; }
  #feed { right: calc(112px + env(safe-area-inset-right)); font-size: 10px; }
  #roomtag, #fps { font-size: 10px; }
  #bars { width: 150px; } .bar { margin-top: 3px; font-size: 9px; } .bar span { width: 40px; } .bar div { height: 8px; } .bar b { font-size: 10px; }
  #speed { font-size: 10px; } #speed b { font-size: 13px; }
  #weapons { font-size: 10px; gap: 2px; }
  #weapons div:not(.on):not(.pk) { display: none; }
  #center { font-size: 16px; top: 18%; } #sub { font-size: 12px; top: calc(18% + 24px); }
  #chatlog { font-size: 10px; }
  #tbtns { grid-template-columns: repeat(3, 54px); gap: 6px; }
  #tbtns button { height: 40px; font-size: 10px; } #tbtns button.big { height: 54px; }
  #stick { width: 110px; height: 110px; } #stick i { left: 32px; top: 32px; width: 44px; height: 44px; }
  #tmenu { top: calc(40px + env(safe-area-inset-top)); }
  .mk { font-size: 9px; }
  body.touch #bars { bottom: auto; top: calc(60px + env(safe-area-inset-top)); }
  body.touch #weapons { bottom: auto; top: calc(122px + env(safe-area-inset-top)); }
  body.touch #chatlog { bottom: auto; top: calc(140px + env(safe-area-inset-top)); }
  dialog { padding: 12px; } dialog h2 { margin-bottom: 6px; } .opt { padding: 5px 8px; flex-basis: 150px; }
}
/* quick chat menu */
#vgs { left: calc(14px + env(safe-area-inset-left)); top: 18%; border-color: rgba(94, 224, 176, 0.5); border-radius: 6px;
  padding: 8px 12px; font-size: 13px; pointer-events: auto; min-width: 200px; }
#vgs b { display: block; color: var(--accent); margin-bottom: 4px; }
#vgs div { padding: 2px 0; cursor: pointer; font-weight: normal; }
#vgs i { display: inline-block; min-width: 22px; font-style: normal; color: #ffe08a; font-weight: bold; }
@media (pointer: coarse) { #vgs div { padding: 6px 0; } }
/* health of base things */
.mk.obj { font-weight: normal; }
.mk .hb { width: 60px; height: 4px; margin: 2px auto 0; background: rgba(0, 0, 0, 0.6); border-radius: 2px; overflow: hidden; }
.mk .hb i { display: block; height: 100%; background: currentColor; }
/* team arrow over players */
.mk .tri { width: 0; height: 0; margin: 0 auto 1px; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid currentColor; filter: drop-shadow(0 0 2px #000); }
/* replay of a midair: black bars, and the HUD out of the way */
body.replay::before, body.replay::after { content: ''; position: fixed; left: 0; right: 0; height: 9vh; background: #000; z-index: 5; pointer-events: none; }
body.replay::before { top: 0; }
body.replay::after { bottom: 0; }
body.replay #dead { top: auto; bottom: calc(9vh + 10px); z-index: 6; }
body.replay #dead b { color: #ffd34d; font-size: 24px; }
body.replay :is(#cross, #hitmark, #dmgdir, #radar, #bars, #speed, #weapons, #station) { visibility: hidden; }
/* the menu's background match: a caption while it replays a midair */
#bgcap { position: fixed; left: 0; right: 0; text-align: center; z-index: 2; bottom: calc(12px + env(safe-area-inset-bottom)); pointer-events: none; font-size: 15px; font-weight: bold;
  letter-spacing: 1px; color: #ffd34d; text-shadow: 0 1px 3px #000, 0 0 12px rgba(0, 0, 0, 0.8); }
@media (max-width: 700px) { #bgcap { bottom: auto; top: calc(10px + env(safe-area-inset-top)); } }
