/* ═══════════════════════════════════════════════════════════════
   WARFRONT — Dark Military Terminal Design System
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;700&family=Orbitron:wght@400;500;700;900&family=Kanit:ital,wght@1,600;1,800;1,900&family=Pacifico&display=swap');

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  --bg-primary: #080808;
  --bg-secondary: #0f0f0f;
  --bg-tertiary: #161616;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --red-primary: #ff2020;
  --red-glow: #ff202060;
  --red-dark: #8b0000;
  --red-dim: #ff202030;
  --green-accent: #00ff41;
  --amber-accent: #ffa500;
  --yellow-accent: #ffd700;
  --text-primary: #e0e0e0;
  --text-secondary: #888888;
  --text-muted: #555555;
  --border-color: #222222;
  --border-glow: #ff202040;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-display: 'Orbitron', sans-serif;
  --radius: 4px;
  --transition: all 0.3s ease;
}

/* ── Light Theme Override (high-contrast, warm white) ────────── */
[data-theme="light"] {
  --bg-primary: #fafafa;
  --bg-secondary: #f0f0f0;
  --bg-tertiary: #e4e4e4;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f5;
  --red-primary: #b80000;
  --red-glow: #b8000040;
  --red-dark: #8a0000;
  --red-dim: #b8000014;
  --green-accent: #006b1a;
  --amber-accent: #a06000;
  --yellow-accent: #8a7200;
  --text-primary: #111111;
  --text-secondary: #3a3a3a;
  --text-muted: #777777;
  --border-color: #cccccc;
  --border-glow: #b8000028;
}

[data-theme="light"] body::before,
[data-theme="light"] body::after {
  display: none !important;
}

[data-theme="light"] body {
  background-color: #f0f0f0;
}

[data-theme="light"] .header {
  background: #fafafa;
  border-bottom: 2px solid #cccccc;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .logo {
  color: #b80000;
  text-shadow: none;
}

[data-theme="light"] .glitch::before,
[data-theme="light"] .glitch::after {
  display: none;
}

[data-theme="light"] .ticker-bar {
  background: #fafafa;
  border-top: 1px solid #cccccc;
  border-bottom: 1px solid #cccccc;
}

[data-theme="light"] .ticker-label {
  background: #b80000;
  color: #fff;
}

[data-theme="light"] .ticker-content {
  color: #1a1a1a;
}

[data-theme="light"] .tab-btn {
  color: #3a3a3a;
  border-color: #cccccc;
}

[data-theme="light"] .tab-btn:hover {
  color: #b80000;
  background: rgba(184, 0, 0, 0.06);
}

[data-theme="light"] .tab-btn.active {
  color: #b80000;
  border-color: #b80000;
  background: rgba(184, 0, 0, 0.08);
}

[data-theme="light"] .news-card {
  background: #ffffff;
  border: 1px solid #cccccc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .news-card:hover {
  border-color: #b80000;
  box-shadow: 0 2px 10px rgba(184, 0, 0, 0.1);
}

[data-theme="light"] .chat-box {
  background: #ffffff;
  border: 1px solid #cccccc;
}

[data-theme="light"] .chat-header {
  background: #f0f0f0;
  border-bottom: 1px solid #cccccc;
  color: #111;
}

[data-theme="light"] .chat-msg.ai {
  background: #eef4fb;
  color: #111111;
}

[data-theme="light"] .chat-msg.user {
  background: #b80000;
  color: #fff;
}

[data-theme="light"] .chat-input-area input {
  background: #f0f0f0;
  border-color: #cccccc;
  color: #111111;
}

[data-theme="light"] .modal-content {
  background: #fafafa;
  border-color: #cccccc;
  color: #111;
}

[data-theme="light"] .ad-label {
  color: #888;
}

[data-theme="light"] .section-header h2 {
  color: #111111;
}

[data-theme="light"] .count {
  color: #3a3a3a;
}

[data-theme="light"] .map-container {
  border-color: #cccccc;
}

[data-theme="light"] .op-dash {
  background: #ffffff !important;
  border-color: #cccccc !important;
}

[data-theme="light"] .impact-table th {
  background: #f0f0f0;
  color: #111111;
}

[data-theme="light"] .impact-table td {
  border-color: #cccccc;
  color: #222;
}

[data-theme="light"] .country-card {
  background: #ffffff;
  border-color: #cccccc;
}

[data-theme="light"] .country-card:hover {
  border-color: #b80000;
  box-shadow: 0 2px 10px rgba(184, 0, 0, 0.12);
}

[data-theme="light"] .timeline-line {
  background: #cccccc;
}

[data-theme="light"] .timeline-event {
  background: #ffffff;
  border-color: #cccccc;
}

[data-theme="light"] .destroyed-card {
  background: #ffffff;
  border-color: #cccccc;
}

[data-theme="light"] .airspace-card {
  background: #ffffff;
  border-color: #cccccc;
}

[data-theme="light"] .report-card {
  background: #ffffff;
  border-color: #cccccc;
}

[data-theme="light"] .blog-card {
  background: #ffffff;
  border-color: #cccccc;
}

[data-theme="light"] .content-article {
  background: #ffffff;
  border-color: #cccccc;
}

[data-theme="light"] .content-body blockquote {
  background: rgba(184, 0, 0, 0.05);
  border-left-color: #b80000;
}

[data-theme="light"] .content-body strong {
  color: #000;
}

[data-theme="light"] .blog-tag {
  color: #b80000;
  background: rgba(184, 0, 0, 0.1);
  border-color: rgba(184, 0, 0, 0.2);
}

[data-theme="light"] .page-btn {
  background: #fff;
  border-color: #cccccc;
  color: #3a3a3a;
}

[data-theme="light"] .btn-red {
  background: #b80000;
  color: #fff;
}

[data-theme="light"] .quick-q-btn {
  background: #f0f0f0;
  border-color: #cccccc;
  color: #222;
}

[data-theme="light"] .quick-q-btn:hover {
  border-color: #b80000;
  color: #b80000;
}

[data-theme="light"] footer {
  border-top-color: #cccccc !important;
}

[data-theme="light"] .lang-option {
  background: #f0f0f0;
  border-color: #cccccc;
  color: #111;
}

[data-theme="light"] .lang-option:hover {
  border-color: #b80000;
}

[data-theme="light"] html {
  scrollbar-color: #b80000 #f0f0f0;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f0f0f0;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #b80000;
}

/* ── Theme Toggle Button ────────────────────────────────────── */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius);
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.theme-toggle:hover {
  color: var(--red-primary);
  border-color: var(--red-primary);
}

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

html {
  scrollbar-width: thin;
  scrollbar-color: var(--red-primary) var(--bg-secondary);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--red-dark);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--red-primary);
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scanline Overlay ───────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(255, 32, 32, 0.015) 2px,
      rgba(255, 32, 32, 0.015) 4px);
  pointer-events: none;
  z-index: 9999;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
  z-index: 9998;
}

a {
  color: var(--red-primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #ff5050;
  text-shadow: 0 0 10px var(--red-glow);
}

/* ── Header ─────────────────────────────────────────────────── */
.header {
  background: linear-gradient(180deg, #0c0c0c 0%, var(--bg-primary) 100%);
  border-bottom: 1px solid var(--red-dark);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(255, 32, 32, 0.1);
}

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

.logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--red-primary);
  letter-spacing: 6px;
  text-shadow: 0 0 20px var(--red-glow), 0 0 40px rgba(255, 32, 32, 0.3);
  text-transform: uppercase;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--red-dim);
  border: 1px solid var(--red-dark);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-primary);
  animation: pulse-dot 1.5s infinite;
  box-shadow: 0 0 8px var(--red-primary);
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.8);
  }
}

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

.utc-clock {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--green-accent);
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.stats-badge {
  font-size: 11px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

/* ── Ad Wrapper & Labels ─────────────────────────────────────── */
/* TODO: Remove display:none once AdSense is approved and serving */
.ad-wrapper {
  position: relative;
  /* display: none; */
  flex-direction: column;
  align-items: center;
}

.ad-wrapper-leaderboard {
  margin: 6px auto 2px;
  padding: 6px 0 4px;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.95) 0%, rgba(15, 15, 15, 0.8) 100%);
  border-bottom: 1px solid rgba(255, 32, 32, 0.06);
}

.ad-wrapper-sidebar {
  margin-bottom: 12px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  display: block;
}

/* Desktop-only ad — hidden on tablet and mobile */
.desktop-only-ad {
  display: block;
}

/* Footer ad — leaderboard format */
.ad-wrapper-footer {
  margin-top: 16px;
  padding: 8px 0 4px;
}

.ad-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.15);
  text-align: center;
  margin-bottom: 4px;
  text-transform: uppercase;
  user-select: none;
}

/* ── Ad Banner ──────────────────────────────────────────────── */
.ad-leaderboard {
  width: 100%;
  max-width: 728px;
  min-height: 90px;
  margin: 0 auto;
  background: rgba(12, 12, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.ad-leaderboard:hover {
  border-color: rgba(255, 255, 255, 0.06);
}

/* ── Breaking News Ticker ───────────────────────────────────── */
.ticker-bar {
  background: var(--red-dark);
  border-bottom: 1px solid var(--red-primary);
  overflow: hidden;
  white-space: nowrap;
  padding: 6px 0;
  position: relative;
}

.ticker-label {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: var(--red-primary);
  color: #000;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 2;
}

.ticker-content {
  display: inline-block;
  padding-left: 160px;
  animation: ticker-scroll 60s linear infinite;
  font-size: 12px;
  color: #fff;
  letter-spacing: 0.5px;
}

.ticker-content span {
  margin-right: 60px;
}

.ticker-content span::before {
  content: '◆ ';
  color: var(--yellow-accent);
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ── Tab Navigation ─────────────────────────────────────────── */
.tabs-nav {
  display: flex;
  gap: 2px;
  padding: 12px 24px 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px 20px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.tab-btn.active {
  color: var(--red-primary);
  background: var(--bg-secondary);
  border-color: var(--border-color);
  border-bottom: 2px solid var(--red-primary);
  text-shadow: 0 0 10px var(--red-glow);
}

.tab-panel {
  display: none;
  padding: 20px 24px;
  animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Main Layout ────────────────────────────────────────────── */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
}

.main-content {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Section Headers ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--red-primary);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.section-header .count {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── News Cards ─────────────────────────────────────────────── */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--red-primary);
  padding: 14px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--red-dim) 0%, transparent 40%);
  opacity: 0;
  transition: var(--transition);
}

.news-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--red-dark);
  transform: translateX(4px);
}

.news-card:hover::before {
  opacity: 1;
}

.news-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

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

.category-dot.war {
  background: var(--red-primary);
  box-shadow: 0 0 6px var(--red-glow);
}

.category-dot.military {
  background: var(--amber-accent);
}

.category-dot.diplomatic {
  background: var(--yellow-accent);
}

.source-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.time-ago {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
}

.news-card h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  position: relative;
  z-index: 1;
}

.country-tags {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.country-tag {
  font-size: 9px;
  color: var(--red-primary);
  background: var(--red-dim);
  padding: 2px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Map ────────────────────────────────────────────────────── */
.map-container {
  width: 100%;
  height: 420px;
  border-radius: 8px;
  border: 1px solid rgba(255, 32, 32, 0.15);
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 40px rgba(255, 32, 32, 0.06), inset 0 0 60px rgba(0, 0, 0, 0.3);
}

.map-container-full {
  height: calc(100vh - 200px);
}

#war-map,
#war-map-full {
  width: 100%;
  height: 100%;
  background: #0a0a0a;
}

/* Operational dashboard animations */
@keyframes scanline {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 4px #ff2020;
  }

  50% {
    opacity: 0.4;
    box-shadow: 0 0 12px #ff2020;
  }
}

/* Make labels semi-transparent so markers pop */
.leaflet-pane.leaflet-shadow-pane {
  opacity: 0.55;
}

/* Animated attack route lines */
.attack-line {
  animation: missile-flow 2s linear infinite;
}

@keyframes missile-flow {
  0% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: -28;
  }
}

/* Attack line glow effect */
.leaflet-overlay-pane svg path.attack-line {
  filter: drop-shadow(0 0 3px rgba(255, 32, 32, 0.6));
}

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--red-dark) !important;
  border-radius: var(--radius) !important;
  font-family: var(--font-mono) !important;
  box-shadow: 0 4px 20px rgba(255, 32, 32, 0.2) !important;
}

.leaflet-popup-tip {
  background: var(--bg-card) !important;
  border: 1px solid var(--red-dark) !important;
}

.leaflet-popup-content {
  font-size: 12px !important;
  line-height: 1.5 !important;
  max-width: 280px !important;
  margin: 10px 12px !important;
}

/* Mobile popup fix — prevent overflow */
@media (max-width: 768px) {
  .leaflet-popup-content {
    max-width: calc(100vw - 80px) !important;
    font-size: 11px !important;
  }

  .leaflet-popup-content-wrapper {
    max-width: calc(100vw - 40px) !important;
  }

  .popup-title {
    font-size: 11px !important;
    letter-spacing: 1px !important;
  }

  .popup-news-item {
    font-size: 10px !important;
  }
}

