/* Grappling Lab · Grappling Atlas V1 — Precision Fight Lab 3.0 (5 Themes + Focus Mode) */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/geist-gyByhwUxId8gMEwcGFU.woff2) format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/geist-gyByhwUxId8gMEwcGFU.woff2) format("woff2");
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/geist-gyByhwUxId8gMEwcGFU.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(./fonts/jetbrainsmono-tDbv2o-flEEny0FZhsfKu5WU4zr3EBX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/jetbrainsmono-tDbv2o-flEEny0FZhsfKu5WU4zr3EBX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/spacegrotesk-600-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/spacegrotesk-700-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/barlowcondensed-HTxwL3I-JCGChYJ8VI-L6OOau7B4873z3bWuQ.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/barlowcondensed-HTxwL3I-JCGChYJ8VI-L6OOau7B46r2z3bWuQ.woff2) format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(./fonts/newsreader-600-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(./fonts/newsreader-700-latin.woff2) format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #11141a;
  --surface: #191e26;
  --surface-subtle: #161b23;
  --surface-elevated: #222a35;
  --line: rgba(227, 234, 245, 0.11);
  --line-strong: rgba(227, 234, 245, 0.23);
  --text: #f3f5f8;
  --text-dim: #bdc8d6;
  --muted: #a1afbf;
  --accent: #65dce9;
  --accent-hover: #9deaf3;
  --accent-soft: rgba(101, 220, 233, 0.11);
  --accent-border: rgba(101, 220, 233, 0.42);
  --on-primary: #11141a;
  --focus-ring: #65dce9;
  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --rose: #f43f5e;
  --rose-soft: rgba(244, 63, 94, 0.14);

  /* 12 Position Family Pigments */
  --fam-takedowns: #38bdf8;
  --fam-scrambles: #fbbf24;
  --fam-guards: #65dce9;
  --fam-sweeps: #34d399;
  --fam-transitions: #a78bfa;
  --fam-passing: #60a5fa;
  --fam-pins: #2dd4bf;
  --fam-submissions: #fb7185;
  --fam-escapes: #f59e0b;
  --fam-subdef: #f472b6;
  --fam-leglocks: #c084fc;
  --fam-counters: #94a3b8;

  --radius-card: 14px;
  --radius-sub: 10px;
  --radius-ctrl: 8px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Geist", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --top-highlight: rgba(255, 255, 255, 0.055);
  --cluster-fill: rgba(255, 255, 255, 0.018);
  --backdrop-tint: rgba(6, 8, 12, 0.72);
}

:root[data-palette="dark"] {
  color-scheme: dark;
  --bg: #080806;
  --surface: #231d17;
  --surface-subtle: #14110e;
  --surface-elevated: #352b22;
  --line: rgba(235, 215, 184, 0.12);
  --line-strong: rgba(235, 215, 184, 0.24);
  --text: #f7f1e7;
  --text-dim: #d6c6b3;
  --muted: #b6a48f;
  --accent: #f0d9ae;
  --accent-hover: #fff0d2;
  --accent-soft: rgba(240, 217, 174, 0.13);
  --accent-border: rgba(240, 217, 174, 0.44);
  --on-primary: #14110e;
  --focus-ring: #f0d9ae;
  --emerald: #6ab88e;
  --amber: #d4a359;
  --rose: #d97a84;
}

:root[data-palette="precision"] {
  color-scheme: dark;
  --bg: #080d1a;
  --surface: #10192e;
  --surface-subtle: #0b1223;
  --surface-elevated: #172442;
  --line: rgba(118, 165, 255, 0.2);
  --line-strong: rgba(118, 165, 255, 0.38);
  --text: #f2f6ff;
  --text-dim: #b6c7e8;
  --muted: #90a9d6;
  --accent: #ccf53d;
  --accent-hover: #defa75;
  --accent-soft: rgba(204, 245, 61, 0.14);
  --accent-border: rgba(204, 245, 61, 0.52);
  --on-primary: #080d1a;
  --focus-ring: #defa75;
  --emerald: #34e5a0;
  --amber: #ffb838;
  --rose: #ff5775;
  --radius-card: 6px;
  --radius-sub: 4px;
  --radius-ctrl: 4px;
  --font-display: "Space Grotesk", "Geist", ui-sans-serif, system-ui, sans-serif;
}

