:root {
  --bg-color: #0b0c10;
  --panel-bg: rgba(31, 40, 51, 0.65);
  --border-color: rgba(69, 162, 158, 0.3);
  --accent-color: #66fcf1;
  --accent-glow: rgba(102, 252, 241, 0.4);
  --text-main: #c5c6c7;
  --text-light: #ffffff;
  --text-muted: #8b8e92;
  --gold: #f3d686;

  --font-sans: 'Outfit', sans-serif;
  --font-serif: 'Playfair Display', serif;

  /* Darkside palette */
  --dark-crimson: #DC143C;
  --dark-blood: #8B0000;
  --dark-ember: #B22222;
  --dark-amber: #D4A017;
  --dark-smoke: rgba(20, 10, 10, 0.75);
  --dark-glow: rgba(220, 20, 60, 0.3);
  --remedy-green: #2E8B57;
  --remedy-glow: rgba(46, 139, 87, 0.3);
}

html {
  scroll-behavior: smooth;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Background starfield canvas — hidden in favour of V.4 stardust texture */
#calc-stars-canvas {
  display: none;
}

/* ── V.4 Stardust Starfield ─────────────────────────── */
@keyframes move-twink-back {
  from { background-position: 0 0; }
  to   { background-position: -10000px 5000px; }
}

.stars,
.twinkling {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stars {
  background: #000 url('https://www.transparenttextures.com/patterns/stardust.png') repeat top center;
  z-index: -2;
}

.twinkling {
  background: transparent url('https://www.transparenttextures.com/patterns/stardust.png') repeat top center;
  z-index: -1;
  animation: move-twink-back 200s linear infinite;
  opacity: 0.4;
}


/* Constellation Overlay Styles */
.constellations-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  /* Place behind form but above backgrounds */
  pointer-events: none;
  /* Let clicks pass through to main content */
  overflow: hidden;
  opacity: 0.6;
}

.constellation-svg {
  position: absolute;
  pointer-events: auto;
  /* allow hover on the svgs */
}

/* Position each constellation SVG independently */
.constellation-svg.orion {
  top: 10%;
  left: 5%;
  width: 200px;
  height: 280px;
}

.constellation-svg.ursa {
  top: 5%;
  right: 5%;
  width: 310px;
  height: 240px;
}

.constellation-svg.cassiopeia {
  bottom: 10%;
  left: 5%;
  width: 300px;
  height: 210px;
}

.constellation-svg.cygnus {
  bottom: 5%;
  right: 5%;
  width: 220px;
  height: 250px;
}

.constellation-group {
  cursor: pointer;
  transition: all 0.5s ease;
}

.constellation-group:hover .constellation-star {
  filter: drop-shadow(0 0 10px var(--accent-glow));
  fill: var(--accent);
}

.constellation-group:hover .constellation-line {
  stroke: rgba(102, 252, 241, 0.6);
}

.constellation-label {
  fill: var(--gold);
  font-family: var(--font-serif, "Cormorant Garamond", serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 6px;
  text-anchor: middle;
  opacity: 0;
  transition: all 0.5s ease;
  transform: translateY(15px);
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.constellation-group:hover .constellation-label {
  opacity: 1;
  transform: translateY(0);
}

.constellation-line {
  fill: none;
  stroke: rgba(102, 252, 241, 0.15);
  /* Softer, more professional */
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.constellation-star {
  fill: rgba(255, 255, 255, 0.8);
  filter: drop-shadow(0 0 4px var(--accent-glow));
  animation: twinkleStar 6s infinite alternate ease-in-out;
}

/* Subtle, professional twinkle without pulsing size */
.constellation-group:nth-child(even) .constellation-star {
  animation-delay: 2s;
}

.constellation-group:nth-child(3n) .constellation-star {
  animation-delay: 4s;
}

@keyframes twinkleStar {
  0% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.primary-star {
  fill: #FFF;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 1));
  transform-origin: center;
  transform-box: fill-box;
}

/* Stagger the pulsing speeds and delays so they feel random and organic */
.constellation-svg.orion .primary-star {
  animation: intense-pulse 2.8s infinite alternate !important;
  animation-delay: 0s !important;
}

.constellation-svg.ursa .primary-star {
  animation: intense-pulse 3.5s infinite alternate !important;
  animation-delay: 1.2s !important;
}

.constellation-svg.cassiopeia .primary-star {
  animation: intense-pulse 2.4s infinite alternate !important;
  animation-delay: 0.7s !important;
}

.constellation-svg.cygnus .primary-star {
  animation: intense-pulse 3.1s infinite alternate !important;
  animation-delay: 2.3s !important;
}

@keyframes intense-pulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    opacity: 0.7;
  }

  60% {
    transform: scale(1.2);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
    opacity: 0.9;
  }

  80% {
    transform: scale(1.35);
    filter: drop-shadow(0 0 25px rgba(255, 255, 255, 1));
    opacity: 1;
  }

  85% {
    transform: scale(1.25);
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.7));
    opacity: 0.8;
  }

  /* Quick dip */
  92% {
    transform: scale(1.5);
    filter: drop-shadow(0 0 45px rgba(255, 255, 255, 1));
    opacity: 1;
  }

  /* Burst of light */
  100% {
    transform: scale(1.4);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
    opacity: 0.9;
  }
}

@keyframes slowPan {
  0% {
    transform: scale(1.1) translate(0, 0) rotate(0deg);
  }

  50% {
    transform: scale(1.1) translate(-2%, 2%) rotate(1deg);
  }

  100% {
    transform: scale(1.1) translate(2%, -2%) rotate(-1deg);
  }
}


