/* ==========================================================================
   MERIDIAN OCEAN DYNAMICS (MOD) — CYBERDEFEND TRANSLATED DESIGN SYSTEM
   ========================================================================== */

:root {
  /* Google & Google Chrome Inspired Clean Scientific Palette */
  --bg-space: #f8f9fa;
  --bg-space-radial: radial-gradient(ellipse at 50% 30%, #ffffff 0%, #f1f3f4 55%, #e8eaed 100%);
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-solid: #ffffff;
  --bg-capsule: #f1f3f4;
  --bg-subsurface: rgba(0, 0, 0, 0.03);
  
  /* Tasteful Google Color Accents */
  --blue-vivid: #1a73e8;       /* Iconic Google Blue */
  --blue-sapphire: #174ea6;    /* Deep Google Blue */
  --blue-sky: #1a73e8;
  --cyan-ice: #1a73e8;
  --cyan-ice-glow: rgba(26, 115, 232, 0.22);
  --cyan-dim: rgba(26, 115, 232, 0.10);
  --green-google: #1e8e3e;     /* Google Green */
  --heat-amber: #f9ab00;       /* Google Yellow/Amber */
  --alert-red: #d93025;        /* Google Red */
  --alert-red-glow: rgba(217, 48, 37, 0.22);
  --frost-ice: #e8f0fe;        /* Soft Google Ice Blue */
  
  /* Hairline Material Borders */
  --border-hairline: #d1d5db;
  --border-focus: #1a73e8;
  --border-card-hover: #1a73e8;
  
  /* High-Contrast Crisp Typography Colors */
  --text-white: #111827;       /* Primary deep charcoal/near-black */
  --text-muted: #374151;       /* High-contrast secondary slate (7.5:1 on white) */
  --text-dim: #4b5563;         /* Clear readable medium slate */
  --text-dark: #111827;
  
  /* Soft Material Elevation Drop Shadows */
  --card-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.14), 0 4px 12px 3px rgba(60, 64, 67, 0.08);
  --glass-blur: blur(12px);
  
  /* Modern Clean Fonts */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Google Sans', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-space);
  background-image: var(--bg-space-radial);
  color: var(--text-white);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Base Utility Classes */
.text-cyan { color: var(--blue-vivid) !important; }
.text-blue { color: var(--blue-sapphire) !important; }
.text-alert { color: var(--alert-red) !important; }
.text-white { color: var(--text-white) !important; }
.text-muted { color: var(--text-muted) !important; }

/* ==========================================================================
   CYBER VIEWPORT & 3D GLOBE
   ========================================================================== */
.cyber-app {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.globe-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
}

#globe-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#globe-canvas:active {
  cursor: grabbing;
}

#globe-hud-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.globe-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(241, 243, 244, 0.4) 85%, #e8eaed 100%);
  z-index: 2;
}

/* ==========================================================================
   TOP FLOATING NAVIGATION BAR (1:1 with CyberDefend)
   ========================================================================== */
.top-nav-bar {
  position: absolute;
  top: 18px;
  left: 24px;
  right: 24px;
  height: 52px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.top-nav-bar > * {
  pointer-events: auto;
}

/* Brand Identity (Left) */
.top-nav-header-row {
  display: contents;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  padding: 8px 16px;
  border-radius: 20px;
  box-shadow: var(--card-shadow);
}

.brand-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mod-highlight {
  color: #ffffff;
  background: var(--blue-vivid);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

/* Segmented Capsule Nav (Center) - Chrome Style Tab Group */
.nav-segmented-capsule {
  display: flex;
  align-items: center;
  gap: 3px;
  background: #f1f3f4;
  border: 1px solid var(--border-hairline);
  border-radius: 9999px;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.12);
}

.nav-capsule-btn {
  background: transparent;
  border: none;
  color: #374151;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.nav-capsule-btn:hover {
  color: #111827;
  background: rgba(0, 0, 0, 0.06);
}

.nav-capsule-btn.active {
  background: #ffffff;
  color: #1a73e8;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(60, 64, 67, 0.25);
}

.active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1a73e8;
}

