/* ============================================================
   APEX WATCH — Apocalypse Alert Dashboard
   Dark cyberpunk monitoring aesthetic
   ============================================================ */

:root {
  --bg-primary: #03040d;
  --bg-secondary: #070b1a;
  --bg-panel: #0a0f24;
  --bg-panel-hover: #0d1530;
  --accent-green: #00ff88;
  --accent-blue: #00ccff;
  --accent-yellow: #ffdd00;
  --accent-orange: #ff8800;
  --accent-red: #ff0044;
  --text-primary: #e0e8ff;
  --text-secondary: #7090b0;
  --text-dim: #3a4a6a;
  --border: #1a2a4a;
  --border-bright: #2a4a8a;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
  --font-ui: 'Rajdhani', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCAN LINE & NOISE OVERLAY ── */
.scanline {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.05) 2px,
    rgba(0,0,0,0.05) 4px
  );
  pointer-events: none; z-index: 9999; animation: scanMove 8s linear infinite;
}
@keyframes scanMove { from { background-position: 0 0; } to { background-position: 0 400px; } }

.noise {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 9998; opacity: 0.4;
}

/* ── HEADER ── */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px;
  background: rgba(7,11,26,0.95);
  border-bottom: 1px solid var(--border-bright);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(10px);
}

.logo-block {
  display: flex; align-items: center; gap: 10px;
}
.logo-icon {
  font-size: 24px; color: var(--accent-red);
  animation: logoPulse 2s ease-in-out infinite;
}
@keyframes logoPulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }

.logo-text {
  font-family: var(--font-ui);
  font-size: 22px; font-weight: 700; letter-spacing: 4px;
  color: var(--text-primary);
}
.logo-text .accent { color: var(--accent-red); }

.subtitle {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--text-secondary);
  margin-top: 2px; letter-spacing: 1px;
}

.header-right { display: flex; align-items: center; gap: 16px; }

.live-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,0,68,0.15);
  border: 1px solid var(--accent-red);
  padding: 4px 10px; border-radius: 2px;
  font-family: var(--font-mono); font-size: 11px; color: var(--accent-red);
  letter-spacing: 2px;
}
.dot {
  width: 6px; height: 6px; background: var(--accent-red);
  border-radius: 50%; animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }

.timestamp {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-blue); letter-spacing: 1px;
}

/* ── ALERT BANNER ── */
.alert-banner {
  background: linear-gradient(90deg, rgba(255,0,68,0.08), rgba(255,136,0,0.08));
  border-bottom: 1px solid rgba(255,0,68,0.3);
  padding: 8px 24px;
  display: flex; align-items: center;
}
.alert-text {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-orange); letter-spacing: 1px;
  animation: textGlow 3s ease-in-out infinite;
}
@keyframes textGlow {
  0%,100%{ text-shadow: 0 0 4px rgba(255,136,0,0.5); }
  50%{ text-shadow: 0 0 12px rgba(255,136,0,0.9); }
}

/* ── TOP ROW: LEFT-PANEL + MAP 1:3 ── */
.top-row {
  display: grid;
  grid-template-columns: 1fr 3fr;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  min-height: max(780px, calc(100vh - 120px));
}

/* ── SPECIAL PAGE ── */
.special-page {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.special-hero {
  background: linear-gradient(135deg, rgba(255,0,68,0.16), rgba(0,204,255,0.08));
  border: 1px solid var(--border-bright);
  padding: 24px;
  border-radius: 6px;
}
.special-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-red);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.special-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.special-subtitle {
  color: var(--text-secondary);
  max-width: 900px;
  line-height: 1.7;
}
.special-hero-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.special-badge {
  padding: 6px 10px;
  border: 1px solid rgba(0,255,136,0.3);
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
}
.special-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.special-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.special-card {
  background: rgba(10,15,36,0.95);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 6px;
}
.special-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--accent-blue);
}
.card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent-red);
  margin-bottom: 6px;
}
.special-card-highlight {
  background: linear-gradient(135deg, rgba(255,0,68,0.12), rgba(0,204,255,0.07));
  border-color: rgba(255,0,68,0.35);
}
.special-card ul {
  padding-left: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
}
.signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.signal-pill {
  padding: 6px 8px;
  border: 1px solid rgba(255,221,0,0.35);
  color: var(--accent-yellow);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
}
.data-table th, .data-table td {
  border: 1px solid var(--border);
  padding: 8px;
  text-align: left;
}
.data-table th {
  color: var(--accent-red);
  background: rgba(255,0,68,0.08);
}
.special-link-btn {
  color: var(--accent-blue);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  border: 1px solid rgba(0,204,255,0.3);
  padding: 6px 10px;
  border-radius: 3px;
}
.special-link-btn:hover {
  background: rgba(0,204,255,0.08);
}
.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  border-radius: 3px;
}
.status-info {
  color: var(--accent-blue);
  border: 1px solid rgba(0,204,255,0.35);
  background: rgba(0,204,255,0.08);
}
.status-ok {
  color: var(--accent-green);
  border: 1px solid rgba(0,255,136,0.35);
  background: rgba(0,255,136,0.08);
}
.mini-panel {
  border: 1px solid var(--border);
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}
.mini-title {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.weather-item, .quake-item {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.weather-item:last-child, .quake-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.weather-city {
  font-weight: 700;
  color: var(--text-primary);
}
.weather-temp {
  color: var(--accent-yellow);
  font-size: 18px;
  font-weight: 700;
}
.weather-sub, .quake-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
}
.quake-place {
  color: var(--text-primary);
  margin-top: 2px;
  font-size: 12px;
}
.space-weather-summary {
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.6;
}
.muted {
  color: var(--text-secondary);
  font-size: 12px;
}

@media (max-width: 900px) {
  .special-grid,
  .special-grid-two {
    grid-template-columns: 1fr;
  }
  .special-title {
    font-size: 24px;
  }
}

/* ── LEFT PANEL: flex column, meter top / youtube bottom ── */
.left-panel {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  min-width: 0;
}

/* ── THREAT METER ── */
.threat-section {
  flex: 0.9;
  padding: 16px 20px 10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.threat-container {
  width: 100%; text-align: center;
}
.threat-label-top {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-secondary); letter-spacing: 3px;
  margin-bottom: 6px;
}
.threat-meter-wrap { position: relative; }
.arc-svg { width: 100%; max-width: 220px; }
.threat-score-block { margin-top: -8px; }
.score-value {
  font-family: var(--font-mono); font-size: 42px; font-weight: 700;
  color: var(--accent-red);
  text-shadow: 0 0 20px rgba(255,0,68,0.6);
  line-height: 1;
  animation: scoreGlow 2s ease-in-out infinite;
}
@keyframes scoreGlow {
  0%,100%{ text-shadow: 0 0 20px rgba(255,0,68,0.4); }
  50%{ text-shadow: 0 0 40px rgba(255,0,68,0.9), 0 0 80px rgba(255,0,68,0.3); }
}
.score-label {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  letter-spacing: 2px; margin-top: 2px;
}
.threat-sublabels {
  display: flex; justify-content: space-between;
  margin-top: 6px; padding: 0 4px;
  font-family: var(--font-mono); font-size: 9px;
  align-items: flex-start;
}
.threat-sublabels span { text-align: center; line-height: 1.3; }
.sub-ok { color: var(--accent-green); }
.sub-warn { color: var(--accent-yellow); }
.sub-danger { color: var(--accent-orange); }
.sub-critical { color: var(--accent-red); }
.sub-en { font-size: 7px; opacity: 0.7; letter-spacing: 0.5px; }

/* ── YOUTUBE LIVE PANEL ── */
.news-live-panel {
  flex: 1.1;
  display: flex; flex-direction: column;
  background: #020810;
  min-height: 0;
}
.news-live-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent-red); letter-spacing: 3px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,0,68,0.06);
}
.news-live-iframes {
  display: flex; flex-direction: column;
  flex: 1; gap: 1px; background: var(--border);
}
.yt-embed-wrap {
  flex: 1; display: flex; flex-direction: column;
  background: #010509; min-height: 0;
}
.yt-embed-label {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-secondary); padding: 4px 10px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
  letter-spacing: 1px; flex-shrink: 0;
}
.yt-iframe {
  flex: 1; width: 100%; border: none;
  display: block; min-height: 0;
}
.yt-loading {
  flex: 1; display: flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-secondary);
}
.yt-loading-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-red);
  animation: blink 0.8s step-end infinite;
  display: inline-block;
}
.yt-error {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; padding: 12px;
  background: rgba(255,0,68,0.04);
}
.yt-error-icon {
  font-size: 20px; color: var(--accent-red); opacity: 0.5;
}
.yt-error-msg {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-secondary); text-align: center;
}
.yt-error-link {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent-red); text-decoration: none;
  border: 1px solid rgba(255,0,68,0.4);
  padding: 4px 10px; border-radius: 2px;
  transition: background 0.2s;
}
.yt-error-link:hover { background: rgba(255,0,68,0.1); }
.yt-retry-btn {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent-orange); background: transparent;
  border: 1px solid rgba(255,136,0,0.5);
  padding: 4px 14px; border-radius: 2px;
  cursor: pointer; letter-spacing: 1px;
  transition: background 0.2s;
}
.yt-retry-btn:hover { background: rgba(255,136,0,0.15); }