.popup-title {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--red-primary);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.popup-news-item {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 11px;
}

.popup-news-item:last-child {
  border-bottom: none;
}

.popup-news-item a {
  color: var(--text-primary);
}

.popup-news-item a:hover {
  color: var(--red-primary);
}

.popup-news-time {
  font-size: 9px;
  color: var(--text-muted);
}

/* Pulse Marker Animation */
.pulse-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red-primary);
  box-shadow: 0 0 10px var(--red-primary);
  position: relative;
}

.pulse-marker::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--red-primary);
  transform: translate(-50%, -50%);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    width: 12px;
    height: 12px;
    opacity: 1;
  }

  100% {
    width: 50px;
    height: 50px;
    opacity: 0;
  }
}

/* ── Markets Panel ──────────────────────────────────────────── */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.market-card:hover {
  border-color: var(--red-dark);
}

.market-name {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.market-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.market-change {
  font-size: 12px;
  margin-top: 4px;
}

.market-change.up {
  color: var(--green-accent);
}

.market-change.down {
  color: var(--red-primary);
}

.impact-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 12px;
}

.impact-table th {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 2px solid var(--red-dark);
  color: var(--red-primary);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.impact-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.impact-table tr:hover td {
  background: var(--bg-secondary);
}

/* ── AI Chat ────────────────────────────────────────────────── */
.chat-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header h3 {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--red-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.chat-config {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-config select,
.chat-config input {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius);
  outline: none;
  width: 100%;
}

.chat-config select:focus,
.chat-config input:focus {
  border-color: var(--red-primary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
}

.chat-msg {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.5;
  max-width: 90%;
  word-wrap: break-word;
}

.chat-msg.user {
  background: var(--red-dim);
  border: 1px solid var(--red-dark);
  align-self: flex-end;
  color: var(--text-primary);
}

.chat-msg.ai {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  color: var(--text-primary);
}

.chat-input-area {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius);
  outline: none;
}

.chat-input-area input:focus {
  border-color: var(--red-primary);
}

.quick-questions {
  padding: 8px 16px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
}

.quick-q-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.quick-q-btn:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

/* ── Tweet Generator ────────────────────────────────────────── */
.tweet-gen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.tweet-config {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tweet-config label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tweet-config select,
.tweet-config textarea {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius);
  outline: none;
  resize: vertical;
}

.tweet-config select:focus,
.tweet-config textarea:focus {
  border-color: var(--red-primary);
}

.tweet-output {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tweet-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  min-height: 120px;
  white-space: pre-wrap;
}

.hashtag-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hashtag-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  background: var(--red-dim);
  border: 1px solid var(--red-dark);
  color: var(--red-primary);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.hashtag-chip:hover {
  background: var(--red-primary);
  color: #000;
}

.tips-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-top: 12px;
}

.tips-box h4 {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--amber-accent);
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.tips-box ul {
  list-style: none;
  font-size: 11px;
  color: var(--text-secondary);
}

.tips-box ul li::before {
  content: '▸ ';
  color: var(--red-primary);
}

.tips-box ul li {
  margin-bottom: 4px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-red {
  background: var(--red-primary);
  color: #000;
  border-color: var(--red-primary);
}

.btn-red:hover {
  background: #ff4040;
  box-shadow: 0 0 20px var(--red-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

.btn-outline:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

.btn-x {
  background: #000;
  color: #fff;
  border-color: #333;
}

.btn-x:hover {
  background: #1a1a1a;
  border-color: #555;
}

/* ── Ad Sidebar ─────────────────────────────────────────────── */
.ad-rectangle {
  width: 300px;
  min-height: 250px;
  background: rgba(12, 12, 12, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
  border-radius: 6px;
  transition: opacity 0.3s ease;
}

.ad-rectangle:hover {
  border-color: rgba(255, 255, 255, 0.06);
}

/* ── Loading & States ───────────────────────────────────────── */
.loading-skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--red-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.empty-state {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 13px;
}

.empty-state .icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
    padding: 0 12px;
  }

  .sidebar {
    order: -1;
  }

  /* Hide sidebar ads on tablet and below */
  .desktop-only-ad {
    display: none !important;
  }

  .tweet-gen {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .logo {
    font-size: 20px;
    letter-spacing: 4px;
  }

  .tabs-nav {
    padding: 8px 12px 0;
  }

  .tab-btn {
    padding: 8px 12px;
    font-size: 10px;
  }

  .tab-panel {
    padding: 12px;
  }

  .map-container {
    height: 300px;
  }

  /* Mobile AI Chat improvements */
  .chat-box {
    height: auto;
    min-height: 400px;
  }

  .chat-messages {
    max-height: 300px;
    min-height: 200px;
  }

  .chat-input-area {
    padding: 10px 10px;
    gap: 6px;
    position: sticky;
    bottom: 0;
    background: var(--bg-card);
    z-index: 10;
  }

  .chat-input-area input {
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 8px;
    min-height: 44px;
    -webkit-appearance: none;
  }

  .chat-input-area .btn {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 8px;
  }

  .quick-questions {
    padding: 6px 10px;
    gap: 4px;
  }

  .quick-q-btn {
    font-size: 9px;
    padding: 5px 8px;
  }

  .chat-header h3 {
    font-size: 11px;
  }

  .ad-wrapper-leaderboard {
    padding: 4px 0 2px;
  }

  .ad-leaderboard {
    min-height: 60px;
  }

  .ad-wrapper-sidebar {
    display: none !important;
  }

  .desktop-only-ad {
    display: none !important;
  }

  .ad-rectangle {
    width: 100%;
    min-height: 100px;
  }

  /* Footer leaderboard stays but scales down */
  .ad-leaderboard {
    min-height: 60px;
    max-width: 100%;
  }
}

/* ── Notification Toast ─────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--red-dark);
  border-left: 3px solid var(--red-primary);
  padding: 12px 20px;
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 12px;
  z-index: 10000;
  animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ── Glitch Effect for Heading ──────────────────────────────── */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch::before {
  animation: glitch-1 2s infinite linear;
  color: #0ff;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

.glitch::after {
  animation: glitch-2 2s infinite linear;
  color: #f0f;
  clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {

  0%,
  95% {
    transform: none;
  }

  96% {
    transform: translate(-2px, -1px);
  }

  97% {
    transform: translate(2px, 1px);
  }

  98% {
    transform: translate(-1px, 2px);
  }

  99% {
    transform: none;
  }
}

@keyframes glitch-2 {

  0%,
  95% {
    transform: none;
  }

  96% {
    transform: translate(2px, 1px);
  }

  97% {
    transform: translate(-2px, -1px);
  }

  98% {
    transform: translate(1px, -2px);
  }

  99% {
    transform: none;
  }
}

/* ── Country Cards ─────────────────────────────────────────── */
.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.country-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.country-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--red-primary);
  transition: var(--transition);
}

.country-card:hover {
  border-color: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255, 32, 32, 0.15);
}

.country-card:hover::before {
  width: 6px;
}

.country-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.country-flag {
  font-size: 28px;
  line-height: 1;
}

.country-name {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 700;
}

.country-status {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  display: inline-block;
  margin-top: 4px;
}

.country-status.active-war {
  background: var(--red-dim);
  color: var(--red-primary);
  border: 1px solid var(--red-primary);
}

.country-status.high-tension {
  background: rgba(255, 165, 0, 0.1);
  color: var(--amber-accent);
  border: 1px solid var(--amber-accent);
}

.country-status.escalating {
  background: rgba(255, 255, 0, 0.1);
  color: var(--yellow-accent);
  border: 1px solid var(--yellow-accent);
}

.country-status.monitoring {
  background: rgba(100, 100, 100, 0.1);
  color: var(--text-muted);
  border: 1px solid var(--text-muted);
}

.country-article-count {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 8px;
}

.country-summary {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Country Detail Modal ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--red-dark);
  border-radius: 6px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(255, 32, 32, 0.15);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.detail-flag {
  font-size: 48px;
}

.detail-name {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--red-primary);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.detail-section {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.detail-section h4 {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--red-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.detail-section p,
.detail-section li {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.detail-section ul {
  list-style: none;
  padding: 0;
}

.detail-section ul li::before {
  content: '▸ ';
  color: var(--red-primary);
}

.conflict-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
}

.conflict-row:last-child {
  border-bottom: none;
}

.conflict-opponent {
  color: var(--text-primary);
  font-weight: 600;
}

.conflict-reason {
  color: var(--text-secondary);
  flex: 1;
  margin: 0 12px;
}

.conflict-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
}

.conflict-status.active {
  background: var(--red-dim);
  color: var(--red-primary);
}

.conflict-status.escalating {
  background: rgba(255, 165, 0, 0.1);
  color: var(--amber-accent);
}

.conflict-status.ceasefire {
  background: rgba(0, 255, 0, 0.1);
  color: var(--green-accent);
}

/* ── Map: Base Markers ─────────────────────────────────────── */
.base-marker {
  width: 18px;
  height: 18px;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  filter: drop-shadow(0 0 4px rgba(255, 200, 0, 0.6));
}

/* ── Map: City Attack Markers ──────────────────────────────── */
.city-attack-marker {
  position: relative;
  width: 14px;
  height: 14px;
}

.city-attack-marker .city-core {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2020;
  box-shadow: 0 0 8px rgba(255, 32, 32, 0.8);
}

.city-attack-marker .city-pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #ff2020;
  animation: city-ring-pulse 1.5s infinite;
}

@keyframes city-ring-pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ── Map: Target Markers ───────────────────────────────────── */
.target-marker {
  font-size: 14px;
  line-height: 16px;
  text-align: center;
  filter: drop-shadow(0 0 4px rgba(255, 0, 0, 0.5));
}

/* ── Map: Cluster Markers ──────────────────────────────────── */
.cluster-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.cluster-marker span {
  position: relative;
  z-index: 2;
}

.cluster-small {
  background: radial-gradient(circle, rgba(255, 32, 32, 0.85), rgba(139, 0, 0, 0.6));
  border: 2px solid #ff2020;
  box-shadow: 0 0 12px rgba(255, 32, 32, 0.5);
  font-size: 11px;
}

.cluster-medium {
  background: radial-gradient(circle, rgba(255, 100, 0, 0.85), rgba(180, 0, 0, 0.6));
  border: 2px solid #ff6600;
  box-shadow: 0 0 18px rgba(255, 100, 0, 0.6);
  font-size: 13px;
}

.cluster-large {
  background: radial-gradient(circle, rgba(255, 32, 32, 0.95), rgba(200, 0, 0, 0.7));
  border: 2px solid #ff2020;
  box-shadow: 0 0 24px rgba(255, 32, 32, 0.7);
  font-size: 15px;
}

/* Override Leaflet MarkerCluster default styles */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.marker-cluster {
  background: none !important;
}

.marker-cluster div {
  background: none !important;
}

/* ── Pulse Marker Variants ─────────────────────────────────── */
.pulse-marker-red .pulse-core {
  background: #ff2020;
  box-shadow: 0 0 10px #ff2020;
}

.pulse-marker-red .pulse-ring {
  border-color: #ff2020;
}

.pulse-marker-orange .pulse-core {
  background: #ffa500;
  box-shadow: 0 0 10px #ffa500;
}

.pulse-marker-orange .pulse-ring {
  border-color: #ffa500;
}

.pulse-marker-yellow .pulse-core {
  background: #ffd700;
  box-shadow: 0 0 10px #ffd700;
}

.pulse-marker-yellow .pulse-ring {
  border-color: #ffd700;
}

.pulse-marker .pulse-core {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  top: 5px;
  left: 5px;
}

.pulse-marker .pulse-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ff2020;
  animation: pulse-ring 2s infinite;
}

.pulse-marker {
  position: relative;
  width: 20px;
  height: 20px;
}

/* ── Attack Arrows (dashed animated lines) ─────────────────── */
.attack-line {
  animation: dash-flow 1.5s linear infinite;
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -28;
  }
}

/* ── Map Legend ─────────────────────────────────────────────── */
.map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 500;
  background: rgba(8, 8, 8, 0.9);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 10px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.map-legend .legend-title {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.legend-dot.red {
  background: #ff2020;
  box-shadow: 0 0 6px #ff2020;
}

.legend-dot.orange {
  background: #ffa500;
  box-shadow: 0 0 6px #ffa500;
}

.legend-dot.yellow {
  background: #ffd700;
  box-shadow: 0 0 6px #ffd700;
}

.legend-dot.gold {
  background: #ffcc00;
  box-shadow: 0 0 6px #ffcc00;
}

.legend-arrow {
  width: 20px;
  height: 2px;
  background: #ff2020;
  position: relative;
  flex-shrink: 0;
}

.legend-arrow::after {
  content: '▶';
  position: absolute;
  right: -8px;
  top: -6px;
  font-size: 8px;
  color: #ff2020;
}

/* ── Language Button (Header) ──────────────────────────────── */
.lang-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-btn:hover {
  border-color: var(--red-primary);
  box-shadow: 0 0 8px var(--red-glow);
  color: #fff;
}

/* ── Language Modal ────────────────────────────────────────── */
.lang-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.lang-modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.lang-modal-content h3 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--red-primary);
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.lang-modal-content p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-mono);
}

