/* ============================================================
   Eastern Decision Intelligence — Premium Mystical UI
   Design: Ink black + Gold leaf + Star field + Bagua
   ============================================================ */

:root {
  /* Core palette */
  --bg: #08080c;
  --bg-2: #0d0c14;
  --bg-3: #11101a;
  --paper: rgba(16, 14, 24, 0.92);
  --paper-soft: rgba(245, 236, 217, 0.04);
  --paper-warm: rgba(201, 162, 39, 0.03);

  /* Text */
  --ink: #f5ecd9;
  --muted: rgba(245, 236, 217, 0.62);
  --muted-soft: rgba(245, 236, 217, 0.38);

  /* Gold */
  --accent: #c9a227;
  --accent-bright: #e8c44a;
  --accent-soft: rgba(201, 162, 39, 0.12);
  --accent-glow: rgba(232, 196, 74, 0.15);

  /* Lines */
  --line: rgba(201, 162, 39, 0.10);
  --line-strong: rgba(201, 162, 39, 0.22);

  /* Semantic */
  --success: #a8e6c4;
  --danger: #e8a0a0;

  /* Effects */
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.50);
  --shadow-gold: 0 20px 60px rgba(201, 162, 39, 0.06);
  --radius: 24px;
  --radius-lg: 32px;
  --radius-sm: 16px;

  /* Fonts — Cinzel (Latin display serif) + Noto Serif SC (CJK serif) for headings,
     Inter (Latin sans) + system CJK sans for body. Two-family system, consistent application. */
  --font-display: 'Cinzel', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --font-cal: 'Ma Shan Zheng', 'Noto Serif SC', serif;

  /* Five Elements colors */
  --wu-wood: #4a7c59;
  --wu-fire: #c9762e;
  --wu-earth: #8b7355;
  --wu-gold: #c9a227;
  --wu-water: #2a4a6e;

  /* Silk noise texture — fractal noise SVG as data URI, super subtle */
  --silk-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Star Field Background
   ============================================================ */
.starfield {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(107, 78, 140, 0.08), transparent 50%),
    radial-gradient(ellipse at 85% 15%, rgba(201, 162, 39, 0.06), transparent 35%),
    radial-gradient(ellipse at 15% 70%, rgba(45, 106, 92, 0.05), transparent 40%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%);
}

.stars {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
}

.stars-layer-1 {
  background-image:
    radial-gradient(1px 1px at 23px 47px, rgba(245,236,217,0.5), transparent),
    radial-gradient(1px 1px at 107px 89px, rgba(245,236,217,0.3), transparent),
    radial-gradient(1px 1px at 201px 156px, rgba(232,196,74,0.4), transparent),
    radial-gradient(1px 1px at 67px 234px, rgba(245,236,217,0.25), transparent),
    radial-gradient(1px 1px at 289px 67px, rgba(245,236,217,0.35), transparent),
    radial-gradient(1px 1px at 345px 189px, rgba(232,196,74,0.3), transparent),
    radial-gradient(1px 1px at 134px 312px, rgba(245,236,217,0.2), transparent),
    radial-gradient(1px 1px at 278px 278px, rgba(245,236,217,0.4), transparent);
  background-size: 400px 400px;
  animation: starDrift 200s linear infinite;
}

.stars-layer-2 {
  background-image:
    radial-gradient(1.5px 1.5px at 50px 120px, rgba(245,236,217,0.4), transparent),
    radial-gradient(1.5px 1.5px at 180px 250px, rgba(232,196,74,0.3), transparent),
    radial-gradient(1.5px 1.5px at 310px 50px, rgba(245,236,217,0.25), transparent),
    radial-gradient(1.5px 1.5px at 90px 340px, rgba(245,236,217,0.3), transparent),
    radial-gradient(1.5px 1.5px at 250px 180px, rgba(232,196,74,0.2), transparent);
  background-size: 380px 380px;
  animation: starDrift 300s linear infinite reverse;
}