/* ── LOGO ── */
.logo-text { font-size: 22px !important; letter-spacing: 4px !important; }

/* ── DASHBOARD GRID ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: var(--border);
  margin: 0;
}

@media (min-width: 1200px) {
  html, body {
    font-size: 12px;
  }
  .site-header {
    padding: 10px 16px;
  }
  .alert-banner {
    padding: 6px 16px;
  }
  .section-nav {
    top: 48px;
    padding: 0 10px;
  }
  .top-row {
    min-height: 420px;
  }
  .threat-section {
    padding: 10px 12px 6px;
  }
  .arc-svg {
    max-width: 190px;
  }
  .news-live-panel {
    min-height: 220px;
  }
  .map-container {
    min-height: 380px;
  }
  .map-header-row {
    font-size: 10px;
    gap: 6px;
  }
  .dashboard-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 0.5px;
  }
  .panel {
    padding: 12px;
  }
  .panel-header {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  .panel-score {
    font-size: 22px;
  }
  .panel-bar-wrap {
    height: 5px;
  }
  .panel-note {
    font-size: 8px;
  }
  .indicator-row {
    padding: 3px 0;
  }
  .ind-label {
    font-size: 9px;
  }
  .ind-value {
    font-size: 10px;
  }
  .ind-arrow {
    min-width: 14px;
  }
  .score-label,
  .panel-title,
  .threat-label-top {
    font-size: 11px;
  }
  .map-legend { gap: 8px; }
  .cyber-legend { font-size: 7px; gap: 6px; }
  .cyber-intel-src { font-size: 7px; }
}

@media (min-width: 1600px) {
  html, body {
    font-size: 12px;
  }
  .dashboard-grid {
    grid-template-columns: repeat(5, minmax(200px, 1fr));
  }
  .top-row {
    min-height: 400px;
  }
  .map-container {
    min-height: 340px;
  }
  .news-live-panel {
    min-height: 200px;
  }
  .arc-svg {
    max-width: 170px;
  }
}

@media (min-width: 1920px) {
  .dashboard-grid {
    grid-template-columns: repeat(6, minmax(200px, 1fr));
  }
  .top-row {
    min-height: 360px;
  }
  .map-container {
    min-height: 320px;
  }
  .news-live-panel {
    min-height: 180px;
  }
  .arc-svg {
    max-width: 150px;
  }
}

.panel {
  background: var(--bg-panel);
  padding: 18px;
  transition: background 0.2s;
}
.panel:hover { background: var(--bg-panel-hover); }

.panel-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.panel-icon { color: var(--accent-blue); font-size: 16px; }
.panel-title {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  letter-spacing: 2px; color: var(--text-primary); flex: 1;
}
.panel-status {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent-yellow); letter-spacing: 1px;
  padding: 2px 6px; border: 1px solid rgba(255,221,0,0.3);
  border-radius: 2px;
}
.panel-status.ok { color: var(--accent-green); border-color: rgba(0,255,136,0.3); }
.panel-status.warn { color: var(--accent-orange); border-color: rgba(255,136,0,0.3); }
.panel-status.danger { color: var(--accent-red); border-color: rgba(255,0,68,0.3); }

.panel-score-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 14px;
}
.panel-score {
  font-family: var(--font-mono); font-size: 32px;
  color: var(--accent-yellow); min-width: 60px;
  text-shadow: 0 0 10px rgba(255,221,0,0.4);
}
.panel-bar-wrap {
  flex: 1; height: 6px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}
.panel-bar {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-green), var(--accent-yellow), var(--accent-orange), var(--accent-red));
  transition: width 1.5s ease;
}

.indicator-row {
  display: flex; align-items: center;
  padding: 5px 0; border-bottom: 1px solid rgba(26,42,74,0.5);
}
.indicator-row:last-child { border-bottom: none; }
.ind-label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-secondary); flex: 1;
}
.ind-value {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-primary); margin-right: 8px;
}
.ind-arrow {
  font-size: 12px; min-width: 20px; text-align: right;
  color: var(--text-dim);
}
.ind-arrow.up { color: var(--accent-red); animation: arrowPulse 2s ease infinite; }
@keyframes arrowPulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }
.ind-arrow.danger {
  color: var(--accent-red); font-weight: bold; font-size: 14px;
  animation: dangerFlash 0.5s step-end infinite;
}
@keyframes dangerFlash { 0%,100%{opacity:1;} 50%{opacity:0;} }

.panel-note {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); margin-top: 10px; letter-spacing: 0.5px;
}

/* ── NEWS SECTION ── */
.news-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.news-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
}
.news-title {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-blue); letter-spacing: 2px;
}
.news-refresh {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-secondary);
}

