/* ==========================================================================
   Round 6 — command-and-control theme. Layered over style.css (which stays as the base).
   Dark slate/navy, one cyan accent, semantic red/amber/green. Inter + JetBrains Mono (bundled, OFL).
   ========================================================================== */
:root {
  --bg: #070b12; --bg2: #0a1019; --bg3: #0d1420;
  --card: #0f1724; --card2: #142033; --card3: #1a2840;
  --line: #1c2a3f; --line2: #27405f; --text: #dbe5f2; --text2: #b4c3d8; --muted: #7d8ca4;
  --accent: #22d3ee; --accent2: #0e9fbc; --accent-dim: rgba(34,211,238,.14); --accent-glow: rgba(34,211,238,.35);
  --good: #34d399; --bad: #fb4d64; --warn: #fbbf24; --crit: #ff2d55; --info: #60a5fa; --beige: #d8c8a0;
  --radius: 4px; --r2: 6px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --rail-w: 204px; --rail-wc: 60px; --intel-w: 300px; --top-h: 58px; --res-h: 36px; --tick-h: 28px;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
  font-size: 14px;
}
html, body { height: 100%; overflow: hidden; font-family: var(--sans); background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
body { background:
  radial-gradient(1200px 600px at 70% -10%, rgba(34,211,238,.07), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(96,165,250,.05), transparent 60%),
  var(--bg); }
.mono, .num, td.num, b.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tiny { font-size: .74rem; } .warnc { color: var(--warn); } .you { color: var(--accent); }
h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: .005em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; color: var(--text2); font-weight: 650; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
h3::before { content: ''; width: 3px; height: 12px; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); border-radius: 1px; }
h4 { font-size: .74rem; letter-spacing: .1em; color: var(--muted); }
a { color: var(--accent); }
::selection { background: rgba(34,211,238,.3); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1f2e45; border-radius: 6px; border: 2px solid var(--bg); } ::-webkit-scrollbar-thumb:hover { background: #2b4263; }
.ico { flex: none; vertical-align: -0.18em; }
.emo-wrap { display: inline-flex; vertical-align: -0.15em; }
.emo { display: inline-flex; align-items: center; color: var(--accent); }
.emo.good { color: var(--good); } .emo.bad { color: var(--bad); } .emo.warn { color: var(--warn); } .emo.muted { color: var(--muted); } .emo.gold { color: #f5c542; }

/* ---------- shell grid ---------- */
#shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); height: 100vh; transition: grid-template-columns .22s var(--ease); }
body.rail-collapsed #shell { grid-template-columns: var(--rail-wc) minmax(0, 1fr); }
#stage { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
#stage-body { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) var(--intel-w); }
body.intel-closed #stage-body { grid-template-columns: minmax(0, 1fr) 0; }
main#view { max-width: none; margin: 0; padding: var(--s4) var(--s5) var(--s5); overflow-y: auto; overflow-x: hidden; min-width: 0;
  background-image: linear-gradient(rgba(34,211,238,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(34,211,238,.025) 1px, transparent 1px);
  background-size: 40px 40px; background-attachment: local; }
main#view > * { max-width: 1680px; margin-left: auto; margin-right: auto; }

/* ---------- left rail ---------- */
#tabs.rail { position: relative; top: auto; display: flex; flex-direction: column; gap: 0; padding: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  background: linear-gradient(180deg, #0a121e, #070c14); border-right: 1px solid var(--line); border-bottom: none; z-index: 30; }
.rail-brand { display: flex; align-items: center; gap: 10px; height: var(--top-h); padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.rail-logo { color: var(--accent); display: inline-flex; filter: drop-shadow(0 0 6px var(--accent-glow)); }
.rail-brand .lbl { font-weight: 800; letter-spacing: .18em; font-size: .86rem; color: var(--text); white-space: nowrap; }
.rail-brand .lbl b { color: var(--accent); font-weight: 800; }
.rail-groups { flex: 1; padding: 8px 0; }
.rail-group { padding: 6px 0 4px; }
.rail-gh { font-size: .64rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #52627a; padding: 6px 18px 4px; white-space: nowrap; }
#tabs.rail button[data-tab] { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 16px 9px 18px; background: none; border: none; border-left: 2px solid transparent;
  border-radius: 0; color: var(--muted); font-weight: 550; font-size: .9rem; text-align: left; white-space: nowrap; transition: color .15s, background .15s; }
#tabs.rail button[data-tab]:hover { color: var(--text); background: rgba(34,211,238,.05); }
#tabs.rail button[data-tab].active { color: #e9fbff; background: linear-gradient(90deg, rgba(34,211,238,.16), rgba(34,211,238,.02)); border-left-color: var(--accent); }
#tabs.rail button[data-tab].active .ni { color: var(--accent); filter: drop-shadow(0 0 5px var(--accent-glow)); }
.ni { display: inline-flex; width: 20px; justify-content: center; flex: none; }
.nbadge { display: none; margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font: 700 .68rem/18px var(--mono); text-align: center; background: var(--accent2); color: #001018; }
.nbadge.on { display: inline-block; } .nbadge.red { background: var(--bad); color: #fff; } .nbadge.amber { background: var(--warn); color: #1d1300; }
.rail-foot { padding: 10px 18px; border-top: 1px solid var(--line); white-space: nowrap; flex: none; }
body.rail-collapsed .rail .lbl, body.rail-collapsed .rail-gh { display: none; }
body.rail-collapsed .rail-brand { justify-content: center; padding: 0; }
body.rail-collapsed #tabs.rail button[data-tab] { justify-content: center; padding: 11px 0; }
body.rail-collapsed .rail-group + .rail-group { border-top: 1px solid var(--line); }
body.rail-collapsed .nbadge.on { position: absolute; top: 3px; right: 6px; min-width: 14px; height: 14px; line-height: 14px; font-size: .58rem; padding: 0 3px; }

/* ---------- top bar ---------- */
#topbar { position: relative; top: auto; display: block; padding: 0; gap: 0; background: linear-gradient(180deg, #0c1420, #0a111b); border-bottom: 1px solid var(--line); z-index: 25; flex: none; }
#topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-glow), transparent); opacity: .6; }
.tb-main { display: flex; align-items: center; gap: 14px; height: var(--top-h); padding: 0 14px 0 10px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; background: transparent; border: 1px solid transparent; border-radius: var(--radius); color: var(--muted); }
.icon-btn:hover:not(:disabled) { color: var(--text); border-color: var(--line2); background: rgba(255,255,255,.03); }
.icon-btn.on { color: var(--accent); }
.icon-btn.sm { width: 26px; height: 26px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 250px; }
#hdr-flag svg, #hdr-flag img { display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.brand-txt { min-width: 0; }
#hdr-name { font-weight: 700; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hdr-sub { font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hdr-stats.statusbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow: hidden; }
.stat { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13,21,33,.8); white-space: nowrap; flex: none; position: relative; }
.stat .k { font-size: .6rem; font-weight: 700; letter-spacing: .14em; color: var(--muted); text-transform: uppercase; writing-mode: horizontal-tb; }
.stat b { font-size: .98rem; } .stat b.big { font-size: 1.08rem; color: #fff; }
.stat small { font-size: .7rem; color: var(--muted); }
.stat.turn b { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }
.dc-bars { display: flex; gap: 2px; align-items: flex-end; height: 18px; }
.dc-bars i { width: 4px; background: #1c2a3f; border-radius: 1px; } .dc-bars i:nth-child(1) { height: 6px; } .dc-bars i:nth-child(2) { height: 9px; } .dc-bars i:nth-child(3) { height: 12px; } .dc-bars i:nth-child(4) { height: 15px; } .dc-bars i:nth-child(5) { height: 18px; }
.defcon { --dc: var(--good); } .defcon.d4 { --dc: var(--info); } .defcon.d3 { --dc: var(--warn); } .defcon.d2 { --dc: #ff7a3d; } .defcon.d1 { --dc: var(--crit); }
.defcon .dc-bars i.on { background: var(--dc); box-shadow: 0 0 6px var(--dc); } .defcon b { color: var(--dc); } .defcon { border-color: color-mix(in srgb, var(--dc) 40%, var(--line)); }
.defcon.pulse { animation: pulseBorder 1.4s ease-in-out infinite; }
.gauge { position: relative; height: 6px; background: #0a111b; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.gauge > div { height: 100%; background: linear-gradient(90deg, var(--accent2), var(--accent)); box-shadow: 0 0 8px var(--accent-glow); transition: width .5s var(--ease); }
.gauge::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 9%, rgba(7,11,18,.85) 9% 10%); pointer-events: none; }
.gauge.sm { width: 56px; } .gauge.good > div, .gauge.ok > div { background: linear-gradient(90deg, #169e6f, var(--good)); box-shadow: 0 0 8px rgba(52,211,153,.35); }
.gauge.warn > div { background: linear-gradient(90deg, #c98a07, var(--warn)); box-shadow: 0 0 8px rgba(251,191,36,.35); }
.gauge.bad > div, .gauge.crit > div { background: linear-gradient(90deg, #b3132c, var(--bad)); box-shadow: 0 0 8px rgba(251,77,100,.4); }
.gauge.big { height: 12px; margin: 4px 0 8px; }
.gauge.big.res-me > div { background: linear-gradient(90deg, #169e6f, var(--good)); } .gauge.big.res-en > div { background: linear-gradient(90deg, #b3132c, var(--bad)); }
.gauge.big.crit.res-me > div { background: linear-gradient(90deg, #b3132c, var(--bad)); animation: blink 1.2s ease-in-out infinite; }
.bar { height: 7px; background: #0a111b; border: 1px solid var(--line); border-radius: 2px; }
.bar > div, .bar > i { background: linear-gradient(90deg, var(--accent2), var(--accent)); }
.bar.gauge.ok > div { background: linear-gradient(90deg, #169e6f, var(--good)); } .bar.gauge.warn > div { background: linear-gradient(90deg, #c98a07, var(--warn)); } .bar.gauge.crit > div { background: linear-gradient(90deg, #b3132c, var(--bad)); }
.bar.res-me > div { background: var(--good); } .bar.res-en > div { background: var(--bad); }
.pill { height: 30px; border-radius: var(--radius); background: rgba(13,21,33,.8); border-color: var(--line); padding: 0 9px; white-space: nowrap; flex: none; font-size: .8rem; }
.pill span { display: inline-flex; color: var(--muted); } .pill b { font-family: var(--mono); font-weight: 600; }
.pill.bad { border-color: rgba(251,77,100,.5); background: rgba(251,77,100,.08); } .pill.bad span { color: var(--bad); }
.pill.warn { border-color: rgba(251,191,36,.45); } .pill.warn span { color: var(--warn); } .pill.info span { color: var(--accent); }
.pill.timer.good { border-color: rgba(34,211,238,.4); } .pill.timer b { color: var(--accent); }
.pill button.tiny { padding: 0 6px; height: 22px; }
.hdr-actions { display: flex; align-items: center; gap: 4px; flex: none; }
button.endturn { display: inline-flex; align-items: center; gap: 8px; height: 38px; margin-left: 6px; padding: 0 18px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .84rem;
  background: linear-gradient(180deg, #2be0f8, #0ea5c6); color: #00131a; border: 1px solid #5fe9fb; border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(34,211,238,.2), 0 4px 18px rgba(34,211,238,.25); }
button.endturn:hover:not(:disabled) { background: linear-gradient(180deg, #5ceafb, #18b8da); box-shadow: 0 0 0 1px rgba(34,211,238,.35), 0 4px 24px rgba(34,211,238,.4); }
button.endturn:disabled { filter: grayscale(.6); }
/* resource strip */
.tb-res { display: flex; align-items: center; gap: 6px; height: var(--res-h); padding: 0 12px; border-top: 1px solid rgba(28,42,63,.6); background: rgba(7,11,18,.5); position: relative; }
.resstrip { display: flex; flex-wrap: wrap; gap: 4px 4px; height: 28px; overflow: hidden; flex: 1; min-width: 0; align-items: center; }
.rchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 9px; border-radius: var(--radius); border: 1px solid transparent; white-space: nowrap; font-size: .8rem; color: var(--text2); }
.rchip:hover { border-color: var(--line); background: rgba(255,255,255,.02); }
.rchip .ico { color: var(--accent); opacity: .9; }
.rchip .rl { color: var(--muted); font-size: .72rem; }
.rchip b { color: var(--text); font-weight: 600; font-size: .84rem; transition: color .3s; }
.rchip small { font-size: .68rem; } .rchip small.pos { color: #4fbf91; } .rchip small.neg { color: var(--bad); }
.rchip.warn { border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.06); } .rchip.warn .ico { color: var(--warn); }
.rchip.hidden-ovf { visibility: hidden; }
b.up { color: var(--good) !important; } b.down { color: var(--bad) !important; }
.res-more { position: relative; flex: none; }
.res-more-btn { height: 26px; padding: 0 8px; font: 600 .76rem var(--mono); display: inline-flex; align-items: center; gap: 4px; background: var(--card2); border-color: var(--line2); }
.res-pop { display: none; position: absolute; right: 0; top: 32px; z-index: 60; min-width: 230px; padding: 6px; background: #0d1622; border: 1px solid var(--line2); border-radius: var(--r2); box-shadow: 0 12px 40px rgba(0,0,0,.6); flex-direction: column; gap: 2px; }
.res-more.open .res-pop { display: flex; animation: popIn .14s var(--ease); }
.res-pop .rchip { justify-content: flex-start; width: 100%; } .res-pop .rchip b { margin-left: auto; }

/* ---------- intel panel ---------- */
#intel { min-width: 0; overflow-y: auto; overflow-x: hidden; border-left: 1px solid var(--line); background: linear-gradient(180deg, rgba(10,16,25,.96), rgba(7,11,18,.96)); }
body.intel-closed #intel { border-left: none; visibility: hidden; }
@media (max-width: 1599px) {
  #stage-body, body.intel-closed #stage-body { grid-template-columns: minmax(0, 1fr); }
  #intel { position: absolute; right: 0; top: 0; bottom: 0; width: var(--intel-w); z-index: 40; box-shadow: -18px 0 40px rgba(0,0,0,.55); transition: transform .22s var(--ease), visibility .22s; }
  body.intel-closed #intel { transform: translateX(100%); }
}
.intel-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 14px; font: 700 .7rem var(--sans); letter-spacing: .18em; color: var(--accent); background: #0a111b; border-bottom: 1px solid var(--line); }
.intel-head span { display: inline-flex; gap: 6px; align-items: center; }
.intel-sec { padding: 10px 12px 8px; border-bottom: 1px solid rgba(28,42,63,.7); }
.intel-sec h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: .64rem; letter-spacing: .16em; color: var(--muted); }
.intel-item { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; margin: 2px -4px; border-radius: var(--radius); color: var(--text2); font-size: .8rem; line-height: 1.35; border: 1px solid transparent; }
.intel-item:hover { background: rgba(34,211,238,.06); border-color: var(--line); color: var(--text); }
.intel-item .ii { display: inline-flex; color: var(--accent); margin-top: 1px; }
.intel-item .it { min-width: 0; overflow-wrap: anywhere; }
.intel-item.alert { background: rgba(251,77,100,.08); border-color: rgba(251,77,100,.35); color: #ffd7dd; } .intel-item.alert .ii { color: var(--bad); }
.intel-item.warnitem .ii { color: var(--warn); }
.intel-item.mention { border-color: rgba(251,191,36,.3); }
.intel-item .nb-av { vertical-align: -4px; }
.threat { display: flex; align-items: center; gap: 12px; }
.threat .ring { --dc: var(--good); width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--dc); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 14px color-mix(in srgb, var(--dc) 45%, transparent), inset 0 0 12px color-mix(in srgb, var(--dc) 25%, transparent); flex: none; }
.threat.d4 .ring { --dc: var(--info); } .threat.d3 .ring { --dc: var(--warn); } .threat.d2 .ring { --dc: #ff7a3d; } .threat.d1 .ring { --dc: var(--crit); animation: pulseRing 1.2s ease-in-out infinite; }
.threat .ring b { font: 800 1.35rem/1 var(--mono); color: var(--dc); } .threat .ring small { font-size: .5rem; letter-spacing: .14em; color: var(--muted); }
.threat .tl { font-weight: 700; }
.chip.warnchip { background: rgba(251,191,36,.15); color: var(--warn); }

/* ---------- ticker ---------- */
#ticker { flex: none; display: flex; align-items: center; height: var(--tick-h); border-top: 1px solid var(--line); background: #070c13; overflow: hidden; font-size: .78rem; }
.tk-label { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; font: 700 .66rem var(--sans); letter-spacing: .16em; color: #1d1300; background: var(--warn); }
.tk-track { flex: 1; overflow: hidden; position: relative; mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.tk-run { display: inline-flex; align-items: center; white-space: nowrap; animation: ticker linear infinite; padding-left: 16px; }
.tk-run:hover { animation-play-state: paused; }
.tk-item { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); } .tk-item b { color: var(--accent); font-weight: 600; }
.tk-item .nb-av { width: 14px !important; height: 14px !important; }
.tk-sep { color: #34465f; margin: 0 14px; font-size: .6rem; }
.tk-unv { font-style: normal; font: 700 .6rem var(--mono); color: var(--warn); border: 1px solid rgba(251,191,36,.4); padding: 0 4px; border-radius: 2px; }

/* ---------- panels / cards ---------- */
.card { position: relative; background: linear-gradient(180deg, rgba(18,28,43,.94), rgba(12,19,30,.94)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; box-shadow: 0 1px 0 rgba(255,255,255,.02) inset, 0 8px 24px rgba(0,0,0,.25); }
.card::before, .card::after { content: ''; position: absolute; width: 10px; height: 10px; pointer-events: none; border-color: var(--accent); opacity: .55; }
.card::before { top: -1px; left: -1px; border-top: 1px solid; border-left: 1px solid; }
.card::after { bottom: -1px; right: -1px; border-bottom: 1px solid; border-right: 1px solid; }
.card:has(> table.tbl), .card:has(> .tbl) { overflow-x: auto; }
.card.mini { padding: 10px; }
.card.panel { padding: 10px 12px; }
.panel-h { display: flex; align-items: center; gap: 7px; margin: -10px -12px 10px; padding: 8px 12px; font: 700 .66rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); background: linear-gradient(90deg, rgba(34,211,238,.1), transparent); border-bottom: 1px solid var(--line); }
.card > .panel-h { margin: -14px -16px 12px; }
.card.panel > .panel-h { margin: -10px -12px 10px; }
.viewhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.viewhead h2 { margin: 0; }
.dossier-strip { display: flex; justify-content: space-between; gap: 10px; margin: -14px -16px 12px; padding: 5px 16px; font: 700 .64rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: #8fe9f8;
  background: repeating-linear-gradient(135deg, rgba(34,211,238,.12) 0 10px, rgba(34,211,238,.05) 10px 20px); border-bottom: 1px solid rgba(34,211,238,.25); }
.grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.statgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.statgrid > div { position: relative; background: rgba(20,32,51,.7); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.statgrid > div::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--accent); opacity: .6; }
.statgrid span { font-size: .64rem; letter-spacing: .12em; font-weight: 700; }
.statgrid b { font-family: var(--mono); font-size: 1.12rem; font-weight: 600; color: #eef6ff; }
.statgrid small { font-size: .74rem; }
.statgrid .bar { margin: 3px 0 2px; }
/* tables */
.tbl th { position: sticky; top: 0; z-index: 1; background: #0e1726; font-size: .66rem; letter-spacing: .12em; color: var(--muted); border-bottom: 1px solid var(--line2); padding: 7px 8px; }
.tbl td { border-bottom: 1px solid rgba(28,42,63,.7); padding: 6px 8px; }
.tbl tbody tr:hover td { background: rgba(34,211,238,.035); }
.tbl tr.me td { background: rgba(34,211,238,.07); }
.kv td { border-bottom: 1px solid rgba(28,42,63,.7); padding: 5px 6px; } .kv td:first-child { font-size: .78rem; letter-spacing: .02em; }
/* controls */
button { border-radius: var(--radius); background: #142135; border-color: var(--line2); color: var(--text); font-weight: 550; transition: border-color .12s, background .12s, box-shadow .12s, transform .06s; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
button:hover:not(:disabled) { border-color: var(--accent); background: #17283f; }
button:active:not(:disabled) { transform: translateY(1px); }
button.primary { background: linear-gradient(180deg, #19bfdc, #0e93b0); border-color: #2fd4ef; color: #00141b; font-weight: 700; }
button.primary:hover:not(:disabled) { background: linear-gradient(180deg, #3fd7f0, #12a8c8); box-shadow: 0 0 14px rgba(34,211,238,.3); }
button.danger { background: linear-gradient(180deg, #a3192f, #7c1023); border-color: #d1324c; color: #fff; }
button.danger:hover:not(:disabled) { border-color: #ff6b81; background: linear-gradient(180deg, #bf2039, #8f1428); box-shadow: 0 0 14px rgba(251,77,100,.3); }
button.ghost { background: transparent; border-color: var(--line2); }
button.small { padding: 3px 9px; font-size: .8rem; } button.tiny { padding: 1px 6px; font-size: .72rem; } button.wide { width: 100%; }
button.danger-t:hover:not(:disabled) { border-color: var(--bad); color: #ffc1ca; }
input, select, textarea { background: #08101b; border-color: var(--line2); border-radius: var(--radius); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(34,211,238,.15); }
input[type=range] { accent-color: var(--accent); } input[type=checkbox] { accent-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--radius); overflow: hidden; flex-wrap: wrap; }
.seg button { border: none; border-radius: 0; background: transparent; color: var(--muted); padding: 6px 12px; font-size: .8rem; }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button.on { background: rgba(34,211,238,.14); color: #dffaff; box-shadow: inset 0 -2px 0 var(--accent); }
.tag { border-radius: 2px; font-family: var(--mono); font-size: .66rem; letter-spacing: .04em; background: #1c2a3f; }
.tag.ally { background: rgba(52,211,153,.18); color: #8ff0c8; } .tag.war { background: rgba(251,77,100,.2); color: #ffb3bf; } .tag.nap { background: rgba(96,165,250,.18); color: #b9d6ff; } .tag.busy { background: rgba(251,191,36,.16); color: #ffd98a; }
.chip { border-radius: 2px; background: #1a2840; } .chip.ok { background: rgba(52,211,153,.16); color: #9df3cf; } .chip.no { background: rgba(251,77,100,.16); color: #ffb9c3; }
.badge { background: var(--accent2); color: #001018; font-family: var(--mono); font-weight: 700; } .badge.red { background: var(--bad); color: #fff; }
.alert { background: rgba(251,77,100,.08); border: 1px solid rgba(251,77,100,.4); border-left: 3px solid var(--bad); border-radius: var(--radius); }
.offer { border-radius: var(--radius); background: rgba(251,191,36,.06); border-color: rgba(251,191,36,.3); border-left: 3px solid var(--warn); }
.op.good { color: var(--good); } .op.bad { color: var(--warn); } .op.hostile { color: var(--bad); }
ul.log li, ul.news li { border-bottom-color: rgba(28,42,63,.7); }
details > summary { cursor: pointer; color: var(--text2); font-size: .82rem; letter-spacing: .04em; padding: 4px 0; }
.kvline { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: .82rem; border-bottom: 1px dashed rgba(28,42,63,.9); } .kvline span { color: var(--muted); }
.motto { color: #d6c38d; }
.portrait { border-radius: var(--radius); border-color: var(--line2); }
.onboard { border-color: rgba(34,211,238,.35); background: linear-gradient(180deg, rgba(14,40,56,.9), rgba(12,19,30,.94)); }

/* ---------- situation room (map) ---------- */
body[data-tab=map] main#view { padding: 0; overflow: hidden; background: #061220; }
body[data-tab=map] main#view > * { max-width: none; }
.mapview.sitroom { position: relative; display: block; height: 100%; }
.sitroom .mapcard { position: absolute; inset: 0; padding: 0; margin: 0; }
.sitroom #mapRoot { position: absolute; inset: 0; }
.sitroom .mapwrap { aspect-ratio: auto; width: 100%; height: 100%; border: none; border-radius: 0; background: #061423; }
.sitroom .mapwrap::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(2,6,12,.55)); }
.worldmap .sea { fill: #071a2e; } .worldmap .grat { stroke: rgba(34,211,238,.07); }
.worldmap .land { stroke: rgba(34,211,238,.25); }
.worldmap .wline { stroke-dasharray: 7 5; animation: dashflow 1.1s linear infinite; filter: drop-shadow(0 0 2px rgba(255,60,80,.7)); }
.worldmap .wline.mine { stroke: #ff3b55; stroke-width: 2.2; animation-duration: .7s; }
.worldmap .wline.coal { stroke-dasharray: 12 4; animation-duration: 1.6s; }
.worldmap .wline.raid { animation-duration: 1.8s; }
.mapwrap > .maplegend { background: rgba(7,13,22,.85); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(6px); }
.sitroom .mapwrap > .maplegend { left: 12px; right: auto; bottom: 30px; max-width: calc(100% - 380px); }
.sitroom .mapside { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 316px; margin: 0; overflow-y: auto; z-index: 5; background: rgba(9,15,25,.9); backdrop-filter: blur(8px); transition: transform .2s var(--ease), opacity .2s; }
.sitroom.panel-hidden .mapside { transform: translateX(calc(100% + 20px)); opacity: 0; pointer-events: none; }
.mapside-toggle { position: absolute; z-index: 6; top: 16px; right: 338px; background: rgba(9,15,25,.9); transition: right .2s var(--ease); }
.sitroom.panel-hidden .mapside-toggle { right: 14px; }
.sit-brief { position: absolute; top: 12px; left: 12px; width: 300px; z-index: 5; margin: 0; padding: 10px 12px; background: rgba(9,15,25,.88); backdrop-filter: blur(8px); }
.sb-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.defcon-big { --dc: var(--good); display: flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 54px; border: 1px solid var(--dc); border-radius: var(--radius); background: color-mix(in srgb, var(--dc) 10%, transparent); box-shadow: 0 0 16px color-mix(in srgb, var(--dc) 30%, transparent); flex: none; }
.defcon-big small { font: 700 .5rem var(--sans); letter-spacing: .14em; color: var(--muted); } .defcon-big b { font-size: 1.6rem; line-height: 1; color: var(--dc); }
.defcon-big.d4 { --dc: var(--info); } .defcon-big.d3 { --dc: var(--warn); } .defcon-big.d2 { --dc: #ff7a3d; } .defcon-big.d1 { --dc: var(--crit); animation: pulseRing 1.2s infinite; }
.sb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-bottom: 8px; }
.sb-stats > div { display: flex; flex-direction: column; padding: 4px 6px; background: rgba(20,32,51,.6); border: 1px solid var(--line); border-radius: 2px; }
.sb-stats span { font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sb-stats b { font-size: .95rem; }
.sb-theatres { display: flex; flex-direction: column; gap: 2px; }
.sb-war { display: flex; align-items: center; gap: 5px; padding: 4px 6px; font-size: .76rem; color: var(--text2); border-radius: 2px; border-left: 2px solid rgba(251,77,100,.5); background: rgba(251,77,100,.05); }
.sb-war span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 92px; } .sb-war i { color: var(--muted); font-size: .7rem; } .sb-war b { margin-left: auto; font-size: .72rem; color: var(--muted); }
.sb-war.mine { border-left-color: var(--bad); background: rgba(251,77,100,.12); color: #ffd7dd; } .sb-war .ico { color: var(--bad); }
.sit-credit { position: absolute; left: 12px; bottom: 8px; z-index: 4; font-size: .68rem; max-width: calc(100% - 380px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .7; }
@media (max-width: 1360px) { .sit-brief { width: 270px; } }

/* ---------- war room ---------- */
.card.war.ops { border-left: 1px solid var(--line); padding: 0 0 12px; overflow: hidden; }
.card.war.ops > * { margin-left: 16px; margin-right: 16px; }
.card.war.ops.defensive { box-shadow: 0 0 0 1px rgba(251,77,100,.25), 0 8px 30px rgba(120,10,30,.25); }
.ops-head { display: flex; align-items: center; gap: 14px; margin: 0 0 12px !important; padding: 10px 16px; background: linear-gradient(90deg, rgba(251,77,100,.14), rgba(251,77,100,.02)); border-bottom: 1px solid rgba(251,77,100,.3); }
.offensive .ops-head { background: linear-gradient(90deg, rgba(34,211,238,.12), rgba(34,211,238,.02)); border-bottom-color: rgba(34,211,238,.25); }
.ops-tag { font: 700 .62rem var(--mono); letter-spacing: .16em; color: var(--bad); writing-mode: vertical-rl; transform: rotate(180deg); border-left: 1px solid rgba(251,77,100,.4); padding-left: 6px; }
.offensive .ops-tag { color: var(--accent); border-color: rgba(34,211,238,.4); }
.ops-head .warhead { flex: 1; margin: 0; }
.ops-clock { display: flex; flex-direction: column; align-items: center; padding: 4px 12px; border: 1px solid var(--line2); border-radius: var(--radius); background: rgba(7,11,18,.6); }
.ops-clock span { font-size: 1.3rem; font-weight: 700; color: var(--text); } .ops-clock small { font-size: .62rem; color: var(--muted); letter-spacing: .08em; }
.ops-clock.warn { border-color: var(--warn); } .ops-clock.warn span { color: var(--warn); }
.ops-grid { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(260px, 1.5fr) minmax(170px, 1fr); gap: 12px; align-items: stretch; }
.ops-grid .side { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,11,18,.45); }
.ops-grid .side.me { border-top: 2px solid var(--good); } .ops-grid .side.en { border-top: 2px solid var(--bad); text-align: right; }
.side-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: .95rem; } .side.en .side-h { justify-content: flex-end; }
.side .res-me-val, .side .res-en-val { font-size: 1.15rem; } .side .res-me-val { color: var(--good); } .side .res-en-val { color: var(--bad); }
.side .map-me { color: var(--accent); font-size: 1.05rem; }
.pips { display: flex; gap: 3px; margin-top: 4px; } .side.en .pips { justify-content: flex-end; }
.pips i { width: 12px; height: 8px; background: #121d2e; border: 1px solid var(--line2); border-radius: 1px; }
.side.me .pips i.on { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }
.side.en .pips i.on { background: #ff7a8c; border-color: #ff7a8c; }
.forces { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(7,11,18,.45); }
.forces-h { display: grid; grid-template-columns: 1fr auto 1fr; font: 700 .62rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.forces-h span:last-child { text-align: right; } .forces-h .ico { color: var(--accent); }
.force { display: grid; grid-template-columns: 74px 1fr 74px; align-items: center; gap: 8px; padding: 3px 0; }
.fv { font-size: .86rem; } .fv.me { color: #9ff3d2; } .fv.en { color: #ffb3bf; text-align: right; }
.fmid { display: flex; flex-direction: column; align-items: center; gap: 2px; } .fname { font-size: .72rem; color: var(--text2); display: inline-flex; gap: 4px; align-items: center; }
.fbar { display: flex; width: 100%; height: 5px; border-radius: 1px; overflow: hidden; background: #121d2e; }
.fbar i.me { background: var(--good); } .fbar i.en { background: var(--bad); }
.warflags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px !important; color: inherit; }
.ctl { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; font-size: .76rem; border-radius: 2px; border: 1px solid var(--line2); }
.ctl.ours { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.07); color: #b3f5da; } .ctl.theirs { border-color: rgba(251,77,100,.4); background: rgba(251,77,100,.07); color: #ffc4cc; }
.battlereport { display: flex; gap: 12px; align-items: flex-start; margin-top: 10px !important; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--radius); background: rgba(7,11,18,.6); position: relative; overflow: hidden; }
.battlereport.mine { border-left: 3px solid var(--good); } .battlereport.theirs { border-left: 3px solid var(--bad); }
.br-ico { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: var(--radius); background: rgba(34,211,238,.08); color: var(--accent); flex: none; }
.battlereport.theirs .br-ico { background: rgba(251,77,100,.1); color: var(--bad); }
.br-body { flex: 1; min-width: 0; } .br-top { margin-bottom: 2px; } .br-kind { font-size: 1rem; } .br-text { color: var(--text2); margin-top: 3px; }
.tier { border-radius: 2px; font-family: var(--mono); letter-spacing: .05em; text-transform: uppercase; font-size: .68rem; padding: 1px 6px; }
.battlereport.reveal { animation: reportIn .7s var(--ease); }
.battlereport.reveal::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); animation: sheen .9s .1s ease-out; }
.battlereport.reveal .tier { animation: stamp .45s .25s var(--ease) both; }
.cmd-deck.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; align-items: stretch; margin-top: 12px !important; flex-direction: initial; }
.cmd-wrap { display: flex; flex-direction: column; gap: 4px; }
.cmd-wrap select { width: 100%; font-size: .76rem; padding: 3px 6px; }
button.cmd { position: relative; display: grid; grid-template-rows: auto auto; justify-items: center; gap: 4px; padding: 12px 8px 10px; min-height: 84px; background: linear-gradient(180deg, #13223a, #0d1828); border: 1px solid var(--line2); border-radius: var(--radius); font-weight: 650; font-size: .84rem; }
button.cmd::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: .5; }
button.cmd .cmd-ico { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
button.cmd .cost { position: absolute; top: 5px; right: 5px; font-size: .62rem; padding: 1px 5px; border-radius: 2px; background: rgba(34,211,238,.12); color: #9bebf8; border: 1px solid rgba(34,211,238,.3); }
button.cmd:hover:not(:disabled) { background: linear-gradient(180deg, #19304f, #102037); box-shadow: 0 0 18px rgba(34,211,238,.18); }
button.cmd:disabled { opacity: .38; }
button.cmd.nuke .cmd-ico, button.cmd.nuke::before { color: var(--warn); background: var(--warn); } button.cmd.nuke::before { background: var(--warn); } button.cmd.nuke .cmd-ico { background: none; }
button.cmd.nuke .cost { background: rgba(251,191,36,.12); color: #ffe199; border-color: rgba(251,191,36,.35); }
.peacebox { justify-content: center; } .peacebox button { min-height: 40px; }
ul.log.feed { max-height: 240px; } ul.log.feed li { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; padding: 5px 6px; border-left: 2px solid transparent; }
ul.log.feed li.out { border-left-color: rgba(52,211,153,.5); } ul.log.feed li.in { border-left-color: rgba(251,77,100,.5); background: rgba(251,77,100,.03); }
ul.log.feed li .dir { color: var(--muted); }
.card.outcome { display: flex; gap: 14px; align-items: flex-start; }
.card.outcome .oc-ico { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; flex: none; border-radius: 50%; border: 1px solid var(--line2); color: var(--muted); }
.card.outcome.won { border-color: rgba(52,211,153,.45); } .card.outcome.won .oc-ico { color: var(--good); border-color: var(--good); box-shadow: 0 0 18px rgba(52,211,153,.3); }
.card.outcome.lost { border-color: rgba(251,77,100,.45); } .card.outcome.lost .oc-ico { color: var(--bad); border-color: var(--bad); }
.oc-body { flex: 1; min-width: 0; } .oc-tag { font: 700 .62rem var(--mono); letter-spacing: .18em; color: var(--muted); } .card.outcome.won .oc-tag { color: var(--good); } .card.outcome.lost .oc-tag { color: var(--bad); }
.card.outcome h3 { margin-top: 2px; font-size: 1rem; text-transform: none; letter-spacing: 0; } .card.outcome h3::before { display: none; }
@media (max-width: 1250px) { .ops-grid { grid-template-columns: 1fr 1fr; } .ops-grid .forces { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- diplomacy comms ---------- */
.dip.comms { grid-template-columns: 260px minmax(0, 1fr) 280px; container-type: inline-size; }
.dip.comms .card { margin-bottom: 0; }
.diplist { max-height: calc(100vh - 160px); padding: 10px; }
.diplist > input { width: 100%; margin-bottom: 6px; }
.dipitem { border-radius: var(--radius); border-left: 2px solid transparent; }
.dipitem.sel { border-color: transparent; border-left-color: var(--accent); background: rgba(34,211,238,.08); }
.dipmain { display: flex; flex-direction: column; min-height: calc(100vh - 160px); }
.dipmain .diphead { align-items: center; flex-wrap: wrap; }
.dipmain .diphead h2 { margin: 0 0 3px; font-size: 1.05rem; }
.chan { display: inline-flex; align-items: center; gap: 6px; width: 100%; font: 700 .64rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--good); }
.chan b { color: var(--muted); font-weight: 600; }
.chan-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); animation: blink 2s ease-in-out infinite; }
.llmchip { border-radius: 2px; font-family: var(--mono); background: #142033; border: 1px solid var(--line2); }
.llmchip.on { background: rgba(34,211,238,.1); color: #a9f0fb; border-color: rgba(34,211,238,.35); }
.thread { flex: 1; height: auto; min-height: 280px; max-height: calc(100vh - 470px); padding: 12px 6px; background: linear-gradient(rgba(34,211,238,.02) 1px, transparent 1px) 0 0 / 100% 22px; }
.msg { border-radius: var(--radius); border: 1px solid var(--line); background: #111c2d; position: relative; }
.msg.player { background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.3); }
.msg.ai { border-left: 2px solid var(--warn); }
.msg .meta { font-family: var(--mono); font-size: .66rem; letter-spacing: .03em; }
.msg .prop { color: #ffd98a; }
.composer textarea { min-height: 70px; }
.dipdossier { padding-bottom: 12px; }
.dd-flag { position: relative; margin-bottom: 8px; } .dd-flag svg, .dd-flag img:first-child { width: 100%; height: auto; display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.dd-flag .portrait { position: absolute; right: 8px; bottom: -14px; border: 2px solid var(--card); width: 64px; height: 64px; }
.dipdossier h3 { margin-top: 14px; text-transform: none; letter-spacing: 0; font-size: .98rem; color: var(--text); } .dipdossier h3::before { display: none; }
.gauge.op > div, .bar.gauge.op > div { background: linear-gradient(90deg, var(--bad), var(--warn) 50%, var(--good)); background-size: 200% 100%; }
@container (max-width: 1050px) {
  .dip.comms { grid-template-columns: 240px minmax(0, 1fr); }
  .dipdossier { grid-column: 2; }
}
@media (max-width: 1200px) { .dip.comms { grid-template-columns: 230px minmax(0, 1fr); } .dipdossier { grid-column: 2; } }

/* ---------- nation dossier / military ---------- */
.dossier .nation-hero { padding: 6px 0 8px; }
.dossier .bigflag svg { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 8px 24px rgba(0,0,0,.5); border-radius: 2px; }
.dossier h2 { font-size: 1.4rem; }
.unitgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin: 10px 0; }
.unitcard { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(22,35,56,.8), rgba(12,19,30,.8)); }
.unitcard::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .6; }
.unitcard.locked { opacity: .55; } .unitcard.locked::before { background: linear-gradient(90deg, var(--warn), transparent); }
.uc-top { display: flex; align-items: center; gap: 10px; }
.uc-ico { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius); background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.2); color: var(--accent); flex: none; overflow: hidden; }
.uc-ico img { width: 100%; height: 100%; object-fit: cover; }
.uc-name { flex: 1; min-width: 0; } .uc-count { font-size: 1.5rem; font-weight: 700; color: #f0f8ff; }
.uc-stats { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; } .uc-stats > div { display: flex; flex-direction: column; } .uc-stats span { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; }
.uc-act { display: flex; gap: 4px; align-items: center; } .uc-act input { width: 86px; } .uc-act button { padding: 5px 9px; }

/* ---------- projects ---------- */
.projcat { margin-top: 10px; }
.projtree { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.ptier { flex: 1 1 0; min-width: 250px; position: relative; }
.projtree.multi .ptier + .ptier::before { content: ''; position: absolute; left: -12px; top: 34px; width: 10px; height: 10px; border-top: 2px solid var(--line2); border-right: 2px solid var(--line2); transform: rotate(45deg); }
.ptier-h { font: 700 .6rem var(--mono); letter-spacing: .16em; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; }
.ptier-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.projcard { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13,21,33,.85); }
.projcard.built { border-color: rgba(52,211,153,.45); background: linear-gradient(180deg, rgba(20,60,48,.35), rgba(13,21,33,.85)); }
.projcard.built::after { content: ''; position: absolute; inset: 0; border-left: 3px solid var(--good); border-radius: var(--radius); pointer-events: none; }
.projcard.ready { border-color: rgba(34,211,238,.45); box-shadow: 0 0 14px rgba(34,211,238,.08); }
.projcard.dim { opacity: .62; }
.pc-h b { font-size: .92rem; } .pc-eff { color: var(--text2); } .pc-cost { color: var(--text2); } .pc-req { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; border-top: 1px dashed rgba(28,42,63,.9); }
.pc-why { text-align: right; }

/* ---------- news briefing ---------- */
.brief-lead .kicker { font: 700 .64rem var(--mono); letter-spacing: .16em; color: var(--warn); text-transform: uppercase; }
.brief-h { font-size: 1.5rem; margin: 4px 0 6px; line-height: 1.2; }
.brief-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1200px) { .brief-grid { grid-template-columns: minmax(0, 1fr); } }
.brief-items { display: flex; flex-direction: column; gap: 6px; }
.bitem { display: flex; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: rgba(7,11,18,.5); }
.bitem .bi-ico { color: var(--accent); margin-top: 1px; } .bitem.bad { border-left-color: var(--bad); } .bitem.bad .bi-ico { color: var(--bad); }
.bitem.crit { border-left-color: var(--warn); background: rgba(251,191,36,.06); } .bitem.crit .bi-ico { color: var(--warn); }
.bitem.good { border-left-color: var(--good); } .bitem.good .bi-ico { color: var(--good); } .bitem.warn { border-left-color: var(--warn); } .bitem.warn .bi-ico { color: var(--warn); }
.brief-forum { grid-template-columns: 1fr; }
.forum .post { border-radius: var(--radius); background: rgba(20,32,51,.6); border: 1px solid var(--line); border-left: 3px solid var(--warn); }
.ranklist { padding-left: 20px; } .ranklist li { display: flex; justify-content: space-between; padding: 2px 0; } .ranklist li::marker { color: var(--muted); }
.paper { border-radius: 2px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }

/* ---------- alliance treasury ---------- */
.vault { margin: 6px 0 12px; }
.vault-total { display: flex; align-items: baseline; gap: 12px; padding: 10px 12px; border: 1px solid rgba(34,211,238,.3); border-radius: var(--radius); background: linear-gradient(90deg, rgba(34,211,238,.1), transparent); margin-bottom: 8px; }
.vault-total span { display: inline-flex; gap: 6px; align-items: center; font: 700 .66rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.vault-total b { font-size: 1.5rem; color: #fff; }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.vtile { display: flex; flex-direction: column; padding: 6px 8px; border: 1px solid var(--line); border-radius: 2px; background: rgba(7,11,18,.5); }
.vt-h { display: flex; gap: 5px; align-items: center; font-size: .68rem; color: var(--muted); } .vt-h .ico { color: var(--accent); }
.vtile b { font-size: .92rem; } .vtile small { font-size: .66rem; }
.treasury-ops { border-top: 1px solid var(--line); padding-top: 8px; }

/* ---------- nationbook ---------- */
.nb { display: grid; grid-template-columns: 270px minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
.nb-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 0; }
.nb-side .card { margin-bottom: 12px; }
.nb-side textarea { width: 100%; margin-bottom: 6px; } .nb-side label.small { display: flex; flex-direction: column; gap: 3px; color: var(--muted); margin-bottom: 6px; } .nb-side label.check { display: flex; flex-direction: row; gap: 8px; align-items: flex-start; color: var(--text2); line-height: 1.35; }
.nb-top { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; } .nb-top h2 { margin: 0; }
.nb-feed { display: flex; flex-direction: column; gap: 8px; }
.nb-post { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(18,28,43,.92), rgba(12,19,30,.92)); animation: feedIn .3s var(--ease); }
.nb-post.reply { padding: 8px 0 0; border: none; border-top: 1px dashed rgba(28,42,63,.9); border-radius: 0; background: none; animation: none; }
.nb-post.mine { border-color: rgba(34,211,238,.4); } .nb-post.atme { border-color: rgba(251,191,36,.45); box-shadow: inset 3px 0 0 var(--warn); }
.nb-post.fcpost { border-color: rgba(96,165,250,.5); background: linear-gradient(180deg, rgba(20,40,70,.6), rgba(12,19,30,.92)); }
.nb-avcol { flex: none; }
.nb-av { display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: #142033; box-shadow: 0 0 0 1px var(--line2); flex: none; vertical-align: middle; object-fit: cover; }
.nb-av svg { flex: none; } .nb-av.fc { background: #12305a; color: #9cc7ff; }
.nb-body { flex: 1; min-width: 0; }
.nb-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: .82rem; }
.nb-name { color: #eef6ff; } .nb-handle { font-size: .74rem; }
.nb-text { margin: 4px 0 6px; font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.nb-tag { color: var(--accent); font-weight: 600; }
.nb-kind { font: 700 .58rem var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 1px 5px; border-radius: 2px; background: #1a2840; color: var(--muted); }
.nb-kind.k-trash, .nb-kind.k-flame { background: rgba(251,77,100,.15); color: #ffb3bf; } .nb-kind.k-conspiracy { background: rgba(251,191,36,.14); color: #ffd98a; } .nb-kind.k-propaganda { background: rgba(167,139,250,.16); color: #d4c6ff; } .nb-kind.k-boast { background: rgba(52,211,153,.14); color: #9df3cf; } .nb-kind.k-factcheck { background: rgba(96,165,250,.18); color: #b9d6ff; }
.nb-src { font: 700 .56rem var(--mono); letter-spacing: .1em; color: #a9f0fb; border: 1px solid rgba(34,211,238,.35); padding: 0 4px; border-radius: 2px; text-transform: uppercase; }
.nb-quote { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; padding: 6px 8px; border: 1px solid var(--line2); border-left: 2px solid var(--accent); border-radius: 2px; font-size: .8rem; background: rgba(7,11,18,.5); }
.nb-badge { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; font: 700 .64rem var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 2px; }
.nb-badge.unv { color: var(--warn); border: 1px dashed rgba(251,191,36,.6); background: rgba(251,191,36,.06); }
.nb-badge.false { color: #fff; background: var(--bad); } .nb-badge.true { color: #00170e; background: var(--good); }
.nb-reacts { display: flex; flex-wrap: wrap; gap: 4px; }
.nb-react { padding: 2px 8px; font-size: .74rem; background: transparent; border-color: transparent; color: var(--muted); gap: 4px; }
.nb-react:hover:not(:disabled) { background: rgba(34,211,238,.06); border-color: var(--line2); color: var(--text); }
.nb-react.on { color: var(--accent); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.08); }
.nb-replybox { display: flex; gap: 6px; margin: 6px 0; } .nb-replybox input { flex: 1; }
.nb-replies { margin-top: 6px; padding-left: 4px; border-left: 2px solid rgba(28,42,63,.9); padding-left: 10px; }
.nb-trend, .nb-feud { display: flex; align-items: center; gap: 6px; justify-content: space-between; padding: 4px 0; font-size: .8rem; border-bottom: 1px dashed rgba(28,42,63,.8); }
.nb-feud { justify-content: flex-start; } .nb-feud .muted.mono { margin-left: auto; }
@media (max-width: 1400px) { .nb { grid-template-columns: 250px minmax(0, 1fr); } .nb-side.right { display: none; } }

/* ---------- toasts / modals ---------- */
#toasts { bottom: calc(var(--tick-h) + 14px); right: 16px; }
body:not(.intel-closed) #toasts { right: calc(var(--intel-w) + 16px); }
@media (max-width: 1599px) { body:not(.intel-closed) #toasts { right: 16px; } }
.toast { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius); background: rgba(14,23,37,.97); border: 1px solid var(--line2); border-left: 3px solid var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,.55); backdrop-filter: blur(6px); transform: translateX(110%); opacity: 0; transition: transform .28s var(--ease), opacity .28s; }
.toast.show { transform: none; opacity: 1; }
.t-ico { display: inline-flex; color: var(--accent); margin-top: 1px; } .toast.good .t-ico { color: var(--good); } .toast.bad .t-ico { color: var(--bad); } .toast.info .t-ico { color: var(--warn); }
.toast.bad { border-left-color: var(--bad); }
.modal-bg { background: rgba(2,5,10,.78); backdrop-filter: blur(3px); }
.modal { border-radius: var(--r2); background: linear-gradient(180deg, #111b2b, #0c1421); border-color: var(--line2); box-shadow: 0 20px 70px rgba(0,0,0,.7), 0 0 0 1px rgba(34,211,238,.08); animation: modalIn .2s var(--ease); }
.modal::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .7; }
fieldset { border-radius: var(--radius); border-color: var(--line); background: rgba(7,11,18,.35); } legend { color: var(--accent); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- turn sweep ---------- */
#sweep { position: fixed; inset: 0; z-index: 150; pointer-events: none; display: none; overflow: hidden; }
#sweep.run { display: block; }
#sweep .sw-band { position: absolute; top: 0; bottom: 0; width: 45vw; left: -50vw; background: linear-gradient(90deg, transparent, rgba(34,211,238,.06) 30%, rgba(34,211,238,.22) 85%, rgba(160,245,255,.6) 99%, transparent);
  border-right: 2px solid rgba(160,245,255,.9); box-shadow: 10px 0 40px rgba(34,211,238,.5); animation: sweep .95s cubic-bezier(.5,.1,.3,1) forwards; }
#sweep .sw-text { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 40px; background: rgba(5,10,18,.82); border: 1px solid rgba(34,211,238,.5); border-radius: var(--radius); box-shadow: 0 0 40px rgba(34,211,238,.25); animation: sweepText 1.05s ease forwards; }
#sweep .sw-text span { font: 700 .7rem var(--mono); letter-spacing: .3em; color: var(--accent); } #sweep .sw-text b { font: 800 2rem var(--mono); letter-spacing: .08em; color: #fff; } #sweep .sw-text small { color: var(--muted); font-size: .74rem; }
.view-enter { animation: viewIn .24s var(--ease); }

/* ---------- keyframes ---------- */
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes feedIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes dashflow { to { stroke-dashoffset: -24; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes pulseBorder { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,45,85,0); } 50% { box-shadow: 0 0 0 3px rgba(255,45,85,.25), 0 0 16px rgba(255,45,85,.35); } }
@keyframes pulseRing { 0%, 100% { box-shadow: 0 0 6px rgba(255,45,85,.4); } 50% { box-shadow: 0 0 22px rgba(255,45,85,.85); } }
@keyframes pulseAlert { 0%, 100% { background: rgba(251,77,100,.08); } 50% { background: rgba(251,77,100,.2); } }
@keyframes reportIn { 0% { opacity: 0; transform: scaleY(.6); filter: brightness(2); } 60% { opacity: 1; transform: scaleY(1.02); } 100% { transform: none; filter: none; } }
@keyframes sheen { to { left: 120%; } }
@keyframes stamp { from { transform: scale(1.8); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sweep { to { left: 110vw; } }
@keyframes sweepText { 0% { opacity: 0; transform: translate(-50%, -40%); } 20% { opacity: 1; transform: translate(-50%, -50%); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -56%); } }
.intel-item.pulse, .pulse.alert { animation: pulseAlert 1.6s ease-in-out infinite; }
.nbadge.pulse { animation: blink 1s ease-in-out infinite; }

/* ---------- reduced motion ---------- */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; }
body.reduce-motion .tk-track { overflow-x: auto; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .tk-track { overflow-x: auto; }
}

/* ---------- misc existing views ---------- */
.cities { grid-template-columns: 260px minmax(0, 1fr); }
.citylist { top: 0; }
.citycard { border-radius: var(--radius); } .citycard.sel { border-color: transparent; border-left: 2px solid var(--accent); background: rgba(34,211,238,.08); }
.rprod { display: inline-flex; gap: 3px; align-items: center; margin-right: 8px; font-family: var(--mono); }
.rprod .ico { color: var(--accent); }
.bundle label .ico { color: var(--accent); }
@media (max-width: 1360px) { :root { --rail-w: 188px; } main#view { padding: 14px 16px 20px; } .brand { flex-basis: 190px; } }
/* fixes after first visual pass */
#tabs.rail button[data-tab] { justify-content: flex-start; }
body.rail-collapsed #tabs.rail button[data-tab] { justify-content: center; }
.stat { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 0 10px; }
.stat .k { font-size: .56rem; line-height: 1; }
.stat .sv { display: flex; align-items: center; gap: 6px; line-height: 1.1; }
.stat b { font-size: .95rem; } .stat b.big { font-size: 1rem; }
.dc-bars { height: 14px; } .dc-bars i:nth-child(1) { height: 5px; } .dc-bars i:nth-child(2) { height: 7px; } .dc-bars i:nth-child(3) { height: 9px; } .dc-bars i:nth-child(4) { height: 12px; } .dc-bars i:nth-child(5) { height: 14px; }
.brand { flex: 0 1 220px; }
ul.log.feed li { display: block; }
ul.log.feed li .ico { vertical-align: -2px; }
.uc-act { flex-wrap: wrap; } .uc-act input { flex: 1 1 64px; min-width: 0; width: auto; } .uc-act button { flex: none; }
.statgrid b.small { font-size: .8rem; font-family: var(--sans); font-weight: 500; line-height: 1.5; }
.ops-tag { writing-mode: horizontal-tb; transform: none; border: 1px solid rgba(251,77,100,.45); padding: 3px 7px; border-radius: 2px; white-space: nowrap; align-self: flex-start; margin-top: 2px; }
.offensive .ops-tag { border-color: rgba(34,211,238,.45); }
.sitroom .mapctl { left: auto; right: 340px; top: 56px; z-index: 6; transition: right .2s var(--ease); }
.sitroom.panel-hidden .mapctl { right: 16px; }
.mapctl button { background: rgba(9,15,25,.9); border-color: var(--line2); color: var(--text); }
.mapctl button:hover:not(:disabled) { color: var(--accent); }

/* ---------------- Round 7: battle cutscenes (Advance Wars-style replays) ---------------- */
.cs-overlay { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(6,12,22,.86), rgba(2,4,9,.95)); animation: csFade .18s var(--ease); }
.cs-overlay[hidden] { display: none; }
@keyframes csFade { from { opacity: 0; } to { opacity: 1; } }
.cs-frame { width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 24px); display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 10px; background: linear-gradient(180deg, #101a2a, #0a111c); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 0 0 1px rgba(34,211,238,.12), 0 24px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.04); animation: csPop .22s var(--ease); }
@keyframes csPop { from { transform: translateY(10px) scale(.98); opacity: .4; } to { transform: none; opacity: 1; } }
.cs-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.cs-side { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 10px; border-radius: 6px; background: linear-gradient(90deg, color-mix(in srgb, var(--team, #888) 26%, transparent), transparent); border-left: 4px solid var(--team, #888); }
.cs-side.def { flex-direction: row-reverse; text-align: right; background: linear-gradient(270deg, color-mix(in srgb, var(--team, #888) 26%, transparent), transparent); border-left: none; border-right: 4px solid var(--team, #888); }
.cs-flag svg, .cs-flag img { width: 36px; height: 24px; display: block; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.cs-nm { display: flex; flex-direction: column; min-width: 0; }
.cs-nm b { font: 700 .95rem var(--sans); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-nm small { font: 600 .62rem var(--mono); letter-spacing: .16em; color: var(--muted); }
.cs-nm em { font-style: normal; color: var(--accent); }
.cs-title { text-align: center; display: flex; flex-direction: column; }
.cs-kind { font-size: .66rem; line-height: 1.6; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.cs-title small { font: 500 .66rem var(--mono); color: var(--muted); letter-spacing: .1em; }
.cs-inc { color: var(--crit); }
.cs-stage { position: relative; border-radius: 6px; overflow: hidden; border: 2px solid #05080d; box-shadow: 0 0 0 1px var(--line2), inset 0 0 0 1px rgba(255,255,255,.04); background: #000; cursor: pointer; aspect-ratio: 320 / 176; max-height: calc(100vh - 290px); margin: 0 auto; width: 100%; }
.cs-stage canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } /* Round 9: 320×176 pixel buffer blitted at an integer scale; JS sizes the stage to 320·SC CSS px */
.cs-stage { border-radius: 0; border: 3px solid #06080e; box-shadow: 0 0 0 2px #e8ecf8, 0 0 0 4px #06080e; }
/* Round 9: AW-style pixel typography (Press Start 2P, OFL) — banner, unit counters, titles */
.cs-px, .cs-bn-main, .cs-bn-sub, .cs-bn-persp, .cs-uc b, .cs-kind, .cs-queue, .cs-alert h2 { font-family: "Press Start 2P", var(--mono); font-style: normal; -webkit-font-smoothing: none; font-smooth: never; }
.cs-banner { position: absolute; left: 0; right: 0; top: 50%; transform: translate(-110%, -50%); padding: 10px 0 8px; text-align: center; pointer-events: none;
  background: color-mix(in srgb, var(--tier) 82%, #06080e); box-shadow: inset 0 4px 0 color-mix(in srgb, var(--tier) 55%, #fff), inset 0 -4px 0 color-mix(in srgb, var(--tier) 55%, #000), 0 4px 0 #06080e, 0 -4px 0 #06080e;
  border-top: 4px solid #f8f8f8; border-bottom: 4px solid #f8f8f8; transition: transform .3s steps(8, end); } /* Round 9: flat pixel band, slides in in 8 steps */
.cs-banner.show { transform: translate(0, -50%); }
.cs-overlay.static .cs-banner { transition: none; }
.cs-bn-main { font-size: clamp(1rem, 2.6vw, 1.8rem); line-height: 1.3; letter-spacing: .04em; text-transform: uppercase; color: #fff; text-shadow: 3px 3px 0 #06080e; }
.cs-bn-sub, .cs-bn-persp { font-size: .55rem; line-height: 1.8; letter-spacing: .06em; color: #fff; text-transform: uppercase; text-shadow: 2px 2px 0 #06080e; }
.cs-bn-persp { color: #fff7c2; }
.cs-hud { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cs-units { display: flex; flex-direction: column; gap: 4px; }
.cs-u { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; align-items: center; gap: 8px; padding: 4px 8px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.cs-units.def .cs-u { grid-template-columns: auto 90px minmax(0, 1fr); }
.cs-units.def .cs-un { order: 3; text-align: right; } .cs-units.def .cs-bar { order: 2; } .cs-units.def .cs-uc { order: 1; text-align: left; }
.cs-units.def .cs-bar i { margin-left: auto; }
.cs-un { font: 600 .74rem var(--sans); color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-bar { height: 6px; border-radius: 0; background: #1d1414; overflow: hidden; display: flex; box-shadow: inset 0 0 0 1px rgba(0,0,0,.5); }
.cs-bar i { display: block; height: 100%; background: #58d858; box-shadow: inset 0 -2px 0 #2a9a3a; transition: none; }
.cs-uc { text-align: right; white-space: nowrap; }
.cs-uc b { font-size: .7rem; color: var(--text); }
.cs-uc b.ticking { color: #ff8a8a; }
.cs-uc s { text-decoration: none; margin-left: 6px; font: 600 .66rem var(--mono); color: var(--bad); }
.cs-summary { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s; }
.cs-summary.show { opacity: 1; transform: none; }
.cs-overlay.static .cs-summary { opacity: 1; transform: none; transition: none; }
.cs-sum { display: flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--line2); border-radius: 999px; background: var(--card2); font-size: .74rem; }
.cs-sl { color: var(--muted); } .cs-sum b { color: var(--text); font-family: var(--mono); }
.cs-foot { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.cs-queue { margin-right: auto; font: 700 .7rem var(--mono); letter-spacing: .12em; color: var(--accent); }
.cs-hint { font-size: .68rem; color: var(--muted); margin-right: 6px; }
.cs-incoming { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(-45deg, rgba(255,45,85,.10) 0 18px, rgba(0,0,0,0) 18px 36px), radial-gradient(circle, rgba(60,6,18,.9), rgba(8,2,6,.96)); cursor: default; }
.cs-incoming[hidden] { display: none; }
.cs-alert { text-align: center; max-width: 560px; padding: 14px; }
.cs-alert h2 { margin: 6px 0; font-size: clamp(1rem, 2.6vw, 1.6rem); line-height: 1.4; letter-spacing: .04em; color: #fff; text-shadow: 3px 3px 0 #000; animation: csPulse .8s ease-in-out infinite alternate; }
@keyframes csPulse { from { opacity: .75; } to { opacity: 1; } }
.cs-siren { width: 46px; height: 14px; margin: 0 auto; border-radius: 8px 8px 2px 2px; background: linear-gradient(90deg, #ff2d55 50%, #60a5fa 50%); box-shadow: 0 0 22px rgba(255,45,85,.9); animation: csSiren .5s steps(2) infinite; }
@keyframes csSiren { 50% { filter: hue-rotate(180deg); box-shadow: 0 0 22px rgba(96,165,250,.9); } }
.cs-alert p { color: var(--text2); margin: 4px 0 10px; }
.cs-inlist { list-style: none; margin: 0 auto 12px; padding: 0; max-width: 460px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.cs-inlist li { display: grid; grid-template-columns: 24px auto 1fr auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 4px; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.08); font-size: .8rem; }
.cs-inlist em { font-style: normal; font-weight: 700; font-size: .72rem; }
.cs-inbtns { display: flex; gap: 8px; justify-content: center; }
.cs-auto { margin-top: 8px; }
body.cs-open #toasts { z-index: 300; } /* toasts stay under the replay */
.cs-side:empty { visibility: hidden; }
/* AI-vs-AI battles: a small pulse on the defender's capital */
.markersg .csflash { fill: none; stroke: #ffb02e; stroke-width: 2.5; pointer-events: none; transform-box: fill-box; transform-origin: center; animation: csFlash 1.6s ease-out both; }
.markersg .csflash.k-naval { stroke: #60a5fa; } .markersg .csflash.k-air { stroke: #e5e7eb; } .markersg .csflash.k-nuke { stroke: #fde047; stroke-width: 4; } .markersg .csflash.k-missile { stroke: #fb4d64; }
@keyframes csFlash { 0% { transform: scale(.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cs-banner { transition: none; } .cs-overlay, .cs-frame { animation: none; } .cs-alert h2, .cs-siren { animation: none; } }
@media (max-height: 760px) { .cs-hud .cs-u { padding: 2px 6px; } .cs-frame { gap: 6px; padding: 8px 10px; } }