.app-container {
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  padding: 2.5rem;
}

#form-view,
#relationship-form-container {
  max-width: 500px;
  margin: 2rem auto;
  /* added explicit margin since app-container padding is gone */
}


.dashboard-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    display: block;
  }

  .left-column {
    position: fixed;
    top: 0;
    left: 2rem;
    height: 100vh;
    width: 46vw;
    max-width: 720px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    will-change: auto;
  }

  .left-column #wheel-container {
    pointer-events: auto;
  }

  .right-column {
    margin-left: 50vw;
    padding-right: 2rem;
  }
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

h1 {
  font-family: var(--font-serif);
  color: var(--gold);
  font-size: 2.5rem;
  letter-spacing: 4px;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

.subtitle {
  color: var(--accent-color);
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.8;
}

.view {
  transition: opacity 0.3s ease;
}

/* Form Styles */
.input-group {
  margin-bottom: 0.9rem;
  position: relative;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  letter-spacing: 1px;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
select.styled-select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(11, 12, 16, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  transition: all 0.3s ease;
  appearance: none;
}

input[type="text"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="number"]:focus,
select.styled-select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px var(--accent-glow);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group label {
  margin-bottom: 0;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

/* Buttons */
button {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(69, 162, 158, 0.9), rgba(102, 252, 241, 0.8));
  color: #0b0c10;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease;
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button:hover {
  box-shadow: 0 5px 18px var(--accent-glow);
}

.secondary-btn {
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  margin-top: 15px;
}

.secondary-btn:hover {
  background: rgba(102, 252, 241, 0.1);
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--accent-color);
  width: auto;
  padding: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: none;
}

.icon-btn:hover {
  transform: none;
  box-shadow: none;
  text-shadow: 0 0 8px var(--accent-glow);
  background: transparent;
}

/* Bottom Navigation Bar */
.bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 2rem;
  background: transparent;
  border: none;
  z-index: 20;
  margin-top: 3rem;
}

/* Dual-label spans: short version hidden by default (desktop sees full text) */
.btn-short { display: none; }

/* Save to Oasis - compact inline button */
.save-oasis-btn {
  width: auto;
  padding: 8px 20px;
  font-size: 0.85rem;
  background: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  border-radius: 8px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.save-oasis-btn:hover {
  background: rgba(102, 252, 241, 0.1);
  box-shadow: 0 0 14px var(--accent-glow);
}

/* Suggestions Dropdown */
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #1f2833;
  border: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  list-style: none;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.suggestions-list li {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

.suggestions-list li:hover {
  background: rgba(102, 252, 241, 0.1);
  color: var(--accent-color);
}



.chart-header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
  width: 100%;
  z-index: 15;
}

.chart-header .left-btn {
  position: absolute;
  left: 0;
}

.chart-header .right-btn {
  position: absolute;
  right: 0;
}

.chart-header .chart-title {
  font-family: var(--font-serif);
  color: var(--gold);
  text-align: center;
  font-size: 2rem;
}

.placement-card {
  background: rgba(20, 25, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.8rem;
  margin-bottom: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.placement-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.03);
}

.placement-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
}

.placement-title h3 {
  font-size: 1.2rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
}

.placement-degrees {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  flex-shrink: 0;
}

.interpretation-section {
  margin-bottom: 1rem;
}

.interpretation-section h4 {
  color: var(--accent-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.3rem;
}

.interpretation-section p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-light);
}

.balanced-traits {
  margin-top: 8px;
}

.balanced-traits span {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  font-size: 0.8rem;
  margin-right: 5px;
  margin-bottom: 5px;
}

