/* =====================================================================
   pages/ziwei.css —— 紫微斗数（排盘 / 合盘 / 星曜 / 古籍）
   配色只在 .zw-wrap 上定义一次，深色模式整套换值，布局不动。
   四化色：禄绿 / 权蓝 / 科金 / 忌红，是紫微斗数的通行约定。
   ===================================================================== */

.zw-wrap {
  padding: 10px 16px 0;
  --zw-lu: #12855C;
  --zw-quan: #2F6BFF;
  --zw-ke: #A97513;
  --zw-ji: #D93B3B;
  --zw-line: rgba(18, 24, 48, .11);
  --zw-line-2: rgba(18, 24, 48, .06);
  --zw-cell: rgba(255, 255, 255, .58);
  --zw-sel: rgba(47, 107, 255, .11);
  --zw-sf: rgba(47, 107, 255, .05);
  --zw-ming: rgba(91, 99, 200, .075);
  --zw-dx: rgba(122, 91, 255, .075);
  --zw-accent: #4C55B8;
  --zw-accent-2: #7B86FF;
}

html[data-theme="dark"] .zw-wrap {
  --zw-lu: #4BD39A;
  --zw-quan: #7AA4FF;
  --zw-ke: #EFC164;
  --zw-ji: #FF7C7C;
  --zw-line: rgba(255, 255, 255, .10);
  --zw-line-2: rgba(255, 255, 255, .055);
  --zw-cell: rgba(255, 255, 255, .035);
  --zw-sel: rgba(122, 140, 255, .17);
  --zw-sf: rgba(122, 140, 255, .07);
  --zw-ming: rgba(150, 158, 255, .10);
  --zw-dx: rgba(168, 140, 255, .10);
  --zw-accent: #A6AEFF;
  --zw-accent-2: #7B86FF;
}

/* ---------------- 顶部 tab ---------------- */
.zw-tabs {
  display: flex; gap: 3px; padding: 3px;
  border-radius: 14px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line-2);
  margin-bottom: 12px;
}
.zw-tabs button {
  flex: 1; height: 34px; border: 0; border-radius: 11px;
  background: transparent; color: var(--ink-3);
  font-size: 13px; font-weight: 650; font-family: inherit;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.zw-tabs button.on {
  background: var(--glass-float);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(18, 24, 48, .08), inset 0 1px 0 rgba(255, 255, 255, .9);
}
html[data-theme="dark"] .zw-tabs button.on {
  background: rgba(255, 255, 255, .095);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .08);
}

/* ---------------- 页头 ---------------- */
.zw-hero {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 2px 2px 14px;
}
.zw-hero-ico {
  width: 40px; height: 40px; border-radius: 14px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, #7B86FF, #2A2F7A);
  box-shadow: 0 8px 20px rgba(58, 63, 140, .32), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.zw-hero-ico svg { width: 21px; height: 21px; }
.zw-hero-tx b {
  display: block; font-size: 16.5px; font-weight: 800;
  color: var(--ink); letter-spacing: -.01em; line-height: 1.3;
}
.zw-hero-tx p {
  margin: 3px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-3);
}

/* ---------------- 加载 / 错误 ---------------- */
.zw-loading {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 54px 0; font-size: 13px; color: var(--ink-3);
}
.zw-spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 14%, transparent);
  border-top-color: var(--brand);
  animation: zw-spin .8s linear infinite;
}
@keyframes zw-spin { to { transform: rotate(360deg); } }
.zw-err {
  padding: 40px 20px; text-align: center;
  font-size: 13px; line-height: 1.8; color: var(--ink-3);
}
.zw-err .zw-btn {
  margin-top: 14px; height: 38px; padding: 0 22px;
  border-radius: 12px; border: 0; background: var(--brand-grad);
  color: #fff; font-size: 13px; font-weight: 650;
}

/* ---------------- 卡片 ---------------- */
.zw-card {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 20px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-line-soft);
  box-shadow: var(--sh-1), var(--rim);
  backdrop-filter: var(--blur-surface);
  -webkit-backdrop-filter: var(--blur-surface);
}
html[data-theme="dark"] .zw-card {
  background: rgba(255, 255, 255, .045);
  border-color: rgba(255, 255, 255, .07);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .05);
}

/* ---------------- 表单 ---------------- */
.zw-form { padding: 16px 14px 14px; }
.zw-fld { margin-bottom: 14px; }
.zw-lab {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 12px; font-weight: 650; color: var(--ink-2);
  margin-bottom: 7px;
}
.zw-lab i {
  font-style: normal; font-size: 10.5px; font-weight: 500;
  color: var(--ink-4);
}
.zw-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zw-two .zw-fld { margin-bottom: 12px; }

.zw-ipt {
  display: flex; align-items: center;
  height: 44px; padding: 0 13px;
  border-radius: 13px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
html[data-theme="dark"] .zw-ipt { background: rgba(255, 255, 255, .04); }
.zw-ipt:focus-within {
  border-color: color-mix(in srgb, var(--brand) 46%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 11%, transparent);
}
.zw-ipt input {
  width: 100%; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--ink); font-family: inherit;
}
.zw-ipt input::placeholder { color: var(--ink-4); }
.zw-ipt input:disabled { opacity: .45; }
.zw-time { padding: 0 8px; }
.zw-time input { font-size: 13px; color-scheme: light; }
html[data-theme="dark"] .zw-time input { color-scheme: dark; }

.zw-seg {
  display: flex; gap: 3px; padding: 3px;
  height: 44px;
  border-radius: 13px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line);
}
html[data-theme="dark"] .zw-seg { background: rgba(255, 255, 255, .04); }
.zw-seg button {
  flex: 1; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink-3); font-size: 13px; font-weight: 650; font-family: inherit;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.zw-seg button.on {
  background: color-mix(in srgb, var(--brand) 11%, transparent);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent);
  font-weight: 750;
}
html[data-theme="dark"] .zw-seg button.on {
  background: rgba(122, 140, 255, .19);
  color: #A9B6FF;
  box-shadow: inset 0 0 0 1px rgba(122, 140, 255, .3);
}