/* Actions & Fund Button (Right) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.nav-icon-btn:hover {
  border-color: var(--blue-vivid);
  color: var(--blue-vivid);
  background: #f8f9fa;
}

.nav-icon-btn.active {
  color: var(--blue-vivid);
  background: #e8f0fe;
  border-color: #c2e7ff;
}

.nav-icon-btn.alert-badge .alert-ping-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--alert-red);
  box-shadow: 0 0 6px var(--alert-red);
  animation: alertPulse 1.8s infinite;
}

@keyframes alertPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.nav-cta-pill {
  background: var(--blue-vivid);
  color: #ffffff;
  border: none;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
  transition: all 0.2s ease;
}

.nav-cta-pill:hover {
  background: #1765cc;
  box-shadow: 0 2px 6px 0 rgba(60, 64, 67, 0.4);
}

/* ==========================================================================
   TOP-LEFT EVERYDAY CLIMATE IMPACT FORECAST CARD
   ========================================================================== */
.climate-impact-card {
  position: absolute;
  top: 76px;
  left: 20px;
  width: 326px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--card-shadow);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.25s ease;
}

.climate-impact-card:hover {
  border-color: #9ca3af;
}

.impact-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.impact-header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.impact-collapse-toggle {
  display: none;
}

.impact-expandable-body {
  display: block;
}

.impact-title-group .impact-pre-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--blue-vivid);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.impact-city-title {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

.impact-temp-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.impact-temp-badge.frost {
  background: #e8f0fe;
  color: #174ea6;
  border: 1px solid #bfdbfe;
}

.impact-temp-badge.heat {
  background: #fef7e0;
  color: #b06000;
  border: 1px solid #feefc3;
}

.impact-temp-badge.alert {
  background: #fce8e6;
  color: #c5221f;
  border: 1px solid #fad2cf;
}

.impact-region-selector {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.impact-reg-pill {
  background: #f1f3f4;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.impact-reg-pill:hover {
  color: #111827;
  background: #e5e7eb;
}

.impact-reg-pill.active {
  background: #e8f0fe;
  border-color: #bfdbfe;
  color: #1a73e8;
  font-weight: 700;
}

.impact-detail-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.impact-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.im-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #1e293b;
  text-transform: uppercase;
}

.im-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--blue-vivid);
}

.impact-dimensions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin: 4px 0;
}

.impact-dim-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.impact-dim-item .dim-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #334155;
  text-transform: uppercase;
}

.impact-dim-item .dim-val {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.impact-everyday-text {
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
  line-height: 1.45;
}

.thermal-anomaly-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  padding-top: 5px;
  border-top: 1px solid #cbd5e1;
}

.anomaly-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
}

.anomaly-indicator.north { color: #174ea6; }
.anomaly-indicator.south { color: #d93025; }

/* ==========================================================================
   FLOATING RETICLE HOTSPOT TARGET CARD (1:1 with CyberDefend NCV-16950)
   ========================================================================== */
.reticle-target-card {
  position: absolute;
  top: 38%;
  left: 45%;
  z-index: 15;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.target-card-inner {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 11px 15px;
  min-width: 195px;
  box-shadow: var(--card-shadow);
  pointer-events: auto;
}

.target-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.target-id-badge {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--blue-vivid);
  letter-spacing: 0.5px;
}

.target-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.target-close-btn {
  display: none;
}

.target-icon {
  font-size: 14px;
  color: #475569;
}

.target-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.target-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 9px;
  margin-bottom: 8px;
}

.target-data-cell {
  display: flex;
  flex-direction: column;
}

.td-label {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #334155;
}

.td-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
}

.target-status-line {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}

.target-status-line .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-vivid);
}

.target-focus-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  color: var(--blue-vivid);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
  transition: all 0.2s ease;
}

.target-focus-btn:hover {
  background: var(--blue-vivid);
  color: #fff;
  border-color: var(--blue-vivid);
}

/* ==========================================================================
   RIGHT-SIDE FLOATING CONTROLS (Google Material Pill Action Stack)
   ========================================================================== */
.right-action-stack {
  position: absolute;
  top: 100px;
  right: 24px;
  width: 146px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.action-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
  text-transform: uppercase;
  padding-left: 2px;
}