/* ============================================ */
/* MOBILE ADJUSTMENTS                           */
/* ============================================ */
@media (max-width: 768px) {
  .app-container {
    padding: 1rem 0.8rem;
  }

  h1 {
    font-size: 1.6rem;
    letter-spacing: 2px;
  }

  .subtitle {
    font-size: 0.75rem;
    letter-spacing: 1.5px;
  }

  /* ── Wheel: clean at top, not oversized ── */
  #wheel-container {
    max-width: 92vw;
    margin: 0.5rem auto 1.5rem;
  }

  #natal-wheel {
    max-width: 100%;
    height: auto;
  }

  .dashboard-grid {
    gap: 1rem;
  }

  .right-column {
    gap: 1rem;
  }

  /* ── Chart header: title full-width on top, buttons in a row below ── */
  .chart-header {
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 0;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding: 0;
  }

  .chart-header .chart-title {
    width: 100%;
    order: -1;
    font-size: 1.2rem;
    padding: 0;
    text-align: center;
  }

  .chart-header .left-btn,
  .chart-header .right-btn {
    position: static;
    font-size: 0.9rem;
    padding: 8px 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* ── Bottom nav: 3-column grid so Save is always perfectly centred ── */
  .bottom-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 0.8rem;
    margin-top: 1.5rem;
    gap: 0.5rem;
  }

  .bottom-nav .icon-btn.left-btn  { justify-self: start; min-height: 44px; }
  .bottom-nav .save-oasis-btn     { justify-self: center; }
  .bottom-nav .icon-btn.right-btn,
  .bottom-nav > span              { justify-self: end; min-height: 44px; }

  /* ── Icon buttons: larger touch targets ── */
  .icon-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  /* ── Placement cards: clean on phone ── */
  .placement-card {
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 0;
  }

  .placement-title {
    flex-wrap: wrap;
    gap: 0.3rem 0.5rem;
  }

  .placement-title h3 {
    font-size: 1rem;
  }

  .placement-degrees {
    font-size: 0.75rem;
    width: 100%;
    text-align: left;
  }

  .interpretation-section h4 {
    font-size: 0.8rem;
  }

  .interpretation-section p {
    font-size: 0.9rem;
  }

  /* ── Synthesis / Diagnostics cards: single column, proper padding ── */
  #synthesis-container,
  #relationship-container {
    grid-template-columns: 1fr !important;
    gap: 1.2rem;
  }

  .synthesis-card {
    padding: 1.4rem;
    border-radius: 12px;
  }

  .synthesis-header h3 {
    font-size: 1.15rem;
  }

  .synthesis-header .planet-glyph-icon {
    font-size: 1.6em;
    margin-right: 10px;
  }

  .synthesis-result {
    font-size: 1rem;
    padding: 1rem;
  }

  .equation-label {
    width: auto;
    min-width: 70px;
    font-size: 0.85rem;
  }

  .equation-text {
    font-size: 0.88rem;
  }

  /* ── Darkside / Shadow cards: mobile layout ── */
  #darkside-container {
    grid-template-columns: 1fr !important;
    gap: 1.2rem;
  }

  .darkside-card {
    padding: 1.4rem;
    border-radius: 12px;
  }

  .darkside-header h3 {
    font-size: 1.1rem;
  }

  .darkside-section h4 {
    font-size: 0.8rem;
  }

  .darkside-section p {
    font-size: 0.9rem;
  }

  .remedy-box {
    padding: 1rem;
  }

  .remedy-box h4 {
    font-size: 0.8rem;
  }

  .remedy-box p {
    font-size: 0.85rem;
  }

  .shadow-traits span {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

  /* ── Darkside gate: fit on mobile ── */
  .gate-inner {
    padding: 1.2rem 1.4rem;
  }

  .gate-title {
    font-size: 1.3rem;
    letter-spacing: 2px;
  }

  .gate-latin {
    font-size: 1.5rem;
  }

  .gate-subtitle,
  .gate-warning {
    font-size: 0.85rem;
  }

  .temet-btn {
    font-size: 0.95rem;
    padding: 12px 18px;
  }

  /* ── Career grid: single column ── */
  #career-container {
    grid-template-columns: 1fr !important;
    gap: 1.2rem;
  }

  /* ── Relationship meter: proper width ── */
  .meter-track {
    height: 16px;
  }

  .meter-headings span {
    font-size: 0.85rem !important;
  }

  #relationship-form-container {
    max-width: 100%;
    margin: 1rem auto;
  }

  /* ── Compatibility score tooltip: keep on-screen ── */
  .score-info-tooltip {
    width: min(320px, 88vw);
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 18px;
  }

  .score-tip-range {
    font-size: 0.85rem;
    min-width: 70px;
  }

  .score-tip-desc {
    font-size: 0.8rem;
  }

  /* ── Constellations: shrink on mobile ── */
  .constellation-svg.orion       { width: 100px; height: 140px; }
  .constellation-svg.ursa        { width: 130px; height: 100px; }
  .constellation-svg.cassiopeia  { width: 120px; height: 84px; }
  .constellation-svg.cygnus      { width: 100px; height: 115px; }

  .constellation-label {
    font-size: 16px;
    letter-spacing: 2px;
  }

  /* ── Button text: swap to short labels ── */
  .btn-full  { display: none; }
  .btn-short { display: inline; }

  .save-oasis-btn {
    padding: 8px 14px;
    font-size: 0.82rem;
    min-height: 44px;
  }

  /* ── Forms: full-width, proper sizing ── */
  #form-view {
    max-width: 100%;
    padding: 0 0.4rem;
  }

  input[type="text"],
  input[type="date"],
  input[type="time"],
  input[type="number"],
  select.styled-select {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 12px 14px;
  }

  button[type="submit"] {
    min-height: 50px;
    font-size: 1rem;
  }

  /* ── Saved profiles: tighten layout ── */
  .oasis-shift-btn {
    display: none;
  }

  .oasis-list-item {
    gap: 7px;
    padding: 7px 8px;
  }

  .oasis-item-name {
    font-size: 0.82rem;
  }

  .oasis-load-item-btn {
    font-size: 0.72rem;
    padding: 4px 10px;
    min-height: 36px;
  }

  /* ── Home button: larger touch target ── */
  .home-btn {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
}

/* SVG Astrological Wheel Styles */
#wheel-container {
  width: 100%;
  max-width: 720px;
  margin: 20px auto 40px auto;
  position: relative; /* stationary, sits at top of chart view, no sticky */
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Static teal halo behind the wheel. This replaces the drop-shadow that used to
   sit on #natal-wheel — that filter spanned the whole wheel and Chrome
   re-rasterized it on every rotation frame. The halo lives on the NON-rotating
   container, so it is painted once and costs nothing while the wheel spins. */
#wheel-container::before {
  content: "";
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(100, 255, 218, 0.16) 0%,
    rgba(100, 255, 218, 0.06) 55%,
    transparent 72%);
  pointer-events: none;
  z-index: -1;
}

#natal-wheel {
  width: 100%;
  height: auto;
  /* drop-shadow filter removed — see #wheel-container::before halo above. */
}

/* Rotation is now handled by SMIL <animateTransform> inside the SVG itself
   (drift-proof on iOS Safari). The previous CSS spin/counter-spin relied on
   transform-box: fill-box, which iOS does not anchor reliably and which threw
   the glyphs off the ring. The @keyframes below are left unused/harmless. */

@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }

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

