/* Telas: cabeçalho, navegação, painel lateral, ficha do processo, sessões e conversas */

/* ---------- Cabeçalho ---------- */
.masthead {
  background: var(--ink-900);
  color: var(--text-inv);
  border-bottom: 1px solid var(--ink-950);
  position: relative;
}
.masthead::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  background: linear-gradient(90deg, var(--brass-600), var(--brass-400) 50%, var(--brass-600));
  opacity: 0.85;
}
.masthead-inner { display: flex; align-items: center; gap: var(--s-8); min-height: 76px; }
.brand { display: flex; align-items: center; gap: var(--s-3); flex: none; }
.brand-seal {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--brass-500);
  color: var(--brass-text);
  background: var(--brass-tint);
  box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 4px color-mix(in srgb, var(--brass-500) 40%, transparent);
}
.brand-name { font-family: var(--font-title); font-size: var(--fs-18); font-weight: var(--fw-semi); letter-spacing: 0.01em; line-height: 1.1; }
.brand-sub { font-size: var(--fs-12); color: rgba(244, 246, 248, 0.68); }
.metrics { display: flex; gap: var(--s-6); flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.metrics::-webkit-scrollbar { display: none; }
.metric { display: flex; flex-direction: column; gap: 2px; flex: none; }
.metric-label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-12); color: rgba(244, 246, 248, 0.66); }
.metric-label .icon { width: 14px; height: 14px; }
.metric-value { font-size: var(--fs-16); font-weight: var(--fw-semi); font-variant-numeric: tabular-nums; transition: color var(--d-2) var(--ease); }
.metric-value.is-bad { color: #ff9d92; }
.metric-value.is-flash { animation: flash 900ms var(--ease-out); }
.masthead-actions { display: flex; gap: var(--s-2); align-items: center; flex: none; }
.masthead .btn-ghost { --btn-fg: rgba(244, 246, 248, 0.8); --btn-bg-hover: rgba(255, 255, 255, 0.08); }
.masthead .btn-ghost:hover:not(:disabled) { color: var(--text-inv); }
@keyframes flash { 0% { color: var(--brass-400); text-shadow: 0 0 14px var(--brass-500); } 100% { color: inherit; text-shadow: none; } }

/* ---------- Navegação ---------- */
.navbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }
.navbar .date-chip { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--text-2); font-size: var(--fs-13); white-space: nowrap; }

/* ---------- Cabeçalho de tela ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-48); }
.page-head p { margin-top: var(--s-2); color: var(--text-2); max-width: 64ch; font-size: var(--fs-16); }

/* ---------- Painel lateral de acontecimentos ---------- */
.aside { position: sticky; top: calc(var(--h-lg) + var(--s-6)); }
.feed { max-height: calc(100vh - 180px); overflow-y: auto; }
.feed-item { display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-icon { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); transform: rotate(45deg); }
.feed-icon .icon { transform: rotate(-45deg); }
.feed-icon .icon { width: 14px; height: 14px; }
.feed-icon.k-court { background: var(--tint-strong); color: var(--ink-text); }
.feed-icon.k-crisis { background: var(--bad-bg); color: var(--bad); }
.feed-icon.k-congress { background: var(--brass-tint); color: var(--brass-text); }
.feed-icon.k-state { background: var(--ok-bg); color: var(--ok); }
.feed-text { font-size: var(--fs-14); line-height: 1.5; }
.feed-date { font-family: var(--font-title); font-size: var(--fs-14); font-weight: var(--fw-semi); letter-spacing: 0.03em; color: var(--brass-text); margin-top: 2px; }
.feed-item.is-new { animation: msg-in var(--d-3) var(--ease-out) both; }

/* ---------- Orçamento ---------- */
.budget { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); overflow: hidden; }
.budget .stat { padding: var(--s-5) var(--s-6); box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3); }
.action {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--bevel);
  text-align: left; cursor: pointer;
  transition: border-color var(--d-1) var(--ease), background-color var(--d-1) var(--ease), transform var(--d-1) var(--ease), box-shadow var(--d-2) var(--ease);
}
.action:hover:not(:disabled) { border-color: color-mix(in srgb, var(--brass-500) 60%, var(--line)); box-shadow: var(--glow); }
.action:active:not(:disabled) { transform: translateY(1px); }
.action:disabled { opacity: 0.5; cursor: not-allowed; }
.action-icon { width: var(--h-md); height: var(--h-md); flex: none; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--solid); color: var(--brass-400); border: 1px solid color-mix(in srgb, var(--brass-500) 35%, transparent); box-shadow: var(--bevel); }
.action .grow { flex: 1; min-width: 0; }
.action-title { font-family: var(--font-title); font-size: var(--fs-18); font-weight: var(--fw-semi); letter-spacing: 0.02em; line-height: 1.15; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); }
.action-cost { font-family: var(--font-ui); font-size: var(--fs-13); color: var(--brass-text); font-weight: var(--fw-semi); letter-spacing: 0; white-space: nowrap; flex: none; padding: 1px 6px; border-radius: var(--r-sm); background: var(--brass-tint); }
.action-text { margin-top: 4px; font-size: var(--fs-14); color: var(--text-2); }
.action.is-used .action-icon { background: var(--ok-bg); color: var(--ok); }

/* ---------- Estados ---------- */
.sector { display: inline-flex; align-items: center; gap: var(--s-2); }
.sector-icon { width: 28px; height: 28px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.sector-icon .icon { width: 15px; height: 15px; }

/* ---------- Congresso ---------- */
.bill-row { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-6); border-bottom: 1px solid var(--line); }
.bill-row:last-child { border-bottom: 0; }
.bill-row .grow { flex: 1; min-width: 0; }
.bill-title { font-family: var(--font-title); font-size: var(--fs-18); font-weight: var(--fw-semi); letter-spacing: 0.02em; }
.bill-chips { display: flex; gap: var(--s-1); flex-wrap: wrap; margin-top: 6px; }
.tally { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.tally-bar { display: flex; height: 12px; border-radius: 1px; overflow: hidden; background: var(--surface-3); margin: var(--s-2) 0; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25); }
.tally-bar .y { background: var(--ok); }
.tally-bar .n { background: var(--bad); }
.tally-bar span { transition: width var(--d-3) var(--ease-out); }
.party-chips { display: flex; flex-wrap: wrap; gap: var(--s-1); }

/* ---------- Ficha do processo (o dossiê) ---------- */
.dossier {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.dossier::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--brass-500), var(--brass-600));
}
.dossier-head { display: grid; grid-template-columns: 1fr auto; gap: var(--s-6); padding: var(--s-8) var(--s-8) var(--s-6) calc(var(--s-8) + 4px); border-bottom: 1px solid var(--line); }
.dossier-kind { font-size: var(--fs-13); color: var(--text-3); display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.dossier-title { margin-top: var(--s-2); font-family: var(--font-title); font-size: var(--fs-48); font-weight: 900; line-height: 1; max-width: 22ch; }
.dossier-badges { margin-top: var(--s-4); display: flex; gap: var(--s-2); flex-wrap: wrap; }
.seal {
  width: 96px; height: 96px;
  border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  border: 2px solid var(--bad);
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 6px color-mix(in srgb, var(--bad) 70%, transparent);
  color: var(--bad);
  font-family: var(--font-title);
  transform: rotate(-10deg);
  opacity: 0.88;
}
.seal b { display: block; font-size: var(--fs-22); font-weight: 900; line-height: 1; }
.seal small { display: block; font-size: 11px; margin-top: 2px; }
.dossier-body { padding: var(--s-6) var(--s-8) var(--s-8) calc(var(--s-8) + 4px); display: flex; flex-direction: column; gap: var(--s-8); }
.dossier-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.fact-label { font-size: var(--fs-13); color: var(--text-3); margin-bottom: var(--s-1); }
.fact-value { font-family: var(--font-title); font-size: var(--fs-18); font-weight: var(--fw-semi); letter-spacing: 0.02em; }
.doc-section h4 { font-size: var(--fs-18); font-weight: var(--fw-semi); color: var(--brass-text); margin-bottom: var(--s-3); display: flex; align-items: center; gap: var(--s-2); }
.doc-section h4 .icon { width: 15px; height: 15px; color: var(--brass-600); }
.doc-text { font-family: var(--font-ui); font-size: var(--fs-16); line-height: var(--lh-doc); max-width: 72ch; }
.doc-lead { font-family: var(--font-ui); font-size: var(--fs-18); line-height: 1.5; max-width: 64ch; }
.sides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.side { border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.side-head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); font-size: var(--fs-13); font-weight: var(--fw-semi); border-bottom: 1px solid var(--line); }
.side-acc .side-head { color: var(--bad); background: color-mix(in srgb, var(--bad-bg) 60%, var(--surface-2)); }
.side-def .side-head { color: var(--ok); background: color-mix(in srgb, var(--ok-bg) 60%, var(--surface-2)); }
.arg { padding: var(--s-4); border-bottom: 1px solid var(--line); }
.arg:last-child { border-bottom: 0; }
.arg-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-2); }
.arg-title { font-weight: var(--fw-semi); font-size: var(--fs-14); }
.arg-text { font-family: var(--font-ui); font-size: var(--fs-15); line-height: 1.6; color: var(--text); }
.opinion { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--tint); border: 1px solid var(--tint-strong); }
.dossier-actions { display: flex; gap: var(--s-3); flex-wrap: wrap; padding: var(--s-5) var(--s-8) var(--s-5) calc(var(--s-8) + 4px); border-top: 1px solid var(--line); background: var(--surface-2); }

/* Cartão de processo na lista */
.case-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--s-4); align-items: center;
  width: 100%;
  padding: var(--s-4) var(--s-6);
  border: 0; border-bottom: 1px solid var(--line);
  background: transparent; text-align: left; cursor: pointer;
  transition: background-color var(--d-1) var(--ease);
}
.case-card:last-child { border-bottom: 0; }
.case-card:hover { background: var(--surface-2); }
.case-card:hover .chev { transform: translateX(2px); color: var(--text-2); }
.case-card .chev { color: var(--text-3); transition: transform var(--d-2) var(--ease); }
.case-num { width: 52px; height: 52px; border-radius: var(--r-md); display: grid; place-items: center; text-align: center; background: var(--solid); color: var(--brass-400); border: 1px solid color-mix(in srgb, var(--brass-500) 35%, transparent); font-family: var(--font-title); line-height: 1.05; }
.case-num b { display: block; font-size: var(--fs-15); }
.case-num small { display: block; font-size: 10px; }
.case-title { font-family: var(--font-title); font-weight: var(--fw-semi); font-size: var(--fs-18); letter-spacing: 0.02em; }
.case-meta { margin-top: 4px; display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; font-size: var(--fs-13); color: var(--text-3); }

