/* =========================================================
   秉文 · 命理 — 新中式 × 现代 三主题设计系统
   主题 A「宣纸」paper  /  主题 B「玄墨」ink  /  主题 C「玉青」jade
   ========================================================= */
:root { color-scheme: light; }
[data-theme="ink"] { color-scheme: dark; }
[data-theme="jade"] { color-scheme: light; }

/* ---------- 主题令牌 ---------- */
[data-theme="paper"] {
  --bg:            #efe6d3;
  --bg-grain:      radial-gradient(circle at 20% 12%, rgba(176,138,62,.08), transparent 42%),
                   radial-gradient(circle at 86% 78%, rgba(166,58,43,.07), transparent 46%);
  --surface:       #fbf6ea;
  --surface-2:     #f4ecd9;
  --ink:           #31261b;
  --ink-soft:      #6f5f49;
  --muted:         #98866c;
  --line:          rgba(122,95,55,.16);
  --line-strong:   rgba(122,95,55,.34);
  --red:           #a63a2b;   /* 朱砂 */
  --red-deep:      #8b2f22;
  --red-soft:      rgba(166,58,43,.09);
  --gold:          #a67c2e;   /* 古金 */
  --gold-soft:     rgba(166,124,46,.12);
  --jade:          #3d6b56;   /* 黛青 */
  --jade-soft:     rgba(61,107,86,.12);
  --violet:        #6c5c8f;
  --violet-soft:   rgba(108,92,143,.12);
  --badge-yi:      #2f6b47;
  --badge-ji:      var(--red);
  --shadow:        0 14px 34px -22px rgba(80,55,20,.45), 0 3px 10px -6px rgba(80,55,20,.18);
  --shadow-sm:     0 6px 16px -10px rgba(80,55,20,.4);
  --hero-grad:     linear-gradient(150deg, #fdf8ec 0%, #f6ecda 55%, #f1e2c8 100%);
  --seat:          #3a2a1a;
  --today-ring:    rgba(166,58,43,.65);
  --grid-hover:    rgba(166,124,46,.1);
}

[data-theme="jade"] {
  --bg:            #e8ede6;
  --bg-grain:      radial-gradient(circle at 20% 12%, rgba(47,107,79,.07), transparent 42%),
                   radial-gradient(circle at 86% 78%, rgba(168,132,58,.06), transparent 46%);
  --surface:       #f7faf5;
  --surface-2:     #edf2ea;
  --ink:           #22352b;
  --ink-soft:      #55705f;
  --muted:         #7d9384;
  --line:          rgba(47,107,79,.16);
  --line-strong:   rgba(47,107,79,.38);
  --red:           #9c4a3c;
  --red-deep:      #7f3a2f;
  --red-soft:      rgba(156,74,60,.09);
  --gold:          #a8843a;
  --gold-soft:     rgba(168,132,58,.12);
  --jade:          #2f6b4f;
  --jade-soft:     rgba(47,107,79,.12);
  --violet:        #6b648f;
  --violet-soft:   rgba(107,100,143,.12);
  --badge-yi:      #2f6b4f;
  --badge-ji:      var(--red);
  --shadow:        0 14px 34px -22px rgba(47,107,79,.4), 0 3px 10px -6px rgba(47,107,79,.15);
  --shadow-sm:     0 6px 16px -10px rgba(47,107,79,.35);
  --hero-grad:     linear-gradient(150deg, #fafcf8 0%, #eef4ec 55%, #e4ece2 100%);
  --seat:          #22352b;
  --today-ring:    rgba(47,107,79,.62);
  --grid-hover:    rgba(47,107,79,.1);
}

[data-theme="ink"] {
  --bg:            #121009;
  --bg-grain:      radial-gradient(circle at 18% 10%, rgba(201,160,92,.10), transparent 40%),
                   radial-gradient(circle at 88% 82%, rgba(201,96,78,.08), transparent 46%);
  --surface:       #1c1912;
  --surface-2:     #262117;
  --ink:           #e7d9bd;
  --ink-soft:      #b3a183;
  --muted:         #84755b;
  --line:          rgba(222,192,140,.14);
  --line-strong:   rgba(222,192,140,.34);
  --red:           #cf6a55;
  --red-deep:      #e0816c;
  --red-soft:      rgba(207,106,85,.14);
  --gold:          #c9a05c;
  --gold-soft:     rgba(201,160,92,.14);
  --jade:          #8faf82;
  --jade-soft:     rgba(143,175,130,.14);
  --violet:        #b3a3d6;
  --violet-soft:   rgba(179,163,214,.14);
  --badge-yi:      #93bb8d;
  --badge-ji:      #e08b76;
  --shadow:        0 18px 40px -20px rgba(0,0,0,.7), 0 3px 12px -6px rgba(0,0,0,.5);
  --shadow-sm:     0 8px 18px -12px rgba(0,0,0,.6);
  --hero-grad:     linear-gradient(150deg, #241f15 0%, #1c1912 60%, #17130d 100%);
  --seat:          #f0e2c4;
  --today-ring:    rgba(207,106,85,.75);
  --grid-hover:    rgba(201,160,92,.12);
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
/* 用 min-height: 100dvh 代替 height: 100%：
   - body 必须能自然扩展到比视口高，这样底部的 padding-bottom 才有意义
   - height: 100% + padding 在 border-box 下会挤掉 padding，导致底部空间为 0
   - 100dvh 兼容 iOS Safari 地址栏伸缩（dvh = dynamic viewport height）*/
html { min-height: 100dvh; min-height: 100vh; overflow-x: hidden; }
body { min-height: 100dvh; min-height: 100vh; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, system-ui, sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-grain);
  color: var(--ink);
  transition: background-color .45s ease, color .45s ease;
  -webkit-font-smoothing: antialiased;
}
.serif, .lunar-big { font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif; }

.stage { max-width: var(--stage-w, 600px); margin: 0 auto; padding: 18px 14px calc(30px + env(safe-area-inset-bottom)); overflow-x: hidden; }
.app { display: flex; flex-direction: column; gap: 14px; }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px; }
.brand { display: flex; align-items: center; gap: 11px; }
.seal {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--red), var(--red-deep));
  color: var(--surface); font-size: 22px; font-family: "Songti SC", serif; font-weight: 700;
  border-radius: 10px 10px 10px 3px;
  box-shadow: 0 6px 14px -6px rgba(150,40,25,.55), inset 0 0 0 1px rgba(255,235,200,.35);
  transform: rotate(-2deg);
}
.brand-text b { display: block; font-size: 19px; letter-spacing: .14em; font-family: "Songti SC", serif; }
.brand-text small { font-size: 10px; letter-spacing: .22em; color: var(--muted); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); cursor: pointer;
  display: grid; place-items: center; transition: all .25s;
}
.icon-btn:hover { color: var(--red); border-color: var(--line-strong); transform: rotate(8deg); }