@keyframes counterSpin {
  from {
    transform: rotate(0deg);
  }

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

/* Element Colors for SVG Fills */
.element-fire {
  fill: rgba(220, 30, 50, 0.25);
  stroke: rgba(235, 35, 55, 0.95);
}

.element-earth {
  fill: rgba(16, 185, 90, 0.22);
  stroke: rgba(20, 210, 100, 0.95);
}

.element-air {
  fill: rgba(80, 200, 240, 0.22);
  stroke: rgba(90, 215, 250, 0.95);
}

.element-water {
  fill: rgba(30, 60, 220, 0.25);
  stroke: rgba(35, 70, 240, 0.95);
}

.element-ophiuchus {
  fill: rgba(155, 30, 230, 0.24);
  stroke: rgba(170, 35, 245, 0.95);
}

.house-line {
  stroke: rgba(255, 255, 255, 0.5);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.asc-desc-line {
  stroke: rgba(100, 255, 218, 0.8);
  stroke-width: 2.5;
}

.planet-glyph {
  font-size: 24px;
  fill: #fff;
  /* text-shadow instead of filter: drop-shadow — composited far more cheaply
     and does not create a per-element filter region that Chrome must
     re-rasterize on every rotation frame. Same glow look. */
  text-shadow: 0 0 5px var(--accent-glow);
  font-family: var(--font-sans);
  text-anchor: middle;
  dominant-baseline: central;
}

.sign-glyph {
  font-size: 16px;
  fill: rgba(255, 255, 255, 0.7);
  text-anchor: middle;
  dominant-baseline: central;
}

/* Synthesis View Styles */
#synthesis-container,
#relationship-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

@media (min-width: 1024px) {

  #synthesis-container,
  #relationship-container {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  }
}

.synthesis-card {
  background: rgba(20, 25, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.synthesis-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.03);
}

.synthesis-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.synthesis-header .planet-glyph-icon {
  font-size: 2.2em;
  margin-right: 15px;
}

.synthesis-header h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: #fff;
  letter-spacing: 0.05em;
  font-weight: 400;
}

.synthesis-equation {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.equation-row {
  display: flex;
  align-items: baseline;
}

.equation-label {
  font-weight: 600;
  width: 90px;
  flex-shrink: 0;
  color: var(--gold);
}

.equation-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.4;
}

.synthesis-result {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 1.25rem;
  border-left: 3px solid var(--gold);
  line-height: 1.65;
  font-size: 1.15rem;
  color: var(--gold);
  font-family: var(--font-serif);
  font-style: italic;
  text-shadow: 0 0 8px rgba(243, 214, 134, 0.2);
}

/* Compatibility Meter */
.meter-track {
  width: 100%;
  height: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
}

.meter-fill {
  height: 100%;
  width: 100%;
  /* Keep gradient stretched to full size */
  background:
    repeating-linear-gradient(90deg, transparent, transparent calc(10% - 1px), rgba(0, 0, 0, 0.2) 10%),
    linear-gradient(90deg, #FF3333 0%, #FFA500 25%, #FFDF00 50%, #32CD32 75%, #00FA9A 100%);
  border-radius: 10px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================ */
/* DARKSIDE / SHADOW SELF STYLES                */
/* ============================================ */

/* Content Gate Overlay */
.darkside-gate {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 2rem;
}

.gate-inner {
  max-width: 600px;
  text-align: center;
  background: rgba(15, 5, 5, 0.9);
  border: 1px solid rgba(220, 20, 60, 0.25);
  border-radius: 20px;
  padding: 1.5rem 2.5rem;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 0 80px rgba(139, 0, 0, 0.08),
    0 0 40px rgba(220, 20, 60, 0.06);
  animation: gateBreath 4s ease-in-out infinite;
}

@keyframes gateBreath {

  0%,
  100% {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 80px rgba(139, 0, 0, 0.08), 0 0 40px rgba(220, 20, 60, 0.06);
  }

  50% {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 100px rgba(139, 0, 0, 0.12), 0 0 60px rgba(220, 20, 60, 0.1);
  }
}

.gate-icon {
  font-size: 3rem;
  margin-bottom: 0.2rem;
  filter: drop-shadow(0 0 10px rgba(220, 20, 60, 0.4));
}

.gate-title {
  font-family: var(--font-serif);
  color: var(--dark-crimson);
  font-size: 1.8rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

.gate-subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.gate-warning {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.92rem;
  line-height: 1.5;
  margin-bottom: 0.8rem;
}

.gate-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--dark-crimson), transparent);
  margin: 0.8rem auto;
}

.gate-latin {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--dark-amber);
  letter-spacing: 3px;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 15px rgba(212, 160, 23, 0.3);
}

.gate-latin-trans {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  letter-spacing: 2px;
  margin-bottom: 0.4rem;
}

.gate-latin-sub {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  line-height: 1.5;
  font-style: italic;
  max-width: 450px;
  margin: 0 auto 1.2rem auto;
}

.gate-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* TEMET NOSCE Button */
.temet-btn {
  background: linear-gradient(135deg, rgba(139, 0, 0, 0.8), rgba(220, 20, 60, 0.7));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 2px;
  padding: 14px 24px;
  border: 1px solid rgba(220, 20, 60, 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: temetPulse 3s ease-in-out infinite;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes temetPulse {

  0%,
  100% {
    box-shadow: 0 0 15px rgba(220, 20, 60, 0.2);
  }

  50% {
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.4), 0 0 60px rgba(139, 0, 0, 0.15);
  }
}

.temet-btn:hover {
  box-shadow: 0 8px 28px rgba(220, 20, 60, 0.45), 0 0 40px rgba(139, 0, 0, 0.2);
  background: linear-gradient(135deg, rgba(178, 34, 34, 0.9), rgba(220, 20, 60, 0.85));
}

.gate-retreat-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gate-retreat-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.03);
  transform: none;
  box-shadow: none;
}

