/* ==========================================================================
   Simulador 3D de bomba atómica — Fijate Tools
   Tema oscuro corporativo por defecto (:root / [data-theme="dark"]) y soporte [data-theme="light"]
   ========================================================================== */

:root,
[data-theme="dark"] {
  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --bg-page: #090d16;
  --bg-card: #111827;
  --bg-card-subtle: #162033;
  --bg-input: #0b1220;
  --border-color: #273549;
  --border-focus: #f97316;

  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --primary: #f97316;
  --primary-color: #f97316;
  --primary-hover: #ea580c;
  --primary-light: rgba(249, 115, 22, 0.14);

  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --accent-yellow: #eab308;
  --accent-green: #10b981;
  --accent-cyan: #38bdf8;
  --accent-purple: #a855f7;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 14px 35px -10px rgba(0, 0, 0, 0.55);

  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

[data-theme="light"] {
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-subtle: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #cbd5e1;
  --border-focus: #ea580c;

  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #475569;

  --primary: #ea580c;
  --primary-color: #ea580c;
  --primary-hover: #c2410c;
  --primary-light: rgba(234, 88, 12, 0.10);

  --shadow-card: 0 8px 25px -5px rgba(15, 23, 42, 0.08);
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.55;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-title,
.section-title {
  font-family: var(--font-heading);
}

.text-mono,
code {
  font-family: var(--font-mono);
}

.tool-layout {
  max-width: 1320px;
  width: 100%;
  margin: 1.25rem auto 3rem;
  padding: 0 1rem;
  flex: 1 0 auto;
}

.tool-main-content {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Banner de contexto educativo y rigor científico */
.educational-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.educational-disclaimer svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}

.educational-disclaimer-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.educational-disclaimer-main {
  margin: 0;
  color: var(--text-main);
  line-height: 1.5;
}

.educational-disclaimer-reflection {
  margin: 0;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.87rem;
  line-height: 1.5;
}

/* Tarjeta principal del simulador 3D */
.sim-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.sim-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.25rem;
  background: var(--bg-card-subtle);
  border-bottom: 1px solid var(--border-color);
}

.sim-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.sim-title-wrap h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.sim-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(249, 115, 22, 0.28);
}

.sim-header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.btn-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-tool-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-tool-icon.is-active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* Visor WebGL 3D */
.viewport-wrapper {
  position: relative;
  width: 100%;
  height: clamp(360px, 56vh, 600px);
  background: #060911;
  overflow: hidden;
  user-select: none;
}

#nuclear-viewport-container {
  width: 100%;
  height: 100%;
  position: relative;
  touch-action: none;
}

#nuclear-viewport-container canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

/* HUD flotante limpio */
.hud-top-bar {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  pointer-events: none;
  z-index: 4;
}

.hud-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hud-pill {
  background: rgba(9, 13, 22, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  color: #f8fafc;
  min-width: 108px;
}

.hud-pill-label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  line-height: 1.1;
}

.hud-pill-val {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 2px;
}

.hud-phase-badge {
  background: rgba(9, 13, 22, 0.84);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(249, 115, 22, 0.45);
  color: #fdba74;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-bottom-bar {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  pointer-events: none;
  z-index: 4;
}

.hud-cam-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  pointer-events: auto;
  background: rgba(9, 13, 22, 0.76);
  backdrop-filter: blur(8px);
  padding: 0.3rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.btn-cam-mode {
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  font-family: var(--font-main);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.36rem 0.62rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cam-mode:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-cam-mode.active {
  background: #f97316;
  color: #0b0f17;
}

.hud-sound-status {
  pointer-events: auto;
  background: rgba(9, 13, 22, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 0.42rem 0.75rem;
  font-size: 0.78rem;
  color: #e2e8f0;
  font-family: var(--font-mono);
}

/* Barra de reproducción temporal */
.timeline-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.25rem;
  background: var(--bg-card-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.btn-detonate-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-detonate-main:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

.btn-secondary-ctrl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 42px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary-ctrl:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.timeline-scrub-wrap {
  flex: 1 1 240px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.timeline-scrub-wrap input[type="range"] {
  flex: 1 1 0%;
  min-width: 0;
}

.timeline-time-tag {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 78px;
  text-align: right;
}

/* Consola de parámetros físicos */
.controls-panel {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.preset-strip {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.preset-strip-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.preset-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-preset-pill {
  min-height: 38px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset-pill:hover {
  border-color: var(--primary);
  color: var(--text-main);
}

.btn-preset-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.preset-summary-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.control-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.control-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.control-row-head label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}

.control-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.15rem 0.48rem;
  border-radius: 6px;
  white-space: nowrap;
}

.input-inline-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.input-number,
.input-text,
.select-styled {
  min-height: 40px;
  background-color: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.input-number {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  font-family: var(--font-mono);
}

.select-styled {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  appearance: none;
  -webkit-appearance: none;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.select-styled option {
  background-color: var(--bg-card);
  color: var(--text-main);
}

.input-number:focus,
.input-text:focus,
.select-styled:focus {
  border-color: var(--border-focus);
}

input[type="range"].range-styled {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  height: 6px;
}

.btn-micro-link {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 6px;
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  white-space: nowrap;
}

.btn-micro-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.toggle-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scenario-btn-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.btn-scenario {
  min-height: 40px;
  padding: 0.45rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-scenario.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.check-chip input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Matriz de radios físicos calculados */
.effects-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.effect-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--effect-color, var(--primary));
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.effect-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.effect-card-metric {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.effect-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Sección Cartografía Real (Leaflet Satélite) */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.35rem;
}

.section-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-card-header h2 {
  margin: 0 0 0.25rem 0;
  font-size: 1.28rem;
  color: var(--text-main);
}

.section-card-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
  align-items: center;
}

.map-search-form {
  display: flex;
  flex: 1 1 280px;
  gap: 0.5rem;
  min-width: 0;
}

.map-search-form .input-text {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
}

.quick-cities-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.btn-city-chip {
  min-height: 34px;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-city-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.leaflet-map-box {
  width: 100%;
  height: 490px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.gz-pin-dot {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.42);
}

.map-legend-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Módulo Enciclopédico Interactivo */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
  margin-bottom: 1.25rem;
}

.btn-tab {
  min-height: 40px;
  padding: 0.48rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card-subtle);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.phases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.phase-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.phase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.45rem;
}

.phase-num {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.84rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
}

.phase-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.phase-card h3 {
  margin: 0 0 0.45rem 0;
  font-size: 1rem;
  color: var(--text-main);
}

.phase-card p {
  margin: 0 0 0.5rem 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

.effects-detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.effect-detail-block {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--block-color, var(--primary));
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.effect-detail-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.effect-detail-top h3 {
  margin: 0;
  font-size: 1.02rem;
  color: var(--text-main);
}

.effect-detail-top span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.effect-detail-block ul {
  margin: 0.45rem 0 0 1.2rem;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.effect-detail-block li+li {
  margin-top: 0.32rem;
}

.formula-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--text-main);
  overflow-x: auto;
  margin-top: 1rem;
}

.table-responsive-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  min-width: 640px;
}

.data-table th,
.data-table td {
  padding: 0.72rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: top;
}

.data-table th {
  background: var(--bg-card-subtle);
  color: var(--text-main);
  font-weight: 700;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-left: 2px solid var(--primary);
  padding-left: 1.15rem;
  margin-left: 0.35rem;
}

.timeline-entry {
  position: relative;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.timeline-entry::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 1.05rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-card);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}

.timeline-entry h4 {
  margin: 0.18rem 0 0.35rem 0;
  font-size: 0.98rem;
  color: var(--text-main);
}

.timeline-entry p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
}

/* Pestaña Conciencia y reflexión */
.awareness-intro-box {
  background: var(--primary-light);
  border: 1px solid rgba(249, 115, 22, 0.32);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.1rem;
  margin-bottom: 1.1rem;
  font-size: 0.91rem;
  color: var(--text-main);
  line-height: 1.55;
}

.awareness-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.awareness-card {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.awareness-tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.16rem 0.52rem;
  border-radius: 6px;
}

.awareness-card h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-main);
}

