:root {
  --bg: #0d0b09;
  --bg2: #131009;
  --card: #181410;
  --card2: #14100b;
  --panel: #100d09;
  --line: rgba(214, 172, 100, .16);
  --line2: rgba(214, 172, 100, .32);
  --gold: #d9b166;
  --gold2: #f0d49a;
  --ink: #ece6d8;
  --ink2: #d6c9b0;
  --ink3: #bfb49f;
  --muted: #9a8f7b;
  --dim2: #8c8170;
  --dim3: #6e6353;
  --btn-a: #2a2014;
  --btn-b: #1a140d;
  --red: #b8452f;
  --green: #5f8f6a;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(217, 177, 102, .10), transparent 60%),
    radial-gradient(700px 420px at 96% 4%, rgba(184, 69, 47, .08), transparent 62%);
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }

/* ---------- 布局 ---------- */
.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(23, 19, 14, .96), rgba(13, 11, 9, .96));
  padding: 26px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.brand .mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, #2a2118, #120f0c 70%);
  border: 1px solid var(--line2);
  color: var(--gold2);
  font-family: "Songti SC", serif;
  font-size: 20px;
  box-shadow: inset 0 0 18px rgba(217, 177, 102, .12);
}
.brand .name { font-family: "Songti SC", serif; font-size: 19px; letter-spacing: .14em; color: var(--gold2); }
.brand .sub { font-size: 11px; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; flex: 1 1 auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-t {
  font-size: 10.5px; color: var(--dim3); letter-spacing: .16em;
  padding: 10px 12px 4px; user-select: none;
}
.nav-t:first-of-type { padding-top: 4px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  color: #cfc6b5; font-size: 14.5px;
  border: 1px solid transparent;
  transition: .18s;
}
.nav a .dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(217, 177, 102, .35); }
.nav a:hover { background: rgba(217, 177, 102, .06); color: var(--gold2); }
.nav a.active {
  background: linear-gradient(90deg, rgba(217, 177, 102, .14), rgba(217, 177, 102, .03));
  border-color: var(--line2); color: var(--gold2);
}
.nav a.active .dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

.side-foot { margin-top: auto; font-size: 11.5px; color: var(--dim3); line-height: 1.8; padding: 0 8px; }

.main { padding: 34px 40px 80px; max-width: 1240px; min-width: 0; overflow-x: clip; }