.news-ticker-wrap {
  background: rgba(0,204,255,0.05);
  border-bottom: 1px solid var(--border);
  overflow: hidden; padding: 8px 0;
}
.news-ticker {
  display: flex; gap: 40px;
  white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
}
@keyframes tickerScroll {
  from { transform: translateX(100vw); }
  to { transform: translateX(-100%); }
}
.ticker-item {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-secondary); padding: 0 20px;
  border-left: 1px solid var(--border);
}
.ticker-item:first-child { border-left: none; }
.ticker-item.alert { color: var(--accent-red); }
.ticker-item.warn { color: var(--accent-orange); }
.ticker-item.info { color: var(--accent-blue); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
}
.news-card {
  background: var(--bg-panel); padding: 14px;
  transition: background 0.2s;
}
.news-card:hover { background: var(--bg-panel-hover); }
.news-card-tag {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--accent-blue); letter-spacing: 2px;
  margin-bottom: 6px;
}
.news-card-tag.red { color: var(--accent-red); }
.news-card-tag.orange { color: var(--accent-orange); }
.news-card-title {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  color: var(--text-primary); line-height: 1.4;
  margin-bottom: 6px;
}
.news-card-meta {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim);
}
.news-placeholder {
  padding: 20px; text-align: center;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-secondary); grid-column: 1/-1;
}

/* ── WORLD MAP ── */
.map-section {
  background: var(--bg-primary);
  padding: 16px 20px 12px;
  display: flex; flex-direction: column;
  min-width: 0;
}
.map-header-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.map-header-row > span:first-child {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-blue); letter-spacing: 2px;
}
.map-loading {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-secondary);
  animation: textGlow 1.5s ease-in-out infinite;
}
.map-container {
  background: #020814;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  flex: 1;
  min-height: 0;
}
.map-container svg { display: block; width: 100%; height: auto; }

/* D3 country paths — fill is set exclusively via D3 attr/style, NOT CSS */
.map-container .country {
  stroke: #1e3a6a;
  stroke-width: 0.5px;
  transition: fill 0.15s;
}
/* Do NOT add fill here — CSS class rules would override SVG presentation attributes
   and corrupt the conflict-zone color logic. Fill is managed entirely in map.js. */
@keyframes conflictPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.map-container .graticule {
  fill: none; stroke: #111a30; stroke-width: 0.4px;
}
.map-container .sphere { fill: #020c1e; }
.map-container .country-border {
  fill: none; stroke: #2a4a8a; stroke-width: 0.3px;
}

/* Hotspot animations */
.hs-ring {
  fill: none; stroke-width: 1.5px;
}
.hs-ring-1 { animation: ringExpand1 2.4s ease-out infinite; }
.hs-ring-2 { animation: ringExpand2 2.4s ease-out infinite 0.8s; }
@keyframes ringExpand1 {
  0%   { r: 0px; opacity: 0.9; }
  100% { r: 22px; opacity: 0; }
}
@keyframes ringExpand2 {
  0%   { r: 0px; opacity: 0.6; }
  100% { r: 16px; opacity: 0; }
}
.hs-core { animation: corePulse 2s ease-in-out infinite; }
@keyframes corePulse {
  0%,100%{ opacity: 0.9; }
  50%{ opacity: 0.5; }
}

/* Legend */
.map-legend {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-top: 12px;
  font-family: var(--font-mono); font-size: 10px;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-item.red    { color: var(--accent-red); }
.legend-item.orange { color: var(--accent-orange); }
.legend-item.yellow { color: var(--accent-yellow); }

/* Tooltip */
.map-tooltip {
  position: fixed;
  background: rgba(3,4,13,0.95);
  border: 1px solid var(--border-bright);
  padding: 10px 14px;
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-primary);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 9000;
  min-width: 200px;
  max-width: 280px;
  backdrop-filter: blur(8px);
}
.map-tooltip.visible { opacity: 1; }
.tt-title { font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.tt-title.red    { color: var(--accent-red); }
.tt-title.orange { color: var(--accent-orange); }
.tt-title.yellow { color: var(--accent-yellow); }
.tt-row { display: flex; justify-content: space-between; gap: 10px;
  color: var(--text-secondary); margin-top: 3px; font-size: 10px; }
.tt-val { color: var(--text-primary); }
.tt-footer { margin-top: 6px; color: var(--text-dim); font-size: 9px;
  border-top: 1px solid var(--border); padding-top: 5px; }

/* ── NEEDLE ── */
#needle {
  transform-origin: 150px 150px;
  transform: rotate(-90deg);
  transition: transform 2s cubic-bezier(0.34, 1.4, 0.64, 1);
}

/* ── TIMELINE ── */
.timeline-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 24px;
}
.timeline-header {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-blue); letter-spacing: 2px;
  margin-bottom: 20px;
}
.timeline-scroll { overflow-x: auto; padding-bottom: 8px; }
.timeline-track {
  display: flex; gap: 0;
  min-width: max-content;
  position: relative;
}
.timeline-track::before {
  content: '';
  position: absolute; top: 28px; left: 0; right: 0;
  height: 2px; background: linear-gradient(90deg, var(--border), var(--border-bright), var(--border));
}
.timeline-event {
  display: flex; flex-direction: column; align-items: center;
  width: 160px; padding: 0 10px;
  position: relative;
}
.timeline-dot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid;
  background: var(--bg-primary);
  margin-top: 22px; margin-bottom: 10px;
  position: relative; z-index: 1;
}
.timeline-dot.red { border-color: var(--accent-red); box-shadow: 0 0 8px var(--accent-red); }
.timeline-dot.orange { border-color: var(--accent-orange); box-shadow: 0 0 8px var(--accent-orange); }
.timeline-dot.yellow { border-color: var(--accent-yellow); box-shadow: 0 0 8px var(--accent-yellow); }
.timeline-date {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); margin-bottom: 4px;
  position: absolute; top: 4px;
}
.timeline-text {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-secondary); text-align: center;
  line-height: 1.4;
}

/* ── BIZJET PANEL ── */
.panel-bizjet-highlight {
  border-top: 2px solid rgba(255,136,0,0.4);
  transition: box-shadow 0.5s ease;
}

/* ── SHIPPING PANEL ── */
.panel-shipping-highlight {
  border-top: 2px solid rgba(0,204,255,0.4);
  transition: box-shadow 0.5s ease;
}
.panel-shipping-highlight.alert-active {
  box-shadow: 0 0 20px rgba(0,204,255,0.2);
  border-top-color: rgba(0,204,255,0.8);
}

