/* SPDX-License-Identifier: GPL-2.0-or-later */

:root {
  color-scheme: dark;
  --ink: #e6eef0;
  --muted: #8fa3aa;
  --panel: #151e24;
  --panel-high: #1d292f;
  --ground: #0d1317;
  --line: #30434b;
  --public: #42d6d0;
  --amber: #e1b35a;
  --risk: #ff6b62;
  --restored: #79d59b;
  --shadow: rgba(0, 0, 0, 0.5);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html, body { min-height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 22% 0%, rgba(66, 214, 208, 0.08), transparent 32rem),
    linear-gradient(145deg, #0b1115 0%, #10181d 48%, #090e11 100%);
}

/* A game, not a document: clicking and dragging must not select text (which pops up the browser's selection menu). */
body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, textarea, select, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}

button, a { font: inherit; }

button {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(24, 35, 41, 0.9);
  padding: 0.65rem 0.85rem;
  cursor: pointer;
}

button:hover, button:focus-visible {
  border-color: var(--public);
  background: rgba(38, 61, 66, 0.95);
  outline: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button[aria-pressed="true"] {
  color: #071012;
  border-color: var(--amber);
  background: var(--amber);
}

kbd {
  color: var(--muted);
  font: 0.72rem ui-monospace, SFMono-Regular, Consolas, monospace;
  margin-left: 0.35rem;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 0.9rem;
  color: #061113;
  background: var(--public);
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

.app-shell {
  width: min(1680px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand-block { display: flex; align-items: center; gap: 0.9rem; }
.brand-block h1 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: 0.08em; }
.brand-mark { width: 2.5rem; display: grid; gap: 0.25rem; transform: skewY(-18deg); }
.brand-mark span { display: block; height: 0.32rem; background: var(--public); }
.brand-mark span:nth-child(2) { width: 70%; background: var(--amber); }
.brand-mark span:nth-child(3) { width: 42%; }

.eyebrow, .section-number {
  margin: 0 0 0.25rem;
  color: var(--public);
  font: 0.68rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.16em;
}

.network-state {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--muted);
  font: 0.72rem ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.08em;
}

.pulse-dot {
  width: 0.55rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0.9rem var(--amber);
  animation: pulse 2.2s ease-in-out infinite;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 360px);
  gap: 1.25rem;
  padding: 1.25rem 0;
}

.playfield, .mission-panel {
  border: 1px solid var(--line);
  background: rgba(12, 18, 22, 0.82);
  box-shadow: 0 1.5rem 4rem var(--shadow);
}

.operation-heading {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
}

.operation-heading h2, .panel-section h2 { margin: 0; font-weight: 560; }
.operation-tools { display: flex; gap: 0.5rem; }

.canvas-frame {
  position: relative;
  overflow: hidden;
  min-height: 530px;
  background:
    linear-gradient(rgba(66, 214, 208, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 214, 208, 0.025) 1px, transparent 1px),
    #0b1115;
  background-size: 32px 32px;
}

canvas {
  display: block;
  width: 100%;
  height: min(70vh, 760px);
  min-height: 530px;
  cursor: crosshair;
  outline: none;
}

canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--public); }

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background: repeating-linear-gradient(0deg, transparent 0 4px, #020506 5px);
}

.map-key {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  color: var(--muted);
  background: rgba(8, 13, 16, 0.84);
  border: 1px solid var(--line);
  font: 0.68rem ui-monospace, SFMono-Regular, Consolas, monospace;
}

.map-key span { display: flex; align-items: center; gap: 0.35rem; }
.map-key i { width: 0.55rem; height: 0.55rem; transform: rotate(45deg); }
.key-public { background: var(--public); }
.key-risk { background: var(--risk); }
.key-relay { background: var(--amber); }

.instructions { margin: 0; padding: 0.8rem 1rem; color: var(--muted); border-top: 1px solid var(--line); }
.field-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0 1rem 0.9rem; }
.direction-pad { display: grid; grid-template-columns: repeat(4, 2.75rem); gap: 0.25rem; }
.direction-pad button { padding: 0.55rem; font-size: 1.1rem; touch-action: manipulation; }
.field-controls > button { min-height: 2.75rem; touch-action: manipulation; }

