/* ==========================================================================
   Les Ailes du Béarn — 3D Swallow & Swift Simulator (Pau, Pyrénées-Atlantiques)
   Naturalist & Avian Aerodynamics HUD + Interactive Academy Stylesheet
   ========================================================================== */

:root {
  --bg-glass: rgba(13, 20, 31, 0.78);
  --bg-glass-heavy: rgba(11, 17, 27, 0.94);
  --border-subtle: rgba(148, 163, 184, 0.22);
  --border-highlight: rgba(56, 189, 248, 0.45);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --accent-gold: #fbbf24;
  --accent-emerald: #10b981;
  --accent-cyan: #38bdf8;
  --accent-coral: #f43f5e;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #090d16;
  color: var(--text-main);
  font-family: var(--font-sans);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#sim-canvas {
  position: fixed;
   inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 1;
}

.hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   TOP HUD BAR
   -------------------------------------------------------------------------- */
.hud-top-bar {
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.brand-block {
  display: flex;
  flex-direction: column;
  min-width: 215px;
}

.brand-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tag {
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fde68a;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
}

.brand-species-info {
  display: flex;
  flex-direction: column;
  margin-top: 2px;
}

.brand-species-info strong {
  font-size: 0.92rem;
  color: #ffffff;
}

.brand-species-info span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}

.hud-selectors-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hud-control-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hud-control-group span {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.hud-control-group select {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}

.hud-control-group select:hover,
.hud-control-group select:focus {
  border-color: var(--accent-cyan);
}

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

.btn-gold,
.btn-emerald,
.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0f172a;
}

.btn-gold:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-emerald {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #06281e;
}

.btn-emerald:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-cyan);
  color: #082f49;
}

