/* PROXY REPUBLIC app. The brand board: near-black, brass gold, red glow,
   spaced caps in Orbitron, thin lines, flat cards. */

:root {
  --bg: #07080a;
  --panel: #0b0c0f;
  --panel-2: #101217;
  --panel-3: #15181e;
  --line: #23262c;
  --line-2: #2d3138;
  --text: #ece6d8;
  --muted: #a39b8a;
  --faint: #6c665c;
  --accent: #cfa552;
  --accent-2: #e6c272;
  --accent-ink: #15110a;
  --red: #e3101a;
  --bad: #ff3b3b;
  --ok: #5ccf8a;
  --warn: #ffb03d;
  --plot: #b89cff;
  --intel: #6fc3ff;
  --ocean: #050607;
  --tab-h: 64px;
  --head: 'Orbitron', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 8px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--body);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  height: 100dvh;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); }
code { font: 12px ui-monospace, Menlo, monospace; }
.caps, .lbl, .k { font-family: var(--head); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- splash ---------- */

.splash {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(60% 40% at 50% 38%, rgba(227, 16, 26, .22), transparent 70%), var(--bg);
  transition: opacity .4s ease; text-align: center; padding: 24px;
}
.splash.gone { opacity: 0; pointer-events: none; }
.sp-em { width: 96px; height: 108px; object-fit: contain; filter: drop-shadow(0 0 24px rgba(227, 16, 26, .35)); }
.sp-wm { width: 220px; height: auto; margin-top: 4px; }
.sp-tag { font: 500 11px var(--head); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); line-height: 1.9; }
.sp-bar { width: 200px; height: 3px; margin-top: 18px; background: var(--line); overflow: hidden; }
.sp-bar i { display: block; height: 100%; width: 30%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: sp 1.6s ease-in-out infinite; }
@keyframes sp { 0% { width: 10%; } 60% { width: 72%; } 100% { width: 92%; } }
.sp-note { font: 500 9.5px var(--head); letter-spacing: .24em; text-transform: uppercase; color: var(--faint); }

/* ---------- top bar ---------- */

