/* ══════════════════════════════════════════════════════════════
   命理通 · 玄学视觉系统 · 双主题(玄夜/宣纸)
   ══════════════════════════════════════════════════════════════ */
:root {
  --night: #0C0B12;
  --night-2: #14121D;
  --ink: #EDEAF2;
  --muted: #9B96A8;
  --border: #2E2B3A;
  --card: #1A1822;
  --card-2: #201D2B;
  --cinnabar: #E8836A;
  --cinnabar-deep: #A23E2C;
  --gold: #C9A227;
  --gold-soft: #E3C86B;
  --paper: #F6F1E5;
  --paper-ink: #2A2733;
  --paper-muted: #6B6455;
  --wood: #5FA97F; --fire: #E06A5A; --earth: #C79A6B; --metal: #D4B94E; --water: #6FA3D0;
  --glow: rgba(232, 131, 106, .35);
  --serif: "Noto Serif TC", "Noto Serif SC", "Songti TC", "Songti SC", "SimSun", serif;
  --sans: "Noto Sans TC", "Noto Sans SC", -apple-system, "PingFang TC", "PingFang SC", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
}
html[data-theme="paper"] {
  --night: #F4EEE1;
  --night-2: #FBF7EC;
  --ink: #2A2733;
  --muted: #6B6455;
  --border: #DDD3BE;
  --card: #FBF7EC;
  --card-2: #FFFDF6;
  --cinnabar: #A23E2C;
  --cinnabar-deep: #8A3122;
  --gold: #8A6E1F;
  --gold-soft: #8A6E1F;
  --wood: #2F7A55; --fire: #B84534; --earth: #8A6B42; --metal: #937C1E; --water: #2C5F8A;
  --glow: rgba(162, 62, 44, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font-family: var(--sans); line-height: 1.8; font-size: 16.5px;
  -webkit-font-smoothing: antialiased; position: relative; min-height: 100vh;
  transition: background .3s, color .3s;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(2px 2px at 12% 22%, rgba(255,252,244,.9) 40%, transparent 60%),
    radial-gradient(1.4px 1.4px at 31% 71%, rgba(237,234,242,.7) 40%, transparent 60%),
    radial-gradient(2.2px 2.2px at 47% 12%, rgba(227,200,107,.9) 40%, transparent 60%),
    radial-gradient(1.4px 1.4px at 63% 42%, rgba(237,234,242,.75) 40%, transparent 60%),
    radial-gradient(2px 2px at 78% 18%, rgba(255,252,244,.85) 40%, transparent 60%),
    radial-gradient(1.6px 1.6px at 87% 62%, rgba(232,131,106,.8) 40%, transparent 60%),
    radial-gradient(1.6px 1.6px at 22% 88%, rgba(237,234,242,.65) 40%, transparent 60%),
    radial-gradient(1.4px 1.4px at 55% 82%, rgba(227,200,107,.6) 40%, transparent 60%),
    radial-gradient(2px 2px at 70% 92%, rgba(237,234,242,.7) 40%, transparent 60%),
    radial-gradient(1.4px 1.4px at 92% 35%, rgba(237,234,242,.6) 40%, transparent 60%),
    radial-gradient(1.5px 1.5px at 5% 52%, rgba(255,252,244,.6) 40%, transparent 60%),
    radial-gradient(1.8px 1.8px at 40% 45%, rgba(237,234,242,.55) 40%, transparent 60%),
    radial-gradient(1.3px 1.3px at 17% 40%, rgba(237,234,242,.5) 40%, transparent 60%),
    radial-gradient(1.3px 1.3px at 83% 80%, rgba(227,200,107,.55) 40%, transparent 60%),
    radial-gradient(1.2px 1.2px at 50% 65%, rgba(237,234,242,.5) 40%, transparent 60%),
    radial-gradient(1.2px 1.2px at 8% 8%, rgba(237,234,242,.55) 40%, transparent 60%),
    radial-gradient(1.6px 1.6px at 95% 8%, rgba(237,234,242,.6) 40%, transparent 60%),
    radial-gradient(1.2px 1.2px at 36% 95%, rgba(237,234,242,.5) 40%, transparent 60%);
  animation: twinkle 5.5s ease-in-out infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    linear-gradient(115deg, transparent 38%, rgba(111,163,208,.06) 47%, rgba(237,234,242,.05) 50%, rgba(201,162,39,.05) 53%, transparent 62%),
    radial-gradient(55% 40% at 78% -8%, rgba(162,62,44,.28), transparent 68%),
    radial-gradient(45% 38% at 12% 108%, rgba(44,95,138,.25), transparent 68%),
    radial-gradient(30% 24% at 50% 45%, rgba(201,162,39,.08), transparent 75%),
    var(--night);
}
html[data-theme="paper"] body::before { display: none; }
html[data-theme="paper"] body::after {
  background:
    radial-gradient(80% 50% at 50% -10%, rgba(255,255,255,.85), transparent 60%),
    radial-gradient(40% 30% at 88% 100%, rgba(162,62,44,.05), transparent 70%),
    var(--night);
  animation: none;
}
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }

