@font-face {
  font-family: 'VT323';
  src: url('../assets/fonts/VT323-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Black Ops One';
  src: url('../assets/fonts/BlackOpsOne-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --steel-hi: #8a949c;
  --steel-1: #4b535a;
  --steel-2: #30363b;
  --steel-3: #1b1f22;
  --steel-4: #0e1012;
  --glass: #040805;
  --sc-green: #3cff3c;
  --sc-text: #b6f2b0;
  --sc-dim: #6fa86a;
  --sc-yellow: #f6d34a;
  --sc-red: #ff4a3d;
  --sc-blue: #4fa8ff;
  --console-h: 196px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--sc-text);
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 18px;
  user-select: none;
  -webkit-user-select: none;
}

button { font-family: inherit; }
.hidden { display: none !important; }

#app { position: fixed; inset: 0; }

#view {
  position: absolute;
  inset: 0;
  display: block;
  cursor: crosshair;
}

#crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  z-index: 5;
}

/* ---------------------------------------------------------------- metal */
.metal {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 18%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, var(--steel-1), var(--steel-2) 45%, var(--steel-3));
}

/* ---------------------------------------------------------------- top bar */
#topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 10px;
  z-index: 10;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 40%),
    linear-gradient(180deg, rgba(58, 64, 70, 0.96), rgba(20, 23, 26, 0.96));
  border-bottom: 2px solid #0a0b0c;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 10px rgba(0, 0, 0, 0.5);
}

#match-info {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--sc-text);
  font-size: 20px;
  white-space: nowrap;
}
#match-info .sep { color: #3d5a3a; }
#clock { color: var(--sc-yellow); min-width: 52px; }
#speed { color: var(--sc-green); }
#seed { color: var(--sc-dim); }
#halving { color: #ffb347; margin-left: 6px; }
#chain-info {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  height: 22px;
  line-height: 22px;
  padding: 0 12px;
  z-index: 9;
  text-align: center;
  color: #9fd8ff;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(4, 10, 16, 0.78);
  border-bottom: 1px solid #1d3550;
  text-shadow: 0 0 6px rgba(79, 168, 255, 0.45);
  pointer-events: none;
}
#chain-info.off { color: #ff8a7a; }
body.chain-mode #scoreboard { top: 64px; }

#faction-tabs {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.ftab {
  width: 28px;
  height: 26px;
  padding: 2px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #2b3136, #121517);
  border: 1px solid #555e66;
  border-bottom-color: #0a0b0c;
  border-right-color: #0a0b0c;
  cursor: pointer;
  position: relative;
}
.ftab img { width: 20px; height: 20px; image-rendering: auto; }
.ftab.active { border-color: var(--fc); box-shadow: 0 0 8px var(--fc), inset 0 0 6px var(--fc); }
.ftab.dead img { filter: grayscale(1) brightness(0.45); }
.ftab .k {
  position: absolute;
  right: 1px;
  bottom: -2px;
  font-size: 12px;
  color: var(--sc-yellow);
  text-shadow: 0 0 2px #000, 0 0 2px #000;
}

