:root {
  --bg: #060a13;
  --bg2: #0b1224;
  --ink: #eaf0fb;
  --muted: #8ea2c9;
  --gold: #d9b25a;
  --gold-soft: #f0d79a;
  --line: rgba(140, 170, 230, 0.18);
  --glass: rgba(14, 22, 42, 0.55);
  font-size: 16px;
}

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

html, body { height: 100%; }

body {
  font-family: -apple-system, "PingFang SC", "Noto Serif SC", "Songti SC", serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 50% -10%, #142445 0%, transparent 60%),
    radial-gradient(900px 700px at 80% 110%, #10203c 0%, transparent 55%),
    var(--bg);
  overflow-x: hidden;
  min-height: 100%;
  position: relative;
}

/* ---------- 背景层 ---------- */
.starfield { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.starfield i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: 0.5;
  animation: twinkle var(--d, 4s) ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.08; } to { opacity: 0.85; } }

.bagua-ring {
  position: fixed; left: 50%; top: 42%;
  width: min(120vw, 1100px); aspect-ratio: 1; translate: -50% -50%;
  z-index: 0; pointer-events: none; opacity: 0.06;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 0deg, transparent 0 14deg, rgba(217,178,90,.7) 14deg 15deg),
    radial-gradient(circle, transparent 38%, rgba(217,178,90,.25) 39% 40%, transparent 41%),
    radial-gradient(circle, transparent 47%, rgba(217,178,90,.25) 48% 49%, transparent 50%);
  animation: spin 120s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

.vignette {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(0,0,0,.75) 100%);
}

/* ---------- 布局 ---------- */
.stage {
  position: relative; z-index: 2;
  max-width: 1120px; margin: 0 auto;
  padding: clamp(28px, 6vh, 72px) 20px 40px;
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
}

/* 宽屏下并排的两块 */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; gap: 0; } }

.panel {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(26px, 5vw, 46px);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.04);
  animation: rise .8s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.hidden { display: none !important; }

/* ---------- 第一幕 ---------- */
.panel--intro { text-align: center; }
.sigil {
  font-size: 56px; color: var(--gold);
  text-shadow: 0 0 30px rgba(217,178,90,.6);
  animation: spin 26s linear infinite, breathe 4s ease-in-out infinite;
}
@keyframes breathe { 50% { text-shadow: 0 0 50px rgba(217,178,90,.95); } }

.title {
  font-size: clamp(40px, 9vw, 64px); letter-spacing: .35em; text-indent: .35em;
  margin: 8px 0 6px; font-weight: 600;
  background: linear-gradient(180deg, #fff 0%, var(--gold-soft) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.subtitle { color: var(--muted); letter-spacing: .25em; font-size: 14px; margin-bottom: 30px; }

.form { display: flex; flex-direction: column; gap: 18px; max-width: 420px; margin: 0 auto; }
.field { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 13px; color: var(--muted); letter-spacing: .2em; }
.field input, .field select {
  appearance: none;
  background: rgba(9,14,26,.7);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; color: var(--ink); font-size: 16px;
  font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217,178,90,.15);
}
.field input::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) saturate(3) hue-rotate(5deg); cursor: pointer; }

.cast-btn {
  position: relative; cursor: pointer; border: none;
  margin-top: 10px; padding: 16px 26px; border-radius: 14px;
  font-family: inherit; font-size: 16px; letter-spacing: .35em; text-indent: .35em; color: #1a1206;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 14px 34px -10px rgba(217,178,90,.6), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s, box-shadow .2s, filter .2s;
  overflow: hidden;
}
.cast-btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.cast-btn:active { transform: translateY(0); }
.cast-btn:disabled { filter: grayscale(.5) brightness(.8); cursor: progress; }
.cast-btn--sm { letter-spacing: .25em; padding: 13px 22px; font-size: 15px; }
.cast-btn::after {
  content: ""; position: absolute; inset: 0; translate: -120% 0;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
}
.cast-btn:not(:disabled):hover::after { animation: sheen 1.1s ease forwards; }
@keyframes sheen { to { translate: 120% 0; } }