.meteor {
  position: fixed; z-index: -1; pointer-events: none; top: 8%; left: -12%;
  width: 130px; height: 1.5px; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(237,234,242,.9), rgba(232,131,106,.6));
  border-radius: 99px; transform: rotate(18deg);
  animation: meteor 11s linear infinite;
}
.meteor.m2 { top: 55%; left: -12%; width: 90px; animation-delay: 6.5s; animation-duration: 13s; transform: rotate(14deg); }
@keyframes meteor {
  0%, 88% { opacity: 0; transform: translateX(0) rotate(18deg); }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateX(130vw) rotate(18deg); }
}
html[data-theme="paper"] .meteor { display: none; }
@media (prefers-reduced-motion: reduce) {
  body::before, .meteor { animation: none !important; }
  .luopan *, .casting * { animation: none !important; }
  .scroll-paper { animation: none !important; clip-path: none !important; }
  .scroll-paper .stamp { animation: none !important; opacity: .85 !important; }
}

.wrap { max-width: 760px; margin: 0 auto; padding: 1.1rem 1.2rem 5rem; position: relative; }
a { color: var(--cinnabar); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.luopan {
  position: absolute; top: -60px; right: -110px; width: 360px; height: 360px;
  opacity: .22; z-index: -1; pointer-events: none;
  filter: drop-shadow(0 0 14px var(--glow));
}
html[data-theme="paper"] .luopan { opacity: .12; filter: none; }
.luopan .ring-slow { transform-origin: 50% 50%; animation: spin 120s linear infinite; }
.luopan .ring-fast { transform-origin: 50% 50%; animation: spin-rev 80s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }

nav.top {
  display: flex; align-items: center; gap: .9rem; padding: .8rem 0;
  border-bottom: 1px solid var(--border); margin-bottom: 1.4rem; flex-wrap: wrap;
}
nav.top .brand {
  display: flex; align-items: center; gap: .6rem; font-family: var(--serif);
  font-weight: 700; font-size: 1.18rem; color: var(--ink); letter-spacing: .04em;
}
nav.top .brand:hover { text-decoration: none; }
.seal {
  width: 36px; height: 36px; border-radius: 8px; flex: none;
  background: linear-gradient(145deg, #B04836, #7E2E20);
  box-shadow: 0 0 0 1px rgba(232,131,106,.35), 0 2px 12px var(--glow), inset 0 1px 0 rgba(255,255,255,.15);
  color: #F8E9E2; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 18px; font-weight: 700;
  animation: sealPulse 4s ease-in-out infinite;
}
@keyframes sealPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(232,131,106,.35), 0 2px 12px var(--glow), inset 0 1px 0 rgba(255,255,255,.15); }
  50% { box-shadow: 0 0 0 1px rgba(232,131,106,.55), 0 2px 22px var(--glow), inset 0 1px 0 rgba(255,255,255,.15); }
}
nav.top .links { margin-left: auto; display: flex; gap: .85rem; font-size: .9rem; flex-wrap: wrap; align-items: center; }
nav.top .links a { color: var(--muted); }
nav.top .links a:hover { color: var(--cinnabar); text-decoration: none; }
.lang-switch { display: flex; gap: .15rem; margin-left: .4rem; }
.lang-switch a { font-size: .72rem; color: var(--muted); border: 1px solid var(--border); border-radius: 99px; padding: .05rem .55rem; }
.lang-switch a.on { color: var(--gold-soft); border-color: var(--gold); }
.lang-switch a:hover { text-decoration: none; color: var(--gold-soft); }
#theme-btn {
  background: transparent; border: 1px solid var(--border); color: var(--gold-soft);
  border-radius: 99px; width: 30px; height: 30px; cursor: pointer; font-size: .95rem;
  line-height: 1; display: flex; align-items: center; justify-content: center;
}
#theme-btn:hover { border-color: var(--gold); }

