/**
 * Cosmic Finance — Orbit & Observatory Visualization Styles
 * Phase 10: High-End Observatory Instrument Panel & Armillary Sphere
 */

/* Master Cockpit Frame (Full-Screen Observatory) */
.hero-orbit-card {
  background: linear-gradient(155deg, rgba(12, 18, 44, 0.94) 0%, rgba(5, 8, 22, 0.98) 100%);
  border: 1px solid rgba(245, 190, 72, 0.32);
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 24px 64px rgba(2, 4, 12, 0.8), 0 0 50px rgba(138, 92, 246, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  width: 100%;
}

.hero-orbit-fullscreen {
  width: 100%;
  margin: 0 auto;
}

/* Luxury Observatory Tech Corners */
.hero-orbit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-top: 2px solid var(--gold-400);
  border-left: 2px solid var(--gold-400);
  pointer-events: none;
}

.hero-orbit-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 18px;
  height: 18px;
  border-bottom: 2px solid var(--gold-400);
  border-right: 2px solid var(--gold-400);
  pointer-events: none;
}

/* Top Telemetry Header */
.orbit-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(245, 190, 72, 0.16);
  padding-bottom: 10px;
  gap: 12px;
  flex-wrap: wrap;
}

.header-left-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.orbit-status-radar {
  position: relative;
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-center-switch {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-right-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.orbit-status-dot {
  width: 8px;
  height: 8px;
  background-color: var(--market-green);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--market-green-glow);
  transition: all 0.3s ease;
  animation: pulseLiveDot 2s infinite ease-in-out;
}

@keyframes pulseLiveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.orbit-status-title {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  font-size: 0.82rem;
}

.time-machine-badge {
  background: rgba(245, 190, 72, 0.22);
  border: 1px solid var(--gold-500);
  color: var(--gold-400);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  box-shadow: 0 0 12px rgba(245, 190, 72, 0.25);
}

.planetary-hour-badge {
  background: rgba(138, 92, 246, 0.15);
  border: 1px solid rgba(138, 92, 246, 0.45);
  color: var(--violet-400);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.72rem;
  box-shadow: 0 0 12px rgba(138, 92, 246, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Trust Principle Banner */
.trust-calculation-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: linear-gradient(90deg, rgba(245, 190, 72, 0.1) 0%, rgba(138, 92, 246, 0.08) 100%);
  border: 1px solid rgba(245, 190, 72, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin: var(--space-4) 0;
  font-size: var(--text-xs);
  color: var(--text-primary);
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.trust-calculation-banner.mobile-trust {
  margin: var(--space-3) auto;
  max-width: 330px;
}

.trust-icon {
  font-size: 1.25rem;
}

/* Hero Telemetry Highlight Badges */
.hero-telemetry-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 21, 50, 0.7);
  border: 1px solid rgba(164, 180, 240, 0.15);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
}

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

.telemetry-dot.gold { background: var(--gold-400); box-shadow: 0 0 6px var(--gold-glow); }
.telemetry-dot.violet { background: var(--violet-400); box-shadow: 0 0 6px var(--violet-glow); }
.telemetry-dot.green { background: var(--market-green); box-shadow: 0 0 6px var(--market-green-glow); }

/* 3D Canvas Viewport */
.orbit-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #0c122c 0%, #060a1a 50%, #03050d 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(164, 180, 240, 0.22);
  overflow: hidden;
  box-shadow: inset 0 0 70px rgba(3, 5, 13, 0.95), var(--shadow-card);
}

#orbitCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.canvas-3d-hint {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto 0;
  width: fit-content;
  max-width: 95%;
  background: rgba(6, 10, 26, 0.85);
  border: 1px solid rgba(245, 190, 72, 0.28);
  border-radius: var(--radius-full);
  padding: 5px 16px;
  font-size: 0.74rem;
  color: var(--gold-300);
  pointer-events: none;
  backdrop-filter: blur(10px);
  gap: 8px;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  font-family: var(--font-display);
  text-align: center;
}

