@import url('fonts.css');

/* ==========================================================================
   13 DAYS IN OCTOBER // GLOBAL STYLESHEET & THEME GUIDE
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COLOR PALETTE & THEME TOKENS
   -------------------------------------------------------------------------- */
:root {
  --primary-font: 'Special Elite', 'Courier Prime', 'Courier New', Courier, monospace;
  --bg: #0a0a0a;        /* Main dark background for screen and columns */
  --card: #141414;      /* Card & panel surface background */
  --hdr-gray: #32363d;  /* Slate/steel gray for informational section headers */
  --bw: #e5e5e5;        /* Crisp white/cream for structural borders & dividers */
  --tw: #f5f5f5;        /* Primary white body text */
  --red: #ff2a2a;       /* Critical/Warning/DEFCON accent red */
  --blue: #0088ff;      /* Tactical/Allied accent blue */
}

/* --------------------------------------------------------------------------
   2. PIXEL TYPOGRAPHY CONTROLS (CUSTOM FONT SIZING IN PIXELS)
   Modify these pixel values directly to adjust text size and prevent overrun
   or unwanted vertical scrolling across the entire simulation.
   -------------------------------------------------------------------------- */
:root {
  /* --- Regular / Body Text Defaults --- */
  --font-size-body: 12.5px;            /* Base interface text and paragraph default */
  --font-size-small: 11px;             /* Secondary small labels, captions, and badges */

  /* --- Center Column: Executive Briefing & Directives --- */
  --font-size-brief-body: 12.5px;      /* Daily executive briefing text (.brief-body) */
  --font-size-brief-head: 19px;        /* Daily executive briefing day title (.brief-head) */
  --font-size-directive-title: 13.5px; /* Executive directive card title (.dtitle) */
  --font-size-directive-desc: 12px;    /* Executive directive description text (.ddesc) */
  --font-size-directive-letter: 19px;  /* Directive option letter [A, B, C, D] (.dletter) */
  --font-size-transmit-btn: 13.5px;    /* TRANSMIT ORDER button text (.btn-tx) */

  /* --- Left Column: Situation Telemetry & Military Posture --- */
  --font-size-telemetry-label: 10px;   /* DEFCON, Anxiety, Approval labels (.slabel) */
  --font-size-telemetry-val: 10.5px;   /* Numerical telemetry readings (.sval) */
  --font-size-posture-label: 9.5px;    /* Military posture system title (.posture-label) */
  --font-size-posture-val: 10px;       /* Military posture operational status (.posture-val) */
  --font-size-telemetry-delta: 11.5px; /* Day-over-day change badges (.tdelta) */
  --font-size-bar-scale: 9px;          /* Threshold captions under telemetry bars (.bar-scale) */
  --font-size-directive-tag: 9.5px;    /* Directive category tag (.dcat) */
  --font-size-recon-tag: 9.5px;        /* Reconnaissance photo caption tag (.photo-tag) */

  /* --- Right Column: ExComm Advisors & Intelligence --- */
  --font-size-advisor-name: 11px;      /* Advisor name (.aname) */
  --font-size-advisor-title: 9.5px;    /* Advisor official title (.atitle) */
  --font-size-cohesion-status: 10.5px; /* Council cohesion / confidence badge (.cohesion-status) */

  /* --- Modals, Consultations & Tactical Field Manual --- */
  --font-size-modal-body: 12.5px;      /* General modal body text & explanations */
  --font-size-manual-card: 12px;       /* Tactical Field Manual card narrative */
  --font-size-consult-arg: 12.5px;     /* Consult Advisors debate argument text */
}

/* Direct element mappings for pixel font sizing */
.brief-body, .brief-body p { font-size: var(--font-size-brief-body); }
.brief-head                { font-size: var(--font-size-brief-head); }
.dtitle                    { font-size: var(--font-size-directive-title); }
.ddesc                     { font-size: var(--font-size-directive-desc); }
.dletter                   { font-size: var(--font-size-directive-letter); }
.btn-tx                    { font-size: var(--font-size-transmit-btn); }
.slabel                    { font-size: var(--font-size-telemetry-label); }
.sval                      { font-size: var(--font-size-telemetry-val); }
.posture-label             { font-size: var(--font-size-posture-label); }
.posture-val               { font-size: var(--font-size-posture-val); }
.photo-tag                 { font-size: var(--font-size-recon-tag); }
.aname                     { font-size: var(--font-size-advisor-name); }
.atitle                    { font-size: var(--font-size-advisor-title); }
.cohesion-status           { font-size: var(--font-size-cohesion-status); }

/* --------------------------------------------------------------------------
   3. CORE BASE & APPLICATION FRAME (DYNAMIC TYPOGRAPHY)
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--primary-font);
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body.font-special-elite, body.font-special-elite * { font-family: 'Special Elite', cursive, monospace !important; }
body.font-courier-prime, body.font-courier-prime *, body.dev-font-courier, body.dev-font-courier * { font-family: 'Courier Prime', 'Courier New', Courier, monospace !important; }
body.font-source-code, body.font-source-code * { font-family: 'Source Code Pro', 'Courier New', monospace !important; }
body.font-space-mono, body.font-space-mono * { font-family: 'Space Mono', monospace !important; }
body.font-vt323, body.font-vt323 * { font-family: 'VT323', monospace !important; }
body.font-share-tech, body.font-share-tech * { font-family: 'Share Tech Mono', monospace !important; }
body.font-cutive-mono, body.font-cutive-mono * { font-family: 'Cutive Mono', monospace !important; }
body.font-anonymous-pro, body.font-anonymous-pro * { font-family: 'Anonymous Pro', monospace !important; }

/* --------------------------------------------------------------------------
   TYPOGRAPHY SCALE CALIBRATIONS (BUG-001 through BUG-005)
   -------------------------------------------------------------------------- */
body.font-space-mono {
  font-size: 89%;
}
body.font-space-mono .brief-body,
body.font-space-mono .ddesc,
body.font-space-mono .slabel,
body.font-space-mono .tstack {
  font-size: 0.88em;
  line-height: 1.35;
}

body.font-source-code {
  font-size: 82%;
}
body.font-source-code .brief-head {
  font-size: 17px;
  margin-bottom: 6px;
  padding-bottom: 4px;
}
body.font-source-code .brief-body {
  font-size: 0.82em;
  line-height: 1.32;
}
body.font-source-code .dtitle {
  font-size: 12.5px;
}
body.font-source-code .ddesc {
  font-size: 0.82em;
  line-height: 1.28;
}
body.font-source-code .dopt {
  padding: 5px 9px;
}
body.font-source-code .slabel {
  font-size: 0.85em;
}
body.font-source-code .tstack {
  padding: 6px 9px;
  gap: 6px;
}
body.font-source-code .posture-wrap {
  padding: 5px 8px;
  gap: 2px;
}
body.font-source-code .posture-label {
  font-size: 9px;
}
body.font-source-code .posture-val {
  font-size: 9.5px;
  line-height: 1.2;
}

body.font-share-tech {
  font-size: 92%;
}
body.font-share-tech .brief-body,
body.font-share-tech .ddesc {
  font-size: 0.9em;
}

body.font-cutive-mono {
  font-size: 90%;
}
body.font-cutive-mono .brief-body,
body.font-cutive-mono .ddesc,
body.font-cutive-mono .slabel {
  font-size: 0.88em;
  line-height: 1.3;
}

/* VT323 (CRT Terminal) Scale-up for authentic retro legibility (BUG-003, BUG-012) */
body.font-vt323 {
  font-size: 115%;
  letter-spacing: 0.3px;
}
body.font-vt323 .stitle,
body.font-vt323 .hblock,
body.font-vt323 .hdate,
body.font-vt323 .hdefcon,
body.font-vt323 .dtitle,
body.font-vt323 .dheader,
body.font-vt323 .main-menu-title,
body.font-vt323 .opt-btn,
body.font-vt323 .btn-tx,
body.font-vt323 .fbtn {
  font-size: 0.95em;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
body.font-vt323 .brief-body,
body.font-vt323 .brief-intro,
body.font-vt323 .brief-summary,
body.font-vt323 .brief-desc,
body.font-vt323 .opt-desc,
body.font-vt323 .slabel,
body.font-vt323 .sval,
body.font-vt323 .posture-val,
body.font-vt323 .ticker-track,
body.font-vt323 .dopt,
body.font-vt323 .dopt-body,
body.font-vt323 .dopt-conseq,
body.font-vt323 .consult-quote,
body.font-vt323 .guide-card-body,
body.font-vt323 .medals-desc,
body.font-vt323 .medals-flavor,
body.font-vt323 .photo-tag {
  font-size: 1.15em;
  line-height: 1.35;
}

.dev-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f141c;
  color: #fff;
  border: 2px solid var(--blue);
  box-shadow: 4px 4px 0 #000;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease-in-out;
  font-family: 'Special Elite', 'Courier New', monospace;
}