.topbar {
  display: none;
  position: sticky; top: 0; z-index: 20;
  align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(13, 11, 9, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .t { font-family: "Songti SC", serif; letter-spacing: .12em; color: var(--gold2); }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 26px; color: var(--gold2); margin-bottom: 6px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(180deg, var(--card), var(--card2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h h3 { font-size: 16.5px; color: var(--gold2); }
.card-h .hint { font-size: 12px; color: var(--muted); }

.grid2 { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: start; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: .04em; }

.input, .select {
  width: 100%; height: 42px; padding: 0 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; outline: none; transition: .18s;
  color: var(--ink);
}
.input:focus, .select:focus { border-color: var(--line2); box-shadow: 0 0 0 3px rgba(217, 177, 102, .08); }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

.seg { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button {
  flex: 1; height: 34px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; transition: .18s; font-size: 13.5px;
}
.seg button.on { background: linear-gradient(180deg, rgba(217, 177, 102, .34), rgba(217, 177, 102, .16)); color: #f6e4b6; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(217, 177, 102, .65), 0 1px 8px rgba(217, 177, 102, .12); }
.seg button:active { transform: scale(.98); }

.btn {
  height: 44px; padding: 0 22px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, var(--btn-a), var(--btn-b));
  color: var(--gold2); letter-spacing: .08em; transition: .18s;
}
.btn:hover { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 177, 102, .08); }
.btn:active { transform: translateY(1px); }
.btn.block { width: 100%; }
.btn.primary {
  background: linear-gradient(180deg, #d7ae62, #b98c3f);
  color: #201709; border-color: #e3c07c; font-weight: 600;
}
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); height: 36px; padding: 0 14px; font-size: 13px; }

/* ---------- 四柱 ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pillar {
  background: radial-gradient(circle at 50% 0%, rgba(217, 177, 102, .08), transparent 70%), var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px; text-align: center;
}
.pillar .lab { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; margin-bottom: 8px; }
.pillar .gan, .pillar .zhi {
  font-family: "Songti SC", "STSong", serif;
  font-size: 34px; line-height: 1.15; font-weight: 600;
}
.pillar .pair { display: flex; flex-direction: column; align-items: center; }
.pillar .meta { margin-top: 8px; font-size: 11.5px; color: var(--muted); line-height: 1.9; }
.pillar .meta b { color: #cbbfa8; font-weight: 500; }
.pillar.day { border-color: var(--line2); box-shadow: inset 0 0 26px rgba(217, 177, 102, .08); }

/* ---------- 五行 ---------- */
.wx-list { display: flex; flex-direction: column; gap: 9px; }
.wx-row { display: grid; grid-template-columns: 46px 1fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.wx-bar { height: 7px; border-radius: 4px; background: var(--panel); overflow: hidden; border: 1px solid rgba(255, 255, 255, .04); }
.wx-bar i { display: block; height: 100%; border-radius: 4px; }
.wx-row .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 四维 ---------- */
.dims { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dim {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel);
}
.dim .dt { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dim .dt .n { font-family: "Songti SC", serif; font-size: 16px; color: var(--gold2); }
.dim .dt .c { font-size: 12px; color: var(--muted); }
.dim .facts { font-size: 12.5px; color: var(--ink3); line-height: 1.95; }
.dim .note { margin-top: 8px; font-size: 11.5px; color: var(--dim3); border-top: 1px dashed var(--line); padding-top: 8px; }

.tag {
  display: inline-block; padding: 2px 9px; margin: 0 6px 6px 0;
  border-radius: 999px; font-size: 11.5px;
  border: 1px solid var(--line2); color: var(--gold2); background: rgba(217, 177, 102, .07);
}
.tag.bad { border-color: rgba(184, 69, 47, .4); color: #d98a76; background: rgba(184, 69, 47, .08); }

/* ---------- 大运 ---------- */
.dy-wrap { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.dy-wrap::-webkit-scrollbar { height: 6px; }
.dy-wrap::-webkit-scrollbar-thumb { background: rgba(217, 177, 102, .22); border-radius: 3px; }
.dy {
  flex: 0 0 auto; width: 96px; padding: 12px 8px; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; transition: .18s;
}
.dy:hover { border-color: var(--line2); transform: translateY(-1px); }
.dy.on { border-color: var(--gold); background: linear-gradient(180deg, rgba(217, 177, 102, .16), rgba(217, 177, 102, .04)); }
.dy .gz { font-family: "Songti SC", serif; font-size: 19px; color: var(--gold2); }
.dy .ag { font-size: 11px; color: var(--muted); margin-top: 2px; }
.dy .yr { font-size: 10.5px; color: var(--dim3); }
.dy-detail { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 13px; color: #c3b8a4; line-height: 2; }
.dy-detail .k { color: var(--muted); margin-right: 8px; }

/* ---------- 名字 ---------- */
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.namecard {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel);
  transition: .18s;
}
.namecard:hover { border-color: var(--line2); }
.namecard .top { display: flex; align-items: baseline; justify-content: space-between; }
.namecard .nm { font-family: "Songti SC", serif; font-size: 24px; color: var(--gold2); letter-spacing: .04em; }
.namecard .py { font-size: 11.5px; color: var(--muted); margin-top: -2px; }
.namecard .sc { font-size: 12px; color: var(--gold); font-variant-numeric: tabular-nums; }
.namecard .chars { margin-top: 10px; font-size: 12px; color: #b8ad99; line-height: 1.9; }
.namecard .chars b { color: var(--ink2); font-weight: 500; }
.namecard .rs { margin-top: 8px; font-size: 11.5px; color: var(--dim3); }

/* ---------- 黄历 ---------- */
.al-date { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.al-ctrl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.al-input { width: 170px; }
.al-big { font-family: "Songti SC", serif; font-size: 44px; color: var(--gold2); line-height: 1.1; }
.al-sub { color: var(--muted); font-size: 13px; }
.al-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.al-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel); }
.al-box .h { font-size: 12px; letter-spacing: .2em; color: var(--muted); margin-bottom: 8px; }
.al-box.yi .h { color: var(--green); }
.al-box.ji .h { color: #c07a67; }
.al-box .items { font-size: 13.5px; color: var(--ink2); line-height: 2; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kv .it { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.kv .it .k { font-size: 11.5px; color: var(--muted); }
.kv .it .v2 { font-size: 14px; color: var(--ink2); margin-top: 2px; }

/* ---------- 首页 ---------- */
.hero { padding: 34px 0 10px; }
.hero h1 { font-size: 40px; letter-spacing: .16em; color: var(--gold2); }
.hero p { color: var(--muted); margin: 10px 0 0; max-width: 620px; }
.hero .seal {
  display: inline-block; margin-top: 18px; padding: 6px 14px; border: 1px solid var(--line2);
  border-radius: 999px; font-size: 12px; color: var(--gold); letter-spacing: .18em;
}
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.tile {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  background: linear-gradient(180deg, var(--card), var(--card2)); transition: .2s; display: block;
}
.tile:hover { border-color: var(--line2); transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .ti { font-family: "Songti SC", serif; font-size: 19px; color: var(--gold2); }
.tile .td { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.8; }
.tile .arrow { float: right; color: var(--gold); opacity: .5; }

.today { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.today .it { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--panel); }
.today .it .k { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; }
.today .it .v3 { font-family: "Songti SC", serif; font-size: 22px; color: var(--gold2); margin-top: 4px; }

.disc { margin-top: 26px; font-size: 11.5px; color: var(--dim3); line-height: 1.9; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- 底部 tab ---------- */
.tabbar {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(15, 12, 9, .96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 2px; border-radius: 10px; color: var(--dim2); font-size: 10.5px;
}
.tabbar a .ic { font-family: "Songti SC", serif; font-size: 17px; }
.tabbar a.active { color: var(--gold); background: rgba(217, 177, 102, .08); }

#toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 12px);
  background: rgba(28, 22, 15, .96); border: 1px solid var(--line2); color: var(--gold2);
  padding: 10px 18px; border-radius: 999px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: .22s; z-index: 99;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.loading { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(217,177,102,.25); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 响应式 ---------- */
@media (max-width: 1120px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; }
  .tabbar { display: grid; }
  .main { padding: 18px 16px calc(84px + env(safe-area-inset-bottom)); }
  .hero { padding: 18px 0 4px; }
  .hero h1 { font-size: 30px; letter-spacing: .1em; }
  .page-head h1 { font-size: 21px; }
  .pillars { gap: 6px; }
  .pillar { padding: 10px 4px; }
  .pillar .gan, .pillar .zhi { font-size: 27px; }
  .pillar .meta { font-size: 10.5px; }
  .dims { grid-template-columns: 1fr; }
  .al-two { grid-template-columns: 1fr; }
  .today { grid-template-columns: 1fr; }
  .names { grid-template-columns: 1fr 1fr; gap: 8px; }
  .namecard { padding: 11px; }
  .namecard .nm { font-size: 20px; }
  .card { padding: 15px; border-radius: 12px; }
  .al-big { font-size: 34px; }
  .dy { width: 84px; }
}

@media (max-width: 380px) {
  .names { grid-template-columns: 1fr; }
}

/* ---- SEO 静态正文区 ---- */
#seo { margin-top: 22px; }
#seo .card { margin-bottom: 14px; }
#seo h4 { margin-top: 12px; }
#seo p, #seo li, #seo td { color: var(--muted); }
#seo b { color: #cdbfa4; font-weight: 600; }
@media (max-width: 900px) { #seo { margin-top: 16px; } }

/* ---- 网格防溢出 ---- */
.pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pillar { min-width: 0; }
.pillar .meta { word-break: break-word; }
.pillar .gan, .pillar .zhi { white-space: nowrap; }
.names > * { min-width: 0; }
.dims { min-width: 0; }
.dims > * { min-width: 0; }
.kv .it, .today .it { min-width: 0; }
.kv .it .v2 { word-break: break-word; }

@media (max-width: 900px) {
  .today { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 620px) {
  .today { grid-template-columns: 1fr; }
  .names { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 560px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pillar .gan, .pillar .zhi { font-size: 30px; }
  .al-date { align-items: stretch; }
  .al-ctrl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
  .al-ctrl .al-input { grid-column: 1 / -1; order: -1; width: 100%; }
  .namecard .nm { font-size: 21px; }
}

/* ---------- 双人对照 ---------- */
.duo { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; }
.duo > * { min-width: 0; }
.duo .pillar .gan, .duo .pillar .zhi { font-size: 26px; }
.sub-t { font-size: 12px; color: var(--gold); margin-bottom: 8px; letter-spacing: .04em; }
.mini-kv { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.rel-list { display: grid; gap: 10px; }
.rel { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); }
.rel-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13.5px; color: var(--ink2); }
.rel p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.85; }
.tag2 { font-size: 11px; color: var(--gold); border: 1px solid rgba(217,177,102,.3); border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.tag2.bad { color: #c08a7a; border-color: rgba(192,122,103,.3); }

/* ---------- 六十四卦 ---------- */
.gua-list { display: grid; gap: 8px; }
.gua { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.gua > summary {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; cursor: pointer;
  list-style: none; font-size: 14px; color: var(--ink2);
}
.gua > summary::-webkit-details-marker { display: none; }
.gua[open] { border-color: var(--line2); }
.gua-no { font-size: 11px; color: var(--dim3); min-width: 20px; font-variant-numeric: tabular-nums; }
.gua-sym { font-size: 15px; color: var(--gold); letter-spacing: -.06em; }
.gua-name { font-family: "Songti SC", serif; font-size: 16px; color: var(--gold2); letter-spacing: .04em; }
.gua-tri { margin-left: auto; font-size: 11.5px; color: var(--dim3); }
.gua-body { padding: 4px 16px 16px; }
.gua-grid { display: grid; grid-template-columns: 128px minmax(0,1fr); gap: 18px; align-items: start; }
.yao-chart { display: grid; gap: 5px; padding-top: 4px; }
.yao-row { display: flex; align-items: center; gap: 8px; }
.yao-lab { font-size: 10.5px; color: var(--dim3); min-width: 34px; }
.yao { display: flex; gap: 5px; }
.yao i { display: block; height: 7px; border-radius: 1px; background: var(--gold2); }
.yao.yang i:first-child { width: 46px; }
.yao.yang i:last-child { display: none; }
.yao.yin i { width: 20px; }
.gua-ci { font-family: "Songti SC", serif; font-size: 14px; color: var(--ink2); line-height: 1.9; }
.gua-brief { margin: 8px 0 10px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.gua-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.gua-meta { margin-top: 10px; font-size: 11.5px; color: var(--dim3); display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .duo { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .gua-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- 首页入口 5 项适配 ---------- */
@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tabbar a { font-size: 10px; padding: 5px 0; }
  .tabbar a .ic { font-size: 16px; }
}
.gua-sym { letter-spacing: 0; font-size: 13px; color: var(--dim2); }

/* ---------- 站内全量导航（SEO 内链） ---------- */
.seo-links { margin: 26px 0 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(23,19,14,.5); }
.seo-links .sl-t { font-size: 11px; color: var(--dim3); letter-spacing: .16em; margin-bottom: 10px; }
.seo-links .sl-g { display: flex; flex-wrap: wrap; gap: 8px; }
.seo-links .sl-g a {
  font-size: 12.5px; color: var(--dim2); border: 1px solid rgba(214,172,100,.14);
  border-radius: 7px; padding: 4px 10px; transition: .18s;
}
.seo-links .sl-g a:hover { color: var(--gold2); border-color: var(--line2); background: rgba(217,177,102,.06); }

/* ---------- 时间胶囊 / AI 解读 ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lt-ta { height: auto; min-height: 190px; padding: 12px; line-height: 1.9; resize: vertical; font-size: 14px; }
.lt-count { text-align: right; font-size: 11px; color: var(--dim3); margin-top: 4px; }
.chk { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.7; cursor: pointer; }
.chk input { margin-top: 3px; accent-color: var(--gold); }

.seal { border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); padding: 16px; display: grid; gap: 10px; }
.seal-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px dashed rgba(214,172,100,.14); padding-bottom: 8px; }
.seal-row:last-child { border-bottom: 0; padding-bottom: 0; }
.seal-row .k { font-size: 12px; color: var(--dim3); }
.seal-row .v { font-size: 13.5px; color: var(--ink2); font-variant-numeric: tabular-nums; word-break: break-all; text-align: right; }
.seal-row .v.big { font-family: "Songti SC", serif; font-size: 22px; color: var(--gold2); letter-spacing: .18em; }

.lt-list { display: grid; gap: 10px; }
.lt-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--panel); }
.lt-item.locked { border-color: rgba(214,172,100,.10); }
.lt-t { font-family: "Songti SC", serif; font-size: 15px; color: var(--ink2); }
.lt-m { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--dim2); margin-top: 4px; }
.lt-id { font-size: 11px; color: var(--dim3); margin-top: 4px; word-break: break-all; }
.lt-ops { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.lt-open { display: flex; gap: 8px; margin-top: 10px; }
.lt-open .input { height: 34px; }

.btn.tiny { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn.tiny.ghost { border-color: rgba(214,172,100,.14); }

.lt-read { border-left: 2px solid rgba(217,177,102,.4); padding-left: 14px; margin-top: 10px; }
.lt-read-h { font-size: 12px; color: var(--gold); display: flex; gap: 10px; align-items: baseline; }
.lt-read-h span { color: var(--dim3); font-size: 11px; }
.lt-read-b { margin-top: 8px; font-size: 13.5px; color: var(--ink2); line-height: 2; white-space: pre-wrap; }

.ai-text { font-size: 14px; color: var(--ink2); line-height: 2.1; white-space: pre-wrap; word-break: break-word; }

/* ---------- 本地盘面解读 ---------- */
.rd-meta { font-size: 12px; color: #8a7f6c; letter-spacing: .02em; padding: 2px 0 16px; border-bottom: 1px solid var(--line); line-height: 1.9; }
.rd-sec { padding: 20px 0 6px; border-bottom: 1px dashed rgba(214,172,100,.12); }
.rd-sec:last-of-type { border-bottom: 0; }
.rd-sec h4 {
  font-size: 13px; color: var(--gold2); letter-spacing: .14em; margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.rd-sec h4::before { content: ""; width: 3px; height: 12px; background: var(--gold2); border-radius: 2px; }
.rd-sec p { font-size: 14px; color: var(--ink3); line-height: 2.05; margin: 0 0 12px; }
.rd-sec p:last-child { margin-bottom: 8px; }

/* ---------- 我的记录 ---------- */
.hi-list { display: flex; flex-direction: column; gap: 8px; }
.hi {
  display: flex; align-items: stretch; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(21,17,12,.55);
  transition: .16s;
}
.hi:hover { border-color: var(--line2); background: rgba(217,177,102,.05); }
.hi-main {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; min-width: 0;
}
.hi-tag {
  flex: none; font-size: 10.5px; letter-spacing: .08em; color: var(--gold2);
  border: 1px solid rgba(214,172,100,.28); border-radius: 5px; padding: 2px 7px;
}
.hi-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hi-txt b { font-size: 13.5px; color: #ded1b8; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-txt i { font-size: 11.5px; color: #7f7462; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hi-time { flex: none; font-size: 11px; color: var(--dim3); }
.hi-del {
  flex: none; width: 38px; border: 0; border-left: 1px solid var(--line);
  background: transparent; color: var(--dim3); font-size: 16px; line-height: 1; cursor: pointer;
  border-radius: 0 10px 10px 0; transition: .16s;
}
.hi-del:hover { color: #d98070; background: rgba(217,128,112,.08); }

@media (max-width: 560px) {
  .hi-main { gap: 8px; padding: 11px 12px; }
  .hi-tag { font-size: 9.5px; padding: 2px 5px; }
  .hi-time { display: none; }
}

@media print {
  body { background: #fff !important; color: #111 !important; }
  #nav, .tabbar, .sidebar, .page-head p, .btn, .disc { display: none !important; }
  .card { border: 0 !important; background: #fff !important; }
  .rd-sec p, .rd-meta, .rd-sec h4 { color: #111 !important; }
}

@media (max-width: 900px) {
  .grid3 { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ---------- 格局喜忌 ---------- */
.fav-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fav-k { font-size: 11.5px; color: var(--dim3); letter-spacing: .06em; }
.wx-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; padding: 2px 9px; border: 1px solid var(--line2); border-radius: 6px;
  font-size: 13px; font-family: "Songti SC", serif; line-height: 1.6;
}
.wx-chip.off { border-color: rgba(120,110,95,.4); color: var(--dim2); text-decoration: line-through; text-decoration-color: rgba(140,129,112,.5); }
.fav-reason { margin: 12px 0 0; font-size: 13px; color: var(--ink3); line-height: 1.95; }

/* ---------- 姓名评分 ---------- */
.ng { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(214,172,100,.18); }
.ng-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.grade {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--line2); color: var(--gold2); background: rgba(217,177,102,.08);
}
.grade.g-S { border-color: var(--gold); color: #1a1409; background: var(--gold); }
.grade.g-A { border-color: rgba(217,177,102,.6); }
.grade.g-B { border-color: rgba(160,139,98,.4); color: var(--dim2); background: transparent; }
.grade.g-C { border-color: rgba(120,110,95,.35); color: var(--dim2); background: transparent; }
.ng-head .tot { font-family: "Songti SC", serif; font-size: 21px; color: var(--gold2); font-variant-numeric: tabular-nums; }
.ng-head .tot i { font-size: 10px; font-style: normal; color: var(--dim3); margin-left: 2px; }
.ng-head .sc3 { font-size: 11.5px; color: var(--muted); }

.ng-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; }
.ng-cell {
  border: 1px solid rgba(214,172,100,.12); border-radius: 7px; padding: 6px 5px;
  display: flex; flex-direction: column; gap: 1px; background: var(--panel); text-align: center;
}
.ng-cell .k { font-size: 10px; color: var(--dim3); }
.ng-cell .n { font-size: 15px; color: var(--ink2); font-variant-numeric: tabular-nums; line-height: 1.3; }
.ng-cell .n i { font-size: 9.5px; font-style: normal; color: var(--dim3); margin-left: 2px; }
.ng-cell .lv { font-size: 10px; }
.ng-cell .d { font-size: 9.5px; color: var(--dim3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-why { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }

@media (max-width: 900px) {
  .ng-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ng-cell .d { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.45; }
}

@media (max-width: 560px) {
  .ng-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .ng-cell .d { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.45; }
}

/* ---------- 通用小件 ---------- */
.dim { color: var(--dim3); font-size: 11.5px; }
.hl { font-family: "Songti SC", serif; font-size: 17px; color: var(--gold2); line-height: 1.6; margin-bottom: 6px; }

/* ---------- 星座运势 ---------- */
.sign-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.sign-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); cursor: pointer; transition: .18s;
}
.sign-btn:hover { border-color: var(--line2); background: #141009; }
.sign-btn.on { border-color: var(--gold); background: rgba(217,177,102,.10); box-shadow: inset 0 0 0 1px rgba(217,177,102,.18); }
.sign-btn .sym { font-size: 18px; color: var(--gold); line-height: 1.1; font-variant-emoji: text; }
.sign-btn .nm { font-size: 12px; color: var(--ink2); }
.sign-btn .dt { font-size: 9.5px; color: var(--dim3); letter-spacing: -.02em; }
.sign-btn.on .nm { color: var(--gold2); }

.hs-head { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 20px; align-items: center; }
.hs-score { text-align: center; border-right: 1px solid var(--line); padding-right: 16px; }
.hs-score .num { font-family: "Songti SC", serif; font-size: 46px; line-height: 1; color: var(--gold2); font-variant-numeric: tabular-nums; }
.hs-score .st { font-size: 11px; color: var(--gold); letter-spacing: .14em; margin-top: 6px; }
.hs-text p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.9; }

.hs-dims { display: grid; gap: 8px; margin-top: 18px; }
.hs-dim { display: grid; grid-template-columns: 40px minmax(0,1fr) 34px; gap: 10px; align-items: center; font-size: 12px; }
.hs-dim .k { color: var(--muted); }
.hs-dim .bar { height: 6px; border-radius: 3px; background: rgba(214,172,100,.10); overflow: hidden; }
.hs-dim .bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, rgba(217,177,102,.55), var(--gold)); }
.hs-dim .v { text-align: right; color: var(--ink2); font-variant-numeric: tabular-nums; }

.hs-blocks { display: grid; gap: 12px; }
.hs-block { border-left: 2px solid rgba(217,177,102,.28); padding-left: 12px; }
.hs-block b { display: block; font-size: 12px; color: var(--gold); font-weight: 500; letter-spacing: .04em; margin-bottom: 3px; }
.hs-block p { margin: 0; font-size: 13px; color: var(--ink3); line-height: 1.95; }
.hs-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

.facts { display: grid; gap: 6px; }
.fact-row {
  display: grid; grid-template-columns: 44px 92px minmax(0,1fr) 76px; gap: 10px;
  font-size: 12px; color: var(--muted); padding: 7px 10px; border-radius: 8px;
  background: var(--panel); border: 1px solid rgba(214,172,100,.08);
}
.fact-row span:first-child { color: var(--gold); font-family: "Songti SC", serif; font-size: 14px; }
.hs-keydays { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- 八宅风水 ---------- */
.fs-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; max-width: 420px; margin: 0 auto; }
.fs-cell {
  aspect-ratio: 1 / .82; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 6px;
}
.fs-cell.center { background: rgba(217,177,102,.06); border-color: var(--line2); }
.fs-cell .p { font-family: "Songti SC", serif; font-size: 15px; color: var(--ink2); }
.fs-cell .s { font-size: 12px; color: var(--gold); }
.fs-cell .l { font-size: 10.5px; margin-top: 2px; }

.lv-大吉 { color: #e8b95c; }
.lv-吉 { color: #9dbb7f; }
.lv-平 { color: var(--dim2); }
.lv-凶 { color: #c08a7a; }
.lv-大凶 { color: #b8533c; }

.fs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fs-table th {
  text-align: left; font-weight: 400; color: var(--dim3); font-size: 11px;
  padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.fs-table td { padding: 8px; border-bottom: 1px solid rgba(214,172,100,.07); color: var(--ink2); vertical-align: top; }
.fs-table tr:last-child td { border-bottom: 0; }
.fs-table td:first-child { font-family: "Songti SC", serif; color: var(--ink2); white-space: nowrap; }

/* ---------- 择时 ---------- */
.zodiac-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.zodiac-pick button {
  min-width: 42px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink3); font-size: 12.5px; cursor: pointer; transition: .16s;
}
.zodiac-pick button.on { border-color: var(--gold); color: var(--gold2); background: rgba(217,177,102,.10); }

.top-list { display: grid; gap: 5px; }
.top-row {
  display: grid; grid-template-columns: 24px 108px minmax(0,1fr) 58px 34px 44px; gap: 8px;
  align-items: center; font-size: 12.5px; padding: 8px 10px; border-radius: 8px;
  background: var(--panel); border: 1px solid rgba(214,172,100,.08); color: var(--muted);
}
.top-row .rank { color: var(--dim3); font-size: 11px; font-variant-numeric: tabular-nums; }
.top-row .when { color: var(--ink2); }
.top-row .slot { color: var(--ink2); font-family: "Songti SC", serif; }
.top-row .gz { color: var(--dim3); font-size: 11.5px; }
.top-row .sc { color: var(--gold); text-align: right; font-variant-numeric: tabular-nums; }
.top-row .lv { font-size: 11px; text-align: right; }

.day-list { display: grid; gap: 6px; }
.day-item { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); overflow: hidden; }
.day-item > summary {
  display: grid; grid-template-columns: 44px 40px minmax(0,1fr) 58px 40px; gap: 8px;
  align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; font-size: 12.5px;
}
.day-item > summary::-webkit-details-marker { display: none; }
.day-item .dd { color: var(--ink2); font-variant-numeric: tabular-nums; }
.day-item .wk { color: var(--dim3); font-size: 11.5px; }
.day-item .lun { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-item .gz { color: var(--gold); font-family: "Songti SC", serif; }
.day-item .badge { text-align: right; color: var(--ink2); font-variant-numeric: tabular-nums; }
.day-body { padding: 2px 12px 12px; display: grid; gap: 6px; }
.slot-row {
  display: grid; grid-template-columns: 62px 96px 96px minmax(0,1fr); gap: 8px;
  font-size: 12px; color: var(--muted); padding: 7px 8px; border-radius: 7px; background: var(--panel);
}
.slot-row .t { color: var(--ink2); }
.slot-row .sc { color: var(--gold); white-space: nowrap; }
.slot-row .why { color: var(--dim3); font-size: 11.5px; }

/* ---------- 起卦 ---------- */
.cast-board { display: grid; gap: 6px; max-width: 340px; }
.cast-slot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel);
  font-size: 12.5px; color: var(--dim3);
}
.cast-slot .cs-n { font-size: 11px; color: var(--dim3); }
.cast-slot .cs-v { font-family: "Songti SC", serif; }
.cast-slot.yang { border-color: rgba(217,177,102,.34); }
.cast-slot.yang .cs-v { color: var(--gold2); }
.cast-slot.yin .cs-v { color: var(--dim2); }
.cast-slot.moving { border-color: rgba(184,69,47,.5); background: rgba(184,69,47,.07); }
.cast-slot.moving .cs-v { color: #e09070; }

.yao.act i { background: #e09070; }
.yao-mv { font-size: 10px; color: #e09070; margin-left: 4px; }

@media (max-width: 900px) {
  .sign-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hs-head { grid-template-columns: 96px minmax(0,1fr); gap: 14px; }
  .hs-score .num { font-size: 38px; }
  .fact-row { grid-template-columns: 40px 84px minmax(0,1fr) 64px; font-size: 11.5px; }
  .top-row { grid-template-columns: 20px 96px minmax(0,1fr) 46px; }
  .top-row .gz, .top-row .lv { display: none; }
  .slot-row { grid-template-columns: 58px minmax(0,1fr) 74px; }
  .slot-row .why { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .sign-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sign-btn .dt { display: none; }
  .hs-score { border-right: 0; padding-right: 0; }
  .hs-head { grid-template-columns: minmax(0,1fr); gap: 12px; text-align: left; }
  .hs-score { display: flex; align-items: baseline; gap: 10px; text-align: left; }
  .hs-score .st { margin-top: 0; }
  .fs-grid { max-width: 100%; }
  .fs-table { display: block; overflow-x: auto; white-space: nowrap; }
  .day-item > summary { grid-template-columns: 40px 34px minmax(0,1fr) 40px; }
  .day-item .gz { display: none; }
  .fact-row { grid-template-columns: 40px 76px minmax(0,1fr); }
  .fact-row span:last-child { display: none; }
}

/* 页脚合规信息 */
.foot { margin: 18px 0 40px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim3); line-height: 2; }
.foot a { color: var(--dim2); text-decoration: none; }
.foot a:hover { color: var(--gold2); }
.foot .icp { color: var(--dim3); }
.side-foot a { color: var(--dim3); text-decoration: none; }
.side-foot a:hover { color: var(--gold2); }
.legal { color: var(--ink3); font-size: 14px; line-height: 2.1; }
.legal h2 { font-size: 16px; color: var(--gold); margin: 26px 0 8px; font-weight: 600; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 14px; padding-left: 18px; }
.legal li { margin-bottom: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.legal th { color: var(--gold); font-weight: 500; }

/* ================= 动效层 ================= */

/* 页面切换入场 */
#app.pg-in { animation: pgIn .42s cubic-bezier(.22,.8,.28,1) both; }
@keyframes pgIn {
  from { opacity: 0; transform: translateY(10px) scale(.996); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* 首屏卡片滚动显现 */
.card, .page-head { will-change: transform, opacity; }
.card.fx-in, .page-head.fx-in { animation: cardIn .55s cubic-bezier(.2,.75,.3,1) both; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* 标题质感 */
.page-head h1 {
  background: linear-gradient(180deg, #fff8ea 0%, #eac98d 58%, #c2914a 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.55));
}

/* 按钮：光泽扫过 + 按压反馈 */
.btn { position: relative; overflow: hidden; transition: transform .18s ease, box-shadow .3s ease, border-color .3s ease, color .3s ease; }
.btn::after {
  content: ''; position: absolute; top: -40%; bottom: -40%; width: 45%;
  left: -60%; background: linear-gradient(100deg, transparent, rgba(255,246,226,.28), transparent);
  transform: skewX(-18deg); opacity: 0; pointer-events: none;
}
.btn:hover::after { animation: btnSheen .75s ease-out; }
@keyframes btnSheen {
  0% { left: -60%; opacity: 0; }
  25% { opacity: 1; }
  100% { left: 120%; opacity: 0; }
}
.btn.primary:hover { box-shadow: 0 0 0 1px rgba(240,212,154,.45), 0 12px 30px rgba(217,177,102,.22); }
.btn:active { transform: translateY(1px) scale(.985); }

/* 分段按钮 */
.seg button { position: relative; overflow: hidden; transition: background .25s ease, color .25s ease, box-shadow .3s ease, transform .16s ease; }
.seg button:active { transform: scale(.97); }
.seg button.on { animation: segIn .32s cubic-bezier(.2,.9,.3,1.25) both; }
@keyframes segIn {
  0% { transform: scale(.94); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* 侧栏 / 底部导航选中条 */
#nav a, #tabbar a { position: relative; transition: color .25s ease, background .25s ease; }
#nav a::before {
  content: ''; position: absolute; left: 0; top: 50%; height: 0; width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold2), transparent);
  transform: translateY(-50%); transition: height .3s ease; opacity: .9;
}
#nav a.active::before, #nav a:hover::before { height: 62%; }

/* 首页磁贴悬浮 */
.tile, .tool, .seo-links a { transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s ease, border-color .3s ease, color .3s ease; }

/* ---------- 结果区分档特效 ---------- */
#out { position: relative; }

.fx-badge {
  position: absolute; top: -9px; right: 8px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 4px; border-radius: 999px;
  font-size: 11px; letter-spacing: .12em;
  background: rgba(12,10,8,.72); border: 1px solid var(--line2);
  backdrop-filter: blur(6px);
  animation: badgeIn .55s cubic-bezier(.2,.9,.3,1.3) both;
}
.fx-badge i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.fx-badge b { font-weight: 600; }
@keyframes badgeIn {
  from { opacity: 0; transform: translateY(-6px) scale(.85); }
  to { opacity: 1; transform: none; }
}
.fx-badge-good { color: #f6e0b0; border-color: rgba(240,212,154,.5); box-shadow: 0 0 20px rgba(217,177,102,.28); }
.fx-badge-good i { background: var(--gold2); box-shadow: 0 0 10px var(--gold2), 0 0 2px #fff; }
.fx-badge-mid { color: #c9cfc9; border-color: rgba(180,190,180,.28); }
.fx-badge-mid i { background: #9fb3a6; }
.fx-badge-low { color: #c9a49c; border-color: rgba(184,69,47,.34); }
.fx-badge-low i { background: #b8452f; box-shadow: 0 0 8px rgba(184,69,47,.7); }

.fx-card-in { animation: cardIn .6s cubic-bezier(.2,.75,.3,1) both; }

.fx-good > .card { border-color: rgba(240,212,154,.3); animation-name: cardIn, goodGlow; animation-duration: .6s, 3.2s; animation-timing-function: cubic-bezier(.2,.75,.3,1), ease-out; animation-fill-mode: both, none; }
@keyframes goodGlow {
  0% { box-shadow: 0 0 0 0 rgba(240,212,154,.35), var(--shadow); }
  35% { box-shadow: 0 0 0 4px rgba(240,212,154,.16), 0 0 46px rgba(217,177,102,.22), var(--shadow); }
  100% { box-shadow: var(--shadow); }
}
.fx-mid > .card { animation-name: cardIn, midSweep; animation-duration: .6s, 1.5s; animation-fill-mode: both, none; }
@keyframes midSweep {
  0% { box-shadow: inset 0 0 0 0 rgba(217,177,102,0); }
  40% { box-shadow: inset 0 0 40px rgba(217,177,102,.07); }
  100% { box-shadow: inset 0 0 0 0 rgba(217,177,102,0); }
}
.fx-low > .card { filter: saturate(.7) brightness(.95); animation-name: cardIn, lowIn; animation-duration: .6s, 1.1s; animation-fill-mode: both, none; }
@keyframes lowIn {
  0% { transform: translateY(-2px); }
  18% { transform: translateX(-1.5px) translateY(0); }
  36% { transform: translateX(1.5px); }
  54% { transform: translateX(-1px); }
  72% { transform: translateX(1px); }
  100% { transform: none; }
}

/* 粒子层 */
.fx-burst { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: var(--radius); z-index: 2; }
.fx-burst i { position: absolute; display: block; border-radius: 50%; opacity: 0; }
.fx-burst-good i {
  bottom: 14%;
  background: radial-gradient(circle at 50% 50%, #fff6dd 0%, #ecc681 45%, rgba(236,198,129,0) 72%);
  animation: rise 2.4s cubic-bezier(.2,.6,.3,1) forwards;
}
@keyframes rise {
  0% { opacity: 0; transform: translate3d(0, 24px, 0) scale(.35); }
  16% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(0, -170px, 0) scale(1.15); }
}
.fx-burst-low i {
  top: 6%;
  background: rgba(150,146,140,.55);
  filter: blur(.2px);
  animation: fall 2.9s linear forwards;
}
@keyframes fall {
  0% { opacity: 0; transform: translate3d(0, -10px, 0) scale(.8); }
  20% { opacity: .85; }
  100% { opacity: 0; transform: translate3d(6px, 190px, 0) scale(1); }
}
.fx-burst-mid {
  background: linear-gradient(102deg, transparent 28%, rgba(217,177,102,.16) 48%, rgba(255,246,226,.08) 54%, transparent 72%);
  transform: translateX(-40%);
  animation: sweep 1.15s ease-out forwards;
}
@keyframes sweep {
  0% { opacity: 0; transform: translateX(-45%); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(45%); }
}

/* ---------- 星座切换弹窗 ---------- */
.fx-pop {
  position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, rgba(20,15,10,.55), rgba(6,5,4,.82));
  backdrop-filter: blur(4px);
  animation: popBg .26s ease both;
  cursor: pointer;
}
.fx-pop.out { animation: popBgOut .3s ease both; }
@keyframes popBg { from { opacity: 0; } to { opacity: 1; } }
@keyframes popBgOut { from { opacity: 1; } to { opacity: 0; } }

.fx-pop-box {
  position: relative; width: min(78vw, 320px); aspect-ratio: 1 / 1;
  display: grid; place-content: center; justify-items: center; gap: 4px;
  animation: popBox .62s cubic-bezier(.2,.9,.3,1.25) both;
}
@keyframes popBox {
  0% { opacity: 0; transform: scale(.62) rotate(-8deg); }
  70% { opacity: 1; transform: scale(1.04) rotate(1deg); }
  100% { transform: none; }
}
.fx-pop-ring {
  position: absolute; inset: 6%; border-radius: 50%;
  border: 1px solid rgba(240,212,154,.32);
  box-shadow: inset 0 0 60px rgba(217,177,102,.14), 0 0 40px rgba(217,177,102,.1);
  animation: ringSpin 9s linear infinite;
}
.fx-pop-ring::after {
  content: ''; position: absolute; inset: -18%; border-radius: 50%;
  border: 1px dashed rgba(240,212,154,.16);
  animation: ringSpin 14s linear reverse infinite;
}
@keyframes ringSpin { to { transform: rotate(360deg); } }

.fx-pop-glyph {
  font-size: clamp(72px, 17vmin, 132px); line-height: 1; color: var(--gold2);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-variant-emoji: text;
  text-shadow: 0 0 24px rgba(240,212,154,.45), 0 2px 0 rgba(0,0,0,.35);
  animation: glyphIn .7s cubic-bezier(.2,.9,.3,1.3) both;
}
.side-foot a { white-space: nowrap; }
@keyframes glyphIn {
  0% { opacity: 0; transform: translateY(12px) scale(.7); filter: blur(4px); }
  100% { opacity: 1; transform: none; filter: blur(0); }
}
.fx-pop-name { font-size: 15px; letter-spacing: .18em; color: #f2e6cd; animation: cardIn .5s .12s both; }
.fx-pop-note { font-size: 12px; letter-spacing: .1em; color: var(--muted); animation: cardIn .5s .2s both; }

.fx-pop-mid .fx-pop-ring { border-color: rgba(200,208,200,.26); box-shadow: inset 0 0 50px rgba(200,208,200,.08); }
.fx-pop-mid .fx-pop-glyph { color: #dfe6dd; text-shadow: 0 0 18px rgba(223,230,221,.25); }
.fx-pop-low .fx-pop-ring { border-color: rgba(184,69,47,.34); box-shadow: inset 0 0 50px rgba(184,69,47,.14); }
.fx-pop-low .fx-pop-glyph { color: #c99a92; text-shadow: 0 0 20px rgba(184,69,47,.35); animation: glyphIn .7s both, lowDrift 3s 0.7s ease-in-out infinite; }
@keyframes lowDrift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.fx-pop-good .fx-pop-glyph { animation: glyphIn .7s both, glyphPulse 2.2s .7s ease-in-out infinite; }
@keyframes glyphPulse {
  0%, 100% { text-shadow: 0 0 22px rgba(240,212,154,.4), 0 2px 0 rgba(0,0,0,.35); }
  50% { text-shadow: 0 0 34px rgba(240,212,154,.75), 0 0 60px rgba(217,177,102,.35), 0 2px 0 rgba(0,0,0,.35); }
}

/* ---------- 悬停 / 触屏 ---------- */
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-3px); box-shadow: 0 24px 54px rgba(0,0,0,.5), 0 0 0 1px rgba(240,212,154,.13); }
  .tile:hover, .tool:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(240,212,154,.16); }
  .seg button:hover:not(.on) { color: var(--gold2); }
}
@media (hover: none) {
  .card:active { transform: scale(.995); }
  .tile:active, .tool:active { transform: scale(.985); }
}

/* 移动端：位移收敛，光效保留 */
@media (max-width: 760px) {
  #app.pg-in { animation-duration: .34s; }
  .fx-pop-box { width: min(72vw, 248px); }
  .fx-pop-glyph { font-size: 52px; }
  .fx-good > .card { animation-duration: .55s, 2.6s; }
}

/* ================= 全屏特效层 ================= */
.fx-screen { position: fixed; inset: 0; z-index: 9998; pointer-events: none; overflow: hidden; isolation: isolate; }

/* 吉：光爆 + 旋转光束 + 扩散环 + 星尘 */
.fs-flash {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(62% 52% at 50% 42%, rgba(255,248,232,.52), rgba(217,177,102,.18) 46%, transparent 72%);
  animation: fsFlash 1.2s ease-out forwards;
}
@keyframes fsFlash { 0% { opacity: 0; } 7% { opacity: 1; } 100% { opacity: 0; } }

.fs-rays {
  position: absolute; left: 50%; top: 42%; width: 220vmax; height: 220vmax;
  transform: translate(-50%,-50%) scale(.55);
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    rgba(240,212,154,.15) 0deg 1.5deg, transparent 1.5deg 9deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,.92) 0%, rgba(0,0,0,.5) 30%, transparent 58%);
  mask-image: radial-gradient(circle at 50% 50%, rgba(0,0,0,.92) 0%, rgba(0,0,0,.5) 30%, transparent 58%);
  opacity: 0; will-change: transform, opacity;
  animation: fsRays 2.7s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes fsRays {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.5) rotate(0deg); }
  14% { opacity: .9; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.18) rotate(28deg); }
}

.fs-ring {
  position: absolute; left: 50%; top: 42%; width: 34vmin; height: 34vmin;
  margin: -17vmin 0 0 -17vmin; border-radius: 50%; opacity: 0;
  border: 1px solid rgba(240,212,154,.55);
  box-shadow: 0 0 40px rgba(240,212,154,.28), inset 0 0 30px rgba(240,212,154,.2);
  animation: fsRing 1.9s cubic-bezier(.16,.8,.24,1) forwards;
}
.fs-ring.r2 { animation-delay: .16s; border-color: rgba(240,212,154,.34); }
.fs-ring.r3 { animation-delay: .32s; border-color: rgba(240,212,154,.2); }
@keyframes fsRing {
  0% { opacity: 0; transform: scale(.25); }
  16% { opacity: .95; }
  100% { opacity: 0; transform: scale(4.3); }
}

.fs-vignette { position: absolute; inset: 0; box-shadow: inset 0 0 24vmax rgba(217,177,102,.22); animation: fsVig 2.5s ease-out forwards; }
@keyframes fsVig { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
.fs-vignette.dark { box-shadow: inset 0 0 32vmax rgba(6,8,10,.78); }

.fs-spark i {
  position: absolute; border-radius: 50%; opacity: 0; display: block;
  background: radial-gradient(circle at 50% 50%, #fff9e8 0%, #f2d79f 42%, rgba(242,215,159,0) 72%);
  animation-name: fsSpark; animation-timing-function: cubic-bezier(.2,.6,.3,1); animation-fill-mode: forwards;
}
.fs-spark i.blur { filter: blur(2px); }
@keyframes fsSpark {
  0% { opacity: 0; transform: translate3d(0, 28px, 0) scale(.3); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(0, -44vh, 0) scale(1.25); }
}

/* 平：全屏流光 + 薄雾 */
.fs-sweep {
  position: absolute; inset: -12% -35%; filter: blur(7px); transform: translateX(-62%);
  background: linear-gradient(105deg, transparent 38%, rgba(240,212,154,.18) 47%, rgba(255,250,238,.32) 50%, rgba(240,212,154,.16) 53%, transparent 62%);
  animation: fsSweep 1.3s cubic-bezier(.35,.1,.3,1) forwards;
}
@keyframes fsSweep {
  0% { opacity: 0; transform: translateX(-62%); }
  16% { opacity: 1; }
  100% { opacity: 0; transform: translateX(62%); }
}
.fs-haze {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(70% 52% at 50% 44%, rgba(217,177,102,.12), transparent 70%);
  animation: fsVig 2.1s ease-out forwards;
}

/* 滞：冷调压暗 + 落灰 */
.fs-cold {
  position: absolute; inset: 0; mix-blend-mode: multiply; opacity: 0;
  background: linear-gradient(180deg, rgba(72,84,90,.26), rgba(10,12,14,.48));
  animation: fsCold 2.3s ease-out forwards;
}
@keyframes fsCold { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: .5; } }
.fs-ash i {
  position: absolute; top: -5%; border-radius: 50%; opacity: 0; display: block;
  background: rgba(152,150,144,.55);
  animation-name: fsAsh; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes fsAsh {
  0% { opacity: 0; transform: translate3d(0,-12px,0); }
  18% { opacity: .85; }
  100% { opacity: 0; transform: translate3d(16px, 112vh, 0); }
}

/* 轻微屏震（仅滞档） */
.fx-shake { animation: fxShake .62s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes fxShake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

/* 弹窗升级为全屏电影感 */
.fx-pop { background: radial-gradient(circle at 50% 44%, rgba(24,18,12,.5), rgba(5,5,4,.88)); }
.fx-pop-box { width: min(84vw, 420px); }
.fx-pop-glyph { font-size: clamp(72px, 17vmin, 132px); }
.fx-pop-name { font-size: clamp(16px, 2.4vmin, 21px); margin-top: 10px; }
.fx-pop-note { font-size: clamp(11px, 1.6vmin, 13.5px); opacity: .85; }

@media (max-width: 760px) {
  .fs-rays { animation-duration: 2.3s; }
  .fs-ring { width: 44vmin; height: 44vmin; margin: -22vmin 0 0 -22vmin; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-screen, .fx-shake { display: none !important; animation: none !important; }
  #app.pg-in, .card.fx-in, .fx-card-in, .fx-badge, .fx-pop, .fx-pop-box,
  .fx-burst, .fx-burst i, .seg button.on, .btn:hover::after,
  .fx-good > .card, .fx-mid > .card, .fx-low > .card,
  .fx-pop-glyph, .fx-pop-ring, .fx-pop-ring::after { animation: none !important; }
  .card:hover, .tile:hover { transform: none; }
}

/* ============================================================
   版式 v2：统一间距、圆角、表面层级与阅读节奏
   （追加层，覆盖上面的零散数值，不改动任何数据组件的行为）
   ============================================================ */
:root {
  --s1: 6px; --s2: 10px; --s3: 14px; --s4: 18px; --s5: 24px; --s6: 32px;
  --r-xs: 6px; --r-sm: 9px; --r-md: 12px; --r-lg: 16px;
  --panel: #100d09;
  --hair: rgba(214, 172, 100, .12);
  --hair2: rgba(214, 172, 100, .2);
  --ink2: #c9beaa;
  --dim2: #8a7e6b;
}

/* ---------- 骨架 ---------- */
.layout { grid-template-columns: 240px minmax(0, 1fr); }
.side { padding: 22px 14px 18px; gap: 18px; }
.brand { padding: 0 6px; gap: 4px; }
.brand .mark { width: 40px; height: 40px; border-radius: 11px; }
.nav { gap: 1px; }
.nav a { padding: 9px 11px; border-radius: 8px; font-size: 14px; }
.nav-t { padding: 9px 11px 3px; letter-spacing: .14em; color: var(--dim3); }
.nav-t:first-of-type { padding-top: 4px; }
.side-foot { padding: 0 6px; font-size: 11px; line-height: 1.85; }

.main {
  padding: 38px 44px 88px;
  max-width: 1200px;
  margin: 0;
}
#app { display: flex; flex-direction: column; gap: 20px; }
#app > .card + .card { margin-top: 0; }
#app > * { min-width: 0; }

/* ---------- 标题与导语 ---------- */
.page-head { margin: 0; }
.page-head h1 {
  position: relative;
  font-size: 27px;
  letter-spacing: .06em;
  color: var(--gold2);
  padding-top: 15px;
  margin-bottom: 9px;
}
.page-head h1::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 30px; height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(217, 177, 102, 0));
}
.page-head p {
  margin: 0;
  max-width: 72ch;
  font-size: 13.5px;
  line-height: 1.95;
  color: var(--dim2);
}

.hero { padding: 4px 0 2px; }
.hero h1 { font-size: 38px; letter-spacing: .14em; }
.hero p { margin-top: 12px; max-width: 64ch; font-size: 14px; line-height: 1.95; color: var(--dim2); }
.hero .seal { margin-top: 16px; padding: 5px 13px; font-size: 11.5px; letter-spacing: .16em; color: var(--gold); }

h1, h2, h3, h4 { letter-spacing: .04em; }

/* ---------- 卡片与分节 ---------- */
.card {
  padding: 22px 24px;
  border-radius: var(--r-lg);
  border-color: var(--hair);
  background: linear-gradient(180deg, var(--card) 0%, var(--card2) 100%);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .30);
}
.card + .card { margin-top: 16px; }
.card-h {
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(214, 172, 100, .10);
}
.card-h h3 { font-size: 16px; letter-spacing: .08em; }
.card-h .hint { font-size: 11.5px; letter-spacing: .03em; color: var(--dim2); flex: none; }
.card-h .hint a { color: var(--gold); }

.grid2 { grid-template-columns: minmax(310px, 360px) minmax(0, 1fr); gap: 20px; }
.grid2 > div > .card:first-child { margin-top: 0; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label { font-size: 12px; letter-spacing: .06em; color: var(--dim2); margin-bottom: 7px; }
.input, .select { height: 44px; border-radius: 10px; background: var(--panel); border-color: var(--hair); padding: 0 13px; }
.input::placeholder { color: #5e5548; }
.seg { background: var(--panel); border-radius: 10px; padding: 3px; }
.seg button { height: 36px; border-radius: 8px; font-size: 13px; letter-spacing: .06em; }
.btn { height: 46px; border-radius: 10px; letter-spacing: .08em; }
.btn.primary {
  background: linear-gradient(180deg, #ddb56b, #b7893b);
  border-color: #e6c887;
  color: #1d1408;
  box-shadow: 0 8px 22px rgba(217, 177, 102, .16);
}
.btn.ghost { height: 38px; }

/* ---------- 内层表面统一 ---------- */
.pillar, .dim, .rel, .al-box, .gua, .day-item, .namecard, .sign-btn, .zodiac-pick button,
.dy, .cast-slot, .today .it, .kv .it, .ng-cell, .lt-item, .hi, .seal, .fs-cell,
.fact-row, .top-row, .slot-row, .wxb, .rel, .dims > .dim, .seo-links {
  background: var(--panel);
  border-color: var(--hair);
  border-radius: var(--r-md);
}
.kv .it { padding: 11px 13px; }
.kv .it .v2 { font-size: 13.5px; color: var(--ink2); }
.today { gap: 0; align-items: stretch; }
.today .it {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 2px 0 2px 20px;
  border-left: 1px solid var(--hair);
}
.today .it:first-child { border-left: 0; padding-left: 0; }
.today .it .k { font-size: 11.5px; letter-spacing: .1em; }
.today .it .v3 { font-size: 24px; margin-top: 6px; letter-spacing: .04em; }

/* ---------- 表格 ---------- */
.card table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.card table th {
  text-align: left; font-weight: 400; font-size: 11px; letter-spacing: .06em;
  color: var(--dim2); padding: 8px 10px; border-bottom: 1px solid var(--hair2);
  vertical-align: top;
}
.card table td {
  padding: 9px 10px; border-bottom: 1px solid rgba(214, 172, 100, .07);
  color: var(--ink2); vertical-align: top; line-height: 1.85;
}
.card table tr:last-child td { border-bottom: 0; }
.card table td:first-child { color: #d9ccb2; }

/* ---------- 首页 ---------- */
.tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
  counter-reset: tile;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px;
  min-height: 176px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--card) 0%, var(--card2) 100%);
}
.tile::before {
  counter-increment: tile;
  content: counter(tile, decimal-leading-zero);
  position: absolute; top: 18px; right: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 11px; letter-spacing: .1em;
  color: rgba(217, 177, 102, .38);
}
.tile .ti { order: 1; font-size: 18px; padding-right: 30px; }
.tile .td { order: 2; margin-top: 8px; font-size: 12.5px; line-height: 1.85; color: var(--dim2); }
.tile .arrow { order: 3; float: none; margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--gold); opacity: .35; }
.tile:hover .arrow { opacity: .9; }

.disc {
  margin-top: 0;
  max-width: 92ch;
  padding: 16px 2px 0;
  font-size: 11.5px;
  line-height: 1.95;
  color: var(--dim3);
  border-top: 1px solid var(--hair);
}

/* ---------- 结果区节奏 ---------- */
.rd-meta { padding: 0 0 16px; font-size: 12px; line-height: 1.95; color: var(--dim2); }
.rd-sec { padding: 22px 0 8px; }
.rd-sec h4 { font-size: 12.5px; letter-spacing: .16em; }
.rd-sec p { font-size: 13.8px; line-height: 2.05; color: var(--ink3); }
.rd-sec p:last-child { margin-bottom: 10px; }
.hl { font-size: 17px; margin-bottom: 8px; }

#seo { margin-top: 0; }
#seo .card { margin-bottom: 14px; }
#seo h4 { margin-top: 14px; }

/* ---------- 目录与列表 ---------- */
.seo-links { margin: 0; padding: 18px 20px; }
.gua > summary { padding: 14px 16px; }
.day-item > summary { padding: 11px 14px; }
.hi-main { padding: 13px 15px; }

/* ---------- 移动端 ---------- */
@media (max-width: 1120px) {
  .grid2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 900px) {
  .main { padding: 18px 16px calc(92px + env(safe-area-inset-bottom)); }
  #app { gap: 14px; }
  .card { padding: 17px 16px; border-radius: var(--r-md); }
  .card-h { padding-bottom: 10px; margin-bottom: 14px; gap: 10px; }
  .card-h h3 { font-size: 15px; }
  .page-head h1 { font-size: 22px; padding-top: 13px; margin-bottom: 7px; }
  .page-head p { font-size: 13px; line-height: 1.85; }
  .hero { padding: 2px 0 0; }
  .hero h1 { font-size: 32px; letter-spacing: .1em; }
  .hero p { font-size: 13.5px; }
  .hero .seal { margin-top: 14px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { padding: 16px; min-height: 0; }
  .tile .ti { font-size: 16px; }
  .tile .td { font-size: 12px; line-height: 1.8; }
  .tile .arrow { font-size: 12px; padding-top: 10px; }
  .today { gap: 0; }
  .today .it { padding: 0 0 0 14px; }
  .today .it .v3 { font-size: 20px; }
  .disc { font-size: 11px; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tile { min-height: 0; }
  .today { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .today .it { border-left: 0; padding-left: 0; border-top: 1px solid var(--hair); padding-top: 12px; }
  .today .it:first-child { border-top: 0; padding-top: 0; }
}


/* ============================================================
   主题系统：墨金（默认）/ 宣纸（长辈大字）/ 夜青（年轻）/ 素白（极简）
   切换只改 :root 上的 data-theme，所有颜色走语义变量
   ============================================================ */

/* ---------- 宣纸：长辈向，米白底、大字、赭金强调 ---------- */
[data-theme="paper"] {
  --bg: #f3ecdd;
  --bg2: #eae1ce;
  --card: #fffdf6;
  --card2: #faf3e4;
  --panel: #f8f1e2;
  --line: rgba(140, 100, 40, .20);
  --line2: rgba(140, 100, 40, .44);
  --gold: #b07a24;
  --gold2: #8a5712;
  --ink: #2b2419;
  --ink2: #40351f;
  --ink3: #57492f;
  --muted: #6f6049;
  --dim2: #8b7a60;
  --dim3: #a8977c;
  --btn-a: #fdf8ee;
  --btn-b: #f5ecd9;
  --shadow: 0 10px 26px rgba(96, 74, 40, .10);
}
[data-theme="paper"] body::before {
  background:
    radial-gradient(900px 520px at 10% -12%, rgba(176, 122, 36, .10), transparent 62%),
    radial-gradient(700px 420px at 96% 2%, rgba(150, 70, 48, .06), transparent 64%);
}
[data-theme="paper"] .side { background: linear-gradient(180deg, #f8f2e5, #efe6d3); }
[data-theme="paper"] .topbar, [data-theme="paper"] .tabbar { background: rgba(247, 241, 228, .94); }
[data-theme="paper"] .brand .mark { background: radial-gradient(circle at 30% 25%, #fffaf0, #efe1c6 72%); }
[data-theme="paper"] .nav a { color: #5a4c33; font-size: 15px; }
[data-theme="paper"] .nav a:hover { background: rgba(176, 122, 36, .08); }
[data-theme="paper"] .nav a.active { background: linear-gradient(90deg, rgba(176, 122, 36, .16), rgba(176, 122, 36, .03)); }
[data-theme="paper"] .input, [data-theme="paper"] .select, [data-theme="paper"] .seg { background: #fffdf7; }
[data-theme="paper"] .btn { background: linear-gradient(180deg, #fdf8ee, #f6edda); }
[data-theme="paper"] .btn.primary { background: linear-gradient(180deg, #c9913c, #a5701f); color: #fffaf1; border-color: #c9913c; box-shadow: 0 8px 20px rgba(150, 100, 30, .18); }
[data-theme="paper"] .tile { background: linear-gradient(180deg, #fffdf7, #faf4e7); }
[data-theme="paper"] .pillar .meta b,
[data-theme="paper"] .namecard .chars b,
[data-theme="paper"] #seo b { color: #4a3d29; }
[data-theme="paper"] .card table td:first-child { color: #3f3524; }
[data-theme="paper"] .fx-pop { background: radial-gradient(circle at 50% 44%, rgba(255, 252, 244, .72), rgba(238, 228, 208, .95)); }
[data-theme="paper"] .fx-badge-good { color: #8a5712; }
[data-theme="paper"] .fx-badge-mid { color: #4c5a4f; }
[data-theme="paper"] .fx-badge-low { color: #8a4436; }
[data-theme="paper"] .fs-cold { mix-blend-mode: multiply; opacity: .5; }
/* 长辈版正文字号与行距 */
[data-theme="paper"] body { font-size: 16px; line-height: 1.8; }
[data-theme="paper"] .card-h h3 { font-size: 17px; }
[data-theme="paper"] .page-head h1 { font-size: 29px; }
[data-theme="paper"] .hero h1 { color: #7a4c10; }
[data-theme="paper"] .page-head p, [data-theme="paper"] .tile .td { font-size: 14px; line-height: 1.9; }
[data-theme="paper"] .rd-sec p, [data-theme="paper"] .ai-text { font-size: 15px; line-height: 2.1; }
[data-theme="paper"] .card table { font-size: 13.5px; }
[data-theme="paper"] .hint, [data-theme="paper"] .dim { font-size: 12.5px; }

/* ---------- 夜青：年轻向，冷黑底 + 青绿 ---------- */
[data-theme="youth"] {
  --bg: #090a11;
  --bg2: #0e1019;
  --card: #141827;
  --card2: #10131f;
  --panel: #0f1220;
  --line: rgba(94, 224, 196, .14);
  --line2: rgba(94, 224, 196, .36);
  --gold: #5ee0c4;
  --gold2: #a9f7e6;
  --ink: #e9ecf5;
  --ink2: #cbd1e3;
  --ink3: #aeb5cb;
  --muted: #8f97b5;
  --dim2: #78809c;
  --dim3: #5c6483;
  --btn-a: #1a2136;
  --btn-b: #12172a;
  --shadow: 0 16px 42px rgba(2, 6, 14, .6);
}
[data-theme="youth"] body::before {
  background:
    radial-gradient(900px 520px at 8% -12%, rgba(94, 224, 196, .18), transparent 60%),
    radial-gradient(760px 460px at 96% 0%, rgba(147, 102, 255, .18), transparent 64%);
}
[data-theme="youth"] .card { border-radius: 18px; }
[data-theme="youth"] .btn.primary {
  background: linear-gradient(180deg, #6ee9d0, #2fbfa4);
  color: #04241f; border-color: #9cf6e4;
  box-shadow: 0 10px 30px rgba(94, 224, 196, .22);
}
[data-theme="youth"] .tile::before { color: rgba(94, 224, 196, .45); }
[data-theme="youth"] .fx-pop { background: radial-gradient(circle at 50% 44%, rgba(12, 18, 30, .58), rgba(3, 5, 10, .92)); }
[data-theme="youth"] .fs-flash { background: radial-gradient(62% 52% at 50% 42%, rgba(220, 255, 250, .45), rgba(94, 224, 196, .18) 46%, transparent 72%); }
[data-theme="youth"] .fs-rays { background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(94, 224, 196, .17) 0deg 1.4deg, transparent 1.4deg 8deg); }
[data-theme="youth"] .fs-sweep { background: linear-gradient(105deg, transparent 38%, rgba(94, 224, 196, .22) 47%, rgba(220, 255, 250, .32) 50%, rgba(94, 224, 196, .2) 53%, transparent 62%); }
[data-theme="youth"] .fx-good > .card { border-color: rgba(94, 224, 196, .35); }

/* ---------- 素白：极简，纯黑白灰 ---------- */
[data-theme="mono"] {
  --bg: #0a0a0a;
  --bg2: #101010;
  --card: #141414;
  --card2: #0f0f0f;
  --panel: #0d0d0d;
  --line: rgba(255, 255, 255, .10);
  --line2: rgba(255, 255, 255, .24);
  --gold: #e6e6e6;
  --gold2: #ffffff;
  --ink: #ededed;
  --ink2: #cfcfcf;
  --ink3: #ababab;
  --muted: #9a9a9a;
  --dim2: #7d7d7d;
  --dim3: #5f5f5f;
  --btn-a: #1e1e1e;
  --btn-b: #151515;
  --shadow: 0 10px 28px rgba(0, 0, 0, .55);
}
[data-theme="mono"] body::before { background: none; }
[data-theme="mono"] .brand .mark { background: radial-gradient(circle at 30% 25%, #242424, #0e0e0e 70%); border-color: rgba(255, 255, 255, .22); }
[data-theme="mono"] .btn.primary { background: linear-gradient(180deg, #f4f4f4, #d9d9d9); color: #0b0b0b; border-color: #fff; box-shadow: none; }
[data-theme="mono"] .fx-pop { background: radial-gradient(circle at 50% 44%, rgba(20, 20, 20, .62), rgba(4, 4, 4, .92)); }
[data-theme="mono"] .fx-good > .card { border-color: rgba(255, 255, 255, .28); }

/* ---------- 切换器 ---------- */
.theme-sw { display: flex; flex-direction: column; gap: 8px; padding: 12px 6px 4px; border-top: 1px solid var(--line); }
.ts-t { font-size: 10px; letter-spacing: .18em; color: var(--dim3); }
.ts-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.theme-sw button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 6px 2px; border: 1px solid var(--line); border-radius: 8px;
  background: transparent; color: var(--dim2); font-size: 9.5px; letter-spacing: .02em;
  cursor: pointer; transition: .16s;
}
.theme-sw button:hover { color: var(--gold2); border-color: var(--line2); }
.theme-sw button.on { color: var(--gold2); border-color: var(--gold); background: rgba(217, 177, 102, .08); }
.sw { width: 15px; height: 15px; border-radius: 5px; flex: none; display: block; border: 1px solid rgba(128, 128, 128, .3); }
.sw-ink { background: linear-gradient(135deg, #171310 40%, #d9b166); }
.sw-paper { background: linear-gradient(135deg, #f7f1e4 40%, #a5701f); }
.sw-youth { background: linear-gradient(135deg, #101320 40%, #5ee0c4); }
.sw-mono { background: linear-gradient(135deg, #101010 40%, #e6e6e6); }

.top-right { display: flex; align-items: center; gap: 10px; }
.top-note { font-size: 11.5px; color: var(--dim2); }
#themeSel {
  height: 30px; padding: 0 6px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line); color: var(--dim2);
  font-size: 12px; outline: none;
}
@media (max-width: 560px) { .top-note { display: none; } }

/* ---------- 主题微调：标题渐变、宣纸可读性 ---------- */
[data-theme="paper"] .page-head h1 {
  background: linear-gradient(180deg, #33291a 0%, #7a4c10 62%, #a06a1c 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: none;
}
[data-theme="paper"] .hero p, [data-theme="paper"] .page-head p { color: #5f5138; }
[data-theme="paper"] .hero .seal { color: #8a5712; }
[data-theme="paper"] .disc { color: #7d6c4f; }
[data-theme="paper"] [style*="color:#bfb49f"], [data-theme="paper"] [style*="color: #bfb49f"] { color: #5a4b33 !important; }
[data-theme="paper"] [style*="color:#8c8170"], [data-theme="paper"] [style*="color: #8c8170"] { color: #6f6049 !important; }
[data-theme="paper"] [style*="color:#6e6353"], [data-theme="paper"] [style*="color: #6e6353"] { color: #7d6c51 !important; }
[data-theme="paper"] [style*="color:#9a8f7b"], [data-theme="paper"] [style*="color: #9a8f7b"] { color: #5f5138 !important; }
[data-theme="paper"] [style*="color:#cfc4ae"], [data-theme="paper"] [style*="color: #cfc4ae"] { color: #453a25 !important; }

[data-theme="youth"] .page-head h1 {
  background: linear-gradient(180deg, #f2fffc 0%, #7defd8 58%, #35b39b 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 14px rgba(94, 224, 196, .35));
}
[data-theme="youth"] .hero .seal { color: #7defd8; border-color: var(--line2); }

[data-theme="mono"] .page-head h1 {
  background: linear-gradient(180deg, #ffffff 0%, #dcdcdc 58%, #a8a8a8 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: none;
}

/* ---------- 移动端收口 & 宣纸补色 ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .card-h { flex-wrap: wrap; gap: 4px 10px; }
  .card-h h3 { white-space: nowrap; }
  .card-h .hint { font-size: 11.5px; }
  .hero .line, .page-head .lead { font-size: 13.5px; }
  .pill-now { white-space: nowrap; font-size: 12px; }
}
[data-theme="paper"] .pillar .meta b,
[data-theme="paper"] #seo b { color: #4a3d29; }
[data-theme="paper"] .pillar .gan,
[data-theme="paper"] .pillar .zhi { filter: saturate(.9) brightness(.85); }
[data-theme="paper"] .card-h .hint,
[data-theme="paper"] .tile .no,
[data-theme="paper"] .gua-meta { color: #7a6a4e; }
[data-theme="paper"] [style*="color:#d9b166"], [data-theme="paper"] [style*="color: #d9b166"] { color: #8a5712 !important; }
[data-theme="paper"] [style*="color:#e6dcc8"], [data-theme="paper"] [style*="color: #e6dcc8"] { color: #3f3524 !important; }
[data-theme="paper"] [style*="color:#c08a7a"], [data-theme="paper"] [style*="color: #c08a7a"] { color: #8a4436 !important; }
[data-theme="paper"] [style*="color:#c98b6b"], [data-theme="paper"] [style*="color: #c98b6b"] { color: #8a4436 !important; }
