/* 云梦排盘 · 素雅纸色主题（移动优先） */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:root {
  --paper: #f7f2e4;
  --paper2: #fffdf6;
  --ink: #2a2620;
  --ink2: #6b6152;
  --gold: #b0924f;
  --red: #9c3b2e;
  --line: #ddd0ae;
  --muted: #8a7b5e;
}
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  padding-bottom: 40px;
}
.hd { text-align: center; padding: 12px 12px 6px; }
.hd h1 { margin: 0; font-size: 20px; letter-spacing: .2em; text-indent: .2em; font-weight: 600; color: #4a3208; }
.hd-sub { margin: 2px 0 0; font-size: 11px; color: var(--muted); letter-spacing: .1em; }

.tabbar { display: flex; position: sticky; top: 0; z-index: 20; background: #fbf7ea;
  border-bottom: 1px solid var(--line); }
.tabbar a { flex: 1; text-align: center; padding: 11px 0; font-size: 15px; color: var(--ink2);
  text-decoration: none; letter-spacing: .1em; border-bottom: 2px solid transparent; }
.tabbar a.on { color: var(--red); border-bottom-color: var(--red); font-weight: 600; background: #fffdf6; }

main { padding: 10px; }
.tab { display: none; }
.tab.on { display: block; }
.card { background: var(--paper2); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(120,100,60,.06); }
.out { display: block; }

.form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.form label { display: flex; flex-direction: column; font-size: 12px; color: var(--ink2); gap: 4px; }
.form label.chk { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; }
.form input[type=date], .form select {
  font: inherit; font-size: 15px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 6px; background: #fffef9; color: var(--ink); min-width: 130px;
}
.form input[type=checkbox] { width: 16px; height: 16px; }
.btn { font: inherit; font-size: 14px; padding: 8px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #fdf8ec; color: #5a4a2a; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff6e8; }
.btn:active { transform: translateY(1px); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sep { height: 1px; background: var(--line); margin: 10px 0; }
h3.sec { font-size: 14px; margin: 0 0 8px; color: #6a5220; letter-spacing: .12em;
  border-left: 3px solid var(--gold); padding-left: 8px; }
.clean { margin: 0; padding: 0; list-style: none; }

/* ---------- 通用信息行 ---------- */
.kv { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--ink2); }
.kv b { color: var(--ink); font-weight: 600; }
.badge { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 12px;
  border: 1px solid var(--line); background: #fdf8ec; color: #6a5220; margin: 0 3px 3px 0; }
.badge.red { color: var(--red); border-color: #e0bdb0; background: #fdf1ec; }
.badge.gold { color: #8a6a10; border-color: #e3d3a6; background: #fdf6e2; }

/* ---------- 紫微斗数盘 ---------- */
.zw-pan { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, minmax(120px, auto));
  gap: 2px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.zw-cell { background: #fffdf6; padding: 3px 4px 3px; font-size: 12px; line-height: 1.35;
  position: relative; display: flex; flex-direction: column; }
.zw-cell.fate { background: #fdf6e2; }
.zw-cell.body { background: #fdf1ec; }

/* 星曜：竖排成列，列底为亮度与四化 */
.zw-stars { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px 3px; flex: 1; }
.zw-col { display: flex; flex-direction: column; align-items: center; }
.zw-col .nm { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: 0; font-size: 12px; }
.zw-col .br { font-size: 9px; color: #9a8a66; font-style: normal; line-height: 1.1; }
.zw-col .zw-mu { font-size: 9px; color: #fff; background: var(--red); border-radius: 2px;
  padding: 0 2px; font-style: normal; line-height: 1.2; }
.zw-col.major .nm { color: #7a2f1e; font-weight: 600; font-size: 13px; }
.zw-col.minor .nm { color: #4f5b3a; }
.zw-col.adj .nm { color: #8a7b5e; font-size: 11px; }

/* 格底：大限 · 十二神 · 宫名干支 */
.zw-foot { margin-top: auto; border-top: 1px solid #f0e6cd; padding-top: 2px; }
.zw-foot .zw-dx { font-size: 10px; color: #a08a5a; text-align: center; line-height: 1.3; }
.zw-ss { display: flex; justify-content: space-between; font-size: 9px; color: #9a8a66; line-height: 1.2; }
.zw-ss .r { text-align: right; }
.zw-cell .zw-name { font-size: 12px; color: #8a6a10; font-weight: 600; text-align: right; line-height: 1.4; }
.zw-cell .zw-gz { font-size: 10px; color: var(--ink2); margin-left: 3px; font-weight: 400; }
.zw-center { grid-column: 2 / 4; grid-row: 2 / 4; background: #fffdf4; padding: 8px; font-size: 12px;
  display: flex; flex-direction: column; gap: 5px; }
.qm-tabs { display: flex; position: sticky; bottom: 0; margin-top: 10px; background: #f6efdd;
  border: 1px solid var(--gold); border-radius: 8px; overflow: hidden; z-index: 20; }
.qm-tab { flex: 1; padding: 13px 0; font-size: 15px; color: #6a5220; background: none; border: none;
  border-right: 1px solid #e6d7ad; font-family: inherit; }
.qm-tab:last-child { border-right: none; }
.qm-tab:active { background: #efe2bf; }

.pk-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45);
  z-index: 99; display: flex; align-items: center; justify-content: center; }
.pk { background: #f7f2e4; border-radius: 10px; padding: 14px; width: 88%; max-width: 360px; }
.pk-t { font-size: 15px; color: #4a3208; margin-bottom: 10px; text-align: center; }
.pk-cols { display: flex; gap: 2px; }
.pk-col { flex: 1; height: 180px; overflow-y: scroll; scroll-snap-type: y mandatory; text-align: center;
  background: #fffdf6; border-radius: 4px; scrollbar-width: none; }
.pk-col::-webkit-scrollbar { display: none; }
.pk-pad { display: block; height: 72px; }
.pk-it { display: flex; align-items: center; justify-content: center; height: 36px; scroll-snap-align: center;
  font-size: 16px; color: #6b6152; }
.pk-it.on { color: #7a2f1e; font-weight: 600; background: #fdf3dc; border-radius: 4px; }
.pk-bs { display: flex; gap: 10px; margin-top: 12px; }
.pk-bs button { flex: 1; padding: 11px; font-size: 15px; border: 1px solid var(--gold); border-radius: 6px;
  background: #fffdf6; color: #7a2f1e; font-family: inherit; }
.pk-bs .pk-ok { background: #7a2f1e; color: #fdf6e2; }

.hl-detail { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.hl-cell { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line);
  border-radius: 5px; padding: 4px 8px; background: #fffdf6; }
.hl-cell i { font-style: normal; font-size: 10px; color: #8a7a5a; }
.hl-cell b { font-size: 15px; color: #7a2f1e; }
.hl-cell u { text-decoration: none; font-size: 10px; color: #6b6152; }
.hl-gua { display: flex; gap: 8px; align-items: flex-start; }
.hl-pic { display: flex; flex-direction: column-reverse; gap: 2px; align-items: center; margin: 3px 0; }
.hl-line { display: block; height: 5px; width: 34px; background: #7a2f1e; border-radius: 1px; }
.hl-pic.big .hl-line { width: 44px; height: 6px; }
.hl-line.yin { background: none; border-left: 14px solid #7a2f1e; border-right: 14px solid #7a2f1e; }
.hl-pic.big .hl-line.yin { border-left-width: 18px; border-right-width: 18px; }
.hl-gbtn.big { flex: 1.3; }
.hl-years { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; max-height: 260px; overflow-y: auto; }
.hl-yrow { flex: 0 0 100%; font-size: 11px; color: #8a7a5a; margin-top: 4px; }
.hl-yun { color: #a08a5a; }
.hl-ycell { flex: 0 0 auto; min-width: 62px; border: 1px solid var(--line); border-radius: 5px;
  padding: 3px 5px; background: #fffdf6; cursor: pointer; text-align: center; }
.hl-ycell i { display: block; font-style: normal; font-size: 9px; color: #a08a5a; }
.hl-ycell b { display: block; font-size: 13px; color: #4a3208; }
.hl-ycell u { display: block; text-decoration: none; font-size: 10px; color: #6b6152; }
.hl-ycell.now { background: #fdf3dc; border-color: var(--gold); }
.hl-ycell.sel { background: #7a2f1e; border-color: #7a2f1e; }
.hl-ycell.sel b, .hl-ycell.sel i, .hl-ycell.sel u { color: #fdf6e2; }
.hl-ycell.sel.now { background: #7a2f1e; }
.hl-detail-box { margin-top: 8px; }
.hl-ysec { font-size: 13px; color: #4a3208; font-weight: 600; margin: 4px 0; }
.hl-yblock { display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 1.7; color: #3a3428; }
.hl-yblock i { flex: 0 0 auto; font-style: normal; color: #8a7a5a; }
.hl-pend { color: #a08a5a; }
.hl-gbtn { flex: 1; text-align: center; border: 1px solid var(--gold); border-radius: 6px;
  padding: 8px 4px; background: #fdf6e2; cursor: pointer; }
.hl-gbtn i { display: block; font-style: normal; font-size: 10px; color: #8a7a5a; }
.hl-gbtn b { display: block; font-size: 17px; color: #7a2f1e; line-height: 1.4; }
.hl-gbtn u { display: block; text-decoration: none; font-size: 10px; color: #a08a5a; }
.hl-yao { display: flex; flex-direction: column; gap: 5px; }
.hl-ybtn { display: flex; align-items: baseline; gap: 8px; text-align: left; width: 100%;
  border: 1px solid var(--line); border-radius: 5px; padding: 6px 9px; background: #fffdf6; cursor: pointer; }
.hl-ybtn b { color: #7a2f1e; font-size: 13px; flex: 0 0 auto; }
.hl-ybtn span { color: #6b6152; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hl-zhu { margin: 5px 0; font-size: 13px; line-height: 1.75; color: #3a3428; }
.hl-jue { margin: 5px 0; font-size: 12px; line-height: 1.7; color: #6b6152; border-top: 1px dashed #eadfc4; padding-top: 5px; }

.zw-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.zw-nav .btn { flex: 0 0 auto; padding: 7px 12px; font-size: 13px; }
.zw-nav-mid { flex: 1; text-align: center; font-size: 12px; color: #6b6152; }

.zc-t { font-size: 14px; color: #7a2f1e; font-weight: 600; text-align: center; letter-spacing: .12em; margin-bottom: 5px; }
.zc-row { font-size: 11px; color: #3a3428; line-height: 1.75; }
.zc-row .k { color: #8a7a5a; margin: 0 3px 0 6px; }
.zc-row .k:first-child { margin-left: 0; }
.zc-row b { color: #4a3208; }
.zc-gz { color: #7a2f1e; letter-spacing: .06em; }
.zc-dx { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 7px;
  border-top: 1px solid #f0e6cd; padding-top: 5px; }
.zc-dxc { display: flex; flex-direction: column; align-items: center; color: #6b6152; font-size: 10px; line-height: 1.35; }
.zc-dxc i { font-style: normal; color: #a08a5a; font-size: 9px; }

/* ---------- 奇门九宫 ---------- */
.qm-meta { margin-bottom: 8px; }
.qm-pan { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.qm-cell { background: #fffdf6; min-height: 132px; padding: 5px 6px; position: relative; font-size: 12px;
  display: flex; flex-direction: column; justify-content: space-between; }
.qm-row { text-align: center; line-height: 1.4; }
.qm-row.r1 { font-size: 13px; color: #2a2620; position: relative; }
.qm-row.r1 .mark { position: absolute; top: 0; }
.qm-row.r1 .mark.kong { right: 3px; color: #1f4e79; }
.qm-row.r1 .mark.ma { right: 17px; color: #1f7a3a; }
.qm-row.r2 { font-size: 12px; }
.qm-row.r2 span, .qm-row.r3 span { display: inline-block; min-width: 30px; }
.qm-row .sky { font-size: 17px; color: #2a2620; }
.qm-row .angz2 { font-size: 12px; color: #6b6152; }
.qm-row .earth { font-size: 17px; color: #2a2620; }
.qm-row .star { font-size: 14px; color: #b03a2e; }
.qm-row .star .qin { font-style: normal; font-size: 11px; color: #1f4e79; }
.qm-row .door { font-size: 14px; color: #b03a2e; }
.qm-row.r3 { font-size: 12px; color: #6b6152; }
.qm-row.r4 { font-size: 11px; color: #8a7a5a; display: flex; justify-content: space-between; }
.qm-cell .gong { color: #a08a5a; }
.qm-info { padding: 10px 12px; }
.qm-info .qm-line { font-size: 13px; line-height: 1.95; color: #3a3428; }
.qm-info .qm-line .k { color: #8a7a5a; font-size: 12px; margin-right: 5px; }
.qm-info .hl { color: #7a2f1e; }
.form select.qm-btn { font-size: 14px; font-weight: 600; color: #7a2f1e; background: #fdf6e2;
  border: 1px solid var(--gold); border-radius: 6px; padding: 7px 10px; }
.qm-cell.mid { background: #fdf6e2; }
.qm-cell.mid .angz { position: absolute; left: 50%; top: 32px; transform: translateX(-50%); bottom: auto;
  font-size: 16px; color: #8a6a3a; letter-spacing: .06em; }
.qm-cell.mid .earth { top: 60px; }

/* ---------- 六爻 ---------- */
.ly-head { margin-bottom: 8px; }
.ly-pan { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--line); }
.ly-row { display: grid; grid-template-columns: 44px 1fr 64px 1fr; gap: 2px; background: var(--line); }
.ly-row > div { background: #fffdf6; padding: 5px 6px; font-size: 13px; }
.ly-row.hd > div { background: #fbf3df; font-size: 12px; color: #6a5220; text-align: center; }
.ly-god { color: #5f6b4a; text-align: center; }
.ly-kin { color: #2a2620; }
.ly-kin .wuxing { font-size: 11px; color: #9a8a66; }
.ly-yao { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 15px; color: #7a2f1e; }
.ly-yao .dyn { color: var(--red); font-weight: 700; }
.ly-mark { font-size: 11px; color: var(--red); }
.ly-changed { color: #4a5a2a; }

/* 大限 / 流年 横排表格 */
.tbl-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tbl-cell { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px;
  text-align: center; font-size: 12px; background: #fffdf6; min-width: 62px; }
.tbl-cell i { display: block; font-style: normal; color: #8a7a5a; font-size: 11px; }
.tbl-cell b { display: block; color: #7a2f1e; font-size: 13px; font-weight: 600; }
.tbl-cell u { display: block; text-decoration: none; color: #9c3b2e; font-size: 11px; }
.fushen { display: block; font-size: 11px; color: #b04a2e; }

/* 卦辞 · 爻辞 */
.bz-table { display: grid; grid-template-columns: 52px repeat(4, 1fr); gap: 2px; background: var(--line);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bz-table > div { background: #fffdf6; padding: 5px 6px; font-size: 13px; line-height: 1.5; }
.bz-table .k { background: #fbf3df; color: #6a5220; font-size: 12px; text-align: center; }
.bz-table .gz { font-size: 19px; font-weight: 600; color: #7a2f1e; text-align: center; }
.bz-table .cn { color: #6b6152; font-size: 12px; }
.bz-table .god { color: #1f4e79; font-size: 12px; }

.dy-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.dy-cell { flex: 0 0 auto; min-width: 52px; text-align: center; border: 1px solid var(--line);
  border-radius: 5px; padding: 4px 6px; background: #fffdf6; }
.dy-cell i { display: block; font-style: normal; font-size: 10px; color: #8a7a5a; }
.dy-cell b { display: block; font-size: 15px; color: #7a2f1e; line-height: 1.35; }
.dy-cell u { display: block; text-decoration: none; font-size: 10px; color: #6b6152; }

.dy-line { margin: 4px 0; font-size: 13px; line-height: 1.6; color: #3a3428;
  padding-left: 10px; border-left: 2px solid #e3d3a6; }

.zy-gua { margin: 0 0 8px; font-size: 14px; color: #4a3208; }
.zy-line { margin: 3px 0; font-size: 13px; line-height: 1.6; color: #3a3428; }
.zy-line.dyn { color: #9c3b2e; font-weight: 600; }
.ly-changerow { margin-top: 8px; }

.bar { display: inline-block; height: 8px; border-radius: 1px; background: #7a2f1e; }
.bar.yang { width: 40px; }
.bar.yin { width: 40px; background: linear-gradient(to right, #7a2f1e 0 16px, transparent 16px 24px, #7a2f1e 24px 40px); }
.ly-yao .dyn { margin-left: 3px; font-size: 15px; }

.yao-picker { display: flex; flex-direction: column-reverse; gap: 6px; }
.yao-line { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.yao-line .pos { width: 30px; color: var(--ink2); font-size: 12px; }
.yao-line .opts { display: flex; gap: 4px; }
.yao-line .opt { border: 1px solid var(--line); background: #fffef9; border-radius: 5px;
  padding: 2px 8px; cursor: pointer; font-size: 12.5px; color: #6b6152; min-width: 46px; text-align: center; }
.yao-line .opt.on { background: var(--red); border-color: var(--red); color: #fff6e8; }
.yao-line .sym { width: 22px; text-align: center; color: #7a2f1e; font-size: 16px; }

.ft { padding: 8px 14px 20px; text-align: center; }
.ft p { margin: 4px 0; line-height: 1.6; }
@media (max-width: 420px) {
  .zw-cell { font-size: 11px; }
  .zw-star.m { font-size: 13px; }
  .form input[type=date], .form select { min-width: 112px; }
}

/* ---------- 起卦方式面板 ---------- */
.panel { margin-top: 10px; }
.coins { display: flex; flex-direction: column-reverse; gap: 6px; }
.coin-line { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.coin-line .pos { width: 30px; color: var(--ink2); }
.coin { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold); background: #fffdf0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #b3a37e; cursor: pointer; }
.coin.on { background: var(--red); color: #fff6e8; border-color: var(--red); }
.coin-line .res { width: 76px; color: #7a2f1e; font-size: 12px; }
.dyn-picker { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.dyn-picker .opt { border: 1px solid var(--line); background: #fffef9; border-radius: 5px;
  padding: 3px 8px; font-size: 12.5px; cursor: pointer; color: #6b6152; }
.dyn-picker .opt.on { background: var(--red); border-color: var(--red); color: #fff6e8; }
.form input[type=text], .form input[type=number] { font: inherit; font-size: 15px; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 6px; background: #fffef9; color: var(--ink); min-width: 120px; }

/* 河洛：运/流年里的可点卦爻（2026-10-04 加） */
.hl-ybtn2{display:inline-block;border:1px solid rgba(176,141,87,.55);background:rgba(176,141,87,.12);
  color:inherit;border-radius:6px;padding:2px 7px;margin:0 2px;font:inherit;font-size:12px;line-height:1.5;cursor:pointer}
.hl-ybtn2:active{background:rgba(176,141,87,.3)}
.hl-yrow .hl-yun{font-size:12px}

/* ---------- 每日择吉（2026-10-05 加） ---------- */
.zr-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:6px}
.zr-date{font-size:20px;font-weight:600;color:var(--ink);margin:2px 0 4px}
.zr-date .zr-week{font-size:13px;font-weight:400;color:var(--ink2);margin-left:6px}
.zr-lunar{font-size:14px;color:#7a2f1e;margin-bottom:2px}
.zr-lunar .zr-jieqi{color:var(--red)}
.zr-gz{font-size:15px;letter-spacing:1px;margin-bottom:4px}
.zr-row{display:flex;align-items:center;gap:8px;font-size:14px;margin-top:6px}
.zr-row .zr-k{width:70px;color:var(--ink2);font-size:12.5px}
.zr-tag{font-size:11.5px;padding:1px 6px;border-radius:4px;border:1px solid var(--line)}
.zr-tag.good{color:#1f6b3a;border-color:#9fc7ab;background:rgba(60,140,90,.08)}
.zr-tag.bad{color:#8a2b2b;border-color:#d8b0b0;background:rgba(160,60,60,.06)}
.zr-ts{color:#a8761c}
.zr-jishi{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.zr-chip{border:1px solid rgba(176,141,87,.6);background:rgba(176,141,87,.12);border-radius:5px;
  padding:2px 8px;font-size:12.5px;color:#6b5222}
.zr-hours{display:flex;flex-direction:column;gap:4px}
.zr-h{display:flex;align-items:center;gap:8px;font-size:13px;padding:4px 8px;border-radius:5px;
  border:1px solid var(--line);background:#fffef9}
.zr-h .zr-span{width:88px;color:var(--ink2);font-size:12px}
.zr-h .zr-name{width:64px}
.zr-h .zr-shen{width:52px;color:#7a2f1e}
.zr-h .zr-type{width:20px;text-align:center}
.zr-h.good{border-color:#9fc7ab;background:rgba(60,140,90,.07)}
.zr-h.good .zr-type{color:#1f6b3a}
.zr-h.bad{background:#fffaf7}
.zr-h.bad .zr-type{color:#8a2b2b}
.zr-h.now{box-shadow:0 0 0 2px rgba(176,141,87,.5) inset}
.zr-h .zr-now{font-size:11px;color:#a8761c;border:1px solid rgba(176,141,87,.6);border-radius:4px;padding:0 5px}
.zr-yj{font-size:13px;line-height:1.7}
.zr-yj .zr-yi,.zr-yj .zr-ji{display:inline-block;width:26px;border-radius:4px;text-align:center;
  font-weight:600;margin-right:6px;font-size:12.5px}
.zr-yj .zr-yi{color:#1f6b3a;background:rgba(60,140,90,.12)}
.zr-yj .zr-ji{color:#8a2b2b;background:rgba(160,60,60,.1)}

/* ---------- 六壬（2026-10-05 加；版式照 App：卷轴纸 + 墨线竖排） ---------- */
.lr-scroll{
  position:relative;margin:10px 0 4px;padding:14px 12px 18px;
  background:
    radial-gradient(120% 60% at 12% 6%, rgba(122,92,40,.10), transparent 60%),
    radial-gradient(90% 50% at 88% 20%, rgba(96,74,32,.10), transparent 62%),
    radial-gradient(70% 45% at 28% 94%, rgba(112,84,36,.09), transparent 60%),
    linear-gradient(180deg,#f4ead2,#eee0c1 55%,#e9d9b6);
  box-shadow:inset 0 0 70px rgba(120,90,40,.22), inset 0 0 2px rgba(255,255,255,.5);
  color:#211a12;
  font-family:"Kaiti SC","STKaiti","KaiTi","Songti SC","Noto Serif CJK SC",serif;
}
.lr-t1{font-size:13.5px;letter-spacing:.6px}
.lr-t2{font-size:13.5px;letter-spacing:.6px;margin:3px 0 12px}
.lr-fa{display:flex;flex-direction:column;align-items:center;gap:2px;margin:4px 0 12px}
.lr-fa-row{display:flex;justify-content:center;align-items:flex-start;gap:12px}
.lr-fa-row .lr-qin{width:42px;text-align:center}
.lr-fa-row .lr-gz{width:44px;text-align:center}
.lr-fa-row .lr-jiang{width:22px;text-align:center}
.lr-si{display:flex;justify-content:center;gap:24px;margin:4px 0 12px}
.lr-col{display:flex;flex-direction:column;align-items:center;line-height:1.12}
.lr-col i{font-style:normal;display:block}
.lr-fa-row .lr-qin i{font-size:13px}
.lr-fa-row .lr-gz i{font-size:20px;font-weight:600}
.lr-fa-row .lr-jiang i{font-size:15px}
.lr-si .lr-jiang i{font-size:16px;font-weight:400;color:#6b5a42}
.lr-si .lr-shang i{font-size:20px;font-weight:600}
.lr-si .lr-xia i{font-size:20px;font-weight:600;color:#3a3126}
.lr-pan2{width:min(330px,84vw);margin:4px auto 12px;display:grid;grid-template-columns:repeat(4,1fr);
  border:2px solid #2b2118;background:rgba(255,252,243,.25)}
.lr-c2{aspect-ratio:1/1;border:1.5px solid #2b2118;position:relative;display:flex;
  align-items:center;justify-content:center}
/* 字贴向盘中央（照 App）：地支靠中宫一侧、天将靠外 */
/* 字居中摆（天将/地支成对居中，只保留「支靠里、将靠外」的上下左右关系） */
.lr-up{flex-direction:column;justify-content:center;align-items:center;gap:3px}
.lr-dn{flex-direction:column-reverse;justify-content:center;align-items:center;gap:3px}
.lr-lf{flex-direction:row;justify-content:center;align-items:center;gap:6px}
.lr-rt{flex-direction:row-reverse;justify-content:center;align-items:center;gap:6px}
.lr-c2 .lr-j2{font-size:18px;line-height:1.05}
.lr-c2 .lr-d2 i{font-size:17px;font-weight:600;display:block;line-height:1.05}
.lr-c2 .lr-dun{position:absolute;font-size:10.5px;color:#6b5a42}
/* 天将格局名：挪到盘外页边（照 App，避免压框线） */
.lr-c2 .lr-gj{position:absolute;font-size:12px;line-height:1;color:#5c4a33;white-space:nowrap;letter-spacing:0}
.lr-up .lr-dun{left:3px;top:2px}
.lr-dn .lr-dun{left:3px;bottom:2px}
.lr-lf .lr-dun{left:3px;bottom:2px}
.lr-rt .lr-dun{right:3px;bottom:2px}
.lr-up .lr-gj{top:-17px;left:50%;transform:translateX(-50%)}
.lr-dn .lr-gj{bottom:-18px;left:50%;transform:translateX(-50%)}
.lr-lf .lr-gj{left:-28px;top:50%;transform:translateY(-50%);writing-mode:vertical-rl;text-orientation:upright;letter-spacing:1px}
.lr-rt .lr-gj{right:-28px;top:50%;transform:translateY(-50%);writing-mode:vertical-rl;text-orientation:upright;letter-spacing:1px}
/* 中宫 2×2 合成一个空方（去掉内部十字线，与 App 同） */
/* 中宫 2×2 完全并成一个空方（四格线全去，只留四周外框，与 App 同） */
.lr-c2:nth-child(6),.lr-c2:nth-child(7),.lr-c2:nth-child(10),.lr-c2:nth-child(11){border:none}
.lr-ss3{margin-left:10px;font-size:12px;color:#6b5a42;letter-spacing:.4px;width:46px}
.lr-ss4{font-size:11.5px;color:#6b5a42;line-height:1.25;min-height:15px;text-align:center;letter-spacing:.2px}
.lr-panWrap{position:relative;width:min(356px,92vw);margin:6px auto 18px;padding:19px 30px}
.lr-panWrap .lr-pan2{width:100%;margin:0}
.lr-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.lr-keti{font-size:14.5px;letter-spacing:.6px;margin-top:4px}
/* 課體／課義（《御定六壬直指》） */
.lr-zhi{margin-top:12px;padding-top:9px;border-top:1px dashed #c9b89a}
.lr-zhi-h{font-size:14.5px;color:#5b3f7a;letter-spacing:1px;margin-bottom:5px}
.lr-zhi-k{font-size:14px;line-height:1.75;color:#3a3126}
.lr-zhi-y{font-size:14px;line-height:1.75;color:#3a3126;margin-top:2px}
.lr-shi{font-size:12.5px;border:1px solid rgba(43,33,24,.45);border-radius:3px;padding:0 5px}
.lr-note{margin:2px 0 6px;line-height:1.6}
