/* ============================================================
   通玄 TONGXUAN · 占星 · 印占细读面板 zhanxing-india.css（2026-11-11）
   星帖「印占口径」折叠块 + 盘下方「盘面细读」十三页签。
   页签、折叠、键值表、提示行沿用西占细读面板的 zxp- 版式（zhanxing-west.css），表格沿用本页 .zx-table；
   本表只管印占独有的版式，类名一律 zxi- 前缀。颜色只用宣纸底的角色色，两副皮肤同用。
   ============================================================ */

#zxIndiaMount { max-width: 980px; margin: 22px auto 0; }
.zxi-root { min-width: 0; }

/* ---------- 星帖口径块 ---------- */
.zxi-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.zxi-opts .field { min-width: 0; }
.zxi-opts .select-line { width: 100%; max-width: 100%; }

/* ---------- 表格 ---------- */
.zxi-table td, .zxi-table th { font-variant-numeric: tabular-nums; }
.zxi-table td:first-child { font-family: var(--font-serif); font-weight: 600; color: var(--paper-ink); }
.zxi-matrix td, .zxi-matrix th { text-align: center; padding-left: 7px; padding-right: 7px; }
.zxi-matrix td:first-child, .zxi-matrix th:first-child { text-align: left; }
.zxi-good, .zx-table td.zxi-good { color: var(--jade-700); font-weight: 600; }
.zxi-bad, .zx-table td.zxi-bad { color: var(--cinnabar-deep); font-weight: 600; }
.zx-table td.zxi-dot { color: var(--gold-700); }
.zx-table tr.zxi-row-now td { background: rgba(var(--gold-rgb), 0.2); }
.zx-table tr.zxi-row-good td { background: rgba(75, 122, 92, 0.1); }
.zx-table tr.zxi-row-bad td { background: rgba(184, 73, 62, 0.07); }
.zx-table tr.zxi-row-sum td { border-top: 1px solid rgba(150, 114, 58, 0.45); font-weight: 600; }
.zx-table td.zxi-name { min-width: 8.5em; max-width: 16em; font-family: var(--font-serif); }
.zxi-tri { display: inline-grid; gap: 1px; justify-items: center; line-height: 1.35; }
.zxi-tri i { font-style: normal; font-size: 11.5px; color: var(--paper-ink-soft); }
.zxi-tri b { font-size: 13px; font-weight: 600; color: var(--paper-ink); }
.zxi-tri b.zxi-good { color: var(--jade-700); }
.zxi-tri b.zxi-bad { color: var(--cinnabar-deep); }
.zxi-kv > div { grid-template-columns: 7.5em minmax(0, 1fr); }   /* UI-1118：6.5em 容不下七字题名，「灵魂星九分上升」折出孤字「升」（两端同病） */
.zxi-root .zxp-kv { margin-top: 8px; }
.zxi-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.zxi-root .zxp-fold { margin-top: 12px; }
.zxi-root .zxp-fold .zx-table-wrap:first-child { margin-top: 2px; }