.demo-banner {
  background: linear-gradient(90deg, rgba(162,62,44,.18), rgba(201,162,39,.08));
  border: 1px solid var(--border); border-left: 3px solid var(--cinnabar-deep);
  border-radius: 8px; padding: .55rem .9rem; font-size: .82rem; color: var(--muted);
  margin-bottom: 1.2rem;
}

h1 { font-family: var(--serif); font-size: 1.75rem; margin: .4rem 0 .9rem; letter-spacing: .02em; line-height: 1.4; }
h2 { font-family: var(--serif); font-size: 1.25rem; margin: 2.2rem 0 .9rem; padding-bottom: .45rem; position: relative; letter-spacing: .03em; }
h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: linear-gradient(90deg, var(--gold) 0 42px, var(--border) 42px); }
h3 { font-family: var(--serif); font-size: 1.05rem; color: var(--gold-soft); margin: 1.4rem 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.card {
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem 1.35rem;
  margin-bottom: 1.1rem; box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
html[data-theme="paper"] .card { box-shadow: 0 4px 16px rgba(90,70,40,.1); }
label { display: block; font-size: .85rem; color: var(--muted); margin: .85rem 0 .25rem; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=time], input[type=number], select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 9px;
  background: var(--night-2); color: var(--ink); font-size: .98rem; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
:root:not([data-theme="paper"]) input, :root:not([data-theme="paper"]) select, :root:not([data-theme="paper"]) textarea { color-scheme: dark; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cinnabar-deep); box-shadow: 0 0 0 3px var(--glow); }
textarea { resize: vertical; min-height: 74px; }
.row { display: flex; gap: .8rem; } .row > div { flex: 1; }
.btn {
  display: inline-block; border: none; border-radius: 10px; cursor: pointer;
  padding: .68rem 1.5rem; font-size: .98rem; font-family: inherit; margin-top: 1rem;
  background: linear-gradient(135deg, var(--cinnabar-deep), #8A3122);
  color: #F8E9E2; letter-spacing: .05em;
  box-shadow: 0 4px 16px rgba(162,62,44,.4), inset 0 1px 0 rgba(255,255,255,.14);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(162,62,44,.55), inset 0 1px 0 rgba(255,255,255,.14); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--gold-soft); border: 1px solid var(--gold); box-shadow: none; }
.btn.ghost:hover { background: rgba(201,162,39,.08); }
.btn.small { padding: .38rem 1rem; font-size: .85rem; margin-top: 0; }
.error { background: rgba(162,62,44,.16); border-left: 3px solid var(--cinnabar-deep); padding: .6rem .9rem; border-radius: 6px; font-size: .9rem; margin-bottom: 1rem; }
.info { background: rgba(95,169,127,.12); border-left: 3px solid var(--wood); padding: .6rem .9rem; border-radius: 6px; font-size: .9rem; margin-bottom: 1rem; }
.check { display: flex; align-items: center; gap: .5rem; margin-top: .85rem; font-size: .9rem; }
.check input { width: 17px; height: 17px; accent-color: var(--cinnabar-deep); }
.tag { display: inline-block; font-size: .7rem; border: 1px solid var(--border); color: var(--muted); border-radius: 99px; padding: .06rem .6rem; margin-left: .5rem; vertical-align: middle; letter-spacing: .06em; }
.tag.gold { color: var(--gold-soft); border-color: rgba(201,162,39,.5); }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: .7rem; margin: 1.3rem 0; }
.pillar {
  position: relative; text-align: center; padding: .9rem .3rem 1rem;
  background: linear-gradient(175deg, var(--card-2), var(--card));
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 6px 22px rgba(0,0,0,.4);
  transition: transform .2s, box-shadow .2s;
}
html[data-theme="paper"] .pillar { box-shadow: 0 4px 14px rgba(90,70,40,.12); }
.pillar:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 18px var(--glow); }
.pillar::before { content: ""; position: absolute; top: 0; left: 18%; right: 18%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.pillar .plabel { font-size: .72rem; color: var(--muted); letter-spacing: .35em; text-indent: .35em; }
.pillar .gz { font-family: var(--serif); font-size: 1.8rem; font-weight: 700; line-height: 1.32; margin: .35rem 0; }
.pillar .gz span { text-shadow: 0 0 18px currentColor; filter: saturate(1.1); }
html[data-theme="paper"] .pillar .gz span { text-shadow: none; }
.pillar .god { font-size: .76rem; color: var(--cinnabar); letter-spacing: .1em; }
.pillar .hide { font-size: .7rem; color: var(--muted); margin-top: .4rem; line-height: 1.6; }
.e-木 { color: var(--wood); } .e-火 { color: var(--fire); } .e-土 { color: var(--earth); }
.e-金 { color: var(--metal); } .e-水 { color: var(--water); }

.fe-bars { margin: 1rem 0 .4rem; }
.fe-row { display: flex; align-items: center; gap: .6rem; margin: .35rem 0; font-size: .9rem; }
.fe-row .fe-name { width: 1.5em; font-family: var(--serif); font-weight: 700; text-align: center; }
/* 英文界面:Wood / Metal / Water 比一个汉字宽得多,写死 1.5em 会压到进度条上
   (2026-08-21 Kai 截图)。英文单独放宽并左对齐,中文一个像素都不动。 */
html[lang="en"] .fe-row .fe-name { width: 3.4em; text-align: left; }
html[lang="en"] .dayun { min-width: 92px; }
html[lang="en"] .dayun .age { line-height: 1.35; }
.fe-track { flex: 1; height: 8px; background: var(--night-2); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.fe-fill { height: 100%; border-radius: 99px; box-shadow: 0 0 10px currentColor; }
html[data-theme="paper"] .fe-fill { box-shadow: none; }
.fe-count { width: 2em; text-align: right; color: var(--muted); font-size: .82rem; }

/* 大运:2026-08-21 从"横向滚动条"改成"换行铺满"(Kai 真机:一页显示不下要左右拖)。
   八步大运在手机上排成 4×2,一屏看完;宽屏自动一行排下。
   ⚠️ 别改回 overflow-x:auto —— 横向滚动在手机上既发现不了也不好点,
   而且 App 里滚动条是藏掉的,拖都不知道能拖。 */
.dayun-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: .5rem; padding: .3rem 0 .7rem; }
.dayun { min-width: 0; text-align: center; padding: .55rem .3rem; background: var(--card); border: 1px solid var(--border); border-radius: 10px; font-size: .82rem; }
.dayun .age { color: var(--muted); font-size: .72rem; }
.dayun .gz { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--gold-soft); }