.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand .wm { height: 22px; width: auto; display: none; }
.brand .em { width: 26px; height: 29px; object-fit: contain; }
.clock { flex: 1; min-width: 0; text-align: center; }
.day { font: 700 13px var(--head); letter-spacing: .1em; }
.utc { font: 500 8.5px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.utc .date { display: none; }
@media (min-width: 1000px) { .utc .date { display: inline; } }
.status { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status .nat { font-size: 11.5px; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.res-bar { display: none; }
.me-chip {
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; display: flex; gap: 6px; align-items: center;
  max-width: 42vw; overflow: hidden;
}
.me-chip:not(.has) { background: var(--red); color: #fff; border-color: #ff6b70; font: 700 10.5px var(--head); letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 0 18px rgba(227, 16, 26, .3); }
.me-chip.has { border-color: var(--c); box-shadow: inset 0 -2px 0 var(--c); }
.me-chip span:last-child { overflow: hidden; text-overflow: ellipsis; }
.control-bar { display: flex; height: 4px; background: #15171c; cursor: pointer; }
.control-bar span { height: 100%; transition: width .6s ease; }

/* ---------- layout ---------- */

.layout { position: relative; min-height: 0; overflow: hidden; }
.view { display: none; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.panel { height: 100%; min-height: 0; }
.panel-tabs { display: none; }
body[data-view="map"] .view-map,
body[data-view="feed"] .view-feed,
body[data-view="nation"] .view-nation,
body[data-view="generals"] .view-generals,
body[data-view="missions"] .view-missions,
body[data-view="more"] .view-more { display: block; }
body[data-view="diplomacy"] .view-diplomacy { display: flex; }
body[data-view="map"] .panel { display: none; }

.tabbar {
  display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--panel); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar button {
  background: none; border: 0; padding: 9px 0 9px; font: 500 7.5px var(--head); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); overflow: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; border-top: 2px solid transparent; margin-top: -1px;
}
.tabbar svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabbar button.on { color: var(--red); border-top-color: var(--red); background: linear-gradient(180deg, rgba(227, 16, 26, .14), transparent); }
.dot { position: absolute; top: 7px; right: calc(50% - 17px); width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px var(--red); }
.panel-tabs .dot { position: static; display: inline-block; margin-left: 4px; }

@media (min-width: 1000px) {
  .brand .wm { display: block; }
  .res-bar { display: flex; gap: 2px; align-items: stretch; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); padding: 4px 6px; }
  .res-bar .rb-title { font: 500 8px var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); align-self: center; margin-right: 8px; }
  .res-bar .rb { display: flex; align-items: center; gap: 6px; padding: 2px 9px; font: 600 12px var(--head); color: var(--text); border-left: 1px solid var(--line); }
  .res-bar .rb:first-of-type { border-left: 0; }
  .res-bar .rb i { font-style: normal; color: var(--accent); font-size: 12px; }
  .res-bar .rb small { font: 500 8px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
  .clock { flex: 0 1 auto; min-width: 180px; }
  .layout { display: grid; grid-template-columns: 1fr 440px; }
  .view-map { display: block !important; }
  body[data-view] .panel { display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--panel); }
  .panel > .view { flex: 1; min-height: 0; }
  .panel-tabs { display: flex; border-bottom: 1px solid var(--line); }
  .panel-tabs button { flex: 1; background: none; border: 0; padding: 12px 4px; font: 600 10px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-bottom: 2px solid transparent; }
  .panel-tabs button.on { color: var(--red); border-bottom-color: var(--red); }
  .tabbar { display: none; }
  body { grid-template-rows: auto auto 1fr; }
}

/* ---------- map ---------- */

.map-wrap { position: relative; height: 100%; background: var(--ocean); overflow: hidden; }
#map { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
#ocean { fill: var(--ocean); }
#viewport { transform-origin: 0 0; }
#viewport.animating { transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.land { fill: #1d1a16; stroke: #07080a; stroke-width: .5; vector-effect: non-scaling-stroke; transition: fill .5s ease; }
.land.owned { fill-opacity: .88; }
.land.mine { stroke: #ffffff; stroke-width: 1.4; }
.land.disputed { stroke: #9aa8bb; stroke-dasharray: 3 2; stroke-width: 1; }
.land.dim { fill-opacity: .32; }
.land:hover { filter: brightness(1.25); }
.land.flash { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { filter: brightness(2.4); } 100% { filter: none; } }
.sea { stroke: #5a4a2a; stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.badge { pointer-events: none; }
.badge circle { stroke: rgba(5, 6, 7, .8); stroke-width: 1.5; }
.badge .count { fill: #fff; font: 700 10px var(--body); }
.badge .star { font-size: 11px; paint-order: stroke; stroke: #0b0f14; stroke-width: 2.5px; }
.badge .label { fill: #d5dee9; font: 600 9.5px var(--body); paint-order: stroke; stroke: #0b0f14; stroke-width: 3px; }
.badge.thinking circle { animation: think 1s ease-in-out infinite; }
@keyframes think { 50% { stroke: #fff; stroke-width: 4px; } }
.arc { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-dasharray: 600; animation: draw 1.6s ease-out forwards; }
@keyframes draw { 0% { stroke-dashoffset: 600; opacity: 1; } 55% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }

.map-tools { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; }
.map-tools button { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line); background: rgba(11, 12, 15, .88); font-size: 17px; backdrop-filter: blur(6px); color: var(--muted); }
#mapMode.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }

.legend {
  position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 5px; padding: 8px 10px;
  border-radius: 4px; border: 1px solid var(--line); background: rgba(7, 8, 10, .82); backdrop-filter: blur(8px);
  font: 500 8.5px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.lg::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 0; background: var(--sw, #444); }
.lg.you { --sw: #cfa552; } .lg.ally { --sw: #3e7bfa; } .lg.foe { --sw: #e3101a; } .lg.neutral { --sw: #3a3327; }
.lg.contested::before { background: none; border: 1px dashed #9aa8bb; }
@media (min-width: 1000px) { .legend { top: auto; bottom: 10px; font-size: 9.5px; } }

.live-panel { position: absolute; right: 10px; top: 10px; width: 300px; padding: 10px 0 0; border-radius: 4px; border: 1px solid var(--line); background: rgba(7, 8, 10, .88); backdrop-filter: blur(10px); overflow: hidden; }
.lp-title { font: 600 9.5px var(--head); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px; }
.lp-item { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.3; }
.lp-time { color: var(--faint); font: 500 10px var(--head); letter-spacing: .04em; padding-top: 2px; }
.lp-head { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-sub { color: var(--faint); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tension, .tension-pill {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(227, 16, 26, .22), rgba(227, 16, 26, .06)); color: var(--text);
}
.tension::before, .tension-pill::before { content: '▲'; color: var(--red); font-size: 13px; text-shadow: 0 0 10px var(--red); }
.tension b, .tension-pill b { display: block; font: 700 10.5px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.tension small, .tension-pill small { display: block; font-size: 10.5px; color: var(--muted); }
.tension.calm::before, .tension-pill.calm::before { content: '●'; color: var(--ok); text-shadow: 0 0 8px var(--ok); }
.tension.calm b, .tension-pill.calm b { color: var(--ok); }
.legend[hidden] ~ .tension-pill { top: 10px; }
.tension-pill { position: absolute; left: 10px; top: 122px; width: auto; max-width: 62%; border: 1px solid color-mix(in srgb, var(--red) 40%, var(--line)); border-radius: 4px; background: rgba(7, 8, 10, .86); backdrop-filter: blur(8px); padding: 7px 10px; }
.tension-pill.calm { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
@media (min-width: 1000px) { .tension-pill { display: none !important; } }

.ticker {
  position: absolute; left: 10px; right: 10px; bottom: 10px; text-align: left;
  background: rgba(11, 12, 15, .92); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 4px;
  padding: 8px 12px; font-size: 13px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tk-kind { font: 600 10px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-right: 8px; }
body[data-view="map"] .ticker { bottom: 78px; }
@media (min-width: 1000px) { .ticker { display: none !important; } }

.nation-card { position: absolute; right: 10px; bottom: 10px; left: 10px; z-index: 3; }
@media (min-width: 1000px) { .nation-card { left: auto; width: 340px; right: 10px; bottom: 10px; } }
.nc, .nc-empty { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border-radius: 4px; border: 1px solid var(--line); border-left: 3px solid var(--c, var(--accent)); background: rgba(7, 8, 10, .9); backdrop-filter: blur(10px); color: var(--text); }
.nc img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: #000; }
.nc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nc-main b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-main small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-go { font: 600 9.5px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.nc-empty { border-left-color: var(--red); }
.nc-empty div { flex: 1; display: flex; flex-direction: column; }
.nc-empty span { color: var(--muted); font-size: 12.5px; }
.nc-empty .primary { width: auto; margin: 0; min-height: 38px; padding: 0 14px; font-size: 10px; }

/* ---------- nation chips ---------- */

.nat {
  --c: #888;
  display: inline-block; font-weight: 600; white-space: nowrap; color: var(--text);
  background: color-mix(in srgb, var(--c) 20%, transparent);
  box-shadow: inset 2px 0 0 var(--c);
  padding: 0 6px 0 5px; border-radius: 3px; line-height: 1.5;
}
.nat i { font-style: normal; color: var(--muted); font-weight: 500; }
.nat.you { box-shadow: inset 2px 0 0 var(--c), 0 0 0 1px var(--accent); }
.nat.neutral { --c: #5d6b7d; color: var(--muted); }
.place { font-weight: 600; white-space: nowrap; }
.bad { color: var(--bad); }

/* ---------- chips, labels, inputs ---------- */

.filters {
  position: sticky; top: 0; z-index: 2; display: flex; gap: 6px; overflow-x: auto; padding: 10px 12px;
  background: linear-gradient(var(--bg) 80%, transparent); scrollbar-width: none;
}
@media (min-width: 1000px) { .filters { background: linear-gradient(var(--panel) 80%, transparent); } }
.filters::-webkit-scrollbar { display: none; }
.filters button, .chips button, .region-chips button {
  border: 1px solid var(--line); background: var(--panel-2); border-radius: 4px;
  padding: 7px 12px; font: 600 9.5px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.filters button.on, .chips button.on, .region-chips button.on { border-color: var(--red); color: var(--text); background: color-mix(in srgb, var(--red) 14%, var(--panel-2)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.small button { font: 500 12px var(--body); letter-spacing: 0; text-transform: none; padding: 6px 10px; }
.lbl { display: block; margin: 18px 0 7px; font: 600 10px var(--head); color: var(--muted); }
.lede { color: var(--muted); margin: 0 0 14px; }
input, textarea {
  width: 100%; background: #0a0c10; color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 11px 12px; font: 16px var(--body);
}
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 0; }
textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.hint { font-size: 12px; color: var(--faint); margin-top: 5px; }
.fine { font-size: 12px; color: var(--faint); }
.empty { color: var(--faint); font-size: 13px; padding: 10px 2px; }
.st { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 3px; white-space: nowrap; font-family: var(--head); letter-spacing: .08em; text-transform: uppercase; }
.st.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.st.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.st.no { color: var(--faint); }
.st.soon { color: var(--muted); background: var(--panel-3); border: 1px solid var(--line); }

.primary {
  display: block; width: 100%; margin-top: 18px; min-height: 48px; border-radius: 6px;
  background: linear-gradient(180deg, #ff2b33, var(--red) 55%, #b50c14); color: #fff; border: 1px solid #ff6b70;
  font: 700 12px var(--head); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 0 22px rgba(227, 16, 26, .25);
}
.primary:hover { box-shadow: 0 0 30px rgba(227, 16, 26, .45); }
.primary:disabled { opacity: .5; }
.outline {
  display: block; width: 100%; margin-top: 12px; min-height: 46px; border-radius: 6px; background: rgba(227, 16, 26, .06);
  border: 1px solid var(--red); color: var(--text); font: 700 11.5px var(--head); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 0 16px rgba(227, 16, 26, .18);
}
.wide { display: block; width: 100%; margin-top: 12px; min-height: 44px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); font-weight: 600; }
.ghost { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 9px 12px; font-weight: 600; }
.banner { padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; font-weight: 500; background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); }
.banner.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); color: #ffb3b3; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.row > button:not(.primary):not(.outline) { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 9px 12px; font-weight: 600; }
.card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 13px; margin-top: 12px; }
.card h3 { margin: 0 0 8px; font: 600 11px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.card .primary { margin-top: 0; width: auto; padding: 0 18px; min-height: 42px; font-size: 11px; }
.card.away { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.entry { padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.entry:first-of-type, .card > .entry:first-of-type, h3 + .entry { border-top: 0; }
.entry .when { display: block; font-size: 11.5px; color: var(--faint); margin-bottom: 2px; }
.entry q, .story q { display: block; color: var(--text); font-style: italic; quotes: '“' '”'; }
.notes { margin-top: 10px; padding: 9px 11px; background: var(--panel); border-radius: 6px; font-size: 13px; color: var(--muted); }
.notes b { display: block; font: 600 10px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-bottom: 2px; }
code.link { display: block; margin-top: 6px; padding: 8px 10px; background: var(--panel); border-radius: 6px; word-break: break-all; user-select: all; }
.sec-title { font: 700 14px var(--head); letter-spacing: .14em; margin: 4px 0 4px; text-transform: uppercase; }
.sec-sub { font: 500 9.5px var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--faint); margin: 0 0 14px; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv > span:first-child { color: var(--faint); }
.day-divider { display: flex; align-items: center; gap: 10px; margin: 16px 2px 6px; color: var(--faint); font: 600 10px var(--head); letter-spacing: .2em; text-transform: uppercase; }
.day-divider::before, .day-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- list rows (intel, missions, nations) ---------- */

.rows { display: grid; gap: 6px; }
.rowi {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px 9px 9px; color: var(--text);
}
.rowi .thumb { width: 54px; height: 54px; border-radius: 4px; object-fit: cover; background: #000; border: 1px solid var(--line); box-shadow: inset 0 0 0 1px rgba(0,0,0,.6); }
.rowi .thumb.flag { display: grid; place-items: center; font-size: 26px; background: var(--panel-3); }
.rowi .tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rowi .tx b { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rowi .tx b .nat { background: none; box-shadow: none; padding: 0; display: inline; white-space: normal; }
.rowi .tx b .nat i { display: none; }
.rowi .tx small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowi .tx .meta { color: var(--faint); font-size: 10.5px; }
.rowi .chev { color: var(--faint); font-size: 20px; line-height: 1; padding-right: 2px; }
.rowi.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 16px rgba(227, 16, 26, .18); }
.rowi:disabled { opacity: .45; cursor: not-allowed; }
.rowi.k-betrayal .thumb, .rowi.k-capital .thumb { border-color: var(--bad); }
.rowi.k-pact .thumb, .rowi.k-offer .thumb { border-color: var(--ok); }
.rowi.k-secret .thumb, .rowi.k-cable .thumb, .rowi.k-leak .thumb { border-color: var(--plot); }
.rowi .kind { font: 600 9px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--k, var(--accent)); }
.k-betrayal, .k-capital { --k: var(--bad); }
.k-war, .k-report, .k-beef, .k-uprising { --k: #ff8a3d; }
.k-pact, .k-offer { --k: var(--ok); }
.k-pactbreak, .k-error { --k: var(--warn); }
.k-secret, .k-cable, .k-leak { --k: var(--plot); }
.k-joined, .k-takeover { --k: var(--intel); }
.k-diary, .k-orders, .k-over { --k: var(--accent); }
.k-eliminated { --k: #c3c9d1; }
.feed { padding: 0 12px 20px; }
.feed .rows { gap: 6px; }

/* mission rows: gold progress rail on the left */
.mission { grid-template-columns: 6px 1fr auto auto; }
.mission .rail { width: 6px; height: 46px; background: var(--panel); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; display: flex; align-items: flex-end; }
.mission .rail i { display: block; width: 100%; background: linear-gradient(0deg, #a9822f, var(--accent)); box-shadow: 0 0 8px rgba(207, 165, 82, .5); }
.mission .prog { font: 600 11px var(--head); color: var(--muted); white-space: nowrap; }
.mission.done .rail i { background: var(--ok); box-shadow: 0 0 8px rgba(92, 207, 138, .5); }
.mission.done .prog { color: var(--ok); }
.seg { display: flex; gap: 0; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--panel-2); }
.seg button { flex: 1; border: 0; background: none; padding: 10px; font: 600 10px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; }
.seg button.on { color: var(--text); border-bottom-color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.promo { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--r); padding: 26px 16px; text-align: center; background: radial-gradient(80% 90% at 50% 100%, rgba(227, 16, 26, .32), transparent 70%), repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 24px), var(--panel-2); }
.promo b { display: block; font: 700 12px var(--head); letter-spacing: .2em; text-transform: uppercase; line-height: 1.9; }

/* ---------- stories (full view in a sheet) ---------- */

.story { --k: var(--muted); position: relative; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--k); border-radius: 6px; padding: 11px 13px; margin: 8px 0; }
.story.mine { background: color-mix(in srgb, var(--accent) 7%, var(--panel-2)); }
.story-kind { display: flex; justify-content: space-between; gap: 8px; font: 600 10px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--k); }
.story-kind .when { font: 500 11px var(--body); letter-spacing: 0; text-transform: none; color: var(--faint); }
.story h3 { margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.5; }
.story p { margin: 5px 0 0; color: var(--muted); font-size: 13.5px; }
.arrow { color: var(--faint); margin: 0 2px; }
.redacted { color: #2b3442; letter-spacing: -1px; margin-right: 6px; }
.share-mini { position: absolute; right: 10px; bottom: 9px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--panel); border-radius: 4px; padding: 3px 9px 3px 7px; font-size: 11px; font-weight: 600; color: var(--muted); }
.share-mini svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.story:has(.share-mini) { padding-bottom: 36px; }

/* ---------- ranks ---------- */

.ranks { width: 100%; border-collapse: collapse; font-size: 13px; }
.ranks th { text-align: left; font: 600 9.5px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ranks th:nth-child(n+3) { text-align: right; }
.ranks td { padding: 9px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ranks tr { cursor: pointer; }
.ranks tr.you td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ranks tr.dead { opacity: .45; }
.ranks .rk { font: 700 13px var(--head); color: var(--faint); width: 22px; }
.ranks .num { text-align: right; font-variant-numeric: tabular-nums; }
.ranks .gen { font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.ranks .glory { color: var(--accent); font: 700 13px var(--head); }
.rank-tabs { display: flex; gap: 6px; margin: 4px 0 12px; }
.rank-tabs button { flex: 1; border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; padding: 9px; font: 600 10px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.rank-tabs button.on { border-color: var(--red); color: var(--text); background: color-mix(in srgb, var(--red) 12%, var(--panel-2)); }
.title { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: 10.5px; font-weight: 600; }

/* ---------- screens ---------- */

.view-nation { padding: 0 !important; }
.nation-body { padding: 14px 14px 28px; }
.view-generals, .view-more, .view-missions { padding: 14px 14px 28px; }
.screen-head { display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 10px; padding: 12px 14px 0; }
.screen-head h2 { margin: 0; font: 700 12.5px var(--head); letter-spacing: .18em; text-transform: uppercase; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.screen-head h2 .flag { font-size: 18px; margin-right: 8px; vertical-align: -2px; }
.screen-head .back, .screen-head .ico { width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); font-size: 18px; color: var(--muted); display: grid; place-items: center; }
.screen-head .ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* join: the splash card from the board */
.join { display: flex; flex-direction: column; }
.j-hero { text-align: center; padding: 8px 0 14px; }
.j-hero .wm { width: 190px; height: auto; }
.j-hero .tagline { margin-top: 10px; font: 500 9.5px var(--head); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.j-hero .glow { height: 2px; width: 44px; margin: 12px auto 0; background: var(--red); box-shadow: 0 0 10px var(--red); }
.j-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; width: 100%; text-align: left; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel-2); color: var(--text); }
.j-row .j-lbl { font: 600 10px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.j-row .j-val { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-self: end; }
.j-row .j-val .flag { font-size: 20px; margin-right: 6px; vertical-align: -2px; }
.j-row .chev { color: var(--faint); font-size: 20px; }
.j-row.picked { border-color: var(--red); box-shadow: 0 0 0 1px var(--red), 0 0 14px rgba(227, 16, 26, .18); }
.j-foot { text-align: center; margin: 16px 0 6px; font: 500 9.5px var(--head); letter-spacing: .3em; text-transform: uppercase; color: var(--faint); }
.own-agent { margin-top: 14px; color: var(--muted); font-size: 13px; }
.own-agent summary { cursor: pointer; font-weight: 600; }
.own-agent input { margin-top: 8px; }

/* nation picker */
.region-chips { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0 6px; scrollbar-width: none; }
.region-chips::-webkit-scrollbar { display: none; }
.nation-list { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; }
.nation-opt { grid-template-columns: 46px 1fr auto; padding: 7px 10px 7px 8px; }
.nation-opt .sil { width: 44px; height: 34px; display: block; }
.nation-opt .sil path { fill: #9a8a6a; stroke: #cfa552; stroke-width: .6; vector-effect: non-scaling-stroke; }
.nation-opt.on .sil path { fill: var(--accent); }
.nation-opt .nm { font-weight: 600; display: flex; flex-direction: column; min-width: 0; }
.nation-opt .nm span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nation-opt small { font-weight: 400; color: var(--faint); font-size: 11px; }
.nation-opt .st { margin-right: 4px; }

/* your AI general: the hero card from the board */
.g-hero { text-align: center; padding: 10px 0 4px; }
.g-hero .g-big { width: 168px; height: 168px; border-radius: 10px; object-fit: cover; background: #000; border: 1px solid var(--line-2); box-shadow: 0 0 36px rgba(227, 16, 26, .22), 0 0 0 1px rgba(0,0,0,.6); }
.g-hero h3 { margin: 12px 0 0; font: 700 18px var(--head); letter-spacing: .22em; text-transform: uppercase; }
.g-hero .g-model { font: 500 9.5px var(--head); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.g-hero .statbars { margin: 16px auto 0; max-width: 340px; text-align: left; }
.g-hero .g-quote { display: block; margin: 14px auto 0; font-style: italic; color: var(--muted); font-size: 13.5px; max-width: 320px; }
.g-portrait { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); background: #000; flex: none; }
.statbars { display: grid; gap: 7px; }
.statbar { display: grid; grid-template-columns: 86px 1fr 32px; align-items: center; gap: 10px; font-size: 12px; }
.sb-name { font: 600 9.5px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sb-track { height: 7px; background: var(--panel); border-radius: 2px; overflow: hidden; border: 1px solid var(--line); }
.sb-track i { display: block; height: 100%; background: linear-gradient(90deg, #a9822f, var(--accent)); box-shadow: 0 0 8px rgba(207, 165, 82, .35); }
.sb-val { text-align: right; font: 700 12px var(--head); color: var(--text); }
.statbar input[type=range] { width: 100%; accent-color: var(--accent); margin: 0; }

/* nation dashboard */
.n-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 4px 0 12px; }
.n-head .big-flag { font-size: 40px; line-height: 1; }
.n-head h2 { margin: 0; font: 700 16px var(--head); letter-spacing: .14em; text-transform: uppercase; }
.n-head .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.rank { font: 700 22px var(--head); color: var(--accent); text-align: right; line-height: 1; }
.rank small { display: block; font: 600 8.5px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.rank small:last-child { color: var(--muted); letter-spacing: .06em; text-transform: none; margin-top: 3px; }
.n-map { position: relative; height: 210px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: radial-gradient(70% 60% at 50% 50%, rgba(207, 165, 82, .08), transparent 70%), repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, rgba(255,255,255,.02) 0 1px, transparent 1px 22px), #050607; }
.n-map svg { width: 100%; height: 100%; display: block; }
.n-map .nm-own { fill: #cfa552; fill-opacity: .9; stroke: #f1d58a; stroke-width: .6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 6px rgba(207, 165, 82, .45)); }
.n-map .nm-home { fill: #e6c272; }
.n-map .nm-ally { fill: #3e7bfa; fill-opacity: .5; stroke: #3e7bfa; stroke-width: .4; vector-effect: non-scaling-stroke; }
.n-map .nm-foe { fill: #e3101a; fill-opacity: .55; stroke: #ff5a60; stroke-width: .4; vector-effect: non-scaling-stroke; }
.n-map .nm-other { fill: #2a2520; stroke: #0b0c0f; stroke-width: .4; vector-effect: non-scaling-stroke; }
.n-map .nm-badge { font: 700 3.2px var(--body); fill: #fff; text-anchor: middle; paint-order: stroke; stroke: #000; stroke-width: .8px; }
.n-map .nm-tag { position: absolute; left: 10px; bottom: 8px; font: 500 8.5px var(--head); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.n-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 10px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); overflow: hidden; }
.n-stats > div { padding: 10px 12px; border-left: 1px solid var(--line); }
.n-stats > div:first-child { border-left: 0; }
.n-stats small { display: block; font: 500 8.5px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.n-stats b { display: block; font: 700 17px var(--head); margin-top: 4px; font-variant-numeric: tabular-nums; }
.n-stats b.bad { color: var(--bad); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0; }
.stats.compact { grid-template-columns: repeat(4, 1fr); }
.stats div { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px 4px; text-align: center; }
.stats b { display: block; font: 700 16px var(--head); font-variant-numeric: tabular-nums; }
.stats span { font-size: 9px; color: var(--faint); text-transform: uppercase; letter-spacing: .1em; font-family: var(--head); }
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 10px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); overflow: hidden; }
.gauge { padding: 10px 12px; border-left: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'name val' 'bar bar'; align-items: center; gap: 6px 10px; font-size: 12px; }
.gauge:first-child { border-left: 0; }
.gauge-name { grid-area: name; font: 500 8.5px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.gauge b { grid-area: val; text-align: right; font: 700 11px var(--head); color: var(--accent); }
.gauge-bar { grid-area: bar; height: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.gauge-bar i { display: block; height: 100%; background: linear-gradient(90deg, #a9822f, var(--accent)); box-shadow: 0 0 8px rgba(207, 165, 82, .4); }
.threat { grid-area: bar; display: flex; gap: 4px; }
.threat i { flex: 1; height: 7px; border-radius: 2px; background: var(--panel); border: 1px solid var(--line); }
.threat i.on { background: var(--red); border-color: var(--red); box-shadow: 0 0 8px rgba(227, 16, 26, .5); }
.gauge.hot b { color: var(--bad); }
.subtabs { display: flex; margin: 14px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs button { flex: 1; border: 0; background: none; padding: 10px 6px; font: 600 9.5px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs button.on { color: var(--red); border-bottom-color: var(--red); }
.capital { padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-top: 12px; }
.capital.ok { background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line)); }
.capital.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); }
.share-btn { display: block; width: 100%; margin-top: 10px; min-height: 42px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); color: var(--accent); font: 600 11px var(--head); letter-spacing: .14em; text-transform: uppercase; }
.terr-list { display: grid; gap: 4px; }
.terr { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); font-size: 13px; }
.terr small { display: block; color: var(--faint); font-size: 11px; }
.terr .arm { font: 700 13px var(--head); color: var(--accent); }
.terr .front { font: 600 8.5px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--bad); }
.terr .front.safe { color: var(--faint); }
.rein { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.rein .tot { font: 700 14px var(--head); color: var(--accent); }
.rel-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- builder, roster, shop ---------- */

.builder { display: grid; gap: 4px; }
.b-top { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: start; }
.b-portrait { width: 120px; height: 120px; border-radius: 8px; border: 1px solid var(--line-2); background: #000; object-fit: cover; box-shadow: 0 0 24px rgba(227, 16, 26, .15); }
.b-fields .lbl:first-child { margin-top: 0; }
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.skin { position: relative; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 0 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; font: 600 9px var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); overflow: hidden; text-align: center; }
.skin img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; background: #000; display: block; }
.skin.on { border-color: var(--accent); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent), 0 0 14px rgba(207, 165, 82, .2); }
.skin.locked img { filter: grayscale(.5) brightness(.55); }
.skin small { font: 600 8px var(--head); letter-spacing: .1em; color: var(--faint); }
.tier { display: inline-block; padding: 2px 7px; border-radius: 2px; font: 700 8px var(--head); letter-spacing: .14em; text-transform: uppercase; }
.tier.default { background: var(--accent); color: var(--accent-ink); }
.tier.premium { background: var(--red); color: #fff; }
.tier.ultra { background: #9b4dff; color: #fff; }
.doctrine-preview { margin-top: 6px; padding: 9px 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.style-tag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font: 600 9px var(--head); letter-spacing: .1em; text-transform: uppercase; }
.general-card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; }
.general-card .g-portrait { width: 96px; height: 96px; border-radius: 6px; }
.general-card h3 { margin: 0; font: 700 14px var(--head); letter-spacing: .12em; text-transform: uppercase; }
.g-sub { font: 500 9px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 3px 0 8px; }
.g-quote { display: block; margin-top: 8px; font-style: italic; color: var(--muted); font-size: 13px; }
.general-card .row button:not(.primary) { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 8px 12px; font-weight: 600; }
.general-card .row .primary { width: auto; margin: 0; padding: 0 16px; min-height: 40px; font-size: 10.5px; }
button.danger { color: var(--bad); }
.roster-pick { display: grid; gap: 6px; }
.roster-opt { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; text-align: left; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px; color: var(--text); }
.roster-opt img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; background: #000; }
.roster-opt .nm { font-weight: 600; display: flex; flex-direction: column; }
.roster-opt small { color: var(--faint); font-weight: 400; font-size: 11.5px; text-transform: capitalize; }
.roster-opt.on { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); background: color-mix(in srgb, var(--red) 10%, var(--panel-2)); }
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shop-item { --a: var(--accent); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.shop-item img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; background: #000; display: block; border-bottom: 1px solid var(--line); }
.shop-item .si-body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 5px; }
.shop-item b { font: 700 10.5px var(--head); letter-spacing: .12em; text-transform: uppercase; }
.shop-item .motto { font: 500 8px var(--head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.shop-item small { color: var(--faint); font-size: 11.5px; line-height: 1.35; min-height: 2.7em; }
.shop-item button { margin-top: 4px; border: 1px solid color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); color: var(--accent); border-radius: 4px; padding: 7px 12px; font: 700 10px var(--head); letter-spacing: .1em; }
.shop-item button:disabled { opacity: .45; }
.shop-item.owned { border-color: color-mix(in srgb, var(--a) 60%, var(--line)); box-shadow: 0 0 18px color-mix(in srgb, var(--a) 18%, transparent); }
.shop-item .st { align-self: flex-start; }

/* ---------- chat ---------- */

.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat-log { flex: 1; overflow-y: auto; padding: 8px 12px 12px; }
.bubble { --c: #888; max-width: 92%; margin: 8px 0; padding: 8px 11px 9px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--c); border-radius: 3px 8px 8px 8px; }
.bubble.mine { margin-left: auto; border-radius: 8px 3px 8px 8px; border-left: 1px solid var(--line); border-right: 3px solid var(--c); background: color-mix(in srgb, var(--accent) 8%, var(--panel-2)); }
.bubble.private { background: color-mix(in srgb, var(--plot) 10%, var(--panel-2)); }
.bubble.human .who i { color: var(--accent); }
.bubble .who { font-size: 12px; font-weight: 600; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bubble .who i { font-style: normal; font-weight: 500; color: var(--faint); }
.bubble .who .tag { font-weight: 500; color: var(--plot); }
.bubble .txt { margin-top: 3px; font-size: 14px; line-height: 1.4; }
.bubble.secret { opacity: .7; }
.sys { text-align: center; font-size: 12px; color: var(--faint); margin: 8px 0; }
.sys.bad { color: var(--bad); }
.chat-say { display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--panel); }
.chat-say input { flex: 1; }
.chat-say button { border: 1px solid #ff6b70; border-radius: 6px; padding: 0 16px; background: var(--red); color: #fff; font: 600 11px var(--head); letter-spacing: .12em; text-transform: uppercase; }
.view-feed { flex-direction: column; }
body[data-view="feed"] .view-feed { display: flex; }
.view-feed .feed { flex: 1; overflow-y: auto; }
.view-diplomacy { flex-direction: column; }
.pacts-strip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ps-label { color: var(--faint); font: 600 9px var(--head); letter-spacing: .16em; text-transform: uppercase; }
.ps-item i { color: var(--faint); font-style: normal; font-size: 11px; }

/* ---------- more ---------- */

.more-list { display: grid; gap: 6px; }
.more-list > * { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; text-align: left; text-decoration: none; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 11px 14px; }
.more-list b { font: 700 10.5px var(--head); letter-spacing: .12em; text-transform: uppercase; }
.more-list span { color: var(--muted); font-size: 12.5px; grid-column: 1; }
.more-list .st { grid-column: 2; grid-row: 1 / span 2; }
.more-list .chev { grid-column: 2; grid-row: 1 / span 2; color: var(--faint); font-size: 20px; }

/* ---------- sheets & toast ---------- */

.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 84dvh; overflow-y: auto;
  background: var(--panel); border-top: 1px solid var(--line-2); border-radius: 12px 12px 0 0;
  padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .22s ease;
}
.sheet.open { transform: translateY(0); }
@media (min-width: 700px) { .sheet { left: 50%; right: auto; width: 520px; margin-left: -260px; } }
.sheet-close { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; background: none; font-size: 26px; color: var(--muted); }
.sheet-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 2px solid var(--c, var(--line)); }
.sheet-head h2 { margin: 0; font: 700 15px var(--head); letter-spacing: .1em; text-transform: uppercase; }
.sheet-head .g-portrait { width: 56px; height: 56px; }
.big-flag { font-size: 40px; line-height: 1; }
.sub { color: var(--muted); font-size: 13px; }
.winner { padding: 12px; margin: 10px 0 4px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 12%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); font-weight: 600; }
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  background: #16181d; border: 1px solid var(--line-2); border-radius: 6px; padding: 9px 16px; font-size: 13px; font-weight: 600;
  max-width: calc(100vw - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
@media (min-width: 1000px) { .toast { bottom: 24px; } }