.hint-desktop {
  display: inline;
}

.hint-mobile {
  display: none;
}

.orbit-fallback-notice {
  position: relative;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
  z-index: 10;
  background: rgba(6, 10, 26, 0.85);
  border: 1px solid rgba(245, 190, 72, 0.22);
  border-radius: 9999px;
  padding: 5px 14px;
  margin: 12px auto 0 auto;
  max-width: 100%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.orbit-fallback-notice::-webkit-scrollbar {
  display: none;
}

.orbit-planet-badge {
  background: rgba(14, 21, 50, 0.85);
  border: 1px solid rgba(164, 180, 240, 0.18);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 9999px;
  color: var(--text-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  font-family: var(--font-display);
}

.orbit-planet-badge:hover {
  background: rgba(245, 190, 72, 0.2);
  border-color: var(--gold-400);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(245, 190, 72, 0.35);
}

.orbit-planet-badge.active {
  background: linear-gradient(135deg, rgba(245, 190, 72, 0.35) 0%, rgba(177, 131, 255, 0.25) 100%);
  border-color: var(--gold-400);
  color: #fae4b5;
  font-weight: 600;
  box-shadow: 0 0 14px rgba(245, 190, 72, 0.4);
}

/* 4D Time Machine Interactive Cockpit (Grand & Spacious Command Deck) */
.time-machine-cockpit {
  margin-top: 14px;
  padding: 18px 22px;
  background: linear-gradient(180deg, rgba(14, 21, 50, 0.85) 0%, rgba(6, 10, 26, 0.95) 100%);
  border-radius: 16px;
  border: 1px solid rgba(242, 200, 121, 0.28);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.time-machine-controls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(164, 180, 240, 0.12);
}

.tm-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.tm-icon {
  font-size: 1.35rem;
}

.tm-header-left strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--gold-400);
}

.tm-sub {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-left: 6px;
  font-family: var(--font-body);
}

#btnResetToLive {
  padding: 7px 18px;
  font-size: 0.82rem;
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(242, 200, 121, 0.35);
  background: rgba(242, 200, 121, 0.1);
  color: var(--gold-300);
  transition: all 0.2s ease;
  cursor: pointer;
}

#btnResetToLive:hover {
  background: rgba(242, 200, 121, 0.22);
  border-color: var(--gold-400);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(242, 200, 121, 0.35);
}

/* Time Scrub Slider & Date Display */
.tm-scrub-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.tm-date-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tm-label {
  font-size: 0.82rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#tmCurrentDateLabel {
  color: var(--gold-300);
  font-family: var(--font-mono) !important;
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 700;
  background: rgba(242, 200, 121, 0.14);
  padding: 6px 16px;
  border-radius: 8px;
  border: 1px solid rgba(242, 200, 121, 0.35);
  box-shadow: 0 0 14px rgba(242, 200, 121, 0.15);
  letter-spacing: 0.02em;
}

.tm-scrub-slider {
  width: 100%;
  accent-color: var(--gold-500);
  cursor: pointer;
  height: 12px;
  background: linear-gradient(90deg, #182042 0%, #293668 50%, var(--gold-500) 100%);
  border-radius: 9999px;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  -webkit-appearance: none;
  appearance: none;
  transition: opacity 0.2s;
}

.tm-scrub-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-400);
  border: 3px solid #ffffff;
  cursor: grab;
  box-shadow: 0 0 16px var(--gold-glow), 0 2px 8px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.tm-scrub-slider::-webkit-slider-thumb:hover {
  transform: scale(1.22);
  background: var(--gold-300);
}

.tm-scrub-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-400);
  border: 3px solid #ffffff;
  cursor: grab;
  box-shadow: 0 0 16px var(--gold-glow), 0 2px 8px rgba(0, 0, 0, 0.7);
  transition: transform 0.15s ease;
}

.tm-scrub-slider::-moz-range-thumb:hover {
  transform: scale(1.22);
  background: var(--gold-300);
}