/* ---------- 重排控件行（过运日 / 年盘年份 / 判定表筛选） ---------- */
.zxi-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 14px; padding: 10px 12px; border: 1px dashed rgba(150, 114, 58, 0.4); border-radius: 10px; background: rgba(255, 253, 246, 0.55); }
.zxi-ctl-label { font-family: var(--font-serif); font-size: 13.5px; font-weight: 600; letter-spacing: 0.08em; color: var(--gold-700); }
.zxi-ctl-unit { font-size: 13px; color: var(--paper-ink-soft); margin-left: -4px; }
.zxi-ctl .select-line { width: auto; min-width: 4.6em; max-width: 100%; margin: 0; }
.zxi-ctl .zxi-chips { margin: 0; }
.zxi-btn.active { background: var(--gold-700); border-color: var(--gold-700); color: #ffffff; }
.zxi-pair { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }   /* UI-1118：选单 + 单位字成对折行 */

/* ---------- 大运五级下钻 ---------- */
.zxi-drill-host { margin-top: 10px; }
.zxi-root .zxi-drill { margin-top: 6px; margin-bottom: 0; padding: 0 12px; }
.zxi-drill > summary { font-size: 13.5px; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; }
.zxi-drill .zxi-drill { background: rgba(255, 253, 246, 0.4); }
.zxi-drill-now { border-color: rgba(150, 114, 58, 0.6); }
.zxi-drill-now > summary { color: var(--cinnabar-deep); }

/* ---------- 袖中天皮肤 ---------- */
html[data-theme="xiu"] .zx-table tr.zxi-row-now td { background: rgba(127, 111, 174, 0.16); }
html[data-theme="xiu"] .zxi-btn.active { background: var(--zi-700); border-color: var(--zi-700); color: #ffffff; }
html[data-theme="xiu"] .zxi-ctl { border-color: rgba(127, 111, 174, 0.4); }
html[data-theme="xiu"] .zxi-drill-now { border-color: var(--zi-500); }

/* ---------- 窄屏 ---------- */
@media (max-width: 720px) {
  .zxi-opts, .zxi-two { grid-template-columns: minmax(0, 1fr); }
  .zxi-ctl { padding: 9px 10px; }
  .zxi-root .zxi-drill { padding: 0 8px; }
  .zxi-drill > summary { font-size: 13px; }
}
@media print {
  .zxi-ctl { display: none !important; }
  .zxi-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: none) and (pointer: coarse) {
  .zxi-ctl .select-line { font-size: 16px; min-height: 40px; }
}

/* ============================================================
   第二轮（2026-11-12）：流派与算法折叠、分盘台、全吉盘、三旗盘、问事、校时
   ============================================================ */
.zxi-opts-wide { grid-column: 1 / -1; }
.zxi-school-note { margin: 6px 0 0; }
.zxi-variants { grid-column: 1 / -1; margin-top: 10px; border-top: 1px dashed rgba(150, 114, 58, 0.35); padding-top: 4px; }
.zxi-variants > .zxi-opts { margin-top: 6px; }
.zxi-var-group { grid-column: 1 / -1; margin: 12px 0 0; font-family: var(--font-serif); font-size: 13.5px; font-weight: 600; letter-spacing: 0.1em; color: var(--gold-700); }
.zxi-var-label { letter-spacing: 0.04em; }

/* ---------- 分盘台 ---------- */
.zxi-board { min-width: 0; }
.zxi-board-ctl { display: grid; gap: 8px; margin-bottom: 14px; padding: 10px 12px; border: 1px dashed rgba(150, 114, 58, 0.4); border-radius: 10px; background: rgba(255, 253, 246, 0.55); }
.zxi-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.zxi-chiprow .zxi-chips { margin: 0; }
.zxi-chiprow .select-line { width: auto; min-width: 5.5em; max-width: 100%; margin: 0; }
.zxi-chiprow-set .zxp-chip { min-height: 32px; padding: 4px 10px; font-size: 12.5px; }
.zxi-lab { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.zxi-set-note { font-size: 12px; line-height: 1.6; color: var(--paper-ink-soft); }
.zxi-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 22px; justify-items: center; }
.zxi-charts-1 { grid-template-columns: minmax(0, 1fr); }
.zxi-chart { width: 100%; max-width: 400px; min-width: 0; }
.zxi-chart-svg { display: block; width: 100%; height: auto; }
.zxi-chart-frame { fill: rgba(250, 247, 239, 0.82); stroke: rgba(150, 114, 58, 0.6); stroke-width: 1.4; }
.zxi-chart-hole { fill: rgba(255, 255, 255, 0.35); stroke: none; }
.zxi-chart-lines line { stroke: rgba(150, 114, 58, 0.45); stroke-width: 1; }
.zxi-chart-ref { fill: rgba(184, 73, 62, 0.09); stroke: var(--cinnabar); stroke-width: 1.2; }
.zxi-chart-lit { fill: rgba(var(--gold-rgb), 0.32); stroke: var(--gold-700); stroke-width: 1.2; }
.zxi-chart-sign { font-family: var(--font-serif); font-size: 12px; fill: var(--paper-ink-soft); }
.zxi-chart-house { font-size: 11.5px; fill: var(--gold-700); font-variant-numeric: tabular-nums; }
.zxi-chart-asc { font-size: 11.5px; font-weight: 700; fill: var(--cinnabar-deep); }
.zxi-chart-pl { font-family: var(--font-serif); font-size: 13px; font-weight: 600; fill: var(--paper-ink); }
.zxi-chart-g.is-pick { fill: var(--cinnabar-deep); text-decoration: underline; }
.zxi-chart-bb { fill: var(--jade-700); font-weight: 700; }
.zxi-chart-badge { font-family: var(--font-serif); font-size: 19px; font-weight: 700; letter-spacing: 0.1em; fill: var(--gold-700); opacity: 0.75; }
#zxIndiaMount.is-busy { opacity: 0.55; pointer-events: none; }
.zxi-varga-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 14px; padding: 9px 12px; border: 1px solid rgba(184, 73, 62, 0.4); border-radius: 10px; background: rgba(184, 73, 62, 0.06); font-size: 13px; line-height: 1.7; color: var(--paper-ink); }
.zxi-wait { margin: 8px 0; }
.zxi-warn { margin: 6px 0 0; font-size: 13px; line-height: 1.8; color: var(--cinnabar-deep); }

/* ---------- 全吉盘 ---------- */
.zxi-sbc-wrap { max-width: 440px; margin: 6px auto 4px; }
.zxi-sbc { display: block; width: 100%; height: auto; }
.zxi-sbc-cell { fill: rgba(250, 247, 239, 0.85); stroke: rgba(150, 114, 58, 0.5); stroke-width: 1; }
.zxi-sbc-cell.is-focus { fill: rgba(var(--gold-rgb), 0.5); stroke: var(--gold-700); stroke-width: 1.6; }
.zxi-sbc-cell.is-vedha { fill: rgba(var(--gold-rgb), 0.18); stroke: var(--gold-700); }
.zxi-sbc-core { fill: rgba(255, 255, 255, 0.3); stroke: rgba(150, 114, 58, 0.35); stroke-dasharray: 4 4; }
.zxi-sbc-nak { font-family: var(--font-serif); font-size: 14px; font-weight: 600; fill: var(--paper-ink); }
.zxi-sbc-pl { font-family: var(--font-serif); font-size: 12px; font-weight: 600; }
.zxi-sbc-pl .is-mal { fill: var(--cinnabar-deep); }
.zxi-sbc-pl .is-ben { fill: var(--jade-700); }
.zxi-sbc-dir { font-family: var(--font-serif); font-size: 13px; fill: var(--gold-700); }
.zxi-sbc-center { font-family: var(--font-serif); font-size: 14px; fill: var(--paper-ink); }

/* ---------- 三旗盘 ---------- */
.zxi-flags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
.zxi-flag { min-width: 0; padding: 10px 10px 4px; border: 1px solid rgba(150, 114, 58, 0.35); border-radius: 10px; background: rgba(255, 253, 246, 0.5); }
.zxi-flag-title { margin: 0 0 4px; font-family: var(--font-serif); font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em; color: var(--gold-700); }
.zxi-flag-cell { display: inline-flex; flex-wrap: nowrap; white-space: nowrap; gap: 0 6px; }
.zxi-flag-cell i { font-style: normal; font-family: var(--font-serif); font-size: 13px; color: var(--paper-ink-soft); }
.zxi-flag-blocked, .zx-table td.zxi-flag-blocked { color: var(--paper-ink-soft); text-decoration: line-through; }

/* ---------- 问事 / 校时 ---------- */
.zxi-verdict { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 4px 0 2px; padding: 10px 14px; border: 1px solid rgba(150, 114, 58, 0.4); border-radius: 10px; background: rgba(255, 253, 246, 0.6); }
.zxi-verdict b { font-family: var(--font-serif); font-size: 19px; letter-spacing: 0.12em; color: var(--paper-ink); }
.zxi-verdict span { font-size: 13px; color: var(--paper-ink-soft); }
.zxi-events { display: grid; gap: 8px; margin: 8px 0; }
.zxi-events .zxi-ctl { margin: 0; }

html[data-theme="xiu"] .zxi-board-ctl, html[data-theme="xiu"] .zxi-variants { border-color: rgba(127, 111, 174, 0.4); }
html[data-theme="xiu"] .zxi-chart-ref { stroke: var(--zi-500); fill: rgba(127, 111, 174, 0.12); }
html[data-theme="xiu"] .zxi-chart-lit, html[data-theme="xiu"] .zxi-sbc-cell.is-vedha { fill: rgba(127, 111, 174, 0.2); stroke: var(--zi-500); }
html[data-theme="xiu"] .zxi-sbc-cell.is-focus { fill: rgba(127, 111, 174, 0.4); stroke: var(--zi-700); }
html[data-theme="xiu"] .zxi-varga-banner { border-color: rgba(127, 111, 174, 0.5); background: rgba(127, 111, 174, 0.08); }

@media (max-width: 720px) {
  .zxi-charts { grid-template-columns: minmax(0, 1fr); }
  .zxi-flags { grid-template-columns: minmax(0, 1fr); }
  .zxi-board-ctl { padding: 9px 10px; }
  .zxi-lab { flex-wrap: wrap; }
}
@media print {
  /* 印占细读十五页签全展开要多出十几页纸：打印只印当前所看的那一页签（想印别的，先切过去再印）；问事 / 校时的填写区不上纸 */
  #zxIndiaMount .zxp-pane.is-off { display: none !important; }
  .zxi-board-ctl, .zxi-chiprow, .zxi-varga-banner .zxp-chip, .zxi-events, .zxi-wait { display: none !important; }
  .zxi-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zxi-chart { break-inside: avoid; }
}
@media (hover: none) and (pointer: coarse) {
  .zxi-chiprow .select-line { font-size: 16px; min-height: 40px; }
  .zxi-chiprow-set .zxp-chip { min-height: 36px; }
}
