/* =====================================================
   Thần Số Học — style.css
   Dark + Mystical + Elegant + Cosmic + Premium
   ===================================================== */

:root {
  /* Nền */
  --ink: #05050a;
  --midnight: #090a18;
  --panel: #111025;
  --violet-deep: #24133d;
  /* Accent */
  --purple: #9d7bff;
  --violet: #7c5cff;
  --indigo: #6f7cd8;
  --gold: #d4af6a;
  --champagne: #e9d8b4;
  /* Chữ */
  --text: #e8e4f5;
  --text-muted: #9a93b8;
  --danger: #e08097;
  --ok: #8fd3a8;
  /* Khác */
  --radius: 16px;
  --border-soft: rgba(157, 123, 255, 0.16);
  --border-gold: rgba(212, 175, 106, 0.35);
  --font-head: 'Playfair Display', 'Times New Roman', serif;
  --font-accent: 'Playfair Display', Georgia, serif;
  --font-body: 'Be Vietnam Pro', system-ui, sans-serif;
  font-size: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: linear-gradient(180deg, var(--ink) 0%, var(--midnight) 45%, var(--panel) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 1.2rem; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 0.95rem; }
.only-desktop { display: inline; }

::selection { background: rgba(157, 123, 255, 0.35); color: #fff; }

/* ===================== NỀN VŨ TRỤ ===================== */
#stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.nebula {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0.55;
}
.nebula--violet {
  width: 70vmax; height: 70vmax;
  top: -25vmax; right: -20vmax;
  background: radial-gradient(circle at center, rgba(124, 92, 255, 0.14), rgba(36, 19, 61, 0.06) 45%, transparent 70%);
}
.nebula--blue {
  width: 60vmax; height: 60vmax;
  bottom: -25vmax; left: -18vmax;
  background: radial-gradient(circle at center, rgba(111, 124, 216, 0.1), rgba(9, 10, 24, 0.05) 50%, transparent 72%);
}

/* ===================== NAVBAR ===================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0.9rem 0;
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(9, 10, 24, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(212, 175, 106, 0.12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--champagne);
  text-decoration: none;
  white-space: nowrap;
}
.brand-symbol { color: var(--gold); text-shadow: 0 0 12px rgba(212, 175, 106, 0.6); }

.nav-links { display: flex; gap: 1.6rem; align-items: center; }

/* Nút hamburger — chỉ hiện trên mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.25s;
}
.nav-toggle:hover { border-color: var(--border-gold); }
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  margin: 0 auto;
  background: var(--champagne);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-links a {
  position: relative;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  transition: color 0.25s;
  padding: 0.2rem 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover { color: var(--champagne); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 6rem 0 4rem;
}

.hero-geometry {
  position: absolute;
  top: 50%; left: 50%;
  width: min(86vmin, 660px);
  height: min(86vmin, 660px);
  transform: translate(-50%, -50%);
  opacity: 0.85;
  pointer-events: none;
  will-change: transform;
}
.hero-geometry svg { width: 100%; height: 100%; display: block; }

.ring { transform-origin: 300px 300px; }
.ring--slow { animation: spin 140s linear infinite; }
.ring--reverse { animation: spin-rev 100s linear infinite; }
.pulse-ring {
  transform-origin: 300px 300px;
  animation: soft-pulse 7s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@keyframes soft-pulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

.hero-content { position: relative; z-index: 1; }

.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin-bottom: 1.6rem;
  opacity: 0.9;
}

.hero h1 {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 3.9rem);
  line-height: 1.22;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 0 60px rgba(124, 92, 255, 0.35);
}
.hero h1 em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(120deg, var(--champagne), var(--gold) 60%, #a8874d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-sub {
  max-width: 560px;
  margin: 1.6rem auto 2.6rem;
  font-family: var(--font-accent);
  font-size: 1.22rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 22vh;
  background: linear-gradient(180deg, transparent, var(--midnight));
  pointer-events: none;
}

/* ===================== CTA BUTTON ===================== */
.btn-cta {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--champagne);
  text-decoration: none;
  padding: 1.05rem 2.8rem;
  border-radius: 999px;
  border: 1px solid var(--border-gold);
  background: linear-gradient(160deg, rgba(36, 19, 61, 0.55), rgba(9, 10, 24, 0.6));
  box-shadow: 0 0 28px rgba(124, 92, 255, 0.18), inset 0 0 18px rgba(212, 175, 106, 0.05);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.btn-cta:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: rgba(212, 175, 106, 0.7);
  background: linear-gradient(160deg, rgba(36, 19, 61, 0.75), rgba(17, 16, 37, 0.8));
  box-shadow: 0 0 46px rgba(124, 92, 255, 0.32), 0 0 18px rgba(212, 175, 106, 0.22), inset 0 0 22px rgba(212, 175, 106, 0.08);
}
.btn-cta--wide { width: 100%; text-align: center; margin-top: 1.6rem; }

