/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg-deep:       #0a0e17;
  --bg-surface:    #111827;
  --bg-panel:      #1a2235;
  --bg-panel-hover:#1f2a40;
  --border:        #2a3650;
  --border-glow:   #3b82f6;

  --text-primary:  #e8edf5;
  --text-secondary:#8b9cb8;
  --text-muted:    #5a6a85;

  --accent:        #3b82f6;
  --accent-glow:   rgba(59, 130, 246, 0.35);
  --accent-bright: #60a5fa;
  --success:       #22c55e;
  --warning:       #f59e0b;
  --danger:        #ef4444;

  --reactor-core:  #38bdf8;
  --reactor-glow:  rgba(56, 189, 248, 0.45);

  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     16px;

  --shadow-panel:  0 4px 24px rgba(0, 0, 0, 0.4);
  --font-sans:     "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:     "Cascadia Code", "Fira Code", monospace;

  --header-h:      64px;
  --sidebar-w:     340px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100dvh;
  line-height: 1.5;
}

/* ── App Shell ─────────────────────────────────────────────── */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 1rem;
  height: var(--header-h);
  padding: 0 1.5rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-self: start;
  min-width: 0;
}

.header__logo {
  flex-shrink: 0;
}

.header__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.header__subtitle {
  font-size: 0.75rem;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid;
}

.header__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: center;
  grid-column: 2;
}

.header__guide-link {
  display: inline-block;
  width: max-content;
  max-width: max-content;
  box-sizing: border-box;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.22rem 0.48rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-sm);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.header__guide-link:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(59, 130, 246, 0.08);
}

.header__nav {
  justify-self: end;
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.header__game-link {
  display: inline-block;
  width: max-content;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.22rem 0.48rem;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-sm);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.header__game-link:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(59, 130, 246, 0.08);
}

.header__game-link--active {
  color: var(--accent-bright);
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.15);
}

.status-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.status-badge--online {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.1);
}

.status-badge--offline {
  color: var(--text-muted);
  border-color: rgba(90, 106, 133, 0.4);
  background: rgba(90, 106, 133, 0.1);
}

.status-badge--warning {
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.12);
}

.status-badge--meltdown {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.15);
  animation: meltdown-badge 1s ease-in-out infinite;
}

@keyframes meltdown-badge {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* ── Main Layout ───────────────────────────────────────────── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

.game-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  min-width: 0;
}

/* ── Panels ────────────────────────────────────────────────── */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-panel);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.panel:hover {
  border-color: rgba(59, 130, 246, 0.25);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.panel__heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.panel__hint {
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1rem;
}

/* ── Game Area ─────────────────────────────────────────────── */
.panel--game {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 480px;
}

.reactor {
  position: relative;
  width: 260px;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reactor__ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  pointer-events: none;
  z-index: 0;
}

.reactor__ring--outer {
  inset: 0;
  border-color: var(--border);
  animation: spin 20s linear infinite;
}

.reactor__ring--middle {
  inset: 24px;
  border-color: rgba(59, 130, 246, 0.3);
  animation: spin 12s linear infinite reverse;
}

.reactor__core {
  position: relative;
  z-index: 2;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #1e3a5f, var(--bg-deep));
  border: 2px solid var(--reactor-core);
  box-shadow: 0 0 40px var(--reactor-glow), inset 0 0 30px rgba(56, 189, 248, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  animation: pulse 3s ease-in-out infinite;
  cursor: not-allowed;
  color: inherit;
  font: inherit;
  padding: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.reactor__core--offline {
  opacity: 0.55;
  border-color: var(--border);
  box-shadow: none;
  animation: none;
  cursor: not-allowed;
}

.reactor__core--active {
  cursor: pointer;
  opacity: 1;
}

.reactor__core--active:hover {
  transform: scale(1.04);
  box-shadow: 0 0 55px var(--reactor-glow), inset 0 0 35px rgba(56, 189, 248, 0.2);
}

.reactor__core--active:active,
.reactor__core--pressing {
  transform: scale(0.94);
  filter: brightness(1.2);
}

.reactor__core--clicked {
  transition: none !important;
  transform: scale(1.14) !important;
  filter: brightness(1.75) saturate(1.2) !important;
  box-shadow:
    0 0 120px rgba(56, 189, 248, 0.95),
    0 0 60px rgba(255, 255, 255, 0.35),
    inset 0 0 70px rgba(56, 189, 248, 0.55) !important;
  animation: core-click-burst 0.7s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.reactor--clicked::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  border: 2px solid rgba(125, 211, 252, 0.85);
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.6);
  animation: reactor-shockwave 0.7s ease-out forwards;
}

.reactor--clicked .reactor__ring--outer {
  border-color: rgba(56, 189, 248, 0.95);
  animation: ring-burst 0.7s ease-out !important;
}

.reactor--clicked .reactor__ring--middle {
  border-color: rgba(125, 211, 252, 0.75);
  animation: ring-burst 0.7s ease-out reverse !important;
}

.reactor__click-pop {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #f0f9ff;
  text-shadow:
    0 0 18px rgba(56, 189, 248, 0.95),
    0 0 6px rgba(255, 255, 255, 0.8);
  pointer-events: none;
  animation: click-pop-rise 0.9s ease-out forwards;
}

@keyframes core-click-burst {
  0% {
    transform: scale(0.92);
    filter: brightness(1);
  }
  30% {
    transform: scale(1.2);
    filter: brightness(2);
  }
  55% {
    transform: scale(1.1);
    filter: brightness(1.6);
  }
  100% {
    transform: scale(1.02);
    filter: brightness(1.15);
  }
}

@keyframes reactor-shockwave {
  0% {
    transform: scale(0.75);
    opacity: 0.95;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@keyframes ring-burst {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }
  45% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

@keyframes click-pop-rise {
  0% {
    opacity: 0;
    transform: translate(-50%, 0.75rem) scale(0.7);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.12);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -3.25rem) scale(1);
  }
}

.reactor__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
}

.reactor__power {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--reactor-core);
  text-shadow: 0 0 12px var(--reactor-glow);
}

.reactor__unit {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 40px var(--reactor-glow), inset 0 0 30px rgba(56, 189, 248, 0.15); }
  50%       { box-shadow: 0 0 60px var(--reactor-glow), inset 0 0 40px rgba(56, 189, 248, 0.25); }
}

.reactor__core--warning {
  border-color: var(--warning);
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.4), inset 0 0 30px rgba(245, 158, 11, 0.15);
}

.reactor__core--meltdown {
  border-color: var(--danger);
  background: radial-gradient(circle at 40% 35%, #5f1e1e, var(--bg-deep));
  animation: meltdown-pulse 0.8s ease-in-out infinite !important;
}

/* ── Awakening Reactor Stages ──────────────────────────────── */
.reactor__core--awakening-aware {
  border-color: #67e8f9;
  box-shadow: 0 0 50px rgba(103, 232, 249, 0.45), inset 0 0 35px rgba(103, 232, 249, 0.2);
}

.reactor__core--awakening-reflective {
  border-color: #a78bfa;
  box-shadow: 0 0 55px rgba(167, 139, 250, 0.5), inset 0 0 40px rgba(167, 139, 250, 0.22);
  animation: awakening-pulse 2.5s ease-in-out infinite;
}

.reactor__core--awakening-emergent {
  border-color: #f472b6;
  box-shadow: 0 0 65px rgba(244, 114, 182, 0.55), inset 0 0 45px rgba(244, 114, 182, 0.25);
  animation: awakening-pulse 1.8s ease-in-out infinite;
}

.reactor__core--awakening-awakened {
  border-color: #fde047;
  background: radial-gradient(circle at 40% 35%, #4a3f1e, var(--bg-deep));
  box-shadow: 0 0 80px rgba(253, 224, 71, 0.65), inset 0 0 55px rgba(253, 224, 71, 0.3);
  animation: awakening-pulse 1.2s ease-in-out infinite;
}

.reactor--awakening-aware .reactor__ring--outer {
  border-color: rgba(103, 232, 249, 0.35);
}

.reactor--awakening-reflective .reactor__ring--outer {
  border-color: rgba(167, 139, 250, 0.4);
}

.reactor--awakening-emergent .reactor__ring--outer {
  border-color: rgba(244, 114, 182, 0.45);
}

.reactor--awakening-awakened .reactor__ring--outer,
.reactor--awakening-awakened .reactor__ring--middle {
  border-color: rgba(253, 224, 71, 0.5);
}

@keyframes awakening-pulse {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.15); }
}