/* ---------- Colegiado ---------- */
.bench { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-3); }
.justice {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface);
  transition: border-color var(--d-1) var(--ease), background-color var(--d-1) var(--ease);
}
.justice:hover { border-color: var(--line-strong); }
.justice .grow { flex: 1; min-width: 0; }
.justice-name { font-family: var(--font-title); font-weight: var(--fw-semi); font-size: var(--fs-18); letter-spacing: 0.02em; line-height: 1.15; }
.justice-meta { margin-top: 2px; font-size: var(--fs-12); color: var(--text-3); }
.justice-tags { margin-top: var(--s-2); display: flex; gap: var(--s-1); flex-wrap: wrap; }
.justice.is-me { border-color: color-mix(in srgb, var(--brass-500) 55%, var(--line)); background: color-mix(in srgb, var(--brass-tint) 45%, var(--surface)); }
.justice.is-vacant { border-style: dashed; background: transparent; }
.venue-head { display: flex; align-items: center; gap: var(--s-4); }
.venue-icon { width: var(--h-lg); height: var(--h-lg); border-radius: var(--r-md); display: grid; place-items: center; background: var(--solid); color: var(--brass-400); flex: none; }

/* ---------- Sessão de julgamento e conversas ---------- */
.split-card { container-type: inline-size; overflow: hidden; }
.split {
  display: grid;
  grid-template-columns: var(--w-list) minmax(0, 1fr);
  height: clamp(560px, calc(100vh - 140px), 900px);
}
.split-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.split-list-head { padding: var(--s-4); border-bottom: 1px solid var(--line); }
.split-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.session { display: grid; grid-template-columns: minmax(0, 1fr) var(--w-panel); height: 100%; min-height: 0; }
.session-panel { border-left: 1px solid var(--line); padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-5); overflow-y: auto; background: var(--surface); }
.panel-block { display: flex; flex-direction: column; gap: var(--s-3); }
.panel-title { font-family: var(--font-title); font-size: var(--fs-16); font-weight: var(--fw-semi); letter-spacing: 0.03em; color: var(--brass-text); }
.score { display: flex; align-items: baseline; gap: var(--s-2); font-family: var(--font-title); }
.score b { font-size: var(--fs-48); font-weight: 900; line-height: 1; }
.score span { color: var(--text-3); font-size: var(--fs-13); font-family: var(--font-ui); }
.vote-list { display: flex; flex-direction: column; gap: 6px; }
.vote-row { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-13); }
.vote-row .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-empty { flex: 1; display: grid; place-items: center; }
.new-chat .seg { width: 100%; }
.new-chat .seg button { flex: 1; justify-content: center; }

/* O espaço disponível decide o arranjo, não a largura da janela */
@container (max-width: 1040px) {
  .split { height: auto; max-height: none; }
  .session { grid-template-columns: minmax(0, 1fr); }
  .session .chat-log { height: 460px; flex: none; }
  .session-panel { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .session-panel > .notice { grid-column: 1 / -1; }
  .split-main > .chat .chat-log { height: 520px; flex: none; }
}
@container (max-width: 720px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 300px; }
  .session-panel { grid-template-columns: minmax(0, 1fr); }
}

.chat-head .select { width: var(--w-select); }
@media (max-width: 1080px) {
  .aside { position: static; }
  .feed { max-height: 420px; }
  .session { grid-template-columns: 1fr; }
  .session-panel { border-left: 0; border-top: 1px solid var(--line); }
  .split { height: auto; max-height: none; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-list { border-right: 0; border-bottom: 1px solid var(--line); max-height: 260px; }
  .sides, .dossier-facts, .tally { grid-template-columns: 1fr; }
  .dossier-head { grid-template-columns: 1fr; }
  .seal { width: 76px; height: 76px; }
  .masthead-inner { flex-wrap: wrap; gap: var(--s-4); padding: var(--s-4) 0; }
  .metrics { order: 3; width: 100%; flex: none; }
}
@media (max-width: 560px) {
  .dossier-head, .dossier-body, .dossier-actions { padding-left: calc(var(--s-5) + 4px); padding-right: var(--s-5); }
  .msg { max-width: 92%; }
}

/* Indicadores na barra superior (fundo claro ou escuro, conforme o tema) */
.topbar .metrics { gap: var(--s-2); padding: var(--s-2) 0; }
.topbar .metric {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: var(--s-2); align-items: center;
  padding: 6px var(--s-4) 6px var(--s-3);
  border: 1px solid var(--hud-line);
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, color-mix(in srgb, var(--hud-bg-2) 70%, #1e3a32), var(--hud-bg));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.topbar .metric-label { display: contents; color: var(--hud-text-2); font-size: var(--fs-13); }
.topbar .metric-label .icon { grid-row: span 2; width: 22px; height: 22px; color: var(--brass-500); }
.topbar .metric-value { grid-column: 2; grid-row: 2; color: var(--hud-text); font-family: var(--font-title); font-size: var(--fs-22); font-weight: var(--fw-title); line-height: 1; letter-spacing: 0.01em; }
.topbar .metric-value.is-bad { color: var(--bad); text-shadow: 0 0 12px color-mix(in srgb, var(--bad) 55%, transparent); }
.topbar .metric:has(.is-bad) { border-color: color-mix(in srgb, var(--bad) 55%, var(--hud-line)); }
.topbar .unit { color: var(--hud-text-2); }
/* Avançar mês: a jogada principal do turno */
.topbar > .btn-primary { height: var(--h-lg); padding: 0 var(--s-6); font-size: var(--fs-22); font-weight: 900; }
.topbar > .btn-primary:not(:disabled) { animation: turn-ready 2.6s var(--ease) infinite; }
@keyframes turn-ready {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 250, 225, 0.6), inset 0 -2px 0 rgba(90, 58, 6, 0.35), 0 0 0 0 color-mix(in srgb, var(--brass-500) 0%, transparent); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 250, 225, 0.6), inset 0 -2px 0 rgba(90, 58, 6, 0.35), 0 0 22px 2px color-mix(in srgb, var(--brass-500) 45%, transparent); }
}
.aside { top: calc(var(--h-topbar) + var(--s-6)); }
@media (max-width: 760px) { .topbar .metrics { gap: var(--s-4); } }
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; row-gap: var(--s-2); padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .topbar .metrics { order: 3; flex: none; width: 100%; padding-bottom: var(--s-1); }
  .topbar > .btn-primary { margin-left: auto; }
}