.lang-option:hover {
  border-color: var(--red-primary);
  background: rgba(255, 32, 32, 0.1);
  box-shadow: 0 0 8px var(--red-glow);
}

.lang-flag {
  font-size: 18px;
}

.lang-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Google Translate Overrides ─────────────────────────────── */
#google_translate_element {
  position: absolute;
  top: -9999px;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.goog-te-banner-frame {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

.skiptranslate {
  display: none !important;
  height: 0 !important;
}

#goog-gt-tt {
  display: none !important;
}

body {
  top: 0 !important;
  position: static !important;
}

.goog-te-gadget {
  font-size: 0 !important;
}

iframe.goog-te-banner-frame {
  display: none !important;
}

.goog-tooltip {
  display: none !important;
}

.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background: none !important;
  box-shadow: none !important;
}

/* ── Destroyed Places Styles ────────────────────────────────── */
.destroyed-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.destroyed-stat-chip {
  font-size: 10px;
  padding: 3px 8px;
  background: rgba(255, 32, 32, 0.1);
  border: 1px solid rgba(255, 32, 32, 0.2);
  border-radius: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.destroyed-stat-chip b {
  color: var(--red-primary);
  margin-left: 4px;
}

.destroyed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.destroyed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px;
  transition: border-color 0.2s;
  border-left: 3px solid #ff4400;
}

.destroyed-card:hover {
  border-color: rgba(255, 68, 0, 0.5);
}

.destroyed-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.destroyed-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.destroyed-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.destroyed-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.destroyed-status {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.destroyed-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.destroyed-attacker {
  font-size: 10px;
  color: #ff6600;
  margin-bottom: 4px;
}

.destroyed-sig {
  font-size: 10px;
  color: var(--amber-accent);
  font-style: italic;
  margin-bottom: 4px;
}

.destroyed-time {
  font-size: 9px;
  color: var(--text-muted);
  text-align: right;
}

/* ── FAQ Styles ────────────────────────────────────────────── */
.faq-item {
  margin-bottom: 12px;
  padding: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  border-left: 3px solid var(--amber-accent);
}

.faq-q {
  font-size: 12px;
  color: var(--amber-accent);
  font-weight: 600;
  margin-bottom: 4px;
}

.faq-a {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   TIMELINE — Intelligence briefing-style war event timeline
   ═══════════════════════════════════════════════════════════════ */

/* Stats bar on top */
.tl-stats-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 10px 20px;
  margin: 0 24px 16px;
}

.tl-stats-inner {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.tl-stat-item {
  white-space: nowrap;
}

.tl-stat-item strong {
  color: var(--text-primary);
}

.tl-stat-sep {
  color: var(--border-color);
  font-size: 10px;
  user-select: none;
}

.tl-stat-total {
  margin-left: auto;
  color: var(--text-primary);
}

/* Severity filter buttons */
.timeline-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tl-filter-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.5px;
}

.tl-filter-btn:hover {
  border-color: var(--red-primary);
  color: var(--text-primary);
  box-shadow: 0 0 8px var(--red-glow);
}

.tl-filter-btn.active {
  background: var(--red-primary);
  border-color: var(--red-primary);
  color: #fff;
  box-shadow: 0 0 12px var(--red-glow);
}

/* Country filter buttons */
.tl-country-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tl-country-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.tl-country-btn:hover {
  border-color: var(--amber-accent);
  color: var(--text-primary);
}

.tl-country-btn.active {
  background: rgba(255, 165, 0, 0.15);
  border-color: var(--amber-accent);
  color: var(--amber-accent);
}

/* Timeline container */
.timeline-container {
  position: relative;
  padding-left: 32px;
  min-height: 200px;
}

.timeline-line {
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--red-primary) 0%, rgba(255, 32, 32, 0.15) 100%);
  border-radius: 2px;
}

/* Date group with separator lines */
.tl-date-group {
  position: relative;
  margin-bottom: 8px;
  margin-top: 24px;
}

.tl-date-group:first-child {
  margin-top: 0;
}

.tl-date-separator {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tl-date-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--red-primary), transparent);
}

.tl-date-line:last-child {
  background: linear-gradient(90deg, transparent, var(--red-primary));
}

.tl-date-label {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 5px 14px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--red-primary);
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

/* Individual timeline event */
.tl-event {
  position: relative;
  margin-bottom: 16px;
  opacity: 0;
  animation: tl-slide-in 0.4s ease forwards;
}

@keyframes tl-slide-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Severity dot on the timeline line */
.tl-dot {
  position: absolute;
  left: -28px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  z-index: 3;
  border: 2px solid var(--bg-primary);
}

/* Event card */
.tl-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 14px 16px;
  transition: var(--transition);
  position: relative;
}

.tl-card::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 14px;
  width: 8px;
  height: 8px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transform: rotate(45deg);
}

.tl-card:hover {
  border-color: var(--red-primary);
  box-shadow: 0 0 16px rgba(255, 32, 32, 0.1);
  transform: translateY(-1px);
}

/* Card header */
.tl-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}

.tl-severity {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.tl-time {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Title */
.tl-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 6px;
}

/* Source line */
.tl-source {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

/* Event details (2-3 sentence briefing) */
.tl-details {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
  padding: 8px 10px;
  background: var(--bg-tertiary);
  border-left: 2px solid var(--red-primary);
  border-radius: 0 4px 4px 0;
}

/* Casualties line */
.tl-casualties {
  font-size: 10px;
  color: #ff6666;
  font-family: var(--font-mono);
  margin-bottom: 6px;
}

/* Weapons tags */
.tl-weapons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  font-size: 10px;
  color: var(--text-muted);
}

.tl-weapon-tag {
  font-size: 9px;
  color: #ff8888;
  background: rgba(255, 32, 32, 0.08);
  border: 1px solid rgba(255, 32, 32, 0.2);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Read full article link */
.tl-read-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  font-family: var(--font-display);
  letter-spacing: 1px;
  color: var(--red-primary);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(255, 32, 32, 0.3);
  border-radius: var(--radius);
  transition: var(--transition);
}

.tl-read-more:hover {
  background: rgba(255, 32, 32, 0.1);
  border-color: var(--red-primary);
  box-shadow: 0 0 8px var(--red-glow);
}

/* Tags */
.tl-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.tl-tag {
  font-size: 9px;
  color: var(--amber-accent);
  background: rgba(255, 165, 0, 0.1);
  border: 1px solid rgba(255, 165, 0, 0.25);
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

/* Loading state */
.tl-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.tl-loading p {
  margin-top: 10px;
  font-size: 12px;
}

/* Empty state */
.tl-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Load more */
.timeline-load-more {
  text-align: center;
  padding: 20px 0;
}

/* ── Timeline Sidebar Stats ────────────────────────────────── */
.timeline-stats-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
}

.timeline-stats-box h4 {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--red-primary);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

/* Severity chart */
.tl-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.tl-chart-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tl-chart-label {
  font-size: 9px;
  font-family: var(--font-display);
  letter-spacing: 1px;
  color: var(--text-secondary);
  width: 72px;
  flex-shrink: 0;
}

.tl-chart-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
}

.tl-chart-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.tl-chart-pct {
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 600;
  width: 28px;
  text-align: right;
  flex-shrink: 0;
}

/* Top countries */
.tl-top-title {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--amber-accent);
  letter-spacing: 1.5px;
  margin-bottom: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.tl-top-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tl-top-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.tl-top-item:hover {
  background: var(--bg-tertiary);
}

.tl-top-rank {
  font-size: 9px;
  color: var(--text-muted);
  font-family: var(--font-display);
  letter-spacing: 1px;
  width: 20px;
}

.tl-top-flag {
  font-size: 14px;
}

.tl-top-name {
  font-size: 11px;
  color: var(--text-primary);
  flex: 1;
  text-transform: capitalize;
}

.tl-top-cnt {
  font-size: 11px;
  font-weight: 700;
  color: var(--red-primary);
  background: rgba(255, 32, 32, 0.1);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
}

/* Responsive */
@media (max-width: 768px) {
  .tl-stats-bar {
    margin: 0 12px 12px;
    padding: 8px 12px;
  }

  .tl-stats-inner {
    font-size: 10px;
    gap: 4px;
  }

  .tl-stat-total {
    margin-left: 0;
  }

  .tl-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Responsive: Country Cards ─────────────────────────────── */
@media (max-width: 768px) {
  .country-grid {
    grid-template-columns: 1fr 1fr;
  }

  .modal-content {
    width: 95%;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .country-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════
   AIRSPACE STATUS CARDS
   ══════════════════════════════════════════════════════════════ */
.airspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 0 24px 24px;
}

.airspace-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: var(--transition);
}

.airspace-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.airspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.airspace-icao {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
}

.airspace-status {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.airspace-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.airspace-location {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.airspace-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

/* ══════════════════════════════════════════════════════════════
   DAILY REPORTS LIST
   ══════════════════════════════════════════════════════════════ */
.reports-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: var(--transition);
  border-left: 3px solid var(--red-primary);
}

.report-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateX(4px);
}

.report-date {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--red-primary);
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.report-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.report-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.report-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.report-read-link {
  color: var(--red-primary);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.5px;
}

/* ══════════════════════════════════════════════════════════════
   BLOG POSTS GRID
   ══════════════════════════════════════════════════════════════ */
.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: var(--transition);
}

.blog-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.blog-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.blog-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-date {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.blog-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-tag {
  font-size: 9px;
  color: var(--red-primary);
  background: rgba(255, 32, 32, 0.1);
  border: 1px solid rgba(255, 32, 32, 0.2);
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════ */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 20px 0;
  grid-column: 1 / -1;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
}

.page-btn:hover,
.page-btn.active {
  background: var(--red-primary);
  color: #fff;
  border-color: var(--red-primary);
}

/* ══════════════════════════════════════════════════════════════
   CONTENT PAGE (individual report/blog view)
   ══════════════════════════════════════════════════════════════ */
.content-page-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 24px 40px;
}

.content-back-btn {
  margin-bottom: 20px;
  font-size: 12px;
  padding: 8px 16px;
}

.content-article {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
}

.content-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.content-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.content-body {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.8;
}

.content-body h2 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--red-primary);
  margin: 24px 0 12px;
  letter-spacing: 1px;
}

.content-body h3 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--amber-accent);
  margin: 20px 0 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.content-body p {
  margin-bottom: 14px;
}

.content-body strong {
  color: #fff;
}

.content-body blockquote {
  border-left: 3px solid var(--red-primary);
  padding: 12px 16px;
  margin: 16px 0;
  background: rgba(255, 32, 32, 0.05);
  color: var(--text-secondary);
  font-style: italic;
}

.content-body ul,
.content-body ol {
  margin: 12px 0;
  padding-left: 24px;
}

.content-body li {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.content-ads {
  margin-top: 24px;
}

/* ── Responsive: New Sections ──────────────────────────────── */
@media (max-width: 768px) {
  .airspace-grid {
    grid-template-columns: 1fr 1fr;
    padding: 0 12px 16px;
  }

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

  .content-article {
    padding: 20px 16px;
  }

  .content-title {
    font-size: 18px;
  }

  .content-page-wrapper {
    padding: 16px 12px 30px;
  }
}

@media (max-width: 480px) {
  .airspace-grid {
    grid-template-columns: 1fr;
  }

  .tabs-nav {
    flex-wrap: wrap;
  }
}

/* ══════════════════════════════════════════════════════════════
   SUPPORT POPUP
   ══════════════════════════════════════════════════════════════ */
.support-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.support-overlay.show {
  display: flex;
  animation: supportFadeIn 0.3s;
}

.support-box {
  background: var(--bg-secondary, #111);
  border: 1px solid var(--red-primary);
  border-radius: 12px;
  padding: 28px 24px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: supportPopIn 0.3s;
}

.support-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.support-close:hover {
  color: var(--red-primary);
}

.support-emoji {
  font-size: 36px;
  margin-bottom: 12px;
}

.support-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--red-primary);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.support-msg {
  font-size: 13px;
  color: var(--text-primary, #ccc);
  line-height: 1.6;
  margin-bottom: 6px;
}

.support-msg-regional {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  font-style: italic;
}

.support-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--red-primary);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.support-btn:hover {
  background: #ff4444;
  transform: translateY(-1px);
}

@keyframes supportFadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes supportPopIn {
  from {
    transform: scale(0.9);
    opacity: 0
  }

  to {
    transform: scale(1);
    opacity: 1
  }
}

[data-theme="light"] .support-box {
  background: #fff;
  border-color: #b80000;
}

[data-theme="light"] .support-title {
  color: #b80000;
}

[data-theme="light"] .support-btn {
  background: #b80000;
}

/* ═══════════════════════════════════════════════════════════════
   MY IMPACT — Personalized war impact styles
   ═══════════════════════════════════════════════════════════════ */

/* ── Loading / Scanning Animation ───────────────────────────── */
.impact-loading {
  padding: 40px 20px;
  text-align: center;
}

.impact-scan-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 40px 24px;
  background: rgba(255, 32, 32, 0.04);
  border: 1px solid rgba(255, 32, 32, 0.15);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.impact-scan-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff2020, transparent);
  animation: impactScanLine 2s linear infinite;
}

