:root {
  --bg: #030712;
  --glass: rgba(10, 15, 30, 0.78);
  --glass-strong: rgba(11, 17, 34, 0.94);
  --border: rgba(255, 255, 255, 0.12);
  --text: #f8fafc;
  --muted: #94a3b8;
  --emerald: #34d399;
  --sky: #38bdf8;
  --amber: #fbbf24;
  --orange: #fb923c;
  --crimson: #f43f5e;
  --violet: #c084fc;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

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

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#globe-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}

#globe-container canvas {
  cursor: crosshair;
}

.scene-tooltip {
  transform: translate(22px, -18px) !important;
  pointer-events: none !important;
  z-index: 40 !important;
}

/* Top HUD */
.hud-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: max(12px, env(safe-area-inset-top)) 14px 8px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  animation: pulse 1.8s infinite;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(56, 189, 248, 0.5);
}

.lang-opt.active {
  color: var(--sky);
}

.lang-sep {
  opacity: 0.45;
}

.brand-text strong {
  font-size: 14px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-live {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(52, 211, 153, 0.18);
  color: var(--emerald);
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 1px 6px;
  border-radius: 999px;
}

.brand-text span#hud-clock {
  font-size: 10.5px;
  color: var(--muted);
}

.telemetry-strip {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tele-stat {
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 5px 10px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.tele-stat:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.09);
}

.tele-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.tele-stat strong {
  font-size: 13px;
  font-weight: 800;
}

.accent-amber { color: var(--amber); }
.accent-emerald { color: var(--emerald); }
.accent-sky { color: var(--sky); }

/* Search & Filter Row */
.hud-controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hud-search-box {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  width: 280px;
  max-width: 100%;
}

.search-icon {
  font-size: 12px;
  opacity: 0.85;
}

#input-search {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 12px;
}

#input-search::placeholder {
  color: var(--muted);
}

.clear-btn {
  background: rgba(255, 255, 255, 0.14);
  border: none;
  color: var(--text);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  cursor: pointer;
}