/* ---------- Hero 大卡 ---------- */
.hero {
  position: relative; border-radius: 22px; padding: 20px 22px 18px;
  background: var(--hero-grad);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -34px; top: -38px; width: 150px; height: 150px;
  border-radius: 50%; border: 1.5px dashed var(--line-strong); opacity: .55; pointer-events: none;
}
.hero-main { display: flex; align-items: center; gap: 20px; }
.hero-solar { display: flex; align-items: center; gap: 12px; min-width: 128px; }
.hero-day {
  font-size: 64px; line-height: 1; font-weight: 300; color: var(--seat);
  font-variant-numeric: tabular-nums; letter-spacing: -2px;
}
[data-theme="ink"] .hero-day { color: var(--gold); }
.hero-sub b { display: block; font-size: 15px; font-weight: 600; }
.hero-sub span { font-size: 12px; color: var(--muted); }
.hero-divider { width: 1px; align-self: stretch; background: linear-gradient(180deg, transparent, var(--line-strong), transparent); }
.hero-lunar { flex: 1; min-width: 0; }
.hl-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chip-chip {
  font-size: 11px; padding: 2px 9px; border-radius: 999px;
  background: var(--red-soft); color: var(--red); border: 1px solid transparent; white-space: nowrap;
}
.hl-top > span:not(.chip-chip) { font-size: 12px; color: var(--muted); }
.hl-big { font-size: 27px; font-weight: 600; font-family: "Songti SC", serif; letter-spacing: .04em; color: var(--seat); }
[data-theme="ink"] .hl-big { color: var(--ink); }
.hl-tags { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px; padding: 3px 9px; border-radius: 7px; white-space: nowrap;
  background: var(--gold-soft); color: var(--gold); border: 1px solid var(--line);
}
.tag.holiday { background: var(--red-soft); color: var(--red); border-color: transparent; font-weight: 600; }
.tag.jieqi  { background: var(--jade-soft); color: var(--jade); border-color: transparent; }
.hero-quote {
  margin-top: 13px; padding-top: 11px; border-top: 1px dashed var(--line-strong);
  font-size: 13.5px; line-height: 1.65; color: var(--ink-soft);
  font-family: "Songti SC", serif;
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; padding: 5px; gap: 5px; box-shadow: var(--shadow-sm);
}
.tab {
  flex: 1 1 0%; min-width: 0; padding: 10px 2px; border: 0; background: transparent; color: var(--muted);
  font-size: 13.5px; line-height: 1.3; white-space: nowrap; border-radius: 12px; cursor: pointer; transition: all .25s; font-weight: 500;
  text-align: center; overflow: hidden;
}
.tab.on { background: linear-gradient(140deg, var(--red), var(--red-deep)); color: var(--surface); box-shadow: 0 6px 14px -8px rgba(150,40,25,.6); }
.tab:not(.on):hover { color: var(--red); background: var(--red-soft); }

/* ---------- 视图通用 ---------- */
.view { display: flex; flex-direction: column; gap: 13px; animation: rise .35s ease; }
/* 五重保险隐藏：任何一条生效就能保证不可见，避免移动端浏览器在 flex/grid 容器里忽略 display:none 时的穿透问题 */
.hidden { display: none !important; visibility: hidden !important; pointer-events: none !important; opacity: 0 !important; height: 0 !important; overflow: hidden !important; }
.view.hidden { display: none !important; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px 17px; box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 12.5px; letter-spacing: .14em; color: var(--muted); font-weight: 600;
  margin-bottom: 11px; display: flex; align-items: center; gap: 7px;
}
.card-title::before { content: ""; width: 4px; height: 13px; border-radius: 2px; background: linear-gradient(var(--red), var(--gold)); }

/* ---------- 月历 ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; }
.nav-btn {
  width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-size: 20px; cursor: pointer; transition: all .2s; line-height: 1;
}
.nav-btn:hover { color: var(--red); border-color: var(--line-strong); }
.cal-title { text-align: center; }
.cal-title b { display: block; font-size: 18px; letter-spacing: .06em; font-family: "Songti SC", serif; }
.cal-title span { font-size: 12px; color: var(--muted); }

.week-row { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 2px; }
.week-row span { text-align: center; font-size: 12px; color: var(--muted); padding: 6px 0; letter-spacing: .08em; }
.week-row span:nth-child(-n+5) { /* 周一~五 */ }
.week-row span:last-child { color: var(--red); opacity: .85; }

.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
  background: var(--surface); padding: 11px 10px; border-radius: 18px; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.cell {
  position: relative; aspect-ratio: .8; border-radius: 12px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid transparent; transition: all .18s; overflow: hidden;
}
.cell:hover { background: var(--grid-hover); }
.cell.other { opacity: .32; }
.cell.sun .num { color: var(--red); }
.cell .num { font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1; color: var(--seat); }
[data-theme="ink"] .cell .num { color: var(--ink); }
.cell .lun {
  font-size: 10px; color: var(--muted); font-family: "Songti SC", serif; line-height: 1.1;
  max-width: 100%; padding: 0 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell .lun.fest { color: var(--gold); font-size: 9px; font-weight: 600; letter-spacing: 0; }
.cell .lun.jq   { color: var(--red);  font-size: 9px; font-weight: 600; letter-spacing: 0; }
/* 第三层：建除十二值星 + 黄道（金点）/黑道（墨点） */
.cell .zhi {
  display: inline-flex; align-items: center; gap: 2px; font-size: 9px; line-height: 1.1;
  font-family: "Songti SC", serif; color: var(--muted); letter-spacing: .02em;
}
.cell .zhi .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: .6; flex: none; }
.cell .zhi.huang { color: var(--gold); }
.cell .zhi.huang .dot { background: var(--gold); opacity: 1; }
.cell .zhi.hei .dot { background: var(--ink-soft); opacity: .55; }
/* 休 / 班（法定节假日区间角标） */
.cell .hb {
  position: absolute; top: 1px; right: 1px; padding: 1px 2px; border-radius: 4px;
  font-size: 8px; line-height: 1; font-weight: 600; letter-spacing: 0;
}
.cell .hb.rest { color: var(--red); background: var(--red-soft); }
.cell .hb.work { color: var(--muted); background: var(--gold-soft); }
.cell.today { box-shadow: inset 0 0 0 1.5px var(--today-ring); }
.cell.today .num { color: var(--red); }
.cell.sel {
  background: linear-gradient(150deg, var(--red), var(--red-deep)); border-color: transparent;
  box-shadow: 0 8px 16px -9px rgba(150,40,25,.65);
}
.cell.sel .num, .cell.sel .lun,
.cell.sel .lun.fest, .cell.sel .lun.jq { color: var(--surface); }
.cell.sel .zhi, .cell.sel .zhi.huang { color: var(--surface); }
.cell.sel .zhi .dot, .cell.sel .zhi.huang .dot, .cell.sel .zhi.hei .dot { background: var(--surface); opacity: .85; }
.cell.sel .hb.rest { color: var(--surface); background: color-mix(in srgb, var(--surface) 18%, transparent); }
.cell.sel .hb.work { color: var(--surface); background: color-mix(in srgb, var(--surface) 18%, transparent); }

.today-btn {
  align-self: center; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-size: 12.5px; padding: 8px 20px; border-radius: 999px; cursor: pointer; transition: all .2s; letter-spacing: .12em;
}
.today-btn:hover { color: var(--red); border-color: var(--red); }