.mission-panel { align-self: start; }
.panel-section { padding: 1rem; border-bottom: 1px solid var(--line); }
.panel-section:last-child { border-bottom: 0; }
.briefing { background: linear-gradient(135deg, rgba(66, 214, 208, 0.07), transparent); }
.briefing p:last-child, .selected-readout p:last-child, .system-log p:last-child { color: var(--muted); line-height: 1.55; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.count-badge { padding: 0.3rem 0.45rem; color: var(--public); border: 1px solid var(--line); font: 0.72rem ui-monospace, monospace; }

.objective-list { list-style: none; padding: 0; margin: 0.8rem 0 0; display: grid; gap: 0.6rem; }
.objective-list li {
  position: relative;
  padding: 0.65rem 0.65rem 0.65rem 2.1rem;
  color: var(--muted);
  background: var(--panel);
  border-left: 2px solid var(--amber);
}
.objective-list li::before { content: "◇"; position: absolute; left: 0.65rem; color: var(--amber); }
.objective-list li.complete { color: var(--ink); border-color: var(--restored); }
.objective-list li.complete::before { content: "◆"; color: var(--restored); }

.roster { display: grid; gap: 0.55rem; margin-top: 0.75rem; }
.roster-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.35rem 0.6rem;
  padding: 0.5rem;
  border: 1px solid rgba(124, 161, 170, 0.3);
  background: rgba(10, 18, 22, 0.6);
}
.roster-item.selected { background: rgba(66, 214, 208, 0.14); border-color: var(--public); }
.roster-item.down { opacity: 0.55; }
.roster-item.targeted { border-color: var(--danger, #ff6b62); animation: targeted-flash 0.5s steps(2, jump-none) infinite; }
@keyframes targeted-flash { 50% { background: rgba(255, 107, 98, 0.28); } }
@media (prefers-reduced-motion: reduce) { .roster-item.targeted { animation: none; background: rgba(255, 107, 98, 0.2); } }
.roster-item input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--public); }
.roster-select {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  text-align: left;
  gap: 0.7rem;
  border: 0;
  background: none;
}
.roster-select[aria-pressed="true"] {
  color: var(--ink);
  background: none;
  border: 0;
}
.operator-glyph { color: var(--public); font-size: 1.3rem; }
.operator-position { color: var(--muted); font: 0.68rem ui-monospace, monospace; }
.threats { display: grid; gap: 0.55rem; margin-top: 0.75rem; }
.threats button { display: grid; grid-template-columns: 1fr auto; gap: 0.7rem; text-align: left; }
.threats button[data-disabled="true"] { opacity: 0.5; border-style: dashed; }
.vitality { color: var(--muted); font: 0.68rem ui-monospace, monospace; }
.system-log { min-height: 7rem; }
.save-note { margin: 0.45rem 0 0.75rem; color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.save-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0 1.3rem;
  color: var(--muted);
  font-size: 0.75rem;
}

footer p { margin: 0; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--public); text-decoration: underline; }

dialog {
  width: min(560px, calc(100% - 2rem));
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--public);
  box-shadow: 0 2rem 8rem #000;
}

dialog::backdrop { background: rgba(1, 5, 7, 0.8); }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.dialog-header h2 { margin: 0; }
.dialog-header button { font-size: 1.4rem; padding: 0.25rem 0.55rem; }
dialog a { color: var(--public); }

@keyframes pulse { 50% { opacity: 0.45; box-shadow: 0 0 0.25rem var(--amber); } }

@media (max-width: 950px) {
  main { grid-template-columns: 1fr; }
  .mission-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-section { border-right: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .app-shell { padding: 0 0.65rem; }
  .topbar { min-height: 72px; }
  .network-state { display: none; }
  .operation-heading { align-items: start; flex-direction: column; }
  .operation-tools { width: 100%; }
  .operation-tools button { flex: 1; }
  canvas, .canvas-frame { min-height: 430px; height: 55vh; }
  .mission-panel { display: block; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; }
}

.settings-form { display: grid; gap: 0.9rem; min-width: min(22rem, 80vw); }
.settings-form label { display: grid; gap: 0.3rem; }
.settings-form label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 0.5rem; }
.settings-form .hint { margin: 0; font-size: 0.85rem; opacity: 0.8; }
.key-bindings { display: grid; gap: 0.5rem; border: 1px solid currentColor; padding: 0.6rem; }
#binding-list { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 0.75rem; align-items: center; }
.outcome-stats { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 1rem 0; }
.outcome-stats dt { color: var(--muted); }
.outcome-stats dd { margin: 0; }
dialog .primary { margin-right: 0.5rem; }