.awareness-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.seo-callout-reflection {
  border-left-color: var(--accent-red);
}

.seo-callout-reflection .seo-callout-icon {
  color: var(--accent-red);
}

/* Modales */
.nuke-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 900;
}

.nuke-modal-backdrop.is-open {
  display: flex;
}

.nuke-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}

.nuke-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.nuke-modal-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-main);
}

.btn-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-main);
  font-size: 1.25rem;
  cursor: pointer;
}

.nuke-modal-body {
  padding: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.snapshot-preview-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  display: block;
}

.nuke-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--border-color);
}

/* Notificación inline / toast no intrusiva */
.status-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  color: var(--text-main);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  font-size: 0.86rem;
  font-weight: 600;
  z-index: 950;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

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

/* Responsive Móvil y Tablet */
@media (max-width: 1024px) {

  .controls-grid,
  .effects-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .tool-layout {
    padding: 0 0.75rem;
    margin-top: 0.85rem;
  }

  .educational-disclaimer {
    padding: 0.6rem 0.75rem;
    gap: 0.55rem;
    font-size: 0.79rem;
    line-height: 1.38;
  }

  .sim-card-header,
  .timeline-bar,
  .controls-panel,
  .section-card {
    padding: 0.8rem;
  }

  .sim-card-header {
    gap: 0.55rem;
  }

  .sim-title-wrap h2 {
    font-size: 1rem;
  }

  .sim-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 42px 42px;
    gap: 0.4rem;
  }

  .sim-header-actions .btn-tool-icon {
    min-height: 40px;
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .viewport-wrapper {
    display: flex;
    flex-direction: column;
    height: auto;
  }

  #nuclear-viewport-container {
    order: 2;
    height: 310px;
  }

  .hud-top-bar {
    position: static;
    order: 1;
    padding: 0.48rem 0.55rem;
    background: var(--bg-card-subtle);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    pointer-events: auto;
  }

  .hud-kpi-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .hud-pill {
    min-width: 0;
    padding: 0.28rem 0.5rem;
  }

  .hud-pill-val {
    font-size: 0.8rem;
  }

  .hud-phase-badge {
    font-size: 0.74rem;
    text-align: center;
    padding: 0.32rem 0.6rem;
  }

  .hud-bottom-bar {
    position: static;
    order: 3;
    padding: 0.48rem 0.55rem;
    background: var(--bg-card-subtle);
    border-top: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    pointer-events: auto;
  }

  .hud-cam-group {
    justify-content: center;
  }

  .btn-cam-mode {
    font-size: 0.72rem;
    padding: 0.34rem 0.48rem;
    min-height: 34px;
  }

  .hud-sound-status {
    text-align: center;
    font-size: 0.72rem;
  }

  .controls-grid,
  .effects-kpi-grid,
  .awareness-grid {
    grid-template-columns: 1fr;
  }

  .btn-detonate-main,
  .btn-secondary-ctrl,
  .btn-tab,
  .map-search-form button {
    width: 100%;
    min-height: 44px;
  }

  .map-search-form {
    flex-direction: column;
  }

  .map-search-form .input-text {
    width: 100%;
    flex: none;
  }

  .leaflet-map-box {
    height: 380px;
  }

  .scenario-btn-group {
    grid-template-columns: 1fr;
  }
}