/* ============================================================
   Moonlit — 夜空主题设计系统
   深空紫 + 月光金，玻璃拟态卡片，全站统一
   ============================================================ */

:root {
  --bg: #0d0b1a;
  --bg2: #12102a;
  --panel: #171431;
  --line: #2c2760;
  --line-soft: #3a3570;
  --gold: #d4af37;
  --gold-soft: #f0d98c;
  --gold-deep: #a8831f;
  --purple: #8b7bd8;
  --ink: #e8e4f5;
  --text: #e8e4f5;
  --muted: #9a94b8;
  --danger: #ff9d9d;
  --radius: 16px;
  --card-w: 120px;
  --card-h: 180px; /* 2:3 — matches the painted card art exactly */
  --shadow: 0 10px 40px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(1200px 600px at 50% -10%, #1c1840 0%, transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* twinkling star background */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 68% 8%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 34%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 32% 66%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 82%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 8% 78%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 62%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 44% 12%, #fff 50%, transparent 51%);
  opacity: .7;
  animation: starTwinkle 6s ease-in-out infinite alternate;
}
@keyframes starTwinkle { from { opacity: .55; } to { opacity: .85; } }

/* ---------------- header / hero ---------------- */
.site-header { position: relative; z-index: 2; }
.hero { text-align: center; padding: 2.6rem 1rem 1.2rem; position: relative; overflow: hidden; }
.moon {
  width: 92px; height: 92px; margin: 0 auto .9rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #fffbe8 0%, #f5e6b3 38%, #d9bd76 68%, #b9974f 100%);
  box-shadow: 0 0 40px rgba(240,217,140,.55), 0 0 110px rgba(240,217,140,.22);
  position: relative;
  animation: moonGlow 5s ease-in-out infinite alternate;
}
.moon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 68% 60%, rgba(160,130,70,.35) 0 8%, transparent 9%),
    radial-gradient(circle at 55% 72%, rgba(160,130,70,.28) 0 5%, transparent 6%),
    radial-gradient(circle at 74% 38%, rgba(160,130,70,.3) 0 6%, transparent 7%);
}
@keyframes moonGlow {
  from { box-shadow: 0 0 34px rgba(240,217,140,.45), 0 0 90px rgba(240,217,140,.18); }
  to { box-shadow: 0 0 52px rgba(240,217,140,.68), 0 0 130px rgba(240,217,140,.3); }
}
.hero h1 {
  color: var(--gold); font-size: 2.7rem; margin: 0; letter-spacing: 6px;
  text-shadow: 0 2px 24px rgba(212,175,55,.35);
}
.tagline { color: var(--muted); font-style: italic; margin: .5rem 0 0; font-size: 1.02rem; }
.hero-badges { display: flex; gap: .6rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.hero-badges span {
  font-size: .78rem; font-family: Arial, sans-serif; letter-spacing: 1px;
  color: var(--gold-soft); border: 1px solid var(--line-soft); background: rgba(23,20,49,.7);
  padding: .32rem .9rem; border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ---------------- sticky tab nav ---------------- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap;
  padding: .7rem 1rem;
  background: rgba(13,11,26,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212,175,55,.18);
}
.navbtn {
  background: rgba(20,16,40,.6); border: 1px solid rgba(212,175,55,.28); color: #e8dcc3;
  border-radius: 999px; padding: .5rem 1.15rem; font-size: .92rem; cursor: pointer;
  font-family: Georgia, serif; text-decoration: none;
  transition: all .2s ease; white-space: nowrap;
}
.navbtn:hover { border-color: var(--gold); box-shadow: 0 0 14px rgba(212,175,55,.35); transform: translateY(-1px); }
.navbtn.active {
  background: linear-gradient(160deg, var(--gold), var(--gold-deep));
  color: #1a1405; border-color: var(--gold); font-weight: bold;
  box-shadow: 0 4px 18px rgba(212,175,55,.4);
}
.count-badge {
  background: var(--gold); color: #1a1430; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px;
  font-family: Arial, sans-serif;
}
.navbtn.active .count-badge { background: #1a1430; color: var(--gold); }

.demo-badge {
  display: inline-block; margin: .8rem auto 0;
  border: 1px solid var(--gold); color: var(--gold);
  font-size: .75rem; letter-spacing: 1px;
  padding: .25rem .8rem; border-radius: 999px;
  font-family: Arial, sans-serif;
}
.site-header .demo-badge { display: table; }

/* ---------------- layout ---------------- */
main { max-width: 780px; margin: 0 auto; padding: 1rem 1rem 4rem; position: relative; z-index: 1; }
.view { animation: viewIn .35s ease; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); } }

.toolbar { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin: 1rem 0 .2rem; }
.toolbar .navbtn { font-size: .85rem; padding: .42rem 1rem; }

.panel {
  background: linear-gradient(180deg, rgba(30,26,64,.92), rgba(23,20,49,.88));
  border: 1px solid var(--line);
  border-top: 1px solid rgba(212,175,55,.35);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.panel h2 {
  color: var(--gold-soft); font-size: 1.18rem; margin: 0 0 .5rem;
  display: flex; align-items: center; gap: .5rem;
}
.panel h2::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, rgba(212,175,55,.4), transparent);
}
.panel h3 { color: var(--gold-soft); font-size: 1.02rem; margin: 1.4rem 0 .7rem; }
.hint { color: var(--muted); font-size: .9rem; font-family: Arial, sans-serif; line-height: 1.6; }
.hint-inline { color: var(--muted); font-size: .82rem; font-family: Arial, sans-serif; }