.go-search-btn {
  background: rgba(56, 189, 248, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #e0f2fe;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.filter-pills {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.filter-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--sky);
  color: #fff;
}

/* Feed Drawer */
.feed-drawer {
  position: fixed;
  left: 14px;
  bottom: 134px;
  width: 340px;
  max-width: calc(100vw - 28px);
  max-height: 38vh;
  z-index: 9;
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  transition: max-height 0.22s ease;
}

.feed-drawer.collapsed {
  max-height: 44px;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.feed-tabs {
  display: flex;
  gap: 6px;
}

.feed-tab {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.feed-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.tab-badge {
  background: rgba(52, 211, 153, 0.2);
  color: var(--emerald);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
}

.feed-actions {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.feed-list {
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.feed-item {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.feed-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
}

.feed-item-main {
  min-width: 0;
  flex: 1;
}

.feed-item-title {
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-item-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.feed-mag-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 8px;
  white-space: nowrap;
}

.mag-extreme { background: rgba(9, 13, 22, 0.92); color: #f8fafc; border: 1px solid rgba(244, 63, 94, 0.75); }
.mag-great { background: rgba(217, 70, 239, 0.24); color: #f5d0fe; border: 1px solid rgba(217, 70, 239, 0.55); }
.mag-high { background: rgba(244, 63, 94, 0.22); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.45); }
.mag-mid { background: rgba(251, 146, 60, 0.22); color: #fdba74; border: 1px solid rgba(251, 146, 60, 0.45); }
.mag-low { background: rgba(251, 191, 36, 0.18); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.38); }
.mag-minor { background: rgba(248, 250, 252, 0.14); color: #f8fafc; border: 1px solid rgba(248, 250, 252, 0.35); }
.cat-wildfire { background: rgba(251, 146, 60, 0.22); color: #fdba74; }
.cat-storm { background: rgba(56, 189, 248, 0.22); color: #7dd3fc; }
.cat-volcano { background: rgba(244, 63, 94, 0.22); color: #fda4af; }
.cat-ice { background: rgba(96, 165, 250, 0.22); color: #bfdbfe; }

.feed-empty {
  padding: 18px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* Bottom Bar */
.hud-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 6px 14px max(10px, env(safe-area-inset-bottom));
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bottom-bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.action-pill {
  background: var(--glass);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.action-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.action-pill:disabled {
  opacity: 0.65;
  cursor: wait;
}

.action-pill.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--sky);
}

.bmc-pill {
  text-decoration: none;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.55);
  color: #fde68a;
}

.bmc-pill:hover {
  background: rgba(251, 191, 36, 0.24);
  border-color: rgba(251, 191, 36, 0.85);
}

.footer-links {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 10.5px;
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: center;
}

.legal-nav {
  display: flex;
  gap: 10px;
}

.legal-nav a {
  color: var(--sky);
  text-decoration: none;
}

.legal-nav a:hover {
  text-decoration: underline;
}

.visitor-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vc-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.vc-today {
  color: var(--emerald);
  font-weight: 700;
}

.vc-total {
  color: var(--text);
  font-weight: 700;
}

.vc-sep {
  opacity: 0.45;
}

/* 3D Globe HTML Markers */
.iss-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
}

.iss-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.95));
}

.iss-svg {
  width: 34px;
  height: 22px;
  display: block;
}

.iss-tag {
  font-size: 10px;
  font-weight: 800;
  background: rgba(3, 7, 18, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.55);
  color: #bae6fd;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.nasa-marker {
  pointer-events: auto;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  line-height: 1;
}

.nasa-marker .nasa-emoji {
  display: inline-block;
  line-height: 1;
}

/* Realistic Spiral Cyclone */
.nasa-marker.cat-storm {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.cyclone-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.cyclone-svg {
  display: block;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.7));
}

.storm-heading-chevron {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 11px;
  line-height: 1;
  color: #7dd3fc;
  text-shadow: 0 0 6px rgba(14, 165, 233, 0.95);
  pointer-events: none;
}

.cyclone-svg.spin-ccw {
  animation: spinCcw var(--spin-dur, 4.4s) linear infinite;
}

.cyclone-svg.spin-cw {
  animation: spinCw var(--spin-dur, 4.4s) linear infinite;
}

@keyframes spinCcw {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes spinCw {
  from { transform: rotate(0deg) scaleX(-1); }
  to { transform: rotate(360deg) scaleX(-1); }
}

/* Wildfire Animated Multi-Layer Flame + Rising Smoke & Embers */
.nasa-marker.cat-wildfire {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.fire-marker {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: var(--fire-size, 28px);
  height: var(--fire-size, 28px);
  overflow: visible;
}

.fire-ground-glow {
  position: absolute;
  left: 50%;
  bottom: -4%;
  width: 115%;
  height: 52%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 240, 138, 0.9) 0%, rgba(249, 115, 22, 0.72) 45%, rgba(220, 38, 38, 0) 78%);
  animation: heatPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

.fire-flame-svg {
  position: relative;
  z-index: 2;
  width: 78%;
  height: 92%;
  display: block;
  transform-origin: 50% 90%;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.95)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.75));
  animation: flameFlicker 1.35s ease-in-out infinite;
}

.fire-smoke,
.ash-puff {
  position: absolute;
  left: 50%;
  bottom: 68%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.82) 0%, rgba(51, 65, 85, 0) 75%);
  animation: plumeRise 2.7s ease-out infinite;
  pointer-events: none;
}

.fire-smoke.s2 {
  width: 14px;
  height: 14px;
  margin-left: -3px;
  animation-delay: 0.9s;
}

.fire-smoke.s3 {
  width: 15px;
  height: 15px;
  margin-left: -8px;
  animation-delay: 1.8s;
}

.fire-ember {
  position: absolute;
  left: 50%;
  bottom: 58%;
  z-index: 3;
  width: 3px;
  height: 3px;
  margin-left: -1.5px;
  border-radius: 50%;
  background: #fde047;
  box-shadow: 0 0 5px #f97316;
  animation: emberRise 1.7s ease-out infinite;
  pointer-events: none;
}

.fire-ember.e2 {
  margin-left: 3px;
  animation-delay: 0.8s;
}

@keyframes heatPulse {
  0%, 100% { transform: translateX(-50%) scale(0.92); opacity: 0.82; }
  50% { transform: translateX(-50%) scale(1.16); opacity: 1; }
}

@keyframes flameFlicker {
  0%, 100% { transform: scale(1, 1) skewX(0deg); }
  33% { transform: scale(0.95, 1.08) skewX(-3deg); }
  66% { transform: scale(1.04, 0.96) skewX(3deg); }
}

@keyframes plumeRise {
  0% { transform: translate(0, 0) scale(0.6); opacity: 0.82; }
  100% { transform: translate(5px, -28px) scale(2.3); opacity: 0; }
}

@keyframes emberRise {
  0% { transform: translate(0, 0) scale(1); opacity: 0.95; }
  100% { transform: translate(-3px, -20px) scale(0.4); opacity: 0; }
}

/* Volcano Magma Crater + Ash Plume */
.nasa-marker.cat-volcano {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.volcano-marker {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  overflow: visible;
}

.volcano-svg {
  width: 28px;
  height: 23px;
  display: block;
  filter: drop-shadow(0 0 7px rgba(239, 68, 68, 0.78));
}

.ash-puff {
  background: radial-gradient(circle, rgba(100, 116, 139, 0.88) 0%, rgba(30, 41, 59, 0) 75%);
  bottom: 70%;
}

.ash-puff.a2 {
  width: 13px;
  height: 13px;
  margin-left: -2px;
  animation-delay: 1.05s;
}

.ash-puff.a3 {
  width: 15px;
  height: 15px;
  margin-left: -6px;
  animation-delay: 2.1s;
}

.nasa-marker.cat-ice {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(147, 197, 253, 0.75);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

/* Compact Legend */
.globe-legend {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 10px;
  background: rgba(3, 7, 18, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 10.5px;
  color: #cbd5e1;
  backdrop-filter: blur(10px);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.leg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.legend-sep {
  color: #64748b;
}

/* Layer Toggle Bar */
.layer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  pointer-events: auto;
}

.layer-pill {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.18s ease;
}

.layer-pill:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.5);
}

.layer-pill.active {
  background: rgba(14, 165, 233, 0.22);
  border-color: rgba(56, 189, 248, 0.65);
  color: #e0f2fe;
}

/* Floating Ocean / Weather Probe Card (Bottom-Right on Desktop to avoid Feed Drawer) */
.marine-probe {
  position: fixed;
  right: 16px;
  bottom: 134px;
  z-index: 25;
  width: 280px;
  background: rgba(3, 7, 18, 0.9);
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 14px;
  padding: 12px 14px;
  color: #f8fafc;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* Clicked Location Pin Marker */
.probe-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.probe-pin-dot {
  font-size: 18px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.9));
}

.probe-pin-label {
  font-size: 10px;
  font-weight: 700;
  background: rgba(3, 7, 18, 0.9);
  border: 1px solid rgba(45, 212, 191, 0.65);
  color: #99f6e4;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Clean View / Observatory Mode */
body.clean-view .hud-top,
body.clean-view .feed-drawer,
body.clean-view .marine-probe,
body.clean-view .globe-legend,
body.clean-view .layer-bar,
body.clean-view .footer-links {
  opacity: 0;
  pointer-events: none !important;
  transition: opacity 0.2s ease;
}

body.clean-view .bottom-bar .action-pill:not(#btn-clean-view) {
  opacity: 0;
  pointer-events: none !important;
}

body.clean-view #btn-clean-view {
  opacity: 1;
  pointer-events: auto;
  background: rgba(14, 165, 233, 0.3);
  border-color: rgba(56, 189, 248, 0.75);
}

.marine-probe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

.marine-probe-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  color: #cbd5e1;
}