.action-pill-btn {
  height: 38px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 20px;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.10);
}

.action-pill-btn:hover {
  border-color: #bdc1c6;
  color: var(--text-white);
  background: #f8f9fa;
}

.action-pill-btn.active {
  background: #e8f0fe;
  border-color: #c2e7ff;
  color: var(--blue-vivid);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
}

.icon-buttons-row {
  display: flex;
  gap: 6px;
}

.icon-toggle-btn {
  flex: 1;
  height: 38px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.10);
}

.icon-toggle-btn:hover {
  color: var(--blue-vivid);
  border-color: #bdc1c6;
  background: #f8f9fa;
}

.icon-toggle-btn.active {
  color: var(--blue-vivid);
  background: #e8f0fe;
  border-color: #c2e7ff;
}

/* ==========================================================================
   COMPASS ROTATION DIAL & ZOOM (Google Style Dial)
   ========================================================================== */
.compass-control-hub {
  position: absolute;
  bottom: 262px;
  right: 24px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.zoom-controls {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zoom-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  color: var(--text-white);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
  transition: all 0.15s ease;
}

.zoom-btn:hover {
  background: #f8f9fa;
  color: var(--blue-vivid);
  border-color: #bdc1c6;
}

.compass-widget {
  display: flex;
  align-items: center;
  gap: 10px;
}

.speed-multiplier-pill {
  height: 28px;
  padding: 0 10px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 9999px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
  transition: all 0.15s ease;
}

.speed-multiplier-pill:hover {
  color: var(--blue-vivid);
  border-color: var(--blue-vivid);
}

.compass-dial {
  width: 114px;
  height: 114px;
  position: relative;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--card-shadow);
}

.compass-svg {
  width: 100%;
  height: 100%;
}

.compass-track {
  fill: none;
  stroke: #dadce0;
  stroke-width: 1.5;
}

.compass-indicator-ring {
  fill: none;
  stroke: #1a73e8;
  stroke-width: 2;
  stroke-dasharray: 4 6;
}

.cardinal-text {
  fill: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
}

.compass-pointer {
  fill: var(--blue-vivid);
  transform-origin: 60px 60px;
  transition: transform 0.1s linear;
}

.compass-center-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.compass-dial:hover .compass-center-label {
  color: var(--blue-vivid);
}

/* ==========================================================================
   BOTTOM 3-CARD MASTER CONTROL TRAY (1:1 with CyberDefend bottom deck)
   ========================================================================== */
.bottom-control-deck {
  position: absolute;
  bottom: 12px;
  left: 20px;
  right: 20px;
  height: 218px;
  z-index: 20;
  display: grid;
  grid-template-columns: 310px 1.2fr 1.55fr;
  gap: 12px;
  pointer-events: none;
}

.bottom-control-deck > * {
  pointer-events: auto;
}

.deck-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.deck-card:hover {
  border-color: #bdc1c6;
}

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

.card-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #0f172a;
  text-transform: uppercase;
}

/* Signal Strength Indicator */
.signal-indicator {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 12px;
}

.signal-indicator .bar {
  width: 2.5px;
  background: var(--blue-vivid);
  border-radius: 1px;
}

.signal-indicator .bar-1 { height: 30%; }
.signal-indicator .bar-2 { height: 55%; }
.signal-indicator .bar-3 { height: 80%; }
.signal-indicator .bar-4 { height: 100%; }

/* Card 1: Sensor Mooring & Gauges */
.vehicle-card-body {
  display: flex;
  gap: 10px;
  flex: 1;
}

.mooring-wireframe {
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 3px;
}

.mooring-svg {
  width: 100%;
  height: 85px;
}

.mooring-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.5px;
  margin-top: 1px;
}

.speedometer-cluster {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  padding-right: 68px;
}

.metric-block {
  display: flex;
  flex-direction: column;
}

/* Metric Framework Selector in Card 1 */
.metric-selector-pills {
  display: flex;
  gap: 4px;
  margin-bottom: 2px;
}