/* Time Presets Bar */
.tm-presets-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 2px 0;
}

.tm-preset-chip {
  padding: 7px 16px;
  background: rgba(14, 21, 50, 0.75);
  border: 1px solid rgba(164, 180, 240, 0.2);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.tm-preset-chip:hover {
  background: rgba(242, 200, 121, 0.14);
  border-color: var(--gold-400);
  color: var(--gold-300);
  transform: translateY(-1px);
}

.tm-preset-chip.active {
  background: rgba(242, 200, 121, 0.24);
  border-color: var(--gold-500);
  color: var(--gold-300);
  font-weight: 600;
  box-shadow: 0 0 14px rgba(242, 200, 121, 0.3);
}

/* Connected Historical Market Readout (Large Cockpit Gauges) */
.tm-market-readout-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: rgba(3, 5, 14, 0.82);
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(245, 190, 72, 0.16);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6);
}

.tm-readout-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(12, 18, 44, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
  transition: all 0.25s ease;
}

.tm-readout-stat:hover {
  background: rgba(18, 26, 60, 0.75);
  border-color: rgba(245, 190, 72, 0.3);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.tm-readout-stat .stat-name {
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 600;
}

.tm-readout-stat .stat-val {
  font-size: 1.45rem !important;
  color: #fae4b5;
  font-family: var(--font-mono) !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  text-shadow: 0 0 12px rgba(242, 200, 121, 0.25);
}

.tm-readout-notes {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-top: 1px solid rgba(164, 180, 240, 0.14);
  padding-top: 12px;
  margin-top: 4px;
  line-height: 1.5;
  font-family: var(--font-body);
}

/* Detailed Graha Inspector Drawer */
.orbit-info-drawer {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: linear-gradient(145deg, rgba(14, 21, 50, 0.8) 0%, rgba(6, 10, 26, 0.9) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(245, 190, 72, 0.25);
  box-shadow: var(--shadow-card);
}

.orbit-hint-text {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 0;
  line-height: 1.5;
}

.planet-inspect-view {
  animation: fadeInInspect 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.inspect-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.inspect-glyph {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 12px var(--gold-glow));
}

.inspect-title h4 {
  font-size: var(--text-base);
  margin-bottom: 3px;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.inspect-sub-tags {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
  font-size: var(--text-xs);
}

.inspect-vakri-badge {
  background: rgba(244, 63, 94, 0.25);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.5);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.3);
}

.inspect-direct-badge {
  background: rgba(34, 197, 94, 0.18);
  color: var(--market-green);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.inspect-dignity-badge {
  background: rgba(138, 92, 246, 0.2);
  color: var(--violet-400);
  border: 1px solid rgba(138, 92, 246, 0.4);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.inspect-grid-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.detail-box {
  background: rgba(4, 7, 17, 0.6);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--space-border-subtle);
  font-size: var(--text-xs);
}

.detail-box .detail-label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.detail-box strong {
  color: var(--gold-300);
  font-size: var(--text-sm);
}

.inspect-desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-3);
}

.inspect-market-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(4, 7, 17, 0.7);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 190, 72, 0.25);
  font-size: var(--text-xs);
}

.inspect-market-link strong {
  color: var(--gold-400);
  font-weight: 700;
}

/* Linked Widget Pulse Effect — Targeted highlight for selected planet's financial correlate */
.celestial-linked-pulse {
  border-color: #f2c879 !important;
  background: linear-gradient(145deg, rgba(20, 28, 65, 0.95) 0%, rgba(35, 26, 10, 0.95) 100%) !important;
  box-shadow: 0 0 28px rgba(242, 200, 121, 0.45), inset 0 0 16px rgba(242, 200, 121, 0.15) !important;
  transform: translateY(-4px) !important;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 5;
}

