/* ============================================================
   ASTRAL NEXUS — Cosmic glassmorphism theme
   ============================================================ */
:root {
  --bg: #05030f;
  --panel: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.1);
  --text: #e8e6f5;
  --muted: #9a95b8;
  --accent: #a78bfa;
  --accent2: #f0abfc;
  --gold: #ffd9a0;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

/* ---------- Galaxy canvas ---------- */
#galaxy-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* legibility scrim: calms the galaxy exactly where headlines live */
    radial-gradient(ellipse 95% 55% at 50% 36%, rgba(5, 3, 15, 0.55), transparent 72%),
    radial-gradient(ellipse at center, transparent 40%, rgba(5, 3, 15, 0.55) 100%),
    linear-gradient(to bottom, transparent 60%, rgba(5, 3, 15, 0.8));
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4vw;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(5, 3, 15, 0.75), transparent);
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 2px;
}
.nav-logo span {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--gold); }

.nav-cta {
  border: 1px solid var(--accent);
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--text) !important;
}
.nav-cta:hover { box-shadow: 0 0 18px rgba(167, 139, 250, 0.5); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 6vw;
}

.hero-eyebrow {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 18px;
  animation: fadeUp 1s ease both;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 9vw, 7rem);
  font-weight: 900;
  letter-spacing: 10px;
  line-height: 1;
  background: linear-gradient(120deg, #fff, var(--accent), var(--accent2), #fff);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s linear infinite, fadeUp 1.2s ease both;
  text-shadow: 0 0 60px rgba(167, 139, 250, 0.25);
}

.hero-sub {
  max-width: 640px;
  color: #cfc9ea;
  margin-top: 24px;
  line-height: 1.8;
  text-shadow: 0 2px 18px rgba(5, 3, 15, 0.9), 0 0 42px rgba(5, 3, 15, 0.7);
  animation: fadeUp 1.4s ease both;
}

.hero-actions { display: flex; gap: 18px; margin-top: 42px; animation: fadeUp 1.6s ease both; }

.btn {
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 0.9rem;
  letter-spacing: 1.5px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
  border: none;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0b0620;
  font-weight: 600;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 40px rgba(167, 139, 250, 0.45); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-3px); }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  color: var(--muted);
  animation: bob 2s ease-in-out infinite;
}

@keyframes shimmer { to { background-position: 300% center; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

/* ---------- Sections ---------- */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 110px 4vw 60px;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  text-align: center;
  letter-spacing: 3px;
}
.section-title span {
  color: var(--accent);
  font-size: 0.7em;
  vertical-align: middle;
  margin-right: 12px;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 14px auto 46px;
  max-width: 560px;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 34px;
}

.tab {
  padding: 11px 26px;
  border-radius: 999px;
  background: rgba(13, 10, 30, 0.7);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.88rem;
  transition: all 0.3s;
}
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active {
  background: linear-gradient(90deg, rgba(167,139,250,0.4), rgba(240,171,252,0.4));
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.35);
}

.tab-panel { display: none; }
/* Global show/hide utility — any element marked .hidden is fully removed
   from layout regardless of other display rules on it. */
.hidden { display: none !important; }
.tab-panel.active { display: block; animation: fadeUp 0.5s ease both; }

.panel-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 38px;
  padding: 22px 30px;
  border-radius: 18px;
  background: rgba(13, 10, 30, 0.74);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.panel-intro h3 { font-family: 'Cinzel', serif; color: var(--gold); margin-bottom: 10px; }
.panel-intro p { color: var(--muted); line-height: 1.75; font-size: 0.92rem; }

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
}
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
  background: rgba(13, 10, 30, 0.72);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 22px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 14px 44px rgba(167, 139, 250, 0.22);
}
.card.clickable { cursor: pointer; }

.card-icon { font-size: 2.2rem; margin-bottom: 14px; }
.card h4 { font-size: 1.02rem; letter-spacing: 0.5px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.83rem; line-height: 1.65; }