/* ---------- 首页：对话窗 / 牌扇 / 功能卡 / 案例 / 口碑 ---------- */
.hero { display: flex; gap: 34px; align-items: center; text-align: left; }
.hero__left { flex: 1 1 420px; min-width: 0; text-align: center; }
.hero__right { flex: 0 0 300px; position: relative; height: 460px; }
.fan {
  position: absolute; width: 230px; aspect-ratio: 9 / 16; object-fit: cover;
  border-radius: 14px; top: 50%; left: 50%; background: #0a1120;
  border: 1px solid rgba(217,178,90,.35); box-shadow: 0 24px 60px -18px #000;
  transition: transform .35s ease;
}
.fan1 { transform: translate(-50%, -50%) rotate(-10deg) translateX(-46px); }
.fan2 { transform: translate(-50%, -50%) rotate(1deg) translateY(-8px); z-index: 2; }
.fan3 { transform: translate(-50%, -50%) rotate(11deg) translateX(46px); }
.hero__right:hover .fan1 { transform: translate(-50%, -50%) rotate(-14deg) translateX(-72px); }
.hero__right:hover .fan3 { transform: translate(-50%, -50%) rotate(15deg) translateX(72px); }

.master {
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  max-width: 460px; margin: 0 auto 14px;
}
.master__avatar {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-size: 24px; background: rgba(217,178,90,.12); border: 1px solid rgba(217,178,90,.4);
  object-fit: cover;
}
.master__say {
  position: relative; padding: 13px 16px; border-radius: 4px 16px 16px 16px;
  background: rgba(12,18,34,.75); border: 1px solid var(--line);
  font-size: 14px; line-height: 1.7; color: #cdd9f2;
}
.hot-qs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.hot-qs button {
  font-family: inherit; font-size: 13px; cursor: pointer; padding: 8px 14px; border-radius: 999px;
  color: var(--gold-soft); background: rgba(217,178,90,.08); border: 1px solid rgba(217,178,90,.35);
  transition: all .2s;
}
.hot-qs button:hover, .hot-qs button.on { background: rgba(217,178,90,.22); border-color: var(--gold); transform: translateY(-1px); }

.field-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.trust { margin-top: 14px; font-size: 12.5px; color: var(--muted); letter-spacing: .08em; }
.trust b { color: var(--gold); font-size: 14px; }

.feats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 34px; }
.feat {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 8px;
  border-radius: 16px; background: rgba(12,18,34,.55); border: 1px solid var(--line);
  transition: all .25s;
}
.feat:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: 0 14px 34px -16px rgba(217,178,90,.5); }
.feat i { font-style: normal; font-size: 26px; }
.feat .ico { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; border: 1px solid rgba(217,178,90,.35); box-shadow: 0 6px 18px -8px rgba(217,178,90,.4); }
.feat b { font-size: 15px; color: var(--gold-soft); letter-spacing: .1em; }
.feat span { font-size: 12px; color: var(--muted); }

.cases__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cases__grid figure { margin: 0; }
.cases__grid img {
  width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block;
  transition: transform .25s; cursor: zoom-in;
}
.cases__grid img:hover { transform: scale(1.03); border-color: var(--gold); }
.cases__grid figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 8px; letter-spacing: .05em; }
.cases__grid figcaption em { font-style: normal; color: var(--gold); margin-left: 4px; }

.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rv { padding: 16px; border-radius: 14px; background: rgba(12,18,34,.55); border: 1px solid var(--line); text-align: left; }
.rv p { font-size: 13.5px; line-height: 1.75; color: #cdd9f2; margin-bottom: 10px; }
.rv span { font-size: 12px; color: var(--gold); }

@media (max-width: 760px) {
  .hero { flex-direction: column; }
  .hero__right { display: none; }
  .feats, .cases__grid { grid-template-columns: repeat(2, 1fr); }
  .reviews__grid { grid-template-columns: 1fr; }
}

/* ---------- 第二幕 ---------- */
.reading__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.reading__title {
  font-size: 22px; letter-spacing: .2em; color: var(--gold-soft);
}
.ghost-btn {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-family: inherit;
  font-size: 13px; letter-spacing: .1em; transition: all .2s; text-decoration: none;
}
.ghost-btn:hover { color: var(--gold); border-color: var(--gold); }
.ghost-btn--dl { display: inline-block; margin-top: 14px; }

/* 四柱 */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.pillar {
  text-align: center; padding: 16px 6px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(30,24,56,.7), rgba(16,12,32,.7));
  border: 1px solid var(--line);
  animation: flip .6s ease both;
}
@keyframes flip { from { opacity: 0; transform: rotateX(-80deg); } }
.pillar__label { font-size: 12px; color: var(--muted); letter-spacing: .2em; margin-bottom: 10px; }
.pillar__gz { font-size: clamp(22px, 6vw, 30px); line-height: 1.25; font-weight: 600; }
.pillar__gan, .pillar__zhi { display: block; }
.pillar__wx { font-size: 11px; color: var(--muted); margin-top: 8px; letter-spacing: .15em; }