.btn-secondary {
  background: rgba(51, 65, 85, 0.85);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

.btn-restore-hud {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 25;
  background: rgba(10, 18, 30, 0.82);
  backdrop-filter: blur(12px);
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: all 0.18s ease;
}

.btn-restore-hud:hover {
  background: rgba(14, 116, 144, 0.88);
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   INSECT FORAGING & SCORE WIDGET
   -------------------------------------------------------------------------- */
.foraging-widget {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.foraging-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 12px;
  background: rgba(10, 18, 30, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4), 0 0 15px rgba(245, 158, 11, 0.15);
  transition: all 0.22s ease;
}

.foraging-widget.pulse .foraging-pill {
  border-color: #fbbf24;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.5), 0 0 25px rgba(251, 191, 36, 0.55);
  transform: scale(1.08);
}

.foraging-icon {
  font-size: 1.15rem;
  line-height: 1;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.foraging-stat {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.foraging-num {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fef08a;
  letter-spacing: -0.02em;
}

.foraging-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.foraging-divider {
  width: 1px;
  height: 14px;
  background: rgba(148, 163, 184, 0.3);
}

.foraging-combo-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  animation: comboPulse 0.4s ease-in-out infinite alternate;
}

.foraging-combo-badge.tier-1 { background: linear-gradient(135deg, #10b981, #06b6d4); box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4); }
.foraging-combo-badge.tier-2 { background: linear-gradient(135deg, #06b6d4, #3b82f6); box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4); }
.foraging-combo-badge.tier-3 { background: linear-gradient(135deg, #f59e0b, #f97316); box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4); }
.foraging-combo-badge.tier-4 { background: linear-gradient(135deg, #f97316, #ef4444); box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5); }
.foraging-combo-badge.tier-5 { background: linear-gradient(135deg, #ec4899, #8b5cf6); box-shadow: 0 2px 12px rgba(236, 72, 153, 0.6); }

@keyframes comboPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.12); }
}

.foraging-combo-track {
  width: 100%;
  height: 3px;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.foraging-combo-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #fbbf24, #f43f5e);
  border-radius: 999px;
  transition: width 0.06s linear;
}

.foraging-nearby-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 999px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #fbbf24;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  animation: pulseBeacon 1.8s ease-in-out infinite;
}

.foraging-nearby-pulse {
  animation: spinShimmer 3s linear infinite;
  display: inline-block;
}

@keyframes pulseBeacon {
  0%, 100% { border-color: rgba(251, 191, 36, 0.45); box-shadow: 0 0 8px rgba(251, 191, 36, 0.2); }
  50% { border-color: #fbbf24; box-shadow: 0 0 16px rgba(251, 191, 36, 0.55); }
}

@keyframes spinShimmer {
  0% { transform: scale(0.9) rotate(0deg); }
  50% { transform: scale(1.15) rotate(180deg); }
  100% { transform: scale(0.9) rotate(360deg); }
}

/* --------------------------------------------------------------------------
   FLOATING SCORE NOTIFICATIONS LAYER
   -------------------------------------------------------------------------- */
.floating-scores-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  overflow: hidden;
}

.score-popup {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 16px rgba(251, 191, 36, 0.45);
  animation: floatUpAndFade 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  white-space: nowrap;
}

.score-popup.combo-1 { color: #34d399; border-color: #34d399; box-shadow: 0 0 14px rgba(52, 211, 153, 0.45); }
.score-popup.combo-2 { color: #38bdf8; border-color: #38bdf8; box-shadow: 0 0 16px rgba(56, 189, 248, 0.5); }
.score-popup.combo-3 { color: #fbbf24; border-color: #fbbf24; box-shadow: 0 0 20px rgba(251, 191, 36, 0.6); }
.score-popup.combo-4 { color: #fb923c; border-color: #fb923c; box-shadow: 0 0 22px rgba(251, 146, 60, 0.65); }
.score-popup.combo-5 { color: #f43f5e; border-color: #f43f5e; font-size: 1.35rem; box-shadow: 0 0 28px rgba(244, 63, 94, 0.8); }

@keyframes floatUpAndFade {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.65);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -15px) scale(1.15);
  }
  30% {
    transform: translate(-50%, -24px) scale(1.0);
  }
  70% {
    opacity: 0.95;
    transform: translate(-50%, -46px) scale(0.98);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70px) scale(0.85);
  }
}

.btn-panel-close {
  background: rgba(15, 23, 42, 0.75);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 6px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-panel-close:hover {
  background: rgba(244, 63, 94, 0.28);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.55);
}

/* --------------------------------------------------------------------------
   ACTIVE FIELD EXPEDITION BANNER
   -------------------------------------------------------------------------- */
.expedition-banner {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  width: min(820px, 94vw);
  z-index: 10;
  background: rgba(12, 24, 38, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(16, 185, 129, 0.5);
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.exp-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.82rem;
}

.exp-live-pill {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 8px;
}

.exp-banner-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--accent-cyan);
}

.btn-mini-close {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 0.72rem;
  cursor: pointer;
}

.exp-banner-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 6px;
}

.exp-step-col h4 {
  font-size: 0.84rem;
  color: #34d399;
  margin-bottom: 2px;
}

.exp-step-col p {
  font-size: 0.78rem;
  color: var(--text-main);
  line-height: 1.35;
}

.exp-science-col {
  background: rgba(15, 23, 42, 0.65);
  border-left: 3px solid var(--accent-gold);
  padding: 5px 10px;
  border-radius: 4px;
}

.science-label {
  font-size: 0.64rem;
  font-weight: 800;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 2px;
}

.exp-science-col p {
  font-size: 0.74rem;
  color: #e2e8f0;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   DYNAMIC AERODYNAMIC STATUS BADGES
   -------------------------------------------------------------------------- */
.hud-aero-badges {
  position: fixed;
  bottom: 158px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  pointer-events: none;
}

.aero-badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.badge-ridge {
  background: rgba(14, 116, 144, 0.85);
  border: 1px solid #38bdf8;
  color: #e0f2fe;
}

.badge-thermal {
  background: rgba(180, 83, 9, 0.85);
  border: 1px solid #fbbf24;
  color: #fef3c7;
}

.badge-flock {
  background: rgba(6, 95, 70, 0.85);
  border: 1px solid #34d399;
  color: #d1fae5;
}

.badge-water {
  background: rgba(3, 105, 161, 0.9);
  border: 1px solid #7dd3fc;
  color: #f0f9ff;
}

.badge-stall {
  background: rgba(190, 18, 60, 0.9);
  border: 1px solid #fda4af;
  color: #ffe4e6;
}

.badge-cling {
  background: rgba(30, 41, 59, 0.92);
  border: 1px solid #fbbf24;
  color: #fde68a;
}

/* --------------------------------------------------------------------------
   BOTTOM HUD PANELS (Left Telemetry, Center Weather/Toggles, Right Minimap)
   -------------------------------------------------------------------------- */
.hud-bottom-left {
  position: fixed;
  bottom: 12px;
  left: 12px;
  width: 340px;
  z-index: 10;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 12px;
}

.district-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
}

.tel-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  background: rgba(15, 23, 42, 0.55);
  padding: 4px 8px;
  border-radius: 6px;
}

.tel-label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.tel-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-main);
}

.text-emerald {
  color: #34d399 !important;
}

.text-amber {
  color: #fbbf24 !important;
}

.text-danger {
  color: #fb7185 !important;
}

.stamina-bar-wrap {
  margin-top: 8px;
}

.stamina-label-row {
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.stamina-track {
  height: 6px;
  background: rgba(30, 41, 59, 0.9);
  border-radius: 99px;
  overflow: hidden;
}

.stamina-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #38bdf8);
  transition: width 0.2s ease;
}

.assisted-flock-row {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: #fde68a;
}

.assisted-flock-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Bottom Center Bar */
.hud-bottom-center {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 9px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 540px;
}

.time-control-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.time-header strong {
  color: var(--accent-gold);
}

.time-control-bar input[type='range'] {
  width: 100%;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.time-presets {
  display: flex;
  gap: 6px;
  justify-content: space-between;
}

.btn-preset {
  flex: 1;
  background: rgba(30, 41, 59, 0.75);
  color: #cbd5e1;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  padding: 3px 6px;
  font-size: 0.68rem;
  cursor: pointer;
}

.btn-preset:hover {
  border-color: var(--accent-gold);
  color: #ffffff;
}

.quick-toggles-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-pill {
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pill:hover {
  border-color: var(--accent-cyan);
}

.btn-pill.active-pill {
  background: rgba(14, 116, 144, 0.65);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

/* Bottom Right Minimap & Controls */
.hud-bottom-right {
  position: fixed;
  bottom: 12px;
  right: 12px;
  width: 264px;
  z-index: 10;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 9px 11px;
}

.minimap-header {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

#minimap-canvas {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  display: block;
  margin-bottom: 6px;
}

.controls-legend {
  font-size: 0.68rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

kbd {
  background: rgba(51, 65, 85, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 4px;
  padding: 0px 4px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: #f8fafc;
}

/* --------------------------------------------------------------------------
   ORNITHOLOGICAL ACADEMY & AERODYNAMICS LAB MODAL
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(5, 10, 18, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.academy-modal {
  width: min(1140px, 96vw);
  height: min(840px, 90vh);
  background: var(--bg-glass-heavy);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.academy-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.8);
}

.modal-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
}

.academy-modal-header h2 {
  font-size: 1.25rem;
  color: #ffffff;
  margin-top: 2px;
}

.btn-close-modal {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.academy-tabs-nav {
  display: flex;
  gap: 6px;
  padding: 10px 22px;
  background: rgba(15, 23, 42, 0.55);
  border-bottom: 1px solid var(--border-subtle);
}

.academy-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.academy-tab-btn:hover {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.5);
}

.academy-tab-btn.active {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.academy-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

.academy-section-intro {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.academy-section-intro h2 {
  font-size: 1.1rem;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.academy-section-intro p {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Species Study Cards */
.species-cards-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.species-study-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.species-study-card.active-species-card {
  border-color: var(--accent-emerald);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35);
}

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

.taxonomy-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.badge-swift {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-swallow {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.card-header-row h3 {
  font-size: 1.08rem;
  color: #ffffff;
}

.fr-name {
  color: var(--accent-gold);
  font-weight: 600;
}

.sci-name {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.species-tagline {
  font-size: 0.86rem;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.pau-habitat-pill {
  background: rgba(16, 185, 129, 0.12);
  border-left: 3px solid var(--accent-emerald);
  padding: 5px 10px;
  font-size: 0.78rem;
  color: #d1fae5;
  margin-bottom: 12px;
  border-radius: 4px;
}

.biometrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.bio-stat {
  background: rgba(30, 41, 59, 0.65);
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.biology-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.biology-details-grid > div {
  background: rgba(9, 13, 22, 0.5);
  padding: 8px 10px;
  border-radius: 6px;
}

/* Aerodynamics Wind-Tunnel Lab Tab */
.aero-lab-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.aero-controls-panel,
.aero-science-panel {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.aero-controls-panel h3,
.aero-science-panel h3 {
  font-size: 1rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
}

.muted-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.4;
}

.lab-slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}

.lab-slider-row input[type='range'] {
  width: 100%;
  accent-color: var(--accent-cyan);
}

.lab-readout-box {
  background: rgba(9, 13, 22, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.lab-metric {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.science-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 18px;
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Behavior Chapters & Expeditions */
.behavior-chapters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.behavior-chapter-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  font-size: 0.84rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.chapter-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.behavior-chapter-card h3 {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 8px;
}

.behavior-chapter-card p {
  margin-bottom: 8px;
}

.behavior-chapter-card ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.expeditions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.expedition-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.exp-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.exp-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-emerald);
}

.exp-card-top h3 {
  font-size: 1.05rem;
  color: #ffffff;
}

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

.exp-desc {
  font-size: 0.84rem;
  color: #e2e8f0;
  margin-bottom: 10px;
}

.exp-steps-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.exp-step-item {
  background: rgba(9, 13, 22, 0.55);
  border-left: 3px solid var(--accent-cyan);
  padding: 8px 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
  color: #cbd5e1;
}

.exp-step-item strong {
  color: #ffffff;
}

/* ==========================================================================
   MOBILE & TOUCH DEVICE FLIGHT CONTROLS
   Virtual analog flight stick, ergonomic action pad, and responsive layouts
   ========================================================================== */

.mobile-flight-controls {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* Left Thumbstick Zone */
.touch-joystick-zone {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50vw;
  height: 52vh;
  min-height: 240px;
  pointer-events: auto;
  touch-action: none;
}

.touch-joystick-base {
  position: absolute;
  bottom: 32px;
  left: 32px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 2px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.22), inset 0 0 16px rgba(56, 189, 248, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.touch-joystick-base.active-touch {
  border-color: rgba(52, 211, 153, 0.85);
  box-shadow: 0 0 32px rgba(52, 211, 153, 0.4), inset 0 0 20px rgba(52, 211, 153, 0.2);
}

.stick-label {
  position: absolute;
  font-size: 8.5px;
  font-weight: 800;
  color: rgba(148, 163, 184, 0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
}

.stick-label-up {
  top: 7px;
}

.stick-label-down {
  bottom: 7px;
}

.stick-label-left {
  left: 8px;
}

.stick-label-right {
  right: 8px;
}

.touch-joystick-knob {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(16, 185, 129, 0.95));
  border: 2.5px solid #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55), 0 0 18px rgba(56, 189, 248, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: transform;
}

.knob-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
}

/* Mobile Top Quick Action Bar */
.mobile-top-bar {
  position: absolute;
  top: env(safe-area-inset-top, 14px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  pointer-events: auto;
  z-index: 95;
}

.mobile-top-btn {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #f8fafc;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  touch-action: manipulation;
}

.mobile-top-btn:active {
  transform: scale(0.94);
  background: rgba(30, 41, 59, 0.95);
}

/* Right Thumb Action Pad */
.touch-action-pad {
  position: absolute;
  bottom: 22px;
  right: 22px;
  width: 180px;
  height: 180px;
  pointer-events: auto;
  touch-action: none;
}

.touch-btn {
  position: absolute;
  border-radius: 50%;
  border: 2px solid;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  touch-action: none;
  transition: transform 0.08s ease, filter 0.08s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.touch-btn:active,
.touch-btn.touch-active {
  transform: scale(0.92);
  filter: brightness(1.3);
}

/* 🪶 Flap (Large Primary) */
.touch-btn-flap {
  width: 74px;
  height: 74px;
  bottom: 6px;
  right: 6px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.6) 0%, rgba(5, 150, 105, 0.92) 100%);
  border-color: rgba(110, 231, 183, 0.95);
  box-shadow: 0 0 24px rgba(52, 211, 153, 0.42);
}

.touch-btn-flap .touch-icon {
  font-size: 24px;
}

/* ⚡ Stoop / Dive */
.touch-btn-dive {
  width: 56px;
  height: 56px;
  bottom: 94px;
  right: 12px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.55) 0%, rgba(217, 119, 6, 0.88) 100%);
  border-color: rgba(252, 211, 77, 0.92);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.38);
}

.touch-btn-dive .touch-icon {
  font-size: 18px;
}

/* 🦅 Soar / Thermal Glide */
.touch-btn-soar {
  width: 56px;
  height: 56px;
  bottom: 12px;
  right: 94px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.55) 0%, rgba(2, 132, 199, 0.88) 100%);
  border-color: rgba(125, 211, 252, 0.92);
  box-shadow: 0 0 18px rgba(14, 165, 233, 0.38);
}

.touch-btn-soar .touch-icon {
  font-size: 18px;
}

/* 🔊 Screaming Party Vocal Call */
.touch-btn-call {
  width: 48px;
  height: 48px;
  bottom: 84px;
  right: 84px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.55) 0%, rgba(147, 51, 234, 0.88) 100%);
  border-color: rgba(216, 180, 254, 0.92);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.38);
}

.touch-btn-call .touch-icon {
  font-size: 16px;
}

.touch-icon {
  line-height: 1;
  pointer-events: none;
}

.touch-text {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-top: 2px;
  pointer-events: none;
}

/* Mobile Media Queries */
@media (max-width: 820px) {
  .hud-top-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    max-height: 45vh;
    overflow-y: auto;
  }

  .hud-selectors-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .hud-control-group select {
    min-width: 140px;
    font-size: 12px;
  }

  .hud-bottom-right {
    max-width: 220px;
  }

  .hud-panel-telemetry {
    top: auto;
    bottom: 210px;
    left: 12px;
    padding: 8px 12px;
    font-size: 11px;
  }

  .academy-modal {
    max-width: 95vw;
    max-height: 88vh;
  }

  .academy-tabs-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 12px;
  }

  .controls-legend {
    display: none; /* Hide desktop keyboard legend on small phones */
  }
}

/* --------------------------------------------------------------------------
   SOLAR LIGHTING & ATMOSPHERE STUDIO STYLES
   -------------------------------------------------------------------------- */
.btn-quick-lighting {
  position: fixed;
  top: 14px;
  right: 174px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 18, 30, 0.88);
  backdrop-filter: blur(14px);
  color: #f8fafc;
  border: 1px solid rgba(251, 191, 36, 0.45);
  border-radius: 999px;
  padding: 8px 14px 8px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 12px rgba(251, 191, 36, 0.12);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-quick-lighting:hover {
  background: rgba(22, 33, 50, 0.95);
  border-color: #fbbf24;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 18px rgba(251, 191, 36, 0.35);
  transform: translateY(-1px);
}

.quick-lighting-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.quick-lighting-label {
  color: #fef08a;
  letter-spacing: 0.02em;
}

.quick-lighting-arrow {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-left: 1px;
}

.lighting-presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.lighting-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
}

.lighting-card:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(251, 191, 36, 0.55);
  transform: translateY(-2px);
}

.lighting-card.active {
  background: rgba(251, 191, 36, 0.12);
  border-color: #fbbf24;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.22);
}

.lighting-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lighting-card-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.lighting-card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.lighting-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.lighting-card-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.45;
}

.lighting-sliders-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 16px 18px;
}

.lighting-slider-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.lighting-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #cbd5e1;
}

