@font-face {
  font-family: "Forum";
  src: url("../fonts/Forum-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --night: #0f0b0d;
  --dusk: #19121a;
  --dusk-2: #231820;
  --dusk-3: #2e2027;
  --rule: rgba(243, 142, 56, .16);
  --rule-2: rgba(243, 142, 56, .3);
  --text: #eadccb;
  --muted: #a8927f;
  --faint: #6f5d55;
  --title: #ffebc8;
  --gold: #f2b45e;
  --ember: #f5820f;
  --flare: #ffb347;
  --blaze: #ff6f26;
  --rust: #8a3d0a;
  --sun: #fff1b0;
  --up: #ffc46b;
  --down: #f06a4c;
  --bad: #e5603a;
  --paper: #f0e6d2;
  --paper-deep: #e7decb;
  --ink: #6b5b3a;
  --ink-text: #4a3e2a;
  --ink-muted: #86785e;
  --claim: #deb274;
  --path: #e2912d;
  --ready: #f7f0e0;
  --edge: #b5562c;
  --war: #9e3b2e;
  --locked: #d9d0bd;
  --line: rgba(107, 91, 58, .28);
  --display: "Forum", Georgia, "Times New Roman", serif;
  --body: Georgia, "Noto Serif", "PT Serif", "Times New Roman", serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --rail: 248px;
  --tabbar: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--night);
  color: var(--text);
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
body.wait, body.wait * { cursor: progress !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--flare); outline-offset: 2px; }
h1, h2, h3, h4 { font-weight: normal; text-wrap: balance; }
.ico { width: 20px; height: 20px; flex: none; object-fit: contain; vertical-align: -4px; }
.ico.sm { width: 15px; height: 15px; vertical-align: -2px; }
.ico.in { width: 18px; height: 18px; vertical-align: -3px; }
.flag { display: inline-block; width: 28px; height: 19px; flex: none; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); background: var(--dusk-3); }
.flag.blank { background: repeating-linear-gradient(135deg, var(--dusk-3) 0 4px, var(--dusk-2) 4px 8px); }
.flag.big { width: 48px; height: 32px; }

.shell {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  height: 100%;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 22px;
  overflow-y: auto;
  scrollbar-width: none;
  background:
    radial-gradient(ellipse 140% 34% at 50% 0%, rgba(245, 130, 15, .16), rgba(245, 130, 15, 0) 70%),
    linear-gradient(180deg, #170f14 0%, var(--night) 60%);
  border-right: 1px solid;
  border-image: linear-gradient(180deg, rgba(243, 142, 56, 0), rgba(243, 142, 56, .35) 30%, rgba(243, 142, 56, .1) 80%, rgba(243, 142, 56, 0)) 1;
}
.rail::-webkit-scrollbar { display: none; }
.logo { display: block; padding-inline: 4px; }
.logo img { display: block; width: 100%; max-width: 210px; height: auto; margin-inline: auto; }

.standard {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding-bottom: 18px;
  text-align: center;
}
.standard::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 143, 51, 0), rgba(255, 179, 92, .7), rgba(255, 143, 51, 0));
}
.std-flag {
  width: 76px;
  height: 50px;
  margin-bottom: 8px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(242, 180, 94, .55), 0 0 0 4px rgba(15, 11, 13, .9), 0 0 0 5px rgba(242, 180, 94, .25), 0 12px 30px rgba(0, 0, 0, .6);
}
.standard b {
  font: 26px/1.1 var(--display);
  font-weight: normal;
  overflow-wrap: anywhere;
  background: linear-gradient(180deg, var(--title) 25%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.standard small { font: 11px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.standard .home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: var(--dusk-2);
  box-shadow: inset 0 0 0 1px var(--rule-2);
  font-size: 13px;
  color: var(--text);
}
.standard .home::before { content: "←"; margin-left: 6px; color: var(--gold); }
.standard .home .flag { width: 22px; height: 15px; }
.standard .home:hover { background: var(--dusk-3); }

.vistas { display: grid; gap: 6px; }
.vista {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 50px;
  padding: 0 14px 9px;
  border-radius: 10px;
  overflow: hidden;
  isolation: isolate;
  transition: height .2s ease;
}
.vista i {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--dusk) center 78% / cover no-repeat;
  filter: grayscale(.8) brightness(.42);
  transition: filter .2s ease, transform .4s ease;
}
.vista::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(15, 11, 13, .82) 0%, rgba(15, 11, 13, .35) 65%, rgba(15, 11, 13, .1) 100%);
}
.vista span { font: 18px/1 var(--display); color: var(--muted); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); transition: color .2s; }
.vista:hover i { filter: grayscale(.35) brightness(.62); transform: scale(1.03); }
.vista:hover span { color: var(--text); }
.vista.on { height: 66px; box-shadow: inset 0 0 0 1px rgba(242, 180, 94, .35); }
.vista.on i { filter: none; }
.vista.on span { font-size: 21px; color: var(--title); }
.vista.on::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 143, 51, 0), var(--sun), rgba(255, 143, 51, 0));
  box-shadow: 0 0 12px 1px rgba(255, 179, 92, .8);
}

.main { position: relative; overflow-y: auto; overflow-x: hidden; scroll-behavior: smooth; }

.hero {
  position: relative;
  min-height: clamp(220px, 26vw, 330px);
  display: flex;
  align-items: flex-end;
  background: var(--night) var(--scene) center 70% / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 11, 13, 0) 30%, rgba(15, 11, 13, .55) 68%, var(--night) 100%),
    linear-gradient(90deg, rgba(15, 11, 13, .55) 0%, rgba(15, 11, 13, 0) 55%);
}
.hero-in {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: 28px 32px 6px;
}
.kicker { margin: 0 0 2px; font: 12px var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); text-shadow: 0 1px 6px rgba(0, 0, 0, .8); min-height: 1em; }
.hero h1 {
  margin: 0;
  font: clamp(34px, 4.6vw, 58px)/1.02 var(--display);
  letter-spacing: .02em;
  background: linear-gradient(180deg, var(--title) 20%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .65));
}
.hero-extra { margin-top: 14px; }