/* Darkside Title */
.darkside-title {
  color: var(--dark-crimson) !important;
  text-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

.darkside-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.92rem;
  font-style: italic;
  margin-bottom: 2rem;
  letter-spacing: 0.5px;
}

/* Darkside Container Grid */
#darkside-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

@media (min-width: 1024px) {
  #darkside-container {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  }
}

/* Darkside Card */
.darkside-card {
  background: rgba(15, 8, 8, 0.9);
  border: 1px solid rgba(220, 20, 60, 0.12);
  border-left: 4px solid var(--dark-crimson);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  animation: cardFadeIn 0.6s ease-out both;
}

.darkside-card:hover {
  border-color: rgba(220, 20, 60, 0.3);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(139, 0, 0, 0.05);
}

@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

/* Stagger animation for cards */
.darkside-card:nth-child(1) {
  animation-delay: 0.05s;
}

.darkside-card:nth-child(2) {
  animation-delay: 0.1s;
}

.darkside-card:nth-child(3) {
  animation-delay: 0.15s;
}

.darkside-card:nth-child(4) {
  animation-delay: 0.2s;
}

.darkside-card:nth-child(5) {
  animation-delay: 0.25s;
}

.darkside-card:nth-child(6) {
  animation-delay: 0.3s;
}

.darkside-card:nth-child(7) {
  animation-delay: 0.35s;
}

.darkside-card:nth-child(8) {
  animation-delay: 0.4s;
}

.darkside-card:nth-child(9) {
  animation-delay: 0.45s;
}

.darkside-card:nth-child(10) {
  animation-delay: 0.5s;
}

.darkside-card:nth-child(11) {
  animation-delay: 0.55s;
}

.darkside-card:nth-child(12) {
  animation-delay: 0.6s;
}

.darkside-card:nth-child(13) {
  animation-delay: 0.65s;
}

.darkside-card:nth-child(14) {
  animation-delay: 0.7s;
}

.darkside-card:nth-child(15) {
  animation-delay: 0.75s;
}

/* Darkside Card Header */
.darkside-header {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(220, 20, 60, 0.15);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.darkside-header .planet-glyph-icon {
  font-size: 2.2em;
  margin-right: 15px;
}

.darkside-header h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
  font-weight: 400;
}

/* Shadow Trait Pills */
.shadow-traits {
  margin-top: 6px;
  margin-bottom: 1rem;
}

.shadow-traits span {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(220, 20, 60, 0.1);
  border: 1px solid rgba(220, 20, 60, 0.25);
  border-radius: 12px;
  font-size: 0.78rem;
  margin-right: 6px;
  margin-bottom: 6px;
  color: var(--dark-crimson);
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

.shadow-traits span:hover {
  background: rgba(220, 20, 60, 0.2);
  border-color: rgba(220, 20, 60, 0.4);
}

/* Darkside Sections */
.darkside-section {
  margin-bottom: 1.2rem;
}

.darkside-section h4 {
  color: var(--dark-crimson);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.darkside-section p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* Remedy Box */
.remedy-box {
  background: rgba(46, 139, 87, 0.06);
  border: 1px solid rgba(46, 139, 87, 0.2);
  border-left: 3px solid var(--remedy-green);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  margin-top: 0.5rem;
}

.remedy-box h4 {
  color: var(--remedy-green) !important;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.remedy-box p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  font-style: italic;
}

/* Darkside Icon Buttons Override */
#darkside-view .icon-btn {
  color: var(--dark-crimson);
}

#darkside-view .icon-btn:hover {
  text-shadow: 0 0 8px var(--dark-glow);
}

/* ── Score Info Icon & Tooltip ─────────────────────────────── */
.score-info-wrap {
  position: relative;
  display: inline-block;
}

.score-info-icon {
  display: inline-block;
  font-size: 2.38rem;
  color: rgba(255, 255, 255, 0.92);
  cursor: default;
  transition: color 0.2s ease;
  user-select: none;
  letter-spacing: 0;
}

.score-info-icon:hover {
  color: rgba(255, 255, 255, 0.6);
}

.score-info-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  background: rgba(10, 5, 20, 0.97);
  border: 1px solid rgba(243, 214, 134, 0.3);
  border-radius: 14px;
  padding: 22px 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  z-index: 100;
  pointer-events: none;
}

.score-info-wrap:hover .score-info-tooltip {
  display: block;
}

/* Small arrow pointing down */
.score-info-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(243, 214, 134, 0.25);
}

.score-tip-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin: 0 0 14px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(243, 214, 134, 0.15);
  text-align: center;
}

.score-tip-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.score-tip-row:last-child {
  margin-bottom: 0;
}

.score-tip-range {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: bold;
  white-space: nowrap;
  min-width: 86px;
  padding-top: 1px;
}

.score-tip-desc {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

/* ── Oasis Draggable Profile List ───────────────────────────── */
.oasis-toggle-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  background: rgba(243, 214, 134, 0.07);
  border: 1px solid rgba(243, 214, 134, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
  margin-top: 10px;
  user-select: none;
}

.oasis-toggle-header:hover {
  background: rgba(243, 214, 134, 0.13);
  border-color: rgba(243, 214, 134, 0.38);
}

.oasis-toggle-chevron {
  color: var(--gold);
  font-size: 0.8rem;
  width: 14px;
  flex-shrink: 0;
}

.oasis-toggle-label {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--gold);
  letter-spacing: 0.5px;
}

.oasis-toggle-count {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 2px 9px;
}

.oasis-profile-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 2px;
}

