/* ============ XuanJi Pavilion — New Age cosmic overrides (EN only) ============
   Loaded after style.css. Co-Star-inspired: near-black cosmos, thin sans type,
   wide tracking, muted champagne + dusty lavender morandi accents. */

:root {
  /* editorial serif for long-form reading prose (NYT-magazine feel);
     UI chrome (nav, buttons, labels) stays on the sans stack below */
  --prose: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Book Antiqua", "Times New Roman", serif;
  --ink: #0a0a11;
  --ink-2: #12121c;
  --ink-3: #1a1a28;
  --gold: #c9b37e;            /* muted champagne, not temple gold */
  --gold-soft: #ddd0ae;
  --text: #eceaf2;
  --text-dim: #8f8ca0;
  --lav: #a89fd6;             /* dusty lavender secondary */
  --line: rgba(201, 179, 126, 0.16);
  --radius: 16px;
  --serif: "Inter", "Segoe UI", "Helvetica Neue", -apple-system, sans-serif;
}

body {
  font-weight: 300;
  letter-spacing: 0.015em;
  background: var(--ink);
}

/* ---- starfield ---- */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 25px 35px, rgba(255,255,255,0.9), transparent 40%),
    radial-gradient(1px 1px at 160px 90px, rgba(255,255,255,0.6), transparent 40%),
    radial-gradient(1.5px 1.5px at 310px 200px, rgba(214,206,255,0.8), transparent 40%),
    radial-gradient(1px 1px at 420px 60px, rgba(255,255,255,0.5), transparent 40%),
    radial-gradient(1px 1px at 90px 250px, rgba(255,244,214,0.7), transparent 40%),
    radial-gradient(1.5px 1.5px at 230px 320px, rgba(255,255,255,0.4), transparent 40%),
    radial-gradient(1px 1px at 370px 380px, rgba(214,206,255,0.55), transparent 40%);
  background-size: 460px 430px;
  opacity: 0.55;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 600px at 85% -5%, rgba(168,159,214,0.10), transparent 60%),
    radial-gradient(800px 500px at 0% 105%, rgba(201,179,126,0.07), transparent 60%);
}

/* ---- typography ---- */
.logo-text { font-weight: 300; letter-spacing: 0.3em; text-transform: uppercase; font-size: 18px; }
.logo-sub { letter-spacing: 0.35em; font-size: 10px; }
.logo-mark { font-size: 20px; opacity: 0.9; }

.nav-link { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 400; }
.lang-switch { font-size: 12px; letter-spacing: 0.1em; }

.hero-text h1 {
  font-weight: 200; font-size: 46px; letter-spacing: 0.02em; line-height: 1.25;
}
.hero-desc { font-weight: 300; }

.page-title { font-weight: 250; letter-spacing: 0.12em; font-size: 26px; text-transform: uppercase; }
.section-h { font-weight: 400; letter-spacing: 0.14em; font-size: 14px; text-transform: uppercase; color: var(--gold); }

.btn { letter-spacing: 0.18em; text-transform: uppercase; font-size: 13px; font-weight: 500; border-radius: 999px; }
.btn-gold { background: linear-gradient(135deg, #cbb98a, #a8925d); }

/* ---- surfaces: airier, softer ---- */
.card { padding: 32px; border-radius: var(--radius); background: rgba(18,18,28,0.82); backdrop-filter: blur(4px); }
.feature-card { background: rgba(18,18,28,0.82); }
.feature-card h3 { font-weight: 400; letter-spacing: 0.06em; }
.price-card { background: rgba(18,18,28,0.82); }
.guide-card { background: rgba(18,18,28,0.82); }

.tag-free, .tag-pay, .tag-half { letter-spacing: 0.1em; font-size: 9px; }

/* hero ring — thinner, lavender-tinted */
.bagua-ring { border-color: rgba(168,159,214,0.25); }
.bagua-ring span { color: rgba(221,208,174,0.8); font-size: 22px; }
.bagua-core { border-color: rgba(168,159,214,0.25); color: var(--gold-soft); font-size: 44px; background: radial-gradient(circle, rgba(168,159,214,0.10), transparent 70%); }

/* coins — antique, desaturated */
.coin {
  background: radial-gradient(circle at 32% 30%, #d8c9a2, #8f7d52 70%);
  border-color: #6d5f3e;
  box-shadow: inset 0 0 0 5px rgba(109,95,62,0.35), 0 6px 16px rgba(0,0,0,0.5);
}
.coin::after { background: var(--ink-2); border-color: #6d5f3e; }

.yao .seg { background: var(--gold); }
.yao.moving .seg { background: var(--lav); box-shadow: 0 0 10px rgba(168,159,214,0.8); }

.hex-glyph { color: var(--gold-soft); text-shadow: 0 0 24px rgba(201,179,126,0.35); }
.hex-name { font-weight: 300; letter-spacing: 0.04em; }

.luck-badge { border-radius: 999px; letter-spacing: 0.12em; font-size: 10px; text-transform: uppercase; padding: 3px 12px; }

/* alignment tint per level */
.align-5, .align-4 { border-color: #9fbf9a; color: #b9d6b4; }
.align-3 { border-color: var(--gold); color: var(--gold-soft); }
.align-2, .align-1 { border-color: var(--lav); color: #c3bbe8; }

/* question template chips */
.q-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.q-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
  font-size: 12.5px; color: var(--text-dim); cursor: pointer; transition: all 0.2s;
  background: transparent; font-family: inherit; letter-spacing: 0.02em;
}
.q-chip:hover { border-color: var(--gold); color: var(--gold-soft); }
.q-chip .qc-cat { color: var(--lav); margin-right: 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }

/* three-part reading structure */
.tri-label {
  display: inline-block; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--lav); border: 1px solid rgba(168,159,214,0.35); border-radius: 999px;
  padding: 2px 10px; margin-bottom: 6px;
}

/* AI reading */
.ai-card { border-color: rgba(168,159,214,0.35); }
.ai-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--lav);
  border: 1px solid rgba(168,159,214,0.4); border-radius: 999px; padding: 3px 12px; margin-bottom: 10px;
}
.ai-key-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.ai-key-row input { flex: 1; min-width: 240px; }
.ai-output { line-height: 1.9; }
.ai-output p { margin-bottom: 14px; }
.ai-output strong { color: var(--gold-soft); font-weight: 500; }
.ai-thinking { color: var(--text-dim); font-size: 14px; letter-spacing: 0.06em; }
.ai-thinking::after { content: "…"; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 33% { content: "."; } 66% { content: ".."; } 100% { content: "..."; } }

/* paywall CTA — soft breathing glow at the moment of peak curiosity */
.locked-cover .btn.pulse { animation: cta-breathe 2.6s ease-in-out infinite; }
@keyframes cta-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,179,126,0.0); transform: scale(1); }
  50% { box-shadow: 0 0 26px 2px rgba(201,179,126,0.35); transform: scale(1.02); }
}
.locked-cover p { line-height: 1.7; }