.zw-grid3 { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 7px; }
.zw-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.zw-sel { position: relative; min-width: 0; }
.zw-sel.span2 { grid-column: span 2; }
.zw-sel select {
  width: 100%; height: 44px; padding: 0 26px 0 11px;
  border-radius: 13px; border: 1px solid var(--zw-line);
  background: var(--paper-2);
  color: var(--ink); font-size: 13.5px; font-family: inherit;
  appearance: none; -webkit-appearance: none;
  text-overflow: ellipsis;
}
html[data-theme="dark"] .zw-sel select { background: rgba(255, 255, 255, .04); }
.zw-sel::after {
  content: ''; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px;
  margin-top: -4px; border-right: 1.5px solid var(--ink-4); border-bottom: 1.5px solid var(--ink-4);
  transform: rotate(45deg); pointer-events: none;
}

.zw-check {
  display: flex; align-items: center; gap: 8px;
  margin-top: 9px; font-size: 12px; color: var(--ink-3);
}
.zw-check input {
  width: 17px; height: 17px; accent-color: var(--brand); margin: 0;
}

.zw-tst {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; margin-bottom: 13px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 6%, transparent);
  font-size: 11.5px; line-height: 1.6; color: var(--ink-2);
}
.zw-tst-dot {
  width: 5px; height: 5px; border-radius: 50%; flex: none;
  margin-top: 7px; background: var(--brand); opacity: .8;
}

.zw-go {
  width: 100%; height: 48px; border: 0; border-radius: 16px;
  background: var(--brand-grad);
  color: #fff; font-size: 15px; font-weight: 750; font-family: inherit;
  letter-spacing: .02em;
  box-shadow: var(--brand-shadow);
  transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.zw-go:active { transform: scale(.985); box-shadow: 0 3px 9px rgba(90, 110, 255, .3); }
.zw-tip {
  margin-top: 10px; text-align: center;
  font-size: 10.5px; color: var(--ink-4);
}

/* ---------------- 名人案例 ---------------- */
.zw-fam-wrap { margin: 18px 2px 6px; }
.zw-fam-hd {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 12px; font-weight: 700; color: var(--ink);
  margin-bottom: 9px;
}
.zw-fam-hd i {
  font-style: normal; font-size: 10px; font-weight: 500;
  color: var(--ink-4);
}
.zw-fam { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zw-fam-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 10px; border-radius: 13px;
  border: 1px solid var(--zw-line);
  background: var(--zw-cell);
  font-family: inherit; text-align: left;
  transition: transform .16s, border-color .16s;
}
.zw-fam-card:active { transform: scale(.97); border-color: color-mix(in srgb, var(--zw-accent) 34%, transparent); }
.zw-fam-card b { font-size: 12.5px; font-weight: 700; color: var(--ink); letter-spacing: .01em; }
.zw-fam-card span {
  font-size: 9px; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---------------- 结果页操作条 ---------------- */
.zw-ops {
  display: flex; gap: 7px; margin-bottom: 11px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.zw-ops::-webkit-scrollbar { display: none; }
.zw-op {
  flex: none; height: 32px; padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--zw-line);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12px; font-weight: 650; font-family: inherit;
  transition: background .16s var(--ease), color .16s var(--ease);
}
html[data-theme="dark"] .zw-op { background: rgba(255, 255, 255, .045); }
.zw-op:active { background: var(--zw-sel); color: var(--ink); }

/* ---------------- 运限条 ---------------- */
.zw-nav { margin-bottom: 9px; }
.zw-nav-tabs {
  display: flex; gap: 3px; padding: 3px;
  border-radius: 13px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line-2);
}
html[data-theme="dark"] .zw-nav-tabs { background: rgba(255, 255, 255, .03); }
.zw-nav-tabs > button {
  flex: 1; height: 31px; border: 0; border-radius: 10px;
  background: transparent; color: var(--ink-3);
  font-size: 11.5px; font-weight: 650; font-family: inherit;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.zw-nav-tabs > button.on {
  background: var(--zw-sel); color: var(--zw-accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--zw-accent) 22%, transparent);
}
.zw-nav-yr {
  flex: 1.45; display: flex; align-items: center;
  height: 31px; padding: 0 4px 0 10px;
  border-radius: 10px; border: 1px solid transparent;
}
.zw-nav-yr.on {
  background: var(--zw-sel);
  border-color: color-mix(in srgb, var(--zw-accent) 22%, transparent);
}
.zw-yr-name {
  flex: 1; text-align: left; border: 0; background: transparent;
  color: var(--ink-3); font-size: 11.5px; font-weight: 650; font-family: inherit;
}
.zw-nav-yr.on .zw-yr-name { color: var(--zw-accent); }
.zw-yr-step { display: flex; align-items: center; gap: 1px; }
.zw-yr-step button {
  width: 21px; height: 21px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink-4);
  font-size: 14px; line-height: 1; font-family: inherit;
}
.zw-yr-step b {
  min-width: 36px; text-align: center;
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.zw-nav-yr.on .zw-yr-step b { color: var(--zw-accent); }

.zw-ovline {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  padding: 0 3px 9px;
  font-size: 10.5px; color: var(--ink-3);
}
.zw-ovline span { flex-basis: 100%; margin-right: 1px; font-size: 10px; color: var(--ink-4); letter-spacing: .02em; }
.zw-ovline i {
  font-style: normal; font-weight: 650;
  padding: 1px 6px; border-radius: 6px;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

/* ---------------- 命盘 ---------------- */
.zw-board-wrap { padding: 1px; }
.zw-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  aspect-ratio: 1 / 1;
  gap: 1px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--zw-line);
  border: 1px solid var(--zw-line);
  box-shadow: 0 3px 16px rgba(18, 24, 48, .07), inset 0 0 0 1px rgba(255, 255, 255, .5);
}
html[data-theme="dark"] .zw-board {
  box-shadow: 0 3px 18px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .03);
}