.m-pill {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.m-pill:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.m-pill.active {
  background: #e8f0fe;
  border-color: #bfdbfe;
  color: #1a73e8;
  font-weight: 700;
}

.metric-top-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.metric-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #1a73e8;
}

.metric-unit {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.metric-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #374151;
  text-transform: uppercase;
  margin-top: 1px;
}

.metric-delta {
  font-size: 10.5px;
  font-weight: 700;
}

/* D-Pad Controller (Google Styled Controls) */
.dpad-controller {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
}

.dpad-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #1e293b;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dpad-btn:hover {
  background: #e8f0fe;
  color: var(--blue-vivid);
  border-color: #bfdbfe;
}

.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-center { grid-column: 2; grid-row: 2; font-size: 7px; font-weight: 800; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

.vehicle-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #cbd5e1;
}

.deck-action-btn {
  height: 26px;
  padding: 0 12px;
  background: var(--blue-vivid);
  border: none;
  border-radius: 14px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.25);
  transition: all 0.2s ease;
}

.deck-action-btn:hover {
  background: #1765cc;
}

.regime-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #1a73e8;
}

.regime-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-vivid);
}

/* Card 2: Mooring Arrays Table (Google Sheets / Material Design Style) */
.table-header-tags {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 3px 9px;
  border-radius: 12px;
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
}

.pill-badge.active {
  color: #1a73e8;
  background: #e8f0fe;
  border-color: #bfdbfe;
  font-weight: 700;
}

.table-search-wrapper {
  position: relative;
  width: 140px;
}

.table-search-input {
  width: 100%;
  height: 26px;
  background: #f1f3f4;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0 24px 0 10px;
  font-family: var(--font-main);
  font-size: 11.5px;
  color: #0f172a;
  outline: none;
  transition: all 0.2s ease;
}

.table-search-input:focus {
  background: #ffffff;
  border-color: var(--blue-vivid);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.table-search-wrapper .search-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  pointer-events: none;
}

.table-scroll-container {
  flex: 1;
  overflow-y: auto;
  margin-top: 2px;
}

.cyber-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.cyber-data-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #334155;
  padding: 4px 6px;
  border-bottom: 2px solid #cbd5e1;
}

.cyber-data-table td {
  padding: 5px 6px;
  color: #0f172a;
  font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}

.cyber-data-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.cyber-data-table tbody tr:hover {
  background: #f8fafc;
}

.cyber-data-table tbody tr.active-row {
  background: #e8f0fe;
}

.col-id {
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #1a73e8;
}

.id-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-vivid);
}

.id-dot.alert {
  background: var(--alert-red);
}

.col-coord {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #475569;
}

.col-sync {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
}

.sync-bars {
  display: flex;
  gap: 2px;
  height: 10px;
  align-items: center;
}

.sync-bars span {
  width: 2px;
  height: 10px;
  background: #dadce0;
  border-radius: 1px;
}

.sync-bars span.fill {
  background: #1e8e3e;
}

.table-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  width: 22px;
  height: 22px;
  background: #f1f3f4;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #334155;
  font-weight: 700;
  cursor: pointer;
}

/* Card 3: Bifurcation Waveform & Scrubber */
.chart-tools {
  display: flex;
  gap: 6px;
}

.chart-icon-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f1f3f4;
  border: 1px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.chart-icon-btn:hover {
  border-color: var(--blue-vivid);
  color: var(--blue-vivid);
  background: #f8f9fa;
}

.chart-icon-btn.active {
  background: #e8f0fe;
  border-color: #bfdbfe;
  color: #1a73e8;
}

.deck-card-chart {
  display: flex;
  flex-direction: column;
}

.waveform-container {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

#waveform-canvas {
  width: 100%;
  height: 52px;
  display: block;
}

.waveform-anchors {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
}

.waveform-anchor {
  display: flex;
  flex-direction: column;
}

.anchor-pin {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #64748b;
  margin-bottom: 2px;
}

.anchor-pin.active {
  background: var(--blue-vivid);
}

.anchor-pin.alert {
  background: var(--alert-red);
}

.anchor-label {
  font-size: 10px;
  font-weight: 700;
  color: #0f172a;
}