.marine-probe-stat {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 8px;
  padding: 6px 8px;
}

.marine-probe-stat span {
  display: block;
  font-size: 10px;
  color: #94a3b8;
}

.marine-probe-stat strong {
  font-size: 13px;
  color: #5eead4;
}

.marine-probe-foot {
  grid-column: 1 / -1;
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 6px;
}

/* Feed Health & Disclaimer */
.feed-health {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
  vertical-align: middle;
}

.health-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.health-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.health-dot.ok {
  background: #34d399;
  box-shadow: 0 0 6px rgba(52, 211, 153, 0.8);
}

.health-dot.warn {
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.8);
}

.modal-disclaimer {
  margin: 12px 0 0;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.45;
}

/* Modals / Sheets */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 768px) {
  .sheet {
    align-items: center;
  }
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(4px);
}

.sheet-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  padding: 14px 18px 24px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
  .sheet-card {
    border-radius: 22px;
  }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 10px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-header h2 {
  margin: 4px 0 2px;
  font-size: 18px;
  line-height: 1.3;
}

.event-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.event-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.tele-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 9px 11px;
}

.tele-box span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tele-box strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.btn-primary, .btn-secondary, .btn-submit {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  border: none;
}

.btn-primary, .btn-submit {
  background: linear-gradient(135deg, #0ea5e9, #34d399);
  color: #030712;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
}

/* Reports Section */
.reports-section h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.reports-sub {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.status-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.status-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.status-pill.active {
  background: rgba(52, 211, 153, 0.18);
  border-color: var(--emerald);
  color: #fff;
}

.report-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.report-inputs input, .report-inputs textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 10px 12px;
}

.report-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.report-comment {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.45;
  color: #e2e8f0;
}

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

.report-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.upvote-btn,
.flag-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  cursor: pointer;
}