.lighting-clock-badge {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #fbbf24;
  background: rgba(15, 23, 42, 0.9);
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.lighting-slider-subtext {
  font-size: 0.72rem;
  color: #94a3b8;
  font-style: italic;
}

.live-weather-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.live-weather-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-weather-pin {
  font-size: 1.25rem;
  line-height: 1;
}

.live-weather-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #f8fafc;
}

.live-weather-tag {
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.live-weather-details {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 2px;
}

.btn-sync-weather {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #bae6fd;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-sync-weather:hover {
  background: rgba(56, 189, 248, 0.3);
  border-color: #38bdf8;
  color: #ffffff;
}

.btn-sync-weather.syncing {
  opacity: 0.6;
  pointer-events: none;
}

.lighting-slider-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.lighting-slider-cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 640px) {
  .lighting-slider-cols-3 {
    grid-template-columns: 1fr;
  }
}

.lighting-slider-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 640px) {
  .btn-quick-lighting {
    right: 12px;
    top: 56px;
    padding: 6px 10px;
    font-size: 0.72rem;
  }
  .lighting-slider-cols {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   STREAMLINED HUD & COMPACT TELEMETRY
   -------------------------------------------------------------------------- */
.btn-coral {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), rgba(225, 29, 72, 0.4));
  border: 1px solid rgba(244, 63, 94, 0.55);
  color: #fecdd3;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-coral:hover {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.45), rgba(225, 29, 72, 0.65));
  color: #ffffff;
  border-color: rgba(244, 63, 94, 0.85);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.4);
}