.btn-secondary {
  font-family: var(--font-body);
  padding: 0.75rem 1.7rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: rgba(17, 16, 37, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn-secondary:hover {
  border-color: var(--border-gold);
  color: var(--champagne);
  box-shadow: 0 0 20px rgba(212, 175, 106, 0.12);
}

/* ===================== SECTION SHELL ===================== */
.section-shell { padding: 4.5rem 0 2rem; }

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin: 0 auto 2.4rem;
  color: var(--gold);
}
.divider::before,
.divider::after {
  content: '';
  height: 1px;
  width: min(200px, 28vw);
  background: linear-gradient(90deg, transparent, rgba(212, 175, 106, 0.45));
}
.divider::after { background: linear-gradient(90deg, rgba(212, 175, 106, 0.45), transparent); }
.divider span { font-size: 0.95rem; text-shadow: 0 0 14px rgba(212, 175, 106, 0.55); }

.shell-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--text);
  margin-bottom: 0.8rem;
}
.shell-sub {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 2.6rem;
  font-family: var(--font-accent);
  font-size: 1.12rem;
  color: var(--text-muted);
}

/* ===================== MYSTICAL CARD ===================== */
.mcard {
  position: relative;
  background: linear-gradient(165deg, rgba(36, 19, 61, 0.42), rgba(17, 16, 37, 0.68));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.7rem 1.6rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42), inset 0 0 42px rgba(124, 92, 255, 0.045);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.mcard::before {
  content: '';
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 106, 0.55), rgba(157, 123, 255, 0.4), transparent);
  opacity: 0.7;
}
.mcard:hover {
  transform: translateY(-4px);
  border-color: var(--border-gold);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 34px rgba(124, 92, 255, 0.12), inset 0 0 42px rgba(124, 92, 255, 0.06);
}
.mcard h3 {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--champagne);
  margin-bottom: 0.5rem;
}
.mcard-symbol {
  font-size: 1.5rem;
  color: var(--gold);
  text-shadow: 0 0 16px rgba(212, 175, 106, 0.55);
  margin-bottom: 0.9rem;
  transition: transform 0.35s ease;
}
.mcard:hover .mcard-symbol { transform: translateY(-3px) scale(1.08); }
.mcard p { color: var(--text-muted); font-size: 0.94rem; }
.mcard p strong { color: var(--text); font-weight: 600; }

.mcard--wide { margin-bottom: 1.7rem; }
.mcard--wide:hover { transform: none; }

.intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