/* ── 宣纸卷轴:1.5 秒匀滑展开,无中段卡顿;印章 1 秒时右上落款 ── */
/* 报告正文的"卷轴"。2026-08-21 修:原来**两个主题下都是米白宣纸**,
   于是深色主题的报告页一页里两种底色——上面「一句话说透」是深色卡,
   下面正文突然变成米白,看着像没适配完的 bug(Kai 真机截图)。
   卷轴这个视觉是要留的,所以做法是**深色主题用深色的卷轴**:
   同样的轴头、印章、展开动画,只是换成深色宣纸。 */
.scroll-paper {
  position: relative; background:
    radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.045), transparent 60%),
    linear-gradient(175deg, #1C1826, #191522 30%, #15121D);
  color: #E7E1D2; border-radius: 6px; padding: 1.8rem 1.7rem 1.6rem;
  margin: 1.2rem 0; font-family: var(--serif); font-size: 1.02rem; line-height: 2.02;
  border: 1px solid rgba(201,162,39,.22);
  box-shadow: 0 12px 40px rgba(0,0,0,.5), inset 0 0 70px rgba(201,162,39,.05);
  white-space: pre-wrap;
  animation: unroll 1.5s cubic-bezier(.3,.6,.3,1) both;
}
html[data-theme="paper"] .scroll-paper {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255,255,255,.5), transparent 60%),
    linear-gradient(175deg, #FAF6EC, #F6F1E5 30%, #EFE8D8);
  color: #2A2733; border: 1px solid #E3D9C2;
  box-shadow: 0 8px 26px rgba(90,70,40,.22), inset 0 0 60px rgba(180,160,120,.12);
}
@keyframes unroll {
  from { clip-path: inset(0 0 97% 0); transform: translateY(4px); }
  to { clip-path: inset(0 0 0 0); transform: translateY(0); }
}
.scroll-paper::before, .scroll-paper::after {
  content: ""; position: absolute; left: -6px; right: -6px; height: 12px;
  background: linear-gradient(90deg, #3A2F1F, #6B5A38 25%, #937D4E 50%, #6B5A38 75%, #43371F);
  border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.45);
}
html[data-theme="paper"] .scroll-paper::before,
html[data-theme="paper"] .scroll-paper::after {
  background: linear-gradient(90deg, #5E4C33, #9C8659 25%, #C9B182 50%, #9C8659 75%, #6E5B3F);
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.scroll-paper::before { top: -6px; }
.scroll-paper::after { bottom: -6px; }
.scroll-paper .stamp {
  position: absolute; right: 1.1rem; top: 1.1rem; width: 44px; height: 44px;
  border: 2px solid rgba(232,131,106,.7); border-radius: 6px; color: rgba(232,131,106,.8);
  font-family: var(--serif); font-size: 19px; font-weight: 700; line-height: 40px;
  text-align: center; transform: rotate(6deg); opacity: 0; pointer-events: none;
  animation: stampIn .45s ease 1s both;
}
html[data-theme="paper"] .scroll-paper .stamp {
  border-color: rgba(162,62,44,.75); color: rgba(162,62,44,.85);
}
@keyframes stampIn {
  0% { opacity: 0; transform: rotate(6deg) scale(1.6); }
  70% { opacity: .95; transform: rotate(6deg) scale(.92); }
  100% { opacity: .85; transform: rotate(6deg) scale(1); }
}

.casting { text-align: center; padding: 3.5rem 0 4rem; }
.casting .disc { position: relative; width: 150px; height: 150px; margin: 0 auto 1.6rem; filter: drop-shadow(0 0 18px var(--glow)); }
.casting .disc svg { width: 100%; height: 100%; }
.casting .r1 { transform-origin: 50% 50%; animation: spin 9s linear infinite; }
.casting .r2 { transform-origin: 50% 50%; animation: spin-rev 6s linear infinite; }
.casting .r3 { transform-origin: 50% 50%; animation: spin 3.5s linear infinite; }
.casting h1 { font-size: 1.3rem; }
.casting .steps { color: var(--muted); font-size: .88rem; min-height: 1.6em; }
.casting .steps span { display: inline-block; animation: fadeStep .5s ease; }
@keyframes fadeStep { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin: 1rem 0; }
.feature {
  display: block; background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.15rem; color: var(--ink);
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.feature:hover { text-decoration: none; border-color: rgba(201,162,39,.55); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.35), 0 0 16px rgba(201,162,39,.1); }
.feature .fname { font-family: var(--serif); font-weight: 700; letter-spacing: .04em; }
.feature .fdesc { font-size: .8rem; color: var(--muted); line-height: 1.6; margin-top: .25rem; }
.feature .fprice { font-size: .76rem; color: var(--gold-soft); margin-top: .35rem; letter-spacing: .05em; }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.plan { border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem; background: linear-gradient(160deg, var(--card-2), var(--card)); }
.plan.hot { border-color: rgba(201,162,39,.6); box-shadow: 0 0 24px rgba(201,162,39,.12); }
.plan .pname { font-weight: 700; font-family: var(--serif); letter-spacing: .04em; }
.plan .pprice { font-size: 1.65rem; font-family: var(--serif); margin: .3rem 0; color: var(--gold-soft); }
.plan ul { padding-left: 1.1rem; margin: .5rem 0; font-size: .86rem; color: var(--muted); }
.plan li { margin-bottom: .3rem; }

.zw-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, minmax(108px, auto));
  gap: 4px; margin: 1.2rem 0; border: 1px solid rgba(201,162,39,.35); border-radius: 12px;
  padding: 5px; background: rgba(201,162,39,.06);
}
.zw-cell {
  background: linear-gradient(170deg, var(--card-2), var(--card)); border: 1px solid var(--border);
  border-radius: 7px; padding: .45rem .5rem; font-size: .72rem; position: relative;
  display: flex; flex-direction: column; min-height: 108px;
}
.zw-cell.ming { border-color: var(--cinnabar-deep); box-shadow: inset 0 0 18px var(--glow); }
.zw-cell.shen::after {
  content: "身"; position: absolute; top: .35rem; right: .4rem; color: var(--gold-soft);
  border: 1px solid rgba(201,162,39,.6); border-radius: 4px; font-size: .62rem;
  padding: 0 .25rem; font-family: var(--serif);
}
.zw-center {
  grid-column: 2 / 4; grid-row: 2 / 4; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: .3rem;
  background: radial-gradient(80% 80% at 50% 40%, var(--card-2), var(--night-2));
  border: 1px solid rgba(201,162,39,.3); border-radius: 8px; padding: .8rem;
}
.zw-center .zc-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; letter-spacing: .1em; }
.zw-center .zc-sub { color: var(--gold-soft); font-family: var(--serif); font-size: .95rem; }
.zw-center .zc-meta { color: var(--muted); font-size: .74rem; line-height: 1.7; }
.zw-pname { font-family: var(--serif); color: var(--cinnabar); font-size: .78rem; letter-spacing: .08em; }
.zw-gz { color: var(--muted); font-size: .66rem; margin-left: .25rem; }
.zw-major { margin-top: .25rem; line-height: 1.55; }
.zw-major b { font-family: var(--serif); font-size: .85rem; color: var(--ink); font-weight: 700; }
.zw-bright { color: var(--muted); font-size: .62rem; }
.zw-mut { display: inline-block; font-size: .6rem; border-radius: 3px; padding: 0 .22rem; margin-left: .12rem; font-family: var(--serif); color: #0F0E15; background: var(--gold-soft); }
html[data-theme="paper"] .zw-mut { color: #FFF; }
.zw-mut.m忌 { background: var(--fire); color: #fff; }
.zw-mut.m禄, .zw-mut.m祿 { background: var(--wood); color: #fff; }
.zw-mut.m权, .zw-mut.m權 { background: var(--water); color: #fff; }
.zw-minor { color: var(--muted); font-size: .64rem; margin-top: auto; padding-top: .25rem; line-height: 1.5; }

.chat-box { display: flex; flex-direction: column; gap: .7rem; margin: 1rem 0; }
.msg { max-width: 86%; padding: .65rem .95rem; border-radius: 13px; font-size: .94rem; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, rgba(162,62,44,.35), rgba(162,62,44,.22)); border: 1px solid rgba(232,131,106,.3); }
html[data-theme="paper"] .msg.user { background: rgba(162,62,44,.1); }
.msg.assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--border); }

table.plain { width: 100%; border-collapse: collapse; font-size: .88rem; margin: .6rem 0 1rem; }
table.plain th { text-align: left; color: var(--gold-soft); font-weight: 500; font-size: .76rem; letter-spacing: .1em; padding: .45rem .5rem; border-bottom: 1px solid rgba(201,162,39,.35); font-family: var(--serif); }
table.plain td { padding: .55rem .5rem; border-bottom: 1px solid var(--border); }

.art-list { display: grid; gap: .7rem; margin: 1rem 0; }
.art-item { display: block; background: linear-gradient(160deg, var(--card-2), var(--card)); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.15rem; color: var(--ink); transition: border-color .2s; }
.art-item:hover { border-color: rgba(232,131,106,.5); text-decoration: none; }
.art-item .at { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; }
.art-item .ad { color: var(--muted); font-size: .82rem; margin-top: .2rem; line-height: 1.6; }
.art-cat { display: inline-block; font-size: .68rem; color: var(--gold-soft); border: 1px solid rgba(201,162,39,.4); border-radius: 99px; padding: .02rem .5rem; margin-bottom: .35rem; font-family: var(--serif); letter-spacing: .12em; }
.article-body { font-size: 1rem; line-height: 2; }
.article-body h2 { font-size: 1.15rem; margin: 1.8rem 0 .7rem; }
.article-body h3 { font-size: 1.02rem; }
.article-body p { margin: 0 0 1rem; }
.article-body ul { padding-left: 1.3rem; }
.article-body em { font-style: normal; color: var(--gold-soft); }

.suggest { position: relative; }
.suggest .sug-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: var(--night-2); border: 1px solid var(--border); border-radius: 9px; box-shadow: 0 14px 34px rgba(0,0,0,.6); max-height: 225px; overflow: auto; }
html[data-theme="paper"] .suggest .sug-list { box-shadow: 0 10px 26px rgba(90,70,40,.25); }
.suggest .sug-item { padding: .48rem .8rem; cursor: pointer; font-size: .92rem; }
.suggest .sug-item:hover { background: var(--card-2); }
.suggest .sug-item .s-tz { color: var(--muted); font-size: .76rem; margin-left: .5rem; }

.share-row { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .2rem; flex-wrap: wrap; }
.share-row .toast { font-size: .8rem; color: var(--wood); opacity: 0; transition: opacity .3s; }
.share-row .toast.on { opacity: 1; }

#gen-overlay {
  position: fixed; inset: 0; background: rgba(12,11,18,.92); z-index: 90;
  display: none; align-items: center; justify-content: center; flex-direction: column; gap: 1rem;
}
html[data-theme="paper"] #gen-overlay { background: rgba(244,238,225,.94); }
#gen-overlay .ring { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--gold); animation: spin 1.1s linear infinite; }
#gen-overlay p { color: var(--muted); font-size: .92rem; margin: 0; text-align: center; padding: 0 1.4rem; }
#gen-step { color: var(--fg) !important; font-family: var(--serif); font-size: 1.02rem !important; letter-spacing: .04em; }
#gen-bar { width: min(260px, 62vw); height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
#gen-bar > i { display: block; height: 100%; width: 2%; border-radius: 3px; background: var(--gold);
  transition: width .18s linear; }
