/* ==========================================================================
   COSMIC BIG BANG REVEAL ENGINE & 14B ASTROLABE HORIZON STYLES
   ========================================================================== */

:root {
  --font-heading: 'Outfit', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-large: 24px;
  --radius-full: 9999px;
  --bg-card: rgba(10, 10, 18, 0.78);
  --bg-pill: rgba(255, 255, 255, 0.05);
  --border-mid: rgba(255, 255, 255, 0.15);
  --border-hover: rgba(55, 186, 244, 0.7);
  --text-white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

body.cosmic-active {
  overflow: hidden !important;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  height: 100svh;
  height: 100dvh;
  height: calc(var(--cosmic-vh, 1vh) * 100);
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

/* Cosmic Overlay Fullscreen Viewport */
.cosmic-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  width: 100vw;
  height: 100%;
  height: 100svh;
  height: 100dvh;
  height: calc(var(--cosmic-vh, 1vh) * 100);
  max-height: 100dvh;
  max-height: -webkit-fill-available;
  box-sizing: border-box;
  background-color: #000000;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  pointer-events: auto;
  opacity: 1;
  transform: scale(1);
  transition: opacity 1.4s cubic-bezier(0.16, 1, 0.3, 1), transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cosmic-overlay.revealed {
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.cosmic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   TOP CELESTIAL HORIZON INSTRUMENTS
   -------------------------------------------------------------------------- */
.cosmic-observatory-top {
  position: relative;
  z-index: 20;
  width: 100%;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

/* Left: Cosmic Telemetry Pill */
.cosmic-telemetry-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  background: rgba(5, 5, 12, 0.55);
  border: 1px solid rgba(55, 186, 244, 0.3);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
}

.telemetry-pulsar {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #37baf4;
  box-shadow: 0 0 10px #37baf4, 0 0 20px rgba(55, 186, 244, 0.8);
  animation: cosmic-telemetry-pulse 1.4s ease-in-out infinite alternate;
}

@keyframes cosmic-telemetry-pulse {
  0% {
    transform: scale(0.7);
    opacity: 0.5;
  }

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

.telemetry-content {
  display: flex;
  flex-direction: column;
}

.telemetry-meta {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.2;
}

.telemetry-epoch {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #ffffff;
  transition: all 0.3s ease;
}

.telemetry-epoch.pulse {
  color: #ffffff;
  text-shadow: 0 0 14px rgba(55, 186, 244, 0.95);
}

/* Right: Cosmos Controls */
.cosmic-celestial-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  pointer-events: auto;
}

.celestial-orbit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 22px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at center, rgba(55, 186, 244, 0.14) 0%, rgba(5, 5, 12, 0.65) 100%);
  border: 1px solid rgba(55, 186, 244, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.celestial-orbit-btn:hover {
  background: radial-gradient(circle at center, rgba(55, 186, 244, 0.25) 0%, rgba(10, 10, 20, 0.75) 100%);
  border-color: #37baf4;
  color: #ffffff;
  box-shadow: 0 0 20px rgba(55, 186, 244, 0.5), inset 0 0 10px rgba(55, 186, 244, 0.2);
  transform: translateY(-1px);
}

.celestial-orbit-btn.active {
  border-color: #37baf4;
  color: #37baf4;
  box-shadow: 0 0 20px rgba(55, 186, 244, 0.6), inset 0 0 12px rgba(55, 186, 244, 0.25);
}

.celestial-orbit-btn .ctrl-icon {
  font-size: 0.82rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #37baf4;
  flex-shrink: 0;
}

.celestial-orbit-btn.play-pause-btn {
  min-width: 100px;
  justify-content: center;
}

.celestial-orbit-btn.play-pause-btn.paused {
  border-color: #37baf4;
  background: radial-gradient(circle at center, rgba(55, 186, 244, 0.25) 0%, rgba(10, 10, 20, 0.75) 100%);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(55, 186, 244, 0.4);
}

/* Orbit Ring Glyph */
.orbit-ring-glyph {
  position: relative;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glyph-core {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #37baf4;
  box-shadow: 0 0 6px #37baf4;
}

.glyph-orbit {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(55, 186, 244, 0.7);
  border-radius: 50%;
  animation: celestial-orbit-spin 6s linear infinite;
}

@keyframes celestial-orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Warp Skip Button */
.celestial-orbit-btn.warp-btn {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.14) 0%, rgba(5, 5, 12, 0.65) 100%);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: max-content;
}

.celestial-orbit-btn.warp-btn:hover {
  background: radial-gradient(circle at center, rgba(55, 186, 244, 0.25) 0%, rgba(10, 10, 20, 0.75) 100%);
  border-color: #ffffff;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(55, 186, 244, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.25);
}

.celestial-orbit-btn.pulse-beacon {
  border-color: #37baf4;
  background: radial-gradient(circle at center, rgba(55, 186, 244, 0.28) 0%, rgba(10, 10, 20, 0.8) 100%);
  animation: skipBeaconPulse 2.2s ease-in-out infinite;
}

@keyframes skipBeaconPulse {

  0%,
  100% {
    box-shadow: 0 0 14px rgba(55, 186, 244, 0.45), inset 0 0 8px rgba(55, 186, 244, 0.2);
    border-color: rgba(55, 186, 244, 0.6);
  }

  50% {
    box-shadow: 0 0 28px rgba(55, 186, 244, 0.9), 0 0 8px #ffffff, inset 0 0 14px rgba(55, 186, 244, 0.4);
    border-color: #ffffff;
    color: #ffffff;
  }
}

/* ==========================================================================
   AWAKENING PORTAL (AT 13.80B CLIMAX)
   ========================================================================== */
.cosmic-awakening-portal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px;
}

.cosmic-awakening-portal.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.cosmic-awakening-portal.fading {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.portal-glass-card {
  position: relative;
  width: 92%;
  max-width: 640px;
  background: rgba(0, 0, 0, 0.88);
  border: 1.5px solid rgba(55, 186, 244, 0.45);
  border-radius: 28px;
  padding: 34px 38px;
  margin-bottom: 10vh;
  text-align: center;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: portal-card-float 4s ease-in-out infinite alternate;
}

@keyframes portal-card-float {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-4px);
  }
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  border-radius: var(--radius-full);
  background: rgba(55, 186, 244, 0.12);
  border: 1px solid #37baf4;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.portal-spark {
  color: #37baf4;
  font-size: 0.75rem;
  animation: cosmic-telemetry-pulse 1.2s infinite alternate;
}