.stars-layer-3 {
  background-image:
    radial-gradient(0.5px 0.5px at 15px 15px, rgba(245,236,217,0.3), transparent),
    radial-gradient(0.5px 0.5px at 85px 65px, rgba(245,236,217,0.2), transparent),
    radial-gradient(0.5px 0.5px at 155px 105px, rgba(245,236,217,0.25), transparent),
    radial-gradient(0.5px 0.5px at 225px 175px, rgba(245,236,217,0.15), transparent),
    radial-gradient(0.5px 0.5px at 295px 225px, rgba(245,236,217,0.2), transparent);
  background-size: 320px 320px;
  animation: starTwinkle 4s ease-in-out infinite alternate;
}

@keyframes starDrift {
  from { transform: translateY(0); }
  to { transform: translateY(-400px); }
}

@keyframes starTwinkle {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

/* ============================================================
   Bagua Watermark
   ============================================================ */
.bagua-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  pointer-events: none;
  z-index: 0;
  color: var(--accent);
  opacity: 0.5;
  animation: baguaRotate 120s linear infinite;
}

@keyframes baguaRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================================
   Ambient Orbs
   ============================================================ */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.orb-gold {
  top: -60px;
  right: -40px;
  width: 320px;
  height: 320px;
  background: rgba(201, 162, 39, 0.10);
  animation: orbPulse 8s ease-in-out infinite alternate;
}

.orb-purple {
  bottom: 10%;
  left: -80px;
  width: 280px;
  height: 280px;
  background: rgba(107, 78, 140, 0.10);
  animation: orbPulse 10s ease-in-out infinite alternate-reverse;
}

@keyframes orbPulse {
  from { opacity: 0.3; transform: scale(1); }
  to { opacity: 0.5; transform: scale(1.1); }
}

/* ============================================================
   Base Elements
   ============================================================ */
img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.1;
  color: var(--ink);
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  max-width: 12ch;
  margin: 10px auto 0;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

/* ============================================================
   Shell / Layout
   ============================================================ */
.shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 72px;
}

/* ============================================================
   Cards (shared base)
   ============================================================ */
.hero-frame,
.card,
.mystic-card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 16, 28, 0.94), rgba(10, 9, 16, 0.92));
  box-shadow: var(--shadow), var(--shadow-gold);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.hero-frame::before,
.card::before,
.mystic-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--silk-noise), linear-gradient(135deg, rgba(201, 162, 39, 0.04), transparent 40%);
  pointer-events: none;
}

/* ============================================================
   Hero
   ============================================================ */
.hero-frame {
  border-radius: var(--radius-lg);
  padding: 28px 26px 30px;
  text-align: center;
  overflow: hidden;
}

.hero-frame::after {
  content: "";
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(232, 196, 74, 0.10), transparent 70%);
  pointer-events: none;
}

.hero-celestial {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  color: var(--accent);
  opacity: 0.7;
  animation: celestialFloat 6s ease-in-out infinite alternate;
}

@keyframes celestialFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-6px); }
}

.brand-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.brand-mark > div {
  display: grid;
  gap: 14px;
}

.brand-kicker, .eyebrow, .label, .mini-label {
  margin: 0;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-bright);
  font-family: var(--font-body);
  font-weight: 500;
}

.brand-kicker, .label, .mini-label {
  font-size: 0.74rem;
}

.brand-mark strong {
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.brand-mark strong .subtitle {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--muted);
}

.hero-copy {
  display: grid;
  gap: 14px;
  max-width: 860px;
  margin: 0 auto;
}

.eyebrow {
  font-size: 0.78rem;
}

.lede {
  max-width: 50ch;
  margin: 0 auto;
  font-size: 0.96rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ============================================================
   Content Grid
   ============================================================ */
.content-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 24px;
  align-items: start;
}

.content-grid-priority {
  position: relative;
  align-items: stretch;
}

.priority-column {
  display: grid;
  gap: 20px;
  min-width: 0;
  align-content: start;
}

.priority-stack, .story-stack {
  height: 100%;
}

.priority-stack {
  grid-template-rows: minmax(0, auto) 260px minmax(0, auto);
}

.story-stack {
  grid-template-rows: auto auto;
}

.priority-stack > .card,
.priority-stack > .mystic-card,
.story-stack > .mystic-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   Mystic Cards
   ============================================================ */
.mystic-card {
  border-radius: var(--radius);
  padding: 28px;
}

.card {
  border-radius: var(--radius);
  padding: 30px;
}

/* ============================================================
   Intake Card (Form)
   ============================================================ */