/* ---------- 黄历：宜忌 ---------- */
.hl-doc-head h2 { font-size: 20px; font-family: "Songti SC", serif; letter-spacing: .03em; }
.hl-doc-head p { font-size: 12.5px; margin-top: 4px; }
.yiji { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.yiji-col h3 {
  display: flex; align-items: center; gap: 7px; font-size: 15px; margin-bottom: 10px;
  font-family: "Songti SC", serif; letter-spacing: .2em;
}
.yiji-col h3 i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; color: var(--surface); }
.yiji-col.yi h3 i { background: linear-gradient(140deg, #3f8260, var(--badge-yi)); }
.yiji-col.ji h3 i { background: linear-gradient(140deg, var(--red), var(--red-deep)); }
.yiji-col.yi h3 { color: var(--badge-yi); }
.yiji-col.ji h3 { color: var(--badge-ji); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; align-content: flex-start; }
.chip {
  font-size: 12.5px; padding: 6px 12px; border-radius: 10px; cursor: default; transition: all .15s;
  font-family: "Songti SC", serif; line-height: 1.35;
}
.chip:hover { transform: translateY(-1px); }
.chip.ok  { background: var(--jade-soft); color: var(--jade); border: 1px solid transparent; }
.chip.no  { background: var(--red-soft); color: var(--red); border: 1px solid transparent; }
.yiji-col.ji .chip.no { background: var(--red-soft); }
.empty-note { font-size: 12.5px; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.tagtext { font-size: 13px; line-height: 1.75; color: var(--ink-soft); font-family: "Songti SC", serif; }

/* 方位盘 */
.pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pos-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.pos-item .arrow { color: var(--red); font-size: 14px; width: 18px; text-align: center; }
.pos-item .dir {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; font-family: "Songti SC", serif;
  background: radial-gradient(circle at 34% 30%, var(--gold-soft), transparent 90%), var(--red-soft);
  color: var(--red); border: 1px solid var(--line-strong);
}
.pos-item .lbl { flex: 1; font-size: 13px; }
.pos-item .lbl small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }

/* 彭祖 */
.pengzu { font-size: 14px; line-height: 1.9; color: var(--ink-soft); font-family: "Songti SC", serif; }

/* 元数据表 */
.meta-list { display: flex; flex-direction: column; gap: 0; }
.meta-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 2px; border-bottom: 1px dashed var(--line); }
.meta-row:last-child { border-bottom: 0; }
.meta-row .k { font-size: 13px; color: var(--muted); }
.meta-row .v { font-size: 13.5px; color: var(--ink); font-family: "Songti SC", serif; }

/* ---------- 八字 ---------- */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; letter-spacing: .06em; }
.form-row.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type="datetime-local"] {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--ink); font-size: 14px; outline: none; transition: border .2s;
  font-family: inherit;
}
input[type="datetime-local"]:focus { border-color: var(--red); }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.seg button {
  flex: 1; padding: 10px 6px; border: 0; background: transparent; color: var(--ink-soft);
  font-size: 13px; cursor: pointer; transition: all .2s; font-family: inherit;
}
.seg button.on { background: linear-gradient(140deg, var(--red), var(--red-deep)); color: var(--surface); }

.pz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pz-col {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 13px 6px 12px; text-align: center; position: relative; overflow: hidden;
}
.pz-col::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}
.pz-col .pz-label { font-size: 11px; color: var(--muted); letter-spacing: .3em; margin-bottom: 8px; }
.pz-col .pz-ganzhi { font-size: 24px; font-weight: 700; font-family: "Songti SC", serif; letter-spacing: .08em; line-height: 1.25; }
.pz-col .pz-shishen { font-size: 10.5px; color: var(--red); margin-top: 7px; letter-spacing: .08em; min-height: 15px; }
.pz-col .pz-nayin { font-size: 10.5px; color: var(--muted); margin-top: 3px; letter-spacing: .05em; min-height: 14px; }
.pz-col .pz-hide { font-size: 10px; color: var(--ink-soft); margin-top: 4px; letter-spacing: .05em; min-height: 13px; }
.pz-title { font-family: "Songti SC", serif; letter-spacing: .1em; }
.yun-card { display: flex; flex-direction: column; gap: 9px; }
.yun-line { font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.yun-line b { color: var(--red); font-family: "Songti SC", serif; font-size: 15px; }
.rail { display: flex; gap: 7px; overflow-x: auto; padding: 6px 1px 4px; scrollbar-width: thin; }
.rail::-webkit-scrollbar { height: 5px; }
.rail::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }
.dayun {
  flex: 0 0 auto; width: 108px; border-radius: 14px; padding: 11px 8px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--line); position: relative;
}
.dayun .du-age { font-size: 11px; color: var(--muted); }
.dayun .du-gz { font-size: 19px; font-family: "Songti SC", serif; font-weight: 700; margin: 6px 0 4px; letter-spacing: .1em; }
.dayun .du-year { font-size: 10px; color: var(--muted); }
.dayun.cur { border-color: var(--red); background: linear-gradient(160deg, var(--red-soft), transparent 70%); }
.dayun.cur .du-gz { color: var(--red); }

/* ---------- 其他 ---------- */
.muted { color: var(--muted); }
.foot { text-align: center; font-size: 11px; letter-spacing: .06em; padding: 6px 0 2px; line-height: 1.8; }
/* 页脚合规入口：隐私政策 / 用户服务协议 / 免责声明（独立 URL，供备案与上架审核访问） */
.foot-links { display: block; margin-top: 5px; }
.foot-links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.foot-links a + a { margin-left: 11px; }
.foot-links a:hover { color: var(--red); border-bottom-color: var(--red); }
@media (max-width: 380px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-main { gap: 14px; }
  .hero-day { font-size: 54px; }
  /* 极窄屏（≤380px）格宽收窄，三层内容会顶到格高上限 → 放宽高宽比留出余量 */
  .cell { aspect-ratio: .72; }
}