/* ---------------- buttons ---------------- */
.cta {
  display: block; width: 100%; padding: 1rem; font-size: 1.08rem;
  font-family: Georgia, serif; cursor: pointer;
  background: linear-gradient(160deg, #e8c95c, var(--gold) 45%, var(--gold-deep));
  color: #1a1405; border: none; border-radius: 12px; font-weight: bold;
  box-shadow: 0 6px 22px rgba(212,175,55,.35), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .15s ease, filter .15s ease;
}
.cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.cta:active { transform: translateY(1px); }
.cta:disabled { opacity: .5; cursor: wait; transform: none; }

.ghost {
  margin-top: 1rem; background: rgba(255,255,255,.03); border: 1px solid var(--line-soft);
  color: var(--muted); border-radius: 10px; padding: .62rem 1.25rem;
  cursor: pointer; font-family: Georgia, serif; font-size: .95rem;
  transition: all .2s ease;
}
.ghost:hover { border-color: var(--gold); color: var(--text); background: rgba(212,175,55,.07); }
.ghost.danger:hover { border-color: var(--danger); color: var(--danger); background: rgba(255,100,100,.06); }

/* ---------------- inputs ---------------- */
textarea, input[type="text"], input[type="number"], input[type="email"],
input[type="password"], select {
  width: 100%; background: #0f0d22; color: var(--text);
  border: 1px solid var(--line-soft); border-radius: 10px;
  padding: .75rem .9rem; font-size: 1rem; font-family: Georgia, serif;
  transition: border-color .2s ease, box-shadow .2s ease;
}
textarea { resize: vertical; }
textarea:focus, input:focus, select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,.15);
}
select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23d4af37' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.2rem;
}
input[type="number"]::-webkit-inner-spin-button { opacity: .4; }

/* ---------------- birth form ---------------- */
.birth-form { display: flex; flex-direction: column; gap: 1.05rem; margin-top: .6rem; }
.form-row { display: flex; flex-direction: column; gap: .5rem; }
.form-label { color: var(--gold-soft); font-size: .95rem; letter-spacing: 1px; }
.pill-group { display: flex; gap: .55rem; flex-wrap: wrap; }
.pill { cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-block; padding: .5rem 1.3rem; border-radius: 999px;
  border: 1px solid var(--line-soft); color: var(--muted);
  font-family: Arial, sans-serif; font-size: .92rem;
  transition: all .2s ease; background: rgba(255,255,255,.02);
}
.pill input:checked + span {
  border-color: var(--gold); color: #1a1405; font-weight: bold;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  box-shadow: 0 3px 12px rgba(212,175,55,.3);
}
.pill.check span { padding: .5rem .9rem; }
.date-inputs { display: flex; gap: .6rem; }
.date-inputs > * { flex: 1; min-width: 0; }
.form-error {
  color: var(--danger); font-size: .9rem; margin: 0;
  font-family: Arial, sans-serif;
  background: rgba(255,100,100,.07); border: 1px solid rgba(255,100,100,.3);
  border-radius: 10px; padding: .6rem .9rem;
}

/* ---------------- spreads ---------------- */
.spreads { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; margin-top: .8rem; }
.spread-btn {
  cursor: pointer; text-align: left;
  background: rgba(15,13,34,.8); color: var(--text);
  border: 1px solid var(--line-soft); border-radius: 12px; padding: .95rem;
  display: flex; flex-direction: column; gap: .3rem;
  font-family: Georgia, serif; transition: all .22s ease;
}
.spread-btn:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.spread-btn.selected {
  border-color: var(--gold); background: #1d1940;
  box-shadow: 0 0 16px rgba(212,175,55,.28), inset 0 0 20px rgba(212,175,55,.06);
}
.spread-name { color: var(--gold-soft); font-size: 1rem; }
.spread-desc { color: var(--muted); font-size: .8rem; font-family: Arial, sans-serif; line-height: 1.5; }