/* ── BIZJET SECTION ── */
.bizjet-section {
  background: #050810;
  border-top: 2px solid rgba(255,136,0,0.3);
  padding: 20px 24px;
}
.bj-section-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.bj-section-title {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-orange); letter-spacing: 2px;
}
.bj-section-links { display: flex; gap: 10px; flex-wrap: wrap; }
.bj-ext-link {
  font-family: var(--font-mono); font-size: 10px;
  padding: 5px 12px; border-radius: 3px; text-decoration: none;
  border: 1px solid; transition: background 0.2s; letter-spacing: 1px;
}
.bj-ext-link.fr24  { color: #ff8800; border-color: rgba(255,136,0,0.4); }
.bj-ext-link.adsbx { color: #00ff88; border-color: rgba(0,255,136,0.4); }
.bj-ext-link.osk   { color: #00ccff; border-color: rgba(0,204,255,0.4); }
.bj-ext-link:hover { background: rgba(255,255,255,0.05); }

/* ── ESCAPE FLOW METER ── */
.bj-escape-bar-section {
  background: rgba(255,136,0,0.04);
  border: 1px solid rgba(255,136,0,0.15);
  border-radius: 4px; padding: 16px 20px;
  margin-bottom: 20px;
}
.bj-escape-label {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-secondary); margin-bottom: 12px;
}
.bj-escape-title { color: var(--accent-orange); letter-spacing: 2px; }

.bj-flow-visual {
  display: flex; align-items: center; gap: 12px;
}
.bj-flow-hub, .bj-flow-haven {
  text-align: center; min-width: 80px;
}
.bj-flow-hub span:first-child,
.bj-flow-haven span:first-child {
  font-family: var(--font-mono); font-size: 28px; font-weight: 700;
  color: var(--accent-orange); display: block; line-height: 1;
}
.bj-flow-airports {
  font-family: var(--font-mono); font-size: 8px;
  color: var(--text-dim); margin-top: 4px;
}
.bj-flow-arrow-track {
  flex: 1; height: 24px; background: rgba(255,136,0,0.1);
  border-radius: 12px; position: relative; overflow: hidden;
}
.bj-flow-arrow-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(255,136,0,0.2), rgba(255,136,0,0.5));
  border-radius: 12px; width: 50%;
  transition: width 1.5s ease;
}
.bj-flow-plane {
  position: absolute; font-size: 14px;
  top: 50%; transform: translateY(-50%);
  left: 48%; color: var(--accent-orange);
  animation: planeFly 4s ease-in-out infinite;
}
@keyframes planeFly {
  0%,100%{ left: 20%; opacity: 0.6; }
  50%{ left: 70%; opacity: 1; }
}

/* ── AIRPORT BREAKDOWN ── */
.bj-airport-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px; background: var(--border);
  margin-bottom: 20px;
}
.bj-airport-row {
  background: #060a1a; padding: 12px 14px;
  border-left: 3px solid var(--border);
  transition: border-color 0.5s, background 0.5s;
}
.bj-airport-row[data-level="1"] { border-left-color: var(--accent-yellow); }
.bj-airport-row[data-level="2"] {
  border-left-color: var(--accent-orange);
  background: rgba(255,136,0,0.05);
}
.bj-airport-row[data-level="3"] {
  border-left-color: var(--accent-red);
  background: rgba(255,0,68,0.07);
  animation: cardFlash 1.5s ease-in-out infinite;
}
.bj-ap-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
}
.bj-ap-flag {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--accent-blue); font-weight: 700;
  border: 1px solid rgba(0,204,255,0.3); padding: 1px 5px; border-radius: 2px;
}
.bj-ap-name {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  color: var(--text-primary); flex: 1;
}
.bj-ap-code {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-dim);
}
.bj-ap-role {
  font-family: var(--font-mono); font-size: 9px; padding: 2px 6px;
  border-radius: 2px; letter-spacing: 1px;
}
.bj-ap-role.hub   { color: var(--accent-red);  border: 1px solid rgba(255,0,68,0.3); }
.bj-ap-role.haven { color: var(--accent-green); border: 1px solid rgba(0,255,136,0.3); }

.bj-ap-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px; margin-bottom: 6px;
}
.bj-stat { text-align: center; }
.bj-stat-label {
  font-family: var(--font-mono); font-size: 8px;
  color: var(--text-dim); display: block; margin-bottom: 2px;
}
.bj-stat-val {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-primary); font-weight: 600;
}
.bj-ap-note {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); line-height: 1.4;
}

/* ── OPERATOR LIST ── */
.bj-ops-section { margin-bottom: 16px; }
.bj-ops-title {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-blue); letter-spacing: 2px; margin-bottom: 10px;
}
.bj-ops-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px; background: var(--border);
  margin-bottom: 8px;
}
.bj-op-row {
  background: #060a1a; padding: 8px 12px;
  display: flex; align-items: center; gap: 10px;
}
.bj-op-prefix {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--accent-yellow); min-width: 36px;
}
.bj-op-name { font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary); flex: 1; }
.bj-op-tier {
  font-family: var(--font-mono); font-size: 9px; padding: 1px 5px;
  border-radius: 2px; border: 1px solid;
}
.bj-op-tier.red    { color: var(--accent-red);    border-color: rgba(255,0,68,0.3); }
.bj-op-tier.orange { color: var(--accent-orange); border-color: rgba(255,136,0,0.3); }
.bj-op-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-primary); }
.bj-ops-note {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); line-height: 1.6;
}
.bj-no-data {
  background: #060a1a; padding: 12px;
  font-family: var(--font-mono); font-size: 10px; color: var(--text-dim);
  font-style: italic; grid-column: 1/-1;
}
.bj-datasource {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); line-height: 1.6;
}

/* ── MILITARY PANEL HIGHLIGHT ── */
.panel-military-highlight {
  border-top: 2px solid rgba(255,0,68,0.4);
  transition: box-shadow 0.5s ease;
}

/* ── MILITARY SECTION ── */
.military-section {
  background: #04060f;
  border-top: 2px solid rgba(255,0,68,0.3);
  padding: 20px 24px;
}
.mil-section-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.mil-section-title {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--accent-red); letter-spacing: 2px;
}
.mil-blink { animation: blink 0.8s step-end infinite; }

.mil-section-links { display: flex; gap: 10px; flex-wrap: wrap; }
.mil-ext-link {
  font-family: var(--font-mono); font-size: 10px;
  padding: 5px 12px; border-radius: 3px; text-decoration: none;
  border: 1px solid; transition: background 0.2s;
  letter-spacing: 1px;
}
.mil-ext-link.fr24  { color: #ff8800; border-color: rgba(255,136,0,0.4); }
.mil-ext-link.mt    { color: #00ccff; border-color: rgba(0,204,255,0.4); }
.mil-ext-link.adsbx { color: #00ff88; border-color: rgba(0,255,136,0.4); }
.mil-ext-link:hover { background: rgba(255,255,255,0.05); }

/* ── ZONE GRID ── */
.mil-zone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px; background: var(--border);
  margin-bottom: 20px;
}
.mil-zone-card {
  background: #060a1a; padding: 14px;
  border-left: 3px solid var(--border);
  transition: border-color 0.5s;
}
.mil-zone-card[data-level="1"] { border-left-color: var(--accent-yellow); }
.mil-zone-card[data-level="2"] { border-left-color: var(--accent-orange);
  background: rgba(255,136,0,0.04); }
.mil-zone-card[data-level="3"] { border-left-color: var(--accent-red);
  background: rgba(255,0,68,0.06); animation: cardFlash 2s ease-in-out infinite; }
@keyframes cardFlash {
  0%,100%{ background: rgba(255,0,68,0.06); }
  50%{ background: rgba(255,0,68,0.12); }
}

.mil-zone-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.mil-zone-icon { font-size: 14px; color: var(--accent-orange); }
.mil-zone-name {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  color: var(--text-primary); flex: 1; letter-spacing: 1px;
}
.mil-zone-level {
  font-family: var(--font-mono); font-size: 9px;
  padding: 2px 6px; border-radius: 2px; letter-spacing: 1px;
}
.mil-zone-level.lv0 { color: var(--accent-green); border: 1px solid rgba(0,255,136,0.3); }
.mil-zone-level.lv1 { color: var(--accent-yellow); border: 1px solid rgba(255,221,0,0.3); }
.mil-zone-level.lv2 { color: var(--accent-orange); border: 1px solid rgba(255,136,0,0.4); }
.mil-zone-level.lv3 {
  color: var(--accent-red); border: 1px solid rgba(255,0,68,0.5);
  animation: blink 0.6s step-end infinite;
}

.mil-zone-count-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}
.mil-zone-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-secondary); }
.mil-zone-count { font-family: var(--font-mono); font-size: 18px; font-weight: 700; }