/* ---------- Meu estado (governador-jogador) ---------- */
.gv-gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.gv-gauge-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-2); color: var(--text-2); font-size: var(--fs-13); }
.gv-gauge-head strong { color: var(--text); font-family: var(--font-title); font-size: var(--fs-22); font-variant-numeric: tabular-nums; }
.gv-rate { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); flex-wrap: wrap; }
.gv-rate-value { font-family: var(--font-title); font-weight: 900; font-size: 56px; line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.gv-note { margin-top: var(--s-3); font-size: var(--fs-13); }
.gv-bench .seg { width: 100%; }
.gv-bench .seg button { flex: 1; justify-content: center; }
@media (max-width: 720px) { .gv-gauges { grid-template-columns: 1fr; gap: var(--s-4); } .gv-rate .row { width: 100%; } .gv-rate .row .btn { flex: 1; } }

/* ---------- Mapa ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-6); align-items: start; }
.map-card { overflow: hidden; }
.map-toolbar { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.map-toolbar::-webkit-scrollbar { display: none; }
.map-toolbar .seg { flex-wrap: nowrap; }
.map-wrap { padding: var(--s-4); }
.map-sea { fill: color-mix(in srgb, var(--focus) 10%, var(--surface-2)); }
.map-land { fill: var(--surface); }
.map-coast { fill: none; stroke: color-mix(in srgb, var(--focus) 45%, var(--line-strong)); stroke-width: 2.5; pointer-events: none; }
.map-badge { fill: var(--brass-500); stroke: var(--surface); stroke-width: 2; }
.map-badge-text { font: 700 10px var(--font-ui); fill: #1c1405; pointer-events: none; }
.map-legend { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); font-size: var(--fs-12); color: var(--text-2); }
.map-key { display: inline-flex; align-items: center; gap: var(--s-2); }
.map-key i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; opacity: .8; }
.map-ramp { display: inline-flex; align-items: center; gap: var(--s-3); width: 100%; max-width: 460px; }
.map-ramp i { flex: 1; height: 8px; border-radius: 8px; display: block; }
.map-panel { position: sticky; top: calc(var(--h-topbar) + var(--s-4)); max-height: calc(100vh - var(--h-topbar) - var(--s-8)); overflow-y: auto; padding: 0; }
.map-panel-head { position: relative; padding: var(--s-6) var(--s-6) var(--s-4); border-bottom: 1px solid var(--line); }
.map-panel-head h2 { font-size: var(--fs-48); margin: var(--s-1) 0 var(--s-2); }
.map-close { position: absolute; top: var(--s-4); right: var(--s-4); }
.map-region { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-12); color: var(--text-2); }
.map-region::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--rc); }
.map-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); border-bottom: 1px solid var(--line); }
.map-mini > div { padding: var(--s-3) var(--s-4); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.map-mini > div:last-child { border-right: 0; }
.map-mini span { font-size: var(--fs-12); color: var(--text-3); }
.map-mini strong { font-family: var(--font-title); font-size: var(--fs-22); font-weight: var(--fw-title); font-variant-numeric: tabular-nums; }
.map-cities { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); padding: var(--s-4) var(--s-6) 0; }
.map-city-tab { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--s-2); align-items: center; text-align: left; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md, 10px); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color var(--d-1) var(--ease), background-color var(--d-1) var(--ease); }
.map-city-tab .icon { grid-row: span 2; color: var(--text-3); }
.map-city-tab span:not(.subtle) { font-weight: 600; font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-city-tab .subtle { font-size: var(--fs-12); }
.map-city-tab:hover { border-color: var(--line-strong); }
.map-city-tab[aria-pressed="true"] { border-color: var(--brass-500); background: var(--brass-tint); }
.map-city-tab[aria-pressed="true"] .icon { color: var(--brass-text); }
.map-section { padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--line); }
.map-section:last-child { border-bottom: 0; }
.map-section-title { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--font-title); font-size: var(--fs-18); font-weight: var(--fw-semi); letter-spacing: 0.02em; margin-bottom: var(--s-3); }
.map-work { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-2) 0; }
.map-work-name { font-weight: 600; font-size: var(--fs-13); }
.map-progress { height: 6px; border-radius: 6px; background: var(--surface-3); margin-top: var(--s-2); overflow: hidden; }
.map-progress span { display: block; height: 100%; background: var(--brass-500); border-radius: 6px; transition: width var(--d-3) var(--ease-out); }
.map-catalog { display: flex; flex-direction: column; gap: var(--s-3); }
.map-build { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3); padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md, 10px); }
.map-build .action-icon { width: 34px; height: 34px; }
.map-build-head { display: flex; justify-content: space-between; gap: var(--s-2); align-items: baseline; font-size: var(--fs-13); }
.map-build-desc { font-size: var(--fs-12); margin-top: 2px; }
.map-build-actions { grid-column: 2; display: flex; gap: var(--s-2); }
.map-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--s-2); }
.map-chip { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.map-chip.is-bad { color: var(--bad); }
.map-chip.is-good { background: var(--brass-tint); color: var(--brass-text); }
.map-note { margin: 0; }
.map-region-row { display: flex; gap: var(--s-3); padding: var(--s-3) 0; }
.map-region-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; }
.map-region-states { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-2); }
.map-pill { font: inherit; font-size: var(--fs-12); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; transition: border-color var(--d-1) var(--ease); }
.map-pill:hover { border-color: var(--brass-500); }
@media (max-width: 1180px) {
  .map-layout { grid-template-columns: minmax(0, 1fr); }
  .map-panel { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .map-wrap { padding: var(--s-2); }
}
.map-work .grow { flex: 1; min-width: 0; }
.map-toolbar .seg button { white-space: nowrap; }

/* Mapa: relevo, ilhas e cartão do estado */
.map-wrap { position: relative; }
.map-ridge { fill: color-mix(in srgb, var(--text) 10%, transparent); stroke: color-mix(in srgb, var(--text) 55%, transparent); stroke-width: 1.4; stroke-linejoin: round; }
.map-key i.is-river { height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--focus) 70%, var(--surface)); }
.map-key i.is-lake { width: 12px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--focus) 55%, var(--surface)); }
.map-key i.is-city { width: 8px; height: 8px; border-radius: 2px; background: var(--brass-400); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brass-500) 30%, transparent); }
.map-key i.is-ridge { width: 0; height: 0; border-radius: 0; background: none; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid color-mix(in srgb, var(--text) 50%, transparent); }
.map-pop { position: absolute; z-index: 3; width: 248px; transform: translate(-50%, calc(-100% - 16px)); padding: var(--s-4); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line-strong); border-top: 3px solid var(--brass-500); box-shadow: var(--sh-3); animation: pop-in var(--d-2) var(--ease-out) both; }
.map-pop.is-below { transform: translate(-50%, 22px); }
.map-pop.is-left { transform: translate(-18%, calc(-100% - 16px)); }
.map-pop.is-left.is-below { transform: translate(-18%, 22px); }
.map-pop.is-right { transform: translate(-82%, calc(-100% - 16px)); }
.map-pop.is-right.is-below { transform: translate(-82%, 22px); }
.map-pop-close { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-3); cursor: pointer; }
.map-pop-close:hover { background: var(--surface-2); color: var(--text); }
.map-pop-name { font: 800 30px/1 var(--font-title); margin: 2px 0 4px; }
.map-pop-gov { font-size: var(--fs-12); margin-bottom: var(--s-3); }
.map-pop-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin-bottom: var(--s-3); }
.map-pop-stats span { display: flex; flex-direction: column; font-size: 11px; color: var(--text-3); }
.map-pop-stats b { font-family: var(--font-title); font-size: var(--fs-18); color: var(--text); font-variant-numeric: tabular-nums; }
@keyframes pop-in { from { opacity: 0; margin-top: 6px; } }
@media (prefers-reduced-motion: reduce) { .map-pop { animation: none; } }
@media (max-width: 560px) { .map-pop { width: 210px; } .map-sea-name { display: none; } }
@media (max-width: 560px) { .map-river-name { display: none; } }

/* ---------- Mapa 3D ---------- */
.map-stage { position: relative; width: 100%; border-radius: var(--r-md); overflow: hidden; touch-action: pan-y; cursor: grab; background: #0f2a44; }
.map-hint { display: flex; align-items: center; gap: var(--s-2); justify-content: center; padding-top: var(--s-3); font-size: var(--fs-12); }
.map-view-btns { display: flex; gap: var(--s-2); margin-left: auto; flex: none; }
.map-toolbar { display: flex; align-items: center; gap: var(--s-3); }
.flip-x { transform: scaleX(-1); }
.map-pop { width: 296px; } @media (max-width: 560px) { .map-pop { width: 240px; } }

/* ---------- Governo: economia, orçamento, estatais e forças ---------- */
.eco-rank { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); padding: var(--s-5) var(--s-6); border-top: 1px solid var(--line); }
.eco-rank-title, .eco-col-title { font-family: var(--font-title); font-size: var(--fs-16); letter-spacing: 0.03em; color: var(--brass-text); margin-bottom: var(--s-2); font-weight: var(--fw-semi); }
.eco-rank-row, .eco-line { display: flex; align-items: baseline; gap: var(--s-3); padding: 7px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-13); }
.eco-rank-row:last-child { border-bottom: 0; }
.eco-line strong, .eco-rank-row strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.eco-line .subtle { font-size: var(--fs-12); white-space: nowrap; }
.eco-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); }
.eco-sub { color: var(--text-2); }
.eco-total { border-bottom: 0; font-weight: 600; padding-top: var(--s-3); }
.eco-result { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); border-radius: var(--r-md, 10px); display: grid; grid-template-columns: auto auto 1fr; gap: var(--s-4); align-items: baseline; }
.eco-result.is-bad { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.eco-result.is-ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.eco-result strong { font: 900 var(--fs-36) var(--font-title); }
.eco-result.is-bad strong { color: var(--bad); }
.eco-result.is-ok strong { color: var(--ok); }
.eco-last { display: flex; gap: var(--s-2); align-items: center; margin-top: var(--s-3); font-size: var(--fs-13); color: var(--text-2); }
.eco-companies { display: flex; flex-direction: column; }
.eco-company { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.eco-company:last-child { border-bottom: 0; }
.eco-company.is-sold { opacity: .55; }
.eco-company-name { font-family: var(--font-title); font-size: var(--fs-18); font-weight: var(--fw-semi); letter-spacing: 0.02em; }
.eco-company .subtle { font-size: var(--fs-13); }
.eco-company-actions { flex-wrap: nowrap; gap: var(--s-2); }
.action-icon.is-on { background: var(--brass-tint); color: var(--brass-text); }
@media (max-width: 860px) {
  .eco-cols, .eco-rank { grid-template-columns: 1fr; gap: var(--s-4); }
  .eco-result { grid-template-columns: 1fr; gap: var(--s-1); }
  .eco-company { flex-wrap: wrap; }
  .eco-company-actions { width: 100%; flex-wrap: wrap; }
}

/* ---------- Constituição ---------- */
.const-doc { padding: var(--s-10) var(--s-10) var(--s-8); max-width: 820px; }
.const-title { text-align: center; padding-bottom: var(--s-6); border-bottom: 1px solid var(--line); }
.const-seal { width: 56px; height: 56px; margin: 0 auto var(--s-3); display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--brass-500); color: var(--brass-text); background: var(--brass-tint); }
.const-title h2 { font: 900 var(--fs-48)/1 var(--font-title); }
.const-title p { margin-top: var(--s-2); }
.const-preamble { padding: var(--s-6) 0; border-bottom: 1px solid var(--line); }
.const-label { font-size: var(--fs-12); color: var(--text-3); font-weight: 600; margin-bottom: var(--s-2); }
.const-preamble p { font: italic 400 17px/1.75 var(--font-ui); color: var(--text); }
.const-arts { display: flex; flex-direction: column; }
.const-art { padding: var(--s-6) 0; border-bottom: 1px solid var(--line); }
.const-art:last-child { border-bottom: 0; }
.const-art-head { display: flex; gap: var(--s-3); align-items: baseline; flex-wrap: wrap; }
.const-art-n { font: 800 18px var(--font-title); color: var(--brass-text); }
.const-art-head h3 { font: 800 22px var(--font-title); letter-spacing: 0.02em; }
.const-art-text { margin-top: var(--s-2); font: 400 16px/1.7 var(--font-ui); color: var(--text); }
.const-art-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-3); font-size: var(--fs-12); color: var(--text-3); }
.const-art-meta span { display: inline-flex; align-items: center; gap: var(--s-1); }
.const-ok { color: var(--ok) !important; }
.const-revoked { color: var(--bad) !important; }
.const-art.is-revoked .const-art-text, .const-art.is-revoked h3 { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--text-3); }
@media (max-width: 720px) { .const-doc { padding: var(--s-6) var(--s-5); } }
.eco-rank-row .grow, .eco-line .grow { flex: 1; min-width: 0; }
/* Floresta, zona seca, petróleo e Coralina */
.eco-projs { display: flex; flex-direction: column; gap: var(--s-5); }
.eco-proj { border: 1px solid var(--line); border-radius: var(--r-md, 10px); padding: var(--s-4); }
.eco-proj-head { display: flex; gap: var(--s-3); align-items: flex-start; margin-bottom: var(--s-3); }
.eco-proj-modes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.eco-proj-mode { border: 1px solid var(--line); border-radius: var(--r-md, 10px); padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-13); background: var(--surface-2); }
.eco-proj-mode-head { display: flex; justify-content: space-between; gap: var(--s-2); align-items: baseline; }
.eco-proj-mode-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.eco-proj-status { display: flex; gap: var(--s-2); align-items: center; font-size: var(--fs-13); }
.eco-proj-status.is-done { color: var(--ok); }
@media (max-width: 860px) { .eco-proj-modes { grid-template-columns: 1fr; } }