#gen-patience { font-size: .8rem !important; opacity: .75; min-height: 1.1em; }
/* 分级徽章:速览 / 精算 / 大师。等级越高底色越"贵",但都压得住,不喧宾夺主 */
.tierbar { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem .7rem;
  margin: -.2rem 0 1rem; font-size: .82rem; }
.tier-badge { font-family: var(--serif); font-size: .86rem; letter-spacing: .12em;
  padding: .16rem .6rem; border-radius: 4px; border: 1px solid; }
.tier-note { color: var(--muted); }
.tier-meta { color: var(--muted); opacity: .8; }
.tier-glance .tier-badge { color: var(--muted); border-color: var(--border); }
.tier-precise .tier-badge { color: var(--gold); border-color: var(--gold-soft, #C9A227);
  background: rgba(201, 162, 39, .1); }
.tier-master .tier-badge { color: #E8836A; border-color: #E8836A;
  background: rgba(232, 131, 106, .12); }

/* 等待时轮播的命理词句:让人顺便学到点东西,而不是干等 */
#gen-lore { max-width: min(30rem, 84vw); line-height: 1.9; font-size: .86rem !important;
  opacity: 0; transition: opacity .26s ease; min-height: 3.4em; margin-top: .3rem !important; }

footer.site { margin-top: 3.6rem; padding-top: 1.3rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .78rem; text-align: center; line-height: 2; }
footer.site .fdiv { color: var(--gold); opacity: .75; font-family: var(--serif); letter-spacing: .6em; text-indent: .6em; margin-bottom: .3rem; }