.telemetry-compact-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.tel-badge {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.tel-badge .tel-label {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tel-badge .tel-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #f8fafc;
}

/* --------------------------------------------------------------------------
   PHOTO STUDIO & CAMERA CAPTURE BAR
   -------------------------------------------------------------------------- */
.photo-studio-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 18px;
  background: rgba(11, 17, 27, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(244, 63, 94, 0.45);
  border-radius: 9999px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(244, 63, 94, 0.22);
  max-width: 92vw;
  flex-wrap: wrap;
  justify-content: center;
  animation: photoBarSlideUp 0.2s ease-out;
}

@keyframes photoBarSlideUp {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.photo-studio-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.photo-mode-badge {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fb7185;
}

.photo-mode-tip {
  font-size: 0.65rem;
  color: #94a3b8;
  white-space: nowrap;
}

.photo-studio-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.photo-control-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
}

.photo-control-item input[type='range'] {
  width: 82px;
  accent-color: #fb7185;
  cursor: pointer;
}

#photo-time-val {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #fbbf24;
  background: rgba(15, 23, 42, 0.85);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.photo-zoom-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.85);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  min-width: 32px;
  text-align: center;
}

.btn-photo-toggle {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-photo-toggle:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.5);
}

.btn-photo-toggle.active-hidden {
  background: rgba(244, 63, 94, 0.25);
  border-color: rgba(244, 63, 94, 0.6);
  color: #fecdd3;
}

