:root {
  --bg: #0b0f15;
  --bg-2: #0f151e;
  --panel: #121a24;
  --panel-2: #18222f;
  --line: #222e3e;
  --line-2: #2f3e53;
  --text: #e9eef5;
  --muted: #8fa0b6;
  --faint: #66778e;
  --accent: #f0b24a;
  --accent-ink: #1b1306;
  --accent-soft: rgba(240, 178, 74, .12);
  --c-buildings: #e9b04f;
  --c-tech: #5aa9e6;
  --c-troops: #4fc1a6;
  --c-heroes: #a98be6;
  --c-vehicle: #e7787d;
  --good: #5fd08f;
  --bad: #ef7d7d;
  --radius: 14px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', 'Noto Sans', 'Noto Sans CJK JP', 'Malgun Gothic', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  font-feature-settings: 'tnum' 1, 'cv11' 1;
  -webkit-font-smoothing: antialiased;
}
/* No global `img { display:block }`: html2canvas measures text baselines with an
   inline <img>, and that rule shifts every PDF label down. */
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: rgba(11, 15, 21, .82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; align-items: baseline; gap: 8px; font-family: var(--display); letter-spacing: .06em; }
.brand-text b { font-size: 22px; font-weight: 700; }
.brand-text small { font-size: 15px; font-weight: 600; color: var(--accent); }
.actions { display: flex; align-items: center; gap: 8px; }
.lang {
  display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); color: var(--muted);
}
.lang svg { width: 18px; height: 18px; flex: none; }
.lang select { background: transparent; border: 0; color: var(--text); font-weight: 500; padding: 0; cursor: pointer; outline: none; }
.lang select option { background: var(--panel); }
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: #46597a; background: #1e2a3a; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { background: #f6c066; border-color: transparent; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -12%, rgba(240, 178, 74, .20), transparent 62%),
    radial-gradient(680px 380px at -8% 115%, rgba(79, 193, 166, .10), transparent 60%),
    linear-gradient(180deg, #0f1620, var(--bg));
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 20%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 90% at 70% 20%, #000 25%, transparent 75%);
}
.hero-num {
  position: absolute; right: -1vw; bottom: -0.16em; pointer-events: none; user-select: none;
  font: 700 clamp(200px, 34vw, 460px)/1 var(--display); letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(240, 178, 74, .16);
}
.hero-inner { position: relative; max-width: 1360px; margin: 0 auto; padding: 56px 16px 52px; }
.kicker {
  margin: 0 0 6px; display: inline-flex; align-items: center; gap: 10px;
  font: 600 13px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--accent); }
.hero h1 {
  margin: 0; font: 700 clamp(64px, 12vw, 132px)/.92 var(--display);
  letter-spacing: .015em; text-transform: uppercase;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .4);
}
.server {
  display: inline-block; vertical-align: .22em; margin-left: .08em;
  padding: .06em .3em .04em; font-size: .42em; letter-spacing: .06em;
  background: var(--accent); color: var(--accent-ink);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 88% 100%, 0 100%);
}
.lead { margin: 18px 0 0; font-size: 18px; font-weight: 600; color: var(--text); max-width: 640px; }
.lead-sub { font-size: 15px; font-weight: 400; color: var(--muted); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hchip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(18, 26, 36, .7);
  font-size: 13px; color: var(--muted);
}
.hchip b { color: var(--text); font-weight: 600; }
.hazard {
  height: 8px;
  background: repeating-linear-gradient(135deg, var(--accent) 0 14px, #0b0f15 14px 28px);
  opacity: .9;
}
.hazard.thin { height: 4px; opacity: .55; }

/* ---------- layout ---------- */
.wrap { max-width: 1360px; margin: 0 auto; padding: 24px 16px 40px; }
.block { margin: 28px 0; }
.h2 {
  margin: 0; font: 700 22px/1.15 var(--display); letter-spacing: .05em; text-transform: uppercase;
}
.hint { margin: 2px 0 0; font-size: 13px; color: var(--faint); }
.panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; margin: 20px 0;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: 1fr; }
.grid-2 .panel { margin: 0; }
@media (min-width: 980px) { .grid-2 { grid-template-columns: 1fr 1fr; margin: 20px 0; } }

