:root {
  --xuan: #1a1410;
  --xuan-card: #241c16;
  --xuan-surface: #2e241c;
  --gold: #d4ad6a;
  --gold-light: #f8edd0;
  --gold-dark: #9a7420;
  --vermillion: #d44a38;
  --vermillion-light: #e86a58;
  --paper: #f5f0e6;
  --paper-dark: #ede4d4;
  --paper-warm: #faf6ee;
  --ink: #2c2418;
  --ink-light: #5c4e3a;
  --ink-muted: #8a7964;
  /* 深色背景上的文字层级 */
  --text-primary: #f5f0e6;
  --text-secondary: #d9cdb8;
  --text-muted: #a89880;
  --wechat: #07c160;
  --wechat-dark: #059a4c;
  --shadow-gold: 0 0 24px rgba(212, 173, 106, 0.28);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font-display: 'Ma Shan Zheng', 'STKaiti', 'KaiTi', cursive;
  --font-body: 'Noto Serif SC', 'Songti SC', serif;
  --safe-bottom: max(env(safe-area-inset-bottom), 0.5rem);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--xuan);
  color: var(--text-secondary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid rgba(201, 160, 94, 0.3);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  background: rgba(26, 20, 16, 0.6);
  color: var(--paper);
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 160, 94, 0.2);
}

/* Background layers */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-gradient {
  background: linear-gradient(180deg, var(--xuan) 0%, var(--xuan-card) 50%, var(--xuan) 100%);
}
.bg-mountain {
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(212, 173, 106, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(212, 74, 56, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 80% 15%, rgba(212, 173, 106, 0.04) 0%, transparent 55%);
  opacity: 0.75;
}
.bg-vignette {
  background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(10, 6, 4, 0.55) 100%);
}
.bg-glow-top {
  position: fixed;
  inset: 0 0 auto 0;
  height: 8rem;
  background: linear-gradient(180deg, rgba(201, 160, 94, 0.12), transparent);
  z-index: 0;
  pointer-events: none;
}

/* Floating particles */
.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.particle {
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(201, 160, 94, 0.4);
  animation: glow-rise 5s ease-in-out infinite;
}
@keyframes glow-rise {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.2); opacity: 0.8; }
}
@keyframes ring-expand {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Typography */
.text-gradient-gold {
  font-family: var(--font-display);
  background: linear-gradient(180deg, #f5e6b8 0%, #c9a05c 50%, #8b6914 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.tracking-wide { letter-spacing: 0.15em; }

/* Layout */
.page-wrap {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  padding-top: 3.5rem;
  padding-bottom: calc(5rem + var(--safe-bottom));
}
.container {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.container-narrow { max-width: 48rem; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: 3.5rem;
  transition: background 0.3s;
}
.site-header.scrolled {
  background: rgba(26, 20, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 160, 94, 0.15);
}
.header-inner {
  max-width: 72rem;
  margin: 0 auto;
  height: 100%;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo svg { width: 2.25rem; height: 2.25rem; color: var(--gold); filter: drop-shadow(0 0 8px rgba(201,160,94,0.4)); }
.logo-text {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
}
.nav-desktop {
  display: none;
  gap: 1.25rem;
  align-items: center;
}
.nav-desktop a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-desktop a:hover, .nav-desktop a.active { color: var(--gold-light); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: all 0.2s;
  min-width: 10rem;
}
.btn-primary {
  background: var(--vermillion);
  color: #fff;
  box-shadow: 0 4px 16px rgba(194, 60, 42, 0.3);
}
.btn-primary:hover { background: var(--vermillion-light); transform: translateY(-1px); }
.btn-secondary {
  border: 1px solid rgba(201, 160, 94, 0.4);
  color: var(--gold);
  background: transparent;
}
.btn-secondary:hover { background: rgba(201, 160, 94, 0.1); border-color: var(--gold); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--xuan);
  font-weight: 600;
}
.btn-sm { padding: 0.45rem 1rem; font-size: 0.875rem; min-width: auto; }
.btn-block { width: 100%; }

/* Cards */
.card {
  border: 1px solid rgba(201, 160, 94, 0.2);
  background: rgba(36, 28, 22, 0.95);
  border-radius: 10px;
  padding: 1.25rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: rgba(201, 160, 94, 0.4);
  box-shadow: var(--shadow-gold);
}
.card-paper {
  background: var(--paper-warm);
  color: var(--ink);
  border: none;
  border-left: 4px solid var(--gold);
  border-right: 4px solid var(--gold);
}
.card-icon { width: 2.25rem; height: 2.25rem; color: var(--gold); }
.card-icon-red { color: var(--vermillion); }
.badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 173, 106, 0.35);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.04em;
}
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1rem 0;
}

/* Grid */
.grid-3 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* Hero */
.hero {
  min-height: calc(100svh - 3.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
}
.hero-icon {
  position: relative;
  width: 5rem; height: 5rem;
  border-radius: 50%;
  border: 1px solid rgba(201, 160, 94, 0.3);
  background: rgba(201, 160, 94, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  box-shadow: var(--shadow-gold);
}
.hero-icon svg { width: 3rem; height: 3rem; }
.hero-icon::before, .hero-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 160, 94, 0.5);
  animation: ring-expand 3s ease-out infinite;
}
.hero-icon::after { animation-delay: 1.5s; }
.hero h1 { font-size: clamp(2.5rem, 8vw, 3.75rem); }
.hero-sub { max-width: 28rem; color: var(--text-secondary); font-size: 1.05rem; line-height: 1.9; font-weight: 500; }
.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; max-width: 20rem; }
@media (min-width: 640px) {
  .hero-actions { flex-direction: row; max-width: none; width: auto; }
  .nav-desktop { display: flex; }
}