/* ---- card table : moonlit deluxe ---- */
.table { position: relative; display: flex; gap: 1.2rem; align-items: flex-start; margin-top: 1rem; flex-wrap: wrap; }
.table::before {
  content: ""; position: absolute; width: 460px; height: 460px; left: 50%; top: 46%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(139,123,216,.18), rgba(212,175,55,.05) 45%, transparent 68%);
  pointer-events: none;
}
.draw-fx { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.mote {
  position: absolute; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, #ffedb0 0%, rgba(212,175,55,.65) 40%, transparent 70%);
  animation: moteFloat linear infinite;
}
@keyframes moteFloat {
  0% { transform: translateY(16px) scale(.7); opacity: 0; }
  25% { opacity: .9; }
  70% { opacity: .55; }
  100% { transform: translateY(-120px) scale(1); opacity: 0; }
}

.deck { position: relative; width: var(--card-w); height: var(--card-h); cursor: pointer; flex-shrink: 0; z-index: 2; }
.deck-card {
  position: absolute; inset: 0; border-radius: 10px;
  background:
    radial-gradient(circle at 50% 36%, rgba(240,217,140,.22), transparent 52%),
    repeating-linear-gradient(45deg, #241f4d 0 8px, #2c2760 8px 16px);
  border: 2px solid var(--gold);
  box-shadow: 4px 4px 0 #1a1735, 8px 8px 0 #121024;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.deck-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(105deg, transparent 42%, rgba(255,240,200,.16) 50%, transparent 58%);
  background-size: 260% 100%;
  animation: shimmer 3.4s linear infinite;
}
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.deck-card::after { content: "🌙"; font-size: 2rem; filter: drop-shadow(0 0 6px rgba(240,217,140,.7)); }
.deck.inviting .deck-card { animation: deckBreathe 2.4s ease-in-out infinite; }
@keyframes deckBreathe {
  0%, 100% { transform: translateY(0); box-shadow: 4px 4px 0 #1a1735, 8px 8px 0 #121024, 0 0 0 rgba(212,175,55,0); }
  50% { transform: translateY(-7px); box-shadow: 4px 11px 0 #1a1735, 8px 15px 0 #121024, 0 0 28px rgba(212,175,55,.5); }
}
.deck.shuffling { pointer-events: none; }
.deck.shuffling .deck-card { animation: shuffleJit .13s linear infinite; }
@keyframes shuffleJit {
  0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-5px,3px) rotate(-2.5deg); }
  50% { transform: translate(4px,-3px) rotate(2deg); } 75% { transform: translate(-3px,-2px) rotate(-1deg); }
  100% { transform: translate(0,0) rotate(0); }
}
#deck-left {
  position: absolute; bottom: -1.7rem; left: 50%; transform: translateX(-50%);
  color: var(--gold-soft); background: rgba(13,11,26,.8); border: 1px solid var(--line-soft);
  font-size: .72rem; font-family: Arial, sans-serif; padding: .15rem .6rem; border-radius: 999px;
  white-space: nowrap;
}

.drawn { display: flex; gap: 1rem; flex-wrap: wrap; flex: 1; z-index: 1; }
.draw-slot { display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.pos-tag {
  font-size: .72rem; color: var(--gold-soft); letter-spacing: 3px; font-family: Arial, sans-serif;
  opacity: 0; animation: fadeUp .5s .45s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.draw-progress { color: var(--gold); font-size: .85rem; font-family: Arial, sans-serif; letter-spacing: 1px; }

.tarot-card { width: var(--card-w); height: var(--card-h); perspective: 700px; cursor: pointer; transition: transform .25s ease; }
.tarot-card:not(.revealed):hover { transform: translateY(-10px); filter: drop-shadow(0 10px 16px rgba(212,175,55,.35)); }
.tarot-card .inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .7s cubic-bezier(.3,.7,.3,1.15); transform-style: preserve-3d;
}
.tarot-card.revealed { animation: revealGlow .9s ease; cursor: default; }
.tarot-card.revealed .inner { transform: rotateY(180deg); filter: drop-shadow(0 8px 18px rgba(212,175,55,.28)); }
@keyframes revealGlow {
  0% { filter: drop-shadow(0 0 0 rgba(212,175,55,0)); }
  40% { filter: drop-shadow(0 0 26px rgba(255,220,130,.95)); }
  100% { filter: drop-shadow(0 0 10px rgba(212,175,55,.3)); }
}
.face {
  position: absolute; inset: 0; border-radius: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: .5rem; text-align: center;
}
.face.back {
  background:
    radial-gradient(circle at 50% 34%, rgba(240,217,140,.3), transparent 55%),
    radial-gradient(circle at 50% 115%, #3d3172, transparent 70%),
    repeating-linear-gradient(45deg, #241f4d 0 8px, #2b2560 8px 16px);
  border: 2px solid var(--gold); font-size: 2rem;
  box-shadow: inset 0 0 0 5px #141126, inset 0 0 22px rgba(212,175,55,.35);
}
.face.back::before {
  content: ""; position: absolute; inset: 10px;
  border: 1px solid rgba(212,175,55,.55); border-radius: 6px; pointer-events: none;
}
.face.front {
  background: #141126; transform: rotateY(180deg);
  border: 2px solid var(--gold);
  box-shadow: inset 0 0 0 4px rgba(212,175,55,.35);
  padding: 0; overflow: hidden; justify-content: flex-start;
}
.card-art { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.face.front.reversed-card .card-art { transform: rotate(180deg); }
.card-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(8,6,20,.94) 55%);
  padding: 1.4rem .4rem .45rem; pointer-events: none;
}
.face.front .cname { color: var(--gold-soft); font-size: .78rem; font-weight: bold; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.face.front .orientation {
  color: #cfc8ec; font-size: .68rem; margin-top: .15rem; font-style: italic;
  font-family: Arial, sans-serif; text-shadow: 0 1px 4px rgba(0,0,0,.8);
}
.face.front.reversed-card .orientation { color: #f0a8b8; }

.spark {
  position: fixed; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle, #fff3c4 0%, #e9c86a 45%, transparent 72%);
  pointer-events: none; z-index: 99;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- reading ---- */
.cards-summary { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip {
  border: 1px solid var(--gold); border-radius: 999px;
  padding: .32rem .85rem; font-size: .85rem; color: var(--gold-soft);
  font-family: Arial, sans-serif; background: rgba(212,175,55,.06);
}
.reading {
  margin-top: 1.2rem; line-height: 1.8; font-size: 1.02rem;
  border-left: 3px solid var(--gold); padding: .2rem 0 .2rem 1.1rem;
  white-space: pre-wrap;
  background: linear-gradient(90deg, rgba(212,175,55,.05), transparent 60%);
  border-radius: 0 10px 10px 0;
}
.reading.loading { color: var(--muted); font-style: italic; }

footer { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 2.5rem; font-family: Arial, sans-serif; line-height: 1.8; }
footer a { color: var(--gold); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 520px) {
  :root { --card-w: 100px; --card-h: 150px; }
  .hero h1 { font-size: 2.1rem; letter-spacing: 4px; }
  .panel { padding: 1.15rem; }
}

/* ---- 牌鉴 gallery ---- */
.gallery-group { color: var(--gold-soft); font-size: 1rem; margin: 1.3rem 0 .7rem; letter-spacing: 2px; }
.gallery-group:first-child { margin-top: .6rem; }
.gallery-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: .7rem; }
.gallery-item {
  cursor: pointer; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #141126;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.gallery-item:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: 0 8px 20px rgba(212,175,55,.3); }
.gallery-item img { width: 100%; aspect-ratio: 2/3; object-fit: cover; display: block; }
.gallery-name {
  font-size: .62rem; color: var(--muted); text-align: center;
  padding: .3rem .15rem; font-family: Arial, sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- modals ---- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,6,18,.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal[hidden] { display: none; }
.modal-card {
  position: relative; max-width: 340px; width: 100%; max-height: 92vh; overflow-y: auto;
  background: linear-gradient(180deg, #1e1a40, var(--panel));
  border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 1.3rem; text-align: center;
  animation: modalIn .3s cubic-bezier(.2,.8,.25,1);
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
@keyframes modalIn { from { transform: translateY(24px) scale(.96); opacity: 0; } }
.modal-close {
  position: absolute; top: .5rem; right: .7rem; z-index: 2;
  background: rgba(0,0,0,.3); border: 1px solid var(--line-soft); color: var(--muted);
  font-size: 1rem; cursor: pointer; padding: .25rem .55rem; border-radius: 50%;
}
.modal-close:hover { color: var(--gold); border-color: var(--gold); }
.modal-art {
  width: 180px; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 8px; border: 2px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.modal-name { color: var(--gold-soft); font-size: 1.3rem; margin: .8rem 0 .2rem; }
.modal-arcana { margin-bottom: .6rem; }
.modal-meaning { text-align: left; font-size: .92rem; line-height: 1.65; margin: .5rem 0; }
#modal-up { color: var(--text); }
#modal-rev { color: var(--muted); }

.pay-methods { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.pay-methods .cta { margin-top: 0; }
#qr { margin: 12px 0; display: flex; justify-content: center; }

/* ---------- history panel (tarot) ---------- */
#history-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; text-align: left; }
.history-item {
  background: rgba(20,16,40,.6); border: 1px solid rgba(212,175,55,.25);
  border-radius: 12px; overflow: hidden; transition: border-color .2s;
}
.history-item:hover { border-color: rgba(212,175,55,.5); }
.history-item summary { padding: 12px 14px; cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.history-item summary::-webkit-details-marker { display: none; }
.history-item summary:hover { background: rgba(212,175,55,.08); }
.history-q { font-weight: 600; color: #f0e6d2; }
.history-meta { font-size: 12px; color: var(--muted); font-family: Arial, sans-serif; }
.history-body { padding: 0 14px 14px; }
.history-cards { font-size: 13px; color: var(--gold); margin-bottom: 10px; line-height: 1.8; }

/* ---- 每日一牌 ---- */
.daily-wrap { display: flex; gap: 1.3rem; align-items: flex-start; }
.daily-art {
  width: 150px; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line-soft);
  box-shadow: 0 8px 24px rgba(0,0,0,.5); flex-shrink: 0;
  transition: transform .3s ease;
}
.daily-art:hover { transform: scale(1.03) rotate(-1deg); }
.daily-text { flex: 1; min-width: 0; }
.daily-name { font-size: 1.2rem; color: var(--gold); letter-spacing: 1px; }
.daily-meaning { color: var(--text); margin: .5rem 0; line-height: 1.7; }
.daily-fortune { color: var(--gold-soft); line-height: 1.7; margin-bottom: .8rem; }
@media (max-width: 560px) {
  .daily-wrap { flex-direction: column; align-items: center; text-align: center; }
  .daily-art { width: 170px; }
}

/* ---- 分享图 ---- */
.share-row { margin-top: 1rem; text-align: center; display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.share-row .ghost { margin-top: 0; }
.share-modal-card { max-width: 420px; text-align: center; }
.share-preview { width: 100%; border-radius: 10px; border: 1px solid var(--line-soft); margin-bottom: 1rem; }
.share-actions { display: flex; gap: .7rem; justify-content: center; margin-bottom: .6rem; flex-wrap: wrap; }
.share-actions .cta { width: auto; padding: .7rem 1.4rem; font-size: .95rem; margin-top: 0; }
.share-actions .ghost { margin-top: 0; }
.detail-link { display: inline-block; margin-top: .9rem; color: var(--gold-soft); font-size: .85rem; text-decoration: none; border-bottom: 1px dotted var(--line-soft); }
.detail-link:hover { color: var(--gold); }

/* ---- 登录 / 注册 ---- */
.auth-card { max-width: 360px; }
.auth-tabs { display: flex; gap: .5rem; justify-content: center; margin: .8rem 0 1rem; }
.auth-tab {
  flex: 1; padding: .55rem; border-radius: 10px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: .95rem;
  font-family: Georgia, serif; transition: all .2s;
}
.auth-tab.active { border-color: var(--gold); color: var(--gold-soft); background: rgba(212,175,55,.08); }
#auth-form { display: flex; flex-direction: column; gap: .7rem; margin-bottom: .8rem; }
#auth-form input[hidden] { display: none; }
.auth-code-row { display: flex; gap: .5rem; }
.auth-code-row[hidden] { display: none; }
.auth-code-row input { flex: 1; min-width: 0; }
.auth-code-row .ghost { white-space: nowrap; padding: .55rem .8rem; }
.auth-code-row .ghost:disabled { opacity: .5; cursor: default; }
.auth-error { color: var(--danger); font-size: .88rem; margin: 0; font-family: Arial, sans-serif; }
.auth-logged-email { color: var(--gold-soft); margin: .3rem 0 1rem; word-break: break-all; }

/* ---- 凯尔特十字：经典十字布局 ---- */
#drawn.celtic {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-areas:
    ". cc3 . . ."
    "cc5 cc1 cc6 . cc10"
    ". cc4 . . cc9"
    ". . . . cc8"
    ". . . . cc7";
  gap: .8rem 1rem;
  align-items: center; justify-items: center;
}
#drawn.celtic .draw-slot { width: 100%; max-width: 190px; }
#drawn.celtic .cc1 { grid-area: cc1; }
#drawn.celtic .cc2 { grid-area: cc1; z-index: 2; pointer-events: none; }
#drawn.celtic .cc2 .tarot-card { transform: rotate(90deg) scale(.94); }
#drawn.celtic .cc2 .tarot-card:not(.revealed):hover { transform: rotate(90deg) scale(.94); }
#drawn.celtic .cc3 { grid-area: cc3; }
#drawn.celtic .cc4 { grid-area: cc4; }
#drawn.celtic .cc5 { grid-area: cc5; }
#drawn.celtic .cc6 { grid-area: cc6; }
#drawn.celtic .cc7 { grid-area: cc7; }
#drawn.celtic .cc8 { grid-area: cc8; }
#drawn.celtic .cc9 { grid-area: cc9; }
#drawn.celtic .cc10 { grid-area: cc10; }
@media (max-width: 640px) {
  #drawn.celtic { display: flex; }
  #drawn.celtic .cc2 { pointer-events: auto; }
  #drawn.celtic .cc2 .tarot-card { transform: none; }
  #drawn.celtic .cc2 .tarot-card:not(.revealed):hover { transform: translateY(-10px); }
}

/* ---- 继续追问 ---- */
#followup-box { margin-top: 1.2rem; border-top: 1px solid rgba(212,175,55,.25); padding-top: 1rem; }
#followup-box h3 { color: var(--gold-soft); margin: 0 0 .2rem; font-size: 1.05rem; }
#followup-thread { display: flex; flex-direction: column; gap: .6rem; margin: .7rem 0; }
#followup-thread:empty { margin: 0; }
.fu-q {
  background: rgba(212,175,55,.1); border: 1px solid rgba(212,175,55,.3);
  border-radius: .6rem; padding: .6rem .8rem; line-height: 1.6;
}
.fu-a {
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: .6rem; padding: .6rem .8rem; line-height: 1.75;
}
.followup-input-row { display: flex; gap: .5rem; }
.followup-input-row input { flex: 1; }
.followup-input-row .cta { width: auto; white-space: nowrap; padding: .7rem 1.3rem; margin-top: 0; }
.history-fu { margin-top: .8rem; border-top: 1px dashed var(--line); padding-top: .8rem; display: flex; flex-direction: column; gap: .6rem; }

/* ============================================================
   新增：八字 / 紫微 / 星盘 / 日记
   ============================================================ */

/* ---- 八字四柱 ---- */
.pillars-head { color: var(--muted); font-size: .95rem; margin-bottom: .8rem; font-family: Arial, sans-serif; }
.pillars-head b { color: var(--gold); font-size: 1.3rem; font-family: Georgia, serif; }
.pillars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; }
.pillar {
  background: rgba(15,13,34,.75); border: 1px solid var(--line-soft);
  border-radius: 12px; padding: .9rem .5rem; text-align: center;
  transition: transform .2s ease, border-color .2s ease;
}
.pillar:hover { transform: translateY(-3px); border-color: var(--gold); }
.pillar-title { color: var(--muted); font-size: .8rem; letter-spacing: 2px; font-family: Arial, sans-serif; margin-bottom: .5rem; }
.pillar-gz { font-size: 2rem; line-height: 1.25; margin-bottom: .4rem; }
.pillar-gz .gan { color: var(--gold-soft); text-shadow: 0 0 14px rgba(212,175,55,.4); }
.pillar-gz .zhi { color: var(--purple); }
.pillar-god { color: var(--gold); font-size: .88rem; margin-bottom: .45rem; }
.pillar-sub { color: var(--muted); font-size: .75rem; font-family: Arial, sans-serif; line-height: 1.6; }
.pillar-sub .kong { color: var(--danger); border: 1px solid var(--danger); border-radius: 4px; padding: 0 4px; font-size: .7rem; }
@media (max-width: 520px) { .pillars-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- 紫微命盘 4x4 ---- */
.ziwei-grid { display: flex; flex-direction: column; gap: 6px; margin-top: .6rem; }
.zw-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.zw-cell {
  background: rgba(15,13,34,.75); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: .55rem .45rem; min-height: 118px;
  display: flex; flex-direction: column; gap: 3px;
  transition: border-color .2s ease;
}
.zw-cell:hover { border-color: rgba(212,175,55,.6); }
.zw-cell.soul { border-color: var(--gold); box-shadow: 0 0 14px rgba(212,175,55,.25), inset 0 0 18px rgba(212,175,55,.06); }
.zw-cell.body { border-style: dashed; }
.zw-cell.empty { visibility: hidden; }
.zw-palace { color: var(--gold-soft); font-size: .86rem; letter-spacing: 1px; }
.zw-cell.soul .zw-palace { color: var(--gold); font-weight: bold; }
.zw-gz { color: var(--muted); font-size: .72rem; font-family: Arial, sans-serif; }
.zw-stars { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.zw-major {
  color: #ff8fa3; font-size: .92rem; font-weight: bold;
  background: rgba(255,80,120,.08); border-radius: 6px; padding: 1px 6px;
}
.zw-major i { font-style: normal; font-size: .68rem; color: var(--muted); margin-left: 2px; font-weight: normal; }
.zw-minors { color: var(--muted); font-size: .72rem; font-family: Arial, sans-serif; line-height: 1.5; }
.zw-range { margin-top: auto; color: var(--purple); font-size: .7rem; font-family: Arial, sans-serif; }
.zw-center {
  grid-column: 2 / 4; grid-row: 2 / 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
  background: radial-gradient(circle, rgba(212,175,55,.1), transparent 70%);
  border: 1px dashed rgba(212,175,55,.35); border-radius: 12px;
  color: var(--text); font-size: .9rem; text-align: center; padding: .8rem;
  min-height: 242px;
}
.zw-center-title { color: var(--gold); font-size: 1.15rem; letter-spacing: 4px; }
@media (max-width: 520px) {
  .zw-cell { min-height: 96px; padding: .4rem .3rem; }
  .zw-major { font-size: .8rem; }
  .zw-palace { font-size: .78rem; }
  .zw-center { min-height: 198px; font-size: .78rem; }
}

/* ---- 西方星盘 ---- */
.wheel-wrap {
  display: flex; justify-content: center; margin: .6rem 0 1rem;
  background: radial-gradient(circle, rgba(139,123,216,.1), transparent 70%);
  border-radius: var(--radius); padding: .6rem;
}
#astro-wheel { width: 100%; max-width: 420px; height: auto; }
.astro-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-bottom: .4rem; }
.astro-point {
  display: flex; align-items: center; gap: .5rem;
  background: rgba(15,13,34,.7); border: 1px solid var(--line);
  border-radius: 10px; padding: .5rem .7rem; font-size: .88rem;
}
.ap-glyph { font-size: 1.25rem; color: var(--gold-soft); width: 1.6rem; text-align: center; }
.ap-name { color: var(--text); }

/* ---- 结果操作区 / 历史 ---- */
.result-actions { display: flex; gap: .7rem; justify-content: center; margin-top: 1.1rem; flex-wrap: wrap; }
.result-actions .ghost { margin-top: 0; }
.mini-history { display: flex; flex-direction: column; gap: .55rem; }
.mini-item {
  display: flex; gap: .8rem; align-items: baseline; text-align: left;
  background: rgba(15,13,34,.7); border: 1px solid var(--line);
  border-radius: 10px; padding: .65rem .9rem; cursor: pointer;
  color: var(--text); font-family: Georgia, serif; font-size: .92rem;
  transition: border-color .2s ease, transform .15s ease; width: 100%;
}
.mini-item:hover { border-color: var(--gold); transform: translateX(3px); }
.mini-date { color: var(--muted); font-size: .78rem; font-family: Arial, sans-serif; white-space: nowrap; }
.mini-q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 占卜日记 ---- */
.journal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.journal-head .cta { width: auto; padding: .7rem 1.4rem; font-size: .95rem; margin-top: 0; white-space: nowrap; }
.journal-head h2::after { display: none; }
.journal-list { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.journal-card {
  text-align: left; cursor: pointer; width: 100%;
  background: linear-gradient(180deg, rgba(30,26,64,.85), rgba(20,17,45,.85));
  border: 1px solid var(--line); border-radius: 12px; padding: .95rem 1.1rem;
  color: var(--text); font-family: Georgia, serif;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.journal-card:hover { transform: translateY(-2px); border-color: rgba(212,175,55,.55); box-shadow: 0 10px 26px rgba(0,0,0,.4); }
.jc-top { display: flex; gap: .6rem; align-items: center; margin-bottom: .45rem; }
.jc-kind {
  font-size: .72rem; font-family: Arial, sans-serif; letter-spacing: 1px;
  color: var(--gold-soft); border: 1px solid rgba(212,175,55,.45);
  border-radius: 999px; padding: .1rem .6rem; background: rgba(212,175,55,.07);
}
.jc-mood { font-size: .82rem; font-family: Arial, sans-serif; }
.jc-date { margin-left: auto; color: var(--muted); font-size: .75rem; font-family: Arial, sans-serif; }
.jc-title { color: var(--gold-soft); font-size: 1.02rem; margin-bottom: .3rem; }
.jc-excerpt { color: var(--muted); font-size: .9rem; line-height: 1.65; font-family: Arial, sans-serif; }
.journal-empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.journal-empty p:first-child { font-size: 1.3rem; color: var(--gold-soft); }

/* 日记编辑器 */
.journal-card-modal, .journal-card { max-width: 520px; }
#journal-modal .modal-card { max-width: 520px; text-align: left; }
#journal-modal h3 { color: var(--gold-soft); margin: 0 0 .6rem; text-align: center; }
#journal-title { margin-bottom: .7rem; }
.mood-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .7rem; }
.mood {
  border: 1px solid var(--line-soft); background: rgba(255,255,255,.03);
  color: var(--muted); border-radius: 999px; padding: .4rem .85rem;
  cursor: pointer; font-size: .85rem; font-family: Arial, sans-serif;
  transition: all .18s ease;
}
.mood:hover { border-color: var(--gold); color: var(--text); }
.mood.sel { border-color: var(--gold); background: rgba(212,175,55,.14); color: var(--gold-soft); }
#journal-content { margin-bottom: .4rem; }
#journal-readonly { margin: 0 0 .8rem; }
.journal-actions { display: flex; gap: .7rem; margin-top: .6rem; }
.journal-actions .cta { margin-top: 0; padding: .8rem; }
.journal-actions .ghost { margin-top: 0; }

/* ================= 首页功能磁贴 ================= */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.feature-tile {
  display: flex; flex-direction: column; align-items: center; gap: .55rem;
  padding: 1.7rem 1rem 1.4rem;
  background: linear-gradient(160deg, rgba(212,175,55,.10), rgba(139,123,216,.07));
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.feature-tile:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.feature-tile:active { transform: translateY(-1px); }
.feature-icon { font-size: 2.8rem; line-height: 1; }
.feature-title { font-size: 1.3rem; font-weight: 700; color: var(--gold-soft); letter-spacing: 3px; }
.feature-desc { font-size: .82rem; color: var(--muted); font-family: Arial, sans-serif; line-height: 1.65; text-align: center; }
.feature-go { font-size: .88rem; color: var(--gold); margin-top: .25rem; letter-spacing: 1px; }

/* ================= 解读结果：牌面缩略图 ================= */
.cards-summary {
  display: flex; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.2rem; justify-content: center;
}
.result-card { text-align: center; }
.result-card img {
  width: 104px; display: block;
  border-radius: 10px; border: 1px solid var(--line-soft);
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  transition: transform .16s ease;
}
.result-card img.reversed { transform: rotate(180deg); }
.result-card img:not(.reversed):hover { transform: translateY(-4px) scale(1.04); }
.result-card img.reversed:hover { transform: rotate(180deg) translateY(-4px) scale(1.04); }
.result-card-name {
  margin-top: .45rem; font-size: .78rem; color: var(--muted);
  font-family: Arial, sans-serif; line-height: 1.55;
}

/* ================= 历史记录：牌面缩略图 ================= */
.history-thumbs { display: flex; gap: .55rem; flex-wrap: wrap; margin-bottom: .9rem; }
.history-thumbs img {
  width: 62px; display: block;
  border-radius: 8px; border: 1px solid var(--line-soft);
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.history-thumbs img.reversed { transform: rotate(180deg); }

/* 可点放大的图统一给放大镜手型 */
.zoomable { cursor: zoom-in; }

/* ================= 图片灯箱 ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(5,4,12,.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.2rem; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-fig { margin: 0; }
.lightbox-fig img {
  max-width: 92vw; max-height: 74vh;
  border-radius: 12px; border: 1px solid var(--line-soft);
  box-shadow: 0 16px 60px rgba(0,0,0,.65);
}
.lightbox-cap {
  text-align: center; color: var(--gold-soft);
  margin-top: .9rem; font-size: 1.05rem; letter-spacing: 1px;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.2rem;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid var(--line-soft); background: rgba(23,20,49,.85);
  color: var(--text); font-size: 1.1rem; cursor: pointer;
}
.lightbox-close:hover { border-color: var(--gold); color: var(--gold); }
.lightbox-hint { margin-top: .7rem; }

/* ============================================================
   Growth pack — 黄历 / 星座 / 签到 / 分享 / 引导
   ============================================================ */

/* ---------- 今日黄历 ---------- */
.hl-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.hl-date b { font-size: 1.35rem; color: var(--gold-soft); }
.hl-lunar { color: var(--muted); font-size: .9rem; }
.hl-row { display: flex; gap: 10px; margin: 8px 0; align-items: flex-start; }
.hl-label { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: bold; font-size: 1.05rem; }
.hl-row:first-of-type .hl-label, .hl-label { background: rgba(212,175,55,.14); color: var(--gold); border: 1px solid var(--gold-deep); }
.hl-row:nth-of-type(2) .hl-label { background: rgba(255,157,157,.1); color: var(--danger); border: 1px solid #6b3a3a; }
.hl-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.hl-chip { font-size: .85rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-soft); }
.hl-chip.yi { background: rgba(212,175,55,.1); border-color: var(--gold-deep); color: var(--gold-soft); }
.hl-chip.ji { background: rgba(255,157,157,.07); color: var(--muted); }
.hl-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 4px; font-size: .9rem; color: var(--text); }
.hl-more { margin-top: 8px; }
.hl-more summary { cursor: pointer; color: var(--purple); font-size: .9rem; }
.hl-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 10px 0; }
.hl-hour { border: 1px solid var(--line-soft); border-radius: 10px; padding: 6px 2px;
  text-align: center; font-size: .85rem; display: flex; flex-direction: column; gap: 2px; }
.hl-hour small { color: var(--muted); font-size: .68rem; }
.hl-hour b { font-size: .78rem; }
.hl-hour.good b { color: var(--gold); }
.hl-hour.bad { opacity: .55; }
.hl-hour.bad b { color: var(--danger); }
.hl-foot { color: var(--muted); font-size: .8rem; margin: 8px 0 0; }

/* ---------- 星座运势 ---------- */
.horo-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 14px; }
.horo-sign { background: rgba(23,20,49,.7); border: 1px solid var(--line-soft); border-radius: 12px;
  color: var(--text); padding: 8px 2px; font-size: .78rem; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.horo-sign:hover { transform: translateY(-2px); border-color: var(--gold); }
.horo-sign.active { border-color: var(--gold); box-shadow: 0 0 12px rgba(212,175,55,.35); background: rgba(212,175,55,.08); }
.horo-icon { font-size: 1.3rem; }
.horo-detail { background: rgba(13,11,26,.5); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.horo-title { font-size: 1.1rem; margin-bottom: 8px; }
.horo-dim { margin: 8px 0; }
.horo-dim-head { display: flex; justify-content: space-between; font-size: .9rem; color: var(--gold-soft); }
.horo-stars { color: var(--gold); letter-spacing: 2px; }
.horo-dim p { margin: 4px 0 0; font-size: .92rem; }
.horo-lucky { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-size: .9rem; }
.horo-lucky b { color: var(--gold-soft); }

/* ---------- 签到 ---------- */
.checkin-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.checkin-meta { display: flex; align-items: center; gap: 10px; }
.ck-dots { display: inline-flex; gap: 5px; }
.ck-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line-soft); background: transparent; }
.ck-dot.on { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 8px rgba(212,175,55,.7); }
.ck-dot.gift { border-color: var(--gold-deep); }
.ck-dot.gift.on { background: radial-gradient(circle at 35% 35%, var(--gold-soft), var(--gold-deep)); }

/* ---------- 分享裂变 ---------- */
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.primary { background: linear-gradient(135deg, var(--gold-deep), var(--gold)); color: #17131a;
  border: none; border-radius: 12px; padding: 12px 22px; font-size: 1rem; font-weight: bold; cursor: pointer;
  box-shadow: 0 4px 18px rgba(212,175,55,.35); transition: transform .15s ease; }
.primary:hover { transform: translateY(-2px); }
.primary:active { transform: translateY(0); }
.invite-link { word-break: break-all; font-size: .78rem; color: var(--purple); min-height: 1em; }
.share-status { font-size: .92rem; }
.share-status b { color: var(--gold-soft); }

/* ---------- 三步上手 / FAQ ---------- */
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.how-step { background: rgba(13,11,26,.5); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 10px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.how-num { width: 30px; height: 30px; border-radius: 50%; background: rgba(212,175,55,.15);
  border: 1px solid var(--gold-deep); color: var(--gold); font-weight: bold;
  display: flex; align-items: center; justify-content: center; }
.home-faq details { border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; padding: 10px 14px;
  background: rgba(13,11,26,.4); }
.home-faq summary { cursor: pointer; color: var(--gold-soft); font-size: .95rem; }
.home-faq p { color: var(--text); font-size: .9rem; margin: 8px 0 4px; }

/* ---------- 新手引导 ---------- */
#onboard-overlay { position: fixed; inset: 0; z-index: 400; background: rgba(8,6,20,.82);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: onboardIn .35s cubic-bezier(.2,.8,.25,1); }
@keyframes onboardIn { from { opacity: 0; } to { opacity: 1; } }
.onboard-card { background: var(--panel); border: 1px solid var(--gold-deep); border-radius: 20px;
  padding: 28px 24px; max-width: 420px; width: 100%; text-align: center;
  box-shadow: 0 0 60px rgba(212,175,55,.25); animation: onboardPop .4s cubic-bezier(.3,.7,.3,1.15); }
@keyframes onboardPop { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.onboard-moon { font-size: 2.6rem; }
.onboard-card h3 { margin: 8px 0 4px; color: var(--gold-soft); }
.onboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.onboard-opt { background: rgba(13,11,26,.6); border: 1px solid var(--line-soft); border-radius: 14px;
  color: var(--text); padding: 14px 8px; font-size: .95rem; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  transition: transform .15s ease, border-color .15s ease; }
.onboard-opt span { font-size: 1.6rem; }
.onboard-opt:hover { transform: translateY(-2px); border-color: var(--gold); }

/* ---------- 会员权益 ---------- */
.member-badge { display: inline-block; font-size: .72rem; color: #1a1033;
  background: linear-gradient(135deg, #ffd97a, #f0b429); border-radius: 999px;
  padding: 2px 10px; margin-left: 6px; vertical-align: middle; font-weight: 700; }
.perks-box { text-align: left; background: rgba(255,217,122,.06);
  border: 1px solid rgba(240,180,41,.35); border-radius: 12px;
  padding: 12px 14px; margin: 0 0 14px; }
.perks-title { margin: 0 0 8px; font-weight: 700; color: var(--gold-soft); }
.perks-list { margin: 0; padding: 0; list-style: none; font-size: .88rem; line-height: 1.9; }
.perks-list b { color: var(--gold); }
.perks-list .hint { font-size: .76rem; }

/* ---------- 出生信息记忆 ---------- */
.birth-memory-bar { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px;
  background: rgba(255,217,122,.07); border: 1px solid rgba(240,180,41,.3);
  font-size: .9rem; }
.birth-memory-bar .ghost.small { margin-left: 8px; padding: 4px 12px; font-size: .82rem; }
.remember-birth { display: flex; align-items: center; gap: 8px; font-size: .85rem;
  color: var(--text-dim); margin: 4px 0 10px; cursor: pointer; }
.remember-birth input { accent-color: var(--gold); }

/* ---------- toast ---------- */
#moonlit-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  background: rgba(23,20,49,.95); border: 1px solid var(--gold-deep); color: var(--text);
  padding: 12px 22px; border-radius: 999px; font-size: .92rem; z-index: 500;
  opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
  max-width: 90vw; text-align: center; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
#moonlit-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 小屏适配 ---------- */
@media (max-width: 560px) {
  .horo-grid { grid-template-columns: repeat(4, 1fr); }
  .hl-hours { grid-template-columns: repeat(4, 1fr); }
  .how-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #onboard-overlay, .onboard-card { animation: none; }
  .horo-sign, .primary, .onboard-opt { transition: none; }
}