/* ---------- Scholar lineage toggles (homepage traditions) ---------- */
.lore-toggle {
  margin-top: 14px;
  width: 100%;
  background: rgba(255, 217, 160, 0.08);
  border: 1px solid rgba(255, 217, 160, 0.3);
  color: var(--gold);
  font-family: inherit;
  font-size: 0.74rem;
  letter-spacing: 1px;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.lore-toggle:hover { background: rgba(255, 217, 160, 0.18); border-color: rgba(255, 217, 160, 0.55); }
.lore-box {
  margin-top: 10px;
  font-size: 0.79rem;
  line-height: 1.8;
  color: #cfc9ea;
  text-align: left;
  border-left: 2px solid rgba(255, 217, 160, 0.35);
  padding-left: 12px;
  animation: fadeUp 0.4s ease both;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip {
  font-size: 0.68rem;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.13);
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: #cfc4ff;
}
.chip-el { background: rgba(255, 217, 160, 0.1); border-color: rgba(255, 217, 160, 0.35); color: var(--gold); }

/* ---------- Reading form ---------- */
.reading-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 36px;
  border-radius: 22px;
  background: rgba(13, 10, 30, 0.82);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.3);
}

.reading-card .btn { align-self: center; }

.reading-result {
  max-width: 900px;
  margin: 40px auto 0;
  animation: fadeUp 0.6s ease both;
}
.reading-result h3 { text-align: center; color: var(--gold); font-family: 'Cinzel', serif; margin-bottom: 26px; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.result-item {
  background: rgba(13, 10, 30, 0.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.result-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.result-value {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 8px;
}
.result-desc { display: block; font-size: 0.78rem; color: var(--muted); line-height: 1.6; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 2, 10, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }

.modal {
  position: relative;
  max-width: 520px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #140f2e, #0b0722);
  border: 1px solid rgba(167, 139, 250, 0.4);
  border-radius: 24px;
  padding: 40px 34px;
  box-shadow: 0 30px 90px rgba(167, 139, 250, 0.25);
}

.modal-icon { font-size: 2.6rem; margin-bottom: 14px; }
.modal h3 { font-family: 'Cinzel', serif; color: var(--gold); margin-bottom: 14px; }
.modal p { color: var(--muted); line-height: 1.8; font-size: 0.92rem; margin-top: 14px; }
.modal .chip { display: inline-block; margin-top: 4px; }

.modal-list {
  margin: 16px 0 0 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 2;
}
.modal-list li::marker { content: '✦ '; color: var(--accent); }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.25s;
}
.modal-close:hover { color: #fff; border-color: var(--accent); transform: rotate(90deg); }

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 70px 20px 40px;
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 1px;
}
.footer-note { font-size: 0.72rem; opacity: 0.6; margin-top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .hero-title { letter-spacing: 5px; }
}

/* ---------- Zodiac Wheel ---------- */
.wheel-stage {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  border-radius: 24px;
  background: radial-gradient(circle at center, rgba(167, 139, 250, 0.08), rgba(5, 3, 15, 0.4));
  border: 1px solid var(--border);
  overflow: hidden;
}

#wheel-canvas {
  display: block;
  width: 100%;
  cursor: grab;
  touch-action: pan-y;
}
#wheel-canvas.grabbing { cursor: grabbing; }

.wheel-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
  animation: bob 2.4s ease-in-out infinite;
}

/* ---------- Palm photo upload ---------- */
.upload-bar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.upload-btn {
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0b0620;
  font-weight: 600;
  border: none;
  display: inline-block;
}
.upload-btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); font-weight: 400; }
.upload-btn:hover { filter: brightness(1.12); }

.palm-media { position: relative; }
.palm-photo { width: 100%; border-radius: 18px; display: block; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55); }
.palm-media.palm-photo-mode svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 2;
}
.palm-media.palm-photo-mode .hand-fill,
.palm-media.palm-photo-mode .scan-rect { display: none; }