/* ---------- 五层应期（大运/流年/流月/流日/流时） ---------- */
.wl-note { font-size: 10.5px; color: var(--muted); line-height: 1.65; margin-bottom: 11px; }
.wl-layer { margin-top: 13px; }
.wl-label { font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: .12em; }
.wl-items { display: flex; flex-wrap: wrap; gap: 8px; }
.wl-node {
  flex: 0 0 96px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px;
  text-align: center; cursor: pointer; background: var(--surface-2); transition: all .16s;
}
.wl-node:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.wl-node.disp { cursor: default; opacity: .55; }
.wl-node.j-吉 { border-color: rgba(61,107,86,.5); }
.wl-node.j-凶 { border-color: rgba(166,58,43,.45); }
.wl-node.j-平 { border-color: var(--line); }
.wl-node.cur { box-shadow: 0 0 0 1.5px var(--today-ring); }
.wl-gz { font-family: "Songti SC", serif; font-size: 17px; font-weight: 700; letter-spacing: .06em; }
.wl-sub { font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.wl-ss { font-size: 10px; color: var(--red); letter-spacing: .05em; min-height: 12px; }
.wl-read { font-size: 9.5px; color: var(--ink-soft); margin-top: 3px; line-height: 1.35; text-align: left; }
.wl-days .wl-node { flex-basis: 74px; }

/* ---------- 紫微斗数盘面 ---------- */
.zw-top { display: flex; flex-wrap: wrap; gap: 10px; }
.zw-top .kpi { flex: 1; min-width: 96px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; }
.zw-top .kpi small { display: block; font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.zw-top .kpi b { font-family: "Songti SC", serif; font-size: 15px; }
.zw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.zw-palace {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 4px 10px; text-align: center; cursor: pointer; transition: all .15s; min-height: 96px;
}
.zw-palace:hover { box-shadow: var(--shadow-sm); }
.zw-palace.sel { box-shadow: 0 0 0 1.5px var(--today-ring); }
.zw-palace.ming { border-color: var(--red); box-shadow: 0 0 0 1.5px var(--today-ring); }
.zw-palace .zp-zhi { position: absolute; top: 3px; left: 5px; font-size: 9px; color: var(--muted); font-family: "Songti SC", serif; }
.zw-palace .zp-name { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.zw-palace .zp-gz { font-size: 10px; color: var(--muted); margin: 0 0 2px; }
.zw-palace .zp-stars { font-family: "Songti SC", serif; font-size: 12.5px; color: var(--ink); line-height: 1.35; min-height: 17px; }
.zw-palace .zp-stars .mu { font-size: 9.5px; margin-left: 1px; }
.zw-palace .zp-stars .mu-lu { color: #3f9b5a; }
.zw-palace .zp-stars .mu-quan { color: #c94f3d; }
.zw-palace .zp-stars .mu-ke { color: #3a6ea5; }
.zw-palace .zp-stars .mu-ji { color: #9a8b6f; }
.zw-palace .zp-minor { font-size: 9px; color: var(--ink-soft); margin-top: 2px; min-height: 11px; }
.zw-palace .zp-age { position: absolute; bottom: 3px; right: 5px; font-size: 9px; color: var(--gold); }
.zw-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: 12px; min-height: 96px;
}
.zw-center small { font-size: 9px; color: var(--muted); letter-spacing: .08em; }
.zw-center b { font-family: "Songti SC", serif; font-size: 13px; margin-top: 2px; }
.zw-read { margin-top: 10px; font-family: "Songti SC", serif; font-size: 13.5px; line-height: 1.8; color: var(--ink-soft); }
@media (max-width: 380px) { .zw-grid { grid-template-columns: repeat(3, 1fr); } }
@media print {
  body { background: #fff !important; }
  .topbar, .hero, .tabs, #view-calendar, #view-huangli, #view-bazi { display: none !important; }
  #view-ziwei .form-card, #zwReportBtn { display: none !important; }
  #zwReport { display: block !important; }
}

/* ---------- 商业化 SKU 与付费门 ---------- */
.sku-list { display: flex; flex-direction: column; gap: 9px; }
.sku {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.sku b { font-size: 13.5px; font-family: "Songti SC", serif; }
.sku b em.sku-first { font-style: normal; font-size: 10px; color: var(--red); border: 1px solid var(--red); border-radius: var(--r, 4px); padding: 1px 4px; margin-left: 4px; vertical-align: 1px; }
.sku small { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.sku-r { margin-left: auto; text-align: right; white-space: nowrap; }
.sku .price { font-size: 14px; font-weight: 700; color: var(--red); }
.sku .price s { color: var(--muted); font-weight: 400; font-size: 11px; }
.sku-btn {
  display: inline-block; margin-left: 8px; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--red); color: var(--red); background: transparent; font-size: 12px; transition: all .2s;
}
.sku-btn:hover { background: var(--red-soft); }
.sku-btn.owned { border-color: var(--line); color: var(--muted); cursor: default; }
.sku-btn.buy { background: linear-gradient(140deg, var(--red), var(--red-deep)); color: var(--surface); border: 0; padding: 8px 16px; }
.modal {
  position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center;
  background: rgba(18,13,6,.56); backdrop-filter: blur(3px); padding: 20px;
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal.hidden { display: none; }
.modal-card {
  position: relative;
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-xl, 18px);
  padding: 22px; box-shadow: var(--shadow);
  animation: cardIn .22s cubic-bezier(.2,.7,.3,1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card h4 { font-family: "Songti SC", serif; font-size: 17px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 26px; height: 26px;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface-2);
  color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--red); border-color: var(--red); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* 三档会员选择 */
.pay-tier {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface-2); cursor: pointer; transition: all .18s;
}
.pay-tier:hover { border-color: var(--gold); }
.pay-tier input { margin: 0; accent-color: var(--red); }
.pay-tier input:checked { accent-color: var(--red); }
.pay-tier:has(input:checked) { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 0 2px rgba(166,58,43,.15); }
.pay-tier.hot { position: relative; border-color: var(--gold); }
.pay-tier.hot::before {
  content: '推荐'; position: absolute; top: -10px; right: 12px;
  background: var(--gold); color: #14110b; font-size: 10px; padding: 2px 8px; border-radius: 8px;
}
.pay-tier .pt-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pay-tier .pt-info b { font-size: 14px; color: var(--ink); }
.pay-tier .pt-info small { font-size: 11px; }
.pay-tier .pt-tag {
  display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: var(--gold-soft); color: var(--gold); margin-left: 4px; font-weight: 500;
}
.pay-tier .pt-price { display: flex; flex-direction: column; align-items: flex-end; gap: 0; }
.pay-tier .pt-price b { font-size: 20px; color: var(--red); font-family: "Songti SC", serif; }
.pay-tier .pt-price small { font-size: 10.5px; }
.pay-tier .pt-old { font-size: 11px !important; text-decoration: line-through; color: var(--muted); margin-left: 4px; }

/* 试读式付费墙（A）：不整块糊掉，露真实内容 + 底部渐隐截断。
   交付权益与感知权益的落差，多半卡在"用户看不见"——
   先让他读到真东西，再用胶囊告诉他"还差 X 项"（文案由 data-lock 传入） */
.paywall-teaser {
  position: relative; overflow: hidden; max-height: 140px;
}
.paywall-teaser::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 68%;
  /* 用主题变量收尾，深浅色下都不会糊成一块白 */
  background: linear-gradient(180deg, transparent 0%, var(--surface) 58%, var(--surface) 100%);
  z-index: 2; pointer-events: none;
}
.paywall-teaser::after {
  content: attr(data-lock); position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: var(--surface); font-size: 11.5px; padding: 5px 13px; border-radius: 16px;
  white-space: nowrap; z-index: 3; cursor: pointer; box-shadow: 0 4px 12px -4px rgba(166,58,43,.5);
  pointer-events: auto;
}

/* 权益对比表（行由 js/app.js 依 SHOP.ENTITLEMENTS 渲染，故样式在此统一定义） */
.pay-compare .pc-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 6px 10px; border-top: 1px solid var(--line); align-items: center;
}
.pay-compare .pc-row > div { text-align: center; }
.pay-compare .pc-row > div:first-child { text-align: left; }
.pay-compare .pc-dim { color: var(--muted); }

/* 支付到手清单（B）：付完立刻给出"到手了什么 / 去哪看" */
.gain-list { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gain-list li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: var(--ink-1, var(--ink)); line-height: 1.5;
  background: var(--gold-soft); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px;
}
.gain-list li::before { content: '得'; color: var(--red); font-weight: 700; flex: none; }
.gain-where {
  font-size: 11.5px; color: var(--muted); line-height: 1.7;
  background: var(--surface-2); border-radius: var(--r); padding: 8px 10px;
}


/* 古籍溯源标签 */
.src-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10.5px; color: var(--muted); background: var(--surface-2);
  padding: 1px 7px; border-radius: 8px; border: 1px solid var(--line);
  cursor: help; vertical-align: middle; margin-left: 4px;
  transition: all .15s;
}
.src-tag:hover { color: var(--gold); border-color: var(--gold); background: var(--gold-soft); }

/* 袁天罡称骨卡片 */
.cheng-gu-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--line-strong); border-radius: 16px;
  padding: 14px 16px; margin-top: 12px;
  position: relative; overflow: hidden;
}
.cheng-gu-card::before {
  content: '骨'; position: absolute; top: -8px; right: -8px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--gold); color: #14110b; font-size: 18px; font-family: "Songti SC", serif;
  display: flex; align-items: center; justify-content: center; opacity: .85;
}
.cheng-gu-card .cg-title {
  font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px;
  display: flex; align-items: center; gap: 8px;
}
.cheng-gu-card .cg-weight {
  font-size: 22px; font-family: "Songti SC", serif; color: var(--red);
}
.cheng-gu-card .cg-ge {
  font-size: 11px; color: var(--muted); margin-top: 2px;
}
.cheng-gu-card .cg-poem {
  font-family: "Songti SC", serif; font-size: 13px; line-height: 1.8;
  color: var(--ink); margin-top: 10px; padding: 10px 12px;
  background: var(--surface); border-radius: 8px; border-left: 3px solid var(--gold);
}

/* 课程正文排版 */
.course-body { margin-top: 12px; font-size: 13.5px; line-height: 1.9; color: var(--ink-soft); }
.course-body p { margin: 0 0 12px; }
.course-body p:last-child { margin-bottom: 0; }
.course-body .q {
  border-left: 3px solid var(--gold); background: var(--gold-soft);
  padding: 10px 14px; border-radius: 0 10px 10px 0;
  font-family: "Songti SC", serif; color: var(--ink); font-size: 14px;
}
.course-body .q small { display: block; margin-top: 6px; font-size: 11px; color: var(--muted); font-family: inherit; }
.course-body .warn { color: var(--red); font-weight: 600; }
.geo-row { display: flex; gap: 6px; }
.geo-row select { flex: 1; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); font-size: 13px; font-family: inherit; }


/* 出生时间三历法 tab */
.mini-tab { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; font-size: 12.5px; margin-right: 6px; }
.mini-tab.active { background: var(--red); color: var(--surface); border-color: var(--red); }
/* 四柱预览：flex 布局必须由 CSS 兜底（切换历法时 JS 会清空 inline style，否则退化为 block 导致 chip 溢出堆叠） */
.bz-preview { display: flex; gap: 10px; flex-wrap: wrap; }

/* 古籍参考卡片引用块 */
.gj-quote { border-left: 3px solid var(--red); background: color-mix(in srgb, var(--red) 6%, transparent); padding: 10px 12px; border-radius: 0 10px 10px 0; font-size: 13px; line-height: 1.75; color: var(--ink); }

/* 四柱全维表格（问真样式） */
.pz-table { display: grid; grid-template-columns: 60px repeat(4, 1fr); gap: 0 6px; font-size: 13px; margin-top: 10px; }
.pz-c { min-height: 34px; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 4px 2px; border-bottom: 1px solid var(--line); text-align: center; }
.pz-c.head { font-weight: 600; color: var(--ink); }
.pz-c.lab { color: var(--muted, #8a7d63); font-size: 12px; }
.pz-c.stripe { background: rgba(155,124,60,.06); }
.pz-ganzhi-c { font-size: 24px; font-weight: 700; letter-spacing: 2px; }
.pz-multi { display: flex; flex-direction: column; gap: 2px; }
/* 五行五色：统一走 --wx-* 令牌（定义见 v2.css），深色主题自动换可读亮色 */
.wx-mu { color: var(--wx-mu); } .wx-huo { color: var(--wx-huo); } .wx-tu { color: var(--wx-tu); } .wx-jin { color: var(--wx-jin); } .wx-shui { color: var(--wx-shui); }
.pz-shensha-c { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.pz-shensha-c .chip { font-size: 11.5px; padding: 2px 8px; }

/* 付费门专业化 */
.pay-head { display: flex; align-items: center; gap: 12px; }
.pay-head .seal { width: 42px; height: 42px; font-size: 22px; }
.pay-points { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 16px; }
.pay-point { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.pay-point b { font-size: 13px; color: var(--ink); }
.pay-point span { font-size: 11.5px; color: var(--muted); line-height: 1.6; }

/* 名人案例墙样式见 css/v2.css（.famous-card / .fc-* 册页体系） */
.course-cat { margin-top: 10px; }
.course-cat b { display: block; font-size: 13px; color: var(--ink); margin-bottom: 6px; }
.course-items { display: flex; flex-wrap: wrap; gap: 6px; }

/* 学习课堂整页（#view-learn）：头部 + 分类 Tab + 课程列表 */
.learn-head { position: relative; padding: 4px 0 12px; }
.learn-head h3 { font-size: 17px; color: var(--ink); text-align: center; margin: 0; }
.learn-back { position: absolute; left: 0; top: 2px; border: none; background: none; color: var(--red); font-size: 14px; cursor: pointer; padding: 4px 6px; }
.learn-sub { text-align: center; font-size: 11.5px; color: var(--muted); margin: 6px 0 0; }
.learn-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 10px; }
.learn-cat { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; font-size: 12.5px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.learn-cat em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.learn-cat.on { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.learn-cat.on em { color: var(--red); }
.learn-body { display: flex; flex-direction: column; gap: 8px; }
.learn-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; }
.learn-item:hover { border-color: var(--red); }
.learn-item .li-idx { flex: none; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 12.5px; font-weight: 600; }
.learn-item .li-main { flex: 1; min-width: 0; }
.learn-item .li-main b { display: block; font-size: 14px; color: var(--ink); }
.learn-item .li-main small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.learn-item .li-arr { flex: none; color: var(--muted); font-size: 16px; }
.learn-empty { padding: 28px 0; text-align: center; font-size: 12.5px; color: var(--muted); }

/* 私域浮栏与弹层 */
.side-float { position: fixed; right: 12px; bottom: 120px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.side-fab { padding: 8px 12px; font-size: 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-soft); cursor: pointer; box-shadow: var(--shadow-sm); }
.side-fab:hover { color: var(--red); border-color: var(--red); }
.qr-holder { margin: 16px auto; width: 180px; height: 180px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); font-size: 13px; }
.qr-holder small { font-size: 10.5px; }
/* 私域二维码：图片到位即显示；未上传时显示留位说明（不做假码） */
.qr-holder .qr-img { width: 168px; height: 168px; object-fit: contain; border-radius: 12px; }
.qr-holder .qr-tip { text-align: center; line-height: 1.6; padding: 0 8px; font-size: 11.5px; }
.qr-holder .qr-tip b { color: var(--ink-soft); font-weight: 600; }
/* 扫码支付：二维码为现场生成的 SVG，撑满容器（矢量，任何尺寸都清晰） */
.qr-holder > svg { width: 100%; height: 100%; display: block; border-radius: 12px; background: #fff; }
.pay-qr-amount { text-align: center; font-size: 17px; font-weight: 700; color: var(--red); margin-top: 4px; }
.pay-qr-status { text-align: center; font-size: 12px; margin: 6px 0 12px; }
/* 收银台支付方式单选：一行一个通道，选中高亮；未配置置灰且不可点 */
.pay-channels { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.pay-ch { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); cursor: pointer; }
.pay-ch input { margin: 0; accent-color: var(--red); }
.pay-ch:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.pay-ch.off { opacity: .55; cursor: not-allowed; }
.pay-ch b { font-size: 13.5px; color: var(--ink); min-width: 62px; }
.pay-ch small { font-size: 11px; flex: 1; }
.vip-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.vip-tier { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface-2); }
.vip-tier.on { border-color: var(--gold); background: var(--gold-soft); }
.vip-tier b { font-size: 14px; color: var(--ink); min-width: 54px; }
.vip-tier s { font-size: 11px; color: var(--muted); }
.vip-price { font-size: 16px; font-weight: 700; color: var(--red); }
.vip-tier small { flex: 1; font-size: 11px; color: var(--muted); text-align: right; }
.vip-tier em { position: absolute; top: -8px; left: 10px; font-style: normal; font-size: 10px; padding: 1px 8px; border-radius: 999px; background: var(--red); color: var(--surface); }

/* 记录案例 */
.case-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 12px; }
.case-item b { color: var(--ink); font-size: 12.5px; }
.case-item .muted { flex: 1; text-align: right; }
.case-ops { display: flex; gap: 4px; }
.case-ops .sku-btn { padding: 3px 10px; font-size: 11px; }
.hep-rel.on { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }

/* ========== 移动端适配 ========== */
@media (max-width: 480px) {
  .stage { padding: 12px 10px calc(20px + env(safe-area-inset-bottom)); }
  .hero-solar { min-width: 0; gap: 8px; }
  .hero-day { font-size: 40px; }
  .hero-sub b { font-size: 13px; }
  .hero-sub span { font-size: 11px; }
  .side-float { display: none; }
  .tab-row { flex-wrap: wrap; gap: 4px; }
  .mini-tab { font-size: 12px; padding: 6px 10px; }
  .geo-row { flex-wrap: wrap; }
  .geo-row select { min-width: calc(50% - 4px); }
  .geo-row input { flex: 0 0 100%; }
  .grid-2 { grid-template-columns: 1fr; gap: 8px; }
  .pz-table { grid-template-columns: 48px repeat(4, 1fr); gap: 0 4px; font-size: 12px; }
  .pz-c { padding: 3px 1px; font-size: 11.5px; }
  .mingzhu { flex-direction: column; text-align: center; gap: 8px; }
  .mingzhu .mz-seal { align-self: center; }
  .modal-card { width: 95%; max-height: 90vh; overflow-y: auto; padding: 16px; }
  .pay-tier { padding: 10px 12px; gap: 10px; }
  .pay-tier .pt-info b { font-size: 13px; }
  .pay-tier .pt-price b { font-size: 18px; }
  .card { padding: 12px; }
  .form-row .seg { flex-wrap: wrap; gap: 4px; }
  .form-row .seg button { padding: 6px 10px; font-size: 12px; }
  .cal-head { padding: 8px 10px; }
  .nav-btn { width: 32px; height: 32px; font-size: 18px; }
  .zw-top .kpi { flex: 1; min-width: 80px; padding: 8px 10px; font-size: 11px; }
  .zw-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .cheng-gu-card .cg-weight { font-size: 18px; }
  .src-tag { font-size: 9.5px; padding: 0 5px; }
}

@media (max-width: 360px) {
  .geo-row select { min-width: calc(33.3% - 4px); font-size: 12px; padding: 8px 4px; }
  .pz-table { grid-template-columns: 40px repeat(4, 1fr); font-size: 11px; }
}

/* 窄屏（≤560px）：8 个导航项改为两行四列，避免 4 字标签顶格拥挤/折行 */
@media (max-width: 560px) {
  .tabs { flex-wrap: wrap; gap: 6px; padding: 6px; }
  .tab { flex: 1 1 calc(25% - 6px); font-size: 12.5px; padding: 9px 2px; }
}

/* ========== 每日运程 · 命笺 ========== */
.ft-checkin {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 14px; margin-bottom: 14px;
}
.ft-ck-left { display: flex; align-items: baseline; gap: 12px; }
.ft-ck-label { font-family: "Songti SC", "SimSun", serif; font-size: 14px; letter-spacing: .2em; }
.ft-ck-streak { font-size: 11.5px; color: var(--muted); }
.ft-ck-streak b { color: var(--red); font-family: "Songti SC", serif; }
.ft-ck-btn {
  background: var(--red); color: var(--surface); border: none; cursor: pointer;
  font-family: "Songti SC", serif; font-size: 13px; letter-spacing: .3em;
  padding: 7px 20px; border-radius: 3px;
}
.ft-ck-btn.done { background: var(--surface-2); color: var(--muted); cursor: default; }

.ft-sheet {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  outline: 1px solid var(--surface); outline-offset: 4px;
  box-shadow: 0 24px 48px -28px rgba(60,45,20,.35);
  padding: 30px 26px 26px;
}
.ft-vertical {
  position: absolute; top: 32px; right: 12px;
  writing-mode: vertical-rl; font-family: "Songti SC", serif;
  font-size: 10px; letter-spacing: .5em; color: rgba(166,124,46,.7);
}
.ft-mast { display: flex; justify-content: space-between; align-items: flex-start; }
.ft-brand { font-family: "Songti SC", "SimSun", serif; font-size: 13px; letter-spacing: .35em; color: var(--ink-soft); }
.ft-seal {
  width: 36px; height: 36px; background: var(--red); color: var(--surface);
  font-family: "Songti SC", serif; font-weight: 600; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px; transform: rotate(-4deg);
  box-shadow: 0 2px 8px -2px rgba(166,58,43,.5);
}
.ft-rule { border: none; border-top: 1px solid var(--line); margin: 16px 0 0; }

.ft-date { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 20px; }
.ft-big { font-family: "Songti SC", serif; font-size: 36px; font-weight: 600; line-height: 1; letter-spacing: .02em; color: var(--ink); }
.ft-big small { font-size: 15px; font-weight: 400; color: var(--ink-soft); margin-left: 4px; }
.ft-sub { margin-top: 8px; font-size: 11.5px; color: var(--muted); letter-spacing: .12em; }
.ft-gz { text-align: right; font-family: "Songti SC", serif; }
.ft-gz-day { font-size: 15px; color: var(--ink); letter-spacing: .2em; }
.ft-jq { margin-top: 8px; font-size: 10.5px; color: var(--muted); letter-spacing: .15em; }

.ft-verdict { margin-top: 28px; text-align: center; }
.ft-score-line { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.ft-num { font-family: "Songti SC", serif; font-size: 64px; font-weight: 700; color: var(--ink); line-height: 1; }
.ft-num-cn { font-family: "Songti SC", serif; font-size: 15px; color: var(--ink-soft); letter-spacing: .15em; }
.ft-unit { font-size: 11px; color: var(--muted); letter-spacing: .3em; }
.ft-grade {
  display: inline-block; margin-top: 10px;
  font-family: "Songti SC", serif; font-size: 13px; letter-spacing: .4em;
  color: var(--red); border: 1px solid rgba(166,58,43,.4);
  padding: 4px 14px 4px 18px; border-radius: 2px;
}
.ft-poem {
  margin-top: 18px; font-family: "Songti SC", "SimSun", serif;
  font-size: 15px; line-height: 2.1; color: var(--ink); letter-spacing: .06em;
}
.ft-locked {
  color: transparent;
  background: linear-gradient(180deg, rgba(49,38,27,.4), rgba(49,38,27,.1));
  -webkit-background-clip: text; background-clip: text;
  border-bottom: 1px dashed var(--line-strong); padding-bottom: 1px;
}
.ft-more {
  margin-top: 12px; display: inline-block;
  font-size: 12px; letter-spacing: .25em; color: var(--gold);
  text-decoration: none; border-bottom: 1px solid rgba(166,124,46,.4); padding-bottom: 2px; cursor: pointer;
}

.ft-section-t {
  margin-top: 30px; display: flex; align-items: center; gap: 12px;
  font-family: "Songti SC", serif; font-size: 13px; letter-spacing: .35em; color: var(--ink-soft);
}
.ft-section-t::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

.ft-dims { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; }
.ft-dim { display: flex; align-items: center; justify-content: space-between; }
.ft-dim-name { font-family: "Songti SC", serif; font-size: 16px; letter-spacing: .2em; color: var(--ink); }
.ft-dim-rank { font-family: "Songti SC", serif; font-size: 13px; color: var(--ink-soft); letter-spacing: .12em; }
.ft-dim-rank.hot { color: var(--red); font-weight: 600; }

.ft-lucky { margin-top: 16px; display: grid; grid-template-columns: repeat(3,1fr); }
.ft-cell { text-align: center; padding: 4px 6px; }
.ft-cell + .ft-cell { border-left: 1px solid var(--line); }
.ft-lab { font-size: 10.5px; color: var(--muted); letter-spacing: .3em; margin-bottom: 10px; }
.ft-swatch { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 8px; border: 1px solid rgba(0,0,0,.1); }
.ft-val { font-family: "Songti SC", serif; font-size: 15px; letter-spacing: .08em; color: var(--ink); }
.ft-val-pad { padding-top: 20px; }
.ft-val small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; letter-spacing: .2em; }

.ft-yiji { margin-top: 16px; display: grid; grid-template-columns: 48px 1fr; row-gap: 14px; align-items: start; }
.ft-yj-char { font-family: "Songti SC", serif; font-size: 26px; font-weight: 700; line-height: 1; }
.ft-yj-char.yi { color: var(--red); }
.ft-yj-char.ji { color: var(--muted); }
.ft-yj-items { font-family: "Songti SC", serif; font-size: 14px; line-height: 1.9; letter-spacing: .1em; }
.ft-yj-items.yi { color: var(--ink); }
.ft-yj-items.ji { color: var(--ink-soft); }
.ft-yj-items span { margin-right: 14px; white-space: nowrap; }

.ft-hours { margin-top: 16px; position: relative; }
.ft-hour {
  display: grid; grid-template-columns: 40px 1fr 44px;
  padding: 9px 4px; border-bottom: 1px solid var(--line);
  font-family: "Songti SC", serif; align-items: baseline;
}
.ft-h-name { font-size: 14px; letter-spacing: .15em; color: var(--ink); }
.ft-h-time { font-size: 11px; color: var(--muted); font-family: inherit; letter-spacing: .03em; }
.ft-h-rank { font-size: 12px; text-align: right; letter-spacing: .15em; color: var(--ink-soft); }
.ft-hour.locked { color: var(--muted); }
.ft-hour.locked .ft-h-name, .ft-hour.locked .ft-h-time, .ft-hour.locked .ft-h-rank { color: var(--muted); }
.ft-hour.now { background: linear-gradient(90deg, var(--red-soft), transparent 70%); position: relative; z-index: 2; }
.ft-hour.now .ft-h-name { color: var(--red); font-weight: 700; }
.ft-hour.now::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); }
.ft-veil {
  position: absolute; left: 0; right: 0; top: 56%; bottom: 0;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--surface) 0%, transparent) 0%,
    color-mix(in srgb, var(--surface) 28%, transparent) 20%,
    color-mix(in srgb, var(--surface) 58%, transparent) 44%,
    color-mix(in srgb, var(--surface) 86%, transparent) 70%,
    var(--surface) 100%);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; z-index: 1;
}
.ft-veil a {
  font-family: "Songti SC", serif; font-size: 12.5px; letter-spacing: .3em;
  color: var(--gold); text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-strong); padding: 8px 22px 8px 26px; border-radius: 2px;
  background: var(--surface);
}