.dev-toast.show {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   UNIVERSAL CLASSIFIED COMPENDIUM SCROLLBAR SYSTEM (QOL-022)
   -------------------------------------------------------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--blue) #151d28;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
  background: #0d121a;
}

::-webkit-scrollbar-track {
  background: #151d28;
  border-left: 1px solid #202b3a;
}

::-webkit-scrollbar-thumb {
  background: var(--blue);
  border: 1px solid #00c3ff;
  border-radius: 0 !important;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.25), 1px 1px 0 #000;
  min-height: 28px;
}

::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
  border-color: #ffffff;
}

::-webkit-scrollbar-thumb:active {
  background: var(--red);
  border-color: #ffffff;
}

::-webkit-scrollbar-button {
  display: block;
  height: 14px;
  width: 10px;
  background-color: #101722;
  border: 1px solid #202b3a;
  border-radius: 0 !important;
  background-repeat: no-repeat;
  background-position: center;
}

::-webkit-scrollbar-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'%3E%3Cpolygon points='4,0 8,6 0,6' fill='%2300a8ff'/%3E%3C/svg%3E");
  border-bottom: 1px solid #202b3a;
}

::-webkit-scrollbar-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6' viewBox='0 0 8 6'%3E%3Cpolygon points='0,0 8,0 4,6' fill='%2300a8ff'/%3E%3C/svg%3E");
  border-top: 1px solid #202b3a;
}

::-webkit-scrollbar-button:hover {
  background-color: #162232;
  border-color: var(--blue);
}

::-webkit-scrollbar-corner {
  background: #0d121a;
}

img {
  image-rendering: auto;
  -webkit-user-drag: none;
  user-drag: none;
}

body {
  background: #000;
  color: var(--tw);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px;
  cursor: default;
}

/* Main Outer Window Frame */
.app-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: var(--bg);
  border: 4px solid var(--bw);
  box-shadow: 8px 8px 0 var(--blue);
  overflow: hidden;
  position: relative;
}

/* --------------------------------------------------------------------------
   3. TOP HEADER & NEWS TICKER
   -------------------------------------------------------------------------- */
header {
  border-bottom: 4px solid var(--bw);
  background: var(--card);
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  flex-shrink: 0;
}

