/* Team Defensie — menus + HUD. Defensie navy + olive + warm paper, role accents, Ferry display type. */
@font-face { font-family: 'Ferry'; src: url('../assets/fonts/ferry_black.otf') format('opentype'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('../assets/fonts/Rubik-latin.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }

:root {
  --navy: #154273; --navy-deep: #0b2645; --navy-ink: #0a1f3a;
  --olive: #4f5733; --olive-2: #6b7443; --olive-3: #8b925f;
  --paper: #f6efdf; --sand: #e7dcc2; --sand-2: #d6c7a4; --ink: #1d2414; --ink-2: #4a4f3b;
  --orange: #f08a1c; --blue: #2f6fd6; --red: #d6372d; --good: #3fae63;
  --technical: #e0b22a; --medical: #e4604c; --digital: #39bfd3; --security: #8f73c2; --logistics: #ee8a37;
  --r: 14px; --bev: 12px;
  --shadow: 0 10px 30px rgba(6, 20, 40, 0.35);
  --font: 'Rubik', system-ui, sans-serif; --display: 'Ferry', 'Arial Black', Impact, sans-serif;
  --u: clamp(12px, 1.05vw, 17px);
}
#ui-root { font-family: var(--font); color: #fff; font-size: var(--u); -webkit-font-smoothing: antialiased; }
#ui-root * { box-sizing: border-box; }
.hidden { display: none !important; }
.display { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.95; }
svg { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; }

/* ---------------------------------------------------------------- screens */
.screen { position: absolute; inset: 0; pointer-events: auto; display: flex; opacity: 0; transition: opacity 260ms ease; }
.screen.on { opacity: 1; }
.scrim-left { background: linear-gradient(90deg, rgba(8, 26, 48, 0.88) 0%, rgba(8, 26, 48, 0.62) 34%, rgba(8, 26, 48, 0) 62%); }
.scrim-full { background: rgba(8, 24, 44, 0.8); }
.scrim-bottom { background: linear-gradient(0deg, rgba(8, 26, 48, 0.8) 0%, rgba(8, 26, 48, 0) 45%); }

/* top bar: Defensie mark left, sound + language right */
.topbar { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; justify-content: flex-end; padding: 0 2.2em; pointer-events: none; z-index: 5; }
.topbar > * { pointer-events: auto; }
.defensie-mark { display: flex; align-items: flex-start; gap: 0.8em; }
.defensie-mark img.lint { width: 3.2em; height: auto; display: block; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.defensie-mark .wm { padding-top: 1.35em; font-weight: 600; font-size: 1.05em; line-height: 1.15; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.defensie-mark .wm small { display: block; font-weight: 400; opacity: 0.85; font-size: 0.82em; }
.tools { display: flex; gap: 0.6em; margin-top: 1.4em; }
.pill { display: inline-flex; align-items: center; gap: 0.45em; background: rgba(10, 31, 58, 0.72); border: 1.5px solid rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 0.55em 0.95em; font: 600 0.92em var(--font); cursor: pointer; transition: background 150ms, transform 150ms; }
.pill:hover { background: rgba(21, 66, 115, 0.9); transform: translateY(-1px); }
.pill svg { font-size: 1.3em; }
.lang { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1.5px solid rgba(255,255,255,.18); background: rgba(10, 31, 58, 0.82); }
.lang button { background: none; border: 0; color: rgba(255,255,255,.7); font: 700 0.9em var(--font); padding: 0.6em 0.95em; cursor: pointer; }
.lang button.on { background: #fff; color: var(--navy); }
.demo-tag { position: absolute; right: 2.2em; bottom: 1.6em; font: 600 0.78em var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.75); background: rgba(10,31,58,.6); padding: 0.4em 0.8em; border-radius: 6px; pointer-events: none; }

/* loading */
.loading { background: radial-gradient(ellipse at 50% 40%, #1c4f86 0%, var(--navy-deep) 70%); align-items: center; justify-content: center; flex-direction: column; gap: 1.6em; }
.loading .chev { width: 6em; filter: drop-shadow(0 10px 24px rgba(0,0,0,.4)); animation: bob 2.4s ease-in-out infinite; }
.loading .ttl { font-size: 3.4em; }
.loading .bar { width: min(26em, 70vw); height: 0.55em; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.loading .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), #ffc16b); border-radius: 999px; transition: width 300ms ease; }
.loading .lbl { opacity: 0.8; font-weight: 500; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-1deg); } }

/* title */
.title { align-items: center; padding-left: 7vw; }
.title-lockup { display: flex; flex-direction: column; gap: 0.2em; filter: drop-shadow(0 8px 30px rgba(0,0,0,.35)); }
.title-lockup .row { display: flex; align-items: center; gap: 0.35em; }
.title-lockup img { height: 4.4em; }
.title-lockup .k1 { font-size: 5.8em; color: #fff; }
.title-lockup .k2 { font-size: 7.2em; color: #fff; -webkit-text-stroke: 0; }
.title-lockup .tag { font: 600 1.45em var(--font); color: #ffe8c7; margin-top: 0.5em; letter-spacing: 0.01em; }
.press { margin-top: 3em; font: 700 1.1em var(--font); letter-spacing: 0.08em; text-transform: uppercase; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.45; } }

/* main menu */
.main { align-items: center; padding-left: 5vw; }
.menu-col { display: flex; flex-direction: column; gap: 0.75em; width: min(27em, 90vw); }
.menu-col .lock-sm { display: flex; align-items: center; gap: 0.5em; margin-bottom: 1.2em; }
.menu-col .lock-sm img { height: 3em; }
.menu-col .lock-sm .display { font-size: 2.6em; }
.btn { position: relative; display: flex; align-items: center; gap: 0.75em; width: 100%; background: var(--paper); color: var(--ink); border: 0; cursor: pointer; text-align: left;
  padding: 0.95em 1.2em; font: 700 1.15em var(--font); clip-path: polygon(0 0, calc(100% - var(--bev)) 0, 100% var(--bev), 100% 100%, var(--bev) 100%, 0 calc(100% - var(--bev)));
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms; box-shadow: var(--shadow); }
.btn svg { font-size: 1.35em; color: var(--olive); flex: none; }
.btn .sub { display: block; font: 500 0.72em var(--font); color: var(--ink-2); margin-top: 0.15em; }
.btn:hover, .btn:focus-visible { transform: translateX(6px); background: #fff; outline: none; }
.btn:hover::before, .btn:focus-visible::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--orange); }
.btn.primary { background: var(--orange); color: #fff; padding: 1.2em 1.3em; font-size: 1.55em; }
.btn.primary svg { color: #fff; }
.btn.primary .sub { color: rgba(255,255,255,.85); }
.btn.primary:hover, .btn.primary:focus-visible { background: #ff9a2e; }
.btn.primary:hover::before { background: #fff; }
.btn.navy { background: var(--navy); color: #fff; }
.btn.navy svg { color: #fff; }
.btn.ghost { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.btn.ghost svg { color: #fff; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.center { justify-content: center; text-align: center; }
.menu-foot { margin-top: 1.4em; font-size: 0.86em; opacity: 0.8; display: flex; align-items: center; gap: 0.5em; }
.menu-foot .dot { width: 0.55em; height: 0.55em; border-radius: 50%; background: #ff5a4c; box-shadow: 0 0 0 0 rgba(255,90,76,.6); animation: live 1.6s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 0.6em rgba(255,90,76,0); } }

/* panel screens (missions, roles, settings …) */
.panel-wrap { flex-direction: column; padding: 6.5em 4vw 2.4em; gap: 1.4em; }
.panel-head { display: flex; align-items: center; gap: 1em; }
.panel-head .back { background: rgba(255,255,255,.14); border: 0; color: #fff; border-radius: 50%; width: 2.6em; height: 2.6em; display: grid; place-items: center; cursor: pointer; font-size: 1.1em; }
.panel-head .back:hover { background: rgba(255,255,255,.28); }
.panel-head h1 { margin: 0; font-size: 2.8em; }
.card { background: var(--paper); color: var(--ink); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }

/* mission cards */
.missions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6em; flex: 1; min-height: 0; }
.mcard { display: flex; flex-direction: column; cursor: pointer; transition: transform 160ms, box-shadow 160ms; position: relative; }
.mcard:hover { transform: translateY(-4px); }
.mcard.sel { outline: 4px solid var(--orange); outline-offset: -4px; }
.mcard .art { height: 38%; min-height: 9em; background-size: cover; background-position: center; position: relative; }
.mcard .art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.35), rgba(0,0,0,0) 60%); }
.mcard .art .badge { position: absolute; left: 1em; bottom: 0.9em; z-index: 2; background: var(--navy); color: #fff; font: 700 0.8em var(--font); letter-spacing: .06em; text-transform: uppercase; padding: 0.4em 0.75em; border-radius: 6px; display: flex; gap: .45em; align-items: center; }
.mcard .body { padding: 1.3em 1.5em 1.5em; display: flex; flex-direction: column; gap: 0.7em; flex: 1; }
.mcard h2 { margin: 0; font-size: 2.1em; color: var(--olive); }
.mcard .meta { font-weight: 600; color: var(--ink-2); font-size: 0.92em; }
.mcard p { margin: 0; line-height: 1.45; color: var(--ink-2); }
.mcard .roles-strip { display: flex; gap: 0.45em; margin-top: auto; }
.chip { display: inline-flex; align-items: center; gap: 0.4em; border-radius: 999px; padding: 0.35em 0.75em; font: 600 0.82em var(--font); background: var(--sand); color: var(--ink); }
.seg { display: inline-flex; background: var(--sand); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; font: 600 0.9em var(--font); padding: 0.5em 0.9em; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.mfoot { display: flex; gap: 1em; align-items: center; justify-content: flex-end; }
.mfoot .btn { width: auto; }
.mfoot .spacer { flex: 1; }
.labelled { display: flex; align-items: center; gap: 0.7em; font-weight: 600; }

/* role select */
.roles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1em; flex: 1; min-height: 0; }
.rcard { cursor: pointer; display: flex; flex-direction: column; position: relative; transition: transform 160ms; border-top: 6px solid var(--rc); }
.rcard:hover { transform: translateY(-5px); }
.rcard.sel { outline: 4px solid var(--rc); outline-offset: -2px; }
.rcard .pic { flex: 1; min-height: 8em; background: #b7aea0 center 30% / cover no-repeat; position: relative; }
.rcard .ico { position: absolute; top: 0.7em; left: 0.7em; width: 2.4em; height: 2.4em; border-radius: 10px; background: var(--rc); color: #fff; display: grid; place-items: center; font-size: 1.05em; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.rcard .body { padding: 0.9em 1em 1.1em; display: flex; flex-direction: column; gap: 0.4em; }
.rcard h3 { margin: 0; font-size: 1.35em; color: var(--ink); }
.rcard .nick { font: 700 0.78em var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--rc); filter: brightness(0.8); }
.rcard .blurb { font-size: 0.86em; color: var(--ink-2); line-height: 1.35; }
.rcard .ab { font-size: 0.8em; background: var(--sand); border-radius: 8px; padding: 0.55em 0.65em; color: var(--ink); line-height: 1.3; }
.rcard .ab b { display: flex; align-items: center; gap: 0.35em; }
.rcard .ab b svg { color: var(--rc); filter: brightness(0.85); }
.rcard .taken { position: absolute; inset: 0; background: rgba(20,20,20,.55); display: grid; place-items: center; font-weight: 700; color: #fff; }

/* settings */
.settings { display: grid; grid-template-columns: 13em 1fr; gap: 1.4em; flex: 1; min-height: 0; }
.tabs { display: flex; flex-direction: column; gap: 0.5em; }
.tabs .btn { font-size: 1em; padding: 0.8em 1em; }
.tabs .btn.on { background: var(--navy); color: #fff; }
.tabs .btn.on svg { color: #fff; }
.opts { padding: 1.4em 1.8em; overflow: auto; display: flex; flex-direction: column; gap: 0.3em; }
.opt { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1em; padding: 0.8em 0; border-bottom: 1px solid var(--sand); }
.opt label { font-weight: 600; }
.opt input[type=range] { width: 15em; accent-color: var(--orange); }
.toggle { width: 3.2em; height: 1.8em; border-radius: 999px; border: 0; background: var(--sand-2); position: relative; cursor: pointer; transition: background 150ms; }
.toggle::after { content: ''; position: absolute; top: 0.2em; left: 0.2em; width: 1.4em; height: 1.4em; border-radius: 50%; background: #fff; transition: left 150ms; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.toggle.on { background: var(--good); }
.toggle.on::after { left: 1.6em; }

/* how to play / credits */
.howto { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.6em; flex: 1; min-height: 0; }
.keys { padding: 1.4em 1.6em; display: grid; grid-template-columns: auto 1fr; gap: 0.55em 1.2em; align-content: start; overflow: auto; }
.kbd { display: inline-flex; gap: 0.3em; }
.kbd kbd { background: var(--navy); color: #fff; border-radius: 6px; padding: 0.25em 0.55em; font: 700 0.85em var(--font); min-width: 1.9em; text-align: center; box-shadow: 0 2px 0 var(--navy-ink); }
.prose { padding: 1.6em 1.8em; line-height: 1.55; color: var(--ink-2); font-size: 1.02em; overflow: auto; }
.prose h3 { color: var(--olive); margin: 0 0 0.5em; font-size: 1.5em; }
.prose p { margin: 0 0 0.9em; }
.credits-list { display: grid; gap: 0.6em; }
.credits-list div { padding: 0.7em 0; border-bottom: 1px solid var(--sand); }

/* pause */
.pause { align-items: center; justify-content: center; }
.pause .menu-col h1 { font-size: 3em; margin: 0 0 0.4em; }

/* ---------------------------------------------------------------- results (debrief) */
.results { padding: 5.2em 3vw 1.6em; flex-direction: column; background: linear-gradient(180deg, rgba(246,239,223,.96), rgba(231,220,194,.97)); color: var(--ink); }
.res-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.3fr) minmax(0, 1.05fr); gap: 1.6em; flex: 1; min-height: 0; align-items: stretch; }
.res-char { position: relative; border-radius: var(--r); overflow: hidden; background: #b7aea0 center 25% / cover no-repeat; box-shadow: var(--shadow); min-height: 16em; }
.res-char .plate { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2em 1.3em; background: linear-gradient(0deg, rgba(20, 30, 14, 0.92), rgba(20, 30, 14, 0)); color: #fff; }
.res-char .plate .display { font-size: 2.2em; }
.res-char .plate .sub { opacity: 0.85; font-size: 0.92em; margin-top: 0.3em; }
.res-center { display: flex; flex-direction: column; align-items: center; gap: 0.3em; min-height: 0; }
.res-center h1 { margin: 0; font-size: 3em; color: var(--olive); text-align: center; }
.res-center .sub { color: var(--ink-2); font-weight: 600; }
.res-center .outcome { font: 800 1.1em var(--font); padding: 0.35em 1em; border-radius: 999px; color: #fff; margin: 0.4em 0; }
.radar { width: 100%; flex: 1; min-height: 0; max-height: 60vh; }
.radar text { font-family: var(--font); }
.res-center .axis-label { font-weight: 700; color: var(--ink-2); font-size: 0.9em; }
.res-center .disclaimer { font-size: 0.78em; color: var(--ink-2); max-width: 34em; text-align: center; line-height: 1.35; }
.res-side { display: flex; flex-direction: column; gap: 1em; min-height: 0; }
.res-box { background: #fffaf0; border-radius: var(--r); padding: 1.1em 1.3em; box-shadow: 0 4px 14px rgba(40,40,20,.12); }
.res-box h3 { margin: 0 0 0.7em; font: 800 1em var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--olive); }
.moment { display: flex; align-items: center; gap: 0.7em; padding: 0.5em 0; border-bottom: 1px dashed var(--sand-2); font-weight: 600; }
.moment:last-child { border-bottom: 0; }
.moment .mi { width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.careers { display: flex; flex-direction: column; gap: 0.7em; }
.careers p { margin: 0; line-height: 1.4; }
.res-actions { display: flex; gap: 1em; justify-content: center; margin-top: 1.2em; }
.res-actions .btn { width: auto; min-width: 13em; justify-content: center; }
.team-outcome { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.team-outcome .score { font: 900 1.8em var(--display); }

/* ---------------------------------------------------------------- HUD */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud-top { position: absolute; top: 1.1em; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.4em; }
.goal-chip { background: rgba(10, 31, 58, 0.85); border-radius: 12px; padding: 0.45em 1em; font-weight: 700; display: flex; align-items: center; gap: 0.7em; }
.goal-chip .timer { font: 900 1.25em var(--display); letter-spacing: .03em; color: #fff; min-width: 3.4em; text-align: center; }
.goal-chip .timer.low { color: #ffcf6b; }
.scoreline { display: flex; align-items: center; gap: 0.5em; }
.scoreline .sc { font: 900 1.9em var(--display); width: 1.6em; height: 1.6em; display: grid; place-items: center; border-radius: 10px; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.scoreline .fs { display: flex; flex-direction: column; align-items: center; font-size: 0.72em; font-weight: 700; gap: 0.2em; min-width: 5.5em; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.scoreline .fs svg { font-size: 1.8em; }
.turfbar { width: 18em; height: 0.8em; border-radius: 999px; overflow: hidden; display: flex; background: rgba(255,255,255,.2); }
.turfbar i { display: block; height: 100%; transition: width 400ms; }

.hud-bl { position: absolute; left: 1.4em; bottom: 1.3em; display: flex; align-items: flex-end; gap: 0.9em; }
.me-port { width: 4.8em; height: 4.8em; border-radius: 14px; background: #b7aea0 center 18% / 180% no-repeat; border: 3px solid var(--rc); box-shadow: var(--shadow); position: relative; }
.me-port .ri { position: absolute; right: -0.55em; bottom: -0.55em; width: 1.9em; height: 1.9em; border-radius: 8px; background: var(--rc); display: grid; place-items: center; font-size: 0.95em; }
.bars { display: flex; flex-direction: column; gap: 0.35em; width: 15em; }
.bars .nm { font-weight: 700; font-size: 0.95em; text-shadow: 0 1px 4px rgba(0,0,0,.6); display: flex; justify-content: space-between; }
.bar2 { height: 0.8em; border-radius: 999px; background: rgba(0,0,0,.4); overflow: hidden; position: relative; }
.bar2 i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; transition: width 120ms; }
.bar2.hp i { background: linear-gradient(90deg, #6ed87c, #3fae63); }
.bar2.hp.low i { background: linear-gradient(90deg, #ffd36b, #f0a51c); }
.bar2.sh { height: 0.5em; }
.bar2.sh i { background: linear-gradient(90deg, #9fd3ff, #4aa0e8); }
.mates { display: flex; gap: 0.35em; margin-top: 0.3em; }
.mate { width: 1.9em; height: 1.9em; border-radius: 7px; display: grid; place-items: center; font-size: 0.85em; background: var(--rc); opacity: 1; position: relative; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.mate.down { opacity: 0.35; filter: grayscale(1); }
.mate.flag::after { content: ''; position: absolute; top: -0.35em; right: -0.35em; width: 0.8em; height: 0.8em; border-radius: 50%; background: #fff; border: 2px solid var(--orange); }

.hud-br { position: absolute; right: 1.4em; bottom: 1.3em; display: flex; align-items: flex-end; gap: 0.8em; }
.ability { width: 4.6em; height: 4.6em; border-radius: 16px; background: rgba(10,31,58,.78); display: grid; place-items: center; position: relative; box-shadow: var(--shadow); }
.ability svg.icon { font-size: 2.1em; color: var(--rc); }
.ability svg.ring { position: absolute; inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); transform: rotate(-90deg); }
.ability .key { position: absolute; left: -0.5em; top: -0.5em; background: #fff; color: var(--navy); font: 800 0.8em var(--font); border-radius: 6px; padding: 0.15em 0.45em; }
.ability .cd { position: absolute; font: 900 1.4em var(--display); }
.ability.ready { animation: readyPulse 1.6s ease-in-out infinite; }
@keyframes readyPulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--rc) 45%, transparent), var(--shadow); } }
.ammo { background: rgba(10,31,58,.78); border-radius: 16px; padding: 0.7em 1em 0.7em; min-width: 11em; box-shadow: var(--shadow); }
.ammo .num { font: 900 2.6em var(--display); display: flex; align-items: baseline; gap: 0.15em; }
.ammo .num small { font-size: 0.45em; opacity: 0.7; }
.ammo .num.low { color: #ffb36b; }
.slots { display: flex; gap: 0.35em; margin-top: 0.35em; }
.slot { flex: 1; font: 700 0.72em var(--font); background: rgba(255,255,255,.1); border-radius: 6px; padding: 0.3em 0.45em; opacity: 0.55; white-space: nowrap; }
.slot.on { background: rgba(255,255,255,.26); opacity: 1; }
.reloadbar { height: 4px; border-radius: 3px; background: rgba(255,255,255,.2); margin-top: 0.4em; overflow: hidden; }
.reloadbar i { display: block; height: 100%; background: #ffcf6b; width: 0; }
.carry-chip { position: absolute; right: 1.4em; bottom: 8.4em; background: rgba(240,138,28,.92); border-radius: 10px; padding: 0.45em 0.8em; font-weight: 700; display: flex; align-items: center; gap: 0.5em; }

.crosshair { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.crosshair i { position: absolute; background: #fff; box-shadow: 0 0 2px rgba(0,0,0,.8); border-radius: 1px; }
.crosshair .dot { width: 4px; height: 4px; left: -2px; top: -2px; border-radius: 50%; }
.crosshair .h { width: 8px; height: 2px; top: -1px; }
.crosshair .v { width: 2px; height: 8px; left: -1px; }
.hitmark { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px; opacity: 0; transition: opacity 80ms; }
.hitmark.on { opacity: 1; }
.hitmark i { position: absolute; width: 10px; height: 3px; background: #fff; box-shadow: 0 0 3px rgba(0,0,0,.6); top: 12px; }
.hitmark.tag i { background: #ffcf6b; }

.prompt { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); display: flex; align-items: center; gap: 0.6em; background: rgba(10,31,58,.82); border-radius: 12px; padding: 0.55em 0.9em; font-weight: 700; white-space: nowrap; }
.prompt kbd { background: #fff; color: var(--navy); border-radius: 6px; padding: 0.15em 0.5em; font: 800 0.9em var(--font); }
.prompt .lock { color: #ffb36b; font-weight: 600; font-size: 0.9em; }
.prompt svg.pr { width: 1.8em; height: 1.8em; transform: rotate(-90deg); }

.feed { position: absolute; right: 1.4em; top: 14.5em; display: flex; flex-direction: column; gap: 0.35em; align-items: flex-end; }
.feed div { background: rgba(10,31,58,.72); border-left: 4px solid var(--c); border-radius: 8px; padding: 0.35em 0.7em; font-weight: 600; font-size: 0.88em; animation: feedIn 220ms ease; }
.feed div.big { font-size: 1em; background: rgba(10,31,58,.88); }
@keyframes feedIn { from { transform: translateX(20px); opacity: 0; } }

.minimap { position: absolute; right: 1.4em; top: 1.1em; width: 12em; height: 12em; border-radius: 14px; overflow: hidden; background: rgba(10,31,58,.6); box-shadow: var(--shadow); border: 2px solid rgba(255,255,255,.15); }
.minimap canvas { width: 100%; height: 100%; display: block; }

.colonel { position: absolute; left: 1.4em; top: 1.1em; display: flex; align-items: flex-start; gap: 0.7em; max-width: 28em; opacity: 0; transform: translateY(-10px); transition: opacity 220ms, transform 220ms; }
.colonel.on { opacity: 1; transform: none; }
.colonel .face { width: 4.2em; height: 4.2em; border-radius: 50%; background: #b7aea0 center 16% / 190% no-repeat; border: 3px solid #fff; flex: none; box-shadow: var(--shadow); }
.colonel .bubble { background: var(--paper); color: var(--ink); border-radius: 14px; padding: 0.7em 0.95em; font-weight: 600; line-height: 1.35; box-shadow: var(--shadow); position: relative; }
.colonel .bubble b { display: block; font: 800 0.72em var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--olive); margin-bottom: 0.2em; }

.banner { position: absolute; left: 50%; top: 28%; transform: translate(-50%, -50%) scale(0.8); font: 900 4.2em var(--display); text-transform: uppercase; color: #fff; text-shadow: 0 6px 24px rgba(0,0,0,.45); opacity: 0; transition: opacity 200ms, transform 260ms cubic-bezier(.2,1.6,.4,1); white-space: nowrap; }
.banner.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.countdown { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); font: 900 9em var(--display); color: #fff; text-shadow: 0 8px 30px rgba(0,0,0,.45); opacity: 0; }
.countdown.on { animation: cd 900ms ease forwards; }
@keyframes cd { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); } }
.toast { position: absolute; left: 50%; top: 68%; transform: translateX(-50%); background: rgba(10,31,58,.85); padding: 0.45em 0.9em; border-radius: 10px; font-weight: 600; opacity: 0; transition: opacity 200ms; }
.toast.on { opacity: 1; }

.tagged { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.4em; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(10,20,40,.55)); opacity: 0; transition: opacity 250ms; }
.tagged.on { opacity: 1; }
.tagged .display { font-size: 4em; }
.tagged .by { font-weight: 700; font-size: 1.15em; }
.tagged .in { font: 900 1.6em var(--display); color: #ffcf6b; }
.dmg { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 400ms; }
.protect { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); font-weight: 700; color: #9fd3ff; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.marker { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 0.1em; font-weight: 700; font-size: 0.82em; text-shadow: 0 1px 4px rgba(0,0,0,.7); white-space: nowrap; }
.marker .mk { width: 2em; height: 2em; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); border: 2px solid #fff; }
.marker.name { font-size: 0.8em; }
.marker.name .tri { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--c); }
.fps { position: absolute; left: 50%; bottom: 0.4em; transform: translateX(-50%); font: 600 0.75em var(--font); opacity: 0.7; }
.tasks { position: absolute; left: 1.4em; top: 7.5em; display: flex; flex-direction: column; gap: 0.35em; width: 21em; }
.task { background: rgba(10,31,58,.72); border-radius: 9px; padding: 0.4em 0.7em; font-weight: 600; font-size: 0.86em; display: flex; align-items: center; gap: 0.55em; }
.task .ti { width: 1.6em; height: 1.6em; border-radius: 6px; display: grid; place-items: center; background: var(--rc); flex: none; font-size: 0.85em; }
.task.done { opacity: 0.55; }
.task.done .ti { background: var(--good); }
.task.locked { opacity: 0.75; }
.task.mine { outline: 2px solid var(--rc); }

/* ---------------------------------------------------------------- small screens (landscape phones / tablets) */
@media (max-height: 560px) {
  :root { --u: 11px; }
  .minimap { width: 9em; height: 9em; }
  .panel-wrap { padding-top: 4.6em; }
}
@media (max-width: 1100px) {
  .roles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.6em; }
  .rcard .ab { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
/* bridge debrief medal */
.medal { padding: .1em .55em; border-radius: .6em; color: #2c2410; }
.medal.gold { background: #f2c94c; } .medal.silver { background: #d7dde2; } .medal.bronze { background: #d89a63; }
/* bridge: soaked & shivering — a cold blue edge that pulses gently */
.protect.soaked { color: #d9f1ff; background: rgba(33, 88, 140, .55); padding: .35em .9em; border-radius: 1em; animation: shiver .18s infinite alternate; }
.hud.is-soaked .dmg { opacity: 1 !important; background: radial-gradient(ellipse at center, rgba(120,190,255,0) 55%, rgba(120,190,255,.28) 100%) !important; animation: coldpulse 2.4s ease-in-out infinite; }
@keyframes shiver { from { transform: translateX(calc(-50% - 1px)); } to { transform: translateX(calc(-50% + 1px)); } }
@keyframes coldpulse { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

/* ================================================================ v0.2 menu pass */
/* Rijksoverheid-style ribbon: hangs from the top edge, centred; the wordmark sits to its right */
.rijks { position: absolute; left: 50%; top: 0; transform: translateX(-1.75em); display: flex; align-items: flex-start; pointer-events: none; z-index: 6; }
.rijks .lint { width: 3.5em; height: 7em; object-fit: cover; object-position: bottom; display: block; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.rijks .wm { margin: 3.95em 0 0 0.75em; font: 400 1.22em/1 'RijksoverheidSerif', 'RO Serif', Georgia, 'Times New Roman', serif; color: #fff; letter-spacing: 0.005em; white-space: nowrap; text-shadow: 0 1px 6px rgba(0,0,0,.35); }

/* buttons that feel like buttons: lift on hover, push on press, a ripple where you pressed */
.btn { box-shadow: 0 6px 0 rgba(6,20,40,.35), var(--shadow); }
.btn:hover, .btn:focus-visible { box-shadow: 0 8px 0 rgba(6,20,40,.3), 0 14px 30px rgba(6,20,40,.4); }
.btn:active, .btn.pressed { transform: translate(4px, 4px) !important; box-shadow: 0 2px 0 rgba(6,20,40,.35), 0 4px 10px rgba(6,20,40,.3); filter: brightness(.94); transition-duration: 60ms; }
.btn.pressed { animation: btnpress 260ms ease-out; }
@keyframes btnpress { 0% { transform: translate(4px, 4px) scale(.98); } 60% { transform: translate(1px, 1px) scale(1.01); } 100% { transform: none; } }
.pill:active, .lang button:active, .seg button:active, .panel-head .back:active, .toggle:active { transform: scale(.92); }
.ripple { position: absolute; width: 0.4em; height: 0.4em; margin: -0.2em 0 0 -0.2em; border-radius: 50%; background: rgba(255,255,255,.55); pointer-events: none; animation: ripple 520ms ease-out forwards; z-index: 3; }
.btn:not(.primary):not(.navy):not(.ghost) .ripple, .card .ripple { background: rgba(240,138,28,.35); }
@keyframes ripple { to { transform: scale(60); opacity: 0; } }

/* mission + role cards: a dock — the picked card grows, hover magnifies a little, the rest step back */
.missions { display: flex; gap: 1.6em; }
.mcard { flex: 1 1 0; min-width: 0; transition: flex-grow 420ms cubic-bezier(.2,1.25,.3,1), transform 220ms, box-shadow 220ms, filter 220ms; }
.mcard:hover { flex-grow: 1.15; transform: translateY(-6px); }
.mcard.sel { flex-grow: 1.6; outline: none; box-shadow: 0 0 0 5px var(--orange), 0 0 40px 6px rgba(240,138,28,.55), var(--shadow); transform: translateY(-8px); }
.missions:has(.sel) .mcard:not(.sel):not(:hover) { filter: saturate(.75) brightness(.82); }
.mcard:active, .mcard.pressed { transform: translateY(-2px) scale(.985); }
.mcard .art { transition: height 420ms cubic-bezier(.2,1.25,.3,1); }
.mcard.sel .art { height: 46%; }
.picked { position: absolute; right: 0.8em; top: 0.8em; z-index: 3; display: inline-flex; align-items: center; gap: 0.35em; background: var(--orange); color: #fff; font: 800 0.75em var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 0.45em 0.75em; border-radius: 999px; box-shadow: 0 3px 10px rgba(0,0,0,.3); opacity: 0; transform: scale(.6); transition: opacity 200ms, transform 300ms cubic-bezier(.2,1.6,.3,1); }
.sel .picked { opacity: 1; transform: none; }

.roles { display: flex; gap: 1em; align-items: stretch; padding-top: 0.8em; }
.rcard { flex: 1 1 0; min-width: 0; transition: flex-grow 420ms cubic-bezier(.2,1.25,.3,1), transform 240ms cubic-bezier(.2,1.4,.3,1), box-shadow 240ms, filter 240ms; }
.rcard:hover { flex-grow: 1.18; transform: translateY(-6px); }
.rcard.sel { flex-grow: 1.7; outline: none; transform: translateY(-12px) scale(1.02); z-index: 2;
  box-shadow: 0 0 0 5px var(--rc), 0 0 0 9px rgba(255,255,255,.9), 0 0 46px 10px var(--rc), var(--shadow); }
.roles:has(.sel) .rcard:not(.sel):not(:hover) { filter: saturate(.7) brightness(.8); }
.rcard:active, .rcard.pressed { transform: translateY(-3px) scale(.985); }
.rcard .picked { background: var(--rc); }
/* the portrait block is the same height on every card (so the text lines up); heads stay in frame */
.rcard .pic { flex: none; height: 52%; min-height: 9em; background-size: cover; background-position: center var(--py, 18%); transition: height 420ms; }
.rcard[data-r="technical"] { --py: 30%; }
.rcard[data-r="medical"] { --py: 0%; }
.rcard[data-r="digital"] { --py: 2%; }
.rcard[data-r="security"] { --py: 24%; }
.rcard[data-r="logistics"] { --py: 4%; }
.rcard .body { flex: 1; min-height: 0; overflow: hidden; }
.rcard.sel .nick { filter: none; }
/* in-game: the way to the pause menu, always visible */
.esc-hint { position: absolute; left: 50%; bottom: 1.2em; transform: translateX(-50%); display: flex; align-items: center; gap: 0.55em; background: rgba(10,31,58,.72); border: 1.5px solid rgba(255,255,255,.18); border-radius: 999px; padding: 0.35em 0.9em 0.35em 0.4em; font: 700 0.85em var(--font); color: rgba(255,255,255,.9); pointer-events: none; }
.esc-hint kbd { background: #fff; color: var(--navy); border-radius: 6px; padding: 0.2em 0.5em; font: 800 0.85em var(--font); box-shadow: 0 2px 0 rgba(0,0,0,.35); }
/* details open up on the picked card (the dock grows to make room); the others show the essentials */
.rcard:not(.sel) .ab .d, .rcard:not(.sel) .ab.more { display: none; }
.rcard .ab .d { display: block; animation: fadeUp 300ms ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.mcard .roles-strip { flex-wrap: wrap; }
/* CTF: a downed teammate */
.marker.medic .need { background: #e4604c; color: #fff; font-weight: 800; padding: 0.15em 0.5em; border-radius: 6px; animation: pulse 1s ease-in-out infinite; }
.tagged.downed .in { font: 700 1.05em var(--font); color: #ffe1db; max-width: 34em; text-align: center; }

/* ---- Operatie: Droge Sokken HUD (stamina, progress chips, next step, tools) ---- */
.hud.bridge .ammo, .hud.bridge .ability, .hud.bridge .bar2.sh { display: none; }
.br-chips, .br-warn, .br-equip { display: none; }
.hud.bridge .br-chips { display: flex; gap: 0.45em; }
.bchip { display: flex; align-items: center; gap: 0.4em; background: rgba(10,31,58,.82); border-radius: 10px; padding: 0.32em 0.7em; font-weight: 700; font-size: 0.88em; transition: background 300ms; }
.bchip svg { width: 1.15em; height: 1.15em; color: #ffcf6b; }
.bchip b { font-weight: 600; opacity: .85; }
.bchip span { font: 900 1.1em var(--display); letter-spacing: .02em; }
.bchip.full { background: rgba(47,140,80,.92); }
.bchip.full svg { color: #fff; }
.bchip.dim { opacity: .55; }
.hud.bridge .br-warn { display: block; opacity: 0; transform: translateY(-6px); transition: opacity 200ms, transform 200ms; background: var(--c, #e0472f); color: #fff; font-weight: 800; border-radius: 10px; padding: 0.4em 1em; letter-spacing: .02em; box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.hud.bridge .br-warn.on { opacity: 1; transform: none; animation: warnPulse 0.7s ease-in-out 3; }
@keyframes warnPulse { 50% { filter: brightness(1.25); } }
.hud.bridge .tasks .next { background: rgba(10,31,58,.82); border-left: 5px solid var(--rc); border-radius: 10px; padding: 0.6em 0.85em; display: flex; gap: 0.7em; align-items: center; font-weight: 700; line-height: 1.25; box-shadow: 0 6px 16px rgba(0,0,0,.25); animation: nextIn 300ms ease-out; }
.hud.bridge .tasks .next small { display: block; font: 800 0.72em var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--rc); filter: brightness(1.3); margin-bottom: 0.15em; }
.hud.bridge .tasks .next .ti { width: 2.1em; height: 2.1em; border-radius: 8px; display: grid; place-items: center; background: var(--rc); flex: none; }
@keyframes nextIn { from { opacity: 0; transform: translateX(-10px); } }
.hud.bridge .bar2.hp { height: 1em; }
.hud.bridge .bar2.hp i { background: linear-gradient(90deg, #ffd36b, #f0a51c); }
.hud.bridge .bar2.hp.low i { background: linear-gradient(90deg, #ff8a6b, #e0472f); animation: lowBar 0.9s ease-in-out infinite; }
@keyframes lowBar { 50% { opacity: .55; } }
.mate.st { overflow: hidden; }
.mate.st i { position: absolute; left: 0; bottom: 0; height: 0.22em; background: #ffd36b; }
.mate.st.ko { filter: grayscale(1); opacity: .55; outline: 2px solid #e4604c; }
.hud.bridge .br-equip { position: absolute; right: 1.4em; bottom: 1.3em; display: flex; flex-direction: column; align-items: flex-end; gap: 0.35em; }
.br-equip .eq { display: flex; align-items: center; gap: 0.55em; background: rgba(10,31,58,.82); border-radius: 12px; padding: 0.5em 0.9em 0.5em 0.5em; font-weight: 700; border-bottom: 3px solid var(--rc); }
.br-equip .ei { width: 2.2em; height: 2.2em; border-radius: 9px; background: var(--rc); display: grid; place-items: center; }
.br-equip .energy { display: none; width: 12em; height: 0.75em; border-radius: 999px; background: rgba(0,0,0,.45); overflow: hidden; position: relative; }
.br-equip.gun .energy { display: block; }
.br-equip .energy i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #7fe3ff, #39bfd3); border-radius: 999px; transition: width 80ms; }
.br-equip.empty .energy i { background: linear-gradient(90deg, #ff8a6b, #e0472f); }
.hud.is-tired .dmg { opacity: 1 !important; background: radial-gradient(ellipse at center, rgba(240,140,40,0) 55%, rgba(240,140,40,.25) 100%) !important; animation: coldpulse 1.6s ease-in-out infinite; }
.carry-chip img.sym { width: 1.6em; height: 1.6em; border-radius: 5px; background: #fff; }
.prompt.locked { background: rgba(80,40,20,.85); }
.marker.drone .mk { box-shadow: 0 0 0 3px rgba(214,55,45,.35); animation: warnPulse 0.8s ease-in-out infinite; }
.tagged.downed .in kbd { background: #fff; color: var(--navy); border-radius: 6px; padding: 0.15em 0.5em; font: 800 0.95em var(--font); margin-right: 0.3em; }

/* ---- fitting table (Technician) ---- */
.fitting { position: absolute; inset: 0; z-index: 30; pointer-events: all; cursor: default; user-select: none; }
.fitting.hidden { display: none; }
.hud.fitting .crosshair, .hud.fitting .prompt, .hud.fitting .tasks, .hud.fitting .markers, .hud.fitting .esc-hint, .hud.fitting .carry-chip, .hud.fitting .minimap { display: none !important; }
.fit-top { position: absolute; top: 7.4em; left: 50%; transform: translateX(-50%); text-align: center; background: rgba(10,31,58,.86); border-radius: 14px; padding: 0.6em 1.4em; box-shadow: var(--shadow); max-width: 40em; border-bottom: 4px solid #e0b22a; }
.fit-title { font-size: 1.6em; color: #ffcf6b; }
.fit-hint { font-weight: 600; opacity: .92; margin-top: 0.15em; }
.fit-tray { position: absolute; left: 50%; bottom: 1.2em; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.4em; }
.fit-tray-label { font: 800 0.78em var(--font); letter-spacing: .12em; text-transform: uppercase; background: rgba(10,31,58,.8); border-radius: 999px; padding: 0.25em 0.9em; }
.fit-cards { display: flex; gap: 0.7em; }
.fit-card { width: 9.5em; height: 9.2em; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(10,31,58,.88) 62%); border: 3px solid var(--pc); box-shadow: 0 8px 0 rgba(0,0,0,.25), var(--shadow); cursor: grab; display: flex; flex-direction: column; justify-content: flex-end; transition: transform 140ms, box-shadow 140ms; }
.fit-card:hover { transform: translateY(-6px) scale(1.04); box-shadow: 0 12px 0 rgba(0,0,0,.2), 0 0 24px var(--pc); }
.fit-card:active { cursor: grabbing; transform: translateY(2px); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.fit-card.out { opacity: .35; transform: none; }
.fit-card .slot3d { flex: 1; }
.fit-card .nm { display: flex; align-items: center; gap: 0.4em; padding: 0.45em 0.55em; font-weight: 800; font-size: 0.86em; }
.fit-card .nm img { width: 1.6em; height: 1.6em; }
.fit-empty { background: rgba(10,31,58,.85); border-radius: 12px; padding: 1em 1.4em; font-weight: 700; }
.fit-close.btn { position: absolute; right: 1.4em; top: 1.2em; width: auto; min-width: 0; display: flex; align-items: center; gap: 0.5em; padding: 0.6em 1.1em; }
.fit-close kbd { background: #fff; color: var(--navy); border-radius: 6px; padding: 0.1em 0.45em; font: 800 0.8em var(--font); }
.fit-warn { position: absolute; left: 50%; top: 12.8em; transform: translateX(-50%); background: #c0503a; color: #fff; font-weight: 800; border-radius: 10px; padding: 0.45em 1.1em; opacity: 0; transition: opacity 160ms; }
.fit-warn.on { opacity: 1; animation: warnPulse 0.8s ease-in-out infinite; }
.fit-flash { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) scale(.9); font: 900 2.4em var(--display); color: var(--c, #fff); text-shadow: 0 3px 0 rgba(0,0,0,.35), 0 0 22px rgba(0,0,0,.4); opacity: 0; pointer-events: none; }
.fit-flash.on { animation: fitFlash 1.2s ease-out; }
@keyframes fitFlash { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }
.fit-resume { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(10,20,40,.35); cursor: pointer; }
.fit-resume.hidden { display: none; }
.fit-resume .card { background: rgba(10,31,58,.92); border-radius: 16px; padding: 1em 2em; font-size: 1.3em; box-shadow: var(--shadow); }
/* results: the ribbon belongs to the menus, not the debrief title; bridge tally on its own line */
.team-outcome.tally { flex-direction: column; align-items: flex-start; gap: 0.3em; }
.team-outcome.tally > span:last-child { font-weight: 600; line-height: 1.5; }
.radar { overflow: visible; }
.roles.long .rcard.sel .pic { height: 41%; }
.roles.long .rcard.sel .ab { padding: 0.45em 0.6em; }
/* "coming soon" mission card: greyed out, not selectable; a click shows the message */
.mcard.soon { cursor: not-allowed; }
.mcard.soon .art, .mcard.soon .body { filter: grayscale(1) brightness(.92); opacity: .6; }
.mcard.soon:hover { transform: none; flex-grow: 1 !important; }
.missions:has(.sel) .mcard.soon { filter: none; }
.mcard .soon-tag { position: absolute; right: 1em; top: 1em; z-index: 3; display: flex; align-items: center; gap: .45em; background: var(--navy); color: #fff; font: 800 0.95em var(--font); letter-spacing: .08em; text-transform: uppercase; padding: 0.5em 0.9em; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.mcard.soon .art { position: relative; }
.mcard .soon-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); z-index: 3; width: 80%; text-align: center; background: rgba(10,31,58,.94); color: #fff; font: 700 1em var(--font); line-height: 1.35; padding: 0.8em 1em; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity 200ms, transform 200ms; }
.mcard.soon .art:has(.soon-msg) { filter: none; opacity: 1; }
.mcard.soon .art { background-blend-mode: luminosity; background-color: #8a8a8a; }
.mcard.soon.nudge .soon-msg { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: soonMsg 2.4s ease forwards; }
.mcard.soon.nudge { animation: soonShake 380ms ease; }
@keyframes soonMsg { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes soonShake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ---- onboarding card (before each round, during the Colonel's orders) ---- */
.onboard { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(10,20,40,.35), rgba(10,20,40,.7)); pointer-events: all; opacity: 0; transition: opacity 260ms; }
.onboard.on { opacity: 1; }
.ob-card { width: min(46em, calc(100vw - 2em)); max-height: calc(100vh - 2em); overflow: auto; background: var(--paper); color: var(--ink); border-radius: 18px; padding: 1.3em 1.5em 1.1em; box-shadow: 0 18px 50px rgba(0,0,0,.45); display: flex; flex-direction: column; gap: 0.85em; transform: translateY(14px) scale(.98); transition: transform 320ms cubic-bezier(.2,1.3,.3,1); }
.onboard.on .ob-card { transform: none; }
.ob-head { display: flex; align-items: center; gap: 0.8em; }
.ob-head small { font: 800 0.75em var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--orange); }
.ob-head h2 { margin: 0; font-size: 2em; color: var(--olive); }
.ob-ico { width: 2.6em; height: 2.6em; border-radius: 12px; background: var(--olive); color: #fff; display: grid; place-items: center; font-size: 1.1em; flex: none; }
.ob-goal { display: flex; gap: 0.6em; align-items: center; background: var(--sand); border-radius: 12px; padding: 0.7em 0.9em; font-weight: 700; line-height: 1.35; }
.ob-goal svg { color: var(--orange); flex: none; font-size: 1.3em; }
.ob-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45em 0.9em; }
.ob-k { display: flex; align-items: center; gap: 0.5em; font-weight: 600; font-size: 0.92em; }
.ob-k kbd { min-width: 2.4em; text-align: center; background: var(--navy); color: #fff; border-radius: 7px; padding: 0.25em 0.5em; font: 800 0.82em var(--font); box-shadow: 0 2px 0 rgba(0,0,0,.35); white-space: nowrap; }
.ob-tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6em; }
.ob-tip { display: flex; gap: 0.55em; align-items: flex-start; background: #fff; border-radius: 12px; padding: 0.6em 0.7em; border-left: 4px solid var(--rc); font-size: 0.85em; line-height: 1.3; }
.ob-tip b { display: block; margin-bottom: 0.15em; }
.ob-tip .ti { width: 2em; height: 2em; border-radius: 8px; background: var(--rc); color: #fff; display: grid; place-items: center; flex: none; }
.ob-go.btn { align-self: center; width: auto; min-width: 12em; justify-content: center; font-size: 1.25em; }
.ob-hint { text-align: center; font-size: 0.8em; color: var(--ink-2); }
.esc-hint .sep { width: 1px; height: 1.1em; background: rgba(255,255,255,.3); margin: 0 0.15em; }
/* ammo meter + out-of-ammo warning */
.ammo .meter { height: 0.55em; border-radius: 999px; background: rgba(0,0,0,.4); overflow: hidden; margin-top: 0.25em; position: relative; }
.ammo .meter::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 2px), rgba(10,31,58,.95) calc(10% - 2px) 10%); }
.ammo .meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ffe07a, #f2c21b); transition: width 90ms; }
.ammo .meter.low i { background: linear-gradient(90deg, #ffffff, #ffd36b); animation: lowBar 0.7s ease-in-out infinite; }
.noammo { position: absolute; left: 50%; top: 66%; transform: translateX(-50%) scale(.9); display: flex; flex-direction: column; align-items: center; gap: 0.15em; background: rgba(10,31,58,.88); border: 2px solid #f2c21b; border-radius: 12px; padding: 0.45em 1.1em; opacity: 0; transition: opacity 180ms, transform 180ms; pointer-events: none; }
.noammo.on { opacity: 1; transform: translateX(-50%); animation: warnPulse 0.9s ease-in-out infinite; }
.noammo span { font: 900 1.2em var(--display); color: #ffd36b; letter-spacing: .04em; text-transform: uppercase; }
.noammo small { font-weight: 700; font-size: 0.85em; }
.noammo.low { border-color: rgba(255,255,255,.5); animation: none; }
.noammo.low span { color: #fff; font-size: 1em; }

/* ---------------------------------------------------------------- touch controls (phones / tablets, landscape) */
.touch { position: absolute; inset: 0; z-index: 20; pointer-events: auto; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.t-zone { position: absolute; top: 0; bottom: 0; }
.t-zone.left { left: 0; width: 45%; } .t-zone.right { right: 0; width: 55%; }
.t-stick { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; background: rgba(10,31,58,.28); border: 2px solid rgba(255,255,255,.35); opacity: 0; transition: opacity 120ms; pointer-events: none; }
.t-stick.on { opacity: 1; }
.t-stick.sprint { border-color: #ffd36b; }
.t-stick .knob { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.85); box-shadow: 0 3px 10px rgba(0,0,0,.35); transform: translate(-50%, -50%); }
.t-btn { position: absolute; border: 0; padding: 0; border-radius: 50%; background: rgba(10,31,58,.55); color: #fff; border: 2px solid rgba(255,255,255,.35); display: grid; place-items: center; font: 800 12px var(--font); box-shadow: 0 4px 12px rgba(0,0,0,.25); touch-action: none; }
.t-btn .i { font-size: 22px; line-height: 1; display: grid; place-items: center; }
.t-btn .i svg { width: 24px; height: 24px; }
.t-btn small { position: absolute; bottom: -17px; left: 50%; transform: translateX(-50%); font: 700 10px var(--font); white-space: nowrap; text-shadow: 0 1px 3px rgba(0,0,0,.6); opacity: .9; }
.t-btn.down { transform: scale(.92); background: rgba(240,138,28,.75); }
.t-fire { right: calc(26px + env(safe-area-inset-right)); bottom: 38px; width: 92px; height: 92px; background: rgba(240,138,28,.6); }
.t-fire .i svg { width: 34px; height: 34px; }
.t-jump { right: calc(132px + env(safe-area-inset-right)); bottom: 26px; width: 60px; height: 60px; }
.t-use { right: calc(130px + env(safe-area-inset-right)); bottom: 112px; width: 58px; height: 58px; }
.t-use.hot { background: rgba(63,174,99,.75); border-color: #fff; animation: readyPulse 1.2s ease-in-out infinite; --rc: #3fae63; }
.t-skill { right: calc(40px + env(safe-area-inset-right)); bottom: 154px; width: 64px; height: 64px; color: #ffd36b; }
.t-skill .ring { position: absolute; inset: -2px; width: calc(100% + 4px); height: calc(100% + 4px); transform: rotate(-90deg); }
.t-skill .i { color: #fff; }
.t-skill .cd { position: absolute; font: 900 18px var(--display); color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.t-skill:not(.ready) .i { opacity: .35; }
.t-skill.ready { border-color: #ffd36b; }
.t-drop { right: calc(208px + env(safe-area-inset-right)); bottom: 36px; width: 50px; height: 50px; }
.t-cam { right: calc(14px + env(safe-area-inset-right)); top: calc(8.6em + 6px); width: 42px; height: 42px; }
.t-pause { left: calc(14px + env(safe-area-inset-left)); top: 12px; width: 42px; height: 42px; }
.t-pause .i { font: 900 15px var(--font); letter-spacing: -1px; }

/* the HUD on touch: keyboard hints and the ability widget give way to the buttons; things move out of the thumbs' way */
.touchui .esc-hint, .touchui .hud-br .ability, .touchui .hud-br .slots { display: none !important; }
.touchui .hud-br { right: auto; left: calc(1em + env(safe-area-inset-left)); bottom: 0.8em; transform: scale(.85); transform-origin: left bottom; }
.touchui .hud-br .ammo { padding: 0.3em 0.7em; }
.touchui .hud-br .ammo .num { font-size: 0.8em; }
.touchui .hud-bl { left: calc(4.4em + env(safe-area-inset-left)); bottom: auto; top: 0.8em; transform: scale(.8); transform-origin: left top; }
.touchui .hud-bl .me-port { display: none; }
.touchui .minimap { width: 7.5em; height: 7.5em; right: calc(0.8em + env(safe-area-inset-right)); top: 0.8em; }
.touchui .feed { top: 64px; left: calc(46px + env(safe-area-inset-left)); right: auto; align-items: flex-start; font-size: 0.8em; }
.touchui .feed div:nth-child(n+3) { display: none; }
.touchui .hud-top { top: 0.5em; transform: translateX(-50%) scale(.85); transform-origin: top center; }
.touchui .tasks { display: none; }
.touchui .colonel { top: auto; bottom: 0.6em; left: 50%; transform: translateX(-50%) scale(.8); transform-origin: center bottom; }
.touchui .carry-chip { right: auto; left: 50%; transform: translateX(-50%); bottom: auto; top: 7.6em; }
.touchui .prompt { top: 58%; }
.touchui .noammo { top: 40%; }
.touchui .marker { font-size: 0.85em; }

/* small landscape screens (phones): everything a notch smaller and tighter */
@media (max-height: 500px) {
  :root { --u: 10px; }
  .menu-col .btn { padding: 0.7em 1em; }
  .mcard .art { min-height: 6em; height: 32%; }
  .mcard h2 { font-size: 1.6em; }
  .mcard p { font-size: 0.92em; line-height: 1.3; }
  .mcard .roles-strip { display: none; }
  .rcard .pic { min-height: 6em; }
  .rcard .blurb { display: none; }
  .ob-card { padding: 0.9em 1.1em 0.8em; gap: 0.55em; }
  .ob-head h2 { font-size: 1.5em; }
  .ob-tips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ob-tip { font-size: 0.78em; }
  .ob-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3em 0.7em; }
  .ob-hint { display: none; }
  .title-lockup { transform: scale(.82); transform-origin: left center; }
}
.touchui .colonel.on { transform: translateX(-50%) scale(.8); }

/* ---------------------------------------------------------------- online: join / create + lobby */
.online-wrap { flex: 1; display: flex; align-items: flex-start; justify-content: center; min-height: 0; overflow: auto; }
.online-card { width: min(52em, 100%); padding: 1.4em 1.6em; display: flex; flex-direction: column; gap: 1.1em; }
.fld { display: flex; flex-direction: column; gap: 0.35em; font-weight: 700; font-size: 0.9em; color: var(--ink-2); }
.fld input { font: 700 1.2em var(--font); padding: 0.6em 0.8em; border-radius: 10px; border: 2px solid var(--sand-2); background: #fff; color: var(--ink); outline: none; text-transform: none; user-select: text; -webkit-user-select: text; }
.fld input:focus { border-color: var(--orange); }
.fld input.cd { text-transform: uppercase; letter-spacing: .25em; font-family: var(--display); font-size: 1.6em; }
.online-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2em; }
.oc { background: var(--sand); border-radius: 12px; padding: 1em 1.1em; display: flex; flex-direction: column; gap: 0.7em; }
.oc h3 { margin: 0; color: var(--olive); font-size: 1.5em; }
.oc p { margin: 0; color: var(--ink-2); line-height: 1.35; }
.oc .btn { width: auto; align-self: flex-start; margin-top: auto; }
.online-msg { min-height: 1.3em; font-weight: 700; color: #a0441a; }
.online-note { color: var(--ink-2); font-size: 0.85em; line-height: 1.4; }
.pause .online-note { color: rgba(255,255,255,.75); max-width: 24em; }
.btn.small { width: auto; padding: 0.55em 0.9em; font-size: 0.9em; }
.lobby { flex: 1; display: flex; flex-direction: column; gap: 0.9em; min-height: 0; }
.lobby-head { display: flex; align-items: center; gap: 1.2em; padding: 0.9em 1.3em; flex-wrap: wrap; }
.lobby-head small { font-weight: 700; color: var(--ink-2); }
.lcode { font-size: 2.6em; color: var(--olive); letter-spacing: .12em; }
.lobby-head .btn.ghost { background: var(--sand); color: var(--ink); }
.lobby-head .btn.ghost svg { color: var(--olive); }
.lobby .spacer { flex: 1; }
.lset { display: flex; align-items: center; gap: 0.6em; font-weight: 700; color: var(--ink-2); }
.lteams { display: grid; grid-template-columns: 1fr 1fr; gap: 1em; flex: 1; min-height: 0; }
.lteam { background: rgba(10,31,58,.72); border-radius: var(--r); padding: 0.9em 1em; display: flex; flex-direction: column; gap: 0.45em; border-top: 5px solid #1fbf5f; overflow: auto; }
.lteam.t1 { border-top-color: #8a6a44; }
.lteam h3 { margin: 0 0 0.2em; font: 800 1.1em var(--font); letter-spacing: .04em; text-transform: uppercase; }
.lteam.t0 h3 { color: #6fe39a; } .lteam.t1 h3 { color: #f2c21b; }
.lp { display: flex; align-items: center; gap: 0.6em; background: rgba(255,255,255,.1); border-radius: 10px; padding: 0.45em 0.6em; }
.lp .ri { width: 1.9em; height: 1.9em; border-radius: 7px; background: var(--rc, #6b7280); display: grid; place-items: center; flex: none; }
.lp b { font-weight: 700; } .lp small { opacity: .75; }
.lp .tag { margin-left: auto; font: 800 0.7em var(--font); text-transform: uppercase; letter-spacing: .08em; background: rgba(255,255,255,.18); padding: 0.25em 0.5em; border-radius: 6px; font-style: normal; }
.lp .tag.you { margin-left: 0.3em; background: var(--orange); }
.lp.me { outline: 2px solid var(--orange); }
.lp.bot { opacity: .5; }
.lteam .btn { align-self: flex-start; margin-top: 0.3em; }
.lfoot { display: flex; align-items: center; gap: 0.8em; padding: 0.8em 1.1em; flex-wrap: wrap; }
.lfoot > span { font-weight: 700; color: var(--ink-2); }
.lfoot .btn { width: auto; }
.roles-seg button { display: flex; align-items: center; gap: 0.35em; }
.roles-seg button svg { color: var(--rc); }
.roles-seg button.on { outline: 2px solid var(--rc); }
.lwait { font-weight: 700; color: var(--ink-2); }
.lnote { font-size: 0.85em; opacity: .75; }
@media (max-height: 500px) { .lcode { font-size: 1.8em; } .roles-seg button span { display: none; } .online-cols { gap: 0.7em; } }

/* the Colonel speaks over the how-to-play card */
.colonel { z-index: 45; }
body.ob-open .colonel .face { box-shadow: 0 0 0 4px rgba(242,194,27,.0), var(--shadow); }
body.ob-open .colonel.on .face { animation: colTalk 900ms ease-in-out infinite alternate; }
@keyframes colTalk { from { box-shadow: 0 0 0 0 rgba(242,194,27,.55), var(--shadow); } to { box-shadow: 0 0 0 6px rgba(242,194,27,0), var(--shadow); } }
.touchui.ob-open .colonel { top: 0.5em; bottom: auto; left: 0.6em; transform: scale(.72); transform-origin: left top; }
.touchui.ob-open .colonel.on { transform: scale(.72); }
