/* FPS: Full Paint Splatter. The shell is a mission dossier: manila folders on a dark desk, typewriter type, red stamps,
   and a steel wristwatch for the menu (Esc). The in-play HUD styles itself (js/hud). Owner: S. */
:root {
  --manila: #e9d8a4; --manila-2: #dfca8f; --manila-3: #cdb478; --kraft: #b4935a; --paper: #f4ecd4;
  --ink: #1f1b14; --ink-2: #463e30; --ink-3: #6f6450; --rule: rgba(70, 55, 30, 0.22);
  --stamp: #c3302a; --stamp-ok: #2f7a3a;
  --red: #e8394d; --blue: #2f7cf6; --gold: #ffc93c; --pink: #ff3d7f;
  --bg: #111213; --bg-2: #191b1d; --text: #ece6d6; --muted: #a49d8e; --line: rgba(255, 255, 255, 0.1);
  --type: "American Typewriter", "Courier Prime", "Courier New", Courier, monospace;
  --mono: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --display: "Futura", "Avenir Next Condensed", "Avenir Next", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --strip-top: 0px; --strip-bot: 0px; --cam-w: 112px; --cam-h: 84px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
canvas#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; }
kbd { font: 700 11px/1 var(--mono); padding: 3px 6px; border-radius: 4px; border: 1px solid currentColor; opacity: 0.85; }
body.booting .screen { display: none; }

/* ---------- screens: the desk */
.screen { position: fixed; inset: 0; z-index: 10; overflow-y: auto; }
.screen.menu { background:
  radial-gradient(1200px 700px at 30% 10%, rgba(255, 220, 150, 0.07), transparent 60%),
  radial-gradient(900px 600px at 90% 100%, rgba(80, 120, 160, 0.08), transparent 60%),
  repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 44px),
  repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 44px),
  linear-gradient(180deg, #16181a, #0e0f10); }
.menu-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.menu-wrap.narrow { max-width: 460px; padding-top: 8vh; }
#title { background: #000; z-index: 40; }
#title .title-fallback { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
#title .press { font: 700 14px/1 var(--type); letter-spacing: 0.3em; color: var(--muted); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
#loading { z-index: 50; }

/* ---------- the logo */
.logo { text-align: center; margin-bottom: 22px; -webkit-user-select: none; user-select: none; }
.logo b { display: block; font: 900 92px/0.9 var(--display); letter-spacing: 0.06em; color: #f5efe0; text-shadow: 4px 4px 0 var(--pink), 0 14px 30px rgba(0,0,0,0.5); }
.logo span { display: block; margin-top: 10px; font: 700 13px/1 var(--type); letter-spacing: 0.42em; text-transform: uppercase; color: var(--manila); }
.logo.small { text-align: left; margin: 0; }
.logo.small b { font-size: 40px; text-shadow: 2px 2px 0 var(--pink); }
.logo.small span { font-size: 10px; letter-spacing: 0.3em; margin-top: 4px; }

/* ---------- manila folders */
.folder-card, .sheet, .wsheet {
  position: relative; color: var(--ink); font-family: var(--type);
  background:
    repeating-linear-gradient(0deg, rgba(120, 90, 40, 0.035) 0 2px, transparent 2px 5px),
    linear-gradient(170deg, var(--manila) 0%, var(--manila-2) 70%, var(--manila-3) 100%);
  border-radius: 3px 10px 6px 6px; padding: 26px 24px 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 -1px 0 rgba(0,0,0,0.12) inset, 0 18px 40px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3);
}
.folder-card { margin-top: 18px; }
.f-tab { position: absolute; top: -17px; left: 18px; height: 18px; padding: 4px 16px 0; border-radius: 6px 6px 0 0; background: var(--manila); font: 700 10px/1 var(--type); letter-spacing: 0.2em; color: var(--ink-2); box-shadow: 0 -2px 4px rgba(0,0,0,0.18); }
.stamp { position: absolute; top: 14px; right: 16px; transform: rotate(-7deg); border: 3px solid var(--stamp); color: var(--stamp); padding: 4px 10px 3px; font: 900 15px/1 var(--display); letter-spacing: 0.14em; opacity: 0.82; border-radius: 4px; mix-blend-mode: multiply; pointer-events: none;
  -webkit-mask-image: repeating-linear-gradient(115deg, #000 0 7px, rgba(0,0,0,0.75) 7px 9px); mask-image: repeating-linear-gradient(115deg, #000 0 7px, rgba(0,0,0,0.75) 7px 9px); }
.stamp.ok { border-color: var(--stamp-ok); color: var(--stamp-ok); }
.folder-card h3, .sheet h3 { margin: 4px 0 12px; font: 800 18px/1.1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.folder-card h4, .sheet h4, .wsheet h4 { margin: 18px 0 8px; font: 800 12px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.fine { font-size: 12px; color: var(--ink-3); margin: 10px 0 0; }
.err { color: var(--stamp); min-height: 1.2em; margin: 6px 0; font-weight: 700; }
label { display: block; margin: 0 0 12px; font: 700 11px/1 var(--type); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
input:not([type=checkbox]):not([type=range]) { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: 600 15px/1.2 var(--type); color: var(--ink); background: var(--paper); border: 1px solid rgba(70, 55, 30, 0.35); border-bottom-width: 2px; border-radius: 3px; outline: none; }
input:not([type=checkbox]):not([type=range]):focus { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(195, 48, 42, 0.18); }
.invite-note { background: var(--paper); border-left: 4px solid var(--stamp); padding: 8px 10px; font-size: 13px; }
.arcade-link { display: inline-block; margin-top: 14px; color: var(--ink-3); font-size: 12px; text-decoration: none; }

/* ---------- buttons, segments, toggles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 3px; cursor: pointer; font: 800 12px/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); background: var(--paper); border: 1px solid rgba(40, 30, 15, 0.45); box-shadow: 0 2px 0 rgba(40, 30, 15, 0.35); transition: transform .08s, box-shadow .08s, background .15s; }
.btn:hover { background: #fff8e6; }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.btn.primary { background: var(--ink); color: var(--manila); border-color: var(--ink); }
.btn.primary:hover { background: #2e281e; }
.btn.danger { background: var(--stamp); color: #fff; border-color: #8f1f1a; }
.btn.big { width: 100%; padding: 14px; font-size: 14px; }
.btn.sm { padding: 6px 10px; font-size: 10.5px; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.screen .btn:not(.primary):not(.danger) { color: var(--ink); }
.screen .mtop .btn:not(.primary) { background: transparent; color: var(--manila); border-color: rgba(233, 216, 164, 0.4); box-shadow: none; }
.screen .mtop .btn:hover { background: rgba(233, 216, 164, 0.1); }
#auth .stamp { top: auto; bottom: 20px; right: 20px; transform: rotate(-9deg); }
#createForm + h3 { margin-top: 24px; }
.tabs2 { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid var(--rule); }
.tabs2 button { flex: 1; padding: 9px 0; border: 0; background: none; cursor: pointer; font: 800 12px/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs2 button.on { color: var(--ink); border-bottom-color: var(--stamp); }
#authForm:not(.register) .reg-only { display: none; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid rgba(40, 30, 15, 0.4); border-radius: 3px; overflow: hidden; }
.seg button { padding: 7px 11px; border: 0; border-right: 1px solid rgba(40, 30, 15, 0.25); background: var(--paper); cursor: pointer; font: 700 12px/1 var(--type); color: var(--ink-2); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--manila); }
.seg.ro button { cursor: default; }
.seg.ro button:not(.on) { opacity: 0.5; }
.tog { display: flex; align-items: center; gap: 10px; cursor: pointer; text-transform: none; letter-spacing: 0; font: 600 13px/1.2 var(--type); color: var(--ink); margin: 10px 0; }
.tog input { display: none; }
.tog i { width: 34px; height: 18px; border-radius: 10px; background: rgba(40, 30, 15, 0.3); position: relative; flex: none; transition: background .15s; }
.tog i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); transition: transform .15s; }
.tog input:checked + i { background: var(--stamp); }
.tog input:checked + i::after { transform: translateX(16px); }
.rng { display: grid; grid-template-columns: 110px 1fr 56px; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font: 600 13px/1 var(--type); color: var(--ink); }
.rng input { accent-color: var(--stamp); }
.rng b { text-align: right; font-family: var(--mono); font-size: 12px; }

/* ---------- the lobby browser */
.mtop { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.mtop .logo { flex: 1; }
.me-chip { display: flex; gap: 14px; align-items: center; font: 700 13px/1 var(--type); color: var(--manila); }
.me-chip a { color: var(--muted); text-decoration: none; font-size: 12px; }
.lb-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 26px; align-items: start; }
.lb-side { display: flex; flex-direction: column; gap: 6px; }
.lb-notice { display: flex; align-items: center; gap: 12px; background: var(--paper); color: var(--ink); border-left: 5px solid var(--stamp); padding: 10px 14px; margin: 8px 0; font-family: var(--type); }
.lb-notice span { flex: 1; } .lb-notice button { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--ink); }
.touch-note { background: var(--stamp); color: #fff; padding: 10px 14px; font-family: var(--type); }
.lobby-list { list-style: none; margin: 0; padding: 0; }
.lobby-list li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px dashed var(--rule); }
.lobby-list li.empty { color: var(--ink-3); font-style: italic; border: 0; }
.ll-main { flex: 1; min-width: 0; } .ll-main b { display: block; font-size: 15px; }
.ll-main .meta { font-size: 12px; color: var(--ink-3); } .ll-main em { font-style: normal; } .ll-main em.live { color: var(--stamp); font-weight: 700; }
.ll-count { font: 700 13px/1 var(--mono); color: var(--ink-2); }
.row { display: flex; gap: 8px; } .row input { margin-top: 0 !important; }
.code-in { text-transform: uppercase; letter-spacing: 0.4em; font-weight: 800 !important; }
.howto-card summary { cursor: pointer; font: 800 14px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.howto-card[open] summary { margin-bottom: 12px; }

/* the agent dossier */
.dossier .dz-top { display: grid; grid-template-columns: 230px 1fr; gap: 18px; }
.dz-stage { position: relative; height: 270px; border-radius: 3px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #f7efd8, #d9c48c 75%), var(--paper); border: 1px solid rgba(70, 55, 30, 0.3); box-shadow: inset 0 0 30px rgba(90, 70, 30, 0.25); }
.dz-stage::after { content: 'SUBJECT'; position: absolute; left: 8px; bottom: 6px; font: 700 9px/1 var(--type); letter-spacing: 0.25em; color: var(--ink-3); }
.dz-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.dz-info small, .dz-h { display: block; font: 700 10px/1 var(--type); letter-spacing: 0.2em; color: var(--ink-3); margin-top: 6px; }
.dz-info h3 { margin: 4px 0 10px; font: 900 26px/1 var(--display); letter-spacing: 0.04em; }
.dz-info > b { display: block; font: 700 16px/1.2 var(--type); margin: 4px 0 10px; }
.looks, .outfit { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.looks button, .outfit button { padding: 6px 9px; border: 1px solid rgba(40, 30, 15, 0.35); background: var(--paper); border-radius: 3px; cursor: pointer; font: 700 11px/1 var(--type); color: var(--ink-2); }
.looks button.on, .outfit button.on { background: var(--ink); color: var(--manila); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.stats .st { background: rgba(255, 250, 235, 0.55); border: 1px solid var(--rule); padding: 8px 6px; text-align: center; }
.stats .st b { display: block; font: 800 18px/1.1 var(--display); }
.stats .st span { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.stats .st.wide { grid-column: 1 / -1; }
.dz-h { margin: 16px 0 8px; }
.hats { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 7px; padding: 2px; }
.hat { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 4px 6px; background: rgba(255, 250, 235, 0.6); border: 1px solid var(--rule); border-radius: 3px; cursor: pointer; transition: transform .1s, background .15s; }
.hat canvas { width: 66px; height: 66px; }
.hat span { font: 700 10px/1.15 var(--type); color: var(--ink-2); text-align: center; }
.hat:hover { background: #fffaf0; transform: translateY(-1px); }
.hat.on { background: #fff; border-color: var(--stamp); box-shadow: 0 0 0 2px var(--stamp); }
.howto { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; }
.ht-keys .kr { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; border-bottom: 1px dashed var(--rule); font-size: 13px; }
.ht-keys kbd { flex: none; min-width: 84px; text-align: center; color: var(--ink); }
.ht-modes .hm { padding: 6px 0; border-bottom: 1px dashed var(--rule); } .ht-modes .hm b { display: block; font: 800 13px/1.2 var(--display); letter-spacing: 0.06em; text-transform: uppercase; } .ht-modes .hm span { font-size: 12.5px; color: var(--ink-2); }
.ht-note { font-size: 13px; margin: 12px 0 0; }

/* ---------- in game */
#game { position: fixed; inset: 0; z-index: 15; pointer-events: none; }
#game > * { pointer-events: auto; }
.click-play { position: absolute; left: 50%; top: 68%; transform: translate(-50%, -50%); cursor: pointer; background: var(--manila); color: var(--ink); font-family: var(--type); border-radius: 3px; padding: 14px 28px; text-align: center; box-shadow: 0 18px 40px rgba(0,0,0,0.5); z-index: 30; }
.click-play b { display: block; font: 900 20px/1.1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.click-play span { font-size: 12px; color: var(--ink-3); }
.net-pill { position: absolute; top: calc(var(--strip-top) + 70px); left: 50%; transform: translateX(-50%); z-index: 60; background: var(--stamp); color: #fff; padding: 8px 18px; font: 700 13px/1 var(--type); border-radius: 3px; }

/* shell overlays (js/ui/hud.js) */
.sh { position: absolute; inset: 0; pointer-events: none; z-index: 24; font-family: var(--type); }
.sh > * { pointer-events: auto; }
/* the warm-up pill, START MATCH and the countdown sit bottom centre, clear of the play HUD's top row */
.sh-top { position: absolute; bottom: calc(var(--strip-bot) + 26px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: 8px; pointer-events: none; }
.sh-top > * { pointer-events: auto; }
.sh-warm { background: rgba(17, 18, 19, 0.82); color: var(--text); border: 1px solid rgba(233, 216, 164, 0.35); padding: 7px 14px; border-radius: 3px; font-size: 12.5px; display: flex; gap: 10px; align-items: center; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sh-warm b { font: 900 12px/1 var(--display); letter-spacing: 0.18em; color: var(--manila); }
.sh-start { border: 0; cursor: pointer; background: var(--stamp); color: #fff; padding: 10px 18px; border-radius: 3px; font: 900 14px/1 var(--display); letter-spacing: 0.16em; display: flex; gap: 10px; align-items: center; box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.sh-cd { background: var(--manila); color: var(--ink); padding: 8px 18px 10px; border-radius: 3px; text-align: center; box-shadow: 0 10px 26px rgba(0,0,0,0.45); }
.sh-cd small { display: block; font: 700 10px/1 var(--type); letter-spacing: 0.3em; color: var(--ink-3); }
.sh-cd b { display: block; font: 900 44px/1 var(--display); }
.sh-cd-x { margin-top: 4px; border: 1px solid var(--ink-2); background: none; cursor: pointer; font: 700 11px/1 var(--type); padding: 4px 10px; color: var(--ink); }
.sh-board, .sh-load, .sh-debrief, .lbx { position: absolute; inset: 0; display: grid; place-items: center; padding: calc(var(--strip-top) + 20px) 20px 20px; background: rgba(8, 9, 10, 0.35); }
.sh-board { background: none; pointer-events: none; }
.sheet { width: min(760px, 94vw); max-height: 86vh; overflow-y: auto; padding: 22px 24px; }
.sheet.wide { width: min(980px, 96vw); }
.bh { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 12px; }
.bh small { font: 700 10px/1 var(--type); letter-spacing: 0.24em; color: var(--ink-3); }
.bh h2 { margin: 6px 0 2px; font: 900 30px/1 var(--display); letter-spacing: 0.06em; }
.bh p { margin: 0; font-size: 13px; color: var(--ink-2); }
.bh .clk { font: 800 26px/1 var(--mono); }
.sheet .stamp { top: 18px; right: 120px; }
.teams.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tm header { display: flex; align-items: baseline; gap: 8px; padding: 6px 8px; color: #fff; background: var(--ink-2); }
.tm-red header { background: var(--red); } .tm-blue header { background: var(--blue); }
.tm header b { font: 900 13px/1 var(--display); letter-spacing: 0.12em; } .tm header span { font-size: 11px; opacity: 0.85; flex: 1; } .tm header strong { font: 900 22px/1 var(--display); }
.sheet table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sheet th { font: 700 10px/1 var(--type); letter-spacing: 0.14em; text-align: right; color: var(--ink-3); padding: 6px 6px; border-bottom: 1px solid var(--rule); }
.sheet td { text-align: right; padding: 6px; border-bottom: 1px dashed var(--rule); font-family: var(--mono); font-size: 13px; }
.sheet .nm { text-align: left; font-family: var(--type); font-weight: 700; }
.sheet .nm i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; box-shadow: 0 0 0 1px rgba(0,0,0,0.35); }
.sheet tr.me td { background: rgba(255, 255, 255, 0.45); }
.sheet tr.dead td { opacity: 0.45; text-decoration: line-through; text-decoration-color: rgba(195, 48, 42, 0.5); }
.sheet .pt { font-weight: 800; }
.sheet .none { text-align: center; color: var(--ink-3); font-style: italic; }
.tag { font: 900 9px/1 var(--display); letter-spacing: 0.1em; padding: 2px 4px; border-radius: 2px; font-style: normal; vertical-align: 1px; }
.tag.bomb { background: var(--stamp); color: #fff; } .tag.gold { background: var(--gold); color: var(--ink); }
.lds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .lds.two { grid-template-columns: 1fr 1fr; }
.ld { position: relative; text-align: left; padding: 12px 12px 12px 14px; background: rgba(255, 250, 235, 0.6); border: 1px solid var(--rule); border-left: 5px solid var(--ink-3); cursor: pointer; font-family: var(--type); color: var(--ink); }
.ld kbd { position: absolute; top: 10px; right: 10px; color: var(--ink-3); }
.ld b { display: block; font: 800 15px/1.1 var(--display); letter-spacing: 0.04em; margin-bottom: 4px; }
.ld span { font-size: 12px; color: var(--ink-2); }
.ld.on { background: #fff; border-left-color: var(--stamp); box-shadow: 0 0 0 2px var(--stamp); }
.sh-round { position: absolute; top: 24%; left: 50%; transform: translateX(-50%); pointer-events: none; }
.slip { position: relative; background: var(--paper); color: var(--ink); padding: 18px 36px 16px; text-align: center; box-shadow: 0 20px 44px rgba(0,0,0,0.5); border-top: 8px solid var(--ink-2); animation: slip .35s cubic-bezier(.2,1.4,.4,1); }
.slip.tm-red { border-top-color: var(--red); } .slip.tm-blue { border-top-color: var(--blue); }
.slip small { font: 700 10px/1 var(--type); letter-spacing: 0.24em; color: var(--ink-3); }
.slip h2 { margin: 8px 0 4px; font: 900 34px/1 var(--display); letter-spacing: 0.06em; }
.slip p { margin: 0 0 8px; font-size: 13px; }
.slip .sc { font: 900 30px/1 var(--display); } .slip .sc .r { color: var(--red); } .slip .sc .b { color: var(--blue); } .slip .sc i { margin: 0 10px; font-style: normal; color: var(--ink-3); }
.slip .stamp { position: static; display: inline-block; margin-top: 10px; transform: rotate(-4deg); }
@keyframes slip { from { transform: translateY(-30px) rotate(-3deg); opacity: 0; } }
.aws { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.aw { background: rgba(255, 250, 235, 0.65); border: 1px solid var(--rule); padding: 10px 12px; }
.aw small { font: 900 10px/1 var(--display); letter-spacing: 0.16em; color: var(--stamp); }
.aw b { display: block; font: 800 17px/1.2 var(--display); margin: 4px 0 2px; }
.aw span { display: block; font-size: 12px; color: var(--ink-2); } .aw em { display: block; margin-top: 4px; font: 700 11px/1 var(--mono); font-style: normal; color: var(--ink-3); }
.aw.me { border-color: var(--stamp); box-shadow: 0 0 0 1px var(--stamp); }
.sh-announce { position: absolute; top: 30%; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; }
.sh-announce b { display: block; font: 900 54px/1 var(--display); letter-spacing: 0.1em; color: #fff; text-shadow: 3px 3px 0 var(--pink), 0 10px 30px rgba(0,0,0,0.6); }
.sh-announce span { display: inline-block; margin-top: 10px; font: 700 14px/1 var(--type); letter-spacing: 0.12em; background: var(--manila); color: var(--ink); padding: 6px 12px; }
.sh-announce.go { animation: ann 2.4s ease forwards; }
@keyframes ann { 0% { opacity: 0; transform: translate(-50%, 12px) scale(1.08); } 10% { opacity: 1; transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }
.sh-toasts { position: absolute; bottom: calc(var(--strip-bot) + 190px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.sh-toast { background: var(--paper); color: var(--ink); padding: 7px 14px; font: 700 13px/1.2 var(--type); box-shadow: 0 8px 18px rgba(0,0,0,0.4); transform: rotate(-0.6deg); animation: toast .25s ease; transition: opacity .4s, transform .4s; }
.sh-toast.out { opacity: 0; transform: translateY(-8px); }
@keyframes toast { from { opacity: 0; transform: translateY(10px); } }

/* ---------- the wristwatch (Esc) */
.watch-ov { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 34px; padding: calc(var(--strip-top) + 18px) 24px 18px;
  background: radial-gradient(circle at 30% 50%, rgba(10, 12, 14, 0.55), rgba(5, 6, 7, 0.85)); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.watch { position: relative; flex: none; width: 400px; display: flex; flex-direction: column; align-items: center; }
.strap { position: absolute; left: 50%; width: 190px; height: 120px; transform: translateX(-50%); background: linear-gradient(90deg, #1b1714, #2b241e 20%, #2b241e 80%, #1b1714);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.4); }
.strap::after { content: ''; position: absolute; inset: 12px 18px; border: 1px dashed rgba(180, 150, 110, 0.25); }
.strap.s1 { top: -86px; border-radius: 20px 20px 0 0; } .strap.s2 { top: 330px; border-radius: 0 0 20px 20px; }
.case { position: relative; width: 400px; height: 400px; border-radius: 50%; padding: 22px; z-index: 1;
  background: conic-gradient(from 20deg, #6b7076, #d9dde1, #8c9196, #f2f4f6, #7a7f84, #c9ced2, #6b7076); box-shadow: 0 30px 60px rgba(0,0,0,0.6), inset 0 0 0 2px rgba(255,255,255,0.25); }
.bezel { width: 100%; height: 100%; border-radius: 50%; padding: 18px; background: radial-gradient(circle, #23272b 60%, #15181b);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,0.6), inset 0 6px 14px rgba(0,0,0,0.6); }
.face { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: repeating-conic-gradient(from -1deg, rgba(240, 235, 220, 0.75) 0 2deg, transparent 2deg 30deg), radial-gradient(circle, #0d1a24 0 66%, #0a1219);
  -webkit-mask: radial-gradient(circle, #000 70%, #000 71%); }
.face::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #13283a, #08121a 70%); }
.wf-brand, .wf-menu, .wf-code { position: relative; z-index: 2; }
.wf-brand { font: 900 22px/1 var(--display); letter-spacing: 0.2em; color: #f2eee2; text-align: center; margin-bottom: 10px; }
.wf-brand small { display: block; font: 700 7px/1 var(--type); letter-spacing: 0.3em; color: #8fa6b5; margin-top: 3px; }
.wf-menu { display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: 170px; }
.wf-menu button { border: 0; background: none; cursor: pointer; padding: 6px 10px; font: 800 13px/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase; color: #9fc3d6; text-align: center; border-radius: 2px; }
.wf-menu button:hover { color: #fff; background: rgba(159, 195, 214, 0.12); }
.wf-menu button.on { color: #0a1219; background: #ffb547; }
.wf-code { margin-top: 10px; border: 1px solid rgba(255, 181, 71, 0.5); background: rgba(255, 181, 71, 0.08); color: #ffb547; padding: 5px 12px; border-radius: 2px; cursor: pointer; font: 700 10px/1 var(--type); letter-spacing: 0.2em; display: flex; gap: 8px; align-items: baseline; }
.wf-code b { font: 900 16px/1 var(--mono); letter-spacing: 0.3em; }
.wf-code.copied { background: #ffb547; color: #0a1219; }
.wf-hands { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.16; }
.wf-hands i { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; background: #e9e4d4; border-radius: 3px; }
.wf-hands .hh { width: 6px; height: 26%; margin-left: -3px; } .wf-hands .mm { width: 4px; height: 38%; margin-left: -2px; } .wf-hands .ss { width: 2px; height: 42%; margin-left: -1px; background: var(--stamp); }
.crown { position: absolute; right: -14px; top: 50%; width: 22px; height: 46px; margin-top: -23px; border-radius: 4px; background: repeating-linear-gradient(0deg, #9da2a7 0 3px, #d5d9dd 3px 6px); box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.wf-actions { position: relative; z-index: 2; margin-top: 110px; display: flex; gap: 10px; }
.wf-actions .btn.play { background: #ffb547; color: #0a1219; border-color: #ffb547; }
.wf-actions .btn.ghost { color: var(--manila); }
.wsheet { width: min(740px, calc(100vw - 500px)); height: min(640px, 84vh); display: flex; flex-direction: column; padding: 22px 22px 16px; }
.ws-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.ws-head small { font: 700 10px/1 var(--type); letter-spacing: 0.22em; color: var(--ink-3); }
.ws-head h2 { margin: 6px 0 0; font: 900 24px/1 var(--display); letter-spacing: 0.04em; }
.ws-head .stamp { position: static; transform: rotate(-5deg); }
.ws-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 220px; gap: 16px; margin-top: 12px; }
.ws-main { min-height: 0; overflow-y: auto; padding-right: 6px; }
.tab { display: none; } .tab.on { display: block; }
.folder { position: relative; background: rgba(255, 250, 235, 0.55); border: 1px solid var(--rule); padding: 12px 14px; margin-bottom: 12px; }
.folder .f-tab { top: -12px; left: 10px; height: 13px; padding: 2px 10px 0; font-size: 9px; background: var(--paper); }
.folder h3 { margin: 2px 0 4px; font-size: 17px; } .folder p { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.mrow { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px dashed var(--rule); }
.mrow > span { font: 700 11px/1.2 var(--type); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.cta { margin-top: 14px; }
.btn.start { width: 100%; padding: 14px; background: var(--stamp); color: #fff; border-color: #8f1f1a; font-size: 15px; letter-spacing: 0.2em; }
.btn.start kbd { color: #fff; }
.btn.start.cancel { background: var(--ink); border-color: var(--ink); color: var(--manila); }
.cta-note, .wait { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.wait { padding: 12px; background: rgba(255, 250, 235, 0.55); border: 1px dashed var(--rule); text-align: center; }
.tcol header { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--ink-2); color: #fff; font: 800 12px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.tcol header b { flex: 1; } .tcol.tm-red header { background: var(--red); } .tcol.tm-blue header { background: var(--blue); }
.tcol header .btn { color: var(--ink); }
.plist { list-style: none; margin: 0 0 10px; padding: 0; }
.plist li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px dashed var(--rule); }
.plist li.none { color: var(--ink-3); font-style: italic; }
.plist li.away { opacity: 0.5; } .plist li.me { background: rgba(255, 255, 255, 0.35); }
.plist li.speaking .pdot { box-shadow: 0 0 0 3px #57b84a; }
.pdot { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 900 12px/1 var(--display); color: #fff; font-style: normal; text-shadow: 0 1px 1px rgba(0,0,0,0.4); }
.pwho { flex: 1; min-width: 0; } .pwho b { display: block; font-size: 13px; } .pwho small { color: var(--ink-3); font-weight: 400; } .pwho span { font-size: 11.5px; color: var(--ink-3); }
.plist .host { font: 900 9px/1 var(--display); letter-spacing: 0.1em; font-style: normal; color: var(--stamp); border: 1px solid var(--stamp); padding: 2px 4px; }
.pmic { font: 700 9px/1 var(--mono); color: var(--ink-3); } .pmic.on { color: #2f7a3a; } .pmic.muted { color: var(--stamp); }
.kick { border: 1px solid var(--rule); background: none; cursor: pointer; width: 22px; height: 22px; color: var(--ink-3); }
.tools { display: flex; gap: 8px; margin: 6px 0 4px; }
.hatsw { display: flex; flex-wrap: wrap; gap: 4px; }
.hatsw button { padding: 5px 8px; border: 1px solid rgba(40, 30, 15, 0.3); background: var(--paper); cursor: pointer; font: 700 11px/1 var(--type); color: var(--ink-2); border-radius: 2px; }
.hatsw button.on { background: var(--ink); color: var(--manila); }
.comms { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.comms .fine { flex-basis: 100%; }
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.pb-scopes { display: flex; gap: 4px; margin-bottom: 10px; }
.pb-scopes button { padding: 6px 12px; border: 1px solid rgba(40, 30, 15, 0.35); background: var(--paper); cursor: pointer; font: 800 11px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.pb-scopes button.on { background: var(--ink); color: var(--manila); }
.pb-t, .lb-t { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.pb-t th, .lb-t th { font: 700 10px/1 var(--type); letter-spacing: 0.1em; text-align: right; color: var(--ink-3); padding: 6px; border-bottom: 1px solid var(--rule); }
.pb-t td, .lb-t td { text-align: right; padding: 5px 6px; border-bottom: 1px dashed var(--rule); font-family: var(--mono); font-size: 12.5px; }
.pb-t td:nth-child(2), .lb-t .nm { text-align: left; }
.pb-t button, .lb-t button { border: 0; background: none; cursor: pointer; font: 700 13px/1 var(--type); color: var(--ink); padding: 0; display: inline-flex; align-items: center; gap: 6px; }
.pb-t i, .lb-t i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lb-t th button { font: 700 10px/1 var(--type); letter-spacing: 0.1em; color: var(--ink-3); } .lb-t th button.on { color: var(--stamp); }
.pb-t tr.me td, .lb-t tr.me td { background: rgba(255, 255, 255, 0.45); }
.lb-t .fav { font-family: var(--type); font-size: 11.5px; color: var(--ink-3); }
.ws-chat { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--rule); padding-left: 12px; }
.ws-h { font: 800 11px/1 var(--display); letter-spacing: 0.2em; color: var(--ink-3); margin-bottom: 6px; }
.chatlog { flex: 1; min-height: 0; overflow-y: auto; font-size: 12.5px; }
.chatlog .m, .cf-log .m { margin: 3px 0; word-wrap: break-word; line-height: 1.35; }
.chatlog .m.sys { color: var(--ink-3); font-style: italic; }
.chatlog .m.ghost, .cf-log .m.ghost { opacity: 0.7; }
.chatform { display: flex; gap: 6px; margin-top: 8px; } .chatform input { margin: 0 !important; padding: 8px !important; font-size: 13px !important; }

/* the leaderboard overlay */
.lbx { position: fixed; z-index: 70; background: rgba(6, 7, 8, 0.72); }
.lbx .stamp { right: 130px; }
.lbx-body { min-height: 200px; }
.card-p .cp-head { display: flex; gap: 14px; align-items: center; margin: 12px 0; }
.card-p .cp-head i { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font: 900 24px/1 var(--display); color: #fff; font-style: normal; }
.card-p h3 { margin: 0; font-size: 24px; } .card-p .cp-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-2); }
.card-p .stats { grid-template-columns: repeat(8, 1fr); }
.nem { font-size: 13px; } .aws-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.awc { font: 800 10px/1 var(--display); letter-spacing: 0.1em; border: 2px solid var(--stamp); color: var(--stamp); padding: 4px 6px; text-transform: uppercase; }
.wl { margin: 0; padding-left: 18px; font-size: 13px; } .won { color: var(--stamp-ok); font-style: normal; font-weight: 800; }

/* ---------- cam strip (js/ui/camstrip.js): team borders, greyscale when painted out */
.camstrip { position: absolute; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; padding: 8px 12px; z-index: 20; transition: transform .3s cubic-bezier(.3,1.3,.5,1), opacity .25s; pointer-events: none; }
.camstrip-top { top: 0; } .camstrip-bot { bottom: 0; }
.camstrip.off { opacity: 0; transform: translateY(-30px); } .camstrip-bot.off { transform: translateY(30px); }
.cam-tile { position: relative; width: var(--cam-w); height: var(--cam-h); border-radius: 4px; overflow: hidden; flex: none; background: #161819; --tc: var(--pc, #8a8f98);
  box-shadow: 0 0 0 3px var(--tc), 0 6px 16px rgba(0,0,0,0.45); transition: box-shadow .15s, filter .3s, opacity .3s, transform .15s; animation: tile-in .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes tile-in { from { transform: scale(0.4); opacity: 0; } }
.cam-tile.team-red { --tc: var(--red); } .cam-tile.team-blue { --tc: var(--blue); } .cam-tile.team-ffa, .cam-tile.team-lobby { --tc: var(--pc, #8a8f98); }
.cam-tile .cam-init { position: absolute; inset: 0; display: grid; place-items: center; font: 900 calc(var(--cam-h) * 0.46)/1 var(--display); color: rgba(255,255,255,0.92);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--pc) 75%, #fff 10%), color-mix(in srgb, var(--pc) 50%, #000 50%)); }
@supports not (background: color-mix(in srgb, red 50%, blue)) { .cam-tile .cam-init { background: radial-gradient(circle at 50% 35%, var(--pc, #8a8f98), rgba(0, 0, 0, 0.55)), var(--pc, #8a8f98); } } /* Safari < 16.2 */
.cam-tile .cam-vid { position: absolute; inset: 0; }
.cam-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.cam-tile.me video, video.mirror { transform: scaleX(-1); }
.cam-tile.live .cam-init { visibility: hidden; }
.cam-tile .cam-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 6px 3px; background: linear-gradient(transparent, rgba(0,0,0,0.8)); font: 700 11px/1.1 var(--type); display: flex; align-items: center; gap: 3px; white-space: nowrap; color: #fff; }
.cam-tile .cam-name b { overflow: hidden; text-overflow: ellipsis; }
.cam-tile .cam-crown { display: none; color: var(--gold); width: 12px; height: 12px; flex: none; }
.cam-tile.host .cam-crown { display: inline-block; } .cam-tile .cam-crown .ic { width: 12px; height: 12px; }
.cam-tile .cam-mute { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: rgba(195, 48, 42, 0.92); display: none; place-items: center; }
.cam-tile .cam-mute .ic { width: 13px; height: 13px; color: #fff; }
.cam-tile.muted .cam-mute { display: grid; } .cam-tile.novoice .cam-mute { display: grid; background: rgba(0,0,0,0.55); }
.cam-tile .cam-ghost { display: none; }
.cam-tile.ghost .cam-vid, .cam-tile.ghost .cam-init { filter: grayscale(1) brightness(0.6) contrast(1.1); }
.cam-tile.ghost { opacity: 0.85; } .cam-tile.ghost::after { content: 'OUT'; position: absolute; top: 4px; left: 5px; font: 900 10px/1 var(--display); letter-spacing: 0.12em; color: #fff; background: var(--stamp); padding: 2px 4px; }
.cam-tile.away { opacity: 0.4; }
.cam-tile .cam-eq { position: absolute; top: 6px; right: 28px; display: none; gap: 2px; align-items: flex-end; height: 12px; }
.cam-tile .cam-eq i { width: 3px; background: #b6ff5c; border-radius: 2px; animation: eq .5s ease-in-out infinite alternate; }
.cam-tile .cam-eq i:nth-child(2) { animation-delay: -.2s; } .cam-tile .cam-eq i:nth-child(3) { animation-delay: -.35s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
.cam-tile.speaking { box-shadow: 0 0 0 3px var(--tc), 0 0 0 6px #b6ff5c, 0 0 18px 4px rgba(182, 255, 92, 0.5), 0 6px 16px rgba(0,0,0,0.45); transform: translateY(2px) scale(1.04); z-index: 1; }
.cam-tile.speaking .cam-eq { display: flex; }
.cam-dock { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 5px; z-index: 21; }
.cam-dock button { width: 30px; height: 26px; border-radius: 3px; border: 1px solid rgba(233, 216, 164, 0.3); background: rgba(17, 18, 19, 0.85); color: var(--muted); display: grid; place-items: center; cursor: pointer; padding: 0; }
.cam-dock button .ic { width: 16px; height: 16px; }
.cam-dock button.on { color: #b6ff5c; border-color: rgba(182,255,92,0.5); } .cam-dock button.muted { color: var(--stamp); }
.cam-dock.collapsed button:not([data-ctl=hide]) { display: none; }
body:not(.menu-open) .cam-dock { opacity: 0.55; } body.in-game:not(.menu-open) .cam-dock:hover { opacity: 1; }

/* ---------- in-game chat feed */
.chatfeed { position: absolute; left: 16px; bottom: calc(var(--strip-bot) + 120px); width: min(380px, 34vw); z-index: 23; font-family: var(--type); }
.cf-log { max-height: 180px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 13px; color: #f4efe2; text-shadow: 0 1px 2px #000; }
.cf-log .m { transition: opacity 1s; background: rgba(0,0,0,0.35); padding: 2px 8px; align-self: flex-start; }
.cf-log .m.sys { color: var(--manila); font-style: italic; }
.cf-log .m.old { opacity: 0; }
.chatfeed.typing .cf-log { overflow-y: auto; } .chatfeed.typing .cf-log .m.old { opacity: 0.85; }
.cf-form { display: flex; align-items: center; gap: 6px; margin-top: 6px; opacity: 0; transition: opacity .15s; }
.chatfeed.typing .cf-form { opacity: 1; }
.cf-form input { margin: 0 !important; background: rgba(17,18,19,0.9) !important; color: #f4efe2 !important; border-color: rgba(233,216,164,0.35) !important; padding: 8px 10px !important; }
.cf-form kbd { color: var(--manila); }
body.menu-open .chatfeed { display: none; }

/* ---------- smaller screens */
@media (max-width: 1100px) {
  .lb-grid { grid-template-columns: 1fr; }
  .watch-ov { flex-direction: column; overflow-y: auto; justify-content: flex-start; }
  .watch { transform: scale(0.7); margin: -60px 0 -80px; }
  .wsheet { width: min(740px, 96vw); }
  .howto { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .menu-wrap { padding: 16px; }
  .dossier .dz-top { grid-template-columns: 1fr; }
  .logo b { font-size: 64px; }
  .ws-body { grid-template-columns: 1fr; }
  .teams.two, .set-grid, .lds { grid-template-columns: 1fr; }
}