#resources {
  display: flex;
  gap: 16px;
  font-size: 22px;
  color: var(--sc-green);
  min-width: 270px;
  justify-content: flex-end;
}
.res { display: flex; align-items: center; gap: 6px; }
.res b { font-weight: normal; min-width: 44px; text-align: left; }
.ico { width: 16px; height: 16px; display: inline-block; flex: none; }
.ico-hash {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1 13 6 8 15 3 6Z' fill='%237fe3ff' stroke='%23103a4a'/%3E%3Cpath d='M8 1 10 6 8 15 6 6Z' fill='%23c8f6ff'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ico-gas {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='3' width='10' height='12' rx='2' fill='%2340d040' stroke='%23103a10'/%3E%3Crect x='6' y='1' width='4' height='3' fill='%2390ff90'/%3E%3Crect x='5' y='6' width='2' height='7' fill='%23b8ffb8'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ico-supply {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1 14 4.5V11.5L8 15 2 11.5V4.5Z' fill='none' stroke='%23f6d34a' stroke-width='1.6'/%3E%3Ccircle cx='8' cy='8' r='2.4' fill='%23f6d34a'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------------------------------------------------------------- buttons */
.sc-btn {
  font-family: 'VT323', monospace;
  font-size: 20px;
  color: #c9ffc0;
  background: linear-gradient(180deg, #23401f, #0f1f0d 60%, #0a1509);
  border: 1px solid #5fa857;
  border-bottom-color: #1d3a1a;
  border-right-color: #1d3a1a;
  padding: 4px 18px;
  cursor: pointer;
  text-shadow: 0 0 6px rgba(60, 255, 60, 0.45);
  box-shadow: inset 0 0 8px rgba(60, 255, 60, 0.12), 0 0 0 1px #000;
}
.sc-btn:hover { color: #fff; background: linear-gradient(180deg, #2f5a28, #142a11 60%, #0d1c0b); }
.sc-btn:active { transform: translateY(1px); }
.sc-btn.small { font-size: 17px; padding: 1px 10px; }
.sc-btn.big { font-size: 28px; padding: 8px 40px; letter-spacing: 2px; }
.sc-btn.danger { border-color: #a85757; color: #ffc0c0; background: linear-gradient(180deg, #40201f, #1f0d0d); }

/* ---------------------------------------------------------------- scoreboard */
#scoreboard {
  position: absolute;
  top: 44px;
  left: 10px;
  width: 300px;
  z-index: 8;
  padding: 6px;
  background: linear-gradient(180deg, rgba(14, 18, 16, 0.86), rgba(6, 9, 7, 0.86));
  border: 1px solid #39433c;
  box-shadow: 0 0 0 1px #000, 0 6px 16px rgba(0, 0, 0, 0.5);
}
#scoreboard .sb-head {
  display: flex;
  justify-content: space-between;
  color: var(--sc-yellow);
  font-size: 16px;
  padding: 0 4px 4px;
  border-bottom: 1px solid #263027;
  margin-bottom: 4px;
}
.sb-row {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: 2px 8px;
  align-items: center;
  padding: 4px;
  cursor: pointer;
  border-left: 3px solid var(--fc);
  margin-bottom: 3px;
  background: rgba(255, 255, 255, 0.02);
}
.sb-row:hover { background: rgba(255, 255, 255, 0.06); }
.sb-row.followed { background: rgba(60, 255, 60, 0.07); box-shadow: inset 0 0 0 1px rgba(60, 255, 60, 0.35); }
.sb-row.dead { opacity: 0.42; }
.sb-row img { width: 28px; height: 28px; grid-row: span 2; }
.sb-name { color: var(--fc); font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-posture { font-size: 15px; text-align: right; white-space: nowrap; }
.sb-stats { grid-column: 2 / 4; display: flex; gap: 9px; font-size: 15px; color: var(--sc-dim); white-space: nowrap; overflow: hidden; }
.sb-stats b { color: var(--sc-text); font-weight: normal; }
.sb-bar { grid-column: 1 / 4; height: 3px; background: #1a1f1b; }
.sb-bar i { display: block; height: 100%; background: var(--fc); box-shadow: 0 0 6px var(--fc); }
.sb-pact { color: var(--sc-yellow); font-size: 14px; }
.sb-foot { color: var(--sc-dim); font-size: 14px; padding: 4px 4px 0; border-top: 1px solid #263027; margin-top: 2px; }

/* ---------------------------------------------------------------- messages */
#feed {
  position: absolute;
  left: 12px;
  bottom: calc(var(--console-h) + 34px);
  width: min(720px, 60vw);
  z-index: 8;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.msg {
  font-size: 19px;
  line-height: 1.05;
  color: #e6ffe6;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  transition: opacity 0.8s;
}
.msg .t { color: var(--sc-dim); margin-right: 6px; }
.msg .tag { margin-right: 6px; }
.msg.fade { opacity: 0; }

#announce {
  position: absolute;
  left: 50%;
  top: 19%;
  transform: translateX(-50%);
  width: min(900px, 90vw);
  text-align: center;
  z-index: 9;
  pointer-events: none;
}
.big-msg {
  font-size: 30px;
  letter-spacing: 1px;
  color: var(--sc-yellow);
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 0 18px rgba(246, 211, 74, 0.55);
  margin-bottom: 6px;
  animation: pop 0.35s ease-out;
  transition: opacity 1s;
}
.big-msg.fade { opacity: 0; }
@keyframes pop { from { transform: scale(1.25); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------------------------------------------------------------- console */
#console {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--console-h);
  display: flex;
  align-items: flex-end;
  z-index: 10;
  pointer-events: none;
}
.panel {
  pointer-events: auto;
  position: relative;
  background:
    radial-gradient(circle, #9aa3aa 0 1.4px, #2a2f33 1.6px 2.4px, transparent 2.6px) 6px 6px / 100% 100% no-repeat,
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 14%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 2px, transparent 2px 6px),
    linear-gradient(180deg, #59626a, #343a40 38%, #1e2226);
  border-top: 2px solid var(--steel-hi);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.08), inset 0 -4px 10px rgba(0, 0, 0, 0.7);
}
#panel-map {
  width: 236px;
  height: 100%;
  padding: 14px 14px 10px;
  clip-path: polygon(0 0, 86% 0, 100% 16%, 100% 100%, 0 100%);
  border-right: 2px solid #0b0c0d;
}
#panel-map .bezel {
  width: 100%;
  height: 100%;
  padding: 4px;
  background: #050605;
  border: 2px solid #121416;
  box-shadow: inset 0 0 0 1px #3d464d, 0 0 0 1px #6b757d;
}
#minimap { width: 100%; height: 100%; display: block; image-rendering: pixelated; cursor: pointer; }

#panel-mid {
  flex: 1;
  height: 158px;
  display: flex;
  gap: 10px;
  padding: 14px 14px 12px;
  min-width: 0;
}
#info {
  flex: 1;
  min-width: 0;
  background: var(--glass);
  border: 2px solid #0a0c0a;
  box-shadow: inset 0 0 0 1px #2d3a2c, inset 0 0 18px rgba(60, 255, 60, 0.08);
  padding: 6px 10px;
  overflow: hidden;
  position: relative;
}
#portrait-wrap {
  width: 116px;
  flex: none;
  position: relative;
  background: #020402;
  border: 2px solid #0a0c0a;
  box-shadow: inset 0 0 0 1px #2d3a2c, 0 0 0 1px #5e6870;
}
#portrait { width: 100%; height: 100px; display: block; image-rendering: pixelated; }
#portrait-wrap .scanlines {
  position: absolute;
  inset: 0 0 20px 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.35) 0 1px, transparent 1px 3px);
}
#portrait-label {
  height: 20px;
  text-align: center;
  font-size: 15px;
  color: var(--sc-green);
  white-space: nowrap;
  overflow: hidden;
  border-top: 1px solid #1c2a1b;
}