/* ---------- KPIs ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.kpi {
  position: relative; padding: 14px 16px 15px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); overflow: hidden;
}
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .8; }
.kpi-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi-value { margin-top: 4px; font: 700 34px/1 var(--display); letter-spacing: .02em; color: var(--accent); }
.kpi-sub { margin-top: 6px; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- podium ---------- */
.podium { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .podium { grid-template-columns: repeat(3, 1fr); align-items: end; }
  .podium .pod-1 { order: 2; } .podium .pod-2 { order: 1; } .podium .pod-3 { order: 3; }
  .podium .pod-1 .pod-card { padding-top: 30px; padding-bottom: 26px; }
}
.pod-card {
  position: relative; display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 18px; border-radius: var(--radius); text-align: left; cursor: pointer;
  background: linear-gradient(160deg, #1a2533, var(--panel) 60%);
  border: 1px solid var(--line-2);
  transition: border-color .15s, transform .15s;
}
.pod-card:hover { border-color: #4a5d7c; transform: translateY(-2px); }
.pod-1 .pod-card { border-color: rgba(240, 178, 74, .55); background: linear-gradient(160deg, #2a2416, var(--panel) 65%); box-shadow: 0 10px 40px -18px rgba(240, 178, 74, .5); }
.pod-av { position: relative; flex: none; }
.pod-av img { display: block; width: 76px; height: 76px; border-radius: 14px; object-fit: cover; border: 2px solid var(--line-2); }
.pod-1 .pod-av img { width: 92px; height: 92px; border-color: var(--accent); }
.pod-medal {
  position: absolute; left: -8px; top: -8px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font: 700 16px/1 var(--display);
  background: #c9d2de; color: #101722; border: 2px solid var(--bg);
}
.pod-1 .pod-medal { background: var(--accent); }
.pod-3 .pod-medal { background: #d19a6a; }
.pod-info { min-width: 0; }
.pod-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.pod-name span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-power { margin-top: 2px; font: 700 30px/1.05 var(--display); color: var(--text); letter-spacing: .02em; }
.pod-1 .pod-power { color: var(--accent); font-size: 36px; }
.pod-meta { font-size: 13px; color: var(--muted); }

/* ---------- tools ---------- */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 220px; max-width: 340px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg-2); color: var(--faint);
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--muted); margin-left: auto; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; width: 36px; height: 20px; border-radius: 99px; background: var(--line-2); transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #cfd8e3; transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); background: var(--accent-ink); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }
.select {
  height: 38px; padding: 0 34px 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%238fa0b6' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  -webkit-appearance: none; appearance: none; cursor: pointer; font-weight: 500;
}
.select option { background: var(--panel); }

/* ---------- table ---------- */
.table-wrap {
  overflow: auto; max-height: min(78vh, 980px); border: 1px solid var(--line); border-radius: 10px;
  overscroll-behavior: contain;
}
table.roster { border-collapse: separate; border-spacing: 0; width: 100%; white-space: nowrap; font-size: 14px; }
.roster th, .roster td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--line); }
.roster thead th {
  position: sticky; top: 0; z-index: 2; background: #1a2534; color: var(--muted);
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 0;
}
.roster thead th button {
  all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: flex-end; gap: 4px;
  width: 100%; padding: 11px 12px; cursor: pointer;
}
.roster thead th button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.roster thead th.sorted { color: var(--accent); }
.roster thead th .arr { width: 10px; opacity: .9; }
.roster th.c-pos, .roster td.c-pos { text-align: center; width: 44px; color: var(--faint); font-size: 13px; }
.roster thead th.c-pos { padding: 11px 6px; }
.roster th.c-name, .roster td.c-name { text-align: left; position: sticky; left: 0; z-index: 1; }
.roster thead th.c-name { z-index: 3; }
.roster thead th.c-name button { justify-content: flex-start; }
.roster tbody td { background: var(--panel); }
.roster tbody td.c-name { background: #151e2a; box-shadow: 1px 0 0 var(--line); }
.roster tbody tr { cursor: pointer; }
.roster tbody tr:hover td { background: #1b2635; }
.roster tbody tr:focus-visible { outline: none; }
.roster tbody tr:focus-visible td { background: #1f2b3c; }
.roster tbody tr:last-child td { border-bottom: 0; }
.roster td.sorted { color: #fff; background-image: linear-gradient(var(--accent-soft), var(--accent-soft)); }
.roster td.null { color: var(--faint); }
.pl { display: flex; align-items: center; gap: 10px; }
.pl img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line-2); flex: none; }
.pl-name { font-weight: 600; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; color: var(--muted); padding: 24px 0 8px; margin: 0; }
/* Wide screens: the whole table fits, so let the page scroll it and stick the header under the top bar. */
@media (min-width: 1400px) {
  .table-wrap { overflow: visible; max-height: none; }
  .roster thead th { top: 61px; }
  .roster thead th:first-child { border-top-left-radius: 10px; }
  .roster thead th:last-child { border-top-right-radius: 10px; }
}
@media (max-width: 600px) {
  .roster th, .roster td { padding: 8px 10px; }
  .pl img { width: 32px; height: 32px; }
  .pl-name { max-width: 116px; }
  .switch { margin-left: 0; }
}

/* ---------- bar charts ---------- */
.bars, .stacks { display: grid; gap: 7px; }
.brow {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
  padding: 2px 0; cursor: pointer; border-radius: 6px;
}
.brow:hover .bname { color: var(--accent); }
.brow img { grid-row: span 2; width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.bname { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bval { font-size: 13px; font-weight: 600; color: var(--text); text-align: right; }
.btrack { grid-column: 2 / 4; height: 8px; border-radius: 4px; background: #1c2735; overflow: hidden; }
.btrack i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #b9832b, var(--accent)); transition: width .35s ease; }
.btrack.stack { display: flex; height: 10px; background: transparent; }
.btrack.stack i { border-radius: 0; background: none; transition: none; }
.btrack.stack i:first-child { border-radius: 4px 0 0 4px; }
.btrack.stack i:last-child { border-radius: 0 4px 4px 0; }
.mix { margin-bottom: 18px; padding: 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.mix-title { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.mix-bar { display: flex; height: 14px; border-radius: 5px; overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend b { color: var(--text); font-weight: 600; }

.note { font-size: 13px; color: var(--faint); max-width: 900px; margin: 22px 0 0; }

/* ---------- footer ---------- */
.footer p { max-width: 1360px; margin: 0 auto; padding: 18px 16px 28px; font-size: 12px; color: var(--faint); }

/* ---------- player dialog ---------- */
.dlg {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0;
  border: 1px solid var(--line-2); border-radius: 18px; background: var(--panel); color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.dlg::backdrop { background: rgba(4, 7, 11, .7); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dlg[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dlg-head {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 20px;
  background: radial-gradient(400px 160px at 100% 0, rgba(240, 178, 74, .18), transparent 70%), #16202c;
  border-bottom: 1px solid var(--line);
}
.dlg-head img { width: 84px; height: 84px; border-radius: 14px; object-fit: cover; border: 2px solid var(--accent); flex: none; }
.dlg-name { margin: 0; font: 700 30px/1.05 var(--display); letter-spacing: .02em; word-break: break-word; }
.dlg-sub { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--muted); }
.dlg-close {
  position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(11, 15, 21, .6); cursor: pointer; display: grid; place-items: center;
}
.dlg-close svg { width: 18px; height: 18px; }
.dlg-body { padding: 18px 20px 22px; }
.dlg-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dstat { padding: 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.dstat-l { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.dstat-v { margin-top: 3px; font: 700 26px/1.05 var(--display); color: var(--accent); }
.dstat-p { margin-top: 4px; font-size: 12px; color: var(--muted); }
.delta { font-weight: 600; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); }
.dlg-sec { margin-top: 18px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dlg-mix { display: flex; height: 14px; border-radius: 5px; overflow: hidden; margin: 8px 0 12px; }
.parts { display: grid; gap: 2px; }
.part { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.part:last-child { border-bottom: 0; }
.part i { width: 10px; height: 10px; border-radius: 3px; }
.part .pv { font-weight: 600; text-align: right; }
.part .pp { color: var(--faint); font-size: 12px; min-width: 92px; text-align: right; }
@media (max-width: 480px) {
  .dlg-stats { grid-template-columns: 1fr 1fr; }
  .dlg-stats .dstat:first-child { grid-column: span 2; }
  .dlg-head img { width: 68px; height: 68px; }
  .dlg-name { font-size: 26px; }
}

/* ---------- busy overlay & toast ---------- */
.busy {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: rgba(6, 9, 13, .82); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.busy p { margin: 0; font-weight: 600; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(240, 178, 74, .2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 110; transform: translateX(-50%);
  padding: 12px 18px; border-radius: 12px; background: #3a1d1f; border: 1px solid #7a3b3f; color: #ffd9d9;
  font-weight: 500; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100vw - 32px);
}

@media (max-width: 520px) {
  .brand-text { display: none; }
  .btn { padding: 0 11px; }
  .lang { padding: 0 8px; }
  .hero-inner { padding: 40px 16px 38px; }
  .kpi-value { font-size: 30px; }
}
@media (max-width: 380px) {
  .lang svg { display: none; }
  .btn svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- PDF report pages (rendered off-screen, light theme) ---------- */
#report-host { position: absolute; left: -20000px; top: 0; width: 1123px; pointer-events: none; }
.rpt-page {
  width: 1123px; height: 794px; padding: 26px 32px 18px; display: flex; flex-direction: column;
  background: #fff; color: #18202b; font: 12px/1.35 var(--body); font-feature-settings: 'tnum' 1;
  overflow: hidden; position: relative;
}
.rpt-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.rpt-kicker { font-size: 10px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #a8731c; }
.rpt-title { font: 700 44px/1 var(--display); letter-spacing: .02em; color: #111821; }
.rpt-title span { display: inline-block; margin-left: 8px; padding: 2px 10px 1px; font-size: 24px; vertical-align: 6px; background: #f0b24a; color: #1b1306; }
.rpt-sub { margin-top: 4px; font-size: 13px; color: #52606f; }
.rpt-head.small .rpt-title { font-size: 28px; }
.rpt-head.small .rpt-title span { font-size: 16px; vertical-align: 3px; padding: 1px 7px; }
.rpt-meta { text-align: right; font-size: 11px; color: #52606f; line-height: 1.55; }
.rpt-meta b { color: #18202b; }
.rpt-stripe { height: 5px; margin: 12px 0 14px; background: repeating-linear-gradient(135deg, #f0b24a 0 10px, #1a2230 10px 20px); }
.rpt-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
.rpt-kpi { padding: 8px 10px; border: 1px solid #e3e8ee; border-left: 3px solid #f0b24a; border-radius: 6px; background: #fafbfc; }
.rpt-kpi-l { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6a7887; }
.rpt-kpi-v { font: 700 22px/1.1 var(--display); color: #111821; }
.rpt-body { flex: 1; min-height: 0; overflow: hidden; }
.rpt-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.rpt-table th {
  padding: 6px 7px; text-align: right; font-size: 9.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: #1a2230;
}
.rpt-table th.sorted { color: #f0b24a; }
.rpt-table td { padding: 3px 7px; text-align: right; border-bottom: 1px solid #e6eaef; font-size: 11.5px; height: 30px; }
.rpt-table tr:nth-child(even) td { background: #f6f8fa; }
.rpt-table td.sorted { font-weight: 700; color: #000; }
.rpt-table .c-pos { text-align: center; color: #7a8796; width: 30px; }
.rpt-table .c-name { text-align: left; }
.rpt-table th.c-name { text-align: left; }
.rpt-pl { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.rpt-pl img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; }
.rpt-h3 { font: 700 18px/1.2 var(--display); letter-spacing: .05em; text-transform: uppercase; margin: 0 0 4px; }
.rpt-hint { font-size: 11px; color: #6a7887; margin-bottom: 8px; }
.rpt-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 11px; color: #52606f; margin-bottom: 10px; }
.rpt-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rpt-legend i { width: 10px; height: 10px; border-radius: 2px; }
.rpt-legend b { color: #18202b; }
.rpt-body.chart { display: flex; flex-direction: column; }
.rpt-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 36px; align-content: start; }
.rpt-col { display: flex; flex-direction: column; }
.rpt-srow { display: grid; grid-template-columns: 22px 128px 1fr 62px; align-items: center; gap: 8px; height: 26px; border-bottom: 1px solid #eef1f4; }
.rpt-srow img { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }
.rpt-srow .n { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rpt-srow .v { font-size: 11px; font-weight: 700; text-align: right; }
.rpt-sbar { display: flex; height: 11px; }
.rpt-note { margin: 10px 0 0; font-size: 10px; color: #6a7887; }
.rpt-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 7px; border-top: 1px solid #e3e8ee; font-size: 10px; color: #7a8796; }

/* ---------- browser print (Ctrl+P) fallback ---------- */
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; }
  .topbar, .tools, .hint, #report-host, .busy, .toast, .hero-num, .hazard { display: none !important; }
  .hero { background: none; }
  .hero-inner { padding: 0 0 12px; }
  .hero h1 { font-size: 44px; text-shadow: none; }
  .panel, .kpi, .pod-card, .mix { background: #fff !important; border-color: #ccc !important; box-shadow: none !important; }
  .table-wrap { max-height: none; overflow: visible; border: 0; }
  .roster tbody td, .roster tbody td.c-name, .roster thead th { background: #fff !important; color: #000 !important; position: static; }
  .kpi-value, .pod-power, .lead, .lead-sub, .note { color: #000 !important; }
  .grid-2 { display: block; }
}