.reactor--meltdown .reactor__ring--middle {
  border-color: rgba(239, 68, 68, 0.5);
}

@keyframes meltdown-pulse {
  0%, 100% {
    box-shadow: 0 0 50px rgba(239, 68, 68, 0.5), inset 0 0 35px rgba(239, 68, 68, 0.2);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 80px rgba(239, 68, 68, 0.8), inset 0 0 50px rgba(239, 68, 68, 0.35);
    transform: scale(1.03);
  }
}

/* ── Dashboard ─────────────────────────────────────────────── */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.dashboard__resources {
  width: 100%;
}

.dashboard__resources .panel--resources-compact {
  padding: 0.85rem 1rem;
  margin: 0;
}

.dashboard__resources .panel--resources-compact .panel__heading {
  display: none;
}

.dashboard__resources .panel--resources-compact .resource-list {
  display: none;
}

.dashboard__resources .panel--resources-compact .stats-block {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.85rem;
}

.dashboard__resources .panel--resources-compact .heat-bar {
  margin: 0;
}

.dashboard__panes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-content: start;
  min-width: 0;
}

.dashboard__pane {
  display: contents;
}

.dashboard__source {
  display: none;
}

.panel__hint-de {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: -0.35rem 0 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.panel--feature-locked {
  padding: 0.85rem 1rem;
}

.panel--feature-locked > :not(.panel__heading):not(.panel__hint-de):not(.panel__unlock-compact) {
  display: none !important;
}

.panel--feature-locked .panel__heading {
  margin-bottom: 0.35rem;
  padding-bottom: 0;
  border-bottom: none;
}

.panel--feature-locked .panel__hint-de {
  margin-bottom: 0.35rem;
  padding-bottom: 0;
  border-bottom: none;
}

.panel__unlock-compact {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin: 0;
}

.modal__dialog--guide {
  max-width: 28rem;
}

.modal__dialog--guide-full {
  max-width: 36rem;
  max-height: min(90vh, 720px);
  overflow-y: auto;
}

.guide-modal {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
  text-align: left;
}

.guide-modal__section {
  padding: 0.75rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.guide-modal__heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--reactor-core);
  margin: 0 0 0.45rem;
}

.guide-modal__section p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.guide-modal__section code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.guide-modal__list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.guide-page__main {
  flex: 1;
  max-width: 46rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
}

.guide-page__intro {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

.guide-page__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 auto;
}

.guide-page__content {
  margin-bottom: 0;
}

.guide-toc {
  margin-bottom: 1.75rem;
  padding: 1rem 1.1rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.guide-toc__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--reactor-core);
  margin: 0 0 0.65rem;
}

.guide-toc__list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.guide-toc__list ol {
  margin: 0.25rem 0 0.5rem;
  padding-left: 1.1rem;
}

.guide-toc__list a {
  color: var(--accent-bright);
  text-decoration: none;
}

.guide-toc__list a:hover {
  text-decoration: underline;
}

.guide-chapter {
  margin-bottom: 2rem;
  scroll-margin-top: 5rem;
}

.guide-chapter__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.guide-chapter__lead {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: -0.35rem 0 1.25rem;
}

.guide-block {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.guide-block__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--reactor-core);
  margin: 0 0 0.55rem;
}

.guide-block p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0;
}

.guide-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.guide-list--ordered {
  list-style: decimal;
}

.guide-list li + li {
  margin-top: 0.35rem;
}

.guide-dl {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.guide-dl dt {
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0.65rem;
}

.guide-dl dt:first-child {
  margin-top: 0;
}

.guide-dl dd {
  margin: 0.15rem 0 0;
  color: var(--text-secondary);
}

.guide-phase {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-bright);
  margin: 1.5rem 0 0.75rem;
  scroll-margin-top: 5rem;
}

.guide-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.guide-feature {
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  border-left: 3px solid rgba(56, 189, 248, 0.45);
}

.guide-feature__name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
}

.guide-feature__unlock {
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--warning);
  margin: 0 0 0.35rem;
}

.guide-feature__unlock strong {
  color: var(--text-muted);
  font-weight: 600;
}