:root[data-palette="atelier"] {
  color-scheme: light;
  --bg: #f2efe9;
  --surface: #fbfaf7;
  --surface-subtle: #e7e3da;
  --surface-elevated: #ffffff;
  --line: rgba(20, 23, 31, 0.15);
  --line-strong: rgba(20, 23, 31, 0.3);
  --text: #14171f;
  --text-dim: #39404e;
  --muted: #4c5565;
  --accent: #a82a0e;
  --accent-hover: #872009;
  --accent-soft: rgba(168, 42, 14, 0.1);
  --accent-border: rgba(168, 42, 14, 0.45);
  --on-primary: #fbfaf7;
  --focus-ring: #a82a0e;
  --emerald: #0a6845;
  --emerald-soft: rgba(10, 104, 69, 0.12);
  --amber: #8a4900;
  --amber-soft: rgba(138, 73, 0, 0.12);
  --rose: #ae152f;
  --rose-soft: rgba(174, 21, 47, 0.12);

  --fam-takedowns: #0369a1;
  --fam-scrambles: #9a5b00;
  --fam-guards: #0e7490;
  --fam-sweeps: #0a6845;
  --fam-transitions: #6d28d9;
  --fam-passing: #1d4ed8;
  --fam-pins: #0f766e;
  --fam-submissions: #be123c;
  --fam-escapes: #b45309;
  --fam-subdef: #9d174d;
  --fam-leglocks: #7e22ce;
  --fam-counters: #475569;

  --radius-card: 4px;
  --radius-sub: 3px;
  --radius-ctrl: 3px;
  --font-display: "Barlow Condensed", "Geist", ui-sans-serif, system-ui, sans-serif;
  --top-highlight: rgba(255, 255, 255, 0.85);
  --cluster-fill: rgba(20, 23, 31, 0.025);
  --backdrop-tint: rgba(20, 23, 31, 0.48);
}

:root[data-palette="monolith"] {
  color-scheme: dark;
  --bg: #09090a;
  --surface: #161619;
  --surface-subtle: #101012;
  --surface-elevated: #212126;
  --line: rgba(245, 245, 241, 0.14);
  --line-strong: rgba(245, 245, 241, 0.28);
  --text: #f5f5f1;
  --text-dim: #c5c5c0;
  --muted: #9e9e98;
  --accent: #ff5c38;
  --accent-hover: #ff7e61;
  --accent-soft: rgba(255, 92, 56, 0.14);
  --accent-border: rgba(255, 92, 56, 0.54);
  --on-primary: #09090a;
  --focus-ring: #ff8e75;
  --emerald: #3fd68e;
  --amber: #f0b04f;
  --rose: #ff586c;
  --radius-card: 2px;
  --radius-sub: 2px;
  --radius-ctrl: 2px;
  --font-display: "Newsreader", "Geist", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-color: var(--line-strong) transparent; }
::selection { background: var(--accent-soft); color: var(--text); }
:where(input, textarea) { caret-color: var(--accent); }
:where(a) { color: var(--accent); text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

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

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
h1, h2 { font-family: var(--font-display); }
h1 { font-size: clamp(22px, 2.5vw, 28px); line-height: 1.15; }
h2 { font-size: 18px; line-height: 1.25; }
h3 { font-size: 14px; line-height: 1.35; }
p { margin: 0; max-width: 72ch; }
button, input, select, textarea { font: inherit; color: inherit; max-width: 100%; }
select { min-width: 0; text-overflow: ellipsis; }

.ga-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ga-muted { color: var(--muted); font-size: 13px; }
.ga-stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ga-main { min-width: 0; }

.ga-app {
  max-width: 1560px;
  margin: 0 auto;
  padding: 14px 18px 42px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ga-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: inset 0 1px 0 0 var(--top-highlight), 0 8px 24px -6px rgba(0, 0, 0, 0.2);
}

.ga-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ga-mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--radius-ctrl);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 17px;
}
.ga-breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); }
.ga-top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ga-theme-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--surface-subtle);
  padding: 3px;
  border-radius: var(--radius-ctrl);
  border: 1px solid var(--line);
  max-width: 100%;
}

.ga-btn, .ga-chip {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 13px;
  border-radius: var(--radius-ctrl);
  border: 1px solid var(--line-strong);
  background: var(--surface-subtle);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: inset 0 1px 0 0 var(--top-highlight);
  transition: transform 0.14s var(--ease-out), background 0.14s var(--ease-out), border-color 0.14s var(--ease-out);
}
.ga-btn.small, .ga-chip { min-height: 44px; padding: 6px 10px; font-size: 12px; }
.ga-btn:active, .ga-chip:active { transform: scale(0.97); }
.ga-btn.primary {
  background: var(--accent);
  color: var(--on-primary);
  border-color: var(--accent);
  font-weight: 700;
}
.ga-btn[aria-pressed="true"], .ga-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}
.ga-btn:disabled { opacity: 0.45; cursor: not-allowed; }