/* ===================== NUMBERS TEASER ===================== */
.numbers-teaser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.nt-card {
  display: flex;
  gap: 1.05rem;
  align-items: flex-start;
  background: linear-gradient(165deg, rgba(36, 19, 61, 0.35), rgba(17, 16, 37, 0.6));
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.05rem 1.15rem;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.nt-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 22px rgba(124, 92, 255, 0.1);
}
.nt-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
  min-width: 2.2rem;
  text-align: center;
  background: linear-gradient(160deg, var(--champagne), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(212, 175, 106, 0.35));
}
.nt-name {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.06rem;
  color: var(--champagne);
}
.nt-line { font-size: 0.86rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ===================== RITUAL FORM ===================== */
.ritual {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.ritual-eyebrow {
  font-family: var(--font-head);
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  color: var(--purple);
  margin-bottom: 1rem;
  opacity: 0.85;
}

.ritual-form {
  text-align: left;
  background: linear-gradient(170deg, rgba(36, 19, 61, 0.4), rgba(9, 10, 24, 0.65));
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 2rem 1.8rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(124, 92, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
}
.ritual-form::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 106, 0.6), transparent);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem 1.3rem;
}
.form-field--full { grid-column: 1 / -1; }

.form-field label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  color: var(--text);
}
.req { color: var(--gold); }
.optional { color: var(--text-muted); font-weight: 400; font-size: 0.82em; }

.form-field input[type='text'],
.form-field input[type='date'],
.form-field input[type='tel'],
.form-field input[type='email'],
.form-field input[type='password'] {
  width: 100%;
  padding: 0.78rem 1rem;
  border-radius: 11px;
  border: 1px solid rgba(157, 123, 255, 0.25);
  background: rgba(9, 10, 24, 0.55);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-field input:focus {
  border-color: rgba(212, 175, 106, 0.65);
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.1), 0 0 22px rgba(124, 92, 255, 0.18);
}
.form-field input::placeholder { color: #5e5880; }
input[type='date']::-webkit-calendar-picker-indicator { filter: invert(0.75) sepia(0.3); cursor: pointer; }

.radio-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid rgba(157, 123, 255, 0.25);
  border-radius: 999px;
  background: rgba(9, 10, 24, 0.5);
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: all 0.25s ease;
}
.radio-pill:hover { border-color: rgba(212, 175, 106, 0.4); color: var(--text); }
.radio-pill:has(input:checked) {
  border-color: rgba(212, 175, 106, 0.65);
  background: rgba(212, 175, 106, 0.08);
  color: var(--champagne);
  box-shadow: 0 0 16px rgba(212, 175, 106, 0.12);
}
.radio-pill input { accent-color: var(--gold); }

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  min-height: 1em;
  display: block;
  margin-top: 0.3rem;
}

/* ===================== KẾT QUẢ ===================== */
.result { padding: 2rem 1.2rem 4rem; }
.section { margin-bottom: 1.8rem; }

.section h2 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--champagne);
  font-size: 1.18rem;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.section-title {
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.55rem);
  letter-spacing: 0.03em;
  margin: 0.5rem 0 1.8rem;
}
.section-title .name-hl {
  background: linear-gradient(120deg, var(--champagne), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Core number cards */
.core-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
}
.core-card {
  position: relative;
  background: linear-gradient(165deg, rgba(36, 19, 61, 0.42), rgba(17, 16, 37, 0.66));
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.15rem 0.8rem 1rem;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}
.core-card::before {
  content: '';
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(157, 123, 255, 0.5), transparent);
}
.core-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-gold);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4), 0 0 24px rgba(124, 92, 255, 0.12);
}
.core-card .num {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.15;
  background: linear-gradient(160deg, var(--champagne) 20%, var(--gold) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(212, 175, 106, 0.3));
}
.core-card .num.master { filter: drop-shadow(0 0 18px rgba(212, 175, 106, 0.6)); }
.core-card .label { font-size: 0.83rem; color: var(--text-muted); margin-top: 0.3rem; }
.core-card.highlight {
  border-color: var(--border-gold);
  background: linear-gradient(165deg, rgba(36, 19, 61, 0.7), rgba(17, 16, 37, 0.8));
  box-shadow: 0 0 30px rgba(212, 175, 106, 0.1), inset 0 0 30px rgba(124, 92, 255, 0.07);
}