/* ---------- Banco Central ---------- */
.bc-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2); margin: var(--s-4) 0; }
.bc-step { justify-content: center; }
.bc-note { margin-bottom: var(--s-2); }
.bc-chart { width: 100%; height: auto; display: block; }
.bc-grid { stroke: var(--line); stroke-width: 1; }
.bc-tick { font: 500 11px var(--font-ui); fill: var(--text-3); }
.bc-band { fill: color-mix(in srgb, var(--ok) 14%, transparent); }
.bc-band-label { font: 500 11px var(--font-ui); fill: var(--ok); }
.bc-line-taxa { fill: none; stroke: var(--brass-500); stroke-width: 2.5; stroke-linejoin: round; }
.bc-line-infl { fill: none; stroke: var(--bad); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 6 4; }
.bc-legend { display: flex; gap: var(--s-5); flex-wrap: wrap; margin-top: var(--s-3); font-size: var(--fs-12); color: var(--text-2); }
.bc-legend span { display: inline-flex; align-items: center; gap: var(--s-2); }
.bc-legend i { width: 18px; height: 3px; display: inline-block; border-radius: 2px; }
.bc-legend i.is-taxa { background: var(--brass-500); }
.bc-legend i.is-infl { background: var(--bad); }
.bc-legend i.is-band { height: 10px; background: color-mix(in srgb, var(--ok) 30%, transparent); }
.bc-atas { display: flex; flex-direction: column; }
.bc-ata { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.bc-ata:last-child { border-bottom: 0; }
.bc-ata-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); margin-bottom: var(--s-2); }
.bc-ata p { font-size: var(--fs-14, 14px); margin-bottom: var(--s-1); }
.bc-profiles { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-4); }
@media (max-width: 720px) { .bc-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Eleições ---------- */
.el-attack { display: flex; gap: var(--s-2); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md, 10px); background: color-mix(in srgb, var(--bad) 8%, var(--surface)); margin-bottom: var(--s-3); font-size: var(--fs-14, 14px); }
.el-attack .icon { color: var(--bad); flex: none; margin-top: 2px; }
.el-line-gov { fill: none; stroke: var(--brass-500); stroke-width: 2.5; stroke-linejoin: round; }
.el-line-opo { fill: none; stroke: var(--bad); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 6 4; }
.el-half { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 2 4; }
.bc-legend i.el-key-half { height: 0; border-top: 1px dashed var(--text-3); }
.el-note { padding: var(--s-3) var(--s-6) var(--s-4); }

/* ==========================================================================
   Marca: emblema de Valkaria + nome
   ========================================================================== */