@media (hover: hover) and (pointer: fine) {
  .ga-btn:hover, .ga-chip:hover { background: var(--surface-elevated); }
  .ga-btn.primary:hover { background: var(--accent-hover); }
  .ga-list-row:hover { border-color: var(--accent-border); background: var(--surface-elevated); }
  .ga-svg-node:hover rect { stroke: var(--accent); }
}

.ga-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--surface-subtle);
  padding: 6px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
}
.ga-tab {
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sub);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.14s var(--ease-out), border-color 0.14s var(--ease-out), color 0.14s var(--ease-out);
}
.ga-tab[aria-selected="true"] {
  background: var(--surface-elevated);
  border-color: var(--accent-border);
  color: var(--accent);
}

.ga-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  box-shadow: inset 0 1px 0 0 var(--top-highlight), 0 6px 18px -6px rgba(0, 0, 0, 0.16);
}
.ga-subcard {
  padding: 12px;
  border-radius: var(--radius-sub);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ga-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ga-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.ga-search-wrap { flex: 1 1 240px; min-width: 0; }
.ga-search-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: var(--radius-ctrl);
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
}
.ga-filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ga-filter-controls select, .ga-field select, .ga-control-group select {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--radius-ctrl);
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
}
.ga-view-switch { display: inline-flex; gap: 4px; }

.ga-family-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ga-fam-chip {
  min-height: 44px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-subtle);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
}
.ga-fam-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent);
}
.ga-fam-swatch { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }

.ga-universe-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 430px);
  gap: 16px;
  align-items: start;
}
.ga-canvas-card { padding: 12px; }
.ga-graph-stage { display: flex; flex-direction: column; gap: 10px; }
.ga-graph-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ga-zoom-controls { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.ga-route-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sub);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.ga-svg-viewport {
  position: relative;
  width: 100%;
  height: clamp(380px, 58vh, 660px);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sub);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}
.ga-svg-viewport.is-panning { cursor: grabbing; }
.ga-svg-viewport svg { width: 100%; height: 100%; display: block; user-select: none; }

.ga-marker-transition path { fill: var(--accent); }
.ga-marker-followup path { fill: var(--emerald); }
.ga-marker-counter path { fill: var(--amber); }
.ga-marker-defense path { fill: var(--rose); }

.ga-cluster-box {
  fill: var(--cluster-fill);
  stroke-dasharray: 4 4;
  stroke-width: 1;
  rx: 14;
  transition: opacity 0.14s var(--ease-out);
}
.ga-cluster-box.is-dimmed,
.ga-cluster-label.is-dimmed { opacity: 0.18; }
.ga-cluster-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: opacity 0.14s var(--ease-out);
}

.ga-svg-edge {
  fill: none;
  stroke-width: 1.75;
  opacity: 0.56;
  transition: opacity 0.14s var(--ease-out), stroke-width 0.14s var(--ease-out);
}
.ga-svg-edge.is-highlighted { opacity: 0.98; stroke-width: 2.8; }
.ga-svg-edge.is-route-active {
  opacity: 1;
  stroke: var(--accent);
  stroke-width: 3.5;
}
.ga-svg-edge.is-dimmed { opacity: 0.07; }

.ga-svg-node { cursor: pointer; transition: opacity 0.14s var(--ease-out); }
.ga-svg-node.is-dimmed { opacity: 0.15; }
.ga-svg-node rect { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; rx: 10; }
.ga-svg-node.is-neighbor rect { stroke: var(--accent-border); stroke-width: 2; }
.ga-svg-node.is-route-node rect { stroke: var(--emerald); stroke-width: 2.2; fill: var(--surface-elevated); }
.ga-svg-node.is-selected rect { stroke: var(--accent); stroke-width: 2.6; fill: var(--surface-elevated); }
.ga-svg-node text { fill: var(--text); font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; }
.ga-svg-node .ga-node-sub { fill: var(--muted); font-family: var(--font-mono); font-size: 9.5px; }

.ga-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-dim); }
.ga-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.ga-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; border: 1.5px solid transparent; }
.ga-dot.learned { background: var(--emerald); }
.ga-dot.developing { background: var(--accent); }
.ga-dot.difficulty { background: var(--rose); }
.ga-dot.unexplored { background: transparent; border-color: var(--muted); }