/* Sections */
.section { padding: 3rem 0; }
.section-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold-light);
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}
.reveal { animation: fade-up 0.7s ease both; }
.reveal-d1 { animation-delay: 0.1s; }
.reveal-d2 { animation-delay: 0.2s; }
.reveal-d3 { animation-delay: 0.3s; }

/* Feature card link */
.feature-card { display: block; height: 100%; }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 0.5rem 0;
  letter-spacing: 0.06em;
}
.feature-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.75; }
.feature-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Page header */
.page-hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--gold-light);
  letter-spacing: 0.12em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.page-hero p { color: var(--text-secondary); margin-top: 0.5rem; font-weight: 500; }

/* Pricing tiers */
.tier-grid { display: grid; gap: 0.75rem; }
.tier-card {
  border: 1px solid rgba(212, 173, 106, 0.28);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  background: rgba(36, 28, 22, 0.92);
}
.tier-card:hover, .tier-card.selected {
  border-color: var(--gold);
  background: rgba(212, 173, 106, 0.1);
  box-shadow: 0 0 0 1px rgba(212, 173, 106, 0.15);
}
.tier-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}
.tier-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.5;
}
.tier-card.selected .tier-name { color: var(--gold-light); }
.tier-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--vermillion-light);
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.tier-price small { font-size: 0.85rem; color: var(--gold); }