.mil-zone-navy {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--accent-blue); margin-bottom: 8px; line-height: 1.4;
}

.mil-aircraft-list { margin-top: 6px; }
.mil-aircraft-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  padding: 3px 0; border-bottom: 1px solid rgba(26,42,74,0.4);
  font-family: var(--font-mono); font-size: 10px;
}
.mil-cs { color: var(--accent-yellow); font-weight: 600; }
.mil-country { color: var(--text-secondary); }
.mil-alt { color: var(--text-dim); text-align: right; }
.mil-more { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); margin-top: 4px; }
.mil-no-detect { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); font-style: italic; }

/* ── NAVAL TABLE ── */
.mil-naval-section { margin-top: 20px; }
.mil-naval-title {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent-blue); letter-spacing: 2px; margin-bottom: 12px;
}
.mil-naval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px; background: var(--border);
}
.mil-naval-card {
  background: #060a1a; padding: 12px;
  border-left: 3px solid;
}
.mil-naval-card.lv0 { border-left-color: var(--accent-green); }
.mil-naval-card.lv1 { border-left-color: var(--accent-yellow); }
.mil-naval-card.lv2 { border-left-color: var(--accent-orange); background: rgba(255,136,0,0.04); }
.mil-naval-card.lv3 { border-left-color: var(--accent-red); background: rgba(255,0,68,0.06); }

.mil-ship-name {
  font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 3px;
}
.mil-ship-type { font-family: var(--font-mono); font-size: 9px; color: var(--text-secondary); margin-bottom: 5px; }
.mil-ship-loc  { font-family: var(--font-mono); font-size: 11px; color: var(--accent-orange); margin-bottom: 4px; }
.mil-ship-note { font-family: var(--font-mono); font-size: 9px; color: var(--text-dim); }

/* ── DATA SOURCE ── */
.mil-datasource {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); line-height: 1.6;
}

/* ── DEFCON / FPCON OVERLAY PANEL ── */
/* デスクトップ: .map-section 左上にオーバーレイ */
.map-section { position: relative; }
#threat-status-panel {
  position: absolute;
  /* .map-section基準: 上部パディング16px + ヘッダー行(約32px) + margin-bottom14px + 内側8px */
  top: 70px;
  left: 28px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 196px;
}
.ts-block {
  background: rgba(2,6,18,0.90);
  border: 1px solid rgba(42,74,138,0.65);
  border-radius: 3px;
  padding: 9px 11px 8px;
  backdrop-filter: blur(6px);
}
.ts-header {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-blue);
  letter-spacing: 2px;
  margin-bottom: 7px;
}
.ts-icon { font-size: 11px; }
.ts-badge {
  font-size: 8px;
  color: var(--accent-orange);
  border: 1px solid rgba(255,136,0,0.5);
  padding: 0 4px;
  border-radius: 2px;
  letter-spacing: 0.5px;
  margin-left: auto;
}
.ts-sub {
  font-size: 8px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  margin-left: auto;
}
.ts-indicators {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}
.ts-box {
  flex: 1;
  height: 22px;
  border: 1px solid;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  transition: all 0.3s;
  cursor: default;
}
.ts-box.ts-active {
  font-size: 10px;
  animation: tsPulse 2.5s ease-in-out infinite;
}
@keyframes tsPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.75; }
}
.ts-level {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ts-desc {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: 4px;
}
.ts-src {
  font-family: var(--font-mono);
  font-size: 7px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
  border-top: 1px solid rgba(42,74,138,0.3);
  padding-top: 4px;
  margin-top: 2px;
}

/* ── CYBER THREAT STATUS BAR ── */
#cyber-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding: 7px 12px;
  background: rgba(2,6,18,0.80);
  border: 1px solid rgba(255,0,68,0.25);
  border-radius: 3px;
  backdrop-filter: blur(4px);
}
.cyber-counter {
  display: flex;
  align-items: baseline;
  gap: 5px;
  flex-shrink: 0;
}
.cyber-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 1px;
}
.cyber-label-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}
.cyber-val {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-red);
  text-shadow: 0 0 10px rgba(255,0,68,0.6);
  min-width: 55px;
  text-align: right;
  animation: cyberCountGlow 2s ease-in-out infinite;
}
@keyframes cyberCountGlow {
  0%,100% { text-shadow: 0 0 8px rgba(255,0,68,0.5); }
  50%      { text-shadow: 0 0 20px rgba(255,0,68,0.9); }
}
.cyber-last-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.cyber-last-val {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-red);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cyber-type-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  padding: 1px 5px;
  border: 1px solid rgba(255,0,68,0.4);
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}
.cyber-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 9px;
  flex-shrink: 0;
}

.cyber-intel-src {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #4af;
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 0;
  min-width: 0;
}

/* mobile: cyber-bar stacks */
@media (max-width: 600px) {
  #cyber-bar { gap: 10px; padding: 6px 10px; }
  .cyber-legend { gap: 6px; font-size: 8px; }
  .cyber-val { font-size: 15px; }
  .cyber-last-val { font-size: 9px; }
  .cyber-intel-src { font-size: 8px; }
}

/* ============================================================
   NAVIGATION & COLLAPSE UX
   ============================================================ */

/* ── Sticky section nav bar ── */
.section-nav {
  position: sticky;
  top: 58px;           /* below .site-header */
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 12px;
  background: rgba(4,6,16,0.97);
  border-bottom: 1px solid var(--border-bright);
  overflow-x: auto;
  scrollbar-width: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.section-nav::-webkit-scrollbar { display: none; }

.snav-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 1px;
  padding: 0 10px 0 4px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.snav-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 9px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.snav-btn:hover { color: var(--text-primary); border-bottom-color: var(--border-bright); }
.snav-btn.snav-active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }

/* ── Section collapse toggle button ── */
.sec-toggle {
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  margin-left: 8px;
}
.sec-toggle:hover {
  background: rgba(0,204,255,0.08);
  border-color: rgba(0,204,255,0.3);
  color: var(--accent-blue);
}

/* Wrapper to hold links + toggle on same row */
.bj-section-links-wrap,
.mil-links-wrap,
.neo-links-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