.zw-pal {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0; min-height: 0;
  padding: 5px 5px 4px;
  overflow: hidden;
  background: var(--paper-2);
  transition: background .16s var(--ease), box-shadow .16s var(--ease);
}
html[data-theme="dark"] .zw-pal { background: #14161d; }
html[data-theme="dark"] .zw-pal.is-sel { background: rgba(122, 140, 255, .14); }
html[data-theme="dark"] .zw-pal.is-sf { background: rgba(122, 140, 255, .11); }
html[data-theme="dark"] .zw-st.is-minor .zw-st-n,
html[data-theme="dark"] .zw-rst.is-minor { color: color-mix(in srgb, var(--ink) 68%, transparent); }
html[data-theme="dark"] .zw-rst.is-lucky { color: color-mix(in srgb, var(--ink) 72%, transparent); }
html[data-theme="dark"] .zw-c-row { color: var(--ink-3); }
html[data-theme="dark"] .zw-c-row b { color: var(--ink-2); }
.zw-pal.is-ming { background: var(--zw-ming); }
.zw-pal.is-dx { background: var(--zw-dx); }
.zw-pal.is-dx::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2.5px;
  background: linear-gradient(180deg, var(--zw-accent-2), #7A5BFF);
  opacity: .75;
}
.zw-pal.is-sf { background: var(--zw-sf); }
.zw-pal.is-sel {
  background: var(--zw-sel);
  box-shadow: inset 0 0 0 1.6px color-mix(in srgb, var(--brand) 62%, transparent);
  z-index: 2;
}
.zw-pal.is-ln::after {
  content: ''; position: absolute; right: 4px; bottom: 4px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--zw-ke); opacity: .65;
}