.intake-card {
  background:
    linear-gradient(180deg, rgba(18, 16, 28, 0.97), rgba(10, 9, 16, 0.97)),
    linear-gradient(135deg, var(--paper-warm), transparent);
  z-index: 2;
}

.intake-card-priority {
  border-color: var(--line-strong);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(201, 162, 39, 0.05),
    0 14px 50px rgba(201, 162, 39, 0.06);
}

.card-head {
  display: grid;
  gap: 12px;
}

.card-head-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.card-head-stack {
  margin-bottom: 22px;
}

.intake-title {
  max-width: 100%;
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  line-height: 1;
  white-space: nowrap;
}

.side-note {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
}

/* ============================================================
   Forms
   ============================================================ */
.signup-form, .checkout-panel {
  display: grid;
  gap: 18px;
}

.grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid.two > * {
  min-width: 0;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--accent-bright);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 15px 16px;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(245, 236, 217, 0.04), rgba(245, 236, 217, 0.02)),
    rgba(8, 8, 12, 0.80);
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

input::placeholder, textarea::placeholder {
  color: var(--muted-soft);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(232, 196, 74, 0.50);
  box-shadow: 0 0 0 4px rgba(232, 196, 74, 0.08), 0 8px 30px rgba(201, 162, 39, 0.06);
  transform: translateY(-1px);
}

textarea {
  min-height: 128px;
  resize: vertical;
}

/* ============================================================
   Combobox
   ============================================================ */
.search-field {
  align-content: start;
}

.combo-shell {
  position: relative;
}

.field-hint {
  margin-top: -2px;
  color: var(--muted-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

.field-hint strong {
  color: var(--accent-bright);
}

.search-picker {
  padding-right: 52px;
}

.search-picker[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.combo-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 30px;
  height: 30px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: var(--accent-bright);
  background: var(--accent-soft);
  cursor: pointer;
  transition: background 200ms ease, transform 200ms ease;
}

.combo-toggle:hover {
  background: rgba(201, 162, 39, 0.2);
}

.combo-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 196, 74, 0.12);
}

.combo-toggle[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.combo-toggle span {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.combo-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  gap: 6px;
  max-height: 260px;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(16, 14, 24, 0.98), rgba(8, 8, 12, 0.98));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.combo-option, .combo-empty {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 13px;
  text-align: left;
}

.combo-option {
  background: var(--paper-soft);
  color: var(--ink);
  cursor: pointer;
  transition: background 150ms ease;
}

.combo-option strong, .combo-option span {
  display: block;
}

.combo-option strong {
  font-size: 0.94rem;
  font-weight: 600;
}

.combo-option span {
  margin-top: 4px;
  color: var(--muted-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.combo-option:hover, .combo-option.is-active {
  background: var(--accent-soft);
}

.combo-empty {
  background: var(--paper-soft);
  color: var(--muted-soft);
  font-size: 0.86rem;
  line-height: 1.5;
}

.search-picker::-webkit-search-decoration,
.search-picker::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

/* Native date/time picker */
.native-picker {
  min-height: 54px;
  appearance: none;
  -webkit-appearance: none;
}

.native-picker::-webkit-date-and-time-value {
  min-height: 1.2em;
  text-align: left;
}

.native-picker::-webkit-datetime-edit,
.native-picker::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.native-picker::-webkit-calendar-picker-indicator {
  opacity: 0.8;
  cursor: pointer;
  filter: invert(75%) sepia(35%) saturate(600%) hue-rotate(30deg) brightness(95%) contrast(90%);
}

/* ============================================================
   Primary Button (Gold)
   ============================================================ */
.primary {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  color: #1a1205;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #e8c44a 0%, #c9a227 45%, #e8c44a 100%);
  box-shadow:
    0 16px 40px rgba(201, 162, 39, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
  position: relative;
  overflow: hidden;
}

.primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 600ms ease;
}

.primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 22px 50px rgba(201, 162, 39, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.primary:hover::before {
  transform: translateX(100%);
}

.primary:active {
  transform: translateY(0);
}

/* ============================================================
   Order Feed
   ============================================================ */
.order-feed-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.order-feed-shell {
  position: relative;
  flex: 1;
  min-height: 210px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent 0, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, black 12%, black 88%, transparent 100%);
}

.order-feed-track {
  display: grid;
  gap: 12px;
  will-change: transform;
}

.order-feed-track.is-animated {
  animation: order-feed-marquee var(--order-feed-duration, 20s) linear infinite;
}

.order-feed-shell:hover .order-feed-track.is-animated {
  animation-play-state: paused;
}

.order-feed-item {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper-soft);
  padding: 16px 17px;
}

.order-feed-item {
  display: grid;
  gap: 7px;
}

.order-feed-name {
  color: var(--ink);
  font-size: 1.02rem;
}

.order-feed-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

@keyframes order-feed-marquee {
  from { transform: translateY(0); }
  to { transform: translateY(calc(-1 * var(--order-feed-distance, 0px))); }
}

/* ============================================================
   Five Elements Color Bars
   ============================================================ */
.element-card {
  border-left: 4px solid var(--line-strong);
}

.wu-wood  { border-left-color: rgba(74, 124, 89, 0.55); }
.wu-fire  { border-left-color: rgba(201, 118, 46, 0.55); }
.wu-earth { border-left-color: rgba(139, 115, 85, 0.55); }
.wu-gold  { border-left-color: rgba(201, 162, 39, 0.55); }
.wu-water { border-left-color: rgba(42, 74, 110, 0.55); }

/* ============================================================
   Calligraphy Decoration
   ============================================================ */
.calligraphy-deco {
  position: absolute;
  font-family: var(--font-cal);
  font-size: 7rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.08;
  top: -10px;
  right: 8px;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

/* ============================================================
   Scroll Reveal Animation
   ============================================================ */
.reveal-pending {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-pending.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Magnetic Button
   ============================================================ */
.magnetic-btn {
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 200ms ease;
  will-change: transform;
}

/* ============================================================
   Benefits & Pathway
   ============================================================ */
.benefit-list, .pathway-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.benefit-list > div, .path-item {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper-soft);
  padding: 18px;
  transition: border-color 200ms ease, transform 200ms ease;
}

.benefit-list > div:hover, .path-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.benefit-list strong, .path-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.02rem;
}

.benefit-list p, .path-item p, .disclaimer-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.94rem;
}

.path-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.path-item span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  color: #1a1205;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(201, 162, 39, 0.20);
}