.badge {
  display: inline-block;
  padding: 0.12rem 0.6rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  background: linear-gradient(120deg, var(--gold), #b3893f);
  color: #1c1502;
  margin-top: 0.4rem;
}

/* Content blocks */
.block { margin-bottom: 1.25rem; }
.block:last-child { margin-bottom: 0; }
.block h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.block h3 .tag { color: var(--gold); }
.block p { color: #cfcae4; font-size: 0.96rem; }
.block p.para { margin-bottom: 0.75rem; }
.block p.para:last-child { margin-bottom: 0; }

.callout {
  background: rgba(212, 175, 106, 0.06);
  border: 1px solid rgba(212, 175, 106, 0.25);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  box-shadow: inset 0 0 26px rgba(212, 175, 106, 0.04);
}
.callout h3 { color: var(--champagne); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.pill-list { list-style: none; }
.pill-list li {
  padding: 0.5rem 0.85rem;
  margin-bottom: 0.5rem;
  background: rgba(9, 10, 24, 0.5);
  border: 1px solid rgba(157, 123, 255, 0.1);
  border-left: 2px solid var(--ok);
  border-radius: 9px;
  font-size: 0.92rem;
  color: #cfcae4;
}
.pill-list.weak li { border-left-color: var(--danger); }
.pill-list.advice li { border-left-color: var(--gold); }
.pill-list.aspect li {
  border-left-color: var(--purple);
  font-size: 0.94rem;
  line-height: 1.65;
  padding: 0.65rem 0.85rem;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.4rem; }
.chip {
  padding: 0.32rem 0.9rem;
  border-radius: 999px;
  background: rgba(212, 175, 106, 0.07);
  border: 1px solid rgba(212, 175, 106, 0.4);
  color: var(--champagne);
  font-weight: 500;
  font-size: 0.87rem;
  letter-spacing: 0.02em;
}

/* Birth chart */
.chart-wrap { display: grid; grid-template-columns: auto 1fr; gap: 1.7rem; align-items: start; }
.birth-chart {
  display: grid;
  grid-template-columns: repeat(3, 76px);
  grid-template-rows: repeat(3, 76px);
  gap: 7px;
}
.bc-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 10, 24, 0.6);
  border: 1px solid rgba(157, 123, 255, 0.22);
  border-radius: 11px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--champagne);
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(212, 175, 106, 0.35);
}
.bc-cell.empty {
  color: #453f66;
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0;
  text-shadow: none;
  border-style: dashed;
  border-color: rgba(157, 123, 255, 0.12);
}

.arrows .block { margin-bottom: 0.85rem; }