.oasis-profile-list::-webkit-scrollbar { width: 4px; }
.oasis-profile-list::-webkit-scrollbar-track { background: transparent; }
.oasis-profile-list::-webkit-scrollbar-thumb {
  background: rgba(243, 214, 134, 0.3);
  border-radius: 2px;
}

.oasis-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(243, 214, 134, 0.05);
  border: 1px solid rgba(243, 214, 134, 0.14);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: default;
  transition: background 0.18s ease, border-color 0.18s ease;
  user-select: none;
}

.oasis-list-item:hover {
  background: rgba(243, 214, 134, 0.09);
  border-color: rgba(243, 214, 134, 0.28);
}

.oasis-list-item.dragging {
  opacity: 0.45;
  border-style: dashed;
}

.oasis-list-item.drag-over {
  background: rgba(243, 214, 134, 0.14);
  border-color: rgba(243, 214, 134, 0.55);
  box-shadow: 0 0 12px rgba(243, 214, 134, 0.18);
}

.oasis-drag-handle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.28);
  cursor: grab;
  flex-shrink: 0;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s ease;
}

.oasis-drag-handle:active { cursor: grabbing; }
.oasis-list-item:hover .oasis-drag-handle { color: rgba(255,255,255,0.55); }

.oasis-item-name {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oasis-item-city {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.82rem;
}

.oasis-item-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  flex-shrink: 0;
}

.oasis-shift-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.45);
  border-radius: 5px;
  width: 26px;
  height: 26px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.oasis-shift-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.oasis-shift-btn:disabled {
  opacity: 0.18;
  cursor: default;
}

.oasis-load-item-btn {
  background: transparent;
  border: 1px solid rgba(243, 214, 134, 0.32);
  color: var(--gold);
  border-radius: 6px;
  padding: 3px 11px;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s ease;
}

.oasis-load-item-btn:hover {
  background: rgba(243, 214, 134, 0.11);
  border-color: rgba(243, 214, 134, 0.6);
}

.oasis-delete-item-btn {
  background: transparent;
  border: 1px solid rgba(255, 50, 50, 0.22);
  color: rgba(255, 80, 80, 0.55);
  border-radius: 5px;
  width: 26px;
  height: 26px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.oasis-delete-item-btn:hover {
  background: rgba(255, 50, 50, 0.1);
  border-color: rgba(255, 80, 80, 0.5);
  color: rgba(255, 100, 100, 0.9);
}
/* ============================================================
   COVER PALETTE VARIABLES (appended)
   ============================================================ */
:root {
  --champagne: #f7f0e0;
  --cover-star: #fff8d6;
}

/* ============================================================
   COVER PAGE
   ============================================================ */
#cover-view {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 50;
  overflow: hidden;
}
.cover-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.cover-bg-image {
  position: absolute;
  inset: 0;
  background: url('cover-desert.png') center center / cover no-repeat;
  transform: scale(1.04);
  animation: coverPan 20s ease-in-out infinite alternate;
}
@keyframes coverPan {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.04) translate(-1%, 1%); }
}
.cover-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, transparent 30%, rgba(5,5,15,0.45) 100%);
  pointer-events: none;
}
.cover-star-btn {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80px;
  height: 80px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 10;
}
.cover-star-rays {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,248,200,0.35) 0%, transparent 70%);
  animation: starIdlePulse 3s ease-in-out infinite;
  pointer-events: none;
}
.cover-star-core {
  font-size: 2.8rem;
  color: var(--cover-star);
  filter: drop-shadow(0 0 18px rgba(255,248,200,0.95)) drop-shadow(0 0 40px rgba(255,220,120,0.6));
  animation: starIdlePulse 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}
.cover-star-btn:hover .cover-star-core { transform: scale(1.2); }
@keyframes starIdlePulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.82; filter: drop-shadow(0 0 32px rgba(255,248,200,1)) drop-shadow(0 0 70px rgba(255,220,120,0.9)); }
}
.cover-hint-text {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 4px;
  color: var(--champagne);
  opacity: 0;
  text-transform: lowercase;
  animation: hintFadeIn 1s ease forwards 2.5s;
  pointer-events: none;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  white-space: nowrap;
}
@keyframes hintFadeIn { to { opacity: 0.6; } }