@keyframes fadeInInspect {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Templates */
.mobile-orbit-preview {
  display: flex;
  justify-content: center;
  margin: var(--space-3) auto;
  max-width: 340px;
}

.mobile-tm-scrub-box {
  background: var(--space-bg-card);
  border: 1px solid var(--space-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  margin-bottom: var(--space-4);
}

.mobile-tm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
}

.mobile-presets-bar {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-3);
  scrollbar-width: none;
}

.mobile-presets-bar::-webkit-scrollbar { display: none; }

.mobile-preset-pill {
  padding: 4px 10px;
  background: var(--space-bg-mid);
  border: 1px solid var(--space-border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.mobile-market-readout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  background: rgba(4, 7, 17, 0.6);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  text-align: center;
}

@media (max-width: 768px) {
  .orbit-canvas-wrapper {
    height: 380px;
    min-height: 340px;
  }
  .time-machine-cockpit {
    padding: 18px 16px;
  }
  .tm-market-readout-panel {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px 16px;
  }
  .tm-readout-stat .stat-val {
    font-size: 1.15rem !important;
  }
}

/* ==========================================================================
   Cosmic Finance v2.0 — Architecture & Visual Experience Upgrades
   ========================================================================== */

/* Top Live Streaming Engine Ribbon */
.v2-live-engine-bar {
  background: linear-gradient(90deg, #090e24 0%, #111a42 50%, #090e24 100%);
  border-bottom: 1px solid rgba(0, 230, 118, 0.3);
  box-shadow: 0 4px 20px rgba(0, 230, 118, 0.08);
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  padding: 6px 0;
  position: relative;
  z-index: 1001;
}

.v2-bar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.v2-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.v2-live-beacon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 10px #00e676, 0 0 20px rgba(0, 230, 118, 0.8);
  animation: v2Pulse 1.8s infinite;
  display: inline-block;
}

@keyframes v2Pulse {
  0% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #00e676; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 14px #00e676, 0 0 24px rgba(0, 230, 118, 0.9); }
  100% { transform: scale(0.9); opacity: 0.8; box-shadow: 0 0 4px #00e676; }
}

.v2-bar-title {
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.v2-tag {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.65rem;
}

.v2-divider {
  color: rgba(255, 255, 255, 0.2);
}

.v2-pill {
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.v2-dot-green { width: 6px; height: 6px; border-radius: 50%; background: #00e676; }
.v2-dot-violet { width: 6px; height: 6px; border-radius: 50%; background: #b183ff; }
.v2-dot-gold { width: 6px; height: 6px; border-radius: 50%; background: #f5be48; }

.v2-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.v2-port-chip {
  background: rgba(245, 190, 72, 0.15);
  color: #f5be48;
  border: 1px solid rgba(245, 190, 72, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.68rem;
}

.v2-compare-link {
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
  transition: all 0.2s ease;
}

.v2-compare-link:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* 3D Observatory v2.0 Controls */
.orbit-v2-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-v2-pill {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(245, 190, 72, 0.32);
  background: rgba(14, 21, 50, 0.85);
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.btn-v2-pill:hover {
  background: rgba(245, 190, 72, 0.18);
  border-color: var(--gold-400);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 190, 72, 0.25);
}

.btn-v2-pill.active {
  background: linear-gradient(135deg, rgba(245, 190, 72, 0.28) 0%, rgba(177, 131, 255, 0.18) 100%);
  border-color: var(--gold-400);
  color: #fae4b5;
  box-shadow: 0 0 16px rgba(245, 190, 72, 0.35);
}

.btn-math-pill {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(10, 22, 44, 0.85);
  color: #7dd3fc;
}

.btn-math-pill:hover,
.btn-math-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
}

.sse-live-indicator {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #00e676;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Floating Transparency Drawer over Canvas */
.orbit-calc-drawer {
  position: absolute;
  top: 60px;
  left: 20px;
  right: 20px;
  background: rgba(6, 10, 26, 0.96);
  border: 1px solid rgba(0, 230, 118, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 230, 118, 0.15);
  border-radius: 14px;
  padding: 22px;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 80%;
  overflow-y: auto;
}

.orbit-calc-drawer.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-12px);
  display: none;
}

.calc-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
  margin-bottom: 14px;
}

.calc-drawer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: #f8fafc;
}

.calc-drawer-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.calc-drawer-close:hover {
  color: #fff;
}

.calc-drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.calc-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
}

.calc-card h4 {
  font-size: 0.85rem;
  color: #f5be48;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-code-block {
  background: #02040a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.74rem;
  color: #38bdf8;
  margin-top: 6px;
  overflow-x: auto;
}

/* Floating Interactive Zoom HUD */
.orbit-zoom-hud {
  position: absolute;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(8, 14, 38, 0.88);
  border: 1px solid rgba(245, 190, 72, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 15px rgba(245, 190, 72, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 4px 8px;
  z-index: 40;
}

.zoom-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all 0.2s ease;
  line-height: 1;
}

.zoom-btn:hover {
  background: rgba(245, 190, 72, 0.25);
  border-color: #f5be48;
  color: #ffd700;
  transform: scale(1.1);
}

.zoom-level-pill {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 0 4px;
  min-width: 42px;
  text-align: center;
  user-select: none;
}

.zoom-fit-btn {
  width: auto;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-family: var(--font-mono, monospace);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}

.zoom-fit-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #fff;
  transform: scale(1.05);
}

/* ==========================================================================
   Mobile Precision Responsive Engine (Android 360px-412px & iOS 375px-430px)
   ========================================================================== */
@media (max-width: 768px) {
  .orbit-canvas-wrapper {
    height: 400px;
    min-height: 360px;
  }
}

@media (max-width: 640px) {
  .hero-orbit-card {
    padding: 12px 12px;
    border-radius: 16px;
  }

  .orbit-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 8px;
  }

  .header-left-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  .header-center-switch {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .header-right-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
  }

  .header-center-switch .btn-v2-pill {
    padding: 6px 14px;
    font-size: 0.74rem;
    white-space: nowrap;
  }

  .header-right-badges .btn-v2-pill,
  .header-right-badges .btn-dashboard-pill {
    justify-content: center;
    text-align: center;
    padding: 5px 9px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .jpl-telemetry-badge,
  .planetary-hour-badge {
    padding: 3px 8px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .orbit-canvas-wrapper {
    height: 380px;
    min-height: 350px;
    border-radius: 14px;
  }

  /* Relocate Zoom HUD to top-right away from bottom planet pills */
  .orbit-zoom-hud {
    top: 8px;
    right: 8px;
    bottom: auto;
    z-index: 50;
    padding: 3px 6px;
    gap: 4px;
    background: rgba(8, 14, 38, 0.92);
  }

  .zoom-btn {
    width: 26px;
    height: 26px;
    font-size: 0.9rem;
  }

  .zoom-fit-btn {
    height: 26px;
    font-size: 0.68rem;
    padding: 0 8px;
  }

  .zoom-level-pill {
    min-width: 34px;
    font-size: 0.68rem;
    padding: 0 2px;
  }

  /* Hint sits cleanly below the 3D celestial canvas panel without any overlay obstruction */
  .canvas-3d-hint {
    margin: 8px auto 0;
    padding: 4px 12px;
    font-size: 0.68rem;
    max-width: 96%;
    width: fit-content;
    white-space: normal;
  }

  .hint-desktop {
    display: none;
  }

  .hint-mobile {
    display: inline;
  }

  /* Horizontal swipe ribbon for 9 planet badges sitting cleanly below 3D canvas panel */
  .orbit-fallback-notice {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin: 10px 0 0 0;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 10px;
    gap: 6px;
    border-radius: var(--radius-md);
  }

  .orbit-fallback-notice::-webkit-scrollbar {
    display: none;
  }

  .orbit-planet-badge {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  /* Calculation Drawer on mobile */
  .orbit-calc-drawer {
    top: 8px;
    left: 8px;
    right: 8px;
    max-height: 85%;
    padding: 14px;
    border-radius: 12px;
  }

  .calc-drawer-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* 4D Time Machine Cockpit on mobile */
  .time-machine-cockpit {
    padding: 14px 12px;
    border-radius: 14px;
    margin-top: 12px;
  }

  .time-machine-controls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
  }

  #btnResetToLive {
    padding: 5px 12px;
    font-size: 0.74rem;
    white-space: nowrap;
  }

  .tm-date-display {
    margin-bottom: 4px;
  }

  .tm-label {
    font-size: 0.74rem;
  }

  #tmCurrentDateLabel {
    font-size: 0.95rem;
    padding: 4px 10px;
  }

  /* Horizontal swipe strip for time presets */
  .tm-presets-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    margin-bottom: 14px;
    padding-bottom: 4px;
  }

  .tm-presets-bar::-webkit-scrollbar {
    display: none;
  }

  .tm-preset-chip {
    flex-shrink: 0;
    padding: 5px 12px;
    font-size: 0.75rem;
  }

  /* 2x2 Market stats grid */
  .tm-market-readout-panel {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
  }

  .tm-readout-stat {
    padding: 8px 10px;
    border-radius: 8px;
  }

  .tm-readout-stat .stat-name {
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }

  .tm-readout-stat .stat-val {
    font-size: 1.15rem !important;
  }

  .tm-readout-notes {
    font-size: 0.72rem;
    padding-top: 8px;
    line-height: 1.45;
  }

  /* Detailed Inspector Drawer on mobile */
  .orbit-info-drawer {
    padding: 12px;
    border-radius: 12px;
    margin-top: 12px;
  }

  .inspect-glyph {
    font-size: 1.8rem;
  }

  .inspect-market-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px 10px;
  }
}

