/* =========================================================================
   Main stylesheet. Visual language taken from the original index.html:
   deep night background, warm gold accents, Cormorant Garamond + Inter.
   ========================================================================= */

:root {
  color-scheme: dark;
  --bg: #0b0916;
  --bg-raise: #171126;
  --surface: rgba(255, 255, 255, 0.03);
  --line: rgba(255, 255, 255, 0.09);
  --line-gold: rgba(185, 155, 99, 0.25);
  --text: #f4e9d5;
  --text-soft: #c2b6cd;
  --text-muted: #998ca6;
  --gold: #e6c58d;
  --gold-deep: #a77a40;
  --gold-line: #d5ad72;
  --ink: #17101d;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: Inter, Arial, sans-serif;
  --radius: 18px;
  --gutter: 20px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 50% 0%, #39254f 0%, transparent 48%),
    radial-gradient(circle at 80% 70%, #1b1735, transparent 45%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
}

main { flex: 1; }

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

img { max-width: 100%; display: block; }
code { font-size: 0.9em; color: var(--gold); }

h1, h2, h3, .h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(42px, 8vw, 72px); }
h2 { font-size: clamp(32px, 5vw, 50px); }
h3, .h3 { font-size: 26px; font-weight: 500; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 820px; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: #d2ad78;
  margin: 0 0 12px;
}
.muted { color: var(--text-soft); }
.small { font-size: 13px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--gold-line);
  background: linear-gradient(110deg, var(--gold-deep), var(--gold));
  color: var(--ink);
  border-radius: 40px;
  padding: 15px 30px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(230, 197, 141, .2); }
.btn-secondary { background: transparent; color: var(--gold); }
.btn-small { padding: 11px 22px; font-size: 13px; }

.link-arrow { font-size: 13px; color: var(--gold); white-space: nowrap; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 9, 22, 0.85);
  backdrop-filter: blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 44px; height: 44px; border-radius: 50%; flex: none; box-shadow: 0 0 14px rgba(230, 197, 141, .25); }