.anchor-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #475569;
}

/* Timeline Scrubber (Google Material Slider) */
.timeline-scrubber-box {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.scrubber-readout-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.scrubber-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #334155;
}

.scrubber-year {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  color: #1a73e8;
}

.scrubber-info {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  margin-left: auto;
}

.cyber-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #dadce0;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  position: relative;
  margin: 3px 0;
  box-sizing: border-box;
}

.cyber-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue-vivid);
  box-shadow: 0 1px 4px rgba(26, 115, 232, 0.45);
  border: 2px solid #ffffff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cyber-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.6);
}

/* ==========================================================================
   MODALS (Clean Google Dialogs)
   ========================================================================== */
.cyber-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(32, 33, 36, 0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.cyber-modal-backdrop[hidden] {
  display: none !important;
}

.cyber-modal-card {
  width: 100%;
  max-width: 960px;
  max-height: 88vh;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(60, 64, 67, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #dadce0;
}

.modal-title-group .modal-pre {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--blue-vivid);
  text-transform: uppercase;
}

.modal-title-group h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-white);
  margin-top: 2px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--text-white);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #dadce0 #f8f9fa;
  color: #3c4043;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

.modal-lead {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* 4-Tier Fleet Grid */
.fleet-tiers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.fleet-tier-card {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
  transition: all 0.2s ease;
}

.fleet-tier-card:hover {
  border-color: #1a73e8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(60, 64, 67, 0.15);
}

.fleet-tier-card.featured {
  border-color: var(--blue-vivid);
  background: #f8fafd;
}

.tier-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.tier-badge.featured-badge {
  color: var(--blue-vivid);
}

.fleet-tier-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
}

.tier-price {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-vivid);
  margin-bottom: 10px;
}

.tier-price small {
  font-size: 10px;
  color: var(--text-muted);
}

.fleet-tier-card p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  flex: 1;
}

.tier-perks {
  list-style: none;
  font-size: 10.5px;
  color: #3c4043;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.tier-perks li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tier-perks li::before {
  content: "✓";
  color: #1e8e3e;
  font-weight: bold;
}

.tier-pledge-btn {
  width: 100%;
  height: 36px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: 18px;
  color: var(--blue-vivid);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tier-pledge-btn:hover {
  background: #e8f0fe;
  border-color: #c2e7ff;
}

.tier-pledge-btn.featured {
  background: var(--blue-vivid);
  border-color: var(--blue-vivid);
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.2);
}

.tier-pledge-btn.featured:hover {
  background: #1765cc;
}

.dataset-export-banner {
  background: #f8f9fa;
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.export-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 2px;
}

.export-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.export-download-btn {
  height: 36px;
  padding: 0 18px;
  background: var(--blue-vivid);
  border: none;
  border-radius: 18px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.2);
  transition: background 0.2s ease;
}

.export-download-btn:hover {
  background: #1765cc;
}

/* Stommel Modal Layout */
.stommel-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.stommel-canvas-box {
  background: #f8f9fa;
  border: 1px solid var(--border-hairline);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#stommel-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.stommel-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 10px;
  color: var(--text-muted);
}

.legend-line {
  display: inline-block;
  width: 12px;
  height: 2px;
  vertical-align: middle;
  margin-right: 4px;
}

.legend-line.active { background: var(--cyan-ice); }
.legend-line.collapsed { background: var(--alert-red); }
.legend-point {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  vertical-align: middle;
  margin-right: 4px;
}

.stommel-controls-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stommel-controls-box h3 {
  font-size: 14px;
  font-weight: 600;
}

.stommel-controls-box p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.slider-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
}

.stommel-readouts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  padding: 10px;
}

.s-readout {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.s-readout .label {
  font-size: 10px;
  font-weight: 700;
  color: #334155;
}

.s-readout .val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}