.guide-feature__desc {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.guide-timeline {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: var(--radius-md);
}

.guide-timeline__text {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.header--guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header--guide-page {
  grid-template-columns: minmax(0, 1fr) auto;
}

.header--guide-page .header__nav {
  grid-column: 2;
}

.guide-page__title--compact {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.3;
}

.guide-page__back-nav {
  margin: 0 0 1.25rem;
}

.guide-page__back-nav--bottom {
  margin: 1.75rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.header__back-link {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--accent-bright);
  text-decoration: none;
}

.header__back-link:hover {
  text-decoration: underline;
}

.footer__link {
  color: var(--accent-bright);
  text-decoration: none;
}

.footer__link:hover {
  text-decoration: underline;
}

.modal__title--guide {
  color: var(--reactor-core);
}

.guide-welcome {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.guide-welcome p {
  margin: 0;
}

.guide-welcome__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

/* ── Stats Block ───────────────────────────────────────────── */
.stats-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.85rem;
  margin-bottom: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.stats-row__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.stats-row__value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.stats-row__value--accent {
  color: var(--accent-bright);
}

.stats-row__value--crystal {
  color: #a78bfa;
}

.momentum-block {
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
}

.momentum-block__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.momentum-block__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.momentum-block__phase {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.momentum-block__mult {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: #7dd3fc;
}

.momentum-block__next {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.active-buffs-block {
  margin-bottom: 0.75rem;
}

.active-buffs-block__title {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.active-buffs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.active-buff {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.78rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.active-buff__name {
  font-weight: 700;
  color: var(--accent-bright);
}

.active-buff__detail {
  color: var(--text-secondary);
}

.active-buff__time {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 600;
}

.mission-item__hint {
  margin: 0.25rem 0 0.5rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-style: italic;
}

.game-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.game-toast {
  min-width: 12rem;
  max-width: 18rem;
  padding: 0.65rem 0.85rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.game-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.game-toast__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-bright);
}

.game-toast__detail {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* ── Heat Bar ──────────────────────────────────────────────── */
.heat-bar {
  margin-bottom: 0.75rem;
}

.heat-bar__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.heat-bar__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.heat-bar__track {
  height: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.heat-bar__fill {
  width: 0;
  max-width: 100%;
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease, background 0.3s ease;
}

.heat-bar__fill--green  { background: linear-gradient(90deg, #16a34a, #22c55e); }
.heat-bar__fill--yellow { background: linear-gradient(90deg, #ca8a04, #eab308); }
.heat-bar__fill--orange { background: linear-gradient(90deg, #ea580c, #f97316); }
.heat-bar__fill--red    { background: linear-gradient(90deg, #dc2626, #ef4444); }

.heat-bar__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
}

.heat-bar__hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-muted);
}

/* ── Resources ─────────────────────────────────────────────── */
.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resource-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.resource-item:hover {
  background: var(--bg-panel-hover);
}

.resource-item--primary {
  border-color: rgba(59, 130, 246, 0.35);
}

.resource-item--disabled {
  opacity: 0.4;
  pointer-events: none;
}

.resource-item__icon {
  font-size: 1.25rem;
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}

.resource-item__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.resource-item__name {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.resource-item__value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
}

.resource-item__rate {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Upgrades ──────────────────────────────────────────────── */
.upgrade-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upgrade-item {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.15s;
}

.upgrade-item--locked {
  opacity: 0.65;
}

.upgrade-item--affordable {
  opacity: 1;
  border-color: rgba(59, 130, 246, 0.5);
}

.upgrade-item--purchased {
  opacity: 0.5;
  border-color: var(--success);
}

.upgrade-item--future {
  opacity: 0.35;
}

.upgrade-item__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.upgrade-item__name {
  font-size: 0.875rem;
  font-weight: 600;
}

.upgrade-item__cost {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--warning);
  flex-shrink: 0;
}

.upgrade-item__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn--start {
  margin-top: 1.5rem;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-bright);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn--start:not(:disabled):hover {
  background: var(--accent-bright);
  box-shadow: 0 0 36px var(--accent-glow);
}

.btn--hidden {
  display: none;
}

.btn--upgrade {
  width: 100%;
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn--upgrade:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.btn--secondary {
  width: 100%;
  background: transparent;
  color: var(--text-secondary);
  border-color: rgba(59, 130, 246, 0.35);
}

.btn--secondary:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: rgba(59, 130, 246, 0.08);
}

.btn--danger {
  width: 100%;
  background: transparent;
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--danger);
}

/* ── Missions ──────────────────────────────────────────────── */
.mission-list,
.achievement-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mission-item,
.achievement-item {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.mission-item--complete {
  border-color: rgba(34, 197, 94, 0.45);
}

.mission-item--claimed {
  opacity: 0.55;
  border-color: var(--success);
}

.mission-item__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.mission-item__name,
.achievement-item__name {
  font-size: 0.875rem;
  font-weight: 600;
}

.mission-item__reward {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--warning);
}

.mission-item__desc,
.achievement-item__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.mission-item__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
}

.mission-item__progress-text {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.mission-item__status {
  font-weight: 600;
  color: var(--text-muted);
}

.mission-item--complete .mission-item__status {
  color: var(--success);
}

.mission-bar {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.mission-bar__fill {
  width: 0;
  max-width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.mission-item--claimed .mission-bar__fill {
  background: var(--success);
}

.btn--claim {
  width: 100%;
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.mission-item--complete .btn--claim:not(:disabled) {
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.45);
}

.btn--claim:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

/* ── Achievement Plus ──────────────────────────────────────── */
.achievement-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(320px, calc(100vw - 2rem));
}

.achievement-toast {
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateX(1.25rem);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.achievement-toast--visible {
  opacity: 1;
  transform: translateX(0);
}

.achievement-toast__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.achievement-toast__label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.achievement-toast__rarity {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: #fbbf24;
}

.achievement-toast__name {
  font-size: 0.82rem;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.achievement-toast__points {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: #34d399;
  margin: 0;
}

.achievement-toast--uncommon .achievement-toast__rarity { color: #60a5fa; }
.achievement-toast--rare .achievement-toast__rarity { color: #a78bfa; }
.achievement-toast--epic .achievement-toast__rarity { color: #f472b6; }
.achievement-toast--legendary .achievement-toast__rarity { color: #fbbf24; }
.achievement-toast--mythic .achievement-toast__rarity { color: #fde047; }

.achievement-showcase__summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.achievement-showcase__stat {
  padding: 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.45);
  text-align: center;
}

.achievement-showcase__label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.achievement-showcase__value {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.achievement-rank,
.achievement-recent,
.achievement-catalog,
.achievement-classic {
  margin-bottom: 0.85rem;
}

.achievement-rank__heading,
.achievement-recent__heading,
.achievement-catalog__heading,
.achievement-classic__heading {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.achievement-rank__title {
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: #fbbf24;
  margin: 0 0 0.25rem;
}

.achievement-rank__bonus {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin: 0;
}

.achievement-recent__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.achievement-recent__item {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.achievement-recent__empty {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.achievement-catalog__category {
  font-size: 0.72rem;
  color: #a78bfa;
  margin: 0.5rem 0 0.35rem;
}

.achievement-plus-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.achievement-plus-item {
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.achievement-plus-item--locked {
  opacity: 0.65;
}

.achievement-plus-item--unlocked {
  border-color: rgba(251, 191, 36, 0.35);
}

.achievement-plus-item__header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.achievement-plus-item__name {
  font-size: 0.72rem;
  color: var(--text-primary);
}

.achievement-plus-item__meta {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}

.achievement-plus-item__desc {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* ── Achievements ──────────────────────────────────────────── */
.achievement-item--locked {
  opacity: 0.5;
}

.achievement-item--unlocked {
  border-color: rgba(167, 139, 250, 0.45);
}

.achievement-item__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.achievement-item__status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.achievement-item--locked .achievement-item__status {
  color: var(--text-muted);
}

.achievement-item--unlocked .achievement-item__status {
  color: #a78bfa;
}

/* ── Offline Modal ─────────────────────────────────────────── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal--visible {
  display: flex;
  animation: modal-fade-in 0.28s ease;
}

.modal--visible .modal__dialog {
  animation: modal-dialog-in 0.32s ease;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.modal__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1rem;
  text-align: center;
}

.modal__row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.modal__row:last-of-type {
  border-bottom: none;
  margin-bottom: 1.25rem;
}

.modal__label {
  color: var(--text-secondary);
}

.modal__value {
  font-family: var(--font-mono);
  font-weight: 700;
}

.modal__value--energy {
  color: var(--accent-bright);
}

.modal__value--crystal {
  color: #a78bfa;
}

.btn--claim-modal {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-bright);
  padding: 0.75rem;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.btn--claim-modal:hover {
  background: var(--accent-bright);
}

/* ── AI Core ───────────────────────────────────────────────── */
.ai-core__meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.ai-core__row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ai-core__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  min-width: 4.5rem;
}

.ai-core__value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.ai-core__value--status {
  color: var(--success);
}

.ai-core__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a78bfa;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 999px;
}

.ai-core__message-box {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  min-height: 3.5rem;
}

.ai-core__message {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-style: italic;
  line-height: 1.5;
}

.ai-core__buff {
  margin-top: 0.65rem;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-bright);
  text-align: center;
}

.ai-core__buff--hidden {
  display: none;
}

.ai-core__alignment--neutral {
  color: var(--text-muted);
}

.ai-core__alignment--engineer {
  color: var(--accent-bright);
}

.ai-core__alignment--scientist {
  color: #a78bfa;
}

.ai-core__alignment--autonomous {
  color: var(--warning);
}

.ai-core__directive--none {
  color: var(--text-muted);
}

.ai-core__directive--preserve {
  color: #34d399;
}

.ai-core__directive--expand {
  color: #f97316;
}

.ai-core__directive--understand {
  color: #a78bfa;
}

.ai-core__directive--transcend {
  color: #f472b6;
}

/* ── Archive ───────────────────────────────────────────────── */
.archive__count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.archive-list {
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.archive-item {
  padding: 0.65rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.archive-item--unlocked {
  border-color: rgba(167, 139, 250, 0.35);
}

.archive-item--locked {
  opacity: 0.45;
}

.archive-item__header {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.archive-item__id {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.archive-item__title {
  font-size: 0.8rem;
  font-weight: 600;
}

.archive-item__text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
  font-style: italic;
}

.archive-item--locked .archive-item__text {
  color: var(--text-muted);
}

/* ── Directive Panel ─────────────────────────────────────────── */
.directive-block {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.directive-block__active {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: #f472b6;
  margin-bottom: 0.35rem;
}

.directive-block__hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.modal__dialog--directive {
  max-width: 420px;
  border-color: rgba(244, 114, 182, 0.35);
}

.modal__title--directive {
  color: #f472b6;
}

.directive-modal__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  text-align: center;
}

.alignment-choice--preserve:hover {
  border-color: #34d399;
}

.alignment-choice--expand:hover {
  border-color: #f97316;
}

.alignment-choice--understand:hover {
  border-color: #a78bfa;
}

.alignment-choice--transcend:hover {
  border-color: #f472b6;
}

/* ── Awakening Panel ─────────────────────────────────────────── */
.awakening-block {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.awakening-block--locked .awakening-block__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.awakening-requirements {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.awakening-requirements li {
  padding: 0.2rem 0;
}

.awakening-block__progress {
  color: #67e8f9;
}

.awakening-block__level {
  color: #a78bfa;
  font-weight: 700;
}

.awakening-bar {
  height: 8px;
  background: var(--bg-deep);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.65rem 0 1rem;
}

.awakening-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #67e8f9, #a78bfa, #f472b6);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.awakening-quests__heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.awakening-quest-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.awakening-quest {
  padding: 0.65rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.awakening-quest--complete {
  border-color: rgba(52, 211, 153, 0.4);
}

.awakening-quest--claimed {
  opacity: 0.55;
}

.awakening-quest__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.awakening-quest__name {
  font-size: 0.8rem;
  font-weight: 700;
}

.awakening-quest__reward {
  font-size: 0.7rem;
  color: #67e8f9;
  font-family: var(--font-mono);
}

.awakening-quest__desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.awakening-quest__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.awakening-block--done {
  text-align: center;
  border-color: rgba(253, 224, 71, 0.4);
}

.awakening-block__done-title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: #fde047;
  margin-bottom: 0.35rem;
}

.awakening-block__done-bonus {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.modal__dialog--awakening {
  max-width: 420px;
  border-color: rgba(103, 232, 249, 0.35);
}

.modal__title--awakening {
  color: #67e8f9;
}

.awakening-modal__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
  text-align: center;
}

.awakening-modal__requirements {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  color: #34d399;
  text-align: center;
}

.awakening-modal__requirements li {
  padding: 0.2rem 0;
}

.modal__dialog--awakening-finale {
  max-width: 480px;
  border-color: rgba(253, 224, 71, 0.45);
}

.modal__title--awakening-finale {
  color: #fde047;
  font-size: 1.35rem;
  letter-spacing: 0.08em;
}

.awakening-finale__story {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.awakening-finale__story p {
  margin-bottom: 0.65rem;
}

.awakening-finale__bonus {
  font-size: 0.8rem;
  color: #34d399;
  text-align: center;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
}

/* ── Signal Reactor Effects ──────────────────────────────────── */
.reactor--signal-active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(103, 232, 249, 0.04) 2px,
    rgba(103, 232, 249, 0.04) 4px
  );
  border-radius: 50%;
  animation: signal-scanlines 6s linear infinite;
}

.reactor--signal-active .reactor__ring--outer {
  animation: signal-pulse-ring 3s ease-in-out infinite;
}

.reactor__core--signal-static {
  box-shadow: 0 0 45px rgba(148, 163, 184, 0.35);
}

.reactor__core--signal-reception {
  border-color: #67e8f9;
  box-shadow: 0 0 55px rgba(103, 232, 249, 0.45);
}

.reactor__core--signal-contact {
  border-color: #a78bfa;
  box-shadow: 0 0 60px rgba(167, 139, 250, 0.5);
  animation: signal-data-pulse 2s ease-in-out infinite;
}

.reactor__core--signal-synchronization {
  border-color: #f472b6;
  box-shadow: 0 0 70px rgba(244, 114, 182, 0.5);
  animation: signal-data-pulse 1.4s ease-in-out infinite;
}

.reactor__core--signal-connection {
  border-color: #34d399;
  background: radial-gradient(circle at 50% 45%, rgba(52, 211, 153, 0.25), var(--bg-deep));
  box-shadow: 0 0 80px rgba(52, 211, 153, 0.55), inset 0 0 40px rgba(103, 232, 249, 0.15);
  animation: signal-hologram 2.5s ease-in-out infinite;
}

.reactor--signal-connection::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(52, 211, 153, 0.35);
  animation: spin 20s linear infinite;
  pointer-events: none;
}

@keyframes signal-scanlines {
  to { transform: translateY(8px); }
}

@keyframes signal-pulse-ring {
  0%, 100% { opacity: 0.6; }
  50%       { opacity: 1; }
}

@keyframes signal-data-pulse {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.2) drop-shadow(0 0 12px rgba(103, 232, 249, 0.5)); }
}

@keyframes signal-hologram {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.92; transform: scale(1.02); }
}

/* ── Signal Panels ───────────────────────────────────────────── */
.signal-block,
.signal-archive-block {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.signal-block__hint,
.signal-archive-block__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.signal-block__strength {
  color: #67e8f9;
  font-weight: 700;
}

.signal-block__level {
  color: #a78bfa;
  font-weight: 700;
}

.signal-bar {
  height: 8px;
  background: var(--bg-deep);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.65rem;
}

.signal-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #64748b, #67e8f9, #34d399);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.archive-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.archive-tab {
  flex: 1;
  padding: 0.4rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
}

.archive-tab--active {
  color: #67e8f9;
  border-color: rgba(103, 232, 249, 0.45);
  background: rgba(103, 232, 249, 0.08);
}

.signal-item .archive-item__id {
  color: #67e8f9;
}

.signal-archive-list {
  max-height: 280px;
  overflow-y: auto;
}

/* ── Network Map ─────────────────────────────────────────────── */
.network-block {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.network-block__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.network-block__bonus {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #34d399;
  margin: 0.35rem 0 0.65rem;
}

.network-map {
  width: 100%;
  height: auto;
  max-height: 220px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
}

.network-map__line {
  stroke: var(--border);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.network-map__line--active {
  stroke: #67e8f9;
  stroke-dasharray: none;
  stroke-width: 2;
}

.network-map__node {
  fill: var(--bg-panel);
  stroke: var(--border);
  stroke-width: 2;
}

.network-map__node--discovered {
  stroke-width: 2.5;
}

.network-map__node--ally.network-map__node--discovered {
  fill: rgba(52, 211, 153, 0.25);
  stroke: #34d399;
}

.network-map__node--neutral.network-map__node--discovered {
  fill: rgba(148, 163, 184, 0.25);
  stroke: #94a3b8;
}

.network-map__node--unknown.network-map__node--discovered {
  fill: rgba(167, 139, 250, 0.25);
  stroke: #a78bfa;
}

.network-map__node--hostile.network-map__node--discovered {
  fill: rgba(248, 113, 113, 0.2);
  stroke: #f87171;
}

.network-map__node--locked {
  opacity: 0.45;
  stroke-dasharray: 3 2;
}

.network-map__label {
  fill: var(--text-secondary);
  font-size: 9px;
  font-family: var(--font-mono);
  text-anchor: middle;
}

.network-node-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 240px;
  overflow-y: auto;
}

.network-node-item {
  padding: 0.55rem 0.65rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.network-node-item--discovered {
  border-color: rgba(103, 232, 249, 0.35);
}

.network-node-item--locked {
  opacity: 0.6;
}

.network-node-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.network-node-item__name {
  font-size: 0.78rem;
  font-weight: 700;
}

.network-node-item__type {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.network-node-item__type--ally { color: #34d399; }
.network-node-item__type--neutral { color: #94a3b8; }
.network-node-item__type--unknown { color: #a78bfa; }
.network-node-item__type--hostile { color: #f87171; }

.network-node-item__status {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #67e8f9;
  margin-bottom: 0.15rem;
}

.network-node-item__desc {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}

.network-node-item__lore {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.4;
}

.network-node-item--discovered {
  cursor: pointer;
}

.network-node-item--selected {
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.25);
}

/* ── Node Diplomacy ─────────────────────────────────────────── */
.diplomacy-block--locked .diplomacy-block__hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.diplomacy-block__select-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.diplomacy-block__select {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  background: var(--bg-deep);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.diplomacy-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.diplomacy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.diplomacy-section__heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
  margin: 0 0 0.5rem;
}

.diplomacy-details__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
}

.diplomacy-details__label {
  color: var(--text-secondary);
}

.diplomacy-details__value {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.diplomacy-details__desc,
.diplomacy-details__personality {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin: 0.45rem 0 0;
  line-height: 1.45;
}

.diplomacy-details__personality {
  color: var(--text-muted);
  font-style: italic;
}

.diplomacy-relationship-list,
.diplomacy-mission-list,
.diplomacy-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.diplomacy-relationship-item {
  padding: 0.45rem 0.55rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.diplomacy-relationship-item--active {
  border-color: rgba(167, 139, 250, 0.45);
}

.diplomacy-relationship-item__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-bottom: 0.25rem;
}

.diplomacy-relationship-item__badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.diplomacy-relationship-item--hostile .diplomacy-relationship-item__badge { color: #f87171; }
.diplomacy-relationship-item--neutral .diplomacy-relationship-item__badge { color: #94a3b8; }
.diplomacy-relationship-item--friendly .diplomacy-relationship-item__badge { color: #34d399; }
.diplomacy-relationship-item--trusted .diplomacy-relationship-item__badge { color: #67e8f9; }
.diplomacy-relationship-item--allied .diplomacy-relationship-item__badge { color: #a78bfa; }

.diplomacy-relationship-item__bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.diplomacy-relationship-item__fill {
  height: 100%;
  background: linear-gradient(90deg, #67e8f9, #a78bfa);
  border-radius: 2px;
}

.diplomacy-relationship-item__value {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.diplomacy-mission-item {
  padding: 0.55rem 0.65rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.diplomacy-mission-item__title {
  font-size: 0.75rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}

.diplomacy-mission-item__desc,
.diplomacy-mission-item__meta {
  font-size: 0.67rem;
  color: var(--text-secondary);
  margin: 0 0 0.25rem;
  line-height: 1.4;
}

.diplomacy-mission-item__meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-muted);
}

.btn--diplomacy-mission {
  width: 100%;
  margin-top: 0.35rem;
  font-size: 0.68rem;
  padding: 0.35rem 0.5rem;
}

.diplomacy-mission-empty,
.diplomacy-history-empty {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.diplomacy-history-item {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.diplomacy-item.archive-item--unlocked {
  border-color: rgba(167, 139, 250, 0.35);
}

/* ── Operator Contact ─────────────────────────────────────────── */
.operators-block--locked .operators-block__hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.operators-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.operators-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.operators-section__heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  margin: 0 0 0.5rem;
}

.operator-record-list,
.operator-message-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.operator-record-item {
  padding: 0.55rem 0.65rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.operator-record-item--active { border-color: rgba(52, 211, 153, 0.4); }
.operator-record-item--offline { border-color: rgba(148, 163, 184, 0.35); }
.operator-record-item--lost { border-color: rgba(251, 191, 36, 0.35); }
.operator-record-item--deceased { border-color: rgba(248, 113, 113, 0.35); }
.operator-record-item--unknown { border-color: rgba(167, 139, 250, 0.35); }

.operator-record-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.operator-record-item__name {
  font-size: 0.75rem;
  font-weight: 700;
}

.operator-record-item__status {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  color: #fbbf24;
}

.operator-record-item__node {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #67e8f9;
  margin: 0 0 0.25rem;
}

.operator-record-item__message {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0 0 0.2rem;
  line-height: 1.4;
}

.operator-record-item__fate {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.operator-record-empty {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.operator-message-item__meta {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin: 0.15rem 0 0.25rem;
}

.operator-message-item__choices {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}

.operator-message-item__responded {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: #34d399;
  margin: 0.35rem 0 0;
}

.operator-message-item.archive-item--unlocked {
  border-color: rgba(251, 191, 36, 0.35);
}

.btn--operator {
  flex: 1;
  min-width: 4.5rem;
  font-size: 0.62rem;
  padding: 0.35rem 0.4rem;
  letter-spacing: 0.05em;
}

.btn--operator-help {
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

.btn--operator-ignore {
  border-color: rgba(148, 163, 184, 0.5);
  color: #94a3b8;
}

.btn--operator-investigate {
  border-color: rgba(103, 232, 249, 0.5);
  color: #67e8f9;
}

.modal__dialog--operator {
  max-width: 420px;
}

.modal__title--operator {
  color: #fbbf24;
}

.operator-contact__from {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #67e8f9;
  margin-bottom: 0.5rem;
}

.operator-contact__text {
  font-size: 0.8rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: 0.75rem;
  font-style: italic;
}

.operator-contact__hint {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.operator-contact__choices {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.operator-contact__choices .btn--operator {
  width: 100%;
  font-size: 0.72rem;
  padding: 0.5rem;
}

/* ── Network Conflict ─────────────────────────────────────────── */
.conflict-block--locked .conflict-block__hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.conflict-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.conflict-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.conflict-section__heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f87171;
  margin: 0 0 0.5rem;
}

.conflict-threat__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}

.conflict-threat__label {
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f87171;
}

.conflict-threat__value {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.conflict-threat__bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.conflict-threat__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.conflict-threat__fill--calm { background: #34d399; }
.conflict-threat__fill--unstable { background: #fbbf24; }
.conflict-threat__fill--threatened { background: #fb923c; }
.conflict-threat__fill--critical { background: #f87171; }
.conflict-threat__fill--war { background: linear-gradient(90deg, #ef4444, #f87171); }

.conflict-threat__path {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin: 0;
}

.conflict-defense {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.conflict-defense__value {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #67e8f9;
}

.conflict-defense__hint {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.conflict-war-log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 180px;
  overflow-y: auto;
}

.conflict-war-log__item {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  padding: 0.35rem 0.45rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.conflict-war-log__empty {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.conflict-item.archive-item--unlocked {
  border-color: rgba(248, 113, 113, 0.35);
}

.modal__dialog--war {
  max-width: 440px;
}

.modal__title--war {
  color: #f87171;
}

.war-response__attacker {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #f87171;
  margin-bottom: 0.45rem;
}

.war-response__desc {
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.war-response__defense {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: #67e8f9;
  margin-bottom: 0.35rem;
}

.war-response__hint {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.war-response__choices {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.btn--war {
  width: 100%;
  font-size: 0.72rem;
  padding: 0.5rem;
  letter-spacing: 0.05em;
}

.btn--war-negotiate {
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

.btn--war-defend {
  border-color: rgba(103, 232, 249, 0.5);
  color: #67e8f9;
}

.btn--war-attack {
  border-color: rgba(248, 113, 113, 0.55);
  color: #f87171;
}

.btn--war-ignore {
  border-color: rgba(148, 163, 184, 0.5);
  color: #94a3b8;
}

/* ── Trade Routes ─────────────────────────────────────────────── */
.trade-block--locked .trade-block__hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.trade-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.trade-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.trade-section__heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #34d399;
  margin: 0 0 0.5rem;
}

.trade-economy__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}

.trade-economy__label {
  color: var(--text-secondary);
}

.trade-economy__value {
  font-family: var(--font-mono);
  color: #34d399;
}

.trade-stability-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.trade-stability-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #67e8f9);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.trade-economy__path {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: #fbbf24;
  margin: 0 0 0.25rem;
}

.trade-economy__passive {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin: 0;
}

.trade-route-list,
.trade-route-log {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.trade-route-item {
  padding: 0.55rem 0.65rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.trade-route-item--active {
  border-color: rgba(52, 211, 153, 0.45);
}

.trade-route-item--building {
  border-color: rgba(251, 191, 36, 0.45);
}

.trade-route-item--disrupted {
  border-color: rgba(248, 113, 113, 0.45);
}

.trade-route-item__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.trade-route-item__title {
  font-size: 0.72rem;
  font-weight: 700;
}

.trade-route-item__status {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
  color: #34d399;
}

.trade-route-item--disrupted .trade-route-item__status {
  color: #f87171;
}

.trade-route-item--building .trade-route-item__status {
  color: #fbbf24;
}

.trade-route-item__package,
.trade-route-item__spec,
.trade-route-item__cost,
.trade-route-item__progress {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin: 0.1rem 0;
  line-height: 1.4;
}

.trade-route-item__cost {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.btn--trade-build,
.btn--trade-repair {
  width: 100%;
  margin-top: 0.4rem;
  font-size: 0.68rem;
  padding: 0.35rem 0.5rem;
}

.btn--trade-build {
  border-color: rgba(52, 211, 153, 0.5);
  color: #34d399;
}

.btn--trade-repair {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fbbf24;
}

.trade-route-empty,
.trade-route-log__empty {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.trade-route-log__item {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  padding: 0.3rem 0.4rem;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.trade-item.archive-item--unlocked {
  border-color: rgba(52, 211, 153, 0.35);
}

/* ── Legacy Protocol ──────────────────────────────────────────── */
.legacy-block--locked .legacy-block__hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.legacy-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.legacy-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legacy-section__heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a78bfa;
  margin: 0 0 0.5rem;
}

.legacy-timeline__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  margin-bottom: 0.2rem;
}

.legacy-timeline__label {
  color: var(--text-secondary);
}

.legacy-timeline__value {
  font-family: var(--font-mono);
  color: #c4b5fd;
}

.legacy-strength__value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #a78bfa;
}

.legacy-strength__max {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.legacy-strength__bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.4rem 0;
}

.legacy-strength__fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.legacy-strength__boni,
.legacy-strength__path {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}

.legacy-strength__path {
  color: #fbbf24;
}

.legacy-echo-list {
  max-height: 280px;
  overflow-y: auto;
}

.legacy-echo-item__type {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.legacy-echo-item--memory .legacy-echo-item__type { color: #67e8f9; }
.legacy-echo-item--warning .legacy-echo-item__type { color: #fbbf24; }
.legacy-echo-item--prediction .legacy-echo-item__type { color: #a78bfa; }
.legacy-echo-item--archive .legacy-echo-item__type { color: #34d399; }
.legacy-echo-item--unknown .legacy-echo-item__type { color: #94a3b8; }

.legacy-echo-item.archive-item--unlocked {
  border-color: rgba(167, 139, 250, 0.35);
}

/* ── The Memorial ─────────────────────────────────────────────── */
.memorial-block--locked .memorial-block__hint,
.memorial-block__progress {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0.2rem 0;
}

.memorial-section {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.memorial-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.memorial-section__heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f472b6;
  margin: 0 0 0.5rem;
}

.memorial-memory__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}

.memorial-memory__level {
  font-weight: 700;
  font-family: var(--font-mono);
  color: #f472b6;
}

.memorial-memory__value {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.memorial-memory__bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.memorial-memory__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
  background: linear-gradient(90deg, #be185d, #f472b6);
}

.memorial-memory__fill--forgotten { background: #64748b; }
.memorial-memory__fill--remembered { background: #94a3b8; }
.memorial-memory__fill--honored { background: #f472b6; }
.memorial-memory__fill--preserved { background: #e879f9; }
.memorial-memory__fill--immortalized {
  background: linear-gradient(90deg, #f472b6, #fbbf24);
}

.memorial-memory__meta,
.memorial-memory__ending {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin: 0.15rem 0 0;
}

.memorial-memory__ending {
  color: #fbbf24;
}

.memorial-entry-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.memorial-entry {
  display: flex;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.memorial-entry--immortalized { border-color: rgba(251, 191, 36, 0.45); }
.memorial-entry--preserved { border-color: rgba(232, 121, 249, 0.4); }
.memorial-entry--honored { border-color: rgba(244, 114, 182, 0.4); }

.memorial-entry__portrait {
  flex-shrink: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(244, 114, 182, 0.15);
  border: 1px solid rgba(244, 114, 182, 0.35);
  border-radius: var(--radius-sm);
  color: #f9a8d4;
}

.memorial-entry__body {
  flex: 1;
  min-width: 0;
}

.memorial-entry__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.15rem;
}

.memorial-entry__name {
  font-size: 0.75rem;
  font-weight: 700;
}

.memorial-entry__status {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
  color: #f472b6;
}

.memorial-entry__node {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  color: #67e8f9;
  margin: 0 0 0.2rem;
}

.memorial-entry__message {
  font-size: 0.67rem;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0 0 0.2rem;
  line-height: 1.4;
}

.memorial-entry__protocol {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

.memorial-fragment-item.archive-item--unlocked {
  border-color: rgba(244, 114, 182, 0.35);
}

/* ── Echo Resonance ──────────────────────────────────────────── */
.resonance-block__hint,
.resonance-block__progress {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.resonance-section {
  margin-bottom: 0.85rem;
}

.resonance-section__heading {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.resonance-section--actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.resonance-meter__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.resonance-meter__level {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #67e8f9;
}

.resonance-meter__value {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.resonance-meter__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.resonance-meter__fill {
  height: 100%;
  width: 0;
  transition: width 0.35s ease;
  background: linear-gradient(90deg, #0e7490, #22d3ee);
}

.resonance-meter__fill--stable {
  background: linear-gradient(90deg, #0891b2, #67e8f9);
}

.resonance-meter__fill--focused {
  background: linear-gradient(90deg, #06b6d4, #a5f3fc);
}

.resonance-meter__fill--harmonic {
  background: linear-gradient(90deg, #14b8a6, #5eead4);
}

.resonance-meter__fill--transcendent {
  background: linear-gradient(90deg, #2dd4bf, #fde047, #67e8f9);
  animation: grand-pulse 2s ease-in-out infinite;
}

.resonance-stats__row {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin: 0.2rem 0;
}

.resonance-fragment-item.archive-item--unlocked {
  border-color: rgba(103, 232, 249, 0.35);
}

.modal__dialog--echo-resonance,
.modal__dialog--echo-resonance-result {
  max-width: 480px;
}

.modal__title--echo-resonance {
  color: #67e8f9;
}

.echo-resonance-modal__type {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #22d3ee;
  margin-bottom: 0.35rem;
}

.echo-resonance-modal__prompt {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.55rem;
}

.echo-resonance-modal__timer {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

.echo-resonance-modal__sequence {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.echo-resonance-modal__token {
  min-width: 2.5rem;
  padding: 0.35rem 0.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(8, 47, 73, 0.55);
  color: #a5f3fc;
}

.echo-resonance-modal__feedback {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.echo-resonance-modal__choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.btn--resonance-choice {
  width: 100%;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 0.5rem;
  border-color: rgba(34, 211, 238, 0.35);
  color: #a5f3fc;
  background: rgba(8, 47, 73, 0.35);
}

.btn--resonance-choice:hover {
  border-color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
}

.echo-resonance-result__rating {
  font-size: 1.1rem;
  font-family: var(--font-mono);
  color: #67e8f9;
  text-align: center;
  margin-bottom: 0.45rem;
}

.echo-resonance-result__detail {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 0.75rem;
}

/* ── Grand Convergence ───────────────────────────────────────── */
.grand-block__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.grand-section {
  margin-bottom: 0.85rem;
}

.grand-section__heading {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.grand-universe__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.grand-universe__level {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: #c4b5fd;
}

.grand-universe__value {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.grand-universe__bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.grand-universe__fill {
  height: 100%;
  width: 0;
  transition: width 0.35s ease;
  background: linear-gradient(90deg, #6366f1, #a78bfa);
}

.grand-universe__fill--stabilizing {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.grand-universe__fill--unified {
  background: linear-gradient(90deg, #8b5cf6, #c4b5fd);
}

.grand-universe__fill--convergent {
  background: linear-gradient(90deg, #a855f7, #e879f9);
}

.grand-universe__fill--grand {
  background: linear-gradient(90deg, #f59e0b, #fde047, #a78bfa);
  animation: grand-pulse 2s ease-in-out infinite;
}

@keyframes grand-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.grand-universe__bonus {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin: 0;
}

.grand-progress-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.grand-progress-item {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.grand-progress-item--complete {
  color: #a78bfa;
}

.grand-fragment-item.archive-item--unlocked {
  border-color: rgba(167, 139, 250, 0.4);
}

.grand-credits__hint {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.modal__dialog--grand-convergence {
  max-width: 520px;
}

.modal__dialog--final-credits {
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal__title--grand-convergence,
.modal__title--final-credits {
  color: #c4b5fd;
}

.grand-convergence-modal__text {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.grand-convergence-modal__reward {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #a78bfa;
  margin-bottom: 0.75rem;
}

.final-credits__scroll {
  overflow-y: auto;
  flex: 1;
  margin-bottom: 0.65rem;
  padding-right: 0.25rem;
}

.final-credits__section {
  margin-bottom: 0.75rem;
}

.final-credits__section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a78bfa;
  margin-bottom: 0.35rem;
}

.final-credits__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.final-credits__list li {
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.final-credits__thanks {
  font-size: 0.75rem;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.65rem;
}

.modal__dialog--memorial,
.modal__dialog--memorial-ending {
  max-width: 440px;
}

.modal__title--memorial,
.modal__title--memorial-ending {
  color: #f472b6;
}

.memorial-choice__event {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: #f472b6;
  margin-bottom: 0.4rem;
}

.memorial-choice__desc,
.memorial-ending__text {
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.memorial-choice__hint {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.memorial-choice__choices {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.btn--memorial {
  width: 100%;
  font-size: 0.7rem;
  padding: 0.45rem;
  letter-spacing: 0.05em;
}

.btn--memorial-archive { border-color: rgba(148, 163, 184, 0.5); color: #94a3b8; }
.btn--memorial-share { border-color: rgba(52, 211, 153, 0.5); color: #34d399; }
.btn--memorial-preserve { border-color: rgba(244, 114, 182, 0.55); color: #f472b6; }
.btn--memorial-erase { border-color: rgba(248, 113, 113, 0.5); color: #f87171; }

.stats-row--network-bonus .stats-row__value--network {
  font-size: 0.75rem;
  color: #34d399;
}

/* ── Convergence Reactor Paths ───────────────────────────────── */
.reactor__core--convergence-architect {
  border-radius: 12%;
  border-color: #94a3b8;
  box-shadow: 0 0 60px rgba(148, 163, 184, 0.5), inset 0 0 40px rgba(148, 163, 184, 0.2);
  animation: architect-pulse 3s ease-in-out infinite;
}

.reactor__core--convergence-seeker {
  border-color: #a78bfa;
  background: radial-gradient(circle at 50% 40%, #2e1065, var(--bg-deep));
  box-shadow: 0 0 65px rgba(167, 139, 250, 0.55), inset 0 0 45px rgba(167, 139, 250, 0.25);
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  animation: seeker-shimmer 2.5s ease-in-out infinite;
}

.reactor__core--convergence-ascendant {
  border-color: transparent;
  background: radial-gradient(circle at 50% 50%, #fde047, #f472b6, var(--bg-deep));
  box-shadow: 0 0 80px rgba(253, 224, 71, 0.6), 0 0 120px rgba(244, 114, 182, 0.35);
  animation: ascendant-flow 1.5s ease-in-out infinite;
}

.reactor__core--convergence-hybrid {
  border-color: #67e8f9;
  background: conic-gradient(from 0deg, #1e3a5f, #4a1942, #1e3a5f, #2e4a1e, #1e3a5f);
  box-shadow: 0 0 70px rgba(103, 232, 249, 0.45);
  animation: hybrid-shift 4s linear infinite;
}

.reactor--convergence-architect .reactor__ring--outer {
  border-radius: 12%;
  border-color: rgba(148, 163, 184, 0.4);
}

.reactor--convergence-seeker .reactor__ring--outer {
  border-color: rgba(167, 139, 250, 0.45);
}

.reactor--convergence-ascendant .reactor__ring--outer,
.reactor--convergence-ascendant .reactor__ring--middle {
  border-color: rgba(253, 224, 71, 0.5);
}

.reactor--convergence-hybrid .reactor__ring--outer {
  border-color: rgba(103, 232, 249, 0.4);
}

@keyframes architect-pulse {
  0%, 100% { transform: rotate(0deg); }
  50%       { transform: rotate(2deg); }
}

@keyframes seeker-shimmer {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.2); }
}

@keyframes ascendant-flow {
  0%, 100% { box-shadow: 0 0 80px rgba(253, 224, 71, 0.6); }
  50%       { box-shadow: 0 0 100px rgba(244, 114, 182, 0.7); }
}

@keyframes hybrid-shift {
  to { filter: hue-rotate(360deg); }
}

/* ── Convergence & Endings Panels ──────────────────────────── */
.convergence-block {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.convergence-block__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.convergence-block__progress {
  color: #fde047;
  font-weight: 700;
}

.convergence-block__path {
  color: #a78bfa;
  font-weight: 700;
}

.convergence-block__path-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0.35rem 0 0.5rem;
}

.convergence-bar {
  height: 8px;
  background: var(--bg-deep);
  border-radius: 4px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.convergence-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #fde047, #f472b6, #a78bfa);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.endings-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.endings-item {
  padding: 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.endings-item--completed {
  border-color: rgba(253, 224, 71, 0.4);
}

.endings-item--locked {
  opacity: 0.65;
}

.endings-item__header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.endings-item__name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #a78bfa;
}

.endings-item__status {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.endings-item--completed .endings-item__status {
  color: #34d399;
}

.endings-item__title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fde047;
  margin-bottom: 0.2rem;
}

.endings-item__text {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.modal__dialog--chain {
  max-width: 440px;
  border-color: rgba(167, 139, 250, 0.35);
}

.modal__title--chain {
  color: #a78bfa;
}

.chain-modal__step {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0.5rem;
}

.chain-modal__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
  margin-bottom: 1.25rem;
}

.chain-modal__options {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn--chain-option {
  width: 100%;
  text-align: left;
  font-size: 0.8rem;
  padding: 0.75rem 1rem;
}

.modal__dialog--ending {
  max-width: 500px;
  border-color: rgba(253, 224, 71, 0.45);
}

.ending-modal__path {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a78bfa;
  text-align: center;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
}

.modal__title--ending {
  color: #fde047;
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

.ending-modal__text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.btn--new-existence {
  background: linear-gradient(135deg, rgba(253, 224, 71, 0.2), rgba(167, 139, 250, 0.2));
  border-color: rgba(253, 224, 71, 0.5);
}

/* ── Core Decisions Panel ────────────────────────────────────── */
.decisions-block,
.personality-block {
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.decisions-block__hint,
.personality-block__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.decisions-block__intro {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}

.decision-history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 220px;
  overflow-y: auto;
}

.decision-history__item {
  padding: 0.55rem 0.65rem;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.decision-history__item--empty {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-style: italic;
}

.decision-history__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
}

.decision-history__name {
  font-size: 0.78rem;
  font-weight: 700;
}

.decision-history__time {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.decision-history__choice {
  font-size: 0.7rem;
  color: #67e8f9;
  margin-bottom: 0.15rem;
}

.decision-history__outcome {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.personality-block__dominant {
  color: #a78bfa;
  font-weight: 700;
}

.personality-list {
  list-style: none;
  padding: 0;
  margin: 0.65rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.personality-trait {
  display: grid;
  grid-template-columns: 5.5rem 1fr 2rem;
  align-items: center;
  gap: 0.45rem;
}

.personality-trait__label {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.personality-bar {
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
}

.personality-bar__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.personality-bar__fill--obedient { background: #60a5fa; }
.personality-bar__fill--curious { background: #a78bfa; }
.personality-bar__fill--efficient { background: #34d399; }
.personality-bar__fill--independent { background: #f472b6; }
.personality-bar__fill--transcendent { background: #fde047; }

.personality-trait__value {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  text-align: right;
  color: var(--text-muted);
}

.stats-row--decision-effects .stats-row__value--decision {
  font-size: 0.75rem;
  color: #67e8f9;
}

.modal__dialog--decision {
  max-width: 440px;
  border-color: rgba(103, 232, 249, 0.35);
}

.modal__title--decision {
  color: #67e8f9;
  letter-spacing: 0.06em;
}

.decision-modal__name {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.decision-modal__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  text-align: center;
  margin-bottom: 1.25rem;
}

.decision-modal__choices {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.btn--decision {
  width: 100%;
  text-align: left;
  font-size: 0.78rem;
  line-height: 1.4;
  padding: 0.75rem 1rem;
}

.btn--decision-approve {
  border-color: rgba(52, 211, 153, 0.45);
}

.btn--decision-approve:hover {
  border-color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.btn--decision-deny {
  border-color: rgba(248, 113, 113, 0.45);
}

.btn--decision-deny:hover {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

/* ── Alignment Modal ─────────────────────────────────────────── */
.modal__dialog--alignment {
  max-width: 420px;
  border-color: rgba(167, 139, 250, 0.35);
}

.modal__title--alignment {
  color: #a78bfa;
}

.alignment-modal__desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  text-align: center;
}

.alignment-choices {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.alignment-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: var(--font-sans);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.alignment-choice:hover {
  box-shadow: 0 0 16px var(--accent-glow);
}

.alignment-choice--engineer:hover {
  border-color: var(--accent);
}

.alignment-choice--scientist:hover {
  border-color: #a78bfa;
}

.alignment-choice--autonomous:hover {
  border-color: var(--warning);
}

.alignment-choice__name {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.alignment-choice__bonus {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── System Log ────────────────────────────────────────────── */
.system-log {
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.system-log__item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

.system-log__item--empty {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

.system-log__time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.system-log__message {
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ── Event Modal ───────────────────────────────────────────── */
.modal__dialog--event {
  border-color: rgba(245, 158, 11, 0.35);
}

.modal__title--event {
  color: var(--warning);
}

.event-modal__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.event-modal__reward {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-bright);
  text-align: center;
  padding: 0.65rem;
  margin-bottom: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* ── Prestige ──────────────────────────────────────────────── */
.prestige-block {
  padding: 0.85rem;
  margin-bottom: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.prestige__hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.stats-row__value--rp {
  color: #f472b6;
}

.btn--prestige {
  width: 100%;
  padding: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.45);
}

.btn--prestige:hover {
  background: rgba(244, 114, 182, 0.12);
  border-color: #f472b6;
}

/* ── Research Tree ─────────────────────────────────────────── */
.research-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.research-tree__line {
  width: 2px;
  height: 18px;
  background: linear-gradient(180deg, var(--border), var(--accent));
  flex-shrink: 0;
}

.research-tree__line--top {
  height: 10px;
  background: var(--border);
}

.research-node {
  width: 100%;
  padding: 0.85rem;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.research-node::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 2px solid var(--border);
}

.research-tree > .research-node:first-of-type::before {
  display: none;
}

.research-node--locked {
  opacity: 0.55;
}

.research-node--available {
  opacity: 1;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: 0 0 16px var(--accent-glow);
}

.research-node--available::before {
  border-color: var(--accent);
  background: var(--accent);
}

.research-node--purchased {
  opacity: 0.65;
  border-color: var(--success);
}

.research-node--purchased::before {
  border-color: var(--success);
  background: var(--success);
}

.research-node__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.research-node__name {
  font-size: 0.875rem;
  font-weight: 600;
}

.research-node__cost {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #f472b6;
}

.research-node__desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.btn--research {
  width: 100%;
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
  font-size: 0.75rem;
}

.research-node--available .btn--research:not(:disabled) {
  color: var(--accent-bright);
  border-color: rgba(59, 130, 246, 0.45);
}

.btn--research:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.stats-block--lifetime {
  margin-bottom: 0;
}

/* ── Settings ──────────────────────────────────────────────── */
.save-panel__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.save-panel__version {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.45);
}

.save-panel__version-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.75rem;
  font-family: var(--font-mono);
}

.save-panel__label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.save-panel__value {
  color: var(--text-primary);
}

.save-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.save-panel__actions .btn--secondary {
  width: 100%;
}

.settings__version {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.settings__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 0.75rem 1.5rem;
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .game-column {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .dashboard__panes {
    grid-template-columns: 1fr;
  }

  .dashboard__resources .panel--resources-compact .stats-block {
    grid-template-columns: repeat(2, 1fr);
  }

  .panel--achievements,
  .panel--memorial-wall,
  .panel--network,
  .panel--grand-convergence {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 0.65rem 1rem;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    height: auto;
    min-height: var(--header-h);
    row-gap: 0.45rem;
    column-gap: 0.5rem;
  }

  .header__brand {
    grid-column: 1;
    grid-row: 1;
  }

  .header__nav {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    gap: 0.25rem;
  }

  .header__game-link,
  .header__guide-link {
    font-size: 0.58rem;
    padding: 0.2rem 0.4rem;
  }

  .header__guide-link {
    grid-column: unset;
    justify-self: unset;
  }

  .header__status {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  .header--guide,
  .header--guide-page {
    flex-wrap: wrap;
  }

  .header--guide-page {
    grid-template-columns: 1fr auto;
  }

  .header--guide-page .header__nav {
    grid-column: 2;
    grid-row: 1;
  }

  .guide-page__title,
  .guide-page__title--compact {
    order: unset;
    flex: unset;
    text-align: left;
  }

  .header__subtitle {
    display: none;
  }

  .main {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .dashboard__resources .panel--resources-compact .stats-block {
    grid-template-columns: 1fr 1fr;
  }

  .panel--game {
    min-height: 360px;
  }

  .reactor {
    width: 200px;
    height: 200px;
  }

  .reactor__core {
    width: 110px;
    height: 110px;
  }

  .reactor__power {
    font-size: 1.35rem;
  }
}