/* ============================================================
   Checkout Modal
   ============================================================ */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--checkout-viewport-height, 100vh);
  padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(4, 4, 8, 0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.checkout-panel {
  position: relative;
  width: min(100%, 620px);
  max-height: min(calc(var(--checkout-viewport-height, 100vh) - 44px), 760px);
  overflow: auto;
  margin: auto;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20, 18, 30, 0.98), rgba(10, 9, 16, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1;
  background: var(--paper-soft);
  cursor: pointer;
  touch-action: manipulation;
  transition: background 200ms ease, transform 200ms ease;
}

.modal-close:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.modal-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(232, 196, 74, 0.12);
}

body.modal-open {
  overflow: hidden;
}

.checkout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-right: 88px;
}

.checkout-header > div {
  min-width: 0;
}

.checkout-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-size: 0.84rem;
  line-height: 1.2;
}

.checkout-copy {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.94rem;
}

.paypal-shell {
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--paper-soft);
  border: 1px dashed var(--line-strong);
}

.paypal-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  color: var(--danger);
  font-size: 0.9rem;
  text-align: center;
}

.pricing-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
}

/* ============================================================
   PayPal Checkout Button — premium dark + gold treatment
   ============================================================ */
.paypal-pay-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 17px 24px;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  background:
    linear-gradient(180deg, rgba(26, 24, 37, 0.96) 0%, rgba(13, 12, 20, 0.98) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(201, 162, 39, 0.32),
    inset 0 1px 0 rgba(245, 236, 217, 0.05),
    0 14px 36px rgba(0, 0, 0, 0.42);
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, color 220ms ease;
  overflow: hidden;
}

/* Gold sheen sweep on hover */
.paypal-pay-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(232, 196, 74, 0.14), transparent);
  transform: translateX(-100%);
  transition: transform 700ms ease;
  pointer-events: none;
}