/* Keep the mission panel on screen: it scrolls on its own instead of growing past the viewport. */
@media (min-width: 981px) {
  .mission-panel {
    position: sticky;
    top: 0.5rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
.mission-panel .panel-section { padding: 0.6rem 0.8rem; }
.mission-panel .panel-section h2 { font-size: 1.05rem; }
.mission-panel .section-number { margin: 0 0 0.15rem; }
details.panel-section > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-weight: 560;
}
details.panel-section > summary::-webkit-details-marker { display: none; }
details.panel-section > summary::after { content: "+"; margin-left: auto; color: var(--public); }
details.panel-section[open] > summary::after { content: "−"; }
details.panel-section > p, details.panel-section > div { margin-top: 0.5rem; }
.objective-list { gap: 0.3rem; }
.objective-list li { padding: 0.4rem 0.5rem 0.4rem 1.8rem; font-size: 0.9rem; }
.roster { margin-top: 0.4rem; gap: 0.35rem; }
.roster-item { padding: 0.3rem 0.4rem; gap: 0.2rem 0.5rem; }
.threats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; margin-top: 0.4rem; }
.threats button { padding: 0.35rem 0.5rem; font-size: 0.85rem; }
.system-log { position: sticky; bottom: 0; background: var(--panel); }
.roster-select { gap: 0.5rem; font-size: 0.95rem; }
.roster-select .operator-glyph { font-size: 1.05rem; }
.objective-list li { padding: 0.3rem 0.5rem 0.3rem 1.7rem; font-size: 0.85rem; }
.selected-readout { font-size: 0.85rem; }
.selected-readout #selected-readout { margin: 0; }
.system-log { font-size: 0.9rem; }
.system-log p { margin: 0.15rem 0; }
@media (min-width: 981px) {
  .topbar { min-height: 56px; }
  .brand-block h1 { font-size: 1.35rem; }
  .brand-block .eyebrow { display: none; }
}
/* The title screen: the atlas on the left fills the space, the brief and controls sit on the right. */
dialog.title-screen[open] {
  display: flex;
  flex-direction: column;
  width: min(98vw, 1700px);
  height: min(94vh, 1000px);
  max-width: none;
  max-height: none;
  padding: 0.9rem 1.2rem 1rem;
  overflow: hidden;
}
.title-head { flex: none; display: flex; align-items: baseline; gap: 1.2rem; }
.title-head .eyebrow { margin: 0; }
.title-head h2 { margin: 0; font-size: 1.5rem; }
.title-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 26rem);
  gap: 1.2rem;
  margin-top: 0.6rem;
}
.title-map { min-height: 0; display: flex; flex-direction: column; }
.title-side { min-height: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.title-side #title-story { margin: 0; font-size: 0.95rem; line-height: 1.45; }
.title-side .mission-list { margin: 0; }
.title-actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.title-actions button { margin: 0; }
.title-help summary { cursor: pointer; color: var(--public); }
.title-help[open] { flex: 1; min-height: 0; overflow-y: auto; }
.title-help ul { margin: 0.4rem 0 0; padding-left: 1.1rem; font-size: 0.88rem; }
.world-map {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #06141a;
}
.world-map-svg { display: block; width: 100%; height: 100%; }
.world-map-card { flex: none; min-height: 2.4em; margin: 0.4rem 0 0; font-size: 0.92rem; color: var(--muted); }
.map-sea { fill: #06141a; }
.map-grid { fill: none; stroke: rgba(66, 214, 208, 0.12); stroke-width: 0.8; }
.map-equator { fill: none; stroke: rgba(225, 179, 90, 0.35); stroke-width: 1; stroke-dasharray: 6 5; }
.map-tropic { fill: none; stroke: rgba(66, 214, 208, 0.18); stroke-width: 0.8; stroke-dasharray: 3 5; }
.map-land { fill: #14282f; stroke: rgba(66, 214, 208, 0.55); stroke-width: 1.2; stroke-linejoin: round; }
.map-island { fill: #12252c; stroke: rgba(66, 214, 208, 0.4); stroke-width: 0.9; stroke-linejoin: round; }
.map-inland-sea { fill: #06141a; stroke: rgba(66, 214, 208, 0.35); stroke-width: 0.8; }
.map-label { fill: rgba(143, 163, 170, 0.5); font: 600 11px ui-sans-serif, sans-serif; letter-spacing: 0.3em; text-anchor: middle; }
.map-sea-label {
  fill: rgba(66, 214, 208, 0.28);
  font: italic 600 10px ui-sans-serif, sans-serif;
  letter-spacing: 0.35em;
  text-anchor: middle;
}
.map-route { fill: none; stroke: rgba(143, 163, 170, 0.5); stroke-width: 1.6; stroke-dasharray: 6 6; }
.map-route.done { stroke: var(--restored); }
.map-region { cursor: pointer; outline: none; }
.map-hit { fill: transparent; }
.map-region-shape { fill: rgba(225, 179, 90, 0.22); stroke: var(--amber); stroke-width: 1.8; }
.map-pin { fill: var(--amber); }
.map-region-name { fill: var(--ink); font: 700 15px ui-sans-serif, sans-serif; paint-order: stroke; stroke: #05110f; stroke-width: 3.5px; }
.map-region-state {
  fill: var(--muted);
  font: 600 11px ui-sans-serif, sans-serif;
  letter-spacing: 0.08em;
  paint-order: stroke;
  stroke: #05110f;
  stroke-width: 3px;
}
.map-region.completed .map-region-shape { fill: rgba(121, 213, 155, 0.25); stroke: var(--restored); }
.map-region.completed .map-pin { fill: var(--restored); }
.map-region.locked { cursor: not-allowed; }
.map-region.locked .map-region-shape { fill: rgba(143, 163, 170, 0.1); stroke: #50636b; stroke-dasharray: 4 4; }
.map-region.locked .map-pin { fill: #50636b; }
.map-region.locked .map-region-name { fill: var(--muted); }
.map-region:not(.locked):hover .map-region-shape, .map-region:focus-visible .map-region-shape {
  fill: rgba(66, 214, 208, 0.3);
  stroke: var(--public);
}
.map-region:focus-visible .map-region-name { fill: var(--public); }
.map-region.selected .map-region-shape { stroke: var(--public); stroke-width: 2.8; }
.map-region.selected .map-pin { fill: var(--public); animation: map-pulse 1.8s ease-in-out infinite; }
@keyframes map-pulse { 50% { r: 7; opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .map-region.selected .map-pin { animation: none; } }
@media (max-width: 900px) {
  dialog.title-screen[open] { height: auto; max-height: 96vh; overflow-y: auto; }
  .title-grid { grid-template-columns: 1fr; }
  .world-map { aspect-ratio: 360 / 142; flex: none; }
}
.mission-list { display: grid; gap: 0.4rem; margin: 1rem 0; }
.mission-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.2rem 1rem;
  text-align: left;
  padding: 0.5rem 0.75rem;
}
.mission-list button small { grid-column: 1 / -1; color: var(--muted); }
.mission-list button[aria-pressed="true"] small { color: inherit; }
.mission-list .state { font-size: 0.8rem; letter-spacing: 0.05em; }
.funds {
  margin: 0 1.5rem 0 auto;
  color: var(--amber);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.awards { color: var(--amber); }
.research { width: min(56rem, 94vw); max-height: 92vh; overflow-y: auto; }
.research h3 { margin: 1.2rem 0 0.4rem; font-size: 1rem; letter-spacing: 0.04em; }
.funds-large { margin: 0.25rem 0; font-size: 1.4rem; color: var(--amber); font-variant-numeric: tabular-nums; }
.research-tracks, .research-items { display: grid; gap: 0.5rem; }
.research-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.2rem 1rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(124, 161, 170, 0.3);
}
.research-row small { grid-column: 1 / -1; color: var(--muted); }
.research-row .state { color: var(--public); font-size: 0.8rem; letter-spacing: 0.05em; }
.research-loadouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; }
.loadout { border: 1px solid rgba(124, 161, 170, 0.3); padding: 0.5rem 0.7rem; }
.loadout h4 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.loadout label { display: grid; grid-template-columns: 2.2rem 1fr; align-items: center; gap: 0.4rem; margin: 0.2rem 0; font-size: 0.85rem; }
.loadout select { width: 100%; }
/* A circular crosshair over a watcher still standing: a ring, a centre dot and four ticks, with a dark halo. Red = in range. */
#game-canvas.cursor-attack {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='rgba(0,0,0,.65)' stroke-width='4.5'%3E%3Ccircle cx='16' cy='16' r='9'/%3E%3Cpath d='M16 2v9M16 21v9M2 16h9M21 16h9'/%3E%3C/g%3E%3Cg fill='none' stroke='%23ff6b62' stroke-width='2'%3E%3Ccircle cx='16' cy='16' r='9'/%3E%3Cpath d='M16 3v8M16 21v8M3 16h8M21 16h8'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='1.6' fill='%23ff6b62'/%3E%3C/svg%3E") 16 16, crosshair;
}
/* The same crosshair in white while the target is out of range. */
#game-canvas.cursor-attack-far {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='rgba(0,0,0,.65)' stroke-width='4.5'%3E%3Ccircle cx='16' cy='16' r='9'/%3E%3Cpath d='M16 2v9M16 21v9M2 16h9M21 16h9'/%3E%3C/g%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Ccircle cx='16' cy='16' r='9'/%3E%3Cpath d='M16 3v8M16 21v8M3 16h8M21 16h8'/%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='1.6' fill='%23ffffff'/%3E%3C/svg%3E") 16 16, crosshair;
}
#game-canvas.cursor-loot {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='13' fill='rgba(10,18,22,.85)' stroke='%23e1b35a' stroke-width='2'/%3E%3Crect x='9' y='12' width='14' height='10' rx='1.5' fill='%23e1b35a'/%3E%3Crect x='13' y='8' width='6' height='4' fill='none' stroke='%23e1b35a' stroke-width='2'/%3E%3C/svg%3E") 16 16, copy;
}
.slots { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
.slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  color: var(--amber);
  background: rgba(3, 8, 10, 0.7);
  border: 1px solid rgba(124, 161, 170, 0.45);
}
.slot.empty { border-style: dashed; opacity: 0.55; }
.slot.spent { opacity: 0.35; }
.slot.active, .slot[aria-pressed="true"] {
  color: #071012;
  background: var(--public);
  border-color: var(--public);
  box-shadow: 0 0 0 1px var(--public);
}
.slot svg { width: 70%; height: 70%; }
.slot .charges {
  position: absolute;
  right: 1px;
  bottom: 0;
  font-size: 0.6rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.slot.active .charges { color: #071012; }
.research { width: min(78rem, 96vw); }
.lab-grid { display: grid; grid-template-columns: minmax(18rem, 4fr) minmax(24rem, 6fr); gap: 1.25rem; align-items: start; }
@media (max-width: 900px) { .lab-grid { grid-template-columns: 1fr; } }
.armoury-squad { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.6rem; }
.armoury-card { border: 1px solid rgba(124, 161, 170, 0.3); padding: 0.5rem 0.6rem; }
.armoury-card h4 { margin: 0 0 0.4rem; font-size: 0.95rem; }
.armoury-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.slot.big { min-height: 3.4rem; }
.slot.big .label { position: absolute; left: 2px; top: 1px; font-size: 0.62rem; color: var(--muted); }
.slot.big.chosen { outline: 2px solid var(--public); outline-offset: 1px; }
.armoury-shop { margin-top: 0.9rem; border: 1px solid rgba(124, 161, 170, 0.3); padding: 0.6rem 0.8rem; }
.armoury-shop h4 { margin: 0 0 0.5rem; }
.shop-row {
  display: grid;
  grid-template-columns: 2.6rem 1fr auto;
  align-items: center;
  gap: 0.2rem 0.8rem;
  padding: 0.35rem 0;
  border-top: 1px solid rgba(124, 161, 170, 0.18);
}
.shop-row .icon { color: var(--amber); display: grid; place-items: center; }
.shop-row small { display: block; color: var(--muted); }
.shop-row.locked { opacity: 0.55; }
.slot.big[aria-pressed="true"] {
  color: var(--amber);
  background: rgba(3, 8, 10, 0.7);
  border-color: var(--public);
  box-shadow: none;
}
.slot.big .charges { font-size: 0.7rem; right: 3px; bottom: 2px; }

/*
 * Layout: the page fills the screen. The map takes the middle with the sidebar to its right,
 * and a dock along the bottom holds the minimap (bottom left) and the four operators side by
 * side, so nothing needs scrolling at ordinary desktop sizes.
 */
.operation-heading { min-height: 0; padding: 0.4rem 0.8rem; }
.operation-heading h2 { font-size: 1.15rem; }
.field-controls { padding: 0.4rem 0.8rem; gap: 0.4rem; }
.field-controls > button { min-height: 2.1rem; padding: 0.3rem 0.65rem; font-size: 0.9rem; }
@media (pointer: fine) { .direction-pad { display: none; } }
.dock {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 0.4rem;
  border: 1px solid var(--line);
  background: rgba(12, 18, 22, 0.82);
}
.dock-map { display: grid; align-items: end; }
#minimap {
  display: block;
  width: 256px;
  height: 128px;
  min-height: 0;
  border: 1px solid var(--public);
  background: rgba(3, 8, 10, 0.82);
  cursor: pointer;
}
.dock-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 0.3rem; }
.dock-head .section-number { margin: 0; }
.roster { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; gap: 0.5rem; }
footer { padding: 0.2rem 0 0.4rem; font-size: 0.7rem; }
@media (min-width: 981px) and (min-height: 560px) {
  .app-shell { height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; overflow: hidden; }
  main { min-height: 0; padding: 0.5rem 0; }
  .playfield { display: flex; flex-direction: column; min-height: 0; }
  .canvas-frame { flex: 1 1 auto; min-height: 0; }
  #game-canvas { height: 100%; min-height: 0; }
  .mission-panel { position: static; align-self: stretch; min-height: 0; max-height: none; overflow-y: auto; }
}
@media (max-width: 980px) {
  .dock { grid-template-columns: minmax(0, 1fr); }
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #minimap { width: 100%; height: auto; aspect-ratio: 2 / 1; }
}
@media (max-width: 560px) { .roster { grid-template-columns: minmax(0, 1fr); } }

/* Top bar: brand, the operation and its controls, funds, network state. */
.topbar { min-height: 52px; gap: 1rem; flex-wrap: nowrap; }
.topbar .brand-block h1 { font-size: 1.25rem; }
.topbar .operation-heading {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 0;
  border: 0;
}
.topbar .operation-heading .eyebrow { margin: 0; }
.topbar .operation-heading h2 { font-size: 1.1rem; }
.topbar .operation-tools button { padding: 0.3rem 0.65rem; font-size: 0.88rem; }
.topbar .funds { margin: 0; }
@media (max-width: 1250px) { .network-state { display: none; } }

/* Status messages sit on the map instead of taking sidebar space. */
.status-overlay {
  position: absolute;
  left: 0.6rem;
  top: 0.6rem;
  max-width: min(36rem, 72%);
  padding: 0.35rem 0.7rem;
  background: rgba(3, 8, 10, 0.82);
  border: 1px solid var(--line);
  pointer-events: none;
  font-size: 0.9rem;
}
.status-overlay p { margin: 0.1rem 0; }
.status-overlay p:empty { display: none; }

/* Dock: action buttons beside the squad heading, compact operator cards. */
.dock-head { flex-wrap: wrap; gap: 0.4rem 0.9rem; }
.dock-head .field-controls { padding: 0; margin-left: auto; gap: 0.35rem; }
.dock-head .field-controls > button { min-height: 1.8rem; padding: 0.15rem 0.55rem; font-size: 0.82rem; }
.roster-item { padding: 0.3rem 0.4rem; gap: 0.25rem 0.4rem; }
.roster-select { grid-template-columns: auto 1fr auto auto; gap: 0.4rem; font-size: 0.88rem; }
.roster-select .hp { color: var(--muted); font-size: 0.72rem; }
/* Sidebar: tighter rows so the brief, objectives and threats fit without scrolling. */
.mission-panel .panel-section { padding: 0.4rem 0.7rem; }
.objective-list { margin-top: 0.3rem; gap: 0.2rem; }
.objective-list li { padding: 0.2rem 0.4rem 0.2rem 1.6rem; font-size: 0.82rem; }
.threats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem; margin-top: 0.25rem; }
.threats button { padding: 0.2rem 0.4rem; font-size: 0.78rem; }
.selected-readout { font-size: 0.8rem; }
main { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); gap: 0.6rem; }

/*
 * Heads-up layout: the map fills the page and the squad, minimap and action bar float over it.
 * Squad: a small 2 x 2 block of cards at the top left. Minimap: bottom left. Actions: bottom centre.
 */
.canvas-frame { position: relative; }
.hud {
  position: absolute;
  z-index: 2;
  background: rgba(8, 14, 18, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(2px);
}
.squad-hud { left: 0.6rem; top: 0.6rem; padding: 0.3rem 0.4rem; }
.squad-hud .dock-head { margin-bottom: 0.2rem; gap: 0.6rem; }
.squad-hud .roster { grid-template-columns: repeat(2, 12.4rem); gap: 0.3rem; }
.minimap-hud { left: 0.6rem; bottom: 0.6rem; padding: 0.2rem; }
.minimap-hud #minimap { width: 224px; height: 112px; }
.action-hud { left: 50%; bottom: 0.6rem; transform: translateX(-50%); padding: 0.25rem 0.35rem; }
.action-hud .field-controls { padding: 0; margin: 0; gap: 0.3rem; flex-wrap: nowrap; }
.action-hud .field-controls > button { min-height: 1.8rem; padding: 0.15rem 0.5rem; font-size: 0.82rem; white-space: nowrap; }
.map-key { left: auto; right: 0.6rem; bottom: 0.6rem; }
.status-overlay { left: 27.6rem; top: 0.6rem; z-index: 2; max-width: calc(100% - 28.6rem); }

/* Compact operator cards for the squad block. */
.squad-hud .roster-item { padding: 0.2rem 0.3rem; gap: 0.15rem 0.3rem; }
.squad-hud .roster-item input[type="checkbox"] { width: 0.95rem; height: 0.95rem; }
.squad-hud .roster-select { gap: 0.3rem; font-size: 0.82rem; grid-template-columns: auto 1fr auto auto; }
.squad-hud .roster-select .operator-glyph { font-size: 0.9rem; }
.squad-hud .roster-select .operator-position { font-size: 0.66rem; }
.squad-hud .slots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; }
.squad-hud .slot svg { width: 74%; height: 74%; }
.squad-hud .slot .charges { font-size: 0.64rem; right: 2px; bottom: 1px; }

@media (min-width: 981px) and (min-height: 560px) {
  .app-shell { grid-template-rows: auto minmax(0, 1fr) auto; }
}
@media (max-width: 980px) {
  .canvas-frame { overflow: visible; min-height: 0; }
  #game-canvas { height: 55vh; min-height: 300px; }
  .hud, .status-overlay { position: static; transform: none; max-width: none; margin: 0.4rem; pointer-events: auto; }
  .squad-hud .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minimap-hud #minimap { width: 100%; height: auto; aspect-ratio: 2 / 1; }
  .map-key { position: static; margin: 0.4rem; }
}

/* Squad cards: positions are on the map and minimap, so the name row keeps room for health and points. */
.squad-hud .operator-position { display: none; }
.squad-hud .roster-select { grid-template-columns: auto auto 1fr auto; }
.squad-hud .roster-select .hp { margin-left: 0.2rem; }
/* The legend moves out of the way of the action bar. */
.map-key { left: auto; right: 0.6rem; top: 0.6rem; bottom: auto; }
.app-shell { width: 100%; max-width: none; padding: 0 0.75rem; }

/* Research & Armoury: three columns (research, squads, shop) so nothing needs scrolling on a laptop. */
.research { width: min(96rem, 98vw); max-height: 96vh; padding: 0.6rem 1rem 0.8rem; }
.research .dialog-header h2 { font-size: 1.2rem; }
.research .hint { margin: 0.2rem 0 0.4rem; }
.funds-large { font-size: 1.15rem; margin: 0; }
.lab-grid { grid-template-columns: minmax(15rem, 1fr) minmax(24rem, 1.7fr) minmax(16rem, 1.1fr); gap: 0.9rem; }
.research h3 { margin: 0.5rem 0 0.3rem; font-size: 0.9rem; }
.research-row { padding: 0.3rem 0.5rem; font-size: 0.85rem; }
.research-row small { font-size: 0.75rem; }
.research-row button, .research-row .state { font-size: 0.8rem; }
.armoury-squad { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.armoury-card { padding: 0.35rem 0.45rem; }
.armoury-card h4 { margin: 0 0 0.25rem; font-size: 0.85rem; }
.slot.big { min-height: 2.9rem; }
.armoury-shop { margin-top: 0; padding: 0.4rem 0.6rem; }
.armoury-shop h4 { margin: 0 0 0.3rem; font-size: 0.9rem; }
.shop-row { grid-template-columns: 2rem 1fr auto; padding: 0.25rem 0; gap: 0.1rem 0.5rem; font-size: 0.82rem; }
.shop-row small { font-size: 0.7rem; line-height: 1.25; }
.shop-row button, .armoury-shop > button { font-size: 0.78rem; padding: 0.25rem 0.5rem; }
@media (max-width: 1150px) { .lab-grid { grid-template-columns: 1fr 1fr; } .lab-shop { grid-column: 1 / -1; } }
@media (max-width: 760px) { .lab-grid { grid-template-columns: 1fr; } }
/* The legend stacks at the bottom right, clear of the status banner and the action bar. */
.map-key { top: 0.6rem; bottom: auto; right: 0.6rem; flex-direction: column; gap: 0.2rem; padding: 0.35rem 0.5rem; }

/* Sequential operations: the objective to do now stands out and the later ones wait. */
.objective-list li.current { border-color: var(--amber); color: var(--ink); font-weight: 600; }
.objective-list li.waiting { opacity: 0.6; }

/* The roster panel in the Research & Armoury screen. */
.roster-panel { margin: 0.4rem 0 0.8rem; }
.roster-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.roster-card {
  border: 1px solid var(--line, #35424b);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  display: grid;
  gap: 0.25rem;
  min-width: 9rem;
}
.roster-card.fallen { opacity: 0.5; }
.roster-card strong, .roster-pick { letter-spacing: 0.04em; font-weight: 700; }
.roster-pick { padding: 0; text-align: left; background: transparent; border: 0; color: inherit; cursor: pointer; }
.roster-pick:disabled { cursor: default; opacity: 0.7; }
.roster-card.picked { border-color: var(--public); background: rgba(66, 214, 208, 0.1); }
.lab-roster .roster-card { cursor: pointer; }
.roster-card label { display: flex; gap: 0.4rem; align-items: center; }

/* Territory tax panel and the research funding dial. */
.territory-panel { display: grid; gap: 0.3rem; margin: 0.4rem 0; font-size: 0.9rem; }
.territory-panel .tax-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.territory-panel .mood { font-weight: 600; }
.territory-panel .mood.bad { color: var(--danger, #ff6b62); }
.research-dial { display: grid; gap: 0.3rem; margin-bottom: 0.5rem; font-size: 0.9rem; }
.research-dial .dial-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.research-row progress { width: 6rem; }

.shop-row .stats { display: block; opacity: 0.85; color: var(--amber, #e1b35a); }

/* The three drug sliders under each operator's bars. */
.drugs {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem 0.6rem;
  font-size: 0.7rem;
  color: var(--muted);
}
.drug { display: grid; grid-template-columns: auto minmax(2.5rem, 1fr); align-items: center; gap: 0.25rem; }
.drug input[type="range"] { width: 100%; min-width: 0; margin: 0; accent-color: var(--amber, #e1b35a); }

/* Tabs: the mission panel (Mission, Enemies, Save) and the squad's view (Gear, Drugs). */
.tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--line); }
.tab {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--public); }
.tab .count-badge { margin-left: 0.3rem; padding: 0.05rem 0.3rem; font-size: 0.68rem; }
.tab-panel[hidden] { display: none; }
.mission-panel { display: block; }
.mission-panel .tabs { position: sticky; top: 0; z-index: 1; background: var(--panel); }

/* The squad card shows the weapon squares and, under them, the three drug sliders. */
.squad-hud .slots { gap: 4px; }
.squad-hud .slot svg { width: 76%; height: 76%; }
.squad-hud .slot .charges { font-size: 0.7rem; right: 3px; bottom: 2px; }

/* Each drug has its own colour: Adrenaline (speed, shaky aim) hot, Perception (aim, sight) cyan, Intelligence (recharge) violet. */
.drug-adrenaline { --drug: #ff7a59; }
.drug-perception { --drug: #42d6d0; }
.drug-intelligence { --drug: #b48cff; }
.drug { color: var(--drug); font-weight: 560; }
.drug input[type="range"] { accent-color: var(--drug); }

/* Research & Armoury: one tab at a time (Roster, Body parts, Loadout, Research). */
.research { width: min(84rem, 97vw); }
.lab-tabs { margin: 0.5rem 0 0.6rem; }
.lab-tabs .tab { padding: 0.45rem 1.1rem; font-size: 0.95rem; }
.research .tab-panel { min-height: 22rem; }
.lab-squad-grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.lab-roster { padding-right: 1rem; border-right: 1px solid var(--line); }
.lab-roster .roster-list { flex-direction: column; flex-wrap: nowrap; }
.lab-roster .roster-card { padding: 0.3rem 0.6rem; }
@media (max-width: 800px) {
  .lab-squad-grid { grid-template-columns: 1fr; }
  .lab-roster { padding-right: 0; border-right: 0; }
}
.lab-loadout {
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(16rem, 1fr) minmax(18rem, 1.2fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1100px) { .lab-loadout { grid-template-columns: 1fr 1fr; } .lab-shop { grid-column: 1 / -1; } }
.lab-loadout .armoury-squad { grid-template-columns: minmax(0, 1fr); }
.lab-loadout .slot.big { min-height: 3.6rem; }
.research-tracks, .research-items { display: grid; gap: 0.4rem; }
@media (max-width: 760px) { .lab-loadout { grid-template-columns: 1fr; } }
.squad-hud .drugs { gap: 0.2rem 0.5rem; font-size: 0.68rem; }
.squad-hud .drug { grid-template-columns: auto minmax(0, 1fr); gap: 0.25rem; }

/* Territories whose operation is not built yet. */
.map-territory { cursor: default; outline: none; }
.map-territory-pin { fill: #50636b; stroke: #05110f; stroke-width: 1.2; }
.map-territory:hover .map-territory-pin, .map-territory:focus-visible .map-territory-pin { fill: var(--public); }

/* The operations list: a scrolling list under filter tabs, since the campaign has 50. */
.list-filter { margin-top: 0.2rem; }
.title-side .mission-list { max-height: 24rem; overflow-y: auto; scrollbar-width: thin; padding-right: 0.3rem; }

/* A button where the four operator cards meet: one click selects the whole squad. */
.roster-wrap { position: relative; }
.select-all-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--public);
  background: rgba(8, 14, 18, 0.95);
  border: 1px solid var(--public);
  border-radius: 50%;
  cursor: pointer;
}
.select-all-hub:hover, .select-all-hub[aria-pressed="true"] { color: #071012; background: var(--public); }

.world-map-svg.zoomed { cursor: grab; }
.map-zoom { position: absolute; right: 0.5rem; top: 0.5rem; display: flex; flex-direction: column; gap: 0.25rem; }
.map-zoom button { width: 2rem; height: 2rem; padding: 0; font-size: 1.1rem; background: rgba(8, 14, 18, 0.85); }

/* The "new version ready" notice: small, in a corner, never over the play area's controls. */
.update-banner {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  background: rgba(10, 18, 22, 0.95);
  border: 1px solid rgba(66, 214, 208, 0.6);
  font-size: 0.85rem;
}
.update-banner[hidden] { display: none; }

/* The offer to pick a saved operation up again, on the title screen. */
.resume-box {
  margin: 0.8rem 0;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(66, 214, 208, 0.6);
  background: rgba(66, 214, 208, 0.08);
}
.resume-box[hidden] { display: none; }
.resume-box p { margin: 0 0 0.5rem; }

/* The main menu: a short column of choices in front of the world map. */
dialog.main-menu[open] {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: min(92vw, 26rem);
  max-height: 94vh;
  overflow-y: auto;
  padding: 1.2rem 1.4rem 1.4rem;
}
.menu-head .eyebrow { margin: 0; }
.menu-head h2 { margin: 0; font-size: 1.8rem; }
.menu-list { display: flex; flex-direction: column; gap: 0.45rem; }
.menu-list button,
.menu-list a.button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin: 0;
  padding: 0.6rem 0.8rem;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(24, 35, 41, 0.9);
  cursor: pointer;
}
.menu-list a.button:hover, .menu-list a.button:focus-visible {
  border-color: var(--public);
  background: rgba(38, 61, 66, 0.95);
  outline: none;
}
.menu-list button[hidden] { display: none; }
.menu-list small { font-size: 0.8rem; opacity: 0.8; }
.menu-group {
  margin: 0.6rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

dialog.company-dialog[open] {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.25rem;
}
.company-dialog form { display: grid; gap: 0.6rem; }
.company-dialog h2 { margin: 0; }
.company-dialog input { font: inherit; padding: 0.5rem 0.6rem; min-height: 2.5rem; }
.company-error { color: #ff8a80; margin: 0; }
.company-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
.menu-company, .title-company { margin: 0.25rem 0 0; opacity: 0.85; display: flex; gap: 0.6rem; align-items: baseline; }
.menu-company[hidden] { display: none; }
.link-button { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }

.tutorial-panel {
  position: absolute;
  left: 50%;
  bottom: 4.5rem;
  transform: translateX(-50%);
  width: min(34rem, calc(100% - 2rem));
  padding: 0.7rem 0.9rem;
  background: rgba(10, 16, 20, 0.92);
  border: 1px solid #42d6d0;
  z-index: 5;
}
.tutorial-panel[hidden] { display: none; }
.tutorial-panel p { margin: 0 0 0.4rem; }
.tutorial-actions { display: flex; justify-content: space-between; gap: 0.5rem; }
.company-form { display: grid; gap: 0.6rem; }

.tutorial-point { position: relative; outline: 2px solid #ffd166; outline-offset: 1px; }
.tutorial-point::after {
  content: "▼";
  position: absolute;
  top: -1.5em;
  left: 50%;
  margin-left: -0.5em;
  color: #ffd166;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
  pointer-events: none;
  z-index: 6;
  animation: tutorial-bounce 0.8s ease-in-out infinite;
}
@keyframes tutorial-bounce { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .tutorial-point::after { animation: none; } }

.map-region.alert-revolt .map-region-shape { fill: rgba(255, 107, 98, 0.3); stroke: #ff6b62; }
.map-region.alert-revolt .map-pin { fill: #ff6b62; }
.map-region.alert-takeover .map-region-shape { fill: rgba(232, 107, 214, 0.28); stroke: #e86bd6; stroke-width: 2.6; }
.map-region.alert-takeover .map-pin { fill: #e86bd6; }
.map-region.alert-revolt .map-region-state, .map-region.alert-takeover .map-region-state { fill: #ffd7d3; }

.menu-note { margin: 0; opacity: 0.8; font-size: 0.9rem; }
.menu-note[hidden] { display: none; }

dialog.daily-dialog[open] { width: min(40rem, calc(100vw - 2rem)); padding: 1.25rem; }
.daily-body { display: grid; gap: 0.9rem; }
.daily-body h2, .daily-body h3, .daily-body p { margin: 0; }
.daily-chores, .daily-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.daily-chores li { display: grid; grid-template-columns: 1.5rem 1fr auto; gap: 0.5rem; align-items: baseline; }
.daily-chores li.done { opacity: 0.65; }
.daily-chores .tick { font-weight: 800; }
.daily-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.4rem; }
.daily-tabs button[aria-pressed="true"] { outline: 2px solid #42d6d0; }
.daily-board li { display: grid; grid-template-columns: 2rem 1fr 5rem 4rem; gap: 0.5rem; }
.daily-board li.me { font-weight: 800; }

.world-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; max-height: 16rem; overflow-y: auto; }
.world-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 0.5rem; align-items: center; }
.world-list li.mine { font-weight: 800; }
.world-list small { display: block; opacity: 0.75; font-weight: 400; }