.btn-photo-secondary {
  background: rgba(30, 41, 59, 0.75);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-photo-secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
}

.photo-studio-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-photo-capture {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  color: #ffffff;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.45);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-photo-capture:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 20px rgba(244, 63, 94, 0.65);
}

.btn-photo-resume {
  background: rgba(30, 41, 59, 0.85);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-photo-resume:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #ffffff;
}

.photo-flash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
}

.photo-flash.active {
  opacity: 0.95;
  transition: none;
}

.photo-toast {
  position: fixed;
  top: 75px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1001;
  background: rgba(15, 23, 42, 0.92);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: photoToastPop 0.25s ease-out;
}

@keyframes photoToastPop {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   MAIN PAGE TOP QUICK DOCK (Choice of Bird, Lighting, Picture Mode, Sound, Guide, HUD)
   ========================================================================== */
.top-quick-dock {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-dock-pill,
.top-dock-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  background: rgba(10, 18, 30, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.top-dock-btn:hover,
.top-dock-pill:hover {
  background: rgba(20, 32, 50, 0.94);
  border-color: rgba(56, 189, 248, 0.65);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.top-dock-icon {
  font-size: 1rem;
  line-height: 1;
}

.top-dock-text {
  letter-spacing: 0.01em;
}

/* 1. Choice of Bird Pill */
.top-bird-pill {
  position: relative;
  padding: 0 11px 0 12px;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(11, 22, 36, 0.88);
}

/* Discrete Flight Compass & Sun Bearing Widget */
.top-compass-pill {
  padding: 0 10px 0 6px;
  gap: 8px;
  cursor: default;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(10, 18, 30, 0.86);
  user-select: none;
}

.compass-mini-dial {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.compass-rose {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.08s linear;
}

.compass-cardinal {
  position: absolute;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.compass-cardinal.card-n {
  top: 1px;
  left: 50%;
  transform: translateX(-50%);
  color: #ef4444; /* Vivid Red for North */
}

.compass-cardinal.card-s {
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  color: #94a3b8;
}

.compass-cardinal.card-e {
  right: 1.5px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.compass-cardinal.card-w {
  left: 1.5px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.compass-sun-marker {
  position: absolute;
  font-size: 8px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 0 2px #f59e0b);
}

.compass-fixed-needle {
  position: absolute;
  font-size: 8px;
  line-height: 1;
  color: #38bdf8;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  text-shadow: 0 0 4px rgba(56, 189, 248, 0.8);
  z-index: 2;
}

.compass-heading-text {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-family: var(--font-mono, monospace);
}

.compass-heading-text strong {
  font-size: 0.82rem;
  color: #f8fafc;
  font-weight: 700;
  min-width: 30px;
}

.compass-heading-text span {
  font-size: 0.72rem;
  font-weight: 800;
  color: #38bdf8;
  min-width: 14px;
}

.top-bird-select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  color: #f0f9ff;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  padding-right: 14px;
  cursor: pointer;
  outline: none;
  max-width: 175px;
  text-overflow: ellipsis;
}

.top-bird-select option {
  background: #0f172a;
  color: #f8fafc;
  font-weight: 600;
}

.top-dock-chevron {
  position: absolute;
  right: 10px;
  font-size: 0.72rem;
  color: #7dd3fc;
  pointer-events: none;
}

/* 2. Solar Lighting Pill */
.top-dock-lighting {
  border-color: rgba(251, 191, 36, 0.45);
}

.top-dock-lighting .top-dock-text {
  color: #fef08a;
}

.top-dock-lighting:hover {
  border-color: #fbbf24;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 14px rgba(251, 191, 36, 0.3);
}

/* 3. Picture Mode Button */
.top-dock-photo {
  border-color: rgba(244, 63, 94, 0.48);
  color: #ffe4e6;
}

.top-dock-photo:hover {
  border-color: #fb7185;
  background: rgba(136, 19, 55, 0.65);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 14px rgba(244, 63, 94, 0.35);
}

/* 4. Sound On / Off Icon Button */
.top-dock-icon-only {
  width: 36px;
  padding: 0;
  justify-content: center;
}

.top-dock-icon-only.muted {
  border-color: rgba(244, 63, 94, 0.55);
  color: #fda4af;
  background: rgba(30, 20, 32, 0.88);
}

/* 5. Guide Button */
.top-dock-guide {
  border-color: rgba(16, 185, 129, 0.45);
  color: #d1fae5;
}

.top-dock-guide:hover {
  border-color: #34d399;
  background: rgba(6, 78, 59, 0.72);
}

/* 6. Smart HUD Toggle Button */
.top-dock-hud.hud-active {
  background: rgba(14, 116, 144, 0.85);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

/* ==========================================================================
   SMART & SIMPLE BOTTOM HUD CARDS
   ========================================================================== */
.hud-bottom-left {
  width: 310px;
  padding: 10px 13px;
  border-radius: 14px;
  background: rgba(11, 18, 29, 0.82);
  backdrop-filter: blur(14px);
}

.hud-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
}

.hud-species-summary {
  display: flex;
  flex-direction: column;
}

.hud-species-summary strong {
  font-size: 0.82rem;
  color: #ffffff;
  line-height: 1.2;
}

.hud-species-summary span {
  font-size: 0.66rem;
  color: var(--text-muted);
  font-style: italic;
}

.hud-bottom-left .district-indicator {
  font-size: 0.7rem;
  margin-bottom: 8px;
  padding-bottom: 6px;
}

.stamina-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.stamina-meta {
  font-family: var(--font-mono);
  color: #7dd3fc;
  font-weight: 600;
}

.hud-bottom-center {
  min-width: 440px;
  max-width: 540px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(11, 18, 29, 0.82);
  backdrop-filter: blur(14px);
  gap: 9px;
}

.smart-deck-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.smart-deck-select-group {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  padding: 4px 8px;
  flex: 1;
  min-width: 0;
}

.smart-deck-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: #94a3b8;
  white-space: nowrap;
}

.smart-deck-select-group select {
  background: transparent;
  color: #f1f5f9;
  border: none;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  width: 100%;
  min-width: 0;
  text-overflow: ellipsis;
}

.smart-deck-select-group select option {
  background: #0f172a;
  color: #f8fafc;
}

.hud-bottom-right {
  width: 248px;
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(11, 18, 29, 0.82);
  backdrop-filter: blur(14px);
}

.hud-aero-badges {
  bottom: 136px;
}

@media (max-width: 900px) {
  .top-quick-dock {
    top: 52px;
    right: 12px;
    left: 12px;
    justify-content: flex-start;
    gap: 6px;
  }

  .top-dock-pill,
  .top-dock-btn {
    height: 32px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .top-bird-select {
    max-width: 130px;
    font-size: 0.72rem;
  }

  .hud-bottom-center {
    min-width: 0;
    width: calc(100vw - 24px);
  }

  .smart-deck-top {
    flex-wrap: wrap;
  }
}



/* ==========================================================================
   ONE CONTROL SCHEME AT A TIME (body.input-touch / body.input-desktop)
   Set by MobileFlightControls from the last input used (finger vs mouse/keyboard).
   ========================================================================== */
.touch-only { display: none !important; }
body.input-touch .touch-only { display: inline-flex !important; }
body.input-touch .desktop-only,
body.input-touch .key-hint { display: none !important; }

/* Compact dock: icon-only secondary buttons and a capped lighting label keep it on one row */
.top-dock-lighting .top-dock-text {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 1180px) {
  .top-dock-photo .top-dock-text,
  .top-dock-guide .top-dock-text,
  .top-dock-hud .top-dock-text { display: none; }
  .top-dock-photo, .top-dock-guide, .top-dock-hud { padding: 0 10px; }
  .top-dock-lighting .top-dock-text { max-width: 120px; }
}

@media (max-width: 900px) {
  .top-quick-dock { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .top-quick-dock::-webkit-scrollbar { display: none; }
  .top-dock-lighting .top-dock-text { max-width: 40px; text-overflow: clip; }   /* just the clock */
  .top-bird-select { max-width: 110px; }
}

/* Touch mode: keep HUD panels and badges clear of the thumbstick and action pad */
body.input-touch .hud-bottom-left,
body.input-touch .hud-bottom-right { bottom: 214px; }
body.input-touch .hud-bottom-center { bottom: 214px; }
body.input-touch .hud-aero-badges { bottom: 214px; }

/* Phones: one HUD panel (the flight deck) instead of three stacked on top of each other */
@media (max-width: 700px) {
  .hud-bottom-left,
  .hud-bottom-right { display: none !important; }
  body.input-touch .hud-aero-badges { bottom: auto; top: 104px; }
}

/* ==========================================================================
   SECRET SUPERPOWER 10x SPEED HUD PILL & NOTIFICATION
   ========================================================================== */
.hud-superpower-pill {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.92), rgba(245, 158, 11, 0.95));
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.65), 0 4px 12px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  pointer-events: auto;
  cursor: pointer;
  animation: superpowerPulse 1.6s ease-in-out infinite alternate;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hud-superpower-pill.hidden {
  display: none !important;
}

.hud-superpower-pill .superpower-bolt {
  font-size: 1.1rem;
  animation: superpowerFlash 0.8s ease-in-out infinite alternate;
}

.hud-superpower-pill .superpower-hint {
  font-size: 0.72rem;
  padding: 2px 6px;
  background: rgba(15, 23, 42, 0.85);
  color: #fef08a;
  border-radius: 4px;
}

@keyframes superpowerPulse {
  0% { transform: translateX(-50%) scale(1.0); box-shadow: 0 0 16px rgba(245, 158, 11, 0.5); }
  100% { transform: translateX(-50%) scale(1.04); box-shadow: 0 0 32px rgba(245, 158, 11, 0.9); }
}

@keyframes superpowerFlash {
  0% { transform: scale(0.9); filter: drop-shadow(0 0 2px #fff); }
  100% { transform: scale(1.25); filter: drop-shadow(0 0 8px #fff); }
}


/* Landmark poo challenge: reachable with mouse, keyboard or touch. */
.poo-controls { position: fixed; top: 104px; left: 16px; z-index: 30; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; max-width: 230px; pointer-events: none; }
#btn-poo { pointer-events: auto; min-height: 44px; padding: 9px 16px; border-radius: 24px; border: 1px solid #d9b65c; background: rgba(18, 31, 42, .93); color: #ffe8a4; font: 600 13px system-ui, sans-serif; cursor: pointer; touch-action: manipulation; }
#btn-poo:disabled { opacity: .65; cursor: default; }
#btn-poo:focus-visible { outline: 3px solid white; outline-offset: 3px; }
#poo-target-hint { padding: 5px 9px; border-radius: 10px; background: rgba(18,31,42,.8); color: #ffe8a4; font: 11px system-ui, sans-serif; }
.poo-status { position: fixed; bottom: 22%; left: 50%; transform: translateX(-50%); z-index: 100; width: max-content; max-width: 85vw; padding: 14px 22px; border-radius: 18px; background: rgba(18,31,42,.95); border: 1px solid #ffd56a; color: #fff1c2; font: 600 16px system-ui, sans-serif; text-align: center; pointer-events: none; }
@media (max-width: 600px) { .poo-controls { top: 112px; left: 10px; max-width: 185px; } .poo-status { font-size: 13px; } }

/* Status badges must hug their text, even when a phone's viewport changes. */
.hud-aero-badges { height: auto; min-height: 0; max-height: 90px; align-items: flex-start; align-content: flex-start; }
.aero-badge { display: inline-block; flex: 0 0 auto; height: fit-content; min-height: 0; max-width: 100%; line-height: 1.3; }
#btn-poo-layer { pointer-events: auto; min-height: 34px; padding: 6px 11px; border-radius: 18px; border: 1px solid #758a92; background: rgba(18,31,42,.9); color: #edf3f6; font: 600 11px system-ui,sans-serif; cursor: pointer; }
#poo-layer-status { font: 10px/1.3 system-ui,sans-serif; color: #f1f4f6; background: rgba(18,31,42,.8); border-radius: 7px; padding: 3px 7px; max-width: 210px; }
body.input-touch #btn-poo { display: none; }
body.input-touch .poo-controls { top: 102px; gap: 4px; max-width: 185px; }
body.input-touch .hud-aero-badges { top: 208px; right: 10px; bottom: auto; left: auto; transform: none; width: min(240px,65vw); max-height: 82px; justify-content: flex-end; overflow: hidden; gap: 4px; }
body.input-touch .aero-badge { font-size: 10px; padding: 5px 9px; }
body.input-touch .touch-action-pad { display: flex; align-items: center; gap: 10px; width: auto; height: auto; bottom: calc(24px + env(safe-area-inset-bottom,0px)); right: 14px; }
body.input-touch .touch-action-pad .touch-btn { position: relative; inset: auto; width: 80px; height: 80px; flex: 0 0 80px; }
.touch-btn-poo { color: #fff1c2; background: radial-gradient(circle,rgba(170,127,44,.7),rgba(100,71,22,.95)); border-color: #ffda7b; }
.touch-btn-poo .touch-icon { font-size: 26px; }
.touch-btn-poo:disabled { opacity: .6; filter: saturate(.5); }
body.input-touch .touch-joystick-base { left: 16px; bottom: calc(24px + env(safe-area-inset-bottom,0px)); width: 128px; height: 128px; }
@media (max-width: 360px) {
 body.input-touch .touch-action-pad .touch-btn { width: 70px; height: 70px; flex-basis: 70px; }
 body.input-touch .touch-joystick-base { width: 112px; height: 112px; left: 10px; }
}
@media (orientation: landscape) and (max-height: 500px) {
 body.input-touch .poo-controls { top: 88px; }
 body.input-touch .hud-aero-badges { top: 100px; bottom: auto; }
 body.input-touch .touch-joystick-base { width: 110px; height: 110px; bottom: 14px; }
 body.input-touch .touch-action-pad { bottom: 14px; }
 #poo-layer-status { max-width: 180px; }
}


/* Mobile primary action: larger Flap on the right, smaller Poo beside it. */
body.input-touch .touch-action-pad .touch-btn-flap { order: 2; }
body.input-touch .touch-action-pad .touch-btn-poo { order: 1; width: 68px; height: 68px; flex-basis: 68px; }
@media (max-width: 360px) {
 body.input-touch .touch-action-pad .touch-btn-poo { width: 60px; height: 60px; flex-basis: 60px; }
}

/* Mobile flight keeps only the score and one controls button at the top. */
.mobile-flight-menu { display: contents; }
.mobile-flight-menu-toggle { position: fixed; top: max(12px,env(safe-area-inset-top)); right: 12px; z-index: 121; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid #597581; border-radius: 50%; background: rgba(12,25,34,.92); color: #f5f8fa; font: 22px system-ui,sans-serif; cursor: pointer; }
.mobile-flight-menu-header { align-items: center; justify-content: space-between; padding: 2px 0 12px; color: #e7f2f7; font: 600 16px system-ui,sans-serif; }
.mobile-flight-menu-header button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #263c47; color: white; font-size: 17px; cursor: pointer; }
body.input-touch .mobile-flight-menu { display: none; position: fixed; inset: max(64px,calc(env(safe-area-inset-top) + 54px)) 12px auto auto; width: min(330px,calc(100vw - 24px)); max-height: calc(100dvh - 90px); overflow-y: auto; padding: 16px; z-index: 120; background: rgba(12,25,34,.97); border: 1px solid #49616d; border-radius: 20px; box-shadow: 0 10px 32px #0008; pointer-events: auto; }
body.input-touch.flight-menu-open .mobile-flight-menu { display: block; }
body.input-touch .mobile-flight-menu #top-quick-dock { position: static; display: grid; grid-template-columns: 1fr 1fr; width: auto; transform: none; overflow: visible; margin: 0; padding: 0; gap: 8px; }
body.input-touch .mobile-flight-menu .top-dock-pill, body.input-touch .mobile-flight-menu .top-dock-btn { width: 100%; min-height: 44px; height: auto; justify-content: center; padding: 9px; }
body.input-touch .mobile-flight-menu .top-dock-photo .top-dock-text, body.input-touch .mobile-flight-menu .top-dock-guide .top-dock-text, body.input-touch .mobile-flight-menu .top-dock-hud .top-dock-text { display: inline; }
body.input-touch .mobile-flight-menu .top-dock-lighting .top-dock-text { max-width: 95px; text-overflow: ellipsis; }
body.input-touch .mobile-flight-menu .poo-controls { position: static; max-width: none; margin-top: 14px; gap: 8px; }
body.input-touch .mobile-flight-menu #poo-target-hint, body.input-touch .mobile-flight-menu #poo-layer-status { max-width: 100%; width: 100%; box-sizing: border-box; font-size: 12px; line-height: 1.4; }
body.input-touch .mobile-flight-menu #btn-poo-layer { min-height: 42px; font-size: 12px; width: 100%; }
body.input-touch .foraging-widget { top: max(12px,env(safe-area-inset-top)); left: 12px; max-width: calc(100vw - 78px); }
body.input-touch .foraging-pill { min-height: 38px; padding: 6px 12px; }
body.input-touch .foraging-nearby-badge { font-size: 10px; padding: 4px 8px; }
body.input-touch .hud-aero-badges { top: auto; bottom: 174px !important; right: 12px; max-width: 220px; }
body.input-touch .aero-badge:not(.badge-stall):not(.badge-cling) { display: none; }
body.input-touch .touch-action-pad .touch-btn-slow { position: absolute; order: 0; width: 52px; height: 52px; right: 63px; bottom: 94px; flex-basis: 52px; border-color: #99cce0; color: #e9f8ff; background: radial-gradient(circle,rgba(54,104,128,.8),rgba(15,51,69,.95)); }
.touch-btn-slow .touch-icon { font-size: 17px; }
.touch-btn-slow .touch-text { font-size: 9px; }
@media (max-width: 360px) { body.input-touch .touch-action-pad .touch-btn-slow { right: 50px; bottom: 82px; width: 48px; height: 48px; } }
@media (orientation: landscape) and (max-height: 500px) { body.input-touch .touch-action-pad .touch-btn-slow { bottom: 90px; } }

body.input-touch .mobile-flight-menu-header { width: 100%; }

/* Optional hold-to-boost button, beside Slow and above Flap. */
.touch-btn-fast { display: none; touch-action: none; }
body.input-touch.fast-button-enabled .touch-action-pad .touch-btn-fast { display: flex; position: absolute; width: 52px; height: 52px; right: 0; bottom: 94px; border-color: #ffe28a; color: #fff6d6; background: radial-gradient(circle,rgba(158,117,32,.9),rgba(79,54,12,.95)); }
.touch-btn-fast .touch-icon { font-size: 19px; }
.touch-btn-fast .touch-text { font-size: 9px; }
@media (max-width: 360px) { body.input-touch.fast-button-enabled .touch-action-pad .touch-btn-fast { width: 48px; height: 48px; bottom: 82px; } }
@media (orientation: landscape) and (max-height: 500px) { body.input-touch.fast-button-enabled .touch-action-pad .touch-btn-fast { bottom: 90px; } }
.hud-superpower-pill { pointer-events: none; cursor: default; }

.imagery-attribution { position:fixed;bottom:2px;right:8px;z-index:10;font:9px/1.2 system-ui,sans-serif;color:rgba(240,245,250,.65);text-decoration:none;background:rgba(10,20,30,.6);padding:2px 4px;border-radius:3px; }

/* VR: offered only when the browser reports a headset */
.top-dock-vr { font-weight: 700; color: #ffe7a1; }
.vr-headset-prompt { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 400; width: min(92vw, 460px); padding: 26px; border-radius: 22px; background: rgba(18, 31, 42, .96); border: 1px solid #ffd56a; color: #edf3f6; text-align: center; font: 16px/1.45 system-ui, sans-serif; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.vr-headset-prompt .vr-prompt-title { margin: 0 0 8px; font-size: 24px; font-weight: 700; color: #fff1c2; }
.vr-headset-prompt .vr-prompt-help { margin: 0 0 20px; color: #b7cbd4; font-size: 14px; }
.vr-headset-prompt button { display: block; width: 100%; padding: 14px; margin-top: 10px; border-radius: 12px; font: 700 18px system-ui, sans-serif; cursor: pointer; border: 1px solid #66818e; }
.vr-prompt-enter { background: #ffe7a1; color: #152631; }
.vr-prompt-dismiss { background: transparent; color: #c5d7de; font-size: 15px !important; }