.figures { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 0; }
.figures div { display: grid; gap: 2px; min-width: 0; }
.figures dt { font: 11px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.figures dd { margin: 0; font: 24px/1.15 var(--display); color: var(--title); font-variant-numeric: tabular-nums; }
.figures em { font: italic 14px var(--body); color: var(--muted); margin-left: 4px; }
.figures em.up, .up { color: var(--up); }
.figures em.down, .down { color: var(--down); }
.hidden-val { display: inline-flex; align-items: center; gap: 6px; font: italic 15px var(--body); color: var(--faint); }

.view {
  display: grid;
  gap: 22px;
  max-width: 1240px;
  margin-inline: auto;
  padding: 18px 32px 48px;
}
.loading { display: grid; place-items: center; padding: 60px; }
.loading .ico { width: 30px; height: 30px; animation: turn 1.6s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.empty { display: grid; justify-items: center; gap: 14px; padding: 48px 12px; text-align: center; }
.empty p { margin: 0; font: 22px var(--display); color: var(--title); }

.grid { display: grid; gap: 22px; align-items: start; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.wide-left { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.stack-col { display: grid; gap: 22px; min-width: 0; }

.block {
  min-width: 0;
  padding: 18px 20px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--dusk-2), var(--dusk));
  box-shadow: inset 0 0 0 1px var(--rule), 0 10px 30px rgba(0, 0, 0, .25);
}
.block h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font: 21px/1.2 var(--display); color: var(--title); }
.block h2 small { font: 13px var(--ui); color: var(--muted); }
.block h2 .num { margin-left: auto; font: 18px var(--display); color: var(--gold); }
.block > h2:not(:first-child) { margin-top: 22px; }
.block h3 { margin: 0; font: 19px/1.2 var(--display); color: var(--text); }
h3.sub { margin: 18px 0 10px; font: 11px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.block-head h2 { margin: 0; }
h2.band { display: flex; align-items: center; gap: 10px; margin: 8px 0 -6px; font: 22px var(--display); color: var(--title); }

.quiet { margin: 0; color: var(--muted); font-style: italic; }
.center { text-align: center; }
.warn { margin: 12px 0 0; padding: 8px 12px; border-radius: 8px; background: rgba(255, 111, 38, .1); color: var(--flare); font-size: 14px; box-shadow: inset 3px 0 0 var(--blaze); }
.risk { margin: 12px 0 0; color: var(--muted); }
.risk b { color: var(--blaze); font-weight: normal; font-family: var(--display); font-size: 18px; }
.meta { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.meta b { color: var(--text); font-weight: normal; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.big-num { margin: 12px 0 0; font: 30px var(--display); color: var(--title); }
.big-num small { font: 14px var(--body); color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--flare), var(--ember));
  color: #2a1406;
  font: 16px/1.1 var(--display);
  letter-spacing: .02em;
  box-shadow: 0 4px 14px rgba(245, 130, 15, .25), inset 0 1px 0 rgba(255, 241, 176, .6);
  transition: filter .15s, transform .15s;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--title); box-shadow: inset 0 0 0 1px var(--rule-2); }
.btn.ghost:hover:not(:disabled) { background: rgba(245, 130, 15, .1); }
.btn.danger { background: linear-gradient(180deg, #c4532a, var(--rust)); color: var(--title); box-shadow: 0 4px 14px rgba(138, 61, 10, .35), inset 0 1px 0 rgba(255, 179, 71, .35); }
.btn.sm { padding: 6px 13px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
.btn .ico { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.actions.bar { margin: 0; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font: 12px/1.5 var(--ui);
  font-style: normal;
  letter-spacing: .04em;
  color: var(--text);
  background: var(--dusk-3);
  box-shadow: inset 0 0 0 1px var(--rule);
  white-space: nowrap;
}
.pill.war { background: rgba(229, 96, 58, .16); color: #ffb39b; box-shadow: inset 0 0 0 1px rgba(229, 96, 58, .5); }
.pill.own { background: rgba(245, 130, 15, .18); color: var(--flare); }
.pill.intel { white-space: normal; }

.subtabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 4px;
  border-radius: 999px;
  background: var(--dusk);
  box-shadow: inset 0 0 0 1px var(--rule);
  scrollbar-width: none;
  width: fit-content;
  max-width: 100%;
}
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a {
  flex: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 999px;
  font: 16px/1.1 var(--display);
  color: var(--muted);
  white-space: nowrap;
}
.subtabs a:hover { color: var(--text); }
.subtabs a.on { background: var(--dusk-3); color: var(--title); box-shadow: inset 0 0 0 1px var(--rule-2); }
.subtabs a span { font: 11px var(--ui); color: var(--faint); font-variant-numeric: tabular-nums; }
.subtabs a i { font: normal 11px/17px var(--ui); min-width: 17px; padding-inline: 4px; border-radius: 9px; background: var(--ember); color: #2a1406; text-align: center; }

.ring { display: block; flex: none; }
.ring-bg { fill: none; stroke: var(--dusk-3); }
.ring-fg { fill: none; stroke: var(--ember); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(245, 130, 15, .45)); }
.ring.bad .ring-fg { stroke: var(--bad); }
.ring-mark { stroke: var(--sun); stroke-width: 2; opacity: .7; }
.ring-text { fill: var(--title); font: 30px var(--display); text-anchor: middle; dominant-baseline: middle; }
.ring-sub { fill: var(--muted); font: 11px var(--ui); text-anchor: middle; dominant-baseline: middle; }

.meter { position: relative; height: 8px; margin-block: 8px 6px; border-radius: 4px; background: var(--dusk-3); }
.meter .fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: linear-gradient(90deg, var(--rust), var(--ember) 60%, var(--flare)); box-shadow: 0 0 8px rgba(245, 130, 15, .35); }
.meter.bad .fill { background: linear-gradient(90deg, #5a1d10, var(--bad)); box-shadow: none; }
.meter .mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--sun); opacity: .6; border-radius: 1px; }
.meter .was { position: absolute; top: -4px; width: 0; height: 0; margin-left: -4px; border: 4px solid transparent; border-top-color: var(--muted); }

.cells { display: flex; flex-wrap: wrap; gap: 3px; }
.cells i { width: 12px; height: 12px; border-radius: 2px; background: var(--dusk-3); box-shadow: inset 0 0 0 1px var(--rule); }
.cells i.on { background: linear-gradient(180deg, var(--flare), var(--ember)); box-shadow: 0 0 6px rgba(245, 130, 15, .35); }

.chart-wrap { position: relative; }
.area { display: block; width: 100%; height: 150px; }
.area .grid { stroke: var(--rule); stroke-width: 1; }
.area .line { fill: none; stroke: var(--flare); stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.area .dot { fill: var(--sun); stroke: var(--ember); stroke-width: 2; }
.axis { display: flex; justify-content: space-between; font: 11px var(--ui); color: var(--faint); }

.columns { display: flex; align-items: flex-end; gap: 10px; height: calc(var(--h) + 44px); }
.columns .col { flex: 1; display: grid; grid-template-rows: auto var(--h) auto; justify-items: center; gap: 4px; min-width: 0; }
.columns .v { font: 12px var(--ui); color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.columns .b { align-self: end; width: min(42px, 100%); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--flare), var(--rust)); }
.columns .l { font: 12px var(--ui); color: var(--muted); text-align: center; overflow-wrap: anywhere; }

.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; }
.stack .seg { min-width: 3px; }
.s0 { background: var(--ember); }
.s1 { background: var(--gold); }
.s2 { background: var(--blaze); }
.s3 { background: #c98a6b; }
.s4 { background: var(--rust); }
.s5 { background: #7d6a8c; }
.stack-key { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 16px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.stack-key li { display: flex; align-items: center; gap: 8px; }
.stack-key i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.stack-key b { margin-left: auto; font-weight: normal; color: var(--text); font-variant-numeric: tabular-nums; }

.ledger { display: grid; gap: 0; margin: 0; }
.ledger div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--rule); }
.ledger div:last-child { border-bottom: 0; }
.ledger dt { color: var(--muted); }
.ledger dd { margin: 0; font: 19px var(--display); color: var(--title); text-align: right; font-variant-numeric: tabular-nums; }
.ledger dd.small { font: 14px var(--body); color: var(--text); }
.ledger dd em { font: italic 13px var(--body); color: var(--muted); }
.ledger.wide dd { font-size: 22px; }

.purse { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 22px; align-items: center; }
.purse .warn { grid-column: 1 / -1; }
.supply { display: grid; gap: 18px; }
.sup-head { display: flex; align-items: center; gap: 10px; }
.sup-head b { font: 17px var(--display); font-weight: normal; color: var(--text); }
.sup-head .num { margin-left: auto; font: 19px var(--display); color: var(--title); }
.supply small, .sup small { font-size: 13px; color: var(--muted); }

.works { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.works li { display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 10px; background: var(--night); box-shadow: inset 0 0 0 1px var(--rule); text-align: center; }
.works .ico { width: 26px; height: 26px; }
.works b { font: 26px/1 var(--display); color: var(--title); font-weight: normal; }
.works span { font: 12px var(--ui); color: var(--muted); }

.flows, .items, .deposits, .fresh, .legend-list, .pairs, .wars, .joins, .designs, .samples, .ops, .agents, .tags, .courses, .branches, .gear, .ranks, .flags { margin: 0; padding: 0; list-style: none; }
.flows li, .items li { display: flex; align-items: baseline; gap: 10px; padding-block: 7px; border-bottom: 1px solid var(--rule); }
.flows li:last-child, .items li:last-child { border-bottom: 0; }
.flows b, .items b { margin-left: auto; font: 17px var(--display); font-weight: normal; color: var(--title); font-variant-numeric: tabular-nums; white-space: nowrap; }
.flows li.in b { color: var(--up); }
.flows li.out b { color: var(--down); }
.items em { font: italic 12px var(--body); color: var(--gold); }
.items small { display: block; font-size: 12px; color: var(--muted); }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px !important; }
.group-head b { font: 19px var(--display); font-weight: normal; color: var(--gold); }

.mood { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border-radius: 10px; background: var(--night); box-shadow: inset 3px 0 0 var(--flare); }
.mood span { color: var(--muted); }
.mood b { font: 18px var(--display); font-weight: normal; color: var(--title); text-align: right; }
.mood.bad { box-shadow: inset 3px 0 0 var(--bad); }
.mood.bad b { color: #ffb39b; }

.deposits { display: grid; gap: 8px; }
.deposits li { display: flex; align-items: center; gap: 12px; }
.deposits .ico { width: 26px; height: 26px; }
.deposits b { display: block; font: 16px var(--display); font-weight: normal; color: var(--text); }
.deposits small { font-size: 13px; color: var(--muted); }
.deposits li.dead { opacity: .45; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 6px 10px; text-align: left; font: 11px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule-2); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; font-variant-numeric: tabular-nums; }
.table td small { display: block; color: var(--muted); font-size: 12px; }
.table tr.off { opacity: .5; }

.paper {
  background: var(--paper);
  color: var(--ink-text);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(107, 91, 58, .5), 0 14px 40px rgba(0, 0, 0, .45), inset 0 0 60px rgba(107, 91, 58, .18);
}
figure.paper { margin: 0; padding: 10px; }
figure.paper img { display: block; width: 100%; height: auto; border-radius: 3px; }
.paper.note { padding: 16px 18px; font-size: 14px; line-height: 1.6; }

.colonnade { display: block; width: 100%; height: auto; margin-top: 10px; }
.colonnade .ground { stroke: var(--rule-2); stroke-width: 2; }
.colonnade .flute { stroke: rgba(0, 0, 0, .35); stroke-width: 1.5; }
.colonnade .cap, .colonnade .base { fill: var(--gold); }
.colonnade .pillar .shaft { fill: #e9c58e; }
.colonnade .pillar .cap { fill: var(--title); }
.colonnade .pillar.weak .shaft { fill: #b4664a; }
.colonnade .pillar.veiled { opacity: .35; }
.colonnade .pillar.veiled .shaft { fill: var(--muted); }
.colonnade .pv { fill: var(--title); font: 16px var(--display); text-anchor: middle; }
.colonnade .collapse { stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 6 5; }
.colonnade .collapse-t { fill: #ffb39b; font: 12px var(--ui); text-anchor: end; paint-order: stroke; stroke: var(--night); stroke-width: 4px; }
.colonnade .beam { fill: none; stroke: var(--sun); stroke-width: 1.5; opacity: .5; stroke-dasharray: 2 4; }
.legend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 16px; margin-top: 12px; }
.legend-list li { display: grid; }
.legend-list b { font: 16px var(--display); font-weight: normal; color: var(--title); }
.legend-list span { font-size: 13px; color: var(--muted); }
.pairs { display: grid; gap: 8px; margin-top: 14px; }
.pairs li { padding: 10px 12px; border-radius: 8px; background: var(--night); }
.pairs li.syn { box-shadow: inset 3px 0 0 var(--gold); }
.pairs li.anti { box-shadow: inset 3px 0 0 var(--bad); }
.pairs b { font: 16px var(--display); font-weight: normal; color: var(--title); }
.pairs span { margin-left: 8px; font-size: 13px; color: var(--muted); }
.pairs p { margin: 4px 0 0; font-size: 13px; color: var(--text); }
.fresh li { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; border-bottom: 1px solid var(--rule); }
.fresh li:last-child { border-bottom: 0; }
.fresh b { font-weight: normal; color: var(--text); }
.fresh span { font-size: 13px; color: var(--muted); white-space: nowrap; }

.dirs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.dir { display: grid; gap: 8px; align-content: start; padding: 14px 16px; border-radius: 10px; background: var(--night); box-shadow: inset 0 0 0 1px var(--rule); }
.dir.research { box-shadow: inset 0 0 0 1px var(--rule-2), 0 0 24px rgba(245, 130, 15, .12); }
.dir.top { opacity: .8; }
.dir header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.dir .lvl { font: 14px var(--ui); color: var(--muted); }
.dir .lvl b { font: 24px var(--display); font-weight: normal; color: var(--title); }
.dir .state { margin: 0; font-size: 13px; color: var(--gold); }
.dir small { font-size: 12px; color: var(--muted); }
.dir .row { margin-top: 2px; }
.wars, .joins { display: grid; gap: 8px; }
.wars li, .joins li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; padding: 10px 14px; border-radius: 8px; background: var(--night); }
.wars b, .joins b { font: 17px var(--display); font-weight: normal; color: var(--title); }
.wars span { font-size: 13px; color: var(--flare); }
.war-strip { background: linear-gradient(180deg, rgba(138, 61, 10, .35), var(--dusk)); }
.joins .row { margin: 0; }

.arms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 16px; }
.arms small { font-size: 13px; color: var(--muted); }
.lines { display: grid; gap: 10px; }
.line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--night);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.line.paused { opacity: .7; }
.line h3 { font-size: 18px; color: var(--title); }
.line p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.line .pace { color: var(--gold); }
.cog { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: conic-gradient(var(--ember) var(--p), var(--dusk-3) 0); }
.cog::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--night); }
.cog .ico { position: relative; width: 24px; height: 24px; }
.line.paused .cog { background: conic-gradient(var(--muted) var(--p), var(--dusk-3) 0); }
.line-ctl { display: grid; justify-items: end; gap: 8px; }
.line-ctl .row { margin: 0; justify-content: flex-end; }
.fac { display: inline-flex; align-items: center; gap: 6px; }
.fac b { min-width: 2ch; text-align: center; font: 24px/1 var(--display); font-weight: normal; color: var(--title); font-variant-numeric: tabular-nums; }
.fac small { font: 11px var(--ui); color: var(--muted); letter-spacing: .06em; }
.step { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--dusk-3); color: var(--title); font: 18px/1 var(--ui); box-shadow: inset 0 0 0 1px var(--rule-2); }
.step:hover { background: rgba(245, 130, 15, .2); }
.fac.big { margin-top: 14px; gap: 10px; }
.fac.big b { font-size: 32px; }
.designs, .samples, .agents { display: grid; gap: 2px; }
.designs li, .samples li, .agents li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding-block: 9px; border-bottom: 1px solid var(--rule); }
.designs li:last-child, .samples li:last-child, .agents li:last-child { border-bottom: 0; }
.designs b, .agents b { display: block; font: 16px var(--display); font-weight: normal; color: var(--title); }
.designs small, .agents small { font-size: 13px; color: var(--muted); }
.samples { margin-top: 12px; }
.agents li { display: grid; justify-content: stretch; gap: 0; }