.ft-cta { margin-top: 28px; display: flex; gap: 12px; }
.ft-cta a {
  flex: 1; text-align: center; text-decoration: none; cursor: pointer;
  font-family: "Songti SC", serif; font-size: 13px; letter-spacing: .3em;
  padding: 12px 0; border: 1px solid var(--ink); color: var(--ink); border-radius: 2px;
}
.ft-cta a.primary { background: var(--ink); color: var(--surface); }
.ft-tomorrow { margin-top: 20px; text-align: center; font-size: 12px; color: var(--muted); letter-spacing: .12em; line-height: 1.9; }
.ft-tomorrow b { color: var(--gold); font-weight: 600; }
.ft-disclaimer { margin-top: 18px; text-align: center; font-size: 10px; color: var(--muted); letter-spacing: .08em; }

@media (max-width: 480px) {
  .ft-sheet { padding: 24px 18px 22px; }
  .ft-num { font-size: 52px; }
  .ft-big { font-size: 30px; }
  .ft-vertical { display: none; }
}

/* ================= 择日择吉 ================= */
.zeri-card { border-top: 2px solid var(--gold); }
.zeri-head .card-title { font-family: "Songti SC", "SimSun", serif; letter-spacing: .15em; }
.zeri-sub { margin: 6px 0 14px; font-size: 12px; line-height: 1.8; letter-spacing: .05em; }
.zeri-form { display: flex; gap: 10px; margin-bottom: 14px; }
/* 取全站表单同款（--surface-2 底 + --ink 字）：原先硬编码浅底，暗色主题下变成浅字浅底 */
.zeri-select {
  flex: 1; padding: 10px 12px; font-size: 15px; letter-spacing: .1em;
  border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface-2);
  font-family: "Songti SC", "SimSun", serif; color: var(--ink);
  cursor: pointer;
}
/* 原生下拉面板：显式跟随主题，避免暗色主题弹出白底浅字 */
.zeri-select option { background: var(--surface-2); color: var(--ink); }
.zeri-btn { white-space: nowrap; padding: 10px 22px; }
.zeri-tip { font-size: 12px; color: var(--gold); letter-spacing: .1em; margin: 4px 0 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line, #e3d9c2); }
.zeri-day {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 6px; border-bottom: 1px solid var(--line, #ece4d2);
  cursor: pointer; transition: background .15s;
}
.zeri-day:hover { background: var(--grid-hover); }
.zeri-day.today { background: var(--gold-soft); }
.zeri-day-main { display: flex; flex-direction: column; gap: 4px; }
.zeri-date { font-family: "Songti SC", "SimSun", serif; font-size: 19px; font-weight: 700; color: var(--ink, #2b2620); letter-spacing: .05em; }
.zeri-date small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.zeri-lunar { font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.zeri-day-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; max-width: 46%; }
.zeri-yi { font-size: 13px; color: var(--red, #9e2b25); letter-spacing: .05em; text-align: right; }
.zeri-chong { font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.zeri-chong.warn { color: var(--red, #9e2b25); }
.zeri-day.chong .zeri-date { color: var(--ink-soft); }
/* 遮罩：会员解锁 */
.zeri-day.zeri-lock { overflow: hidden; }
.zeri-day.zeri-lock::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--surface) 45%, var(--surface) 100%);
  pointer-events: none;
}
.zeri-day.zeri-lock .zeri-day-main, .zeri-day.zeri-lock .zeri-unlock { position: relative; z-index: 1; }
.zeri-day.zeri-lock .zeri-date { color: transparent; text-shadow: 0 0 8px var(--muted); }
.zeri-day.zeri-lock .zeri-lunar { color: var(--gold); }
.zeri-unlock {
  padding: 6px 16px; font-size: 13px; letter-spacing: .15em;
  border: 1px solid var(--gold); color: var(--gold); background: transparent;
  border-radius: 2px; cursor: pointer; font-family: "Songti SC", serif;
}
.zeri-unlock:hover { background: var(--gold); color: #14110b; }
@media (max-width: 480px) {
  .zeri-form { flex-direction: column; }
  .zeri-btn { width: 100%; }
  .zeri-day-meta { max-width: 52%; }
}

/* ================= 宝宝取名 ================= */
.nm-card { border-top: 2px solid var(--gold); }
.nm-sub { margin: 6px 0 16px; font-size: 12px; line-height: 1.8; letter-spacing: .05em; }
.nm-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 16px; }
.nm-field { display: flex; flex-direction: column; gap: 6px; }
.nm-field.nm-wide { flex: 1; min-width: 220px; }
.nm-field label { font-size: 12px; color: var(--muted); letter-spacing: .15em; }
.nm-input {
  padding: 10px 12px; font-size: 15px; letter-spacing: .08em;
  border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface-2);
  font-family: "Songti SC", "SimSun", serif; color: var(--ink);
}
.nm-gender { display: flex; gap: 8px; }
.nm-sex {
  padding: 9px 22px; font-size: 15px; letter-spacing: .2em; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--muted);
  border-radius: 2px; font-family: "Songti SC", serif;
}
.nm-sex.on { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.nm-btn { padding: 11px 30px; letter-spacing: .2em; }

/* 八字喜用卡 */
.nm-bazi { margin-bottom: 14px; }
.nm-gz { font-size: 19px; letter-spacing: .12em; margin: 6px 0 14px; }
.nm-wxbar { display: flex; flex-wrap: wrap; gap: 18px; margin: 10px 0 12px; }
.nm-wx { display: flex; align-items: center; gap: 6px; }
.nm-wx-name { font-family: "Songti SC", serif; font-weight: 700; font-size: 16px; width: 16px; }
.nm-wx-pips { display: flex; gap: 3px; }
.nm-wx-pips i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.nm-wx-num { font-size: 12px; color: var(--muted); }
.nm-yong { font-size: 14px; letter-spacing: .08em; line-height: 1.9; margin: 6px 0; }
.nm-yong b { font-size: 17px; font-family: "Songti SC", serif; }
.nm-src { font-size: 11px; color: var(--muted); margin-top: 8px; letter-spacing: .05em; }

.nm-tip { font-size: 12px; color: var(--gold); letter-spacing: .1em; margin: 14px 2px; }

/* 名字网格 */
.nm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.nm-name {
  position: relative; border: 1px solid var(--line-strong); border-radius: 3px;
  padding: 18px 18px 14px; background: var(--surface-2); overflow: hidden;
}
.nm-name-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.nm-full { font-size: 34px; font-weight: 700; letter-spacing: .12em; color: var(--ink, #2b2620); line-height: 1; }
.nm-score { font-size: 13px; color: var(--gold); letter-spacing: .05em; }
.nm-chars { display: flex; gap: 18px; margin-bottom: 10px; }
.nm-char { display: flex; flex-direction: column; gap: 3px; }
.nm-char-c { font-family: "Songti SC", serif; font-size: 30px; font-weight: 700; line-height: 1.1; }
.nm-char-meta { font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.nm-wuge { font-size: 11px; color: var(--muted); letter-spacing: .03em; line-height: 1.7; margin-bottom: 8px; }
.nm-mean { font-size: 12.5px; color: var(--ink, #2b2620); line-height: 1.85; letter-spacing: .03em; opacity: .82; }
/* 锁定遮罩 */
.nm-name.nm-lock::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--surface-2) 40%, var(--surface-2) 100%);
  pointer-events: none;
}
.nm-name.nm-lock .nm-full { color: var(--muted); }
.nm-unlock {
  position: absolute; left: 50%; top: 54%; transform: translate(-50%, -50%);
  z-index: 1; padding: 8px 22px; font-size: 13px; letter-spacing: .18em;
  border: 1px solid var(--gold); color: var(--gold); background: var(--surface-2);
  border-radius: 2px; cursor: pointer; font-family: "Songti SC", serif; white-space: nowrap;
}
.nm-unlock:hover { background: var(--gold); color: #14110b; }
@media (max-width: 480px) {
  .nm-field.nm-wide { min-width: 100%; }
  .nm-btn { width: 100%; }
  .nm-full { font-size: 28px; }
}

/* ================= 八字论财 ================= */
.wl-card { border-top: 2px solid var(--gold); }
.wl-sub { margin: 6px 0 16px; font-size: 12px; line-height: 1.8; letter-spacing: .05em; }
.wl-bazi { margin-bottom: 14px; }
.wl-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; margin: 12px 0; }
.wl-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface-2); }
.wl-stat-k { font-size: 11px; color: var(--muted); letter-spacing: .12em; }
.wl-stat-v { font-size: 16px; font-family: "Songti SC", serif; font-weight: 700; color: var(--ink); }
.wl-pattern { margin: 10px 0 4px; }
.wl-pat-tag { display: inline-block; padding: 6px 16px; font-size: 15px; letter-spacing: .12em; color: var(--red); border: 1px solid var(--red); border-radius: 2px; font-family: "Songti SC", serif; background: var(--red-soft); }
.wl-src { font-size: 11px; color: var(--muted); margin-top: 10px; letter-spacing: .05em; }
.wl-summary .wl-txt { font-size: 14px; line-height: 2; letter-spacing: .04em; margin: 8px 0 0; color: var(--ink, #2b2620); }
.wl-advice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.wl-adv-col { display: flex; flex-direction: column; gap: 6px; }
.wl-adv-col b { font-family: "Songti SC", serif; font-size: 17px; letter-spacing: .2em; margin-bottom: 2px; }
.wl-adv-col:nth-child(1) b { color: var(--badge-yi); }
.wl-adv-col:nth-child(2) b { color: var(--red); }
.wl-adv-col:nth-child(3) b { color: var(--gold); }
.wl-adv-col .chip { font-size: 12.5px; padding: 5px 10px; }
.chip.warn { background: var(--gold-soft); color: var(--gold); border: 1px solid var(--line-strong); }
.wl-years { margin-top: 8px; }
.wl-year { display: flex; align-items: center; gap: 16px; padding: 10px 4px; border-bottom: 1px solid var(--line, #f0e8d6); }
.wl-y-year { font-family: "Songti SC", serif; font-weight: 700; font-size: 16px; width: 56px; }
.wl-y-gz { font-size: 14px; color: var(--muted); width: 56px; letter-spacing: .08em; }
.wl-y-star { font-size: 12px; letter-spacing: 1px; width: 96px; }
.wl-st-5, .wl-st-4 { color: var(--red); }
.wl-st-3 { color: var(--gold); }
.wl-st-2, .wl-st-1 { color: var(--muted); }
.wl-y-tag { font-size: 13px; color: var(--ink, #2b2620); letter-spacing: .08em; }
.wl-disclaim { font-size: 11px; color: var(--muted); margin-top: 14px; line-height: 1.7; letter-spacing: .04em; }
/* 付费锁 */
.wl-lockbox { position: relative; margin-top: 14px; padding: 6px 2px 18px; }
.wl-unlock-btn {
  display: block; width: 100%; margin-top: 10px; padding: 12px;
  font-size: 14px; letter-spacing: .2em; font-family: "Songti SC", serif;
  border: 1px solid var(--gold); color: var(--gold); background: transparent;
  border-radius: 2px; cursor: pointer;
}
.wl-unlock-btn:hover { background: var(--gold); color: #14110b; }
@media (max-width: 480px) {
  .wl-advice { grid-template-columns: 1fr; gap: 10px; }
  .wl-y-star { width: 80px; }
}

/* ================= 合盘分享裂變 ================= */
.hep-share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, #e3d9c2); }
.hep-share .sku-btn { white-space: nowrap; }
.hep-lock-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.hep-advice-wrap .wl-adv-col { gap: 6px; }
.hep-copied-note { margin-bottom: 10px; padding: 8px 12px; border: 1px solid var(--gold, #a67c2e); border-left: 3px solid var(--gold, #a67c2e); background: rgba(166, 124, 46, .08); color: var(--ink, #3a3226); font-size: 12.5px; line-height: 1.7; border-radius: 2px; letter-spacing: .03em; }

