/* ============================================================
   通玄 TONGXUAN · 占星 · 西占盘面释义浮层
   词条记号 .zxm-term（由 zhanxing-west-meaning.js 补在星名/星座/宫位/相位/希腊点的小格上）
   浮层 .zxm-pop：形制随全站词条浮层（.tx-tip），层级压在它之下、两枚悬浮钮（1500）之上。
   ============================================================ */
.zxm-term { cursor: help; text-decoration: underline dotted rgba(150, 114, 58, 0.55); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.zxm-term:hover { text-decoration-color: var(--gold-700); }
.zxm-term:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }
svg .zxm-term { text-decoration: none; cursor: help; pointer-events: all; }
svg .zxm-term:hover { fill: var(--text-hi); }

.zxm-pop {
  position: fixed;
  z-index: 1550;
  left: 8px; top: 8px;
  width: max-content;
  max-width: min(340px, calc(100vw - 16px));
  max-height: min(430px, calc(100vh - 16px));
  display: flex; flex-direction: column;
  border-radius: 10px;
  color: var(--text-hi);
  background: linear-gradient(160deg, var(--ink-800), var(--ink-900));
  border: 1px solid rgba(var(--gold-rgb), 0.4);
  box-shadow: 0 12px 30px rgba(5, 8, 18, 0.4);
  font-size: 13px; line-height: 1.7; letter-spacing: 0.02em;
  text-align: left;
}
.zxm-pop[hidden] { display: none; }
.zxm-head { display: flex; align-items: flex-start; gap: 8px; padding: 9px 6px 7px 13px; border-bottom: 1px solid rgba(var(--gold-rgb), 0.22); }
.zxm-head-text { flex: 1; min-width: 0; padding-top: 2px; }
.zxm-title { display: block; font-family: var(--font-serif); font-size: 15px; font-weight: 600; color: var(--gold-300); line-height: 1.4; }
.zxm-tag { display: block; font-size: 12px; color: var(--text-mid); line-height: 1.5; }
.zxm-close { flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--text-mid); font-size: 18px; line-height: 1; cursor: pointer; visibility: hidden; }
.zxm-pop.is-pinned .zxm-close { visibility: visible; }
.zxm-close:hover { color: var(--gold-300); background: rgba(var(--gold-rgb), 0.12); }
.zxm-body { padding: 8px 13px 11px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.zxm-line { margin: 0 0 3px; display: flex; gap: 9px; }
.zxm-line b { flex: none; min-width: 4.2em; font-weight: 500; color: var(--gold-400); }
.zxm-line span { flex: 1; min-width: 0; color: var(--text-hi); overflow-wrap: anywhere; }
.zxm-mine { margin-top: 8px; padding-top: 7px; border-top: 1px dashed rgba(var(--gold-rgb), 0.3); }
.zxm-mine-title { margin-bottom: 2px; font-size: 12px; letter-spacing: 0.2em; color: var(--text-mid); }

/* 袖中天皮肤：浮层仍是深底（与全站词条浮层一致），只把描边与记号换成紫 */
html[data-theme="xiu"] .zxm-term { text-decoration-color: rgba(127, 111, 174, 0.6); }
html[data-theme="xiu"] .zxm-term:hover { text-decoration-color: var(--zi-700); }
html[data-theme="xiu"] .zxm-term:focus-visible { outline-color: var(--zi-500); }
html[data-theme="xiu"] .zxm-pop { border-color: rgba(127, 111, 174, 0.55); }
html[data-theme="xiu"] .zxm-head { border-bottom-color: rgba(127, 111, 174, 0.3); }
html[data-theme="xiu"] .zxm-mine { border-top-color: rgba(127, 111, 174, 0.4); }

@media print {
  .zxm-pop { display: none !important; }
  .zxm-term { text-decoration: none; cursor: auto; }
}
@media (pointer: coarse) {
  .zxm-pop { font-size: 13.5px; }
  .zxm-close { width: 36px; height: 36px; }
}
