/* ============================================================
   通玄 TONGXUAN · 占星 · 西占「埃及」页签
   沿用 zhanxing-west.css 的 zxp-*（分段钮、小标题、对照、说明）与 zhanxing.css 的 zx-table；这里只补本页签独有的几样。
   ============================================================ */
.zxe-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.zxe-status[hidden] { display: none; }
.zxe-status.is-err { color: var(--cinnabar); }
.zxe-head { margin-bottom: 16px; padding: 12px 16px; border: 1px solid rgba(150, 114, 58, 0.35); border-radius: 10px; background: rgba(var(--gold-rgb), 0.1); }
.zxe-head[hidden] { display: none; }
.zxe-head .zxp-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 22px; margin-top: 4px; }
.zxe-nav { margin-bottom: 14px; }
.zxe-seg { display: flex; }
.zxe-seg .zxp-seg-btn { flex: 1 0 auto; padding: 5px 12px; border-bottom: 1px solid rgba(150, 114, 58, 0.18); margin-bottom: -1px; }
.zxe-lab.zxe-pick { display: none; }
.zxe-lab { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.zxe-lab .select-line { width: auto; min-width: 6em; max-width: 100%; margin: 0; }
.zxe-ctl .zxe-name { width: 14em; max-width: 100%; margin: 0; }
.zxe-block { margin-top: 16px; min-width: 0; }
.zxe-block:first-child { margin-top: 0; }
.zxe-para { margin: 8px 0 0; font-size: 13px; line-height: 1.8; color: var(--paper-ink); }
.zxe-note { margin: 8px 0 0; }
.zxe-quiet .zxp-hint { margin: 0; }
.zxe-warn { padding: 10px 14px; border: 1px solid rgba(168, 67, 47, 0.35); border-radius: 10px; background: rgba(168, 67, 47, 0.06); }
.zxe-warn .zxe-para { margin: 0; }
.zxe-kv > div { grid-template-columns: minmax(5.6em, max-content) minmax(0, 1fr); }

/* 三十六旬环：每座三旬，十二列正好四座一排 */
.zxe-ring { margin-top: 10px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.zxe-ring-cell { min-width: 0; padding: 5px 2px 4px; display: grid; justify-items: center; gap: 1px; border: 1px solid rgba(150, 114, 58, 0.28); border-radius: 6px; background: rgba(255, 253, 246, 0.6); font-size: 12px; line-height: 1.35; color: var(--paper-ink); }
.zxe-ring-cell:nth-child(6n+4), .zxe-ring-cell:nth-child(6n+5), .zxe-ring-cell:nth-child(6n+6) { background: rgba(var(--gold-rgb), 0.08); }
.zxe-ring-n { font-size: 11px; color: var(--paper-ink-soft); font-variant-numeric: tabular-nums; }
.zxe-ring-sign { font-family: var(--font-serif); font-size: 13px; }
.zxe-ring-ruler { font-size: 12px; color: var(--paper-ink-soft); }
.zxe-ring-pts { min-height: 1.35em; font-weight: 600; color: var(--gold-700); white-space: nowrap; }
.zxe-ring-cell.is-hot { border-color: var(--gold-700); box-shadow: inset 0 0 0 1px var(--gold-700); background: rgba(var(--gold-rgb), 0.26); }

.zxe-table td.zxe-wide { white-space: normal; min-width: 16em; max-width: 30em; line-height: 1.7; }
.zxe-table td.zxe-strong { font-weight: 600; }
.zxe-table tr.zxe-hot td { background: rgba(var(--gold-rgb), 0.2); }
.zxe-grid { font-size: 12px; letter-spacing: 0; }
.zxe-grid th, .zxe-grid td { padding: 5px 7px; text-align: center; }
.zxe-grid th:first-child, .zxe-grid td:first-child { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--paper-100); box-shadow: 1px 0 0 rgba(150, 114, 58, 0.3); }
.zxe-grid .zxe-hotcol { background: rgba(var(--gold-rgb), 0.22); }
.zxe-grid td.zxe-hotcell { font-weight: 700; color: var(--gold-700); box-shadow: inset 0 0 0 1px rgba(150, 114, 58, 0.55); }

.zxe-letters { margin-top: 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px; }
.zxe-letter { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 4px 6px; border: 1px solid rgba(150, 114, 58, 0.28); border-radius: 6px; font-size: 12.5px; color: var(--paper-ink); }
.zxe-letter b { font-size: 15px; font-weight: 500; }
.zxe-letter i { font-style: normal; color: var(--paper-ink-soft); font-variant-numeric: tabular-nums; }

.zxe-nw { white-space: nowrap; }
.zxe-axes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px 18px; }
.zxe-axis { min-width: 0; padding: 10px 12px; border: 1px dashed rgba(150, 114, 58, 0.4); border-radius: 10px; background: rgba(255, 253, 246, 0.55); }
.zxe-axis .zxe-lab { display: flex; flex-wrap: wrap; }
.zxe-axis .select-line { flex: 1 1 8em; }
.zxe-axis-note { margin: 8px 0 0; }
.zxe-axes-wrap > .zxp-chip { margin-top: 12px; }