/* ── Collapsed section: hide everything below its header ── */
.bizjet-section.sec-collapsed   > *:not(.bj-section-header)  { display: none; }
.military-section.sec-collapsed > *:not(.mil-section-header) { display: none; }
.neo-section.sec-collapsed      > *:not(.neo-section-header) { display: none; }
.news-section.sec-collapsed     > *:not(.news-header)        { display: none; }
.timeline-section.sec-collapsed > *:not(.timeline-header)    { display: none; }

/* Section headers look "closed" when collapsed */
.bizjet-section.sec-collapsed   .bj-section-header  { opacity: 0.7; }
.military-section.sec-collapsed .mil-section-header { opacity: 0.7; }
.neo-section.sec-collapsed      .neo-section-header { opacity: 0.7; }
.news-section.sec-collapsed     .news-header        { opacity: 0.7; }
.timeline-section.sec-collapsed .timeline-header    { opacity: 0.7; }

/* ── Floating ▲ TOP button ── */
#topBtn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 200;
  background: rgba(0,204,255,0.12);
  border: 1px solid rgba(0,204,255,0.35);
  color: var(--accent-blue);
  font-family: var(--font-mono);
  font-size: 13px;
  width: 38px;
  height: 38px;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  pointer-events: none;
}
#topBtn.topBtn-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#topBtn:hover {
  background: rgba(0,204,255,0.22);
  border-color: var(--accent-blue);
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .section-nav { top: 52px; padding: 0 6px; }
  .snav-btn    { font-size: 9px; padding: 8px 9px; }
  .snav-label  { display: none; }
  #topBtn      { bottom: 14px; right: 12px; width: 34px; height: 34px; font-size: 12px; }
}

/* Fix: news-header flex alignment with the toggle btn */
.news-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.timeline-header { display: flex; align-items: center; justify-content: space-between; }

/* ============================================================
   NEO — Near-Earth Object Alert System
   ============================================================ */

/* ── Panel card highlight ── */
.panel-neo-highlight {
  border-top: 2px solid rgba(255,102,0,0.5);
}

/* ── Full section ── */
.neo-section {
  margin: 0;
  border-top: 2px solid rgba(255,102,0,0.35);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(25,10,0,0.7) 0%, rgba(5,8,20,0.95) 60%);
  overflow: hidden;
}

.neo-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255,102,0,0.06);
  border-bottom: 1px solid rgba(255,102,0,0.18);
}

.neo-section-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: #ff9933;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.neo-blink {
  font-size: 18px;
  animation: neoBlink 2.5s ease-in-out infinite;
  display: inline-block;
}
@keyframes neoBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.25; transform: scale(0.9); }
}

.neo-section-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.neo-ext-link {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 2px;
  transition: all 0.2s;
}
.neo-ext-link:hover {
  color: #ff9933;
  border-color: rgba(255,153,51,0.5);
  background: rgba(255,102,0,0.08);
}

/* ── Summary stat strip ── */
.neo-stats-row {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.neo-stat {
  flex: 1;
  padding: 12px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.neo-stat:last-child { border-right: none; }

.neo-stat-val {
  font-family: var(--font-mono);
  font-size: 18px;
  color: #ff9933;
  line-height: 1;
  margin-bottom: 5px;
}
.neo-stat-name {
  font-size: 11px;
  word-break: break-all;
  white-space: normal;
}
.neo-stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}
.neo-stat-danger .neo-stat-val { color: var(--accent-orange); }

/* ── Column header ── */
.neo-list { overflow-x: auto; }

.neo-list-header {
  display: grid;
  grid-template-columns: 2.2fr 1.3fr 0.8fr 1.1fr 1.1fr 0.9fr 0.7fr 1.0fr;
  padding: 6px 20px;
  background: rgba(255,102,0,0.05);
  border-bottom: 1px solid rgba(255,102,0,0.12);
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-width: 680px;
}

/* ── Row ── */
.neo-list-body { min-width: 680px; }

.neo-row {
  display: grid;
  grid-template-columns: 2.2fr 1.3fr 0.8fr 1.1fr 1.1fr 0.9fr 0.7fr 1.0fr;
  padding: 8px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  border-left: 3px solid transparent;
  align-items: center;
  transition: background 0.15s;
  min-width: 680px;
}
.neo-row:hover { background: rgba(255,153,51,0.04); }
.neo-row-pha   { background: rgba(255,85,0,0.04); }

.neo-col {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  padding: 0 4px;
  line-height: 1.4;
}
.neo-col-name { color: var(--text-primary); font-size: 11px; }
.neo-col-date { font-size: 9px; color: var(--text-secondary); }
.neo-time     { font-size: 8px; color: var(--text-dim); }

.neo-name-link { color: inherit; text-decoration: none; }
.neo-name-link:hover { color: #ff9933; text-decoration: underline; }

.neo-ld-num { font-size: 13px; font-weight: bold; }
.neo-unit   { font-size: 8px; color: var(--text-dim); margin-left: 2px; }

.neo-pha-badge {
  font-size: 8.5px;
  font-family: var(--font-mono);
  font-weight: bold;
  color: #ff5500;
  background: rgba(255,85,0,0.12);
  border: 1px solid rgba(255,85,0,0.3);
  padding: 1px 5px;
  border-radius: 2px;
  white-space: nowrap;
}
.neo-pha-none { color: var(--text-dim); }

/* ── Level badge ── */
.neo-lv-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 2px;
  text-align: center;
  line-height: 1.3;
}
.neo-lv-ja { font-size: 8px; font-weight: normal; letter-spacing: 0; }

/* Level color coding (border + badge + LD number) */
.neo-lv-critical {
  border-left-color: #ff0022 !important;
}
.neo-lv-critical .neo-lv-badge {
  background: rgba(255,0,34,0.18);
  color: #ff2244;
  border: 1px solid rgba(255,0,34,0.4);
}

.neo-lv-warning {
  border-left-color: #ff5500 !important;
}
.neo-lv-warning .neo-lv-badge {
  background: rgba(255,85,0,0.18);
  color: #ff7733;
  border: 1px solid rgba(255,85,0,0.4);
}

.neo-lv-caution {
  border-left-color: #ffaa00 !important;
}
.neo-lv-caution .neo-lv-badge {
  background: rgba(255,170,0,0.15);
  color: #ffbb33;
  border: 1px solid rgba(255,170,0,0.35);
}

.neo-lv-monitor {
  border-left-color: #0088ff !important;
}
.neo-lv-monitor .neo-lv-badge {
  background: rgba(0,136,255,0.12);
  color: #44aaff;
  border: 1px solid rgba(0,136,255,0.3);
}

.neo-lv-nominal {
  border-left-color: #1e3050 !important;
}
.neo-lv-nominal .neo-lv-badge {
  background: rgba(30,48,80,0.3);
  color: var(--text-dim);
  border: 1px solid rgba(30,48,80,0.5);
}

/* ── Loading / empty / error states ── */
.neo-empty {
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
}
.neo-fallback-link {
  color: var(--accent-blue);
  text-decoration: none;
}
.neo-fallback-link:hover { text-decoration: underline; }

/* ── Data source footer ── */
.neo-datasource {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-dim);
  padding: 8px 20px;
  border-top: 1px solid var(--border);
  background: rgba(255,102,0,0.02);
  letter-spacing: 0.2px;
}