#panel-cmd {
  width: 236px;
  height: 100%;
  padding: 18px 14px 10px;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%, 0 16%);
  border-left: 2px solid #0b0c0d;
}
#cmd {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  height: 100%;
}
.cbtn {
  position: relative;
  background: linear-gradient(180deg, #121a12, #050805);
  border: 1px solid #4b5a4b;
  border-bottom-color: #0b0f0b;
  border-right-color: #0b0f0b;
  box-shadow: inset 0 0 10px rgba(60, 255, 60, 0.08), 0 0 0 1px #000;
  color: var(--sc-green);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 14px;
}
.cbtn svg { width: 30px; height: 30px; filter: drop-shadow(0 0 3px rgba(60, 255, 60, 0.5)); }
.cbtn .lbl { position: absolute; bottom: 1px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--sc-dim); line-height: 1; }
.cbtn .hk { position: absolute; top: 1px; left: 3px; font-size: 13px; color: var(--sc-yellow); }
.cbtn:hover { border-color: var(--sc-green); box-shadow: inset 0 0 14px rgba(60, 255, 60, 0.25), 0 0 0 1px #000; }
.cbtn.on { border-color: var(--sc-yellow); box-shadow: inset 0 0 14px rgba(246, 211, 74, 0.25), 0 0 0 1px #000; }
.cbtn.on svg { filter: drop-shadow(0 0 4px rgba(246, 211, 74, 0.7)); color: var(--sc-yellow); }

/* info panel content */
.i-title { color: var(--sc-yellow); font-size: 22px; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i-sub { color: var(--sc-dim); font-size: 16px; line-height: 1.1; margin-bottom: 4px; }
.i-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 0 12px; font-size: 17px; line-height: 1.1; }
.i-grid > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i-grid span { color: var(--sc-dim); }
.i-grid b { color: var(--sc-text); font-weight: normal; }
.i-state { color: var(--sc-green); font-size: 17px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.i-thought { color: #d8f6d0; font-size: 17px; line-height: 1.1; margin-top: 3px; max-height: 38px; overflow: hidden; }
.i-bar { height: 6px; background: #111; border: 1px solid #263; margin: 2px 0; position: relative; }
.i-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--sc-green); }
.i-bar.sh i { background: var(--sc-blue); }
.i-bar.pr i { background: #e8e8e8; }
.i-multi { display: flex; flex-wrap: wrap; gap: 3px; }
.i-multi canvas { width: 34px; height: 34px; background: #061006; border: 1px solid var(--hc); image-rendering: pixelated; }
.pill { display: inline-block; padding: 0 6px; border: 1px solid currentColor; font-size: 15px; line-height: 1.1; margin-right: 4px; }

/* ---------------------------------------------------------------- overlay */
#overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(0, 0, 0, 0.62);
  display: grid;
  place-items: center;
}
#overlay-box {
  width: min(980px, 94vw);
  max-height: 88vh;
  overflow: auto;
  padding: 18px 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 6%),
    linear-gradient(180deg, #252b30, #12161a);
  border: 2px solid #6d777f;
  border-bottom-color: #08090a;
  border-right-color: #08090a;
  box-shadow: 0 0 0 2px #000, 0 20px 60px rgba(0, 0, 0, 0.8);
}
#overlay-box h2 {
  font-family: 'Black Ops One', 'VT323', sans-serif;
  font-weight: normal;
  color: var(--sc-yellow);
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: 1px;
  text-shadow: 0 2px 0 #000;
}
#overlay-box h3 { color: var(--sc-green); font-weight: normal; margin: 12px 0 6px; font-size: 22px; }
.ov-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.menu-list { display: grid; gap: 8px; width: min(380px, 100%); margin: 6px auto; }
.menu-list .sc-btn { width: 100%; }
.ov-close { float: right; }
table.sc { width: 100%; border-collapse: collapse; font-size: 18px; }
table.sc th { color: var(--sc-yellow); font-weight: normal; text-align: right; padding: 3px 8px; border-bottom: 1px solid #3a463a; }
table.sc th:first-child, table.sc td:first-child { text-align: left; }
table.sc td { padding: 4px 8px; text-align: right; border-bottom: 1px solid #1d251d; color: var(--sc-text); }
table.sc tr.win td { background: rgba(246, 211, 74, 0.08); }
.fcell { display: flex; align-items: center; gap: 8px; color: var(--fc); }
.fcell img { width: 22px; height: 22px; }
.codex { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.codex-card { border: 1px solid #33403a; border-top: 3px solid var(--fc); background: rgba(0, 0, 0, 0.35); padding: 10px; }
.codex-card header { display: flex; gap: 10px; align-items: center; }
.codex-card header img { width: 40px; height: 40px; }
.codex-card .nm { color: var(--fc); font-size: 24px; line-height: 1; }
.codex-card .tk { color: var(--sc-dim); font-size: 16px; }
.codex-card p { margin: 6px 0; font-size: 17px; color: #cfe8cb; line-height: 1.15; }
.codex-card ul { margin: 4px 0; padding-left: 18px; font-size: 16px; line-height: 1.15; }
.unit-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.unit-chip { display: flex; align-items: center; gap: 4px; font-size: 15px; border: 1px solid #263027; padding: 1px 6px 1px 1px; background: #070b07; }
.unit-chip canvas { width: 28px; height: 28px; image-rendering: pixelated; }
.opt-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #1d251d; }
.ledger-list { font-size: 17px; }
.ledger-list .blk { display: grid; grid-template-columns: 60px 1fr auto; gap: 8px; padding: 4px 0; border-bottom: 1px solid #1d251d; }
.ledger-list code { color: var(--sc-dim); font-family: 'VT323', monospace; }
#overlay-box a { color: var(--sc-blue); }
#overlay-box a:hover { color: #fff; }
.wins-row { display: grid; grid-template-columns: 180px 1fr 40px; gap: 10px; align-items: center; margin: 4px 0; }
.wins-row .bar { height: 10px; background: #111; border: 1px solid #263; }
.wins-row .bar i { display: block; height: 100%; background: var(--fc); }
#chart { width: 100%; height: 240px; background: #040805; border: 1px solid #263027; display: block; }
.victory-title { text-align: center; font-family: 'Black Ops One', sans-serif; font-size: 54px; color: var(--sc-yellow); text-shadow: 0 3px 0 #000, 0 0 24px rgba(246, 211, 74, 0.5); margin: 4px 0; }
.victory-sub { text-align: center; font-size: 22px; color: var(--sc-text); margin-bottom: 12px; }
.victory-art { height: 150px; margin: -18px -22px -70px; background-size: cover; background-position: center 30%; image-rendering: pixelated; }
.victory-emblem, .victory-title, .victory-sub { position: relative; }
.victory-emblem { display: block; width: 84px; height: 84px; margin: 0 auto; animation: spin 3s linear infinite; }
@keyframes spin { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
.muted { color: var(--sc-dim); }
.small { font-size: 15px; }
input.sc-input { background: #050805; color: var(--sc-green); border: 1px solid #4b5a4b; font-family: 'VT323', monospace; font-size: 20px; padding: 3px 8px; width: 160px; }
input[type=range] { accent-color: #3cff3c; }

/* ---------------------------------------------------------------- title */
#title {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.92) 75%);
  transition: opacity 0.8s;
}
#title.out { opacity: 0; pointer-events: none; }
.title-inner { text-align: center; width: min(1100px, 94vw); }
.title-kicker { color: var(--sc-green); letter-spacing: 6px; font-size: 20px; text-shadow: 0 0 8px rgba(60, 255, 60, 0.6); }
#title h1 {
  font-family: 'Black Ops One', sans-serif;
  font-weight: normal;
  font-size: clamp(48px, 9vw, 112px);
  margin: 6px 0 4px;
  line-height: 1;
  letter-spacing: 3px;
  background: linear-gradient(180deg, #ffffff 0%, #c9d3dc 38%, #6c7882 52%, #e8eef3 70%, #8d99a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #000) drop-shadow(0 0 22px rgba(247, 147, 26, 0.35));
}
.title-sub { font-size: 24px; color: #d6e6d2; margin: 0 0 22px; }
#title-factions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.tf-card {
  width: 196px;
  padding: 12px 10px;
  background: linear-gradient(180deg, rgba(30, 35, 40, 0.92), rgba(10, 12, 14, 0.92));
  border: 1px solid #3a444c;
  border-top: 3px solid var(--fc);
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.6);
}
.tf-card img { width: 56px; height: 56px; filter: drop-shadow(0 0 10px var(--fc)); }
.tf-card.has-art, .codex-card.has-art {
  background:
    linear-gradient(180deg, rgba(10, 12, 14, 0.55), rgba(10, 12, 14, 0.94) 72%),
    var(--art) center 28% / cover no-repeat;
}
.tf-card .nm { color: var(--fc); font-size: 24px; margin-top: 6px; }
.tf-card .tk { color: var(--sc-dim); font-size: 16px; }
.tf-card .tg { color: #cfe3cb; font-size: 16px; margin-top: 4px; }
.title-hint { color: var(--sc-dim); font-size: 18px; margin-top: 16px; }

#loading {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: #000;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
}
.load-title { font-family: 'Black Ops One', sans-serif; font-size: 44px; color: #c9d3dc; }
.load-bar { width: 360px; height: 10px; border: 1px solid #3b6b35; background: #050805; }
#load-fill { height: 100%; width: 0; background: var(--sc-green); box-shadow: 0 0 10px var(--sc-green); }
#load-text { color: var(--sc-dim); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  #match-info #seed, #match-info .sep:nth-of-type(3) { display: none; }
  #resources { min-width: 0; gap: 10px; font-size: 19px; }
}
@media (max-width: 900px) {
  :root { --console-h: 160px; }
  #panel-map, #panel-cmd { width: 172px; }
  #panel-mid { height: 128px; }
  #portrait-wrap { display: none; }
  #scoreboard { width: 240px; transform-origin: top left; }
  #match-info { font-size: 16px; }
  .cbtn svg { width: 22px; height: 22px; }
}
@media (max-width: 640px) {
  #scoreboard { display: none; }
  #faction-tabs { display: none; }
  #panel-mid { display: none; }
  #panel-map, #panel-cmd { flex: 1; width: auto; }
  #feed { width: 92vw; }
  .msg { font-size: 16px; }
}