/* Future */
.year-road {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.year-card {
  background: rgba(9, 10, 24, 0.55);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 0.9rem 0.8rem;
  text-align: center;
  transition: border-color 0.25s ease;
}
.year-card:hover { border-color: var(--border-gold); }
.year-card.current {
  border-color: var(--border-gold);
  box-shadow: 0 0 22px rgba(212, 175, 106, 0.1);
}
.year-card .y { color: var(--text-muted); font-size: 0.83rem; }
.year-card .n {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 600;
  background: linear-gradient(160deg, var(--champagne), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.year-card .t { font-size: 0.87rem; color: var(--text); }

/* Timeline (pinnacles) */
.timeline { position: relative; margin-top: 1.1rem; padding-left: 1.7rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--purple), var(--gold));
  opacity: 0.55;
}
.tl-item { position: relative; padding-bottom: 1.4rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -1.7rem; top: 7px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--champagne), var(--gold));
  box-shadow: 0 0 14px rgba(212, 175, 106, 0.55);
}
.tl-item .tl-head {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--champagne);
}
.tl-item .tl-sub { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.tl-item p { color: #cfcae4; font-size: 0.95rem; }

/* Phone compat */
.compat-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 13px;
  margin: 0.9rem 0 1.1rem;
  border: 1px solid;
  background: rgba(9, 10, 24, 0.45);
}
.compat-banner .score { font-size: 1.8rem; }
.compat-banner .label { font-weight: 600; font-size: 1.05rem; }
.compat-banner p { color: #cfcae4; font-size: 0.93rem; }
.compat-banner.great { border-color: rgba(143, 211, 168, 0.5); }
.compat-banner.great .label { color: var(--ok); }
.compat-banner.good { border-color: rgba(111, 124, 216, 0.55); }
.compat-banner.good .label { color: #9daaf0; }
.compat-banner.neutral { border-color: var(--border-gold); }
.compat-banner.neutral .label { color: var(--champagne); }
.compat-banner.low { border-color: rgba(224, 128, 151, 0.5); }
.compat-banner.low .label { color: var(--danger); }

.actions { text-align: center; margin-top: 2.2rem; }

/* ===================== CALC OVERLAY ===================== */
.calc-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 10, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.calc-overlay.visible { opacity: 1; }

.calc-scene { text-align: center; }

.calc-rings {
  position: relative;
  width: 230px;
  height: 230px;
  margin: 0 auto 1.8rem;
}
.calc-ring {
  position: absolute;
  border-radius: 50%;
}
.cr-1 {
  inset: 0;
  border: 1px dashed rgba(212, 175, 106, 0.5);
  animation: spin 6s linear infinite;
}
.cr-2 {
  inset: 22px;
  border: 1px solid rgba(157, 123, 255, 0.4);
  border-top-color: rgba(157, 123, 255, 0.9);
  animation: spin-rev 2.4s linear infinite;
}
.cr-3 {
  inset: 46px;
  border: 1px dotted rgba(111, 124, 216, 0.55);
  animation: spin 9s linear infinite;
}
.calc-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 4rem;
  font-weight: 600;
  background: linear-gradient(160deg, var(--champagne), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(212, 175, 106, 0.4));
}
.calc-number.settled { animation: number-pop 0.9s ease; }
@keyframes number-pop {
  0% { transform: scale(0.6); filter: drop-shadow(0 0 0 rgba(212, 175, 106, 0)); }
  55% { transform: scale(1.18); filter: drop-shadow(0 0 34px rgba(212, 175, 106, 0.8)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(212, 175, 106, 0.4)); }
}
.calc-caption {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ===================== SCROLL REVEAL ===================== */
.reveal,
.reveal-r {
  opacity: 0;
  transform: translateY(38px);
  filter: blur(8px);
  transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
  will-change: opacity, transform, filter;
}
.reveal.revealed,
.reveal-r.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* ===================== FOOTER ===================== */
.footer {
  padding: 3.4rem 0 2.6rem;
  text-align: center;
}
.footer-brand {
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  color: var(--champagne);
  margin-bottom: 0.8rem;
}
.footer-about {
  max-width: 520px;
  margin: 0 auto 1.2rem;
  font-family: var(--font-accent);
  font-size: 1.05rem;
  color: var(--text-muted);
}
.footer-note { color: #6e6890; font-size: 0.82rem; max-width: 560px; margin: 0 auto; }
.footer-note strong { color: var(--text-muted); }

.footer-author {
  margin-top: 1.6rem;
  font-family: var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.footer-author span {
  background: linear-gradient(120deg, var(--champagne), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 600;
}

.footer-contact { margin-top: 0.5rem; font-size: 0.88rem; color: var(--text-muted); }
.footer-contact a {
  color: var(--champagne);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 106, 0.35);
  transition: border-color 0.25s, color 0.25s;
}
.footer-contact a:hover { color: var(--gold); border-color: var(--gold); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 1.2rem;
    left: 1.2rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem 0.4rem;
    background: rgba(9, 10, 24, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
  }
  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a {
    padding: 0.8rem 1rem;
    font-size: 0.98rem;
    border-bottom: 1px solid rgba(157, 123, 255, 0.08);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a::after { display: none; }
  .only-desktop { display: none; }
  .hero { padding: 5rem 0 3rem; }
  .hero-geometry { width: 120vmin; height: 120vmin; opacity: 0.5; }
  .form-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .chart-wrap { grid-template-columns: 1fr; justify-items: center; }
  .birth-chart { grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(3, 64px); }
  .section-shell { padding: 3.2rem 0 1.4rem; }
  .ritual-form { padding: 1.6rem 1.2rem; }
  .nebula { opacity: 0.35; }

  .nav.scrolled,
  .ritual-form,
  .nav-links,
  .calc-overlay,
  .modal-overlay,
  .toast,
  .chart-tip {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav.scrolled { background: rgba(9, 10, 24, 0.94); }
  .ritual-form { background: rgba(17, 16, 37, 0.92); }
  .calc-rings { width: 190px; height: 190px; }
  .calc-number { font-size: 3.2rem; }

  /* Bỏ blur khi reveal trên mobile — tránh vệt trắng mờ khi cuộn nhanh
     (lớp filter blur đang composite bị "lộ" giữa lúc transition). Giữ fade + trượt. */
  .reveal,
  .reveal-r,
  .reveal.revealed,
  .reveal-r.revealed {
    filter: none;
    will-change: opacity, transform;
  }
}

/* ===================== ADMIN ===================== */
.admin-wrap { padding: 4rem 1.2rem; min-height: 100vh; }
.admin-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}
.admin-panel { max-width: 640px; margin: 0 auto 2rem; text-align: center; }
.admin-panel code {
  background: rgba(9, 10, 24, 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
  font-size: 0.86em;
  color: var(--champagne);
}

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.admin-stats { font-size: 0.98rem; color: var(--text); }
.admin-stats strong { color: var(--gold); font-size: 1.15rem; }
.admin-stats span { margin-left: 0.5rem; }
.admin-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.admin-actions .btn-secondary { padding: 0.5rem 1.1rem; font-size: 0.88rem; }

.admin-search {
  width: 100%;
  padding: 0.7rem 1rem;
  margin-bottom: 1.1rem;
  border-radius: 11px;
  border: 1px solid rgba(157, 123, 255, 0.25);
  background: rgba(9, 10, 24, 0.55);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}
.admin-search:focus { border-color: rgba(212, 175, 106, 0.6); }

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(17, 16, 37, 0.5);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 720px;
}
.admin-table th,
.admin-table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(157, 123, 255, 0.1);
}
.admin-table thead th {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--champagne);
  background: rgba(36, 19, 61, 0.5);
  position: sticky;
  top: 0;
}
.admin-table tbody tr:hover { background: rgba(124, 92, 255, 0.06); }
.admin-table .num-cell {
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--gold);
}
.btn-del {
  background: transparent;
  border: 1px solid rgba(224, 128, 151, 0.3);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.65;
  transition: opacity 0.2s, border-color 0.2s, background 0.2s;
}
.btn-del:hover {
  opacity: 1;
  border-color: var(--danger);
  background: rgba(224, 128, 151, 0.1);
}
.btn-del:disabled { opacity: 0.3; cursor: default; }

/* ===================== DASHBOARD THỐNG KÊ ===================== */
.stats-dash { margin-bottom: 1.8rem; }

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}
.stat-tile {
  background: linear-gradient(165deg, rgba(36, 19, 61, 0.42), rgba(17, 16, 37, 0.66));
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 1.1rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.stat-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 106, 0.5), transparent);
}
.stat-num {
  font-family: var(--font-head);
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.1;
  background: linear-gradient(160deg, var(--champagne), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }

.chart-card {
  background: linear-gradient(165deg, rgba(36, 19, 61, 0.32), rgba(17, 16, 37, 0.6));
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 1.2rem 1.3rem 1rem;
  margin-bottom: 1.2rem;
}
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}
.chart-head h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--champagne);
}
.charts-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.charts-2col .chart-card { margin-bottom: 0; }