/* Result panels */
.result-panel {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 10px;
  background: var(--paper-warm);
  color: var(--ink);
  border-left: 4px solid var(--gold);
  line-height: 1.9;
}
.result-panel h3 {
  font-family: var(--font-display);
  color: var(--gold-dark);
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}
.luck-tag {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.luck-good { background: #e8f5e9; color: #2e7d32; }
.luck-mid { background: #fff8e1; color: #f57f17; }
.luck-bad { background: #ffebee; color: #c62828; }

/* Almanac */
.almanac-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.almanac-item {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(201, 160, 94, 0.06);
  border: 1px solid rgba(201, 160, 94, 0.15);
}
.almanac-item .label { font-size: 0.8rem; color: var(--ink-muted); }
.almanac-item .value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  margin-top: 0.25rem;
}

/* Bottom nav (mobile) */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  background: rgba(36, 28, 22, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(201, 160, 94, 0.2);
  padding-bottom: var(--safe-bottom);
}
.bottom-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 0.5rem 0.25rem 0;
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.bottom-nav a.active { color: var(--gold-light); }
.bottom-nav svg { width: 1.25rem; height: 1.25rem; }
@media (min-width: 768px) { .bottom-nav { display: none; } }

/* Payment modal — 与微信收款码绿白配色衔接 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 6, 4, 0.82);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  max-width: 22rem;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  animation: fade-up 0.3s ease;
}
.modal-wechat-bar {
  background: var(--wechat);
  color: #fff;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.modal h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.08em;
}
.modal-desc {
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-light);
  margin-top: 0.35rem;
  font-weight: 500;
}
.modal-amount {
  text-align: center;
  font-family: var(--font-display);
  font-size: 2.75rem;
  color: var(--ink);
  margin: 0.5rem 0 0.75rem;
  letter-spacing: 0.04em;
}
.modal-amount small { font-size: 1rem; color: var(--ink-light); font-weight: 500; }
.modal-order {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink);
  background: #f5f5f5;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  word-break: break-all;
  font-weight: 500;
}
.qr-wrap {
  background: #fff;
  border-radius: 10px;
  padding: 0.5rem;
  margin: 0 auto 1rem;
  width: fit-content;
  border: 1px solid #e8e8e8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.qr-wrap img { width: 210px; height: 210px; object-fit: contain; }
.modal-hint {
  font-size: 0.875rem;
  color: var(--ink);
  text-align: center;
  line-height: 1.75;
  margin-bottom: 1rem;
  font-weight: 500;
}
.modal-hint strong {
  color: var(--wechat-dark);
  font-weight: 700;
}
.modal-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.modal-actions .btn-primary {
  background: var(--wechat);
  box-shadow: 0 4px 14px rgba(7, 193, 96, 0.35);
}
.modal-actions .btn-primary:hover { background: var(--wechat-dark); }
.modal-actions .btn-secondary {
  border-color: #ddd;
  color: var(--ink-light);
}
.modal-actions .btn-secondary:hover {
  background: #f5f5f5;
  border-color: #ccc;
}
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  color: var(--ink-muted);
  font-size: 1.5rem;
  line-height: 1;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
  border-top: 1px solid rgba(201, 160, 94, 0.1);
  font-size: 0.875rem;
}
.site-footer p { color: var(--text-muted); line-height: 2; margin: 0.25rem 0; }
.disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 1rem;
}

/* Form groups */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}
.form-row { display: grid; gap: 0.75rem; grid-template-columns: 1fr 1fr; }

/* Click-to-select chips (祈福等) */
.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.chip-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(212, 173, 106, 0.32);
  background: rgba(36, 28, 22, 0.9);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}
.chip-btn:hover {
  border-color: var(--gold);
  background: rgba(201, 160, 94, 0.08);
}
.chip-btn.selected {
  border-color: var(--gold);
  background: rgba(201, 160, 94, 0.15);
  color: var(--gold-light);
  box-shadow: 0 0 0 1px rgba(201, 160, 94, 0.25);
}
.chip-btn.wish-chip {
  border-radius: 10px;
  text-align: left;
  flex: 1 1 calc(50% - 0.25rem);
  min-width: calc(50% - 0.25rem);
  line-height: 1.5;
  padding: 0.65rem 0.85rem;
}
@media (min-width: 480px) {
  .chip-btn.wish-chip { flex: 1 1 calc(33.333% - 0.34rem); min-width: calc(33.333% - 0.34rem); }
}
.selected-name {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: rgba(201, 160, 94, 0.1);
  border: 1px solid rgba(201, 160, 94, 0.25);
  color: var(--gold-light);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}
.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Meditation player */
.meditation-player {
  text-align: center;
  padding: 2rem;
}
.meditation-ring {
  width: 10rem; height: 10rem;
  border-radius: 50%;
  border: 2px solid rgba(201, 160, 94, 0.3);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.meditation-ring.playing {
  animation: ring-expand 4s ease-in-out infinite;
}
.timer-display {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
}

/* Incense animation */
.incense-sticks {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 0;
}
.incense-stick {
  width: 4px;
  height: 80px;
  background: linear-gradient(180deg, #8b6914, #c9a05c);
  border-radius: 2px;
  position: relative;
}
.incense-stick::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--vermillion);
  box-shadow: 0 0 12px var(--vermillion);
  animation: glow-rise 2s ease-in-out infinite;
}
.incense-smoke {
  position: absolute;
  top: -20px;
  left: 50%;
  width: 20px; height: 40px;
  background: radial-gradient(ellipse, rgba(200,200,200,0.3), transparent);
  animation: glow-rise 3s ease-in-out infinite;
  pointer-events: none;
}

/* Utility */
.text-gold { color: var(--gold-light); font-weight: 600; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none !important; }
.space-y > * + * { margin-top: 1rem; }