/* Subtle gold glow halo */
.paypal-pay-btn::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(232, 196, 74, 0.55), rgba(201, 162, 39, 0.12) 45%, rgba(232, 196, 74, 0.4));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0.7;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.paypal-pay-btn:hover {
  transform: translateY(-2px);
  color: var(--accent-bright);
  box-shadow:
    inset 0 0 0 1px rgba(232, 196, 74, 0.5),
    inset 0 1px 0 rgba(245, 236, 217, 0.08),
    0 22px 50px rgba(201, 162, 39, 0.18);
}

.paypal-pay-btn:hover::before {
  transform: translateX(100%);
}

.paypal-pay-btn:hover::after {
  opacity: 1;
}

.paypal-pay-btn:active {
  transform: translateY(0);
}

.paypal-pay-btn:disabled {
  cursor: wait;
  opacity: 0.85;
  transform: none;
}

/* PayPal wordmark — refined italic gold treatment */
.paypal-pay-text {
  position: relative;
  z-index: 1;
}

.paypal-wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  color: var(--accent-bright);
  letter-spacing: 0.02em;
  margin-left: 1px;
}

/* Hide text, show spinner when loading */
.paypal-pay-btn.loading .paypal-pay-text {
  visibility: hidden;
}

.paypal-pay-btn.loading::after {
  opacity: 0;
}

.paypal-pay-btn.loading {
  pointer-events: none;
}

.paypal-pay-btn.loading > .paypal-spinner {
  display: block;
}

/* Spinner — gold ring */
.paypal-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 2px solid rgba(232, 196, 74, 0.2);
  border-top-color: var(--accent-bright);
  animation: paypalSpin 700ms linear infinite;
  z-index: 2;
}

@keyframes paypalSpin {
  to { transform: rotate(360deg); }
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.pricing-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.pricing-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.pricing-highlight {
  color: var(--accent-bright);
  font-size: 1.3rem;
}

.pricing-note {
  font-size: 0.8rem;
  color: var(--muted-soft);
  font-weight: 400;
  margin-left: 2px;
}

.checkout-terms {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--muted-soft);
  line-height: 1.6;
  text-align: center;
}

.status {
  min-height: 28px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.status.error { color: var(--danger); }
.status.success { color: var(--success); }

/* ============================================================
   Hidden
   ============================================================ */
.hidden {
  display: none;
}

/* ============================================================
   Announcement Sidebar
   ============================================================ */
.announcement-toggle-btn {
  position: fixed;
  top: 250px;
  right: 20px;
  z-index: 901;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease;
  padding: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.announcement-toggle-btn .toggle-icon {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 10px solid var(--accent-bright);
  display: block;
  transition: transform 200ms ease;
}

.announcement-toggle-btn:hover {
  opacity: 0.7;
  transform: scale(1.2);
}

.announcement-toggle-btn.toggled .toggle-icon {
  transform: rotate(180deg);
}

.announcement-sidebar {
  position: fixed;
  top: 240px;
  right: 20px;
  z-index: 900;
  width: 340px;
  max-height: calc(100vh - 260px);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 300ms ease, opacity 300ms ease;
  overflow: hidden;
}

.announcement-sidebar.collapsed {
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  pointer-events: none;
}

.announcement-sidebar.hidden {
  display: none;
}

.announcement-content-wrapper {
  padding: 16px 20px 20px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.announcement-content-wrapper::-webkit-scrollbar {
  width: 4px;
}

.announcement-content-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.announcement-content-wrapper::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 2px;
}

.announcement-list {
  display: grid;
  gap: 12px;
}

.announcement-item {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  padding: 14px;
  transition: transform 200ms ease, border-color 200ms ease;
}

.announcement-item:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.announcement-item h4 {
  margin: 0 0 8px 0;
  font-size: 0.98rem;
  color: var(--accent-bright);
  font-weight: 600;
}

.announcement-item .announcement-body {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.announcement-item .announcement-body a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.announcement-item .announcement-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
}

.announcement-item .announcement-body strong {
  color: var(--ink);
}

/* ============================================================
   Navigation
   ============================================================ */
.site-nav {
  display: table;
  margin: 24px auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(18, 16, 28, 0.92), rgba(10, 9, 16, 0.90));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: fit-content;
  max-width: 100%;
  position: relative;
  z-index: 100;
  /* 确保在 hero 和 content-grid 之间 */
  margin-top: 24px;
  margin-bottom: 24px;
}

.site-nav.hidden {
  display: none;
}

.nav-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 24px;
  height: 20px;
}