.hblock {
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 900;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Date / Turn Counter */
.hdate {
  color: var(--blue);
  border-right: 4px solid var(--bw);
}

/* DEFCON Alert Status Box */
.hdefcon {
  border-left: 4px solid var(--bw);
  justify-content: center;
  background: #1a3a1a;
  color: #44ff44;
  transition: background .5s, color .5s;
}

/* Scrolling News/Intelligence Ticker Tape */
.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
  display: flex;
  align-items: center;
  background: var(--bg);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: tick 55s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.tcontent {
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.tout {
  color: var(--blue);
  font-weight: 900;
}

.tquote {
  color: #fff;
}

.tsep {
  color: #444;
  margin: 0 14px;
  font-weight: 900;
}

@keyframes tick {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   4. MAIN GRID LAYOUT (3 COLUMNS)
   -------------------------------------------------------------------------- */
.main-grid {
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  flex: 1;
  border-bottom: 4px solid var(--bw);
  overflow: hidden;
  min-height: 0;
}

/* Informational Section Titles (BUG-006: strict shared height for sub-pixel border alignment) */
.stitle {
  background: #474747;
  color: #ffffff;
  padding: 0 12px;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-bottom: 4px solid var(--bw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.badge {
  padding: 2px 6px;
  font-size: 11.5px;
}

/* Vanilla Masking Tape with Handwritten Black Sharpie (QOL-008) */
.badge-b {
  background: linear-gradient(135deg, #f5eedb 0%, #ebe2c7 100%);
  color: #1a1614 !important;
  font-family: 'Permanent Marker', 'Special Elite', cursive, monospace !important;
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 1px;
  border-top: 1px solid rgba(255,255,255,0.7);
  border-left: 1px dashed rgba(180, 160, 120, 0.6);
  border-right: 1px dashed rgba(180, 160, 120, 0.6);
  border-bottom: 1px solid rgba(0,0,0,0.25);
  box-shadow: 1px 2px 3px rgba(0,0,0,0.5), inset 0 0 4px rgba(210, 190, 150, 0.4);
  transform: rotate(-1.5deg);
  display: inline-flex;
  align-items: center;
  text-shadow: 0 0 0.5px rgba(0,0,0,0.3);
  position: relative;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   5. LEFT COLUMN: DOSSIER, METRICS & OPERATIONAL POSTURE
   -------------------------------------------------------------------------- */
.col-left {
  border-right: 4px solid var(--bw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Reconnaissance Photo Viewport */
.recon-wrap {
  padding: 0;
  border-bottom: 4px solid var(--bw);
}

.photo-frame {
  width: 100%;
  height: 135px;
  background: #000;
  position: relative;
  overflow: hidden;
  border: none;
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

.photo-frame.shutter img {
  animation: recon-shutter .9s cubic-bezier(.1,.9,.2,1) forwards;
}

@keyframes recon-shutter {
  0% { filter: brightness(4.5) contrast(2.5) blur(6px); transform: scale(1.08); }
  20% { filter: brightness(0.15) contrast(2) blur(3px); transform: scale(1.04); }
  55% { filter: brightness(1.6) contrast(1.3) blur(1.5px); transform: scale(1.01); }
  100% { filter: brightness(1) contrast(1) blur(0); transform: scale(1); }
}

.photo-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.32;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0px, rgba(0, 0, 0, 0.3) 1px, transparent 1px, transparent 3px),
    radial-gradient(circle at center, transparent 65%, rgba(0, 0, 0, 0.4) 100%);
  background-size: 100% 3px, 100% 100%;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.5);
  animation: scanlines-move 10s linear infinite, tv-flicker .12s infinite;
}

@keyframes scanlines-move {
  0% { background-position: 0 0, center; }
  100% { background-position: 0 90px, center; }
}

@keyframes tv-flicker {
  0% { opacity: 0.30; }
  50% { opacity: 0.36; }
  100% { opacity: 0.32; }
}

.photo-frame::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 35px;
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
  animation: crt-roll 3.2s linear infinite;
}

@keyframes crt-roll {
  0% { transform: translateY(-35px); }
  100% { transform: translateY(135px); }
}

.photo-tag {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  width: 100%;
  background: #1c1c1c;
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  padding: 3px 5px;
  border: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .4px;
  box-sizing: border-box;
  white-space: normal;
  line-height: 1.25;
  min-height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .3s, color .3s;
  z-index: 4;
}

.photo-tag.flash {
  background: var(--blue);
  color: #fff;
  letter-spacing: 1px;
  animation: tag-blink .2s infinite alternate;
}

@keyframes tag-blink {
  0% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* Telemetry Meters */
.tstack {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 4px solid var(--bw);
  background: var(--card);
}

.srow {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.slabel {
  font-size: var(--font-size-telemetry-label, 10px);
  font-weight: 900;
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
  letter-spacing: -0.2px;
  gap: 4px;
  min-width: 0;
}

.slabel > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.slabel-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* Day-over-day change badge: stays up until the next order is transmitted.
   Arrows (not +/-) so direction reads at a glance in every pixel font. */
.tdelta {
  font-size: var(--font-size-telemetry-delta, 11.5px);
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 2px;
  line-height: 1.1;
  box-shadow: 1px 1px 0 #000;
  white-space: nowrap;
}

.tdelta.show {
  animation: delta-pop .4s ease-out;
}

@keyframes delta-pop {
  0% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.tdelta.dpos-bad  { color: #ff5555; background: #2b0000; border: 1.5px solid var(--red); }
.tdelta.dneg-good { color: #44ffff; background: #001a33; border: 1.5px solid var(--blue); }
.tdelta.dpos-good { color: #44ffff; background: #001a33; border: 1.5px solid var(--blue); }
.tdelta.dneg-bad  { color: #ff5555; background: #2b0000; border: 1.5px solid var(--red); }
.tdelta.dzero     { color: #888;    background: #181818; border: 1.5px solid #333; }

.bar-outer {
  width: 100%;
  height: 14px;
  border: 2px solid var(--bw);
  box-shadow: 2px 2px 0 #333;
  background: #000;
  padding: 1px;
  position: relative;
}

/* Goal tick (e.g. missiles <= 30% by Day 13) */
.bar-mark {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 3px;
  margin-left: -1.5px;
  pointer-events: auto;
  cursor: help;
}

.bar-mark.mark-goal {
  background: #88ff44;
  box-shadow: 0 0 0 1px #000, 0 0 6px rgba(136, 255, 68, 0.8);
}

/* Danger zone (anxiety panic band) */
.bar-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  cursor: help;
  border-left: 2px dashed #ff5555;
  background: repeating-linear-gradient(-45deg, rgba(255, 60, 60, 0.28) 0 3px, transparent 3px 6px);
}

.bar-outer.zone-live .bar-zone {
  border-left-color: #fff;
  background: repeating-linear-gradient(-45deg, rgba(255, 60, 60, 0.6) 0 3px, rgba(255, 255, 255, 0.15) 3px 6px);
  animation: tag-blink .6s infinite alternate;
}

/* Caption row under a bar: what the thresholds mean */
.bar-scale {
  position: relative;
  height: 12px;
  font-size: var(--font-size-bar-scale, 9px);
  font-weight: 900;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #8a8a8a;
  white-space: nowrap;
  line-height: 12px;
}

.bscale-goal {
  position: absolute;
  top: 0;
  transform: translateX(-6px);
  color: #88ff44;
}

.bscale-end {
  position: absolute;
  top: 0;
  right: 0;
  color: #bbb;
}

.bscale-note {
  position: absolute;
  top: 0;
  right: 0;
}

.bscale-note.live {
  color: #ff6666;
}

.bar-fill {
  height: 100%;
  transition: width .6s ease-in-out;
}

.fill-anx { background: var(--red); background-image: repeating-linear-gradient(45deg, var(--red), var(--red) 3px, #770000 3px, #770000 6px); }
.fill-mis { background: #fff; background-image: repeating-linear-gradient(45deg, #fff, #fff 3px, #888 3px, #888 6px); }
.fill-app { background: var(--blue); background-image: repeating-linear-gradient(45deg, var(--blue), var(--blue) 3px, #004488 3px, #004488 6px); }
.fill-lev { background: #9fd0ff; background-image: repeating-linear-gradient(45deg, #9fd0ff, #9fd0ff 3px, #3b6d99 3px, #3b6d99 6px); }
.fill-lev.lev-low  { background-image: repeating-linear-gradient(45deg, #ff8888, #ff8888 3px, #7a2a2a 3px, #7a2a2a 6px); }
.fill-lev.lev-high { background-image: repeating-linear-gradient(45deg, #88ff44, #88ff44 3px, #2f6a12 3px, #2f6a12 6px); }

/* Operational Posture Telemetry Feed */
/* Compact list: icon + current status; the system name lives in the row tooltip */
.posture-wrap {
  padding: 5px 10px;
  background: var(--card);
  border-bottom: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  min-height: 0;
}

.posture-wrap.collapsed {
  display: none;
}

.posture-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 6px;
  align-items: center;
  cursor: help;
}

.posture-row .posture-label {
  display: none;
}

/* Collapsible section header (button styled as .stitle) */
.stitle-toggle {
  width: 100%;
  border-left: none;
  border-right: none;
  border-top: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.stitle-toggle:hover {
  background: #555;
}

.stitle-caret {
  font-size: 12px;
  transition: transform .15s;
}

.stitle-toggle[aria-expanded="false"] .stitle-caret {
  transform: rotate(-90deg);
}

.posture-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  margin-top: 1px;
}

.posture-icon {
  width: 15px;
  height: 15px;
  fill: currentColor;
  display: block;
}

.posture-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.posture-divider {
  display: none;
}

.posture-label {
  font-size: 9.5px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.posture-val {
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
  line-height: 1.25;
}

/* --------------------------------------------------------------------------
   6. CENTER COLUMN: EXECUTIVE BRIEFING & DIRECTIVES
   -------------------------------------------------------------------------- */
.col-center {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.col-center-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Executive Briefing Dossier Card */
.brief-card {
  padding: 12px 18px;
  background: var(--card);
  flex: 0 0 auto;
  border-bottom: 4px solid var(--bw);
  position: relative;
  display: flex;
  flex-direction: column;
}

.brief-card.new-turn {
  animation: teletype-sweep .8s ease-out;
}

.brief-card.new-turn::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.08) 50%, transparent 100%);
  animation: crt-sweep .75s ease-out forwards;
}

@keyframes crt-sweep {
  0% { transform: translateY(-100%); opacity: 1; }
  100% { transform: translateY(100%); opacity: 0; }
}

@keyframes teletype-sweep {
  0% { opacity: 0.15; filter: blur(3px); }
  100% { opacity: 1; filter: blur(0); }
}

/* After-Action Report (AAR) Alert Box */
.aar-block {
  background: rgba(220, 30, 30, 0.09);
  border-left: 3.5px solid var(--red);
  border-top: 1px solid rgba(220, 30, 30, 0.3);
  border-right: 1px solid rgba(220, 30, 30, 0.3);
  border-bottom: 1px solid rgba(220, 30, 30, 0.3);
  padding: 7px 10px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: aar-glow 1s ease-out;
}

@keyframes aar-glow {
  0% { background: rgba(220,30,30,0.25); border-left-color: #fff; }
  100% { background: rgba(220,30,30,0.09); border-left-color: var(--red); }
}

.aar-badge {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: var(--red);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.aar-title {
  font-size: 12.5px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.aar-text {
  font-size: 11.5px;
  line-height: 1.35;
  color: #d8d8d8;
  font-weight: 500;
}

.brief-head {
  font-size: var(--font-size-brief-head, 19px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  color: #ffffff;
  border-bottom: 2px solid #3a3a3a;
  padding-bottom: 5px;
  flex-shrink: 0;
}

.brief-body {
  font-size: var(--font-size-brief-body, 12.5px);
  line-height: 1.45;
  font-weight: 500;
  color: #d6d6d6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brief-body p {
  margin: 0;
}

/* Collapsed briefing: lead paragraph + toggle, so the directives get the room */
.brief-more[hidden] {
  display: none;
}

.brief-more {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brief-toggle {
  align-self: flex-start;
  background: none;
  border: 1px solid #3a3a3a;
  color: #9fd0ff;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  cursor: pointer;
}

.brief-toggle:hover {
  border-color: var(--blue);
  color: #fff;
}

/* Directive category tag (tells you which advisors will back it) */
.dtitle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  min-width: 0;
}

.dtitle-row .dtitle {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

.dcat {
  flex-shrink: 0;
  font-size: var(--font-size-directive-tag, 9.5px);
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid currentColor;
  line-height: 1;
}

.dcat.cat-military   { color: #ff6666; background: #2a0000; }
.dcat.cat-blockade   { color: #6fb7ff; background: #001a33; }
.dcat.cat-diplomatic { color: #88ff44; background: #0c1f00; }
.dcat.cat-covert     { color: #ffcc44; background: #261d00; }
.dcat.cat-stall,
.dcat.cat-custom     { color: #cccccc; background: #1a1a1a; }

/* Consult: where the room stands on each directive */
.stance-box {
  border: 2px solid #2a2a2a;
  background: #0e0e0e;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stance-head {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: #9fd0ff;
  text-transform: uppercase;
}

.stance-row {
  display: grid;
  grid-template-columns: 22px auto 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 11.5px;
  line-height: 1.35;
}

.stance-letter {
  font-weight: 900;
  color: #fff;
  font-size: 13px;
}

.stance-row .dcat {
  align-self: center;
}

.stance-for     { color: #88ff44; font-weight: 800; }
.stance-against { color: #ff6666; font-weight: 800; }
.stance-none    { color: #777; }

.stance-note {
  font-size: 10px;
  color: #777;
  letter-spacing: .3px;
}

/* Presidential Directives List & Option Buttons */
.dir-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.dir-header {
  background: #0e0e0e;
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-bottom: 2px solid #2a2a2a;
  color: var(--red);
  flex-shrink: 0;
  animation: dir-header-pulse 2s infinite ease-in-out;
}

@keyframes dir-header-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.dir-list {
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
}

.dopt {
  border: 2px solid #2a2a2a;
  padding: 6px 11px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: center;
  background: var(--card);
  transition: border-color .1s, box-shadow .1s, background .1s;
  flex: 1;
  min-height: 0;
}

.dopt:hover {
  border-color: var(--blue);
  box-shadow: 3px 3px 0 var(--blue);
}

.dopt.sel {
  border-color: var(--red);
  box-shadow: 3px 3px 0 var(--red);
  background: #1a0000;
}

.dletter {
  font-size: 20px;
  font-weight: 900;
  color: #666;
  text-align: center;
  line-height: 1;
}

.dopt:hover .dletter { color: var(--blue); }
.dopt.sel .dletter   { color: var(--red); }

.dtitle {
  font-size: var(--font-size-directive-title, 13.5px);
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 2px;
  letter-spacing: .5px;
}

.ddesc {
  font-size: var(--font-size-directive-desc, 12px);
  line-height: 1.35;
  font-weight: 500;
  color: #aaa;
}

/* Transmit Order Button */
.btn-tx {
  width: 100%;
  height: 100%;
  min-height: 42px;
  background: #480808;
  color: #ff7777;
  border: 2px solid rgba(255, 50, 50, 0.55);
  box-shadow: inset 0 0 10px rgba(220, 0, 0, 0.3);
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 900;
  cursor: not-allowed;
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-tx:not(.go):hover {
  background: #5c0c0c;
  color: #ffa0a0;
  border-color: rgba(255, 80, 80, 0.8);
}

.btn-tx.go {
  background: var(--red);
  color: #fff;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 14px rgba(220, 30, 30, 0.7);
  /* Quick pulse once a directive is armed so the player knows exactly where to click */
  position: relative;
  z-index: 2;
  animation: btn-tx-pulse 0.75s cubic-bezier(.3, 1.6, .5, 1) infinite;
}

/* Bouncy heartbeat: swell + flash to hot red/white, then settle back */
@keyframes btn-tx-pulse {
  0%, 100% {
    transform: scale(1);
    background: var(--red);
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 8px rgba(220, 30, 30, 0.6);
  }
  40% {
    transform: scale(1.045);
    background: #ff4a4a;
    color: #fff;
    border-color: #ffe0e0;
    box-shadow: 0 0 16px 3px rgba(255, 70, 70, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.3);
  }
  60% {
    transform: scale(0.99);
  }
}

.btn-tx.go:hover {
  animation: none;
  background: #fff;
  color: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.75);
}

/* --------------------------------------------------------------------------
   7. RIGHT COLUMN: EXCOMM ADVISORS & CONFIDENCE COHESION
   -------------------------------------------------------------------------- */
.col-right {
  border-left: 4px solid var(--bw);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.advisor-feed {
  padding: 2px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-height: 0;
  justify-content: space-between;
  overflow: hidden;
}

.ablock {
  border: none;
  border-bottom: 1px solid #1c1c1c;
  padding: 2px 4px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 6px;
  background: transparent;
  flex: 1;
  min-height: 0;
  align-items: center;
  transition: background .12s;
}

.ablock:last-child {
  border-bottom: none;
}

.ablock:hover {
  background: rgba(255, 255, 255, 0.03);
}

.avatar {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--bw);
  background: #000;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  image-rendering: auto;
}

.confidence-wrap {
  border-top: 4px solid var(--bw);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  background: var(--bg);
}

.c-cohesion-stack {
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--bg);
}

.cohesion-status {
  font-size: 10.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 6px;
  text-align: center;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #888;
}

.cohesion-status.alert-warn {
  border-color: var(--blue);
  color: #44ffff;
  background: #001a33;
}

.cohesion-status.alert-danger {
  border-color: var(--red);
  color: #ff6666;
  background: #2a0000;
  animation: tag-blink .6s infinite alternate;
}

.leverage-status {
  margin-top: 4px;
  font-size: var(--font-size-cohesion-status);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 6px;
  text-align: center;
  border: 1px solid #2a2a2a;
  background: #111;
  color: #9fd0ff;
  cursor: help;
}

.leverage-status.lev-low {
  color: #ff8888;
  border-color: #552222;
}

.leverage-status.lev-high {
  color: #88ff44;
  border-color: #2f4f1f;
}

.ainfo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  gap: 1.5px;
}

.aname {
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1.5px solid #333;
  padding-bottom: 2px;
  margin-bottom: 1px;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.adelta {
  font-size: 10px;
  font-weight: 900;
  padding: 1px 3px;
  border-radius: 2px;
  line-height: 1;
  letter-spacing: 0;
  flex-shrink: 0;
}

.adelta.dpos  { color: #44ffff; background: rgba(0, 100, 255, 0.25); border: 1px solid var(--blue); }
.adelta.dneg  { color: #ff6666; background: rgba(200, 0, 0, 0.25);   border: 1px solid var(--red); }
.adelta.dzero { color: #777;    background: #181818;                 border: 1px solid #333; }

.atitle {
  color: #888;
  font-size: 9.5px;
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aboxes {
  display: flex;
  gap: 3px;
  align-items: center;
  margin-top: 2px;
}

.cbox-svg {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8. FOOTER CONTROL BAR
   -------------------------------------------------------------------------- */
footer {
  background: var(--card);
  display: grid;
  grid-template-columns: 240px 1fr 240px;
  flex-shrink: 0;
}

.fblock {
  display: flex;
  align-items: center;
  min-height: 42px;
  overflow: hidden;
}

.fblock-l {
  border-right: 4px solid var(--bw);
  padding: 0;
  justify-content: center;
}

.fblock-c {
  justify-content: center;
  padding: 0;
  background: var(--bg);
  /* Let the transmit button's pulse glow spill over the briefing; .app-frame still clips the page edges */
  overflow: visible;
  position: relative;
  z-index: 3;
}

.fblock-r {
  border-left: 4px solid var(--bw);
  padding: 0;
}

.fbtn {
  width: 100%;
  height: 100%;
  background: var(--card);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .12s;
  padding: 10px 8px;
}

.fbtn-l,
.fbtn-r {
  background: var(--red);
  color: #fff;
  animation: fbtn-action-pulse 2.4s infinite ease-in-out;
}

@keyframes fbtn-action-pulse {
  0% {
    background-color: #c91616;
    box-shadow: inset 0 0 0 rgba(255, 255, 255, 0);
  }
  50% {
    background-color: #ff3a3a;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.22);
  }
  100% {
    background-color: #c91616;
    box-shadow: inset 0 0 0 rgba(255, 255, 255, 0);
  }
}

.fbtn-l:hover,
.fbtn-r:hover {
  animation: none;
  background: #ffffff;
  color: var(--red);
}

.hfeed {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: .5px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   9. FLASH INTELLIGENCE INCIDENT OVERLAY
   -------------------------------------------------------------------------- */
.incident-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 220;
  background: rgba(0, 0, 0, .88);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.incident-overlay.on {
  display: flex;
  animation: ifade .2s ease;
}

.incident-modal {
  background: var(--bg);
  border: 3px solid var(--red);
  box-shadow: 6px 6px 0 #4a0000;
  display: flex;
  flex-direction: column;
  width: 440px;
  max-width: 88vw;
  overflow: hidden;
}

.inc-modal-head {
  background: var(--red);
  color: #fff;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.inc-flash-text {
  animation: alert-flash .7s infinite ease-in-out alternate;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@keyframes alert-flash {
  0%   { opacity: 1; color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.9); }
  50%  { opacity: 0.2; color: #ffb0b0; text-shadow: none; }
  100% { opacity: 1; color: #fff; text-shadow: 0 0 8px rgba(255,255,255,0.9); }
}

.inc-modal-content {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
}

.inc-modal-fx {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inc-modal-fx:empty {
  display: none;
}

.inc-fx-chip {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid #552222;
  background: #1a0000;
  color: #ff7777;
}

.inc-fx-chip.good {
  border-color: #2f4f1f;
  background: #081400;
  color: #88ff44;
}

.inc-modal-title {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #330000;
  padding-bottom: 5px;
}

.inc-modal-body {
  font-size: 13px;
  line-height: 1.45;
  color: #ffd0d0;
  font-weight: 600;
}

.inc-modal-footer {
  padding: 8px 14px;
  background: #121212;
  border-top: 2px solid var(--red);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.inc-modal-note {
  font-size: 10.5px;
  font-weight: 800;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.btn-inc-ack {
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 #000;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all .1s;
  flex-shrink: 0;
}

.btn-inc-ack:hover {
  background: #fff;
  color: var(--red);
  border-color: var(--red);
}

/* --------------------------------------------------------------------------
   10. CONSULT EXCOMM ADVISORS OVERLAY
   -------------------------------------------------------------------------- */
.consult-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99995;
  background: rgba(2, 4, 8, 0.60);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.consult-overlay.on {
  display: flex;
  animation: cfade .2s ease;
}

@keyframes cfade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.consult-panel {
  background: rgba(11, 14, 20, 0.90);
  border: 4px solid var(--bw);
  box-shadow: 8px 8px 0 #000, 0 12px 36px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  width: 85%;
  max-width: 920px;
  max-height: 92vh;
  overflow: hidden;
}

.consult-panel-head {
  background: var(--hdr-gray);
  border-bottom: 4px solid var(--bw);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.consult-session-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
}

.consult-title {
  font-size: 15.5px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-top: 2px;
}

.consult-close {
  background: transparent;
  border: 2px solid var(--bw);
  color: #fff;
  font-size: 12.5px;
  font-weight: 900;
  padding: 5px 12px;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all .1s;
}

.consult-close:hover {
  background: #fff;
  color: #000;
}

.consult-body {
  overflow-y: auto;
  flex: 1;
  padding: 2px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.consult-entry {
  padding: 7px 16px;
  border-bottom: 2px solid #1c1c1c;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: start;
  transition: background .15s;
}

.consult-entry:last-child {
  border-bottom: none;
}

.consult-entry:hover {
  background: #121212;
}

.consult-avatar {
  width: 42px;
  height: 42px;
  border: 2px solid var(--bw);
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  image-rendering: auto;
  margin-top: 1px;
}

.consult-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.consult-namerow {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.consult-name {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.consult-stars {
  font-size: 13.5px;
  letter-spacing: 1px;
}

.cshi { color: var(--blue); }
.cslo { color: var(--red); }

.consult-action {
  font-size: 11.5px;
  font-weight: 400;
  color: #888;
  font-style: italic;
  letter-spacing: .3px;
}

.consult-quote {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  color: #d0d0d0;
}

.consult-footer {
  background: var(--card);
  border-top: 4px solid var(--bw);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.consult-note {
  font-size: 11.5px;
  font-weight: 800;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   10B. TACTICAL FIELD GUIDE / FIRST TURN ONBOARDING OVERLAY
   -------------------------------------------------------------------------- */
.guide-modal {
  background: rgba(11, 14, 20, 0.92);
  border: 4px solid var(--bw);
  box-shadow: 10px 10px 0 #000, 0 12px 36px rgba(0, 0, 0, 0.8);
  width: 680px;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ifade .25s ease;
}

.guide-head {
  background: var(--hdr-gray);
  border-bottom: 4px solid var(--bw);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.guide-label {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
}

.guide-badge {
  background: var(--red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 7px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.guide-content {
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--card);
  overflow-y: auto;
  flex: 1;
}

.guide-title {
  font-size: 22px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
}

.guide-subtitle {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: var(--blue);
  text-transform: uppercase;
  margin-top: -8px;
  padding-bottom: 6px;
  border-bottom: 2px solid #2a2a2a;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.guide-card {
  background: #0d0d0d;
  border: 2px solid #252525;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.guide-card-head {
  font-size: 12.5px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #252525;
  padding-bottom: 4px;
}

.guide-num {
  color: var(--red);
  font-weight: 900;
}

.guide-card-body {
  font-size: 12px;
  line-height: 1.45;
  color: #c0c0c0;
  font-weight: 500;
}

.guide-objective-box {
  background: rgba(0, 85, 255, 0.08);
  border-left: 3.5px solid var(--blue);
  border-top: 1px solid rgba(0, 85, 255, 0.3);
  border-right: 1px solid rgba(0, 85, 255, 0.3);
  border-bottom: 1px solid rgba(0, 85, 255, 0.3);
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.4;
  color: #e0e0e0;
}

.guide-footer {
  background: var(--bg);
  border-top: 4px solid var(--bw);
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}

.guide-note {
  font-size: 10.5px;
  font-weight: 800;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-guide-start {
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 #000;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all .12s;
  white-space: nowrap;
}

.btn-guide-start:hover {
  background: #fff;
  color: var(--red);
  box-shadow: 3px 3px 0 var(--blue);
}

.btn-guide-start.btn-guide-close {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 2px 2px 0 #000;
}

.btn-guide-start.btn-guide-close:hover {
  background: #fff;
  color: var(--blue);
  border-color: #fff;
  box-shadow: 2px 2px 0 #000;
}

/* --------------------------------------------------------------------------
   10C. CINEMATIC DAY BLACKOUT / TYPEWRITER TRANSITION OVERLAY
   -------------------------------------------------------------------------- */
.day-transition-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 450;
  background: #000000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  opacity: 0;
  transition: opacity 0.85s ease-out;
}

.day-transition-overlay.active {
  display: flex;
  opacity: 1;
}

.day-transition-overlay.fading {
  opacity: 0;
  pointer-events: none;
}

.day-transition-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
}

.day-trans-title {
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 8px;
  color: #ffffff;
  text-transform: uppercase;
  min-height: 58px;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.day-trans-date {
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 5px;
  color: var(--blue);
  text-transform: uppercase;
  min-height: 38px;
  text-shadow: 0 0 10px rgba(0, 136, 255, 0.5);
}

.day-trans-prompt {
  position: absolute;
  bottom: 28px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #444;
  text-transform: uppercase;
  animation: prompt-blink 1.5s infinite ease-in-out;
}

@keyframes prompt-blink {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.8; }
}

/* --------------------------------------------------------------------------
   11. START / CLEARANCE SCREEN OVERLAY
   -------------------------------------------------------------------------- */
.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 99991;
  background: rgba(2, 4, 8, 0.50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.start-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.start-modal {
  background: rgba(11, 14, 20, 0.90);
  border: 4px solid var(--bw);
  box-shadow: 10px 10px 0 #000, 0 12px 36px rgba(0, 0, 0, 0.8);
  width: 540px;
  max-width: 92vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: ifade .25s ease;
}

@keyframes ifade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.start-head {
  background: var(--hdr-gray);
  border-bottom: 4px solid var(--bw);
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.start-label {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--blue);
  text-transform: uppercase;
}

.start-badge {
  background: var(--red);
  color: #fff;
  font-size: 10.5px;
  font-weight: 900;
  padding: 2px 7px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.start-content {
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
}

.start-subtitle {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 2.5px;
  color: var(--blue);
  text-transform: uppercase;
  margin-top: -4px;
  padding-bottom: 6px;
  border-bottom: 2px solid #2a2a2a;
}

.start-logo {
  width: 100%;
  max-width: 440px;
  height: auto;
  margin: 4px auto 10px;
  display: block;
  border-bottom: 2px solid #2a2a2a;
  padding-bottom: 12px;
}

.start-title {
  font-size: 23px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #fff;
  border-bottom: 2px solid #2a2a2a;
  padding-bottom: 8px;
}

.start-desc {
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: #ccc;
}

.start-desc strong {
  color: #fff;
}

/* --------------------------------------------------------------------------
   CRISIS DIFFICULTY SELECTOR
   -------------------------------------------------------------------------- */
.mode-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
  background: #0d0d0d;
  border: 2px solid #282828;
  padding: 8px 10px;
}

.mode-select-label {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #888;
  text-transform: uppercase;
}

.mode-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-btn {
  background: #141414;
  border: 2px solid #333;
  color: #aaa;
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all .12s;
  text-transform: uppercase;
}

.mode-btn:hover {
  border-color: var(--blue);
  color: #fff;
  background: #181f2a;
}

.mode-btn.active {
  border-color: var(--red);
  color: #fff;
  background: #240505;
  box-shadow: 2px 2px 0 var(--red);
}

.mode-btn-title {
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .5px;
}

.mode-btn-tag {
  font-size: 9.5px;
  color: #666;
  font-weight: 800;
  letter-spacing: .6px;
}

.mode-btn.active .mode-btn-tag {
  color: #ff7777;
}

.mode-desc-text {
  font-size: 11px;
  line-height: 1.35;
  color: #aaa;
  border-top: 1px solid #1f1f1f;
  padding-top: 5px;
  min-height: 34px;
}

.mode-desc-text strong {
  color: #fff;
}

/* --------------------------------------------------------------------------
   SHARPIE / DECLASSIFIED REDACTION BAR EFFECT
   -------------------------------------------------------------------------- */
.redaction-bar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border: 1px solid #222222;
  padding: 1px 5px;
  user-select: none;
  box-shadow: inset 0 0 4px #000000, 1px 1px 0 rgba(255,255,255,0.04);
  vertical-align: middle;
  border-radius: 1px;
}

.redaction-fill {
  font-size: 10.5px;
  line-height: 1;
  color: #1c1c1c;
  background: #000000;
  letter-spacing: -0.5px;
  text-shadow: 0 0 2px #000;
  font-weight: 900;
}

.start-footer {
  background: #101010;
  border-top: 3px solid var(--bw);
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.btn-start-game {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 4px 4px 0 #000;
  font-size: 12.5px;
  font-weight: 900;
  padding: 10px 18px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  transition: all .12s;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-start-game:hover {
  background: #fff;
  color: var(--red);
  border-color: var(--red);
}

.start-note {
  font-size: 11px;
  font-weight: 800;
  color: #666;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   12. VICTORY / GAME OVER END-SCREEN OVERLAY
   -------------------------------------------------------------------------- */
.end-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 30px;
  text-align: center;
  overflow-y: auto;
  gap: 12px;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: background 0.4s ease;
}

.end-overlay.on {
  display: flex;
}

.end-verdict {
  font-size: 38px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.1;
  margin-top: 2px;
  text-shadow: 0 0 16px rgba(0, 0, 0, 0.95), 2px 2px 4px #000;
}

.end-sub {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ccc;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 1px 1px 2px #000;
}

.end-dateline {
  font-size: 11.5px;
  color: #aaa;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 1px 1px 2px #000;
}

/* Context / Cause of End Box */
.end-context-box {
  width: 100%;
  max-width: 740px;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(4px);
  border: 2px solid #333;
  box-shadow: 4px 4px 0 #000;
  padding: 12px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.end-context-tag {
  font-size: 11px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.end-context-title {
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #222;
  padding-bottom: 4px;
  margin-bottom: 2px;
}

.end-context-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: #ccc;
  font-weight: 500;
}

.end-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 740px;
}

.emetric {
  border: 2px solid #282828;
  background: #0a0a0a;
  padding: 10px 8px;
  box-shadow: 2px 2px 0 #000;
}

.eml {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #666;
  margin-bottom: 4px;
}

.emv {
  font-size: 26px;
  font-weight: 900;
}

/* Cabinet Confidence & Dissent Report */
.end-confidence-report {
  width: 100%;
  max-width: 740px;
  background: #0c0c0c;
  border: 2px solid #2a2a2a;
  box-shadow: 4px 4px 0 #000;
  padding: 12px 16px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.end-conf-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #222;
  padding-bottom: 6px;
}

.end-conf-label {
  font-size: 11.5px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.end-conf-count {
  font-size: 11px;
  color: #888;
  font-weight: 800;
}

.end-conf-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.end-conf-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: center;
  background: #121212;
  border: 1px solid #222;
  padding: 6px 10px;
}

.end-conf-avatar {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--bw);
  object-fit: cover;
  display: block;
  background: #000;
}

.end-conf-item-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.end-conf-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.end-conf-name {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.end-conf-status-badge {
  font-size: 9.5px;
  font-weight: 900;
  padding: 2px 6px;
  background: rgba(255, 42, 42, 0.2);
  color: var(--red);
  border: 1px solid var(--red);
  letter-spacing: .5px;
  text-transform: uppercase;
}

.end-conf-status-badge.loyal {
  background: rgba(0, 136, 255, 0.2);
  color: var(--blue);
  border-color: var(--blue);
}

.end-conf-reason {
  font-size: 12px;
  line-height: 1.35;
  color: #bbb;
  font-weight: 500;
}

.end-unanimous-box {
  padding: 10px 14px;
  background: #0d1a10;
  border: 1px solid #1e4024;
  color: #55ff99;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 1px;
}

.end-loyal-summary {
  font-size: 11.5px;
  color: #777;
  border-top: 1px solid #1c1c1c;
  padding-top: 6px;
  margin-top: 2px;
}

.end-loyal-summary strong {
  color: var(--blue);
}

.btn-restart {
  background: transparent;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 6px 6px 0 #333;
  padding: 11px 34px;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.btn-restart:hover {
  background: #fff;
  color: #000;
}

/* --------------------------------------------------------------------------
   GAME OPTIONS UNIFORM ACTION BUTTONS & BADGES (QOL-018: 180px uniform sizing)
   -------------------------------------------------------------------------- */
.opt-btn {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  height: 34px;
  box-sizing: border-box;
  text-align: center;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--blue);
  border: 2px solid var(--blue);
  color: #fff;
  cursor: pointer;
  transition: all .12s;
  box-shadow: 2px 2px 0 #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.opt-btn:hover {
  background: #fff;
  color: var(--blue);
  border-color: #fff;
}

.opt-btn.opt-btn-blue,
.opt-btn.opt-btn-red,
.opt-btn.opt-btn-gold {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.opt-btn.opt-btn-blue:hover,
.opt-btn.opt-btn-red:hover,
.opt-btn.opt-btn-gold:hover {
  background: #fff;
  color: var(--blue);
  border-color: #fff;
}

.opt-mode-badge {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  height: 34px;
  box-sizing: border-box;
  text-align: center;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: .8px;
  text-transform: uppercase;
  border: 2px solid #333842;
  color: #88909c;
  background: #121418;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: not-allowed;
  user-select: none;
}

.opt-mode-badge.hardcore {
  border-color: #333842;
  color: #88909c;
  background: #121418;
}

#options-overlay .consult-close {
  background: var(--blue);
  border: 2px solid var(--blue);
  color: #fff;
  box-shadow: 2px 2px 0 #000;
}

#options-overlay .consult-close:hover {
  background: #fff;
  color: var(--blue);
  border-color: #fff;
}

.opt-font-select {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  height: 34px;
  box-sizing: border-box;
  text-align: center;
  text-align-last: center;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: var(--blue);
  border: 2px solid var(--blue);
  color: #fff;
  cursor: pointer;
  transition: all .12s;
  box-shadow: 2px 2px 0 #000;
  outline: none;
  border-radius: 0;
}

.opt-font-select:hover {
  background: #fff;
  color: var(--blue);
  border-color: #fff;
}

.opt-font-select option {
  background: #11151e;
  color: #fff;
}  font-size: 11.5px;
  padding: 8px 10px;
  text-align: left;
}

/* --------------------------------------------------------------------------
   SERVICE RECORDS & MEDALS DOSSIER MODAL
   -------------------------------------------------------------------------- */
.btn-start-medals {
  width: 100%;
  background: #11141a;
  border: 2px solid #555;
  color: #ccc;
  font-size: 12.5px;
  font-weight: 900;
  padding: 10px 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s ease;
  margin-top: 8px;
  box-shadow: 2px 2px 0 #000;
}

.btn-start-medals:hover {
  background: #181d26;
  border-color: #ffd700;
  color: #ffd700;
  box-shadow: 3px 3px 0 #000;
}

#medals-overlay {
  z-index: 99995;
}

.medals-panel {
  background: rgba(13, 15, 18, 0.90);
  border: 3px solid #ffd700;
  box-shadow: 8px 8px 0 #000, 0 12px 36px rgba(0, 0, 0, 0.8);
  width: 92%;
  max-width: 860px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.medals-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 20px 12px 20px;
  border-bottom: 2px solid #242930;
  background: #13171d;
}

.medals-session-label {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffd700;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.medals-title {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #fff;
  text-transform: uppercase;
}

.medals-stat-badge {
  font-size: 11.5px;
  font-weight: 900;
  color: #ffd700;
  background: #2b2305;
  border: 1px solid #ffd700;
  padding: 4px 10px;
  letter-spacing: 0.8px;
}

.medals-progress-wrap {
  width: 100%;
  height: 5px;
  background: #111;
}

.medals-progress-bar {
  height: 100%;
  background: #ffd700;
  transition: width .3s ease;
}

.medals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 18px 20px;
  overflow-y: auto;
  max-height: 60vh;
}

.medal-card {
  background: #12151a;
  border: 2px solid #22262d;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all .15s ease;
  position: relative;
}

.medal-card.unlocked {
  border-color: #ffd700;
  background: #171a16;
  box-shadow: 2px 2px 0 #000;
}

.medal-card.locked {
  opacity: 0.65;
  border-color: #24282f;
  background: #0f1114;
}

.medal-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.medal-icon {
  min-width: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.medal-svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
  display: block;
}

.medal-card.locked .medal-svg {
  fill: #778191;
  opacity: 0.65;
}

.medal-card.unlocked .medal-svg {
  fill: #ffffff;
}

.medal-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.medal-name {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #fff;
  text-transform: uppercase;
}

.medal-card.unlocked .medal-name {
  color: #ffd700;
}

.medal-status-tag {
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.medal-status-tag.unlocked {
  color: #44dd77;
}

.medal-status-tag.locked {
  color: #888;
}

.medal-desc {
  font-size: 11px;
  line-height: 1.35;
  color: #ccc;
}

.medal-card.locked .medal-desc {
  color: #777;
}

.medal-flavor {
  font-size: 10px;
  line-height: 1.3;
  color: #8892a0;
  font-style: italic;
  border-top: 1px solid #1a1e24;
  padding-top: 4px;
  margin-top: 2px;
}

.medals-footer {
  padding: 12px 20px;
  background: #101317;
  border-top: 2px solid #22262d;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.medals-note {
  font-size: 10px;
  color: #667;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.medals-close {
  background: #1a1d24;
  color: #fff;
  border: 2px solid var(--bw);
  padding: 7px 16px;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.medals-close:hover {
  background: #fff;
  color: #000;
}

/* --------------------------------------------------------------------------
   MEDAL TOAST NOTIFICATION
   -------------------------------------------------------------------------- */
.medal-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999999;
  pointer-events: none;
}

.medal-toast {
  background: #0f131a;
  border: 2px solid #ffd700;
  box-shadow: 4px 4px 0 #000, 0 0 20px rgba(255, 215, 0, 0.25);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 380px;
  animation: toastSlideIn .3s ease forwards;
  pointer-events: auto;
}

.medal-toast.fade-out {
  opacity: 0;
  transform: translateX(40px);
  transition: all .35s ease;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

.medal-toast-icon {
  min-width: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.medal-toast-icon .medal-svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

.medal-toast-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.medal-toast-tag {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffd700;
  text-transform: uppercase;
}

.medal-toast-title {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
  color: #fff;
  text-transform: uppercase;
}

.medal-toast-desc {
  font-size: 10.5px;
  color: #bbb;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   END GAME MEDALS REPORT & ACTIONS
   -------------------------------------------------------------------------- */
.end-medals-box {
  width: 100%;
  max-width: 620px;
  margin: 10px 0;
  background: rgba(15, 18, 24, 0.95);
  border: 2px solid #ffd700;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.end-medals-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  padding-bottom: 6px;
}

.end-medals-title {
  font-size: 11.5px;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.end-medals-summary {
  font-size: 10.5px;
  font-weight: 900;
  color: #ccc;
  letter-spacing: 0.5px;
}

.end-new-medals-label {
  font-size: 10px;
  font-weight: 800;
  color: #44dd77;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.end-new-medals-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.end-new-medal-card {
  background: #141a14;
  border: 1px solid #44dd77;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.end-new-medal-icon {
  min-width: 22px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.end-new-medal-icon .medal-svg {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.end-new-medal-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.end-new-medal-name {
  font-size: 11.5px;
  font-weight: 900;
  color: #ffd700;
  text-transform: uppercase;
}

.end-new-medal-desc {
  font-size: 10px;
  color: #ccc;
}

.end-no-new-medals {
  font-size: 10.5px;
  color: #777;
  font-style: italic;
  padding: 2px 0;
}

.end-actions-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.end-btn {
  background: var(--blue);
  color: #ffffff;
  border: 2px solid var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 10px 16px;
  min-width: 210px;
  height: 40px;
  text-align: center;
  cursor: pointer;
  box-shadow: 3px 3px 0 #000;
  transition: all .15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.end-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  transform: translateY(-1px);
}

.end-btn.end-btn-records {
  background: #14171d;
  color: #ffd700;
  border-color: #ffd700;
}

.end-btn.end-btn-records:hover {
  background: #ffd700;
  color: #000000;
}

.end-btn.end-btn-restart {
  background: #1a0a0a;
  color: #ff6666;
  border-color: var(--red);
}

.end-btn.end-btn-restart:hover {
  background: var(--red);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   TITLE GATEWAY / MAIN MENU OVERLAY (QOL-001)
   -------------------------------------------------------------------------- */
.main-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.35s ease, visibility 0.35s;
  overflow: hidden;
  pointer-events: none;
}

.main-menu-bg-wrap {
  position: fixed;
  inset: 0;
  background-color: #020408;
  overflow: hidden;
  /* Catch clicks on the backdrop so they can't reach the hidden game board underneath */
  pointer-events: auto;
  cursor: default;
  z-index: 99980;
  opacity: 1;
  transition: opacity 0.5s ease, visibility 0.5s;
}

.main-menu-bg-wrap.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.main-menu-bg-layer {
  position: absolute;
  inset: -4%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 2.0s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.main-menu-bg-layer.active {
  opacity: 1;
}

/* Ken Burns Subtle Documentary Movements */
@keyframes kbZoomIn {
  0% {
    transform: scale(1.01);
  }
  100% {
    transform: scale(1.07);
  }
}

@keyframes kbZoomOut {
  0% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1.01);
  }
}

@keyframes kbPanLeft {
  0% {
    transform: scale(1.05) translate(1.4%, 0);
  }
  100% {
    transform: scale(1.05) translate(-1.4%, 0);
  }
}

@keyframes kbPanRight {
  0% {
    transform: scale(1.05) translate(-1.4%, 0);
  }
  100% {
    transform: scale(1.05) translate(1.4%, 0);
  }
}

.main-menu-bg-layer.kb-zoom-in {
  animation: kbZoomIn 9.0s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.main-menu-bg-layer.kb-zoom-out {
  animation: kbZoomOut 9.0s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.main-menu-bg-layer.kb-pan-left {
  animation: kbPanLeft 9.0s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.main-menu-bg-layer.kb-pan-right {
  animation: kbPanRight 9.0s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.main-menu-bg-vignette {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at center, rgba(4, 8, 14, 0.20) 0%, rgba(2, 3, 5, 0.65) 100%),
    linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.2) 50%);
  background-size: 100% 100%, 100% 4px;
  pointer-events: none;
  z-index: 1;
}

.main-menu-bg-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(2, 35, 74, 0.12);
  pointer-events: none;
  z-index: 2;
}

.main-menu-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.main-menu-card {
  pointer-events: auto;
  width: 90%;
  max-width: 390px;
  background: rgba(10, 14, 20, 0.70);
  border: 4px solid var(--bw);
  box-shadow: 10px 10px 0 #000, 0 12px 36px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.main-menu-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, var(--blue) 50%, var(--red) 100%);
}

.main-menu-header {
  padding: 18px 20px 14px;
  background: rgba(13, 18, 26, 0.60);
  border-bottom: 2px solid rgba(31, 39, 53, 0.75);
  text-align: center;
}

.main-menu-sub {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #889bb0;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.main-menu-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 2px 2px 0 #000;
}

.main-menu-logo {
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 4px auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.7));
}

.main-menu-tagline {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3.5px;
  color: var(--blue);
  text-transform: uppercase;
  margin-top: 4px;
}

.main-menu-options {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.main-menu-btn {
  background: rgba(17, 23, 34, 0.75);
  color: #e2e8f0;
  border: 1.5px solid rgba(48, 62, 85, 0.85);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.7);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
  text-align: left;
}

.main-menu-btn .btn-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
}

.main-menu-btn .btn-icon svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
}

.main-menu-btn:hover {
  background: rgba(28, 38, 54, 0.92);
  border-color: #cbd5e1;
  color: #ffffff;
  box-shadow: 2px 2px 0 #000;
}

.main-menu-btn.btn-new-game {
  background: rgba(22, 32, 48, 0.80);
  border-color: rgba(60, 85, 120, 0.85);
  color: #ffffff;
}

.main-menu-btn.btn-new-game:hover {
  background: rgba(35, 52, 78, 0.95);
  border-color: #ffffff;
  color: #ffffff;
}

.main-menu-btn.btn-load-game:disabled {
  opacity: 0.40;
  cursor: not-allowed;
  border-color: #1a222e;
  background: rgba(14, 18, 25, 0.60);
  box-shadow: none;
}


.main-menu-footer {
  padding: 10px 16px;
  background: rgba(9, 12, 16, 0.65);
  border-top: 2px solid rgba(25, 32, 44, 0.75);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  align-items: center;
  font-size: 9.5px;
  color: #8fa0b5;
  letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   INTELLIGENCE DOSSIER & CODEX (QOL-017)
   -------------------------------------------------------------------------- */
.dossier-overlay {
  position: fixed;
  inset: 0;
  z-index: 99995;
  background: rgba(2, 4, 8, 0.60);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity .25s ease, visibility .25s;
}

.dossier-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dossier-modal {
  width: 94%;
  max-width: 960px;
  height: 86vh;
  max-height: 86vh;
  background: rgba(11, 14, 20, 0.90);
  border: 4px solid var(--bw);
  box-shadow: 12px 12px 0 #000, 0 12px 36px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.dossier-head {
  padding: 12px 20px;
  background: #141a24;
  border-bottom: 3px solid var(--bw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.dossier-nav-tabs {
  display: flex;
  background: #080b10;
  border-bottom: 2px solid #1f2733;
  flex-shrink: 0;
}

.dossier-tab-btn {
  flex: 1;
  padding: 11px 16px;
  background: transparent;
  color: #7b8ea3;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}

.dossier-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.03);
}

.dossier-tab-btn.active {
  color: #ffffff;
  background: #101621;
  border-bottom-color: var(--blue);
}

.dossier-body {
  padding: 16px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
  box-sizing: border-box;
}

/* Scrollbars */
.dossier-body::-webkit-scrollbar,
.dossier-card-bio::-webkit-scrollbar,
.dossier-lex-desc::-webkit-scrollbar {
  width: 8px;
}

.dossier-body::-webkit-scrollbar-track,
.dossier-card-bio::-webkit-scrollbar-track,
.dossier-lex-desc::-webkit-scrollbar-track {
  background: #151d28;
  border-left: 1px solid #202b3a;
}

.dossier-body::-webkit-scrollbar-thumb,
.dossier-card-bio::-webkit-scrollbar-thumb,
.dossier-lex-desc::-webkit-scrollbar-thumb {
  background: var(--blue);
  border: 1px solid #00c3ff;
  border-radius: 0;
}

.dossier-body::-webkit-scrollbar-thumb:hover,
.dossier-card-bio::-webkit-scrollbar-thumb:hover,
.dossier-lex-desc::-webkit-scrollbar-thumb:hover {
  background: #38bdf8;
  border-color: #ffffff;
}

/* People / Figures Cards - Fixed Size */
.dossier-card {
  background: #0f141d;
  border: 2px solid #202b3a;
  box-shadow: 3px 3px 0 #000;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
  transition: border-color .15s ease, background-color .15s ease;
}

.dossier-card:hover {
  border-color: #33445c;
  background: #121924;
}

.dossier-person-card {
  height: 245px;
  min-height: 245px;
  max-height: 245px;
}

.dossier-card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  height: 94px;
  min-height: 94px;
  max-height: 94px;
  flex-shrink: 0;
  overflow: hidden;
}

/* Portrait Avatar - Strict Fixed Size & Object-Fit */
.dossier-avatar {
  width: 74px;
  min-width: 74px;
  max-width: 74px;
  height: 94px;
  min-height: 94px;
  max-height: 94px;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid #303e54;
  background: #05070a;
  box-shadow: 2px 2px 0 #000;
  flex-shrink: 0;
  display: block;
}

.dossier-card:hover .dossier-avatar {
  border-color: var(--blue);
}

.dossier-card-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  overflow: hidden;
}

.dossier-side-badge {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.9px;
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 2px;
  white-space: nowrap;
}

.dossier-side-us {
  color: #4fa7ff;
  background: rgba(0, 168, 255, 0.12);
  border: 1px solid rgba(0, 168, 255, 0.35);
}

.dossier-side-soviet {
  color: #ff5252;
  background: rgba(235, 47, 47, 0.12);
  border: 1px solid rgba(235, 47, 47, 0.35);
}

.dossier-card-name {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.dossier-card-role {
  font-size: 10px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dossier-card-bio {
  font-size: 11px;
  line-height: 1.45;
  color: #a3b4c7;
  margin-top: 8px;
  margin-bottom: 6px;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.dossier-card-quote {
  font-size: 10.5px;
  font-style: italic;
  color: #74889c;
  line-height: 1.35;
  border-left: 2px solid #28374a;
  padding-left: 8px;
  margin-top: auto;
  flex-shrink: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lexicon Cards - Fixed Size */
.dossier-lex-card {
  height: 155px;
  min-height: 155px;
  max-height: 155px;
  border-left: 4px solid var(--blue);
}

.dossier-lex-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.dossier-lex-code {
  font-size: 13px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 1px;
}

.dossier-lex-cat {
  font-size: 9px;
  font-weight: 800;
  color: #7b94b0;
  background: #141c29;
  border: 1px solid #253347;
  padding: 2px 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dossier-lex-title {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dossier-lex-desc {
  font-size: 11px;
  line-height: 1.42;
  color: #a3b4c7;
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.dossier-footer {
  padding: 12px 20px;
  background: #0d1117;
  border-top: 2px solid #1f2733;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

@media (max-width: 840px) {
  .dossier-body {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   14. STUDIO LOGO & CRISIS SIMULATION BOOT SPLASH SCREEN
   -------------------------------------------------------------------------- */
.game-boot-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: #070707;
  background-image: radial-gradient(circle at center, #121620 0%, #08090d 60%, #030405 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s;
}

.game-boot-splash.splash-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.game-boot-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
  width: 92%;
  text-align: center;
}

.splash-logo-container {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
}

.splash-game-logo,
.splash-company-logo {
  max-width: 620px;
  width: 100%;
  max-height: 180px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 36px rgba(0, 136, 255, 0.28));
  animation: splashLogoEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-fallback-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid var(--bw);
  padding: 18px 36px;
  background: #11141a;
  box-shadow: 6px 6px 0 var(--blue);
  animation: splashLogoEntrance 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-fallback-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  text-transform: uppercase;
}

.splash-fallback-subtitle {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 5px;
  color: var(--blue);
  margin-top: 6px;
  text-transform: uppercase;
}

@keyframes splashLogoEntrance {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.splash-game-subtitle,
.splash-game-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 5px;
  color: #7c8696;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.splash-progress-track {
  width: 380px;
  max-width: 100%;
  height: 4px;
  background: #151820;
  border: 1px solid #282e3b;
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}

.splash-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 42, 42, 0.8);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.splash-status-text {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.2px;
  color: #9aa2ad;
  text-transform: uppercase;
  min-height: 18px;
}

.splash-skip-hint {
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: #444b57;
  text-transform: uppercase;
  margin-top: 26px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.splash-skip-hint.visible {
  opacity: 1;
}


/* --------------------------------------------------------------------------
   BOOT SPLASH "CLICK TO PLAY" & FIT-TO-WINDOW SCALING (itch.io embed)
   -------------------------------------------------------------------------- */
.game-boot-splash {
  cursor: progress;
}

.game-boot-splash.splash-ready {
  cursor: pointer;
}

.splash-play-btn {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 48px;
  background: var(--red);
  color: #fff;
  border: 3px solid #fff;
  font-family: inherit;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 4px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease, background .15s, color .15s;
}

.splash-play-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}

.splash-ready .splash-play-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: splash-play-pulse 1.4s ease-in-out .45s infinite;
}

/* Stay red and keep pulsing on hover/focus: on itch.io the cursor is often already
   resting where this button appears (right where itch's own Run button was) */
.splash-ready .splash-play-btn:hover {
  filter: brightness(1.12);
}

.splash-ready .splash-play-btn:focus-visible {
  outline: 2px dashed #fff;
  outline-offset: 5px;
}

/* Gentle breathe: slight swell, brighter red and glow, then settle */
@keyframes splash-play-pulse {
  0%, 100% {
    transform: scale(1);
    background: var(--red);
    box-shadow: 0 0 10px rgba(220, 30, 30, 0.55);
  }
  50% {
    transform: scale(1.05);
    background: #ff3b3b;
    box-shadow: 0 0 24px 5px rgba(255, 60, 60, 0.8);
  }
}

.splash-skip-hint {
  margin-top: 14px;
  color: #6f7887;
}

/* Below the 1200x740 design size, scale the whole page uniformly (set by fitToViewport) */
html.fit-scaled {
  zoom: var(--fit);
}

html.fit-scaled body {
  width: calc(100vw / var(--fit));
  height: calc(100vh / var(--fit));
}

/* Return-to-full-screen chip: appears after leaving fullscreen (accidental Esc) */
.fs-return {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 99997;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: var(--red);
  color: #fff;
  border: 2px solid #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
  cursor: pointer;
  transform: translateX(-50%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 14px rgba(255, 60, 60, 0.6);
  animation: fs-return-in .35s ease-out, fs-return-pulse 1.4s ease-in-out .35s 3;
}

.fs-return.on {
  display: inline-flex;
}

.fs-return svg {
  width: 14px;
  height: 14px;
  display: block;
}

.fs-return .fs-return-short { display: none; }

/* After a few seconds it shrinks to a small, quieter chip that stays available */
.fs-return.compact {
  padding: 4px 10px;
  font-size: 10px;
  letter-spacing: 1.2px;
  background: rgba(10, 14, 20, 0.88);
  border: 1px solid #3a4658;
  color: #c9d6e6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  animation: none;
}

.fs-return.compact .fs-return-long { display: none; }
.fs-return.compact .fs-return-short { display: inline; }

.fs-return.compact svg {
  width: 11px;
  height: 11px;
}

.fs-return:hover,
.fs-return:focus-visible {
  filter: brightness(1.15);
  outline: none;
}

.fs-return.compact:hover,
.fs-return.compact:focus-visible {
  border-color: var(--blue);
  color: #fff;
}

@keyframes fs-return-pulse {
  0%, 100% { transform: translateX(-50%) scale(1);    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 60, 60, 0.5); }
  50%      { transform: translateX(-50%) scale(1.06); box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 24px 5px rgba(255, 60, 60, 0.85); }
}

@keyframes fs-return-in {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