/* Mobile & Tablet Focus Context Panel */
.ga-mobile-context {
  display: none;
  padding: 12px;
  border-radius: var(--radius-sub);
  background: var(--surface-subtle);
  border: 1px solid var(--accent-border);
  flex-direction: column;
  gap: 10px;
}
.ga-mobile-neighbors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ga-list-stage { display: flex; flex-direction: column; gap: 12px; }
.ga-universe-list { display: flex; flex-direction: column; gap: 14px; max-height: 640px; overflow-y: auto; padding-right: 4px; }
.ga-list-group { display: flex; flex-direction: column; gap: 8px; }
.ga-list-row {
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 10px 12px;
  border-radius: var(--radius-sub);
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.ga-list-row.is-selected { border-color: var(--accent-border); background: var(--accent-soft); }
.ga-list-row.is-neighbor { border-color: var(--line-strong); }
.ga-list-row.is-route-node { border-color: var(--emerald); }

.ga-detail-panel { position: sticky; top: 14px; max-height: calc(100vh - 28px); overflow-y: auto; }
.ga-intel-block {
  padding: 10px 12px;
  border-radius: var(--radius-sub);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ga-intel-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-dim); }
.ga-jump-row { display: flex; flex-wrap: wrap; gap: 6px; }

.ga-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.ga-badge.learned { background: var(--emerald-soft); color: var(--emerald); border-color: rgba(52, 211, 153, 0.42); }
.ga-badge.difficulty { background: var(--rose-soft); color: var(--rose); border-color: rgba(244, 63, 94, 0.42); }
.ga-badge.amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(245, 158, 11, 0.42); }
.ga-badge.unexplored { background: var(--surface-elevated); color: var(--muted); border-color: var(--line-strong); }

.ga-notice {
  padding: 10px 12px;
  border-radius: var(--radius-sub);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
}

.ga-dual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ga-dna-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ga-paths-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ga-kpi-line { font-size: 13px; color: var(--accent); font-weight: 700; }

.ga-route-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}
.ga-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ga-field select { width: 100%; }
.ga-field label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.ga-inline-field { min-width: 220px; }
.ga-field-submit { justify-content: flex-end; }
.ga-control-group, .ga-dispatch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.ga-chain-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.ga-chain-step {
  flex: 1 1 210px;
  min-width: 190px;
  padding: 12px;
  border-radius: var(--radius-sub);
  background: var(--surface-subtle);
  border: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ga-step-arrow { font-size: 12px; color: var(--accent); font-weight: 600; }

.ga-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  overflow: hidden;
}
.ga-progress-fill { height: 100%; background: var(--emerald); transition: width 0.2s var(--ease-out); }

.ga-path-step {
  padding: 10px;
  border-radius: var(--radius-sub);
  background: var(--surface-subtle);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ga-sandbox-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ga-sandbox-option {
  width: 100%;
  min-height: 44px;
  text-align: left;
  padding: 12px;
  border-radius: var(--radius-sub);
  border: 1px solid var(--line-strong);
  background: var(--surface-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.ga-dialog {
  max-width: 540px;
  width: calc(100% - 28px);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  padding: 18px;
}
.ga-dialog::backdrop { background: var(--backdrop-tint); }
.ga-shortcuts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ga-shortcuts-grid dt { font-weight: 700; margin-bottom: 2px; }
.ga-shortcuts-grid dd { margin: 0; color: var(--muted); font-size: 12px; }
kbd { font-family: var(--font-mono); font-size: 11px; padding: 2px 6px; border-radius: 5px; background: var(--surface-subtle); border: 1px solid var(--line-strong); }

.ga-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  padding: 10px 14px;
  border-radius: var(--radius-ctrl);
  background: var(--surface-elevated);
  border: 1px solid var(--accent-border);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

@media (max-width: 1120px) {
  .ga-universe-layout { grid-template-columns: 1fr; }
  .ga-detail-panel { position: static; max-height: none; }
  .ga-mobile-context { display: flex; }
  .ga-dna-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .ga-route-form, .ga-dual-grid, .ga-paths-grid, .ga-dna-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 600px) {
  .ga-app { padding: 10px 10px 36px; }
  .ga-shortcuts-grid { grid-template-columns: 1fr; }
  .ga-tab { flex: 1 1 auto; text-align: center; }
  .ga-svg-viewport { height: 320px; }
  .ga-control-group, .ga-filter-controls { width: 100%; }
  .ga-filter-controls select, .ga-control-group select, .ga-inline-field { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ga-btn, .ga-chip, .ga-tab, .ga-svg-edge, .ga-svg-node, .ga-cluster-box, .ga-cluster-label, .ga-progress-fill { transition: none; }
  .ga-btn:active, .ga-chip:active { transform: none; }
}