/* ---------- Live scan overlay & status ---------- */
.palm-scan-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 3;
  overflow: visible;
}
.scan-line {
  fill: none;
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.92;
  animation: drawLine 1.6s ease forwards;
  transition: stroke-width 0.3s, filter 0.3s;
  pointer-events: none;
}
.scan-line.active { stroke-width: 7; }
#scan-life.active  { filter: drop-shadow(0 0 8px #ff9f7a); }
#scan-head.active  { filter: drop-shadow(0 0 8px #7ad7ff); }
#scan-heart.active { filter: drop-shadow(0 0 8px #ff7ab8); }
#scan-fate.active  { filter: drop-shadow(0 0 8px #b79cff); }
.scan-hit { fill: none; stroke: transparent; stroke-width: 22; cursor: pointer; }

.scan-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.scan-status.hidden { display: none; }
.scan-actions { display: flex; gap: 8px; }
.upload-btn.hidden { display: none; }

.scan-stats {
  list-style: none;
  margin: 14px 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.scan-stats li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 14px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
}
.scan-stats li:last-child { border-bottom: none; }
.scan-stats li span { color: var(--muted); }
.scan-stats li b { color: #e8e2ff; font-weight: 600; text-align: right; }

.scan-traits { list-style: none; margin: 12px 0; padding: 0; }
.scan-traits li { padding: 4px 0; font-size: 0.84rem; }

.lore-note { font-size: 0.76rem !important; opacity: 0.75; margin-top: 14px; }
.interp {
  font-size: 0.83rem; line-height: 1.85; margin: 7px 0 7px 14px;
  padding-left: 10px; border-left: 2px solid rgba(227, 197, 107, 0.45);
  color: #d8d3ec; text-align: left;
}
.interp b { color: var(--gold); }
.chapter-intro {
  font-size: 0.88rem; line-height: 1.9; text-align: left;
  background: rgba(227,197,107,0.07); border: 1px solid rgba(227,197,107,0.25);
  border-radius: 10px; padding: 12px 14px; margin: 4px 0 14px;
}
.palm-panel h4 { margin: 6px 0; }

/* ---------- Dedicated article pages ---------- */
.article { max-width: 1080px; margin: 0 auto; padding-bottom: 30px; }
.prose { max-width: 860px; margin: 0 auto; }
.prose p {
  color: var(--muted);
  line-height: 1.85;
  font-weight: 300;
  margin-bottom: 18px;
  font-size: 0.95rem;
}
.prose strong { color: #e8e2ff; font-weight: 600; }
.prose em { color: #cfc4ff; }
.prose h3 {
  font-family: 'Cinzel', serif;
  color: #e8e2ff;
  letter-spacing: 1px;
  margin: 30px 0 12px;
}
.prose ul { margin: 0 0 18px; padding-left: 22px; color: var(--muted); }
.prose li { margin-bottom: 8px; line-height: 1.75; }
.article .card p { font-size: 0.82rem; }


/* ---------- Tool shortcut chips ---------- */
.tool-chips-row { text-align: center; margin: -26px 4vw 34px; }
.tool-chip {
  display: inline-block;
  margin: 6px 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 250, 0.45);
  color: #cfc4ff;
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.5px;
  background: rgba(167, 139, 250, 0.08);
  transition: background 0.3s, color 0.3s;
}
.tool-chip:hover { background: rgba(167, 139, 250, 0.22); color: #fff; }

/* ---------- Tool pages (Palm Reading / Numerology) ---------- */
.tool-hero {
  min-height: 42vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 6vw 10px;
}
.tool-hero .back-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.tool-hero .back-link:hover { text-shadow: 0 0 12px rgba(255, 217, 160, 0.6); }
.tool-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: 8px;
  background: linear-gradient(120deg, #fff, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tool-hero p { color: var(--muted); max-width: 620px; margin-top: 14px; line-height: 1.75; font-size: 0.92rem; }

/* --- Palm --- */
.palm-stage {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  align-items: center;
  justify-content: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 30px 4vw 90px;
}
.palm-figure { width: min(370px, 84vw); }
.palm-figure svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 0 22px rgba(167, 139, 250, 0.3)); }
.hand-fill { fill: rgba(167, 139, 250, 0.10); }
.palm-line {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawLine 2.2s ease 0.4s forwards;
  transition: stroke-width 0.3s, filter 0.3s;
  pointer-events: none;
}
.hit-line { fill: none; stroke: transparent; stroke-width: 30; cursor: pointer; }
.palm-line.active { stroke-width: 8; }
#path-life  { stroke: #ff9f7a; }
#path-head  { stroke: #7ad7ff; }
#path-heart { stroke: #ff7ab8; }
#path-fate  { stroke: #b79cff; }
#path-life.active  { filter: drop-shadow(0 0 9px #ff9f7a); }
#path-head.active  { filter: drop-shadow(0 0 9px #7ad7ff); }
#path-heart.active { filter: drop-shadow(0 0 9px #ff7ab8); }
#path-fate.active  { filter: drop-shadow(0 0 9px #b79cff); }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.scan-rect { animation: scanMove 4.5s ease-in-out infinite alternate; }
@keyframes scanMove { from { transform: translateY(0); } to { transform: translateY(330px); } }

.palm-panel {
  max-width: 440px;
  min-height: 320px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 34px;
  backdrop-filter: blur(10px);
}
.palm-panel h3 { font-family: 'Cinzel', serif; color: var(--gold); margin: 12px 0 10px; }
.palm-panel p { color: var(--muted); font-size: 0.88rem; line-height: 1.75; }
.swap { animation: fadeUp 0.45s ease both; }

/* --- Numerology --- */
.num-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 18px;
  max-width: 1020px;
  margin: 46px auto 90px;
  padding: 0 4vw;
}
.num-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 16px;
  text-align: center;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(22px);
  animation: fadeUp 0.6s ease forwards;
}
.orb {
  position: relative;
  width: 90px;
  height: 90px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 35% 30%, rgba(167, 139, 250, 0.6), rgba(167, 139, 250, 0.06));
  box-shadow: 0 0 28px rgba(167, 139, 250, 0.45);
}
.orb b { font-family: 'Cinzel', serif; font-size: 2.05rem; color: #fff; }
.orb::before, .orb::after {
  content: '';
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px dashed rgba(207, 196, 255, 0.45);
  animation: spin 14s linear infinite;
}
.orb::after { inset: -19px; border-color: rgba(240, 171, 252, 0.3); animation-duration: 24s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.num-label { font-size: 0.66rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.num-calc { display: block; font-size: 0.68rem; color: #8f86c9; margin-top: 10px; line-height: 1.6; word-break: break-word; }
.num-meaning { display: block; font-size: 0.76rem; color: var(--muted); margin-top: 8px; line-height: 1.6; }

/* ---------- Birth place select ---------- */
.field select {
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: inherit;
  outline: none;
}
.field select:focus { border-color: var(--accent); box-shadow: 0 0 16px rgba(167, 139, 250, 0.3); }
.field select option { background: #140f2e; color: var(--text); }

/* ---------- Dasha timeline table ---------- */
.dasha-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}
.dasha-table th {
  text-align: left;
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  padding: 6px 8px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.35);
}
.dasha-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
}
.dasha-table tr.now td {
  color: var(--gold);
  background: rgba(255, 217, 160, 0.07);
}

/* ===== Grand Combined Reading ===== */
.combo-modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.combo-mod {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(184, 160, 255, .25);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  cursor: pointer;
  transition: border-color .25s, transform .25s;
}
.combo-mod:hover { border-color: var(--gold); transform: translateY(-2px); }
.combo-mod input { accent-color: var(--gold); width: auto; }
.combo-mod-icon { font-size: 1.5rem; line-height: 1; }
.combo-mod b { font-family: 'Cinzel', serif; font-size: .85rem; letter-spacing: .04em; }
.combo-mod small { font-size: .68rem; opacity: .65; line-height: 1.4; }
.combo-card > .chip { margin-bottom: 6px; }

/* ===== Grand Reading: full-page system sections ===== */
.results-topbar h3 { font-size: 1.15rem; margin-bottom: 10px; }
.results-jump {
  position: sticky;
  top: 66px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 10px 14px;
  margin: 0 auto 6px;
  max-width: 980px;
  background: rgba(5, 3, 15, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.results-jump a {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfc8ec;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.results-jump a:hover { color: var(--gold); border-color: rgba(255, 217, 160, 0.35); }
.results-jump button {
  background: linear-gradient(135deg, #a78bfa, #f0abfc);
  color: #12081f;
  border: none;
  border-radius: 999px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  padding: 6px 16px;
  cursor: pointer;
}
.sys-section {
  max-width: 980px;
  margin: 26px auto;
  background: rgba(13, 10, 30, 0.93);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 34px 38px 30px;
  text-align: left;
  animation: fadeUp 0.6s ease both;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
/* ---------- Place type-ahead (reading.html) ---------- */
.place-sug {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
}
.place-opt {
  text-align: left;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--text);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.place-opt:hover {
  background: rgba(167, 139, 250, 0.24);
  border-color: rgba(167, 139, 250, 0.55);
  color: #fff;
}

.sys-section > .chip { display: inline-block; margin-bottom: 14px; }
.sys-section .result-grid { gap: 14px; }
.sys-section p { color: #d8d2f2; }

/* ===== Book-grade report (report.js) ===== */
.report-cover {
  text-align: center;
  padding: 34px 20px 26px;
  margin-bottom: 20px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 22px;
  background: rgba(13, 10, 30, 0.93);
  box-shadow: 0 0 60px rgba(167, 139, 250, 0.12);
}
.rc-kicker { font-size: 0.72rem; letter-spacing: 4px; color: var(--accent2); text-transform: uppercase; }
.rc-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 6px;
  margin: 14px 0 10px;
  background: linear-gradient(120deg, #fff, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rc-meta { color: var(--muted); font-size: 0.88rem; margin: 4px 0; }
.rc-note { color: var(--muted); font-size: 0.78rem; max-width: 520px; margin: 14px auto 0; line-height: 1.8; }

.chapter-head { margin: 26px 0 6px; border-bottom: 1px solid rgba(167, 139, 250, 0.25); padding-bottom: 12px; }
.chapter-num {
  display: inline-block; font-size: 0.68rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(255, 217, 160, 0.35); border-radius: 999px; padding: 4px 14px;
}
.chapter-title { font-family: 'Cinzel', serif; font-size: 1.5rem; letter-spacing: 2px; margin-top: 12px; }
.sub-title { color: var(--gold); font-family: 'Cinzel', serif; font-size: 1.02rem; margin: 22px 0 8px; }
.para, .para-aspect { font-size: 0.85rem; line-height: 1.85; margin: 8px 0; text-align: left; color: #d8d2f2; }
.para-aspect { padding-left: 14px; border-left: 2px solid rgba(167, 139, 250, 0.3); }
.win-list { list-style: none; padding: 0; }

.dasha-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; margin: 12px 0; }
.dasha-table th { text-align: left; padding: 6px 8px; color: var(--gold); border-bottom: 1px solid var(--border); }
.dasha-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: top; }
.dasha-table .dash-now td { background: rgba(167, 139, 250, 0.13); }
.dash-tag { color: var(--accent2); font-size: 0.7rem; letter-spacing: 1px; }
.dash-note { color: var(--muted); }

.bhava-list { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
@media (min-width: 760px) { .bhava-list { grid-template-columns: 1fr 1fr; } }
.bhava {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
}
.bhava-h { color: var(--gold); font-size: 0.86rem; }
.bhava-m { color: var(--muted); font-size: 0.78rem; }
.bhava-p { font-size: 0.8rem; line-height: 1.75; margin: 6px 0 0; color: #d8d2f2; }

/* ===== Experience layer (experience.js) ===== */
#constellation-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  z-index: 60;
  background: linear-gradient(90deg, var(--gold), var(--accent), var(--accent2));
  box-shadow: 0 0 12px rgba(167, 139, 250, 0.8);
  border-radius: 0 3px 3px 0;
  transition: width 0.08s linear;
  pointer-events: none;
}
.sky-greet {
  display: inline-block;
  margin-top: 26px;
  padding: 10px 22px;
  border: 1px solid rgba(255, 217, 160, 0.35);
  border-radius: 999px;
  background: rgba(13, 10, 30, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 0 26px rgba(255, 217, 160, 0.12);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.sky-greet:hover {
  border-color: rgba(255, 217, 160, 0.7);
  box-shadow: 0 0 40px rgba(255, 217, 160, 0.28);
  transform: translateY(-2px);
}
.sky-greet .sg-link { color: var(--accent2); margin-left: 8px; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #scroll-progress { transition: none; }
}
@media print {
  #constellation-canvas, #scroll-progress, .sky-greet { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

@media print {
  #galaxy-canvas, .vignette, .nav, .tool-hero, .footer, .results-jump, #combo-form { display: none !important; }
  body { background: #fff; color: #111; }
  .report-cover, .sys-section, .modal-overlay {
    background: #fff !important; color: #111;
    box-shadow: none; border: 1px solid #ccc; backdrop-filter: none !important;
  }
  .rc-name, .chapter-title { background: none; color: #111; -webkit-text-fill-color: #111; }
  .rc-kicker, .chapter-num, .sub-title, .bhava-h, .dasha-table th { color: #6b4fa0; }
  .sys-section p, .para, .para-aspect, .bhava-p, .result-desc, .rc-meta, .rc-note, .dash-note { color: #333; }
  .result-value, .bhava-m { color: #111; }
  .sys-section { break-inside: avoid-page; margin: 14px 0; }
}

/* ===== Vedic SVG charts ===== */
.chart-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
  margin: 14px 0 10px;
}
.chart-box { text-align: center; }
.chart-svg {
  width: min(300px, 88vw);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 18px rgba(124, 92, 255, 0.18));
}
.chart-cap {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: 'Cinzel', serif;
}
.chart-need-time p { font-size: 0.82rem; color: var(--muted); }
.chart-legend {
  font-size: 0.76rem;
  color: #9a95b8;
  line-height: 1.75;
  max-width: 760px;
  margin: 4px auto 0;
}

/* ===== Numerology deep cards ===== */
.num-deep { text-align: left; }
.num-big {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 2.1rem;
  color: var(--gold);
  text-shadow: 0 0 22px rgba(255, 217, 160, 0.35);
  margin: 4px 0 2px;
}
.num-calc {
  display: inline-block;
  font-size: 0.72rem;
  color: #9a95b8;
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.25);
  border-radius: 8px;
  padding: 3px 10px;
  margin-top: 8px;
  word-break: break-word;
}
@media (max-width: 640px) {
  .sys-section { padding: 24px 18px; }
  .results-jump { top: 58px; }
}

/* ===== Chakra energy-body visualization (daily.html) ===== */
.chakra-figure {
  display: block;
  width: min(300px, 78vw);
  margin: 6px auto 12px;
  overflow: visible;
}
.chakra-aura {
  fill: rgba(150, 120, 255, .05);
  stroke: rgba(184, 160, 255, .18);
  stroke-dasharray: 3 7;
}
.chakra-body circle,
.chakra-body path {
  fill: rgba(20, 14, 46, .55);
  stroke: rgba(200, 180, 255, .5);
  stroke-width: 1.6;
}
.chakra-wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: chakra-spin linear infinite;
}
@keyframes chakra-spin {
  to { transform: rotate(360deg); }
}
.chakra-glow {
  animation: chakra-pulse 3.2s ease-in-out infinite alternate;
  filter: blur(7px);
}
@keyframes chakra-pulse {
  from { opacity: .06; }
  to   { opacity: .45; }
}
.chakra-pct {
  font-size: 11px;
  fill: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.chakra-hit { fill: transparent; cursor: pointer; }
.chakra-node { transition: opacity .25s; }
.chakra-node:not(.active) { opacity: .62; }
.chakra-node.active .chakra-ring {
  filter: drop-shadow(0 0 9px currentColor);
}
#chakra-detail { min-height: 130px; }
#chakra-detail.flash { animation: chakra-in .45s ease; }
@keyframes chakra-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.chakra-bar {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  margin-top: 10px;
  overflow: hidden;
}
.chakra-bar-fill {
  height: 100%;
  border-radius: 99px;
  box-shadow: 0 0 12px currentColor;
  transition: width .8s cubic-bezier(.2, .8, .2, 1);
}