@keyframes impactScanLine {
  0% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

.impact-scan-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: impactPulse 1.5s ease infinite;
}

@keyframes impactPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
}

.impact-scan-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--red-primary);
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.impact-scan-steps {
  text-align: left;
  margin-bottom: 24px;
}

.impact-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.4;
  transition: all 0.4s ease;
}

.impact-step.active {
  opacity: 1;
  color: var(--text-primary);
}

.impact-step .step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.impact-step.active .step-dot {
  background: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.5);
}

.impact-progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.impact-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff2020, #ffa500);
  border-radius: 3px;
  transition: width 0.6s ease;
}

/* ── Hero Section (Score + Country) ─────────────────────────── */
.impact-hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.impact-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff2020, #ffa500, transparent);
}

.impact-score-circle {
  position: relative;
  width: 130px;
  height: 130px;
  flex-shrink: 0;
}

.impact-score-circle svg {
  width: 130px;
  height: 130px;
  transform: rotate(-90deg);
}

.impact-score-circle .score-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 8;
}

.impact-score-circle .score-fill {
  fill: none;
  stroke: #ff2020;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.73;
  stroke-dashoffset: 326.73;
  transition: stroke-dashoffset 1.5s ease;
}

.score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: #ff2020;
}

.score-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--text-muted);
  white-space: nowrap;
}

.impact-hero-info {
  flex: 1;
}

.impact-flag {
  font-size: 40px;
  margin-bottom: 4px;
}

.impact-hero-info h3 {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-primary);
  margin: 0 0 8px;
  letter-spacing: 1px;
}

.impact-risk-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 12px;
}

.risk-low {
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.risk-moderate {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.risk-high {
  background: rgba(255, 165, 0, 0.15);
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.3);
}

.risk-critical {
  background: rgba(255, 32, 32, 0.15);
  color: #ff2020;
  border: 1px solid rgba(255, 32, 32, 0.3);
}

.impact-summary {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* ── Category Cards Grid ────────────────────────────────────── */
.impact-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.impact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.impact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 32, 32, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.impact-card:hover::before {
  opacity: 1;
}

.impact-card:hover {
  border-color: rgba(255, 32, 32, 0.3);
  transform: translateY(-2px);
}

.impact-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.impact-card-icon {
  font-size: 22px;
}

.impact-card-header h4 {
  flex: 1;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin: 0;
}

.impact-card-score {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  color: #ffa500;
}

.impact-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.impact-card-details {
  list-style: none;
  padding: 0;
  margin: 0;
}

.impact-card-details li {
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 0 4px 16px;
  position: relative;
  line-height: 1.6;
}

.impact-card-details li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--red-primary);
  font-size: 10px;
}

/* ── What You Should Know ───────────────────────────────────── */
.impact-know-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.impact-know-section h3 {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--red-primary);
  margin: 0 0 14px;
}

.impact-know-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.impact-know-section li {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 0 8px 20px;
  position: relative;
  line-height: 1.7;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.impact-know-section li:last-child {
  border-bottom: none;
}

.impact-know-section li::before {
  content: '⚡';
  position: absolute;
  left: 0;
  font-size: 10px;
}

/* ── Share Button ───────────────────────────────────────────── */
.impact-share {
  text-align: center;
  padding: 10px 0 20px;
}

.impact-share-btn {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 12px 28px;
  cursor: pointer;
}

/* ── Mobile Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
  .impact-hero {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px 16px;
  }

  .impact-score-circle {
    width: 110px;
    height: 110px;
  }

  .impact-score-circle svg {
    width: 110px;
    height: 110px;
  }

  .score-value {
    font-size: 30px;
  }

  .impact-flag {
    font-size: 32px;
  }

  .impact-hero-info h3 {
    font-size: 16px;
  }

  .impact-categories {
    grid-template-columns: 1fr;
  }

  .impact-scan-container {
    padding: 24px 16px;
  }
}

/* ── Light theme overrides ──────────────────────────────────── */
[data-theme="light"] .impact-scan-container {
  background: rgba(200, 0, 0, 0.04);
  border-color: rgba(200, 0, 0, 0.12);
}

[data-theme="light"] .impact-hero::before {
  background: linear-gradient(90deg, transparent, #b80000, #cc6600, transparent);
}

[data-theme="light"] .impact-card:hover {
  border-color: rgba(200, 0, 0, 0.3);
}

[data-theme="light"] .impact-know-section li {
  border-bottom-color: rgba(0, 0, 0, 0.05);
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */
.site-footer {
  text-align: center;
  padding: 24px 20px;
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 11px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--red-primary);
}

.footer-sep {
  color: var(--text-muted);
  font-size: 8px;
}

.footer-copy {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 12px;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER PAGE OVERLAY (Contact, About, Privacy)
   ══════════════════════════════════════════════════════════════ */
.footer-page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  overflow-y: auto;
}

.footer-page-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  padding: 32px;
  position: relative;
  animation: footerPageIn 0.2s ease-out;
}

@keyframes footerPageIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-page-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.footer-page-close:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
}

.footer-page-title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--red-primary);
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .footer-page-overlay {
    padding: 20px 12px;
  }

  .footer-page-container {
    padding: 20px 16px;
  }

  .footer-links {
    gap: 6px;
  }

  .footer-links a {
    font-size: 10px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   FULLSCREEN OVERLAYS — Map & Chat
   ═══════════════════════════════════════════════════════════════ */

/* Map fullscreen */
.map-fullscreen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
}

.map-fullscreen-overlay .map-fs-header {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.map-fullscreen-overlay .map-fs-header h3 {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--red-primary);
  letter-spacing: 2px;
  margin: 0;
}

.map-fullscreen-overlay .map-fs-close {
  margin-left: auto;
  font-size: 18px;
  background: rgba(255, 32, 32, 0.1);
  border: 1px solid rgba(255, 32, 32, 0.3);
  color: #ff4444;
  border-radius: 4px;
  padding: 4px 12px;
  cursor: pointer;
  font-family: var(--font-mono);
}

.map-fullscreen-overlay #war-map-fs {
  flex: 1;
  width: 100%;
}

/* Chat fullscreen */
.chat-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9998 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  border-radius: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--bg-primary) !important;
}

.chat-fullscreen .chat-messages {
  flex: 1 !important;
  max-height: none !important;
  height: auto !important;
}

.chat-fullscreen .chat-input-area {
  padding: 12px 16px !important;
  border-top: 1px solid var(--border-color);
}

.chat-fullscreen .chat-input-area input {
  font-size: 14px !important;
  padding: 12px 16px !important;
}

@media (max-width: 768px) {
  .chat-fullscreen .chat-header h3 {
    font-size: 13px;
  }

  .chat-fullscreen .chat-messages {
    padding: 8px;
  }

  .chat-fullscreen .quick-questions {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}
/* ══════════════════════════════════════════════════════════════
   NOVEMBER 2026 REVIVAL — the original design back on the homepage,
   plus live flights, live TV & cams and crawlable links.
   ══════════════════════════════════════════════════════════════ */

/* The wordmark is a home link now; the page's H1 names what it is. */
a.logo {
  text-decoration: none;
  display: inline-block;
}

.map-section {
  padding: 20px 24px 0;
}

.section-header h1 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--red-primary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
}

[data-theme="light"] .section-header h1 {
  text-shadow: none;
}

.header-coffee-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 170, 0, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 170, 0, 0.08);
  color: var(--amber-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.header-coffee-btn:hover {
  background: rgba(255, 170, 0, 0.18);
  border-color: var(--amber-accent);
  color: #fff;
}

/* Report and blog cards are real links now. */
a.report-card,
a.blog-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Basemap attribution (required by OpenStreetMap and CARTO). */
.leaflet-container .leaflet-control-attribution {
  background: rgba(8, 8, 8, 0.7);
  color: #777;
  font-size: 10px;
  font-family: var(--font-mono);
}

.leaflet-container .leaflet-control-attribution a {
  color: #999;
}

[data-theme="light"] .leaflet-container .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.8);
  color: #555;
}

/* Raster fallback for browsers without WebGL: darken OpenStreetMap tiles. */
:root:not([data-theme="light"]) .osm-raster-tiles {
  filter: invert(1) hue-rotate(180deg) brightness(0.75) contrast(0.9);
}

/* ── Live flights ───────────────────────────────────────────── */
.flights-regions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.flight-region-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.flight-region-btn:hover {
  color: var(--text-primary);
  border-color: var(--red-primary);
}

.flight-region-btn.active {
  color: var(--red-primary);
  border-color: var(--red-primary);
  background: var(--red-dim);
}

.flights-map-wrap {
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(255, 32, 32, 0.15);
  overflow: hidden;
}

#flights-map {
  width: 100%;
  height: 460px;
  background: #0a0a0a;
}

.flights-map-status {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 500;
  padding: 5px 10px;
  border-radius: var(--radius);
  background: rgba(8, 8, 8, 0.82);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 12px;
  pointer-events: none;
}

.flights-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 10px 0 0;
}

.flights-note a {
  color: var(--red-primary);
}

.plane-marker {
  width: 18px;
  height: 18px;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
}

.plane-marker svg {
  display: block;
}

/* ── Live TV & cams ─────────────────────────────────────────── */
.livetv-note {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 14px;
}

.livetv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.livetv-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  transition: var(--transition);
}

.livetv-card:hover {
  border-color: rgba(255, 32, 32, 0.4);
}

.livetv-play {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 32, 32, 0.16), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px),
    #0b0b0b;
  color: var(--text-primary);
  font-family: var(--font-mono);
  cursor: pointer;
  text-decoration: none;
}

.livetv-play-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 32, 32, 0.6);
  background: rgba(255, 32, 32, 0.15);
  color: var(--red-primary);
  font-size: 16px;
  box-shadow: 0 0 18px var(--red-glow);
}

.livetv-play:hover .livetv-play-icon {
  background: rgba(255, 32, 32, 0.3);
}

.livetv-name {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.livetv-region {
  font-size: 12px;
  color: var(--text-secondary);
}

.livetv-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.livetv-ext {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  border-top: 1px solid var(--border-color);
  font-family: var(--font-mono);
}

a.livetv-ext:hover {
  color: var(--red-primary);
}

.livetv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 14px;
  font-size: 12px;
  font-family: var(--font-mono);
}

.livetv-links-label {
  color: var(--text-muted);
}

.livetv-links a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px dotted var(--border-color);
}

.livetv-links a:hover {
  color: var(--red-primary);
}

/* ── Footer: crawlable links to every section ───────────────── */
.footer-explore {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
  max-width: 980px;
  margin: 0 auto 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.footer-explore a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.5px;
}

.footer-explore a:hover {
  color: var(--red-primary);
}

/* ── Phones: one scrollable row of tabs instead of five wrapped rows ── */
@media (max-width: 768px) {
  .map-section {
    padding: 12px 12px 0;
  }

  .tabs-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .tab-btn {
    flex: 0 0 auto;
    font-size: 12px;
  }

  #flights-map {
    height: 360px;
  }

  .header-coffee-btn span {
    display: none;
  }
}

@media (max-width: 480px) {
  .tabs-nav {
    flex-wrap: nowrap;
  }
}

/* Desktop: the tab row scrolls sideways when it overflows; keep its scrollbar
   a thin red line instead of a thick bar under the tabs. */
.tabs-nav {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 32, 32, 0.45) transparent;
}

.tabs-nav::-webkit-scrollbar {
  height: 3px;
}

.tabs-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 32, 32, 0.45);
}

/* One line under the map heading that says what the page is. */
.map-lede {
  margin: -6px 0 12px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 980px;
}

/* ══════════════════════════════════════════════════════════════
   PHONE LAYOUT (November 2026)
   The original page, mixed with what worked in the 2026 phone layout:
   compact sticky header with a menu, live status strip, threat badge,
   the latest headlines before the map, readable cards, explore grid.
   Laptops and desktops never see any of this.
   ══════════════════════════════════════════════════════════════ */
.m-only {
  display: none !important;
}

.m-menu[hidden] {
  display: none !important;
}