.scales { display: grid; gap: 10px; }
.scale-bar { position: relative; display: flex; height: 18px; border-radius: 9px; overflow: visible; background: var(--dusk-3); }
.scale-bar .recon { background: linear-gradient(90deg, var(--rust), var(--ember)); border-radius: 9px 0 0 9px; }
.scale-bar .counter { background: linear-gradient(90deg, #5d4a5e, #3d3040); border-radius: 0 9px 9px 0; }
.scale-bar .aim { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--sun); box-shadow: 0 0 8px var(--sun); }
.scale-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.scale-legend b { margin-left: 6px; font: 22px var(--display); font-weight: normal; color: var(--title); }
.scale-legend em { margin-left: 6px; font-size: 12px; color: var(--faint); }
.ops { display: grid; gap: 10px; }
.op { padding: 12px 14px; border-radius: 10px; background: var(--night); box-shadow: inset 3px 0 0 var(--ember); }
.op.wait { box-shadow: inset 3px 0 0 var(--gold); }
.op.good { box-shadow: inset 3px 0 0 var(--up); }
.op.bad { box-shadow: inset 3px 0 0 var(--bad); }
.ops.closed .op { opacity: .7; }
.op-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.op-head b { font: 17px var(--display); font-weight: normal; color: var(--title); }
.op small { font-size: 12px; color: var(--muted); }
.op .quiet { font-size: 13px; margin-top: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 14px; border-radius: 999px; background: rgba(245, 130, 15, .14); color: var(--title); font: 16px var(--display); }

.pacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pact { display: grid; gap: 14px; align-content: start; padding: 18px 20px; border-radius: 12px; background: linear-gradient(180deg, var(--dusk-2), var(--dusk)); box-shadow: inset 0 0 0 1px var(--rule); }
.pact.mine { box-shadow: inset 0 0 0 1px var(--rule-2), 0 0 40px rgba(245, 130, 15, .1); }
.pact header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pact h3 { font-size: 22px; color: var(--title); }
.pact header small { font-size: 13px; color: var(--muted); }
.flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flags a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px; border-radius: 999px; background: var(--night); font-size: 13px; color: var(--text); }
.flags a:hover { background: var(--dusk-3); }
.flags a.lead { box-shadow: inset 0 0 0 1px var(--gold); }
.flags a.here { background: rgba(245, 130, 15, .2); }
.flags .flag { width: 24px; height: 16px; border-radius: 8px; }
.charter summary { cursor: pointer; font: 16px var(--display); color: var(--gold); }
.charter .paper { margin-top: 10px; }