@media (max-width: 640px) {
  .hero-orbit-card {
    padding: 12px 10px;
  }

  .orbit-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 12px;
  }

  .header-left-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-center-switch {
    width: 100%;
  }

  .header-center-switch .btn-v2-pill {
    width: 100%;
    justify-content: center;
  }

  .header-right-badges {
    display: flex;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Time Machine Controls */
  .time-machine-controls-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }

  .tm-scrub-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tm-date-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .tm-slider-wrap {
    width: 100%;
  }

  .tm-slider-wrap input[type="range"] {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-orbit-card {
    padding: 10px 8px;
    border-radius: 14px;
  }

  .orbit-status-title {
    font-size: 0.75rem;
  }

  .sse-live-indicator {
    font-size: 0.65rem;
    padding: 2px 7px;
  }

  .header-center-switch .btn-v2-pill,
  .header-right-badges .btn-v2-pill,
  .header-right-badges .btn-dashboard-pill {
    padding: 4px 7px;
    font-size: 0.68rem;
  }

  .vedastro-telemetry-badge {
    display: none;
  }

  .orbit-canvas-wrapper {
    height: 350px;
    min-height: 330px;
    border-radius: 12px;
  }

  .canvas-3d-hint {
    display: flex;
    font-size: 0.65rem;
    padding: 3px 10px;
    margin: 6px auto 0;
  }

  .tm-sub {
    display: none;
  }

  .tm-market-readout-panel {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .tm-readout-stat {
    padding: 6px 8px;
  }

  .tm-readout-stat .stat-name {
    font-size: 0.62rem;
  }

  .tm-readout-stat .stat-val {
    font-size: 0.95rem !important;
    word-break: break-word;
  }
}

@media (max-width: 380px) {
  .tm-market-readout-panel {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 360px) {
  .orbit-canvas-wrapper {
    height: 330px;
    min-height: 310px;
  }

  .header-center-switch .btn-v2-pill,
  .header-right-badges .btn-v2-pill {
    font-size: 0.66rem;
    padding: 4px 5px;
  }

  .orbit-planet-badge {
    padding: 3px 8px;
    font-size: 0.68rem;
  }
}




/* =========================================================================
   LIGHT THEME OVERRIDES FOR OBSERVATORY & 4D TIME MACHINE
   ========================================================================= */
body.theme-light .hero-orbit-card {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 16px 50px rgba(126, 18, 42, 0.08) !important;
}

body.theme-light .orbit-card-header {
  background: #fdfbf7 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-light .orbit-status-title {
  color: #7e122a !important;
}

body.theme-light .btn-v2-pill {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

body.theme-light .btn-v2-pill.active {
  background: #fffbeb !important;
  border-color: #b45309 !important;
  color: #b45309 !important;
  box-shadow: 0 0 12px rgba(180, 83, 9, 0.2) !important;
}

body.theme-light .btn-math-pill {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1d4ed8 !important;
}

body.theme-light .btn-math-pill:hover,
body.theme-light .btn-math-pill.active {
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
  color: #1e40af !important;
}

body.theme-light .jpl-telemetry-badge {
  background: #fdfbf7 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

body.theme-light .planetary-hour-badge {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #b45309 !important;
}

body.theme-light .orbit-zoom-hud {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
}

body.theme-light .zoom-btn {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

body.theme-light .zoom-btn:hover {
  background: #fffbeb !important;
  border-color: #b45309 !important;
  color: #b45309 !important;
}

body.theme-light .zoom-level-pill {
  color: #0f172a !important;
}

body.theme-light .orbit-planet-badge {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #334155 !important;
}

body.theme-light .orbit-fallback-notice {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

body.theme-light .orbit-planet-badge:hover,
body.theme-light .orbit-planet-badge.active {
  background: #fffbeb !important;
  border-color: #b45309 !important;
  color: #b45309 !important;
  box-shadow: 0 2px 10px rgba(180, 83, 9, 0.15) !important;
}

body.theme-light .time-machine-cockpit {
  background: linear-gradient(180deg, #ffffff 0%, #fdfbf7 100%) !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(126, 18, 42, 0.06) !important;
}

body.theme-light .time-machine-controls-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-light .tm-header-left strong {
  color: #7e122a !important;
}

body.theme-light .tm-sub {
  color: #64748b !important;
}

body.theme-light .tm-date-display .tm-label {
  color: #64748b !important;
}

body.theme-light .tm-date-display strong {
  color: #7e122a !important;
}

body.theme-light .tm-preset-chip {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #334155 !important;
}

body.theme-light .tm-preset-chip:hover {
  background: #fffbeb !important;
  border-color: #b45309 !important;
  color: #b45309 !important;
}

body.theme-light .tm-preset-chip.active {
  background: #7e122a !important;
  border-color: #7e122a !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(126, 18, 42, 0.25) !important;
}

body.theme-light .tm-market-readout-panel {
  background: #fdfbf7 !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: none !important;
}

body.theme-light .tm-readout-stat {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

body.theme-light .tm-readout-stat:hover {
  background: #fffdf5 !important;
  border-color: #b45309 !important;
}

body.theme-light .tm-readout-stat .stat-name {
  color: #64748b !important;
}

body.theme-light .tm-readout-stat .stat-val {
  color: #7e122a !important;
}

body.theme-light .canvas-3d-hint {
  background: #ffffff !important;
  border: 1px solid rgba(217, 119, 6, 0.35) !important;
  color: #7e122a !important;
  box-shadow: 0 4px 14px rgba(126, 18, 42, 0.08) !important;
}

body.theme-light .orbit-info-drawer {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 8px 30px rgba(126, 18, 42, 0.06) !important;
}

body.theme-light .orbit-hint-text {
  color: #475569 !important;
}

body.theme-light .inspect-panel {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(126, 18, 42, 0.08) !important;
  color: #0f172a !important;
}

body.theme-light .inspect-title {
  color: #7e122a !important;
}

body.theme-light .inspect-sign {
  color: #b45309 !important;
}

body.theme-light .inspect-desc {
  color: #334155 !important;
}