.about-logo { display: block; width: 220px; max-width: 60%; height: auto; margin: 0 auto 24px; border-radius: 50%; box-shadow: 0 0 40px rgba(230, 197, 141, .18); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-display); font-size: 26px; letter-spacing: 3px; text-transform: uppercase; }
.brand-sub { font-size: 10px; letter-spacing: 4px; text-transform: uppercase; color: #aaa0bb; }

.site-nav { display: flex; gap: 26px; }
.site-nav a { color: #d6c7d9; font-size: 13px; letter-spacing: .5px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #e8c886; text-decoration: none; }
.site-nav a[aria-current="page"] { border-bottom: 1px solid var(--gold-line); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 1px solid var(--line-gold); border-radius: 10px;
  cursor: pointer; padding: 12px 10px;
  flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 1px; background: var(--gold); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Placeholder marks (see core/placeholders.py) ---------- */

.ph {
  outline: 1px dashed #f5d36b;
  outline-offset: 2px;
  background: rgba(245, 211, 107, 0.10);
  border-radius: 3px;
  margin: 0 3px;
}
.brand .ph { margin-left: 0; }
.ph-badge {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #17101d;
  background: #f5d36b;
  border-radius: 3px;
  padding: 1px 3px;
  margin-left: 3px;
  vertical-align: super;
  text-transform: uppercase;
}
.draft-note, .dev-note {
  display: inline-block;
  font-size: 12px;
  color: #f5d36b;
  border: 1px dashed #f5d36b;
  border-radius: 8px;
  padding: 6px 12px;
}

/* ---------- Hero ---------- */

.hero { text-align: center; padding: 80px 0 40px; }
.hero h1 { font-size: clamp(52px, 9vw, 104px); line-height: .98; margin: 20px auto; max-width: 900px; }
.hero h1 em { color: #e8c58c; font-style: italic; }
.hero-lead { max-width: 580px; margin: 22px auto 30px; color: var(--text-soft); line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* Card back, as in the original design */
.card-back {
  width: 142px; height: 228px;
  border: 1px solid #d4af75;
  border-radius: 12px;
  background: linear-gradient(135deg, #382b5a, #111126 65%, #3b2a55);
  box-shadow: 0 16px 50px rgba(0, 0, 0, .55), inset 0 0 0 7px #161128, inset 0 0 0 8px #a88758;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform .5s;
}
.card-back::before { content: "✦"; font-size: 78px; color: #e1bb7d; text-shadow: 0 0 28px rgba(242, 199, 131, .45); }

.deck { display: flex; justify-content: center; align-items: center; height: 280px; perspective: 900px; margin: 30px 0 40px; }
.deck .card-back:nth-child(1) { transform: translateX(55px) rotate(-18deg); }
.deck .card-back:nth-child(2) { z-index: 2; transform: translateY(-15px); }
.deck .card-back:nth-child(3) { transform: translateX(-55px) rotate(18deg); }
.deck .card-back:hover { transform: translateY(-30px) rotate(0); }

.card-back-static { margin: 0 auto 28px; width: 110px; height: 176px; }
.card-back-static::before { font-size: 58px; }

/* ---------- Sections ---------- */

.section { padding: 70px 0; text-align: center; }
.section-tight { padding-top: 10px; text-align: left; }
.page-head { padding: 64px 0 30px; text-align: center; }
.page-head h1 { margin-bottom: 14px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0 30px; }

.tile {
  background: var(--surface);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: border-color .25s, transform .25s;
  display: flex; flex-direction: column; align-items: center;
}
.tile:hover { border-color: #d9b77d; transform: translateY(-5px); }
.tile p { color: #bdb0c8; font-size: 14px; margin: 0 0 14px; }
.tile .tile-meta { color: var(--text-soft); font-size: 13px; letter-spacing: .5px; }
.tile .tile-meta strong { color: var(--gold); }
.tile-actions { margin-top: auto; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; justify-content: center; }
.symbol { font-size: 40px; color: #dfbd86; line-height: 1.2; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { padding: 10px 16px; }
.steps p { color: var(--text-soft); margin: 0; }
.step-num { display: block; font-family: var(--font-display); font-size: 22px; color: var(--gold); letter-spacing: 3px; margin-bottom: 8px; }

/* ---------- FAQ ---------- */

.faq { text-align: left; margin-top: 36px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 36px 20px 0;
  font-family: var(--font-display);
  font-size: 22px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%);
  color: var(--gold); font-family: var(--font-body); font-size: 22px;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--text-soft); }

.section-cta { border-top: 1px solid var(--line); }

/* ---------- Product blocks (Readings page) ---------- */

.product {
  background: var(--surface);
  border: 1px solid var(--line-gold);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 26px;
  scroll-margin-top: 100px;
}
.product-head { display: flex; gap: 18px; align-items: center; margin-bottom: 12px; }
.product-head h2 { margin: 0; font-size: 38px; }
.product-meta { margin: 2px 0 0; color: var(--text-soft); font-size: 13px; }
.product-meta strong { color: var(--gold); }
.product h3 { font-size: 22px; margin: 24px 0 8px; }
.product p { color: var(--text-soft); }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 24px; margin-bottom: 6px; color: var(--text-soft); }
.check-list li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: 12px; top: 4px; }

.positions { padding-left: 22px; margin: 0; color: var(--text-soft); }
.positions li { margin-bottom: 6px; }
.positions strong { color: var(--text); font-weight: 500; }

.product-facts { margin: 22px 0; display: grid; gap: 10px; }
.product-facts div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.product-facts dt { color: var(--text-muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; padding-top: 3px; }
.product-facts dd { margin: 0; color: var(--text-soft); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; margin: 10px 0 30px; border: 1px solid var(--line-gold); border-radius: var(--radius); }
.price-table { width: 100%; border-collapse: collapse; text-align: left; }
.price-table th, .price-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table thead th { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
.price-table tbody tr:last-child th, .price-table tbody tr:last-child td { border-bottom: 0; }
.price-table tbody th { font-family: var(--font-display); font-size: 22px; font-weight: 500; }
.price-table td strong { color: var(--gold); white-space: nowrap; }
.row-note { display: block; font-family: var(--font-body); font-size: 12px; color: var(--text-muted); font-weight: 400; }

.dev-table tbody td { font-size: 14px; }
.status { font-size: 10px; letter-spacing: 1px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.status-temp { background: #f5d36b; color: var(--ink); }
.status-ok { background: #3b6b4f; color: #e8f5ec; }

/* ---------- Info boxes / contact ---------- */

.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 10px 0 30px; }
.info-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.info-box h3, .info-box .h3 { font-size: 22px; margin-bottom: 8px; }
.info-box p { color: var(--text-soft); margin: 0 0 10px; font-size: 14px; }
.info-box p:last-child { margin-bottom: 0; }

.contact-card { background: var(--bg-raise); border: 1px solid var(--line-gold); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 26px; }
.contact-list { margin: 0; display: grid; gap: 14px; }
.contact-list div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; }
.contact-list dt { color: var(--text-muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; padding-top: 3px; }
.contact-list dd { margin: 0; }

/* ---------- Prose / legal ---------- */

.prose { color: var(--text-soft); }
.prose h2 { font-size: 30px; color: var(--text); margin: 40px 0 12px; }
.prose h3 { color: var(--text); }
.prose p, .prose li { line-height: 1.8; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); font-weight: 600; }
.legal h2 { font-size: 26px; }

.legal-nav { margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 22px; }
.legal-nav .eyebrow { width: 100%; }
.legal-nav a { font-size: 14px; }

/* ---------- Error page ---------- */

.error-page { text-align: center; padding: 80px 0 100px; }
.error-page .btn { margin-top: 16px; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 30px; text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 40px; }
.footer-disclaimer { max-width: 620px; margin: 0 auto 18px; color: var(--text-soft); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 18px; }
.footer-links a { color: #bfb2c9; }
.footer-company { margin: 0; }
.footer-dev { margin: 14px 0 0; opacity: .7; }

/* ---------- Scroll reveal (enabled by JS) ---------- */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .grid-3, .steps { grid-template-columns: 1fr; }
  .grid-2, .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .header-inner { min-height: 64px; }
  .brand-name { font-size: 20px; letter-spacing: 2px; }
  .brand-logo { width: 36px; height: 36px; }
  .brand-sub { font-size: 8px; letter-spacing: 3px; }

  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: #0b0916;
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--gold); }

  .hero { padding-top: 56px; }
  .deck { transform: scale(.85); margin: 10px 0; }
  .section { padding: 48px 0; }
  .page-head { padding: 44px 0 20px; }
  .product { padding: 24px 20px; }
  .product-head h2 { font-size: 32px; }
  .product-facts div, .contact-list div { grid-template-columns: 1fr; gap: 2px; }
  .contact-card { padding: 22px 20px; }
  .price-table th, .price-table td { padding: 12px; }
  .price-table tbody th { font-size: 19px; }
  .price-table { font-size: 14px; }
  .price-table th, .price-table td { padding: 12px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   Stage 3: Daily Card, reading flow, card picker, safety modal
   ========================================================================= */

.page-head-tight { padding-bottom: 10px; }

/* ---------- Forms ---------- */

.field { display: block; margin: 0 0 22px; }
.field-label { display: block; font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.field-label .muted { letter-spacing: 1px; text-transform: none; }
.field-hint { display: block; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.field input[type="text"], .field textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-gold);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  padding: 14px 16px;
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: #8a7f98; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230, 197, 141, .15); }

.theme-picker { border: 0; padding: 0; margin: 0 0 24px; }
.theme-option { display: inline-block; margin: 0 8px 8px 0; cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option span {
  display: inline-block; padding: 10px 22px; border-radius: 40px;
  border: 1px solid var(--line-gold); color: var(--text-soft); font-size: 14px;
  transition: background .2s, color .2s, border-color .2s;
}
.theme-option input:checked + span { background: linear-gradient(110deg, var(--gold-deep), var(--gold)); color: var(--ink); border-color: var(--gold-line); font-weight: 600; }
.theme-option input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }

.positions-preview { margin: 6px 0 28px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 10px; }
.form-actions-center { justify-content: center; }
.error-text { color: #f0a08a; font-size: 14px; text-align: center; }
.question-echo { font-family: var(--font-display); font-size: 22px; font-style: italic; color: var(--gold); margin: 14px 0 0; }

/* ---------- Progress steps ---------- */

.flow-steps { list-style: none; padding: 0; margin: 0 auto 26px; display: flex; justify-content: center; gap: 8px 22px; flex-wrap: wrap; font-size: 12px; letter-spacing: 1px; color: var(--text-muted); }
.flow-steps li { display: flex; align-items: center; gap: 8px; }
.flow-steps span { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-gold); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.flow-steps .is-current { color: var(--gold); }
.flow-steps .is-current span { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.flow-steps .is-done span { border-color: var(--gold); color: var(--gold); }

/* ---------- Card faces ---------- */

.card-face { position: absolute; inset: 0; display: block; border-radius: 12px; overflow: hidden; background: linear-gradient(140deg, #ead5a6, #b88d66); border: 1px solid #d4af75; }
.card-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-face.is-reversed img, .card-face.is-reversed .card-fallback { transform: rotate(180deg); }
.card-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px; text-align: center; color: #2a1931; }
.card-fallback-label { font-family: var(--font-display); font-size: 34px; }
.card-fallback-name { font-family: var(--font-display); font-size: 20px; line-height: 1.1; }

/* ---------- Daily Card ---------- */

.daily { text-align: center; }
.daily-form { max-width: 520px; margin: 0 auto; }
.daily-form .field { text-align: left; }
.flip-wrap { perspective: 1200px; display: flex; justify-content: center; margin: 10px 0 30px; }
.flip-card { width: 200px; height: 340px; padding: 0; border: 0; background: none; cursor: pointer; }
.flip-card:disabled { cursor: default; }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.flip-card.is-flipped .flip-inner { transform: rotateY(180deg); }
.flip-card:not(.is-flipped):hover .flip-inner { transform: translateY(-8px); }
.flip-back, .flip-front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; }
.flip-back.card-back { width: 100%; height: 100%; }
.flip-back.card-back::before { font-size: 96px; }
.flip-front { transform: rotateY(180deg); box-shadow: 0 0 40px rgba(210, 164, 109, .3); }

.daily-result { max-width: 600px; margin: 0 auto; }
.daily-result.is-visible { animation: fade-up .7s ease both; }
.daily-result h2 { margin-bottom: 4px; }
.orientation { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); margin: 0 0 16px; }
.insight { color: var(--text-soft); font-size: 16px; line-height: 1.9; }
.reflection { font-family: var(--font-display); font-style: italic; font-size: 26px; color: var(--text); margin: 24px auto 30px; padding: 0 20px; position: relative; }
.reflection::before, .reflection::after { color: var(--gold); }
.reflection::before { content: "“"; }
.reflection::after { content: "”"; }
.daily-result .btn { margin-bottom: 18px; }
.daily-result .small { margin: 6px 0; }

@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Picker: slots ---------- */

.picker { text-align: center; }
.slots { list-style: none; padding: 0; margin: 10px auto 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.slot { width: 86px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.slot-card {
  width: 70px; height: 112px; border-radius: 9px; padding: 0;
  border: 1px dashed rgba(213, 173, 114, .45);
  background: rgba(255, 255, 255, .02);
  position: relative; display: block;
}
.slot.is-filled .slot-card {
  border: 1px solid #d4af75;
  background: linear-gradient(135deg, #382b5a, #111126 65%, #3b2a55);
  box-shadow: inset 0 0 0 4px #161128, inset 0 0 0 5px #a88758, 0 8px 22px rgba(0, 0, 0, .45);
  cursor: pointer;
  animation: drop-in .35s ease both;
}
.slot.is-filled .slot-card::before { content: "✦"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #e1bb7d; font-size: 28px; }
.slot.is-filled .slot-card:not(:disabled):hover::after {
  content: "×"; position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); color: var(--ink); font-size: 16px; line-height: 22px;
}
.slots-static .slot-card { cursor: default; }
.slot-name { font-size: 11px; letter-spacing: 1px; color: var(--text-soft); line-height: 1.3; }
.slot.is-filled .slot-name { color: var(--gold); }

@keyframes drop-in { from { opacity: 0; transform: translateY(-14px) scale(.9); } to { opacity: 1; transform: none; } }

.picker-count { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--text-muted); margin: 8px 0 0; }
.picker-count span { color: var(--gold); }

/* ---------- Picker: fan (desktop) ---------- */

.fan { position: relative; height: 340px; max-width: 1100px; margin: 10px auto 0; }
.fan-card {
  --rot: calc((var(--i) / 77 - 0.5) * 76deg);
  position: absolute; left: 50%; bottom: 170px;
  width: 76px; height: 122px; margin-left: -38px; padding: 0;
  border: 1px solid #b8955e; border-radius: 8px;
  background: linear-gradient(135deg, #382b5a, #111126 65%, #3b2a55);
  box-shadow: inset 0 0 0 3px #161128, inset 0 0 0 4px #8a6d45, -2px 2px 8px rgba(0, 0, 0, .5);
  transform-origin: 50% 600%;
  transform: rotate(var(--rot));
  transition: transform .2s ease, opacity .25s ease;
  cursor: pointer;
}
.fan-card::before { content: "✦"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c9a46c; font-size: 22px; }
.fan-card:hover:not(:disabled), .fan-card:focus-visible { transform: rotate(var(--rot)) translateY(-22px); z-index: 2; }
.fan-card.is-picked { transform: rotate(var(--rot)) translateY(-40px); opacity: .25; }
.fan-card:disabled { cursor: default; }
.fan-hint { display: none; }

.picker-form { margin-top: 20px; }

@media (max-width: 1060px) and (min-width: 761px) {
  .fan-card { --rot: calc((var(--i) / 77 - 0.5) * 60deg); }
}

/* ---------- Picker: ribbon (phones) ---------- */

@media (max-width: 760px) {
  .slot { width: 64px; }
  .slot-card { width: 54px; height: 86px; }
  .slot.is-filled .slot-card::before { font-size: 20px; }

  .fan {
    height: auto; display: flex; overflow-x: auto; overflow-y: hidden;
    padding: 36px 30px 18px 16px; margin: 0 calc(var(--gutter) * -1);
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  }
  .fan-card {
    position: relative; left: auto; bottom: auto; flex: 0 0 auto;
    width: 64px; height: 102px; margin: 0 -30px 0 0;
    transform: none; transform-origin: 50% 50%;
    scroll-snap-align: center;
  }
  .fan-card:hover:not(:disabled), .fan-card:focus-visible { transform: translateY(-10px); }
  .fan-card.is-picked { transform: translateY(-26px); opacity: .3; }
  .fan-hint { display: block; margin-top: 4px; }
}

/* ---------- Order summary ---------- */

.order-summary { max-width: 560px; margin: 26px auto 0; background: var(--surface); border: 1px solid var(--line-gold); border-radius: var(--radius); padding: 26px 28px; }
.order-summary .total { font-size: 18px; }
.order-summary .btn { width: 100%; margin-top: 4px; }
.order-summary .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.order-summary .dev-note { margin-top: 14px; }

/* ---------- Modal ---------- */

.modal {
  max-width: 520px; width: calc(100% - 32px);
  border: 1px solid var(--gold-line); border-radius: var(--radius);
  background: var(--bg-raise); color: var(--text);
  padding: 0;
}
.modal::backdrop { background: rgba(5, 4, 12, .75); backdrop-filter: blur(3px); }
.modal-body { padding: 30px 28px; }
.modal-body p { color: var(--text-soft); }
.hotlines { padding-left: 18px; color: var(--text-soft); margin: 0 0 22px; }
.hotlines li { margin-bottom: 8px; }
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }

@media (prefers-reduced-motion: reduce) {
  .flip-inner { transition: none; }
}

/* =========================================================================
   Stage 4: paywall and result page
   ========================================================================= */

.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 13px; }

.paywall .field input[type="email"] {
  width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-gold);
  border-radius: 12px; color: var(--text); font: inherit; padding: 13px 16px;
}
.paywall .field input[type="email"]:focus { outline: none; border-color: var(--gold); }
.paywall .field { margin-bottom: 16px; }
.beta-badge {
  display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 30px;
  background: rgba(230, 197, 141, .14); border: 1px solid var(--gold-line);
  color: var(--gold); font-size: 12px; letter-spacing: 1px;
}
.paywall-line { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; margin-bottom: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.paywall-line strong { color: var(--gold); white-space: nowrap; }
.paywall-disclaimer { font-size: 13px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; font-size: 14px; color: var(--text-soft); cursor: pointer; line-height: 1.5; }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--gold); }
.field-error { display: block; color: #f0a08a; font-size: 13px; margin: -4px 0 12px 30px; }
.field .field-error { margin: 6px 0 0; }
.paywall .btn-block { margin: 10px 0 16px; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 10px; }
.pay-badge { font-size: 10px; font-weight: 600; letter-spacing: .5px; color: var(--text-soft); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; background: rgba(255, 255, 255, .03); }
.secure-line, .beta-note { font-size: 12px; text-align: center; margin: 4px 0; }
.secure-line .lock { vertical-align: -1px; }
.paywall .modal-actions { justify-content: center; margin-top: 10px; }

/* ---------- Result ---------- */

.result-cards { list-style: none; padding: 0; margin: 10px auto 30px; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; perspective: 1200px; }
.result-card { width: 130px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.result-flip {
  position: relative; display: block; width: 130px; height: 216px;
  transform-style: preserve-3d;
  animation: card-reveal .9s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(.35s + var(--n) * .45s);
}
.result-flip .flip-back.card-back::before { font-size: 56px; }
.result-flip .card-fallback-label { font-size: 24px; }
.result-flip .card-fallback-name { font-size: 16px; }
@keyframes card-reveal { from { transform: rotateY(0); } to { transform: rotateY(180deg); } }

.result-text { margin-top: 10px; }
.result-item { padding: 24px 0; border-bottom: 1px solid var(--line); animation: fade-up .7s ease both; animation-delay: calc(.6s + var(--n) * .45s); }
.result-item .eyebrow { margin-bottom: 6px; }
.result-item h2 { margin-bottom: 4px; }
.result-item p { color: var(--text-soft); margin: 6px 0 0; }
.orientation-inline { font-family: var(--font-body); font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); vertical-align: middle; margin-left: 6px; }
.result-disclaimer { font-size: 13px; color: var(--text-muted); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin: 30px 0; }

.share-box, .signup-box { background: var(--surface); border: 1px solid var(--line-gold); border-radius: var(--radius); padding: 22px 24px; margin: 0 0 20px; }
.share-row { display: flex; gap: 10px; }
.share-row input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 10px; color: var(--text-soft); font: inherit; font-size: 13px; padding: 10px 12px; }
.signup-box { text-align: center; }
.signup-box .dev-note { margin-top: 12px; }

@media (max-width: 760px) {
  .result-card, .result-flip { width: 96px; }
  .result-flip { height: 160px; }
  .result-flip .card-fallback-name { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .result-flip { transform: rotateY(180deg); }
}

/* =========================================================================
   Stage 5: overall interpretation and waiting screen
   ========================================================================= */

.result-overall { padding: 30px 0 6px; animation: fade-up .7s ease both; animation-delay: calc(.6s + var(--n) * .45s); }
.result-overall p { color: var(--text-soft); line-height: 1.9; }
.result-overall p:first-of-type { margin-top: 4px; }
.result-reflection { text-align: center; animation: fade-up .7s ease both; animation-delay: calc(.9s + var(--n) * .45s); }

.waiting { text-align: center; padding: 30px 10px 10px; }
.waiting-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.waiting-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse 1.2s ease-in-out infinite; }
.waiting-dots span:nth-child(2) { animation-delay: .2s; }
.waiting-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* =========================================================================
   Stage 6: accounts
   ========================================================================= */

.nav-account { color: var(--gold) !important; }

.flash-wrap { padding-top: 20px; }
.flash { margin: 0 0 8px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-gold); background: rgba(230, 197, 141, .08); color: var(--text); font-size: 14px; }
.flash-error { border-color: rgba(240, 160, 138, .5); background: rgba(240, 160, 138, .08); }
.flash-success { border-color: rgba(120, 190, 150, .5); background: rgba(120, 190, 150, .08); }

.field input[type="email"], .field input[type="password"] {
  width: 100%; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-gold);
  border-radius: 12px; color: var(--text); font: inherit; padding: 13px 16px;
}
.field input[type="email"]:focus, .field input[type="password"]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230, 197, 141, .15); }

.auth { padding-top: 50px; }
.auth-card { max-width: 440px; margin: 0 auto; text-align: left; background: var(--surface); border: 1px solid var(--line-gold); border-radius: var(--radius); padding: 34px 32px; }
.auth-card-center { text-align: center; }
.auth-card h1 { font-size: 40px; }
.auth-card .btn-block { margin-top: 6px; }
.auth-card .field { margin-bottom: 16px; }
.auth-switch { margin: 14px 0 0; text-align: center; }
.auth-legal { margin: 18px 0 0; text-align: center; }
.google-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 6px; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; margin: 14px 0; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.resend-form { margin-top: 14px; text-align: center; }

.account-tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.account-tabs a { padding: 9px 18px; border-radius: 40px; border: 1px solid var(--line-gold); color: var(--text-soft); font-size: 13px; }
.account-tabs a:hover { text-decoration: none; border-color: var(--gold); }
.account-tabs a[aria-current="page"] { background: linear-gradient(110deg, var(--gold-deep), var(--gold)); color: var(--ink); border-color: var(--gold-line); font-weight: 600; }

.record-list { list-style: none; padding: 0; margin: 0; }
.record { display: flex; justify-content: space-between; gap: 18px; padding: 18px 20px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); }
.record:hover { text-decoration: none; border-color: var(--line-gold); }
.record-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.record-title { font-family: var(--font-display); font-size: 22px; }
.record-sub { font-size: 13px; color: var(--text-soft); }
.record-quote { font-size: 13px; color: var(--text-muted); font-style: italic; }
.record-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.record-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.empty { text-align: center; padding: 30px 0; }
.orders-table td a { color: var(--text); }

.profile .info-box { margin-bottom: 16px; }
.profile-email { font-size: 18px; margin: 0; }
.danger-box { border-color: rgba(240, 160, 138, .35); }
.danger-link { color: #f0a08a; }
.danger-btn { background: transparent; border-color: #f0a08a; color: #f0a08a; }

@media (max-width: 760px) {
  .auth-card { padding: 26px 20px; }
  .record { flex-direction: column; }
  .record-side { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* =========================================================================
   Languages: switcher in the header
   ========================================================================= */

.header-tools { display: flex; align-items: center; gap: 12px; order: 3; }
.site-header .site-nav { order: 2; margin-left: auto; margin-right: 22px; }
.lang-switch { display: flex; gap: 2px; border: 1px solid var(--line-gold); border-radius: 30px; padding: 3px; }
.lang-switch a { font-size: 11px; letter-spacing: 1px; color: var(--text-soft); padding: 4px 8px; border-radius: 20px; }
.lang-switch a:hover { text-decoration: none; color: var(--gold); }
.lang-switch a[aria-current="true"] { background: var(--gold); color: var(--ink); font-weight: 600; }

@media (max-width: 760px) {
  .site-header .site-nav { margin: 0; }
  .lang-switch a { padding: 4px 7px; }
}

/* --- Interpretation v2: short answer, links, energy ---------------------- */
.result-answer { margin: 6px 0 10px; padding: 18px 22px; border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 12px; background: rgba(230, 197, 141, .05); animation: fade-up .7s ease both; animation-delay: .5s; }
.result-answer .eyebrow { margin-bottom: 6px; }
.result-answer p:last-child { margin: 0; color: var(--text); line-height: 1.8; }
.result-answer.is-lean_no, .result-answer.is-strong_no { border-left-color: #8f8aa6; }
.result-answer.is-unclear { border-left-color: #b9b3c9; }
.result-block { padding: 26px 0 4px; border-bottom: 1px solid var(--line); animation: fade-up .7s ease both; animation-delay: calc(.6s + var(--n) * .45s); }
.result-block p { color: var(--text-soft); line-height: 1.85; }
.link-cards { color: var(--gold); font-weight: 500; }
.daily-answer { color: var(--text); border-left: 3px solid var(--gold); padding: 6px 0 6px 14px; text-align: left; margin: 14px auto; max-width: 520px; }
.daily-element { font-size: 15px; }

/* Shuffle again */
.shuffle-form { text-align: center; margin-top: 12px; }
.shuffle-note { text-align: center; color: var(--gold); font-size: 14px; margin: 0 0 6px; }
.fan.is-shuffling .fan-card { animation: fan-gather .55s ease-in forwards; }
.fan.is-shuffled .fan-card { animation: fan-spread .6s ease-out both; }
@keyframes fan-gather { to { transform: translateX(calc((38 - var(--i)) * 1px)) rotate(0deg); opacity: .4; } }
@keyframes fan-spread { from { transform: rotate(0deg) translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fan.is-shuffling .fan-card, .fan.is-shuffled .fan-card { animation: none; }
}