@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .wrap { padding: .9rem .9rem 4rem; }
  .pillars { gap: .45rem; }
  .pillar .gz { font-size: 1.42rem; }
  .grid2, .plans { grid-template-columns: 1fr; }
  .row { flex-direction: column; gap: 0; }
  .luopan { width: 250px; height: 250px; right: -85px; }
  .zw-grid { grid-template-rows: repeat(4, minmax(92px, auto)); }
  .zw-cell { min-height: 92px; padding: .35rem .4rem; }
  .zw-center .zc-title { font-size: 1.05rem; }
  .scroll-paper { padding: 1.4rem 1.1rem 1.5rem; font-size: .97rem; }
}

/* 开篇「三句人话」高亮卡(2026-08-20):千字解读全是术语,新手第一屏就撞墙。
   把零术语的三句白话拎到最前面单独出卡,术语墙留给愿意往下读的人。 */
.tldr {
  position: relative; margin: 1.2rem 0 .2rem; padding: 1.1rem 1.3rem 1.15rem;
  border: 1px solid var(--gold-soft, #C9A227); border-left-width: 4px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(201,162,39,.10), rgba(201,162,39,.03));
  font-size: 1.06rem; line-height: 1.95; white-space: pre-wrap;
}
.tldr-h {
  font-family: var(--serif); font-size: .82rem; letter-spacing: .18em;
  color: var(--gold, #C9A227); text-transform: uppercase; margin-bottom: .5rem;
}
html[data-theme="paper"] .tldr { background: linear-gradient(180deg, rgba(201,162,39,.13), rgba(201,162,39,.04)); }


/* ── 卡片页的操作条:App 内**吸底悬浮**(2026-08-21 Kai 真机)──
   命格卡/相性卡的图很长,「保存海报 / 分享」原来跟在图后面,得一路滚到底才看得见。
   原生 App 里这类主操作是常驻在底部的,跟着内容走一眼就是网页。
   只在 App 内吸底;网页版保持原样(桌面上吸底反而奇怪)。 */
body.app-sticky-actions .share-row.sticky-actions {
  position: sticky; bottom: 0; z-index: 40;
  margin: 1rem -1.2rem 0; padding: .7rem 1.2rem calc(.7rem + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--night) 62%, transparent);
  display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}
body.app-sticky-actions .share-row.sticky-actions .btn { flex: 1 1 auto; text-align: center; }


/* ── 卡片图的边框与阴影(2026-08-21 Kai 真机)──
   原来阴影是内联写死的 `rgba(0,0,0,.55)`,那是照**深色底**调的。
   浅色主题下:卡片 PNG 是米黄的、页面也是米黄的,只隔着一条 #DDD3BE 的细线,
   于是整张卡"融进背景",看着不像一张卡。
   改成:深色底用冷黑阴影,浅色底用**暖褐色**阴影 + 更实的描边,把卡从纸上"托起来"。 */
.card-img {
  max-width: 100%; width: 420px; border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0,0,0,.55);
}
html[data-theme="paper"] .card-img {
  border-color: #C8B896;
  box-shadow: 0 10px 30px rgba(120,92,48,.28), 0 2px 6px rgba(120,92,48,.18);
}
