/* 百舸八字 · PC 端样式 —— 国学视觉（琉璃金/釉红/云烟墨/沙青/石松绿） */
:root {
  --ink: #231815;          /* 云烟墨 */
  --ink-soft: #4a3f36;
  --bg: #f7f2e5;           /* 宣纸米白 */
  --card: #fdfaf1;
  --line: #e6dcc4;
  --gold: #d3ad78;         /* 琉璃金 */
  --gold-deep: #a8834a;
  --red: #ac4a3b;          /* 釉红 */
  --blue: #446285;         /* 沙青 */
  --green: #5e9278;        /* 石松绿 */
  --muted: #9a8c74;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  background: #d8c8a6; color: var(--ink); min-width: 1080px;
  background-image: linear-gradient(160deg, #ddcdab 0%, #d3c29e 60%, #cbb890 100%); }
#app { max-width: 1400px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: row;
  background: var(--bg); box-shadow: 0 0 60px rgba(60,40,10,.25); }

/* ============ 左侧导航栏（浅色分组列表） ============ */
.tabbar { order: -1; display: flex; flex-direction: column; width: 208px; min-width: 208px;
  background: #fbf8f0; border-right: 1px solid var(--line); padding: 0 0 24px;
  position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 16px 16px; }
.brand .seal { width: 38px; height: 38px; min-width: 38px; background: var(--red); color: #fff7ea;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; letter-spacing: 1px; font-weight: 700;
  box-shadow: inset 0 0 0 1.5px rgba(255,247,234,.4), 0 1px 4px rgba(140,60,45,.28); }
.brand .bn { color: var(--ink); font-size: 16px; letter-spacing: 3px; font-weight: 700; }

.nav-sec { margin-bottom: 6px; }
.nav-glabel { font-size: 12px; color: #a4967c; letter-spacing: 2px; padding: 14px 18px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; margin: 1px 8px; padding: 9px 10px;
  border-radius: 8px; cursor: pointer; color: var(--ink-soft); font-size: 14.5px; letter-spacing: 1px; }
.nav-item:hover { background: #f3ecdc; }
.nav-item.on { background: #f0e8d4; color: var(--ink); font-weight: 700;
  box-shadow: inset 2px 0 0 var(--gold-deep); }
.ni-ico { width: 20px; text-align: center; font-size: 15px; color: var(--gold-deep); }
.nav-item.on .ni-ico { color: var(--red); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ============ 顶栏（宣纸浅色 + 金线） ============ */
.topbar { background: var(--bg); color: var(--ink); padding: 20px 30px 14px;
  border-bottom: 1px solid var(--gold); box-shadow: 0 1px 0 rgba(211,173,120,.35); }
.topbar h1 { font-size: 21px; font-weight: 700; letter-spacing: 8px; color: var(--ink); }
.topbar h1::after { content: ""; display: block; width: 46px; height: 3px; background: var(--red); margin-top: 6px; }
.subtabs { display: flex; gap: 18px; font-size: 15px; color: var(--muted); }
.subtabs span { padding-bottom: 6px; cursor: pointer; letter-spacing: 2px; }
.subtabs span.on { color: var(--ink); border-bottom: 3px solid var(--red); font-weight: 700; }
.pc-subtabs { color: var(--muted); }
.pc-subtabs span.on { color: var(--ink); border-bottom: 3px solid var(--red); font-weight: 700; }
.timebox { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 14px; gap: 8px; color: var(--ink-soft); }
.timebox b { color: var(--red); }
.timebox input { background: transparent; border: none; border-bottom: 1px solid var(--gold);
  color: var(--ink); font-size: 15px; padding: 2px 0; font-family: inherit; }
.timebox .lunar { color: var(--muted); }

/* ============ 内容区与卡片 ============ */
.wrap { padding: 24px 30px; flex: 1; }
.card { background: var(--card); border-radius: 12px; padding: 18px; margin-bottom: 16px;
  border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(120,90,40,.06); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cell { background: #f6f0df; border-radius: 8px; padding: 10px 12px; border: 1px solid #efe6cf; }
.cell .k { font-size: 13px; color: var(--muted); letter-spacing: 2px; }
.cell .v { font-size: 17px; font-weight: 700; margin-top: 4px; }
.cell .v small { font-size: 12px; color: var(--muted); font-weight: 400; }
.center-title { text-align: center; font-size: 19px; font-weight: 700; margin: 6px 0 14px; letter-spacing: 4px; }
.center-title u { text-decoration: none; border-bottom: 3px solid var(--red); padding-bottom: 3px; }

/* 双栏 */
.yq-grid { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(440px, 1fr); gap: 18px; align-items: start; }
.pp-grid { display: grid; grid-template-columns: minmax(540px, 3fr) minmax(360px, 2fr); gap: 18px; align-items: start; }

/* 五行配色（对齐国学色卡：石松绿/釉红/赭土/琉璃金/沙青） */
.wx-mu { color: #5e9278; } .wx-huo { color: #ac4a3b; } .wx-tu { color: #8a6d3f; }
.wx-jin { color: #b58a35; } .wx-shui { color: #446285; }

/* ============ 排盘 ============ */
.paipan-form label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 4px; letter-spacing: 2px; }
.paipan-form input, .paipan-form select { width: 100%; padding: 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 15px; background: #fffdf6; font-family: inherit; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--gold-deep); border-radius: 8px; overflow: hidden; }
.seg span { padding: 8px 22px; font-size: 14px; cursor: pointer; letter-spacing: 2px; }
.seg span.on { background: var(--gold-deep); color: #fff9ec; }
.btn { display: block; width: 100%; margin-top: 18px; padding: 13px; background: var(--red); border: none;
  color: #fff7ea; font-size: 16px; border-radius: 10px; cursor: pointer; letter-spacing: 8px; font-family: inherit;
  box-shadow: 0 2px 8px rgba(172,74,59,.35); }
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--red); border: 1px solid var(--red); box-shadow: none; }

table.mp { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
table.mp th, table.mp td { border: 1px solid #ece3cc; text-align: center; padding: 6px 3px; word-break: break-all; }
table.mp th { background: #f4eeda; color: var(--gold-deep); font-weight: 500; width: 44px; font-size: 12px; letter-spacing: 2px; }
table.mp td.gz { font-size: 25px; font-weight: 700; }
table.mp td .sub { display: block; font-size: 11px; color: var(--muted); }
table.mp td.ny { font-size: 11px; color: var(--muted); }

.hd-info { background: linear-gradient(120deg, #2a211a, #3a2d22); color: #ead9b8; border-radius: 12px;
  padding: 16px 20px; margin-bottom: 16px; display: flex; gap: 18px; align-items: center;
  border: 1px solid rgba(211,173,120,.4); }
.hd-info .sx { width: 56px; height: 56px; min-width: 56px; border-radius: 50%; border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--gold);
  background: rgba(211,173,120,.08); }
.hd-info .meta { font-size: 14px; line-height: 1.9; }
.hd-info .meta b { color: var(--gold); }

.scroll-row { display: flex; gap: 6px; padding: 4px 0; flex-wrap: wrap; }
.pill { flex: 0 0 auto; min-width: 54px; text-align: center; background: #f4eeda; border-radius: 8px;
  padding: 6px 6px; cursor: pointer; border: 1px solid #eadfc4; }
.pill:hover { border-color: var(--gold); }
.pill.on { background: #fbf2dd; border-color: var(--gold-deep); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.pill .t { font-size: 11px; color: var(--muted); }
.pill .g { font-size: 15px; font-weight: 700; }
.rowlabel { font-size: 13px; color: var(--gold-deep); margin: 10px 0 2px; display: flex;
  justify-content: space-between; align-items: center; letter-spacing: 2px; }
.rowlabel .today-btn { font-size: 12px; color: #fff7ea; cursor: pointer; background: var(--red);
  border-radius: 6px; padding: 2px 12px; letter-spacing: 2px; }

.energy-bar { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 13px; }
.energy-bar .bar { flex: 1; height: 10px; background: #efe7d1; border-radius: 5px; overflow: hidden; }
.energy-bar .bar i { display: block; height: 100%; border-radius: 5px; }
.mu-bg { background: #5e9278; } .huo-bg { background: #ac4a3b; } .tu-bg { background: #8a6d3f; }
.jin-bg { background: #c9a55c; } .shui-bg { background: #446285; }

.switch-line { display: flex; justify-content: space-between; align-items: center; padding: 13px 2px;
  border-bottom: 1px dashed var(--line); font-size: 14px; letter-spacing: 1px; }
.switch-line:last-child { border-bottom: none; }
.opt { display: inline-flex; gap: 6px; }
.opt span { padding: 4px 12px; border-radius: 6px; border: 1px solid var(--line); font-size: 13px; cursor: pointer; color: var(--muted); }
.opt span.on { border-color: var(--gold-deep); color: var(--gold-deep); background: #fbf2dd; }

/* ============ 书架 ============ */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.book { background: linear-gradient(180deg, #fbf6e8, #f3ead2); border: 1px solid #e0d3ac; border-radius: 6px;
  padding: 18px 6px; text-align: center; font-size: 13px; color: #5a4a2f; writing-mode: vertical-rl;
  min-height: 132px; margin: 0 auto; width: 100%; letter-spacing: 4px; cursor: default; position: relative; }
.book::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: #d8c69a; }
.book:hover { box-shadow: 0 3px 10px rgba(90,74,47,.18); }
.book-cat { font-size: 14px; color: var(--gold-deep); margin: 4px 0 10px; letter-spacing: 3px; }
.book-cat::before { content: "◆ "; color: var(--red); font-size: 10px; }

/* ============ 圆盘 ============ */
.wheel-box { display: flex; justify-content: center; }
.legend { display: flex; gap: 12px; justify-content: center; font-size: 12px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.tips { font-size: 12px; color: var(--muted); line-height: 1.9; margin-top: 8px; }

/* ============ 流派解读 ============ */
.ana-line { font-size: 14px; margin: 11px 0; line-height: 1.8; }
.ana-line > b { color: var(--red); font-weight: 700; }
.school-row { margin-bottom: 8px; }
.school-row .pill { min-width: 76px; padding: 8px 8px; }
.school-head { padding: 10px 14px; background: #f4eeda; border-radius: 8px; margin-bottom: 6px;
  font-size: 14px; border-left: 3px solid var(--red); }

/* ============ 档案列表 ============ */
.arch-item { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px dashed var(--line); cursor: pointer; border-radius: 6px; }
.arch-item:hover { background: #f6f0df; }
.arch-item:last-child { border-bottom: none; }
.arch-star { color: #d8cdb2; font-size: 17px; cursor: pointer; }
.arch-star.on { color: var(--gold-deep); }
.arch-main { flex: 1; min-width: 0; }
.arch-name { font-size: 15px; font-weight: 700; }
.arch-name small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.arch-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.arch-bz { font-size: 13px; color: var(--gold-deep); letter-spacing: 2px; margin-top: 2px; }
.arch-del { color: #c9b9a0; cursor: pointer; padding: 4px 6px; font-size: 13px; }
.arch-del:hover { color: var(--red); }

/* 流派结论与语气标识 */
.verdict { font-size: 17px; font-weight: 700; letter-spacing: 2px; color: #fff7ea;
  background: linear-gradient(100deg, var(--red), #8f3a2d); padding: 9px 14px; border-radius: 8px;
  margin-bottom: 10px; box-shadow: 0 2px 8px rgba(172,74,59,.28); }
.ana-line { padding-left: 9px; border-left: 3px solid transparent; }
.ana-line.tone-good { border-left-color: var(--green); }
.ana-line.tone-warn { border-left-color: var(--gold-deep); }
.ana-line.tone-bad  { border-left-color: var(--red); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 5px; vertical-align: middle; }
.d-good { background: var(--green); } .d-warn { background: var(--gold-deep); } .d-bad { background: var(--red); }

/* ============ 顶栏档案切换 ============ */
.topbar-head { display: flex; align-items: center; gap: 20px; }
.arch-switch { position: relative; }
.as-btn { display: flex; align-items: center; gap: 10px; padding: 7px 14px; cursor: pointer;
  border: 1px solid var(--gold); border-radius: 8px; background: #fdfaf1; }
.as-btn:hover { background: #fbf2dd; }
.as-name { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: 1px; }
.as-meta { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.as-caret { color: var(--gold-deep); font-size: 12px; }
.as-mask { position: fixed; inset: 0; z-index: 40; }
.as-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 41; min-width: 400px; max-height: 62vh;
  overflow-y: auto; background: var(--card); border: 1px solid var(--gold); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(80,55,20,.22); padding: 6px; }
.as-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.as-item:hover { background: #f6f0df; }
.as-item.on { background: #fbf2dd; box-shadow: inset 0 0 0 1px var(--gold-deep); }
.as-star { width: 12px; color: var(--gold-deep); font-size: 12px; }
.as-i-name { font-size: 14px; font-weight: 700; }
.as-i-name small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.as-i-sub { font-size: 12px; color: var(--muted); }
.as-new { color: var(--red); font-weight: 700; font-size: 14px; justify-content: center;
  border-bottom: 1px dashed var(--line); border-radius: 6px 6px 0 0; margin-bottom: 4px; }
.as-empty { padding: 14px; text-align: center; font-size: 13px; color: var(--muted); }

/* 多维分析子结论 */
.verdict.v-sub { font-size: 15px; padding: 7px 12px; letter-spacing: 1px;
  background: linear-gradient(100deg, var(--gold-deep), #8d6c39); }

/* ============ 小运 / 迷你按钮 / 干支详情弹窗 ============ */
.pill.xy { background: #f2ece0; min-width: 50px; }
.mini-btn { font-size: 12px; padding: 4px 12px; border: 1px solid var(--gold-deep); color: var(--gold-deep);
  border-radius: 6px; cursor: pointer; letter-spacing: 1px; }
.mini-btn:hover { background: #fbf2dd; }
table.mp td.gz .clickable { cursor: pointer; border-bottom: 2px dotted transparent; }
table.mp td.gz .clickable:hover { border-bottom-color: var(--gold-deep); }

.modal-mask { position: fixed; inset: 0; background: rgba(35,24,21,.42); z-index: 60; }
.modal { position: fixed; z-index: 61; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 560px; max-height: 82vh; overflow-y: auto; background: var(--card);
  border: 1px solid var(--gold); border-radius: 12px; box-shadow: 0 18px 50px rgba(60,40,10,.35); }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 16px 18px;
  border-bottom: 1px solid var(--line); background: #f6f0df; border-radius: 12px 12px 0 0; }
.m-gz { font-size: 40px; font-weight: 700; line-height: 1; width: 52px; text-align: center; }
.m-title { font-size: 16px; font-weight: 700; letter-spacing: 2px; }
.m-close { margin-left: auto; cursor: pointer; color: var(--muted); font-size: 15px; padding: 4px 8px; }
.m-close:hover { color: var(--red); }
.modal-body { padding: 14px 18px 20px; }
.modal-body .ana-line .tips { display: block; margin-top: 2px; }

/* ============ 打印 ============ */
@media print {
  body { background: #fff; min-width: 0; }
  #app { box-shadow: none; max-width: none; }
  .tabbar, .arch-switch, .mini-btn, .today-btn, .school-row, .modal, .modal-mask,
  .tl, .btn, .rowlabel .today-btn { display: none !important; }
  .topbar { border-bottom: 2px solid #000; }
  .pp-grid { display: block; }
  .card { break-inside: avoid; box-shadow: none; border-color: #ccc; }
}

/* ============ 运势 K 线图 ============ */
.kl-svg { display: block; background: #fdfaf1; border-radius: 8px; }
.kl-grid { stroke: #ece3cc; stroke-width: 1; stroke-dasharray: 3 3; }
.kl-zero { stroke: var(--gold); stroke-width: 1.2; }
.kl-axis { font-size: 10px; fill: #a89a80; font-family: inherit; }
.kl-line { fill: none; stroke: var(--gold-deep); stroke-width: 1.4; stroke-dasharray: 4 3; opacity: .75; }
.kl-g { cursor: pointer; }
.kl-hit { fill: transparent; }
.kl-hit.on { fill: rgba(211,173,120,.22); }
.kl-g:hover .kl-hit { fill: rgba(211,173,120,.13); }
.kl-sh-up { stroke: #4a7a5f; stroke-width: 1.4; }
.kl-sh-dn { stroke: #8f3a2d; stroke-width: 1.4; }
.kl-b-up { fill: #5e9278; stroke: #43775c; stroke-width: 1; }
.kl-b-dn { fill: #ac4a3b; stroke: #8f3a2d; stroke-width: 1; }
.kl-b-flat { fill: #c9b98f; stroke: #a8834a; stroke-width: 1; }
.kl-gz { font-size: 13px; font-weight: 700; fill: var(--ink); font-family: inherit; }
.kl-lb { font-size: 10px; fill: #a89a80; font-family: inherit; }
.kl-cur { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px;
  background: #f6f0df; border-radius: 8px; margin-bottom: 8px; font-size: 14px; border-left: 3px solid var(--gold-deep); }
.kl-cur b { font-size: 18px; letter-spacing: 2px; }
.kl-lbl { color: var(--muted); font-size: 12px; }
.kl-up { color: #43775c; font-weight: 700; }
.kl-dn { color: var(--red); font-weight: 700; }
.kl-flat { color: var(--gold-deep); font-weight: 700; }
.kl-legend { display: flex; gap: 16px; justify-content: center; font-size: 11px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.kl-legend .sw { display: inline-block; width: 9px; height: 12px; border-radius: 2px; margin-right: 4px; vertical-align: -2px; }

/* ============ 紫微斗数盘 ============ */
.zw-grid-wrap { display: grid; grid-template-columns: minmax(600px, 1fr) minmax(330px, 420px); gap: 18px; align-items: start; }
.zw-board { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 172px);
  gap: 3px; background: var(--gold); padding: 3px; border-radius: 10px; }
.zw-cell { background: var(--card); padding: 6px 7px; display: flex; flex-direction: column;
  cursor: pointer; position: relative; overflow: hidden; }
.zw-cell:hover { background: #fbf6e9; }
.zw-cell.on { background: #fbf2dd; box-shadow: inset 0 0 0 2px var(--gold-deep); }
.zw-cell.ming { background: #fdf3e4; }
.zw-cell.ming.on { background: #fbeed6; }
.zw-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.zw-gong { font-size: 13px; font-weight: 700; color: var(--gold-deep); letter-spacing: 1px; }
.zw-gong.g-ming { color: var(--red); }
.zw-gong i { font-style: normal; font-size: 11px; color: var(--blue); margin-left: 2px; }
.zw-dx { font-size: 10px; color: var(--muted); }
.zw-stars { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.zw-stars span { font-size: 13px; line-height: 1.45; }
.zs-主 { font-weight: 700; color: var(--ink); }
.zs-辅 { color: var(--blue); font-size: 12px !important; }
.zs-煞 { color: var(--red); font-size: 12px !important; }
.zs-empty { color: #bcae94; font-size: 11px !important; }
.zw-stars b { font-size: 10px; font-weight: 700; margin-left: 2px; vertical-align: super; }
.hua-禄 { color: #43775c; } .hua-权 { color: #a8834a; } .hua-科 { color: #446285; } .hua-忌 { color: #ac4a3b; }
.zw-bot { text-align: right; }
.zw-gz { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.zw-center { grid-column: 2 / 4; grid-row: 2 / 4; background: linear-gradient(140deg, #2a211a, #3a2d22);
  color: #ead9b8; padding: 18px 20px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.zw-c-name { font-size: 19px; font-weight: 700; letter-spacing: 3px; color: var(--gold); margin-bottom: 4px; }
.zw-c-name small { font-size: 12px; color: #b8a98a; letter-spacing: 1px; }
.zw-c-line { font-size: 13px; line-height: 1.9; }
.zw-c-line b { color: var(--gold); }
.zw-c-hr { height: 1px; background: rgba(211,173,120,.3); margin: 7px 0; }
.zw-c-hua span { margin-right: 10px; font-size: 13px; }
.zw-c-hua b { font-size: 11px; margin-left: 2px; vertical-align: super; }
.zw-c-hua .hua-禄 { color: #7fc0a0; } .zw-c-hua .hua-权 { color: #e0bd82; }
.zw-c-hua .hua-科 { color: #8fb0d8; } .zw-c-hua .hua-忌 { color: #e08b7c; }
.zw-c-tip { font-size: 11px; color: #9d8e76; margin-top: 2px; }
.zw-t { font-size: 11px; color: var(--muted); margin: 0 4px; }

/* 紫微：运限、十二神、飞星四化 */
.zw-limitbar { padding: 12px 14px; }
.zw-shen { font-size: 10px; color: #b0a288; letter-spacing: 0; }
.zw-bot { display: flex; justify-content: space-between; align-items: baseline; }
.hua-fly { font-size: 9px !important; margin-left: 3px !important; padding: 0 2px;
  border: 1px solid currentColor; border-radius: 2px; vertical-align: super; }
.zw-flag { position: absolute; top: 0; right: 0; background: var(--red); color: #fff7ea;
  font-size: 10px; padding: 1px 5px; border-radius: 0 0 0 5px; letter-spacing: 1px; }

/* 六步客气时段表 */
table.qi-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
table.qi-table th, table.qi-table td { border: 1px solid #ece3cc; padding: 5px 6px; text-align: center; }
table.qi-table th { background: #f4eeda; color: var(--gold-deep); font-weight: 500; font-size: 12px; }
table.qi-table tr.cur td { background: #fbf2dd; font-weight: 700; }
table.qi-table td.good { color: #43775c; } table.qi-table td.bad { color: var(--red); }

/* 紫微：自化 / 叠宫 / 运限链角标 */
.hua-zi { font-size: 9px !important; margin-left: 3px !important; vertical-align: super;
  border-bottom: 1.5px solid currentColor; }
.zw-ov { font-size: 10px; color: var(--blue); background: #eef2f7; border-radius: 3px;
  padding: 0 4px; display: inline-block; align-self: flex-start; margin-bottom: 2px; }
.zw-flags { position: absolute; top: 0; right: 0; display: flex; }
.zw-flags i { font-style: normal; font-size: 10px; padding: 1px 4px; color: #fff7ea; letter-spacing: 1px; }
.mk-限 { background: #8f6a2f; } .mk-年 { background: #ac4a3b; }
.mk-月 { background: #446285; } .mk-日 { background: #5e9278; } .mk-时 { background: #7a5b8a; }
.zw-chain { display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 0 2px; font-size: 12px; color: var(--ink-soft); }
.zw-chain-i b { display: inline-block; font-size: 10px; padding: 1px 4px; color: #fff7ea;
  border-radius: 3px; margin-right: 3px; }
.zw-chain-i { background: #f4eeda; border-radius: 5px; padding: 2px 7px; }

/* ============ 合盘 ============ */
.hp-lb { display: block; font-size: 12px; color: var(--muted); margin: 6px 0 3px; letter-spacing: 1px; }
.hp-sel { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; background: #fffdf6; font-family: inherit; color: var(--ink); }
.hp-head { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--line); font-size: 14px; }
.hp-head > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hp-head b { color: var(--red); }
.hp-score { display: flex; align-items: center; gap: 16px; padding: 12px 16px; margin-bottom: 10px;
  background: linear-gradient(100deg, #2a211a, #3a2d22); color: #ead9b8; border-radius: 10px; }
.hp-num { font-size: 38px; font-weight: 700; color: var(--gold); line-height: 1; letter-spacing: 1px; }
.hp-score b { font-size: 17px; color: #f3e6cd; letter-spacing: 2px; }

/* ============ 周易 ============ */
.yi-grid { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.2fr); gap: 18px; align-items: start; }
.mh-nums { margin: 12px 0 6px; font-size: 14px; color: var(--gold-deep); letter-spacing: 2px; }
.gua-row { display: flex; gap: 14px; justify-content: space-around; margin-top: 6px; }
.gua-box { text-align: center; flex: 1; }
.gua-t { font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: 2px; }
.gua-yao { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.gua-yao i { display: block; width: 58px; height: 7px; background: var(--ink); border-radius: 1px; position: relative; }
.gua-yao i:not(.yang)::after { content: ''; position: absolute; left: 40%; right: 40%; top: 0; bottom: 0; background: var(--card); }
.gua-yao i.moving { box-shadow: 0 0 0 2px var(--red); }
.gua-yao i.ghost { background: #d8cdb2; }
.gua-n { margin-top: 8px; font-size: 15px; font-weight: 700; letter-spacing: 1px; }

table.ly-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ly-table th, table.ly-table td { border: 1px solid #ece3cc; padding: 5px 6px; text-align: center; }
table.ly-table th { background: #f4eeda; color: var(--gold-deep); font-weight: 500; font-size: 12px; }
table.ly-table td.sm { font-size: 11px; color: var(--muted); }
table.ly-table tr.sh td { background: #fbf2dd; }
table.ly-table tr.yg td { background: #f6f0df; }
table.ly-table tr.mv td { font-weight: 700; }
.ly-yao { font-family: monospace; letter-spacing: -1px; }
.ly-yao.yin { color: var(--muted); }
.ly-sy { font-style: normal; font-size: 10px; background: var(--red); color: #fff7ea; padding: 0 3px; border-radius: 2px; margin-left: 4px; }
.ly-sy.y { background: var(--blue); }
.ly-kong { font-style: normal; font-size: 9px; color: var(--red); border: 1px solid currentColor; padding: 0 2px; margin-left: 3px; border-radius: 2px; }

/* 模块内子页签条 */
.sub-bar { padding: 10px 14px; max-width: 900px; }

/* 报数起卦输入 */
.num-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.num-in { flex: 1; min-width: 96px; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 15px; background: #fffdf6; font-family: inherit; color: var(--ink); }

/* 六爻卦象图 */
.ly-guas { margin-bottom: 14px; align-items: flex-start; }
.yao-line { display: flex; align-items: center; gap: 6px; height: 11px; }
.yao-line i { display: block; width: 58px; height: 7px; background: var(--ink); border-radius: 1px; position: relative; }
.yao-line i:not(.yang)::after { content: ''; position: absolute; left: 40%; right: 40%; top: 0; bottom: 0; background: var(--card); }
.yao-line i.chg { background: var(--red); }
.yao-mv { font-size: 11px; color: var(--red); font-weight: 700; width: 8px; }
.gua-sub { font-size: 11px; color: var(--muted); margin-top: 3px; letter-spacing: 1px; }
.gua-arrow { align-self: center; color: var(--gold-deep); font-size: 20px; padding: 0 4px; }
/* 表格内爻象 */
.ly-yc { white-space: nowrap; }
.ly-bar { display: inline-block; width: 34px; height: 6px; background: var(--ink); border-radius: 1px;
  position: relative; vertical-align: middle; }
.ly-bar:not(.yang)::after { content: ''; position: absolute; left: 38%; right: 38%; top: 0; bottom: 0; background: var(--card); }
.ly-mv { font-style: normal; font-size: 11px; color: var(--red); font-weight: 700; margin-left: 3px; }

/* 报数结果三数 */
.bs-row { display: flex; gap: 10px; margin: 14px 0 10px; }
.bs-num { flex: 1; text-align: center; background: #f4eeda; border: 1px solid #eadfc4;
  border-radius: 10px; padding: 10px 6px; }
.bs-lb { font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.bs-v { font-size: 26px; font-weight: 700; color: var(--red); line-height: 1.3; }

/* ============ 合盘：双盘对照与促进/排斥 ============ */
.dual-pan { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 6px; }
.dp-side { background: #f6f0df; border: 1px solid #efe6cf; border-radius: 10px; padding: 10px 12px; }
.dp-name { font-size: 15px; font-weight: 700; color: var(--red); margin-bottom: 6px; letter-spacing: 1px; }
.dp-name small { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
table.dp-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.dp-tbl th, table.dp-tbl td { border: 1px solid #e7dcc2; text-align: center; padding: 3px 2px; }
table.dp-tbl th { color: var(--gold-deep); font-weight: 500; font-size: 11px; background: #f0e8d4; }
table.dp-tbl td.dp-h { color: var(--muted); font-size: 11px; width: 30px; background: #f0e8d4; }
table.dp-tbl td.dp-gz { font-size: 17px; font-weight: 700; }
table.dp-tbl td.dp-hd span { display: block; font-size: 10px; color: var(--muted); }
.dp-en { display: flex; gap: 8px; margin-top: 7px; font-size: 12px; }
.dp-fav { font-size: 11.5px; color: var(--ink-soft); margin-top: 5px; line-height: 1.7; }

table.rel-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 4px; }
table.rel-tbl th, table.rel-tbl td { border: 1px solid #ece3cc; padding: 5px 8px; text-align: left; }
table.rel-tbl th { background: #f4eeda; color: var(--gold-deep); font-weight: 500; font-size: 12px; }
table.rel-tbl td.rt-k { color: var(--gold-deep); white-space: nowrap; }
table.rel-tbl td.rt-p { font-size: 15px; font-weight: 700; white-space: nowrap; }
table.rel-tbl td.rt-r { white-space: nowrap; }
table.rel-tbl td.rt-m { white-space: nowrap; font-weight: 700; font-size: 12px; }
table.rel-tbl td.rt-d { font-size: 11.5px; color: var(--muted); }
table.rel-tbl tr.pro td.rt-m { color: #43775c; } table.rel-tbl tr.pro { background: #f2f7f2; }
table.rel-tbl tr.con td.rt-m { color: var(--red); } table.rel-tbl tr.con { background: #fbf1ee; }

.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 4px; }
.pc-box { border-radius: 10px; padding: 11px 13px; border: 1px solid; }
.pc-box.pro { background: #f2f7f2; border-color: #cfe0d2; }
.pc-box.con { background: #fbf1ee; border-color: #ecd4cc; }
.pc-t { font-size: 13px; font-weight: 700; letter-spacing: 1px; margin-bottom: 6px; }
.pc-box.pro .pc-t { color: #43775c; } .pc-box.con .pc-t { color: var(--red); }
.pc-i { font-size: 12.5px; line-height: 1.8; color: var(--ink-soft); }
.pc-i b { color: var(--ink); }

/* 紫微合盘：双方迷你盘 */
.zwh-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 8px; }
.zw-board.mini { grid-template-rows: repeat(4, 96px); gap: 2px; padding: 2px; border-radius: 8px; }
.zw-cell.mini { padding: 3px 4px; cursor: default; }
.zw-cell.mini.pro { background: #f0f6f1; }
.zw-cell.mini.con { background: #fbeeea; }
.zw-cell.mini.ming { box-shadow: inset 0 0 0 2px var(--red); }
.zc-top { font-size: 10.5px; color: var(--gold-deep); font-weight: 700; letter-spacing: 1px; }
.zc-stars { flex: 1; display: flex; flex-direction: column; gap: 0; margin-top: 1px; }
.zc-stars span { font-size: 11.5px; font-weight: 700; line-height: 1.4; color: var(--ink); }
.zc-stars b { font-size: 8px; vertical-align: super; margin-left: 1px; }
.zc-empty { color: #bcae94 !important; font-weight: 400 !important; font-size: 10px !important; }
.zc-bot { font-size: 9.5px; color: var(--muted); text-align: right; }
.zw-center.mini { grid-column: 2 / 4; grid-row: 2 / 4; padding: 8px 10px; gap: 2px; }
.zcm-n { font-size: 14px; font-weight: 700; color: var(--gold); letter-spacing: 2px; }
.zcm-l { font-size: 11px; }
.zcm-h { font-size: 10.5px; margin-top: 3px; }
.zcm-h span { margin-right: 5px; }
.zcm-h b { font-size: 8px; vertical-align: super; }
.zcm-h .hua-禄 { color: #7fc0a0; } .zcm-h .hua-权 { color: #e0bd82; }
.zcm-h .hua-科 { color: #8fb0d8; } .zcm-h .hua-忌 { color: #e08b7c; }

/* 侧栏内部滚动条低调化 */
.tabbar::-webkit-scrollbar { width: 6px; }
.tabbar::-webkit-scrollbar-thumb { background: #e0d5bd; border-radius: 3px; }
.tabbar::-webkit-scrollbar-track { background: transparent; }

/* 底部免责提示（悬浮） */
.disclaimer { position: sticky; bottom: 0; z-index: 30; text-align: center;
  font-size: 12px; color: #a99c85; letter-spacing: 1px; padding: 9px 16px;
  background: rgba(247,242,229,.9); backdrop-filter: blur(6px);
  border-top: 1px solid rgba(230,220,196,.8); }

/* ===== 奇门遁甲 九宫盘 ===== */
.qm-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 620px; margin: 14px auto 6px; }
.qm-cell { position: relative; border: 1px solid var(--line); border-radius: 6px; background: #fffdf7;
  padding: 8px 8px 6px; cursor: pointer; transition: .15s; min-height: 116px;
  display: flex; flex-direction: column; }
.qm-cell:hover { background: #fff8e8; }
.qm-cell.mid { background: #f6f1e2; cursor: default; }
.qm-cell.zf { border: 2px solid var(--red); }
.qm-cell.zs { border: 2px solid var(--blue); }
.qm-cell.zf.zs { border: 2px solid var(--red); box-shadow: inset 0 0 0 2px rgba(68,98,133,.5); }
.qm-cell.on { background: #fdf3dd; box-shadow: 0 0 0 2px var(--gold) inset; }
.qm-top { display: flex; justify-content: space-between; font-size: 12px; color: #8a7c66; }
.qm-shen { color: var(--blue); }
.qm-xing { color: var(--green); }
.qm-men { text-align: center; font-size: 13px; color: var(--red); margin-top: 3px; letter-spacing: 1px; }
.qm-gan { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; }
.qm-sky { font-size: 26px; color: var(--ink); font-weight: 600; }
.qm-earth { font-size: 17px; color: #9b8f78; align-self: flex-end; }
.qm-foot { text-align: center; font-size: 11px; color: #a2957e; border-top: 1px dashed var(--line); padding-top: 3px; }
.qm-foot i { font-style: normal; margin-left: 4px; color: #bdb19b; }
.qm-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.qm-legend span { font-size: 12px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 12px;
  background: #fffdf7; color: #7d715e; cursor: help; }

/* ===== 大六壬 天地盘 ===== */
.lr-wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; margin: 14px 0 8px; }
.lr-board { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr);
  gap: 5px; width: 372px; }
.lr-cell { border: 1px solid var(--line); border-radius: 5px; background: #fffdf7; padding: 5px 2px 4px;
  text-align: center; }
.lr-cell.hr { border: 2px solid var(--red); }
.lr-cell.gui { background: #fdf5e2; border-color: #d9bd85; }
.lr-cell.jg { box-shadow: inset 0 0 0 2px rgba(94,146,120,.55); }
.lr-shen { font-size: 11px; color: var(--blue); line-height: 1.3; }
.lr-tian { font-size: 21px; color: var(--ink); font-weight: 600; line-height: 1.15; }
.lr-di { font-size: 11px; color: #a2957e; border-top: 1px dashed var(--line); margin: 2px 5px 0; padding-top: 2px; }
.lr-core { grid-row: 2 / 4; grid-column: 2 / 4; border: 1px solid var(--line); border-radius: 6px;
  background: #f6f1e2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.lr-core-t { font-size: 12px; color: #8a7c66; letter-spacing: 3px; margin-bottom: 2px; }
.lr-chuan { display: flex; align-items: baseline; gap: 5px; }
.lr-chuan span { font-size: 11px; color: #a2957e; }
.lr-chuan b { font-size: 20px; color: var(--red); }
.lr-chuan i { font-size: 11px; font-style: normal; color: #9b8f78; }
.lr-noc { font-size: 12px; color: #a2957e; text-align: center; line-height: 1.5; }
.lr-ke { flex: 1; min-width: 260px; }
.lr-ke-t { font-size: 12px; color: #8a7c66; margin-bottom: 6px; }
.lr-ke-row { display: flex; gap: 8px; }
.lr-ke-col { flex: 1; border: 1px solid var(--line); border-radius: 5px; background: #fffdf7;
  text-align: center; padding: 7px 2px 5px; }
.lr-ke-col.zei { border-color: var(--red); background: #fdf1ee; }
.lr-ke-col.ke { border-color: var(--blue); background: #f0f4f8; }
.lr-up { display: block; font-size: 22px; color: var(--ink); }
.lr-rel { display: block; font-size: 11px; color: var(--red); line-height: 1.6; }
.lr-ke-col.ke .lr-rel { color: var(--blue); }
.lr-dn { display: block; font-size: 18px; color: #7d715e; }
.lr-ke-col i { display: block; font-style: normal; font-size: 10px; color: #a2957e; margin-top: 3px; }

/* ===== 多语言：拉丁文字下收紧为 CJK 设计的字距 ===== */
html[lang="en"] .nav-glabel { letter-spacing: .3px; }
html[lang="en"] h1, html[lang="en"] .bn { letter-spacing: 1px; }
html[lang="en"] .nav-item .ni-name { letter-spacing: 0; }
html[lang="en"] .btn { letter-spacing: .5px; }
html[lang="en"] .rowlabel span, html[lang="en"] .switch-line > span { letter-spacing: .2px; }

/* ===== 档案条目：编辑 / 删除 ===== */
.as-act { display: flex; align-items: center; gap: 2px; flex: none; }
.as-act span { font-size: 12px; color: #a2957e; cursor: pointer; padding: 4px 7px;
  border: 1px solid transparent; border-radius: 5px; white-space: nowrap; letter-spacing: 0; }
.as-act span:hover { color: var(--gold-deep, #a8823f); border-color: var(--line); background: #fffdf6; }
.as-act span.del:hover { color: var(--red); border-color: rgba(172,74,59,.35); background: #fdf2ef; }
.arch-act { align-self: flex-start; margin-top: 2px; }
.edit-hint { margin: 12px 0 -4px; color: var(--red); }
.edit-hint a { color: var(--blue); cursor: pointer; margin-left: 4px; text-decoration: underline; }

.as-i-name, .as-i-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 命盘头部「编辑」 */
.hd-edit { margin-left: auto; flex: none; align-self: center; cursor: pointer;
  font-family: inherit; font-size: 13px; letter-spacing: 1px; padding: 7px 16px;
  color: var(--gold); background: rgba(211,173,120,.08);
  border: 1px solid rgba(211,173,120,.45); border-radius: 8px; transition: .15s; }
.hd-edit:hover { color: #2a211a; background: var(--gold); border-color: var(--gold); }
html[lang="en"] .hd-edit { letter-spacing: .2px; }
@media print { .hd-edit { display: none; } }

/* ===== 合盘：一主多副 ===== */
/* 选择器：六格横排 */
.hp-pick { display: flex; gap: 8px; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.hp-col { display: flex; flex-direction: column; align-items: center; gap: 5px;
  flex: 1 1 0; min-width: 118px; }
.hp-col.add { flex: 0 0 52px; min-width: 52px; }
.hp-cap { display: flex; align-items: center; justify-content: center; gap: 4px; height: 24px; width: 100%; }
.hp-cap .hp-x { width: 18px; }
.hp-col .hp-sel { width: 100%; margin: 0; padding: 8px 6px; font-size: 13px; }
.hp-col.is-main .hp-sel { border-color: rgba(172,74,59,.5); background: #fffaf7; }
.hp-tag { flex: none; font-size: 12px; padding: 4px 9px; border-radius: 12px; white-space: nowrap;
  min-width: 56px; text-align: center; letter-spacing: 1px;
  color: #8a7c66; background: #f4eedd; border: 1px solid var(--line); }
.hp-tag.pri { color: #fff8ea; background: var(--red); border-color: var(--red); }
.hp-x { flex: none; width: 24px; text-align: center; color: transparent; }
.hp-x.del { color: #c9b9a0; cursor: pointer; }
.hp-x.del:hover { color: var(--red); }
.hp-add { font-family: inherit; font-size: 18px; line-height: 1; cursor: pointer; width: 100%;
  padding: 9px 0; border-radius: 8px; color: var(--gold-deep, #a8823f);
  background: #fffdf6; border: 1px dashed #d9c9a6; transition: .15s; }
.hp-add:hover { background: #fdf5e4; border-style: solid; }
/* 命盘横向条 */
.hp-strip { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding-bottom: 6px; }
.hp-strip .dp-side, .hp-strip .zwh-one { flex: 0 0 auto; min-width: 232px; }
.hp-strip .dp-side.pri, .hp-strip .zwh-one.pri { box-shadow: inset 0 0 0 2px rgba(172,74,59,.35); }
.hp-strip .dp-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hp-strip .hp-tag { min-width: 0; padding: 2px 7px; font-size: 11px; }
.hp-strip .zw-board.mini { width: 232px; }
.hp-pairhd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 17px; color: var(--ink); margin-bottom: 4px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.hp-pairhd i { font-style: normal; color: var(--gold-deep, #a8823f); margin: 0 2px; }
html[lang="en"] .hp-tag { letter-spacing: .2px; }

/* ===== AI 万年历 ===== */
.wnl-grid { display: grid; grid-template-columns: minmax(520px, 1fr) minmax(380px, 1fr); gap: 18px; align-items: start; }
.wnl-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wnl-nav { cursor: pointer; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--gold-deep);
  background: #fffdf6; }
.wnl-nav:hover { background: #fdf3dd; border-color: var(--gold); }
.wnl-ym { flex: 1; text-align: center; font-size: 17px; letter-spacing: 2px; }
.wnl-ym b { font-size: 21px; color: var(--red); }
.wnl-today { cursor: pointer; font-size: 12px; color: #fff7ea; background: var(--red);
  border-radius: 6px; padding: 5px 12px; letter-spacing: 1px; }
.wnl-tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.wnl-tbl th { font-size: 12px; color: var(--gold-deep); font-weight: 500; padding: 6px 0; letter-spacing: 2px; }
.wnl-tbl th.wk { color: var(--red); }
.wnl-cell { border: 1px solid #f0e8d4; text-align: center; padding: 5px 2px; cursor: pointer;
  vertical-align: top; height: 62px; transition: .12s; }
.wnl-cell:hover { background: #fdf6e6; }
.wnl-cell.out { opacity: .35; }
.wnl-cell.today { background: #fbf2dd; }
.wnl-cell.on { background: #f7ead0; box-shadow: inset 0 0 0 2px var(--gold-deep); }
.wc-d { font-size: 18px; line-height: 1.2; }
.wnl-cell.wk .wc-d { color: var(--red); }
.wc-l { font-size: 11px; color: var(--muted); line-height: 1.4; }
.wc-l.term { color: var(--green); font-weight: 700; }
.wc-l.fest { color: var(--red); }
.wc-l.first { color: var(--gold-deep); }
.wc-g { font-size: 10px; color: #c2b59c; }
.wnl-head { display: flex; gap: 14px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.wh-day { width: 62px; height: 62px; min-width: 62px; border-radius: 12px; background: var(--red);
  color: #fff7ea; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.wh-meta { font-size: 13px; line-height: 1.8; color: var(--ink-soft); }
.wh-1 { font-size: 15px; color: var(--ink); }
.wh-t { font-size: 11px; color: #fff7ea; background: var(--green); border-radius: 5px; padding: 1px 7px; margin-left: 6px; }
.wh-3 b { color: var(--red); font-size: 15px; }
.wnl-yj { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 4px; }
.yj-box { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fffdf6; }
.yj-box.yi { border-color: rgba(94,146,120,.4); background: #f4faf6; }
.yj-box.ji { border-color: rgba(172,74,59,.35); background: #fdf4f2; }
.yj-t { display: inline-block; font-size: 13px; color: #fff7ea; border-radius: 5px;
  padding: 1px 9px; margin-bottom: 5px; letter-spacing: 2px; }
.yj-box.yi .yj-t { background: var(--green); }
.yj-box.ji .yj-t { background: var(--red); }
.yj-l { font-size: 13px; line-height: 1.75; color: var(--ink-soft); }
.wnl-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 6px; margin: 6px 0 4px; }
.wnl-kv > div { background: #f6f0df; border-radius: 7px; padding: 6px 9px; font-size: 13px; border: 1px solid #efe6cf; }
.wnl-kv > div.wide { grid-column: span 2; }
.wnl-kv i { display: block; font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.wnl-kv b { color: var(--red); }
.wnl-kv small { color: var(--muted); }
.wnl-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; margin: 4px 0; }
.wh-cell { border: 1px solid var(--line); border-radius: 7px; text-align: center; padding: 6px 2px; background: #fffdf6; }
.wh-cell.tone-good { border-color: rgba(94,146,120,.55); background: #f2f9f5; }
.wh-cell.tone-warn { border-color: rgba(172,74,59,.45); background: #fdf3f1; }
.whc-n { font-size: 13px; }
.whc-g { font-size: 15px; font-weight: 700; color: var(--ink); }
.wh-cell.tone-good .whc-g { color: var(--green); }
.wh-cell.tone-warn .whc-g { color: var(--red); }

/* 一级导航项（无分组标签）——样式与二级项一致，仅以间距区隔 */
.nav-sec.solo { margin: 14px 0 2px; }
.qm-nk { font-size: 10px; color: #fff7ea; background: var(--gold-deep); border-radius: 4px;
  padding: 0 5px; margin-left: 5px; vertical-align: 2px; letter-spacing: 0; }
.qm-legend span.tone-good { color: var(--green); border-color: rgba(94,146,120,.5); background: #f3faf6; }
.qm-legend span.tone-warn { color: var(--red); border-color: rgba(172,74,59,.4); background: #fdf4f2; }

/* ===== 《周易》经文 ===== */
.jing-box { border-left: 3px solid var(--gold); background: #fdf8ec; border-radius: 0 8px 8px 0;
  padding: 9px 13px; }
.jing-t { font-size: 12px; color: var(--gold-deep); letter-spacing: 1px; margin-bottom: 3px; }
.jing-g { font-size: 15px; line-height: 1.85; color: var(--ink); }
.jing-y { font-size: 14px; line-height: 1.8; color: var(--ink-soft); margin-top: 3px; }
.jing-yao { display: flex; align-items: baseline; gap: 9px; padding: 5px 10px; border-radius: 6px;
  font-size: 14px; line-height: 1.8; }
.jing-yao:nth-child(odd) { background: #faf5e8; }
.jing-yao.mv { background: #fdf1ee; box-shadow: inset 2px 0 0 var(--red); }
.jy-t { flex: none; width: 34px; color: var(--gold-deep); font-size: 13px; }
.jing-yao.mv .jy-t { color: var(--red); font-weight: 700; }
.jy-x { flex: 1; color: var(--ink); }
.jing-yao i { flex: none; font-style: normal; font-size: 11px; color: #fff7ea; background: var(--blue);
  border-radius: 4px; padding: 1px 6px; }
.jing-yao i.y { background: var(--green); }
.jing-yao i.m { background: var(--red); }
.jing-sub { font-size: 13px; line-height: 1.8; color: var(--ink-soft); margin-top: 5px;
  padding-top: 5px; border-top: 1px dashed rgba(211,173,120,.5); }
.jing-sub i { font-style: normal; font-size: 11px; color: var(--gold-deep); letter-spacing: 1px;
  background: #f6ecd7; border-radius: 4px; padding: 1px 6px; margin-right: 6px; white-space: nowrap; }
/* 紫微星曜亮度 */
.zs-br { font-style: normal; font-size: 9px; line-height: 1; vertical-align: 2px; margin-left: 1px;
  padding: 1px 2px; border-radius: 3px; letter-spacing: 0; }
.br-庙 { color: #fff7ea; background: #a8823f; }
.br-旺 { color: #fff7ea; background: #5e9278; }
.br-得 { color: #4a6b57; background: #e2efe6; }
.br-利 { color: #6b6350; background: #efe8d6; }
.br-平 { color: #8a7c66; background: #f1ece0; }
.br-不 { color: #9a5f52; background: #f7e6e2; }
.br-陷 { color: #fff7ea; background: #ac4a3b; }

/* ===== 命理测试大赛 banner ===== */
.cup-banner { flex: 1; min-width: 320px; display: flex; align-items: center; gap: 12px;
  cursor: pointer; padding: 11px 16px; border-radius: 10px;
  background: linear-gradient(100deg, #f7ebd4, #fdf6e6 60%, #f4e3c6);
  border: 1px solid var(--gold); transition: .15s;
  box-shadow: 0 1px 6px rgba(168,131,74,.16); }
.cup-banner:hover { border-color: var(--gold-deep); box-shadow: 0 2px 12px rgba(168,131,74,.3); }
.cb-tag { flex: none; width: 26px; height: 26px; border-radius: 7px; background: var(--red);
  color: #fff7ea; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.cb-txt { flex: 1; font-size: 14px; color: var(--ink); letter-spacing: 1px; line-height: 1.4; }
.cb-cta { flex: none; font-size: 13px; color: var(--red); letter-spacing: 1px; white-space: nowrap; }
html[lang="en"] .cb-txt, html[lang="en"] .cb-cta { letter-spacing: .2px; }

/* ===== 大赛页 ===== */
.cup-hero { background: linear-gradient(120deg, #2a211a, #3f3025 55%, #4a3524); color: #ead9b8;
  border: 1px solid rgba(211,173,120,.45); border-radius: 12px; padding: 26px 28px; margin-bottom: 16px; }
.ch-tag { display: inline-block; font-size: 12px; letter-spacing: 3px; color: #fff7ea;
  background: var(--red); border-radius: 5px; padding: 2px 10px; margin-bottom: 10px; }
.ch-t { font-size: 28px; letter-spacing: 6px; color: var(--gold); }
.ch-s { font-size: 15px; letter-spacing: 2px; margin-top: 8px; color: #d9c7a4; }
.ch-fee { margin-top: 14px; font-size: 14px; color: #d9c7a4; }
.ch-fee b { font-size: 22px; color: var(--gold); letter-spacing: 1px; }
.ch-fee span { color: #a8977a; margin-left: 4px; }
.cup-grid { display: grid; grid-template-columns: minmax(460px, 3fr) minmax(360px, 2fr);
  gap: clamp(16px, 2vw, 28px); align-items: start; }
.cup-step { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line);
  font-size: 14px; line-height: 1.85; color: var(--ink-soft); }
.cup-step:last-of-type { border-bottom: none; }
.cup-step i { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-deep);
  color: #fff7ea; font-style: normal; font-size: 13px; display: flex; align-items: center;
  justify-content: center; margin-top: 3px; }
.cup-step b { color: var(--ink); margin-right: 4px; }
.cup-fx { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; margin: 4px 0; }
.fx-main { font-size: 21px; color: var(--red); }
.fx-alt { font-size: 13px; color: #7d715e; background: #f4eeda; border: 1px solid var(--line);
  border-radius: 12px; padding: 3px 10px; }
.cup-agree { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; font-size: 13px;
  line-height: 1.7; color: var(--ink-soft); cursor: pointer; }
.cup-agree input { margin-top: 4px; flex: none; }
.cup-msg { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--red);
  background: #fdf2ef; border: 1px solid rgba(172,74,59,.3); border-radius: 8px; padding: 9px 12px; }
.cup-warn p { font-size: 13px; line-height: 1.85; color: var(--ink-soft); margin-bottom: 8px; }
.cup-warn b { color: var(--red); }

/* ===== 大赛独立页（无侧边栏） ===== */
/* 全屏：不设窄壳，主视觉通栏 */
body.cup-page { min-width: 720px; background: var(--bg); background-image: none; }
.cup-shell { width: 100%; min-height: 100vh; background: var(--bg);
  display: flex; flex-direction: column; }
.cup-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 14px clamp(20px, 4vw, 64px);
  background: rgba(247,242,229,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gold); }
.cup-back { font-size: 15px; letter-spacing: 3px; color: var(--ink); text-decoration: none; }
.cup-back:hover { color: var(--red); }
.cup-langs { display: flex; gap: 6px; }
.cup-langs span { font-size: 12px; cursor: pointer; padding: 4px 10px; border-radius: 12px;
  border: 1px solid var(--line); color: #7d715e; background: #fffdf6; white-space: nowrap; }
.cup-langs span:hover { border-color: var(--gold); }
.cup-langs span.on { color: #fff7ea; background: var(--gold-deep); border-color: var(--gold-deep); }
.cup-body { flex: 1; padding: clamp(20px, 3vw, 40px) clamp(20px, 4vw, 64px);
  max-width: 1560px; width: 100%; margin: 0 auto; }
.cup-foot { text-align: center; font-size: 12px; color: #a99c85; letter-spacing: 1px;
  padding: 12px 16px; border-top: 1px solid rgba(230,220,196,.8); }
.cup-entry { position: sticky; top: 20px; }
a.cup-banner { text-decoration: none; }

/* ===== 奖金池面板 ===== */
.pool-box { background: linear-gradient(135deg, #fdf6e6, #f7ebd4); border: 1px solid var(--gold);
  border-radius: 12px; padding: 18px 22px; margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(168,131,74,.14); }
.pb-head { display: flex; align-items: baseline; gap: 12px; }
.pb-t { font-size: 13px; color: var(--gold-deep); letter-spacing: 3px; }
.pb-period { font-size: 12px; color: #fff7ea; background: var(--red); border-radius: 5px; padding: 1px 9px; }
.pb-amt { font-size: 38px; color: var(--red); letter-spacing: 2px; margin: 6px 0 2px; }
.pb-kv { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pb-kv > div { font-size: 13px; color: var(--ink-soft); background: #fffdf6;
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 11px; }
.pb-kv i { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-right: 6px; }
.pb-none { font-size: 13px; line-height: 1.85; color: var(--ink-soft); margin: 8px 0 2px;
  background: #fffdf6; border: 1px dashed #d9c9a6; border-radius: 8px; padding: 10px 13px; }
.pb-none.err { border-color: rgba(172,74,59,.4); background: #fdf4f2; }
.pb-none b { color: var(--red); }
.pb-none code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  background: #f4eeda; border-radius: 4px; padding: 1px 5px; }
.pb-last { font-size: 12px; color: #7d715e; margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed rgba(211,173,120,.6); }
.pb-last.none { color: var(--muted); }
.tips.warn { color: var(--red); background: #fdf4f2; border: 1px solid rgba(172,74,59,.28);
  border-radius: 8px; padding: 8px 11px; margin-top: 8px; }
.tips.warn b { color: var(--red); }

/* ===== 语言下拉（右上角单按钮） ===== */
.lang-pick { position: relative; }
.lang-btn { font-family: inherit; font-size: 13px; cursor: pointer; display: flex; align-items: center;
  gap: 7px; padding: 7px 13px; border-radius: 8px; color: var(--ink-soft);
  background: #fffdf6; border: 1px solid var(--line); white-space: nowrap; }
.lang-btn:hover { border-color: var(--gold); }
.lb-globe { color: var(--gold-deep); font-size: 12px; }
.lb-caret { color: var(--muted); font-size: 10px; }
.lang-mask { position: fixed; inset: 0; z-index: 40; }
.lang-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 41; min-width: 140px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
  box-shadow: 0 6px 22px rgba(80,55,20,.18); }
.lang-item { font-size: 13px; padding: 8px 11px; border-radius: 6px; cursor: pointer; color: var(--ink-soft); }
.lang-item:hover { background: #f6f0df; }
.lang-item.on { background: #f0e8d4; color: var(--ink); font-weight: 700;
  box-shadow: inset 2px 0 0 var(--gold-deep); }

/* ===== 结果统计与记录 ===== */
.cup-col { display: flex; flex-direction: column; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; margin: 4px 0 2px; }
.stat-c { background: #f6f0df; border: 1px solid #efe6cf; border-radius: 8px; padding: 9px 11px; }
.stat-c i { display: block; font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.stat-c b { font-size: 22px; color: var(--ink); }
.stat-c.hit { background: #f2f9f5; border-color: rgba(94,146,120,.5); }
.stat-c.hit b { color: var(--green); }
.dist { display: flex; flex-direction: column; gap: 5px; margin: 4px 0; }
.dist-row { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.dl { flex: none; width: 52px; text-align: right; color: var(--muted); }
.db { flex: 1; height: 13px; background: #f2ebd9; border-radius: 7px; overflow: hidden; }
.db i { display: block; height: 100%; background: var(--gold-deep); border-radius: 7px; }
.dist-row.hit .db i { background: var(--green); }
.dist-row.hit .dl { color: var(--green); }
.dv { flex: none; width: 34px; color: var(--ink-soft); }
.rec-tbl tr.pass { background: #f2f9f5; }
.rec-tbl tr.pass b { color: var(--green); }

/* ===== 大赛全屏主视觉 ===== */
.cup-hero.full { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 112px) 0 clamp(40px, 6vw, 88px);
  margin: 0 0 clamp(20px, 3vw, 40px); border: none; border-radius: 0;
  background:
    radial-gradient(1100px 520px at 18% -10%, rgba(211,173,120,.26), transparent 62%),
    radial-gradient(900px 460px at 88% 8%, rgba(172,74,59,.28), transparent 60%),
    linear-gradient(135deg, #201a14, #33271d 48%, #4a3524);
  border-bottom: 1px solid rgba(211,173,120,.4); }
/* 卦爻纹样底纹 */
.cup-hero.full::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .1;
  background-image: repeating-linear-gradient(0deg, rgba(234,217,184,.9) 0 3px, transparent 3px 22px);
  background-size: 74px 22px; mask-image: radial-gradient(70% 100% at 50% 0%, #000 20%, transparent 78%); }
.hero-in { position: relative; max-width: 1560px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 64px); }
.cup-hero.full .ch-tag { font-size: 13px; letter-spacing: 5px; padding: 4px 14px; }
.cup-hero.full .ch-t { font-size: clamp(34px, 5.4vw, 74px); letter-spacing: clamp(6px, 1.2vw, 18px);
  line-height: 1.18; color: var(--gold); margin-top: 14px;
  text-shadow: 0 2px 26px rgba(211,173,120,.32); }
.cup-hero.full .ch-s { font-size: clamp(15px, 1.4vw, 21px); letter-spacing: clamp(2px, .5vw, 6px);
  margin-top: 14px; color: #d9c7a4; }
.hero-pool { display: flex; align-items: baseline; flex-wrap: wrap; gap: 14px; margin-top: clamp(24px, 3vw, 44px); }
.hp-lab { font-size: 12px; letter-spacing: 4px; color: #a8977a; }
.hp-amt { font-size: clamp(38px, 6vw, 88px); line-height: 1; color: #fff3dd; letter-spacing: 1px;
  text-shadow: 0 3px 30px rgba(255,220,160,.28); }
.hp-na { font-size: 15px; color: #8a7758; letter-spacing: 2px; padding-bottom: 6px; }
.hp-per { font-size: 12px; color: #fff7ea; background: var(--red); border-radius: 6px; padding: 3px 11px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 20px;
  font-size: 13px; color: #b8a382; }
.hero-meta b { color: var(--gold); font-size: 17px; margin: 0 3px; }

/* ===== 积分与充值 ===== */
.pt-grid { display: grid; grid-template-columns: minmax(300px, 2fr) minmax(360px, 3fr);
  gap: clamp(16px, 2vw, 28px); align-items: start; margin-bottom: clamp(16px, 2vw, 28px); }
.bal-amt { font-size: clamp(40px, 5vw, 62px); line-height: 1.05; color: var(--red); letter-spacing: 1px; }
.bal-amt small { font-size: 14px; color: var(--muted); letter-spacing: 2px; margin-left: 8px; }
.bal-kv { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.bal-kv > div { font-size: 13px; color: var(--ink-soft); background: #f6f0df;
  border: 1px solid #efe6cf; border-radius: 8px; padding: 7px 12px; }
.bal-kv > div.hit { background: #f2f9f5; border-color: rgba(94,146,120,.5); color: var(--green); }
.bal-kv i { font-style: normal; font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-right: 6px; }
.pack-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 4px 0 6px; }
.pack { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #fffdf6;
  display: flex; flex-direction: column; gap: 5px; transition: .15s; }
.pack:hover { border-color: var(--gold); box-shadow: 0 3px 14px rgba(168,131,74,.16); }
.pk-price { font-size: 27px; color: var(--red); letter-spacing: 1px; }
.pk-pts { font-size: 15px; color: var(--ink); }
.pk-per { font-size: 12px; color: var(--muted); line-height: 1.7; }
.pk-btn { margin-top: 8px; font-family: inherit; font-size: 14px; cursor: pointer; letter-spacing: 3px;
  padding: 9px 0; border-radius: 9px; color: #fff7ea; background: var(--gold-deep); border: none; }
.pk-btn:hover { filter: brightness(1.07); }

/* ===== 账户 ===== */
.acct-chip { display: flex; align-items: center; gap: 10px; flex: none; padding: 7px 13px;
  border-radius: 9px; border: 1px solid var(--line); background: #fffdf6; cursor: pointer; }
.acct-chip:hover { border-color: var(--gold); }
.acct-chip.anon { cursor: default; gap: 6px; padding: 5px 6px; }
.ac-em { font-size: 13px; color: var(--ink-soft); max-width: 160px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ac-pt { font-size: 13px; color: var(--red); white-space: nowrap; }
.ac-btn { font-size: 13px; cursor: pointer; padding: 5px 12px; border-radius: 7px;
  color: var(--ink-soft); white-space: nowrap; }
.ac-btn:hover { background: #f3ecdc; }
.ac-btn.primary { color: #fff7ea; background: var(--red); }
.ac-btn.primary:hover { filter: brightness(1.07); }
.auth-modal { max-width: 420px; }
.acct-head { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0 4px; border-bottom: 1px dashed var(--line); }
.ah-em { font-size: 14px; color: var(--ink-soft); }
.ah-pt { font-size: 34px; color: var(--red); line-height: 1.2; }
.ah-pt small { font-size: 13px; color: var(--muted); margin-left: 7px; }
.pk-btn.ghost { background: transparent; color: var(--red); border: 1px solid var(--red); flex: none; padding: 8px 18px; }
.pk-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }

/* ── 个人中心：分区页签 ── */
.ah-nk { font-size: 17px; color: var(--ink); font-weight: 600; letter-spacing: .5px; }
.acct-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 14px 0 16px;
  border-bottom: 1px solid var(--line); }
.at-i { font-size: 13px; padding: 8px 15px; cursor: pointer; color: var(--ink-soft);
  border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0;
  margin-bottom: -1px; white-space: nowrap; }
.at-i:hover { color: var(--red); background: #faf5e8; }
.at-i.on { color: var(--red); background: #fffdf6; border-color: var(--line);
  border-bottom: 1px solid #fffdf6; }

/* ── 资料表单 ── */
.acct-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.acct-form.narrow { grid-template-columns: minmax(0, 380px); }
.acct-form label { display: block; }
.acct-form label > i { display: block; font-style: normal; font-size: 12px;
  color: var(--muted); margin-bottom: 4px; }
.af-ro { display: block; font-size: 13px; color: var(--ink-soft); padding: 8px 0; }
.acct-act { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ── 积分购买 ── */
.buy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.buy-pk { border: 1px solid var(--line); border-radius: 11px; padding: 16px 16px 14px;
  background: #fffdf6; text-align: center; }
.buy-pk:hover { border-color: var(--gold); }
.bp-amt { font-size: 27px; color: var(--red); line-height: 1.2; }
.bp-pts { font-size: 15px; color: var(--ink); margin-top: 4px; }
.bp-pts small { font-size: 12px; color: var(--muted); }
.bp-per { font-size: 12px; color: var(--muted); margin: 6px 0 12px; }
.buy-pk .pk-btn { width: 100%; }

/* ── 订单状态 ── */
.ost { display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 11px;
  border: 1px solid var(--line); }
.ost-pending  { color: var(--gold-deep); background: #fbf3de; border-color: #e6d6a8; }
.ost-paid     { color: #2f6f4f; background: #eaf5ee; border-color: #bcdcc7; }
.ost-expired  { color: var(--muted); background: #f4f1e8; }
.ost-canceled { color: var(--muted); background: #f4f1e8; text-decoration: line-through; }
.ac-x { color: var(--red); cursor: pointer; font-size: 12px; }
.ac-x:hover { text-decoration: underline; }

/* ── 使用记录汇总 ── */
.lg-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px;
  margin-bottom: 14px; }
.lg-stat > div { border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px;
  background: #fffdf6; }
.lg-stat i { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.lg-stat b { font-size: 19px; color: var(--ink); font-weight: 600; }
.lg-stat b.up { color: var(--green); }
.lg-stat b.dn { color: var(--red); }
.auth-more { border-top: 1px dashed var(--line); padding-top: 8px; margin-bottom: 4px; }
.tips.warn { color: var(--red); }