/* ── Mobile ── */
@media (max-width: 900px) {
  .neo-stats-row { flex-wrap: wrap; }
  .neo-stat { flex: 1 1 calc(33.33% - 1px); min-width: 100px; }
}
@media (max-width: 600px) {
  .neo-section-header { padding: 10px 12px; }
  .neo-section-links  { display: none; }
  .neo-stats-row      { flex-wrap: wrap; }
  .neo-stat           { flex: 1 1 calc(50% - 1px); padding: 8px 10px; }
  .neo-stat-val       { font-size: 14px; }
  .neo-datasource     { padding: 6px 12px; }
}

/* ── NEO 3D Panel ── */
.neo-3d-panel {
  border-bottom: 1px solid var(--border);
  background: #020610;
}

.neo-3d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(0,50,120,0.10);
  border-bottom: 1px solid rgba(0,100,200,0.15);
}

.neo-3d-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  color: var(--accent-blue);
}

.neo-3d-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.neo-3d-hint {
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.neo-3d-toggle {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  background: rgba(0,100,200,0.07);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.neo-3d-toggle:hover {
  color: var(--accent-blue);
  border-color: rgba(0,180,255,0.4);
  background: rgba(0,100,200,0.12);
}

.neo-3d-wrap { display: block; }
.neo-3d-wrap.neo3d-hidden { display: none; }

.neo-3d-container {
  width: 100%;
  height: 440px;
  background: radial-gradient(ellipse at center, #03081e 0%, #010208 100%);
  cursor: grab;
  overflow: hidden;
}
.neo-3d-container:active { cursor: grabbing; }
.neo-3d-container canvas { display: block; }

.neo-3d-loading {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.neo-3d-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 7px 20px;
  background: rgba(0,30,80,0.15);
  border-top: 1px solid rgba(0,80,160,0.15);
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
}

.neo-3d-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .neo-3d-container { height: 360px; }
  .neo-3d-hint      { display: none; }
}
@media (max-width: 600px) {
  .neo-3d-container { height: 280px; }
  .neo-3d-legend    { gap: 8px; font-size: 8px; }
}

/* ── ABOUT SECTION ── */
.about-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 48px 40px;
}
.about-inner {
  max-width: 860px;
  margin: 0 auto;
}
.about-tagline {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: 2px;
  margin-bottom: 6px;
  padding-bottom: 0;
}
.about-tagline-en {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.about-body p {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 16px;
}
.about-emphasis {
  font-size: 15px !important;
  color: var(--text-primary) !important;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 10px 16px;
  border-left: 3px solid var(--accent-blue);
  background: rgba(0,204,255,0.05);
  margin-bottom: 4px !important;
}
.about-emphasis-en {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 16px 12px;
  border-left: 3px solid rgba(0,204,255,0.3);
  background: rgba(0,204,255,0.02);
  margin-bottom: 16px !important;
}
.about-body-en {
  font-family: var(--font-ui);
  font-size: 12px !important;
  color: var(--text-dim) !important;
  line-height: 1.7 !important;
  margin-top: -10px !important;
  margin-bottom: 20px !important;
  padding-left: 12px;
  border-left: 2px solid rgba(0,204,255,0.15);
}
.about-mission-en {
  border-color: rgba(0,204,255,0.2);
  background: rgba(0,204,255,0.01);
  margin-top: 8px;
}
.about-mission-en .about-mission-label {
  color: var(--text-dim);
  font-size: 12px;
}
.about-mission-en .about-mission-item {
  color: var(--text-secondary);
  font-size: 12px;
}
.about-mission {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  background: rgba(0,204,255,0.03);
}
.about-mission-label {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-secondary);
}
.about-mission-item {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-blue);
  letter-spacing: 1px;
  padding: 2px 0 2px 16px;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 12px 24px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.site-footer > div {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--text-dim); letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — タブレット (≤ 900px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* 上部2列→1列 */
  .top-row { grid-template-columns: 1fr; min-height: auto; }

  /* 左パネル: 横並び（メーター左 / YouTube右） */
  .left-panel {
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: 240px;
    max-height: 260px;
  }
  .threat-section  { flex: 1; border-bottom: none; border-right: 1px solid var(--border); }
  .news-live-panel { flex: 1; }

  /* マップ */
  .map-container { min-height: 280px; }

  /* DEFCONパネル: タブレットはそのまま左上に */
  #threat-status-panel { width: 175px; top: 66px; left: 24px; }
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — スマートフォン (≤ 600px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* ── ヘッダー ── */
  .site-header { padding: 10px 14px; }
  .logo-text { font-size: 13px !important; letter-spacing: 1px !important; }
  .subtitle { font-size: 8px; letter-spacing: 0.5px; }
  .header-right { gap: 8px; }
  .live-badge { padding: 3px 8px; font-size: 9px; letter-spacing: 1px; }
  .timestamp { font-size: 10px; }

  /* ── アラートバナー ── */
  .alert-banner { padding: 6px 14px; }
  .alert-text { font-size: 9px; }

  /* ── 上部レイアウト ── */
  .top-row { grid-template-columns: 1fr; min-height: auto; }
  .left-panel {
    flex-direction: column;
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: auto;
    max-height: none;
  }
  .threat-section {
    flex: none;
    padding: 12px 14px 8px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .arc-svg { max-width: 150px !important; }
  .score-value { font-size: 36px; }
  .score-label { font-size: 11px; letter-spacing: 1px; }
  .threat-sublabels { font-size: 8px; }
  .news-live-panel { flex: none; height: 220px; }

  /* ── マップ ── */
  .map-section { padding: 10px 12px 6px; }
  .map-container { min-height: 210px; }
  .map-header-row { margin-bottom: 8px; }
  .map-header-row > span:first-child { font-size: 10px; letter-spacing: 1px; }

  /* ── DEFCON/FPCON パネル: マップ下に横並び展開 ── */
  #threat-status-panel {
    position: static;
    flex-direction: row;
    width: 100%;
    margin-top: 8px;
    gap: 6px;
  }
  .ts-block { flex: 1; padding: 7px 8px; }
  .ts-header { font-size: 9px; letter-spacing: 1px; margin-bottom: 5px; }
  .ts-box { height: 18px; font-size: 8px; }
  .ts-level { font-size: 9px; }
  .ts-desc { font-size: 7px; }
  .ts-src { font-size: 6px; }

  /* ── 凡例 ── */
  .map-legend { margin-top: 6px; gap: 12px; font-size: 9px; }

  /* ── ダッシュボードパネル ── */
  .dashboard-grid { grid-template-columns: 1fr; }
  .panel { padding: 12px 14px; }
  .panel-score { font-size: 26px; }
  .panel-title { font-size: 12px; }
  .ind-label { font-size: 9px; }
  .ind-value { font-size: 10px; }
  .panel-note { font-size: 8px; }

  /* ── ニュース ── */
  .news-section { padding: 0; }
  .news-header { padding: 10px 14px; }
  .news-title { font-size: 10px; }
  .news-grid { grid-template-columns: 1fr; }
  /* スマホはティッカースクロールを停止（スクロールジャンク防止） */
  .news-ticker { animation: none; white-space: normal; flex-wrap: wrap; gap: 8px; padding: 6px 12px; }
  .ticker-item { border-left: none; padding: 0; font-size: 10px; }
  .news-card { padding: 12px; }
  .news-card-title { font-size: 12px; }

  /* ── タイムライン ── */
  .timeline-section { padding: 16px 14px; }
  .timeline-event { width: 130px; }
  .timeline-text { font-size: 9px; }
  .timeline-date { font-size: 8px; }

  /* ── Bizjet セクション ── */
  .bizjet-section { padding: 14px; }
  .bj-section-header { flex-direction: column; align-items: flex-start; }
  .bj-section-links { display: none; }
  .bj-airport-grid { grid-template-columns: 1fr; }
  .bj-ap-stats { grid-template-columns: repeat(2, 1fr); }
  .bj-ops-list { grid-template-columns: 1fr; }
  .bj-flow-visual { flex-direction: column; gap: 8px; }
  .bj-flow-hub, .bj-flow-haven { min-width: auto; }
  .bj-flow-arrow-track { width: 100%; }

  /* ── 軍事セクション ── */
  .military-section { padding: 14px; }
  .mil-section-header { flex-direction: column; align-items: flex-start; }
  .mil-section-links { display: none; }
  .mil-zone-grid { grid-template-columns: 1fr; }
  .mil-naval-grid { grid-template-columns: 1fr; }
  .mil-aircraft-row { font-size: 9px; grid-template-columns: 1fr 1fr; }
  .mil-alt { display: none; }

  /* ── About ── */
  .about-section { padding: 24px 16px; }
  .about-tagline { font-size: 17px; letter-spacing: 1px; }
  .about-body p { font-size: 13px; }
  .about-mission { padding: 14px 16px; }
  .about-mission-item { font-size: 12px; }

  /* ── フッター ── */
  .site-footer { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 14px; }
}

/* ═══════════════════════════════════════════════════
   EARTH SCIENCE — Panel highlights
   ═══════════════════════════════════════════════════ */
.panel-sw-highlight  { border-top: 2px solid #ffaa00; }
.panel-eq-highlight  { border-top: 2px solid #ff8800; }
.panel-vol-highlight { border-top: 2px solid #ff4400; }

/* ── 宇宙天気バー (NEOセクション内) ── */
#sw-bar {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px 16px;
  background: rgba(10,8,30,0.85);
  border: 1px solid rgba(255,170,0,0.30);
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.sw-bar-block {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 0 18px 0 0;
}
.sw-bar-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  white-space: nowrap;
}
.sw-bar-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: #ffaa00;
  text-shadow: 0 0 10px rgba(255,170,0,0.6);
  min-width: 52px;
}
.sw-bar-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.sw-bar-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,170,0,0.2);
  margin: 0 18px 0 0;
  flex-shrink: 0;
}
.sw-bar-alerts {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.sw-alert-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  overflow: hidden;
}
.sw-atime {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.sw-amsg {
  font-family: var(--font-mono);
  font-size: 9px;
  color: #ffcc55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-bar-src {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
  align-self: flex-end;
}

/* ── 地球活動セクション ── */
.earth-section {
  margin: 0 0 2px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.earth-section.sec-collapsed > .earth-grid { display: none; }

.earth-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255,68,0,0.04);
  border-bottom: 1px solid rgba(255,68,0,0.2);
  flex-wrap: wrap;
  gap: 8px;
}
.earth-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #ff8800;
  letter-spacing: 1.5px;
  font-weight: 700;
}
.earth-links-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.earth-section-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.earth-ext-link {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.earth-ext-link:hover { color: #ff8800; border-color: #ff8800; }

.earth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  padding: 0;
}
@media (max-width: 900px) { .earth-grid { grid-template-columns: 1fr; } }

.earth-col {
  background: var(--bg-panel);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.earth-col-header {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.earth-datasrc {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* ── Earth Summary Bar ── */
.earth-summary-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 20px;
  background: rgba(4,6,16,0.9);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0;
}
.earth-sum-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  flex-shrink: 0;
}
.earth-sum-val {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  min-width: 48px;
  text-align: center;
}
.earth-sum-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.earth-sum-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Earth Grid Columns ── */
.earth-col-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.earth-col-src {
  margin-left: auto;
  font-size: 8px;
  color: var(--text-dim);
}

/* ── Seismic Activity Meter ── */
.es-meter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.es-meter-track {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.es-meter-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 1s ease, background 0.5s ease;
  box-shadow: 0 0 6px currentColor;
}
.es-meter-label {
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
  min-width: 160px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ── Earthquake Cards ── */
.es-list-body { display: flex; flex-direction: column; gap: 5px; }

.es-eq-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 4px;
  transition: background 0.2s;
}
.es-eq-card:hover { background: rgba(255,255,255,0.04); }
.es-eq-card.es-eq-new {
  animation: eqNewPulse 2s ease-in-out 3;
}
@keyframes eqNewPulse {
  0%,100% { border-color: rgba(255,255,255,0.04); }
  50%      { border-color: rgba(255,136,0,0.5); box-shadow: 0 0 8px rgba(255,136,0,0.2); }
}

.es-eq-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid;
  flex-shrink: 0;
}
.es-eq-badge-m {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}
.es-eq-badge-v {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.es-eq-info { flex: 1; min-width: 0; }
.es-eq-place {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.es-eq-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.es-eq-depth {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
}
.es-eq-ago {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
}
.es-eq-new-badge {
  font-family: var(--font-mono);
  font-size: 7px;
  background: rgba(255,136,0,0.2);
  color: #ff8800;
  border: 1px solid rgba(255,136,0,0.5);
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 1px;
}
.es-eq-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  overflow: hidden;
}
.es-eq-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* ── Volcano Legend ── */
.es-vol-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
}
.es-vol-leg-item {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.5px;
}

/* ── Volcano Cards ── */
.es-vol-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-left: 4px solid;
  border-radius: 0 4px 4px 0;
  margin-bottom: 5px;
  transition: opacity 0.2s;
}
.es-vol-card:hover { opacity: 0.9; }
.es-vol-card-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
  min-width: 76px;
}
.es-vol-alert-lv {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 6px;
  border: 1px solid;
  border-radius: 2px;
  white-space: nowrap;
}
.es-vol-jp {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
}
.es-vol-date {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
}
.es-vol-card-body { flex: 1; min-width: 0; }
.es-vol-card-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.es-vol-card-loc {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.es-vol-card-desc {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.es-no-data {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  padding: 16px 0;
  text-align: center;
}
.es-vol-notice {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-dim);
  padding: 6px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE — 小型スマートフォン (≤ 400px)
   ═══════════════════════════════════════════════════ */
@media (max-width: 400px) {
  .logo-text { font-size: 11px !important; }
  .live-badge { display: none; }
  .arc-svg { max-width: 130px !important; }
  .score-value { font-size: 30px; }
  .news-live-panel { height: 180px; }
  .map-container { min-height: 180px; }
  #threat-status-panel { gap: 4px; }
  .ts-block { padding: 6px 7px; }
  .ts-indicators { gap: 2px; }
  .ts-box { height: 16px; font-size: 7px; }
}