.culture-note { background: rgba(168,159,214,0.05); border-left-color: var(--lav); }
.culture-note .cn-tag { color: var(--lav); }

.term { border-bottom-color: var(--lav); }
.term::after { border-color: rgba(168,159,214,0.5); }

.site-footer { font-weight: 300; }

/* ---- editorial serif for reading prose ---- */
.analysis-text, .ai-output, .hero-desc, .page-subtitle,
.hex-ci, .qi-zen, .ji-q, .feature-card p, .guide-card p,
.price-card li, .legal-block p, .legal-block li,
.month-item, .echo-toast p, .culture-note, .center-card p {
  font-family: var(--prose);
}
.analysis-text { font-size: 16.5px; line-height: 1.95; letter-spacing: 0.012em; }
.ai-output { font-size: 16.5px; letter-spacing: 0.012em; }
.hero-desc { font-size: 17px; line-height: 1.85; }
.page-subtitle { font-size: 15.5px; }
.culture-note .cn-tag { font-family: var(--serif); }  /* the 📖 tag stays sans + tracked */
.qi-zen { font-size: 22px; }

/* ---- hero eyebrow ---- */
.hero-eyebrow {
  font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--lav); margin-bottom: 14px;
}

/* ---- Zen casting room: jade compass + 3D bronze coins ---- */
.casting-room {
  position: relative; overflow: hidden; border-radius: 14px;
  background:
    radial-gradient(650px 300px at 50% 120%, rgba(38, 66, 52, 0.35), transparent 70%),
    radial-gradient(500px 260px at 80% -20%, rgba(168,159,214,0.08), transparent 60%),
    #0c0f14;
  border: 1px solid var(--line);
  padding: 34px 26px;
  perspective: 700px;
}
.compass-disc {
  position: absolute; left: 50%; top: 50%; width: 340px; height: 340px;
  transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle, transparent 54%, rgba(120, 150, 130, 0.10) 55%, transparent 57%),
    radial-gradient(circle, transparent 39%, rgba(201, 179, 126, 0.12) 40%, transparent 42%),
    repeating-conic-gradient(rgba(160, 180, 165, 0.10) 0deg 1.6deg, transparent 1.6deg 45deg),
    radial-gradient(circle at 42% 38%, rgba(60, 90, 75, 0.30), rgba(16, 24, 20, 0.55) 70%);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.55), 0 0 60px rgba(60, 90, 75, 0.18);
  animation: compass-spin 90s linear infinite;
}
@keyframes compass-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.casting-room .cast-left { position: relative; z-index: 2; }
.casting-room .lines-built { position: relative; z-index: 2; }

.sfx-toggle {
  position: absolute; right: 12px; top: 12px; z-index: 3;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-dim); font-size: 13px; padding: 5px 9px; cursor: pointer;
}
.sfx-toggle:hover { border-color: var(--gold); }
.sfx-toggle.muted { opacity: 0.45; }

/* ---- Daily Qi dashboard: base styles live in style.css; EN flavor only ---- */
.qi-zen { font-weight: 250; font-style: italic; }
.qi-zen::before { content: "“"; color: var(--lav); }
.qi-zen::after { content: "”"; color: var(--lav); }
.qi-email-done { color: #b9d6b4; }