.stommel-reset-btn {
  height: 34px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stommel-reset-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

/* Toast */
.cyber-toast {
  position: fixed;
  top: 80px;
  right: 24px;
  background: #111827;
  color: #ffffff;
  border: 1px solid #374151;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  pointer-events: none;
}

.cyber-toast[hidden] {
  display: none !important;
}

/* ==========================================================================
   METRICS & PHYSICS EVALUATION MODAL
   ========================================================================== */
.modal-card-large {
  max-width: 1080px;
  max-height: 90vh;
}

.metrics-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.metrics-section-title .icon {
  font-size: 14px;
  font-weight: 700;
}

.metrics-section-title h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-white);
}

.metrics-section-title.excluded-title {
  border-bottom-color: rgba(255, 77, 90, 0.2);
}

.metrics-eval-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.eval-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.eval-card:hover {
  background: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.eval-card.validated {
  border-left: 4px solid #1a73e8;
  background: #f8fafc;
}

.eval-card.validated:hover {
  border-color: #1a73e8;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.10);
}

.eval-card.excluded {
  border-left: 4px solid #d93025;
  background: #fffbfa;
}

.eval-card.excluded:hover {
  border-color: #d93025;
  box-shadow: 0 4px 16px rgba(217, 48, 37, 0.10);
}

.eval-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #174ea6;
  background: #e8f0fe;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
}

.eval-badge.excluded-badge {
  color: #b31412;
  background: #fce8e6;
  border-color: #fad2cf;
}

.eval-card h4 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.eval-formula {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
}

.eval-card p {
  font-size: 12px;
  color: #1e293b;
  line-height: 1.55;
  margin: 0;
}

.eval-card p strong {
  color: #0f172a;
}

.eval-cite {
  font-size: 11px;
  font-style: italic;
  color: #475569;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed #cbd5e1;
}

.summary-matrix-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 16px 20px;
  margin-top: 16px;
}

.summary-matrix-box h4 {
  font-size: 13px;
  font-weight: 800;
  color: #15803d;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.summary-matrix-box p {
  font-size: 12px;
  color: #166534;
  line-height: 1.6;
  margin: 0;
}


/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIONS
   ========================================================================== */
@media (max-width: 1200px) {
  .bottom-control-deck {
    grid-template-columns: 280px 1.1fr 1.3fr;
  }
}