.chart-toggle { display: flex; gap: 0.3rem; }
.chart-toggle button {
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(9, 10, 24, 0.5);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.chart-toggle button:hover { color: var(--text); border-color: var(--border-gold); }
.chart-toggle button.active {
  color: var(--champagne);
  border-color: rgba(212, 175, 106, 0.6);
  background: rgba(212, 175, 106, 0.08);
}

.chart-body { width: 100%; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 2.2rem 0;
}

/* Mark specs: lưới & trục recessive, bar hover làm nổi */
.chart-svg .grid { stroke: rgba(157, 123, 255, 0.12); stroke-width: 1; }
.chart-svg .axis-base { stroke: rgba(157, 123, 255, 0.28); stroke-width: 1; }
.chart-svg .axis-x,
.chart-svg .axis-y {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-body);
}
.chart-svg .axis-x { text-anchor: middle; }
.chart-svg .axis-y { text-anchor: end; }
.chart-svg .hbar-label {
  fill: var(--text);
  font-size: 13px;
  font-family: var(--font-body);
  text-anchor: end;
}
.chart-svg .hbar-value {
  fill: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-body);
}
.chart-svg .bar { transition: opacity 0.15s ease; cursor: default; }
.chart-svg:hover .bar { opacity: 0.55; }
.chart-svg .bar:hover { opacity: 1; }