.finder input, .filters input, .filters select, .manual input, .wstep .filter, .field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--night);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--rule-2);
}
.finder input:focus, .filters input:focus, .filters select:focus, .manual input:focus, .wstep .filter:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ember); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 12px; max-width: 760px; width: 100%; margin-inline: auto; }
.podium a { position: relative; display: grid; justify-items: center; gap: 6px; padding: 18px 10px 0; text-align: center; }
.podium a i {
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 8px;
  border-radius: 10px 10px 0 0;
  font: 34px var(--display);
  font-style: normal;
  color: #2a1406;
  background: linear-gradient(180deg, var(--flare), var(--rust));
}
.podium .step-1 { order: 2; }
.podium .step-1 i { height: 110px; background: linear-gradient(180deg, var(--sun), var(--ember)); }
.podium .step-2 { order: 1; }
.podium .step-2 i { height: 80px; }
.podium .step-3 { order: 3; }
.podium .step-3 i { height: 60px; opacity: .85; }
.podium b { font: 18px/1.15 var(--display); font-weight: normal; color: var(--title); }
.podium span { font-size: 14px; color: var(--muted); }
.podium-flag { width: 54px; height: 36px; }
.ranks { display: grid; gap: 4px; }
.ranks a {
  display: grid;
  grid-template-columns: 2.4em auto minmax(0, 12em) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
}
.ranks a:hover { background: var(--dusk-2); }
.ranks li.mine a { background: rgba(245, 130, 15, .14); box-shadow: inset 0 0 0 1px var(--rule-2); }
.place { font: 18px var(--display); color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rk-name { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-bar { height: 8px; border-radius: 4px; background: var(--dusk-2); overflow: hidden; }
.rk-bar span { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--rust), var(--ember)); }
.rk-val { display: grid; justify-items: end; }
.rk-val b { font: 17px var(--display); font-weight: normal; color: var(--title); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk-val small { font-size: 11px; color: var(--muted); }

.tech-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.bcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.bcard { display: grid; gap: 8px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(180deg, var(--dusk-2), var(--dusk)); box-shadow: inset 0 0 0 1px var(--rule); transition: box-shadow .15s, transform .15s; }
.bcard:hover { box-shadow: inset 0 0 0 1px var(--rule-2), 0 8px 24px rgba(0, 0, 0, .35); transform: translateY(-1px); }
.bc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.bc-head b { font: 18px/1.15 var(--display); font-weight: normal; color: var(--title); }
.bc-head .num { font: 20px var(--display); }
.bc-head .num small { font-size: 13px; color: var(--muted); }
.job { padding-block: 12px 14px; border-top: 1px solid var(--rule); }
.job:first-of-type { border-top: 0; padding-top: 0; }
.job header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.job-name { font: 18px/1.2 var(--display); color: var(--title); }
.job-name:hover { color: var(--flare); }
.job header span { font-size: 13px; color: var(--muted); }
.courses li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-block: 8px; border-top: 1px solid var(--rule); }
.courses li div { display: grid; }
.courses li span { font-size: 13px; color: var(--muted); }
.branches li + li { border-top: 1px solid var(--rule); }
.branches a { display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; padding: 10px 6px; border-radius: 6px; }
.branches a:hover { background: var(--dusk-3); }
.branches b { font: 18px/1.2 var(--display); font-weight: normal; color: var(--title); }
.num { font-variant-numeric: tabular-nums; color: var(--gold); }
.branches .strip, .branches .note { grid-column: 1 / -1; }
.note { font-size: 12px; color: var(--muted); }
.strip { display: flex; gap: 2px; height: 9px; }
.strip span { flex: 1; border-radius: 1px; background: linear-gradient(to right, var(--ember) calc(var(--f) * 100%), var(--dusk-3) 0); }
.strip span.run { box-shadow: inset 0 -2px 0 var(--sun); }
.gains { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 20px; margin: 0; }
.gains div { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; }
.gains dt { color: var(--text); }
.gains dd { margin: 0; font: 19px var(--display); color: var(--flare); font-variant-numeric: tabular-nums; }
.gains p { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
.industry { margin: 0; font-size: 14px; color: var(--muted); }
.industry b { font: 19px var(--display); font-weight: normal; color: var(--title); }

.tech-branch { display: grid; gap: 12px; min-width: 0; }
.branch-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--muted); }
.legend li::before { content: ""; display: inline-block; width: 12px; height: 9px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; }
.legend .open::before { background: var(--claim); }
.legend .research::before { background: var(--ready); box-shadow: inset 0 -3px 0 var(--path); }
.legend .ready::before { background: var(--ready); box-shadow: inset 0 0 0 2px var(--edge); }
.legend .locked::before { background: var(--locked); }
.legend .lost::before { background: var(--locked); box-shadow: inset 0 0 0 1px var(--war); }
.tech-desk { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.graph-wrap, .map-wrap { overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.graph-wrap.dragging, .map-wrap.dragging { cursor: grabbing; }
.graph-wrap.dragging .node, .map-wrap.dragging img { pointer-events: none; }
.graph-wrap { height: min(68vh, 640px); padding: 0; background: var(--paper-deep); }
.graph { position: relative; }
.graph .col { position: absolute; top: 0; bottom: 0; border-right: 1px dashed var(--line); }
.graph .col span { position: sticky; top: 0; display: block; padding: 6px 12px; font: 14px var(--display); color: var(--ink-muted); background: var(--paper-deep); }
.graph .col.now { background: rgba(222, 178, 116, .18); }
.graph .col.now span { color: var(--edge); background: transparent; }
.graph svg { position: absolute; inset: 0; pointer-events: none; }
.graph path { fill: none; stroke: var(--ink-muted); stroke-width: 1.2; opacity: .45; }
.graph path.done { stroke: var(--ink); opacity: .7; }
.graph path.lit { stroke: var(--edge); stroke-width: 2.4; opacity: 1; }
.node {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--locked);
  color: var(--ink-text);
  font-family: var(--body);
  text-align: left;
  overflow: hidden;
  line-height: 1.15;
}
.node .nm { font-size: 12.5px; line-height: 1.12; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.node .yr { font-size: 11px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.node i { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--path); }
.node.open { background: var(--claim); }
.node.open .yr { color: var(--ink); }
.node.research { background: var(--ready); border-color: var(--path); }
.node.ready { background: var(--ready); border: 2px solid var(--edge); }
.node.locked { color: var(--ink-muted); border-color: var(--ink-muted); }
.node.lost { color: var(--ink-muted); border: 1px dashed var(--war); text-decoration: line-through; text-decoration-color: rgba(158, 59, 46, .5); }
.node.road { border: 2px solid var(--edge); color: var(--ink-text); }
.node.near { box-shadow: 0 0 0 2px rgba(181, 86, 44, .35); }
.node.pick { box-shadow: 0 0 0 3px var(--edge); z-index: 2; }
.node:hover { filter: brightness(1.04); z-index: 3; }
.node-card {
  max-height: min(68vh, 640px);
  overflow-y: auto;
  padding: 16px 18px 18px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--dusk-2), var(--dusk));
  box-shadow: inset 0 0 0 1px var(--rule);
}
.node-card header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.node-card h3 { font-size: 22px; color: var(--title); }
.node-card h4 { margin: 16px 0 6px; font: 11px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.node-card .quiet + .quiet { margin-top: 8px; }
.badge { font: 11px var(--ui); letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--dusk-3); color: var(--text); }
.badge.open { background: var(--claim); color: var(--ink-text); }
.badge.research { background: rgba(245, 130, 15, .2); color: var(--flare); }
.badge.ready { background: rgba(255, 111, 38, .2); color: var(--blaze); }
.badge.lost { color: var(--bad); }
.facts { display: flex; gap: 22px; margin: 12px 0 0; }
.facts div { display: grid; }
.facts dt { font: 11px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font: 19px var(--display); color: var(--title); font-variant-numeric: tabular-nums; }
.acts { margin-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { padding: 3px 9px; border: 0; border-radius: 6px; background: var(--night); color: var(--text); font-size: 13px; text-align: left; box-shadow: inset 0 0 0 1px var(--rule); }
.chip:hover:not(:disabled) { box-shadow: inset 0 0 0 1px var(--ember); }
.chip:disabled { opacity: .5; cursor: default; }
.gear li { font-size: 13px; padding-block: 2px; color: var(--text); }

.tabbar { display: none; }
.mark { display: block; width: 100%; height: auto; overflow: visible; }
.more-sheet { position: fixed; inset: 0; z-index: 40; }
.more-back { position: absolute; inset: 0; background: rgba(5, 3, 4, .7); backdrop-filter: blur(2px); }
.more-card {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 18px;
  max-height: 88%;
  overflow-y: auto;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background:
    radial-gradient(ellipse 120% 40% at 50% 0%, rgba(245, 130, 15, .18), rgba(245, 130, 15, 0) 70%),
    var(--night);
  box-shadow: 0 -1px 0 rgba(242, 180, 94, .35), 0 -20px 60px rgba(0, 0, 0, .7);
  animation: rise .22s ease-out;
}
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.grip { justify-self: center; width: 42px; height: 4px; border-radius: 2px; background: var(--dusk-3); }
.more-card .standard { padding-bottom: 14px; }
.more-card .std-flag { width: 60px; height: 40px; margin-bottom: 4px; }
.more-card .standard b { font-size: 24px; }
.more-card .vista { height: 54px; }
.more-card .vista.on { height: 64px; }

.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px; }
.sheet-back { position: absolute; inset: 0; background: rgba(5, 3, 4, .72); backdrop-filter: blur(3px); }
.sheet-card {
  position: relative;
  width: min(480px, 100%);
  max-height: calc(100% - 20px);
  overflow-y: auto;
  padding: 20px 22px 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--dusk-2), var(--dusk));
  box-shadow: inset 0 0 0 1px var(--rule-2), 0 30px 80px rgba(0, 0, 0, .7);
}
.sheet-card.wide { width: min(980px, 100%); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; font: 26px/1.1 var(--display); color: var(--title); }
.sheet-lead { margin: 0 0 14px; color: var(--muted); }
.x { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; font: 24px/1 var(--ui); color: var(--muted); flex: none; }
.x:hover { background: var(--dusk-3); color: var(--title); }
.sheet-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font: 12px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field small { font-size: 12px; color: var(--faint); }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.field select, .filters select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.range { display: flex; align-items: center; gap: 12px; }
.range input { flex: 1; accent-color: var(--ember); box-shadow: none !important; padding: 0 !important; background: none !important; }
.range output { min-width: 3ch; font: 22px var(--display); color: var(--title); text-align: right; }
.sheet-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.wizard, .picker { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.wsteps { display: grid; gap: 18px; max-height: 64vh; overflow-y: auto; padding-right: 4px; }
.wstep { display: grid; gap: 10px; }
.wstep h3 { margin: 0; font: 12px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.choices.long { max-height: 330px; overflow-y: auto; padding: 2px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--night); text-align: left; box-shadow: inset 0 0 0 1px var(--rule); }
.choice:hover { box-shadow: inset 0 0 0 1px var(--rule-2); }
.choice.on { background: rgba(245, 130, 15, .16); box-shadow: inset 0 0 0 1.5px var(--ember); }
.choice b { display: block; font: 16px/1.2 var(--display); font-weight: normal; color: var(--title); }
.choice small { display: block; font-size: 12px; color: var(--muted); }
.choice .ico { width: 24px; height: 24px; }
.manual { display: flex; gap: 8px; }
.manual input { flex: 1; }
.wsum { position: sticky; top: 0; display: grid; gap: 6px; padding: 16px; border-radius: 12px; background: var(--night); box-shadow: inset 0 0 0 1px var(--rule); }
.wsum h4 { margin: 8px 0 2px; font: 12px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.wsum hr { width: 100%; border: 0; border-top: 1px solid var(--rule); margin: 6px 0; }
.wsum p { margin: 0; font-size: 14px; }
.sum-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.sum-row span { color: var(--muted); }
.sum-row b { font-weight: normal; color: var(--title); text-align: right; }
.sum-note { color: var(--muted); font-size: 12px !important; }
.missing { color: var(--flare) !important; }
.wsum .sheet-actions { margin-top: 10px; }
.pick-list { display: grid; gap: 12px; min-width: 0; }
.filters { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.pick-card h3 { margin: 0; font: 22px var(--display); color: var(--title); }
.pick-card .ledger { margin-top: 10px; }
.pick-card .ledger dd { font-size: 16px; }
.desc { margin: 12px 0 0; font-size: 13px; color: var(--muted); max-height: 140px; overflow-y: auto; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(560px, calc(100% - 32px));
  padding: 12px 10px 12px 16px;
  border-radius: 12px;
  background: var(--dusk-2);
  box-shadow: inset 0 0 0 1px var(--rule-2), inset 4px 0 0 var(--ember), 0 16px 40px rgba(0, 0, 0, .6);
  z-index: 60;
}
.toast p { flex: 1; margin: 0; white-space: pre-wrap; }
.toast small { color: var(--muted); }
.toast.bad { box-shadow: inset 0 0 0 1px rgba(229, 96, 58, .5), inset 4px 0 0 var(--bad), 0 16px 40px rgba(0, 0, 0, .6); }

.gate {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 30%, #3a1d1a 0%, var(--night) 65%);
  text-align: center;
}
.gate img { width: min(320px, 72vw); height: auto; }
.gate p { margin: 0; font: 22px var(--display); color: var(--title); max-width: 30em; }

@media (max-width: 1200px) {
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  :root { --rail: 210px; }
  .grid.two, .grid.wide-left { grid-template-columns: minmax(0, 1fr); }
  .tech-desk { grid-template-columns: minmax(0, 1fr); }
  .node-card { max-height: none; }
  .wizard, .picker { grid-template-columns: minmax(0, 1fr); }
  .wsteps { max-height: none; overflow: visible; }
  .wsum { position: static; }
}

@media (max-width: 700px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .rail { display: none; }
  .main { padding-bottom: 0; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(23, 15, 20, .97), rgba(15, 11, 13, .99));
    border-top: 1px solid;
    border-image: linear-gradient(90deg, rgba(243, 142, 56, 0), rgba(243, 142, 56, .45), rgba(243, 142, 56, 0)) 1;
    z-index: 30;
  }
  .tabbar a {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 5px 2px 3px;
    font: 11px var(--ui);
    color: var(--faint);
  }
  .tabbar a .ico { width: 24px; height: 24px; filter: grayscale(.7) brightness(.7); transition: filter .15s; }
  .tabbar a.on { color: var(--title); }
  .tabbar a.on .ico { filter: drop-shadow(0 0 6px rgba(255, 143, 51, .6)); }
  .sun-tab {
    justify-self: center;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin-top: -22px;
    padding: 0 9px 6px;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 70%, #2c1a1c, var(--night) 70%);
    box-shadow: 0 0 0 1px rgba(242, 180, 94, .4), 0 -6px 20px rgba(245, 130, 15, .18), 0 8px 18px rgba(0, 0, 0, .7);
  }
  .sun-tab .mark { filter: drop-shadow(0 0 4px rgba(255, 143, 51, .5)); }
  .sun-tab.on { box-shadow: 0 0 0 1.5px var(--flare), 0 -6px 26px rgba(245, 130, 15, .4), 0 8px 18px rgba(0, 0, 0, .7); }
  .hero { min-height: 180px; background-position: 70% 70%; }
  .hero::before { background: linear-gradient(180deg, rgba(15, 11, 13, .1) 0%, rgba(15, 11, 13, .55) 55%, var(--night) 100%); }
  .hero-in { padding: 22px var(--gutter) 4px; }
  .hero h1 { font-size: 34px; }
  .figures { gap: 10px 22px; }
  .figures dd { font-size: 20px; }
  .view { padding: 14px var(--gutter) 28px; gap: 16px; }
  .grid, .stack-col { gap: 16px; }
  .grid.three { grid-template-columns: minmax(0, 1fr); }
  .tech-top { grid-template-columns: minmax(0, 1fr); }
  .bcards { grid-template-columns: minmax(0, 1fr); }
  .block { padding: 16px; }
  .purse { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .purse .ledger { width: 100%; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .line { grid-template-columns: auto minmax(0, 1fr); }
  .line-ctl { grid-column: 1 / -1; justify-items: start; grid-template-columns: auto; }
  .line-ctl .row { justify-content: flex-start; }
  .graph-wrap { height: 58vh; }
  .node-card:not(.on) { display: none; }
  .ranks a { grid-template-columns: 2em auto minmax(0, 1fr) auto; }
  .rk-bar { display: none; }
  .podium b { font-size: 15px; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .sheet { place-items: end stretch; padding: 0; }
  .sheet-card, .sheet-card.wide { width: 100%; max-height: 92%; border-radius: 18px 18px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom, 0px)); }
  .pacts { grid-template-columns: minmax(0, 1fr); }
  .map-zoom { top: 8px; right: 8px; gap: 4px; }
  .map-zoom button { width: 30px; height: 30px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.atlas { position: relative; }
.map-wrap { position: relative; min-height: 220px; max-height: 76vh; border-radius: 12px; background: var(--dusk); box-shadow: inset 0 0 0 1px var(--rule), 0 14px 40px rgba(0, 0, 0, .45); }
.map-wrap.ready { min-height: 0; }
.map-wrap img { display: block; width: 100%; max-width: none; height: auto; }
.map-wait { position: absolute; inset: 0; display: grid; place-items: center; }
.map-wait .ico { width: 30px; height: 30px; animation: turn 1.6s linear infinite; }
.map-zoom { position: absolute; top: 12px; right: 12px; display: grid; gap: 6px; }
.map-zoom button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 11, 13, .85); color: var(--title); font: 20px/1 var(--ui); box-shadow: inset 0 0 0 1px var(--rule-2), 0 4px 12px rgba(0, 0, 0, .5); }
.map-zoom button:hover { background: var(--dusk-3); }
.roster { justify-content: center; }

.regime { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 8px 32px; align-items: start; }
.regime-side { display: grid; justify-items: center; gap: 12px; padding-top: 8px; }
.regime-side .pairs, .regime-side .warn { justify-self: stretch; margin-top: 0; }
.regime-side .risk { margin: 0; }
.gdp-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.btn:not(.ghost) .ico { display: none; }
@media (max-width: 980px) {
  .regime, .gdp-row { grid-template-columns: minmax(0, 1fr); }
}

.rpick:empty { display: none; }
.rpick { margin-bottom: 12px; }
.rmap { position: relative; }
.rmap.wait { height: 240px; border-radius: 12px; background: var(--night); box-shadow: inset 0 0 0 1px var(--rule); }
.rmap-box { overflow: hidden; max-height: 340px; border-radius: 12px; background: radial-gradient(120% 90% at 50% 40%, #20161c, var(--night)); box-shadow: inset 0 0 0 1px var(--rule); cursor: grab; touch-action: none; user-select: none; }
.rmap-box.dragging { cursor: grabbing; }
.rmap-box svg { display: block; width: 100%; max-width: none; height: auto; max-height: 340px; }
.rmap-box.zoomed svg { max-height: none; }
.rmap-box path { fill: #4a3528; stroke: #1a1115; stroke-width: 1.1; stroke-linejoin: round; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .12s; }
.rmap-box path:hover { fill: #7a5232; }
.rmap-box path.off { fill: #2a1f22; cursor: not-allowed; }
.rmap-box path.on { fill: var(--ember); stroke: var(--sun); stroke-width: 1.6; }
.rmap-tip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: 30px; padding: 8px 2px 0; font-size: 14px; color: var(--muted); }
.rmap-tip b { color: var(--title); font-weight: 400; font-family: var(--display); font-size: 17px; }
.rmap-tip .flag { width: 24px; height: 16px; }
.map-zoom.mini { top: 8px; right: 8px; gap: 4px; }
.map-zoom.mini button { width: 30px; height: 30px; font-size: 17px; }
details.as-list { margin-top: 4px; }
details.as-list > summary { cursor: pointer; padding: 4px 0 8px; font: 13px var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); list-style: none; }
details.as-list > summary::-webkit-details-marker { display: none; }
details.as-list > summary::before { content: "▸ "; }
details.as-list[open] > summary::before { content: "▾ "; }

.welcome { display: grid; gap: 22px; }
.pick { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.world-pick .rmap-box, .world-pick .rmap-box svg { max-height: 62vh; }
.world-pick .rmap-box { background: radial-gradient(140% 100% at 50% 30%, #1d1a26, #0c0a10); }
.world-pick path { fill: #2b2226; stroke: #0c0a10; stroke-width: .7; cursor: default; }
.world-pick path:hover { fill: #2b2226; }
.world-pick path.free { fill: #8d6236; cursor: pointer; }
.world-pick path.free:hover { fill: #c9853f; }
.world-pick path.taken { fill: #46333a; cursor: pointer; }
.world-pick path.taken:hover { fill: #5c4450; }
.world-pick path.on { fill: var(--ember); stroke: var(--sun); stroke-width: 1.4; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.legend-dot:first-child { margin-left: 0; }
.legend-dot.free { background: #8d6236; }
.legend-dot.taken { background: #46333a; }
.pick-card { position: sticky; top: 16px; display: grid; gap: 14px; justify-items: start; min-height: 220px; }
.pick-empty { display: grid; place-items: center; align-self: center; width: 100%; color: var(--muted); text-align: center; }
.pick-flag { width: 96px; height: 64px; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 10px 26px rgba(0, 0, 0, .5); }
.pick-name { display: grid; gap: 2px; }
.pick-name small { font: 12px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.pick-name b { font: 400 30px/1.1 var(--display); color: var(--title); text-wrap: balance; }
.pick-facts { display: grid; gap: 8px; width: 100%; margin: 0; }
.pick-facts div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--rule); }
.pick-facts dt { color: var(--muted); font-size: 14px; }
.pick-facts dd { margin: 0; color: var(--title); font-variant-numeric: tabular-nums; }
.btn.big { width: 100%; padding: 13px 18px; font-size: 17px; }
.pick-list h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pick-list h2 .filter { margin-left: auto; width: min(240px, 100%); }
.pick-group h3 { margin: 16px 0 8px; font: 12px var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.pick-group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.pick-group button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px 7px 7px; border: 0; border-radius: 10px; background: var(--night); color: var(--text); font: 15px var(--body); text-align: left; cursor: pointer; }
.pick-group button:hover { background: var(--dusk-3); }
.pick-group button.on { background: rgba(245, 130, 15, .22); box-shadow: inset 0 0 0 1px var(--ember); color: var(--title); }
.pick-group li[hidden], .pick-group[hidden] { display: none; }
#tabbar.guest { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 980px) {
  .pick { grid-template-columns: minmax(0, 1fr); }
  .pick-card { position: static; }
}
@media (max-width: 700px) {
  .world-pick .rmap-box, .world-pick .rmap-box svg { max-height: 46vh; }
  .rmap-box, .rmap-box svg { max-height: 280px; }
  .pick-group ul { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.rmap-box .cuts line { stroke: #1a1115; stroke-width: 1.4; vector-effect: non-scaling-stroke; pointer-events: none; }
