
/* ═══════════ 渊海排盘 · 新中式暗金 ═══════════ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }


:root {
  --bg: #0b0e16;
  --bg2: #10141f;
  --card: #141926;
  --card2: #1a2130;
  --line: #232c42;
  --ink: #e8ecf2;
  --ink-dim: #8fa2c8;
  --ink-faint: #7a89a5;   /* 对比度 5.0:1（原 #5f6d8c 仅 3.4:1 不达标） */
  --muted: #8492ad;       /* 补充定义（此前未定义，全部回落亮色）· 对比度 5.6:1 */
  --gold: #e8c86a;
  --gold-dim: #a38b45;
  --red: #c8453c;
  --wx-mu: #3f9e63; --wx-huo: #d4544a; --wx-tu: #c08a3e; --wx-jin: #d9b84a; --wx-shui: #4a8fd9;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: system-ui, -apple-system, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

html { font-size: 15px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;          /* 兜底：禁止body横滚撑破画布 */
  background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(232,200,106,.06), transparent);
}

/* ─── 返回门户 ─── */
.back-bar { padding: 12px 16px 0; }
.back-bar a { color: var(--ink-dim); text-decoration: none; font-size: 13px; letter-spacing: 1px; }
.back-bar a:hover { color: var(--gold); }

.hidden { display: none !important; }

/* ─── 顶栏 ─── */
.topbar { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.topbar-title { font-family: var(--serif); font-size: 20px; letter-spacing: 5px; color: var(--gold); }

/* ─── 录入卡 ─── */
.input-card {
  margin: 16px; padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.input-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.input-row label { width: 110px; flex: 0 0 110px; font-size: 13px; color: var(--ink-dim); letter-spacing: 1px; }
.input-row input {
  flex: 1; min-width: 0; padding: 10px 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-size: 14px; font-family: var(--sans);
  color-scheme: dark;
}
.input-row input:focus { outline: none; border-color: var(--gold-dim); }
.input-row textarea { flex: 1; min-width: 0; min-height: 76px; resize: vertical; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: 13px/1.65 var(--sans); }
.input-row textarea:focus { outline: none; border-color: var(--gold-dim); }
/* select 显式控制宽度：min-width:0 让 flex 可压缩，text-overflow 防内容撑破 */
.input-row select {
  flex: 1; min-width: 0; max-width: 100%;
  padding: 10px 12px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-size: 14px; font-family: var(--sans);
  color-scheme: dark;
  text-overflow: ellipsis;
}
.input-row select:focus { outline: none; border-color: var(--gold-dim); }
/* 行容器也加 min-width:0，阻止子项把容器撑大 */
.input-row { min-width: 0; }

.seg { display: flex; flex: 1; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-btn {
  flex: 1; padding: 10px 0; background: none; border: none;
  color: var(--ink-dim); font-size: 14px; cursor: pointer; font-family: var(--sans);
  transition: all .15s;
}
.seg-btn.active { background: var(--gold); color: #17130a; font-weight: 600; }

.input-actions { display: flex; gap: 10px; margin-top: 4px; }
.btn-primary {
  flex: 1; padding: 13px 0;
  background: linear-gradient(160deg, #d5b16a, #b08c45);
  border: none; border-radius: 8px;
  color: #17130a; font-size: 16px; font-weight: 700; letter-spacing: 6px;
  cursor: pointer; font-family: var(--serif);
  box-shadow: 0 3px 14px rgba(201,164,92,.25);
  transition: transform .16s ease, box-shadow .2s ease, filter .16s ease;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 5px 18px rgba(201,164,92,.35); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(1px); filter: brightness(.97); }
.btn-ghost {
  padding: 13px 18px; background: none;
  border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink-dim); font-size: 14px; cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
.btn-ghost:hover { border-color: var(--gold-dim); color: var(--gold); background: rgba(212,175,55,.06); }
.btn-ghost:active { transform: translateY(1px); }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.input-note { margin-top: 12px; font-size: 11px; color: var(--ink-faint); letter-spacing: .5px; }

/* ─── 命造头 ─── */
.chart-head {
  margin: 16px 16px 0; padding: 14px 16px;
  background: linear-gradient(135deg, #1d232d, #171c24);
  border: 1px solid var(--line); border-radius: 12px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.chart-head .ch-name { font-family: var(--serif); font-size: 17px; color: var(--gold); letter-spacing: 2px; }
.chart-head .ch-info { font-size: 12.5px; color: var(--ink-dim); line-height: 1.7; text-align: right; word-break: break-word; overflow-wrap: anywhere; }
.chart-head .ch-info b { color: var(--ink); font-weight: 500; }

/* ─── Tabs ─── */
.tabs-secondary { display: contents; }
.tabs-mobile-control { display: none; }
.tabs-icon { display:none; }


.tabs {
  display: flex; margin: 14px 16px 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tab {
  flex: 1; padding: 12px 0; background: none; border: none;
  color: var(--ink-dim); font-size: 15px; letter-spacing: 2px; cursor: pointer;
  font-family: var(--serif); transition: all .15s; text-align: center;
}
.tab:hover { color: var(--ink); background: rgba(255,255,255,.02); }
.tab.active { background: var(--card2); color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); }

.tabpage { padding: 14px 16px 24px; }

/* 防止移动端页面整体左右晃动（横向溢出） */
html, body { overflow-x: hidden; max-width: 100%; }
body { position: relative; }

/* ─── 命盘大表（缩小适配，不横滚） ─── */
.pan-scroll { border-radius: 12px; max-width: 100%; }
.pan-table {
  width: 100%; border-collapse: collapse;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  font-size: 12px; table-layout: fixed;
}
.pan-table th, .pan-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 6px 2px; text-align: center; vertical-align: middle;
  word-break: break-all; overflow-wrap: anywhere;
}
.pan-table th:last-child, .pan-table td:last-child { border-right: none; }
.pan-table tr:last-child td { border-bottom: none; }
.pan-table .row-label {
  width: 38px; min-width: 38px; background: var(--bg2); color: var(--ink-dim);
  font-size: 10px; letter-spacing: 1px;
  /* 窄列竖排：长标签"古经·次级古籍 / 杂煞·民间关煞"一字一行，与右侧 chip 列对齐 */
  writing-mode: vertical-rl; text-orientation: upright;
  white-space: nowrap; line-height: 1.5;
  text-align: center; vertical-align: middle;
  word-break: keep-all; overflow-wrap: normal;
}
.pan-table .col-head { background: var(--bg2); color: var(--gold); font-family: var(--serif); font-size: 12px; letter-spacing: 1px; padding: 8px 2px; }
.pan-table .ss { font-size: 11px; color: var(--ink-dim); }
.pan-table .ss.day-master { color: var(--red); font-weight: 700; }
.pan-table .gan-big, .pan-table .zhi-big {
  font-family: var(--serif); font-size: 26px; font-weight: 700; line-height: 1.2;
}
.pan-table .cang { font-size: 11px; line-height: 1.7; }
.pan-table .cang .cang-ss { font-size: 9px; color: var(--ink-faint); margin-left: 1px; }
.pan-table .small { font-size: 10.5px; color: var(--ink-dim); line-height: 1.5; }

/* 五行着色 */
.wx-木 { color: var(--wx-mu); } .wx-火 { color: var(--wx-huo); }
.wx-土 { color: var(--wx-tu); } .wx-金 { color: var(--wx-jin); }
.wx-水 { color: var(--wx-shui); }

/* 神煞标签 */
.ss-tags { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ss-tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-family: inherit; font-size: 11.5px; line-height: 1.5; cursor: pointer; border: 1px solid transparent;
  transition: all .12s; white-space: nowrap;
}
.ss-tag:hover { transform: scale(1.06); }
.ss-tag.luck-吉, .ss-tag.luck-大吉 { color: #e8c87e; border-color: rgba(201,164,92,.45); background: rgba(201,164,92,.1); }
.ss-tag.luck-凶 { color: #e88a82; border-color: rgba(200,69,60,.45); background: rgba(200,69,60,.1); }
.ss-tag.luck-中 { color: #a8b6c8; border-color: rgba(120,140,165,.4); background: rgba(120,140,165,.1); }
.ss-tag.is-extra { opacity: .82; border-style: dashed; border-color: rgba(160,120,120,.4); color: #c0a0a0; background: rgba(160,120,120,.08); }
/* 民间关煞——级别小徽章 */
.ss-lv { display: inline-block; font-size: 9px; padding: 0 4px; margin-left: 3px; border-radius: 8px; letter-spacing: 0; font-weight: 700; vertical-align: middle; line-height: 14px; }
.ss-lv-重 { background: rgba(200,69,60,.85); color: #fff5e8; }
.ss-lv-中 { background: rgba(180,150,80,.75); color: #fff5e8; }
.ss-lv-轻 { background: rgba(120,140,165,.55); color: #f0f0f0; }
/* 隐藏项提示 */
.ss-hidden-hint { display: inline-block; font-size: 10px; color: var(--muted); padding: 2px 6px; border: 1px dashed rgba(160,140,110,.4); border-radius: 10px; background: rgba(160,140,110,.06); cursor: help; }
.ss-sec-note { font-size: 10px; color: var(--muted); margin-left: 8px; font-weight: 400; }
.ss-tag.is-middle { opacity: .92; border-style: double; border-width: 2px; border-color: rgba(140,130,180,.5); color: #b0a8d0; background: rgba(140,130,180,.1); }
.ss-sec-label { font-size: 11px; color: var(--muted); margin: 8px 0 4px; letter-spacing: 1px; }
.row-sub { font-size: 10px; color: var(--muted); font-weight: normal; }
.ss-middle-row.hidden, .ss-extra-row.hidden { display: none !important; }
.ss-collapsed-hint { font-size: 11px; color: var(--muted); padding: 6px 10px; border: 1px dashed rgba(184,150,90,.3); border-radius: 6px; background: rgba(184,150,90,.05); display: inline-block; }

/* Compact category disclosures share a single row, with a full 44px tap target. */
.ss-toolbar { display:flex; gap:8px; margin-bottom:10px; }
.ss-disclosure {
  display:flex; align-items:center; gap:8px; flex:1; min-width:0; min-height:44px;
  padding:0 10px; border:1px solid var(--line); border-radius:9px;
  background:rgba(255,255,255,.025); color:var(--ink-dim); font:inherit;
  cursor:pointer; text-align:left; touch-action:manipulation;
}
.ss-disclosure:hover { background:rgba(255,255,255,.05); color:var(--ink); }
.ss-disclosure:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.ss-toolbar-label { flex:1; min-width:0; font-size:12px; line-height:1.4; }
.ss-toolbar-count { flex:none; color:var(--ink-dim); font-size:11px; font-variant-numeric:tabular-nums; }
.ss-disclosure-chevron { width:13px; height:13px; flex:none; opacity:.7; transition:transform 150ms ease; }
.ss-disclosure[aria-expanded="true"] .ss-disclosure-chevron { transform:rotate(180deg); }
.ss-disclosure[aria-expanded="true"] { color:var(--ink); }
@media(max-width:640px) { .ss-toolbar-detail { display:none; } }
@media(prefers-reduced-motion:reduce) { .ss-disclosure-chevron { transition:none; } }

/* ─── 卡片 ─── */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; margin-bottom: 16px; overflow: hidden; min-width: 0; max-width: 100%;
}
.card-title {
  font-family: var(--serif); font-size: 15px; color: var(--gold);
  letter-spacing: 3px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.card-title::before { content: ""; width: 3px; height: 14px; background: var(--gold); border-radius: 2px; }
.card-title .src { font-size: 10px; color: var(--ink-faint); letter-spacing: 1px; font-family: var(--sans); margin-left: auto; }
.card-title-label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.card-help-btn {
  position: relative; z-index: 2; flex: 0 0 auto; width: 32px; height: 32px; margin: -7px 0 -7px 0;
  border: 1px solid rgba(232,200,106,.48); border-radius: 50%;
  background: rgba(201,164,92,.055); color: var(--gold); cursor: pointer;
  font: 600 13px/1 var(--sans); letter-spacing: 0; touch-action: manipulation;
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}
.card-help-btn::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.card-help-btn span { pointer-events: none; }
.card-help-btn:hover { color: var(--gold-bright); border-color: var(--gold); background: rgba(201,164,92,.14); }
.card-help-btn:active { transform: scale(.94); }
.card-help-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* 基本页 */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 13px; }
.info-grid .k { color: var(--ink-faint); }
.info-grid .v { color: var(--ink); }
.info-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.info-line:last-child { border-bottom: none; }
.info-line .k { color: var(--ink-dim); flex: 0 0 auto; }
.info-line .v { font-family: var(--serif); letter-spacing: 1px; flex: 1 1 auto; min-width: 0; text-align: right; word-break: break-word; overflow-wrap: anywhere; }

/* 基本页的“结果优先、过程按需查看”：原生 details 保留键盘与触屏语义。 */
.compact-reference-card { padding: 0; overflow: visible; }
.info-disclosure { display: block; }
.info-disclosure > summary {
  min-height:52px; padding:14px 16px; cursor:pointer; list-style:none;
  display:grid; grid-template-columns:minmax(0,1fr) 18px; align-items:center; gap:2px 12px;
  color:var(--gold); font:500 14px/1.5 var(--sans); letter-spacing:0;
  position:relative; touch-action:manipulation; transition:background .16s ease;
}
.info-disclosure > summary::-webkit-details-marker { display:none; }
.info-disclosure > summary::after { content:'›'; grid-column:2; grid-row:1 / span 2; justify-self:end; color:var(--ink-dim); font:22px/1 var(--sans); transform:rotate(0deg); transition:transform .18s ease; }
.info-disclosure[open] > summary { border-bottom:1px solid var(--line); }
.info-disclosure[open] > summary::after { transform:rotate(90deg); }
.info-disclosure > summary:hover { background:rgba(201,164,92,.035); }
.info-disclosure > summary:focus-visible { outline:2px solid var(--gold); outline-offset:-2px; border-radius:10px; }
.info-disclosure-label { grid-column:1; min-width:0; word-break:normal; overflow-wrap:normal; }
.info-disclosure-hint { grid-column:1; margin:0; max-width:none; color:var(--ink-faint); font:12px/1.5 var(--sans); letter-spacing:0; text-align:left; }
.info-disclosure-body { padding: 16px; }
.info-disclosure-body .algo-block { padding: 0; }
.info-disclosure-body .sym-grid, .info-disclosure-body .xiu-grid { margin: 0; }

/* 格局行 */
.gj-line { background: linear-gradient(to right, rgba(120,200,200,.05), transparent 60%); border-radius: 2px; padding: 7px 8px; margin: 2px -8px; }
.gj-main { color: #7fc6c0; font-size: 14.5px; letter-spacing: 2px; font-weight: 600; }
.gj-tg { color: var(--gold); }
.gj-special { color: var(--gold); letter-spacing: 1px; padding-left: 4px; }
.gj-special::before { content: '★'; margin-right: 3px; color: var(--gold-bright); }

/* 五行条 */
.wx-bars { display: flex; flex-direction: column; gap: 10px; }
.wx-bar-row { display: flex; align-items: center; gap: 10px; }
.wx-bar-name { width: 30px; font-family: var(--serif); font-size: 15px; font-weight: 700; }
.wx-bar-state { width: 26px; font-size: 11px; color: var(--ink-faint); }
.wx-bar-track { flex: 1; height: 10px; background: var(--bg2); border-radius: 5px; overflow: hidden; }
.wx-bar-fill { height: 100%; border-radius: 5px; }
.wx-bar-num { width: 66px; font-size: 11.5px; color: var(--ink-dim); text-align: right; }
.wx-bar-sub { margin: -4px 0 2px 76px; font-size: 10.5px; color: var(--ink-faint); letter-spacing: .5px; line-height: 1.7; word-break: break-word; overflow-wrap: anywhere; }
.wx-ss-item { display: inline-block; font-family: 'Courier New', monospace; color: var(--ink-dim); }
.wx-ss-item.is-zero { opacity: .35; font-style: italic; }
.wx-bar-empty { color: var(--ink-faint); font-style: italic; opacity: .6; }

/* ─── 纳音体系 ─── */
.ny-master { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ny-master-label { font-size: 11px; color: var(--ink-faint); letter-spacing: 2px; }
.ny-master-name { font-family: var(--serif); font-size: 24px; font-weight: 700; letter-spacing: 3px; }
.ny-master-tag { font-size: 11px; color: var(--gold); border: 1px solid var(--gold-dim); border-radius: 20px; padding: 2px 10px; }
.ny-desc { font-size: 12.5px; color: var(--ink-dim); line-height: 2; margin-bottom: 14px; word-break: break-word; overflow-wrap: anywhere; }
.ny-table { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
button.ny-cell { appearance:none; color:inherit; font:inherit; min-width:0; }
button.ny-cell > span { display:block; }
.ny-cell { background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 4px; text-align: center; }
.ny-cell.clk2 { cursor: pointer; transition: transform .15s ease; }
.ny-cell.clk2:hover { transform: translateY(-2px); border-color: var(--gold-dim); }
.ny-p { font-size: 10px; color: var(--ink-faint); }
.ny-gz { font-family: var(--serif); font-size: 16px; font-weight: 700; margin: 2px 0; }
.ny-ny { font-size: 11.5px; font-family: var(--serif); letter-spacing: 1px; }
.ny-verdict { font-size: 12.5px; color: var(--ink); line-height: 2; padding: 10px 12px; background: rgba(201,164,92,.06); border-radius: 8px; word-break: break-word; overflow-wrap: anywhere; }

/* 强弱仪 */
.strength-wrap { display: flex; align-items: center; gap: 16px; }
.strength-dial {
  position: relative;
  width: 92px; height: 92px; border-radius: 50%; flex: 0 0 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--st-color, var(--gold)) calc(var(--pct, 0) * 1%), rgba(255,255,255,.07) 0);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  animation: dial-pop .5s cubic-bezier(.22,.9,.26,1) backwards;
}
.strength-dial::before {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  background: var(--card);
}
.strength-dial .pct { position: relative; font-size: 22px; font-weight: 700; font-family: var(--serif); color: var(--st-color, var(--gold)); line-height: 1.1; }
.strength-dial .lbl { position: relative; font-size: 12px; color: var(--ink-dim); margin-top: 2px; }
@keyframes dial-pop { from { transform: scale(.86); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .strength-dial { animation: none; } }
.strength-desc { flex: 1; font-size: 12.5px; color: var(--ink-dim); line-height: 1.9; word-break: break-word; overflow-wrap: anywhere; }
.strength-desc b { color: var(--ink); }

/* 通根（得地）对照卡片 */
.tg-card { }
.tg-wrap { display: flex; flex-direction: column; gap: 12px; }
.tg-dial {
  position: relative;
  width: 78px; height: 78px; border-radius: 50%; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: conic-gradient(var(--tg-color, #9bd09b) calc(var(--pct, 0) * 1%), rgba(255,255,255,.07) 0);
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  animation: dial-pop .5s cubic-bezier(.22,.9,.26,1) .08s backwards;
}
.tg-dial::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--card); }
.tg-dial .pct { position: relative; font-size: 22px; font-weight: 700; font-family: var(--serif); color: var(--tg-color, #9bd09b); line-height: 1.1; }
.tg-dial .lbl { position: relative; font-size: 12px; color: var(--ink-dim); margin-top: 2px; }
.tg-desc { font-size: 12.5px; color: var(--ink-dim); line-height: 1.9; word-break: break-word; overflow-wrap: anywhere; }
.tg-desc b { color: var(--ink); }
.tg-formula { display: inline-block; margin-top: 6px; padding: 4px 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 3px; font-size: 11.5px; color: var(--ink-faint); font-family: var(--mono, monospace); }
.tg-roots { display: flex; flex-wrap: wrap; gap: 6px; }
.tg-root { display: inline-block; padding: 4px 9px; font-size: 12px; border-radius: 3px; background: rgba(155,208,155,.08); border: 1px solid rgba(155,208,155,.25); color: #9bd09b; }
.tg-root.tg-本气 { background: rgba(95,199,143,.15); border-color: rgba(95,199,143,.4); color: #5fc78f; font-weight: 600; }
.tg-root.tg-中气 { background: rgba(155,208,155,.1); border-color: rgba(155,208,155,.3); color: #9bd09b; }
.tg-root.tg-余气 { background: rgba(155,208,155,.05); border-color: rgba(155,208,155,.2); color: #b0d4b0; }
.tg-empty { padding: 12px 14px; background: rgba(232,138,130,.06); border: 1px solid rgba(232,138,130,.2); border-radius: 3px; font-size: 12.5px; color: #e8a4a4; }
.tg-compare { padding: 10px 14px; border-radius: 3px; font-size: 12.5px; line-height: 1.7; }
.tg-cmp-ok { background: rgba(155,208,155,.08); border: 1px solid rgba(155,208,155,.3); color: #9bd09b; }
.tg-cmp-conflict { background: rgba(232,184,138,.1); border: 1px solid rgba(232,184,138,.35); color: #e8c87e; }
@media (max-width:768px) {
  .tg-dial { margin: 0 auto; }
}

/* 用神 */
.yongshen-block { margin-bottom: 12px; }
.yongshen-block:last-child { margin-bottom: 0; }
.yongshen-label { font-size: 12px; color: var(--ink-faint); letter-spacing: 2px; margin-bottom: 6px; }
.yongshen-chars { display: flex; gap: 8px; margin-bottom: 6px; }
.ys-char {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 22px; font-weight: 700;
  background: var(--bg2); border: 1px solid var(--line);
}
.ys-char.main { border-color: var(--gold); box-shadow: 0 0 12px rgba(201,164,92,.2); }
.yongshen-reason { font-size: 12.5px; color: var(--ink-dim); line-height: 1.8; word-break: break-word; overflow-wrap: anywhere; }

.poem {
  font-family: var(--serif); font-size: 14px; line-height: 2.1;
  color: var(--ink); letter-spacing: 1.5px; word-break: break-word; overflow-wrap: anywhere;
}
.poem-src { font-size: 11px; color: var(--ink-faint); margin-top: 8px; letter-spacing: 1px; }

/* ─── 大运 ─── */
.dy-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.dy-card {
  flex: 0 0 auto; width: 86px; padding: 10px 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  text-align: center; cursor: pointer; transition: all .15s;
}
.dy-card.active { border-color: var(--gold); background: var(--card2); box-shadow: 0 0 14px rgba(201,164,92,.15); }
.dy-card .dy-age { font-size: 11px; color: var(--ink-faint); }
.dy-card .dy-gz { font-family: var(--serif); font-size: 24px; font-weight: 700; margin: 4px 0; }
.dy-card .dy-ss { font-size: 10.5px; color: var(--ink-dim); }
.dy-card .dy-year { font-size: 10px; color: var(--ink-faint); margin-top: 3px; }

/* 流年网格 */
.ln-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ln-cell {
  padding: 8px 2px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; transition: all .12s; min-width: 0; overflow: hidden;
}
.ln-cell.active { border-color: var(--gold); background: var(--card2); }
.ln-cell.current { border-color: var(--red); }
.ln-cell .ln-year { font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-cell .ln-gz { font-family: var(--serif); font-size: 17px; font-weight: 700; }
.ln-cell .ln-ss { font-size: 10px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ln-xy { font-size: 12px; color: var(--gold); margin-top: 2px; font-family: var(--serif); letter-spacing: 1px; }
.lm-cell { cursor: pointer; transition: transform .15s ease; }
.lm-cell:hover { transform: translateY(-2px); }
.lm-cell.active { border-color: var(--gold); background: var(--card2); box-shadow: 0 0 10px rgba(201,164,92,.2); }
:where(button).clk { appearance:none; display:inline; margin:0; padding:0; border:0; border-radius:0; background:none; color:inherit; font:inherit; text-align:inherit; }
.clk { cursor: pointer; border-bottom: 1px dashed rgba(201,164,92,.35); transition: color .12s; }
.clk:hover { color: var(--gold); }

/* 细盘六柱提示 */
.tip-block { font-size: 12.5px; line-height: 2; color: var(--ink-dim); word-break: break-word; overflow-wrap: anywhere; }
.tip-block .tip-k { color: var(--gold); font-family: var(--serif); letter-spacing: 2px; margin-right: 8px; }
.season-strip { display: flex; gap: 8px; }
.season-item {
  flex: 1; padding: 10px 4px; text-align: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
}
.season-item .s-wx { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.season-item .s-st { font-size: 11px; color: var(--ink-dim); margin-top: 2px; }

/* ─── 弹窗 ─── */
body.modal-open { overflow: hidden; }
.modal-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5,7,10,.72); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 640px) { .modal-mask { align-items: center; } }
.modal {
  width: 100%; max-width: 560px; max-height: 78vh;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px 16px 0 0; overflow: hidden;
  animation: rise .22s ease;
}
@media (min-width: 640px) { .modal { border-radius: 16px; } }
@keyframes rise { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
.modal-head span { font-family: var(--serif); font-size: 18px; color: var(--gold); letter-spacing: 3px; }
.modal-close {
  width: 44px; height: 44px; border: none; background: none;
  color: var(--ink-dim); font-size: 22px; cursor: pointer; line-height: 1;
}
.modal-close:hover { color: var(--ink); background: rgba(255,255,255,.05); border-radius: 8px; }
.modal-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.modal-body { padding: 18px; overflow-y: auto; max-height: calc(78vh - 64px); }
.modal[data-luck] { --modal-accent: #e8c87e; --modal-tint: rgba(201,164,92,.12); --modal-border: rgba(201,164,92,.4); border-color: var(--modal-border); }
.modal[data-luck="凶"] { --modal-accent: #e88a82; --modal-tint: rgba(200,69,60,.12); --modal-border: rgba(200,69,60,.4); }
.modal[data-luck="中"] { --modal-accent: #a8b6c8; --modal-tint: rgba(120,140,165,.12); --modal-border: rgba(120,140,165,.4); }
.modal[data-luck] .modal-head { background: linear-gradient(var(--modal-tint),var(--modal-tint)),var(--bg2); border-color: var(--modal-border); }
.modal[data-luck] .modal-head span, .modal[data-luck] .modal-body .m-k { color: var(--modal-accent); }
.modal[data-luck] .modal-close:focus-visible { outline-color: var(--modal-accent); }
.modal[data-luck] .m-luck { color: var(--modal-accent); background: var(--modal-tint); border: 1px solid var(--modal-border); }
.modal-body .m-hit-conditions p { margin: 0 0 8px; }
.modal-body { overscroll-behavior: contain; overflow-wrap: anywhere; }
.ms-theme-detail .ms-star-info-button { min-height: 40px; padding: 8px 14px; margin: 4px 0 14px; }
@supports (height: 100dvh) {
  .modal { max-height: 86dvh; }
  .modal-body { max-height: calc(86dvh - 78px); }
}
@media (max-width: 639px) { .modal-body { padding-bottom: max(18px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .modal { animation: none; } }
.modal-body .m-luck {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; margin-bottom: 12px; margin-right: 6px;
}
.modal-body .m-src-tag {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; margin-bottom: 12px; margin-right: 6px;
  letter-spacing: 1px; font-family: var(--serif);
}
.modal-body .m-src-tag.m-src-trad { color: var(--gold); background: rgba(201,164,92,.12); border: 1px solid var(--gold-dim); }
.modal-body .m-src-tag.m-src-middle { color: #b0a8d0; background: rgba(140,130,180,.10); border: 2px double rgba(140,130,180,.5); }
.modal-body .m-src-tag.m-src-extra { color: #c0a0a0; background: rgba(160,120,120,.10); border: 1px dashed rgba(160,120,120,.4); }
.modal-body .m-v.source { color: var(--ink-dim); font-size: 12.5px; font-family: var(--serif); letter-spacing: 1px; }
.modal-body .m-sec { margin-bottom: 14px; }
.modal-body .m-k { font-size: 12px; color: var(--gold); letter-spacing: 2px; margin-bottom: 5px; font-family: var(--serif); }
.modal-body .m-v { font-size: 13.5px; color: var(--ink); line-height: 2; }
.modal-body .m-v.dim { color: var(--ink-dim); font-size: 12.5px; }
.basic-help-modal .algo-block { padding: 0; }

/* 分享面板复用全局对话框；预览与离线导出采用同一份只读正文。 */
.modal.is-ms-share { max-width: 940px; max-height: 92dvh; }
.modal.is-ms-share .modal-body { max-height: calc(92dvh - 78px); padding: 20px; }
.ms-share-intro { margin: 0 0 14px; color: var(--ink-dim); font-size: 13px; line-height: 1.8; }
.ms-share-options, .ms-share-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; }
.ms-share-options label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13px; min-height: 36px; cursor: pointer; }
.ms-share-options input { width: 18px; height: 18px; accent-color: var(--gold); }
.ms-share-actions button, .ms-reader-action { min-height: 40px; padding: 8px 13px; border: 1px solid rgba(226,184,109,.35); border-radius: 8px; background: rgba(226,184,109,.08); color: #e3c98a; font: 12px/1.4 var(--sans); cursor: pointer; }
.ms-share-actions button:focus-visible, .ms-reader-action:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.ms-reader-action:disabled { opacity: .45; cursor: wait; }
.ms-share-status, .ms-share-local { color: var(--ink-dim); font-size: 12px; line-height: 1.7; margin: 10px 0; }
.ms-share-local { color: #d1b875; }
.ms-share-preview { margin-top: 20px; border: 1px solid rgba(226,184,109,.24); border-radius: 12px; overflow: hidden; }
.ms-share-print-frame { position: fixed; width: 1px; height: 1px; left: -10000px; top: 0; border: 0; }
.ms-share-panel [hidden] { display: none !important; }
.ms-share-channel { padding: 22px 0; border-top: 1px solid rgba(226,184,109,.2); }
.ms-share-channel small { color: #b6a374; font: 10px/1.5 var(--sans); letter-spacing: .13em; }
.ms-share-channel h3 { margin: 6px 0 9px; color: #ead7a4; font: 22px/1.4 var(--serif); }
.ms-share-channel p { margin: 0; max-width: 70ch; color: var(--ink-dim); font: 13px/1.85 var(--sans); }
.ms-share-channel .ms-share-actions { margin-bottom: 0; }
.ms-share-channel .ms-share-actions button { min-height: 44px; }
.ms-share-actions button:disabled { opacity: .46; cursor: not-allowed; }
.ms-share-actions [data-ms-share-create],.ms-share-actions [data-ms-image-save] { background: #dfc98d; color: #191d17; border-color: #dfc98d; font-weight: 600; }
.ms-share-consent { display: flex; align-items: flex-start; gap: 9px; margin: 16px 0; color: #d7dacf; font: 13px/1.7 var(--sans); cursor: pointer; }
.ms-share-consent input { width: 19px; height: 19px; flex: 0 0 19px; margin: 2px 0 0; accent-color: var(--gold); }
.ms-share-link-result { margin-top: 18px; padding: 16px; background: rgba(8,15,14,.6); border: 1px solid #3a4637; border-radius: 8px; }
.ms-share-link-result>label { display: block; color: #b8c3b9; font-size: 12px; margin-bottom: 8px; }
.ms-share-link-result>input { width: 100%; box-sizing: border-box; padding: 11px; border: 1px solid #425044; border-radius: 6px; background: #0a1210; color: #d8dacf; font: 13px/1.5 var(--sans); }
.ms-share-image-panel { margin-top: 18px; padding: 18px; border: 1px solid #3a4637; background: rgba(8,15,14,.6); border-radius: 10px; }
.ms-share-image-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ms-share-image-toolbar select { flex: 1; width: 0; min-width: 0; min-height: 44px; padding: 9px; background: #101b16; border: 1px solid #47503b; border-radius: 6px; color: #d8dacf; font: 13px var(--sans); }
.ms-share-image-toolbar>span { flex: 0 0 auto; color: #c9b47b; font: 12px var(--sans); }
#msShareImagePreview { display: block; width: 100%; max-width: 360px; height: auto; aspect-ratio: 9/16; object-fit: contain; margin: 0 auto; border: 1px solid #564c32; background: #081210; }
.ms-share-image-panel .ms-share-status { margin: 13px 0 0; }
.ms-share-history { margin-top: 16px; max-height: 400px; overflow-y: auto; overscroll-behavior: contain; padding: 14px; border: 1px solid #3a4637; border-radius: 10px; }
.ms-share-history h4 { margin: 0 0 12px; color: #ead7a4; }
.ms-share-history-item { padding: 12px 0; border-top: 1px solid #344136; }
.ms-share-history-item strong,.ms-share-history-item small { display: block; overflow-wrap: anywhere; }
.ms-share-history-item small { margin: 5px 0 8px; letter-spacing: 0; }
.ms-share-history-item input { width: 100%; min-width: 0; min-height: 40px; padding: 8px; color: #bfcebf; background: #0c1712; border: 1px solid #43513e; border-radius: 5px; font: 12px var(--sans); }
.ms-share-history-item .ms-share-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 13px; border: 1px solid #665b3d; border-radius: 8px; color: #d9c78f; text-decoration: none; font: 13px var(--sans); }
@media(max-width:600px){.ms-share-channel h3{font-size:20px}.ms-share-image-panel,.ms-share-link-result{padding:12px}.ms-share-consent{font-size:12px}.ms-share-channel .ms-share-actions button{padding:9px 7px}}
.ms-cinema-header .ms-reader-book-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 7px; grid-column: 1 / -1; }
.ms-reader-account { grid-column: 1 / -1; justify-self: end; max-width: 100%; }
.ms-reader-account #memberAccountHost { width: 244px; max-width: 100%; }
.ms-reader-account .xunq-account-button { width: 100%; max-width: 100%; }
.ms-reader-book-actions small { flex: 1 0 100%; text-align: right; white-space: normal; }
.ms-account-entry, .ms-account-button, .ms-account-ledger header button { min-height: 40px; padding: 8px 12px; border: 1px solid rgba(226,184,109,.3); border-radius: 8px; background: rgba(226,184,109,.07); color: #dec58c; font: 12px/1.4 var(--sans); cursor: pointer; }
.ms-account-entry { white-space: nowrap; }
.modal.is-ms-account { max-width: 680px; }
.ms-account-panel { color: var(--ink); font-size: 13px; line-height: 1.8; }
.ms-account-intro { color: var(--ink-dim); margin-top: 0; }
.ms-account-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 20px 0 14px; }
.ms-account-stats > div { padding: 14px 10px; border: 1px solid rgba(226,184,109,.2); border-radius: 10px; background: rgba(226,184,109,.04); }
.ms-account-stats span { display: block; color: var(--ink-dim); font-size: 11px; }
.ms-account-stats strong { display: block; color: #e3c98a; font: 26px/1.5 var(--serif); overflow-wrap: anywhere; }
.ms-account-policy { font-size: 12px; color: var(--ink-dim); }
.ms-account-policy span { display: block; }
.ms-account-redeem, .ms-account-ledger { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.ms-account-panel h3 { font: 17px/1.6 var(--serif); color: #e3c98a; margin: 0 0 8px; }
.ms-account-redeem > p { font-size: 12px; color: var(--ink-dim); }
.ms-account-support { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(226,184,109,.25); border-radius: 8px; background: rgba(226,184,109,.05); font: 12px/1.6 var(--sans); color: var(--ink-dim); }
.ms-account-support a { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; color: #dec58c; text-decoration: underline; text-underline-offset: 4px; }
.ms-account-support a:focus-visible { outline: 2px solid #dec58c; outline-offset: 3px; }
.ms-account-redeem form { display: flex; gap: 8px; margin-top: 12px; }
.ms-account-redeem .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.ms-account-redeem input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--bg2); font: 16px/1.4 var(--sans); }
.ms-account-panel button:disabled, .ms-account-redeem input:disabled { opacity: .5; cursor: default; }
.ms-account-notice { min-height: 24px; }
.ms-account-membership { margin-top: 22px; padding: 18px; border: 1px solid rgba(226,184,109,.35); border-radius: 12px; background: rgba(226,184,109,.045); }
.ms-membership-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.ms-membership-heading > strong { flex: 0 0 auto; color: #e3c98a; font: 27px/1.4 var(--serif); white-space: nowrap; }
.ms-membership-heading > strong small { font: 12px/1.4 var(--sans); }
.ms-account-membership p { margin: 8px 0 14px; color: var(--ink-dim); font-size: 12px; }
.ms-membership-heading p { margin: 0; }
.ms-account-membership button { min-height: 44px; }
.ms-membership-purchase { width: 100%; margin-top: 5px; background: rgba(226,184,109,.14); }
.ms-membership-confirm, .ms-membership-pending { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg2); font-size: 12px; }
.ms-membership-confirm h4 { margin: 0 0 10px; color: #e3c98a; font-size: 14px; }
.ms-membership-confirm .ms-share-actions { flex-wrap: wrap; }
.ms-membership-confirm .ms-share-actions button { white-space: normal; }
.ms-membership-pending .ms-account-button { display: block; margin-top: 10px; }
.ms-account-membership .ms-membership-active { color: #a8d5b8; margin-bottom: 0; }
.ms-membership-confirm > a.ms-account-button { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; margin-top: 10px; }
.ms-account-ledger header { display: flex; justify-content: space-between; align-items: center; }
.ms-account-ledger ul { list-style: none; margin: 12px 0; padding: 0; }
.ms-account-ledger li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ms-account-ledger li > div:last-child { text-align: right; }
.ms-account-ledger small { display: block; color: var(--ink-faint); font-size: 11px; }
.ms-account-ledger strong { color: #c4cad1; }
.ms-account-ledger .is-credit { color: #9ccbb4; }
.ms-account-empty, .ms-account-ledger-note { color: var(--ink-faint); font-size: 12px; }
@media (max-width: 640px) {
  .modal.is-ms-share .modal-body { padding: 14px 12px max(18px, env(safe-area-inset-bottom)); }
  .ms-share-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .ms-share-actions button { min-width: 0; }
  .ms-cinema-header .ms-reader-book-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; gap: 6px; }
  .ms-reader-book-actions .ms-reader-action { width: 100%; min-width: 0; padding: 8px 7px; font-size: 10px; }
  .ms-reader-book-actions small { grid-column: 1 / -1; max-width: none; }
}

.footer { padding: 22px; text-align: center; }
.footer p { font-size: 11px; color: var(--ink-faint); letter-spacing: 1px; }

/* ─── 录入模式 ─── */
.input-card { margin-top: 14px; }
.input-row input, .input-row select { min-height: 44px; font-size: 16px; }
.ymd-grid { display: flex; gap: 8px; flex: 1; }
.ymd-grid input, .ymd-grid select {
  flex: 1; min-width: 0; padding: 10px 8px; text-align: center;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-size: 16px;
}
.ymd-grid input:first-child { flex: 1.4; }
.hour-select { font-size: 16px; }
.tst-row label:first-child { width: 110px; flex: 0 0 110px; }
.tst-note { font-size: 11px; color: var(--ink-faint); margin-top: -6px; margin-bottom: 12px; padding-left: 122px; }
/* ── 晚子换日开关行 ── */
.wanzi-row { margin-bottom: 8px; flex-wrap: wrap; }
.wanzi-note {
  flex: 1 1 100%; font-size: 10.5px; color: var(--muted); line-height: 1.5;
  padding-left: 122px; letter-spacing: .3px;
}
@media (max-width: 640px) {
  .wanzi-note { padding-left: 0; }
}
/* ── 直排模式·起运推测选择 ── */
.vda-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.vda-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  transition: all .16s ease; font-family: inherit;
}
.vda-btn:hover { border-color: var(--gold-dim); background: rgba(212,175,55,.08); transform: translateY(-1px); }
.vda-age { font-size: 15px; font-weight: 700; color: var(--gold); font-family: var(--serif); }
.vda-range { font-size: 10px; color: var(--muted); line-height: 1.5; text-align: center; }
.vda-note { margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.6; }
@media (max-width: 640px) {
  .vda-grid { grid-template-columns: 1fr; }
}
.tst-head-note { font-size: 11px; color: var(--gold); margin-top: 2px; letter-spacing: .5px; }
.inline-fields { display: flex; gap: 8px; flex: 1; }
.inline-fields input, .inline-fields select {
  flex: 1; min-width: 0; padding: 10px 8px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-size: 14px;
}
.flex1 { flex: 1; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font-size: 14px; }
.leap-wrap { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-dim); white-space: nowrap; width: auto !important; flex-basis: auto !important; }
.leap-wrap input { width: 16px; height: 16px; accent-color: var(--gold); }

.gz-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gz-cell { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; }
.gz-label { font-size: 11px; color: var(--gold); letter-spacing: 2px; margin-bottom: 8px; font-family: var(--serif); }
.gz-cell select {
  width: 100%; margin-bottom: 6px; padding: 8px 4px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  color: var(--ink); font-size: 16px; font-family: var(--serif);
}
.gz-cell select:last-child { margin-bottom: 0; }

/* ─── 命造头徽章 ─── */
.ch-main { display: flex; flex-direction: column; gap: 8px; }
.ch-badges { display: flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
/* 核心徽章（大字号·信息分层） */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border: 1px solid var(--line); border-radius: 20px;
  font-size: 11.5px; letter-spacing: 1px; background: rgba(255,255,255,.02);
  max-width: 100%; white-space: nowrap;
}
.badge-core { padding: 5px 12px; font-size: 12.5px; font-weight: 500; }
.badge-core .bk-lbl { font-size: 10.5px; opacity: .65; margin-right: 4px; letter-spacing: 1px; }
.badge-core .bk-val { font-size: 13px; font-weight: 600; letter-spacing: 1.5px; }
.badge-mini { padding: 2px 9px; font-size: 10.5px; color: var(--ink-dim); opacity: .82; }
.badge-mini .bk-lbl { font-size: 9.5px; opacity: .6; margin-right: 4px; letter-spacing: 1px; }
.badge-gold { color: var(--gold); border-color: var(--gold-dim); }
.badge-ji { color: #e88a82; border-color: rgba(200,69,60,.5); }
.badge-dim { color: var(--ink-dim); }
/* 核心行/信息行分隔 */
.ch-badges-core { margin-bottom: 1px; }
.ch-badges-info { padding-top: 4px; border-top: 1px dashed rgba(168, 182, 200, 0.18); }

/* 顶部两法摘要共用真实数据；不把辅佐改称喜神。 */
.chart-head .ch-main{min-width:0}
.ch-methods{display:grid;gap:6px;max-width:100%;margin-top:2px}
.ch-method-row{display:grid;grid-template-columns:32px minmax(0,1fr);gap:9px;align-items:baseline;max-width:100%;font-size:12px;line-height:1.7}
.ch-method-source{color:var(--ink-dim);font-size:12px;letter-spacing:.04em}
.ch-method-values{display:flex;flex-wrap:wrap;gap:3px 12px;min-width:0}
.ch-method-item{display:inline-flex;align-items:baseline;gap:4px;white-space:nowrap;color:var(--ink-dim)}
.ch-method-item b{color:var(--gold-soft);font-size:13px;font-weight:500;letter-spacing:.08em}.ch-method-item.is-avoid b{color:#d9aaa0}.ch-method-item.is-secondary,.ch-method-item.is-secondary b{font-size:11px;color:var(--ink-dim)}
@media(max-width:640px){.ch-method-row{gap:7px}.ch-method-values{gap:2px 10px}}

/* ─── 提示页：格局 ─── */
.geju-summary { text-align: center; padding: 8px 0 4px; }
.geju-main-name {
  font-family: var(--serif); font-size: 30px; font-weight: 700;
  color: var(--gold); letter-spacing: 6px; margin-bottom: 8px;
}
.geju-via { font-size: 12.5px; color: var(--ink-dim); letter-spacing: 1px; word-break: break-word; overflow-wrap: anywhere; }
.geju-special { margin-top: 10px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.geju-judge {
  font-size: 13px; color: var(--ink); line-height: 1.9;
  padding: 10px 12px; background: rgba(201,164,92,.07);
  border-radius: 0 8px 8px 0;
  margin-bottom: 14px; word-break: break-word; overflow-wrap: anywhere;
}
.book-quote { margin-bottom: 12px; padding-left: 12px; border-left: 1px solid var(--line); overflow: hidden; }
.book-name { font-family: var(--serif); font-size: 13px; color: var(--gold); letter-spacing: 2px; margin-bottom: 4px; word-break: break-word; overflow-wrap: anywhere; }
.book-text { font-size: 12.5px; color: var(--ink-dim); line-height: 2; word-break: break-word; overflow-wrap: anywhere; }
.case-box { margin-top: 14px; padding: 12px; background: var(--bg2); border: 1px dashed var(--line); border-radius: 8px; overflow: hidden; }
.case-k { font-size: 11px; color: var(--gold); letter-spacing: 3px; font-family: var(--serif); margin-bottom: 6px; }
.case-text { font-size: 12.5px; color: var(--ink-dim); line-height: 2; word-break: break-word; overflow-wrap: anywhere; }

/* ─── 流年神煞十二神 ─── */
.ts12-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ts12-cell {
  padding: 9px 2px; text-align: center; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg2); cursor: pointer;
  transition: transform .15s ease; overflow: hidden; min-width: 0;
}
.ts12-cell:hover { transform: translateY(-2px); }
.ts12-cell.luck-吉 { border-color: rgba(201,164,92,.5); }
.ts12-cell.luck-凶 { border-color: rgba(200,69,60,.5); }
.ts12-zhi { font-size: 9.5px; color: var(--ink-faint); margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts12-name { font-family: var(--serif); font-size: 14px; letter-spacing: 1px; }
.ts12-cell.luck-吉 .ts12-name { color: #e8c87e; }
.ts12-cell.luck-凶 .ts12-name { color: #e88a82; }
.ts12-cell.luck-中 .ts12-name { color: #a8b6c8; }

/* ─── 流月（缩小版，贴流年条） ─── */
.lm-wrap { margin: 2px 0 12px; overflow: hidden; }
.lm-title { font-size: 11.5px; color: var(--ink-dim); letter-spacing: 1px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; }
.lm-title span { font-size: 10px; color: var(--ink-faint); }
.lm-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.lm-cell { padding: 5px 2px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 7px; min-width: 0; overflow: hidden; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.lm-cell:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.lm-cell.active { border-color: var(--gold); background: rgba(201,164,92,.11); box-shadow: inset 0 0 0 1px rgba(201,164,92,.13); }
.lm-cell.current { border-color: var(--red); }
.lm-month { font-size: 9px; color: var(--ink-faint); }
.lm-gz { font-family: var(--serif); font-size: 14px; font-weight: 700; margin: 1px 0; }
.lm-ss { font-size: 9.5px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── 空状态 ─── */
.empty-state { padding: 30px 16px; text-align: center; font-size: 13px; color: var(--ink-dim); line-height: 2; }

/* ─── 细盘流年切换条 ─── */
.ln-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; }
.ln-mini { flex: 0 0 64px; padding: 6px 2px; }
.ln-mini .ln-gz { font-size: 15px; }

/* ─── 大运工作区：先选十年，再看十个流年；百年总览按需展开 ─── */
.dayun-workspace { display: grid; gap: 0; }
.dayun-selector-card { overflow: visible; }
.dy-scroll { scroll-snap-type: x proximity; }
.dy-card { appearance: none; color: inherit; font-family: var(--sans); scroll-snap-align: center; }
.dayun-years-card { border-color: rgba(201,164,92,.33); overflow: visible; }
.dayun-years-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -1px 0 12px; }
.dayun-years-head > div { min-width: 0; display: grid; gap: 3px; }
.dayun-eyebrow { color: var(--ink-faint); font-size: 9px; letter-spacing: 1.8px; }
.dayun-years-head strong { color: var(--gold); font: 18px/1.25 var(--serif); letter-spacing: 2px; }
.dayun-years-head small { color: var(--ink-faint); font-size: 10px; line-height: 1.45; }
.century-toggle, .century-close {
  appearance: none; flex: 0 0 auto; min-height: 36px; padding: 6px 9px;
  border: 1px solid rgba(201,164,92,.37); border-radius: 8px; background: rgba(201,164,92,.06);
  color: var(--gold); cursor: pointer; font: 11px/1.2 var(--sans); touch-action: manipulation;
}
.century-toggle { display: grid; gap: 2px; text-align: right; }
.century-toggle span { color: var(--ink-dim); font-size: 9px; }
.century-toggle b { color: var(--gold); font-size: 11px; font-weight: 600; }
.century-toggle:hover, .century-close:hover { background: rgba(201,164,92,.13); border-color: var(--gold); }
.dayun-year-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.dayun-year-card {
  position: relative; min-height: 76px; padding: 6px 2px 5px; appearance: none; color: inherit; font-family: var(--sans);
  display: grid; align-content: center; justify-items: center; gap: 1px; touch-action: manipulation;
}
.dayun-year-card .ln-year { font-size: 10px; }
.dayun-year-card .ln-age { color: var(--ink-faint); font-size: 9px; }
.dayun-year-card .ln-gz { font-size: 16px; line-height: 1.1; }
.dayun-year-card .ln-ss { max-width: 100%; font-size: 9px; }
.dayun-year-card .ln-xy { font-size: 9px; letter-spacing: 0; }
.dayun-year-card.active { box-shadow: 0 0 0 1px rgba(232,200,106,.38), 0 8px 18px rgba(0,0,0,.15); }
.is-focus-target { animation: dayun-year-focus 1.45s ease-out both; }
@keyframes dayun-year-focus { 0% { box-shadow: 0 0 0 0 rgba(232,200,106,.85); } 45% { box-shadow: 0 0 0 7px rgba(232,200,106,.08), 0 0 18px rgba(232,200,106,.24); } 100% { box-shadow: 0 0 0 1px rgba(232,200,106,.34); } }
.century-panel { padding-top: 14px; border-color: rgba(201,164,92,.25); }
.century-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.century-panel-head .card-title { flex: 1 1 auto; min-width: 0; }
.century-panel-head .card-title .src { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.century-close { min-height: 30px; padding: 5px 8px; font-size: 10px; }
.ln-century-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; padding: 2px 0 3px; }
.ln-century-cell {
  appearance: none; min-width: 0; min-height: 61px; padding: 5px 1px; overflow: hidden;
  display: grid; align-content: center; justify-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg2); color: var(--ink); cursor: pointer; font-family: var(--sans); touch-action: manipulation;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.ln-century-cell:hover { transform: translateY(-1px); border-color: var(--gold-dim); }
.ln-century-cell.active { border-color: var(--gold); background: var(--card2); box-shadow: inset 0 0 0 1px rgba(201,164,92,.16); }
.ln-century-cell.current { border-color: var(--red); }
.ln-century-cell span { color: var(--ink-faint); font-size: 8.5px; line-height: 1; }
.ln-century-cell b { font: 15px/1.05 var(--serif); letter-spacing: 1px; }
.ln-century-cell i { overflow: hidden; max-width: 100%; color: var(--ink-dim); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.dyc-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; margin-bottom: 2px; }
.dyc-chip {
  flex: 0 0 auto; min-width: 62px; padding: 6px 8px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  transition: all .15s;
}
.dyc-chip.active { border-color: var(--gold); background: var(--card2); box-shadow: 0 0 10px rgba(201,164,92,.15); }
.dyc-gz { font-family: var(--serif); font-size: 15px; font-weight: 700; }
.dyc-age { font-size: 9.5px; color: var(--ink-faint); margin-top: 2px; }

/* 细盘：从“大量卡片”收束为一条清晰的时间选择链。 */
.liu-ri-picker { display: grid; grid-template-columns: auto minmax(128px, 168px) minmax(0, 1fr); align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; background: rgba(201,164,92,.055); border: 1px solid rgba(201,164,92,.18); border-radius: 9px; }
.liu-ri-picker label { color: var(--gold); font-family: var(--serif); font-size: 13px; letter-spacing: 1px; }
.liu-ri-picker input { min-height: 38px; padding: 6px 8px; color: var(--ink); color-scheme: dark; background: var(--bg2); border: 1px solid var(--line); border-radius: 7px; font: 13px var(--sans); }
.liu-ri-summary { min-width: 0; color: var(--ink-dim); font-size: 11.5px; line-height: 1.55; }
.time-relation-card { border-color: rgba(201,164,92,.28); }
.time-evidence { display: flex; flex-direction: column; gap: 7px; }
.time-evidence-row { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 4px 10px; padding: 9px 10px; background: var(--bg2); border-top: 1px solid var(--ink-faint); border-radius: 7px; }
.time-evidence-row.ev-he { border-top-color: #79b99b; }
.time-evidence-row.ev-chong { border-top-color: #df887e; }
.time-evidence-row.ev-harm { border-top-color: #d0a764; }
.ev-kind { grid-row: span 2; align-self: center; color: var(--gold); font-size: 10.5px; letter-spacing: 1px; }
.ev-pair { min-width: 0; color: var(--ink); font-family: var(--serif); font-size: 12.5px; line-height: 1.6; }
.ev-pair b { color: var(--ink-faint); padding: 0 3px; }
.ev-text { grid-column: 2; color: var(--ink-dim); font-size: 11.5px; line-height: 1.7; }
.time-evidence-empty { padding: 8px 0; color: var(--ink-faint); font-size: 12px; line-height: 1.75; }
.time-relation-raw { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); font-size: 11.5px; color: var(--ink-faint); }

/* ─── 交互与动效（craft floor） ─── */
.tabpage { animation: fadeUp .28s cubic-bezier(.22,1,.36,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ss-tag { min-height: 26px; display: inline-flex; align-items: center; }
.ss-tag:focus-visible, .tab:focus-visible, .dy-card:focus-visible, .ln-cell:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
.hl { color: var(--gold); font-weight: 600; }
.card-compact { padding: 12px 16px; }
.col-sub { font-size: 10px; color: var(--ink-faint); font-family: var(--sans); letter-spacing: 0; font-weight: 400; }
.dy-tong { font-size: 15px; color: var(--ink-dim); }
.dy-xy { font-size: 10px; color: var(--gold); margin-top: 3px; letter-spacing: .5px; }

/* ─── 大运详解 ─── */
.dyd-card { border-color: var(--gold-dim); overflow: hidden; }
.dyd-summary { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.dyd-gz { font-family: var(--serif); font-size: 44px; font-weight: 700; line-height: 1.1; flex: 0 0 auto; }
.dyd-gz span { display: block; }
.dyd-attrs { flex: 1 1 200px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; min-width: 0; }
.dyd-attr { font-size: 12px; min-width: 0; overflow: hidden; }
.dyd-attr .k { color: var(--ink-faint); margin-right: 6px; }
.dyd-attr b { font-weight: 600; word-break: break-all; }
.fav-xi { color: #e8c87e; } .fav-ji { color: #e88a82; } .fav-ping { color: var(--ink-dim); }
.dyd-sec { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.dyd-k { font-family: var(--serif); font-size: 14px; color: var(--gold); letter-spacing: 3px; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; }
.dyd-k-sub { font-size: 10.5px; color: var(--ink-faint); font-family: var(--sans); letter-spacing: 1px; }
.dyd-p { font-size: 13px; color: var(--ink); line-height: 2; margin-bottom: 8px; word-break: break-word; overflow-wrap: anywhere; }
.dyd-note { font-size: 10.5px; color: var(--ink-faint); margin-top: 10px; letter-spacing: .5px; }

/* 当前流年详解紧跟十年卡：每次选年重建此卡，用轻微入场反馈确认内容已同步。 */
.liunian-detail-card { border-color: rgba(115,183,173,.38); overflow: visible; animation: liunian-detail-refresh .24s cubic-bezier(.22,1,.36,1); }
@keyframes liunian-detail-refresh { from { opacity: .68; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.lyn-selection-mark { display: inline-flex; align-items: center; min-height: 20px; margin-right: 7px; padding: 1px 6px; border: 1px solid rgba(115,183,173,.42); border-radius: 99px; background: rgba(115,183,173,.08); color: #9bc4bd; font: 9px/1 var(--sans); letter-spacing: 0; vertical-align: 2px; }
.lyn-overview { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 13px; align-items: stretch; }
.lyn-sigil { display: grid; align-content: center; justify-items: center; min-height: 139px; padding: 12px 8px; border: 1px solid rgba(201,164,92,.35); border-radius: 11px; background: radial-gradient(circle at 50% 36%, rgba(201,164,92,.15), transparent 55%), var(--bg2); text-align: center; }
.lyn-sigil span { color: var(--ink-faint); font-size: 10px; letter-spacing: 1px; }
.lyn-sigil b { margin: 7px 0 6px; font: 35px/1 var(--serif); letter-spacing: 4px; }
.lyn-sigil small { color: var(--ink-dim); font-size: 9.5px; line-height: 1.45; }
.lyn-layers { display: grid; gap: 7px; }
.lyn-layer { display: grid; grid-template-columns: 46px 35px minmax(0, 1fr); gap: 7px; align-items: center; min-height: 66px; padding: 8px; border: 1px solid var(--line); border-top: 2px solid rgba(127,140,156,.55); border-radius: 8px; background: var(--bg2); }
.lyn-layer.role-yong { border-top-color: #79b99b; background: linear-gradient(180deg, rgba(115,183,173,.07), var(--bg2) 58%); }
.lyn-layer.role-xi { border-top-color: var(--gold); background: linear-gradient(180deg, rgba(201,164,92,.08), var(--bg2) 58%); }
.lyn-layer.role-ji { border-top-color: #e88a82; background: linear-gradient(180deg, rgba(200,69,60,.08), var(--bg2) 58%); }
.lyn-layer-k { color: var(--ink-faint); font-size: 9px; letter-spacing: .6px; }
.lyn-layer > b { font: 28px/1 var(--serif); text-align: center; }
.lyn-layer > div { min-width: 0; display: grid; gap: 2px; }
.lyn-layer strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.lyn-layer em { overflow: hidden; color: var(--gold); font-size: 9.5px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.lyn-layer p { margin: 0; color: var(--ink-dim); font-size: 9.5px; line-height: 1.4; }
.lyn-reading { margin-top: 11px; padding: 9px 11px; border-top: 1px solid rgba(201,164,92,.56); border-radius: 8px; background: rgba(201,164,92,.045); }
.lyn-reading p { margin: 0; color: var(--ink-dim); font-size: 11.5px; line-height: 1.75; }
.lyn-reading p + p { margin-top: 5px; }
.lyn-reading b { color: var(--gold); font-weight: 600; }
.lyn-signal-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 9px; margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.lyn-signal-row > div { min-width: 0; }
.lyn-signal-row small { display: block; margin-bottom: 6px; color: var(--ink-faint); font-size: 9.5px; letter-spacing: .7px; }
.lyn-marks, .lyn-taisu { display: flex; flex-wrap: wrap; gap: 5px; }
.lyn-marks span, .lyn-taisu span { display: inline-flex; min-height: 22px; align-items: center; padding: 2px 6px; border: 1px solid var(--line); border-radius:99px; color: var(--ink-dim); font-size: 9.5px; line-height: 1.2; }
.lyn-marks span:not(.is-quiet) { border-color: rgba(232,138,130,.52); color: #e8aaa3; background: rgba(200,69,60,.07); }
.lyn-marks .is-quiet { color: var(--ink-faint); }
.lyn-taisu span { border-color: rgba(115,183,173,.3); color: #9bc4bd; background: rgba(115,183,173,.05); }
.lyn-stars { margin-top: 12px; padding-top: 11px; border-top: 1px dashed var(--line); }
.lyn-stars-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.lyn-stars-head span { color: var(--gold); font: 13px var(--serif); letter-spacing: 2px; }
.lyn-stars-head small, .lyn-empty { color: var(--ink-faint); font-size: 10px; }

@media (prefers-reduced-motion: reduce) {
  .liunian-detail-card { animation: none; }
}

@media (max-width: 640px) {
  .card-title { align-items: flex-start; flex-wrap: wrap; gap: 6px 8px; }
  .card-title::before { margin-top: 4px; }
  .card-title-label { min-height: 32px; }
  .card-title .src { flex: 1 0 100%; margin-left: 11px; padding-left: 0; text-align: left; }
  .dayun-years-head { align-items: flex-start; }
  .dayun-year-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .dayun-year-card { min-height: 78px; }
  .ln-century-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .ln-century-cell { min-height: 60px; }
  .lyn-overview { grid-template-columns: 1fr; gap: 9px; }
  .lyn-sigil { min-height: 86px; grid-template-columns: auto auto 1fr; gap: 8px; padding: 10px 12px; text-align: left; }
  .lyn-sigil b { margin: 0; font-size: 31px; }
  .lyn-sigil small { text-align: right; }
  .lyn-signal-row { grid-template-columns: 1fr; gap: 9px; }
}
@media (max-width: 520px) { .dyd-attrs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 响应式微调 */
@media (max-width: 420px) {
  .pan-table .gan-big, .pan-table .zhi-big { font-size: 22px; }
  .pan-table .row-label { width: 32px; font-size: 9px; }
  .pan-table .col-head { font-size: 10.5px; }
  .pan-table .ss { font-size: 9.5px; }
  .pan-table .small { font-size: 9px; }
  .pan-table .cang { font-size: 9.5px; }
  .pan-table .cang .cang-ss { font-size: 8px; }
  .pan-table th, .pan-table td { padding: 5px 1px; }
  .input-row label { width: 88px; flex-basis: 88px; }
  .ln-grid { grid-template-columns: repeat(4, 1fr); }
  .dayun-year-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ln-century-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .ln-century-cell { min-height: 58px; }
  .ts12-grid { grid-template-columns: repeat(3, 1fr); }
  .lm-grid { grid-template-columns: repeat(4, 1fr); }
  .liu-ri-picker { grid-template-columns: 1fr; gap: 6px; }
  .liu-ri-picker input { width: 100%; }
  .time-evidence-row { grid-template-columns: 58px minmax(0, 1fr); gap: 4px 7px; padding: 8px; }
  .ev-kind { font-size: 9.5px; }
  .ev-pair { font-size: 11.5px; }
  .ev-text { font-size: 10.8px; }
  .info-disclosure > summary { padding: 13px 14px; }
  .info-disclosure-body { padding: 14px; }
  .ch-evidence, .ch-focus { grid-template-columns: 58px minmax(0, 1fr); gap: 6px; font-size: 11.5px; }
  .gz-grid { grid-template-columns: repeat(2, 1fr); }
  .tabs .tab { letter-spacing: 1px; font-size: 14px; }
}

/* ===== 古籍条文库（提示页） ===== */
.classic-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.classic-overview { padding: 14px 16px; border-color: rgba(201,164,92,.25); }
.ct-label { font-size: 14px; color: var(--gold); font-weight: 700; letter-spacing: 2px; }
.ct-count { font-size: 12px; color: var(--ink-faint); margin-right: auto; }
.ct-btn { min-height: 36px; padding: 6px 12px; font-size: 12px; background: rgba(201, 164, 92, 0.1); color: var(--gold); border: 1px solid rgba(201, 164, 92, 0.3); border-radius: 6px; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.ct-btn:hover { background: rgba(201, 164, 92, 0.2); border-color: rgba(201, 164, 92, 0.5); }
.ct-hint { font-size: 11.5px; color: var(--ink-faint); font-style: italic; }

.classic-card { position: relative; transition: all 0.2s; }
.classic-title-click { width: 100%; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px; text-align: left; }
.classic-title-click:hover { color: var(--gold); }
.ct-chevron { display: inline-block; transition: transform 0.2s; color: var(--gold); font-size: 14px; }
.classic-card.collapsed .ct-chevron { transform: rotate(-90deg); }
.classic-card.collapsed .classic-hits { display: none; }
.classic-card.collapsed { padding-bottom: 8px; }

.classic-hits { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px; }
.classic-hit { padding: 12px 14px; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 7px; line-height: 1.85; }
.classic-hit.hit-high { background: linear-gradient(90deg, rgba(201, 164, 92, 0.12) 0%, rgba(201, 164, 92, 0.04) 100%); border-color: rgba(201, 164, 92, 0.4); }
.ch-k { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ch-h1 { font-size: 13px; color: var(--gold); font-weight: 700; letter-spacing: 1px; }
.ch-tag { font-size: 10px; padding: 2px 7px; background: rgba(201, 164, 92, 0.2); color: var(--gold); border-radius: 2px; letter-spacing: 1px; border: 1px solid rgba(201, 164, 92, 0.4); }
.ch-text { font-size: 13px; color: var(--ink); line-height: 1.85; word-break: break-word; overflow-wrap: anywhere; }
.ch-text br + br { display: block; content: ''; margin-top: 4px; }
.ch-note { margin-top: 6px; font-size: 11.5px; color: var(--ink-faint); font-style: italic; padding-left: 8px; border-left: 1px solid rgba(168, 182, 200, 0.25); }
.ch-evidence, .ch-focus { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 8px; padding: 7px 0; font-size: 12px; line-height: 1.7; }
.ch-evidence { border-top: 1px dashed rgba(201,164,92,.2); }
.ch-evidence b, .ch-focus b { color: var(--gold); font-weight: 600; letter-spacing: .5px; }
.ch-evidence span, .ch-focus span { color: var(--ink-dim); }
.classic-source { margin-top: 8px; border-top: 1px dashed rgba(168,182,200,.2); }
.classic-source summary { min-height: 38px; display: flex; align-items: center; color: var(--ink-faint); cursor: pointer; font-size: 11.5px; }
.classic-source[open] summary { color: var(--gold); }
.classic-source .ch-text { padding: 4px 0 2px; color: var(--ink-dim); }
.classic-empty { padding: 20px 14px; text-align: center; color: var(--ink-faint); font-size: 12.5px; font-style: italic; letter-spacing: 1px; opacity: .65; }

/* === 三元命词条 === */
.sym-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (max-width: 720px) { .sym-grid { grid-template-columns: 1fr; } }
.sym-cell { background: rgba(255,255,255,0.02); border: 1px solid rgba(201,164,92,0.2); border-radius: 4px; padding: 10px 12px; cursor: pointer; transition: all .15s; }
.sym-cell:hover { background: rgba(201,164,92,0.06); border-color: var(--gold); }
.sym-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.sym-name { font-family: var(--serif); font-size: 15px; color: var(--gold); font-weight: 600; letter-spacing: 1px; }
.sym-sub { font-size: 11px; color: var(--ink-faint); letter-spacing: 1px; }
.sym-val { font-size: 13px; color: var(--ink); margin-bottom: 6px; font-weight: 500; }
.sym-desc { font-size: 12px; color: var(--ink-dim); line-height: 1.7; margin-bottom: 4px; }
.sym-rule { font-size: 11.5px; color: var(--gold-bright); opacity: .85; line-height: 1.6; margin-bottom: 4px; }
.sym-src { font-size: 10.5px; color: var(--ink-faint); font-style: italic; letter-spacing: .5px; }

/* === 星宿词条 === */
.xiu-grid { display: flex; flex-direction: column; gap: 12px; }
.xiu-cell { background: rgba(255,255,255,0.02); border: 1px solid rgba(201,164,92,0.25); border-radius: 4px; padding: 12px 14px; }
.xiu-cell.luck-吉 { border-left-color: #6abf6a; }
.xiu-cell.luck-凶 { border-left-color: #e88a82; }
.xiu-cell.luck-中 { border-left-color: #a8b6c8; }
.xiu-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.xiu-name { font-family: var(--serif); font-size: 17px; color: var(--gold); font-weight: 600; letter-spacing: 1px; }
.xiu-gong { font-size: 11.5px; color: var(--ink-dim); letter-spacing: 1px; }
.xiu-xing { font-size: 12.5px; color: var(--ink); margin-bottom: 6px; }
.xiu-desc { font-size: 12.5px; color: var(--ink-dim); line-height: 1.7; margin-bottom: 4px; }
.xiu-src { font-size: 10.5px; color: var(--ink-faint); font-style: italic; }
.xiu-empty { padding: 20px 14px; text-align: center; color: var(--ink-faint); font-size: 12.5px; font-style: italic; opacity: .65; }

.xiu-overview { padding: 12px 14px; background: rgba(255,255,255,0.015); border: 1px solid var(--line); border-radius: 4px; }
.xiu-overview-title { font-size: 12px; color: var(--ink-faint); letter-spacing: 1px; margin-bottom: 10px; }
.xiu-grp { margin-bottom: 8px; }
.xiu-grp:last-child { margin-bottom: 0; }
.xiu-grp-name { font-size: 11.5px; color: var(--gold-dim); margin-bottom: 4px; letter-spacing: 1px; }
.xiu-grp-list { display: flex; flex-wrap: wrap; gap: 4px; }
.xiu-pill { display: inline-block; padding: 3px 9px; font-size: 12px; border-radius: 12px; cursor: pointer; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); transition: all .15s; }
.xiu-pill.luck-吉 { color: #9bd09b; border-color: rgba(106,191,106,.3); }
.xiu-pill.luck-凶 { color: #e8a8a0; border-color: rgba(200,69,60,.3); }
.xiu-pill.luck-中 { color: #b0bec5; }

/* 星宿四柱头部改版 */
.xiu-label { font-size: 11.5px; color: var(--ink-dim); letter-spacing: 1px; }
.xiu-cell .xiu-name { font-size: 18px; }

/* === 命卦词条 === */
.mg-hero { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 6px; margin-bottom: 12px; position: relative; overflow: hidden; }
.mg-hero.mg-dong { background: linear-gradient(135deg, rgba(74,158,98,0.15), rgba(255,213,89,0.08)); border: 1px solid rgba(106,191,106,0.35); }
.mg-hero.mg-xi { background: linear-gradient(135deg, rgba(201,164,92,0.15), rgba(168,182,200,0.08)); border: 1px solid rgba(201,164,92,0.35); }
.mg-symbol { font-size: 56px; line-height: 1; color: var(--gold); text-shadow: 0 0 16px rgba(201,164,92,0.4); font-family: var(--serif); }
.mg-main { flex: 1; min-width: 0; }
.mg-name { font-family: var(--serif); font-size: 22px; color: var(--gold); font-weight: 700; letter-spacing: 2px; }
.mg-dir { font-size: 13px; color: var(--ink-dim); font-weight: normal; }
.mg-meta { font-size: 12.5px; color: var(--ink); margin-top: 4px; }
.mg-group-tag { padding: 6px 12px; border-radius: 14px; font-size: 12px; font-weight: 600; letter-spacing: 2px; }
.tag-dong { background: rgba(106,191,106,0.2); color: #9bd09b; border: 1px solid rgba(106,191,106,0.4); }
.tag-xi { background: rgba(201,164,92,0.2); color: var(--gold); border: 1px solid rgba(201,164,92,0.4); }

.mg-desc { font-size: 13px; color: var(--ink); line-height: 1.8; padding: 12px 14px; background: rgba(255,255,255,0.02); border-radius: 4px; margin-bottom: 14px; }

.mg-bz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 768px) { .mg-bz-grid { grid-template-columns: 1fr; } }
.mg-bz-col { padding: 10px 12px; border-radius: 4px; }
.ji-col { background: rgba(106,191,106,0.05); border: 1px solid rgba(106,191,106,0.2); }
.xiong-col { background: rgba(200,69,60,0.05); border: 1px solid rgba(200,69,60,0.2); }
.mg-bz-title { font-size: 12.5px; font-weight: 600; letter-spacing: 1.5px; margin-bottom: 8px; }
.ji-col .mg-bz-title { color: #9bd09b; }
.xiong-col .mg-bz-title { color: #e8a8a0; }

.mg-bz-row { display: grid; grid-template-columns: 56px 60px 1fr; gap: 8px; align-items: center; padding: 6px 0; font-size: 11.5px; border-bottom: 1px dashed rgba(255,255,255,0.05); }
.mg-bz-row:last-child { border-bottom: none; }
.mg-bz-name { font-weight: 700; letter-spacing: 1px; }
.mg-ji .mg-bz-name { color: #9bd09b; }
.mg-xiong .mg-bz-name { color: #e8a8a0; }
.mg-bz-pos { color: var(--gold); font-size: 11px; }
.mg-bz-xing { color: var(--ink-dim); font-size: 11px; }
.mg-bz-desc { color: var(--ink-faint); font-size: 10.5px; grid-column: 1 / -1; margin-top: 2px; padding-left: 64px; }
@media (max-width: 768px) { .mg-bz-row { grid-template-columns: 50px 55px 1fr; } .mg-bz-desc { padding-left: 0; } }

.mg-src { font-size: 10.5px; color: var(--ink-faint); font-style: italic; padding-top: 8px; border-top: 1px dashed rgba(201,164,92,0.15); }
.xiu-pill.is-self { background: var(--gold); color: #1a1410 !important; border-color: var(--gold); font-weight: 700; box-shadow: 0 0 8px rgba(201,164,92,0.4); }
.xiu-pill:hover { transform: translateY(-1px); }

/* ========== 身强弱算法详解 ========== */
.algo-block { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; }
.algo-section { padding: 10px 14px; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 3px; }
.algo-section.algo-source { border-left-color: rgba(168, 182, 200, 0.4); background: rgba(168, 182, 200, 0.04); }
.algo-h { font-size: 13px; color: var(--gold); font-weight: 700; letter-spacing: 1px; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1px dashed rgba(201, 164, 92, 0.2); }
.algo-p { font-size: 13px; color: var(--ink); line-height: 1.9; margin-bottom: 6px; }
.algo-p:last-child { margin-bottom: 0; }
.algo-p b { color: var(--gold-bright); font-weight: 600; }
.algo-thresh { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.algo-thresh-row { display: grid; grid-template-columns: 90px 70px 1fr; gap: 10px; padding: 6px 10px; background: rgba(255, 255, 255, 0.02); border-radius: 2px; align-items: center; font-size: 12.5px; }
.algo-thresh-row .t-pct { font-family: 'Courier New', monospace; color: var(--ink); font-weight: 700; letter-spacing: 1px; }
.algo-thresh-row .t-lbl { font-weight: 700; font-size: 13px; }
.algo-thresh-row .t-desc { color: var(--ink-faint); font-size: 12px; }
/* 本盘计算过程 */
.calc-formula { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: linear-gradient(90deg, rgba(201, 164, 92, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%); border-radius: 3px; flex-wrap: wrap; }
.calc-formula .cf-lbl { font-size: 11px; color: var(--ink-faint); letter-spacing: 1px; }
.calc-formula .cf-val { font-size: 13.5px; font-weight: 600; padding: 2px 8px; background: rgba(255, 255, 255, 0.06); border-radius: 3px; font-family: 'Courier New', monospace; min-width: 28px; text-align: center; }
.calc-formula .cf-op { font-size: 14px; color: var(--ink-faint); padding: 0 2px; }
.calc-formula .cf-result { font-size: 15px; font-weight: 700; padding: 3px 10px; border-radius: 3px; background: rgba(201, 164, 92, 0.18); border: 1px solid rgba(201, 164, 92, 0.4); letter-spacing: 1px; }
.calc-detail { font-size: 12.5px; color: var(--ink-dim); line-height: 1.9; margin-top: 10px; }
.calc-detail b { color: var(--gold-bright); font-weight: 600; }
.bing-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.bing-cell { padding: 10px 8px; background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.06); border-radius: 3px; text-align: center; position: relative; transition: all .2s ease; }
.bing-cell .bing-type { font-size: 11.5px; color: var(--ink-dim); letter-spacing: 1px; margin-bottom: 4px; }
.bing-cell .bing-num { font-size: 17px; font-weight: 700; color: var(--ink); font-family: 'Courier New', monospace; }
.bing-cell .bing-tag { margin-top: 4px; font-size: 10.5px; color: #e8c87e; letter-spacing: 1px; }
.bing-cell.is-bing { background: linear-gradient(180deg, rgba(201, 164, 92, 0.12) 0%, rgba(201, 164, 92, 0.04) 100%); border-color: rgba(201, 164, 92, 0.5); box-shadow: 0 0 12px rgba(201, 164, 92, 0.12); }
.bing-cell.is-bing .bing-type { color: var(--gold); font-weight: 700; }
.bing-cell.is-bing .bing-num { color: var(--gold-bright); }

/* ═══════════ ui-ux-pro-max 审计优化 ═══════════ */

/* [P1] 全局 focus-visible：键盘导航可见焦点环 */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
/* 鼠标点击不显示焦点环（仅键盘导航时显示） */
:focus:not(:focus-visible) { outline: none; }

/* [P2] prefers-reduced-motion：尊重用户无障碍设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* [P3] 响应式增强：平板/PC 端（≥768px）适度放宽 */
@media (min-width: 768px) {
  body { max-width: 820px; }
  html { font-size: 16px; }
  .input-card { margin: 20px; padding: 24px; }
  .chart-head { margin: 20px 20px 0; padding: 18px 20px; }
  .tabs { margin: 16px 20px 0; }
  .tabpage { padding: 16px 20px 28px; }
  .topbar { padding: 22px 22px 14px; }
  .pan-table th, .pan-table td { padding: 8px 4px; }
  .pan-table .gan-big, .pan-table .zhi-big { font-size: 28px; }
}

/* [P3] 超宽屏（≥1024px）再放宽一档 */
@media (min-width: 1024px) {
  body { max-width: 920px; }
  html { font-size: 16px; }
}

/* [P4] 触摸目标最小尺寸：可点击元素不小于 44×44px */
@media (max-width: 420px) {
  .tab { min-height: 44px; }
  .seg-btn { min-height: 44px; }
  .btn-primary { min-height: 48px; }
  .btn-ghost { min-height: 48px; }
  .ss-tag { min-height: 30px; }
}

/* ═══════════════════ 合盘页 ═══════════════════ */
/* 合盘 tab 与其他 tab 统一样式（曾用 .tab-hepan 常亮金色引导注意，已按反馈移除） */

/* ── 关系选择器 ── */
.hp-rel-grid { display: grid; grid-template-columns: 1fr 1fr 1.8fr; gap: 18px; }
.hp-rel-cat { display: flex; flex-direction: column; gap: 8px; }
.hp-rel-cat-label { font-size: 11px; color: var(--muted); letter-spacing: 2px; padding-left: 4px; }
.hp-rel-cat-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.hp-rel-cat:last-child .hp-rel-cat-btns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hp-rel-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 48px; min-width: 0; padding: 10px 8px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; transition: all .18s ease;
  font-family: var(--sans);
}
.hp-rel-btn:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.hp-rel-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(212,175,55,.18), rgba(212,175,55,.05));
  box-shadow: 0 2px 12px rgba(212,175,55,.2);
}
.hp-rel-icon { flex: none; font-size: 17px; line-height: 1; }
.hp-rel-label { font-size: 12px; color: var(--ink); }
.hp-rel-btn.active .hp-rel-label { color: var(--gold); font-weight: 600; }
.hp-rel-btn:focus-visible, .hp-record-retry:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.hp-rel-label { min-width: 0; overflow-wrap: normal; line-height: 1.4; }
.hp-relation-description { margin: 0 0 18px; color: var(--ink-dim); font-size: 12px; line-height: 1.7; }

/* ── 双方信息表单 ── */
.hp-asym-note { color: var(--gold); }
.hp-form-grid {
  display: grid; grid-template-columns: minmax(0,1fr) 64px minmax(0,1fr); gap: 0;
  align-items: stretch;
}
.hp-side {
  display: flex; flex-direction: column; gap: 16px; min-width: 0;
  padding: 20px; background: var(--bg2); border-radius: 12px;
  border: 1px solid var(--line);
}
.hp-side-label {
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--muted); letter-spacing: 1px;
}
.hp-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  font-size: 12px; font-weight: 700; color: #fff;
}
.hp-badge-a { background: linear-gradient(135deg, #d4af37, #b8962a); }
.hp-badge-b { background: linear-gradient(135deg, #7fb069, #5a8a46); }
.hp-side-info { display: flex; flex: 1; flex-direction: column; justify-content: center; gap: 14px; min-width: 0; }
.hp-side-name { overflow-wrap: anywhere; }
.hp-side-birth { color: var(--ink-dim); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.hp-side-pillars { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; margin: 3px 0; }
.hp-side-pillars > span { display: grid; gap: 9px; justify-items: center; padding: 13px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.hp-side-pillars small { color: var(--ink-faint); font: 10px/1.4 var(--sans); }
.hp-side-pillars strong { color: var(--gold); font: 22px/1.3 var(--serif); }
.hp-saved-picker { min-width: 0; }
.hp-saved-picker > label, .hp-field-label { display: block; color: var(--ink-dim); font-size: 11px; line-height: 1.6; }
.hp-saved-picker select { display: block; width: 100%; max-width: 100%; margin-top: 7px; text-overflow: ellipsis; }
.hp-source-note, .hp-empty-note { margin: 7px 0 0; color: var(--ink-faint); font-size: 11px; line-height: 1.8; }
.hp-record-preview { display: grid; align-content: start; gap: 10px; min-width: 0; padding-top: 16px; border-top: 1px solid var(--line); }
.hp-record-mode { justify-self: start; padding: 3px 9px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-dim); font-size: 11px; }
.hp-record-retry { justify-self: start; min-height: 44px; padding: 8px 14px; border: 1px solid var(--gold-dim); border-radius: 8px; color: var(--gold); background: transparent; cursor: pointer; }
.hp-form-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.hp-form-actions p { margin: 0; color: var(--ink-faint); font-size: 11px; line-height: 1.7; }
.hp-form-actions .hp-run { flex: none; min-width: 180px; min-height: 46px; }
.hp-run:disabled { opacity: .45; cursor: default; transform: none; box-shadow: none; }
.hp-empty-note { text-align: center; margin: 18px 0; }
.hp-side-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.hp-side-gz { font-size: 12px; color: var(--muted); font-family: var(--serif); letter-spacing: 1px; }
.hp-side-day { font-size: 12px; color: var(--gold); }
.hp-side-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 16px 0; }
.hp-vs {
  position: relative; display: grid; place-items: center;
  align-self: center; height: 44px;
}
.hp-vs::before {
  content: ''; position: absolute; inset: 50% 0 auto; height: 1px;
  background: linear-gradient(90deg, var(--gold-dim), #7fb069);
}
.hp-vs-circle {
  position: relative; display: block; box-sizing: border-box;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%;
  background: var(--card); color: transparent; font-size: 0;
  box-shadow: 0 0 0 5px var(--card);
}
.hp-vs-circle::before, .hp-vs-circle::after {
  content: ''; position: absolute; top: 12px; width: 14px; height: 14px;
  box-sizing: border-box; border: 1.5px solid var(--gold); border-radius: 50%;
}
.hp-vs-circle::before { left: 7px; }
.hp-vs-circle::after { right: 7px; border-color: #7fb069; }
.hp-inputs { display: flex; flex-direction: column; gap: 8px; }
.hp-input-row { display: flex; gap: 6px; }
.hp-input-row:last-child { flex-wrap: wrap; }
.hp-input-row > select:first-child { flex: 2 1 180px; }
.hp-input-row > select:last-child { flex: 1 1 70px; }
.hp-input {
  flex: 1; width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); font-size: 16px; font-family: var(--sans);
}
.hp-input:focus { outline: none; border-color: var(--gold-dim); box-shadow: 0 0 0 2px rgba(212,175,55,.15); }
.hp-run {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--gold), #b8962a);
  color: #fff; border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .18s ease; letter-spacing: 1px;
}
.hp-run:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(212,175,55,.4); }
.hp-run:active { transform: translateY(0); }
.hp-error { color: #e74c3c; }

@media (min-width: 901px) {
  .hp-rel-btn { flex-direction: column; gap: 6px; }
}
@media (max-width: 900px) {
  .hp-rel-grid { grid-template-columns: 1fr; gap: 9px; }
  .hp-rel-cat { display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: center; }
  .hp-rel-cat-btns, .hp-rel-cat:last-child .hp-rel-cat-btns { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .hp-side { padding: 15px; }
}
@media (max-width: 600px) {
  .hp-rel-cat { grid-template-columns: 42px minmax(0,1fr); gap: 6px; }
  .hp-rel-cat-btns, .hp-rel-cat:last-child .hp-rel-cat-btns { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hp-rel-btn { min-height: 44px; padding: 8px 6px; gap: 5px; }
  .hp-form .card-title { flex-wrap: wrap; gap: 6px; }
  .hp-form .card-title .src { margin-left: 0; flex-basis: 100%; }
  .hp-form-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hp-form-actions .hp-run { width: 100%; }
  .hp-side-pillars strong { font-size: 20px; }
}

/* ── 综合评分仪表 ── */
.hp-score-card { padding: 20px; }
.hp-score-hero { display: flex; align-items: center; gap: 24px; }
.hp-score-dial {
  position: relative;
  width: 120px; height: 120px; border-radius: 50%;
  background: conic-gradient(
    var(--grade-color, #d4af37) calc(var(--score, 0) * 1%),
    rgba(255,255,255,.06) 0
  );
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.45), inset 0 0 20px rgba(0,0,0,.4);
}
.hp-score-dial::before {
  content: ''; position: absolute; inset: 8px; border-radius: 50%;
  background: var(--card);
}
.hp-score-num { position: relative; font-size: 38px; font-weight: 700; color: var(--grade-color, var(--gold)); line-height: 1; font-family: var(--serif); }
.hp-score-unit { position: relative; font-size: 11px; color: var(--muted); margin-top: 2px; }
.hp-score-meta { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.hp-score-grade { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.hp-score-rel { font-size: 13px; color: var(--muted); }
.hp-score-day { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-top: 4px; }
.hp-day-a, .hp-day-b { padding: 3px 10px; background: var(--bg2); border-radius: 12px; border: 1px solid var(--line); }
.hp-day-vs { color: var(--gold); font-weight: 700; font-size: 15px; }
.hp-score-summary {
  margin-top: 14px; padding: 12px 14px;
  background: linear-gradient(135deg, rgba(212,175,55,.08), rgba(212,175,55,.02));
  border-radius: 4px;
  font-size: 13px; line-height: 1.7; color: var(--ink);
}

/* ── 双盘对照 + SVG 连线 ── */
.hp-pan-card { overflow: hidden; }
.hp-pan-wrap {
  position: relative;
  display: grid; grid-template-columns: 1fr 60px 1fr; gap: 0;
  padding: 12px 0;
}
.hp-pan { position: relative; z-index: 2; }
.hp-links {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hp-links path {
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: hp-draw 0.6s ease-out forwards;
  pointer-events: stroke; cursor: pointer;
  opacity: .75; transition: opacity .15s ease;
}
.hp-links path:hover { opacity: 1; stroke-width: 3.5 !important; }
@keyframes hp-draw {
  to { stroke-dashoffset: 0; }
}
.hp-legend {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 10px 4px 0; margin-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--muted);
}
.hp-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.hp-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* 迷你命盘 */
.mini-pan {
  display: grid; grid-template-columns: auto repeat(4, 1fr); gap: 6px;
  padding: 8px; background: var(--bg2); border-radius: 10px;
  border: 1px solid var(--line);
}
.mini-pan-side {
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--gold);
  writing-mode: vertical-rl; letter-spacing: 2px;
  padding: 0 4px;
}
.mini-pan-b .mini-pan-side { color: #7fb069; }
.mini-pillar {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; background: var(--card); border-radius: 6px;
  border: 1px solid var(--line);
  cursor: pointer; transition: all .15s ease;
}
.mini-pillar:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.mini-pillar-day { border-color: var(--gold); background: linear-gradient(135deg, rgba(212,175,55,.12), rgba(212,175,55,.03)); }
.mini-pillar-label { font-size: 10px; color: var(--muted); }
.mini-pillar-gan { font-size: 18px; font-weight: 700; font-family: var(--serif); }
.mini-pillar-zhi { font-size: 18px; font-weight: 700; font-family: var(--serif); }

/* ── 日干/日支关键关系 ── */
.hp-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.hp-key-rel { padding: 14px 16px; }
.hp-key-label { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; margin-bottom: 8px; }
.hp-key-pair { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 24px; font-weight: 700; font-family: var(--serif); margin: 10px 0; }
.hp-key-tag {
  padding: 3px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600; color: #fff;
  letter-spacing: 1px;
}
.hp-key-desc { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; }

/* ── 十神互补 ── */
.hp-ss-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp-ss-item { padding: 12px; background: var(--bg2); border-radius: 8px; text-align: center; }
.hp-ss-role { font-size: 11px; color: var(--muted); margin-bottom: 6px; letter-spacing: 1px; }
.hp-ss-val { font-size: 20px; font-weight: 700; color: var(--gold); font-family: var(--serif); margin-bottom: 4px; }
.hp-ss-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ── 喜用神互补 ── */
.hp-fuyi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp-fuyi-side { padding: 10px; background: var(--bg2); border-radius: 8px; }
.hp-fuyi-label { font-size: 12px; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.hp-fuyi-item { font-size: 12px; color: var(--muted); line-height: 1.6; padding: 3px 0; }
.hp-fuyi-good { color: #7fb069; }
.hp-fuyi-bad { color: #e74c3c; }

/* ── 五行补缺 ── */
.hp-wuxing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hp-wuxing-side { padding: 10px; background: var(--bg2); border-radius: 8px; }
.hp-wuxing-label { font-size: 12px; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.hp-wuxing-row { font-size: 12px; color: var(--muted); padding: 2px 0; }
.hp-wuxing-missing { color: #e74c3c; font-weight: 600; }
.hp-wuxing-overflow { color: #c9a227; font-weight: 600; }
.hp-wuxing-help { font-size: 11px; color: #7fb069; margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }

/* ── 纳音配合 ── */
.hp-nayin-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.hp-nayin-item { padding: 14px; background: var(--bg2); border-radius: 8px; text-align: center; }
.hp-nayin-label { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.hp-nayin-val { font-size: 16px; font-weight: 700; color: var(--gold); font-family: var(--serif); }
.hp-nayin-rel { font-size: 13px; color: var(--muted); padding: 4px 10px; background: var(--bg2); border-radius: 12px; }

/* ── 大运同步条 ── */
.hp-dayun-strip { display: flex; flex-direction: column; gap: 8px; }
.hp-dayun-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.hp-dayun-side {
  font-size: 13px; font-weight: 700; color: var(--gold);
  padding: 4px 8px; background: var(--bg2); border-radius: 6px;
}
.hp-dayun-b .hp-dayun-side { color: #7fb069; }
.hp-dayun-items {
  display: flex; gap: 4px; overflow-x: auto; padding: 4px 0;
  scroll-snap-type: x mandatory;
}
.hp-dayun-item {
  flex: 0 0 auto; min-width: 56px;
  padding: 4px 8px; background: var(--bg2); border-radius: 6px;
  text-align: center; border: 1px solid var(--line);
  scroll-snap-align: start;
}
.hp-dayun-now { border-color: var(--gold); background: linear-gradient(135deg, rgba(212,175,55,.15), rgba(212,175,55,.03)); animation: hp-pulse 2s ease-in-out infinite; }
.hp-dayun-gz { font-size: 13px; font-weight: 700; color: var(--ink); font-family: var(--serif); }
.hp-dayun-year { font-size: 10px; color: var(--muted); }
@keyframes hp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,.4); }
  50% { box-shadow: 0 0 0 6px rgba(212,175,55,0); }
}

/* ── 入场动画 ── */
.hp-relations, .hp-form, .hp-score-card, .hp-pan-card, .hp-key-rel {
  animation: hp-fade-in-up 0.5s ease-out backwards;
}
.hp-form { animation-delay: 0.1s; }
.hp-score-card { animation-delay: 0.15s; }
.hp-pan-card { animation-delay: 0.2s; }
.hp-key-rel:nth-child(1) { animation-delay: 0.25s; }
.hp-key-rel:nth-child(2) { animation-delay: 0.3s; }
@keyframes hp-fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 尊重减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .hp-links path { animation: none; stroke-dashoffset: 0; }
  .hp-dayun-now { animation: none; }
  .hp-relations, .hp-form, .hp-score-card, .hp-pan-card, .hp-key-rel { animation: none; }
  .hp-rel-btn, .hp-run { transition: none; }
  .hp-rel-btn:hover, .hp-run:hover { transform: none; }
}

/* 手机端适配 */
@media (max-width: 640px) {
  .hp-form-grid { grid-template-columns: minmax(0,1fr); gap: 0; }
  .hp-vs { height: 64px; }
  .hp-vs::before { inset: 0 auto 0 50%; width: 1px; height: auto; background: linear-gradient(var(--gold-dim), #7fb069); }
  .hp-pan-wrap { grid-template-columns: 1fr; gap: 8px; }
  .hp-links { display: none; }  /* 窄屏不画连线，改为列表展示 */
  .hp-duo { grid-template-columns: 1fr; }
  .hp-ss-grid, .hp-fuyi-grid, .hp-wuxing-grid { grid-template-columns: 1fr; }
  .hp-rel-cat-btns { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hp-score-hero { flex-direction: column; gap: 14px; text-align: center; }
}

/* ── 大运同步分析 ── */
.hp-daysync-card { padding: 18px 16px; }
.hp-sync-hero {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  padding: 12px 0 16px;
  border-bottom: 1px dashed var(--line);
}
.hp-sync-stat { text-align: center; }
.hp-sync-num { font-size: 26px; font-weight: 700; font-family: var(--serif); line-height: 1; }
.hp-sync-label { font-size: 11px; color: var(--ink); margin-top: 6px; letter-spacing: 1px; }
.hp-sync-note { font-size: 10px; color: var(--muted); margin-top: 2px; }
.hp-sync-interpret {
  margin: 12px 0; padding: 10px 14px;
  background: linear-gradient(135deg, rgba(212,175,55,.08), rgba(212,175,55,.02));
  border-radius: 4px;
  font-size: 13px; line-height: 1.7; color: var(--ink);
}
.hp-sync-timeline {
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 4px;
  scroll-snap-type: x mandatory;
}
.hp-sync-item {
  flex: 0 0 auto; min-width: 84px;
  padding: 8px 6px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 8px;
  scroll-snap-align: start; text-align: center;
  cursor: pointer; transition: all .15s ease;
}
.hp-sync-item:hover { transform: translateY(-2px); border-color: var(--gold-dim); }
.hp-sync-now { border-color: var(--gold); box-shadow: 0 3px 10px rgba(0,0,0,.35); }
.hp-sync-item-year { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.hp-sync-item-pair { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.hp-sync-item-gz {
  font-size: 13px; font-weight: 700; font-family: var(--serif);
  display: flex; align-items: center; gap: 4px;
}
.hp-sync-a { color: var(--gold); }
.hp-sync-b { color: #7fb069; }
.hp-sync-favor { font-size: 10px; padding: 1px 4px; background: var(--card); border-radius: 4px; color: var(--muted); font-weight: 400; }
.hp-sync-item-bar { width: 24px; height: 3px; border-radius: 2px; }
.hp-sync-item-label { font-size: 10px; margin-top: 6px; font-weight: 600; letter-spacing: 1px; }
.hp-sync-legend {
  display: flex; flex-wrap: wrap; gap: 12px;
  padding: 10px 4px 0; margin-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11px; color: var(--muted);
}

/* ── 关系专项分析 ── */
.hp-focus-card { padding: 18px 16px; }
.hp-focus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp-focus-item {
  padding: 12px; background: var(--bg2); border-radius: 10px;
  border: 1px solid var(--line);
  transition: all .18s ease;
}
.hp-focus-item:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.hp-focus-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.hp-focus-icon { font-size: 18px; }
.hp-focus-title { font-size: 13px; font-weight: 700; color: var(--gold); letter-spacing: 1px; }
.hp-focus-pair {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px;
  align-items: center; margin-bottom: 10px;
}
.hp-focus-side { text-align: center; padding: 6px 8px; background: var(--card); border-radius: 6px; }
.hp-focus-side-label { font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.hp-focus-side-val { font-size: 12px; color: var(--ink); font-weight: 600; line-height: 1.4; }
.hp-focus-rel { font-size: 11px; font-weight: 600; padding: 4px 8px; background: var(--card); border-radius: 10px; text-align: center; white-space: nowrap; }
.hp-focus-desc { font-size: 11px; color: var(--muted); line-height: 1.6; padding-top: 8px; border-top: 1px dashed var(--line); }

@media (max-width: 640px) {
  .hp-sync-hero { grid-template-columns: repeat(2, 1fr); }
  .hp-focus-grid { grid-template-columns: 1fr; }
  .hp-focus-pair { grid-template-columns: 1fr; gap: 6px; }
}

/* ── 用神出处小标签 ── */
.k-src {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  font-size: 10px; font-weight: 400; letter-spacing: 0;
  color: var(--gold); background: rgba(212,175,55,.1);
  border: 1px solid rgba(212,175,55,.3); border-radius: 8px;
  vertical-align: 1px;
}

/* ── 喜用神卡·病药双法对照区 ── */
.ys-compare-block { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ys-compare-block .yongshen-label { display: flex; align-items: center; }
.ys-compare-row { display: flex; gap: 10px; padding: 7px 4px; align-items: baseline; }
.ys-compare-row + .ys-compare-row { border-top: 1px dotted rgba(255,255,255,.05); }
.ys-compare-k { flex: 0 0 64px; font-size: 11px; color: var(--ink-faint); letter-spacing: 1px; }
.ys-compare-v { font-size: 15px; font-weight: 700; font-family: var(--serif); white-space: nowrap; }
.ys-compare-n { font-size: 11px; color: var(--muted); line-height: 1.6; flex: 1; }

/* ── tab 切换过渡 ── */
.tabpage { animation: tabpage-in .28s ease-out; }
@keyframes tabpage-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .tabpage { animation: none; }
}

/* ── 五行条形图生长动画 ── */
.wx-bar-fill { animation: wx-bar-grow .8s cubic-bezier(.22,.9,.26,1) backwards; }
.wx-bar-row:nth-child(2) .wx-bar-fill { animation-delay: .06s; }
.wx-bar-row:nth-child(3) .wx-bar-fill { animation-delay: .12s; }
.wx-bar-row:nth-child(4) .wx-bar-fill { animation-delay: .18s; }
.wx-bar-row:nth-child(5) .wx-bar-fill { animation-delay: .24s; }
@keyframes wx-bar-grow { from { width: 0; } }
@media (prefers-reduced-motion: reduce) {
  .wx-bar-fill { animation: none; }
}

/* ── 手机端：tabs 保持均分，极小屏可横滚兜底 ── */
@media (max-width: 640px) {
  .tabs {
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 1 0 auto; min-width: 52px; white-space: nowrap; padding: 12px 6px; }
}

/* ── 头部忌神徽章：双法并列 ── */
.badge-src {
  display: inline-block; margin-left: 5px; padding: 0 5px;
  font-size: 9px; font-weight: 400; line-height: 14px;
  color: var(--gold); background: rgba(212,175,55,.12);
  border: 1px solid rgba(212,175,55,.35); border-radius: 7px;
  vertical-align: 1px; letter-spacing: 0;
}
.badge-ji-alt { opacity: .68; font-size: 11px; }
.badge-ji-alt .badge-src { opacity: .85; }
.ys-chou {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  font-size: 11px; color: #e8c87e;
  background: rgba(232,200,126,.08); border: 1px solid rgba(232,200,126,.3);
  border-radius: 8px;
}

/* ── 城市自动搜索下拉 ── */
.city-ac-wrap { position: relative; flex: 1; min-width: 0; display: flex; }
.city-ac-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60;
  max-height: 264px; overflow-y: auto;
  background: var(--card); border: 1px solid var(--gold-dim); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.city-ac-list.hidden { display: none; }
.city-ac-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; cursor: pointer;
  border-bottom: 1px solid var(--line);
  transition: background .12s ease;
}
.city-ac-item:last-child { border-bottom: none; }
.city-ac-item:hover, .city-ac-item.active { background: rgba(212,175,55,.12); }
.city-ac-name { font-size: 13px; color: var(--ink); }
.city-ac-item.active .city-ac-name { color: var(--gold); font-weight: 600; }
.city-ac-meta { font-size: 10px; color: var(--muted); white-space: nowrap; }


/* City search remains a compact input; the catalogue scrolls inside its popover. */
.city-field { min-width:0; }
.city-ac-wrap { display:block; width:100%; }
.city-ac-input { position:relative; display:flex; min-width:0; }
.city-ac-input input { width:100%; min-width:0; padding-right:40px !important; }
.city-ac-toggle { position:absolute; right:0; top:0; bottom:0; width:40px; border:0; background:transparent; color:var(--muted); cursor:pointer; border-radius:10px; }
.city-ac-toggle:focus-visible { outline:2px solid var(--gold); outline-offset:-3px; }
.city-ac-list { top:calc(100% + 6px); max-height:min(320px,50vh); overscroll-behavior:contain; border-radius:12px; background:#17211f; z-index:40; }
.city-ac-item { min-height:48px; padding:9px 12px; gap:12px; }
.city-ac-name { min-width:0; overflow-wrap:anywhere; }
.city-ac-name small,.city-ac-meta small { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.city-ac-meta { flex-shrink:0; text-align:right; }
.city-ac-group { position:sticky; top:0; padding:7px 12px; background:#1c2925; color:#9cafaa; font-size:10px; z-index:1; }
.city-ac-foot { padding:10px 12px; color:var(--muted); font-size:10px; line-height:1.6; }
.city-ac-foot a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
.city-status { margin:6px 0 0; color:var(--muted); font-size:11px; line-height:1.55; }
.city-occurrence { display:grid; gap:6px; margin-top:8px; color:var(--ink-dim); font-size:11px; }
.city-occurrence[hidden] { display:none; }
.city-occurrence select { min-height:40px; width:100%; }

/* ── 真太阳时换算卡 ── */
.tst-card {
  margin-top: 8px; padding: 10px 12px;
  background: linear-gradient(135deg, rgba(212,175,55,.07), rgba(212,175,55,.02));
  border: 1px solid rgba(212,175,55,.3); border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px;
  animation: hp-fade-in-up .35s ease-out;
}
.tst-step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tst-k {
  flex: 0 0 64px; font-size: 11px; color: var(--muted); letter-spacing: 1px;
}
.tst-v { font-size: 15px; font-weight: 700; color: var(--ink); font-family: var(--serif); letter-spacing: 1px; }
.tst-final .tst-k { color: var(--gold); }
.tst-final .tst-v { color: var(--gold); font-size: 17px; }
.tst-tag {
  margin-left: auto; font-size: 10px; color: var(--muted);
  padding: 2px 8px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px;
}
.tst-tag-final { color: var(--gold); border-color: rgba(212,175,55,.4); background: rgba(212,175,55,.1); }
.tst-arrow {
  padding-left: 74px; font-size: 11px; color: #c9a227;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.tst-arrow::before { content: '↓'; color: var(--gold); font-weight: 700; }
.tst-arrow-note { color: var(--muted); font-size: 10px; }
.tst-err { margin-top: 6px; font-size: 12px; color: #e8a87e; }
@media (max-width: 640px) {
  .tst-arrow { padding-left: 8px; }
  .tst-k { flex-basis: 56px; }
}

/* ── 受生债（禄库）卡片 ── */
.ss-debt-card { padding: 16px; }
.ssd-dq {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(212,175,55,.14), rgba(212,175,55,.04));
  border: 1px solid rgba(212,175,55,.4); border-radius: 10px;
}
.ssd-dq-label { font-size: 10px; color: var(--muted); letter-spacing: 2px; }
.ssd-dq-val { font-size: 18px; font-weight: 700; color: var(--gold); font-family: var(--serif); letter-spacing: 1px; }
.ssd-dq-note { font-size: 10px; color: var(--muted); margin-left: auto; }
.ssd-pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.ssd-pillar { padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; }
.ssd-missing { opacity: .62; border-style: dashed; }
.ssd-pillar-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ssd-pillar-name { font-size: 13px; font-weight: 700; color: var(--gold); }
.ssd-pillar-gz { font-size: 13px; font-weight: 600; color: var(--ink); font-family: var(--serif); }
.ssd-item { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 0; }
.ssd-item-label { font-size: 11px; color: var(--muted); }
.ssd-item-guan { font-size: 12px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ssd-item-note { font-size: 10px; color: #c9a227; padding: 1px 0 3px; }
.ssd-subtotal {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line);
  font-size: 12px; font-weight: 700; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.ssd-total {
  margin-top: 14px; padding: 12px 16px; text-align: center;
  background: linear-gradient(135deg, rgba(212,175,55,.16), rgba(212,175,55,.05));
  border: 1px solid rgba(212,175,55,.45); border-radius: 10px;
}
.ssd-total-label { font-size: 11px; color: var(--muted); letter-spacing: 2px; }
.ssd-total-val { font-size: 30px; font-weight: 700; color: var(--gold); font-family: var(--serif); line-height: 1.2; }
.ssd-total-raw { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ═══════════ v6 visual system ═══════════
   A focused visual layer for the working app: clearer hierarchy, calmer
   surfaces, and a more useful first viewport without changing data/UI hooks.
*/
:root {
  --bg: #0d1117;
  --bg2: #121820;
  --card: #171d26;
  --card2: #1d2631;
  --line: #2a3544;
  --line-strong: #3b495a;
  --ink: #edf0f2;
  --ink-dim: #a7b1bd;
  --ink-faint: #7f8c9c;
  --muted: #8b98a8;
  --gold: #e2b86d;
  --gold-dim: #a77d43;
  --gold-soft: #f0cf91;
  --gold-bright: #f4dba6;
  --red: #dc766c;
  --teal: #73b7ad;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: system-ui, -apple-system, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
  width: 100%;
  max-width: 960px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  background-image: none;
}

.back-bar {
  min-height: 42px;
  padding: 14px 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.back-bar a {
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 1px;
  transition: color .16s ease;
}
.back-bar a:hover { color: var(--gold-soft); }
.privacy-note {
  color: var(--ink-faint);
  font-size: 10px;
  letter-spacing: .5px;
}
.back-bar.ms-site-bar { display: grid; grid-template-columns: auto minmax(0,1fr) auto; }
.ms-site-bar > a { white-space: nowrap; }
.ms-site-bar .privacy-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.ms-site-account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.ms-site-account-actions .ms-account-entry { flex: 0 0 auto; min-height: 44px; }
.ms-site-bar #memberAccountHost { position: static; z-index: auto; flex: 0 1 auto; min-width: 0; max-width: 240px; }
.ms-site-bar #memberAccountHost .xunq-account-button { min-width: 0; max-width: 100%; }
@media (max-width: 640px) {
  .back-bar.ms-site-bar { grid-template-columns: auto minmax(0,1fr); gap: 10px; }
  .ms-site-bar .privacy-note { display: none; }
  .ms-site-account-actions .ms-account-entry { padding-inline: 9px; }
  .ms-site-bar #memberAccountHost .xunq-account-button { padding-inline: 10px; }
}

.brand-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 8px 16px 18px;
  padding: 22px 24px;
  background: #161c24;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.brand-hero::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 2px;
  background: var(--gold-dim);
  opacity: .65;
}
.brand-seal {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
  box-shadow: inset 0 0 0 5px rgba(226,184,109,.06);
}
.brand-copy { min-width: 0; }
.brand-eyebrow, .section-eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}
.brand-copy h1 {
  margin: 0;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: 7px;
  line-height: 1.15;
}
.brand-subtitle {
  margin: 5px 0 0;
  color: var(--ink-dim);
  font-size: 12px;
  letter-spacing: 3px;
}
.input-card {
  margin: 0 16px 22px;
  padding: 22px 24px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
}
.input-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.input-card-title-wrap { display: flex; align-items: center; gap: 12px; }
.section-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--gold-soft);
  border: 1px solid var(--gold-dim);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}
.input-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 2px;
  line-height: 1.2;
}
.input-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 10px;
  white-space: nowrap;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(115,183,173,.12);
}
.input-row { gap: 16px; margin-bottom: 12px; }
.input-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
}
.input-row input, .input-row select, .input-row textarea {
  min-height: 42px;
  background: var(--bg2);
  border-color: var(--line);
  border-radius: 8px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.input-row input:hover, .input-row select:hover, .input-row textarea:hover { border-color: var(--line-strong); }
.input-row input:focus, .input-row select:focus, .input-row textarea:focus {
  border-color: var(--gold-dim);
  background: #151d27;
  box-shadow: 0 0 0 3px rgba(226,184,109,.09);
}
.seg { border-color: var(--line); border-radius: 8px; }
.seg { min-width: 0; width: 100%; }
.seg-btn { min-width: 0; min-height: 40px; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-btn:hover { color: var(--ink); background: rgba(255,255,255,.035); }
.seg-btn.active { background: var(--gold); color: #18150f; }
.mode-pane {
  margin: 8px 0 14px;
  padding: 14px 14px 4px;
  background: rgba(13,17,23,.45);
  border: 1px solid rgba(59,73,90,.7);
  border-radius: 10px;
}
.input-actions { gap: 12px; margin-top: 18px; }
.btn-primary {
  min-height: 46px;
  background: var(--gold);
  border-radius: 8px;
  box-shadow: 0 7px 16px rgba(226,184,109,.16);
  letter-spacing: 5px;
}
.btn-primary:hover { background: var(--gold-soft); box-shadow: 0 9px 20px rgba(226,184,109,.24); }
.btn-ghost { min-height: 46px; border-radius: 8px; border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(115,183,173,.07); border-color: var(--teal); color: var(--teal); }
.input-note { color: var(--ink-faint); line-height: 1.7; }

#result { padding-bottom: 20px; }
.chart-head {
  margin: 0 16px;
  padding: 20px 22px;
  background: #171e27;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold-dim);
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(0,0,0,.15);
}
.chart-head .ch-name { font-size: 20px; letter-spacing: 3px; }
.chart-head .ch-info { color: var(--muted); }
.chart-head .ch-info b { color: var(--ink); }
.badge { border-radius: 7px; }
.badge-core { padding: 6px 11px; }
.badge-gold { color: var(--gold-soft); border-color: var(--gold-dim); background: rgba(226,184,109,.08); }
.ch-badges-info { border-top-color: rgba(167,125,67,.35); }

.tabs {
  margin: 14px 16px 0;
  border-color: var(--line);
  background: rgba(23,29,38,.94);
  border-radius: 10px;
}
.tab { min-height: 44px; padding: 11px 4px; color: var(--muted); font-size: 13px; letter-spacing: 1.5px; }
.tab:hover { color: var(--ink); background: rgba(115,183,173,.05); }
.tab.active { color: var(--gold-soft); background: var(--card2); box-shadow: inset 0 -2px 0 var(--gold); }
.tabpage { padding: 16px 16px 26px; }
.card {
  padding: 18px;
  margin-bottom: 14px;
  background: var(--card);
  border-color: var(--line);
  border-radius: 12px;
}
.card-title { margin-bottom: 14px; color: var(--gold-soft); font-size: 15px; letter-spacing: 2px; }
.card-title::before { width: 3px; height: 15px; background: var(--gold-dim); }
.info-line { border-bottom-color: rgba(59,73,90,.68); }
.pan-table { background: var(--card); border-color: var(--line); }
.pan-table th, .pan-table td { border-color: var(--line); }
.pan-table .row-label, .pan-table .col-head { background: var(--bg2); }
.pan-table .col-head { color: var(--gold-soft); }
.footer { padding: 26px 20px 34px; }
.footer p { color: var(--ink-faint); line-height: 1.7; }

@media (max-width: 640px) {
  body { width: 100%; min-width: 0; }
  .privacy-note { display: none; }
  .back-bar { padding-left: 16px; padding-right: 16px; }
  .brand-hero, .input-card, .chart-head, .tabs { width: calc(100% - 24px); min-width: 0; max-width: calc(100% - 24px); }
  .brand-hero { grid-template-columns: auto 1fr; margin: 8px 12px 14px; padding: 18px; gap: 12px; }
  .input-card { margin: 0 12px 18px; padding: 18px 14px; border-radius: 14px; }
  .input-card-head { padding-bottom: 14px; margin-bottom: 14px; }
  .input-card h2 { font-size: 18px; }
  .input-card-status { font-size: 9px; }
  .input-row { align-items: stretch; flex-wrap: wrap; gap: 7px 0; min-width: 0; }
  .input-row > label:first-child { width: 100%; flex: 0 0 100%; }
  .input-row > input, .input-row > select, .input-row > textarea, .input-row > .seg, .input-row > .ymd-grid, .input-row > .inline-fields, .input-row > .city-ac-wrap { flex-basis: 100%; }
  .ymd-grid, .inline-fields, .city-ac-wrap { width: 100%; min-width: 0; }
  .ymd-grid, .inline-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ymd-grid input:first-child { flex: initial; }
  .input-row .leap-wrap { width: auto; flex: 0 0 auto; margin-right: 10px; }
  .mode-pane { padding: 12px 10px 2px; }
  .input-actions { flex-direction: column; }
  .btn-ghost, .btn-primary { width: 100%; }
  .chart-head { margin: 0 12px; padding: 17px 15px; }
  .chart-head .ch-info { width: 100%; text-align: left; padding-top: 8px; border-top: 1px dashed rgba(59,73,90,.7); }
  .tabs { margin-left: 12px; margin-right: 12px; }
  .tabpage { padding-left: 12px; padding-right: 12px; }
  .card { padding: 15px; }
}

@media (max-width: 390px) {
  .brand-hero { grid-template-columns: auto 1fr; }
  .brand-seal { width: 50px; height: 50px; font-size: 24px; }
  .brand-copy h1 { font-size: 24px; letter-spacing: 5px; }
  .brand-subtitle { letter-spacing: 2px; }
  .input-card-status { display: none; }
}

/* ═══════════ 细盘 · 流年作用图 ═══════════ */
.year-impact-card { border-color: rgba(226,184,109,.32); }
.year-impact-explain { margin: -2px 0 14px; color: var(--ink-dim); font-size: 12px; line-height: 1.8; }
.year-impact-map { overflow: hidden; border: 1px solid rgba(59,73,90,.82); border-radius: 12px; background: radial-gradient(circle at 50% 47%, rgba(226,184,109,.11), transparent 34%), linear-gradient(135deg, rgba(12,18,27,.94), rgba(22,31,43,.9)); }
.year-impact-stage { display: grid; grid-template-columns: minmax(130px, 1fr) 72px minmax(132px, 1.04fr) 72px minmax(130px, 1fr); align-items: center; gap: 5px; min-height: 188px; padding: 18px 12px 15px; }
.impact-source { min-width: 0; min-height: 142px; padding: 10px 10px 8px; border: 1px solid rgba(127,140,156,.3); border-radius: 10px; background: rgba(9,14,21,.54); box-shadow: inset 0 1px rgba(255,255,255,.025); }
.impact-source-stem { border-top: 2px solid rgba(226,184,109,.55); }
.impact-source-branch { border-bottom: 2px solid rgba(115,183,173,.54); }
.impact-source.role-yong { border-color: rgba(115,183,173,.66); }
.impact-source.role-xi { border-color: rgba(226,184,109,.68); }
.impact-source.role-ji { border-color: rgba(220,118,108,.68); }
.impact-source-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; letter-spacing: 1px; }
.impact-role, .impact-core-role { display: inline-flex; align-items: center; padding: 2px 6px; border: 1px solid rgba(127,140,156,.35); border-radius: 99px; color: var(--ink-dim); font-size: 9px; letter-spacing: .5px; white-space: nowrap; }
.role-yong { color: #9fd7c8; border-color: rgba(115,183,173,.56); background: rgba(115,183,173,.1); }
.role-xi { color: var(--gold-soft); border-color: rgba(226,184,109,.54); background: rgba(226,184,109,.09); }
.role-ji { color: #eca39b; border-color: rgba(220,118,108,.55); background: rgba(220,118,108,.09); }
.impact-source-main { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 5px; margin: 11px 0 9px; }
.impact-source-main b { font: 34px/1 var(--serif); }
.impact-source-main span { color: var(--ink-dim); font-size: 11px; }
.impact-source-main em { min-width: 0; overflow: hidden; color: var(--muted); font-size: 10px; font-style: normal; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.impact-source-status { display: grid; gap: 3px; padding-top: 7px; border-top: 1px dashed rgba(127,140,156,.25); }
.impact-source-status span { color: var(--ink-dim); font-size: 10px; }
.impact-source-status strong { color: var(--ink); font-size: 11px; line-height: 1.35; }
.impact-source p { min-height: 29px; margin: 7px 0 0; color: var(--ink-faint); font-size: 9.5px; line-height: 1.55; }
.impact-link { position: relative; display: grid; justify-items: center; align-content: center; min-width: 0; min-height: 94px; color: var(--ink-faint); }
.impact-link::before { content: ''; position: absolute; top: 50%; left: -2px; right: -2px; height: 1px; background: rgba(127,140,156,.32); }
.impact-link.relation-shengwo::before, .impact-link.relation-wosheng::before { background: rgba(115,183,173,.62); }
.impact-link.relation-kewo::before, .impact-link.relation-woke::before { background: repeating-linear-gradient(90deg, rgba(220,118,108,.74) 0 5px, transparent 5px 9px); }
.impact-link.relation-same::before { background: rgba(226,184,109,.58); }
.impact-arrow { position: relative; z-index: 1; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid rgba(127,140,156,.52); border-radius: 50%; background: #18212c; color: var(--ink); font-size: 16px; }
.impact-link-copy { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1px; margin-top: 5px; padding: 2px 4px; background: #18212c; text-align: center; }
.impact-link-copy b { color: var(--ink); font-size: 10px; white-space: nowrap; }
.impact-link-copy small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.impact-core { position: relative; z-index: 2; display: grid; justify-items: center; align-content: center; min-width: 0; width: 100%; min-height: 158px; padding: 13px 8px 10px; border: 1px solid rgba(226,184,109,.68); border-radius: 50%; background: radial-gradient(circle at 50% 42%, rgba(226,184,109,.19), rgba(18,28,39,.96) 62%); box-shadow: 0 0 0 7px rgba(226,184,109,.035), 0 0 25px rgba(226,184,109,.13); text-align: center; }
.impact-core > span { color: var(--muted); font-size: 9.5px; letter-spacing: 1.5px; }
.impact-core > b { margin: 3px 0 1px; font: 48px/.95 var(--serif); }
.impact-core > strong { color: var(--ink-dim); font-size: 10px; font-weight: 500; }
.impact-core-roles { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.impact-core-role { font-size: 8.5px; }
.year-impact-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 9px 12px; border-top: 1px solid rgba(127,140,156,.2); background: rgba(6,10,16,.36); color: var(--muted); font-size: 10px; }
.impact-dayun-context { color: var(--ink-dim); }
.year-impact-empty { padding: 16px 2px; color: var(--ink-dim); font-size: 12px; line-height: 1.8; }
.flow-year-stars-card { border-color: rgba(59,73,90,.9); }
.year-stars-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; border: 1px solid rgba(226,184,109,.23); border-radius: 9px; background: rgba(226,184,109,.045); }
.year-stars-summary > span { color: var(--muted); font-size: 10px; letter-spacing: 1px; }
.year-stars-summary b { font: 22px/1 var(--serif); letter-spacing: 3px; }
.year-stars-summary em { color: var(--ink-dim); font-size: 10px; font-style: normal; }
.year-star-group + .year-star-group { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(127,140,156,.22); }
.year-star-group-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.year-star-group-head span { color: var(--ink-dim); font-size: 11px; letter-spacing: 1px; }
.year-star-group-head small { color: var(--muted); font-size: 10px; }
.year-star-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.year-star-tags .ss-tag { min-height: 30px; appearance: none; font-family: var(--sans); background-color: transparent; }
.year-star-tags .ss-tag:active, .ts12-cell:active, .ln-cell:active, .dyc-chip:active { transform: scale(.98); }
.year-stars-none { padding: 10px 0 3px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.year-star-divider { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 15px 0 8px; padding-top: 11px; border-top: 1px dashed rgba(127,140,156,.22); }
.year-star-divider span { color: var(--ink-dim); font-size: 11px; letter-spacing: 1px; }
.year-star-divider small { color: var(--muted); font-size: 9.5px; }
.ts12-cell { appearance: none; color: inherit; font-family: var(--sans); }

@media (max-width: 760px) {
  .year-impact-stage { grid-template-columns: minmax(0,1fr) 48px minmax(106px,.82fr) 48px minmax(0,1fr); gap: 2px; padding: 15px 8px 12px; }
  .impact-source { min-height: 137px; padding: 9px 7px 7px; }
  .impact-source-main b { font-size: 30px; }
  .impact-source-main { grid-template-columns: auto auto; }
  .impact-source-main em { grid-column: 1 / -1; text-align: left; }
  .impact-source p { font-size: 9px; }
  .impact-link-copy b { font-size: 9px; }
  .impact-link-copy small { display: none; }
  .impact-core { min-height: 136px; }
  .impact-core > b { font-size: 42px; }
}
@media (max-width: 480px) {
  .year-impact-stage { grid-template-columns: minmax(0,1fr) 38px minmax(88px,.72fr) 38px minmax(0,1fr); min-height: 170px; padding: 12px 5px 10px; }
  .impact-source { min-height: 137px; padding: 8px 5px 6px; }
  .impact-source-top { font-size: 8.5px; letter-spacing: .5px; }
  .impact-role { padding: 2px 4px; font-size: 8px; }
  .impact-source-main { gap: 3px; margin: 8px 0 6px; }
  .impact-source-main b { font-size: 28px; }
  .impact-source-main span, .impact-source-main em { font-size: 8.5px; }
  .impact-source-status { padding-top: 5px; }
  .impact-source-status span { font-size: 8.5px; }
  .impact-source-status strong { font-size: 9px; }
  .impact-source p { min-height: 39px; margin-top: 5px; font-size: 8px; line-height: 1.45; }
  .impact-link { min-height: 84px; }
  .impact-arrow { width: 23px; height: 23px; font-size: 13px; }
  .impact-link-copy { margin-top: 3px; padding: 1px 2px; }
  .impact-link-copy b { font-size: 8px; }
  .impact-core { min-height: 116px; padding: 9px 3px 7px; border-radius: 45%; }
  .impact-core > span { font-size: 8px; letter-spacing: .5px; }
  .impact-core > b { font-size: 36px; }
  .impact-core > strong { font-size: 8px; }
  .impact-core-roles { gap: 2px; margin-top: 5px; }
  .impact-core-role { padding: 1px 3px; font-size: 7px; }
  .year-impact-foot { padding: 8px; font-size: 9px; }
  .year-stars-summary b { font-size: 20px; }
}

/* ═══════════ 命书演示页 ═══════════ */
.mingshu-page { display: flex; flex-direction: column; gap: 14px; }
.mingshu-page section { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.ms-opening { min-height: 420px; padding: 28px 28px 26px; background: linear-gradient(145deg, #1d2530 0%, #141a22 54%, #111820 100%) !important; border-color: rgba(226,184,109,.5) !important; }
.ms-opening::before { content: ''; position: absolute; width: 330px; height: 330px; right: -88px; top: -138px; border: 1px solid rgba(226,184,109,.22); border-radius: 50%; box-shadow: 0 0 0 22px rgba(226,184,109,.025), 0 0 0 52px rgba(226,184,109,.018); animation: ms-orbit 12s linear infinite; }
.ms-opening::after { content: '命'; position: absolute; right: 26px; bottom: 12px; color: rgba(226,184,109,.055); font-family: var(--serif); font-size: 156px; line-height: 1; }
.ms-opening-top, .ms-opening h2, .ms-opening-date, .ms-pillars, .ms-opening-copy, .ms-opening-actions { position: relative; z-index: 1; }
.ms-opening-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ms-kicker { color: var(--gold-soft); font-size: 10px; letter-spacing: 2.4px; }
.ms-status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid rgba(115,183,173,.34); border-radius: 999px; color: #9bc9c2; font-size: 10px; letter-spacing: 1px; }
.ms-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(115,183,173,.1); animation: ms-pulse 2.2s ease-in-out infinite; }
.ms-opening h2 { max-width: 620px; margin: 42px 0 10px; font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); line-height: 1.22; letter-spacing: 4px; color: var(--gold-soft); }
.ms-opening-date { color: var(--ink-dim); font-size: 12px; letter-spacing: 1.2px; }
.ms-pillars { display: flex; gap: 8px; margin: 30px 0 22px; }
.ms-pillar-dot { width: 50px; height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid rgba(226,184,109,.34); border-radius: 9px; background: rgba(7,11,16,.25); font-family: var(--serif); }
.ms-pillar-dot b { color: var(--gold-soft); font-size: 24px; line-height: 1.05; }
.ms-pillar-dot em { margin-top: 7px; color: var(--ink); font-size: 19px; font-style: normal; line-height: 1; }
.ms-opening-copy { max-width: 570px; color: var(--ink-dim); font-size: 14px; line-height: 2; }
.ms-opening-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.ms-primary, .ms-secondary { min-height: 40px; padding: 0 15px; border-radius: 8px; cursor: pointer; font-family: var(--sans); font-size: 12px; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.ms-primary { border: 1px solid var(--gold); background: var(--gold); color: #20190e; font-weight: 700; letter-spacing: 1px; }
.ms-primary:hover { transform: translateY(-2px); background: var(--gold-soft); }
.ms-primary span { margin-left: 6px; font-size: 15px; }
.ms-secondary { border: 1px solid var(--line-strong); background: rgba(255,255,255,.02); color: var(--ink-dim); }
.ms-secondary:hover { transform: translateY(-2px); border-color: var(--teal); color: var(--teal); }
.ms-snapshot, .ms-elements, .ms-timeline, .ms-chapters { padding: 22px 24px; }
.ms-section-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 17px; }
.ms-section-head > span:first-child { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--gold-dim); border-radius: 7px; color: var(--gold-soft); font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.ms-section-head small { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; }
.ms-section-head h3 { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 20px; letter-spacing: 1.5px; line-height: 1.3; }
.ms-note { margin-left: auto; padding-top: 5px; color: var(--ink-faint); font-size: 10px; white-space: nowrap; }
.ms-lead { color: var(--ink-dim); font-size: 14px; line-height: 2; }
.ms-fact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.ms-fact-grid div { min-width: 0; padding: 13px 12px; background: var(--bg2); }
.ms-fact-grid small { display: block; color: var(--muted); font-size: 10px; letter-spacing: 1.2px; }
.ms-fact-grid strong { display: block; margin-top: 6px; color: var(--ink); font-family: var(--serif); font-size: 16px; letter-spacing: .5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-fact-grid i { color: var(--gold); font-size: 11px; font-style: normal; }
.ms-stars { padding: 22px 24px; background: radial-gradient(ellipse 85% 95% at 50% 0%, rgba(115,183,173,.1), transparent 65%), #151d26 !important; }
.ms-star-field { position: relative; min-height: 100px; display: flex; align-items: center; justify-content: center; align-content: center; flex-wrap: wrap; gap: 10px 12px; padding: 20px; border: 1px dashed rgba(115,183,173,.28); border-radius: 10px; background: rgba(7,11,16,.2); }
.ms-star-field::before, .ms-star-field::after { content: '✧'; position: absolute; color: rgba(226,184,109,.22); font-size: 24px; animation: ms-star-drift 3.4s ease-in-out infinite alternate; }.ms-star-field::before { top: 13px; left: 24px; }.ms-star-field::after { right: 25px; bottom: 10px; animation-delay: .9s; }
.ms-star { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid rgba(226,184,109,.34); border-radius: 999px; background: rgba(226,184,109,.07); color: var(--gold-soft); font-family: var(--serif); font-size: 12px; letter-spacing: 1px; animation: ms-star-float 3.2s ease-in-out var(--ms-delay, 0s) infinite alternate; }.ms-star-muted { color: var(--muted); border-color: var(--line); background: transparent; animation: none; }
.ms-stars-note { margin: 11px 2px 0; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
.ms-elements { background: linear-gradient(140deg, rgba(115,183,173,.05), transparent 46%), var(--card) !important; }
.ms-wx-bars { display: flex; flex-direction: column; gap: 11px; }
.ms-wx-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) 37px; align-items: center; gap: 10px; }
.ms-wx-name { font-family: var(--serif); font-size: 16px; font-weight: 700; text-align: center; }
.ms-wx-track { height: 9px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.06); }
.ms-wx-fill { display: block; height: 100%; border-radius: inherit; background: var(--ms-wx); box-shadow: 0 0 14px color-mix(in srgb, var(--ms-wx) 42%, transparent); animation: ms-bar-grow .85s cubic-bezier(.22,1,.36,1) backwards; }
.ms-wx-row:nth-child(2) .ms-wx-fill { animation-delay: .08s; }.ms-wx-row:nth-child(3) .ms-wx-fill { animation-delay: .16s; }.ms-wx-row:nth-child(4) .ms-wx-fill { animation-delay: .24s; }.ms-wx-row:nth-child(5) .ms-wx-fill { animation-delay: .32s; }
.ms-wx-value { color: var(--ink-faint); font-size: 11px; font-variant-numeric: tabular-nums; text-align: right; }
.ms-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 17px; padding-top: 13px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 10px; }
.ms-legend span { display: inline-flex; align-items: center; gap: 5px; }.ms-dot { width: 6px; height: 6px; border-radius: 50%; }
.ms-timeline { background: linear-gradient(180deg, rgba(226,184,109,.055), transparent 58%), var(--card) !important; }
.ms-curve-wrap { height: 240px; overflow: hidden; border: 1px solid rgba(226,184,109,.16); border-radius: 11px; background: rgba(4,8,12,.18); }
.ms-curve { width: 100%; height: 100%; overflow: visible; }.ms-grid-line { stroke: rgba(255,255,255,.08); stroke-dasharray: 3 6; }.ms-curve-area { fill: url(#msCurveFill); }.ms-curve-line { fill: none; stroke: var(--gold-soft); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1300; stroke-dashoffset: 1300; animation: ms-draw-line 1.5s cubic-bezier(.22,1,.36,1) forwards; }.ms-curve-point circle { fill: var(--card); stroke: var(--gold); stroke-width: 2; }.ms-curve-point.is-current circle { fill: var(--gold); stroke: var(--gold-soft); filter: drop-shadow(0 0 6px rgba(226,184,109,.8)); }.ms-curve-point text { fill: var(--ink-faint); font-size: 11px; }.ms-curve-point .ms-curve-gz { fill: var(--gold-soft); font-size: 11px; font-family: var(--serif); }.ms-axis-label { fill: var(--muted); font-size: 10px; }
.ms-curve-caption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--ink-faint); font-size: 10px; }
.ms-chapter-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 5px; margin: 0 -2px 16px; scrollbar-width: none; }.ms-chapter-tabs::-webkit-scrollbar { display:none; }
.ms-chapter-tab { flex: 0 0 auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); color: var(--muted); cursor: pointer; font-size: 11px; transition: all .16s ease; }.ms-chapter-tab span { margin-right: 5px; color: var(--gold-dim); font-family: var(--serif); }.ms-chapter-tab:hover { border-color: var(--gold-dim); color: var(--ink); }.ms-chapter-tab.active { border-color: var(--gold-dim); background: rgba(226,184,109,.09); color: var(--gold-soft); }
.ms-chapter-content { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 17px; padding: 20px; border-left: 1px solid var(--gold-dim); border-radius: 0 10px 10px 0; background: rgba(7,11,16,.23); }.ms-chapter-mark { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid rgba(226,184,109,.4); border-radius: 50%; color: var(--gold-soft); font-family: var(--serif); font-size: 24px; }.ms-chapter-content h4 { margin: 0 0 7px; color: var(--gold-soft); font-family: var(--serif); font-size: 21px; letter-spacing: 2px; }.ms-chapter-content p { margin: 0; color: var(--ink-dim); font-size: 13px; line-height: 1.95; }.ms-chapter-content .ms-chapter-lead { margin-bottom: 10px; color: var(--ink); }
.ms-boundary { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 15px; padding: 17px 20px; background: linear-gradient(135deg, rgba(115,183,173,.08), rgba(226,184,109,.04)) !important; border-color: rgba(115,183,173,.25) !important; }.ms-boundary-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(115,183,173,.4); border-radius: 50%; color: var(--teal); font-family: var(--serif); font-size: 18px; }.ms-boundary strong { color: var(--ink); font-size: 12px; letter-spacing: 1px; }.ms-boundary p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.7; }
@keyframes ms-orbit { to { transform: rotate(360deg); } } @keyframes ms-pulse { 0%,100%{ opacity:1; box-shadow:0 0 0 4px rgba(115,183,173,.1); } 50%{ opacity:.55; box-shadow:0 0 0 7px rgba(115,183,173,0); } } @keyframes ms-bar-grow { from { width: 0; } } @keyframes ms-draw-line { to { stroke-dashoffset: 0; } } @keyframes ms-star-float { from { transform: translateY(1px); } to { transform: translateY(-5px); } } @keyframes ms-star-drift { from { transform: translateY(0); opacity:.35; } to { transform: translateY(-6px); opacity:.8; } }
@media (max-width: 640px) { .ms-opening { min-height: 390px; padding: 22px 18px; }.ms-opening h2 { margin-top: 34px; font-size: 30px; letter-spacing: 3px; }.ms-snapshot,.ms-elements,.ms-timeline,.ms-chapters { padding: 18px 15px; }.ms-section-head h3 { font-size: 18px; }.ms-note { display:none; }.ms-fact-grid { grid-template-columns: 1fr 1fr; }.ms-curve-wrap { height: 205px; }.ms-curve-point .ms-curve-gz { font-size: 9px; }.ms-curve-point text { font-size: 9px; }.ms-chapter-content { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 16px; }.ms-chapter-mark { width: 42px; height: 42px; font-size: 19px; }.ms-chapter-content h4 { font-size: 18px; }.ms-boundary { grid-template-columns: auto minmax(0,1fr); padding: 15px; }.ms-boundary .ms-secondary { grid-column: 1 / -1; width: 100%; }.ms-opening::after { font-size: 126px; }.ms-opening::before { width: 250px; height:250px; right:-100px; top:-110px; } }
@media (prefers-reduced-motion: reduce) { .ms-opening::before,.ms-status i,.ms-wx-fill,.ms-curve-line,.ms-star,.ms-star-field::before,.ms-star-field::after { animation: none; } .ms-curve-line { stroke-dashoffset: 0; } }

/* ═══════════ 命书 · 电影翻幕版 ═══════════
   命书不再是纵向信息卡：每次只保留一个镜头，让数据成为场景里的道具。 */
.mingshu-page { display:block; }
.ms-cinema {
  position:relative; overflow:hidden; isolation:isolate;
  margin:0; border:1px solid rgba(226,184,109,.38) !important; border-radius:18px !important;
  background:
    radial-gradient(ellipse 66% 70% at 88% 18%, rgba(102,156,176,.17), transparent 58%),
    radial-gradient(ellipse 54% 72% at 12% 92%, rgba(183,117,58,.15), transparent 62%),
    linear-gradient(135deg, #071018 0%, #101722 44%, #090d14 100%) !important;
  box-shadow:0 24px 72px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.045);
}
.ms-cinema::before {
  content:''; pointer-events:none; position:absolute; z-index:-1; inset:0; opacity:.22;
  background-image:repeating-linear-gradient(90deg, transparent 0 5px, rgba(255,255,255,.034) 6px 7px), radial-gradient(circle at 20% 20%, #fff 0 1px, transparent 1.4px);
  background-size:auto, 19px 23px; mix-blend-mode:soft-light;
}
.ms-cinema::after { content:'命书'; position:absolute; z-index:-1; right:-12px; bottom:-54px; color:rgba(226,184,109,.045); font:180px/1 var(--serif); letter-spacing:18px; }
.ms-cinema-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:21px 24px 16px; border-bottom:1px solid rgba(226,184,109,.14); }
.ms-cinema-header > div { min-width:0; display:grid; gap:4px; }.ms-cinema-header strong { color:var(--gold-soft, #f0d790); font:600 20px/1.2 var(--serif); letter-spacing:3px; }.ms-cinema-header small { color:var(--ink-faint); font-size:10px; letter-spacing:.7px; }
.ms-kicker { color:#d8ba78; font-size:9px; letter-spacing:2.7px; }
.ms-cinema-live { flex:0 0 auto; display:inline-flex; align-items:center; gap:7px; margin-top:2px; color:#a9d0c7; font-size:10px; letter-spacing:1px; }.ms-cinema-live i { width:6px; height:6px; border-radius:50%; background:#74c4b7; box-shadow:0 0 0 4px rgba(116,196,183,.1), 0 0 12px #74c4b7; animation:ms-pulse 2s infinite; }
.ms-cinema-layout { display:grid; grid-template-columns:142px minmax(0,1fr); min-height:620px; }
.ms-film-rail { display:flex; flex-direction:column; padding:17px 10px; border-right:1px solid rgba(226,184,109,.13); background:linear-gradient(180deg, rgba(0,0,0,.22), rgba(0,0,0,.04)); }
.ms-film-chapter { position:relative; display:grid; grid-template-columns:24px minmax(0,1fr); gap:7px; align-items:center; width:100%; padding:10px 7px; border:0; border-left:1px solid transparent; background:transparent; color:#71809a; text-align:left; cursor:pointer; font:11px var(--sans); transition:background .2s ease,color .2s ease,border-color .2s ease,transform .2s ease; }
.ms-film-chapter::after { content:''; position:absolute; left:-11px; top:50%; width:5px; height:5px; border-radius:50%; background:#566174; transform:translateY(-50%); transition:all .2s ease; }.ms-film-chapter small { color:#7e744e; font:9px ui-monospace,monospace; }.ms-film-chapter span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.ms-film-chapter:hover { color:#d5dbea; background:rgba(255,255,255,.03); }.ms-film-chapter.active { border-left-color:#e5c16c; color:#f0daa1; background:linear-gradient(90deg, rgba(226,184,109,.13), transparent); }.ms-film-chapter.active::after { width:8px; height:8px; background:#e5c16c; box-shadow:0 0 0 4px rgba(226,184,109,.13),0 0 14px rgba(226,184,109,.6); }
.ms-cinema-stage { position:relative; display:flex; flex-direction:column; min-width:0; min-height:620px; padding:42px clamp(23px,5vw,54px) 25px; overflow:hidden; }.ms-cinema-stage::before { content:''; position:absolute; pointer-events:none; inset:0; background:linear-gradient(90deg, transparent 0 82%, rgba(255,255,255,.03) 100%), linear-gradient(0deg, rgba(0,0,0,.29), transparent 34%); }.ms-stage-glow { position:absolute; width:320px; height:320px; right:-110px; top:-105px; border:1px solid rgba(226,184,109,.2); border-radius:50%; box-shadow:0 0 0 26px rgba(226,184,109,.017),0 0 0 70px rgba(95,178,186,.02); animation:ms-orbit 18s linear infinite; }
.ms-scene-meta,.ms-scene-title,.ms-scene-core,.ms-scene-subtitle,.ms-story-layout,.ms-scene-body,.ms-scene-visual,.ms-scene-controls { position:relative; z-index:1; }
.ms-scene-meta { display:flex; align-items:center; gap:9px; color:#b99c58; }.ms-scene-number { display:grid; place-items:center; width:30px; height:30px; border:1px solid rgba(226,184,109,.55); border-radius:50%; font:10px ui-monospace,monospace; }.ms-scene-chapter { font:11px var(--sans); letter-spacing:2.2px; }.ms-scene-rule { width:clamp(34px,13vw,92px); height:1px; background:linear-gradient(90deg, rgba(226,184,109,.55), transparent); }
.ms-scene-title { max-width:710px; margin:19px 0 7px; color:#f0dca4; font:clamp(30px,5.1vw,48px)/1.22 var(--serif); letter-spacing:2px; text-wrap:balance; text-shadow:0 4px 18px rgba(0,0,0,.23); }.ms-scene-core { max-width:720px; margin:0 0 8px; color:#d5c27f; font:12px/1.75 var(--serif); letter-spacing:.6px; }.ms-scene-subtitle { margin:0; color:#92adae; font-size:10px; letter-spacing:1.1px; }.ms-story-layout { display:grid; grid-template-columns:1fr; gap:26px; align-items:start; margin-top:22px; }.ms-story-layout.has-timeline { grid-template-columns:minmax(122px,155px) minmax(0,1fr); }.ms-story-main { min-width:0; }.ms-scene-body { max-width:680px; margin-top:0; }.ms-scene-body p { margin:0 0 13px; color:#b9c5d6; font-size:14px; line-height:2.03; letter-spacing:.2px; }.ms-scene-body p:first-child { color:#d9e1ed; }
.ms-evidence-strip { display:flex; gap:7px; max-width:690px; margin:18px 0 0; padding:9px 0; overflow-x:auto; scrollbar-width:none; }.ms-evidence-strip::-webkit-scrollbar { display:none; }.ms-evidence-chip { flex:0 0 min(190px,76vw); display:grid; grid-template-columns:auto 1fr; gap:3px 7px; padding:8px 9px; border:1px solid rgba(139,169,190,.2); border-radius:7px; background:rgba(5,10,16,.3); font-size:10px; }.ms-evidence-chip b { color:#e1c274; font-weight:600; }.ms-evidence-chip i { color:#8ec5bb; font-style:normal; }.ms-evidence-chip em { grid-column:1 / -1; overflow:hidden; color:#8fa3bd; font-style:normal; line-height:1.45; text-overflow:ellipsis; white-space:nowrap; }
.ms-scene-visual { margin:auto 0 0; padding-top:19px; }.ms-prop { max-width:690px; padding:15px 16px; border:1px solid rgba(226,184,109,.16); border-radius:12px; background:linear-gradient(130deg, rgba(4,11,16,.49), rgba(16,27,38,.3)); box-shadow:inset 0 1px rgba(255,255,255,.025); }.ms-prop-caption { display:block; margin-bottom:13px; color:#8a9bb0; font-size:9px; letter-spacing:2px; }
.ms-prop-pillars { max-width:460px; }.ms-prop .ms-pillars { display:flex; gap:9px; margin:0; }.ms-prop .ms-pillar-dot { position:relative; width:56px; height:78px; border-color:rgba(226,184,109,.35); background:rgba(0,0,0,.19); }.ms-prop .ms-pillar-dot small { position:absolute; bottom:4px; color:#7e8ba2; font:8px var(--sans); }.ms-pillar-labels { display:grid; grid-template-columns:repeat(4,56px); gap:9px; margin-top:8px; color:#8494a9; font-size:9px; text-align:center; }
 .ms-parent-lines { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }.ms-parent-line { position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:5px 8px; min-width:0; padding:9px 10px 25px; border-left:1px solid #7b8799; border-radius:6px; background:rgba(255,255,255,.025); }.ms-parent-source { overflow:hidden; color:#d8deea; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }.ms-parent-kind { color:#8194a9; font-size:9px; }.ms-parent-favor { grid-column:1/-1; color:#d6b968; font-size:9px; letter-spacing:.2px; }.ms-parent-line i { position:absolute; right:10px; bottom:8px; color:#7ea79e; font:9px ui-monospace,monospace; }.ms-parent-caption { margin:12px 1px 0; color:#8092a6; font-size:9.5px; line-height:1.7; }.ms-rel { color:#dcbe72; font-size:10px; font-weight:600; }.ms-rel-kewo { color:#d89588; }.ms-rel-woke { color:#d8b576; }.ms-rel-shengwo { color:#86c5ad; }.ms-rel-wosheng { color:#7caed1; }.ms-parent-line.ms-favor-ji { border-left-color:#c47f78; background:linear-gradient(90deg,rgba(174,87,80,.09),rgba(255,255,255,.02)); }.ms-parent-line.ms-favor-yong { border-left-color:#79b7a6; }.ms-parent-line.ms-favor-xi { border-left-color:#d2b46a; }
.ms-prop-elements { max-width:520px; }.ms-prop .ms-wx-bars { gap:8px; }.ms-prop .ms-wx-row { grid-template-columns:20px minmax(0,1fr) 34px; }.ms-prop .ms-wx-track { height:6px; }.ms-prop .ms-wx-name { font-size:13px; }.ms-prop .ms-wx-value { font-size:10px; }
 .ms-prop-relations { max-width:760px; padding:18px; background:radial-gradient(circle at 50% 48%, rgba(226,184,109,.09), transparent 38%),linear-gradient(130deg, rgba(4,11,16,.55), rgba(16,27,38,.34)); }.ms-relation-map { display:grid; grid-template-columns:135px minmax(0,1fr); gap:18px; align-items:center; }.ms-day-core { position:relative; display:grid; place-items:center; align-content:center; width:118px; height:118px; margin:auto; border:1px solid rgba(226,184,109,.62); border-radius:50%; background:radial-gradient(circle, rgba(226,184,109,.2), rgba(226,184,109,.04) 58%, transparent 60%); box-shadow:0 0 0 9px rgba(226,184,109,.035),0 0 36px rgba(226,184,109,.12); }.ms-day-core::before,.ms-day-core::after { content:''; position:absolute; border:1px dashed rgba(226,184,109,.24); border-radius:50%; }.ms-day-core::before { inset:-10px; }.ms-day-core::after { inset:-22px; opacity:.52; }.ms-day-core small { color:#91a4b6; font-size:9px; letter-spacing:2px; }.ms-day-core b { color:#f0d48c; font:46px/.95 var(--serif); }.ms-day-core em { color:#7dbab0; font-size:10px; font-style:normal; letter-spacing:2px; }.ms-day-favor { max-width:116px; margin-top:4px; color:#d9c17b; font-size:8px; line-height:1.3; text-align:center; }.ms-relation-orbits { display:grid; gap:8px; }.ms-relation-lane { min-width:0; padding:8px 9px 9px; border-left:1px solid rgba(139,169,190,.25); border-radius:0 7px 7px 0; background:linear-gradient(90deg, rgba(255,255,255,.035), transparent); }.ms-relation-lane header { display:flex; justify-content:space-between; gap:8px; margin-bottom:6px; color:#8ca3b6; font-size:9px; letter-spacing:1px; }.ms-relation-lane header b { color:#d7bd77; font:12px var(--serif); }.ms-relation-nodes { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:7px; }.ms-relation-node { position:relative; display:grid; grid-template-columns:auto auto 1fr; gap:3px 5px; align-items:center; min-width:0; padding:7px 8px 8px; border:1px solid rgba(143,163,181,.2); border-radius:6px; background:rgba(3,9,15,.28); }.ms-relation-node::before { content:''; position:absolute; left:-8px; top:50%; width:8px; border-top:1px solid rgba(226,184,109,.32); }.ms-relation-node b { font:18px var(--serif); }.ms-r-node-head { grid-column:1/-1; overflow:hidden; color:#8fa3b7; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }.ms-relation-node i { overflow:hidden; color:#d1dce5; font-size:9px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }.ms-relation-node em { color:#7fb6ac; font:8px ui-monospace,monospace; font-style:normal; text-align:right; }.ms-favor-badge { grid-column:1/-1; display:inline-block; width:max-content; max-width:100%; padding:2px 5px; border:1px solid rgba(226,184,109,.26); border-radius:999px; color:#d8bd72; font-size:8px; line-height:1.25; }.ms-relation-node small { grid-column:1/-1; overflow:hidden; color:#94a6b6; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }.ms-favor-ji { border-color:rgba(205,112,102,.55) !important; background:linear-gradient(135deg,rgba(175,80,75,.11),rgba(3,9,15,.28)); }.ms-favor-ji .ms-favor-badge { border-color:rgba(205,112,102,.5); color:#e09a8f; }.ms-favor-yong { border-color:rgba(106,181,158,.5) !important; }.ms-favor-yong .ms-favor-badge { border-color:rgba(106,181,158,.42); color:#8fd0bd; }.ms-favor-xi .ms-favor-badge { color:#ead184; }.ms-relation-caption { margin:14px 1px 0; color:#8799ad; font-size:9.5px; line-height:1.75; }.ms-relation-caption strong { color:#d9bf78; font-weight:500; }
.ms-prop-curve { max-width:690px; }.ms-prop .ms-curve-wrap { height:170px; border-color:rgba(226,184,109,.14); }.ms-prop .ms-curve-caption { margin:9px 0 0; }.ms-prop .ms-curve-point .ms-curve-gz { font-size:10px; }
.ms-event-track { display:flex; gap:8px; overflow-x:auto; padding:2px 1px 7px; scrollbar-width:thin; scrollbar-color:rgba(226,184,109,.3) transparent; }.ms-event-card { position:relative; flex:0 0 162px; display:flex; flex-direction:column; gap:4px; min-height:113px; padding:11px 10px; border:1px solid rgba(226,184,109,.23); border-radius:8px; background:linear-gradient(150deg, rgba(226,184,109,.09), rgba(6,12,17,.3)); }.ms-event-card::before { content:'✦'; position:absolute; top:6px; right:8px; color:rgba(226,184,109,.43); }.ms-event-card b { max-width:125px; color:#efd793; font:15px var(--serif); letter-spacing:1px; }.ms-event-card span { color:#a8beca; font-size:10px; line-height:1.35; }.ms-event-card small { color:#889ab0; font-size:9px; }.ms-event-card i { margin-top:auto; color:#76b9ab; font-size:9px; font-style:normal; }.ms-event-note { flex:0 0 168px; margin:0; padding:9px; align-self:center; border-left:1px solid rgba(207,161,100,.6); color:#9eabbc; font-size:10px; line-height:1.65; }
.ms-event-note-inline { max-width:660px; margin:0; }
.ms-story-timeline { position:relative; min-width:0; padding:2px 0 2px 5px; }.ms-story-timeline::before { content:''; position:absolute; left:10px; top:25px; bottom:8px; width:1px; background:linear-gradient(#d7b668,rgba(119,157,157,.18)); }.ms-timeline-label { display:block; margin:0 0 12px 22px; color:#b38f4e; font:8px ui-monospace,monospace; letter-spacing:2px; }.ms-timeline-item { position:relative; padding:0 0 17px 24px; }.ms-timeline-item i { position:absolute; z-index:1; left:1px; top:5px; width:9px; height:9px; border:1px solid #d9b867; border-radius:50%; background:#101923; box-shadow:0 0 0 4px rgba(226,184,109,.07); }.ms-timeline-item time { display:block; color:#ddc17d; font:9px ui-monospace,monospace; }.ms-timeline-item b { display:block; margin-top:4px; color:#8db4ad; font:9px var(--sans); font-weight:500; line-height:1.5; }.ms-timeline-item p { margin:3px 0 0; color:#8294a9; font-size:9px; line-height:1.55; }
.ms-persona-seal { position:absolute; z-index:2; right:clamp(24px,5vw,58px); top:92px; display:grid; place-items:center; align-content:center; width:104px; height:104px; border:1px solid rgba(226,184,109,.42); border-radius:50%; background:radial-gradient(circle,rgba(226,184,109,.12),rgba(7,13,20,.36) 66%,transparent 68%); box-shadow:0 0 0 9px rgba(226,184,109,.025),0 0 34px rgba(81,161,163,.09); animation:ms-seal-float 6s ease-in-out infinite; }.ms-persona-seal::before { content:''; position:absolute; inset:8px; border:1px dashed rgba(133,184,177,.28); border-radius:50%; animation:ms-orbit 18s linear infinite; }.ms-persona-seal span { color:#80bcb4; font-size:22px; line-height:1; }.ms-persona-seal b { color:#efd38c; font:25px/1.1 var(--serif); }.ms-persona-seal small { color:#899eb2; font-size:8px; letter-spacing:1px; }
@keyframes ms-seal-float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-7px); } }
.ms-dual-maps { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-width:800px; }.ms-dual-maps .ms-prop { min-width:0; padding:13px; }.ms-compact-map { position:relative; }.ms-map-pillars { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }.ms-map-pillar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; min-width:0; }.ms-map-pillar > small { grid-column:1/-1; color:#879bad; font-size:8px; text-align:center; }.ms-map-node { display:grid; place-items:center; gap:1px; min-width:0; padding:6px 2px; border:1px solid rgba(143,163,181,.2); border-radius:6px; background:rgba(3,9,15,.32); }.ms-map-node i { color:#6f8195; font-size:7px; font-style:normal; }.ms-map-node b { font:18px var(--serif); }.ms-map-node em { color:#94a9b6; font-size:7px; font-style:normal; }.ms-map-links { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin:10px 10% 0; }.ms-map-link { display:grid; gap:4px; }.ms-map-link span { display:grid; grid-template-columns:1fr auto; position:relative; min-width:0; color:#8196aa; font-size:7px; }.ms-map-link span i { grid-column:1/-1; height:1px; margin-bottom:3px; background:linear-gradient(90deg,transparent,rgba(226,184,109,.45),transparent); }.ms-map-link span b { overflow:hidden; font-weight:500; text-overflow:ellipsis; white-space:nowrap; }.ms-map-link span em { color:#c5a65e; font-style:normal; }.ms-map-link .ms-link-ke i { background:repeating-linear-gradient(90deg,transparent 0 4px,rgba(205,112,102,.7) 4px 7px); }
.ms-favor-legend { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:9px; }.ms-favor-legend span { padding:2px 6px; border:1px solid rgba(143,163,181,.23); border-radius:99px; color:#8d9eb1; font-size:7px; }.ms-favor-legend .is-yong { color:#8fd0bd;border-color:rgba(106,181,158,.45); }.ms-favor-legend .is-xi { color:#ead184;border-color:rgba(226,184,109,.4); }.ms-favor-legend .is-ji { color:#e09a8f;border-color:rgba(205,112,102,.45); }.ms-favor-pillars { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }.ms-favor-pillar { display:grid; gap:4px; min-width:0; }.ms-favor-pillar small { color:#879bad; font-size:8px; text-align:center; }.ms-favor-pillar > span { display:grid; place-items:center; gap:1px; min-width:0; padding:6px 2px; border:1px solid rgba(143,163,181,.2); border-radius:6px; background:rgba(3,9,15,.31); }.ms-favor-pillar b { color:#d9e1e9; font:17px var(--serif); }.ms-favor-pillar i { overflow:hidden; max-width:100%; color:#8d9fb2; font-size:7px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }.ms-favor-pillar .is-yong { border-color:rgba(106,181,158,.52);box-shadow:inset 0 0 18px rgba(106,181,158,.06); }.ms-favor-pillar .is-xi { border-color:rgba(226,184,109,.5); }.ms-favor-pillar .is-ji { border-color:rgba(205,112,102,.55);background:linear-gradient(145deg,rgba(175,80,75,.11),rgba(3,9,15,.3)); }
.ms-prop-late { max-width:420px; min-height:155px; text-align:center; background:radial-gradient(circle at 50% 48%, rgba(226,184,109,.14), transparent 43%),rgba(5,10,16,.35); }.ms-late-glyph { margin:13px 0 14px; color:#f0d68f; font:52px/1 var(--serif); letter-spacing:13px; text-shadow:0 0 28px rgba(226,184,109,.24); }.ms-late-stages { display:flex; justify-content:center; gap:10px; }.ms-late-stages span { padding:4px 8px; border:1px solid rgba(128,167,159,.25); border-radius:999px; color:#94b7b2; font-size:9px; }
.ms-scene-controls { display:grid; grid-template-columns:100px minmax(90px,1fr) 100px; align-items:center; gap:8px; margin-top:20px; }.ms-nav { height:38px; border:1px solid rgba(226,184,109,.32); border-radius:8px; background:rgba(8,14,20,.35); color:#d8c381; cursor:pointer; font:11px var(--sans); transition:transform .18s ease,background .18s ease,border-color .18s ease; }.ms-nav:hover:not(:disabled) { transform:translateY(-2px); border-color:#e8c86a; background:rgba(226,184,109,.12); }.ms-nav:disabled { opacity:.24; cursor:default; }.ms-progress { display:flex; justify-content:center; gap:5px; }.ms-progress-dot { display:grid; place-items:center; width:17px; height:26px; border:0; background:transparent; cursor:pointer; }.ms-progress-dot span { width:5px; height:5px; border-radius:50%; background:#657287; transition:all .2s ease; }.ms-progress-dot:hover span { background:#caa85d; }.ms-progress-dot.active span { width:17px; border-radius:99px; background:#e3c477; box-shadow:0 0 11px rgba(226,184,109,.62); }
.ms-cinema-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 18px; border-top:1px solid rgba(226,184,109,.13); background:rgba(0,0,0,.14); color:#788aa0; font-size:9px; letter-spacing:.6px; }.ms-cinema-footer .ms-secondary { min-height:31px; padding:0 10px; font-size:10px; }
.ms-ai-status { display:flex; flex-wrap:wrap; align-items:center; gap:8px; max-width:680px; margin:12px 0 -4px; color:#8ebeb4; font-size:10px; line-height:1.55; overflow-wrap:anywhere; }.ms-ai-status::before { content:''; flex:0 0 auto; width:6px; height:6px; border-radius:50%; background:#74c4b7; box-shadow:0 0 0 4px rgba(116,196,183,.1); }.ms-ai-status.is-pending::before { animation:ms-ai-pulse 1.15s ease-in-out infinite; }.ms-ai-status.is-cache { color:#a8b5c5; }.ms-ai-status.is-cache::before { background:#8ba6bd; box-shadow:0 0 0 4px rgba(139,166,189,.1); }.ms-ai-status.is-regenerated { color:#d8c17d; }.ms-ai-status.is-regenerated::before { background:#e3bf68; box-shadow:0 0 0 4px rgba(227,191,104,.11); }.ms-ai-status.is-fallback { color:#d4a39a; }.ms-ai-status.is-fallback::before { background:#d98e82; box-shadow:0 0 0 4px rgba(217,142,130,.1); }.ms-ai-status-copy { min-width:0; }.ms-ai-retry { min-height:34px; padding:0 11px; border:1px solid rgba(226,184,109,.48); border-radius:7px; background:rgba(226,184,109,.08); color:#ead18c; cursor:pointer; font:11px var(--sans); transition:background .16s ease,transform .16s ease; }.ms-ai-retry:hover { background:rgba(226,184,109,.18); transform:translateY(-1px); }.ms-ai-retry:focus-visible { outline:2px solid #f0d68f; outline-offset:2px; }.ms-ai-retry:active { transform:translateY(0); } @keyframes ms-ai-pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.42; transform:scale(.72); } }
.ms-feedback { position:relative; z-index:1; max-width:690px; margin:22px 0 2px; padding:18px; border:1px solid rgba(226,184,109,.28); border-radius:13px; background:radial-gradient(circle at 92% 5%,rgba(226,184,109,.11),transparent 32%),linear-gradient(135deg,rgba(8,17,27,.72),rgba(18,31,42,.48)); box-shadow:inset 0 1px rgba(255,255,255,.035); }.ms-feedback-kicker { color:#cfa95b; font-size:9px; letter-spacing:2px; }.ms-feedback h3 { margin:7px 0 7px; color:#ecd494; font:22px/1.25 var(--serif); letter-spacing:1px; }.ms-feedback-head p { margin:0; color:#9eb0c3; font-size:11px; line-height:1.8; }.ms-feedback-kind-label { display:grid; gap:5px; margin-top:13px; color:#a8b9c9; font-size:10px; }.ms-feedback-kind { min-height:36px; padding:0 9px; border:1px solid rgba(142,169,190,.28); border-radius:7px; outline:0; background:rgba(2,8,13,.42); color:#dce6ef; font:11px var(--sans); }.ms-feedback-kind:focus { border-color:rgba(226,184,109,.72); box-shadow:0 0 0 3px rgba(226,184,109,.08); }.ms-feedback-notes { box-sizing:border-box; display:block; width:100%; min-height:110px; margin-top:10px; padding:10px 11px; resize:vertical; outline:0; border:1px solid rgba(142,169,190,.28); border-radius:8px; background:rgba(2,8,13,.42); color:#dce6ef; font:12px/1.7 var(--sans); }.ms-feedback-notes:focus { border-color:rgba(226,184,109,.72); box-shadow:0 0 0 3px rgba(226,184,109,.08); }.ms-feedback-notes::placeholder { color:#71869b; }.ms-feedback-consent { display:flex; align-items:flex-start; gap:7px; margin-top:10px; color:#a6b6c8; font-size:10px; line-height:1.65; cursor:pointer; }.ms-feedback-consent input { margin:2px 0 0; accent-color:#d7b565; }.ms-feedback-actions { display:flex; align-items:center; gap:10px; margin-top:12px; }.ms-feedback-submit { min-height:44px; padding:0 12px; border:1px solid rgba(226,184,109,.58); border-radius:7px; background:linear-gradient(135deg,rgba(226,184,109,.25),rgba(226,184,109,.09)); color:#f0d591; cursor:pointer; font:11px var(--sans); transition:transform .16s ease,background .16s ease; }.ms-feedback-submit:hover:not(:disabled) { transform:translateY(-1px); background:rgba(226,184,109,.25); }.ms-feedback-submit:disabled { opacity:.55; cursor:wait; }.ms-feedback-status { color:#91c1b5; font-size:10px; line-height:1.45; }.ms-feedback-fineprint { margin:10px 0 0; color:#71859a; font-size:9px; line-height:1.65; }
.ms-scene-enter { animation:ms-page-down .62s cubic-bezier(.22,1,.36,1) both; transform-origin:center top; }.ms-scene-enter-prev { animation-name:ms-page-up; transform-origin:center bottom; }
@keyframes ms-page-down { 0% { opacity:0; transform:perspective(1000px) rotateX(-4deg) translateY(38px); filter:blur(4px); } 100% { opacity:1; transform:perspective(1000px) rotateX(0) translateY(0); filter:blur(0); } }
@keyframes ms-page-up { 0% { opacity:0; transform:perspective(1000px) rotateX(4deg) translateY(-38px); filter:blur(4px); } 100% { opacity:1; transform:perspective(1000px) rotateX(0) translateY(0); filter:blur(0); } }

@media (max-width:640px) {
  .ms-cinema { border-radius:13px !important; }.ms-cinema-header { padding:16px 15px 13px; }.ms-cinema-header strong { font-size:17px; }.ms-cinema-live { font-size:9px; }.ms-cinema-layout { display:block; min-height:0; }.ms-film-rail { flex-direction:row; gap:0; overflow-x:auto; padding:7px 9px; border-right:0; border-bottom:1px solid rgba(226,184,109,.13); scrollbar-width:none; touch-action:pan-x; }.ms-film-rail::-webkit-scrollbar { display:none; }.ms-film-chapter { flex:0 0 auto; display:flex; width:auto; padding:7px 8px; border-left:0; border-bottom:1px solid transparent; }.ms-film-chapter::after { display:none; }.ms-film-chapter.active { border-left:0; border-bottom-color:#e5c16c; }.ms-cinema-stage { min-height:550px; padding:28px 17px 18px; }.ms-stage-glow { width:230px; height:230px; right:-90px; top:-80px; }.ms-persona-seal { position:relative; float:right; right:auto; top:auto; width:78px; height:78px; margin:-2px 0 3px 12px; }.ms-persona-seal span { font-size:17px; }.ms-persona-seal b { font-size:20px; }.ms-scene-title { margin-top:16px; padding-right:0; font-size:29px; letter-spacing:1px; }.ms-scene-core { font-size:11px; line-height:1.7; }.ms-scene-subtitle { line-height:1.6; }.ms-story-layout.has-timeline { grid-template-columns:1fr; gap:14px; }.ms-story-timeline { display:flex; gap:9px; overflow-x:auto; padding:4px 2px 8px; scrollbar-width:none; touch-action:pan-x; }.ms-story-timeline::before,.ms-timeline-label { display:none; }.ms-timeline-item { flex:0 0 154px; padding:9px 10px 9px 25px; border:1px solid rgba(226,184,109,.18); border-radius:8px; background:rgba(3,9,15,.27); }.ms-timeline-item i { left:9px; top:13px; }.ms-scene-body { margin-top:0; }.ms-scene-body p { font-size:13px; line-height:1.91; }.ms-scene-visual { padding-top:15px; }.ms-prop { padding:12px; border-radius:10px; }.ms-dual-maps { grid-template-columns:1fr; }.ms-map-node b { font-size:16px; }.ms-parent-lines { grid-template-columns:1fr; }.ms-prop .ms-pillars { gap:6px; }.ms-prop .ms-pillar-dot { width:calc((100vw - 78px) / 4); max-width:54px; height:70px; }.ms-pillar-labels { grid-template-columns:repeat(4, minmax(0,1fr)); gap:6px; }.ms-relation-map { grid-template-columns:1fr; gap:15px; }.ms-day-core { width:96px; height:96px; }.ms-day-core b { font-size:39px; }.ms-relation-nodes { grid-template-columns:1fr; }.ms-relation-lane { padding:8px; }.ms-prop .ms-curve-wrap { height:142px; }.ms-feedback { margin-top:17px; padding:14px; }.ms-feedback h3 { font-size:20px; }.ms-feedback-actions { align-items:flex-start; flex-direction:column; gap:7px; }.ms-scene-controls { grid-template-columns:78px 1fr 78px; margin-top:16px; }.ms-nav { height:34px; font-size:10px; }.ms-cinema-footer { display:grid; grid-template-columns:1fr auto; padding:11px 13px; }.ms-cinema-footer span:nth-child(2) { display:none; }.ms-cinema-footer .ms-secondary { grid-column:2; grid-row:1; }
}
@media (max-width:390px) { .ms-cinema-header small { max-width:190px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.ms-scene-title { font-size:27px; }.ms-scene-controls { grid-template-columns:67px 1fr 67px; }.ms-nav span { display:none; }.ms-event-card { flex-basis:150px; } }
@media (prefers-reduced-motion:reduce) { .ms-cinema .ms-stage-glow,.ms-cinema .ms-cinema-live i,.ms-cinema .ms-wx-fill,.ms-cinema .ms-curve-line { animation:none; }.ms-cinema .ms-curve-line { stroke-dashoffset:0; }.ms-scene-enter { animation:none; } }

/* ═══════════ 命书 · 开卷入口 / 全屏阅读器 / 本地 AI ═══════════ */
.ms-launch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(230px, .85fr);
  gap: 28px;
  min-height: 490px;
  padding: clamp(30px, 6vw, 70px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(226,184,109,.34);
  border-radius: 18px;
  background:
    radial-gradient(ellipse 70% 90% at 90% 8%, rgba(89,157,173,.22), transparent 60%),
    radial-gradient(ellipse 65% 85% at 5% 95%, rgba(176,102,55,.18), transparent 65%),
    linear-gradient(135deg, #070e16, #111b27 52%, #080d14);
  box-shadow: 0 26px 70px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.05);
}
.ms-launch::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(circle, rgba(255,255,255,.8) 0 1px, transparent 1.3px), repeating-linear-gradient(105deg, transparent 0 13px, rgba(255,255,255,.025) 14px 15px);
  background-size: 29px 31px, auto;
  mask-image: linear-gradient(135deg, transparent 0%, #000 42%, transparent 100%);
}
.ms-launch-aurora { position:absolute; width:380px; height:380px; right:-120px; top:-150px; border:1px solid rgba(226,184,109,.25); border-radius:50%; box-shadow:0 0 0 22px rgba(226,184,109,.025), 0 0 0 70px rgba(102,185,191,.025); animation: ms-orbit 22s linear infinite; pointer-events:none; }
.ms-launch-copy { position:relative; z-index:1; align-self:center; max-width:570px; }
.ms-launch-copy h2 { margin:20px 0 12px; color:#f3dca5; font:clamp(31px, 5.8vw, 56px)/1.18 var(--serif); letter-spacing:3px; text-wrap:balance; text-shadow:0 8px 26px rgba(0,0,0,.28); }
.ms-launch-copy > p:not(.ms-launch-note) { color:#d5c18b; font:15px var(--serif); letter-spacing:2px; }
.ms-launch-copy > .ms-launch-identity { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; line-height:1.7; }
.ms-launch-identity .ms-launch-name { max-width:100%; overflow-wrap:anywhere; }
.ms-launch-identity .ms-launch-pillar { display:inline-block; white-space:nowrap; }
.ms-launch-note { max-width:490px; margin:20px 0 0; color:#93a7b9; font-size:12px; line-height:1.95; letter-spacing:.35px; }
.ms-launch-open { display:inline-flex; align-items:center; justify-content:center; gap:12px; min-height:46px; height:46px; max-width:100%; padding:0 14px; white-space:nowrap; border:1px solid rgba(226,184,109,.62); border-radius:8px; background:linear-gradient(135deg, rgba(226,184,109,.2), rgba(226,184,109,.07)); color:#f2d897; cursor:pointer; font:14px var(--serif); letter-spacing:2px; box-shadow:0 8px 22px rgba(0,0,0,.2); transition:transform .2s ease, background .2s ease, border-color .2s ease; }
.ms-launch-open span { color:#8dc2b5; font:20px var(--sans); transition:transform .2s ease; }
.ms-launch-open:hover { transform:translateY(-2px); border-color:#f0d18a; background:rgba(226,184,109,.26); }.ms-launch-open:hover span { transform:translateX(4px); }
.ms-launch-book { position:relative; align-self:center; justify-self:end; display:grid; place-items:center; width:min(270px, 100%); aspect-ratio: .72; padding:28px 20px; overflow:hidden; border:1px solid rgba(226,184,109,.55); border-radius:5px 12px 12px 5px; background:linear-gradient(105deg, #1a1510 0%, #342718 8%, #171820 13%, #202a32 100%); box-shadow:-16px 18px 0 -10px rgba(226,184,109,.11), -26px 28px 0 -19px rgba(226,184,109,.08), 18px 22px 42px rgba(0,0,0,.45); transform:perspective(850px) rotateY(-12deg) rotateZ(2deg); }
.ms-launch-book::before { content:''; position:absolute; inset:12px; border:1px solid rgba(226,184,109,.23); border-radius:3px 8px 8px 3px; }.ms-launch-book::after { content:'YUAN HAI'; position:absolute; left:18px; bottom:18px; color:rgba(226,184,109,.46); font:8px ui-monospace,monospace; letter-spacing:3px; }
.ms-launch-book span { color:#edcc86; font:76px/1 var(--serif); text-shadow:0 0 24px rgba(226,184,109,.2); }.ms-launch-book b { max-width:180px; color:#aebfca; font:11px/1.8 var(--serif); letter-spacing:2px; text-align:center; }.ms-launch-book em { margin-top:7px; color:#7fa79f; font:10px var(--sans); font-style:normal; letter-spacing:1px; text-align:center; }
.ms-launch-chapters { position:absolute; left:clamp(30px, 6vw, 70px); right:clamp(30px, 6vw, 70px); bottom:22px; display:flex; gap:8px; overflow-x:auto; padding-bottom:3px; scrollbar-width:none; }.ms-launch-chapters::-webkit-scrollbar { display:none; }.ms-launch-chapter { flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; padding:6px 8px; border-bottom:1px solid transparent; color:#75899b; font-size:10px; letter-spacing:.6px; }.ms-launch-chapter i { color:#a9864b; font:9px ui-monospace,monospace; font-style:normal; }.ms-launch-chapter.active { border-color:#d8b56a; color:#e5c985; }

/* 整本生成的视觉重心只保留一枚居中的“命”核心。
   线条负责说明证据汇集，不再用移动虚线制造无意义的忙碌感。 */
.ms-launch-pending { min-height:510px; background:radial-gradient(ellipse 56% 86% at 74% 42%,rgba(73,150,163,.14),transparent 62%),radial-gradient(ellipse 60% 76% at 6% 95%,rgba(176,102,55,.14),transparent 64%),linear-gradient(135deg,#070e16,#111b27 52%,#080d14); }
.ms-launch-pending .ms-launch-copy { max-width:500px; }.ms-launch-pending .ms-launch-copy h2 { color:#e7d6a5; }.ms-launch-pending .ms-launch-note { color:#a6b6c5; }
.ms-launch-idle { min-height:510px; background:radial-gradient(ellipse 52% 82% at 77% 40%,rgba(74,143,161,.12),transparent 63%),radial-gradient(ellipse 62% 78% at 4% 96%,rgba(176,118,63,.13),transparent 66%),linear-gradient(135deg,#070e16,#101a26 52%,#080d14); }
.ms-launch-open.is-start { border-color:rgba(226,184,109,.7); color:#f3d89a; background:linear-gradient(135deg,rgba(226,184,109,.25),rgba(115,180,167,.09)); }.ms-launch-open.is-start:hover { background:linear-gradient(135deg,rgba(226,184,109,.33),rgba(115,180,167,.14)); }
.ms-launch-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:18px; }
.ms-launch-copy > .ms-launch-open { margin-top:18px; }
.ms-launch-copy > .ms-auth-notice { margin:10px 0 0; line-height:1.7; }.ms-launch-retry { min-height:42px; padding:0 10px; border:0; border-bottom:1px solid rgba(161,187,197,.38); background:transparent; color:#aebdca; cursor:pointer; font:11px var(--sans); letter-spacing:.5px; transition:color .18s ease,border-color .18s ease,transform .18s ease; }.ms-launch-retry:hover { color:#e6ce91; border-color:#e1bd6a; transform:translateY(-1px); }.ms-launch-retry:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
.ms-launch-open.is-loading { min-width:184px; justify-content:center; gap:9px; cursor:wait; border-color:rgba(132,181,183,.38); background:rgba(94,159,163,.1); color:#b7d6d0; box-shadow:none; }
.ms-launch-open.is-loading > span { display:inline-block; width:24px; color:#91d0c4; letter-spacing:2px; animation:ms-loading-ellipsis 1.35s steps(4,end) infinite; transform:none; }
.ms-launch-open.is-loading:hover { transform:none; border-color:rgba(132,181,183,.38); background:rgba(94,159,163,.1); }
.ms-launch-open.is-ready { border-color:rgba(131,198,171,.58); color:#d0e5b5; background:linear-gradient(135deg,rgba(109,186,156,.2),rgba(226,184,109,.09)); }.ms-launch-open.is-ready span { color:#b3d9bd; }
.ms-launch-open.is-retry { border-color:rgba(209,150,113,.54); color:#ebc490; background:linear-gradient(135deg,rgba(185,112,75,.18),rgba(226,184,109,.07)); }.ms-launch-open.is-retry span { color:#e6a06d; }
.ms-launch-book-muted { filter:saturate(.62) brightness(.78); opacity:.78; }
/* Keep the evidence canvas square: labels and changing status copy must not size it. */
.ms-loading-visual { position:relative; z-index:1; box-sizing:border-box; align-self:center; justify-self:center; width:100%; max-width:360px; min-width:0; padding:12px; border:1px solid rgba(132,177,188,.2); border-radius:20px; background:linear-gradient(145deg,rgba(10,21,31,.86),rgba(10,19,29,.66)); box-shadow:0 16px 36px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.035); }
.ms-loading-visual::before { content:''; position:absolute; z-index:-1; inset:7px; border-radius:14px; background:radial-gradient(circle at 50% 45%,rgba(226,184,109,.06),transparent 56%); }
.ms-launch-preview { border-color:rgba(139,175,190,.2); }
.ms-launch-preview .ms-loading-graph::after { content:none; }
.ms-loading-graph { position:relative; width:100%; aspect-ratio:1; min-height:0; overflow:hidden; isolation:isolate; border-radius:13px; background:radial-gradient(circle at 50% 50%,rgba(229,188,108,.08),transparent 64%),rgba(3,10,16,.32); }
.ms-loading-graph::before { content:''; position:absolute; z-index:-1; inset:0; opacity:.3; background:radial-gradient(circle at 16% 13%,rgba(232,220,177,.65) 0 1px,transparent 1.4px),radial-gradient(circle at 81% 47%,rgba(113,195,202,.5) 0 1px,transparent 1.3px),radial-gradient(circle at 43% 87%,rgba(232,220,177,.46) 0 1px,transparent 1.3px); }
.ms-loading-graph svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; }
.ms-loading-ring { fill:none; stroke:rgba(226,184,109,.18); stroke-width:.35; }
.ms-loading-progress { fill:none; stroke:#b3c7b3; stroke-width:.65; stroke-linecap:round; stroke-dasharray:12 190; transform-origin:50% 50%; animation:ms-loading-orbit 14s linear infinite; opacity:.6; }
.ms-loading-link { fill:none; stroke:rgba(144,193,190,.28); stroke-width:.45; stroke-linecap:round; opacity:.6; transition:stroke .6s ease,opacity .6s ease; }
.ms-loading-satellites { position:absolute; inset:0; z-index:1; }
.ms-loading-satellite { position:absolute; display:grid; gap:4px; width:40%; max-width:124px; min-width:0; min-height:0; padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; color:#b9cad4; text-align:center; transform:translate(-50%,-50%); opacity:.72; transition:opacity .6s ease; }
.ms-loading-satellite i { color:#a3bccc; font:10px/1.2 var(--sans); font-style:normal; letter-spacing:1px; }
.ms-loading-satellite b { display:block; min-width:0; color:#d0dce1; font:11px/1.45 var(--serif); font-weight:400; white-space:normal; overflow-wrap:anywhere; }
.ms-loading-satellite::before { content:''; width:5px; height:5px; margin:0 auto 2px; border-radius:50%; background:#9bc8c1; box-shadow:0 0 0 3px rgba(128,201,187,.04); transition:box-shadow .6s ease; }
.ms-loading-satellite.is-pillars { left:23%; top:22%; }.ms-loading-satellite.is-balance { left:77%; top:22%; }.ms-loading-satellite.is-stars { left:23%; top:78%; }.ms-loading-satellite.is-timeline { left:77%; top:78%; }
.ms-loading-satellite.is-balance::before,.ms-loading-satellite.is-stars::before { background:#d7b86d; }.ms-loading-satellite.is-timeline::before { background:#9eb9d8; }
.ms-loading-graph[data-step="0"] .is-pillars,.ms-loading-graph[data-step="1"] .is-balance,.ms-loading-graph[data-step="2"] .is-balance,.ms-loading-graph[data-step="3"] .is-balance,.ms-loading-graph[data-step="4"] .is-stars,.ms-loading-graph[data-step="4"] .is-timeline,.ms-loading-graph.is-preview .ms-loading-satellite { opacity:1; }
.ms-loading-graph[data-step="0"] .is-pillars::before,.ms-loading-graph[data-step="1"] .is-balance::before,.ms-loading-graph[data-step="2"] .is-balance::before,.ms-loading-graph[data-step="3"] .is-balance::before,.ms-loading-graph[data-step="4"] .is-stars::before,.ms-loading-graph[data-step="4"] .is-timeline::before { box-shadow:0 0 0 4px rgba(128,201,187,.1),0 0 14px rgba(128,201,187,.3); }
.ms-loading-graph[data-step="0"] .ms-loading-link-0,.ms-loading-graph[data-step="1"] .ms-loading-link-1,.ms-loading-graph[data-step="2"] .ms-loading-link-1,.ms-loading-graph[data-step="3"] .ms-loading-link-1,.ms-loading-graph[data-step="4"] .ms-loading-link-2,.ms-loading-graph[data-step="4"] .ms-loading-link-3 { stroke:rgba(192,211,188,.65); opacity:1; }
.ms-loading-core { position:absolute; z-index:2; left:50%; top:50%; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:3px; box-sizing:border-box; width:28%; min-width:78px; aspect-ratio:1; padding:8px; border:1px solid rgba(231,196,109,.42); border-radius:50%; background:radial-gradient(circle at 50% 25%,rgba(226,184,109,.18),rgba(20,32,38,.96) 70%); box-shadow:0 0 0 7px rgba(226,184,109,.025); transform:translate(-50%,-50%); }
.ms-loading-core i { color:#f1d88e; font:28px/1 var(--serif); font-style:normal; }.ms-loading-core b { color:#b9c9c5; font:10px/1.2 var(--serif); font-weight:400; }.ms-loading-core small { color:#8ba9aa; font-size:8px; line-height:1.2; white-space:nowrap; }
.ms-loading-status { display:grid; grid-template-columns:5px minmax(0,1fr); align-items:center; gap:9px; box-sizing:border-box; min-height:48px; margin:8px 4px 0; color:#a4babf; font-size:11px; line-height:1.55; letter-spacing:0; }
.ms-loading-status-copy { display:grid; min-width:0; overflow-wrap:anywhere; }.ms-loading-status-copy > span { grid-area:1 / 1; align-self:center; }.ms-loading-status-copy .ms-loading-status-size { visibility:hidden; pointer-events:none; user-select:none; }
.ms-loading-status-dot { flex:0 0 auto; width:5px; height:5px; border-radius:50%; background:#82c7b9; animation:ms-loading-dot 2.8s ease-in-out infinite; }
.ms-loading-graph.is-preview .ms-loading-progress { display:none; }.ms-launch-preview .ms-loading-status-dot { animation:none; background:#c4b37e; }
@keyframes ms-loading-orbit { to { transform:rotate(360deg); } }
@keyframes ms-loading-dot { 0%,100% { opacity:.9; } 50% { opacity:.4; } }
@keyframes ms-loading-ellipsis { 0%,100% { opacity:.4; } 50% { opacity:1; } }

body.ms-reader-open { overflow:hidden; }
.ms-reader { position:fixed; inset:0; z-index:200; isolation:isolate; display:block; width:100%; height:100%; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:0; background:#05090e; }
.ms-reader #mingshuReaderContent { min-height:100%; width:100%; opacity:0; transform:translateY(10px); transition:opacity .28s ease,transform .42s cubic-bezier(.22,1,.36,1); }
.ms-reader.is-open #mingshuReaderContent { opacity:1; transform:none; }
.ms-reader .ms-cinema { min-height:100vh; min-height:100dvh; border:0 !important; border-radius:0 !important; box-shadow:none; }
.ms-reader .ms-cinema::after { right:3vw; bottom:-9vh; font-size:min(24vw, 230px); }
.ms-reader .ms-cinema-header { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,244px); align-items:center; gap:16px 24px; padding-top:max(20px, env(safe-area-inset-top)); padding-left:max(24px, env(safe-area-inset-left)); padding-right:max(24px, env(safe-area-inset-right)); }
.ms-reader .ms-cinema-header > .ms-reader-heading { display:flex; align-items:center; gap:16px; min-width:0; }
.ms-reader-heading .ms-reader-close { flex:none; min-height:44px; }
.ms-reader-heading .ms-cinema-identity { display:grid; gap:5px; min-width:0; }
.ms-reader-heading .ms-cinema-identity strong { overflow-wrap:anywhere; }
.ms-reader-heading .ms-cinema-identity small { max-width:none; overflow:visible; text-overflow:clip; white-space:normal; line-height:1.6; }
.ms-reader .ms-cinema-header > .ms-reader-account { grid-column:auto; justify-self:stretch; width:100%; }
.ms-reader .ms-reader-account #memberAccountHost { width:100%; }
.ms-reader .ms-cinema-header > .ms-cinema-header-actions { display:flex; grid-column:1 / -1; align-items:center; justify-content:space-between; gap:12px; padding-top:14px; border-top:1px solid rgba(226,184,109,.12); }
.ms-reader .ms-cinema-header .ms-reader-book-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; width:auto; }
.ms-reader-book-actions .ms-graph-toggle, .ms-reader .ms-reader-book-actions .ms-reader-action { width:auto; min-height:40px; padding:8px 12px; font-size:12px; }
.ms-reader .ms-cinema-layout { min-height:calc(100vh - 112px); min-height:calc(100dvh - 112px); }
.ms-reader .ms-cinema-stage { min-height:calc(100vh - 112px); min-height:calc(100dvh - 112px); padding-bottom:34px; }
.ms-reader .ms-cinema-footer { padding-bottom:max(14px, env(safe-area-inset-bottom)); padding-left:max(18px, env(safe-area-inset-left)); padding-right:max(18px, env(safe-area-inset-right)); }
.ms-reader-close { display:inline-flex; align-items:center; gap:7px; min-height:32px; padding:0 10px; border:1px solid rgba(226,184,109,.34); border-radius:7px; background:rgba(5,10,16,.36); color:#d8c381; cursor:pointer; font:11px var(--sans); transition:background .18s ease, border-color .18s ease; }.ms-reader-close:hover { border-color:#e7c674; background:rgba(226,184,109,.13); }.ms-reader-close:focus-visible { outline:2px solid #e2b86d; outline-offset:3px; }
.ms-cinema-header-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; }

@media (max-width:640px) {
  .ms-launch { grid-template-columns:minmax(0,1fr) 118px; gap:15px; min-height:390px; padding:27px 18px 62px; border-radius:14px; }.ms-launch-copy { align-self:center; }.ms-launch-copy h2 { margin-top:15px; font-size:32px; }.ms-launch-note { margin:15px 0 0; line-height:1.75; }.ms-launch-book { align-self:center; width:112px; margin:0; padding:18px 9px; transform:perspective(850px) rotateY(-9deg) rotateZ(1deg); }.ms-launch-book span { font-size:45px; }.ms-launch-book b { font-size:8px; }.ms-launch-book em { font-size:8px; }.ms-launch-chapters { left:18px; right:18px; bottom:13px; }
  .ms-launch-pending,.ms-launch-idle,.ms-launch-locked,.ms-launch-failed { display:block; min-height:0; padding-bottom:56px; }.ms-launch-pending .ms-launch-copy,.ms-launch-idle .ms-launch-copy,.ms-launch-locked .ms-launch-copy,.ms-launch-failed .ms-launch-copy { max-width:none; }.ms-launch-pending .ms-launch-copy h2,.ms-launch-idle .ms-launch-copy h2,.ms-launch-locked .ms-launch-copy h2,.ms-launch-failed .ms-launch-copy h2 { font-size:31px; }.ms-loading-visual { width:100%; max-width:360px; margin:22px auto 0; padding:10px; }.ms-loading-core i { font-size:25px; }.ms-launch-actions { align-items:flex-start; flex-direction:column; gap:7px; }.ms-launch-retry { min-height:34px; padding:0 2px; }
  .ms-reader .ms-cinema-header { padding-left:max(15px, env(safe-area-inset-left)); padding-right:max(15px, env(safe-area-inset-right)); }.ms-reader .ms-cinema-layout { min-height:0; }.ms-reader .ms-cinema-stage { min-height:calc(100dvh - 164px); padding-bottom:22px; }.ms-reader .ms-cinema-footer { padding-left:max(13px, env(safe-area-inset-left)); padding-right:max(13px, env(safe-area-inset-right)); }.ms-reader-close { min-height:36px; padding:0 10px; gap:5px; font-size:12px; }.ms-reader-close .ms-reader-back-arrow { font:18px/1 var(--sans); transform:translateY(-.5px); }
}
/* Opening a finished book gets full-width mobile copy and a compact action row. */
@media (max-width:640px) {
  .ms-launch-ready,.ms-launch-offline { grid-template-columns:minmax(0,1fr); min-height:0; gap:18px; }
  .ms-launch-actions { display:grid; grid-template-columns:repeat(2,max-content); align-items:center; gap:8px 12px; }
  .ms-launch-actions > .ms-launch-open { grid-column:1/-1; justify-self:start; }
  .ms-launch-actions > .ms-launch-retry { min-height:44px; padding:0 4px; justify-self:start; }
  .ms-launch-ready .ms-launch-book,.ms-launch-offline .ms-launch-book { justify-self:stretch; width:100%; aspect-ratio:auto; min-height:64px; padding:10px 14px; grid-template-columns:32px minmax(0,1fr); gap:2px 12px; transform:none; }
  .ms-launch-ready .ms-launch-book::after,.ms-launch-offline .ms-launch-book::after { display:none; }
  .ms-launch-ready .ms-launch-book > span,.ms-launch-offline .ms-launch-book > span { grid-row:1/3; font-size:32px; }
  .ms-launch-ready .ms-launch-book > b,.ms-launch-offline .ms-launch-book > b { justify-self:start; max-width:none; font-size:10px; text-align:left; }
  .ms-launch-ready .ms-launch-book > em,.ms-launch-offline .ms-launch-book > em { justify-self:start; margin:0; font-size:10px; text-align:left; }
}
@media (prefers-reduced-motion:reduce) { .ms-reader #mingshuReaderContent { transition:none; }.ms-launch-aurora,.ms-reader .ms-stage-glow,.ms-loading-progress,.ms-loading-status-dot,.ms-launch-open.is-loading > span { animation:none !important; }.ms-loading-satellite,.ms-loading-link,.ms-loading-satellite::before { transition:none; }.ms-loading-progress { display:none; }.ms-loading-satellite { opacity:1; } }

/* ═══════════ 命书 · 命运图谱 ═══════════
   这是阅读器里的“导演视图”：线条与节点保留关系，详情把它翻译回普通语言。
   桌面可总览；手机只呈现当前阶段，避免把脑图缩成不可读的缩略图。 */
.ms-graph-toggle,.ms-graph-close { display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:0 11px; border:1px solid rgba(123,178,192,.36); border-radius:8px; background:rgba(7,16,24,.52); color:#b8d6d8; cursor:pointer; font:10px var(--sans); letter-spacing:.6px; transition:transform .22s cubic-bezier(.22,1,.36,1),background .22s cubic-bezier(.22,1,.36,1),border-color .22s cubic-bezier(.22,1,.36,1); }
.ms-graph-toggle { gap:6px; }.ms-graph-toggle span { color:#e7c574; font:19px/1 var(--serif); transform:rotate(-12deg); }.ms-graph-toggle:hover,.ms-graph-close:hover { border-color:rgba(226,184,109,.72); background:rgba(226,184,109,.11); transform:translateY(-1px); }.ms-graph-toggle:active,.ms-graph-close:active { transform:translateY(0) scale(.98); }.ms-graph-toggle:focus-visible,.ms-graph-close:focus-visible,.ms-graph-node:focus-visible,.ms-graph-sources button:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
.ms-destiny-graph { position:relative; z-index:2; margin:0 clamp(13px,2.5vw,32px) clamp(16px,3vw,32px); overflow:hidden; isolation:isolate; border:1px solid rgba(111,160,181,.28); border-radius:16px; background:radial-gradient(ellipse 72% 85% at 73% 10%,rgba(86,155,181,.15),transparent 56%),radial-gradient(ellipse 58% 62% at 12% 90%,rgba(196,128,71,.12),transparent 63%),linear-gradient(145deg,#071019,#0d1723 57%,#081019); box-shadow:0 20px 52px rgba(0,0,0,.26),inset 0 1px rgba(255,255,255,.045); }
.ms-graph-mode-shell { display:flex; min-height:calc(100dvh - 112px); align-items:stretch; padding:10px 0 18px; background:radial-gradient(ellipse 70% 100% at 50% 10%,rgba(87,147,172,.08),transparent 64%); }.ms-graph-mode-shell .ms-destiny-graph { flex:1; margin:0 clamp(10px,2vw,28px); border-radius:14px; }.ms-graph-mode-shell .ms-graph-stage { min-height:calc(100dvh - 230px); }.ms-graph-mode-shell .ms-graph-canvas { min-height:calc(100dvh - 230px); }.ms-graph-mode-shell .ms-graph-detail { min-height:calc(100dvh - 230px); }
.ms-destiny-graph::before { content:''; position:absolute; z-index:-1; inset:0; pointer-events:none; opacity:.42; background:radial-gradient(circle at 11% 22%,rgba(232,220,177,.75) 0 1px,transparent 1.35px),radial-gradient(circle at 81% 54%,rgba(113,195,202,.65) 0 1px,transparent 1.25px),radial-gradient(circle at 55% 78%,rgba(232,220,177,.5) 0 1px,transparent 1.4px); background-size:83px 97px,127px 113px,161px 137px; mask-image:linear-gradient(135deg,transparent 0,#000 24%,#000 80%,transparent 100%); }
.ms-graph-head { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; padding:22px clamp(18px,3.2vw,37px) 17px; border-bottom:1px solid rgba(143,174,195,.18); }
.ms-graph-head > div:first-child { max-width:565px; }.ms-graph-head > div:first-child > span { color:#d8bc78; font-size:9px; letter-spacing:2.1px; }.ms-graph-head h2 { margin:8px 0 7px; color:#f0dba4; font:clamp(25px,3.3vw,38px)/1.2 var(--serif); letter-spacing:1.6px; text-wrap:balance; }.ms-graph-head p { margin:0; color:#99adbd; font-size:11px; line-height:1.8; }
.ms-graph-head-actions { display:grid; justify-items:end; gap:11px; flex:0 0 auto; }.ms-graph-head-buttons { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; }.ms-graph-legend { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; max-width:360px; }.ms-graph-legend span { position:relative; padding:3px 7px 3px 13px; border-radius:99px; color:#94a9ba; font-size:9px; white-space:nowrap; }.ms-graph-legend span::before { content:''; position:absolute; left:5px; top:50%; width:4px; height:4px; border-radius:50%; background:#d9c074; transform:translateY(-50%); }.ms-graph-legend .is-good::before { background:#71bea1; }.ms-graph-legend .is-risk::before { background:#df8c83; }.ms-graph-legend .is-source::before { width:6px; height:1px; border-radius:0; background:repeating-linear-gradient(90deg,#94aabc 0 2px,transparent 2px 4px); }
.ms-graph-stage { display:grid; grid-template-columns:minmax(0,1fr) minmax(260px,300px); min-height:675px; }.ms-graph-canvas { position:relative; min-width:0; min-height:675px; overflow:hidden; }.ms-graph-canvas::after { content:''; position:absolute; pointer-events:none; inset:0; background:radial-gradient(circle at 50% 42%,transparent 0 12%,rgba(5,11,18,.1) 60%,rgba(5,11,18,.4) 100%); }
.ms-graph-lines { position:absolute; z-index:0; inset:0; width:100%; height:100%; overflow:visible; }.ms-graph-edge { fill:none; stroke-width:1.4; stroke-linecap:round; opacity:.35; transition:opacity .28s cubic-bezier(.22,1,.36,1),filter .28s cubic-bezier(.22,1,.36,1); }.ms-graph-edge-main { stroke:#d8b86a; stroke-width:2.2; }.ms-graph-edge-timeline { stroke:#8ea4bc; stroke-width:1.8; }.ms-graph-edge-good { stroke:#72c5a3; }.ms-graph-edge-risk { stroke:#e38f83; }.ms-graph-edge-source { stroke:#8aa5b6; stroke-dasharray:none; opacity:.14; }.ms-graph-edge-activation { stroke:#d5c579; stroke-dasharray:none; opacity:.14; }.ms-graph-edge.is-muted { opacity:.07; }.ms-graph-edge.is-active { opacity:1; stroke-width:2.7; filter:drop-shadow(0 0 5px currentColor); }
.ms-graph-node-layer { position:absolute; z-index:1; inset:0; }.ms-graph-node { position:absolute; left:var(--gx); top:var(--gy); display:grid; grid-template-columns:auto minmax(0,1fr); gap:1px 6px; min-width:0; max-width:145px; padding:7px 8px; border:1px solid rgba(136,163,184,.28); border-radius:9px; background:rgba(7,16,25,.82); color:#aab9c7; box-shadow:0 9px 22px rgba(0,0,0,.22),inset 0 1px rgba(255,255,255,.035); cursor:pointer; text-align:left; transform:translate(-50%,-50%); transition:transform .28s cubic-bezier(.22,1,.36,1),border-color .28s cubic-bezier(.22,1,.36,1),background .28s cubic-bezier(.22,1,.36,1),box-shadow .28s cubic-bezier(.22,1,.36,1),opacity .28s cubic-bezier(.22,1,.36,1); }
.ms-graph-node i { grid-row:span 2; display:grid; place-items:center; width:23px; height:23px; border-radius:50%; background:rgba(139,166,188,.12); color:#9eb8c9; font:10px/1 var(--serif); font-style:normal; }.ms-graph-node span { overflow:hidden; color:#8fa6b8; font-size:8px; letter-spacing:.45px; text-overflow:ellipsis; white-space:nowrap; }.ms-graph-node b { overflow:hidden; color:#dbe3e8; font:600 10px/1.28 var(--sans); text-overflow:ellipsis; white-space:nowrap; }.ms-graph-node small { grid-column:1/-1; margin-top:2px; color:#bfa765; font-size:8px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ms-graph-node:hover { z-index:3; border-color:rgba(227,195,112,.76); background:rgba(18,31,42,.94); transform:translate(-50%,-50%) translateY(-3px) scale(1.035); }.ms-graph-node.is-muted { opacity:.22; filter:saturate(.55); }.ms-graph-node.is-related { opacity:1; filter:none; }.ms-graph-node.is-selected { z-index:4; border-color:#f0d183; background:linear-gradient(145deg,rgba(226,184,109,.22),rgba(13,27,38,.96)); box-shadow:0 0 0 4px rgba(226,184,109,.09),0 13px 30px rgba(0,0,0,.31); transform:translate(-50%,-50%) scale(1.08); }.ms-graph-node-root { min-width:160px; padding:10px 12px; border-color:rgba(231,194,102,.62); background:radial-gradient(circle at 50% 12%,rgba(226,184,109,.22),transparent 56%),rgba(9,18,26,.92); }.ms-graph-node-root i { width:30px; height:30px; color:#f0d58b; background:rgba(226,184,109,.17); }.ms-graph-node-root b { color:#f1dda7; font:14px var(--serif); letter-spacing:1px; }.ms-graph-node-main { border-color:rgba(226,184,109,.43); }.ms-graph-node-main i { color:#e6c97b; background:rgba(226,184,109,.12); }.ms-graph-node-good { border-color:rgba(103,190,154,.45); background:rgba(21,61,59,.48); }.ms-graph-node-good i { color:#99d9bf; background:rgba(91,184,146,.17); }.ms-graph-node-good b { color:#b8ddc9; }.ms-graph-node-risk { border-color:rgba(217,126,116,.48); background:rgba(64,32,37,.5); }.ms-graph-node-risk i { color:#e8a094; background:rgba(210,103,94,.16); }.ms-graph-node-risk b { color:#ebbbb4; }.ms-graph-node-time { max-width:105px; border-color:rgba(133,159,190,.42); background:rgba(19,31,50,.72); }.ms-graph-node-time i { color:#afc9df; background:rgba(115,152,194,.16); }.ms-graph-node-source { max-width:116px; padding:6px 7px; border-style:dashed; border-color:rgba(133,164,181,.42); background:rgba(7,15,22,.72); }.ms-graph-node-source i { width:19px; height:19px; color:#8ca7b6; font-size:8px; }.ms-graph-node-source span { font-size:7px; }.ms-graph-node-source b { color:#bac8d0; font-size:8px; }
.ms-graph-detail { position:relative; display:flex; flex-direction:column; min-width:0; padding:26px 22px; border-left:1px solid rgba(143,174,195,.18); background:linear-gradient(180deg,rgba(2,8,14,.4),rgba(10,18,27,.74)); }.ms-graph-detail::before { content:''; position:absolute; left:-1px; top:24px; width:1px; height:76px; background:#e2b86d; box-shadow:0 0 14px rgba(226,184,109,.45); }.ms-graph-detail-good::before { background:#70c49e; box-shadow:0 0 14px rgba(112,196,158,.46); }.ms-graph-detail-risk::before { background:#e18c81; box-shadow:0 0 14px rgba(225,140,129,.46); }.ms-graph-detail-source::before { background:#8ba8b9; box-shadow:none; }.ms-graph-detail-time::before { background:#95afd4; box-shadow:0 0 14px rgba(149,175,212,.4); }
.ms-graph-detail-head { display:flex; align-items:center; justify-content:space-between; gap:8px; color:#8ea4b4; font-size:9px; letter-spacing:1.2px; }.ms-graph-detail-time { color:#d7bb76; font-size:8px; letter-spacing:0; font-variant-numeric:tabular-nums; }.ms-graph-detail h3 { margin:15px 0 5px; color:#f0dba4; font:25px/1.25 var(--serif); letter-spacing:1px; }.ms-graph-detail > b { color:#9fc4bd; font:11px var(--sans); }.ms-graph-detail p { margin:14px 0 0; color:#bac7d2; font-size:12px; line-height:1.86; overflow-wrap:anywhere; }.ms-graph-detail .ms-graph-detail-secondary { color:#8ea3b5; font-size:10px; line-height:1.75; }.ms-graph-sources { margin-top:auto; padding-top:21px; }.ms-graph-sources > span { display:block; margin-bottom:8px; color:#7891a4; font-size:9px; letter-spacing:1.3px; }.ms-graph-sources > div { display:flex; flex-wrap:wrap; gap:6px; }.ms-graph-sources button { min-height:29px; padding:4px 7px; border:1px dashed rgba(136,169,188,.42); border-radius:6px; background:rgba(124,156,175,.06); color:#b3c7d0; cursor:pointer; font:9px/1.4 var(--sans); text-align:left; transition:background .2s cubic-bezier(.22,1,.36,1),border-color .2s cubic-bezier(.22,1,.36,1),transform .2s cubic-bezier(.22,1,.36,1); }.ms-graph-sources button:hover { border-color:rgba(226,184,109,.67); background:rgba(226,184,109,.11); transform:translateY(-1px); }.ms-graph-no-sources { margin-top:auto !important; color:#8198a8 !important; font-size:10px !important; }
.ms-graph-sources-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }.ms-graph-sources-head > span { color:#7891a4; font-size:9px; letter-spacing:1.3px; }.ms-graph-sources-toggle { min-height:29px; padding:4px 7px; border:1px solid rgba(130,164,184,.36); border-radius:7px; background:rgba(109,148,170,.07); color:#a9c2d0; cursor:pointer; font:9px/1.2 var(--sans); white-space:nowrap; transition:transform .2s cubic-bezier(.22,1,.36,1),border-color .2s cubic-bezier(.22,1,.36,1),background .2s cubic-bezier(.22,1,.36,1); }.ms-graph-sources-toggle:hover { border-color:rgba(226,184,109,.65); background:rgba(226,184,109,.1); transform:translateY(-1px); }.ms-graph-sources-toggle:active { transform:scale(.98); }.ms-graph-sources-toggle:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }.ms-graph-all-sources-toggle { min-height:34px; padding:0 10px; font-size:9px; }
.ms-graph-chain { margin-top:18px; padding-top:15px; border-top:1px solid rgba(143,174,195,.16); }.ms-graph-chain-title { display:block; margin-bottom:8px; color:#d3ba79; font-size:9px; letter-spacing:1.3px; }.ms-graph-chain-list { display:grid; gap:6px; }.ms-graph-chain-step { position:relative; display:grid; grid-template-columns:39px minmax(0,1fr); gap:6px; padding:7px 8px; border:1px solid rgba(135,164,181,.17); border-radius:7px; background:rgba(122,157,177,.045); }.ms-graph-chain-step + .ms-graph-chain-step::before { content:'\2193'; position:absolute; top:-9px; left:15px; color:#cbb16f; font-size:9px; line-height:1; }.ms-graph-chain-step small { color:#89a4b4; font-size:8px; line-height:1.5; white-space:nowrap; }.ms-graph-chain-step p { margin:0 !important; color:#c0ced6 !important; font-size:9px !important; line-height:1.58 !important; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:3; overflow:hidden; }
.ms-graph-mobile-map { display:none; }
.ms-graph-mobile-summaries { display:none; }
.ms-graph-mobile-time-head { display:none; }

@media (max-width:900px) { .ms-graph-stage { grid-template-columns:minmax(0,1fr) 250px; }.ms-graph-detail { padding:22px 17px; }.ms-graph-node { max-width:120px; }.ms-graph-node-root { min-width:140px; }.ms-graph-node-source { max-width:94px; }.ms-graph-node-source b { font-size:7px; } }
@media (max-width:640px) { .ms-graph-toggle { min-height:31px; padding:0 8px; font-size:9px; }.ms-graph-toggle span { font-size:16px; }.ms-destiny-graph { margin:0 0 14px; border-right:0; border-left:0; border-radius:0; }.ms-graph-head { display:block; padding:16px 14px 12px; }.ms-graph-head h2 { margin-top:6px; font-size:24px; }.ms-graph-head p { font-size:9.5px; line-height:1.62; }.ms-graph-head-actions { display:flex; align-items:center; justify-content:space-between; margin-top:10px; }.ms-graph-head-buttons { gap:5px; }.ms-graph-legend { justify-content:flex-start; gap:2px; }.ms-graph-legend span { padding-right:5px; font-size:8px; }.ms-graph-close { min-height:32px; padding:0 9px; white-space:nowrap; font-size:9px; }.ms-graph-all-sources-toggle { min-height:32px; padding:0 7px; font-size:8px; }.ms-graph-stage { display:block; min-height:0; }.ms-graph-canvas { display:none; }.ms-graph-mobile-map { position:relative; display:grid; gap:9px; padding:13px 13px 11px; overflow:hidden; background:radial-gradient(circle at 50% 23%,rgba(226,184,109,.11),transparent 42%); }.ms-graph-mobile-map::before { content:''; position:absolute; left:50%; top:22%; bottom:12%; width:1px; background:linear-gradient(#788fa4,rgba(226,184,109,.62),rgba(112,196,158,.5),transparent); opacity:.42; }.ms-graph-mobile-source-label { justify-content:flex-start; padding-left:2px; }.ms-graph-mobile-summaries { position:relative; z-index:1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }.ms-graph-mobile-summary { display:grid; gap:3px; min-width:0; min-height:54px; padding:7px 6px; border:1px solid rgba(135,164,181,.23); border-radius:8px; background:rgba(7,16,25,.62); color:#b9cad4; text-align:left; cursor:pointer; }.ms-graph-mobile-summary i { color:#d7bd77; font:9px/1 var(--serif); font-style:normal; }.ms-graph-mobile-summary b { overflow:hidden; color:#c8d6dc; font:8px/1.25 var(--sans); font-weight:500; text-overflow:ellipsis; white-space:nowrap; }.ms-graph-mobile-summary span { color:#8199a9; font-size:7px; }.ms-graph-mobile-summary.is-stars { border-color:rgba(217,184,95,.35); }.ms-graph-mobile-summary.is-balance { border-color:rgba(116,190,163,.28); }.ms-graph-mobile-sources,.ms-graph-mobile-main,.ms-graph-mobile-branches,.ms-graph-mobile-time { position:relative; z-index:1; display:flex; justify-content:center; gap:7px; }.ms-graph-mobile-sources { justify-content:flex-start; overflow-x:auto; padding:2px 2px 7px; scrollbar-width:none; touch-action:pan-x; }.ms-graph-mobile-sources::-webkit-scrollbar { display:none; }.ms-graph-mobile-branches { align-items:stretch; }.ms-graph-mobile-time { padding-top:0; }.ms-graph-mobile-time-head { position:relative; z-index:1; display:flex; align-items:baseline; justify-content:space-between; padding:1px 2px 0; color:#a5b7c2; font-size:8px; letter-spacing:.7px; }.ms-graph-mobile-time-head small { color:#71889a; font-size:7px; }.ms-graph-mobile-map .ms-graph-node { position:relative; left:auto; top:auto; flex:0 1 172px; width:auto; min-width:0; max-width:180px; transform:none !important; }.ms-graph-mobile-map .ms-graph-node-source { flex:0 0 112px; }.ms-graph-mobile-map .ms-graph-node-root { min-width:150px; }.ms-graph-mobile-map .ms-graph-node.is-selected { box-shadow:0 0 0 3px rgba(226,184,109,.09),0 9px 22px rgba(0,0,0,.24); }.ms-graph-mobile-source-groups { display:grid; gap:10px; padding-top:3px; border-top:1px solid rgba(143,174,195,.13); }.ms-graph-detail { min-height:0; padding:15px 14px 19px; border-top:1px solid rgba(143,174,195,.18); border-left:0; }.ms-graph-detail::before { top:-1px; left:18px; width:72px; height:1px; }.ms-graph-detail h3 { margin-top:11px; font-size:21px; }.ms-graph-detail p { margin-top:9px; font-size:11px; line-height:1.72; }.ms-graph-sources { margin-top:15px; padding-top:0; } }
@media (max-width:640px) { .ms-graph-mobile-time { justify-content:flex-start; overflow-x:auto; padding:2px 2px 7px; scrollbar-width:none; scroll-snap-type:x proximity; }.ms-graph-mobile-time::-webkit-scrollbar { display:none; }.ms-graph-mobile-time .ms-graph-node { flex:0 0 126px; scroll-snap-align:start; } }
@media (max-width:390px) { .ms-graph-head h2 { font-size:24px; }.ms-graph-legend .is-source { display:none; }.ms-graph-mobile-map { padding-left:12px; padding-right:12px; }.ms-graph-mobile-branches { gap:6px; }.ms-graph-mobile-map .ms-graph-node { padding:6px; }.ms-graph-mobile-map .ms-graph-node b { font-size:9px; } }
@media (prefers-reduced-motion:reduce) { .ms-graph-toggle,.ms-graph-close,.ms-graph-node,.ms-graph-edge,.ms-graph-sources button { transition:none; } }

/* ═══════════ 首页快速录入 / 本机命盘 ═══════════ */
#homeShell { max-width: 792px; margin-inline: auto; padding-bottom: 18px; }
.input-card-compact { max-width: 760px; }
.quick-inline-row, .quick-mode-row, .quick-date-row, .quick-hour-row, .quick-lunar-hour { display: flex; align-items: end; gap: 12px; min-width: 0; }
.quick-inline-row { margin-bottom: 10px; }
.quick-field, .quick-mode-row, .quick-date-row, .quick-hour-row { min-width: 0; }
.quick-field > span, .quick-mode-row > span, .quick-date-row > span, .quick-hour-row > span { display: block; margin: 0 0 5px; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 1.25px; white-space: nowrap; }
.quick-field > span i { color: var(--ink-faint); font-style: normal; font-weight: 400; letter-spacing: .2px; }
.quick-name { flex: 1 1 0; }
.quick-gender { flex: 1.3 1 0; }
.quick-field input { width: 100%; }
.quick-mode-row { align-items: center; margin-bottom: 10px; }
.quick-mode-row > span { flex: 0 0 66px; margin: 0; }
.quick-mode-row .seg { flex: 1; }
.mode-pane-compact { margin: 0 0 11px; padding: 10px 12px 9px; }
.quick-date-row { align-items: center; }
.quick-date-row > span, .quick-hour-row > span { flex: 0 0 66px; margin: 0; }
.quick-date-row .ymd-grid, .quick-date-row .inline-fields { flex: 1; min-width: 0; }
.quick-hour-row { flex: 1; align-items: center; }
.quick-hour-row select { flex: 1; min-width: 0; }
.quick-lunar-hour { margin-top: 9px; align-items: center; }
.quick-check { flex: 0 0 auto; color: var(--ink-dim); font-size: 12px; white-space: nowrap; }
.advanced-options { margin-top: 9px; border-top: 1px dashed rgba(127,140,156,.28); }
.advanced-options > summary { min-height: 34px; display: flex; align-items: center; cursor: pointer; color: var(--ink-faint); font-size: 10px; letter-spacing: .8px; list-style: none; }
.advanced-options > summary::-webkit-details-marker { display: none; }
.advanced-options > summary::after { content: '＋'; margin-left: auto; color: var(--gold); font-size: 14px; }
.advanced-options[open] > summary::after { content: '－'; }
.advanced-options-body { display: grid; gap: 8px; padding: 2px 0 2px; }
.advanced-check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-dim); font-size: 11px; }
.advanced-check input, .quick-check input { accent-color: var(--gold); }
.advanced-tst { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px; }
.advanced-help { margin: 0; color: var(--ink-faint); font-size: 10px; line-height: 1.6; }
.input-card-compact .input-actions { margin-top: 10px; }
.input-card-compact .btn-primary { min-height: 44px; letter-spacing: 4px; }
.input-note-compact { margin-top: 8px; text-align: center; font-size: 10px; }

/* 快速录入控件统一基线：姓名、日期、时辰和城市输入使用同一套触摸尺寸。 */
.input-card-compact .quick-field,
.input-card-compact .quick-date-row,
.input-card-compact .quick-hour-row,
.input-card-compact .city-ac-wrap { min-width: 0; }
.input-card-compact .quick-field { display: flex; flex-direction: column; align-items: stretch; gap: 5px; }
.input-card-compact .quick-field > span { min-height: 16px; display: flex; align-items: center; margin: 0; }
.input-card-compact .quick-field input,
.input-card-compact .quick-date-row input,
.input-card-compact .quick-date-row select,
.input-card-compact .quick-hour-row select,
.input-card-compact .advanced-tst .city-ac-wrap input {
  display: block; width: 100%; min-width: 0; height: 44px; min-height: 44px;
  padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg2); color: var(--ink); font: 15px/44px var(--sans);
  color-scheme: dark; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.input-card-compact .quick-field input:focus,
.input-card-compact .quick-date-row input:focus,
.input-card-compact .quick-date-row select:focus,
.input-card-compact .quick-hour-row select:focus,
.input-card-compact .advanced-tst .city-ac-wrap input:focus {
  border-color: var(--gold-dim); box-shadow: 0 0 0 2px rgba(232,200,106,.1);
}
.input-card-compact .quick-field input { text-align: left; }
.input-card-compact .quick-date-row input,
.input-card-compact .quick-date-row select { text-align: center; }
.input-card-compact .quick-field .seg { height: 44px; min-height: 44px; align-self: stretch; }
.input-card-compact .quick-field .seg-btn { min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.input-card-compact .quick-mode-row > span,
.input-card-compact .quick-date-row > span,
.input-card-compact .quick-hour-row > span { height: 44px; min-height: 44px; display: flex; align-items: center; margin: 0; }

@media (max-width: 640px) {
  .input-card-compact .quick-inline-row { align-items: stretch; }
  .input-card-compact .quick-field > span { min-height: 17px; }
  .input-card-compact .quick-field input,
  .input-card-compact .quick-date-row input,
  .input-card-compact .quick-date-row select,
  .input-card-compact .quick-hour-row select { height: 44px; min-height: 44px; font-size: 15px; }
  .input-card-compact .quick-field .seg,
  .input-card-compact .quick-field .seg-btn { height: 44px; min-height: 44px; }
  .input-card-compact .quick-date-row .ymd-grid,
  .input-card-compact .quick-date-row .inline-fields { align-items: stretch; }
}
.saved-charts { max-width: 760px; margin: -4px 16px 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(23,29,38,.72); }
.saved-charts-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.saved-charts-head > div { display: grid; gap: 1px; }
.saved-charts-head span { color: var(--gold-soft); font: 13px var(--serif); letter-spacing: 1px; }
.saved-charts-head small { color: var(--muted); font-size: 9px; }
.saved-clear-btn, .saved-chart-remove, .result-home-btn, .result-save-btn { appearance: none; cursor: pointer; font-family: var(--sans); }
.saved-clear-btn { min-height: 30px; padding: 0 9px; border: 1px solid rgba(127,140,156,.36); border-radius: 6px; background: transparent; color: var(--muted); font-size: 10px; }
.saved-clear-btn:hover { border-color: rgba(220,118,108,.72); color: #eca39b; }
.saved-chart-list { display: grid; gap: 6px; }
.saved-chart { display: grid; grid-template-columns: minmax(0,1fr) 32px; min-width: 0; border: 1px solid rgba(59,73,90,.75); border-radius: 8px; overflow: hidden; background: rgba(8,13,20,.25); }
.saved-chart-open { min-width: 0; padding: 8px 10px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.saved-chart-open:hover { background: rgba(226,184,109,.07); }
.saved-chart-open strong, .saved-chart-open span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-chart-open strong { color: var(--ink); font-size: 12px; font-weight: 600; }
.saved-chart-open span { margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.saved-chart-remove { border: 0; border-left: 1px solid rgba(59,73,90,.75); background: transparent; color: var(--ink-faint); font-size: 18px; line-height: 1; }
.saved-chart-remove:hover { background: rgba(220,118,108,.1); color: #eca39b; }
.result-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 16px 0; }
.result-home-btn, .result-save-btn { min-height: 36px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 7px; background: rgba(18,24,32,.7); color: var(--ink-dim); font-size: 11px; letter-spacing: .4px; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.result-home-btn:hover { border-color: var(--gold-dim); color: var(--gold-soft); background: rgba(226,184,109,.07); }
.result-save-btn { border-color: rgba(226,184,109,.48); color: var(--gold-soft); }
.result-save-btn:hover { border-color: var(--gold); background: rgba(226,184,109,.12); }
.result-home-btn:active, .result-save-btn:active { transform: scale(.98); }
.result-toolbar-save { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.result-save-status { max-width: 130px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.result-save-status.is-success { color: #9fd7c8; }.result-save-status.is-error { color: #eca39b; }
.saved-clear-btn:focus-visible, .saved-chart-open:focus-visible, .saved-chart-remove:focus-visible, .result-home-btn:focus-visible, .result-save-btn:focus-visible, .advanced-options > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (min-width: 800px) {
  .input-card-compact, .saved-charts { margin-left: auto; margin-right: auto; }
}
@media (max-width: 640px) {
  .input-card-compact { padding: 13px 12px 12px; }
  .input-card-compact .input-row { margin-bottom: 0; }
  .quick-inline-row { gap: 8px; }
  .quick-gender { flex: 1.15 1 0; }
  .quick-field > span, .quick-mode-row > span, .quick-date-row > span, .quick-hour-row > span { margin-bottom: 4px; font-size: 9.5px; }
  .quick-field input, .quick-field .seg, .quick-mode-row .seg { min-height: 38px; }
  .quick-field .seg-btn, .quick-mode-row .seg-btn { min-height: 38px; padding: 7px 3px; font-size: 11px; letter-spacing: 0; }
  .quick-mode-row { gap: 8px; }
  .quick-mode-row > span, .quick-date-row > span, .quick-hour-row > span { flex-basis: 58px; }
  .mode-pane-compact { padding: 8px 9px; }
  .quick-date-row .ymd-grid, .quick-date-row .inline-fields { grid-template-columns: 1.25fr .9fr .9fr; gap: 5px; }
  .quick-date-row .ymd-grid input, .quick-date-row .ymd-grid select, .quick-date-row .inline-fields input, .quick-date-row .inline-fields select, .quick-hour-row select { min-height: 38px; padding: 6px 5px; font-size: 14px; }
  .quick-lunar-hour { gap: 8px; }
  .advanced-options > summary { min-height: 31px; font-size: 9.5px; }
  .advanced-tst { grid-template-columns: 1fr; gap: 6px; }
  .saved-charts { margin: -6px 12px 16px; padding: 10px; }
  .result-toolbar { margin: 8px 12px 0; gap: 8px; }
  .result-home-btn, .result-save-btn { min-height: 34px; padding: 0 8px; font-size: 10px; }
  .result-save-status { max-width: 84px; font-size: 9px; }
}
@media (max-width: 360px) {
  .quick-inline-row { display: grid; grid-template-columns: 1fr; }
  .quick-mode-row > span, .quick-date-row > span, .quick-hour-row > span { flex-basis: 54px; }
  .quick-field .seg-btn, .quick-mode-row .seg-btn { font-size: 10px; }
}
.ms-graph-legend .is-star::before { background:#d9b85f; box-shadow:0 0 7px rgba(217,184,95,.7); }
.ms-graph-node-star { border-color:rgba(217,184,95,.62); background:rgba(63,48,24,.72); }
.ms-graph-node-star i { color:#f0d27a; background:rgba(217,184,95,.18); }
.ms-graph-node-star b { color:#ecd38a; }
.ms-graph-node-tags { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:2px 4px; margin-top:3px; color:#9fb2be; font-size:7px; line-height:1.35; white-space:normal; }
.ms-graph-node-tags em { font-style:normal; }
.ms-graph-categories { position:absolute; z-index:2; inset:0; pointer-events:none; color:#71899a; font-size:8px; letter-spacing:1px; text-transform:none; }
.ms-graph-categories span { position:absolute; padding:3px 6px; border:1px solid rgba(130,161,177,.18); border-radius:5px; background:rgba(6,14,22,.68); }
.ms-graph-categories .is-pillar { left:3%; top:2%; }
.ms-graph-categories .is-balance { left:71%; top:2%; }
.ms-graph-categories .is-star { left:3%; top:13.5%; color:#cfb86f; border-color:rgba(217,184,95,.28); }
.ms-graph-star-pillar-labels { position:absolute; left:2.5%; top:17.6%; width:68%; display:grid; grid-template-columns:repeat(4,1fr); color:#947f4e; font-size:7px; letter-spacing:1.3px; text-align:center; }
.ms-graph-edge-source { stroke-width:.72; stroke-dasharray:none; opacity:.11; }
.ms-graph-edge-activation { stroke-width:.78; stroke-dasharray:none; opacity:.13; }
.ms-graph-edge-energy { stroke:#e0bd66; stroke-width:1; stroke-dasharray:none; opacity:.64; filter:drop-shadow(0 0 2px rgba(224,189,102,.42)); }
.ms-graph-legend .is-energy::before { width:9px; height:2px; border-radius:0; background:repeating-linear-gradient(90deg,#e0bd66 0 2px,transparent 2px 4px); box-shadow:0 0 5px rgba(224,189,102,.6); }
@keyframes msGraphEnergyFlow { to { stroke-dashoffset:0; } }
.ms-graph-mobile-source-label { display:flex; align-items:baseline; justify-content:center; gap:7px; color:#cdb673; font-size:9px; letter-spacing:.8px; }
.ms-graph-mobile-source-label span { color:#8399a9; font-size:8px; letter-spacing:.2px; }
@media (max-width:640px) { .ms-graph-categories { display:none; }.ms-graph-node-tags { font-size:7px; }.ms-graph-mobile-source-label { padding-bottom:1px; } }
@media (prefers-reduced-motion:reduce) { .ms-graph-edge-energy { animation:none; opacity:.62; } }

/* 图谱关系线的层级：来源线退到背景，只有神煞组合保留可追踪的流动感。 */
.ms-graph-edge-source { stroke-width:.62; stroke-dasharray:none; opacity:.1; }
.ms-graph-edge-activation { stroke-width:.7; stroke-dasharray:none; opacity:.12; }
.ms-graph-edge-energy { stroke:#e3c36d; stroke-width:.92; stroke-dasharray:none; opacity:.58; filter:drop-shadow(0 0 2px rgba(227,195,109,.4)); }
.ms-graph-edge-energy.is-active { stroke-width:1.42; opacity:.92; filter:drop-shadow(0 0 4px rgba(227,195,109,.82)); }
.ms-graph-edge-source.is-active,.ms-graph-edge-activation.is-active { stroke-width:1.05; opacity:.34; filter:none; }

/* 桌面图谱保持时间轴在首屏下缘可见；更高视口仍保留完整呼吸空间。 */
.ms-graph-mode-shell .ms-graph-stage,
.ms-graph-mode-shell .ms-graph-canvas,
.ms-graph-mode-shell .ms-graph-detail { min-height:clamp(620px,calc(100dvh - 300px),770px); }

/* 来源节点按类别留出可读宽度，干、支与调衡标签不再挤成一团。 */
.ms-graph-node-category-pillar { min-width:137px; max-width:154px; }
.ms-graph-node-category-balance { min-width:145px; max-width:170px; }
.ms-graph-node-category-star { min-width:126px; max-width:142px; }
.ms-graph-node-category-pillar .ms-graph-node-tags { font-size:7.2px; }
.ms-graph-node-tags { display:grid; gap:2px; line-height:1.35; }
.ms-graph-node-tags em { display:block; }

/* 三层来源区的标记与神煞列标题保持在节点上方。 */
.ms-graph-categories .is-star { top:18.5%; }
.ms-graph-star-pillar-labels { top:22.8%; }

/* 手机端也完整保留四柱、调衡、神煞三类来源，只在各自横向轨道内浏览。 */
.ms-graph-mobile-group { position:relative; z-index:1; display:grid; gap:5px; min-width:0; }
.ms-graph-mobile-group-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:0 2px; }
.ms-graph-mobile-group-head b { color:#cdb673; font:10px/1.2 var(--serif); letter-spacing:.9px; }
.ms-graph-mobile-group-head span { color:#8097a7; font-size:8px; letter-spacing:.15px; }
.ms-graph-mobile-group-list { display:flex; gap:8px; min-width:0; overflow-x:auto; padding:1px 2px 7px; scrollbar-width:none; touch-action:pan-x; }
.ms-graph-mobile-group-list::-webkit-scrollbar { display:none; }
.ms-graph-mobile-group-list .ms-graph-node { flex:0 0 152px; max-width:152px; }
.ms-graph-mobile-group.is-pillars .ms-graph-node { flex-basis:158px; max-width:158px; }
.ms-graph-mobile-group.is-balance .ms-graph-node { flex-basis:164px; max-width:164px; }
.ms-graph-mobile-group.is-stars .ms-graph-node { flex-basis:148px; max-width:148px; }
.ms-graph-mobile-current { position:relative; z-index:1; display:grid; gap:10px; }

@media (max-width:390px) {
  .ms-graph-mobile-group-list .ms-graph-node { flex-basis:144px; max-width:144px; }
  .ms-graph-mobile-group.is-pillars .ms-graph-node { flex-basis:150px; max-width:150px; }
  .ms-graph-mobile-group.is-balance .ms-graph-node { flex-basis:154px; max-width:154px; }
  .ms-graph-mobile-group.is-stars .ms-graph-node { flex-basis:140px; max-width:140px; }
}

/* 移动端图谱采用“摘要卡 + 详情面板”：首屏保留可比较的信息，
   影响要素、出处与完整神煞属性统一在点击后的详情里展开。 */
.ms-graph-node-mobile-meta { grid-column:1/-1; display:block; min-width:0; margin-top:1px; overflow:hidden; color:#9fb2be; font-size:7px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:640px) {
  .ms-graph-head { padding:15px 14px 11px; }
  .ms-graph-head h2 { max-width:19em; margin-top:5px; font-size:23px; line-height:1.18; letter-spacing:1px; }
  .ms-graph-head p { display:-webkit-box; max-width:38em; margin-top:7px; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; font-size:9.5px; line-height:1.58; }
  .ms-graph-head-actions { margin-top:9px; }
  .ms-graph-legend { gap:2px 4px; }
  .ms-graph-legend .is-energy,
  .ms-graph-legend .is-source { display:none; }
  .ms-graph-mobile-map { gap:8px; padding:12px 12px 8px; }
  .ms-graph-mobile-source-label { gap:5px; padding-bottom:0; font-size:8px; }
  .ms-graph-mobile-source-label span { font-size:7px; }
  .ms-graph-mobile-group { gap:3px; }
  .ms-graph-mobile-group-head { padding:0 2px; }
  .ms-graph-mobile-group-head b { font-size:9px; }
  .ms-graph-mobile-group-head span { font-size:7px; }
  .ms-graph-mobile-group-list { gap:6px; padding:0 2px 4px; }
  .ms-graph-mobile-group-list .ms-graph-node { flex:0 0 136px; max-width:136px; min-height:44px; padding:6px 7px; gap:1px 5px; border-radius:8px; }
  .ms-graph-mobile-group.is-pillars .ms-graph-node { flex-basis:140px; max-width:140px; }
  .ms-graph-mobile-group.is-balance .ms-graph-node { flex-basis:142px; max-width:142px; }
  .ms-graph-mobile-group.is-stars .ms-graph-node { flex-basis:132px; max-width:132px; }
  .ms-graph-mobile-map .ms-graph-node i { width:18px; height:18px; font-size:8px; }
  .ms-graph-mobile-map .ms-graph-node span { font-size:7px; letter-spacing:.2px; }
  .ms-graph-mobile-map .ms-graph-node b { font-size:9px; line-height:1.2; }
  .ms-graph-mobile-map .ms-graph-node small { margin-top:1px; font-size:7px; }
  .ms-graph-mobile-map .ms-graph-node-mobile-meta { font-size:7px; }
  .ms-graph-mobile-main .ms-graph-node { flex:0 1 168px; max-width:168px; min-height:44px; padding:6px 8px; }
  .ms-graph-mobile-branches { gap:5px; }
  .ms-graph-mobile-branches .ms-graph-node { flex:1 1 0; max-width:none; min-width:0; min-height:44px; padding:6px; }
  .ms-graph-mobile-time { gap:5px; padding:0 2px 4px; }
  .ms-graph-mobile-time .ms-graph-node { flex:0 0 114px; max-width:114px; min-height:44px; padding:6px; }
  .ms-graph-detail { padding:13px 14px 17px; }
  .ms-graph-detail h3 { margin-top:10px; font-size:20px; }
  .ms-graph-detail p { margin-top:8px; font-size:11px; line-height:1.7; }
  .ms-graph-detail .ms-graph-detail-secondary { font-size:9.5px; line-height:1.65; }
  .ms-graph-chain { margin-top:12px; padding-top:11px; }
  .ms-graph-sources { margin-top:12px; }
}
@media (max-width:420px) {
  .ms-graph-mobile-source-label span { display:none; }
}

/* 手机全览：不把桌面图谱挤进竖屏，而是给关系线一张可缩放、可横向浏览的独立画布。
   即便浏览器拒绝屏幕旋转，用户也始终能用适配 / 放大 / 缩小看清完整图谱。 */
.ms-graph-overview-toggle { display:none; align-items:center; justify-content:center; min-height:34px; padding:0 10px; border:1px solid rgba(125,185,187,.5); border-radius:8px; background:rgba(83,151,153,.1); color:#b8ded5; cursor:pointer; font:9px var(--sans); letter-spacing:.45px; transition:background .18s ease,border-color .18s ease,transform .18s ease; }
.ms-graph-overview-toggle:hover { border-color:rgba(226,184,109,.7); background:rgba(226,184,109,.12); transform:translateY(-1px); }
.ms-graph-overview-toggle:active { transform:scale(.98); }
.ms-graph-overview-toggle:focus-visible,.ms-graph-overview button:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
.ms-graph-overview { position:fixed; z-index:260; inset:0; display:grid; grid-template-rows:auto auto minmax(0,1fr); overflow:hidden; padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); background:radial-gradient(ellipse 80% 100% at 55% 14%,rgba(77,145,161,.18),transparent 58%),linear-gradient(145deg,#050c14,#09131e 55%,#060b12); }
.ms-graph-overview::before { content:''; position:absolute; z-index:-1; inset:0; pointer-events:none; opacity:.45; background:radial-gradient(circle at 14% 21%,rgba(232,220,177,.7) 0 1px,transparent 1.45px),radial-gradient(circle at 76% 57%,rgba(113,195,202,.58) 0 1px,transparent 1.35px); background-size:73px 89px,131px 123px; }
.ms-graph-overview-head { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; padding:0 0 8px; border-bottom:1px solid rgba(143,174,195,.18); }
.ms-graph-overview-head > div:first-child { display:grid; min-width:0; gap:2px; }.ms-graph-overview-head span { color:#d6b873; font-size:8px; letter-spacing:1.7px; }.ms-graph-overview-head b { color:#f0dba4; font:18px/1.15 var(--serif); letter-spacing:1.2px; }.ms-graph-overview-head small { overflow:hidden; color:#879cac; font-size:8px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.ms-graph-overview-actions { display:flex; align-items:center; justify-content:flex-end; gap:5px; flex:0 0 auto; }.ms-graph-overview-actions button { min-height:34px; padding:0 8px; border:1px solid rgba(128,164,184,.4); border-radius:7px; background:rgba(7,17,26,.76); color:#bad2d3; cursor:pointer; font:9px var(--sans); white-space:nowrap; }.ms-graph-overview-actions button:active { transform:scale(.97); }.ms-graph-overview-actions .ms-graph-overview-close { border-color:rgba(226,184,109,.5); color:#e7cd8c; }
.ms-graph-overview-note { padding:7px 1px; color:#92a7b8; font-size:8px; letter-spacing:.35px; }
.ms-graph-overview-viewport { position:relative; min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; border:1px solid rgba(130,161,177,.24); border-radius:10px; background:radial-gradient(circle at 50% 39%,rgba(226,184,109,.08),transparent 36%),rgba(3,10,16,.45); scrollbar-width:thin; scrollbar-color:rgba(226,184,109,.43) transparent; touch-action:pan-x pan-y pinch-zoom; }
.ms-graph-overview-scale { position:relative; min-width:100%; min-height:100%; margin:auto; }.ms-graph-overview-world { position:absolute; inset:0 auto auto 0; width:1000px; height:620px; overflow:hidden; transform:scale(var(--ms-graph-overview-zoom)); transform-origin:top left; }
.ms-graph-overview-world .ms-graph-node { pointer-events:auto; }.ms-graph-overview-world .ms-graph-node:hover { transform:translate(-50%,-50%) translateY(-3px) scale(1.035); }
@media (max-width:640px) {
  .ms-graph-overview-toggle { display:inline-flex; }
  .ms-graph-head-buttons { align-items:stretch; }
}
@media (max-width:390px) {
  .ms-graph-overview-toggle { min-height:32px; padding:0 7px; font-size:8px; }
  .ms-graph-overview-head small { display:none; }
  .ms-graph-overview-actions { gap:3px; }
  .ms-graph-overview-actions button { min-height:32px; padding:0 6px; font-size:8px; }
}
@media (orientation:landscape) and (max-height:640px) {
  .ms-graph-overview { padding:8px max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left)); }
  .ms-graph-overview-head { padding-bottom:5px; }
  .ms-graph-overview-head b { font-size:16px; }
  .ms-graph-overview-note { padding:4px 1px; }
}
@media (prefers-reduced-motion:reduce) {
  .ms-graph-overview-toggle { transition:none; }
}
/* 最终移动端图谱收束：摘要优先，完整来源仅在“展开全部依据”后出现。 */
.ms-graph-node-time { max-width:92px; min-width:78px; padding:5px 6px; }
.ms-graph-node-time i { width:18px; height:18px; font-size:8px; }
.ms-graph-node-time span { font-size:7px; }
.ms-graph-node-time b { font-size:8px; line-height:1.18; }
.ms-graph-mobile-source-groups.is-collapsed { display:none; }
.ms-graph-edge-energy { animation:none !important; stroke-dasharray:none; stroke-width:.92; opacity:.58; }
.ms-loading-path { stroke-dasharray:none; stroke-dashoffset:0; animation:none; }
@media (max-width:640px) {
  .ms-graph-mobile-map { gap:8px; padding:12px 12px 10px; }
  .ms-graph-mobile-summaries { gap:5px; }
  .ms-graph-mobile-summary { min-height:51px; padding:6px 5px; }
  .ms-graph-mobile-summary i { font-size:8.5px; }
  .ms-graph-mobile-summary b { font-size:7.5px; }
  .ms-graph-mobile-summary span { font-size:6.5px; }
  .ms-graph-mobile-current { gap:6px; }
  .ms-graph-mobile-main .ms-graph-node { max-width:164px; }
  .ms-graph-mobile-branches .ms-graph-node { min-height:42px; }
  .ms-graph-mobile-time .ms-graph-node { flex-basis:102px; max-width:102px; min-height:38px; padding:5px; }
  .ms-graph-mobile-time .ms-graph-node i { width:17px; height:17px; }
  .ms-graph-mobile-time .ms-graph-node span { font-size:6.5px; }
  .ms-graph-mobile-time .ms-graph-node b { font-size:8px; }
}

/* ═══════════ 命运图谱 v2 · 人生纵轴 ═══════════
   默认的阅读顺序只有一条：时间 → 人生主线 → 可用 / 风险 → 相关依据。
   不再把全部神煞和关系线同时塞进画布；完整资料库仍可按需展开。 */
.ms-graph-journey-stage { display:block; min-height:0 !important; }
.ms-graph-journey { min-width:0; padding:clamp(18px,3vw,34px); }
.ms-journey-basis { display:grid; grid-template-columns:minmax(180px,.72fr) minmax(0,1.7fr); gap:18px; align-items:stretch; margin-bottom:clamp(24px,4vw,42px); padding:17px 18px; border:1px solid rgba(158,186,195,.2); border-radius:13px; background:linear-gradient(115deg,rgba(19,34,46,.64),rgba(12,24,35,.28)); box-shadow:0 14px 30px rgba(0,0,0,.14); }
.ms-journey-basis-intro { display:grid; align-content:center; gap:4px; min-width:0; }.ms-journey-basis-intro > span,.ms-journey-reading-head > div > span,.ms-journey-all-sources > div > span,.ms-journey-library header span { color:#d8bc78; font-size:9px; letter-spacing:1.65px; }.ms-journey-basis-intro b { overflow:hidden; color:#f0dba4; font:21px/1.2 var(--serif); letter-spacing:.8px; text-overflow:ellipsis; white-space:nowrap; }.ms-journey-basis-intro small { color:#91a7b4; font-size:10px; line-height:1.55; }
.ms-journey-basis-items { display:grid; grid-template-columns:minmax(0,1.35fr) repeat(2,minmax(0,1fr)); gap:8px; }.ms-journey-basis-item { display:grid; align-content:center; gap:4px; min-width:0; min-height:68px; padding:10px 11px; border:1px solid rgba(142,170,188,.24); border-radius:9px; background:rgba(4,13,21,.4); color:inherit; cursor:pointer; text-align:left; transition:background .2s ease,border-color .2s ease,transform .2s cubic-bezier(.22,1,.36,1); }.ms-journey-basis-item:hover { border-color:rgba(226,184,109,.58); background:rgba(226,184,109,.08); transform:translateY(-2px); }.ms-journey-basis-item span { color:#86a0ad; font-size:8px; letter-spacing:1px; }.ms-journey-basis-item b { overflow:hidden; color:#d5e1e4; font:500 11px/1.4 var(--sans); text-overflow:ellipsis; white-space:nowrap; }.ms-journey-basis-item:nth-child(3) b { color:#cdbd8b; font-size:9px; }
.ms-journey-reading-head { display:grid; grid-template-columns:minmax(230px,.8fr) minmax(0,1.35fr); gap:26px; align-items:end; margin:0 0 18px 108px; }.ms-journey-reading-head h3 { margin:6px 0 0; color:#f0dba4; font:clamp(22px,2.2vw,30px)/1.2 var(--serif); letter-spacing:.8px; }.ms-journey-reading-head p { max-width:560px; margin:0; color:#92a8b7; font-size:11px; line-height:1.75; }
.ms-journey-axis { position:relative; display:grid; gap:10px; min-width:0; padding:7px 0 4px; }.ms-journey-axis::before { content:''; position:absolute; z-index:0; left:86px; top:25px; bottom:28px; width:1px; background:linear-gradient(to bottom,rgba(222,186,110,.8),rgba(134,181,176,.48) 70%,rgba(132,157,186,.08)); box-shadow:0 0 12px rgba(226,184,109,.16); }
.ms-journey-era { position:relative; z-index:1; display:grid; grid-template-columns:88px minmax(0,1fr) minmax(210px,.55fr); gap:17px; align-items:start; min-width:0; padding:9px 0 13px; scroll-margin-top:20px; }.ms-journey-era::before { content:''; position:absolute; z-index:2; left:81px; top:29px; width:11px; height:11px; border:2px solid #d8bc78; border-radius:50%; background:#0b1721; box-shadow:0 0 0 5px rgba(216,188,120,.08),0 0 13px rgba(216,188,120,.3); }.ms-journey-era.is-active::before { background:#e2bd68; box-shadow:0 0 0 6px rgba(226,184,109,.13),0 0 20px rgba(226,184,109,.6); }
.ms-journey-era-time { display:grid; gap:7px; min-width:0; padding-top:1px; }.ms-journey-era-time > span { color:#829aa9; font-size:8px; letter-spacing:.85px; }.ms-journey-era-time > div { display:grid; gap:5px; }.ms-journey-time { display:grid; gap:1px; width:100%; min-width:0; padding:5px 8px; border:1px solid rgba(130,159,187,.25); border-radius:7px; background:rgba(16,29,44,.42); color:inherit; cursor:pointer; text-align:left; font-variant-numeric:tabular-nums; transition:background .18s ease,border-color .18s ease,transform .18s ease; }.ms-journey-time:hover,.ms-journey-time.is-selected { border-color:rgba(226,184,109,.6); background:rgba(226,184,109,.1); transform:translateX(-2px); }.ms-journey-time span { color:#b3c6d4; font-size:9px; white-space:nowrap; }.ms-journey-time b { overflow:hidden; color:#8faab9; font:9px/1.3 var(--sans); text-overflow:ellipsis; white-space:nowrap; }.ms-journey-time.is-good { border-color:rgba(105,190,158,.36); }.ms-journey-time.is-risk { border-color:rgba(215,129,119,.36); }
.ms-journey-era-main { min-width:0; padding:13px 15px 14px; border:1px solid rgba(226,184,109,.25); border-radius:11px; background:linear-gradient(135deg,rgba(38,34,19,.48),rgba(9,20,29,.64)); box-shadow:0 12px 24px rgba(0,0,0,.13); transition:border-color .22s ease,background .22s ease; }.ms-journey-era.is-active .ms-journey-era-main { border-color:rgba(226,184,109,.58); background:linear-gradient(135deg,rgba(65,52,22,.48),rgba(11,25,35,.78)); }.ms-journey-era-title { display:grid; grid-template-columns:31px minmax(0,1fr) auto; gap:9px; width:100%; min-width:0; padding:0; border:0; background:none; color:inherit; cursor:pointer; text-align:left; }.ms-journey-era-title i { display:grid; place-items:center; width:29px; height:29px; border-radius:50%; background:rgba(226,184,109,.14); color:#e9ce85; font:13px/1 var(--serif); font-style:normal; }.ms-journey-era-title span { display:grid; min-width:0; gap:2px; }.ms-journey-era-title small { overflow:hidden; color:#94aab6; font-size:8px; letter-spacing:.8px; text-overflow:ellipsis; white-space:nowrap; }.ms-journey-era-title b { overflow:hidden; color:#f0dba4; font:18px/1.25 var(--serif); letter-spacing:.35px; text-overflow:ellipsis; white-space:nowrap; }.ms-journey-era-title em { align-self:center; color:#a5b9bc; font:9px/1 var(--sans); font-style:normal; white-space:nowrap; }.ms-journey-era-main > p { margin:11px 0 0 40px; color:#b1c1c9; font-size:11px; line-height:1.78; }.ms-journey-era-reveal { margin:13px 0 0 40px; animation:ms-journey-reveal .32s cubic-bezier(.22,1,.36,1) both; }
.ms-journey-branches { display:grid; gap:8px; align-content:start; padding-top:9px; }.ms-journey-branch { display:grid; gap:4px; min-height:62px; padding:10px 11px; border:1px solid rgba(132,163,182,.24); border-radius:9px; background:rgba(7,16,25,.37); color:inherit; cursor:pointer; text-align:left; transition:transform .2s cubic-bezier(.22,1,.36,1),border-color .2s ease,background .2s ease; }.ms-journey-branch:hover,.ms-journey-branch.is-selected { transform:translateY(-2px); }.ms-journey-branch.is-good { border-color:rgba(102,191,157,.4); background:rgba(24,68,61,.28); }.ms-journey-branch.is-good:hover,.ms-journey-branch.is-good.is-selected { border-color:rgba(113,203,168,.82); background:rgba(32,84,74,.44); }.ms-journey-branch.is-risk { border-color:rgba(219,128,118,.4); background:rgba(75,35,40,.25); }.ms-journey-branch.is-risk:hover,.ms-journey-branch.is-risk.is-selected { border-color:rgba(231,143,132,.8); background:rgba(87,40,45,.4); }.ms-journey-branch span { font-size:8px; letter-spacing:.65px; }.ms-journey-branch.is-good span { color:#8fd7b9; }.ms-journey-branch.is-risk span { color:#e6a69d; }.ms-journey-branch b { display:-webkit-box; overflow:hidden; color:#cad5d7; font:10px/1.5 var(--sans); -webkit-box-orient:vertical; -webkit-line-clamp:3; }.ms-journey-branch.is-good b { color:#bbddcf; }.ms-journey-branch.is-risk b { color:#e3bbb6; }
.ms-journey-evidence { display:grid; gap:9px; padding:11px; border-top:1px solid rgba(155,181,191,.16); }.ms-journey-evidence-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }.ms-journey-evidence-head span { color:#d8bc78; font-size:9px; letter-spacing:1px; }.ms-journey-evidence-head small { color:#8098a7; font-size:8px; }.ms-journey-source-row { display:flex; flex-wrap:wrap; gap:6px; }.ms-journey-source { display:grid; grid-template-columns:auto minmax(0,1fr); gap:1px 5px; min-width:0; max-width:180px; padding:6px 7px; border:1px solid rgba(133,165,182,.27); border-radius:7px; background:rgba(4,13,20,.45); color:inherit; cursor:pointer; text-align:left; transition:border-color .18s ease,background .18s ease,transform .18s ease; }.ms-journey-source:hover,.ms-journey-source.is-selected { border-color:rgba(226,184,109,.68); background:rgba(226,184,109,.1); transform:translateY(-1px); }.ms-journey-source > span { grid-row:span 2; align-self:center; color:#8ea9b6; font-size:8px; }.ms-journey-source b { overflow:hidden; color:#cbd9dc; font:10px/1.2 var(--sans); text-overflow:ellipsis; white-space:nowrap; }.ms-journey-source small { overflow:hidden; color:#829aa8; font-size:7px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }.ms-journey-source.is-star { border-color:rgba(211,178,91,.36); background:rgba(76,58,25,.22); }.ms-journey-source.is-star > span { color:#d4bb70; }.ms-journey-source.is-star b { color:#e5cf90; }.ms-journey-source.is-star small { color:#bfae7e; }
.ms-journey-energy { display:grid; gap:5px; padding-top:2px; }.ms-journey-energy > span { color:#8fa6b2; font-size:8px; letter-spacing:.65px; }.ms-journey-energy > div { display:flex; flex-wrap:wrap; gap:5px; }.ms-journey-energy > div > i { align-self:center; width:16px; height:1px; background:linear-gradient(90deg,rgba(226,184,109,.12),#e0bd66,rgba(226,184,109,.12)); box-shadow:0 0 6px rgba(224,189,102,.55); }.ms-journey-energy > div > b { padding:3px 6px; border:1px dashed rgba(218,184,96,.34); border-radius:5px; color:#cbb779; font:8px/1.35 var(--sans); font-weight:400; }
.ms-journey-focus { display:grid; gap:8px; max-width:760px; margin:21px 0 0 105px; padding:16px 17px; border:1px solid rgba(165,191,202,.28); border-radius:11px; background:linear-gradient(115deg,rgba(13,27,38,.88),rgba(23,33,38,.54)); box-shadow:0 15px 28px rgba(0,0,0,.17); animation:ms-journey-reveal .3s cubic-bezier(.22,1,.36,1) both; }.ms-journey-focus.is-inline { grid-column:2/-1; max-width:none; margin:2px 0 0; }.ms-journey-focus > div { display:flex; align-items:center; justify-content:space-between; gap:10px; color:#96afba; font-size:9px; letter-spacing:.9px; }.ms-journey-focus > div > span:last-child { color:#d9bd75; letter-spacing:0; font-variant-numeric:tabular-nums; }.ms-journey-focus h3 { margin:0; color:#f0dba4; font:20px/1.3 var(--serif); }.ms-journey-focus p { margin:0; color:#c3d0d4; font-size:11px; line-height:1.75; }.ms-journey-focus-secondary { color:#8fa4af !important; font-size:9.5px !important; }.ms-journey-focus-meta { display:flex; flex-wrap:wrap; gap:5px; }.ms-journey-focus-meta span { padding:3px 5px; border-radius:4px; background:rgba(226,184,109,.08); color:#cbb576; font-size:8px; }.ms-journey-focus > button { justify-self:start; min-height:32px; padding:0 9px; border:1px solid rgba(132,175,183,.38); border-radius:7px; background:rgba(78,138,142,.08); color:#b8d5d2; cursor:pointer; font:9px var(--sans); }
.ms-journey-all-sources { display:flex; align-items:center; justify-content:space-between; gap:18px; margin:28px 0 0 105px; padding:16px 0 0; border-top:1px solid rgba(147,174,189,.18); }.ms-journey-all-sources > div { display:grid; gap:4px; }.ms-journey-all-sources p { margin:0; color:#91a6b2; font-size:10px; line-height:1.55; }.ms-journey-all-sources-button,.ms-journey-library-close { flex:0 0 auto; min-height:36px; padding:0 11px; border:1px solid rgba(138,180,184,.45); border-radius:8px; background:rgba(80,147,149,.09); color:#bcd9d5; cursor:pointer; font:9px var(--sans); transition:background .18s ease,border-color .18s ease,transform .18s ease; }.ms-journey-all-sources-button:hover,.ms-journey-library-close:hover { border-color:rgba(226,184,109,.7); background:rgba(226,184,109,.1); transform:translateY(-1px); }
.ms-journey-library { margin:15px 0 0 105px; padding:18px; border:1px solid rgba(151,181,193,.24); border-radius:12px; background:rgba(5,15,24,.48); box-shadow:0 16px 30px rgba(0,0,0,.14); animation:ms-journey-reveal .34s cubic-bezier(.22,1,.36,1) both; }.ms-journey-library header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding-bottom:15px; border-bottom:1px solid rgba(145,174,188,.15); }.ms-journey-library header > div { max-width:560px; }.ms-journey-library h3 { margin:6px 0 5px; color:#f0dba4; font:20px/1.25 var(--serif); }.ms-journey-library p { margin:0; color:#91a8b5; font-size:10px; line-height:1.65; }.ms-journey-library-base { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:16px 0; }.ms-journey-library-base > div { display:grid; gap:7px; min-width:0; }.ms-journey-library-base > div > span { color:#cdb576; font-size:9px; letter-spacing:.8px; }.ms-journey-library-star-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }.ms-journey-library-stars { min-width:0; border:1px solid rgba(181,152,82,.24); border-radius:8px; background:rgba(62,47,23,.15); }.ms-journey-library-stars summary { display:flex; align-items:center; justify-content:space-between; min-height:40px; padding:0 10px; color:#dbc784; cursor:pointer; font-size:10px; list-style:none; }.ms-journey-library-stars summary::-webkit-details-marker { display:none; }.ms-journey-library-stars summary::after { content:'+'; margin-left:7px; color:#9eafae; font-size:14px; }.ms-journey-library-stars[open] summary::after { content:'−'; }.ms-journey-library-stars summary b { margin-left:auto; color:#8ea5ad; font-size:8px; font-weight:400; }.ms-journey-library-stars > .ms-journey-source-row,.ms-journey-library-stars > .ms-journey-energy { padding:0 10px 10px; }
@keyframes ms-journey-reveal { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:none; } }
.ms-journey-basis-item:focus-visible,.ms-journey-time:focus-visible,.ms-journey-era-title:focus-visible,.ms-journey-branch:focus-visible,.ms-journey-source:focus-visible,.ms-journey-all-sources-button:focus-visible,.ms-journey-library-close:focus-visible,.ms-journey-focus > button:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
@media (max-width:900px) { .ms-graph-journey { padding:22px 18px; }.ms-journey-era { grid-template-columns:82px minmax(0,1fr) minmax(172px,.48fr); gap:12px; }.ms-journey-axis::before { left:79px; }.ms-journey-era::before { left:74px; }.ms-journey-reading-head,.ms-journey-focus,.ms-journey-all-sources,.ms-journey-library { margin-left:95px; }.ms-journey-era-main > p,.ms-journey-era-reveal { margin-left:0; }.ms-journey-era-main > p { margin-top:10px; }.ms-journey-era-reveal { margin-top:12px; }.ms-journey-era-title b { font-size:16px; }.ms-journey-branch b { font-size:9px; } }
@media (max-width:640px) { .ms-graph-mode-shell { min-height:0; padding:0; }.ms-graph-mode-shell .ms-destiny-graph { margin:0; border-right:0; border-left:0; border-radius:0; }.ms-graph-journey { padding:15px 13px 24px; }.ms-journey-basis { grid-template-columns:1fr; gap:12px; margin-bottom:25px; padding:14px; }.ms-journey-basis-intro b { font-size:19px; }.ms-journey-basis-items { grid-template-columns:1fr 1fr; }.ms-journey-basis-item:first-child { grid-column:1/-1; min-height:56px; }.ms-journey-basis-item { min-height:54px; padding:8px 9px; }.ms-journey-basis-item b { font-size:10px; }.ms-journey-reading-head { display:grid; gap:6px; margin:0 0 14px; }.ms-journey-reading-head h3 { font-size:23px; }.ms-journey-reading-head p { font-size:10px; line-height:1.62; }.ms-journey-axis { gap:10px; padding-top:3px; }.ms-journey-axis::before { left:59px; top:25px; bottom:30px; }.ms-journey-era { grid-template-columns:64px minmax(0,1fr); gap:11px; padding:7px 0 10px; }.ms-journey-era::before { left:54px; top:27px; width:9px; height:9px; }.ms-journey-era-time { padding-top:0; }.ms-journey-era-time > span { font-size:7px; letter-spacing:.3px; }.ms-journey-era-time > div { gap:4px; }.ms-journey-time { padding:5px 5px; border-radius:6px; }.ms-journey-time span { font-size:8px; }.ms-journey-time b { font-size:7px; }.ms-journey-era-main { padding:11px 11px 12px; border-radius:10px; }.ms-journey-era-title { grid-template-columns:27px minmax(0,1fr) auto; gap:7px; }.ms-journey-era-title i { width:26px; height:26px; font-size:11px; }.ms-journey-era-title b { font-size:15px; white-space:normal; }.ms-journey-era-title em { font-size:8px; }.ms-journey-era-main > p { margin:9px 0 0; font-size:10px; line-height:1.68; }.ms-journey-era-reveal { margin:11px 0 0; }.ms-journey-branches { grid-column:2; grid-template-columns:1fr 1fr; gap:5px; padding-top:0; }.ms-journey-branch { min-height:68px; padding:8px; }.ms-journey-branch b { font-size:8.5px; line-height:1.48; -webkit-line-clamp:4; }.ms-journey-evidence { gap:8px; padding:9px 0 0; }.ms-journey-evidence-head small { display:none; }.ms-journey-source-row { gap:5px; }.ms-journey-source { max-width:calc(50% - 3px); flex:1 1 112px; padding:6px; }.ms-journey-source b { font-size:9px; }.ms-journey-source small { font-size:6.5px; }.ms-journey-energy > div > b { font-size:7px; }.ms-journey-focus,.ms-journey-all-sources,.ms-journey-library { margin-left:0; }.ms-journey-focus { margin-top:16px; padding:13px; }.ms-journey-focus.is-inline { grid-column:2; margin-top:0; }.ms-journey-focus h3 { font-size:18px; }.ms-journey-focus p { font-size:10px; line-height:1.68; }.ms-journey-all-sources { align-items:flex-start; flex-direction:column; gap:10px; margin-top:22px; }.ms-journey-all-sources-button { width:100%; min-height:42px; }.ms-journey-library { margin-top:12px; padding:13px; }.ms-journey-library header { gap:9px; }.ms-journey-library h3 { font-size:18px; }.ms-journey-library p { font-size:9px; }.ms-journey-library-close { min-height:32px; padding:0 7px; font-size:8px; }.ms-journey-library-base,.ms-journey-library-star-grid { grid-template-columns:1fr; gap:10px; }.ms-journey-library-base { padding:13px 0; }.ms-journey-library-stars summary { min-height:38px; } }
@media (max-width:360px) { .ms-journey-era { grid-template-columns:57px minmax(0,1fr); gap:8px; }.ms-journey-axis::before { left:53px; }.ms-journey-era::before { left:48px; }.ms-journey-era-title b { font-size:14px; }.ms-journey-branches { gap:4px; }.ms-journey-branch { padding:7px; }.ms-journey-source { flex-basis:100%; max-width:100%; }.ms-journey-basis-items { grid-template-columns:1fr; }.ms-journey-basis-item:first-child { grid-column:auto; } }
@media (prefers-reduced-motion:reduce) { .ms-journey-era-reveal,.ms-journey-focus,.ms-journey-library { animation:none; }.ms-journey-basis-item,.ms-journey-time,.ms-journey-era-main,.ms-journey-branch,.ms-journey-source,.ms-journey-all-sources-button,.ms-journey-library-close { transition:none; } }

/* ───── 关系联动镜头 ─────
   纵轴负责阅读秩序；点开一个节点后，才在当前段落里显出它牵动的局部星图。
   这样保留“多线联动”的反馈，不再把所有节点一次性压到手机画布上。 */
.ms-journey-constellation { position:relative; isolation:isolate; display:grid; gap:9px; margin-top:14px; padding:12px; overflow:hidden; border:1px solid rgba(143,181,190,.28); border-radius:10px; background:radial-gradient(ellipse 56% 72% at 50% 49%,rgba(226,184,109,.12),transparent 58%),radial-gradient(ellipse 70% 52% at 19% 84%,rgba(92,179,161,.09),transparent 66%),linear-gradient(135deg,rgba(7,18,27,.86),rgba(12,26,36,.68)); box-shadow:inset 0 1px rgba(255,255,255,.035),0 12px 24px rgba(0,0,0,.14); animation:ms-journey-reveal .34s cubic-bezier(.22,1,.36,1) both; }
.ms-journey-constellation::before { content:''; position:absolute; z-index:-1; inset:0; pointer-events:none; opacity:.52; background:radial-gradient(circle at 12% 19%,rgba(232,220,177,.72) 0 1px,transparent 1.4px),radial-gradient(circle at 77% 16%,rgba(113,195,202,.56) 0 1px,transparent 1.35px),radial-gradient(circle at 83% 76%,rgba(232,220,177,.52) 0 1px,transparent 1.4px),radial-gradient(circle at 26% 84%,rgba(113,195,202,.42) 0 1px,transparent 1.3px); background-size:83px 97px,127px 113px,161px 137px,191px 151px; }
.ms-journey-constellation header { display:flex; align-items:baseline; justify-content:space-between; gap:10px; min-width:0; }.ms-journey-constellation header span { color:#e1c471; font-size:9px; letter-spacing:1px; }.ms-journey-constellation header small { overflow:hidden; color:#88a1ae; font-size:8px; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.ms-journey-network { position:relative; min-height:220px; overflow:hidden; border:1px solid rgba(141,173,188,.18); border-radius:9px; background:radial-gradient(circle at 50% 50%,rgba(226,184,109,.07),transparent 44%),rgba(3,11,18,.31); }.ms-journey-network::after { content:''; position:absolute; z-index:0; left:50%; top:50%; width:54px; height:54px; border:1px solid rgba(226,184,109,.16); border-radius:50%; box-shadow:0 0 0 14px rgba(226,184,109,.025),0 0 29px rgba(226,184,109,.1); transform:translate(-50%,-50%); pointer-events:none; }
.ms-journey-network svg { position:absolute; z-index:1; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }.ms-journey-network-edge { fill:none; }.ms-journey-network-wire { fill:none; stroke:rgba(151,176,189,.27); stroke-width:.44; vector-effect:non-scaling-stroke; }.ms-journey-network-spark { fill:none; stroke:#e2bd68; stroke-width:1.35; stroke-linecap:round; stroke-dasharray:3 97; stroke-dashoffset:100; vector-effect:non-scaling-stroke; filter:drop-shadow(0 0 3px rgba(231,195,104,.9)); animation:ms-journey-network-flow 3.9s linear infinite; animation-delay:var(--ms-network-delay,0s); }.ms-journey-network-edge.is-energy .ms-journey-network-wire { stroke:rgba(226,190,101,.58); stroke-width:.74; }.ms-journey-network-edge.is-energy .ms-journey-network-spark { stroke:#f0d079; stroke-width:1.7; stroke-dasharray:5 95; }.ms-journey-network-edge.is-origin .ms-journey-network-wire,.ms-journey-network-edge.is-balance .ms-journey-network-wire { stroke:rgba(119,193,174,.4); stroke-dasharray:2 3; }.ms-journey-network-edge.is-origin .ms-journey-network-spark,.ms-journey-network-edge.is-balance .ms-journey-network-spark { stroke:#90d6bf; }.ms-journey-network-edge.is-good .ms-journey-network-wire { stroke:rgba(107,201,164,.56); }.ms-journey-network-edge.is-good .ms-journey-network-spark { stroke:#9de0c3; }.ms-journey-network-edge.is-risk .ms-journey-network-wire { stroke:rgba(225,138,128,.55); }.ms-journey-network-edge.is-risk .ms-journey-network-spark { stroke:#f0a89e; }
.ms-journey-network-node { position:absolute; z-index:2; left:var(--mx); top:var(--my); display:grid; gap:2px; width:min(34%,138px); min-width:82px; padding:7px 8px; overflow:hidden; border:1px solid rgba(142,171,185,.34); border-radius:8px; background:rgba(7,18,27,.9); color:inherit; cursor:pointer; text-align:left; transform:translate(-50%,-50%); transition:border-color .2s cubic-bezier(.22,1,.36,1),background .2s cubic-bezier(.22,1,.36,1),box-shadow .2s cubic-bezier(.22,1,.36,1),transform .2s cubic-bezier(.22,1,.36,1); }.ms-journey-network-node:hover { z-index:3; border-color:rgba(231,195,112,.82); background:rgba(20,36,45,.97); box-shadow:0 9px 18px rgba(0,0,0,.23); transform:translate(-50%,-50%) translateY(-2px) scale(1.025); }.ms-journey-network-node span { overflow:hidden; color:#8da6b2; font-size:7px; letter-spacing:.35px; text-overflow:ellipsis; white-space:nowrap; }.ms-journey-network-node b { overflow:hidden; color:#d9e2e2; font:500 10px/1.25 var(--sans); text-overflow:ellipsis; white-space:nowrap; }.ms-journey-network-node.is-selected { width:min(40%,156px); padding:9px 10px; border-color:#ebc875; background:radial-gradient(circle at 50% 0,rgba(226,184,109,.23),transparent 70%),rgba(13,28,37,.98); box-shadow:0 0 0 4px rgba(226,184,109,.08),0 12px 27px rgba(0,0,0,.29); }.ms-journey-network-node.is-selected span { color:#d4bb77; }.ms-journey-network-node.is-selected b { color:#f0dca2; font:14px/1.2 var(--serif); letter-spacing:.5px; }.ms-journey-network-node.is-star { border-color:rgba(218,183,91,.53); background:rgba(71,54,25,.78); }.ms-journey-network-node.is-star span { color:#bca86c; }.ms-journey-network-node.is-star b { color:#ead28c; }.ms-journey-network-node.is-good { border-color:rgba(105,193,159,.5); background:rgba(21,62,57,.78); }.ms-journey-network-node.is-good b { color:#b6dfcd; }.ms-journey-network-node.is-risk { border-color:rgba(218,130,120,.52); background:rgba(72,36,41,.79); }.ms-journey-network-node.is-risk b { color:#e9b8b1; }.ms-journey-network-node.is-balance { border-color:rgba(110,184,164,.48); }.ms-journey-network-node.is-time { border-color:rgba(135,159,192,.43); background:rgba(18,31,50,.83); }
.ms-journey-link-list { display:grid; gap:5px; }.ms-journey-link-list > span { color:#8ea5b1; font-size:8px; letter-spacing:.75px; }.ms-journey-link-list > div { display:flex; align-items:center; flex-wrap:wrap; gap:4px 5px; }.ms-journey-link-list i { flex:0 0 14px; height:1px; background:linear-gradient(90deg,rgba(226,184,109,.15),#e0bd66,rgba(226,184,109,.2)); box-shadow:0 0 5px rgba(224,189,102,.54); }.ms-journey-link-list i.is-energy { height:2px; background:repeating-linear-gradient(90deg,#e3c36d 0 3px,transparent 3px 5px); }.ms-journey-link-list i.is-origin,.ms-journey-link-list i.is-balance,.ms-journey-link-list i.is-good { background:linear-gradient(90deg,rgba(114,200,173,.12),#83d2ba,rgba(114,200,173,.15)); }.ms-journey-link-list i.is-risk { background:linear-gradient(90deg,rgba(228,141,130,.12),#e9a097,rgba(228,141,130,.15)); }.ms-journey-link-list b { max-width:88px; overflow:hidden; color:#b9c9cc; font:8px/1.35 var(--sans); font-weight:400; text-overflow:ellipsis; white-space:nowrap; }.ms-journey-link-list em { width:11px; height:1px; background:rgba(153,178,188,.36); }
@keyframes ms-journey-network-flow { from { stroke-dashoffset:100; } to { stroke-dashoffset:0; } }
@media (max-width:640px) { .ms-journey-constellation { margin-top:12px; padding:10px; }.ms-journey-constellation header small { max-width:58%; font-size:7px; }.ms-journey-network { min-height:204px; }.ms-journey-network-node { width:min(36%,124px); min-width:70px; padding:6px 7px; }.ms-journey-network-node span { font-size:6.5px; }.ms-journey-network-node b { font-size:9px; }.ms-journey-network-node.is-selected { width:min(42%,142px); padding:8px; }.ms-journey-network-node.is-selected b { font-size:12px; }.ms-journey-link-list b { max-width:70px; font-size:7px; } }
@media (max-width:360px) { .ms-journey-network { min-height:192px; }.ms-journey-network-node { min-width:62px; padding:5px 6px; }.ms-journey-network-node b { font-size:8px; }.ms-journey-network-node.is-selected { min-width:88px; }.ms-journey-link-list > div { gap:3px; }.ms-journey-link-list b { max-width:58px; } }
@media (prefers-reduced-motion:reduce) { .ms-journey-constellation { animation:none; }.ms-journey-network-spark { animation:none; stroke-dasharray:none; opacity:.82; }.ms-journey-network-node { transition:none; } }

/* ───── 命书最终响应式收束 ─────
   手机的阅读顺序是“时间 → 主线 → 出口/留意 → 依据”。
   时间不再和正文挤在同一行，依据也不再用极小字号换取并排布局。 */
@media (max-width:640px) {
  .ms-cinema-header-actions {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:6px;
    align-items:center;
  }
  .ms-cinema-live {
    grid-column:1 / -1;
    justify-content:flex-end;
    margin:0;
  }
  .ms-cinema-header-actions .ms-graph-toggle,
  .ms-cinema-header-actions .ms-reader-close {
    width:100%;
    min-height:40px;
    padding:0 7px;
    font-size:10px;
  }
  .ms-graph-journey { padding:16px 12px 28px; }
  .ms-journey-basis { margin-bottom:22px; padding:13px; }
  .ms-journey-basis-intro small { font-size:10px; }
  .ms-journey-reading-head { margin-bottom:16px; }
  .ms-journey-reading-head p { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
  .ms-journey-axis { gap:14px; padding:4px 0 6px 17px; }
  .ms-journey-axis::before { left:5px; top:23px; bottom:34px; width:1px; }
  .ms-journey-era {
    display:grid;
    grid-template-columns:1fr;
    gap:9px;
    padding:7px 0 13px;
    scroll-margin-top:16px;
  }
  .ms-journey-era::before { left:0; top:25px; width:9px; height:9px; }
  .ms-journey-era-time { gap:6px; padding:0; }
  .ms-journey-era-time > span { font-size:9px; letter-spacing:.7px; }
  .ms-journey-era-time > div { display:flex; flex-wrap:wrap; gap:5px; }
  .ms-journey-time {
    width:auto;
    flex:1 1 108px;
    min-width:98px;
    padding:7px 8px;
    border-radius:7px;
  }
  .ms-journey-time span { font-size:10px; }
  .ms-journey-time b { font-size:9px; }
  .ms-journey-era-main { padding:13px 13px 14px; border-radius:10px; }
  .ms-journey-era-title { grid-template-columns:29px minmax(0,1fr) auto; gap:8px; }
  .ms-journey-era-title i { width:28px; height:28px; font-size:12px; }
  .ms-journey-era-title small { font-size:9px; }
  .ms-journey-era-title b { font-size:17px; line-height:1.35; }
  .ms-journey-era-title em { font-size:9px; }
  .ms-journey-era-main > p { margin:10px 0 0; color:#bdcbd1; font-size:11.5px; line-height:1.75; }
  .ms-journey-era-reveal { margin:12px 0 0; }
  .ms-journey-branches {
    grid-column:1;
    display:grid;
    grid-template-columns:1fr;
    gap:7px;
    padding:0;
  }
  .ms-journey-branch { min-height:0; padding:10px 11px; border-radius:8px; }
  .ms-journey-branch span { font-size:9px; }
  .ms-journey-branch b { font-size:11px; line-height:1.62; -webkit-line-clamp:5; }
  .ms-journey-evidence { gap:9px; padding:10px 0 0; }
  .ms-journey-evidence-head span { font-size:10px; }
  .ms-journey-source-row { display:grid; grid-template-columns:1fr; gap:6px; }
  .ms-journey-source { max-width:none; width:100%; padding:8px 9px; border-radius:7px; }
  .ms-journey-source > span { font-size:9px; }
  .ms-journey-source b { font-size:11px; }
  .ms-journey-source small { font-size:9px; line-height:1.4; }
  .ms-journey-energy > span { font-size:9px; }
  .ms-journey-energy > div > b { font-size:9px; }
  .ms-journey-focus.is-inline { grid-column:1; margin-top:0; }
  .ms-journey-focus { padding:14px; }
  .ms-journey-focus h3 { font-size:19px; }
  .ms-journey-focus p { font-size:11px; line-height:1.75; }
  .ms-journey-all-sources { margin-top:24px; }
}

@media (max-width:360px) {
  .ms-journey-axis { padding-left:15px; }
  .ms-journey-axis::before { left:4px; }
  .ms-journey-era::before { left:-1px; }
  .ms-journey-time { flex-basis:100%; }
  .ms-journey-era-title b { font-size:16px; }
}

/* ───── 结果首屏与主导航 ─────
   把名字、关键结论和行动放在同一阅读层；出生细节仍完整保留，
   但在手机上不再强制把首屏推成三段彼此无关的卡片。 */
.tabs { scroll-padding-inline:10px; }
.tab { scroll-margin-inline:10px; }
@media (max-width:640px) {
  .chart-head {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:10px;
    padding:14px 15px 13px;
  }
  .chart-head .ch-main { gap:6px; }
  .chart-head .ch-name { font-size:18px; line-height:1.22; letter-spacing:2px; }
  .chart-head .ch-badges { gap:5px; }
  .chart-head .badge-core { padding:5px 8px; font-size:11px; }
  .chart-head .badge-core .bk-lbl { font-size:9px; }
  .chart-head .badge-core .bk-val { font-size:11px; letter-spacing:.6px; }
  .chart-head .badge-mini { padding:2px 7px; font-size:9px; }
  .chart-head .ch-badges-info { padding-top:5px; }
  .chart-head .ch-info { padding-top:7px; font-size:11px; line-height:1.55; }
  .result-toolbar { min-height:38px; margin-top:7px; }
  .result-home-btn, .result-save-btn { min-height:38px; padding:0 9px; font-size:10px; }
  .result-toolbar-save { gap:5px; }
  .result-save-status { max-width:66px; }
  .tabs {
    position:relative;
    gap:0;
    overflow-x:auto;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    isolation:isolate;
  }
  .tabs::after {
    content:'';
    position:sticky;
    right:0;
    flex:0 0 18px;
    width:18px;
    margin-left:-18px;
    pointer-events:none;
    background:linear-gradient(90deg,rgba(23,29,38,0),rgba(23,29,38,.98));
  }
  .tab { flex:0 0 auto; min-width:58px; padding:10px 9px; scroll-snap-align:center; }
  .tab:last-of-type { margin-right:16px; }
}

/* ───── 命盘表 · 局部关系镜头 ─────
   表格仍是首要阅读面；这个面板只在点选后出现，把“一个点牵动多条线”
   做成可读的局部网络。线条用低亮度底线 + 单颗流光，避免粗虚线和线团。 */
.pan-table [data-pan-link] { cursor:pointer; transition:background .18s ease, box-shadow .18s ease, color .18s ease; }
.pan-table [data-pan-link]:hover { background:rgba(226,184,109,.065); }
.pan-table [data-pan-link]:focus-visible { outline:2px solid rgba(240,214,143,.9); outline-offset:-2px; }
.pan-table [data-pan-link].is-pan-focus { position:relative; z-index:1; background:radial-gradient(circle,rgba(226,184,109,.18),transparent 72%); box-shadow:inset 0 -2px rgba(226,184,109,.8),0 0 18px rgba(226,184,109,.12); }
.pan-table [data-pan-link].is-pan-related { position:relative; background:rgba(93,157,149,.055); box-shadow:inset 0 -1px rgba(126,205,183,.34); }
.pan-table [data-pan-link].is-pan-related::after { content:''; position:absolute; inset:5px 8px; border:1px solid rgba(126,205,183,.2); border-radius:5px; pointer-events:none; animation:pan-related-pulse 2.8s ease-in-out infinite; }
.pan-table .ss-tag.is-pan-focus { transform:translateY(-1px) scale(1.04); box-shadow:0 0 0 3px rgba(226,184,109,.1),0 0 14px rgba(226,184,109,.2); }
.pan-relation-lens { position:relative; isolation:isolate; display:grid; gap:12px; margin:14px 0 2px; padding:15px; overflow:hidden; border:1px solid rgba(143,181,190,.3); border-radius:12px; background:radial-gradient(ellipse 58% 78% at 50% 48%,rgba(226,184,109,.1),transparent 60%),linear-gradient(135deg,rgba(7,18,27,.96),rgba(12,27,37,.86)); box-shadow:inset 0 1px rgba(255,255,255,.04),0 15px 32px rgba(0,0,0,.16); animation:pan-relation-in .32s cubic-bezier(.16,1,.3,1) both; }
.pan-relation-lens::before { content:''; position:absolute; z-index:-1; inset:0; pointer-events:none; opacity:.34; background:radial-gradient(circle at 12% 19%,rgba(231,211,151,.8) 0 1px,transparent 1.4px),radial-gradient(circle at 86% 23%,rgba(111,197,202,.7) 0 1px,transparent 1.35px),radial-gradient(circle at 76% 84%,rgba(231,211,151,.58) 0 1px,transparent 1.3px); background-size:91px 107px,137px 123px,173px 149px; }
.pan-relation-lens > header { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; min-width:0; }
.pan-relation-lens > header > div { min-width:0; }
.pan-relation-lens header > div > span { color:#d8ba78; font-size:9px; letter-spacing:1.7px; }
.pan-relation-lens h3 { margin:4px 0 4px; overflow:hidden; color:#f0dca4; font:20px/1.28 var(--serif); letter-spacing:1px; text-overflow:ellipsis; white-space:nowrap; }
.pan-relation-lens header p { max-width:720px; margin:0; color:#9fb5bd; font-size:10px; line-height:1.65; }
.pan-relation-close { flex:0 0 auto; min-height:32px; padding:0 10px; border:1px solid rgba(226,184,109,.34); border-radius:7px; background:rgba(226,184,109,.06); color:#d8c381; cursor:pointer; font:10px var(--sans); transition:background .18s ease,border-color .18s ease,transform .18s ease; }
.pan-relation-close:hover { border-color:rgba(240,210,123,.8); background:rgba(226,184,109,.13); transform:translateY(-1px); }
.pan-relation-close:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
.pan-relation-canvas { position:relative; min-height:254px; overflow:hidden; border:1px solid rgba(141,173,188,.2); border-radius:9px; background:radial-gradient(circle at 50% 50%,rgba(226,184,109,.08),transparent 42%),rgba(3,11,18,.38); }
.pan-relation-canvas::after { content:''; position:absolute; z-index:0; left:50%; top:50%; width:54px; height:54px; border:1px solid rgba(226,184,109,.2); border-radius:50%; box-shadow:0 0 0 14px rgba(226,184,109,.025),0 0 30px rgba(226,184,109,.12); transform:translate(-50%,-50%); pointer-events:none; }
.pan-relation-canvas > svg { position:absolute; z-index:1; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.pan-relation-edge { fill:none; }
.pan-relation-wire { fill:none; stroke:rgba(150,179,190,.32); stroke-width:.48; vector-effect:non-scaling-stroke; }
.pan-relation-spark { fill:none; stroke:#e7c875; stroke-width:1.45; stroke-linecap:round; stroke-dasharray:3 97; stroke-dashoffset:100; vector-effect:non-scaling-stroke; filter:drop-shadow(0 0 3px rgba(231,199,117,.9)); animation:pan-relation-flow 3.8s linear infinite; animation-delay:var(--pan-flow-delay,0s); }
.pan-relation-edge.is-direct .pan-relation-wire { stroke:rgba(226,190,101,.62); stroke-width:.72; }
.pan-relation-edge.is-energy .pan-relation-wire { stroke:rgba(226,190,101,.7); stroke-width:.82; }
.pan-relation-edge.is-energy .pan-relation-spark { stroke:#f5d77d; stroke-width:1.8; stroke-dasharray:5 95; }
.pan-relation-edge.is-origin .pan-relation-wire { stroke:rgba(119,193,174,.48); stroke-dasharray:2 3; }
.pan-relation-edge.is-origin .pan-relation-spark,.pan-relation-edge.is-balance .pan-relation-spark { stroke:#92d8c0; }
.pan-relation-edge.is-balance .pan-relation-wire { stroke:rgba(119,193,174,.54); stroke-dasharray:2 3; }
.pan-relation-edge.is-sheng .pan-relation-wire { stroke:rgba(111,196,175,.56); }
.pan-relation-edge.is-sheng .pan-relation-spark { stroke:#8bd2bd; }
.pan-relation-edge.is-ke .pan-relation-wire { stroke:rgba(226,135,126,.56); stroke-dasharray:2 4; }
.pan-relation-edge.is-ke .pan-relation-spark { stroke:#efa197; }
.pan-relation-edge.is-same .pan-relation-wire { stroke:rgba(226,190,101,.5); }
.pan-relation-node-wrap { position:absolute; z-index:2; left:var(--pan-x); top:var(--pan-y); width:min(31%,148px); min-width:92px; transform:translate(-50%,-50%); }
.pan-relation-node { display:grid; grid-template-columns:minmax(0,1fr); gap:2px; width:100%; min-height:52px; padding:8px 9px; overflow:hidden; border:1px solid rgba(142,171,185,.35); border-radius:8px; background:rgba(7,18,27,.94); color:inherit; cursor:pointer; text-align:left; transition:transform .2s cubic-bezier(.16,1,.3,1),border-color .2s ease,background .2s ease,box-shadow .2s ease; }
.pan-relation-node:hover { border-color:rgba(231,195,112,.82); background:rgba(20,36,45,.98); box-shadow:0 9px 19px rgba(0,0,0,.25); transform:translateY(-2px) scale(1.025); }
.pan-relation-node:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
.pan-relation-node span { overflow:hidden; color:#91a8b4; font-size:8px; letter-spacing:.35px; text-overflow:ellipsis; white-space:nowrap; }
.pan-relation-node b { overflow:hidden; color:#dce4e8; font:500 14px/1.2 var(--serif); text-overflow:ellipsis; white-space:nowrap; }
.pan-relation-node small { display:block; overflow:hidden; color:#8fa7b2; font-size:8px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.pan-relation-node.is-selected { border-color:#edca78; background:radial-gradient(circle at 50% 0,rgba(226,184,109,.24),transparent 70%),rgba(13,28,37,.99); box-shadow:0 0 0 4px rgba(226,184,109,.1),0 13px 28px rgba(0,0,0,.3); }
.pan-relation-node.is-selected b { color:#f0dca2; font-size:16px; }
.pan-relation-node.is-star { border-color:rgba(218,183,91,.6); background:rgba(66,51,25,.82); }
.pan-relation-node.is-star b { color:#ead28c; }
.pan-relation-node.is-pillar { border-color:rgba(143,174,190,.48); }
.pan-relation-node.is-day { border-color:rgba(226,184,109,.5); }
.pan-relation-node.is-favor,.pan-relation-node.is-yong { border-color:rgba(106,181,158,.56); }
.pan-relation-node.is-xi { border-color:rgba(226,184,109,.52); }
.pan-relation-node.is-ji { border-color:rgba(205,112,102,.58); background:rgba(72,36,41,.78); }
.pan-relation-node.is-ji b { color:#e9b8b1; }
.pan-relation-legend { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; color:#8fa7b2; font-size:8px; }
.pan-relation-legend span { display:inline-flex; align-items:center; gap:5px; }
.pan-relation-legend span::before { content:''; width:16px; height:1px; background:#8fb9b5; box-shadow:0 0 5px rgba(143,185,181,.45); }
.pan-relation-legend .is-ke::before { background:repeating-linear-gradient(90deg,#e49a90 0 3px,transparent 3px 5px); }
.pan-relation-legend .is-balance::before { background:repeating-linear-gradient(90deg,#91d5bf 0 2px,transparent 2px 4px); }
.pan-relation-legend .is-energy::before { height:2px; background:repeating-linear-gradient(90deg,#f0cf79 0 3px,transparent 3px 5px); box-shadow:0 0 5px rgba(240,207,121,.6); }
@keyframes pan-relation-in { from { opacity:0; transform:translateY(-7px); } to { opacity:1; transform:translateY(0); } }
@keyframes pan-relation-flow { from { stroke-dashoffset:100; } to { stroke-dashoffset:0; } }
@keyframes pan-related-pulse { 0%,100% { opacity:.35; } 50% { opacity:.9; } }
@media (max-width:640px) {
  .pan-relation-lens { margin-top:11px; padding:11px; gap:9px; border-radius:10px; }
  .pan-relation-lens h3 { max-width:calc(100vw - 102px); font-size:17px; }
  .pan-relation-lens header p { font-size:9px; line-height:1.55; }
  .pan-relation-close { min-height:36px; padding:0 9px; }
  .pan-relation-canvas { min-height:220px; }
  .pan-relation-node-wrap { width:min(34%,126px); min-width:73px; }
  .pan-relation-node { min-height:47px; padding:6px 7px; }
  .pan-relation-node span { font-size:7px; }
  .pan-relation-node b { font-size:11px; }
  .pan-relation-node small { font-size:7px; }
  .pan-relation-node.is-selected b { font-size:13px; }
  .pan-relation-legend { gap:5px 8px; font-size:7px; }
}
@media (max-width:360px) {
  .pan-relation-canvas { min-height:204px; }
  .pan-relation-node-wrap { min-width:66px; }
  .pan-relation-node { padding:5px 6px; }
  .pan-relation-node b { font-size:10px; }
}
@media (prefers-reduced-motion:reduce) {
  .pan-relation-lens { animation:none; }
  .pan-relation-spark { animation:none; stroke-dasharray:none; opacity:.82; }
  .pan-relation-node,.pan-table [data-pan-link] { transition:none; }
  .pan-table [data-pan-link].is-pan-related::after { animation:none; opacity:.65; }
}

/* ───── 命运图谱 v3 · 纵向大画布 ─────
   画布是独立的滚动层：桌面把详情固定在右侧，手机把详情放到画布下方。
   world 保留足够的横向呼吸空间，避免四柱和神煞被压成不可读的缩略图。 */
.ms-atlas-shell {
  --atlas-ink:#dce8ea;
  --atlas-muted:#8da7b0;
  --atlas-gold:#e5c675;
  --atlas-teal:#82cfb3;
  --atlas-red:#e69a91;
  display:grid;
  grid-template-columns:168px minmax(0,1fr);
  grid-template-rows:auto minmax(0,1fr);
  gap:0;
  min-width:0;
  background:linear-gradient(145deg,rgba(3,12,20,.42),rgba(8,20,30,.12));
}
.ms-graph-stage.ms-atlas-stage { display:block; min-height:0; }
.ms-atlas-shell > .ms-atlas-timeline-rail { grid-column:1; grid-row:2; }
.ms-atlas-shell > .ms-atlas-viewport { grid-column:2; grid-row:2; }
.ms-atlas-shell > .ms-atlas-detail { grid-column:2; grid-row:3; }
.ms-atlas-note {
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px 18px;
  padding:13px clamp(14px,2.2vw,25px) 12px;
  border-bottom:1px solid rgba(143,174,195,.15);
  background:rgba(3,11,18,.36);
}
.ms-atlas-note > span {
  color:var(--atlas-gold);
  font-size:9px;
  letter-spacing:1.4px;
  white-space:nowrap;
}
.ms-atlas-note p {
  grid-column:1;
  grid-row:2;
  max-width:680px;
  margin:0;
  color:var(--atlas-muted);
  font-size:10px;
  line-height:1.65;
  text-wrap:pretty;
}
.ms-atlas-source-toggle {
  grid-column:2;
  grid-row:1 / span 2;
  min-height:36px;
  padding:0 11px;
  border:1px solid rgba(226,184,109,.38);
  border-radius:7px;
  background:rgba(226,184,109,.06);
  color:#dec681;
  cursor:pointer;
  font:9px var(--sans);
  transition:background .22s cubic-bezier(.22,1,.36,1),border-color .22s cubic-bezier(.22,1,.36,1),transform .22s cubic-bezier(.22,1,.36,1);
}
.ms-atlas-source-toggle:hover { border-color:rgba(240,210,123,.78); background:rgba(226,184,109,.13); transform:translateY(-1px); }
.ms-atlas-source-toggle:active { transform:translateY(0) scale(.98); }
.ms-atlas-source-toggle:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
.ms-atlas-timeline-rail {
  position:relative;
  grid-column:1;
  grid-row:2 / span 2;
  min-height:0;
  max-height:min(830px,calc(100dvh - 235px));
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-color:rgba(226,184,109,.48) rgba(3,11,18,.3);
  scrollbar-width:thin;
  border-right:1px solid rgba(143,174,195,.16);
  background:linear-gradient(180deg,rgba(3,11,18,.76),rgba(8,20,30,.54));
}
.ms-atlas-timeline-rail::-webkit-scrollbar { width:7px; }
.ms-atlas-timeline-rail::-webkit-scrollbar-track { background:rgba(3,11,18,.28); }
.ms-atlas-timeline-rail::-webkit-scrollbar-thumb { border:2px solid rgba(3,11,18,.4); border-radius:99px; background:rgba(226,184,109,.4); }
.ms-atlas-timeline-head {
  position:sticky;
  z-index:5;
  top:0;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:6px;
  min-height:42px;
  padding:0 12px;
  border-bottom:1px solid rgba(143,174,195,.14);
  background:rgba(4,13,21,.94);
  box-shadow:0 8px 16px rgba(1,7,12,.17);
}
.ms-atlas-timeline-head span { color:#d9bd75; font-size:9px; letter-spacing:1.1px; }
.ms-atlas-timeline-head small { color:#7f99a4; font-size:7px; white-space:nowrap; }
.ms-atlas-timeline-track { position:relative; min-width:156px; height:var(--atlas-height,1200px); }
.ms-atlas-timeline-track::before { content:''; position:absolute; top:19px; bottom:30px; left:28px; width:1px; background:linear-gradient(to bottom,rgba(226,184,109,.14),rgba(130,190,191,.32) 11%,rgba(130,190,191,.12) 87%,transparent); }
.ms-atlas-timeline-year {
  position:absolute;
  z-index:2;
  top:var(--atlas-timeline-y);
  left:12px;
  display:grid;
  grid-template-columns:42px 28px minmax(0,1fr);
  align-items:center;
  gap:5px;
  width:calc(100% - 20px);
  min-height:25px;
  padding:4px 5px 4px 7px;
  border:1px solid transparent;
  border-radius:6px;
  background:rgba(7,17,25,.06);
  color:#9db2ba;
  cursor:pointer;
  font:8px/1.25 var(--sans);
  text-align:left;
  transform:translateY(-50%);
  transition:background .2s cubic-bezier(.22,1,.36,1),border-color .2s cubic-bezier(.22,1,.36,1),transform .2s cubic-bezier(.22,1,.36,1),box-shadow .2s cubic-bezier(.22,1,.36,1);
}
.ms-atlas-timeline-year::before { content:''; position:absolute; left:12px; top:50%; width:5px; height:5px; border:1px solid #7c99a5; border-radius:50%; background:#07121b; transform:translate(-50%,-50%); }
.ms-atlas-timeline-year span { color:#9aabb3; font-variant-numeric:tabular-nums; }
.ms-atlas-timeline-year b { color:#d4e0e2; font:600 10px/1 var(--serif); letter-spacing:.5px; }
.ms-atlas-timeline-year i { overflow:hidden; color:#819ca5; font-size:7px; font-style:normal; text-align:right; text-overflow:ellipsis; white-space:nowrap; }
.ms-atlas-timeline-year.is-good::before { border-color:#7dcdae; background:#6bc3a4; box-shadow:0 0 7px rgba(111,205,170,.4); }
.ms-atlas-timeline-year.is-good i { color:#93d7ba; }
.ms-atlas-timeline-year.is-risk::before { border-color:#e2998f; background:#d88379; box-shadow:0 0 7px rgba(226,139,129,.35); }
.ms-atlas-timeline-year.is-risk i { color:#e5a39a; }
.ms-atlas-timeline-year:hover { z-index:4; border-color:rgba(226,184,109,.47); background:rgba(226,184,109,.08); transform:translateY(-50%) translateX(2px); }
.ms-atlas-timeline-year.is-selected { z-index:4; border-color:rgba(240,210,123,.83); background:linear-gradient(90deg,rgba(226,184,109,.18),rgba(13,31,40,.9)); box-shadow:0 6px 16px rgba(0,0,0,.21),inset 0 1px rgba(255,255,255,.04); transform:translateY(-50%) translateX(3px); }
.ms-atlas-timeline-year.is-selected::before { width:8px; height:8px; border-color:#f1d587; background:#e8c873; box-shadow:0 0 0 4px rgba(226,184,109,.1),0 0 11px rgba(236,205,120,.62); }
.ms-atlas-timeline-year.is-selected span,.ms-atlas-timeline-year.is-selected b { color:#f0dca1; }
.ms-atlas-timeline-year:focus-visible { z-index:6; outline:2px solid #f0d68f; outline-offset:2px; }
.ms-atlas-timeline-era { position:absolute; z-index:1; top:var(--atlas-timeline-y); left:38px; width:calc(100% - 44px); padding:0 0 3px 7px; border-left:1px solid rgba(226,184,109,.42); color:#cdb675; font-size:7px; letter-spacing:.3px; transform:translateY(calc(-50% - 20px)); white-space:nowrap; }
.ms-atlas-viewport {
  position:relative;
  grid-column:2;
  grid-row:2;
  min-width:0;
  height:min(690px,calc(100dvh - 350px));
  min-height:500px;
  overflow:auto;
  overscroll-behavior:contain;
  scrollbar-color:rgba(226,184,109,.55) rgba(4,12,19,.45);
  scrollbar-width:thin;
  background:
    radial-gradient(ellipse 72% 28% at 50% 0,rgba(226,184,109,.12),transparent 70%),
    radial-gradient(ellipse 55% 38% at 8% 43%,rgba(73,157,164,.08),transparent 72%),
    rgba(3,11,18,.34);
}
.ms-atlas-viewport::-webkit-scrollbar { width:8px; height:8px; }
.ms-atlas-viewport::-webkit-scrollbar-track { background:rgba(3,11,18,.34); }
.ms-atlas-viewport::-webkit-scrollbar-thumb { border:2px solid rgba(3,11,18,.34); border-radius:99px; background:rgba(226,184,109,.45); }
.ms-atlas-scroll-hint {
  position:sticky;
  z-index:7;
  top:10px;
  left:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:max-content;
  margin:0 auto -28px;
  padding:5px 9px;
  border:1px solid rgba(143,174,195,.2);
  border-radius:99px;
  background:rgba(4,12,19,.78);
  color:#91a9b2;
  font-size:8px;
  letter-spacing:.7px;
  pointer-events:none;
  opacity:.78;
}
.ms-atlas-scroll-hint i { width:6px; height:9px; border-bottom:1px solid #d8bd73; border-right:1px solid #d8bd73; transform:rotate(45deg) translateY(-2px); }
.ms-atlas-world {
  position:relative;
  width:100%;
  min-width:900px;
  height:var(--atlas-height,1200px);
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(circle at 50% 7%,rgba(226,184,109,.08),transparent 14%),
    radial-gradient(circle at 14% 16%,rgba(111,195,202,.06),transparent 18%),
    radial-gradient(circle at 86% 22%,rgba(226,184,109,.045),transparent 20%);
}
.ms-atlas-world::before,
.ms-atlas-world::after {
  content:'';
  position:absolute;
  z-index:0;
  pointer-events:none;
  border-radius:50%;
  opacity:.52;
}
.ms-atlas-world::before { left:5%; top:150px; width:1px; height:calc(100% - 190px); background:linear-gradient(to bottom,transparent,rgba(125,177,185,.2) 10%,rgba(125,177,185,.06) 84%,transparent); }
.ms-atlas-world::after { right:5%; top:150px; width:1px; height:calc(100% - 190px); background:linear-gradient(to bottom,transparent,rgba(226,184,109,.16) 10%,rgba(226,184,109,.04) 84%,transparent); }
.ms-atlas-lines { position:absolute; z-index:1; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.ms-atlas-spine { fill:none; stroke:rgba(150,177,190,.36); stroke-width:1.2; stroke-dasharray:1 7; vector-effect:non-scaling-stroke; }
.ms-atlas-edge { fill:none; opacity:.52; transition:opacity .35s cubic-bezier(.22,1,.36,1),filter .35s cubic-bezier(.22,1,.36,1); }
.ms-atlas-wire { fill:none; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.ms-atlas-spark { fill:none; stroke-linecap:round; stroke-dasharray:2 98; stroke-dashoffset:100; vector-effect:non-scaling-stroke; opacity:0; }
.ms-atlas-edge.is-structural { opacity:.33; }
.ms-atlas-edge.is-origin .ms-atlas-wire { stroke:rgba(119,194,180,.45); stroke-width:.72; stroke-dasharray:2 4; }
.ms-atlas-edge.is-balance .ms-atlas-wire { stroke:rgba(128,207,181,.5); stroke-width:.82; stroke-dasharray:2 4; }
.ms-atlas-edge.is-energy .ms-atlas-wire { stroke:rgba(229,195,106,.64); stroke-width:.92; stroke-dasharray:4 5; }
.ms-atlas-edge.is-timeline .ms-atlas-wire { stroke:rgba(145,169,193,.24); stroke-width:.62; }
.ms-atlas-edge.is-source .ms-atlas-wire { stroke:rgba(155,181,192,.3); stroke-width:.6; stroke-dasharray:2 5; }
.ms-atlas-edge.is-activation .ms-atlas-wire { stroke:rgba(226,184,109,.34); stroke-width:.66; stroke-dasharray:2 5; }
.ms-atlas-edge.is-good .ms-atlas-wire { stroke:rgba(119,205,172,.64); stroke-width:1; }
.ms-atlas-edge.is-risk .ms-atlas-wire { stroke:rgba(229,143,133,.64); stroke-width:1; stroke-dasharray:2 5; }
.ms-atlas-edge.is-focus { opacity:1; }
.ms-atlas-edge.is-focus .ms-atlas-wire { stroke-width:1.15; filter:drop-shadow(0 0 3px currentColor); }
.ms-atlas-edge.is-focus .ms-atlas-spark { opacity:.96; stroke:#f0d47d; stroke-width:1.55; filter:drop-shadow(0 0 4px rgba(240,212,125,.9)); animation:ms-atlas-flow 3.4s cubic-bezier(.22,1,.36,1) infinite; animation-delay:var(--atlas-flow-delay,0s); }
.ms-atlas-edge.is-focus.is-energy .ms-atlas-spark { stroke:#f7dc83; stroke-width:1.9; stroke-dasharray:5 95; animation-duration:2.7s; }
.ms-atlas-edge.is-focus.is-good .ms-atlas-spark { stroke:#9ce2c3; }
.ms-atlas-edge.is-focus.is-risk .ms-atlas-spark { stroke:#f1aaa0; }
.ms-atlas-zone {
  position:absolute;
  z-index:2;
  top:17px;
  padding:4px 8px;
  border-left:1px solid rgba(226,184,109,.46);
  color:#859ca7;
  font-size:8px;
  letter-spacing:1.1px;
  pointer-events:none;
}
.ms-atlas-zone-origin { left:3%; color:#b9c6cb; }
.ms-atlas-zone-stars { left:3%; top:151px; color:#d3b96e; border-left-color:rgba(226,184,109,.64); }
.ms-atlas-zone-balance { right:3%; top:151px; color:#9dd0bf; border-left-color:rgba(119,205,172,.52); }
.ms-atlas-zone-time { left:3%; top:calc(var(--atlas-height,1200px) - 70px); color:#9daec2; border-left-color:rgba(145,169,193,.42); }
.ms-atlas-decade-layer { position:absolute; z-index:2; inset:0; pointer-events:none; }
.ms-atlas-decade {
  position:absolute;
  left:calc(50% + 18px);
  top:var(--atlas-decade-y);
  max-width:180px;
  padding:3px 6px;
  border-left:1px solid rgba(226,184,109,.3);
  color:#9b8c62;
  font-size:8px;
  line-height:1.25;
  letter-spacing:.3px;
  transform:translateY(-50%);
  white-space:nowrap;
}
.ms-atlas-node-layer { position:absolute; z-index:3; inset:0; pointer-events:none; }
.ms-atlas-node {
  position:absolute;
  left:var(--atlas-x);
  top:var(--atlas-y);
  display:grid;
  grid-template-columns:20px minmax(0,1fr);
  gap:2px 6px;
  width:clamp(96px,13vw,154px);
  min-height:46px;
  padding:7px 8px;
  overflow:hidden;
  border:1px solid rgba(139,169,181,.3);
  border-radius:8px;
  background:rgba(5,15,23,.91);
  color:var(--atlas-ink);
  box-shadow:0 9px 22px rgba(0,0,0,.21),inset 0 1px rgba(255,255,255,.035);
  cursor:pointer;
  pointer-events:auto;
  text-align:left;
  transform:translate(-50%,-50%);
  transition:transform .26s cubic-bezier(.22,1,.36,1),opacity .3s cubic-bezier(.22,1,.36,1),border-color .26s cubic-bezier(.22,1,.36,1),background .26s cubic-bezier(.22,1,.36,1),box-shadow .26s cubic-bezier(.22,1,.36,1),filter .26s cubic-bezier(.22,1,.36,1);
}
.ms-atlas-node i { grid-row:span 2; display:grid; place-items:center; width:20px; height:20px; border-radius:50%; background:rgba(135,166,181,.13); color:#a8c0ca; font:10px/1 var(--serif); font-style:normal; }
.ms-atlas-node span { overflow:hidden; color:#8fa8b4; font-size:7px; letter-spacing:.45px; text-overflow:ellipsis; white-space:nowrap; }
.ms-atlas-node b { overflow:hidden; color:#dbe6e9; font:600 11px/1.25 var(--sans); text-overflow:ellipsis; white-space:nowrap; }
.ms-atlas-node small { grid-column:1 / -1; overflow:hidden; margin-top:2px; color:#91a9b2; font-size:7px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.ms-atlas-node .ms-atlas-year-stars { color:#d9be70; }
.ms-atlas-node:hover { z-index:5; border-color:rgba(240,210,123,.78); background:rgba(17,31,40,.98); box-shadow:0 12px 25px rgba(0,0,0,.29); transform:translate(-50%,-50%) translateY(-3px) scale(1.035); }
.ms-atlas-node.is-related { opacity:1; filter:none; }
.ms-atlas-node:not(.is-related):not(.is-selected) { opacity:.74; }
.ms-atlas-node.is-selected { z-index:6; border-color:#f0d183; background:radial-gradient(circle at 50% 0,rgba(226,184,109,.23),transparent 70%),rgba(12,28,37,.98); box-shadow:0 0 0 4px rgba(226,184,109,.1),0 14px 30px rgba(0,0,0,.34); transform:translate(-50%,-50%) scale(1.08); }
.ms-atlas-node.is-selected b { color:#f0dca2; }
.ms-atlas-node.is-root { width:clamp(150px,18vw,190px); min-height:55px; border-color:rgba(231,194,102,.62); background:radial-gradient(circle at 50% 5%,rgba(226,184,109,.2),transparent 62%),rgba(8,18,26,.96); }
.ms-atlas-node.is-root i { width:25px; height:25px; color:#f0d58b; background:rgba(226,184,109,.17); }
.ms-atlas-node.is-root b { color:#f1dda7; font:14px/1.2 var(--serif); letter-spacing:.6px; }
.ms-atlas-node.is-pillar { width:clamp(118px,15vw,165px); border-color:rgba(143,174,190,.49); }
.ms-atlas-node.is-pillar b { color:#d4e0e4; font:600 13px/1.2 var(--serif); letter-spacing:.8px; }
.ms-atlas-node.is-star { width:clamp(100px,13vw,146px); border-color:rgba(218,183,91,.55); background:rgba(57,44,24,.88); }
.ms-atlas-node.is-star i { color:#f0d27a; background:rgba(217,184,95,.18); }
.ms-atlas-node.is-star b { color:#ecd38a; }
.ms-atlas-node.is-balance { width:clamp(132px,16vw,178px); border-color:rgba(117,196,171,.54); background:rgba(12,43,42,.72); }
.ms-atlas-node.is-day i { color:#d7c17c; background:rgba(226,184,109,.14); }
.ms-atlas-node.is-balance b { color:#c9e4d8; }
.ms-atlas-node.ms-atlas-year { width:clamp(112px,14vw,160px); min-height:44px; border-radius:7px; border-color:rgba(138,164,188,.38); background:rgba(13,27,43,.94); }
.ms-atlas-node.ms-atlas-year i { width:18px; height:18px; font-size:11px; }
.ms-atlas-node.ms-atlas-year b { font:600 12px/1.2 var(--serif); font-variant-numeric:tabular-nums; }
.ms-atlas-node.is-good { border-color:rgba(109,199,165,.62); background:rgba(17,62,55,.82); }
.ms-atlas-node.is-good i { color:#9ce2c3; background:rgba(103,195,158,.16); }
.ms-atlas-node.is-good b { color:#c0e8d6; }
.ms-atlas-node.is-risk { border-color:rgba(220,132,123,.62); background:rgba(65,31,37,.84); }
.ms-atlas-node.is-risk i { color:#f0aaa0; background:rgba(216,112,103,.16); }
.ms-atlas-node.is-risk b { color:#edc0b9; }
.ms-atlas-node.is-neutral { border-color:rgba(140,165,181,.37); }
.ms-atlas-node:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
.ms-atlas-detail {
  position:relative;
  grid-column:2;
  grid-row:3;
  min-width:0;
  min-height:0;
  display:grid;
  grid-template-columns:auto minmax(150px,.68fr) minmax(0,1.8fr) auto;
  align-items:start;
  gap:8px 14px;
  padding:14px clamp(14px,2vw,22px) 16px;
  overflow:visible;
  border-top:1px solid rgba(143,174,195,.16);
  background:linear-gradient(100deg,rgba(3,11,18,.78),rgba(10,22,31,.88));
}
.ms-atlas-detail::before { content:''; position:absolute; top:-1px; left:20px; width:84px; height:1px; background:var(--atlas-gold); box-shadow:0 0 14px rgba(226,184,109,.48); }
.ms-atlas-detail.is-good::before { background:var(--atlas-teal); box-shadow:0 0 14px rgba(130,207,179,.48); }
.ms-atlas-detail.is-risk::before { background:var(--atlas-red); box-shadow:0 0 14px rgba(230,154,145,.48); }
.ms-atlas-detail-head { display:flex; grid-column:1; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; min-height:42px; color:#8ea4b4; font-size:9px; letter-spacing:1.1px; }
.ms-atlas-detail-head em { color:#d9bd75; font-size:8px; font-style:normal; letter-spacing:0; font-variant-numeric:tabular-nums; text-align:right; }
.ms-atlas-detail h3 { grid-column:2; margin:0; align-self:center; color:#f0dba4; font:clamp(18px,1.8vw,25px)/1.25 var(--serif); letter-spacing:.7px; overflow-wrap:anywhere; }
.ms-atlas-detail > b { grid-column:2; margin-top:-4px; color:#a5c9c0; font:10px/1.35 var(--sans); }
.ms-atlas-year-breakdown { grid-column:3; grid-row:1 / span 2; align-self:center; display:flex; flex-wrap:wrap; gap:5px; margin:0; }
.ms-atlas-year-breakdown span { padding:4px 6px; border:1px solid rgba(143,174,195,.24); border-radius:5px; background:rgba(5,15,23,.44); color:#b7c7cf; font-size:8px; line-height:1.35; }
.ms-atlas-year-breakdown span:last-child { border-color:rgba(226,184,109,.28); color:#d8bd72; }
.ms-atlas-detail > p { grid-column:1 / -1; margin:4px 0 0; color:#c0ced4; font-size:10.5px; line-height:1.72; text-wrap:pretty; }
.ms-atlas-detail-links { grid-column:4; grid-row:1 / span 2; align-self:center; display:block; max-width:72px; margin:0; color:#839ca8; font-size:8px; line-height:1.45; letter-spacing:.4px; text-align:right; }
.ms-atlas-impact { grid-column:1 / -1; display:grid; gap:5px; margin-top:0; padding-top:10px; border-top:1px solid rgba(143,174,195,.14); }
.ms-atlas-impact > span { color:#91a7b2; font-size:8px; letter-spacing:1px; }
.ms-atlas-impact > div { display:flex; flex-wrap:wrap; gap:5px; }
.ms-atlas-impact button,.ms-atlas-impact i { min-width:0; padding:5px 7px; border:1px solid rgba(143,174,195,.26); border-radius:6px; background:rgba(8,18,27,.45); color:#b9cbd0; font:9px/1.35 var(--sans); font-style:normal; text-align:left; }
.ms-atlas-impact button { cursor:pointer; transition:transform .2s cubic-bezier(.22,1,.36,1),border-color .2s cubic-bezier(.22,1,.36,1),background .2s cubic-bezier(.22,1,.36,1); }
.ms-atlas-impact button:hover { transform:translateY(-1px); border-color:rgba(226,184,109,.64); background:rgba(226,184,109,.1); }
.ms-atlas-impact.is-good > span { color:#94d5b9; }.ms-atlas-impact.is-good button,.ms-atlas-impact.is-good i { border-color:rgba(109,199,165,.4); color:#bfe1d2; background:rgba(21,68,59,.35); }
.ms-atlas-impact.is-risk > span { color:#e5a198; }.ms-atlas-impact.is-risk button,.ms-atlas-impact.is-risk i { border-color:rgba(220,132,123,.4); color:#e5b8b2; background:rgba(71,35,41,.34); }
.ms-atlas-impact.is-neutral > span { color:#c5b77d; }
@keyframes ms-atlas-flow { from { stroke-dashoffset:100; } to { stroke-dashoffset:0; } }
@media (max-width:1100px) {
  .ms-atlas-shell { grid-template-columns:152px minmax(0,1fr); }
  .ms-atlas-node { width:clamp(94px,14vw,142px); }
  .ms-atlas-node.is-pillar { width:clamp(112px,16vw,152px); }
  .ms-atlas-node.is-balance { width:clamp(124px,17vw,162px); }
}
@media (max-width:700px) {
  .ms-atlas-shell { display:block; }
  .ms-atlas-timeline-rail { display:none; }
  .ms-atlas-note { grid-template-columns:minmax(0,1fr); gap:8px; padding:11px 13px 10px; }
  .ms-atlas-note > span { grid-column:1; grid-row:1; }
  .ms-atlas-note p { grid-column:1; grid-row:2; font-size:9px; line-height:1.55; }
  .ms-atlas-source-toggle { grid-column:1; grid-row:3; justify-self:start; min-height:34px; }
  .ms-atlas-viewport { height:min(66dvh,620px); min-height:410px; border-bottom:1px solid rgba(143,174,195,.16); }
  .ms-atlas-world { min-width:700px; }
  .ms-atlas-scroll-hint { margin-bottom:-27px; }
  .ms-atlas-zone { font-size:7px; letter-spacing:.8px; }
  .ms-atlas-zone-stars { top:151px; }
  .ms-atlas-zone-balance { right:auto; left:72%; }
  .ms-atlas-zone-time { top:calc(var(--atlas-height,1200px) - 70px); }
  .ms-atlas-node { width:116px; min-height:43px; padding:6px 7px; }
  .ms-atlas-node b { font-size:10px; }
  .ms-atlas-node small { font-size:6.5px; }
  .ms-atlas-node.is-root { width:156px; }
  .ms-atlas-node.is-pillar { width:126px; }
  .ms-atlas-node.is-star { width:112px; }
  .ms-atlas-node.is-balance { width:142px; }
  .ms-atlas-node.ms-atlas-year { width:116px; }
  .ms-atlas-decade { left:calc(50% + 13px); max-width:130px; font-size:7px; }
  .ms-atlas-detail { display:block; min-height:0; padding:17px 14px 22px; border-left:0; border-top:1px solid rgba(143,174,195,.16); }
  .ms-atlas-detail::before { top:-1px; left:16px; width:68px; height:1px; }
  .ms-atlas-detail h3 { margin-top:11px; font-size:21px; }
  .ms-atlas-detail > p { font-size:11px; line-height:1.72; }
  .ms-atlas-detail-links { margin-top:14px; }
}
@media (max-width:390px) {
  .ms-atlas-viewport { min-height:390px; }
  .ms-atlas-world { min-width:660px; }
  .ms-atlas-node { width:108px; }
  .ms-atlas-node.is-root { width:148px; }
  .ms-atlas-node.is-pillar { width:118px; }
  .ms-atlas-node.is-star { width:104px; }
  .ms-atlas-node.is-balance { width:134px; }
  .ms-atlas-node.ms-atlas-year { width:108px; }
}
@media (prefers-reduced-motion:reduce) {
  .ms-atlas-edge,.ms-atlas-node,.ms-atlas-impact button,.ms-atlas-source-toggle { transition:none; }
  .ms-atlas-edge.is-focus .ms-atlas-spark { animation:none; stroke-dasharray:none; stroke-dashoffset:0; opacity:.82; }
}

/* ───── 命运图谱 v4 · 因果线索板 ─────
   左侧只有时间，右侧只画“来源怎样汇成当前结果”。这是刻意避免百年卡片
   在同一画布堆叠的结构：一张画布只服务一个流年镜头。 */
.ms-destiny-caseboard .ms-graph-head > div:first-child { max-width:645px; }
.ms-case-shell { grid-template-columns:168px minmax(0,1fr); grid-template-rows:auto minmax(0,1fr) auto; }
.ms-case-shell > .ms-atlas-timeline-rail { grid-column:1; grid-row:2 / span 2; max-height:min(840px,calc(100dvh - 235px)); }
.ms-case-shell > .ms-case-viewport { grid-column:2; grid-row:2; }
.ms-case-shell > .ms-case-detail { grid-column:2; grid-row:3; }
.ms-case-note > span { color:#e5c675; }
.ms-case-note p { max-width:770px; }
.ms-case-viewport { height:min(715px,calc(100dvh - 300px)); min-height:560px; overflow:auto; overscroll-behavior:contain; background:radial-gradient(ellipse 48% 44% at 50% 60%,rgba(226,184,109,.1),transparent 70%),radial-gradient(ellipse 50% 35% at 16% 22%,rgba(91,170,170,.085),transparent 72%),rgba(3,11,18,.4); }
.ms-case-viewport::-webkit-scrollbar { width:8px; height:8px; }
.ms-case-viewport::-webkit-scrollbar-track { background:rgba(2,9,15,.36); }
.ms-case-viewport::-webkit-scrollbar-thumb { border:2px solid rgba(2,9,15,.5); border-radius:99px; background:rgba(226,184,109,.46); }
.ms-case-world { position:relative; width:100%; min-width:1060px; height:790px; overflow:hidden; isolation:isolate; background:radial-gradient(circle at 50% 49%,rgba(226,184,109,.075),transparent 19%),radial-gradient(circle at 50% 56%,rgba(99,184,172,.055),transparent 38%),radial-gradient(circle at 8% 16%,rgba(120,189,199,.05),transparent 20%),radial-gradient(circle at 93% 15%,rgba(226,184,109,.045),transparent 24%); }
.ms-case-world::before { left:50%; top:31px; width:1px; height:710px; opacity:.75; background:linear-gradient(to bottom,transparent,rgba(226,184,109,.16) 16%,rgba(127,207,182,.12) 67%,transparent); }
.ms-case-world::after { left:8%; right:auto; top:270px; width:84%; height:1px; opacity:.6; background:linear-gradient(to right,transparent,rgba(141,177,190,.16) 16%,rgba(226,184,109,.22) 50%,rgba(141,177,190,.16) 84%,transparent); }
.ms-case-scroll-hint { position:sticky; z-index:7; top:10px; left:50%; width:max-content; margin:0 auto -25px; padding:5px 9px; border:1px solid rgba(143,174,195,.2); border-radius:99px; background:rgba(4,12,19,.78); color:#90a8b1; font-size:8px; letter-spacing:.65px; pointer-events:none; opacity:.74; }
.ms-case-zone { position:absolute; z-index:2; padding:4px 8px; border-left:1px solid rgba(226,184,109,.42); color:#91a6af; font-size:8px; letter-spacing:1px; pointer-events:none; }
.ms-case-zone-pillars { top:20px; left:3%; color:#c3d0d4; }
.ms-case-zone-stars { top:270px; left:3%; color:#d7bd74; border-left-color:rgba(226,184,109,.64); }
.ms-case-zone-balance { top:196px; left:42%; color:#9bd2bd; border-left-color:rgba(119,205,172,.54); }
.ms-case-zone-result { top:377px; left:43%; color:#ecd38d; border-left-color:rgba(226,184,109,.7); }
.ms-case-lines { position:absolute; z-index:1; inset:0; display:block; width:100%; height:100%; overflow:visible; pointer-events:none; }
.ms-case-edge { fill:none; opacity:.18; transition:opacity .28s cubic-bezier(.22,1,.36,1),filter .28s cubic-bezier(.22,1,.36,1); }
.ms-case-wire { fill:none; stroke-linecap:round; vector-effect:non-scaling-stroke; }
.ms-case-spark { fill:none; stroke-linecap:round; stroke-dasharray:3 97; stroke-dashoffset:100; vector-effect:non-scaling-stroke; opacity:0; }
.ms-case-edge.is-origin .ms-case-wire { stroke:rgba(119,194,180,.38); stroke-width:.66; stroke-dasharray:2 5; }
.ms-case-edge.is-balance .ms-case-wire { stroke:rgba(128,207,181,.46); stroke-width:.76; stroke-dasharray:2 4; }
.ms-case-edge.is-energy .ms-case-wire { stroke:rgba(229,195,106,.52); stroke-width:.72; stroke-dasharray:3 5; }
.ms-case-edge.is-main .ms-case-wire { stroke:rgba(235,202,120,.74); stroke-width:1.05; }
.ms-case-edge.is-source .ms-case-wire,.ms-case-edge.is-activation .ms-case-wire { stroke:rgba(153,181,193,.34); stroke-width:.58; stroke-dasharray:2 5; }
.ms-case-edge.is-good .ms-case-wire { stroke:rgba(119,205,172,.7); stroke-width:.95; }
.ms-case-edge.is-risk .ms-case-wire { stroke:rgba(229,143,133,.72); stroke-width:.95; stroke-dasharray:2 4; }
.ms-case-edge.is-focus { opacity:1; }
.ms-case-edge.is-focus .ms-case-wire { filter:drop-shadow(0 0 3px currentColor); }
.ms-case-edge.is-focus .ms-case-spark { opacity:.9; stroke:#f1d57c; stroke-width:1.45; filter:drop-shadow(0 0 4px rgba(240,212,125,.84)); animation:ms-case-flow 3.2s cubic-bezier(.22,1,.36,1) infinite; animation-delay:var(--case-flow-delay,0s); }
.ms-case-edge.is-focus.is-energy .ms-case-spark { stroke:#f7dc83; stroke-width:1.65; stroke-dasharray:5 95; animation-duration:2.65s; }
.ms-case-edge.is-focus.is-good .ms-case-spark { stroke:#9ce2c3; }
.ms-case-edge.is-focus.is-risk .ms-case-spark { stroke:#f0aaa0; }
.ms-case-node-layer { position:absolute; z-index:3; inset:0; pointer-events:none; }
.ms-case-node { position:absolute; left:var(--case-x); top:var(--case-y); display:grid; gap:2px; width:clamp(98px,11.5vw,136px); min-height:44px; padding:7px 8px; overflow:hidden; border:1px solid rgba(136,163,184,.32); border-radius:8px; background:rgba(5,15,23,.91); color:#dce8ea; box-shadow:0 9px 22px rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.035); cursor:pointer; pointer-events:auto; text-align:left; transform:translate(-50%,-50%); transition:transform .24s cubic-bezier(.22,1,.36,1),opacity .24s cubic-bezier(.22,1,.36,1),border-color .24s cubic-bezier(.22,1,.36,1),background .24s cubic-bezier(.22,1,.36,1),box-shadow .24s cubic-bezier(.22,1,.36,1),filter .24s cubic-bezier(.22,1,.36,1); }
.ms-case-node:hover { z-index:6; border-color:rgba(240,210,123,.78); background:rgba(17,31,40,.98); box-shadow:0 12px 25px rgba(0,0,0,.29); transform:translate(-50%,-50%) translateY(-3px) scale(1.035); }
.ms-case-node:focus-visible { z-index:8; outline:2px solid #f0d68f; outline-offset:3px; }
.ms-case-node span { overflow:hidden; color:#8fa8b4; font-size:7px; letter-spacing:.45px; text-overflow:ellipsis; white-space:nowrap; }
.ms-case-node b { overflow:hidden; color:#dbe6e9; font:600 12px/1.22 var(--sans); text-overflow:ellipsis; white-space:nowrap; }
.ms-case-node small { display:block; overflow:hidden; color:#91a9b2; font-size:6.8px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.ms-case-source.is-muted { opacity:.44; filter:saturate(.72); }
.ms-case-source.is-related { z-index:4; opacity:1; filter:none; }
.ms-case-source.is-pillar { width:clamp(122px,14vw,158px); min-height:52px; border-color:rgba(143,174,190,.52); }
.ms-case-source.is-pillar b { color:#d4e0e4; font:600 14px/1.2 var(--serif); letter-spacing:.8px; }
.ms-case-source.is-day { border-color:rgba(226,184,109,.54); background:rgba(42,37,24,.8); }
.ms-case-source.is-day b { color:#ead18b; }
.ms-case-source.is-favor { border-color:rgba(117,196,171,.58); background:rgba(12,43,42,.74); }
.ms-case-source.is-favor b { color:#c9e4d8; }
.ms-case-source.is-star { border-color:rgba(218,183,91,.46); background:rgba(57,44,24,.8); }
.ms-case-source.is-star b { color:#ecd38a; }
.ms-case-source.is-star.is-related { border-color:rgba(237,202,117,.82); box-shadow:0 0 0 3px rgba(226,184,109,.075),0 11px 24px rgba(0,0,0,.25); }
.ms-case-source.is-selected { z-index:7; border-color:#f0d183; background:radial-gradient(circle at 50% 0,rgba(226,184,109,.23),transparent 72%),rgba(12,28,37,.98); box-shadow:0 0 0 4px rgba(226,184,109,.1),0 14px 30px rgba(0,0,0,.34); transform:translate(-50%,-50%) scale(1.08); }
.ms-case-result { width:clamp(174px,21vw,250px); min-height:76px; padding:11px 13px; border-radius:10px; }
.ms-case-result span { color:#d7bc71; font-size:8px; letter-spacing:.9px; }
.ms-case-result b { color:#f0dba4; font:600 clamp(15px,1.55vw,20px)/1.25 var(--serif); letter-spacing:.5px; white-space:normal; }
.ms-case-result small { color:#b2c3c8; font-size:8px; line-height:1.42; white-space:normal; }
.ms-case-result.ms-case-current { border-color:rgba(226,184,109,.76); background:radial-gradient(circle at 50% 0,rgba(226,184,109,.22),transparent 72%),rgba(16,27,35,.96); box-shadow:0 0 0 4px rgba(226,184,109,.09),0 16px 33px rgba(0,0,0,.31); }
.ms-case-result.ms-case-stage { width:clamp(208px,26vw,310px); min-height:88px; border-color:rgba(229,195,106,.66); background:linear-gradient(140deg,rgba(70,53,20,.72),rgba(10,25,34,.95)); }
.ms-case-result.ms-case-stage b { font-size:clamp(17px,1.75vw,23px); }
.ms-case-result.is-good { border-color:rgba(109,199,165,.67); background:rgba(17,62,55,.86); }
.ms-case-result.is-good span,.ms-case-result.is-good b { color:#c0e8d6; }
.ms-case-result.is-risk { border-color:rgba(220,132,123,.68); background:rgba(65,31,37,.88); }
.ms-case-result.is-risk span,.ms-case-result.is-risk b { color:#edc0b9; }
.ms-case-result.is-selected { z-index:7; transform:translate(-50%,-50%) scale(1.055); }
.ms-case-detail { position:relative; min-width:0; padding:15px clamp(14px,2vw,24px) 19px; border-top:1px solid rgba(143,174,195,.16); background:linear-gradient(100deg,rgba(3,11,18,.82),rgba(10,22,31,.9)); }
.ms-case-detail::before { content:''; position:absolute; top:-1px; left:20px; width:88px; height:1px; background:#e5c675; box-shadow:0 0 14px rgba(226,184,109,.45); }
.ms-case-detail-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; color:#8ea4b4; font-size:9px; letter-spacing:1px; }.ms-case-detail-head em { color:#d9bd75; font-size:9px; font-style:normal; letter-spacing:0; font-variant-numeric:tabular-nums; }
.ms-case-detail h3 { margin:7px 0 0; color:#f0dba4; font:clamp(20px,2.2vw,28px)/1.25 var(--serif); letter-spacing:.7px; text-wrap:balance; }
.ms-case-detail > p { max-width:82ch; margin:11px 0 0; color:#c0ced4; font-size:10.5px; line-height:1.76; text-wrap:pretty; }
.ms-case-detail-pairs { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }.ms-case-detail-pairs span { padding:4px 7px; border:1px solid rgba(143,174,195,.26); border-radius:5px; background:rgba(5,15,23,.44); color:#b7c7cf; font-size:8px; }.ms-case-detail-pairs .is-yong,.ms-case-detail-pairs .is-xi { border-color:rgba(109,199,165,.44); color:#bfe1d2; }.ms-case-detail-pairs .is-ji { border-color:rgba(220,132,123,.44); color:#e5b8b2; }
.ms-case-detail-stars { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 9px; margin-top:9px; }.ms-case-detail-stars span { color:#d9bd75; font-size:8px; letter-spacing:.75px; }.ms-case-detail-stars b { color:#cfc08a; font:9px/1.5 var(--sans); font-weight:400; }
.ms-case-detail-outcomes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:14px; }.ms-case-detail-outcomes button { display:grid; gap:3px; min-width:0; min-height:57px; padding:8px 9px; border:1px solid rgba(143,174,195,.25); border-radius:7px; background:rgba(7,16,25,.38); color:inherit; cursor:pointer; text-align:left; transition:transform .2s cubic-bezier(.22,1,.36,1),border-color .2s cubic-bezier(.22,1,.36,1),background .2s cubic-bezier(.22,1,.36,1); }.ms-case-detail-outcomes button:hover { transform:translateY(-1px); }.ms-case-detail-outcomes span { font-size:8px; letter-spacing:.65px; }.ms-case-detail-outcomes b { display:-webkit-box; overflow:hidden; color:#cad5d7; font:9px/1.42 var(--sans); font-weight:400; -webkit-box-orient:vertical; -webkit-line-clamp:3; }.ms-case-detail-outcomes .is-good { border-color:rgba(109,199,165,.42); background:rgba(21,68,59,.34); }.ms-case-detail-outcomes .is-good span { color:#94d5b9; }.ms-case-detail-outcomes .is-good b { color:#bfe1d2; }.ms-case-detail-outcomes .is-risk { border-color:rgba(220,132,123,.42); background:rgba(71,35,41,.34); }.ms-case-detail-outcomes .is-risk span { color:#e5a198; }.ms-case-detail-outcomes .is-risk b { color:#e5b8b2; }.ms-case-detail-outcomes button:focus-visible { outline:2px solid #f0d68f; outline-offset:3px; }
.ms-case-detail-count { display:block; margin-top:11px; color:#839ca8; font-size:8px; letter-spacing:.4px; }
@keyframes ms-case-flow { from { stroke-dashoffset:100; } to { stroke-dashoffset:0; } }
@media (max-width:1100px) { .ms-case-shell { grid-template-columns:152px minmax(0,1fr); }.ms-case-world { min-width:980px; }.ms-case-node { width:118px; }.ms-case-source.is-pillar { width:142px; }.ms-case-result { width:205px; }.ms-case-result.ms-case-stage { width:250px; } }
@media (max-width:700px) {
  .ms-case-shell { display:block; }.ms-case-shell > .ms-atlas-timeline-rail { display:block; max-height:none; height:auto; overflow-x:auto; overflow-y:hidden; border-right:0; border-bottom:1px solid rgba(143,174,195,.16); background:rgba(3,11,18,.56); }.ms-case-shell .ms-atlas-timeline-head { position:relative; min-height:35px; padding:0 13px; }.ms-case-shell .ms-atlas-timeline-track { display:flex; align-items:stretch; gap:5px; min-width:max-content; height:auto !important; padding:7px 10px 10px; }.ms-case-shell .ms-atlas-timeline-track::before { display:none; }.ms-case-shell .ms-atlas-timeline-era { position:static; display:none; }.ms-case-shell .ms-atlas-timeline-year { position:relative; top:auto; left:auto; display:grid; flex:0 0 68px; grid-template-columns:1fr; gap:2px; width:68px; min-height:48px; padding:6px; border-color:rgba(143,174,195,.2); background:rgba(7,17,25,.48); transform:none; text-align:center; }.ms-case-shell .ms-atlas-timeline-year::before { left:50%; top:6px; width:4px; height:4px; transform:translate(-50%,-50%); }.ms-case-shell .ms-atlas-timeline-year span { padding-top:3px; font-size:8px; }.ms-case-shell .ms-atlas-timeline-year b { font-size:11px; }.ms-case-shell .ms-atlas-timeline-year i { font-size:6.5px; text-align:center; }.ms-case-shell .ms-atlas-timeline-year:hover { transform:translateY(-1px); }.ms-case-shell .ms-atlas-timeline-year.is-selected { transform:translateY(-1px); }
  .ms-case-note { padding:11px 13px 10px; }.ms-case-note p { font-size:9px; line-height:1.58; }.ms-case-viewport { height:min(61dvh,560px); min-height:420px; }.ms-case-world { min-width:820px; height:718px; }.ms-case-world::before { height:647px; }.ms-case-zone { font-size:7px; letter-spacing:.75px; }.ms-case-zone-stars { top:247px; }.ms-case-zone-balance { top:182px; }.ms-case-zone-result { top:356px; }.ms-case-node { width:96px; min-height:39px; padding:6px 7px; }.ms-case-node b { font-size:10px; }.ms-case-node small { font-size:6px; }.ms-case-source.is-pillar { width:115px; min-height:45px; }.ms-case-source.is-pillar b { font-size:12px; }.ms-case-result { width:160px; min-height:62px; padding:9px 10px; }.ms-case-result b { font-size:14px; }.ms-case-result.ms-case-stage { width:200px; min-height:74px; }.ms-case-result.ms-case-stage b { font-size:16px; }.ms-case-detail { padding:16px 14px 22px; }.ms-case-detail h3 { font-size:21px; }.ms-case-detail > p { font-size:11px; line-height:1.72; }.ms-case-detail-outcomes { grid-template-columns:1fr; }.ms-case-scroll-hint { margin-bottom:-25px; }
}
@media (max-width:390px) { .ms-case-world { min-width:770px; }.ms-case-node { width:91px; }.ms-case-source.is-pillar { width:110px; }.ms-case-result { width:153px; }.ms-case-result.ms-case-stage { width:190px; } }
@media (prefers-reduced-motion:reduce) { .ms-case-node,.ms-case-edge,.ms-case-detail-outcomes button { transition:none; }.ms-case-edge.is-focus .ms-case-spark { animation:none; stroke-dasharray:none; stroke-dashoffset:0; opacity:.78; } }

/* ───── 命运图谱 v5 · 七主题因果画布 ───── */
.ms-destiny-themes .ms-graph-head > div:first-child { max-width:720px; }
.ms-graph-legend .is-neutral::before { background:#7fa9bd; box-shadow:0 0 8px rgba(127,169,189,.45); }
.ms-theme-shell { display:grid; grid-template-columns:190px minmax(0,1fr); min-width:0; min-height:0; background:#061019; }
.ms-theme-nav { position:relative; z-index:4; display:flex; flex-direction:column; gap:7px; min-width:0; padding:14px 11px 18px; border-right:1px solid rgba(139,169,185,.15); background:linear-gradient(180deg,rgba(5,15,23,.98),rgba(5,14,21,.9)); }
.ms-theme-nav::before { content:'人生主题'; display:block; margin:1px 5px 6px; color:#7f98a5; font-size:8px; letter-spacing:1.5px; }
.ms-theme-nav button { position:relative; display:grid; grid-template-columns:31px minmax(0,1fr); grid-template-rows:auto auto; column-gap:9px; min-height:62px; padding:9px 9px 9px 8px; overflow:hidden; border:1px solid transparent; border-radius:9px; background:rgba(12,25,34,.42); color:#a9bbc2; cursor:pointer; text-align:left; touch-action:manipulation; transition:transform .22s cubic-bezier(.22,1,.36,1),border-color .22s,background .22s,box-shadow .22s; }
.ms-theme-nav button::after { content:''; position:absolute; inset:0 auto 0 0; width:2px; background:#e5c675; opacity:0; box-shadow:0 0 12px rgba(229,198,117,.72); }
.ms-theme-nav button:hover { transform:translateX(2px); border-color:rgba(224,193,109,.26); background:rgba(23,37,44,.72); }
.ms-theme-nav button:active { transform:translateX(1px) scale(.985); }
.ms-theme-nav button:focus-visible { outline:2px solid #efd483; outline-offset:2px; }
.ms-theme-nav button.is-active { border-color:rgba(229,198,117,.44); background:radial-gradient(circle at 13% 45%,rgba(229,198,117,.16),transparent 42%),rgba(19,33,40,.92); box-shadow:0 10px 26px rgba(0,0,0,.2); color:#e6d39d; }
.ms-theme-nav button.is-active::after { opacity:1; }
.ms-theme-nav i { grid-row:1 / span 2; align-self:center; display:grid; place-items:center; width:31px; height:31px; border:1px solid rgba(144,174,188,.25); border-radius:50%; color:#cbd9dd; font:600 14px/1 var(--serif); font-style:normal; }
.ms-theme-nav button.is-active i { border-color:rgba(229,198,117,.64); color:#f0d789; box-shadow:inset 0 0 13px rgba(229,198,117,.12),0 0 14px rgba(229,198,117,.08); }
.ms-theme-nav span { align-self:end; font:600 13px/1.2 var(--serif); letter-spacing:.65px; }
.ms-theme-nav small { align-self:start; overflow:hidden; color:#7f98a4; font-size:7px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.ms-theme-main { min-width:0; }
.ms-theme-source-strip { padding:12px clamp(13px,2vw,22px); border-bottom:1px solid rgba(139,169,185,.13); background:rgba(5,16,24,.92); }
.ms-theme-source-strip header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:8px; }
.ms-theme-source-strip header span { color:#e4c775; font-size:8px; letter-spacing:1.1px; }
.ms-theme-source-strip header small { color:#77929d; font-size:7px; }
.ms-theme-source-strip > div { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:6px; }
.ms-source-strip-item { display:grid; gap:2px; min-width:0; min-height:48px; padding:6px 7px; border:1px solid rgba(126,160,177,.23); border-radius:6px; background:rgba(9,25,34,.68); color:#c8d6d9; cursor:pointer; text-align:left; touch-action:manipulation; }
.ms-source-strip-item:hover,.ms-source-strip-item:focus-visible { border-color:#e4c775; outline:none; }
.ms-source-strip-item span { color:#7e9aa5; font-size:7px; }
.ms-source-strip-item b { overflow:hidden; color:#d9e2e4; font:600 12px/1.2 var(--serif); text-overflow:ellipsis; white-space:nowrap; }
.ms-source-strip-item small { overflow:hidden; color:#8ca5af; font-size:6.5px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.ms-source-strip-item.is-day { border-color:rgba(226,184,109,.34); }.ms-source-strip-item.is-favor { border-color:rgba(103,192,157,.34); }
.ms-source-attrs { display:grid !important; gap:1px; color:#96acb4 !important; white-space:normal !important; }
.ms-source-attrs i { overflow:hidden; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.ms-theme-note { display:flex; align-items:center; justify-content:space-between; gap:20px; min-height:62px; padding:10px clamp(13px,2vw,22px); border-bottom:1px solid rgba(139,169,185,.13); background:linear-gradient(90deg,rgba(8,21,29,.96),rgba(9,25,32,.84)); }
.ms-theme-note > div { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:baseline; gap:10px; min-width:0; }
.ms-theme-note span { color:#e4c775; font-size:8px; letter-spacing:1.2px; white-space:nowrap; }
.ms-theme-note p { margin:0; color:#8fa6b0; font-size:9px; line-height:1.55; text-wrap:pretty; }
.ms-theme-note button { flex:0 0 auto; min-height:36px; padding:7px 11px; border:1px solid rgba(223,193,111,.32); border-radius:7px; background:rgba(40,35,22,.58); color:#dbc57f; cursor:pointer; font-size:8px; touch-action:manipulation; transition:transform .2s,border-color .2s,background .2s; }
.ms-theme-note button:hover { transform:translateY(-1px); border-color:rgba(235,207,126,.65); background:rgba(55,45,24,.76); }
.ms-theme-viewport { height:min(690px,calc(100dvh - 272px)); min-height:560px; overflow:auto; overscroll-behavior:contain; background:radial-gradient(circle at 61% 49%,rgba(226,184,109,.1),transparent 21%),radial-gradient(circle at 25% 26%,rgba(79,152,178,.075),transparent 32%),linear-gradient(180deg,rgba(3,12,19,.62),rgba(4,14,21,.92)); }
.ms-theme-world { width:100%; min-width:1040px; height:var(--atlas-height,690px); overflow:hidden; background-image:radial-gradient(circle at 1px 1px,rgba(137,169,184,.13) 1px,transparent 1.25px),linear-gradient(90deg,transparent 55%,rgba(223,191,105,.035) 55%,rgba(223,191,105,.035) 55.1%,transparent 55.1%); background-size:22px 22px,100% 100%; }
.ms-theme-world::before { left:55%; top:45px; width:1px; height:590px; background:linear-gradient(to bottom,transparent,rgba(229,198,117,.2) 18%,rgba(93,166,193,.17) 76%,transparent); opacity:.75; }
.ms-theme-world::after { left:7%; right:auto; top:129px; width:44%; height:1px; background:linear-gradient(to right,transparent,rgba(126,168,184,.18) 14%,rgba(126,168,184,.18) 86%,transparent); opacity:.75; }
.ms-theme-zone { top:20px; }
.ms-theme-zone.is-source { left:3%; color:#9db2bb; }
.ms-theme-zone.is-theme { left:55%; color:#e5c675; border-left-color:rgba(229,198,117,.68); }
.ms-theme-zone.is-result { left:75%; color:#9fbac6; border-left-color:rgba(100,168,194,.58); }
.ms-theme-lines.is-mobile { display:none; }
.ms-theme-source { left:var(--case-x); top:var(--case-y); }
.ms-theme-source.is-good { border-color:rgba(103,192,157,.54); background:linear-gradient(135deg,rgba(15,53,46,.78),rgba(6,20,27,.94)); }
.ms-theme-source.is-good b { color:#bce5d2; }
.ms-theme-source.is-risk { border-color:rgba(218,128,119,.5); background:linear-gradient(135deg,rgba(65,30,35,.75),rgba(9,18,25,.94)); }
.ms-theme-source.is-risk b { color:#e9bbb4; }
.ms-theme-source.is-neutral { border-color:rgba(105,161,187,.48); background:linear-gradient(135deg,rgba(14,43,57,.75),rgba(7,18,26,.94)); }
.ms-theme-source.is-neutral b { color:#b8d3df; }
.ms-theme-source.ms-case-star { width:clamp(118px,13vw,154px); min-height:46px; }
.ms-theme-source.ms-case-star-inspected { border-style:dashed; border-color:rgba(241,213,124,.92); background:linear-gradient(135deg,rgba(74,58,25,.9),rgba(9,20,28,.96)); box-shadow:0 0 0 3px rgba(241,213,124,.1),0 12px 26px rgba(0,0,0,.3); }
.ms-theme-source.ms-case-star-inspected::after { content:'当前查看'; position:absolute; top:-9px; right:8px; padding:2px 5px; border:1px solid rgba(241,213,124,.55); border-radius:4px; background:#1d241f; color:#f1d57c; font-size:6px; letter-spacing:.6px; }
.ms-theme-source.ms-case-pillar { width:clamp(115px,12vw,144px); }
.ms-theme-core { position:absolute; z-index:6; left:var(--case-x); top:var(--case-y); display:grid; place-items:center; width:clamp(178px,18vw,224px); min-height:164px; padding:20px; border:1px solid rgba(232,203,123,.68); border-radius:50%; background:radial-gradient(circle at 50% 38%,rgba(226,184,109,.24),transparent 54%),radial-gradient(circle at 50% 50%,rgba(18,39,48,.98),rgba(5,15,23,.98) 72%); color:#eed99e; box-shadow:0 0 0 8px rgba(226,184,109,.035),0 0 0 18px rgba(101,159,181,.025),0 22px 48px rgba(0,0,0,.37),inset 0 0 35px rgba(226,184,109,.07); cursor:pointer; text-align:center; transform:translate(-50%,-50%); touch-action:manipulation; transition:transform .25s cubic-bezier(.22,1,.36,1),box-shadow .25s,border-color .25s; }
.ms-theme-core::before,.ms-theme-core::after { content:''; position:absolute; inset:-13px; border:1px solid rgba(127,177,193,.12); border-radius:50%; pointer-events:none; }
.ms-theme-core::after { inset:-27px; border-style:dashed; border-color:rgba(229,198,117,.13); animation:ms-theme-orbit 22s linear infinite; }
.ms-theme-core:hover { transform:translate(-50%,-50%) scale(1.025); border-color:#efd486; box-shadow:0 0 0 9px rgba(226,184,109,.045),0 0 38px rgba(226,184,109,.12),0 22px 48px rgba(0,0,0,.4); }
.ms-theme-core:focus-visible { outline:2px solid #f1d987; outline-offset:4px; }
.ms-theme-core i { display:grid; place-items:center; width:36px; height:36px; border:1px solid rgba(229,198,117,.56); border-radius:50%; color:#f0d98f; font:600 17px/1 var(--serif); font-style:normal; }
.ms-theme-core span { margin-top:5px; color:#91aab4; font-size:8px; letter-spacing:1.25px; }
.ms-theme-core b { font:600 clamp(24px,2.4vw,32px)/1.1 var(--serif); letter-spacing:2px; }
.ms-theme-core small { max-width:18ch; color:#aebfc5; font-size:8px; line-height:1.5; }
.ms-theme-result { left:var(--case-x); top:var(--case-y); width:clamp(210px,23vw,278px); min-height:102px; pointer-events:none; }
.ms-theme-result b { font-size:clamp(14px,1.35vw,18px); }
.ms-theme-result small { display:-webkit-box; overflow:hidden; font-size:8px; line-height:1.5; white-space:normal; -webkit-box-orient:vertical; -webkit-line-clamp:3; }
.ms-theme-result.is-neutral { border-color:rgba(100,168,194,.58); background:linear-gradient(135deg,rgba(15,50,65,.88),rgba(7,18,27,.96)); }
.ms-theme-result.is-neutral span { color:#8fc6db; }
.ms-theme-result.is-neutral b { color:#c8e0e8; }
.ms-theme-edge.is-neutral .ms-case-wire { stroke:rgba(101,169,194,.65); stroke-width:.85; }
.ms-theme-edge.is-neutral .ms-case-spark { stroke:#8fd0e6; }
.ms-theme-edge.is-focus .ms-case-spark { stroke-dasharray:2 98; stroke-width:1.2; animation-duration:4.4s; }
.ms-theme-edge.is-focus.is-good .ms-case-spark { stroke:#91ddbd; }
.ms-theme-edge.is-focus.is-risk .ms-case-spark { stroke:#eca098; }
.ms-theme-time { display:grid; grid-template-columns:122px minmax(0,1fr) 250px; align-items:center; gap:12px; min-height:66px; padding:9px clamp(12px,2vw,22px); border-top:1px solid rgba(139,169,185,.13); background:rgba(4,15,23,.9); }
.ms-theme-time > span { color:#93aab4; font-size:8px; letter-spacing:1.1px; }
.ms-theme-time > div { display:flex; gap:6px; min-width:0; overflow-x:auto; scrollbar-width:none; }
.ms-theme-time > div::-webkit-scrollbar { display:none; }
.ms-theme-time button { flex:0 0 67px; display:grid; gap:1px; min-height:42px; padding:6px 7px; border:1px solid rgba(127,163,181,.28); border-radius:6px; background:rgba(10,25,34,.82); color:#c2d0d5; cursor:pointer; text-align:center; touch-action:manipulation; }
.ms-theme-time button b { font:600 10px/1.2 var(--sans); font-variant-numeric:tabular-nums; }
.ms-theme-time button small { overflow:hidden; color:#7f9aa7; font-size:7px; text-overflow:ellipsis; white-space:nowrap; }
.ms-theme-time button.is-good { border-color:rgba(103,192,157,.46); }.ms-theme-time button.is-risk { border-color:rgba(218,128,119,.46); }.ms-theme-time button.is-selected { border-color:#e8cb79; background:rgba(50,42,22,.8); color:#efd98f; }
.ms-theme-time p { margin:0; color:#718c99; font-size:7.5px; line-height:1.45; }
.ms-theme-time:has(.ms-relationship-other-years) button { flex-basis:108px; min-height:44px; }
.ms-theme-time:has(.ms-relationship-other-years) button small { font-size:10px; }
.ms-relationship-other-years { grid-column:1 / -1; min-width:0; }
.ms-relationship-other-years summary { min-height:40px; padding:10px 0; color:#bacbcf; font-size:11px; cursor:pointer; }
.ms-relationship-other-years > div { display:flex; flex-wrap:wrap; gap:6px; padding:4px 0 10px; }
.ms-theme-detail-results { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:7px; margin-top:13px; }
.ms-theme-detail-results > div { min-width:0; padding:8px 9px; border:1px solid rgba(102,168,193,.2); border-radius:7px; background:rgba(9,25,34,.6); box-shadow:inset 2px 0 0 rgba(102,168,193,.55); }
.ms-theme-detail-results > div.is-good { border-color:rgba(114,199,167,.24); background:rgba(18,58,50,.44); box-shadow:inset 2px 0 0 #72c7a7; }
.ms-theme-detail-results > div.is-risk { border-color:rgba(217,134,125,.24); background:rgba(65,32,37,.42); box-shadow:inset 2px 0 0 #d9867d; }
.ms-theme-detail-results span { color:#cbd9dc; font-size:8px; letter-spacing:.45px; }
.ms-theme-detail-results p { margin:5px 0 0; color:#93a8b0; font-size:8px; line-height:1.5; text-wrap:pretty; }
.ms-theme-library { padding:16px clamp(13px,2vw,23px) 22px; border-top:1px solid rgba(139,169,185,.13); background:linear-gradient(180deg,rgba(4,14,22,.95),rgba(3,11,18,.99)); }
.ms-theme-library > header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.ms-theme-library > header span { color:#d9bd75; font-size:8px; letter-spacing:1px; }
.ms-theme-library > header h3 { margin:4px 0 0; color:#d9e3e5; font:600 16px/1.25 var(--serif); letter-spacing:.6px; }
.ms-theme-library > header p { max-width:70ch; margin:6px 0 0; color:#79929d; font-size:8px; line-height:1.55; }
.ms-theme-library > header button { min-height:36px; padding:7px 11px; border:1px solid rgba(222,190,106,.32); border-radius:6px; background:rgba(42,34,19,.56); color:#d7bd75; cursor:pointer; font-size:8px; touch-action:manipulation; }
.ms-theme-library-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:14px; }
.ms-theme-library-grid > section { min-width:0; padding:9px; border:1px solid rgba(128,161,177,.14); border-radius:8px; background:rgba(8,21,29,.62); }
.ms-theme-library-grid > section > header { display:grid; grid-template-columns:auto 1fr auto; align-items:baseline; gap:6px; padding-bottom:7px; border-bottom:1px solid rgba(128,161,177,.13); }
.ms-theme-library-grid header span { color:#8ca5af; font-size:7px; }.ms-theme-library-grid header b { overflow:hidden; color:#d8e2e4; font:600 11px/1.2 var(--serif); text-overflow:ellipsis; white-space:nowrap; }.ms-theme-library-grid header em { color:#718d99; font-size:7px; font-style:normal; }
.ms-theme-library-grid section > div { display:flex; flex-wrap:wrap; gap:5px; padding-top:8px; }
.ms-theme-library-grid section > div > button { display:grid; gap:2px; min-width:66px; max-width:118px; padding:6px 7px; border:1px solid rgba(126,160,177,.22); border-radius:5px; background:rgba(5,16,24,.8); color:#bfced3; cursor:pointer; text-align:left; touch-action:manipulation; }
.ms-theme-library-grid section > div > button span { overflow:hidden; font-size:8px; text-overflow:ellipsis; white-space:nowrap; }.ms-theme-library-grid section > div > button small { overflow:hidden; color:#718d99; font-size:6.5px; text-overflow:ellipsis; white-space:nowrap; }
.ms-theme-library-grid button.is-good { border-color:rgba(103,192,157,.34); }.ms-theme-library-grid button.is-risk { border-color:rgba(218,128,119,.34); }.ms-theme-library-grid button.is-selected { border-color:#e5c675; background:rgba(46,39,21,.84); }
.ms-theme-library-grid section > div > p { margin:0; color:#6f8791; font-size:8px; }
.ms-theme-library > small { display:block; margin-top:10px; color:#647d88; font-size:7px; letter-spacing:.45px; }
@keyframes ms-theme-orbit { to { transform:rotate(360deg); } }

@media (max-width:1100px) and (min-width:701px) {
  .ms-theme-shell { grid-template-columns:154px minmax(0,1fr); }
  .ms-theme-nav button { grid-template-columns:27px minmax(0,1fr); column-gap:7px; padding-inline:6px; }.ms-theme-nav i { width:27px; height:27px; font-size:12px; }.ms-theme-nav small { display:none; }
  .ms-theme-world { min-width:960px; }.ms-theme-source.ms-case-star { width:120px; }.ms-theme-source.ms-case-pillar { width:112px; }.ms-theme-result { width:215px; }
  .ms-theme-time { grid-template-columns:105px minmax(0,1fr); }.ms-theme-time p { display:none; }
  .ms-theme-library-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:700px) {
  .ms-destiny-themes .ms-graph-head { padding-bottom:12px; }.ms-destiny-themes .ms-graph-head > div:first-child p { display:none; }
  .ms-theme-shell { display:block; }
  .ms-theme-nav { position:sticky; z-index:12; top:0; flex-direction:row; gap:7px; padding:9px 10px 10px; overflow-x:auto; border-right:0; border-bottom:1px solid rgba(139,169,185,.15); scrollbar-width:none; }
  .ms-theme-nav::-webkit-scrollbar { display:none; }.ms-theme-nav::before { display:none; }
  .ms-theme-nav button { flex:0 0 72px; display:grid; grid-template-columns:1fr; grid-template-rows:24px auto; place-items:center; min-height:54px; padding:6px 5px; border-color:rgba(128,161,177,.13); text-align:center; }
  .ms-theme-nav button:hover { transform:none; }.ms-theme-nav button::after { inset:auto 9px 0; width:auto; height:2px; }
  .ms-theme-nav i { grid-row:auto; width:24px; height:24px; font-size:11px; }.ms-theme-nav span { align-self:center; font-size:10px; }.ms-theme-nav small { display:none; }
  .ms-theme-note { min-height:54px; padding:9px 11px; }.ms-theme-note > div { display:block; }.ms-theme-note p { margin-top:3px; font-size:8px; line-height:1.45; }.ms-theme-note button { min-height:36px; padding-inline:8px; }
  .ms-theme-source-strip { padding:10px 11px; }.ms-theme-source-strip header small { display:none; }.ms-theme-source-strip > div { display:flex; gap:6px; overflow-x:auto; scrollbar-width:none; }.ms-theme-source-strip > div::-webkit-scrollbar { display:none; }.ms-source-strip-item { flex:0 0 122px; min-height:52px; }
  .ms-theme-viewport { height:min(61dvh,560px); min-height:470px; overflow:auto; }
  .ms-theme-world { width:100%; min-width:680px; height:var(--atlas-mobile-height,1885px); background-size:20px 20px,100% 100%; }
  .ms-theme-world::before { left:50%; top:735px; height:1070px; }.ms-theme-world::after { left:8%; top:255px; width:84%; }
  .ms-theme-lines.is-desktop { display:none; }.ms-theme-lines.is-mobile { display:block; }
  .ms-theme-zone.is-source { left:3%; }.ms-theme-zone.is-theme { left:43%; top:735px; }.ms-theme-zone.is-result { left:3%; top:940px; }
  .ms-theme-source { left:var(--case-mobile-x); top:var(--case-mobile-y); width:118px; min-height:44px; }
  .ms-theme-source.ms-case-pillar { width:114px; min-height:48px; }.ms-theme-source.ms-case-pillar b { font-size:12px; }.ms-theme-source.ms-case-star { width:126px; }
  .ms-theme-core { left:var(--case-mobile-x); top:var(--case-mobile-y); width:174px; min-height:142px; padding:17px; }.ms-theme-core b { font-size:25px; }.ms-theme-core small { font-size:7.5px; }
  .ms-theme-result { left:var(--case-mobile-x); top:var(--case-mobile-y); width:330px; max-width:calc(100vw - 32px); min-height:112px; padding:12px 13px; }.ms-theme-result b { font-size:15px; }.ms-theme-result small { font-size:8px; }
  .ms-theme-time { grid-template-columns:92px minmax(0,1fr); gap:8px; padding:9px 10px; }.ms-theme-time p { display:none; }.ms-theme-time button { flex-basis:64px; }
  .ms-theme-detail { padding:15px 13px 18px; }.ms-theme-detail h3 { font-size:20px; }.ms-theme-detail > p { font-size:10.5px; }
  .ms-theme-detail-results { grid-template-columns:1fr; }.ms-theme-detail-results > div { padding:8px 9px; }.ms-theme-detail-results p { font-size:9px; }
  .ms-theme-library { padding:15px 12px 21px; }.ms-theme-library > header { align-items:center; }.ms-theme-library > header p { display:none; }.ms-theme-library > header h3 { font-size:14px; }
  .ms-theme-library-grid { grid-template-columns:1fr; }.ms-theme-library-grid > section > header { grid-template-columns:auto 1fr auto; }.ms-theme-library-grid section > div > button { min-width:78px; max-width:128px; min-height:42px; }
  .ms-case-scroll-hint { margin-bottom:-25px; }
}
@media (max-width:390px) {
  .ms-theme-world { min-width:680px; }.ms-theme-source { width:114px; }.ms-theme-source.ms-case-star { width:122px; }.ms-theme-result { width:330px; }
}
@media (prefers-reduced-motion:reduce) {
  .ms-theme-core::after { animation:none; }.ms-theme-nav button,.ms-theme-core,.ms-theme-note button { transition:none; }
}
/* 本机档案：首页仅显示一个入口，完整卡片在弹窗内选择。 */
#savedCharts.saved-charts{max-width:760px;margin:0 auto 18px;padding:0;border:0;background:none}
.saved-archive-trigger{display:flex;align-items:center;gap:12px;width:100%;min-height:76px;padding:13px 16px;border:1px solid rgba(153,173,161,.17);border-radius:16px;background:rgba(23,32,29,.72);color:var(--ink);text-align:left;cursor:pointer;transition:background .16s ease,border-color .16s ease}
.saved-archive-trigger:hover{background:rgba(39,51,44,.8);border-color:rgba(153,173,161,.3)}
.saved-archive-trigger:disabled{cursor:default;opacity:.7}
.saved-archive-icon{display:grid;place-items:center;flex:0 0 40px;height:40px;border-radius:12px;background:rgba(201,180,127,.08);color:#c9b47f}
.saved-archive-icon svg{width:23px;height:23px}.saved-archive-copy{flex:1;min-width:0}.saved-archive-label{display:flex;align-items:center;gap:8px;font-size:11px;color:var(--ink-dim)}.saved-archive-count{font-size:10px;font-variant-numeric:tabular-nums;color:#a9b8af}
.saved-archive-name{display:block;margin-top:4px;font-size:14px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-archive-chevron{width:18px;height:18px;flex:none;color:#a0b2a7}
.saved-records-empty,.saved-records-error{font-size:12px;line-height:1.8;margin:8px 0;color:var(--ink-dim)}.saved-records-error{color:#e3ab9b}
.result-save-status.is-error{max-width:460px;white-space:normal;line-height:1.6}
#savedCharts>.saved-records-error{padding-inline:12px;margin-bottom:0}
.modal.is-saved-picker{max-width:620px;max-height:82vh;max-height:82dvh;border-radius:22px 22px 0 0;background:#151e1b;border-color:rgba(153,173,161,.2)}
.modal.is-saved-picker .modal-head{padding:12px 16px;border-bottom-color:rgba(153,173,161,.12);background:none}.modal.is-saved-picker .modal-head span{font-family:var(--sans);font-size:17px;font-weight:600;letter-spacing:0;color:var(--ink)}
.modal.is-saved-picker .modal-body{padding:14px 16px max(16px,env(safe-area-inset-bottom));max-height:calc(82vh - 70px);max-height:calc(82dvh - 70px);overscroll-behavior:contain}
.saved-archive-scope{margin:0 0 14px;font-size:11px;color:var(--ink-dim)}
.saved-archive-list{display:grid;grid-template-columns:1fr;gap:8px}.saved-archive-list .saved-chart{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:0;border:1px solid rgba(153,173,161,.15);border-radius:12px;background:rgba(255,255,255,.025);overflow:hidden}
.saved-archive-list .saved-chart.is-current{border-color:rgba(201,180,127,.36);background:rgba(201,180,127,.045)}
.saved-archive-list .saved-chart-open{display:grid;grid-template-columns:minmax(36px,1fr) auto minmax(0,auto);align-items:center;gap:8px;min-height:58px;padding:8px 10px;border:0;border-radius:0;background:none;color:inherit;font:inherit;cursor:pointer;text-align:left;min-width:0}
.saved-archive-list .saved-chart-open:hover{background:rgba(255,255,255,.035)}
.saved-archive-list .saved-record-info strong{display:block;min-width:0;color:var(--ink);font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-archive-list .saved-record-identity{margin:0;font-size:11px;line-height:1.4;white-space:nowrap;color:#abbaa8}.saved-archive-list .saved-record-birth{display:block;margin:0;min-width:0;max-width:11em;font-size:11px;line-height:1.4;color:var(--ink-dim);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.saved-record-tools{display:flex;align-items:center;padding:0}.saved-record-tools button{display:grid;place-items:center;width:44px;min-height:44px;padding:0;border:0;border-radius:10px;background:none;color:#a4b1a9;cursor:pointer}.saved-record-tools svg{width:18px;height:18px}.saved-record-tools button:hover{background:rgba(255,255,255,.05);color:#e7dfca}.saved-record-tools .saved-chart-remove:hover{color:#e3ab9b;background:rgba(200,100,90,.08)}
.saved-record-delete-confirm{display:flex;grid-column:1/-1;align-items:center;gap:8px;min-height:44px;padding:0 6px 0 10px;border-top:1px solid rgba(153,173,161,.12);font-size:11px;color:var(--ink-dim)}.saved-record-delete-confirm span{flex:1;min-width:0}.saved-record-delete-confirm button{min-width:44px;min-height:44px;padding:0 8px;border:0;border-radius:8px;background:none;color:var(--ink);font:inherit;cursor:pointer}.saved-record-delete-confirm [data-saved-delete-confirm]{color:#e3ab9b}.saved-record-delete-confirm button:hover{background:rgba(255,255,255,.05)}
.saved-archive-legacy{margin-top:18px}.saved-archive-legacy summary{display:flex;align-items:center;gap:8px;min-height:44px;color:var(--ink-dim);font-size:12px;cursor:pointer}.saved-archive-legacy summary::before{content:'›';font-size:18px;transition:transform .15s}.saved-archive-legacy[open] summary::before{transform:rotate(90deg)}.saved-archive-legacy>p{margin:0 0 10px;color:var(--ink-dim);font-size:11px;line-height:1.6}
.saved-archive-footer{display:flex;justify-content:flex-end;margin-top:14px}.saved-archive-footer .saved-clear-btn{min-height:44px;padding:8px 2px;border:0;background:none;color:#9daaa2;font:11px var(--sans);cursor:pointer}.saved-archive-footer .saved-clear-btn:hover{color:#e3ab9b}
.saved-archive-trigger:focus-visible,.saved-archive-list button:focus-visible,.saved-archive-footer button:focus-visible,.saved-archive-legacy summary:focus-visible{outline:2px solid #bdc9bf;outline-offset:-3px}
@media(min-width:640px){.modal.is-saved-picker{border-radius:22px}}
@media(max-width:800px){#savedCharts.saved-charts{margin:0 16px 16px}}
@media(max-width:640px){#savedCharts.saved-charts{margin-inline:12px}}
@media(prefers-reduced-motion:reduce){.saved-archive-trigger,.saved-archive-legacy summary::before{transition:none}}


/* Keep every mobile form above iOS's focus-zoom threshold, including dynamic dialogs. */
@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  input, select, textarea { font-size: 16px !important; }
}


/* 命盘咨询沿用全站账户，桌面侧栏与手机底部对话。 */
.result-consult-btn{min-height:38px;padding:8px 16px;border:1px solid var(--line-strong);border-radius:7px;background:rgba(18,24,32,.7);color:var(--ink-dim);font:500 12px/1.4 var(--sans);cursor:pointer;white-space:nowrap;transition:background .16s,border-color .16s,color .16s}.result-consult-btn span{margin-left:7px;font-size:10px;opacity:.7}.result-toolbar-save{flex-wrap:wrap}
html:has(body.ms-consult-open),body.ms-consult-open,body.ms-consult-open .ms-reader{overflow:hidden}
html:has(body.ms-consult-open),body.ms-consult-open,body.ms-consult-open .ms-reader{color-scheme:dark;scrollbar-width:thin;scrollbar-color:#496b73 #0b1519}
.ms-consult-dialog{--consult-line:#6bbbc12b;--consult-accent:#96dedc;--consult-muted:#9cb4bb;box-sizing:border-box;width:min(540px,100vw);max-width:100vw;height:100vh;height:100dvh;max-height:100dvh;margin:0 0 0 auto;padding:0;border:0;border-left:1px solid #49757d66;border-radius:0;background:#0b1519;color:#e5eeed;color-scheme:dark;box-shadow:-20px 0 80px #0008;overflow:hidden;font-family:var(--sans)}
.ms-consult-dialog::backdrop{background:#030a0eb8;backdrop-filter:blur(5px)}
.ms-consult-dialog[open]{animation:ms-consult-in var(--xq-motion-panel,220ms) var(--xq-ease-out,cubic-bezier(.2,.8,.2,1)) both}
.ms-consult-dialog.is-closing{animation:ms-consult-out var(--xq-motion-menu,180ms) ease-in both;pointer-events:none}
.ms-consult-dialog[open]::backdrop{animation:ms-consult-backdrop var(--xq-motion-panel,220ms) ease-out both}
.ms-consult-dialog [hidden]{display:none!important}
@keyframes ms-consult-in{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}
@keyframes ms-consult-out{from{opacity:1;transform:none}to{opacity:0;transform:translateX(12px)}}
@keyframes ms-consult-backdrop{from{opacity:0}to{opacity:1}}
.ms-consult-panel{display:flex;flex-direction:column;min-height:0;height:100%;box-sizing:border-box;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
.ms-consult-panel>header{position:relative;display:flex;flex:none;justify-content:space-between;align-items:center;gap:14px;padding:20px 24px 16px;border-bottom:1px solid var(--consult-line);background:#0d1a20}
.ms-consult-panel>header>div{position:relative;min-width:0}
.ms-consult-panel>header span{font:11px/1.5 var(--sans);letter-spacing:.03em;color:var(--consult-muted)}
.ms-consult-panel h2{display:flex;align-items:center;gap:10px;font-family:var(--sans);font-size:21px;font-weight:600;letter-spacing:0;line-height:1.4;margin:4px 0;color:#edf3ee}
.ms-consult-panel>header p{font-size:12px;line-height:1.7;color:var(--consult-muted);margin:0;overflow-wrap:anywhere}
.ms-consult-panel>header button{flex:none;min-height:44px;width:44px;background:#ffffff06;color:#b9cecf;border:0;border-radius:50%;font:26px/1 var(--sans);cursor:pointer}
.ms-consult-quota{flex:none;padding:10px 24px;font-size:12px;color:#b4b8aa;border-bottom:1px solid #75adb51c;background:#101c20;line-height:1.6;font-variant-numeric:tabular-nums}
.ms-consult-thread{position:relative;display:flex;flex:1;min-height:0}
.ms-consult-panel>[data-ms-consult-gate],.ms-consult-panel>[data-ms-consult-status]{flex:none}
.ms-consult-messages{flex:1;min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px;scroll-behavior:auto;scrollbar-gutter:stable;overflow-anchor:none}
.ms-consult-latest{position:absolute;right:20px;bottom:12px;min-height:44px;padding:8px 14px;border:1px solid #7c979245;border-radius:999px;background:#172c2b;color:#dce7e6;box-shadow:0 4px 18px #0004;font:500 12px/1.4 var(--sans);cursor:pointer}
.ms-consult-welcome{padding:14px 3px 8px}
.ms-consult-welcome>span{font-size:12px;letter-spacing:0;color:var(--consult-muted)}
.ms-consult-welcome h3{max-width:390px;font-family:var(--serif);font-size:24px;font-weight:400;line-height:1.6;letter-spacing:0;margin:10px 0;color:#e7eee9;text-wrap:balance}
.ms-consult-welcome p{font-size:14px;line-height:1.8;color:var(--consult-muted);text-wrap:pretty}
.ms-consult-welcome>div{display:grid;gap:4px;margin-top:20px}
.ms-consult-welcome button{display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:12px 10px;min-height:48px;background:transparent;border:0;border-bottom:1px solid #72b4bc20;border-radius:8px;color:#cfdedc;font:14px/1.6 var(--sans);cursor:pointer}
.ms-consult-welcome i{flex:none;font:18px/1 var(--sans);color:var(--consult-accent)}
.ms-consult-message{max-width:100%;margin:0 0 28px;font-size:15px;line-height:1.8;overflow-wrap:anywhere}
.ms-consult-message>span{display:flex;align-items:center;gap:8px;margin-bottom:8px;color:var(--consult-muted);font-size:12px;letter-spacing:0}
.ms-consult-message.is-assistant>span::before{content:'';width:6px;height:6px;border:1px solid #8fd1d3;transform:rotate(45deg)}
.ms-consult-message>div{padding:0;background:transparent;border:0;color:#dce7e6;white-space:pre-wrap}
.ms-consult-message.is-user{max-width:89%;margin-left:auto}
.ms-consult-message.is-user>span{justify-content:flex-end;color:#bfbca7}
.ms-consult-message.is-user>div{padding:12px 16px;background:#222a27;border-radius:16px 4px 16px 16px;color:#eeeade}
.ms-consult-thinking{display:flex;align-items:flex-start;gap:12px;min-height:66px;padding:8px 0;color:#c9dce0}
.ms-consult-thinking-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:5px;padding-top:3px}
[data-ms-consult-phase]{font:500 13px/1.65 var(--sans);color:#d4e2e6}
[data-ms-consult-context]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:38px;max-height:38px;font:12px/1.6 var(--sans);color:#9cb5c2;overflow-wrap:anywhere}
.ms-consult-breath{position:relative;display:inline-grid;place-items:center;flex:none;width:32px;height:32px}
.ms-consult-breath::before,.ms-consult-breath::after{content:'';position:absolute;display:block;border-radius:50%}
.ms-consult-breath::before{width:30px;height:30px;background:conic-gradient(from 35deg,#5bddcf9c,#8394f2a6,#e7c5768c,#5bddcf9c);filter:blur(5px);opacity:.55;transform:scale(.8)}
.ms-consult-breath::after{width:15px;height:15px;border:1px solid #c9ffef70;background:radial-gradient(circle at 28% 22%,#ddfff4 0%,#78e4dd 28%,#879cf0 65%,#dfbd7e 100%);box-shadow:0 0 8px #76dfe44d,inset 0 0 4px #eefaff33;opacity:.9}
.ms-consult-panel h2 .ms-consult-breath{width:22px;height:22px}.ms-consult-panel h2 .ms-consult-breath::before{width:20px;height:20px;filter:blur(3px)}.ms-consult-panel h2 .ms-consult-breath::after{width:9px;height:9px}
.ms-consult-dialog[open] .ms-consult-breath::before{animation:ms-consult-breathe-halo 2.6s ease-in-out infinite}
.ms-consult-dialog[open] .ms-consult-breath::after{animation:ms-consult-breathe-core 2.6s ease-in-out infinite}
@keyframes ms-consult-breathe-halo{0%,100%{opacity:.42;transform:scale(.78) rotate(-12deg)}50%{opacity:.85;transform:scale(1.08) rotate(16deg)}}
@keyframes ms-consult-breathe-core{0%,100%{opacity:.76;transform:scale(.9)}50%{opacity:1;transform:scale(1.04)}}
.ms-consult-compose{flex:none;padding:14px 20px 18px;border-top:1px solid var(--consult-line);background:#0e1c22}
.ms-consult-compose>.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ms-consult-compose textarea{display:block;box-sizing:border-box;width:100%;max-height:150px;min-height:80px;resize:vertical;background:#09151b;border:1px solid #7195a04d;border-radius:12px;color:#eaf3ef;caret-color:#d5c79f;font:16px/1.65 var(--sans);padding:12px 14px;outline:none;transition:border-color var(--xq-motion-fast,120ms),box-shadow var(--xq-motion-fast,120ms),background var(--xq-motion-fast,120ms)}
.ms-consult-dialog .ms-consult-compose textarea:focus{outline:none;border-color:#b1a77f;box-shadow:0 0 0 2px #c7bb9212;background:#0c181d}
.ms-consult-compose textarea::selection{background:#c7bb924d;color:#fff9e9}
.ms-consult-compose textarea::placeholder{color:#91a8b1;font-size:13px}
.ms-consult-compose textarea:disabled{color:#9aadb1;background:#0d191e;opacity:.7}
.ms-consult-compose>div{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:11px}
.ms-consult-compose>div>span{min-width:0;font-size:11px;line-height:1.6;color:#97acb4}
.ms-consult-compose button,.ms-consult-gate button{flex:none;min-height:44px;border:1px solid #bbe5dc;border-radius:9px;background:#a3d8cd;color:#102825;font:600 12px/1.4 var(--sans);padding:10px 18px;white-space:nowrap;cursor:pointer}
.ms-consult-dialog button{transition:background var(--xq-motion-fast,120ms),border-color var(--xq-motion-fast,120ms),color var(--xq-motion-fast,120ms)}
.ms-consult-dialog button:active:not(:disabled){background:#ffffff14}
.ms-consult-dialog button:focus-visible{outline:2px solid #b6eeea;outline-offset:3px}
.ms-consult-dialog button:disabled{opacity:.45;cursor:default}
.ms-consult-gate{flex:none;padding:12px 22px;border-top:1px solid #c6b48230;background:#21251e}
.ms-consult-gate p{font-size:12px;line-height:1.8;margin:0 0 10px;color:#d7d6bf}
.ms-consult-error{flex:none;color:#efbea6;font-size:12px;line-height:1.7;padding:11px 22px;border-top:1px solid #cdad6630;background:#201e1b}
.ms-consult-error button{display:block;margin-top:7px;color:#e5cf98;background:transparent;border:1px solid #c7b1774a;border-radius:7px;padding:9px 12px;min-height:44px;font:12px var(--sans);cursor:pointer}
.ms-consult-panel,.ms-consult-messages,.ms-consult-compose textarea{scrollbar-width:thin;scrollbar-color:#496b73 #0b1519}
html:has(body.ms-consult-open)::-webkit-scrollbar,body.ms-consult-open::-webkit-scrollbar,body.ms-consult-open .ms-reader::-webkit-scrollbar,.ms-consult-panel::-webkit-scrollbar,.ms-consult-messages::-webkit-scrollbar,.ms-consult-compose textarea::-webkit-scrollbar{width:8px;height:8px}
html:has(body.ms-consult-open)::-webkit-scrollbar-track,body.ms-consult-open::-webkit-scrollbar-track,body.ms-consult-open .ms-reader::-webkit-scrollbar-track,.ms-consult-panel::-webkit-scrollbar-track,.ms-consult-messages::-webkit-scrollbar-track,.ms-consult-compose textarea::-webkit-scrollbar-track{background:#0b1519}
html:has(body.ms-consult-open)::-webkit-scrollbar-thumb,body.ms-consult-open::-webkit-scrollbar-thumb,body.ms-consult-open .ms-reader::-webkit-scrollbar-thumb,.ms-consult-panel::-webkit-scrollbar-thumb,.ms-consult-messages::-webkit-scrollbar-thumb,.ms-consult-compose textarea::-webkit-scrollbar-thumb{background:#496b73;border:2px solid #0b1519;border-radius:10px}
html:has(body.ms-consult-open)::-webkit-scrollbar-thumb:hover,body.ms-consult-open::-webkit-scrollbar-thumb:hover,body.ms-consult-open .ms-reader::-webkit-scrollbar-thumb:hover,.ms-consult-panel::-webkit-scrollbar-thumb:hover,.ms-consult-messages::-webkit-scrollbar-thumb:hover,.ms-consult-compose textarea::-webkit-scrollbar-thumb:hover{background:#79a4aa}
.ms-consult-compose textarea::-webkit-scrollbar-corner{background:#0b1519}
@media(hover:hover){.ms-consult-panel>header button:hover,.ms-consult-welcome button:hover{background:#1b333b;border-color:#89c7ce73;color:#eff9f5}.ms-consult-compose button:hover:not(:disabled),.ms-consult-gate button:hover{background:#bde8dc;border-color:#d4f3eb}.ms-consult-error button:hover:not(:disabled){background:#c7b17712;border-color:#c7b17788}.ms-consult-messages:hover,.ms-consult-compose textarea:hover{scrollbar-color:#658c94 #0b1519}}
@media(max-width:600px){
  .ms-consult-dialog{width:100%;height:94vh;height:94dvh;max-height:100dvh;margin:auto 0 0;border:1px solid #49757d66;border-bottom:0;border-radius:20px 20px 0 0}
  .ms-consult-panel>header{padding:16px 18px 13px;gap:10px}.ms-consult-panel h2{font-size:20px;margin:4px 0}.ms-consult-panel>header p{font-size:12px}
  .ms-consult-quota{padding:9px 18px}.ms-consult-messages{padding:22px 18px}.ms-consult-message{margin-bottom:25px}.ms-consult-message.is-user>div{padding:12px 14px}
  .ms-consult-compose{padding:12px 14px 14px}.ms-consult-compose textarea{resize:none;min-height:78px}.ms-consult-welcome{padding:8px 0}.ms-consult-welcome h3{font-size:23px}.ms-consult-welcome button{padding:12px 8px}
  @keyframes ms-consult-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
  @keyframes ms-consult-out{from{opacity:1;transform:none}to{opacity:0;transform:translateY(12px)}}
  .ms-consult-gate,.ms-consult-error{padding:11px 15px}.result-consult-btn{min-height:44px;padding:8px 12px}.result-toolbar-save{gap:8px}
}
@media(max-height:560px){
  .ms-consult-dialog{height:100vh;height:100dvh;border-radius:0}.ms-consult-panel{overflow:auto;overscroll-behavior:contain}.ms-consult-panel>header{padding-top:12px;padding-bottom:12px}.ms-consult-panel h2{font-size:20px;margin:3px 0}.ms-consult-quota{padding-top:7px;padding-bottom:7px}
  .ms-consult-thread{flex:1 0 120px;min-height:120px}.ms-consult-messages{padding-top:15px;padding-bottom:15px}.ms-consult-compose{padding-top:10px;padding-bottom:10px}.ms-consult-compose textarea{height:66px;min-height:66px;max-height:100px}
}
@media(prefers-reduced-motion:reduce){.ms-consult-dialog[open],.ms-consult-dialog.is-closing,.ms-consult-dialog[open]::backdrop,.ms-consult-dialog[open] .ms-consult-breath::before,.ms-consult-dialog[open] .ms-consult-breath::after{animation:none}.ms-consult-messages{scroll-behavior:auto}.ms-consult-dialog button,.ms-consult-compose textarea{transition:none}}
@media(forced-colors:active){
  html:has(body.ms-consult-open),body.ms-consult-open,body.ms-consult-open .ms-reader,.ms-consult-panel,.ms-consult-messages,.ms-consult-compose textarea{scrollbar-color:auto;scrollbar-width:auto}
  .ms-consult-dialog,.ms-consult-panel>header,.ms-consult-compose,.ms-consult-compose textarea{box-shadow:none}.ms-consult-panel>header>div::before,.ms-consult-panel>header>div::after{display:none}.ms-consult-panel>header>div{padding-left:0}
  .ms-consult-dialog button:focus-visible,.ms-consult-dialog .ms-consult-compose textarea:focus{box-shadow:none;outline:2px solid Highlight;outline-offset:2px}.ms-consult-breath{color:CanvasText}.ms-consult-dialog[open] .ms-consult-breath::before,.ms-consult-dialog[open] .ms-consult-breath::after{animation:none;background:CanvasText}.ms-consult-breath::before{display:none}.ms-consult-breath::after{filter:none;box-shadow:none;border:1px solid CanvasText}
}
/* 翻页条直属阅读器，避开章节动画与正文高度。 */
.ms-reader.has-fixed-nav #mingshuReaderContent{box-sizing:border-box;padding-bottom:calc(76px + env(safe-area-inset-bottom));}
.ms-reader-nav{position:fixed;z-index:20;left:0;right:0;bottom:0;display:grid;grid-template-columns:minmax(0,700px) 112px;justify-content:center;align-items:center;gap:18px;box-sizing:border-box;min-height:76px;padding:12px max(18px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));background:#0d1715f7;border-top:1px solid #c6b27d33;box-shadow:0 -8px 24px #0003;backdrop-filter:blur(14px);}
.ms-reader-nav .ms-scene-controls{width:100%;margin:0;grid-template-columns:minmax(100px,1fr) minmax(86px,.7fr) minmax(100px,1fr);gap:14px;}
.ms-reader-consult{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:48px;padding:5px 10px;border:1px solid rgba(226,184,109,.32);border-radius:8px;background:#1b2822;color:#d8c381;font:400 13px/1.3 var(--sans);cursor:pointer;white-space:nowrap;transition:background .16s,border-color .16s,color .16s;}
.ms-reader-consult span{font-size:10px;font-weight:400;opacity:.8;}
.result-consult-btn:focus-visible,.ms-reader-consult:focus-visible{outline:2px solid var(--gold);outline-offset:3px;}
.result-consult-btn[aria-expanded="true"],.ms-reader-consult[aria-expanded="true"]{color:#eed79c;background:#c6b27d1c;border-color:#ceb57a66;box-shadow:inset 0 2px #ceb57a;}
@media(hover:hover){.result-consult-btn:hover:not([aria-expanded="true"]){color:var(--ink);background:rgba(226,184,109,.12);border-color:var(--gold);}.ms-reader-consult:hover:not([aria-expanded="true"]){background:rgba(226,184,109,.12);border-color:#e8c86a;}}
.ms-reader-nav.is-consult-only{grid-template-columns:112px;justify-content:end;}
.ms-reader-nav .ms-nav{height:48px;font-size:13px;background:#1b2822;}
.ms-reader-nav .ms-nav span{display:inline;}
.ms-reader-nav .ms-next{background:#ccb77d;color:#17231b;border-color:#ccb77d;}
.ms-reader-nav .ms-nav:hover:not(:disabled){transform:none;}
.ms-reader-nav .ms-nav:disabled{opacity:.32;}
.ms-reader-page{color:#b7bba8;font:12px/1.5 var(--sans);white-space:nowrap;font-variant-numeric:tabular-nums;}
@media(max-width:640px){
  .ms-reader .ms-cinema-header{grid-template-columns:minmax(0,1fr);gap:12px;}
  .ms-reader .ms-cinema-header > .ms-reader-heading{gap:12px;}
  .ms-reader .ms-cinema-header > .ms-cinema-header-actions{display:block;padding-top:12px;}
  .ms-reader .ms-cinema-header-actions .ms-cinema-live{display:none;}
  .ms-reader .ms-cinema-header .ms-reader-book-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;}
  .ms-reader .ms-reader-book-actions .ms-graph-toggle,.ms-reader .ms-reader-book-actions .ms-reader-action{width:100%;min-height:44px;padding:8px;font-size:12px;}
  .ms-reader .ms-reader-book-actions small{grid-column:1 / -1;text-align:left;}
  .ms-reader-nav{grid-template-columns:minmax(0,1fr) 84px;gap:8px;padding-left:max(13px,env(safe-area-inset-left));padding-right:max(13px,env(safe-area-inset-right));}
  .ms-reader-nav .ms-scene-controls{grid-template-columns:minmax(0,1fr) 60px minmax(0,1fr);gap:6px;}
  .ms-reader-nav .ms-nav{min-width:0;padding:0;font-size:11px;white-space:nowrap;}
  .ms-reader-nav .ms-reader-page{font-size:11px;}
  .ms-reader-consult{font-size:12px;padding:5px;}
}

.ms-wealth-profile{margin:18px 20px 26px;padding:24px;border:1px solid rgba(222,195,133,.2);border-radius:16px;background:#101818;color:#bec9c3}
.ms-wealth-profile header>span{color:#dec385;font-size:11px;letter-spacing:2px}.ms-wealth-profile h3{margin:9px 0 14px;color:#eadfbd;font-size:24px;font-weight:500}.ms-wealth-profile p{line-height:1.85;font-size:13px;margin:10px 0}
.ms-wealth-pillars{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}.ms-wealth-pillar{padding:15px;border:1px solid #2c3732;border-radius:10px;min-width:0}.ms-wealth-profile h4{font-size:14px;font-weight:500;color:#e4d8b5;margin:0 0 9px}.ms-wealth-profile small{font-size:11px;line-height:1.8;color:#91a398}.ms-wealth-pillar ul{list-style:none;padding:0;margin:14px 0 0}.ms-wealth-pillar li{display:grid;grid-template-columns:auto 1fr auto;gap:6px;align-items:center;padding:9px 0;border-top:1px solid #24302b;font-size:11px}.ms-wealth-pillar li strong{font-size:15px;color:#d6dece}.ms-wealth-pillar li em{font-style:normal;color:#9fc6b4}.ms-wealth-pillar li em.is-ji{color:#d5a89c}.ms-wealth-pillar li>small{grid-column:2/-1}
.ms-wealth-routes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0}.ms-wealth-routes article{padding:16px;background:#141f1b;border-radius:10px;border:1px solid #28362e;min-width:0}.ms-wealth-location{padding:10px 0;border-bottom:1px solid #2b3730}.ms-wealth-sources{font-size:12px;border-top:1px solid #2b3730;padding-top:15px}.ms-wealth-sources summary{cursor:pointer;color:#caba90;min-height:36px}.ms-wealth-sources a{display:inline-block;color:#b6cabd;margin:0 18px 10px 0}.ms-wealth-profile *{overflow-wrap:anywhere}
@media(max-width:700px){.ms-wealth-profile{margin:12px 10px 20px;padding:17px 13px}.ms-wealth-profile h3{font-size:21px}.ms-wealth-pillars{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ms-wealth-pillar{padding:12px 9px}.ms-wealth-pillar li{grid-template-columns:auto 1fr}.ms-wealth-pillar li em{grid-column:2}.ms-wealth-routes{grid-template-columns:1fr}}

.ms-health-reference{color:#c6d2d3;font-size:13px;line-height:1.7}.ms-health-reference h3{margin:8px 0;color:#ead19c;font-size:18px;font-weight:500}.ms-health-reference p{margin:8px 0}.ms-health-reference header>span,.ms-health-note,.ms-health-hour small,.ms-health-sources{color:#92a7a6;font-size:11px}.ms-health-elements{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:16px 0}.ms-health-element{border:1px solid #354442;border-radius:10px;padding:12px;background:#14201f;min-width:0}.ms-health-element-head{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.ms-health-element-head strong{font-size:20px;color:#e3cd9a}.ms-health-element-head b{font-size:14px;font-variant-numeric:tabular-nums}.ms-health-element-head>span{font-size:10px;padding:1px 6px;border:1px solid #59604d;border-radius:20px}.ms-health-element small{font-size:10px;color:#96a9a7}.ms-health-meter{height:3px;border-radius:3px;overflow:hidden;background:#293735;margin:10px 0}.ms-health-meter i{height:100%;display:block;background:#b8c9b8}.ms-health-clock-head{display:flex;gap:12px;justify-content:space-between;align-items:center;margin-top:25px}.ms-health-clock-head>span{font-size:11px;white-space:nowrap;color:#cfbd90}.ms-health-clock{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;margin:12px 0}.ms-health-hour{padding:10px;border:1px solid #2c3b3a;border-radius:8px;display:flex;flex-direction:column;gap:3px;min-width:0}.ms-health-hour>strong{display:flex;justify-content:space-between;align-items:center}.ms-health-hour>span{font-size:10px;font-variant-numeric:tabular-nums}.ms-health-hour>b{font-weight:400}.ms-health-hour em{font-style:normal;font-size:9px;color:#dfc88d}.ms-health-hour.is-current{border-color:#c5aa69;background:#242a22}.ms-health-star-notes{margin-top:16px;border-top:1px solid #2c3b3a;padding-top:12px;font-size:12px}.ms-health-star-notes summary{cursor:pointer;color:#b8c6c2}.ms-health-sources a{color:inherit;text-decoration:underline;text-underline-offset:3px}@media(max-width:720px){.ms-health-elements{grid-template-columns:repeat(2,minmax(0,1fr))}.ms-health-clock{grid-template-columns:repeat(3,minmax(0,1fr))}.ms-health-clock-head{display:block}.ms-health-element:last-child{grid-column:1/-1}.ms-health-reference h3{font-size:16px}}
.ms-health-favorable{margin:14px 0;padding:12px 14px;border-left:2px solid #c6b57d;background:#202a24}.ms-health-favorable strong{color:#ddcc94;font-weight:500}.ms-health-favorable small{color:#a1b0a7;font-size:11px}.ms-health-hour.is-favorable{background:#1b2822}.ms-health-hour.is-favorable small{color:#c5ca96}

.ms-health-reference{margin:18px 20px 26px;padding:24px;border:1px solid rgba(222,195,133,.2);border-radius:16px;background:#101818}.ms-health-reference *{overflow-wrap:anywhere}@media(max-width:700px){.ms-health-reference{margin:12px 10px 20px;padding:17px 13px}}

/* Daily reading shares the current chart; its score stays separate from book generation. */
.result-daily-btn{appearance:none;min-height:42px;padding:8px 13px;border:1px solid #bda268;border-radius:8px;background:rgba(213,181,117,.1);color:var(--gold);font:600 12px/1.4 var(--sans);white-space:nowrap;cursor:pointer}
.result-daily-btn:hover{background:rgba(213,181,117,.2)}
.result-daily-btn:focus-visible,.ms-daily button:focus-visible,.ms-daily a:focus-visible,.ms-daily summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.ms-daily{max-width:1120px;margin:0 auto;color:var(--ink);--daily-line:rgba(209,181,123,.22)}
.ms-daily-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:10px 0 20px}
.ms-daily-kicker{font:10px/1.5 var(--sans);color:var(--gold);letter-spacing:2.5px}
.ms-daily h2{font:500 30px/1.4 var(--serif);margin:7px 0;color:var(--gold-soft,var(--gold))}
.ms-daily-date{font-size:12px;line-height:1.8;color:var(--ink-dim)}
.ms-daily button{min-height:40px;border:1px solid var(--daily-line);padding:8px 13px;border-radius:7px;background:rgba(255,255,255,.02);color:var(--gold);font:12px/1.4 var(--sans);cursor:pointer;white-space:nowrap}
.ms-daily-hero{display:grid;grid-template-columns:192px minmax(0,1fr);gap:32px;align-items:center;border:1px solid var(--daily-line);border-radius:16px;padding:30px;background:linear-gradient(120deg,rgba(203,171,105,.09),rgba(20,29,38,.38));overflow:hidden}
.ms-daily-score{position:relative;width:176px;height:176px;display:grid;place-content:center;text-align:center}
.ms-daily-score svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.ms-daily-score circle{fill:none;stroke-width:3;stroke:rgba(203,171,105,.15)}
.ms-daily-score .ms-daily-ring{stroke:#d7bb7b;stroke-linecap:round}
.ms-daily-score strong{font:500 56px/1.15 var(--serif);color:#f2d699;font-variant-numeric:tabular-nums}
.ms-daily-score small{font-size:11px;line-height:1.8;color:var(--ink-dim)}
.ms-daily-summary{min-width:0}.ms-daily-summary h3{font:500 25px/1.5 var(--serif);margin:6px 0 10px;color:var(--ink)}
.ms-daily-summary p{font-size:13px;line-height:1.95;color:var(--ink-dim);overflow-wrap:anywhere}
.ms-daily-tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.ms-daily-tags span{font-size:11px;padding:5px 9px;border:1px solid var(--daily-line);border-radius:5px;color:var(--gold-soft,var(--gold))}
.ms-daily-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.ms-daily-metric{border:1px solid var(--line);border-radius:12px;background:rgba(22,29,39,.62);padding:18px;min-width:0}
.ms-daily-metric>header{display:flex;justify-content:space-between;gap:8px;align-items:center}.ms-daily-metric h3{font-size:13px;font-weight:500;color:var(--ink)}
.ms-daily-metric strong{font:400 27px/1.2 var(--serif);color:var(--gold-soft,var(--gold));font-variant-numeric:tabular-nums}
.ms-daily-meter{height:3px;background:var(--line);margin:13px 0;border-radius:3px;overflow:hidden}.ms-daily-meter span{display:block;height:100%;background:#bda268;border-radius:3px}
.ms-daily-metric p{font-size:12px;line-height:1.85;color:var(--ink-dim);overflow-wrap:anywhere}
.ms-daily-calendar{border:1px solid var(--daily-line);border-radius:12px;overflow:hidden;background:rgba(16,23,31,.62)}
.ms-daily-calendar>header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px;border-bottom:1px solid var(--daily-line)}
.ms-daily-calendar h3{font:500 20px/1.5 var(--serif);color:var(--gold-soft,var(--gold))}.ms-daily-calendar p{font-size:12px;color:var(--ink-dim);line-height:1.8;margin-top:5px}
.ms-daily-calendar a{font-size:12px;color:var(--gold);text-decoration:none;min-height:40px;display:inline-flex;align-items:center;white-space:nowrap}
.ms-daily-almanac{min-width:0;padding:0 20px 12px}.ms-daily-almanac .ms-daily-calendar-meta{padding:16px 0}.ms-daily-almanac-status{padding:18px 20px;color:var(--ink-dim);font-size:13px;line-height:1.8}.ms-daily-almanac-status button{margin-top:12px}.ms-daily-calendar-meta{display:flex;flex-wrap:wrap;gap:8px 22px;padding:16px 20px;font-size:12px;line-height:1.7;color:var(--ink-dim);border-bottom:1px solid var(--line)}
.ms-daily-yiji{display:grid;grid-template-columns:1fr 1fr}.ms-daily-yiji>div{padding:18px 20px}.ms-daily-yiji>div+div{border-left:1px solid var(--line)}
.ms-daily-yiji h4{font:500 17px/1.4 var(--serif);color:#a9c9bd}.ms-daily-yiji>div+div h4{color:#d5b28f}
.ms-daily-yiji ul{display:flex;gap:8px;flex-wrap:wrap;list-style:none;margin-top:12px}.ms-daily-yiji li{font-size:12px;line-height:1.6;color:var(--ink-dim);padding:4px 9px;background:rgba(255,255,255,.035);border-radius:4px}
.ms-daily-note{font-size:11px;line-height:1.8;color:var(--muted);margin:15px 2px}
.ms-daily-basis{border-top:1px solid var(--line);padding-top:6px;margin-top:20px}.ms-daily-basis summary{cursor:pointer;min-height:44px;line-height:44px;color:var(--gold);font-size:12px}
.ms-daily-basis ol{list-style:none;border:1px solid var(--line);border-radius:8px;overflow:hidden}.ms-daily-basis li{display:flex;justify-content:space-between;gap:18px;padding:12px 15px;font-size:12px;line-height:1.8;color:var(--ink-dim)}.ms-daily-basis li+li{border-top:1px solid var(--line)}.ms-daily-basis b{color:var(--gold);white-space:nowrap;font-variant-numeric:tabular-nums}
.ms-daily-empty{padding:30px 20px;border:1px solid var(--daily-line);border-radius:12px}.ms-daily-empty p{font-size:13px;line-height:1.9;color:var(--ink-dim);margin-bottom:16px}
@media(max-width:820px){.ms-daily-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ms-daily-hero{grid-template-columns:155px minmax(0,1fr);gap:20px;padding:24px}.ms-daily-score{width:146px;height:146px}.ms-daily-score strong{font-size:47px}}
@media(max-width:600px){.result-toolbar{flex-wrap:wrap}.result-toolbar-save{flex:1 1 100%;justify-content:flex-start}.result-daily-btn{flex:1}.ms-daily-head{gap:10px;margin-top:12px}.ms-daily h2{font-size:25px}.ms-daily-hero{grid-template-columns:1fr;padding:23px 20px;gap:17px}.ms-daily-score{margin:auto}.ms-daily-summary h3{font-size:22px}.ms-daily-summary p{font-size:13px}.ms-daily-grid{gap:10px}.ms-daily-metric{padding:14px 12px}.ms-daily-metric p{font-size:12px}.ms-daily-calendar>header{padding:16px;gap:10px}.ms-daily-calendar h3{font-size:18px}.ms-daily-calendar-meta{padding:14px 16px}.ms-daily-almanac{padding-inline:16px}.ms-daily-almanac .ms-daily-calendar-meta{padding:14px 0}.ms-daily-yiji>div{padding:16px 12px}.ms-daily-yiji{grid-template-columns:1fr}.ms-daily-yiji>div+div{border-left:0;border-top:1px solid var(--line)}}


/* Complete star coverage lives beside the prose, without forcing every cycle into the story. */
.ms-star-chapter{margin:28px 0 15px;border:1px solid #bfa56845;border-radius:12px;padding:0 16px;background:#0c141ac4;font-size:13px;line-height:1.8}
.ms-star-chapter>summary{min-height:48px;padding:12px 0;color:#e3c77f;cursor:pointer;font-weight:500}
.ms-star-timeline{font-size:13px;line-height:1.8;overflow-wrap:anywhere}
.ms-star-note,.ms-star-record-body .ms-star-note{color:#9aacae;font-size:12px;line-height:1.8;margin:12px 0}
.ms-star-record{border-top:1px solid #92a09d33;margin:0}
.ms-star-record>summary{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:15px 0;cursor:pointer;list-style:none;min-height:64px;color:#dce3d9}
.ms-star-record>summary::-webkit-details-marker{display:none}
.ms-star-record>summary:after{content:'+';color:#ceb478;flex:none;font:20px/1.4 sans-serif}
.ms-star-record[open]>summary:after{content:'−'}
.ms-star-record>summary>span:first-child{min-width:90px;flex:1}
.ms-star-record b{font-weight:500}.ms-star-record>summary b{font-size:15px;color:#e6cc90}
.ms-star-record small{display:block;color:#99abae;font-size:11px;line-height:1.6}
.ms-star-record-range{flex:2;text-align:right;font-size:12px;max-width:65%}
.ms-star-record-body{padding:0 0 17px;overflow-wrap:anywhere}
.ms-star-record-body p{font-size:13px;line-height:1.9;margin:8px 0;color:#becacc}
.ms-star-record-body .ms-star-scope{color:#d4bc87;font-size:12px}
.ms-star-record-body .ms-star-source{font-size:11px;color:#91a3a9;border-top:1px dashed #9aa9a32e;padding-top:10px}
.ms-star-windows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;list-style:none;padding:0;margin:15px 0}
.ms-star-windows li{background:#ffffff04;border:1px solid #98aaa22a;border-radius:7px;padding:11px;min-width:0}
.ms-star-windows li>b{font:500 13px/1.6 var(--sans);color:#dac596}
.ms-star-windows li>p{font-size:11px;line-height:1.8;margin:6px 0}
.ms-star-windows small{font-size:10px;line-height:1.8;color:#9bb4ad}
.ms-star-filter{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #bfa56845}
.ms-star-filter label{color:#d4bc87;flex:none}.ms-star-filter select{min-height:42px;font:16px var(--sans);border:1px solid #bfa56855;background:#101923;color:#dfd8c6;border-radius:6px;padding:6px 10px;width:min(210px,70%)}
.ms-star-chapter>.ms-reader-action{margin:12px 0 18px}
.ms-star-chapter summary:focus-visible,.ms-star-timeline summary:focus-visible{outline:2px solid #d4bc87;outline-offset:2px}
@media(max-width:600px){.ms-star-chapter{padding:0 12px}.ms-star-windows{grid-template-columns:1fr}.ms-star-record>summary{gap:8px}.ms-star-record>summary>span:first-child{min-width:70px}.ms-star-record-range{max-width:60%}.ms-star-record>summary b{font-size:14px}}

.ssd-attribution{margin:12px 0 16px}
.ssd-attribution .ssd-pillars{grid-template-columns:repeat(3,minmax(0,1fr))}
.ssd-attribution .ssd-dq-val{display:block;font:500 23px/1.5 var(--serif);padding-top:7px;overflow-wrap:anywhere}
.ssd-attribution-note{margin:7px 0 0;font-size:12px;line-height:1.7;color:var(--muted);overflow-wrap:anywhere}
.ssd-attribution-note strong{color:var(--ink);font-weight:500}

/* One chart navigation: top tabs on desktop, a thumb-friendly dock on phones. */
@keyframes ms-chart-menu-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media(prefers-reduced-motion:reduce){#result > .tabs .tabs-secondary{animation:none;}#result > .tabs button{transition:none;transform:none!important;}}
@media(min-width:641px){
  #tab-control-mingshu{order:0}#tab-control-daily{order:1}#tab-control-mingpan{order:2}#tab-control-jiben{order:3}
  #tab-control-xipan{order:4}#tab-control-dayun{order:5}#tab-control-tishi{order:6}#tab-control-hepan{order:7}
}
@media (max-width:640px) {
  #result { padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
  #result > .tabs {
    position:fixed; inset:auto max(10px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left)); z-index:50; display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px;
    box-sizing:border-box; width:auto; min-width:0; max-width:520px; margin:0 auto;
    padding:5px;
    overflow:visible; border:0; border-radius:24px;
    background:#1a2421ee; box-shadow:0 8px 28px #0005;
    backdrop-filter:blur(22px); -webkit-backdrop-filter:blur(22px);
  }
  #result > .tabs::after { display:none; }
  #result > .tabs .tab, #result > .tabs .tabs-mobile-control {
    display:flex; align-items:center; justify-content:center; box-sizing:border-box;
    min-width:0; min-height:48px; margin:0; padding:6px 3px;
    border:0; border-radius:8px; font:500 12px/1.4 var(--sans); letter-spacing:0;
    color:#a8b5af; background:transparent; white-space:normal; cursor:pointer; box-shadow:none;
    transition:color 140ms ease,background-color 140ms ease,transform 120ms ease;
  }
  #result > .tabs > .tab, #result > .tabs > .tabs-mobile-control { flex-direction:column; gap:4px; min-height:54px; padding:6px 2px; border-radius:19px; font-size:11px; }
  #result > .tabs .tabs-icon { display:block; width:20px; height:20px; flex:none; pointer-events:none; }
  #result > .tabs > :is(.tab,.tabs-mobile-control):is(.active,[aria-expanded="true"]) { color:#eee5cf; background:#ffffff0d; box-shadow:none; font-weight:600; }
  #result > .tabs > :is(.tab,.tabs-mobile-control):is(.active,[aria-expanded="true"]) .tabs-icon { stroke-width:1.9; }
  #result > .tabs > button:active { transform:scale(.97); }
  @media(hover:hover){#result > .tabs button:not(.active):not([aria-expanded="true"]):hover{color:var(--ink);background:rgba(115,183,173,.05);}}
  #result > .tabs button:focus-visible { outline:2px solid #c7d4cc; outline-offset:-3px; }
  #result > .tabs .tabs-secondary {
    display:none; position:absolute; right:0; bottom:calc(100% + 10px);
    box-sizing:border-box; width:min(224px,calc(100vw - 20px)); grid-template-columns:1fr; gap:0; padding:5px;
    border:1px solid #ffffff0d; border-radius:18px; background:#1a2421f7; box-shadow:0 8px 32px #0005;
    max-height:calc(100dvh - 150px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow:auto; overscroll-behavior:contain;
    transform-origin:bottom right; animation:ms-chart-menu-in var(--xq-motion-menu,180ms) var(--xq-ease-out,cubic-bezier(.2,.8,.2,1));
  }
  #result > .tabs.is-expanded .tabs-secondary { display:grid; }
  #result > .tabs .tabs-secondary .tab { justify-content:space-between; min-height:44px; margin:0; padding:10px 13px; border:0; border-radius:12px; background:transparent; text-align:left; box-shadow:none; }
  #result > .tabs .tabs-secondary .tab + .tab { border:0; }
  #result > .tabs .tabs-secondary .tab.active { color:#eee5cf; background:#ffffff0d; font-weight:600; }
  #result > .tabs .tabs-secondary .tab.active::after { content:"✓"; margin-left:12px; font:500 14px/1 var(--sans); }
  body.ms-reader-open #result > .tabs, body.ms-consult-open #result > .tabs, body.ms-keyboard-open #result > .tabs { display:none; }
  #btnConsult, #btnDailyFortune { display:none; }
  .tabpage { scroll-margin-top:12px; }
  /* Keep chart actions on one quiet row; feedback uses space only when present. */
  #result > .result-toolbar {
    display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
    gap:4px 8px; min-height:44px; margin:8px 12px 0;
  }
  #result > .result-toolbar .result-toolbar-save { display:contents; }
  #result > .result-toolbar :is(.result-home-btn,.result-save-btn) {
    display:inline-flex; align-items:center; justify-content:center; justify-self:start;
    box-sizing:border-box; min-width:0; min-height:44px; padding:0 8px;
    border:0; border-radius:8px; background:transparent; color:var(--ink-dim);
    font:500 12px/1.4 var(--sans); letter-spacing:0; white-space:nowrap;
  }
  #result > .result-toolbar .result-save-btn { justify-self:end; }
  #result > .result-toolbar :is(.result-home-btn,.result-save-btn):hover {
    color:var(--gold-soft); background:rgba(226,184,109,.07);
  }
  #result > .result-toolbar .result-save-status {
    grid-column:1/-1; width:auto; max-width:none; padding:0 8px;
    overflow:visible; white-space:normal; overflow-wrap:anywhere;
    font-size:11px; line-height:1.6;
  }
  #result > .result-toolbar .result-save-status:empty { display:none; }
}
@media(max-width:600px){.ssd-attribution .ssd-pillars{grid-template-columns:1fr}.ssd-attribution .ssd-pillar{display:flex;align-items:center;justify-content:space-between;gap:12px}.ssd-attribution .ssd-pillar-head{border:0;margin:0;padding:0}.ssd-attribution .ssd-dq-val{padding:0;font-size:22px}.ssd-attribution .ssd-pillar-name{white-space:normal}}

/* Verified passages stay readable without opening the source disclosure. */
.classics-intro,.classic-reading,.classics-empty,.classics-legacy { max-width:960px; margin-inline:auto; }
.classics-kicker { color:var(--gold-soft); font:11px/1.6 var(--sans); letter-spacing:1px; }
.classics-intro h2 { margin:10px 0 14px; color:var(--ink); font:500 25px/1.5 var(--serif); }
.classics-intro p,.classics-empty p { margin:10px 0; font-size:14px; line-height:1.9; }
.classics-intro .classics-scope { color:var(--muted); font-size:12px; }
.classics-intro small { display:block; color:var(--ink-dim); font-size:11px; line-height:1.8; }
.classic-reading { padding:26px; }
.classic-reading header { padding-bottom:17px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.classic-reading h3 { margin:8px 0 5px; font:500 23px/1.5 var(--serif); color:var(--gold-soft); }
.classic-reading header p { margin:0; color:var(--ink-dim); font-size:12px; }
.classic-reading h4 { margin:0 0 10px; font:600 12px/1.6 var(--sans); color:var(--muted); }
.classic-reading section { margin:20px 0; }
.classic-reading blockquote { margin:0; padding:17px 19px; border-left:2px solid var(--gold); border-radius:0 8px 8px 0; background:rgba(207,182,121,.065); color:var(--gold-soft); font:400 18px/1.95 var(--serif); }
.classic-reading section p { margin:0; color:var(--ink); font-size:15px; line-height:1.95; }
.classic-reading .classic-match { padding:15px 17px; border:1px solid var(--line); border-radius:8px; background:rgba(115,183,173,.035); }
.classic-match h4 { color:#a9c5b9; }
.classic-reading .classic-match p { font-size:13px; color:var(--muted); }
.classic-citation { border-top:1px solid var(--line); margin-top:22px; padding-top:9px; }
.classic-citation summary,.classics-legacy > summary,.classic-legacy-book > summary { min-height:44px; padding:10px 0; cursor:pointer; font-size:13px; line-height:1.8; color:var(--gold-soft); }
.classic-citation p,.classics-legacy-note { font-size:12px; line-height:1.9; color:var(--muted); }
.classic-citation a { display:inline-flex; align-items:center; min-height:44px; color:var(--gold-soft); font-size:13px; text-underline-offset:4px; }
.classic-reading p,.classic-reading blockquote,.classics-legacy p { white-space:pre-line; overflow-wrap:anywhere; }
.classic-legacy-book { border-top:1px solid var(--line); }
.classic-legacy-book section { padding:10px 0; }
.classic-legacy-book h4 { margin:0 0 8px; color:var(--muted); font-size:13px; }
.classic-legacy-book p { margin:0; font-size:13px; line-height:1.9; color:var(--ink-dim); }
.classic-citation summary:focus-visible,.classic-citation a:focus-visible,.classics-legacy summary:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
@media(max-width:640px){.classic-reading{padding:18px 16px}.classics-intro h2{font-size:23px}.classic-reading h3{font-size:22px}.classic-reading blockquote{padding:14px;font-size:17px}.classic-reading .classic-match{padding:13px}.classic-reading header{margin-bottom:18px}}

/* Chart detail pages: shared quiet surfaces, readable type, unchanged element colors. */
.chart-detail-page{--card:#141b20;--card2:#1b242a;--bg2:#10171b;--line:#2b353d;--ink-dim:#bdc6ce;--ink-faint:#9ca9b5;--muted:#9ca9b5;--gold:#dfc68e;--gold-soft:#e3d3ad;--gold-dim:#8f7b53;font-size:14px;line-height:1.8}
.chart-detail-page .card{padding:20px;border-radius:16px;box-shadow:none;margin-bottom:16px}
.chart-detail-page .card-compact{padding:14px 18px}
.chart-detail-page .compact-reference-card{padding:0}
.chart-detail-page .card-title{font:600 16px/1.5 var(--sans);letter-spacing:0;color:var(--ink);gap:10px;flex-wrap:wrap;margin-bottom:16px}
.chart-detail-page .card-title::before{display:none}
.chart-detail-page .card-title .src{font-size:11.5px;line-height:1.7;letter-spacing:0;max-width:100%;overflow-wrap:anywhere}
.chart-detail-page :is(.tip-block,.ny-desc,.strength-desc,.yongshen-reason,.tg-desc,.dyd-p,.poem,.book-text,.case-text,.year-impact-explain,.ev-text,.lyn-reading p){font-size:14px;line-height:1.85}
.chart-detail-page .info-line{padding:11px 0;font-size:14px;border-bottom-style:solid;gap:18px;align-items:baseline}
.chart-detail-page .info-line .v{font-family:var(--sans);letter-spacing:0;line-height:1.8}
.chart-detail-page .info-line .k{font-size:12px}
.chart-detail-page .info-line .k-src{font-size:10.5px;line-height:1.7}
.chart-detail-page .info-disclosure>summary{padding:16px 18px;min-height:52px}
.chart-detail-page .ss-toolbar{padding:0;border:0;background:none;gap:8px}
.chart-detail-page .pan-scroll{border-radius:14px}
.chart-detail-page .pan-table{font-size:12px;background:var(--card)}
.chart-detail-page .pan-table :is(th,td){padding:10px 3px}
.chart-detail-page .pan-table .col-head{font:600 13px/1.5 var(--sans);color:var(--ink-dim);letter-spacing:0;padding:12px 3px}
.chart-detail-page .pan-table :is(.ss,.small,.cang){font-size:12px;line-height:1.75}
.chart-detail-page .pan-table .cang-ss{font-size:10.5px}
.chart-detail-page .pan-table .ss-tag{max-width:100%;font-size:11px;padding:3px 5px;line-height:1.6;white-space:normal}
.chart-detail-page :is(.ss-tag,.dy-card,.dyc-chip,.ln-cell,.dayun-year-card,.lm-cell){transition:background var(--xq-motion-fast,120ms),border-color var(--xq-motion-fast,120ms),color var(--xq-motion-fast,120ms);box-shadow:none}
.chart-detail-page :is(.ss-tag,.dy-card,.dyc-chip,.ln-cell,.lm-cell):hover{transform:none}
.chart-detail-page :is(.dyc-chip,.ln-cell,.dayun-year-card).active{background:rgba(223,198,142,.08);border-color:var(--gold-dim);box-shadow:inset 0 0 0 1px rgba(223,198,142,.14)}
.chart-detail-page .dyc-chip{padding:12px 15px;border-radius:12px}
.chart-detail-page .ln-cell{padding:10px 5px;border-radius:10px}
.chart-detail-page .dayun-year-card{min-height:90px;border-radius:10px}
.chart-detail-page :is(.dyc-age,.ln-ss,.dayun-year-age){font-size:11px}
.chart-detail-page :is(.dayun-year-top,.ln-year){font-size:12px;font-variant-numeric:tabular-nums}
.chart-detail-page :is(button,summary):focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.chart-detail-page .year-stars-summary{border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;padding:0 0 14px;margin-bottom:16px}
.chart-detail-page .year-stars-summary :is(span,em){font-size:12px}
.chart-detail-page .year-star-tags .ss-tag{min-height:40px;padding:9px 12px;border-radius:9px}
.chart-detail-page .year-star-group-head span,.chart-detail-page .year-star-divider span{font-size:12px;letter-spacing:0}
.chart-detail-page .ts12-cell{padding:10px 3px;min-height:64px;border-radius:10px}
.chart-detail-page .year-impact-map{background:var(--bg2);border-color:var(--line)}
.chart-detail-page .impact-core{border-radius:20px;background:rgba(223,198,142,.035);border-color:rgba(223,198,142,.35);box-shadow:none}
.chart-detail-page .impact-source{background:var(--card);box-shadow:none}
.chart-detail-page .impact-source p{font-size:11px;line-height:1.75}
.chart-detail-page .impact-source-status strong{font-size:12px;line-height:1.6}
.chart-detail-page .impact-core-role{font-size:10px;letter-spacing:0}
.chart-detail-page .year-impact-foot{font-size:11px;line-height:1.8;background:none}
/* All twelve Jie months remain in view; no clipped horizontal carousel. */
.chart-detail-page .flow-month-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.chart-detail-page .flow-month-head>div>span{font-size:11px;color:var(--muted);letter-spacing:.6px}
.chart-detail-page .flow-month-head h2{font:600 18px/1.5 var(--sans);color:var(--ink);margin:3px 0 0}
.chart-detail-page .flow-month-convention{font-size:11px;color:var(--muted);text-align:right}
.chart-detail-page .lm-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:5px;min-width:0}
.chart-detail-page .lm-cell{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:64px;margin:0;padding:10px 2px;border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--ink);font-family:var(--sans);cursor:pointer}
.chart-detail-page .lm-cell.current{border-color:var(--line)}
.chart-detail-page .lm-cell.current::after{content:"";position:absolute;top:3px;right:3px;width:3px;height:3px;border-radius:50%;background:var(--gold)}
.chart-detail-page .lm-cell.active{background:rgba(223,198,142,.085);border-color:var(--gold-dim);box-shadow:inset 0 0 0 1px rgba(223,198,142,.16)}
.chart-detail-page .lm-month{font-size:11px;line-height:1.4;color:var(--ink-faint);font-variant-numeric:tabular-nums}
.chart-detail-page .lm-month i{font-style:normal;color:var(--gold);font-size:10px}
.chart-detail-page .lm-gz{font:700 17px/1.2 var(--serif);letter-spacing:0}
.chart-detail-page .lm-date{display:none}
.chart-detail-page .flow-month-detail{margin-top:19px;padding-top:18px;border-top:1px solid var(--line)}
.chart-detail-page .flow-month-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.chart-detail-page .flow-month-heading h3{display:flex;align-items:baseline;gap:3px;margin:0;font:500 27px/1.5 var(--serif)}
.chart-detail-page .flow-month-heading h3>span:last-child{margin-left:9px;color:var(--ink-dim);font:400 13px/1.7 var(--sans)}
.chart-detail-page .flow-month-heading>span{font-size:11px;color:var(--muted)}
.chart-detail-page .flow-month-range{margin:9px 0 17px;color:var(--ink-dim);font-size:12px;line-height:1.8;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.chart-detail-page .flow-month-range>span{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.chart-detail-page .flow-month-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px 12px;margin:0;padding:15px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.chart-detail-page .flow-month-facts dt{font-size:11px;color:var(--muted);margin-bottom:4px}
.chart-detail-page .flow-month-facts dd{margin:0;font-size:14px;line-height:1.7;color:var(--ink)}
.chart-detail-page .flow-month-reading{padding-top:12px}
.chart-detail-page .flow-month-reading p{margin:7px 0;color:var(--ink-dim);font-size:13px;line-height:1.85;overflow-wrap:anywhere}
.chart-detail-page .flow-month-reading p>span:first-child{display:inline-block;margin-right:12px;color:var(--muted);font-size:11px}
@media(hover:hover){.chart-detail-page .lm-cell:hover{background:rgba(255,255,255,.035);border-color:var(--gold-dim)}}
@media(max-width:640px){
 .chart-detail-page .card{padding:17px 14px;border-radius:14px}.chart-detail-page .card-compact{padding:12px 14px}.chart-detail-page .compact-reference-card{padding:0}
 .chart-detail-page .card-title{font-size:15px;gap:6px 10px;margin-bottom:14px}.chart-detail-page .card-title .src{flex-basis:100%;margin-left:0;font-size:11px}
 .chart-detail-page .info-line{gap:12px}.chart-detail-page .info-line .k{max-width:40%}.chart-detail-page .info-line .v{font-size:13px}
 .chart-detail-page .pan-table :is(th,td){padding:9px 2px}.chart-detail-page .pan-table :is(.ss,.small,.cang){font-size:11px}.chart-detail-page .pan-table .cang-ss{font-size:10px}.chart-detail-page .pan-table .ss-tag{font-size:10.5px;padding:3px}
 .chart-detail-page .lm-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:2px}.chart-detail-page .lm-cell{min-height:68px;padding:8px 0;border-radius:6px}.chart-detail-page .lm-gz{display:flex;flex-direction:column;gap:1px;font-size:16px;line-height:1.15}.chart-detail-page .lm-month{font-size:10px}
 .chart-detail-page .flow-month-head{margin-bottom:15px}.chart-detail-page .flow-month-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.chart-detail-page .flow-month-heading>span{font-size:10.5px}
 .chart-detail-page .year-stars-summary em{font-size:11px}.chart-detail-page .year-star-tags .ss-tag{min-height:40px;padding:8px 10px;font-size:12px}
 /* Keep source positions and directional arrows, with the core above both sources on narrow screens. */
 .chart-detail-page .year-impact-stage{grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr);gap:10px 4px;padding:14px 10px}
 .chart-detail-page .impact-core{grid-column:1/-1;grid-row:1;min-height:0;padding:14px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:center;border-radius:12px}
 .chart-detail-page .impact-core>span,.chart-detail-page .impact-core>strong{font-size:12px;letter-spacing:0}.chart-detail-page .impact-core>b{font-size:34px;margin:0}.chart-detail-page .impact-core-roles{flex-basis:100%;gap:5px;margin:2px 0 0}.chart-detail-page .impact-core-role{font-size:10px;padding:3px 7px}
 .chart-detail-page .impact-source-stem{grid-column:1;grid-row:3}.chart-detail-page .impact-source-branch{grid-column:3;grid-row:3}
 .chart-detail-page .impact-link{grid-row:2;min-height:50px}.chart-detail-page .impact-link:nth-child(2){grid-column:1}.chart-detail-page .impact-link:nth-child(4){grid-column:3}
 .chart-detail-page .impact-link::before{left:50%;right:auto;top:-8px;bottom:-8px;width:1px;height:auto;background:var(--line)}
 .chart-detail-page .impact-link:nth-child(2) .impact-arrow{transform:rotate(-90deg)}.chart-detail-page .impact-link:nth-child(4) .impact-arrow{transform:rotate(90deg)}
 .chart-detail-page .impact-link-copy{padding:2px 6px;margin-top:2px;background:var(--bg2)}.chart-detail-page .impact-link-copy b{font-size:11px}.chart-detail-page .impact-link-copy small{display:block;font-size:10px}
 .chart-detail-page .impact-source{padding:10px 9px;min-height:0}.chart-detail-page .impact-source-top{font-size:11px;letter-spacing:0;flex-wrap:wrap;gap:5px}.chart-detail-page .impact-role{font-size:10px;padding:2px 5px;letter-spacing:0}
 .chart-detail-page .impact-source-main{margin:10px 0}.chart-detail-page .impact-source-main b{font-size:30px}.chart-detail-page .impact-source-main span,.chart-detail-page .impact-source-main em{font-size:11px}.chart-detail-page .impact-source-status span{font-size:11px}.chart-detail-page .impact-source-status strong{font-size:12px}.chart-detail-page .impact-source p{font-size:11px;line-height:1.75;min-height:0}
}
@media(prefers-reduced-motion:reduce){.chart-detail-page *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}


/* Birth-date matching keeps the mobile form compact and makes every candidate explicit. */
.gz-date-match{margin-top:16px;padding-top:14px;border-top:1px solid #ffffff12}
.gz-date-match-head{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:13px;color:var(--ink)}
.gz-match-status,.calendar-input-status{font-size:12px;line-height:1.65;color:var(--ink-dim);margin:10px 0}
.gz-match-status.is-error,.calendar-input-status{color:#e7b5a2}.calendar-input-status:empty{display:none}
.gz-match-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:228px;overflow-y:auto;overscroll-behavior:contain}
.gz-match-option{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;text-align:left;border:1px solid #ffffff12;border-radius:12px;background:#ffffff04;color:var(--ink);padding:12px;font:inherit;cursor:pointer}
.gz-match-option span:first-child{display:grid;gap:5px;min-width:0}.gz-match-option strong{font-size:13px;font-weight:500}.gz-match-option small{font-size:11px;color:var(--ink-dim);font-variant-numeric:tabular-nums}
.gz-match-option.active{background:#ffffff0d;border-color:#adbdad50}.gz-match-option:focus-visible{outline:2px solid #c7d4cc;outline-offset:2px}
.gz-exact-row{margin-top:12px}.gz-exact-row label{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px}.gz-exact-row input{width:150px;max-width:55%;min-height:40px;border:1px solid #ffffff18;border-radius:9px;background:var(--bg2);color:var(--ink);font:inherit;padding:6px 9px;color-scheme:dark}
.gz-direct-choice{display:flex;gap:8px;align-items:center;margin-top:12px;font-size:12px;color:var(--ink-dim)}
.shared-birth-city{margin-top:12px}.shared-birth-city .advanced-tst{margin-top:0}
@media(max-width:360px){.gz-match-list{grid-template-columns:1fr}}

.ms-ai-retry,.ms-launch-retry{min-height:44px}
.ms-ai-retry:hover,.ms-launch-retry:hover{transform:none}
html[data-xunq-lang="en"] .pattern-method{grid-template-columns:66px minmax(0,1fr)}
/* Shared information rhythm: compact results, complete Chinese phrases, optional explanations. */
.chart-detail-page .pattern-take-card{padding-bottom:4px}
.pattern-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 12px;margin:0 0 14px}
.pattern-heading .gj-main{font-size:20px;letter-spacing:1px;line-height:1.5}
.pattern-special{color:var(--gold);font-size:12px}
.pattern-methods{border-top:1px solid var(--line)}
.pattern-method{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}
.pattern-method-name{display:grid;align-content:start;gap:1px;font-size:13px;color:var(--ink)}
.pattern-method-name small{font-size:11px;color:var(--ink-faint)}
.pattern-values{display:flex;align-items:center;align-content:center;flex-wrap:wrap;gap:7px 14px;min-width:0}
.pattern-role{display:inline-flex;align-items:baseline;gap:6px;white-space:nowrap}
.pattern-role>span{font-size:11px;color:var(--ink-faint)}
.pattern-role>b{font-size:15px;color:var(--ink);font-weight:500;letter-spacing:0}
.pattern-role.is-avoid>b{color:#e88a82}.pattern-role.is-secondary>b{color:var(--gold)}
.pattern-unavailable{font-size:12px;line-height:1.6;color:var(--ink-dim)}
.pattern-comparison{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 14px;margin:9px 0 0;color:var(--ink-dim);font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.pattern-comparison>span{min-width:0;max-width:100%}
.chart-detail-page .pattern-evidence-disclosure>summary{padding:12px 0;min-height:44px;color:var(--ink-dim)}
.pattern-evidence-disclosure .info-disclosure-body{padding:6px 0 16px}
.pattern-evidence{margin-bottom:14px;color:var(--ink-dim);font-size:13px;line-height:1.8}
.pattern-evidence>b{color:var(--ink);font-weight:500}.pattern-evidence p{margin:5px 0}
.pattern-source{display:flex;flex-wrap:wrap;gap:0 5px;margin-top:2px;font-size:11px;color:var(--ink-faint)}
.pattern-source>span{white-space:nowrap}
.pattern-derive{min-height:44px;padding:6px 0;border:0;background:none;color:var(--gold);font:inherit;font-size:12px;cursor:pointer}
.pattern-derive:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.chart-detail-page .info-nayin{align-items:start}
.chart-detail-page .info-nayin .nayin-pillar-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 14px;word-break:normal;overflow-wrap:normal}
.nayin-pillar-item{display:flex;justify-content:flex-end;gap:6px;white-space:nowrap}
.nayin-pillar-item small{font-size:11px;color:var(--ink-faint)}
.chart-detail-page .wuxing-balance-card{margin-top:16px}
.chart-detail-page .wuxing-balance-card .card-title .src{margin-left:0}
.chart-detail-page .k-src{display:flex;flex-wrap:wrap;width:auto;max-width:none;gap:0 4px;margin:3px 0 0;padding:0;border:0;border-radius:0;background:none;color:var(--ink-faint);letter-spacing:0;word-break:keep-all;overflow-wrap:normal}
.chart-detail-page .ys-char.main{box-shadow:none}
@media(max-width:640px){
 .chart-detail-page .info-nayin .nayin-pillar-values{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}
 .chart-detail-page .pattern-take-card{padding-bottom:4px}
 .pattern-values{gap:7px 12px}.pattern-role>b{font-size:14px}
 .chart-detail-page .info-disclosure>summary{padding:12px 14px;min-height:52px}
 .chart-detail-page .pattern-evidence-disclosure>summary{padding:12px 0;min-height:44px}
}
@media(max-width:360px){.chart-detail-page .info-nayin{display:block}.chart-detail-page .info-nayin .k{display:block;max-width:none;margin-bottom:8px}.nayin-pillar-item{justify-content:flex-start}}
@media(prefers-reduced-motion:reduce){.info-disclosure>summary,.info-disclosure>summary::after{transition:none}}
/* 旧档案保持原结果，用轻量入口提示重新计算。 */
.method-refresh-note{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;color:var(--ink-faint);font-size:12px;line-height:1.5}
.method-refresh-note button{appearance:none;background:none;border:0;border-radius:6px;padding:8px 0 8px 8px;min-height:44px;color:var(--gold);font:inherit;white-space:nowrap;cursor:pointer}
.method-refresh-note button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