.chart-tip {
  position: fixed;
  z-index: 1200;
  transform: translate(-50%, -100%);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.82rem;
  white-space: nowrap;
  color: var(--text);
  background: rgba(9, 10, 24, 0.96);
  border: 1px solid var(--border-gold);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.chart-tip.show { opacity: 1; }

.table-heading {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--champagne);
  margin-bottom: 0.9rem;
}

@media (max-width: 640px) {
  .charts-2col { grid-template-columns: 1fr; }
}

/* ===================== MODAL XÁC NHẬN ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(5, 5, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-overlay.visible { opacity: 1; }

.modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  text-align: center;
  background: linear-gradient(170deg, rgba(36, 19, 61, 0.72), rgba(9, 10, 24, 0.9));
  border: 1px solid var(--border-gold);
  border-radius: 18px;
  padding: 2rem 1.8rem 1.6rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), inset 0 0 50px rgba(124, 92, 255, 0.06);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.modal-overlay.visible .modal-box { transform: translateY(0) scale(1); }
.modal-box::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 15%; right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 106, 0.6), transparent);
}
.modal-icon {
  font-size: 2rem;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 0 14px rgba(224, 128, 151, 0.4));
}
.modal-title {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--champagne);
  margin-bottom: 0.6rem;
}
.modal-msg {
  color: var(--text-muted);
  font-size: 0.96rem;
  margin-bottom: 1.6rem;
  line-height: 1.6;
}
.modal-msg strong { color: var(--text); }
.modal-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
}
.modal-actions button { min-width: 110px; }

.btn-danger {
  font-family: var(--font-body);
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  background: linear-gradient(135deg, #b8546b, #8f3a4e);
  border: 1px solid rgba(224, 128, 151, 0.5);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 8px 22px rgba(184, 84, 107, 0.28);
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(184, 84, 107, 0.42);
}

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  z-index: 1100;
  transform: translate(-50%, 20px);
  max-width: 90vw;
  padding: 0.8rem 1.3rem;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(17, 16, 37, 0.95);
  border: 1px solid var(--border-soft);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success { border-color: rgba(143, 211, 168, 0.5); }
.toast.success::before { content: '✓ '; color: var(--ok); }
.toast.error { border-color: rgba(224, 128, 151, 0.55); }
.toast.error::before { content: '⚠ '; color: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal-box, .toast { transition: none; }
  .modal-box { transform: none; }
}

.admin-back { text-align: center; margin-top: 2rem; }
.admin-back a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.25s;
}
.admin-back a:hover { color: var(--champagne); }

@media (max-width: 640px) {
  .admin-bar { flex-direction: column; align-items: flex-start; }
}

/* ===================== REDUCED MOTION ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ring--slow,
  .ring--reverse,
  .pulse-ring,
  .cr-1, .cr-2, .cr-3 { animation: none; }
  .reveal,
  .reveal-r {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
  .mcard, .core-card, .nt-card, .btn-cta { transition: none; }
  .mcard:hover, .core-card:hover, .nt-card:hover, .btn-cta:hover { transform: none; }
}