/* Coin overlay */
.coin-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(5,5,15,0.88);
  backdrop-filter: blur(6px);
  z-index: 20;
  gap: 2.5rem;
}
.coin-scene {
  position: relative;
  width: 180px;
  height: 180px;
  perspective: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.coin-spinner {
  width: 140px;
  height: 140px;
  position: relative;
  transform-style: preserve-3d;
}
.coin-spinner.spinning {
  animation: coinSpin 2.8s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes coinSpin {
  0%   { transform: rotateY(0deg)    scale(0.6); opacity: 0; }
  8%   { transform: rotateY(180deg)  scale(1);   opacity: 1; }
  40%  { transform: rotateY(1440deg) scale(1); }
  70%  { transform: rotateY(2880deg) scale(1); }
  92%  { transform: rotateY(3528deg) scale(1.04); }
  100% { transform: rotateY(3600deg) scale(1); }
}
.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 600;
  letter-spacing: 4px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.coin-front {
  background: radial-gradient(circle at 35% 35%, #fff8d6 0%, #c5a059 45%, #6a4f1a 100%);
  color: #0b0c10;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4), 0 -1px 1px rgba(0, 0, 0, 0.8);
  border: 4px double #ffe89e;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.6), 0 0 25px rgba(243,214,134,0.4);
}
.coin-back {
  background: radial-gradient(circle at 35% 35%, #fff8d6 0%, #c5a059 45%, #6a4f1a 100%);
  color: #0b0c10;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4), 0 -1px 1px rgba(0, 0, 0, 0.8);
  border: 4px double #ffe89e;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.6), 0 0 25px rgba(243,214,134,0.4);
  transform: rotateY(180deg);
}
.coin-echo {
  position: absolute;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: 3px;
  pointer-events: none;
  opacity: 0;
}
.echo-1 { color: rgba(255,248,200,0.3);  animation: echoFloat 2.8s ease-in forwards 0.1s; transform: translate(-70px,-30px) rotate(-15deg); }
.echo-2 { color: rgba(102,252,241,0.25); animation: echoFloat 2.8s ease-in forwards 0.3s; transform: translate(65px,-20px)  rotate(10deg); }
.echo-3 { color: rgba(255,248,200,0.2);  animation: echoFloat 2.8s ease-in forwards 0.5s; transform: translate(-50px,50px)  rotate(-8deg); }
.echo-4 { color: rgba(102,252,241,0.2);  animation: echoFloat 2.8s ease-in forwards 0.7s; transform: translate(55px,45px)   rotate(12deg); }
@keyframes echoFloat { 0%{opacity:0;} 15%{opacity:1;} 80%{opacity:0.5;} 100%{opacity:0;} }

.coin-title {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}
.title-word {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 8vw, 3.4rem);
  font-weight: 600;
  letter-spacing: 6px;
  opacity: 0;
}
.title-zodiac {
  color: var(--cover-star);
  text-shadow: 0 0 30px rgba(255,248,200,0.7);
  animation: spreadFromCenter 0.9s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.title-oasis {
  color: var(--accent-color);
  text-shadow: 0 0 30px rgba(102,252,241,0.7);
  animation: spreadFromCenter 0.9s cubic-bezier(0.34,1.56,0.64,1) forwards 0.12s;
}
@keyframes spreadFromCenter {
  from { opacity:0; transform: scale(0.6) translateY(10px); }
  to   { opacity:1; transform: scale(1)   translateY(0); }
}

/* ============================================================
   INTRO / ABOUT PAGE
   ============================================================ */
#intro-view {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  background: linear-gradient(180deg, #06081a 0%, #0b0c10 60%);
}
.intro-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  width: 100%;
  padding: 5rem 2rem 4rem;
  display: flex;
  flex-direction: column;
}
.intro-section {
  text-align: center;
  padding: 2.5rem 0;
  animation: introFadeUp 0.8s ease both;
}
.intro-section:nth-child(3) { animation-delay: 0.15s; }
.intro-section:nth-child(5) { animation-delay: 0.3s; }
.intro-section:nth-child(7) { animation-delay: 0.45s; }
@keyframes introFadeUp {
  from { opacity:0; transform: translateY(24px); }
  to   { opacity:1; transform: translateY(0); }
}
.intro-glyph {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px rgba(243,214,134,0.5));
}
.intro-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--champagne);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.intro-body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.9rem;
}
.intro-body strong { color: var(--gold); font-weight: 600; }
.intro-body em     { color: var(--accent-color); font-style: normal; }
.intro-divider {
  width: 1px;
  height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(243,214,134,0.35), transparent);
  margin: 0 auto;
}
.intro-cta-section {
  text-align: center;
  padding: 3rem 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}
.intro-cta-label {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 3px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}
.intro-enter-btn {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0.5rem auto;
}
.intro-moon-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102,252,241,0.22) 0%, transparent 70%);
  animation: moonGlow 3s ease-in-out infinite;
}
@keyframes moonGlow {
  0%,100% { transform:scale(1);    opacity:0.7; }
  50%     { transform:scale(1.15); opacity:1; }
}
.intro-moon-icon {
  font-size: 3.5rem;
  color: var(--accent-color);
  filter: drop-shadow(0 0 20px rgba(102,252,241,0.8));
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}
.intro-enter-btn:hover .intro-moon-icon { transform: scale(1.12); }
.intro-enter-label {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--accent-color);
  letter-spacing: 2px;
}
.intro-free-note {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.32);
  letter-spacing: 1px;
}

/* ============================================================
   SUBSCRIPTION GATE
   ============================================================ */
.sub-gate-inner {
  max-width: 520px;
  width: 100%;
  text-align: center;
  background: rgba(10,8,25,0.96);
  border: 1px solid rgba(243,214,134,0.2);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: 0 0 80px rgba(102,252,241,0.06), 0 30px 60px rgba(0,0,0,0.6);
  animation: introFadeUp 0.5s ease both;
}
.sub-gate-star {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 12px rgba(243,214,134,0.6));
}
.sub-gate-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--gold);
  letter-spacing: 2px;
  margin-bottom: 1rem;
}
.sub-gate-body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.62);
  margin-bottom: 1.8rem;
}
.sub-gate-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 2rem;
  text-align: left;
}
.sub-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.72);
  background: none;
  border: none;
  border-radius: 0;
  padding: 0.6rem 0.9rem;
}
.sub-subscribe-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, rgba(102,252,241,0.9), rgba(69,162,158,0.9));
  color: #0b0c10;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  font-family: var(--font-sans);
  margin-bottom: 0.75rem;
  transition: box-shadow 0.2s ease;
}
.sub-subscribe-btn:hover { box-shadow: 0 6px 24px rgba(102,252,241,0.4); }
.sub-return-btn {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.5);
  border-radius: 10px;
  padding: 10px;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.sub-return-btn:hover { border-color: rgba(255,255,255,0.3); color: rgba(255,255,255,0.8); }