.brand-lockup { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--text); text-decoration: none; }
.brand-mark { flex: none; color: var(--brass-500); filter: drop-shadow(0 0 10px color-mix(in srgb, var(--brass-500) 30%, transparent)); }
.brand-words { display: flex; flex-direction: column; min-width: 0; }
.brand-word { font-family: var(--font-title); font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; line-height: 0.9; color: var(--text); }
.brand-tag { font-size: var(--fs-13); color: var(--text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sm .brand-mark { width: 40px; height: 40px; }
.brand-sm .brand-word { font-size: 24px; }
.brand-lg { gap: var(--s-5); }
.brand-lg .brand-mark { width: clamp(72px, 10vw, 112px); height: clamp(72px, 10vw, 112px); }
.brand-lg .brand-word { font-size: var(--fs-display); letter-spacing: 0.06em; }
.brand-lg .brand-tag { font-size: var(--fs-18); margin-top: var(--s-2); color: var(--brass-text); }


/* Contagem para a eleição, logo abaixo da marca */
/* Perfis de ministro (indicação ao STF) */
.profiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
@media (max-width: 860px) { .profiles { grid-template-columns: 1fr; } }

/* HUD compacto em telas médias: os cinco recursos cabem sem rolagem */
@media (max-width: 1440px) {
  .topbar { gap: var(--s-3); }
  .topbar .metric { padding: 5px var(--s-3) 5px var(--s-2); column-gap: 6px; }
  .topbar .metric-label .icon { width: 18px; height: 18px; }
  .topbar .metric-value { font-size: var(--fs-18); }
  .topbar > .btn-primary { padding: 0 var(--s-4); font-size: var(--fs-18); }
}

/* ==========================================================================
   Mapa: a mesa de operações (tela cheia, painel do estado ao lado)
   ========================================================================== */
.layout-map { max-width: none; padding: var(--s-4) var(--s-4) var(--s-4); }
.map-screen {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-4);
  height: calc(100vh - var(--h-topbar) - var(--s-8));
  min-height: 560px;
}
.map-stage {
  position: relative; overflow: hidden;
  border: 1px solid var(--hud-line);
  border-radius: var(--r-lg);
  background: radial-gradient(120% 90% at 80% 40%, #17465f, #0a2233 70%, #071824);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), inset 0 0 120px rgba(0, 0, 0, 0.55), var(--sh-2);
  cursor: grab; touch-action: pan-y; user-select: none;
  /* o mapa é sempre noturno, como a mesa iluminada da sala de situação */
  --text: #ede5d0; --text-2: #bdb59e; --text-3: #9a957f; --surface: #15261f; --surface-2: #1a2e27; --surface-3: #223931; --line: #2b453c; --line-strong: #3d5e52;
  --focus: #eec25f;
}
.map-stage.is-zoomed { touch-action: none; }
/* Cantoneiras douradas da mesa */
.map-stage::before, .map-stage::after { content: ''; position: absolute; width: 22px; height: 22px; pointer-events: none; z-index: 4; }
.map-stage::before { top: 6px; left: 6px; border-top: 2px solid var(--brass-500); border-left: 2px solid var(--brass-500); }
.map-stage::after { bottom: 6px; right: 6px; border-bottom: 2px solid var(--brass-500); border-right: 2px solid var(--brass-500); }

/* Controles flutuando sobre o mapa */
.map-hud { position: absolute; z-index: 3; }
.map-hud-layers { top: var(--s-4); left: var(--s-4); right: 260px; overflow-x: auto; scrollbar-width: none; }
.map-hud-layers::-webkit-scrollbar { display: none; }
.map-hud-layers .seg { background: rgba(7, 18, 14, 0.82); backdrop-filter: blur(8px); border: 1px solid var(--hud-line); flex-wrap: nowrap; }
.map-hud-layers .seg button { white-space: nowrap; }
.map-hud-tools { top: var(--s-4); right: var(--s-4); display: flex; flex-direction: column; align-items: flex-end; gap: var(--s-2); }
.map-tool-group { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-md); background: rgba(7, 18, 14, 0.82); backdrop-filter: blur(8px); border: 1px solid var(--hud-line); }
.map-tool-group .btn { --btn-bg: transparent; --btn-bd: transparent; --btn-bg-hover: #223931; box-shadow: none; }
.map-zoom-label { min-width: 46px; text-align: center; font-family: var(--font-title); font-weight: var(--fw-semi); font-size: var(--fs-15); color: var(--brass-400); }
.map-legend { left: var(--s-4); bottom: var(--s-4); max-width: min(560px, calc(100% - 140px)); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); padding: var(--s-3) var(--s-4); border: 1px solid var(--hud-line); border-top: 0; border-radius: var(--r-md); background: rgba(7, 18, 14, 0.82); backdrop-filter: blur(8px); font-size: var(--fs-13); color: var(--text-2); }
.map-hint { position: absolute; z-index: 3; bottom: var(--s-4); right: 96px; padding: 4px 10px; border-radius: var(--r-sm); background: rgba(7, 18, 14, 0.6); color: var(--text-3); font-size: var(--fs-13); pointer-events: none; }

/* Rosa dos ventos: gira junto com o mapa */
.map-compass { position: absolute; z-index: 3; right: var(--s-4); bottom: var(--s-4); width: 64px; height: 64px; pointer-events: none; }
.map-compass svg { width: 100%; height: 100%; transition: transform var(--d-1) linear; }
.mc-ring { fill: rgba(7, 18, 14, 0.78); stroke: var(--brass-600); stroke-width: 1.5; }
.mc-ring-in { fill: none; stroke: rgba(226, 170, 63, 0.35); stroke-width: 1; stroke-dasharray: 1 3; }
.mc-n { fill: var(--brass-400); }
.mc-s { fill: #3d5e52; }
.mc-label { font: 900 9px var(--font-title); fill: var(--brass-200); }

/* Painel do estado: console ao lado do mapa */
.map-screen > .map-panel {
  position: static; max-height: none; height: 100%; overflow-y: auto; padding: 0;
  border: 1px solid var(--line); border-top: 3px solid var(--brass-500); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--bevel), var(--sh-2);
  overscroll-behavior: contain;
}
.map-panel-head { background: var(--panel-head); }

/* Desenho do mapa no estilo do jogo */


/* Rótulos em hierarquia: estado > capital > cidade (só no estado escolhido) */
.map-stage .map-badge { fill: var(--brass-500); stroke: #0a1612; stroke-width: 1.5; }
.map-stage .map-badge-text { font: 800 10px var(--font-title); fill: #0a1612; }

@media (max-width: 1180px) {
  .map-screen { grid-template-columns: minmax(0, 1fr); height: auto; }
  .map-stage { height: 72vh; min-height: 480px; }
  .map-screen > .map-panel { height: auto; max-height: none; }
}
@media (max-width: 720px) {
  .layout-map { padding: var(--s-2); }
  .map-stage { height: 64vh; min-height: 420px; }
  .map-hud-layers { right: var(--s-4); }
  .map-hud-tools { top: 64px; }
  .map-hud-tools .map-tool-group:last-child .btn span { display: none; }
  .map-hint { display: none; }
  .map-legend { max-width: calc(100% - 100px); font-size: var(--fs-12); }
}

/* ==========================================================================
   Barras flutuantes: a lateral e a superior ficam sobre o jogo, como um HUD
   A lateral é um trilho de ícones que se abre ao passar o mouse (ou com o foco do teclado).
   ========================================================================== */
:root { --float-gap: 12px; --rail: 64px; --rail-open: 240px; --bar-h: 60px; --glass: rgba(9, 20, 16, 0.74); --glass-line: rgba(226, 170, 63, 0.16); }
.frame { display: block; }
.frame-main { padding-left: calc(var(--rail) + var(--float-gap) * 2); min-height: 100vh; }

.sidebar {
  position: fixed; z-index: 40;
  top: var(--float-gap); left: var(--float-gap); bottom: var(--float-gap);
  width: var(--rail); height: auto;
  border: 1px solid var(--glass-line); border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.25); -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: width var(--d-3) var(--ease-out), box-shadow var(--d-3) var(--ease);
}
.sidebar:hover, .sidebar:has(:focus-visible) { width: var(--rail-open); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.side-brand { min-height: 0; padding: var(--s-3) 11px; border-bottom: 1px solid var(--glass-line); }
.side-brand .brand-mark { width: 40px; height: 40px; }
.side-scroll { padding: var(--s-3) 8px; gap: var(--s-3); overflow-x: hidden; }
.side-title { height: 0; padding: 0; opacity: 0; overflow: hidden; transition: opacity var(--d-2) var(--ease), height var(--d-2) var(--ease); }
.side-link { padding: 0 14px; height: 42px; border-radius: 10px; white-space: nowrap; }
.side-link .grow { opacity: 0; transition: opacity var(--d-2) var(--ease); }
.side-link .dot-count { position: absolute; top: 4px; left: 30px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
.side-link[aria-current='page']::before { left: -8px; top: 9px; bottom: 9px; }
.side-sub { display: none; }
.side-foot { border-top: 1px solid var(--glass-line); padding: var(--s-2) 8px; }
.side-user { padding: 4px 8px; }
.side-user .grow { opacity: 0; transition: opacity var(--d-2) var(--ease); white-space: nowrap; }
.brand-sm .brand-words { opacity: 0; transition: opacity var(--d-2) var(--ease); white-space: nowrap; }
/* Trilho aberto: os textos aparecem */
.sidebar:is(:hover, :has(:focus-visible)) :is(.side-link .grow, .side-user .grow, .brand-words) { opacity: 1; }
.sidebar:is(:hover, :has(:focus-visible)) .side-title { height: auto; padding: 0 var(--s-3) var(--s-2); opacity: 1; }
.sidebar:is(:hover, :has(:focus-visible)) .side-sub { display: flex; }
.sidebar:is(:hover, :has(:focus-visible)) .side-link .dot-count { position: static; }

/* Barra superior: uma cápsula de vidro com os recursos e o botão do turno */
.topbar {
  top: var(--float-gap);
  margin: var(--float-gap) var(--float-gap) 0 0;
  min-height: var(--bar-h); padding: 0 8px 0 var(--s-3);
  border: 1px solid var(--glass-line); border-radius: 14px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.25); -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}
.topbar .metrics { gap: 0; padding: 0; }
.topbar .metric { padding: 4px var(--s-4); border: 0; border-radius: 0; background: none; box-shadow: none; border-right: 1px solid var(--glass-line); }
.topbar .metric:last-child { border-right: 0; }
.topbar .metric:has(.is-bad) { border-color: var(--glass-line); }
.topbar .metric-label { font-size: var(--fs-12); }
.topbar .metric-label .icon { width: 18px; height: 18px; }
.topbar .metric-value { font-size: var(--fs-22); }
.topbar > .btn-primary { height: 44px; border-radius: 10px; }
.topbar .pend-btn { --btn-bg: transparent; box-shadow: none; border-radius: 10px; }
.layout { padding-top: var(--s-6); }
.aside { top: calc(var(--bar-h) + var(--float-gap) * 3); }

/* Mapa: ocupa a tela inteira por trás das barras flutuantes */
.layout-map { padding: 0; }
.layout-map .main-col > .notice { position: relative; z-index: 5; margin: var(--s-4) 392px 0 0; }
.map-screen { display: block; height: auto; min-height: 0; }
.map-stage { position: fixed; inset: 0; z-index: 0; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: inset 0 0 160px rgba(0, 0, 0, 0.55); }
.map-stage::before, .map-stage::after { display: none; }
.map-hud-layers { top: calc(var(--bar-h) + var(--float-gap) * 3); left: calc(var(--rail) + var(--float-gap) * 2); right: auto; max-width: calc(100% - var(--rail) - 360px - 300px); }
.map-hud-tools { top: calc(var(--bar-h) + var(--float-gap) * 3); right: calc(360px + var(--float-gap) * 2); }
.map-legend { left: calc(var(--rail) + var(--float-gap) * 2); bottom: var(--float-gap); border: 1px solid var(--hud-line); }
.map-compass { right: calc(360px + var(--float-gap) * 2); bottom: var(--float-gap); }
.map-hint { right: calc(360px + var(--float-gap) * 2 + 76px); bottom: var(--float-gap); }
.map-screen > .map-panel {
  position: fixed; z-index: 10;
  top: calc(var(--bar-h) + var(--float-gap) * 2); right: var(--float-gap); bottom: var(--float-gap);
  width: 360px; height: auto;
  border: 1px solid var(--glass-line); border-radius: 14px;
  background: rgba(15, 30, 24, 0.86);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  --text: #ede5d0; --text-2: #bdb59e; --text-3: #9a957f; --surface: #15261f; --surface-2: #1a2e27; --surface-3: #223931; --line: rgba(226, 170, 63, 0.14); --line-strong: #3d5e52; --panel-head: rgba(26, 46, 39, 0.6); --brass-text: #eec25f; --brass-tint: #3a2e12;
  color: var(--text);
}
.map-screen > .map-panel .map-panel-head { background: var(--panel-head); }

@media (max-width: 1080px) {
  .frame-main { padding-left: 0; }
  .topbar { margin-left: var(--float-gap); }
  .sidebar { width: min(var(--rail-open), 86vw); transform: translateX(calc(-100% - var(--float-gap) * 2)); visibility: hidden; }
  .sidebar:hover, .sidebar:has(:focus-visible) { width: min(var(--rail-open), 86vw); }
  .frame.nav-open .sidebar { transform: none; visibility: visible; }
  .sidebar :is(.side-link .grow, .side-user .grow, .brand-words) { opacity: 1; }
  .sidebar .side-title { height: auto; padding: 0 var(--s-3) var(--s-2); opacity: 1; }
  .sidebar .side-sub { display: flex; }
  .sidebar .side-link .dot-count { position: static; }
  .map-hud-layers, .map-legend { left: var(--float-gap); }
  .map-hud-layers { max-width: calc(100% - 200px); }
  .map-hud-tools, .map-compass { right: var(--float-gap); }
  .map-hint { display: none; }
  /* Painel do estado vira uma gaveta embaixo do mapa */
  .map-screen > .map-panel { top: auto; left: var(--float-gap); width: auto; max-height: 46vh; }
  .map-compass { bottom: calc(46vh + var(--float-gap) * 2); }
  .map-legend { display: none; }
}
@media (max-width: 860px) {
  .topbar { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
  .topbar .metrics { order: 0; width: auto; flex: 1; }
  .topbar .metric { padding: 4px var(--s-2); }
  .topbar .metric-label { font-size: 0; }
  .topbar .metric-label .icon { width: 16px; height: 16px; }
  .topbar .metric-value { font-size: var(--fs-18); }
  .topbar > .btn-primary span { display: none; }
  .topbar > .btn-primary { width: 44px; padding: 0; }
}

/* Mapa: ferramentas em coluna de ícones, legenda com a dica, rótulos que acompanham o zoom */
.map-hud-tools .map-tool-group { flex-direction: column; }
.map-hud-tools .map-zoom-label { min-width: 0; padding: 2px 0; font-size: var(--fs-13); }
.map-hud-layers { max-width: calc(100% - var(--rail) - 360px - var(--float-gap) * 4 - 64px); }
.map-legend { align-items: center; max-width: calc(100% - var(--rail) - 360px - var(--float-gap) * 4 - 90px); }
.map-legend-hint { color: var(--text-3); font-style: italic; padding-left: var(--s-3); border-left: 1px solid var(--hud-line); }
.map-hint { display: none; }
@media (max-width: 1080px) {
  .map-hud-layers { max-width: calc(100% - 90px); }
  .map-legend { max-width: calc(100% - 100px); }
}

/* Barra lateral aberta empurra o conteúdo (não sobrepõe). Painel direito fechado: ferramentas e bússola vão para a borda. */
.frame { --rail-now: var(--rail); --panel-now: 360px; }
.frame:has(.sidebar:is(:hover, :has(:focus-visible))) { --rail-now: var(--rail-open); }
.frame:has(.map-panel.is-collapsed) { --panel-now: 0px; }
.frame-main { padding-left: calc(var(--rail-now) + var(--float-gap) * 2); transition: padding-left var(--d-3) var(--ease-out); }
.map-hud-layers, .map-legend, .map-crumbs { left: calc(var(--rail-now) + var(--float-gap) * 2); transition: left var(--d-3) var(--ease-out), right var(--d-3) var(--ease-out); }
.map-hud-layers { max-width: calc(100% - var(--rail-now) - var(--panel-now) - var(--float-gap) * 4 - 64px); }
.map-legend { max-width: calc(100% - var(--rail-now) - var(--panel-now) - var(--float-gap) * 4 - 90px); }
.map-hud-tools, .map-compass { transition: right var(--d-3) var(--ease-out), top var(--d-3) var(--ease-out); }
.frame:has(.map-panel.is-collapsed) .map-hud-tools { right: var(--float-gap); top: calc(var(--bar-h) + var(--float-gap) * 3 + 48px); }
.frame:has(.map-panel.is-collapsed) .map-compass { right: var(--float-gap); }
@media (max-width: 1080px) {
  .frame { --rail-now: 0px; }
  .frame:has(.sidebar:is(:hover, :has(:focus-visible))) { --rail-now: 0px; }
  .frame-main { padding-left: 0; }
  .map-hud-layers, .map-legend, .map-crumbs { left: var(--float-gap); }
  .map-hud-layers { max-width: calc(100% - 90px); }
}
@media (prefers-reduced-motion: reduce) {
  .frame-main, .map-hud-layers, .map-legend, .map-crumbs, .map-hud-tools, .map-compass { transition: none; }
}
/* Obras no mapa: plaquinhas com o ícone de cada obra */

/* Mapa realista: oceano, relevo, montanhas e florestas */
/* Vizinhos divididos em estados */

/* ---------- Mapa em três níveis: continente → país → estado ---------- */
.map-crumbs { top: calc(var(--bar-h) + var(--float-gap) * 3 + 48px); left: calc(var(--rail-now) + var(--float-gap) * 2); transition: left var(--d-3) var(--ease-out); display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--hud-line); border-radius: var(--r-md); background: var(--glass); backdrop-filter: blur(10px); }
.map-crumb { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); font: 600 var(--fs-13) var(--font-ui); cursor: pointer; }
button.map-crumb:hover { background: rgba(226, 170, 63, 0.1); color: var(--text); }
.map-crumb[aria-current] { color: var(--brass-400, #e8bb5c); cursor: default; }
.map-crumb-sep { color: var(--text-3); }
.map-country-list { display: flex; flex-direction: column; gap: 4px; }
.map-country-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--r-md); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.map-country-row:hover { border-color: var(--hud-line); background: rgba(226, 170, 63, 0.06); }
.map-country-row .grow { display: flex; flex-direction: column; min-width: 0; }
.map-country-row .subtle { font-size: var(--fs-12); }
.map-tag { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--hud-line); color: var(--brass-500); font: 700 var(--fs-12) var(--font-ui); }
.map-pill .icon { width: 12px; height: 12px; margin-right: 4px; vertical-align: -1px; }

/* ---------- Mar: agitado e calmo, rotas, estreitos, placa ---------- */

/* ---------- Mapa 3D (WebGL) ---------- */
.map-gl, .map-gl-fallback { position: absolute; inset: 0; overflow: hidden; background: #0c1a22; }
.map-gl-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }
.map-gl-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.map-gl-fallback { display: grid; place-items: center; color: var(--text-2); }
.map-gl-tip { position: absolute; left: 0; top: 0; z-index: 4; padding: 5px 10px; border: 1px solid var(--hud-line); border-radius: var(--r-sm); background: var(--glass); backdrop-filter: blur(8px); color: var(--text); font: 600 var(--fs-13) var(--font-ui); pointer-events: none; white-space: nowrap; }
.map-lbl { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; color: #f3ecd8; font: 500 12px var(--font-ui); white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.55); pointer-events: none; will-change: transform; }
button.map-lbl { pointer-events: auto; cursor: pointer; }
button.map-lbl:hover span { text-decoration: underline; text-underline-offset: 3px; }
.map-lbl.is-country { font: 800 15px var(--font-title); letter-spacing: .14em; text-transform: uppercase; color: #f7efd9; }
.map-lbl.is-country.is-mine, .map-lbl.is-country.is-playable { color: #f0c060; }
.map-lbl.is-state { font: 700 13px var(--font-title); letter-spacing: .08em; text-transform: uppercase; }
.map-lbl.is-nbstate { font: italic 500 12px var(--font-ui); color: rgba(243, 236, 216, .85); }
.map-lbl.is-capital { font-weight: 700; font-style: normal; }
.map-lbl.is-city { font-size: 11.5px; }
.map-lbl.is-federal, .map-lbl.is-current { color: #f0c060; }
.map-lbl.is-sea { font: italic 500 13px var(--font-ui); letter-spacing: .3em; color: rgba(190, 225, 238, .7); }
.map-lbl.is-sea.is-big { font-size: 17px; letter-spacing: .45em; }
.map-lbl.is-strait { gap: 6px; padding: 3px 8px 3px 4px; border: 1px solid rgba(226,170,63,.5); border-radius: 999px; background: rgba(7, 18, 14, .78); color: #f0d58f; font: 700 11.5px var(--font-ui); text-shadow: none; pointer-events: auto; cursor: help; }
.map-lbl.is-resource { gap: 5px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(7, 18, 14, .8); border: 1px solid var(--rc, #e2aa3f); color: #f3ecd8; font: 600 11px var(--font-ui); text-shadow: none; pointer-events: auto; cursor: help; }
.map-lbl.is-resource .lbl-ic { stroke: var(--rc, #e2aa3f); background: color-mix(in srgb, var(--rc, #e2aa3f) 18%, transparent); }
.map-lbl.is-summit { font: italic 500 11px var(--font-ui); color: #eef2f5; }
.map-lbl.is-plate { font: italic 600 12px var(--font-ui); letter-spacing: .08em; color: rgba(240, 170, 150, .8); }
.lbl-ic { width: 16px; height: 16px; padding: 2px; border-radius: 50%; background: rgba(226,170,63,.18); fill: none; stroke: #e2aa3f; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lbl-chips { display: inline-flex; gap: 2px; margin-left: 4px; }
.lbl-chip { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 4px; background: rgba(7, 18, 14, .85); border: 1px solid rgba(226,170,63,.4); }
.lbl-chip.is-done { background: #e2aa3f; }
.lbl-chip svg { width: 11px; height: 11px; fill: none; stroke: #f0d58f; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lbl-chip.is-done svg { stroke: #1a1408; }
.map-lbl[hidden], .map-gl-tip[hidden] { display: none; }
.map-compass { width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; pointer-events: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.map-compass svg { transition: none; }
.map-compass:hover .mc-ring { stroke: var(--brass-400); }
.map-compass:focus-visible { outline: 2px solid var(--brass-400); outline-offset: 3px; }
.mc-ring { fill: var(--glass); }
.mc-label { font: 900 8px var(--font-title); fill: #f0d58f; }

/* ---------- Tesouraria ---------- */
.tz-rows { display: flex; flex-direction: column; }
.tz-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.tz-row:first-child { border-top: 0; }
.tz-row .grow { min-width: 0; }
.tz-row .subtle { font-size: var(--fs-13); line-height: 1.45; }
.tz-row-hi { padding: var(--s-3); margin-bottom: var(--s-2); border: 1px solid var(--hud-line); border-radius: var(--r-md); background: rgba(226, 170, 63, 0.05); }
.tz-row-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; flex-shrink: 0; }
.tz-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tz-trend { font: 600 var(--fs-12) var(--font-ui); color: var(--text-3); margin-left: 4px; }
.tz-trend.is-up { color: var(--ok); }
.tz-trend.is-down { color: var(--bad); }
.tz-sub { display: block; font-size: var(--fs-12); }
.eco-cols-1 { display: flex; flex-direction: column; }
@media (max-width: 720px) { .tz-row { flex-wrap: wrap; } .tz-row-actions { width: 100%; flex-direction: row; flex-wrap: wrap; } }

/* ---------- Indicadores do topo: só texto, rótulo em cima e valor embaixo ---------- */
.topbar .metric { display: flex; flex-direction: column; justify-content: center; gap: 3px; padding: 4px var(--s-5); }
.topbar .metric-label { display: block; font: 500 var(--fs-12) var(--font-ui); letter-spacing: .02em; color: var(--hud-text-2); }
.topbar .metric-value { font-size: var(--fs-22); line-height: 1; }
@media (max-width: 900px) { .topbar .metric { padding: 4px var(--s-3); } .topbar .metric-label { font-size: 11px; } .topbar .metric-value { font-size: var(--fs-18); } }
/* Topo em grupos: Economia, Política e (dois jogadores) Placar */
.topbar .metrics { display: flex; align-items: stretch; gap: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.topbar .metrics::-webkit-scrollbar { display: none; }
.metric-group { display: flex; flex-direction: column; justify-content: center; padding: 4px var(--s-3); border-right: 1px solid var(--glass-line); flex: none; }
.metric-group:last-child { border-right: 0; }
.metric-group-title { padding: 0 var(--s-2); font: 600 11px var(--font-ui); letter-spacing: .02em; color: var(--brass-500); }
.metric-row { display: flex; }
.topbar .metric-row .metric { border-right: 0; padding: 2px var(--s-3); }
@media (max-width: 900px) { .metric-group { padding: 2px var(--s-2); } .topbar .metric-row .metric { padding: 2px var(--s-2); } }

/* ---------- Início: modo e país, com a História em slides ---------- */
.start { min-height: 100vh; max-width: 1080px; margin: 0 auto; padding: clamp(24px, 6vh, 64px) var(--s-5) var(--s-8); display: flex; flex-direction: column; gap: var(--s-6); }
.start-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s-4); margin-top: 6vh; }
.start-head p { max-width: 560px; color: var(--text-2); font-size: var(--fs-16); }
.start-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-4); }
.start-mode, .start-country { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--d-2) var(--ease), background var(--d-2) var(--ease); }
.start-mode:hover, .start-country:hover { border-color: var(--brass-500); }
.start-mode .icon { color: var(--brass-500); }
.start-mode strong { font: 800 var(--fs-28) var(--font-title); }
.start-mode span { color: var(--text-2); }
.start-top { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.start-top h1 { font-size: clamp(var(--fs-28), 4vw, 44px); }
.start-countries { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-4); }
.start-country.is-selected { border-color: var(--brass-500); background: color-mix(in srgb, var(--brass-500) 7%, var(--surface)); box-shadow: inset 0 0 0 1px var(--brass-500); }
.start-country-name { font: 900 clamp(var(--fs-28), 4vw, 40px) var(--font-title); line-height: 1; }
.start-country-lema { color: var(--text-2); font-size: var(--fs-15, 15px); }
.start-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--s-2) var(--s-4); width: 100%; margin-top: var(--s-2); }
.start-facts span { display: flex; flex-direction: column; font-size: var(--fs-14, 14px); }
.start-facts em { font-style: normal; font-size: var(--fs-12); color: var(--text-3); }
.start-riches { font-size: var(--fs-13); color: var(--ok); }
.start-history { padding: var(--s-5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.start-go { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4); }
.start-go .field { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.start-go .btn-primary { flex: 0 0 auto; }
.hist { display: flex; flex-direction: column; gap: var(--s-4); }
.hist-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.hist-tabs::-webkit-scrollbar { display: none; }
.hist-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-2); font: 600 var(--fs-14, 14px) var(--font-ui); white-space: nowrap; cursor: pointer; }
.hist-tab[aria-selected="true"] { color: var(--brass-500); border-bottom-color: var(--brass-500); }
.hist-slide h3 { font: 800 var(--fs-22) var(--font-title); margin-bottom: var(--s-3); }
.hist-slide p { max-width: 72ch; color: var(--text); line-height: 1.6; margin-bottom: var(--s-3); }
.hist-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); }
@media (max-width: 560px) { .start { padding: var(--s-5) var(--s-4) var(--s-8); } .start-mode, .start-country { padding: var(--s-5); } .start-go .btn-primary { width: 100%; } }
/* Início sobre o continente 3D */
.start-bg { position: fixed; inset: 0; z-index: 0; }
.start-bg::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(7, 15, 12, .94) 0%, rgba(7, 15, 12, .82) 34%, rgba(7, 15, 12, .25) 62%, rgba(7, 15, 12, 0) 80%), linear-gradient(0deg, rgba(7, 15, 12, .6), transparent 30%); }
.map-gl.is-cinematic .map-gl-labels, .map-gl.is-cinematic .map-gl-tip { display: none; }
.map-gl.is-cinematic .map-gl-canvas { pointer-events: none; }
.start.start-panel { position: relative; z-index: 1; max-width: 660px; margin: 0; padding-left: clamp(16px, 5vw, 72px); padding-right: var(--s-5); }
.start.is-intro { justify-content: center; }
.start.is-intro .start-head { align-items: flex-start; text-align: left; margin-top: 0; }
.start.is-intro .start-modes { grid-template-columns: 1fr; }
.start-panel .start-mode, .start-panel .start-country, .start-panel .start-history { background: rgba(26, 27, 30, .72); backdrop-filter: blur(12px); border-color: rgba(226, 170, 63, .18); }
.start-panel .start-countries { grid-template-columns: 1fr 1fr; }
.start-panel .start-country { padding: var(--s-4) var(--s-5); }
.start-panel .start-facts { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .start-bg::after { background: linear-gradient(180deg, rgba(7,15,12,.88) 0%, rgba(7,15,12,.74) 32%, rgba(7,15,12,.92) 55%); } .start.start-panel { max-width: none; } .start-panel .start-countries { grid-template-columns: 1fr; } }
.start-player { flex: 1 1 280px; display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; padding: var(--s-4); border: 1px solid rgba(226, 170, 63, .18); border-radius: var(--r-lg); background: rgba(26, 27, 30, .72); backdrop-filter: blur(12px); }
.start-player legend { padding: 0 6px; font: 700 var(--fs-14, 14px) var(--font-ui); color: var(--brass-500); }
.start-name-age { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: var(--s-3); }
.start-name-age .field { min-width: 0; }
.start-regimes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.start-regime { display: flex; flex-direction: column; gap: 4px; padding: var(--s-3); border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(7, 15, 12, .5); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.start-regime span { font-size: var(--fs-12); color: var(--text-2); line-height: 1.4; }
.start-regime[aria-checked="true"] { border-color: var(--brass-500); box-shadow: inset 0 0 0 1px var(--brass-500); }
.start-go { flex-direction: column; align-items: stretch; }
.start-go .btn-primary { align-self: flex-start; }
.tz-regime { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); border: 1px solid var(--hud-line); border-radius: var(--r-md); background: rgba(226, 170, 63, .05); }
.tz-regime .grow { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 560px) { .start-regimes { grid-template-columns: 1fr; } .tz-regime { flex-direction: column; align-items: stretch; } }
.tz-stock { display: flex; flex-wrap: wrap; gap: 4px var(--s-4); margin-top: 6px; font-size: var(--fs-13); color: var(--text-2); }
.tz-stock strong { color: var(--text); }
.tz-reserve { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.tz-reserve span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: rgba(255,255,255,.04); color: var(--text-3); opacity: .45; }
.tz-reserve span.is-on { background: color-mix(in srgb, var(--brass-500) 18%, transparent); color: var(--brass-500); opacity: 1; }
.tz-reserve.is-low span.is-on { color: var(--warn); }
.tz-reserve.is-bad span { color: var(--bad); }
.tz-reserve em { margin-left: 6px; font-style: normal; font-size: var(--fs-12); color: var(--text-2); }
.tz-reserve.is-bad em { color: var(--bad); font-weight: 700; }
.icon-xs { width: 12px; height: 12px; }
.tz-auto { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--fs-12); color: var(--text-2); cursor: pointer; }
.tz-build { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); border: 1px solid var(--hud-line); border-radius: var(--r-md); background: rgba(226, 170, 63, .05); }
.tz-build .grow { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.tz-energy-bar { display: flex; flex-direction: column; gap: 6px; padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); border: 1px solid var(--hud-line); border-radius: var(--r-md); }
.tz-energy-bar.is-bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.tz-energy-bar.is-bad .map-progress span { background: var(--bad); }
.input-sm { height: 32px; padding: 0 8px; font-size: var(--fs-13); max-width: 100%; }
.tz-row-actions .input-sm { min-width: 0; }
.tz-build.is-bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 7%, transparent); }
.metric-group-btn { background: none; border: 0; border-right: 1px solid var(--glass-line); color: inherit; font: inherit; cursor: pointer; text-align: left; }
.metric-group-btn:hover { background: rgba(226, 170, 63, .06); }
.score-cell { min-width: 88px; text-align: right; }
.score-head { font-size: var(--fs-12); color: var(--text-3); }
.card-pad { padding: var(--s-5); }
.card-pad p { max-width: 72ch; margin-bottom: var(--s-3); line-height: 1.6; }
.tz-units { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-3); }
.tz-units .map-tag { display: inline-flex; align-items: center; gap: 6px; }
.tz-x { border: 0; background: none; color: var(--text-2); font-size: 15px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tz-x:hover { color: var(--bad); }
.map-lbl.is-unit { gap: 5px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(60, 20, 16, .85); border: 1px solid #d9483b; color: #ffd9cf; font: 700 11px var(--font-ui); text-shadow: none; }
.map-lbl.is-unit .lbl-ic { stroke: #ff8a75; background: rgba(217, 72, 59, .2); }

/* ---------- Telas menores ---------- */
.seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; row-gap: 4px; }
  .topbar .metrics { order: 3; flex: 1 1 100%; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .topbar .pend-btn { margin-left: auto; }
  .page-head h1 { font-size: clamp(32px, 9vw, 44px); }
  .tz-row-actions { width: 100%; }
  .tz-row-actions .btn { flex: 1 1 auto; }
  .tz-build { flex-direction: column; align-items: stretch; }
  .tz-build .input-sm, .tz-build .btn { width: 100%; }
  .score-cell { min-width: 56px; }
  .eco-line { flex-wrap: wrap; }
}
@media (max-width: 760px) { :root { --bar-h: 112px; } }

/* ---------- Defesa e guerra ---------- */
.war-table { width: 100%; border-collapse: collapse; font-size: var(--fs-13); }
.war-table th, .war-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.war-table th:first-child { text-align: left; font-weight: 600; }
.war-table thead th { color: var(--text-3); font-weight: 500; font-size: var(--fs-12); }
.war-table .map-region-dot { display: inline-block; margin-right: 8px; vertical-align: middle; }
.war-table tr.is-me { background: rgba(226, 170, 63, .07); }
.war-table tr.is-war { background: color-mix(in srgb, var(--bad) 8%, transparent); }
.tag-war { color: #ffb3a6; border-color: var(--bad); }
.war-front { padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.war-front:first-of-type { border-top: 0; }
.war-front-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3); margin-bottom: var(--s-3); }
.war-front-head h3 { font: 800 var(--fs-22) var(--font-title); }
.tz-supply { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* Legenda dos traços do mapa */
.map-lines { display: flex; flex-wrap: wrap; gap: 4px var(--s-3); width: 100%; padding-top: 6px; border-top: 1px solid var(--hud-line); margin-top: 2px; }
.map-key i.ln { width: 18px; height: 4px; border-radius: 2px; display: inline-block; }
.ln-asfalto { background: #5d6066; box-shadow: inset 0 0 0 1px #15171a, inset 0 0 0 2px transparent; border-top: 1px solid #f0d070; }
.ln-terra { background: #c9a064; }
.ln-ferrovia { background: repeating-linear-gradient(90deg, #151515 0 3px, #6b5a48 3px 5px); }
.ln-balsa { background: repeating-linear-gradient(90deg, #e8f2f5 0 4px, transparent 4px 7px); }
.ln-ponte { background: #9aa0a6; }
.ln-rio { background: #5aa6c8; }
.ln-afluente { background: #5aa6c8; height: 2px !important; opacity: .8; }
.ln-lago { background: #4b93b5; height: 8px !important; width: 14px !important; border-radius: 50% !important; }
.ln-cidade { background: #eec25f; height: 8px !important; width: 8px !important; border-radius: 2px !important; }
.ln-fronteira { background: #e2aa3f; }
.ln-pais { background: #ede5d0; opacity: .7; }
.ln-divisa { background: #0b1712; box-shadow: 0 0 0 1px rgba(237,229,208,.25); }
.ln-rota { background: repeating-linear-gradient(90deg, #e8c878 0 5px, transparent 5px 9px); }
.ln-estreito { background: #e2aa3f; height: 6px !important; width: 6px !important; border-radius: 50% !important; }
.ln-conquista { background: rgba(226, 170, 63, .6); height: 10px !important; }
.ln-ocupado { background: repeating-linear-gradient(45deg, #d9483b 0 2px, transparent 2px 5px); height: 10px !important; }
.map-legend { max-height: 30vh; overflow-y: auto; }
.vez-news { margin: 6px 0 0 18px; } .vez-news li { margin: 2px 0; }

/* Painel do mapa: recolher e mostrar */
.map-screen > .map-panel { transition: transform var(--d-3) var(--ease-out), opacity var(--d-2) var(--ease); }
.map-screen > .map-panel.is-collapsed { transform: translateX(calc(100% + var(--float-gap) * 2)); opacity: 0; pointer-events: none; }
.map-panel-toggle { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--glass-line); border-radius: 8px; background: rgba(7, 15, 12, .6); color: var(--text-2); cursor: pointer; }
.map-panel-toggle:hover { color: var(--text); border-color: var(--brass-500); }
.map-panel .map-close { position: absolute; top: 12px; right: 50px; left: auto; z-index: 2; }
.map-panel-open { position: fixed; z-index: 10; top: calc(var(--bar-h) + var(--float-gap) * 2); right: var(--float-gap); display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--glass-line); border-radius: 10px; background: var(--glass); backdrop-filter: blur(12px); color: var(--text); font: 600 var(--fs-13) var(--font-ui); cursor: pointer; }
.map-panel-open:hover { border-color: var(--brass-500); }
.map-country-row > .icon:last-child { margin-left: auto; }
.map-country-row .map-tag { margin-left: auto; }
.map-country-row .map-tag + .icon { margin-left: 8px; }
@media (max-width: 760px) { .map-screen > .map-panel.is-collapsed { transform: translateY(calc(100% + var(--float-gap) * 2)); } .map-panel-open { top: auto; bottom: var(--float-gap); } }
.ln-raso { background: #2e8c8f; height: 8px !important; }
.ln-gelo { background: #dfe9f0; height: 8px !important; }

/* ---------- Agenda ---------- */
.agenda-list { display: flex; flex-direction: column; gap: 6px; }
.agenda-item { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-3) var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(255,255,255,.02); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.agenda-item:hover { border-color: var(--brass-500); }
.agenda-item .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agenda-item.is-bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: color-mix(in srgb, var(--bad) 6%, transparent); }
.agenda-item.is-ok { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.agenda-area { font: 600 var(--fs-12) var(--font-ui); color: var(--brass-500); }
.agenda-news { display: flex; flex-direction: column; gap: 8px; margin: 0; padding-left: 18px; }
.agenda-news li { line-height: 1.5; }
.agenda-news li.kind-crisis { color: #ffb3a6; }
.crisis-why { display: flex; flex-direction: column; gap: 4px; margin-top: var(--s-3); padding: var(--s-3) var(--s-4); border-left: 3px solid var(--bad); border-radius: var(--r-sm); background: color-mix(in srgb, var(--bad) 8%, transparent); font-size: var(--fs-14, 14px); line-height: 1.5; } .crisis-why strong { color: #ffb3a6; font-size: var(--fs-12); }
.start-sub { font: 600 var(--fs-12) var(--font-ui); color: var(--text-2); margin-bottom: -4px; }
.start-code { display: flex; gap: 8px; margin-top: 8px; }
.start-code .input { flex: 1; min-width: 0; }
.start-h2 { font: 800 var(--fs-22) var(--font-title); margin-top: var(--s-2); }
.start-player .seg { align-self: flex-start; }
/* Mesa de guerra */
.war-table-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: var(--s-4); align-items: start; }
@media (max-width: 900px) { .war-table-grid { grid-template-columns: 1fr; } }
.war-map { width: 100%; height: auto; max-height: 560px; border-radius: var(--r-md); border: 1px solid var(--line); }
.wm-sea { fill: #0d2a3a; }
.wm-cell { fill-opacity: .55; stroke: rgba(10, 20, 16, .7); stroke-width: 5; cursor: pointer; transition: fill-opacity var(--d-1); }
.wm-cell:hover { fill-opacity: .8; }
.wm-cell.is-war { stroke: #d9483b; stroke-width: 8; fill-opacity: .7; }
.wm-cell.is-mine { fill-opacity: .85; stroke: #f0c060; }
.wm-cell.is-sel { stroke: #f0c060; stroke-width: 16; fill-opacity: .9; }
.wm-mine { fill: #c9a24a; fill-opacity: .85; stroke: #2a2010; stroke-width: 4; }
.wm-mine.is-occupied { fill: url(#wm-stripes); }
.wm-cap { fill: #ede5d0; stroke: #0b1712; stroke-width: 5; pointer-events: none; }
.wm-mycap { fill: #fff3c4; stroke: #2a2010; stroke-width: 4; pointer-events: none; }
.wm-name { font: 800 64px var(--font-title); fill: rgba(237, 229, 208, .85); text-anchor: middle; paint-order: stroke; stroke: rgba(5, 12, 10, .8); stroke-width: 10; letter-spacing: .06em; pointer-events: none; text-transform: uppercase; }
.wm-name.is-war { fill: #ffb3a6; }
.wm-name.is-me { fill: #f0c060; }
.wm-arrow { fill: none; stroke: #f0c060; stroke-width: 18; stroke-dasharray: 40 24; stroke-linecap: round; }
.wm-arrow.is-sea { stroke: #7ec8e3; }
.wm-arrow.is-blocked { stroke: #8a8a8a; }
.wm-head { fill: #f0c060; }
.war-plan h3 { font: 800 var(--fs-22) var(--font-title); margin-bottom: var(--s-3); }
/* Mesa de guerra ocupando a largura: mapa grande e o plano flutuando no canto */
.war-table-grid { display: block; position: relative; }
.war-map { display: block; width: 100%; height: min(78vh, 900px); max-height: none; }
.war-plan-box { position: absolute; top: 12px; right: 12px; width: min(360px, 42%); max-height: calc(100% - 24px); overflow-y: auto; padding: var(--s-4); border: 1px solid var(--glass-line); border-radius: var(--r-lg); background: rgba(10, 22, 18, .9); backdrop-filter: blur(10px); }
@media (max-width: 760px) { .war-map { height: 60vh; } .war-plan-box { position: static; width: auto; margin-top: var(--s-3); } }

/* Defesa: arsenal por força, regras da guerra e grupos de compras */
.war-arms { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }
.war-arm h3, .tz-group { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 var(--s-2); font-size: var(--fs-13); letter-spacing: .04em; text-transform: uppercase; }
.tz-group { padding-top: var(--s-3); border-top: 1px solid var(--line); }
.war-rules { margin: var(--s-4) 0 0; padding-left: var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); font-size: var(--fs-13); line-height: 1.5; }
.war-spoils { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3); margin-bottom: var(--s-3); border: 1px solid var(--hud-line); border-radius: var(--r-md); background: rgba(226, 170, 63, .05); }
.war-spoils .tz-units { margin-bottom: 0; }

/* Painel de população (tela Governo) */
.pop-curve { display: block; width: calc(100% - 2 * var(--s-6)); height: 56px; margin: var(--s-3) var(--s-6) 0; overflow: visible; }
.pop-curve path { fill: none; stroke: var(--brass-500); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pop-list { padding: var(--s-3) var(--s-6) var(--s-5); max-height: 340px; overflow-y: auto; }
.pop-row .grow { display: flex; flex-direction: column; gap: 2px; }
.pop-why { font-size: var(--fs-12, 12px); }
@media (max-width: 600px) { .pop-curve { width: calc(100% - 2 * var(--s-4)); margin-inline: var(--s-4); } .pop-list { padding-inline: var(--s-4); } }


/* ---------- Tramitação de Valdória (ui/screens/legislative.js) ---------- */
.leg-row { width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-top: 0; color: inherit; cursor: pointer; }
.leg-row:hover { background: var(--surface-2); }
.leg-row.is-sel { background: var(--brass-tint); box-shadow: inset 3px 0 0 var(--brass-text); }
.leg-steps { display: flex; gap: var(--s-2); list-style: none; margin: 0 0 var(--s-3); padding: 0; flex-wrap: wrap; }
.leg-steps li { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-3); font-size: var(--fs-13); }
.leg-steps li i { display: inline-flex; }
.leg-steps li.is-done { color: var(--ok); }
.leg-steps li.is-now { color: var(--brass-text); box-shadow: inset 0 0 0 1px var(--brass-text); }
.leg-steps li.is-bad { color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.leg-head { margin-bottom: var(--s-4); }
.leg-text p { margin: 4px 0 var(--s-3); line-height: var(--lh-ui); }
.leg-block { border-top: 1px solid var(--line); padding-top: var(--s-4); margin-top: var(--s-4); }
.leg-block h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--s-3); }
.leg-tally { margin-bottom: var(--s-3); }
.leg-args, .leg-falas, .leg-items, .leg-timeline { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.leg-arg { padding: 8px 12px; border-radius: var(--r-sm, 6px); background: var(--surface-2); border-left: 3px solid var(--text-3); line-height: var(--lh-ui); }
.leg-arg.is-favor { border-left-color: var(--ok); }
.leg-arg.is-contra { border-left-color: var(--bad); }
.leg-arg b { color: var(--pc, inherit); margin-right: 4px; }
.leg-fala { display: flex; gap: var(--s-3); align-items: flex-start; }
.leg-fala p { margin: 2px 0 0; line-height: var(--lh-ui); }
.leg-compose { display: grid; gap: var(--s-2); margin-top: var(--s-3); justify-items: end; }
.leg-compose .textarea { width: 100%; }
.leg-votes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s-2); }
.leg-vote { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); font-size: var(--fs-13); color: var(--text-3); }
.leg-vote i { width: 8px; height: 8px; border-radius: 50%; }
.leg-vote.is-s { color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.leg-vote.is-n { color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad); }
.leg-vote.is-a { color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.leg-items li { line-height: var(--lh-ui); }
.leg-items .row { margin-top: 6px; }
.leg-timeline li { padding-left: var(--s-3); border-left: 2px solid var(--line); }
.leg-timeline p { margin: 2px 0 0; }
.leg-actions .row.wrap, .leg-toolbar { flex-wrap: wrap; gap: var(--s-2); }
.leg-forms { margin-top: var(--s-4); gap: var(--s-4); }
.leg-form { display: grid; gap: var(--s-2); align-content: start; justify-items: start; }
.leg-form .field, .leg-form .textarea { width: 100%; }
.leg-toolbar { display: flex; margin: var(--s-4) 0; }
.leg-new { padding-top: var(--s-3); border-top: 1px solid var(--line); }
.leg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.leg-sub { margin: var(--s-4) 0 0; }
.leg-hist { margin-top: var(--s-4); }
@media (max-width: 760px) { .leg-forms { grid-template-columns: 1fr; } }