/* 袖中天皮肤 */
html[data-theme="xiu"] .zxe-head { border-color: rgba(127, 111, 174, 0.4); background: rgba(127, 111, 174, 0.1); }
html[data-theme="xiu"] .zxe-ring-cell { border-color: rgba(127, 111, 174, 0.3); }
html[data-theme="xiu"] .zxe-ring-cell:nth-child(6n+4), html[data-theme="xiu"] .zxe-ring-cell:nth-child(6n+5), html[data-theme="xiu"] .zxe-ring-cell:nth-child(6n+6) { background: rgba(127, 111, 174, 0.08); }
html[data-theme="xiu"] .zxe-ring-cell.is-hot { border-color: var(--zi-700); box-shadow: inset 0 0 0 1px var(--zi-700); background: rgba(127, 111, 174, 0.22); }
html[data-theme="xiu"] .zxe-ring-pts, html[data-theme="xiu"] .zxe-grid td.zxe-hotcell { color: var(--zi-700); }
html[data-theme="xiu"] .zxe-table tr.zxe-hot td, html[data-theme="xiu"] .zxe-grid .zxe-hotcol { background: rgba(127, 111, 174, 0.16); }
html[data-theme="xiu"] .zxe-grid td.zxe-hotcell { box-shadow: inset 0 0 0 1px rgba(127, 111, 174, 0.6); }
html[data-theme="xiu"] .zxe-letter, html[data-theme="xiu"] .zxe-axis { border-color: rgba(127, 111, 174, 0.35); }

@media (max-width: 720px) {
  .zxe-seg { display: none; }
  .zxe-lab.zxe-pick { display: flex; }
  .zxe-pick .select-line { flex: 1 1 auto; min-width: 0; }
  .zxe-head { padding: 10px 12px; }
  .zxe-ring { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .zxe-ctl .zxe-lab { width: 100%; }
  .zxe-ctl .zxe-lab .select-line, .zxe-ctl .zxe-name { flex: 1 1 auto; min-width: 0; width: auto; }
  /* 带长文的表（护符、占星地理）：窄屏改成一旬一张小卡，免得横向拖着读长句 */
  .zxe-cards, .zxe-cards tbody, .zxe-cards tr, .zxe-cards td { display: block; }
  .zxe-cards thead { display: none; }
  .zxe-cards tr { margin-top: 8px; padding: 8px 10px; border: 1px solid rgba(150, 114, 58, 0.28); border-radius: 8px; }
  .zxe-cards td, .zxe-cards td.zxe-wide { min-width: 0; max-width: none; padding: 2px 0; border: 0; white-space: normal; display: grid; grid-template-columns: 5.2em minmax(0, 1fr); gap: 8px; line-height: 1.7; }
  .zxe-cards td::before { content: attr(data-label); color: var(--paper-ink-soft); font-size: 12.5px; }
  .zxe-cards td.zxe-empty { display: none; }
  .zxe-axes { grid-template-columns: minmax(0, 1fr); }
  /* UI-1118：口径七轴标签与选单并排时选单只剩 170px，「从白羊 0° 起（通行）」被截成「从白羊 0° 起（通」——手机上标签一行、选单通栏 */
  .zxe-axis .zxe-lab { row-gap: 6px; }
  .zxe-axis .zxe-lab .zxi-ctl-label, .zxe-axis .zxe-lab .select-line { flex: 1 1 100%; }
}
@media print {
  .zxe-nav, .zxe-ctl, .zxe-axes-wrap, .zxe-status { display: none !important; }
  .zxe-ring-cell, .zxe-block { break-inside: avoid; }
  .zxe-grid th:first-child, .zxe-grid td:first-child { position: static; background: none; }
  .zxe-table td.zxe-wide { max-width: none; }
}
@media (hover: none) and (pointer: coarse) {
  .zxe-seg .zxp-seg-btn { min-height: 40px; }
  .zxe-ctl .zxe-name { font-size: 16px; }
}