@media (max-width: 992px) {
  .bottom-control-deck {
    grid-template-columns: 1fr;
    height: auto;
    max-height: 48vh;
    overflow-y: auto;
  }
  .fleet-tiers-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metrics-eval-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal screen bleed */
  body, .cyber-app {
    overflow-x: hidden;
  }

  /* --- Top Nav Bar (Clean 2-Row Header on Mobile) --- */
  .top-nav-bar {
    position: absolute;
    top: 8px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 6px;
    padding: 0;
    background: transparent;
    pointer-events: none;
    z-index: 25;
  }
  .top-nav-bar > * {
    pointer-events: auto;
  }

  /* Row 1: Brand & Actions in a single horizontal row */
  .top-nav-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
  }
  .nav-brand {
    padding: 4px 10px;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-hairline);
    border-radius: 9999px;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
  }
  .brand-logo-icon svg {
    width: 18px;
    height: 18px;
  }
  .brand-name {
    font-size: 11px;
    font-weight: 800;
  }
  .brand-sub {
    display: none;
  }
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .nav-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 15px;
    padding: 0;
    background: rgba(255, 255, 255, 0.95);
  }
  .nav-icon-btn svg {
    width: 14px;
    height: 14px;
  }
  #btn-settings-toggle {
    display: none;
  }
  .nav-cta-pill {
    display: none;
  }
  .nav-back-hypno {
    padding: 4px 10px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    height: 30px;
    border-radius: 15px !important;
    white-space: nowrap;
    background: #ffffff !important;
    border: 1px solid var(--border-hairline) !important;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15) !important;
    display: inline-flex !important;
  }

  /* Row 2: Capsule Navigation Tabs */
  .nav-segmented-capsule {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 3px;
    background: rgba(241, 243, 244, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 9999px;
    scrollbar-width: none;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.12);
  }
  .nav-segmented-capsule::-webkit-scrollbar {
    display: none;
  }
  .nav-capsule-btn {
    padding: 4px 10px;
    font-size: 10.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* --- Climate Impact Card (Collapsible Accordion on Mobile) --- */
  .climate-impact-card {
    top: 80px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-hairline);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 18;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .impact-card-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
  }
  .impact-pre-tag {
    font-size: 8px;
    letter-spacing: 0.5px;
  }
  .impact-city-title {
    font-size: 13px;
    margin: 0;
  }
  .impact-temp-badge {
    font-size: 10.5px;
    padding: 2px 7px;
  }
  .impact-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
    flex-shrink: 0;
  }
  .climate-impact-card.is-expanded .impact-collapse-toggle {
    transform: rotate(180deg);
  }
  .climate-impact-card:not(.is-expanded) .impact-expandable-body {
    display: none;
  }
  .climate-impact-card.is-expanded .impact-expandable-body {
    display: block;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    max-height: 52vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .climate-impact-card .impact-region-selector {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
    gap: 4px;
  }
  .climate-impact-card .impact-reg-pill {
    padding: 3px 8px;
    font-size: 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .climate-impact-card .impact-dimensions-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
  .climate-impact-card .impact-dim-item {
    padding: 4px 6px;
  }
  .climate-impact-card .dim-label {
    font-size: 8.5px;
  }
  .climate-impact-card .dim-val {
    font-size: 10px;
  }
  .climate-impact-card .impact-everyday-text {
    font-size: 10px;
    line-height: 1.3;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .climate-impact-card .thermal-anomaly-strip {
    display: none;
  }

  /* --- Reticle Mooring Card (Docked Bottom Placement on Mobile) --- */
  .reticle-target-card {
    position: absolute;
    left: 10px !important;
    right: 10px !important;
    bottom: 190px !important;
    top: auto !important;
    transform: none !important;
    width: auto;
    max-width: 360px;
    margin: 0 auto;
    z-index: 22;
    align-items: center;
    gap: 6px;
  }
  .target-card-inner {
    flex: 1;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-hairline);
    border-radius: 14px;
    padding: 8px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }
  .target-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    line-height: 1;
    padding: 0;
  }
  .target-focus-btn {
    width: 38px;
    height: 38px;
    border-radius: 19px;
    background: #ffffff;
    border: 1px solid var(--border-hairline);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
  }

  /* Hide right controls & compass dial on mobile */
  .right-action-stack {
    display: none;
  }
  .compass-control-hub {
    display: none;
  }

  /* --- Bottom Control Deck (Snapping Carousel on Mobile) --- */
  .bottom-control-deck {
    left: 10px;
    right: 10px;
    bottom: 8px;
    height: 200px;
    max-height: 200px;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
    z-index: 20;
  }
  .bottom-control-deck::-webkit-scrollbar {
    display: none;
  }
  .bottom-control-deck .deck-card {
    min-width: calc(100vw - 28px);
    width: calc(100vw - 28px);
    max-width: 360px;
    scroll-snap-align: center;
    flex-shrink: 0;
    height: 100%;
    border-radius: 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-sizing: border-box;
  }

  .bottom-control-deck .deck-card-chart #waveform-canvas {
    height: 46px;
  }
  .bottom-control-deck .deck-card-chart .timeline-scrubber-box {
    margin-top: auto;
    padding-top: 6px;
  }
  .bottom-control-deck .deck-card-chart .scrubber-year {
    font-size: 16px;
  }

  /* Card 1 Tweaks */
  .dpad-controller {
    display: none !important;
  }
  .mooring-wireframe {
    display: none;
  }
  .speedometer-cluster {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: start;
  }
  .metric-block {
    margin-bottom: 0;
  }
  .metric-selector-pills {
    margin-bottom: 3px;
    flex-wrap: wrap;
    gap: 2px;
  }
  .m-pill {
    font-size: 8px;
    padding: 2px 5px;
  }
  .metric-num {
    font-size: 18px;
  }
  .vehicle-card-footer {
    margin-top: 4px;
    padding-top: 4px;
  }

  /* Modals on Mobile */
  .cyber-modal-card {
    max-height: 92vh;
    border-radius: 16px;
    margin: 8px;
  }
  .modal-header {
    padding: 12px 16px;
  }
  .modal-body {
    padding: 12px 16px;
  }
}