.flag-btn {
  color: var(--muted);
}

.flag-btn:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.45);
  color: #fda4af;
}

.upvote-btn:disabled,
.flag-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

/* Aurora Modal */
.aurora-kpi-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 16px;
  padding: 14px;
  margin: 14px 0;
}

.kp-score {
  font-size: 32px;
  font-weight: 900;
  color: var(--emerald);
  min-width: 66px;
  text-align: center;
}

.kp-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kp-details span {
  font-size: 12px;
  color: var(--muted);
}

.kp-bar-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-top: 4px;
}

.kp-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #fbbf24, #f43f5e);
}

.aurora-guide-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
}

.aurora-guide-box h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.aurora-guide-box ul {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  position: fixed;
  top: 86px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  color: #fff;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

@media (max-width: 767px) {
  .hud-top {
    padding: max(8px, env(safe-area-inset-top)) 10px 4px;
    gap: 6px;
  }
  .brand-pill {
    width: 100%;
    justify-content: flex-start;
    padding: 5px 11px;
  }
  .brand-text {
    flex: 1;
    min-width: 0;
  }
  .lang-toggle {
    margin-left: auto;
  }
  .feed-health {
    display: none;
  }
  .telemetry-strip {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .telemetry-strip::-webkit-scrollbar {
    display: none;
  }
  .tele-stat {
    flex: 0 0 auto;
    min-width: 72px;
    padding: 4px 8px;
  }
  .hud-search-box {
    width: 100%;
    padding: 5px 10px;
  }
  .hud-bottom {
    padding: 4px 10px max(8px, env(safe-area-inset-bottom));
    gap: 4px;
  }
  .globe-legend,
  .layer-bar,
  .bottom-bar {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .globe-legend::-webkit-scrollbar,
  .layer-bar::-webkit-scrollbar,
  .bottom-bar::-webkit-scrollbar {
    display: none;
  }
  .layer-pill,
  .action-pill {
    flex-shrink: 0;
  }
  .footer-links {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 8px;
    font-size: 10px;
    padding-top: 2px;
  }
  .footer-links::-webkit-scrollbar {
    display: none;
  }
  .footer-data-credit {
    display: none;
  }
  .visitor-counter {
    flex-shrink: 0;
    padding: 1px 7px;
    gap: 5px;
    font-size: 9.5px;
  }
  .legal-nav {
    flex-shrink: 0;
    gap: 8px;
    white-space: nowrap;
  }
  .feed-drawer {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: 136px;
    max-height: 28vh;
  }
  .marine-probe {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: 184px;
    padding: 10px 12px;
  }
}