.zw-pal-hd {
  display: flex; align-items: center; gap: 3px;
  margin-bottom: 1px;
}
.zw-pal-hd b {
  font-size: 10px; font-weight: 700;
  color: var(--ink-2); letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.zw-pal.is-ming .zw-pal-hd b { color: var(--zw-accent); }
.zw-pal.is-sel .zw-pal-hd b { color: var(--zw-accent); }
.zw-tag {
  font-style: normal; font-size: 7px; font-weight: 700;
  padding: 0 2.5px; border-radius: 3px; line-height: 1.35;
  flex: none;
}
.zw-tag.is-ming { color: var(--zw-accent); border: 1px solid color-mix(in srgb, var(--zw-accent) 34%, transparent); }
.zw-tag.is-shen { color: #2F7BB8; border: 1px solid rgba(47, 123, 184, .34); }
html[data-theme="dark"] .zw-tag.is-shen { color: #7FB6E0; border-color: rgba(127, 182, 224, .34); }

.zw-pal-sub {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 8px; color: var(--ink-4);
  letter-spacing: .01em; margin-bottom: 2px;
  line-height: 1.2;
}
.zw-pal-sub em {
  font-style: normal; font-size: 7.5px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-4); opacity: .85;
}
.zw-pal.is-dx .zw-pal-sub em { color: var(--zw-accent); opacity: 1; font-weight: 700; }

.zw-rest {
  margin-top: 2px;
  display: flex; flex-wrap: wrap; gap: 0 4px;
  max-height: 22px; overflow: hidden;
}
.zw-rst {
  font-style: normal; font-size: 8px; line-height: 1.35;
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: .5px;
}
.zw-rst.is-lucky { color: color-mix(in srgb, var(--ink) 60%, transparent); }
.zw-rst.is-sha { color: color-mix(in srgb, var(--zw-ji) 74%, transparent); }
.zw-rst.is-minor { color: color-mix(in srgb, var(--ink) 44%, transparent); }
.zw-rst .zw-hua { font-size: 6.5px; padding: 0 1px; border-radius: 2px; }

.zw-stars {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .5px;
  min-width: 0;
}
.zw-st {
  display: flex; align-items: center; gap: 1px;
  min-width: 0; line-height: 1.28;
}
.zw-st-n {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zw-st.is-major .zw-st-n {
  font-size: 13px; font-weight: 750; letter-spacing: -.02em;
  color: var(--ink);
}
.zw-st.is-lucky .zw-st-n { font-size: 8.5px; color: color-mix(in srgb, var(--ink) 62%, transparent); }
.zw-st.is-sha .zw-st-n { font-size: 8.5px; color: color-mix(in srgb, var(--zw-ji) 72%, transparent); }
.zw-st.is-minor .zw-st-n { font-size: 8px; color: color-mix(in srgb, var(--ink) 46%, transparent); }

.zw-br {
  font-style: normal; font-size: 7.5px; font-weight: 650;
  color: color-mix(in srgb, var(--ink) 44%, transparent);
  margin-left: .5px;
}
.zw-br.is-b { color: color-mix(in srgb, var(--zw-ke) 88%, transparent); }
.zw-br.is-d { color: color-mix(in srgb, var(--ink) 32%, transparent); }

.zw-empty {
  font-size: 8.5px; color: var(--ink-4);
  font-style: italic; opacity: .75;
}

/* 四化小标 */
.zw-hua {
  font-style: normal; font-size: 7.5px; font-weight: 750;
  line-height: 1.3; padding: 0 2px;
  border-radius: 3px; flex: none;
  border: 1px solid transparent;
}
.zw-hua u { text-decoration: none; opacity: .6; font-size: 6.5px; margin-right: .5px; }
.zw-hua.is-lu { color: var(--zw-lu); background: color-mix(in srgb, var(--zw-lu) 10%, transparent); border-color: color-mix(in srgb, var(--zw-lu) 24%, transparent); }
.zw-hua.is-quan { color: var(--zw-quan); background: color-mix(in srgb, var(--zw-quan) 10%, transparent); border-color: color-mix(in srgb, var(--zw-quan) 24%, transparent); }
.zw-hua.is-ke { color: var(--zw-ke); background: color-mix(in srgb, var(--zw-ke) 10%, transparent); border-color: color-mix(in srgb, var(--zw-ke) 24%, transparent); }
.zw-hua.is-ji { color: var(--zw-ji); background: color-mix(in srgb, var(--zw-ji) 10%, transparent); border-color: color-mix(in srgb, var(--zw-ji) 24%, transparent); }
.zw-hua.is-overlay { border-style: dashed; opacity: .9; }

/* 中心 */
.zw-center {
  grid-row: 2 / 4; grid-column: 2 / 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 6px;
  background: var(--paper-2);
  text-align: center;
}
html[data-theme="dark"] .zw-center { background: #14161d; }
.zw-c-seal {
  font-size: 13px; font-weight: 800; letter-spacing: .28em;
  color: var(--zw-accent); opacity: .12;
  margin-right: -.28em; line-height: 1; margin-bottom: 1px;
}
.zw-c-ju {
  font-size: 11px; font-weight: 750; color: var(--ink-2);
  letter-spacing: .02em;
}
.zw-c-row {
  display: flex; align-items: baseline; gap: 5px;
  font-size: 9px; color: var(--ink-4); line-height: 1.4;
}
.zw-c-row b { font-size: 9.5px; color: var(--ink-2); font-weight: 700; }
.zw-c-dx {
  margin-top: 2px; padding: 3px 8px;
  border-radius: 9px;
  background: var(--zw-dx);
  border: 1px solid color-mix(in srgb, var(--zw-accent) 18%, transparent);
  line-height: 1.35;
}
.zw-c-dx i { display: block; font-style: normal; font-size: 7.5px; color: var(--zw-accent); opacity: .8; }
.zw-c-dx b { display: block; font-size: 10.5px; font-weight: 750; color: var(--zw-accent); font-variant-numeric: tabular-nums; }
.zw-c-dx u { display: block; text-decoration: none; font-size: 8px; color: var(--ink-3); }
.zw-c-ming {
  font-size: 8.5px; color: var(--ink-3); margin-top: 1px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 三方四正连线 */
.zw-sf { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.zw-sf line { stroke: color-mix(in srgb, var(--brand) 34%, transparent); }
.zw-sf circle { fill: color-mix(in srgb, var(--brand) 46%, transparent); }

/* 图例 */
.zw-legend {
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  padding: 8px 3px 12px;
}
.zw-legend > .zw-hua { font-size: 9px; padding: 1px 5px; }
.zw-legend span {
  font-size: 9.5px; color: var(--ink-4);
  margin-left: auto;
}

/* ---------------- 摘要 ---------------- */
.zw-sum-hd {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 650; color: var(--ink-3);
  letter-spacing: .06em; margin-bottom: 11px;
}
.zw-sec-ico { color: var(--zw-accent); opacity: .8; font-size: 11px; }
.zw-hd-note {
  margin-left: auto; font-style: normal; font-size: 10px;
  color: var(--ink-4); font-weight: 500; letter-spacing: 0;
}
.zw-sum-top { display: flex; align-items: flex-start; gap: 12px; }
.zw-sum-main { flex: 1; min-width: 0; }
.zw-sum-lab { font-size: 9.5px; color: var(--ink-4); margin-bottom: 3px; }
.zw-sum-stars { display: flex; gap: 6px; flex-wrap: wrap; }
.zw-sum-stars b {
  font-size: 21px; font-weight: 800; letter-spacing: -.02em;
  color: var(--zw-accent); line-height: 1.15;
}
.zw-sum-nature { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.zw-sum-side { text-align: right; flex: none; }
.zw-sum-ju { font-size: 13px; font-weight: 750; color: var(--ink); }
.zw-sum-dx {
  margin-top: 3px; font-size: 10px; color: var(--zw-accent);
  font-variant-numeric: tabular-nums;
}
.zw-kws { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.zw-kws i {
  font-style: normal; font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  color: var(--zw-accent);
  background: color-mix(in srgb, var(--zw-accent) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--zw-accent) 16%, transparent);
}
.zw-sum-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 11px; padding-top: 10px;
  border-top: 1px solid var(--zw-line-2);
  font-size: 10px; color: var(--ink-3);
  line-height: 1.6;
}
.zw-dim { color: var(--ink-4); }

/* ---------------- 四化卡 ---------------- */
.zw-hua-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.zw-hua-cell {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 12px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}
.zw-hua-cell b { font-size: 12px; font-weight: 750; color: var(--ink); }
.zw-hua-cell span { font-size: 10px; color: var(--ink-3); }
.zw-hua-cell i {
  margin-left: auto; font-style: normal; font-size: 10px; font-weight: 750;
}
.zw-hua-cell.is-lu { color: var(--zw-lu); }
.zw-hua-cell.is-quan { color: var(--zw-quan); }
.zw-hua-cell.is-ke { color: var(--zw-ke); }
.zw-hua-cell.is-ji { color: var(--zw-ji); }

/* ---------------- 格局 ---------------- */
.zw-pats { display: flex; flex-direction: column; gap: 8px; }
.zw-pat {
  padding: 10px 11px; border-radius: 13px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line-2);
}
html[data-theme="dark"] .zw-pat { background: rgba(255, 255, 255, .028); }
.zw-pat-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.zw-dot { width: 5px; height: 5px; border-radius: 50%; flex: none; background: var(--ink-4); }
.zw-pat-hd b { font-size: 12px; font-weight: 750; color: var(--ink); }
.zw-pat-hd em {
  font-style: normal; font-size: 9px; font-weight: 650;
  padding: 1px 5px; border-radius: 4px;
  background: color-mix(in srgb, currentColor 9%, transparent);
}
.zw-pat-pl { margin-left: auto; font-size: 9px; color: var(--ink-4); }
.zw-pat p { margin: 0 0 5px 11px; font-size: 11px; line-height: 1.65; color: var(--ink-2); }
.zw-cond {
  margin-left: 11px; font-size: 10px; line-height: 1.6;
  color: var(--ink-3);
}
.zw-cond i {
  font-style: normal; font-weight: 700; font-size: 9.5px;
  color: var(--zw-accent); margin-right: 3px;
}
.zw-cond.is-bonus i { color: var(--zw-lu); }
.zw-cond.is-break i { color: var(--zw-ji); }
.zw-src { margin: 4px 0 0 11px; font-size: 9px; color: var(--ink-4); opacity: .8; }
.zw-empty-p { font-size: 11.5px; line-height: 1.7; color: var(--ink-3); }

.zw-pat.is-excellent .zw-dot { background: var(--zw-ke); }
.zw-pat.is-excellent .zw-pat-hd em { color: var(--zw-ke); }
.zw-pat.is-good .zw-dot { background: var(--zw-quan); }
.zw-pat.is-good .zw-pat-hd em { color: var(--zw-quan); }
.zw-pat.is-neutral .zw-dot { background: var(--ink-4); }
.zw-pat.is-neutral .zw-pat-hd em { color: var(--ink-3); }
.zw-pat.is-caution .zw-dot { background: var(--zw-ji); }
.zw-pat.is-caution .zw-pat-hd em { color: var(--zw-ji); }

/* ---------------- 大限 ---------------- */
.zw-dx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.zw-dx {
  padding: 7px 4px; border-radius: 11px;
  border: 1px solid var(--zw-line-2);
  background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-family: inherit;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.zw-dx b {
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.zw-dx span { font-size: 9.5px; color: var(--ink-4); }
.zw-dx i { font-style: normal; font-size: 8px; color: var(--ink-4); opacity: .7; }
.zw-dx.on {
  background: var(--zw-dx);
  border-color: color-mix(in srgb, var(--zw-accent) 30%, transparent);
}
.zw-dx.on b, .zw-dx.on span { color: var(--zw-accent); }
.zw-dx-si {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 9px; padding-top: 9px;
  border-top: 1px solid var(--zw-line-2);
  font-size: 10px; color: var(--ink-3);
}
.zw-dx-si i { font-style: normal; font-weight: 650; }

/* ---------------- 宫位详情 ---------------- */
.zw-detail { position: relative; }
.zw-d-hd {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 3px;
}
.zw-d-hd > div { display: flex; align-items: baseline; gap: 7px; flex: 1; min-width: 0; }
.zw-d-hd b { font-size: 15.5px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.zw-d-gz { font-size: 11px; color: var(--ink-4); }
.zw-d-close {
  flex: none; height: 26px; padding: 0 10px;
  border-radius: 8px; border: 1px solid var(--zw-line);
  background: transparent; color: var(--ink-3);
  font-size: 11px; font-family: inherit;
}
.zw-d-sub { font-size: 11.5px; color: var(--ink-3); }
.zw-d-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 2px; }
.zw-d-tags i {
  font-style: normal; font-size: 9.5px; padding: 2px 7px;
  border-radius: 6px; color: var(--ink-3);
  background: var(--paper-2);
  border: 1px solid var(--zw-line-2);
}
html[data-theme="dark"] .zw-d-tags i { background: rgba(255, 255, 255, .04); }
.zw-d-empty {
  margin-top: 9px; padding: 9px 11px;
  border-radius: 11px; font-size: 10.5px; line-height: 1.65;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.zw-d-sec {
  display: flex; align-items: center; gap: 6px;
  margin: 12px 0 6px;
  font-size: 10px; font-weight: 650; color: var(--ink-4);
  letter-spacing: .06em;
}
.zw-d-sec em { font-style: normal; color: var(--zw-accent); font-weight: 600; letter-spacing: 0; }
.zw-chip-row { display: flex; flex-wrap: wrap; gap: 5px; }
.zw-chip {
  display: inline-flex; align-items: center; gap: 2px;
  height: 30px; padding: 0 9px;
  border-radius: 10px;
  border: 1px solid var(--zw-line-2);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 12px; font-weight: 650; font-family: inherit;
}
html[data-theme="dark"] .zw-chip { background: rgba(255, 255, 255, .04); }
.zw-chip em {
  font-style: normal; font-size: 9px; font-weight: 600;
  color: var(--ink-4); margin-left: 1px;
}
.zw-chip.is-major { font-size: 13px; font-weight: 750; color: var(--ink); border-color: color-mix(in srgb, var(--zw-accent) 22%, transparent); }
.zw-chip.is-sha { color: var(--zw-ji); }
.zw-chip.is-minor { color: var(--ink-3); font-weight: 500; font-size: 11.5px; }
.zw-chip:active { transform: scale(.97); }

.zw-fly { display: flex; flex-direction: column; gap: 4px; }
.zw-fly-row {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; color: var(--ink-3);
  padding: 5px 9px; border-radius: 9px;
  background: var(--paper-2);
}
html[data-theme="dark"] .zw-fly-row { background: rgba(255, 255, 255, .028); }
.zw-fly-row b { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.zw-fly-row span { color: var(--ink-4); }
.zw-fly-row em {
  margin-left: auto; font-style: normal; font-size: 9px; font-weight: 650;
  color: var(--zw-accent);
  padding: 1px 5px; border-radius: 4px;
  background: color-mix(in srgb, var(--zw-accent) 10%, transparent);
}

.zw-ov-hits {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  font-size: 10.5px; color: var(--ink-3);
}
.zw-ov-hits .zw-hua { font-size: 10px; padding: 1px 5px; }
.zw-ov-hits > span { font-size: 10.5px; color: var(--ink-4); }
.zw-ov-hits > em {
  flex-basis: 100%; font-style: normal;
  font-size: 10px; color: var(--ink-4); line-height: 1.6;
}

.zw-sf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.zw-sf-cell {
  padding: 7px 8px; border-radius: 10px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line-2);
  display: flex; flex-direction: column; gap: 1px;
  min-width: 0;
}
html[data-theme="dark"] .zw-sf-cell { background: rgba(255, 255, 255, .028); }
.zw-sf-cell b { font-size: 10.5px; font-weight: 700; color: var(--ink-2); }
.zw-sf-cell span { font-size: 8.5px; color: var(--ink-4); }
.zw-sf-cell i {
  font-style: normal; font-size: 9.5px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zw-d-note {
  margin-top: 11px; padding: 9px 11px;
  border-radius: 11px; font-size: 10px; line-height: 1.65;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--zw-accent) 5%, transparent);
}

/* ---------------- 星曜详情（Sheet 内） ---------------- */
.zw-star-sheet { padding-bottom: 6px; }
.zw-sh-hd {
  display: flex; align-items: baseline; gap: 9px;
  margin-bottom: 12px;
}
.zw-sh-hd b { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: .02em; }
.zw-sh-hd span { font-size: 11px; color: var(--ink-3); }
.zw-sh-kw { font-size: 11.5px; color: var(--ink-3); margin-bottom: 10px; }
.zw-sh-sec { margin-bottom: 14px; }
.zw-sh-t {
  font-size: 10px; font-weight: 700; color: var(--zw-accent);
  letter-spacing: .1em; margin-bottom: 5px;
}
.zw-sh-sec p {
  margin: 0; font-size: 12.5px; line-height: 1.85;
  color: var(--ink-2); letter-spacing: .01em;
}
.zw-sh-sec.is-quote p {
  padding: 10px 12px; border-radius: 11px;
  background: color-mix(in srgb, var(--zw-ke) 6%, transparent);
  border-left: 2px solid color-mix(in srgb, var(--zw-ke) 40%, transparent);
  font-size: 12px; color: var(--ink-2);
}
.zw-d-pos {
  display: flex; align-items: baseline; gap: 8px;
  padding: 8px 10px; margin-bottom: 4px;
  border-radius: 10px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line-2);
}
html[data-theme="dark"] .zw-d-pos { background: rgba(255, 255, 255, .03); }
.zw-d-pos b { font-size: 12px; font-weight: 700; color: var(--ink); flex: none; }
.zw-d-pos span { font-size: 10px; color: var(--ink-4); flex: none; }
.zw-d-pos i { font-style: normal; font-size: 10.5px; color: var(--ink-3); flex: 1; min-width: 0; }
.zw-d-pos em { font-style: normal; flex: none; }

.zw-sh-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.zw-sh-two > div {
  padding: 9px 11px; border-radius: 11px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line-2);
}
html[data-theme="dark"] .zw-sh-two > div { background: rgba(255, 255, 255, .035); }
.zw-sh-two i {
  display: block; font-style: normal; font-size: 9px;
  color: var(--ink-4); margin-bottom: 2px;
}
.zw-sh-two span { font-size: 11px; color: var(--ink-2); line-height: 1.5; }

/* ---------------- 历史 ---------------- */
.zw-hist { display: flex; flex-direction: column; gap: 2px; }
.zw-hist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px; border-radius: 12px;
  border: 0; background: transparent; font-family: inherit;
  text-align: left;
}
.zw-hist-row:active { background: var(--paper-2); }
.zw-hist-row b { font-size: 13px; font-weight: 700; color: var(--ink); flex: none; }
.zw-hist-row span {
  flex: 1; min-width: 0; font-size: 11px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.zw-hist-row i { font-style: normal; font-size: 10px; color: var(--ink-4); flex: none; }

/* =====================================================================
   星曜库
   ===================================================================== */
.zw-search { margin-bottom: 12px; }
.zw-search input {
  width: 100%; height: 44px; padding: 0 15px;
  border-radius: 14px;
  border: 1px solid var(--zw-line);
  background: var(--paper-2);
  color: var(--ink); font-size: 13.5px; font-family: inherit;
  outline: 0;
}
html[data-theme="dark"] .zw-search input { background: rgba(255, 255, 255, .04); }
.zw-search input:focus {
  border-color: color-mix(in srgb, var(--brand) 46%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 11%, transparent);
}

.zw-star-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.zw-star-card {
  padding: 11px 4px 9px;
  border-radius: 13px;
  border: 1px solid var(--zw-line-2);
  background: var(--paper-2);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: inherit;
  transition: transform .14s var(--ease), background .16s var(--ease);
}
html[data-theme="dark"] .zw-star-card { background: rgba(255, 255, 255, .035); }
.zw-star-card:active { transform: scale(.96); }
.zw-star-card b {
  font-size: 15px; font-weight: 800; color: var(--ink);
  letter-spacing: .01em;
}
.zw-star-card i {
  font-style: normal; font-size: 8.5px; color: var(--ink-4);
  text-align: center; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.zw-star-card em {
  font-style: normal; font-size: 8px; color: var(--zw-accent);
  opacity: .75;
}

.zw-aux-g {
  margin: 12px 0 6px;
  font-size: 10px; font-weight: 650; color: var(--ink-4);
  letter-spacing: .08em;
}
.zw-aux-list { display: flex; flex-direction: column; gap: 1px; }
.zw-aux {
  display: flex; align-items: baseline; gap: 9px;
  padding: 9px 10px; border-radius: 10px;
  border: 0; border-bottom: 1px solid var(--zw-line-2);
  background: transparent; font-family: inherit;
  text-align: left;
}
.zw-aux:last-child { border-bottom: 0; }
.zw-aux:active { background: var(--paper-2); }
.zw-aux b { font-size: 13px; font-weight: 700; color: var(--ink); flex: none; }
.zw-aux span { font-size: 10.5px; color: var(--ink-3); line-height: 1.5; }

/* =====================================================================
   古籍库
   ===================================================================== */
.zw-book {
  display: block; width: 100%; text-align: left;
  padding: 16px 15px; margin-bottom: 9px;
  border-radius: 17px;
  border: 1px solid var(--glass-line-soft);
  background: var(--glass-surface);
  box-shadow: var(--sh-1), var(--rim);
  font-family: inherit;
}
html[data-theme="dark"] .zw-book {
  background: rgba(255, 255, 255, .045);
  border-color: rgba(255, 255, 255, .07);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}
.zw-book:active { transform: scale(.99); }
.zw-book-meta { font-size: 10px; color: var(--ink-4); letter-spacing: .1em; margin-bottom: 4px; }
.zw-book-t {
  font-size: 18px; font-weight: 800; color: var(--ink);
  letter-spacing: .04em; margin-bottom: 7px;
}
.zw-book-i { font-size: 11.5px; line-height: 1.7; color: var(--ink-3); margin-bottom: 10px; }
.zw-book-n {
  display: flex; align-items: center; gap: 12px;
  font-size: 10.5px; color: var(--ink-4);
}
.zw-book-n i {
  margin-left: auto; font-style: normal;
  color: var(--zw-accent); font-weight: 650;
}

.zw-crumb {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.zw-crumb button {
  height: 30px; padding: 0 11px; border-radius: 9px;
  border: 1px solid var(--zw-line);
  background: var(--paper-2); color: var(--ink-2);
  font-size: 11.5px; font-family: inherit;
}
.zw-crumb span {
  font-size: 11.5px; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.zw-chapters { display: flex; flex-direction: column; gap: 6px; }
.zw-chap {
  display: flex; align-items: baseline; gap: 9px;
  padding: 13px 14px; border-radius: 13px;
  border: 1px solid var(--zw-line-2);
  background: var(--paper-2);
  font-family: inherit; text-align: left;
}
html[data-theme="dark"] .zw-chap { background: rgba(255, 255, 255, .035); }
.zw-chap b { font-size: 13px; font-weight: 700; color: var(--ink); }
.zw-chap span { font-size: 10.5px; color: var(--ink-4); flex: 1; min-width: 0; }
.zw-chap i { font-style: normal; font-size: 10px; color: var(--ink-4); flex: none; }

.zw-paras { display: flex; flex-direction: column; gap: 9px; }
.zw-para {
  display: flex; gap: 10px;
  padding: 13px 14px; border-radius: 13px;
  background: var(--paper-2);
  border: 1px solid var(--zw-line-2);
}
html[data-theme="dark"] .zw-para { background: rgba(255, 255, 255, .03); }
.zw-para > i {
  font-style: normal; font-size: 9.5px; color: var(--ink-4);
  flex: none; padding-top: 3px; min-width: 14px;
}
.zw-para p {
  margin: 0; font-size: 13px; line-height: 1.95;
  color: var(--ink-2); letter-spacing: .03em;
  font-family: "Songti SC", "STSong", serif;
}

.zw-hits { display: flex; flex-direction: column; gap: 7px; }
.zw-hit {
  display: block; width: 100%; text-align: left;
  padding: 11px 13px; border-radius: 12px;
  border: 1px solid var(--zw-line-2);
  background: var(--paper-2);
  font-family: inherit;
}
html[data-theme="dark"] .zw-hit { background: rgba(255, 255, 255, .03); }
.zw-hit-meta { font-size: 9.5px; color: var(--ink-4); margin-bottom: 4px; }
.zw-hit-t { font-size: 12px; line-height: 1.8; color: var(--ink-2); }
.zw-hit-t mark {
  background: color-mix(in srgb, var(--zw-ke) 26%, transparent);
  color: var(--ink); border-radius: 3px; padding: 0 1px;
}

/* =====================================================================
   合盘
   ===================================================================== */
.zw-he-card { padding: 13px; }
.zw-he-hd { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.zw-he-hd b { font-size: 13px; font-weight: 750; color: var(--ink); }
.zw-he-hd i { font-style: normal; font-size: 10px; color: var(--ink-4); }
.zw-he-out { margin-top: 14px; }
.zw-he-rel {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: 13px;
  background: color-mix(in srgb, var(--zw-accent) 7%, transparent);
  border: 1px solid color-mix(in srgb, var(--zw-accent) 16%, transparent);
  margin-bottom: 12px;
}
.zw-he-rel b { font-size: 16px; font-weight: 800; color: var(--zw-accent); flex: none; }
.zw-he-rel span { font-size: 11px; line-height: 1.6; color: var(--ink-2); }
.zw-he-pair { display: flex; align-items: center; gap: 8px; }
.zw-he-pair > div { flex: 1; text-align: center; }
.zw-he-pair i {
  display: block; font-style: normal; font-size: 9.5px;
  color: var(--ink-4); margin-bottom: 2px;
}
.zw-he-pair b {
  display: block; font-size: 17px; font-weight: 800;
  color: var(--ink); line-height: 1.2;
}
.zw-he-pair em {
  display: block; font-style: normal; font-size: 10.5px;
  color: var(--ink-3); margin-top: 1px;
}
.zw-he-pair u {
  display: block; text-decoration: none; font-size: 9px;
  color: var(--ink-4); margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.zw-he-jn { flex: none !important; color: var(--ink-4); font-size: 16px; }

.zw-he-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--zw-line-2);
}
.zw-he-row:last-child { border-bottom: 0; }
.zw-he-row b { font-size: 10.5px; font-weight: 650; color: var(--ink-4); flex: none; }
.zw-he-row span { font-size: 12px; color: var(--ink); font-weight: 650; }
.zw-he-row em {
  flex-basis: 100%; font-style: normal;
  font-size: 10.5px; line-height: 1.6; color: var(--ink-3);
}
.zw-he-blab {
  font-size: 11px; font-weight: 700; color: var(--ink-2);
  margin-bottom: 7px; letter-spacing: .04em;
}
.zw-he-hua { display: flex; flex-direction: column; gap: 8px; }
.zw-he-hua > div { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.zw-he-hua > div > i:first-child {
  font-style: normal; font-size: 10.5px; color: var(--ink-4);
  min-width: 44px;
}
.zw-he-hua .zw-hua { font-size: 9.5px; padding: 2px 5px; }

/* 缩略盘 */
.zw-board.is-mini {
  grid-template-rows: repeat(4, minmax(52px, auto));
  border-radius: 14px;
}
.zw-board.is-mini .zw-pal { padding: 3px 4px; min-height: 52px; }
.zw-board.is-mini .zw-pal-hd { padding-right: 0; margin-bottom: 0; }
.zw-board.is-mini .zw-pal-hd b { font-size: 8.5px; color: var(--ink-3); }
.zw-board.is-mini .zw-pal.is-ming .zw-pal-hd b { color: var(--zw-accent); }
.zw-pal.is-sel .zw-pal-hd b { color: var(--zw-accent); }
.zw-mini-st {
  font-size: 9.5px; line-height: 1.35; color: var(--ink-2);
  font-weight: 650; letter-spacing: -.02em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zw-board.is-mini .zw-center { gap: 1px; padding: 4px; }
.zw-board.is-mini .zw-c-ju { font-size: 9px; }
.zw-board.is-mini .zw-c-row { font-size: 7.5px; gap: 3px; }
.zw-board.is-mini .zw-c-row b { font-size: 8px; }

/* =====================================================================
   AI 解读
   ===================================================================== */
.zw-ai-topics { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 11px; }
.zw-ai-t {
  height: 28px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--zw-line);
  background: var(--paper-2);
  color: var(--ink-2);
  font-size: 11.5px; font-weight: 600; font-family: inherit;
}
html[data-theme="dark"] .zw-ai-t { background: rgba(255, 255, 255, .04); }
.zw-ai-t:active { background: var(--zw-sel); color: var(--zw-accent); }
.zw-ai-note {
  padding: 10px 12px; margin-bottom: 11px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--zw-ke) 7%, transparent);
  font-size: 10.5px; line-height: 1.7; color: var(--ink-2);
}
.zw-ai-line {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--zw-line-2);
}
.zw-ai-line:last-child { border-bottom: 0; }
.zw-ai-line b {
  flex: none; width: 60px;
  font-size: 10px; font-weight: 650; color: var(--ink-4);
}
.zw-ai-line span { font-size: 11.5px; line-height: 1.65; color: var(--ink-2); }
.zw-ai-ask {
  display: flex; gap: 7px; margin-top: 11px;
}
.zw-ai-ask input {
  flex: 1; min-width: 0; height: 40px; padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--zw-line);
  background: var(--paper-2);
  color: var(--ink); font-size: 12.5px; font-family: inherit;
  outline: 0;
}
html[data-theme="dark"] .zw-ai-ask input { background: rgba(255, 255, 255, .04); }
.zw-ai-ask button {
  flex: none; width: 52px; height: 40px;
  border: 0; border-radius: 12px;
  background: var(--brand-grad); color: #fff;
  font-size: 13px; font-weight: 700; font-family: inherit;
}
.zw-ai-loading {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 2px; font-size: 12px; color: var(--ink-3);
}
.zw-ai-answer p {
  margin: 0; font-size: 12.5px; line-height: 1.9; color: var(--ink-2);
}
.zw-ai-answer b { font-weight: 700; color: var(--ink); }
.zw-ai-h {
  margin: 14px 0 4px;
  font-size: 11px; font-weight: 750; color: var(--zw-accent);
  letter-spacing: .04em;
}
.zw-ai-answer .zw-ai-h:first-child { margin-top: 0; }
.zw-ai-gap { height: 5px; }
.zw-ai-foot { margin-top: 13px; font-size: 9.5px; color: var(--ink-4); }
.zw-ai-err {
  padding: 12px; border-radius: 11px;
  background: color-mix(in srgb, var(--zw-ji) 7%, transparent);
  font-size: 11.5px; line-height: 1.7; color: var(--ink-2);
}
.zw-ai-err span { font-size: 10.5px; color: var(--ink-3); }

/* =====================================================================
   分享图
   ===================================================================== */
.zw-share img { width: 100%; border-radius: 14px; display: block; }
.zw-share-save {
  width: 100%; height: 46px; border: 0; border-radius: 14px;
  background: var(--brand-grad); color: #fff;
  font-size: 14px; font-weight: 750; font-family: inherit;
}

/* =====================================================================
   小屏
   ===================================================================== */
@media (max-width: 360px) {
  .zw-pal { padding: 4px 4px 3px; }
  .zw-st.is-major .zw-st-n { font-size: 11px; }
  .zw-pal-hd b { font-size: 9.5px; }
  .zw-sum-stars b { font-size: 19px; }
  .zw-star-grid { grid-template-columns: repeat(3, 1fr); }
}