@media (max-width: 768px) {
  .m-only {
    display: block !important;
  }

  /* Compact sticky header: one row; the clock moves to the status strip. */
  .header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 54px;
    flex-wrap: nowrap;
    padding: 0 12px;
    gap: 8px;
    background: rgba(8, 8, 8, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  [data-theme="light"] .header {
    background: rgba(250, 250, 250, 0.94);
  }

  .header-left {
    gap: 8px;
    min-width: 0;
  }

  .logo {
    font-size: 18px;
    letter-spacing: 3px;
  }

  /* The status strip below says LIVE; the header keeps room for its buttons. */
  .header .live-badge {
    display: none;
  }

  .header-right {
    gap: 6px;
    flex-wrap: nowrap;
  }

  .header-right .utc-clock {
    display: none;
  }

  .header-coffee-btn,
  .theme-toggle,
  .lang-btn,
  .m-menu-btn {
    height: 34px;
    min-width: 34px;
    padding: 0 8px;
    justify-content: center;
  }

  .lang-btn {
    font-size: 12px;
  }

  .m-menu-btn {
    display: inline-flex !important;
    align-items: center;
    background: var(--red-dim);
    border: 1px solid rgba(255, 32, 32, 0.45);
    border-radius: var(--radius);
    color: var(--red-primary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
  }

  /* Live status strip under the header; scrolls sideways. */
  .m-status {
    display: flex !important;
    position: sticky;
    top: 54px;
    z-index: 999;
    gap: 16px;
    align-items: center;
    padding: 8px 12px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    background: rgba(8, 8, 8, 0.94);
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-muted);
  }

  .m-status::-webkit-scrollbar {
    display: none;
  }

  [data-theme="light"] .m-status {
    background: rgba(250, 250, 250, 0.94);
  }

  .m-status b {
    color: var(--text-primary);
    font-weight: 700;
  }

  .m-status-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--red-primary);
    font-weight: 700;
  }

  /* Menu with every section. */
  .m-menu {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 2000;
    padding: 16px;
    overflow-y: auto;
    background: rgba(5, 5, 5, 0.98);
  }

  [data-theme="light"] .m-menu {
    background: rgba(250, 250, 250, 0.98);
  }

  .m-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .m-menu-title {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--red-primary);
  }

  .m-menu-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
  }

  .m-menu-links {
    display: grid;
    gap: 6px;
  }

  .m-menu-links a {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 15px;
    text-decoration: none;
  }

  .m-menu-links a:active {
    border-color: var(--red-primary);
  }

  .m-menu-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
  }

  .m-menu-foot a {
    color: var(--text-secondary);
    text-decoration: none;
  }

  .m-menu-foot .m-menu-coffee {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(255, 170, 0, 0.12);
    border: 1px solid rgba(255, 170, 0, 0.45);
    color: var(--amber-accent);
    font-weight: 700;
    text-align: center;
  }

  body.m-menu-open {
    overflow: hidden;
  }

  /* Headline area: H1, one line, threat badge, latest headlines. */
  .map-section .section-header h1 {
    font-size: 15px;
    letter-spacing: 2px;
    line-height: 1.4;
  }

  .map-lede {
    margin: -4px 0 12px;
    font-size: 13px;
  }

  .m-threat {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 32, 32, 0.45);
    border-radius: 999px;
    background: var(--red-dim);
    color: var(--red-primary);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
  }

  .m-threat b {
    color: inherit;
  }

  .m-threat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red-primary);
    box-shadow: 0 0 8px var(--red-primary);
    animation: pulse-glow 1.5s ease infinite;
  }

  .m-threat-sep {
    color: var(--text-muted);
  }

  .m-card {
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card);
    overflow: hidden;
  }

  .m-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
  }

  .m-card-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  .m-feed-list {
    display: grid;
  }

  .m-feed-empty {
    padding: 16px 14px;
    font-size: 13px;
    color: var(--text-muted);
  }

  .m-feed-item {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    color: inherit;
    text-decoration: none;
  }

  .m-feed-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  .m-feed-meta b {
    color: var(--text-secondary);
  }

  .m-feed-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
  }

  .m-feed-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }

  .m-tag {
    padding: 1px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
  }

  .m-tag.sev-critical {
    color: #ff2020;
    border-color: rgba(255, 32, 32, 0.5);
    background: rgba(255, 32, 32, 0.12);
  }

  .m-tag.sev-high {
    color: #ff8800;
    border-color: rgba(255, 136, 0, 0.5);
    background: rgba(255, 136, 0, 0.1);
  }

  .m-tag.sev-medium {
    color: #ffcc00;
    border-color: rgba(255, 204, 0, 0.45);
  }

  .m-tag.sev-low {
    color: #4fb4ff;
    border-color: rgba(79, 180, 255, 0.4);
  }

  .m-card-link {
    display: block;
    padding: 12px 14px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--red-primary);
    text-decoration: none;
    text-transform: uppercase;
  }

  .map-container {
    height: 320px;
    border-radius: 14px;
  }

  /* Readable cards in the feed and lists (the old page used 10-13px mono). */
  .news-card {
    padding: 14px;
    border-radius: 12px;
  }

  .news-card h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
  }

  .source-badge,
  .time-ago,
  .country-tag {
    font-size: 11px;
  }

  .tab-btn {
    padding: 10px 14px;
  }

  .tab-panel {
    padding: 14px 12px;
  }

  /* Feed first, operational status after it. */
  .main-layout {
    display: flex;
    flex-direction: column;
  }

  .main-layout > .sidebar {
    order: 2;
  }

  /* Explore grid near the end of the page. */
  .m-explore {
    padding: 24px 12px 8px;
    border-top: 1px solid var(--border-color);
  }

  .m-explore-kicker {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--red-primary);
  }

  .m-explore-title {
    margin: 8px 0 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 22px;
    line-height: 1.25;
    color: var(--text-primary);
  }

  .m-explore-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .m-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card);
    color: inherit;
    text-decoration: none;
  }

  .m-tile:active {
    border-color: var(--red-primary);
  }

  .m-tile-icon {
    font-size: 20px;
  }

  .m-tile b {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    color: var(--text-primary);
  }

  .m-tile span:last-child {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary);
  }

  .site-footer {
    padding: 20px 12px 28px;
  }
}

/* On /ai-analyst the chat header's title becomes the page H1. */
.chat-header h1 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--red-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
}

/* On tab pages the tab's heading becomes the page H1. */
.section-header h1[data-panel-heading] {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--red-primary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0;
}

/* Keep Leaflet's own z-indexes (controls sit at 800-1000) inside the maps, so
   they never paint over the sticky phone header and status strip. */
.map-container,
.flights-map-wrap {
  isolation: isolate;
}

/* Phone, tab pages: the headline card is the homepage's; the page opens at
   its tab (see scrollToTabs in app.js). */