.portal-statement {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 3.4vw, 1.65rem);
  font-weight: 800;
  line-height: 1.38;
  color: #ffffff;
  margin: 0 0 14px 0;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95);
}

.portal-subtext {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 2vw, 0.98rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
  margin: 0 0 22px 0;
}

.portal-highlight {
  color: #ffffff;
  font-weight: 800;
}

.portal-close-btn {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 5;
}

.portal-close-btn:hover {
  background: rgba(55, 186, 244, 0.2);
  border-color: #37baf4;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 0 16px rgba(55, 186, 244, 0.5);
}

.portal-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.portal-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 26px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at center, rgba(55, 186, 244, 0.28) 0%, rgba(10, 10, 20, 0.75) 100%);
  border: 1.5px solid #37baf4;
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6), 0 0 15px rgba(55, 186, 244, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-enter-btn:hover {
  background: #37baf4;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 30px #37baf4, 0 0 50px rgba(55, 186, 244, 0.8);
  transform: translateY(-2px) scale(1.02);
}

.portal-arrow {
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

.portal-enter-btn:hover .portal-arrow {
  transform: translateX(4px);
}

.portal-explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-explore-btn:hover {
  background: rgba(55, 186, 244, 0.18);
  border-color: #37baf4;
  color: #37baf4;
  box-shadow: 0 0 20px rgba(55, 186, 244, 0.45);
  transform: translateY(-2px);
}

.explore-glyph {
  font-size: 0.95rem;
  line-height: 1;
}

.portal-explore-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
  max-width: 500px;
  text-align: center;
}

.portal-explore-notice .notice-spark {
  color: #37baf4;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.portal-explore-notice strong {
  color: #37baf4;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   BOTTOM CELESTIAL HORIZON GAUGE
   -------------------------------------------------------------------------- */
.cosmic-astrolabe-bottom {
  position: relative;
  z-index: 20;
  width: 92%;
  max-width: 960px;
  margin: 0 auto 24px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.cosmic-odometer-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cosmic-odometer-row.locked-glow {
  transform: scale(1.05);
}

.odometer-digits-wrap {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.odometer-val {
  font-family: var(--font-heading);
  font-size: clamp(3.2rem, 7.5vw, 5.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  min-width: 4.6ch;
  text-align: right;
  transition: text-shadow 0.35s ease;
}

.odometer-denom {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 4px;
  align-self: baseline;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: #ffffff;
}

.odometer-denom .denom-slash {
  color: #ffffff;
  font-weight: 800;
  opacity: 0.85;
}

.odometer-denom .denom-14 {
  color: #ffffff;
  font-weight: 900;
}

.cosmic-odometer-row.locked-glow .odometer-val {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 0 22px rgba(255, 255, 255, 0.65);
}

.cosmic-odometer-row.locked-glow .odometer-denom .denom-14 {
  color: #ffffff;
  text-shadow: 0 0 18px #ffffff, 0 0 36px rgba(55, 186, 244, 1);
}

.odometer-unit {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #37baf4;
  transition: text-shadow 0.35s ease, color 0.35s ease;
}

.cosmic-odometer-row.locked-glow .odometer-unit {
  color: #ffffff;
  text-shadow: 0 0 14px #37baf4;
}

.odometer-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}

.odometer-status .status-arrow {
  color: #37baf4;
}

.odometer-status .status-target {
  color: #ffffff;
  font-weight: 800;
}

/* Astrolabe Rail Container */
.astrolabe-track-container {
  width: 100%;
  background: rgba(8, 8, 16, 0.72);
  border: 1px solid rgba(55, 186, 244, 0.28);
  border-radius: 24px;
  padding: 16px 24px 14px 24px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.85);
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  touch-action: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.astrolabe-track-container:hover {
  border-color: #37baf4;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 18px rgba(55, 186, 244, 0.22);
}

.astrolabe-axis-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.axis-start {
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 6px;
}

.axis-scrub-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
}

.scrub-icon {
  font-size: 0.85rem;
  color: #37baf4;
}

.axis-tick {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.axis-now {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #37baf4;
  font-weight: 800;
}

.now-orb {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #37baf4;
  box-shadow: 0 0 10px #37baf4;
}

.axis-end.standout-14 {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.standout-14-badge {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: rgba(55, 186, 244, 0.2);
  border: 2px solid #37baf4;
  box-shadow: 0 0 14px rgba(55, 186, 244, 0.6), inset 0 0 10px rgba(55, 186, 244, 0.25);
}

.standout-14-number {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 10px #37baf4, 0 0 20px rgba(55, 186, 244, 0.9);
}

.standout-14-unit {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 900;
  color: #37baf4;
  margin-left: 2px;
  text-shadow: 0 0 8px rgba(55, 186, 244, 0.6);
}

.standout-14-title {
  font-family: var(--font-heading);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #ffffff;
  text-shadow: 0 0 6px rgba(55, 186, 244, 0.6);
}

/* Astrolabe Rail & Ticks */
.astrolabe-rail {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(55, 186, 244, 0.25);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
  margin-bottom: 12px;
  cursor: ew-resize;
}

.rail-tick {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 16px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 1px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.rail-tick:hover {
  transform: translate(-50%, -50%) scaleY(1.4);
  background: #ffffff;
  box-shadow: 0 0 10px #ffffff;
}

.rail-tick.rail-now {
  background: #37baf4;
  height: 22px;
  width: 3px;
  box-shadow: 0 0 10px #37baf4;
}

.rail-tick.rail-14 {
  background: #ffffff;
  height: 24px;
  width: 4px;
  border: 1px solid #37baf4;
  box-shadow: 0 0 12px #37baf4, 0 0 6px #ffffff;
}

.astrolabe-fluid-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #16698f 0%, #37baf4 60%, #ffffff 100%);
  box-shadow: 0 0 10px rgba(55, 186, 244, 0.6), 0 0 18px rgba(55, 186, 244, 0.3);
  transition: width 0.08s linear;
  max-width: 98.57%;
}

.fill-photon-head {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #37baf4;
  box-shadow: 0 0 8px #ffffff, 0 0 14px #37baf4;
  cursor: grab;
  transition: transform 0.15s ease;
}

.fill-photon-head:hover,
.fill-photon-head:active {
  transform: translateY(-50%) scale(1.25);
  box-shadow: 0 0 12px #ffffff, 0 0 20px #37baf4;
  cursor: grabbing;
}

.astrolabe-narrative {
  font-family: var(--font-body);
  font-size: clamp(0.82rem, 1.8vw, 0.92rem);
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  min-height: 1.4em;
  transition: opacity 0.3s ease;
}

/* ==========================================================================
   MIDDLE DIRECTIONAL NAVIGATION CONTROLS (PREV / NEXT EPOCH)
   ========================================================================== */
.cosmic-epoch-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(8, 14, 24, 0.78);
  border: 1px solid rgba(55, 186, 244, 0.45);
  border-radius: var(--radius-full);
  color: #ffffff;
  padding: 10px 14px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7), 0 0 16px rgba(55, 186, 244, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    opacity 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cosmic-epoch-nav-btn.nav-prev {
  left: 20px;
}

.cosmic-epoch-nav-btn.nav-next {
  right: 20px;
}

.cosmic-epoch-nav-btn:hover {
  background: rgba(14, 28, 48, 0.92);
  border-color: #37baf4;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85), 0 0 24px rgba(55, 186, 244, 0.55);
  transform: translateY(-50%) scale(1.06);
}

.cosmic-epoch-nav-btn:active {
  transform: translateY(-50%) scale(0.96);
}

.cosmic-epoch-nav-btn.disabled,
.cosmic-epoch-nav-btn:disabled {
  opacity: 0.22;
  pointer-events: none;
  filter: grayscale(1);
  box-shadow: none;
}

.nav-chevron {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 300;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(55, 186, 244, 0.8);
  transition: transform 0.2s ease, color 0.2s ease;
}

.cosmic-epoch-nav-btn.nav-prev:hover .nav-chevron {
  transform: translateX(-3px);
  color: #37baf4;
}

.cosmic-epoch-nav-btn.nav-next:hover .nav-chevron {
  transform: translateX(3px);
  color: #37baf4;
}

.nav-epoch-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
}

.cosmic-epoch-nav-btn.nav-next .nav-epoch-meta {
  align-items: flex-end;
  text-align: right;
}

/* Expand meta text on desktop hover */
@media (min-width: 1024px) {
  .cosmic-epoch-nav-btn:hover .nav-epoch-meta {
    max-width: 180px;
    opacity: 1;
    margin: 0 4px;
  }
}

.nav-sub {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #37baf4;
  text-transform: uppercase;
}

.nav-name {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Mobile Specific for Navigation Buttons */
@media (max-width: 768px) {
  .cosmic-epoch-nav-btn {
    padding: 0;
    width: 46px;
    height: 46px;
    justify-content: center;
    border-radius: 50%;
  }

  .cosmic-epoch-nav-btn.nav-prev {
    left: 10px;
  }

  .cosmic-epoch-nav-btn.nav-next {
    right: 10px;
  }

  .nav-epoch-meta {
    display: none !important;
  }

  .nav-chevron {
    font-size: 1.7rem;
  }
}

/* ==========================================================================
   COSMIC EXPLORATION DISCOVERY COACHMARK / ONBOARDING HINT
   ========================================================================== */
.cosmic-exploration-hint {
  position: absolute;
  top: 86px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  pointer-events: auto;
  transition: opacity 0.4s ease, transform 0.4s ease;
  animation: hintFloat 3.5s ease-in-out infinite;
}

.cosmic-exploration-hint.dismissed {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-10px);
}

.hint-pill-glass {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 14, 24, 0.88);
  border: 1px solid rgba(55, 186, 244, 0.55);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.85), 0 0 20px rgba(55, 186, 244, 0.35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius-full);
  padding: 8px 16px 8px 14px;
  white-space: nowrap;
}

.hint-beacon-ring {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #37baf4;
  box-shadow: 0 0 8px #37baf4;
}

.hint-beacon-ring::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid #37baf4;
  animation: beaconPing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hint-icon {
  font-size: 0.75rem;
  color: #ffffff;
  text-shadow: 0 0 6px #37baf4;
}

.hint-text {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.hint-text strong {
  color: #37baf4;
  font-weight: 800;
}

.hint-desktop-text {
  display: inline;
}

.hint-mobile-text {
  display: none;
}

.hint-dismiss-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 0 0 6px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.hint-dismiss-btn:hover {
  color: #ffffff;
  transform: scale(1.2);
}

@keyframes beaconPing {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }

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

@keyframes hintFloat {

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

  50% {
    transform: translateX(-50%) translateY(4px);
  }
}

@media (max-width: 768px) {
  .cosmic-exploration-hint {
    top: calc(env(safe-area-inset-top, 0px) + 98px);
    bottom: auto;
    width: calc(100% - 32px);
    max-width: 380px;
  }

  .hint-pill-glass {
    white-space: normal;
    padding: 8px 12px;
    gap: 8px;
    font-size: 0.74rem;
  }

  .hint-desktop-text {
    display: none;
  }

  .hint-mobile-text {
    display: inline;
  }
}

/* ==========================================================================
   PORTRAIT CAPSULE & LIGHTBOX MODAL
   ========================================================================== */
.portrait-capsule-wrapper {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-large);
  padding: 10px;
  background: rgba(14, 14, 22, 0.85);
  border: 1px solid rgba(55, 186, 244, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(55, 186, 244, 0.15);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin: 0 auto;
}

.portrait-capsule-wrapper:hover {
  border-color: #37baf4;
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9), 0 0 45px rgba(55, 186, 244, 0.3);
}

.portrait-capsule-frame {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: #000000;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  filter: contrast(1.05) brightness(1.02);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.portrait-capsule-wrapper:hover .portrait-img {
  transform: scale(1.03);
}

.portrait-badge-pill {
  position: absolute;
  bottom: 22px;
  left: 22px;
  right: 22px;
  background: rgba(6, 6, 12, 0.92);
  border: 1px solid rgba(55, 186, 244, 0.4);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

.portrait-badge-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.portrait-badge-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.portrait-badge-title {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.portrait-badge-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 20px;
  border: 1px solid rgba(55, 186, 244, 0.4);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(55, 186, 244, 0.3);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 2.2rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Soul Alignment Confirmation Modal */
.pledge-badge-modal {
  display: none;
  background: rgba(10, 16, 28, 0.95);
  border: 1.5px solid #37baf4;
  border-radius: 20px;
  padding: 24px;
  max-width: 480px;
  margin: 20px auto 0 auto;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(55, 186, 244, 0.3);
  animation: pledge-reveal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.pledge-badge-modal.active {
  display: block;
}

@keyframes pledge-reveal {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }

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

/* Hero Portrait Layout Support in Cosmos Grid */
.hero-portrait-col {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 5;
}

/* Responsive Rules for Mobile */
@media (max-width: 768px) {
  .cosmic-observatory-top {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: max(12px, env(safe-area-inset-top, 12px)) 16px 4px 16px;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
  }

  .cosmic-telemetry-pill {
    width: auto;
    max-width: 96%;
    padding: 7px 18px;
  }

  .telemetry-meta {
    display: none;
  }

  .telemetry-epoch {
    font-size: clamp(0.78rem, 3.2vw, 0.88rem);
  }

  .cosmic-celestial-controls {
    width: 100%;
    max-width: 380px;
    gap: 8px;
  }

  .celestial-orbit-btn {
    flex: 1 1 0;
    min-width: 0;
    max-width: 120px;
    height: 38px;
    padding: 0 8px;
  }

  .celestial-orbit-btn.play-pause-btn {
    min-width: 0;
    width: auto;
  }

  .celestial-orbit-btn .btn-label {
    font-size: 0.78rem;
  }

  .celestial-orbit-btn .skip-sub-txt {
    display: none;
  }

  .cosmic-astrolabe-bottom {
    width: 94%;
    max-width: 580px;
    margin: 0 auto max(8px, env(safe-area-inset-bottom, 8px)) auto;
  }

  .cosmic-odometer-row {
    margin-bottom: 4px;
  }

  .odometer-val {
    font-size: clamp(2.3rem, 8.5vw, 3.4rem);
    min-width: 4.2ch;
  }

  .odometer-denom {
    font-size: clamp(1.4rem, 5.2vw, 2.1rem);
  }

  .odometer-unit {
    font-size: clamp(0.85rem, 3.2vw, 1.1rem);
  }

  .astrolabe-track-container {
    padding: 8px 12px 10px 12px;
    border-radius: 16px;
  }

  .axis-scrub-hint {
    display: none;
  }

  .standout-14-badge {
    padding: 2px 8px;
  }

  .standout-14-number {
    font-size: 1.15rem;
  }

  .standout-14-unit {
    font-size: 0.8rem;
  }

  .standout-14-title {
    display: none;
  }

  .astrolabe-rail {
    height: 8px;
    margin-bottom: 8px;
  }

  .rail-tick {
    height: 12px;
  }

  .fill-photon-head {
    width: 14px;
    height: 14px;
    right: -7px;
  }

  .astrolabe-narrative {
    font-size: clamp(0.72rem, 2.8vw, 0.82rem);
    min-height: 2.7em;
  }

  .portal-glass-card {
    padding: 26px 18px 22px 18px;
    border-radius: 20px;
    width: 95%;
  }

  .portal-close-btn {
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    font-size: 1.15rem;
  }

  .portal-action-row {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .portal-enter-btn,
  .portal-explore-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.82rem;
  }

  .portal-explore-notice {
    font-size: 0.72rem;
    max-width: 100%;
    line-height: 1.35;
  }

  .portrait-capsule-wrapper {
    max-width: 300px;
    margin-top: 24px;
  }
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER & HAMBURGER BUTTON
   ========================================================================== */
/* Navigation Container & Right Action Controls */
.nav-wrapper {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  z-index: 10002;
}

/* Sleek Cosmic Mobile Nav Trigger */
.menu-button {
  display: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding-right: 10px;
  width: 45px;
  height: 45px;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10001;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.menu-button:hover,
.menu-button.is-open {
  background: rgba(55, 186, 244, 0.12);
  border-color: rgba(55, 186, 244, 0.6);
  box-shadow: 0 0 14px rgba(55, 186, 244, 0.28);
}

.menu-burger {
  width: 18px;
  height: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.menu-line {
  width: 18px;
  height: 1.5px;
  background-color: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
  pointer-events: none;
}

.menu-button.is-open .menu-line._1 {
  transform: translateY(5.25px) rotate(45deg);
  background-color: #37baf4;
}

.menu-button.is-open .menu-line._2 {
  transform: translateY(-5.25px) rotate(-45deg);
  background-color: #37baf4;
}

@media (max-width: 991px) {
  .menu-button {
    display: flex !important;
  }

  .nav-link-wrapper {
    display: none !important;
  }
}

@media (max-width: 479px) {
  .nav-right-actions {
    gap: 8px;
  }

  .nav-right-actions .cosmic-replay-trigger {
    padding: 5px 11px !important;
    font-size: 12px !important;
  }

  .menu-button {
    width: 42px;
    height: 36px;
  }
}

/* Mobile Nav Backdrop Overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Nav Drawer */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 86vw;
  max-width: 360px;
  height: 100%;
  height: 100dvh;
  background: #000000;
  border-left: 1px solid rgba(55, 186, 244, 0.3);
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.95);
  z-index: 99999;
  padding: 24px 20px 30px 20px;
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 20px;
}

.mobile-nav-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.mobile-nav-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.mobile-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: rgba(55, 186, 244, 0.15);
  border-color: rgba(55, 186, 244, 0.5);
  color: #37baf4;
  transform: translateX(3px);
}

/* ==========================================================================
   ABSOLUTE BACKGROUND COSMIC STARFIELD
   ========================================================================== */
.absolute-cosmos-stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

body {
  background-color: #030306 !important;
  position: relative;
}

.relative-body {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

.section {
  background-color: transparent !important;
}