.hamburger-icon span {
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: all 300ms ease;
}

.nav-toggle-btn[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle-btn[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle-btn[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-inner::-webkit-scrollbar {
  height: 0;
}

#nav-items-list {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item, #nav-home-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  transition: color 220ms ease, background 220ms ease, transform 220ms ease, box-shadow 220ms ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.nav-item:hover, #nav-home-link:hover {
  color: var(--ink);
  background: var(--accent-soft);
  border-color: var(--line-strong);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.nav-item.active, #nav-home-link.active {
  color: var(--ink) !important;
  font-weight: 600;
  background: var(--accent-soft) !important;
  border-color: var(--line-strong) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   Page Sections
   ============================================================ */
.page-section {
  animation: pageFadeIn 300ms ease forwards;
}

.page-section.hidden {
  display: none !important;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================================
   Master Page
   ============================================================ */
.master-page-body {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(18, 16, 28, 0.94), rgba(10, 9, 16, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px;
  min-height: 300px;
  color: var(--ink);
  line-height: 1.75;
  font-size: 1rem;
}

.master-page-body h1,
.master-page-body h2,
.master-page-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.master-page-body h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.master-page-body h2 { font-size: clamp(1.35rem, 2.3vw, 1.85rem); }
.master-page-body h3 { font-size: clamp(1.12rem, 1.8vw, 1.45rem); }

.master-page-body p {
  color: var(--muted);
  line-height: 1.78;
  margin-bottom: 1em;
}

.master-page-body img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 1em 0;
}

.master-page-body strong {
  color: var(--ink);
  font-weight: 600;
}

.master-page-body a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.back-button {
  align-self: flex-start;
  margin-top: 20px;
  font-size: 0.85rem;
  padding: 8px 16px;
  background: linear-gradient(180deg, rgba(26, 22, 38, 0.9), rgba(16, 14, 24, 0.9));
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   Nav Placeholder
   ============================================================ */
.nav-placeholder {
  height: 16px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .content-grid-priority {
    align-items: start;
  }

  .priority-stack, .story-stack {
    height: auto;
  }

  .priority-stack {
    grid-template-rows: minmax(0, auto) 260px minmax(0, auto);
  }

  .story-stack {
    grid-template-rows: auto;
  }

  .disclaimer-card {
    margin-top: 20px;
  }

  h1 {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 20px, 1180px);
    padding: 16px 0 56px;
  }

  .site-nav {
    position: static;
    margin: 0 auto 16px;
    display: table;
    width: fit-content;
    max-width: calc(100% - 40px);
    top: auto;
    left: auto;
    transform: none;
  }

  .nav-toggle-btn {
    display: none;
  }

  .nav-inner {
    display: flex;
    position: static;
    margin: 0;
    padding: 8px 12px;
    gap: 4px;
    flex-direction: row;
    background: none;
    border: none;
    box-shadow: none;
    min-width: auto;
  }

  .nav-inner.active {
    display: flex;
  }

  #nav-items-list {
    flex-direction: row;
    gap: 4px;
  }

  .nav-item {
    font-size: 0.82rem;
    padding: 7px 14px;
    width: auto;
    text-align: center;
  }

  .hero-frame, .card, .mystic-card {
    border-radius: var(--radius);
  }

  .hero-frame, .card, .mystic-card {
    padding-left: 20px;
    padding-right: 20px;
  }

  .checkout-header {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(100% - 56px);
    margin: 0 auto;
    padding-right: 0;
    text-align: center;
  }

  .checkout-header > div {
    text-align: center;
  }

  .grid.two {
    grid-template-columns: 1fr;
  }

  .bagua-watermark {
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100% - 16px);
  }

  .hero-frame > div {
    grid-column: 1 / -1;
  }

  .hero-frame {
    margin-bottom: 24px;
  }

  .page-section {
    margin-top: 24px;
  }

  .site-nav {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    margin: 0;
    padding: 0;
    max-width: calc(100vw - 32px);
    width: fit-content;
    height: fit-content;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible;
  }

  .nav-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: transparent;
    border: none;
  }

  .nav-toggle-btn {
    display: flex;
    background: transparent !important;
    border: none !important;
    color: var(--ink);
    cursor: pointer;
    padding: 10px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    box-shadow: none !important;
    outline: none !important;
  }

  .nav-toggle-btn:hover,
  .nav-toggle-btn:focus,
  .nav-toggle-btn:active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .nav-inner {
    display: none;
    padding: 8px;
    gap: 4px;
    flex-direction: column;
    border: none;
    background: transparent;
  }

  .nav-inner.active {
    display: flex;
  }

  #nav-items-list {
    flex-direction: column;
    gap: 4px;
  }

  .nav-item, #nav-home-link {
    font-size: 0.82rem;
    padding: 8px 14px;
    width: 100%;
    min-width: 160px;
    box-sizing: border-box;
    text-align: center !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--paper-soft);
    margin: 4px 0;
  }

  .master-page-body {
    padding: 20px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.94rem;
  }

  .back-button {
    font-size: 0.82rem;
    padding: 7px 14px;
  }

  .hero-frame, .card, .mystic-card {
    padding: 18px;
  }

  h1 {
    font-size: clamp(1.45rem, 6.5vw, 2rem);
    line-height: 1.22;
  }

  h2 {
    font-size: 1.8rem;
  }

  .intake-title {
    font-size: clamp(1.55rem, 8vw, 2rem);
    white-space: normal;
  }

  .checkout-modal {
    align-items: flex-start;
    padding: calc(max(12px, env(safe-area-inset-top)) + 8px) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .checkout-panel {
    gap: 14px;
    max-height: calc(var(--checkout-viewport-height, 100vh) - 24px);
    padding: 16px;
    border-radius: var(--radius-sm);
  }

  h3 {
    font-size: 1.18rem;
    line-height: 1.12;
  }

  .label {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
  }

  .checkout-copy, .status {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .paypal-shell {
    padding: 10px;
    border-radius: 12px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }

  .path-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .path-item span {
    width: 42px;
    height: 42px;
  }

  .checkout-badge {
    width: auto;
    max-width: 100%;
    text-align: center;
    white-space: nowrap;
    font-size: 0.82rem;
    padding: 7px 11px;
  }

  input, select, textarea, .primary {
    font-size: 16px;
  }

  .announcement-toggle-btn {
    top: auto;
    bottom: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
  }

  .announcement-sidebar.collapsed ~ .announcement-toggle-btn,
  .announcement-toggle-btn:has(~ .announcement-sidebar.collapsed) {
    bottom: 20px;
  }

  .announcement-sidebar {
    position: fixed;
    top: auto;
    bottom: 20px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: 65vh;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    transform: none;
    transition: transform 300ms ease, opacity 300ms ease;
  }

  .announcement-sidebar.collapsed {
    transform: translateY(calc(100% + 20px));
    opacity: 0;
    pointer-events: none;
  }

  .announcement-content-wrapper {
    padding: 16px;
    max-height: calc(65vh - 20px);
  }

  .announcement-list {
    gap: 10px;
  }

  .announcement-item {
    padding: 12px;
    border-radius: 10px;
  }

  .announcement-item h4 {
    font-size: 0.92rem;
    margin-bottom: 6px;
  }

  .announcement-item .announcement-body {
    font-size: 0.85rem;
    line-height: 1.55;
  }

  .bagua-watermark {
    width: 280px;
    height: 280px;
  }

  .hero-celestial {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 640px) and (max-height: 760px) {
  .checkout-modal {
    padding-top: calc(max(10px, env(safe-area-inset-top)) + 4px);
  }

  .checkout-panel {
    gap: 12px;
    max-height: calc(var(--checkout-viewport-height, 100vh) - 16px);
    padding: 14px;
  }

  .checkout-copy, .status {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .paypal-shell {
    padding: 8px;
  }
}

@media (max-width: 860px) {
  .nav-placeholder {
    height: 60px;
  }
}

@media (max-width: 640px) {
  .nav-placeholder {
    display: none;
  }
}

/* ============================================================
   Accessibility
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .stars-layer-1,
  .stars-layer-2,
  .stars-layer-3,
  .bagua-watermark,
  .orb-gold,
  .orb-purple,
  .hero-celestial {
    animation: none !important;
  }

  .reveal-pending {
    opacity: 1;
    transform: none;
    transition: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

*:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
}