/* 步骤 */
.steps { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.step {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: 12px;
  background: rgba(12,18,34,.5); border: 1px solid var(--line);
  color: #cdd9f2; font-size: 14.5px; line-height: 1.6;
  animation: rise .5s ease both;
}
.step__i { color: var(--gold); flex: none; margin-top: 2px; }
.step b { color: var(--gold-soft); font-weight: 600; }

/* 五行 */
.block-title { font-size: 16px; letter-spacing: .2em; color: var(--gold-soft); margin: 26px 0 16px; }
.wuxing__bars { display: flex; flex-direction: column; gap: 12px; }
.wx-row { display: grid; grid-template-columns: 56px 1fr 40px; align-items: center; gap: 12px; }
.wx-row__name { font-size: 15px; letter-spacing: .1em; }
.wx-row__track { height: 12px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.wx-row__fill {
  height: 100%; width: 0; border-radius: 999px;
  transition: width 1s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 16px var(--c, #fff);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, #000), var(--c));
}
.wx-row__num { font-size: 13px; color: var(--muted); text-align: right; }

/* 能量色 */
.energy { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.energy__card {
  position: relative; padding: 22px; border-radius: 18px;
  background: rgba(10,16,30,.6); border: 1px solid var(--line); text-align: center;
  animation: rise .6s ease both;
}
.energy__tag { font-size: 12px; letter-spacing: .15em; color: var(--muted); }
.energy__tag--gold { color: var(--gold); }
.energy__swatch {
  width: 92px; height: 92px; border-radius: 50%; margin: 16px auto;
  box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 0 44px var(--c, #fff);
  background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 60%, #000) 100%);
  animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 1px rgba(255,255,255,.15), 0 0 64px var(--c, #fff); } }
.energy__name { font-size: 20px; font-weight: 600; letter-spacing: .12em; margin-bottom: 8px; }
.energy__desc { font-size: 13px; color: var(--muted); line-height: 1.7; }

/* 壁纸 */
.wallpaper { margin-top: 14px; text-align: center; }
.wallpaper__hint { color: var(--muted); font-size: 14px; margin-bottom: 16px; line-height: 1.7; }
.wallpaper__stage { margin-top: 22px; display: flex; flex-direction: column; align-items: center; }
.phone {
  position: relative; width: min(280px, 78vw); aspect-ratio: 9/19.5;
  border-radius: 38px; overflow: hidden;
  border: 2px solid rgba(255,255,255,.12);
  box-shadow: 0 40px 90px -30px #000, 0 0 60px -20px var(--c, #888), inset 0 0 0 6px #06040d;
  background: #05040a;
}
.phone__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.phone__img.show { opacity: 1; }
.phone__glow {
  position: absolute; inset: -30%; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 35%, transparent) 0%, transparent 55%);
  mix-blend-mode: screen; animation: drift 8s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(4%, -3%) scale(1.08); } }
.phone__particles { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.phone__particles i {
  position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--c, #fff); box-shadow: 0 0 12px var(--c, #fff); opacity: .8;
  animation: floatUp var(--d,7s) linear infinite; left: var(--x, 50%);
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  100% { transform: translateY(-115%) scale(1.1); opacity: 0; }
}
.phone__progress {
  position: absolute; inset: auto 0 0 0; z-index: 4; padding: 18px;
  background: linear-gradient(0deg, rgba(0,0,0,.8), transparent);
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  font-size: 12.5px; color: #ddd; letter-spacing: .1em;
}
.phone__bar { width: 80%; height: 4px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; }
.phone__bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .6s; }
.phone__progress.hidden { display: none; }

.wallpaper__picks { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; justify-content: center; }
.wallpaper__picks img {
  width: 56px; height: 100px; object-fit: cover; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent; opacity: .7; transition: all .2s;
}
.wallpaper__picks img:hover, .wallpaper__picks img.active { opacity: 1; border-color: var(--gold); }

.wallpaper__actions { display: flex; gap: 12px; margin-top: 18px; align-items: center; justify-content: center; flex-wrap: wrap; }

/* ---------- 命理推演解读 ---------- */
.deep { margin-top: 26px; }
.deep-loading {
  text-align: center; color: var(--gold-soft); font-size: 15px; letter-spacing: .1em;
  padding: 28px; border: 1px dashed var(--line); border-radius: 14px; background: rgba(10,16,30,.4);
}
.deep-content { animation: rise .6s ease both; }
.deep-sub { font-size: 15px; letter-spacing: .15em; color: var(--gold-soft); margin: 22px 0 12px; }
.deep-para { font-size: 14.5px; line-height: 1.8; color: #cdd9f2; }

.archetype { text-align: center; padding: 18px; }
.archetype__name {
  font-size: 26px; font-weight: 600; letter-spacing: .2em;
  background: linear-gradient(180deg,#fff,var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.archetype__one { color: var(--muted); margin-top: 8px; font-size: 14px; letter-spacing: .08em; }

.sw { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.sw__list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sw__list li { font-size: 13.5px; line-height: 1.6; padding: 10px 12px; border-radius: 10px; background: rgba(12,18,34,.55); border: 1px solid var(--line); }
.tag-good { color: #8ff0bd; } .tag-warn { color: #ffc07a; }

.dims { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dim-card { padding: 14px; border-radius: 14px; background: rgba(12,18,34,.55); border: 1px solid var(--line); }
.dim-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dim-name { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: .1em; }
.verdict { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.v-good { color: #0c2a16; background: #57d98a; } .v-mid { color: #2a2410; background: var(--gold); } .v-weak { color: #fff; background: #7a4bd0; }
.dim-text { font-size: 13px; line-height: 1.7; color: #c6d3ec; }

/* 星曜注解 tooltip（悬停 / 点按） */
.gloss { border-bottom: 1px dotted var(--gold); cursor: help; position: relative; }
.gloss:hover, .gloss:focus { color: var(--gold-soft); outline: none; }
.gloss:hover::after, .gloss:focus::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: 150%; transform: translateX(-50%);
  width: max-content; max-width: 220px; padding: 8px 11px; z-index: 80;
  background: #15112b; color: #eaf0fb; font-size: 12.5px; line-height: 1.55; font-weight: 400;
  letter-spacing: 0; border: 1px solid var(--gold); border-radius: 8px;
  box-shadow: 0 10px 28px -8px #000; white-space: normal; pointer-events: none;
}
.gloss:hover::before, .gloss:focus::before {
  content: ''; position: absolute; left: 50%; bottom: 150%; transform: translate(-50%, 50%) rotate(45deg);
  width: 8px; height: 8px; background: #15112b; border-right: 1px solid var(--gold); border-bottom: 1px solid var(--gold); z-index: 81;
}

.keyyears { display: flex; flex-direction: column; gap: 8px; }
.ky { display: grid; grid-template-columns: 60px 48px 1fr; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(12,18,34,.5); border: 1px solid var(--line); }
.ky-year { color: var(--gold); font-weight: 600; } .ky-age { color: var(--muted); font-size: 12px; } .ky-ev { font-size: 13px; color: #cdd9f2; line-height: 1.5; }

.advice { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.advice li { font-size: 14px; line-height: 1.7; color: #cdd9f2; padding: 10px 14px; border-left: 2px solid var(--gold); background: rgba(217,178,90,.06); border-radius: 0 10px 10px 0; }

@media (max-width: 560px) { .sw, .dims { grid-template-columns: 1fr; } }

.report-preview { margin-top: 16px; text-align: center; animation: rise .5s ease both; }
.report-preview img {
  width: min(300px, 80%); border-radius: 14px; display: block; margin: 0 auto 14px;
  border: 1px solid var(--line); box-shadow: 0 30px 70px -28px #000;
}

/* ---------- 命理解读图卡 ---------- */
.cards-loading { text-align: center; color: var(--gold-soft); font-size: 14px; padding: 16px; letter-spacing: .1em; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .cards-grid { grid-template-columns: 1fr 1fr; } }
.card-item { margin: 0; display: flex; flex-direction: column; gap: 8px; animation: rise .5s ease both; }
.card-item img { width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 18px 44px -20px #000; cursor: zoom-in; display: block; }
.card-item .ghost-btn--dl { text-align: center; }
.card-cap { padding: 4px 2px; }
.cap-title { font-size: 17px; font-weight: 600; color: var(--gold-soft); letter-spacing: .1em; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.cap-con, .cap-note { font-size: 13px; line-height: 1.7; color: #cdd9f2; margin-bottom: 6px; }
.cap-con b, .cap-note b { color: var(--gold); margin-right: 6px; font-weight: 600; }
.cap-note { color: #e9d6b0; }
.card-acts { display: flex; gap: 8px; }
.card-acts .ghost-btn { flex: 1; text-align: center; }
.card-item { position: relative; }
.card-item.regenning::after { content: '⟳ 重绘中…'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5,9,17,.72); color: var(--gold-soft); border-radius: 14px; z-index: 6; letter-spacing: .1em; }
.card-fail { padding: 40px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
@media (max-width: 560px) { .cards-grid { grid-template-columns: 1fr; } }

/* ---------- 问神算子（AI 追问对话） ---------- */
.chat-box {
  max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 16px; border-radius: 16px; background: rgba(7,11,20,.55); border: 1px solid var(--line);
  scrollbar-width: thin;
}
.msg { max-width: 82%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.msg-ai { align-self: flex-start; background: rgba(217,178,90,.1); border: 1px solid rgba(217,178,90,.3); color: #eee5c8; border-top-left-radius: 4px; }
.msg-user { align-self: flex-end; background: rgba(58,120,220,.16); border: 1px solid rgba(90,140,220,.35); color: #dbe6fa; border-top-right-radius: 4px; }
.msg-typing { animation: pulse-t 1.2s ease-in-out infinite; }
@keyframes pulse-t { 50% { opacity: .45; } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chat-chips button {
  font-family: inherit; font-size: 13px; cursor: pointer; padding: 7px 13px; border-radius: 999px;
  color: var(--muted); background: rgba(9,14,26,.6); border: 1px solid var(--line); transition: all .2s;
}
.chat-chips button:hover { color: var(--gold); border-color: var(--gold); }
.chat-input { display: flex; gap: 10px; margin-top: 12px; }
.chat-input input {
  flex: 1; appearance: none; background: rgba(9,14,26,.7); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; color: var(--ink); font-size: 15px; font-family: inherit;
}
.chat-input input:focus { outline: none; border-color: var(--gold); }
.chat-input .cast-btn--sm { margin-top: 0; padding: 12px 22px; }
.chat-quota { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: right; }
.chat-pay { margin-top: 10px; font-size: 13.5px; color: #eed9a8; text-align: center; padding: 12px; border: 1px dashed rgba(217,178,90,.4); border-radius: 12px; }

/* ---------- 今日运势仪表盘 ---------- */
.today-dash { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: center; }
.today-dash canvas { width: 180px; height: 180px; flex: 0 0 auto; }
.today-info { flex: 1 1 280px; min-width: 260px; }
.td-date { font-size: 15px; color: #cdd9f2; margin-bottom: 12px; } .td-date b { color: var(--gold-soft); }
.td-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.td-cell { padding: 12px 8px; text-align: center; border-radius: 12px; background: rgba(12,18,34,.6); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.td-cell span { font-size: 12px; color: var(--muted); } .td-cell b { font-size: 16px; color: var(--ink); }
.td-dd { display: flex; flex-direction: column; gap: 8px; }
.td-do, .td-dont { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.td-do em, .td-dont em { font-style: normal; font-weight: 700; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.td-do em { background: #1d4d33; color: #7ee9ac; } .td-dont em { background: #4d1d2a; color: #ff9aa8; }
.td-do i, .td-dont i { font-style: normal; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: #cdd9f2; }

/* ---------- 本年每月运势 ---------- */
.mh-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.mh-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px;
  border-radius: 12px; cursor: pointer; font-family: inherit;
  background: color-mix(in srgb, var(--c) 14%, rgba(12,18,34,.6)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  transition: all .2s;
}
.mh-cell span { font-size: 12px; color: var(--muted); }
.mh-cell b { font-size: 18px; color: var(--c); }
.mh-cell:hover, .mh-cell.mh-active { border-color: var(--c); box-shadow: 0 0 14px -4px var(--c); }
.mh-cell.mh-cur span::after { content: ' ·今'; color: var(--gold); }
.mh-detail { margin-top: 12px; font-size: 14px; color: #cdd9f2; text-align: center; }
.mh-detail b { color: var(--gold-soft); }
@media (max-width: 560px) { .mh-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- 八字合婚 ---------- */
.hh-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hh-form input, .hh-form select {
  appearance: none; background: rgba(9,14,26,.7); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; color: var(--ink); font-size: 15px; font-family: inherit;
}
.hh-form input::-webkit-calendar-picker-indicator { filter: invert(.8) sepia(1) saturate(3) hue-rotate(5deg); }
.hh-result { margin-top: 18px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: center; }
.hh-result canvas { width: 170px; height: 170px; flex: 0 0 auto; }
.hh-bars { flex: 1 1 280px; min-width: 260px; display: flex; flex-direction: column; gap: 10px; }
.hh-bars .ss-row { grid-template-columns: 68px 1fr 24px auto; }
.hh-verdict { width: 100%; text-align: center; font-size: 15px; color: #cdd9f2; margin-top: 4px; }
.hh-verdict b { color: var(--gold-soft); }

/* ---------- 可视化通用 ---------- */
.viz-canvas { display: block; width: min(420px, 92%); height: auto; margin: 6px auto 0; }
.viz-wide { width: min(680px, 100%); }

/* 能量色应用 */
.cu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cu-card { padding: 16px; border-radius: 16px; background: rgba(12,18,34,.55); border: 1px solid var(--line); text-align: center; }
.cu-swatch { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; background: radial-gradient(circle at 32% 28%, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 60%, color-mix(in srgb, var(--c) 60%, #000)); box-shadow: 0 0 28px var(--c); }
.cu-name { font-size: 18px; font-weight: 600; color: var(--c); }
.cu-tag { font-size: 12px; color: var(--muted); margin-bottom: 10px; letter-spacing: .1em; }
.cu-uses { list-style: none; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.cu-uses li { font-size: 13px; color: #cdd9f2; padding-left: 16px; position: relative; }
.cu-uses li::before { content: '·'; color: var(--c); position: absolute; left: 4px; font-weight: 700; }

/* 紫微命盘网格 */
.pg-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, minmax(86px, auto)); gap: 4px; }
.pg-cell { position: relative; padding: 6px; border-radius: 8px; background: rgba(12,18,34,.6); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; min-height: 86px; }
.pg-cell.pg-life { border-color: #57d98a; box-shadow: 0 0 0 1px #57d98a inset; }
.pg-cell.pg-body { border-color: var(--gold); }
.pg-stars { display: flex; flex-wrap: wrap; gap: 2px 6px; align-content: flex-start; }
.pg-star { font-size: 13px; color: #eaf0fb; font-weight: 600; }
.pg-star i { font-size: 9px; color: var(--muted); font-style: normal; margin-left: 1px; }
.pg-star b { font-size: 10px; color: var(--gold); margin-left: 1px; }
.pg-min { font-size: 10px; color: #8ea2c9; }
.pg-min b { color: var(--gold); }
.pg-empty { color: rgba(142,162,201,.4); }
.pg-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.pg-name { font-size: 12px; color: var(--gold-soft); font-weight: 600; }
.pg-gz { font-size: 11px; color: var(--muted); }
.pg-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: rgba(217,178,90,.06); border: 1px solid var(--line); border-radius: 10px; color: #cdd9f2; font-size: 13px; text-align: center; }
.pg-c-title { font-size: 18px; color: var(--gold-soft); font-weight: 600; letter-spacing: .1em; }
.pg-c-tip { font-size: 11px; color: var(--muted); }

/* 十神分布 */
.ss-list { display: flex; flex-direction: column; gap: 10px; }
.ss-row { display: grid; grid-template-columns: 44px 1fr 24px auto; align-items: center; gap: 10px; }
.ss-k { font-size: 14px; color: var(--gold-soft); font-weight: 600; }
.ss-bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.06); overflow: hidden; }
.ss-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 50%, #000), var(--gold)); }
.ss-n { font-size: 13px; color: var(--muted); text-align: right; }
.ss-d { font-size: 12px; color: #8ea2c9; }

/* 今日运势 */
.today-head { font-size: 14.5px; color: #cdd9f2; } .today-head b { color: var(--gold-soft); }
.today-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.today-tag { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: rgba(217,178,90,.1); border: 1px solid var(--line); color: #e9dfb8; }

@media (max-width: 560px) { .cu-grid { grid-template-columns: 1fr; } .pg-star { font-size: 11px; } }

/* ---------- 大运流年时间轴 ---------- */
.timeline { margin-top: 26px; }
.tl-dayun { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px 12px; scrollbar-width: thin; }
.tl-chip {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 12px; border-radius: 12px; cursor: pointer; min-width: 76px;
  background: rgba(12,18,34,.6); border: 1px solid var(--line); color: var(--muted); font-family: inherit; transition: all .2s;
}
.tl-chip:hover { border-color: var(--gold); color: var(--ink); }
.tl-chip.tl-active { border-color: var(--gold); background: rgba(217,178,90,.12); color: var(--ink); }
.tl-chip.tl-cur .tl-gz { color: var(--gold); }
.tl-age { font-size: 11px; } .tl-gz { font-size: 18px; font-weight: 600; } .tl-name { font-size: 12px; }

.tl-detail { margin-top: 12px; padding: 16px; border-radius: 14px; background: rgba(10,16,30,.5); border: 1px solid var(--line); animation: rise .4s ease both; }
.tl-dy-stars { font-size: 14px; color: #cdd9f2; margin-bottom: 12px; }
.tl-dy-stars b { color: var(--gold-soft); }
.tl-years { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-year {
  padding: 6px 10px; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px;
  background: rgba(9,14,26,.6); border: 1px solid var(--line); color: var(--muted); transition: all .2s;
}
.tl-year:hover { border-color: var(--gold); color: var(--ink); }
.tl-year.tl-active { color: #1a1206; background: linear-gradient(180deg,var(--gold-soft),var(--gold)); border-color: transparent; font-weight: 600; }
.tl-year.tl-cur { box-shadow: 0 0 0 1px var(--gold) inset; }
.tl-ln { margin-top: 14px; padding: 14px; border-radius: 12px; background: rgba(217,178,90,.06); border-left: 2px solid var(--gold); font-size: 13.5px; line-height: 1.8; color: #cdd9f2; }
.tl-ln-h { font-size: 15px; color: var(--gold-soft); font-weight: 600; margin-bottom: 4px; }
.tl-hua { margin-top: 4px; } .tl-hua b { color: var(--gold-soft); }
.tl-exp { color: var(--muted); font-size: 13px; }
.hua-list { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.hua-row { display: grid; grid-template-columns: 56px 1fr; align-items: baseline; gap: 10px; }
.hua-k { color: var(--gold); font-weight: 600; font-size: 14px; }
.hua-v { color: #cdd9f2; font-size: 13.5px; }

.picker-group { margin: 16px auto; max-width: 460px; text-align: left; }
.picker-label { font-size: 13px; color: var(--muted); letter-spacing: .15em; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(9, 14, 26, .6); color: var(--muted);
  font-family: inherit; font-size: 14px; cursor: pointer; transition: all .2s;
}
.chip:hover { color: var(--ink); border-color: var(--gold); }
.chip.active {
  color: #1a1206; border-color: transparent; font-weight: 600;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  box-shadow: 0 6px 18px -8px rgba(217, 178, 90, .7);
}

/* ---------- 页脚（背书版） ---------- */
.foot { position: relative; z-index: 2; padding: 34px 20px 26px; border-top: 1px solid var(--line); background: rgba(6,10,19,.6); }
.foot__grid { max-width: 920px; margin: 0 auto 18px; display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 20px; }
.foot__col { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); }
.foot__col b { color: var(--gold-soft); font-size: 14px; letter-spacing: .1em; margin-bottom: 2px; }
.foot__col a { color: var(--muted); text-decoration: none; }
.foot__col a:hover { color: var(--gold); }
.foot__line { text-align: center; color: rgba(142,162,201,.55); font-size: 12px; letter-spacing: .12em; }
@media (max-width: 640px) { .foot__grid { grid-template-columns: 1fr; } }

/* ---------- 首页背书区 ---------- */
.feat em { font-style: normal; font-size: 11.5px; color: var(--gold); }
.backing { margin-top: 30px; }
.backing__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bk { padding: 16px; border-radius: 14px; background: rgba(12,18,34,.55); border: 1px solid var(--line); text-align: left; }
.bk i { font-style: normal; font-size: 22px; }
.bk .ico { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 1px solid rgba(217,178,90,.3); }
.bk b { display: block; margin: 8px 0 6px; font-size: 14px; color: var(--gold-soft); letter-spacing: .05em; }
.bk p { font-size: 12.5px; line-height: 1.7; color: var(--muted); }
@media (max-width: 760px) { .backing__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- 付费解锁弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: rgba(3,5,10,.72); backdrop-filter: blur(6px); }
.modal__card {
  position: relative; width: min(400px, 92vw); padding: 28px; border-radius: 20px;
  background: linear-gradient(180deg, #101a30, #0a1120); border: 1px solid rgba(217,178,90,.45);
  box-shadow: 0 40px 100px -30px #000; text-align: center; animation: rise .3s ease both;
}
.modal__close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--muted); font-size: 16px; cursor: pointer; }
.modal__close:hover { color: var(--gold); }
.modal__title { font-size: 18px; letter-spacing: .15em; color: var(--gold-soft); margin-bottom: 10px; }
.modal__price { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.modal__price b { color: var(--gold); font-size: 18px; }
.modal__qr img { width: 180px; height: 180px; object-fit: contain; border-radius: 12px; background: #fff; }
.qr-fallback { width: 200px; margin: 0 auto; padding: 24px 14px; border: 1px dashed var(--line); border-radius: 12px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.modal__tip { font-size: 12.5px; color: var(--muted); margin: 12px 0 14px; }
.modal__redeem { display: flex; gap: 8px; }
.modal__redeem input { flex: 1; background: rgba(9,14,26,.8); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; color: var(--ink); font-size: 15px; font-family: inherit; }
.modal__redeem input:focus { outline: none; border-color: var(--gold); }
.modal__redeem .cast-btn--sm { margin-top: 0; padding: 11px 20px; }
.modal__msg { min-height: 18px; margin-top: 10px; font-size: 13px; color: var(--gold-soft); }

/* ---------- 三款能量色壁纸 ---------- */
.wp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 6px; }
.wp-item { display: flex; flex-direction: column; gap: 10px; }
.wp-frame {
  position: relative; display: block; aspect-ratio: 9 / 17.5; overflow: hidden;
  border-radius: 22px; background: #05070d;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 24px 60px -22px #000, 0 0 44px -18px var(--c, #888), inset 0 0 0 4px #04060b;
}
.wp-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-loading { display: grid; place-items: center; cursor: default; }
.wp-loading span { font-size: 13px; color: var(--gold-soft); letter-spacing: .08em; animation: pulse-t 1.4s ease-in-out infinite; padding: 0 14px; text-align: center; }
.wp-label { text-align: center; font-size: 13.5px; color: var(--gold-soft); letter-spacing: .12em; }

/* ---------- 占位样例：现成图模糊垫底，先看到大概效果，点按钮才扣分 ---------- */
/* 高清示例直出，仅轻微压暗保证叠加按钮/文字可读；「示例效果」角标防误认 */
.wp-sample {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.72);
}
.wp-loading span { position: relative; z-index: 2; text-shadow: 0 2px 10px rgba(0,0,0,.85); }
.sample-badge {
  position: absolute; top: 10px; left: 10px; z-index: 2; font-style: normal; font-size: 11px;
  letter-spacing: .08em; padding: 3px 9px; border-radius: 999px;
  color: #ffe9c0; background: rgba(0,0,0,.55); border: 1px solid rgba(217,178,90,.5);
}
.cast-cost {
  display: block; text-align: center; font-style: normal; font-size: 12px;
  color: var(--muted); letter-spacing: .04em;
}
.card-sample {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--line); display: grid; place-items: center; background: #05070d;
}
.card-sample-inner { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.card-sample-inner b { color: var(--gold-soft); font-size: 17px; letter-spacing: .1em; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.card-sample-inner .cast-cost { color: #d8e2f5; text-shadow: 0 1px 8px rgba(0,0,0,.9); }
@media (max-width: 720px) { .wp-grid { grid-template-columns: 1fr; max-width: 320px; margin-left: auto; margin-right: auto; } }
.wp-bundle { text-align: center; margin-top: 16px; }

/* 预览水印角标 */
.card-item a { position: relative; display: block; }
.wm-badge {
  position: absolute; top: 8px; left: 8px; z-index: 3; font-size: 11px; letter-spacing: .08em;
  padding: 3px 9px; border-radius: 999px; color: #ffe9c0; background: rgba(0,0,0,.55); border: 1px solid rgba(217,178,90,.5);
}

@media (max-width: 560px) {
  .energy { grid-template-columns: 1fr; }
  .pillars { gap: 8px; }
}