@media (max-width: 768px) {
  .sub-gate-features   { grid-template-columns: 1fr; }
  .intro-content       { padding: 4rem 1.4rem 3rem; }
  .intro-section-title { font-size: 1.5rem; }
  .coin-scene          { width: 140px; height: 140px; }
  .coin-spinner        { width: 110px; height: 110px; }
  .coin-face           { font-size: 2.2rem; }
}

/* Hide site header during cover and intro so nothing overlaps */
body:has(#cover-view.active-view) header,
body:has(#intro-view[style*="flex"]) header {
  display: none;
}

/* ── ZO coin landing (random back-face) ── */
.coin-spinner.spinning-zo {
  animation: coinSpinZO 2.8s cubic-bezier(0.4,0,0.2,1) forwards;
}
@keyframes coinSpinZO {
  0%   { transform: rotateY(0deg)    scale(0.6); opacity: 0; }
  8%   { transform: rotateY(180deg)  scale(1);   opacity: 1; }
  40%  { transform: rotateY(1440deg) scale(1); }
  70%  { transform: rotateY(2880deg) scale(1); }
  92%  { transform: rotateY(3528deg) scale(1.04); }
  100% { transform: rotateY(3780deg) scale(1); }
}

/* ── Intro page: fully transparent so stars float behind ── */
#intro-view {
  background: transparent !important;
}

/* On the intro page only, lift the constellation layer above the
   transparent view so the constellation shapes can receive hover.
   The overlay container stays pointer-events:none (only the SVG
   shapes are interactive), so text and links pass through normally. */
body:has(#intro-view[style*="flex"]) .constellations-overlay {
  z-index: 2;
}

/* Text sections: no background box, float in open space */
.intro-section {
  background: transparent !important;
}

/* Keep text readable against the dark starfield */
.intro-section-title {
  text-shadow: 0 0 40px rgba(255,255,255,0.08);
}
.intro-body {
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

/* Floating star drift keyframe */
@keyframes introStarDrift {
  0%   { transform: translateY(0)     translateX(0);          opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-110vh) translateX(var(--drift)); opacity: 0; }
}

/* Continue Previewing bypass button */
.sub-preview-btn {
  width: 100%;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.28);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 1px;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 6px;
  transition: color 0.2s ease;
}
.sub-preview-btn:hover { color: rgba(255,255,255,0.55); }

/* "touch the star", navy blue from the photo sky, visible over the sand */
.cover-hint-text {
  color: #1b3058;
  letter-spacing: 5px;
}
@keyframes hintFadeIn { to { opacity: 1; } }

/* Center hint text precisely under the star */
.cover-hint-text {
  left: 0;
  right: 0;
  width: 100%;
  transform: none;
  text-align: center;
}

/* ============================================================
   BETA PASSCODE ROW (inside subscription gate)
   ============================================================ */
#beta-passcode-row {
  margin-top: 1.25rem;
  width: 100%;
  max-width: 320px;
  text-align: center;
}
#beta-passcode-input {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(216, 177, 90, 0.4);
  border-radius: 4px;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 1rem;
  letter-spacing: 2px;
  text-align: center;
  outline: none;
}
#beta-passcode-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(216, 177, 90, 0.25);
}
#beta-passcode-submit {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #f3d89a, var(--gold));
  color: #1b1404;
  border: none;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
#beta-passcode-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(216, 177, 90, 0.3);
}
#beta-passcode-msg {
  margin-top: 0.75rem;
  min-height: 1.2em;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
}

/* ============================================================
   BETA FEEDBACK POPUP
   ============================================================ */
#zo-feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 5, 15, 0.78);
  backdrop-filter: blur(8px);
  animation: zoFadeIn 0.4s ease;
}
@keyframes zoFadeIn { from { opacity: 0; } to { opacity: 1; } }
.zo-feedback-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(216, 177, 90, 0.45);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(23, 18, 50, 0.95), rgba(13, 12, 26, 0.95));
  box-shadow: 0 0 60px rgba(216, 177, 90, 0.12);
}
.zo-feedback-star {
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.zo-feedback-title {
  font-family: var(--font-serif);
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
.zo-feedback-body {
  font-family: var(--font-sans);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.98rem;
  line-height: 1.6;
  margin-bottom: 1.6rem;
}
.zo-feedback-send {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #f3d89a, var(--gold));
  color: #1b1404;
  text-decoration: none;
  border-radius: 4px;
  font-family: var(--font-sans);
  letter-spacing: 1px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.zo-feedback-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(216, 177, 90, 0.3);
}
.zo-feedback-later {
  display: block;
  margin: 1.1rem auto 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  cursor: pointer;
}
.zo-feedback-later:hover { color: rgba(255, 255, 255, 0.85); }

/* ============================================================
   HOME BUTTON (floating star, shown on every view after cover)
   ============================================================ */
.home-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  box-sizing: border-box;
  width: 32px;
  height: 32px;
  min-width: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(11, 12, 16, 0.35);
  border: 1px solid rgba(243, 214, 134, 0.35);
  color: #f3d686;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
  /* backdrop-filter removed — causes green compositing artifact on macOS */
  box-shadow: 0 0 8px rgba(243, 214, 134, 0.2);
  opacity: 1;
  text-shadow: 0 0 6px rgba(243, 214, 134, 0.5);
  /* will-change removed — forces compositing layer that conflicts with animated background */
  animation: homeFloat 4s ease-in-out infinite;
}
@keyframes homeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.home-btn:hover {
  opacity: 1;
  background: rgba(243, 214, 134, 0.1);
  border-color: rgba(243, 214, 134, 0.4);
  box-shadow: 0 0 12px rgba(243, 214, 134, 0.15);
  animation: none;
}