@media (max-width: 768px) {
  .route-page .m-hero,
  .route-page .map-lede {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════
   RESTORED INTELLIGENCE (21 Nov 2026): verified chips, feed filter,
   risk index, trending, market news, live map layers.
   ═══════════════════════════════════════════════════════════════ */
.news-filter {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
  padding: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 4px;
}
.nf-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 9px;
  background: transparent;
  border: none;
  border-radius: 3px;
  color: var(--text-muted);
  cursor: pointer;
}
.nf-btn:hover { color: var(--text-primary); }
.nf-btn.active { background: rgba(255, 32, 32, 0.2); color: #ff4444; }
.nf-btn[data-news-filter="verified"].active { background: rgba(0, 255, 65, 0.12); color: var(--green-accent); }

.verify-chip {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 1px 6px;
  border: 1px solid;
  border-radius: 3px;
  white-space: nowrap;
}
.verify-chip.v-verified { color: var(--green-accent); border-color: rgba(0, 255, 65, 0.4); background: rgba(0, 255, 65, 0.08); }
.verify-chip.v-contested { color: var(--amber-accent); border-color: rgba(255, 165, 0, 0.45); background: rgba(255, 165, 0, 0.08); }
.verify-chip.v-state { color: #9aa4ff; border-color: rgba(154, 164, 255, 0.35); background: rgba(154, 164, 255, 0.06); }
.verify-chip.v-single { color: var(--text-muted); border-color: var(--border-color); background: transparent; font-weight: 600; }
[data-theme="light"] .verify-chip.v-state { color: #3f4bb8; }

.side-panel {
  margin-top: 12px;
  padding: 14px 14px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}
.side-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--red-primary);
}
.side-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; color: var(--text-muted); }
.side-empty { padding: 6px 0; font-size: 11px; color: var(--text-muted); }

.risk-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 48px 30px;
  grid-template-rows: auto 3px;
  column-gap: 8px;
  row-gap: 5px;
  align-items: center;
  width: 100%;
  padding: 7px 2px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.risk-row:last-child { border-bottom: none; }
.risk-row:hover { background: rgba(255, 32, 32, 0.05); }
.risk-flag { font-size: 15px; line-height: 1; }
.risk-name { display: flex; flex-direction: column; min-width: 0; font-size: 12px; font-weight: 600; line-height: 1.25; }
.risk-name small { overflow: hidden; font-size: 9px; font-weight: 400; letter-spacing: 0.5px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; color: var(--text-muted); }
.risk-spark { color: var(--text-muted); }
.risk-score { font-family: var(--font-mono); font-size: 15px; font-weight: 700; text-align: right; }
.risk-bar { grid-column: 2 / 5; height: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.06); border-radius: 2px; }
.risk-bar i { display: block; height: 100%; }
.r-crit .risk-score { color: #ff2020; }
.r-crit .risk-bar i { background: linear-gradient(90deg, #8b0000, #ff2020); }
.r-high .risk-score { color: #ff6a00; }
.r-high .risk-bar i { background: linear-gradient(90deg, #7a3300, #ff6a00); }
.r-elev .risk-score { color: #ffa500; }
.r-elev .risk-bar i { background: linear-gradient(90deg, #6b4500, #ffa500); }
.r-low .risk-score { color: #00c853; }
.r-low .risk-bar i { background: linear-gradient(90deg, #00502a, #00c853); }
[data-theme="light"] .risk-row { border-bottom-color: #e6e6e6; }
[data-theme="light"] .risk-bar { background: #eeeeee; }

.trend-list { display: flex; flex-wrap: wrap; gap: 6px; }
.trend-chip {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  cursor: pointer;
}
.trend-chip:hover { border-color: var(--red-dark); }
.trend-chip b { color: var(--text-primary); font-weight: 700; }
.trend-chip em { font-style: normal; }
.trend-chip.up em { color: #ff4444; }
.trend-chip.down em { color: var(--green-accent); }
.trend-chip.flat em { color: var(--text-muted); }

.quick-q-btn.trending { border-color: rgba(255, 106, 0, 0.45); color: #ff8a3d; }

.market-news { display: flex; flex-direction: column; gap: 8px; }
.mk-news-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--amber-accent);
  border-radius: var(--radius);
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}
.mk-news-item:hover { background: var(--bg-card-hover); transform: translateX(4px); }
.mk-news-meta { font-size: 10px; color: var(--text-muted); }
.mk-news-meta b { color: var(--text-secondary); letter-spacing: 1px; text-transform: uppercase; }
.mk-news-title { font-size: 13px; line-height: 1.4; }

.milair-marker .plane-marker { filter: drop-shadow(0 0 3px rgba(155, 229, 100, 0.7)); }
.hotspot-pulse { animation: wf-hotspot-pulse 2.4s ease-in-out infinite; }
@keyframes wf-hotspot-pulse {
  0%, 100% { stroke-opacity: 0.9; fill-opacity: 0.2; }
  50% { stroke-opacity: 0.35; fill-opacity: 0.06; }
}
@media (prefers-reduced-motion: reduce) { .hotspot-pulse { animation: none; } }

@media (max-width: 768px) {
  .section-header { flex-wrap: wrap; }
  .news-filter { order: 3; margin-left: 0; }
  .news-card-header { flex-wrap: wrap; }
}

/* ═══ Live feed tools (ported from the 2026 Intel Feed) ═══ */
.feed-tools { display: flex; flex-direction: column; gap: 8px; margin: -6px 0 14px; }
.ft-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ft-search {
  display: flex; align-items: center; gap: 8px; flex: 1 1 260px; min-width: 0;
  padding: 6px 10px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px;
}
.ft-search:focus-within { border-color: var(--red-primary); box-shadow: 0 0 0 2px var(--red-dim); }
.ft-search input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text-primary); font-family: var(--font-mono); font-size: 12px;
}
.ft-seg { display: inline-flex; gap: 2px; padding: 2px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-color); border-radius: 6px; }
.ft-seg button, .ft-toggle, .ft-reset, .ft-sev button, .ft-chip {
  padding: 4px 10px; background: transparent; border: 1px solid transparent; border-radius: 4px;
  color: var(--text-muted); font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; cursor: pointer; white-space: nowrap;
}
.ft-seg button:hover, .ft-toggle:hover, .ft-sev button:hover, .ft-chip:hover { color: var(--text-primary); }
.ft-seg button.active { background: var(--red-dim); color: var(--red-primary); }
.ft-toggle { border-color: var(--border-color); }
.ft-toggle.active { background: rgba(255, 32, 32, 0.15); border-color: var(--red-primary); color: var(--red-primary); }
.ft-reset { border-color: var(--border-color); color: var(--text-secondary); }
.ft-sev { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ft-sev button { border-color: var(--border-color); }
.ft-sev button b { margin-left: 4px; color: var(--text-secondary); font-weight: 700; }
.ft-sev button.sev-critical.active { background: rgba(255, 32, 32, 0.15); border-color: #ff2020; color: #ff4444; }
.ft-sev button.sev-high.active { background: rgba(255, 106, 0, 0.14); border-color: #ff6a00; color: #ff8a3d; }
.ft-sev button.sev-medium.active { background: rgba(255, 165, 0, 0.12); border-color: #ffa500; color: #ffb733; }
.ft-sev button.sev-low.active { background: rgba(0, 200, 83, 0.1); border-color: #00c853; color: #36d97a; }
.ft-select {
  margin-left: auto; padding: 5px 8px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 6px;
  color: var(--text-primary); font-family: var(--font-mono); font-size: 11px;
}
.ft-countries { display: flex; flex-wrap: wrap; gap: 4px; }
.ft-countries[hidden] { display: none; }
.ft-chip { border-color: var(--border-color); }
.ft-chip b { margin-left: 3px; color: var(--text-secondary); }
.ft-chip.active { background: var(--red-dim); border-color: var(--red-primary); color: var(--red-primary); }
.ft-more {
  display: block; width: 100%; margin-top: 10px; padding: 10px; background: var(--bg-card);
  border: 1px dashed var(--border-color); border-radius: 6px; color: var(--text-secondary);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; cursor: pointer;
}
.ft-more:hover { border-color: var(--red-primary); color: var(--red-primary); }
.ft-more[hidden] { display: none; }
.sev-chip { padding: 1px 6px; border-radius: 3px; font-family: var(--font-mono); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.sev-chip.sev-critical { background: rgba(255, 32, 32, 0.16); color: #ff4444; }
.sev-chip.sev-high { background: rgba(255, 106, 0, 0.14); color: #ff8a3d; }
.news-card.is-new { animation: wf-new-story 2.4s ease-out 2; }
@keyframes wf-new-story { 0% { box-shadow: 0 0 0 0 rgba(0, 255, 213, 0.0); } 30% { box-shadow: 0 0 0 2px rgba(0, 255, 213, 0.55); } 100% { box-shadow: 0 0 0 0 rgba(0, 255, 213, 0.0); } }
@media (prefers-reduced-motion: reduce) { .news-card.is-new { animation: none; outline: 1px solid rgba(0, 255, 213, 0.5); } }
@media (max-width: 768px) {
  .ft-select { margin-left: 0; flex: 1 1 100%; }
  .ft-seg { flex: 1 1 auto; justify-content: space-between; }
}

/* ═══════════════════════════════════════════════════════════════
   VICE SKIN v2 (21 Nov 2026): GTA VI-inspired, researched from the game's
   marketing look: a cobalt → violet → hot-pink → burnt-orange "logo"
   gradient, magenta/cyan/electric-blue neon on blue-black at night,
   Leonida pastels by day. Original art and free fonts only (Kanit,
   Pacifico): no Rockstar logos, artwork or typefaces.
   Vice Night = dark mode, Vice Day = light mode. "Classic" keeps the
   original red terminal in both modes.
   ═══════════════════════════════════════════════════════════════ */
html[data-skin="vice"] {
  --vice-grad: linear-gradient(180deg, #3a49ff 0%, #9b30ff 34%, #ff2d95 63%, #ff8a2a 100%);
  --vice-sunset: linear-gradient(90deg, #3a49ff 0%, #b02bff 30%, #ff2d95 62%, #ff8a2a 100%);
  --vice-pink: #ff2d95;
  --vice-cyan: #2de2e6;
  --vice-blue: #3d5afe;
  --vice-orange: #ff8a2a;
  --font-display: 'Kanit', 'Orbitron', sans-serif;
  --radius: 8px;
}

/* Night: neon on blue-black. */
html[data-skin="vice"]:not([data-theme="light"]) {
  --bg-primary: #0b0b22;
  --bg-secondary: #12112f;
  --bg-tertiary: #1c1946;
  --bg-card: rgba(19, 16, 52, 0.9);
  --bg-card-hover: rgba(30, 25, 76, 0.96);
  --red-primary: #ff2d95;
  --red-glow: rgba(255, 45, 149, 0.45);
  --red-dark: #b0186a;
  --red-dim: rgba(255, 45, 149, 0.15);
  --green-accent: #2de2e6;
  --amber-accent: #ff8a2a;
  --yellow-accent: #ffd166;
  --text-primary: #f6f3ff;
  --text-secondary: #c9c3ea;
  --text-muted: #8f88ba;
  --border-color: rgba(122, 110, 255, 0.26);
  --border-glow: rgba(255, 45, 149, 0.4);
  --vice-page:
    radial-gradient(1200px 480px at 50% -190px, rgba(255, 138, 42, 0.26), transparent 70%),
    radial-gradient(900px 620px at -10% 0%, rgba(61, 90, 254, 0.34), transparent 70%),
    radial-gradient(900px 620px at 110% 0%, rgba(255, 45, 149, 0.26), transparent 70%),
    linear-gradient(180deg, #17154a 0px, #0e0d2c 560px, #0b0b22 1200px);
  --vice-header: linear-gradient(180deg, #221d66 0%, #1a1650 55%, #121038 100%);
  --vice-on-accent: #ffffff;
  --vice-palm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 160'%3E%3Cpath fill='%23050418' fill-opacity='.7' d='M61 160c-2-38 0-74 7-104l-5-1c-7 29-10 66-9 105zM65 54C51 41 31 38 12 46c18-1 33 4 45 14-16-4-31 0-43 10 15-5 31-4 43 3-9 6-15 16-17 27 9-11 19-19 31-22 4 13 3 26-3 38 12-10 16-25 13-40 11 4 21 13 27 25-1-15-11-27-23-34 13-2 27 1 38 9-7-12-21-19-36-19 9-8 22-12 35-11-14-6-31-4-43 4 2-9 8-17 16-22-12 2-23 10-28 21z'/%3E%3C/svg%3E");
}

/* Day: Leonida pastels, white Art Deco cards. */
html[data-skin="vice"][data-theme="light"] {
  --bg-primary: #fff7fc;
  --bg-secondary: #fff0f8;
  --bg-tertiary: #f2ebff;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-hover: #ffffff;
  --red-primary: #e0127a;
  --red-glow: rgba(224, 18, 122, 0.22);
  --red-dark: #a10e58;
  --red-dim: rgba(224, 18, 122, 0.09);
  --green-accent: #008b9a;
  --amber-accent: #d9620b;
  --yellow-accent: #a87600;
  --text-primary: #1b1446;
  --text-secondary: #463c7c;
  --text-muted: #7770a8;
  --border-color: rgba(98, 70, 200, 0.18);
  --border-glow: rgba(224, 18, 122, 0.3);
  --vice-page:
    radial-gradient(1100px 460px at 50% -170px, rgba(255, 170, 110, 0.5), transparent 72%),
    linear-gradient(180deg, #ffd3ea 0px, #ffe8f4 300px, #e6f8ff 760px, #f6fbff 1200px);
  --vice-header: linear-gradient(180deg, #ffc9e4 0%, #ffdcee 55%, #ffeef7 100%);
  --vice-on-accent: #ffffff;
  --vice-palm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 160'%3E%3Cpath fill='%231b1446' fill-opacity='.16' d='M61 160c-2-38 0-74 7-104l-5-1c-7 29-10 66-9 105zM65 54C51 41 31 38 12 46c18-1 33 4 45 14-16-4-31 0-43 10 15-5 31-4 43 3-9 6-15 16-17 27 9-11 19-19 31-22 4 13 3 26-3 38 12-10 16-25 13-40 11 4 21 13 27 25-1-15-11-27-23-34 13-2 27 1 38 9-7-12-21-19-36-19 9-8 22-12 35-11-14-6-31-4-43 4 2-9 8-17 16-22-12 2-23 10-28 21z'/%3E%3C/svg%3E");
}

html[data-skin="vice"] body { background: var(--vice-page); background-color: var(--bg-primary); }
html[data-skin="vice"]:not([data-theme="light"]) body::before {
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(45, 226, 230, 0.016) 2px, rgba(45, 226, 230, 0.016) 4px);
}
html[data-skin="vice"][data-theme="light"] body::before,
html[data-skin="vice"][data-theme="light"] body::after { display: none; }

/* Header: palms, sunset rule, logo-gradient wordmark, script tagline. */
html[data-skin="vice"] .header {
  background:
    var(--vice-palm) no-repeat left -18px bottom -26px / 92px auto,
    var(--vice-palm) no-repeat right -10px bottom -30px / 80px auto,
    var(--vice-header);
  border-bottom: 2px solid var(--vice-pink);
  box-shadow: 0 2px 0 var(--vice-orange), 0 6px 30px rgba(255, 45, 149, 0.16);
}
html[data-skin="vice"] .logo {
  font-family: 'Kanit', 'Orbitron', sans-serif;
  font-style: italic;
  font-weight: 900;
  letter-spacing: 3px;
  background: var(--vice-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 0 rgba(11, 11, 34, 0.55)) drop-shadow(0 0 14px rgba(255, 45, 149, 0.35));
}
html[data-skin="vice"][data-theme="light"] .logo { filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.9)) drop-shadow(0 6px 14px rgba(224, 18, 122, 0.25)); }
html[data-skin="vice"] .logo.glitch::before,
html[data-skin="vice"] .logo.glitch::after { display: none; }
.vice-tagline { display: none; }
html[data-skin="vice"] .vice-tagline {
  display: inline-block;
  margin-left: -6px;
  transform: rotate(-6deg) translateY(4px);
  font-family: 'Pacifico', cursive;
  font-size: 15px;
  color: var(--vice-pink);
  text-shadow: 0 0 10px rgba(255, 45, 149, 0.45);
  white-space: nowrap;
}
html[data-skin="vice"] .live-badge {
  background: rgba(45, 226, 230, 0.1);
  border-color: rgba(45, 226, 230, 0.55);
  color: var(--green-accent);
}
.skin-toggle {
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
}
html[data-skin="vice"] .skin-toggle {
  border: none;
  background: var(--vice-sunset);
  color: var(--vice-on-accent);
  box-shadow: 0 3px 12px rgba(255, 45, 149, 0.3);
}

/* Tabs as pills; headings in bold italic with the logo gradient. */
html[data-skin="vice"] .tabs-nav {
  gap: 6px;
  padding: 12px 24px 10px;
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  border-bottom: 1px solid var(--border-color);
}
html[data-skin="vice"] .tab-btn {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  color: var(--text-secondary);
  font-family: 'Kanit', var(--font-mono);
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.5px;
}
html[data-skin="vice"] .tab-btn:hover { border-color: var(--vice-pink); color: var(--text-primary); }
html[data-skin="vice"] .tab-btn.active {
  border-color: transparent;
  background: var(--vice-sunset);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(11, 11, 34, 0.35);
  box-shadow: 0 4px 18px rgba(255, 45, 149, 0.35);
}
html[data-skin="vice"] .section-header h2,
html[data-skin="vice"] .side-h {
  font-family: 'Kanit', 'Orbitron', sans-serif;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: var(--vice-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
html[data-skin="vice"] .side-h .side-sub { -webkit-text-fill-color: var(--text-muted); }
html[data-skin="vice"] .section-header { border-bottom-color: var(--border-color); }

/* Cards: glass at night, white Art Deco by day, hot-pink edge. */
html[data-skin="vice"] .news-card,
html[data-skin="vice"] .side-panel,
html[data-skin="vice"] .op-dash,
html[data-skin="vice"] .mk-news-item {
  background: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 24px rgba(11, 11, 34, 0.16);
}
html[data-skin="vice"] .news-card { border-left: 3px solid var(--vice-pink) !important; }
html[data-skin="vice"] .news-card:hover { border-color: var(--vice-orange) !important; }
html[data-skin="vice"] .news-card::before { background: linear-gradient(90deg, rgba(255, 45, 149, 0.12) 0%, transparent 45%); }
html[data-skin="vice"]:not([data-theme="light"]) .source-badge { background: rgba(45, 226, 230, 0.09); color: #9af1f3; }
html[data-skin="vice"][data-theme="light"] .source-badge { background: rgba(0, 139, 154, 0.08); color: #006a76; }
html[data-skin="vice"] .ft-seg button.active,
html[data-skin="vice"] .ft-chip.active,
html[data-skin="vice"] .nf-btn.active {
  background: var(--vice-sunset);
  border-color: transparent;
  color: #ffffff;
}

/* The map: dusk at night (a gradient shows through slightly transparent
   tiles; a filter cannot colour a near-black basemap), clean pastel by day. */
html[data-skin="vice"] .map-container {
  border: 1px solid color-mix(in srgb, var(--vice-pink) 45%, transparent);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(255, 45, 149, 0.14), 0 0 110px rgba(45, 226, 230, 0.06);
}
html[data-skin="vice"]:not([data-theme="light"]) #war-map {
  background: linear-gradient(180deg, #1b1a6b 0%, #2c1468 40%, #5a1550 78%, #6b2a1a 100%);
}
html[data-skin="vice"]:not([data-theme="light"]) #war-map .leaflet-tile-pane {
  opacity: 0.82;
  filter: saturate(1.45) contrast(1.1);
}
html[data-skin="vice"][data-theme="light"] #war-map .leaflet-tile-pane { filter: saturate(1.15) hue-rotate(-8deg); }
html[data-skin="vice"] .map-layer-btn,
html[data-skin="vice"] .game-btn { border-radius: 999px !important; }
html[data-skin="vice"] .header-coffee-btn {
  background: var(--vice-sunset) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* Light-mode legibility for the map buttons' inline neon colours. */
[data-theme="light"] #layer-quakes { color: #8a6500 !important; border-color: rgba(138, 101, 0, 0.45) !important; background: rgba(255, 208, 0, 0.14) !important; }
[data-theme="light"] #layer-hotspots { color: #b3400a !important; border-color: rgba(179, 64, 10, 0.4) !important; background: rgba(255, 90, 31, 0.1) !important; }
[data-theme="light"] #layer-milair { color: #3a6d00 !important; border-color: rgba(58, 109, 0, 0.4) !important; background: rgba(155, 229, 100, 0.16) !important; }
[data-theme="light"] #layer-events { color: #00727e !important; border-color: rgba(0, 114, 126, 0.4) !important; background: rgba(45, 226, 230, 0.12) !important; }
[data-theme="light"] .game-btn { color: #ffffff; background: linear-gradient(90deg, #e0127a, #7b2cff); border-color: transparent; }

@media (max-width: 768px) {
  html[data-skin="vice"] .vice-tagline { display: none; }
  html[data-skin="vice"] .header {
    background:
      var(--vice-palm) no-repeat left -14px bottom -22px / 64px auto,
      var(--vice-palm) no-repeat right -8px bottom -24px / 56px auto,
      var(--vice-header);
  }
  html[data-skin="vice"] .skin-toggle { padding: 4px 7px; font-size: 10px; }
}

/* ═══ Support popup refresh (21 Nov 2026) ═══
   The global a:hover rule (0,1,1) beat .support-btn (0,1,0), so on hover the
   label turned red on the red button. Higher-specificity states fix it, and
   the button now uses Buy Me a Coffee's own yellow for contrast. */
.support-overlay { background: rgba(6, 2, 12, 0.72); backdrop-filter: blur(3px); }
.support-box {
  max-width: 400px;
  padding: 30px 26px 24px;
  background: linear-gradient(180deg, #1b1022 0%, #120a18 100%);
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(255, 59, 140, 0.45), 0 18px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 138, 61, 0.12);
}
.support-close { top: 8px; right: 10px; width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 22px; line-height: 36px; }
.support-close:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.support-emoji { font-size: 40px; margin-bottom: 8px; }
.support-title { font-size: 16px; letter-spacing: 3px; margin-bottom: 14px; }
.support-msg { font-size: 13.5px; color: #eee; }
.support-msg-regional { color: #b9a9c6; font-style: normal; margin-bottom: 20px; }
a.support-btn,
a.support-btn:visited,
a.support-btn:hover,
a.support-btn:focus-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 230px;
  padding: 13px 26px;
  border-radius: 999px;
  background: #ffdd00;
  color: #1a1206;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: none;
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(255, 221, 0, 0.28);
}
a.support-btn:hover { background: #ffe94d; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255, 221, 0, 0.38); }
a.support-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
html[data-skin="vice"] a.support-btn,
html[data-skin="vice"] a.support-btn:visited,
html[data-skin="vice"] a.support-btn:hover {
  background: var(--vice-sunset);
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(255, 45, 149, 0.4);
}
html[data-skin="vice"] .support-title {
  font-family: 'Kanit', var(--font-display);
  font-style: italic;
  font-weight: 800;
  background: linear-gradient(90deg, #ff3b8c, #ff8a3d 55%, #ffd36e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
[data-theme="light"] .support-box { background: #fff; box-shadow: 0 0 0 1px #b80000, 0 18px 50px rgba(0, 0, 0, 0.25); }
[data-theme="light"] .support-msg { color: #222; }
[data-theme="light"] .support-msg-regional { color: #555; }
[data-theme="light"] a.support-btn, [data-theme="light"] a.support-btn:hover { background: #ffdd00; color: #1a1206; }


/* ═══ Precise events layer (21 Nov 2026) ═══ */
.ev-marker { background: none; border: none; }
.ev-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 10px rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}
.ev-dot i { font-style: normal; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.ev-dot.sev-critical { background: #ff2020; }
.ev-dot.sev-high { background: #ff6a00; }
.ev-dot.sev-medium { background: #e0a000; }
.ev-dot.sev-low { background: #2fb36e; }
.ev-dot.approx { border-style: dashed; border-color: rgba(255, 255, 255, 0.75); }
.ev-dot.old { opacity: 0.6; }
.ev-dot.fresh { animation: ev-fresh 1.8s ease-out infinite; }
@keyframes ev-fresh {
  0% { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(255, 255, 255, 0.55); }
  100% { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45), 0 0 0 14px rgba(255, 255, 255, 0); }
}
@media (prefers-reduced-motion: reduce) { .ev-dot.fresh { animation: none; } }
.ev-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.25), 0 0 16px rgba(0, 0, 0, 0.5);
}
.ev-cluster.sev-critical { background: rgba(255, 32, 32, 0.88); }
.ev-cluster.sev-high { background: rgba(255, 106, 0, 0.88); }
.ev-cluster.sev-medium { background: rgba(224, 160, 0, 0.88); }
.ev-cluster.sev-low { background: rgba(47, 179, 110, 0.88); }
.ev-pop { font-family: var(--font-mono); }
.ev-pop-type { font-size: 10px; font-weight: 800; letter-spacing: 1px; margin-bottom: 4px; }
.ev-pop-type.sev-critical { color: #ff4444; }
.ev-pop-type.sev-high { color: #ff8a3d; }
.ev-pop-type.sev-medium { color: #e0a000; }
.ev-pop-type.sev-low { color: #2fb36e; }
.ev-pop-place { margin-top: 4px; font-size: 12px; color: #ddd; }
.ev-pop-prec { margin-top: 4px; font-size: 11px; font-weight: 700; }
.ev-pop-prec.ok { color: #00e5c0; }
.ev-pop-prec.approx { color: #ffb020; }
.ev-pop-sum { margin-top: 6px; font-size: 12px; line-height: 1.45; color: #bbb; }
.ev-pop-meta { margin-top: 4px; font-size: 11px; color: #999; }
.ev-ver { color: #2fd67e; }
.ev-pop-link { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; }

/* ═══ Game button (opens WARFRONT GEO) ═══ */
.game-btn {
  padding: 4px 10px;
  border: 1px solid rgba(255, 59, 140, 0.6);
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 59, 140, 0.22), rgba(123, 44, 255, 0.22), rgba(0, 255, 213, 0.16));
  box-shadow: 0 0 12px rgba(255, 59, 140, 0.22);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.game-btn:hover { box-shadow: 0 0 18px rgba(255, 59, 140, 0.45); }
.game-btn[aria-pressed="true"] { background: linear-gradient(90deg, #ff3b8c, #7b2cff); border-color: #ff3b8c; }

/* ═══ WARFRONT GEO: GeoGuessr-style game in the neon-dusk style ═══ */
body.geo-open { overflow: hidden; }
.geo-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(900px 500px at 50% 0%, rgba(255, 138, 61, 0.25), transparent 70%),
    rgba(8, 2, 16, 0.86);
  backdrop-filter: blur(4px);
}
.geo-modal[hidden] { display: none; }
.geo-shell {
  display: flex;
  flex-direction: column;
  width: min(1240px, 100%);
  height: min(820px, 100%);
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, #2a0a45 0%, #160828 60%, #12061f 100%);
  box-shadow: 0 0 0 2px #ff3b8c, 0 0 0 4px rgba(255, 138, 61, 0.55), 0 30px 80px rgba(0, 0, 0, 0.6);
}
.geo-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 59, 140, 0.3);
}
.geo-brand { display: flex; align-items: baseline; gap: 4px; }
.geo-logo {
  font-family: 'Kanit', 'Orbitron', sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #ff3b8c, #ff8a3d 55%, #ffd36e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.geo-script { font-family: 'Pacifico', cursive; font-size: 22px; color: #00ffd5; text-shadow: 0 0 12px rgba(0, 255, 213, 0.6); }
.geo-title {
  flex: 1;
  text-align: center;
  font-family: 'Kanit', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 3px;
  color: #fff3fa;
}
.geo-score { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--font-mono); line-height: 1.1; }
.geo-score span { font-size: 10px; letter-spacing: 2px; color: #ff8a3d; font-weight: 700; }
.geo-score b { font-family: 'Kanit', sans-serif; font-style: italic; font-size: 24px; color: #ffd36e; }
.geo-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.geo-close:hover { border-color: #ff3b8c; color: #ff3b8c; }
.geo-stage { flex: 1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; min-height: 0; padding: 12px; }
.geo-sat, .geo-guess { position: relative; min-height: 0; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255, 59, 140, 0.35); }
#geo-sat-map, #geo-guess-map { width: 100%; height: 100%; background: #0b0614; }
.geo-clue {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 500;
  padding: 10px 12px;
  border-left: 4px solid #ff3b8c;
  border-radius: 8px;
  background: rgba(12, 4, 22, 0.88);
  color: #fff3fa;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
}
.geo-clue b { margin-right: 6px; color: #ff8a3d; letter-spacing: 1.5px; font-size: 10px; }
.geo-go {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 500;
  transform: translateX(-50%);
  padding: 11px 22px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3b8c, #ff8a3d 55%, #ffd36e);
  color: #1a0630;
  font-family: 'Kanit', sans-serif;
  font-style: italic;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  box-shadow: 0 6px 22px rgba(255, 59, 140, 0.45);
  cursor: pointer;
  white-space: nowrap;
}
.geo-go:disabled { background: rgba(20, 8, 34, 0.9); color: #d9c4ea; box-shadow: none; border: 1px solid rgba(255, 59, 140, 0.4); cursor: default; }
.geo-pin { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%; font-size: 14px; }
.geo-pin.you { background: #00ffd5; color: #0a0412; box-shadow: 0 0 0 3px rgba(0, 255, 213, 0.35); }
.geo-pin.real { background: #ffd36e; color: #1a0630; font-size: 16px; box-shadow: 0 0 0 4px rgba(255, 211, 110, 0.35), 0 0 18px rgba(255, 211, 110, 0.7); }
.geo-result {
  margin: 0 12px 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 213, 0.35);
  background: rgba(10, 4, 18, 0.7);
  font-family: var(--font-mono);
  color: #fff3fa;
}
.geo-result[hidden] { display: none; }
.geo-r-place { font-family: 'Kanit', sans-serif; font-style: italic; font-weight: 800; font-size: 20px; }
.geo-r-place span { margin-left: 6px; font-family: var(--font-mono); font-style: normal; font-size: 12px; font-weight: 600; color: #a38bbd; }
.geo-r-score { margin-top: 2px; font-size: 13px; color: #d9c4ea; }
.geo-r-score b { color: #ffd36e; font-size: 18px; }
.geo-r-why { margin-top: 6px; font-size: 12px; line-height: 1.45; color: #c9b6da; }
.geo-r-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.geo-r-actions a, .geo-r-actions button {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.geo-r-actions button:last-child { background: linear-gradient(90deg, #ff3b8c, #ff8a3d); color: #1a0630; border-color: transparent; }
.geo-final-rank { font-family: 'Pacifico', cursive; font-size: 26px; color: #00ffd5; text-shadow: 0 0 14px rgba(0, 255, 213, 0.5); }
.geo-final-score { font-family: 'Kanit', sans-serif; font-style: italic; font-weight: 900; font-size: 40px; color: #ffd36e; }
.geo-final-score span { font-size: 18px; color: #a38bbd; }
.geo-foot { padding: 0 18px 12px; font-family: var(--font-mono); font-size: 10px; color: #a38bbd; }
@media (max-width: 768px) {
  .geo-modal { padding: 0; }
  .geo-shell { width: 100%; height: 100%; border-radius: 0; }
  .geo-top { gap: 10px; padding: 10px 12px; }
  .geo-title { display: none; }
  .geo-logo { font-size: 20px; }
  .geo-stage { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: 8px; padding: 8px; }
  .geo-foot { display: none; }
  .geo-result { margin: 0 8px 8px; max-height: 40vh; overflow-y: auto; }
}

html[data-skin="vice"][data-theme="light"] .support-box { background: linear-gradient(180deg, #ffffff 0%, #fff3fa 100%); box-shadow: 0 0 0 1px rgba(224, 18, 122, 0.45), 0 18px 50px rgba(27, 20, 70, 0.18); }

/* ═══ Map v2 (21 Nov 2026): arcs, comets, toast ═══ */
.attack-arc { stroke-dasharray: 3 9; stroke-linecap: round; animation: wf-arc-flow 1.1s linear infinite; }
.attack-arc.precise { stroke-dasharray: 10 6; animation-duration: 0.7s; }
.attack-arc-glow { stroke-linecap: round; }
@keyframes wf-arc-flow { to { stroke-dashoffset: -24; } }
.route-comet { filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.9)); }
.route-impact { animation: wf-impact 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes wf-impact { 0% { stroke-opacity: 0.9; transform: scale(0.6); } 100% { stroke-opacity: 0; transform: scale(2.4); } }
.route-pop-kind { margin: 2px 0 4px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; color: #ffb020; }
.route-pop-kind.ok { color: #2de2e6; }
@media (prefers-reduced-motion: reduce) {
  .attack-arc, .route-impact { animation: none; }
}


.ev-toast {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 1150;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 120px);
  padding: 8px 14px;
  border: 1px solid rgba(255, 45, 85, 0.6);
  border-radius: 999px;
  background: rgba(14, 8, 32, 0.92);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 45, 85, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.ev-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.ev-toast b { color: #ff2d55; letter-spacing: 1px; }
.ev-toast span { color: #a9a3cf; }
.ev-toast.sev-high { border-color: rgba(255, 138, 42, 0.6); }
.ev-toast.sev-high b { color: #ff8a2a; }
@media (max-width: 768px) {
  .ev-toast { max-width: calc(100% - 24px); font-size: 11px; }
}
.events-stat { align-self: center; margin-left: 4px; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }

/* ═══ GEO v2: daily/practice, satellite HUD, ENHANCE, share card ═══ */
.geo-modes { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid rgba(255, 45, 149, 0.35); border-radius: 999px; background: rgba(255, 255, 255, 0.04); }
.geo-modes button {
  padding: 5px 12px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #c9c3ea;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
}
.geo-modes button.active { background: linear-gradient(90deg, #3a49ff, #b02bff 35%, #ff2d95 70%, #ff8a2a); color: #fff; }
.geo-hud { position: absolute; inset: 0; z-index: 450; pointer-events: none; }
.geo-c { position: absolute; width: 26px; height: 26px; border: 2px solid rgba(45, 226, 230, 0.85); }
.geo-c.tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.geo-c.tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.geo-c.bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.geo-c.br { bottom: 10px; right: 10px; border-left: none; border-top: none; }
.geo-cross { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 50%; }
.geo-cross::before, .geo-cross::after { content: ''; position: absolute; background: rgba(255, 255, 255, 0.55); }
.geo-cross::before { left: 50%; top: -10px; bottom: -10px; width: 1px; }
.geo-cross::after { top: 50%; left: -10px; right: -10px; height: 1px; }
.geo-hud-tag, .geo-hud-view {
  position: absolute;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(6, 4, 20, 0.7);
  color: #2de2e6;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}
.geo-hud-tag { top: 44px; left: 12px; }
.geo-hud-view { top: 44px; right: 12px; color: #ffd166; }
.geo-scan { position: absolute; left: 0; right: 0; top: -20%; height: 20%; background: linear-gradient(180deg, transparent, rgba(45, 226, 230, 0.35), transparent); opacity: 0; }
.geo-sat.scanning .geo-scan { animation: geo-scan 1.1s ease-out; }
@keyframes geo-scan { 0% { top: -20%; opacity: 1; } 100% { top: 100%; opacity: 0; } }
.geo-sat.enhanced .leaflet-tile-pane { filter: contrast(1.25) saturate(1.3) brightness(1.04); }
.geo-sat .leaflet-control-zoom { margin-top: 70px !important; }
.geo-enhance {
  position: absolute;
  top: 74px;
  right: 12px;
  z-index: 520;
  padding: 7px 12px;
  border: 1px solid rgba(45, 226, 230, 0.6);
  border-radius: 999px;
  background: rgba(6, 4, 20, 0.78);
  color: #2de2e6;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
}
.geo-enhance:hover, .geo-enhance[aria-pressed="true"] { background: #2de2e6; color: #06041a; }
.geo-grid { margin: 6px 0 2px; font-size: 30px; letter-spacing: 4px; line-height: 1.1; }
.geo-streak { font-family: var(--font-mono); font-size: 13px; font-weight: 800; color: #ff8a2a; }
.geo-r-actions a.geo-x { background: #000; color: #fff; border-color: #fff; }
.geo-r-actions a.geo-x:hover { background: #fff; color: #000; }
@media (prefers-reduced-motion: reduce) { .geo-sat.scanning .geo-scan { animation: none; } }
@media (max-width: 768px) {
  .geo-modes button { padding: 4px 8px; font-size: 10px; }
  .geo-hud-tag { display: none; }
  .geo-hud-view { top: 12px; right: 44px; }
  .geo-enhance { top: auto; bottom: 90px; }
  .geo-grid { font-size: 26px; }
}

/* ═══ Map detail (21 Nov 2026): level of detail by zoom, labels, satellite, event card ═══ */

/* Labels: plain text with a halo, no boxes; shown by zoom band. */
#war-map .leaflet-tooltip.map-label {
  display: none;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: #f4f1ff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.2px;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 2px #0a0820, 0 0 4px #0a0820, 0 1px 2px rgba(0, 0, 0, 0.9);
}
#war-map .leaflet-tooltip.map-label::before { display: none; }
#war-map.lod-labels .leaflet-tooltip.ev-label,
#war-map.lod-base-labels .leaflet-tooltip.base-label { display: block; }
#war-map .leaflet-tooltip.map-label.label-hidden { visibility: hidden; }
#war-map .leaflet-tooltip.ev-label span[data-r="5"],
#war-map .leaflet-tooltip.ev-label span[data-r="4"] { font-weight: 700; }
#war-map .leaflet-tooltip.base-label { color: #ffd76a; font-size: 10px; font-weight: 500; }
[data-theme="light"] #war-map .leaflet-tooltip.map-label { color: #1b1446; text-shadow: 0 0 2px #ffffff, 0 0 4px #ffffff, 0 1px 2px rgba(255, 255, 255, 0.95); }
[data-theme="light"] #war-map .leaflet-tooltip.base-label { color: #7a5600; }
#war-map.sat-on .leaflet-tooltip.map-label { color: #ffffff; text-shadow: 0 0 2px #000000, 0 0 5px #000000, 0 1px 2px #000000; }
#war-map.sat-on .leaflet-tooltip.base-label { color: #ffe28a; }

/* Satellite imagery is shown true to colour: no skin filters on it. */
#war-map.sat-on .leaflet-tile-pane,
html[data-skin="vice"] #war-map.sat-on .leaflet-tile-pane { opacity: 1; filter: none; }

/* Detail level chip and scale bar, bottom left. */
.map-lod {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid rgba(45, 226, 230, 0.3);
  border-radius: 999px;
  background: rgba(10, 8, 30, 0.8);
  backdrop-filter: blur(6px);
  color: #e8fbfc;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.map-lod b { font-size: 10px; letter-spacing: 1.6px; color: #2de2e6; }
.lod-dots { display: inline-flex; gap: 3px; }
.lod-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.lod-dots i.on { background: #2de2e6; box-shadow: 0 0 6px rgba(45, 226, 230, 0.8); }
.lod-hint { color: #a9a3cf; }
.lod-sat { color: #ffd36e; }
[data-theme="light"] .map-lod { background: rgba(255, 255, 255, 0.92); border-color: rgba(0, 139, 154, 0.35); color: #1b1446; box-shadow: 0 4px 16px rgba(27, 20, 70, 0.12); }
[data-theme="light"] .map-lod b { color: #00808e; }
[data-theme="light"] .lod-dots i { background: rgba(27, 20, 70, 0.15); }
[data-theme="light"] .lod-dots i.on { background: #00a3b4; box-shadow: none; }
[data-theme="light"] .lod-hint { color: #5a5390; }
[data-theme="light"] .lod-sat { color: #8a5a00; }
#war-map .leaflet-control-scale-line {
  border: 1px solid rgba(232, 251, 252, 0.7);
  border-top: 0;
  background: rgba(10, 8, 30, 0.6);
  color: #e8fbfc;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
}
[data-theme="light"] #war-map .leaflet-control-scale-line { border-color: #1b1446; background: rgba(255, 255, 255, 0.85); color: #1b1446; }

/* Verified routes count on the Routes button; satellite button in light mode. */
.map-layer-btn .layer-count { margin-left: 5px; padding: 0 6px; border-radius: 999px; background: rgba(45, 226, 230, 0.18); color: #2de2e6; font-size: 10px; }
[data-theme="light"] .map-layer-btn .layer-count { background: rgba(0, 114, 126, 0.12); color: #00727e; }
[data-theme="light"] #layer-satellite { color: #8a5a00 !important; border-color: rgba(138, 90, 0, 0.45) !important; background: rgba(255, 211, 110, 0.16) !important; }

/* Selected event halo. */
.ev-halo { animation: ev-halo 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes ev-halo { 0% { stroke-opacity: 1; transform: scale(0.8); } 100% { stroke-opacity: 0; transform: scale(1.7); } }
@media (prefers-reduced-motion: reduce) { .ev-halo { animation: none; } }

/* Event detail card: docked top-left on desktop, a bottom sheet on phones. */
.ev-detail {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1100;
  width: min(330px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  box-sizing: border-box;
  padding: 16px 16px 12px;
  border: 1px solid rgba(45, 226, 230, 0.35);
  border-radius: 16px;
  background: rgba(12, 8, 32, 0.95);
  backdrop-filter: blur(10px);
  color: #ece9ff;
  font-family: var(--font-mono);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  animation: ev-detail-in 0.22s ease-out;
}
.ev-detail[hidden] { display: none; }
.ev-detail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, #3a49ff, #9b30ff, #ff2d95, #ff8a2a);
}
@keyframes ev-detail-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.evd-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}
.evd-close:hover { background: rgba(255, 255, 255, 0.16); }
.evd-type { padding-right: 34px; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.evd-type.sev-critical { color: #ff4d6d; }
.evd-type.sev-high { color: #ff8a3d; }
.evd-type.sev-medium { color: #e0a000; }
.evd-type.sev-low { color: #2fb36e; }
.evd-title { margin: 6px 0 8px; font-family: 'Kanit', 'JetBrains Mono', sans-serif; font-size: 16px; font-weight: 600; line-height: 1.3; text-wrap: balance; color: #ffffff; }
.evd-place { font-size: 12px; color: #ddd8f5; }
.evd-prec { display: inline-block; margin-top: 7px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.6px; }
.evd-prec.ok { color: #00e5c0; background: rgba(0, 229, 192, 0.1); border: 1px solid rgba(0, 229, 192, 0.35); }
.evd-prec.approx { color: #ffb020; background: rgba(255, 176, 32, 0.1); border: 1px dashed rgba(255, 176, 32, 0.45); }
.evd-coords { margin-top: 6px; font-size: 11px; color: #a9a3cf; user-select: all; }
.evd-time { margin-top: 4px; font-size: 11px; color: #a9a3cf; }
.evd-sum { margin: 10px 0 0; font-size: 12.5px; line-height: 1.5; color: #d6d1f0; }
.evd-actors { margin-top: 8px; font-size: 11px; color: #a9a3cf; }
.evd-ver { margin-top: 6px; font-size: 11px; font-weight: 800; color: #2fd67e; }
.evd-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.evd-actions button,
.evd-actions a {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.evd-actions button[data-ev-act="zoom"] { border-color: transparent; background: linear-gradient(90deg, #2de2e6, #3d5afe); color: #0a0820; }
.evd-actions button[aria-pressed="true"] { border-color: #ffd36e; color: #ffd36e; }
.evd-near { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.evd-near-h { margin-bottom: 6px; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #a9a3cf; }
.evd-near button {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 4px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.evd-near button:hover { background: rgba(255, 255, 255, 0.06); }
.evd-near i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 10px; font-style: normal; color: #ffffff; }
.evd-near i.sev-critical { background: #ff2020; }
.evd-near i.sev-high { background: #ff6a00; }
.evd-near i.sev-medium { background: #e0a000; }
.evd-near i.sev-low { background: #2fb36e; }
.evd-near span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evd-near em { font-size: 10px; font-style: normal; color: #a9a3cf; white-space: nowrap; }
[data-theme="light"] .ev-detail { border-color: rgba(0, 139, 154, 0.35); background: rgba(255, 255, 255, 0.97); color: #1b1446; box-shadow: 0 14px 40px rgba(27, 20, 70, 0.18); }
[data-theme="light"] .evd-close { background: rgba(27, 20, 70, 0.06); }
[data-theme="light"] .evd-title { color: #1b1446; }
[data-theme="light"] .evd-place,
[data-theme="light"] .evd-sum { color: #3d3670; }
[data-theme="light"] .evd-coords,
[data-theme="light"] .evd-time,
[data-theme="light"] .evd-actors,
[data-theme="light"] .evd-near-h,
[data-theme="light"] .evd-near em { color: #5a5390; }
[data-theme="light"] .evd-prec.ok { color: #00796b; }
[data-theme="light"] .evd-prec.approx { color: #9a6400; }
[data-theme="light"] .evd-ver { color: #1e8a50; }
[data-theme="light"] .evd-actions button,
[data-theme="light"] .evd-actions a { border-color: rgba(27, 20, 70, 0.2); background: rgba(27, 20, 70, 0.04); }
[data-theme="light"] .evd-actions button[aria-pressed="true"] { border-color: #8a5a00; color: #8a5a00; }
[data-theme="light"] .evd-near { border-top-color: rgba(27, 20, 70, 0.1); }
[data-theme="light"] .evd-near button:hover { background: rgba(27, 20, 70, 0.05); }
@media (max-width: 768px) {
  .map-lod .lod-hint { display: none; }
  .ev-detail { top: auto; right: 8px; bottom: 8px; left: 8px; width: auto; max-height: 58%; border-radius: 14px; }
}
