#heavenView {
  color-scheme: dark;
  --wt-bg: #0b1120;
  --wt-panel: #0d1526;
  --wt-panel-raised: #101a30;
  --wt-text: #d8d2bd;
  --wt-paper: #e8e2cd;
  --wt-gold: #c9a55c;
  --wt-gold-bright: #e3c887;
  --wt-cinnabar: #d76b61;
  --wt-green: #7ea87e;
  --wt-line: rgba(201, 165, 92, 0.18);
  --wt-line-soft: rgba(255, 255, 255, 0.06);
  --wt-muted: rgba(216, 210, 189, 0.55);
  --wt-faint: rgba(216, 210, 189, 0.35);
  --wt-stage-bg: radial-gradient(1200px 500px at 50% -10%, #16223f 0%, #0b1120 60%);
  --wt-fortune-stage-bg: radial-gradient(900px 440px at 32% 44%, #16223f 0%, #0b1120 66%);
  --wt-heart-stage-bg: radial-gradient(1000px 520px at 50% 18%, #16223f 0%, #0b1120 65%);
  --wt-stage-veil: rgba(8, 14, 27, 0.28);
  --wt-surface: rgba(13, 21, 38, 0.72);
  --wt-surface-raised: rgba(16, 26, 48, 0.78);
  --wt-surface-soft: rgba(13, 21, 38, 0.55);
  --wt-control-bg: rgba(255, 255, 255, 0.045);
  --wt-control-border: rgba(201, 165, 92, 0.25);
  --wt-control-hover: rgba(201, 165, 92, 0.09);
  --wt-button-border: rgba(255, 255, 255, 0.14);
  --wt-panel-gradient: linear-gradient(160deg, rgba(16, 26, 48, 0.9), rgba(13, 21, 38, 0.9));
  --wt-star: #e8e2cd;
  --wt-hexagram-ink: #cfc8ad;
  --wt-track: rgba(255, 255, 255, 0.07);
  --wt-notice-bg: rgba(215, 107, 97, 0.08);
  --wt-notice-border: rgba(215, 107, 97, 0.35);
  --wt-notice-text: #efb0a9;
  --wt-loading-bg: rgba(13, 21, 38, 0.96);
  --wt-backdrop: rgba(4, 8, 16, 0.72);
  --wt-dialog-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  --wt-focus-ring: rgba(201, 165, 92, 0.12);
  --wt-gold-glow: rgba(230, 195, 122, 0.42);
  --wt-soft-gold: rgba(201, 165, 92, 0.08);
  --wt-whisper: rgba(216, 210, 189, 0.13);
  --wt-breath-center: radial-gradient(circle, rgba(230, 195, 122, 0.6), rgba(201, 165, 92, 0.06) 65%, transparent 70%);
  --wt-breath-shadow: 0 0 32px rgba(201, 165, 92, 0.28);
  --wt-cast-rest: rgba(255, 255, 255, 0.03);
  --wt-coin-hole: #0b1120;
  --wt-metal-text: #e3ddc9;
  --wt-history-bg: rgba(255, 255, 255, 0.02);
  --ease-out: cubic-bezier(.2, .75, .3, 1);
  --heaven-serif: "Kaiti SC", "STKaiti", "KaiTi", "STSong", "SimSun", serif;
}

/* Wentian daytime palette: cool paper, ink typography and restrained bronze.
   The animation geometry is shared with night mode; only material and light
   semantics change. */
:root[data-theme="light"] #heavenView {
  color-scheme: light;
  --wt-bg: #f4f5f7;
  --wt-panel: #ffffff;
  --wt-panel-raised: #fbfaf6;
  --wt-text: #343a43;
  --wt-paper: #202934;
  --wt-gold: #946b1d;
  --wt-gold-bright: #765315;
  --wt-cinnabar: #b94f46;
  --wt-green: #4f7b5a;
  --wt-line: rgba(132, 101, 39, 0.22);
  --wt-line-soft: rgba(52, 58, 67, 0.09);
  --wt-muted: rgba(52, 58, 67, 0.74);
  --wt-faint: rgba(52, 58, 67, 0.52);
  --wt-stage-bg: radial-gradient(1200px 500px at 50% -10%, #ffffff 0%, #f4f2eb 58%, #eef1f4 100%);
  --wt-fortune-stage-bg: radial-gradient(900px 440px at 32% 44%, #fffefa 0%, #f3f1e9 58%, #edf1f4 100%);
  --wt-heart-stage-bg: radial-gradient(1000px 520px at 50% 18%, #fffefa 0%, #f3f1e9 56%, #edf1f4 100%);
  --wt-stage-veil: rgba(255, 255, 255, 0.34);
  --wt-surface: rgba(255, 255, 255, 0.78);
  --wt-surface-raised: rgba(248, 247, 242, 0.9);
  --wt-surface-soft: rgba(247, 246, 241, 0.74);
  --wt-control-bg: rgba(255, 255, 255, 0.76);
  --wt-control-border: rgba(132, 101, 39, 0.26);
  --wt-control-hover: rgba(148, 107, 29, 0.08);
  --wt-button-border: rgba(52, 58, 67, 0.16);
  --wt-panel-gradient: linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(246, 244, 237, 0.94));
  --wt-star: #8e7440;
  --wt-hexagram-ink: #645d4d;
  --wt-track: rgba(52, 58, 67, 0.1);
  --wt-notice-bg: rgba(185, 79, 70, 0.07);
  --wt-notice-border: rgba(185, 79, 70, 0.28);
  --wt-notice-text: #914039;
  --wt-loading-bg: rgba(255, 255, 255, 0.96);
  --wt-backdrop: rgba(41, 47, 56, 0.26);
  --wt-dialog-shadow: 0 18px 52px rgba(31, 41, 55, 0.18);
  --wt-focus-ring: rgba(148, 107, 29, 0.13);
  --wt-gold-glow: rgba(148, 107, 29, 0.2);
  --wt-soft-gold: rgba(148, 107, 29, 0.08);
  --wt-whisper: rgba(52, 58, 67, 0.2);
  --wt-breath-center: radial-gradient(circle, rgba(180, 130, 36, 0.42), rgba(148, 107, 29, 0.05) 65%, transparent 70%);
  --wt-breath-shadow: 0 0 32px rgba(148, 107, 29, 0.16);
  --wt-cast-rest: rgba(52, 58, 67, 0.05);
  --wt-coin-hole: #343127;
  --wt-metal-text: #6d6658;
  --wt-history-bg: #fbfaf6;
}

@media (min-width: 721px) {
  :root[data-theme="light"] body[data-active-view="heavenView"] {
    --wt-bg: #f4f5f7;
  }

  :root[data-theme="light"] body[data-active-view="heavenView"] .app-main,
  :root[data-theme="light"] body[data-active-view="heavenView"] #heavenView.heaven-shell {
    background: var(--wt-bg);
  }
}

:root[data-theme="light"] #heavenView .wt-head .verse {
  color: var(--wt-faint);
}

:root[data-theme="light"] #heavenView .wt-tabs .wt-tab {
  color: var(--wt-muted);
}

:root[data-theme="light"] #heavenView .wt-tabs .wt-tab small {
  color: var(--wt-faint);
}

:root[data-theme="light"] #heavenView .wt-tabs .wt-tab.on {
  color: var(--wt-gold-bright);
}

:root[data-theme="light"] #heavenView .wt-empty {
  color: var(--wt-muted);
}

:root[data-theme="light"] #heavenView .wt-empty .big {
  color: var(--wt-gold);
}

:root[data-theme="light"] #heavenView .wt-stage .stars i,
:root[data-theme="light"] #heavenView .fortune-stage > .stars i,
:root[data-theme="light"] #heavenView .heart-stage-shell > .stars i {
  opacity: 0.18;
}

:root[data-theme="light"] #heavenView .bagua {
  color: var(--wt-gold);
  opacity: 0.075;
}

:root[data-theme="light"] #heavenView .fortune-bagua {
  opacity: 0.08;
}

:root[data-theme="light"] #heavenView .heart-bagua {
  opacity: 0.045;
}

:root[data-theme="light"] #heavenView .heart-whispers span {
  color: var(--wt-whisper);
}

:root[data-theme="light"] #heavenView .heart-breath-ripple > i {
  background: var(--wt-breath-center);
  box-shadow: var(--wt-breath-shadow);
}

:root[data-theme="light"] #heavenView .heart-cast-button {
  background: conic-gradient(var(--wt-gold) var(--hold-progress), var(--wt-cast-rest) 0);
}

:root[data-theme="light"] #heavenView .heart-coin-face::after {
  background: var(--wt-coin-hole);
}

:root[data-theme="light"] #heavenView .phase-text-metal {
  color: var(--wt-metal-text);
}

:root[data-theme="light"] #heavenView :is(input, select, textarea)::placeholder {
  color: var(--wt-faint);
}

:root[data-theme="light"] .heaven-reading-dialog.wentian-v2-dialog {
  color-scheme: light;
  --wt-panel: #ffffff;
  --wt-text: #343a43;
  --wt-paper: #202934;
  --wt-gold: #946b1d;
  --wt-gold-bright: #765315;
  --wt-cinnabar: #b94f46;
  --wt-line: rgba(132, 101, 39, 0.22);
  --wt-line-soft: rgba(52, 58, 67, 0.09);
  --wt-muted: rgba(52, 58, 67, 0.74);
  --wt-faint: rgba(52, 58, 67, 0.52);
  --wt-notice-bg: rgba(185, 79, 70, 0.07);
  --wt-notice-border: rgba(185, 79, 70, 0.28);
  --wt-notice-text: #914039;
  --wt-backdrop: rgba(41, 47, 56, 0.26);
  --wt-dialog-shadow: 0 18px 52px rgba(31, 41, 55, 0.18);
  --wt-soft-gold: rgba(148, 107, 29, 0.08);
  --wt-history-bg: #fbfaf6;
  background: var(--wt-panel);
  box-shadow: var(--wt-dialog-shadow);
}

:root[data-theme="light"] .heaven-reading-dialog.wentian-v2-dialog::backdrop {
  background: var(--wt-backdrop);
}

:root[data-theme="light"] .wentian-v2-dialog .heaven-reading-history-list-wrap {
  background: var(--wt-history-bg);
}

:root[data-theme="light"] .wentian-v2-dialog .heaven-reading-history-item:hover,
:root[data-theme="light"] .wentian-v2-dialog .heaven-reading-history-item.active {
  background: var(--wt-soft-gold);
}

/* Production integration: legacy selectors in styles.css use panel IDs and
   therefore outrank the transplanted prototype classes. Keep these resets
   outside @scope so the v2 visual surface is authoritative. */
#heavenView #heavenTrendPanel .heaven-controls {
  border-color: transparent;
  background: transparent;
  color: var(--wt-text);
}
#heavenView #heavenTrendPanel .heaven-trend-layout {
  background: var(--wt-stage-veil);
}
#heavenView #heavenTrendPanel .form-field input {
  border-color: var(--wt-control-border);
  background: var(--wt-control-bg);
  color: var(--wt-paper);
}
#heavenView #heavenTrendPanel .hexagram-board {
  border-color: var(--wt-line);
  background: var(--wt-surface);
  color: var(--wt-text);
}
#heavenView #heavenTrendPanel .trend-reading-panel {
  background: var(--wt-surface-raised);
  color: var(--wt-text);
}
#heavenView #heavenFortunePanel .qi-time-field input {
  border-color: var(--wt-control-border);
  background: var(--wt-control-bg);
  color: var(--wt-paper);
}
#heavenView #heavenFortunePanel .heaven-footnote {
  margin: 9px 2px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wt-faint);
}
#heavenView #heavenFortunePanel .personal-fortune-panel::before {
  content: none;
  display: none;
}
#heavenView #heavenHeartPanel .heart-breath-ripple {
  width: 180px;
  height: 180px;
  position: relative;
  inset: auto;
  z-index: auto;
  transform: none;
}
#heavenView #heavenHeartPanel .heart-breath-ripple span,
#heavenView #heavenHeartPanel .heart-breath-ripple > i {
  position:absolute;
  inset:50%;
  animation: none;
}
#heavenView #heavenHeartPanel .heart-breath-ripple span {
  border:1px solid rgba(201,165,92,.32);
  box-shadow:none;
  opacity:1;
  transform:translate(-50%,-50%) scale(.38);
}
#heavenView #heavenHeartPanel .heart-breath-ripple span:nth-child(1) {
  width:100%;
  height:100%;
}
#heavenView #heavenHeartPanel .heart-breath-ripple span:nth-child(2) {
  width:76%;
  height:76%;
}
#heavenView #heavenHeartPanel .heart-breath-ripple span:nth-child(3) {
  width:52%;
  height:52%;
}
#heavenView #heavenHeartPanel .heart-breath-ripple > i {
  width:30%;
  height:30%;
  border:0;
  background:radial-gradient(circle,rgba(230,195,122,.6),rgba(201,165,92,.06) 65%,transparent 70%);
  box-shadow:0 0 32px rgba(201,165,92,.28);
  transform:translate(-50%,-50%) scale(.38);
}
#heavenView #heavenHeartPanel .breathing-scene[data-phase="inhale"] .heart-breath-ripple span,
#heavenView #heavenHeartPanel .breathing-scene[data-phase="inhale"] .heart-breath-ripple > i,
#heavenView #heavenHeartPanel .breathing-scene[data-phase="hold"] .heart-breath-ripple span,
#heavenView #heavenHeartPanel .breathing-scene[data-phase="hold"] .heart-breath-ripple > i {
  transform:translate(-50%,-50%) scale(1);
}
#heavenView #heavenHeartPanel .breathing-scene[data-phase="inhale"] .heart-breath-ripple span,
#heavenView #heavenHeartPanel .breathing-scene[data-phase="inhale"] .heart-breath-ripple > i {
  transition-duration:3s;
}
#heavenView #heavenHeartPanel .breathing-scene[data-phase="exhale"] .heart-breath-ripple span,
#heavenView #heavenHeartPanel .breathing-scene[data-phase="exhale"] .heart-breath-ripple > i {
  transform:translate(-50%,-50%) scale(.38);
  transition-duration:4s;
}
#heavenView #heavenHeartPanel .breathing-phase {
  inset:50% auto auto 50%;
  transform:translate(-50%,-50%);
}
#heavenView #heavenHeartPanel .heart-coin-face {
  padding: 0;
}
#heavenView #heavenHeartPanel .heart-coin-face::before {
  width: auto;
  height: auto;
  inset: 9px;
  border: 1px solid rgba(65,42,11,.5);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(239,205,113,.25);
  transform: none;
}
#heavenView #heavenHeartPanel .heart-coin-face::after {
  width: 27%;
  height: 27%;
  inset: 36.5% auto auto 36.5%;
  border-radius: 1px;
  background: var(--wt-bg);
  transform: none;
}
#heavenView #heavenHeartPanel .heart-return-button {
  position: absolute;
  inset: 14px auto auto 14px;
  z-index: 8;
  margin: 0;
  color: var(--wt-text);
}
#heavenView #heavenHeartPanel .heart-return-button + .heart-stage-inner,
#heavenView #heavenHeartPanel .heart-return-button + .heart-casting-layout,
#heavenView #heavenHeartPanel .heart-return-button + .heart-reveal-layout {
  min-height: 610px;
}
#heavenView #heavenHeartPanel .heart-stage-inner > h3 {
  color: var(--wt-paper);
}
#heavenView #heavenHeartPanel .heart-toolbar-controls .button,
#heavenView #heavenHeartPanel #restartHeartButton {
  color: var(--wt-text);
}
#heavenView #heavenHeartPanel .heart-hexagram-shell,
#heavenView #heavenHeartPanel .heart-reveal-board {
  padding: 56px 30px 28px;
  border-color: var(--wt-line);
  background: var(--wt-stage-veil);
  color: var(--wt-text);
}
#heavenView #heavenHeartPanel .casting-action-panel,
#heavenView #heavenHeartPanel .heart-first-thought {
  background: var(--wt-surface-soft);
}

@scope (#heavenView) {

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--wt-bg); }
body { margin: 0; background: var(--wt-bg); color: var(--wt-text); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.wt-serif { font-family: "Kaiti SC", "STKaiti", "KaiTi", "STSong", "SimSun", serif; }
.heaven-shell { width: min(1180px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; padding: 24px 0 42px; }

/* Directly transplanted from 界面优化/wentian.html. */
.wt-head { padding: 12px 8px 0; text-align: center; }
.wt-title-line { display: flex; align-items: baseline; justify-content: center; gap: 12px; }
.wt-title-line h1 { margin: 0; color: var(--wt-paper); font-size: 30px; font-weight: 700; letter-spacing: 14px; text-indent: 14px; }
.wt-title-line > span { color: var(--wt-faint); font-size: 11px; }
.wt-head .verse { margin-top: 8px; color: rgba(216,210,189,.45); font-size: 12.5px; letter-spacing: 4px; }
.wt-tabs { display: flex; justify-content: center; gap: 34px; margin-top: 20px; }
.wt-tabs .wt-tab { position: relative; padding: 8px 4px; border: 0; background: transparent; color: rgba(216,210,189,.5); font-size: 15px; letter-spacing: 3px; transition: color .2s; }
.wt-tabs .wt-tab small { display: block; margin-top: 3px; color: rgba(216,210,189,.3); font-family: inherit; font-size: 10px; letter-spacing: 1px; }
.wt-tabs .wt-tab::after { content: ""; position: absolute; bottom: -2px; left: 50%; width: 0; height: 1.5px; background: var(--wt-gold); transform: translateX(-50%); transition: all .25s; }
.wt-tabs .wt-tab.on { color: var(--wt-gold-bright); }
.wt-tabs .wt-tab.on::after { width: 100%; }
.wt-tabs .wt-tab:disabled { cursor: default; }
.wt-tabs .wt-tab:focus { outline: none; }
.wt-tabs .wt-tab:focus-visible { box-shadow: 0 2px 0 rgba(201,165,92,.45); }

.heaven-proverb { margin: 8px 0 0; padding: 10px 2px; border-bottom: 1px solid var(--wt-line); color: var(--wt-muted); font-size: 12px; font-weight: 700; text-align: right; }
.inline-notice { margin: 12px 0 0; padding: 10px 13px; border: 1px solid var(--wt-notice-border); background: var(--wt-notice-bg); color: var(--wt-notice-text); font-size: 12px; line-height: 1.6; }

.heaven-panel { margin-top: 12px; }
.heaven-controls { display: flex; align-items: flex-end; gap: 12px; }
.heaven-stock-query { min-width: 0; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(260px, .9fr); gap: 10px; flex: 1; }
.form-field { display: grid; gap: 6px; min-width: 0; }
.form-field > span { color: var(--wt-faint); font-size: 11px; }
.form-field input, .heaven-manual-field input, .heaven-manual-field select {
  width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--wt-control-border); border-radius: 7px;
  outline: none; background: var(--wt-control-bg); color: var(--wt-paper);
}
.form-field input:focus, .heaven-manual-field input:focus, .heaven-manual-field select:focus { border-color: var(--wt-gold); box-shadow: 0 0 0 2px var(--wt-focus-ring); }
.heaven-stock-identity { height: 38px; min-width: 0; display: flex; align-self: end; align-items: center; justify-content: flex-start; gap: .55em; padding: 0 4px; white-space: nowrap; }
.heaven-stock-identity > span,
.heaven-stock-identity > strong { overflow: hidden; font-size: 12.5px; line-height: 1; text-align: left; text-overflow: ellipsis; }
.heaven-stock-identity > span { flex: 0 0 auto; color: var(--wt-muted); font-weight: 400; }
.heaven-stock-identity > strong { flex: 0 1 auto; color: var(--wt-gold-bright); font-weight: 700; }
.heaven-trend-actions { display: flex; gap: 8px; }
.button { min-height: 38px; padding: 8px 15px; border: 1px solid var(--wt-button-border); border-radius: 7px; background: var(--wt-control-bg); color: var(--wt-text); transition: border-color .2s, background .2s, transform .2s; }
.button:hover:not(:disabled) { border-color: var(--wt-gold); background: var(--wt-control-hover); transform: translateY(-1px); }
.button.primary { border-color: var(--wt-gold); background: var(--wt-gold); color: #1a1408; font-weight: 700; }
.button.primary:hover:not(:disabled) { background: #d9b96e; }
.button:disabled { cursor: not-allowed; opacity: .38; }
.cast-hint { margin: 9px auto 0; color: var(--wt-faint); font-size: 11px; letter-spacing: 1.5px; text-align: center; }

/* Direct star field and bagua source from 界面优化/assets/style.css. */
.wt-stage { position: relative; min-height: 250px; overflow: hidden; margin-top: 12px; border: 1px solid var(--wt-line); border-radius: 14px; background: var(--wt-stage-bg); }
.wt-stage .stars { position: absolute; inset: 0; pointer-events: none; }
.wt-stage .stars i { position: absolute; border-radius: 50%; background: var(--wt-star); opacity: .15; animation: wt-tw 4s ease-in-out infinite alternate; }
@keyframes wt-tw { from { opacity: .05; } to { opacity: .5; } }
.bagua { position: absolute; top: 50%; left: 50%; opacity: .10; pointer-events: none; transform: translate(-50%,-50%); }
.bagua .ring { transform-origin: 150px 150px; animation: wt-spin 140s linear infinite; }
.bagua .ring2 { transform-origin: 150px 150px; animation: wt-spin 200s linear infinite reverse; }
@keyframes wt-spin { to { transform: rotate(360deg); } }
.wt-empty { position: relative; z-index: 2; padding: 66px 20px; color: rgba(216,210,189,.4); text-align: center; }
.wt-empty .big { margin-bottom: 12px; color: rgba(227,200,135,.5); font-size: 34px; letter-spacing: 10px; }
.wt-empty p { margin: 0; font-size: 12.5px; letter-spacing: 2px; line-height: 2; }

.stage-in { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(540px, 1.35fr) minmax(330px, .82fr); min-height: 560px; background: var(--wt-stage-veil); backdrop-filter: blur(1px); }
.hexagram-board { min-width: 0; padding: 24px 28px 22px; border-right: 1px solid var(--wt-line); background: var(--wt-surface); }
.hexagram-heading { min-height: 66px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 13px; border-bottom: 1px solid var(--wt-line); }
.metric-label { color: var(--wt-faint); font-size: 11px; letter-spacing: 1.5px; }
.hexagram-heading h3 { margin: 7px 0 0; color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 27px; font-weight: 650; }
.hexagram-change { text-align: right; }
.hexagram-change span { display: block; color: var(--wt-faint); font-size: 11px; }
.hexagram-change strong { display: block; margin-top: 8px; color: var(--wt-gold-bright); font-family: var(--heaven-serif); font-size: 18px; font-weight: 600; }
.hexagram-lines { display: grid; gap: 0; margin-top: 10px; }
.talent-line-group { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 14px; padding: 15px 0; border-bottom: 1px dashed var(--wt-line); animation: heaven-group-enter 440ms var(--ease-out) both; animation-delay: var(--group-delay); }
.talent-line-group:last-child { border-bottom: 0; }
.talent-seal { width: 30px; height: 30px; display: grid; place-items: center; margin-top: 9px; border: 1px solid rgba(201,165,92,.35); border-radius: 2px; color: var(--wt-muted); font-family: var(--heaven-serif); }
.talent-line-content > p { margin: 0 0 5px 8px; color: var(--wt-faint); font-family: var(--heaven-serif); font-size: 11px; }
.hexagram-line-row { min-height: 48px; display: grid; grid-template-columns: 42px 150px minmax(0,1fr); align-items: center; gap: 10px; padding: 5px 8px; border-left: 2px solid transparent; }
.hexagram-line-row.moving { border-left-color: var(--wt-cinnabar); background: linear-gradient(90deg, rgba(215,107,97,.09), transparent 78%); }
.hexagram-position { color: var(--wt-muted); font-family: var(--heaven-serif); font-size: 12px; }
.hex-line { display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; }
.hex-line i { width: 62px; height: 7px; border-radius: 1px; background: var(--wt-hexagram-ink); transform-origin: center; animation: heaven-line-draw 520ms var(--ease-out) both; }
.hex-line.yang-line i { width: 134px; }
.hex-line b { position: absolute; right: -4px; color: var(--wt-cinnabar); font-size: 15px; }
.hexagram-line-detail { min-width: 0; }
.hexagram-line-detail strong, .hexagram-line-detail small { display: block; }
.hexagram-line-detail strong { color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 12.5px; font-weight: 600; }
.hexagram-line-detail small { overflow: hidden; margin-top: 3px; color: var(--wt-muted); font-size: 10.5px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.hexagram-text { margin: 10px 0 0; padding: 15px 4px 0; border-top: 1px solid var(--wt-line); color: var(--wt-muted); font-family: var(--heaven-serif); font-size: 14px; line-height: 1.9; }
.market-movement-summary { margin: 10px 0 0; padding: 10px 13px; border-left: 2px solid var(--wt-cinnabar); background: rgba(215,107,97,.09); color: var(--wt-muted); font-size: 12px; line-height: 1.7; }

.trend-reading-panel { min-width: 0; padding: 22px 24px; background: var(--wt-surface-raised); }
.trend-score-line { min-height: 90px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 10px; }
.trend-score-line strong { display: block; margin-top: 6px; color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 48px; font-variant-numeric: tabular-nums; }
.trend-score-line > span { margin-top: 10px; padding: 5px 10px; border: 1px solid var(--wt-cinnabar); border-radius: 2px; color: var(--wt-cinnabar); font-family: var(--heaven-serif); font-size: 14px; transform: rotate(-3deg); }
.trend-score-meter { padding: 4px 0 16px; border-bottom: 1px solid var(--wt-line); }
.trend-score-track { height: 4px; position: relative; border-radius: 2px; background: linear-gradient(90deg, rgba(78,126,101,.65), rgba(216,210,189,.12) 50%, rgba(215,107,97,.58)); }
.trend-score-track i { width: 9px; height: 9px; position: absolute; top: 50%; left: var(--momentum-position, 50%); border: 2px solid var(--wt-panel); border-radius: 50%; background: var(--wt-paper); transform: translate(-50%,-50%); }
.trend-score-marks { display: flex; justify-content: space-between; margin-top: 8px; color: var(--wt-faint); font-size: 9.5px; }
.three-talent-readings { display: grid; gap: 0; }
.talent-reading { padding: 15px 0; border-bottom: 1px solid var(--wt-line-soft); }
.talent-reading > strong { color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 13px; }
.talent-reading > span { margin-left: 8px; color: var(--wt-muted); font-size: 11px; }
.talent-reading > small { display: block; margin-top: 5px; color: var(--wt-faint); font-size: 10px; }
.talent-balance { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 5px 8px; margin-top: 9px; }
.talent-balance small { color: var(--wt-faint); font-size: 10px; }
.talent-balance i { height: 3px; align-self: center; position: relative; border-radius: 2px; background: var(--wt-track); }
.talent-balance b { width: var(--talent-value); height: 100%; display: block; border-radius: inherit; background: var(--wt-gold); }
.heaven-hex-transition { min-height: 190px; display: grid; grid-template-columns: minmax(118px,1fr) 74px minmax(118px,1fr); align-items: center; gap: 10px; margin-top: 14px; padding: 16px 2px 4px; border-top: 1px solid var(--wt-line); }
.compact-hex-figure { min-width: 0; margin: 0; text-align: center; }
.compact-hex-lines { width: min(100%,136px); display: flex; flex-direction: column; gap: 7px; margin: 0 auto; }
.compact-hex-line { height: 8px; display: flex; justify-content: center; gap: 10px; position: relative; }
.compact-hex-line i { width: 57px; display: block; border-radius: 2px; background: var(--wt-hexagram-ink); }
.compact-hex-line.yang i { width: 124px; }
.compact-hex-line.moving i { background: var(--wt-gold-bright); box-shadow: 0 0 10px var(--wt-gold-glow); }
.compact-hex-line em { position: absolute; right: -2px; top: 50%; color: var(--wt-gold-bright); font-family: var(--heaven-serif); font-size: 13px; font-style: normal; transform: translateY(-50%); }
.compact-hex-figure figcaption { margin-top: 12px; }
.compact-hex-figure figcaption strong,
.compact-hex-figure figcaption small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-hex-figure figcaption strong { color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 14px; font-weight: 600; }
.compact-hex-figure figcaption strong b { color: var(--wt-gold-bright); font-weight: 600; }
.compact-hex-figure figcaption small { margin-top: 4px; color: var(--wt-faint); font-family: var(--heaven-serif); font-size: 10px; }
.compact-hex-change { display: grid; justify-items: center; gap: 5px; color: var(--wt-gold); font-family: var(--heaven-serif); text-align: center; }
.compact-hex-change i { font-size: 24px; font-style: normal; }
.compact-hex-change span { font-size: 11px; letter-spacing: 1px; white-space: nowrap; }

.heaven-calibration-panel { margin-top: 14px; border: 1px solid var(--wt-line); border-radius: 9px; background: var(--wt-panel-gradient); }
.heaven-calibration-panel > summary { cursor: pointer; list-style: none; }
.heaven-calibration-panel > summary::-webkit-details-marker { display: none; }
.heaven-calibration-heading { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; }
.heaven-calibration-heading h3 { margin: 4px 0 0; color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 19px; }
.heaven-calibration-summary { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 10px; color: var(--wt-faint); font-size: 10px; }
.heaven-calibration-summary > span { display: inline-flex; align-items: center; gap: 5px; }
.heaven-calibration-summary > strong { min-width: 86px; padding-left: 10px; border-left: 1px solid var(--wt-line); color: var(--wt-muted); text-align: right; }
.heaven-calibration-summary > strong.is-passed { color: var(--wt-green); }
.heaven-calibration-summary > strong.is-failed { color: var(--wt-cinnabar); }
.heaven-calibration-summary > strong.is-manual { color: var(--wt-gold-bright); }
.fold-label { color: var(--wt-gold); font-weight: 500; }
.heaven-calibration-panel[open] .fold-label { font-size: 0; }
.heaven-calibration-panel[open] .fold-label::after { content: "收起"; font-size: 10px; }
.calibration-body { padding: 0 18px 18px; border-top: 1px solid var(--wt-line-soft); }
.calibration-body > p { margin: 13px 0; color: var(--wt-faint); font-size: 11px; }
.heaven-line-checks { border-top: 1px solid var(--wt-line); }
.heaven-line-check { border-bottom: 1px solid var(--wt-line-soft); background: rgba(255,255,255,.018); }
.heaven-line-check.is-failed { background: rgba(215,107,97,.04); }
.heaven-line-check.is-manual { background: rgba(201,165,92,.04); }
.heaven-line-check > summary { min-height: 58px; display: grid; grid-template-columns: 94px minmax(0,1fr) 112px 18px; align-items: center; gap: 14px; padding: 8px 10px; cursor: pointer; list-style: none; }
.heaven-check-state { display: inline-flex; align-items: center; gap: 6px; color: var(--wt-muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: var(--wt-faint); }
.status-dot.passed { background: var(--wt-green); }
.status-dot.failed { background: var(--wt-cinnabar); }
.status-dot.manual { background: var(--wt-gold); }
.heaven-check-name strong, .heaven-check-name small, .heaven-check-result b, .heaven-check-result small { display: block; }
.heaven-check-name strong { color: var(--wt-paper); font-size: 12px; }
.heaven-check-name small, .heaven-check-result small { margin-top: 3px; color: var(--wt-faint); font-size: 10px; }
.heaven-check-result { text-align: right; }
.heaven-check-result b { color: var(--wt-gold-bright); font-family: var(--heaven-serif); font-size: 12px; }
.heaven-line-check-body { padding: 4px 10px 16px 118px; }
.heaven-check-reasons, .heaven-check-evidence { margin: 0 0 10px; padding-left: 18px; color: #d3918a; font-size: 11px; line-height: 1.7; }
.heaven-manual-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.heaven-manual-field { display: grid; grid-template-columns: minmax(110px,1fr) minmax(130px,.8fr); align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--wt-line-soft); }
.heaven-manual-field > span:first-child { color: var(--wt-muted); font-size: 11px; }
.heaven-manual-field small { display: block; margin-top: 2px; color: var(--wt-faint); font-size: 9px; }
.heaven-field-control { display: flex; align-items: center; gap: 5px; }
.heaven-field-control b { color: var(--wt-faint); font-size: 10px; }
.calibration-note-field { margin-top: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

.heaven-data-loading .heaven-panel { opacity: .45; pointer-events: none; }
.heaven-data-loading::after { content: "汇集天 · 人 · 地数据"; position: fixed; top: 48%; left: 50%; z-index: 20; padding: 10px 16px; border: 1px solid var(--wt-line); border-radius: 7px; background: var(--wt-loading-bg); color: var(--wt-muted); font-family: var(--heaven-serif); font-size: 12px; letter-spacing: .16em; transform: translate(-50%,-50%); }

/* Production deterministic line-reveal sequence, retained verbatim in behavior. */
.heaven-performance-pending .talent-line-group { opacity: .34; transform: translateY(7px); animation: none; transition: opacity 520ms var(--ease-out), transform 520ms var(--ease-out); }
.heaven-performance-pending .talent-line-group.is-ready { opacity: 1; transform: translateY(0); }
.heaven-performance-pending .talent-seal { filter: grayscale(1); opacity: .4; transition: color 420ms ease,border-color 420ms ease,filter 420ms ease,opacity 420ms ease,box-shadow 420ms ease; }
.heaven-performance-pending .talent-line-group.is-ready .talent-seal { border-color: rgba(201,165,92,.7); color: var(--wt-gold-bright); filter: none; opacity: 1; box-shadow: 0 0 18px rgba(201,165,92,.12); }
.heaven-performance-pending .hexagram-line-row .hex-line i { opacity: .12; filter: blur(3px); transform: scaleX(.16); animation: none; transition: opacity 620ms var(--ease-out),filter 620ms var(--ease-out),transform 620ms var(--ease-out); }
.heaven-performance-pending .hexagram-line-row .hexagram-line-detail,
.heaven-performance-pending .hexagram-line-row .hexagram-position,
.heaven-performance-pending .hexagram-line-row .hex-line b { opacity: 0; filter: blur(4px); transition: opacity 520ms ease,filter 520ms ease; }
.heaven-performance-pending .hexagram-line-row.is-ready .hex-line i { opacity: 1; filter: blur(0); transform: scaleX(1); }
.heaven-performance-pending .hexagram-line-row.is-ready .hexagram-line-detail,
.heaven-performance-pending .hexagram-line-row.is-ready .hexagram-position,
.heaven-performance-pending .hexagram-line-row.is-ready .hex-line b { opacity: 1; filter: blur(0); }
.heaven-performance-pending #marketHexagramName,
.heaven-performance-pending #marketTransformedName,
.heaven-performance-pending .hexagram-change,
.heaven-performance-pending .trend-score-line > *,
.heaven-performance-pending .trend-score-meter,
.heaven-performance-pending .market-movement-summary { opacity: 0; filter: blur(8px); transform: translateY(6px); transition: opacity 800ms var(--ease-out),filter 800ms var(--ease-out),transform 800ms var(--ease-out); }
.performance-title-ready #marketHexagramName,
.performance-change-ready #marketTransformedName,
.performance-change-ready .hexagram-change,
.performance-score-ready .trend-score-line > *,
.performance-score-ready .trend-score-meter,
.performance-text-ready .market-movement-summary { opacity: 1; filter: blur(0); transform: translateY(0); }
.heaven-performance-pending #heavenMomentumNeedle { left: 50%; opacity: 0; }
.performance-score-ready #heavenMomentumNeedle { left: var(--momentum-position,50%); opacity: 1; transition: left 1.5s cubic-bezier(.18,.85,.3,1.22),opacity 300ms ease; }
.heaven-performance-pending .talent-reading { opacity: 0; transform: translateY(6px); transition: opacity 500ms ease,transform 500ms var(--ease-out); }
.heaven-performance-pending .talent-reading.is-ready { opacity: 1; transform: none; }
.heaven-performance-pending .heaven-hex-transition { opacity: 0; filter: blur(5px); transform: translateY(5px); transition: opacity 680ms ease,filter 680ms ease,transform 680ms var(--ease-out); }
.performance-change-ready .heaven-hex-transition { opacity: 1; filter: blur(0); transform: none; }
.heaven-typing::after { content: ""; display: inline-block; width: 1px; height: 1em; margin-left: 3px; background: currentColor; vertical-align: -.1em; animation: blink .8s steps(1) infinite; }
@keyframes heaven-line-draw { from { opacity: .2; transform: scaleX(.15); } to { opacity: 1; transform: scaleX(1); } }
@keyframes heaven-group-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

.heaven-reading-dialog, .login-dialog { padding: 0; border: 1px solid var(--wt-line); border-radius: 12px; background: var(--wt-panel); color: var(--wt-text); box-shadow: 0 30px 90px rgba(0,0,0,.48); }
.heaven-reading-dialog { width: min(1080px,calc(100vw - 24px)); height: min(760px,calc(100dvh - 24px)); grid-template-rows: auto auto minmax(0,1fr); }
.heaven-reading-dialog[open] { display: grid; }
.heaven-reading-dialog::backdrop, .login-dialog::backdrop { background: rgba(4,8,16,.72); backdrop-filter: blur(4px); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--wt-line); }
.dialog-header h2 { margin: 3px 0 0; color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 20px; }
.dialog-eyebrow { color: var(--wt-gold); font-size: 10px; letter-spacing: 1.5px; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--wt-line); border-radius: 50%; background: transparent; color: var(--wt-muted); font-size: 22px; }
.heaven-reading-tabs { display: flex; padding: 0 18px; border-bottom: 1px solid var(--wt-line); }
.heaven-reading-tabs button { padding: 11px 2px 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--wt-faint); }
.heaven-reading-tabs button + button { margin-left: 24px; }
.heaven-reading-tabs button.active { border-bottom-color: var(--wt-gold); color: var(--wt-gold-bright); }
.heaven-reading-current { min-height: 0; overflow-y: auto; padding: 22px 28px 28px; }
.heaven-reading-loading { height: 100%; min-height: 0; }
.heaven-reading-loading canvas { width: 100%; height: 100%; min-height: 0; display: block; }
.empty-state { padding: 48px 20px; color: var(--wt-faint); text-align: center; }
.heaven-reading-result > header, .heaven-reading-history-detail > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.heaven-reading-result > header span, .heaven-reading-history-detail > header span { color: var(--wt-gold); font-family: var(--heaven-serif); font-size: 12px; font-weight: 700; }
.heaven-reading-result h3, .heaven-reading-history-detail h3 { margin: 5px 0 0; color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 22px; font-weight: 600; }
.heaven-reading-result time, .heaven-reading-history-detail time { color: var(--wt-faint); font-size: 11px; }
.heaven-reading-result > p, .heaven-reading-history-detail > p { color: var(--wt-muted); font-size: 12px; }
.heaven-reading-answer { margin-top: 22px; color: var(--wt-text); font-family: var(--heaven-serif); font-size: 15px; line-height: 1.95; }
.mentor-answer-heading { display: block; margin: 20px 0 7px; color: var(--wt-gold-bright); font-size: 16px; }
.mentor-answer-paragraph { margin: 0 0 10px; }
.mentor-answer-list { margin: 0 0 12px; padding-left: 24px; }
.heaven-reading-history { min-height: 0; display: grid; grid-template-columns: 270px minmax(0,1fr); overflow: hidden; }
.heaven-reading-history-list-wrap { overflow-y: auto; border-right: 1px solid var(--wt-line); background: rgba(255,255,255,.02); }
.heaven-reading-history-heading { display: flex; justify-content: space-between; padding: 15px 16px 10px; color: var(--wt-faint); font-size: 11px; }
.heaven-reading-history-item { width: 100%; display: grid; gap: 4px; padding: 13px 16px; border: 0; border-top: 1px solid var(--wt-line); background: transparent; color: var(--wt-text); text-align: left; }
.heaven-reading-history-item:hover, .heaven-reading-history-item.active { background: rgba(201,165,92,.08); box-shadow: inset 3px 0 var(--wt-gold); }
.heaven-reading-history-item span { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.heaven-reading-history-item small, .heaven-reading-history-item time { color: var(--wt-faint); font-size: 10px; }
.heaven-reading-history-detail { min-width: 0; overflow-y: auto; padding: 24px 28px; }

.login-dialog { width: min(390px,calc(100vw - 32px)); }
.login-dialog form { display: grid; gap: 14px; padding: 26px; }
.login-dialog h2 { margin: 0 0 6px; color: var(--wt-paper); font-size: 24px; }
.login-dialog .button { width: 100%; margin-top: 4px; }
@media (max-width: 960px) {
  .heaven-shell { width: min(100% - 20px, 760px); }
  .heaven-controls { align-items: stretch; flex-direction: column; }
  .heaven-stock-query { grid-template-columns: 1fr; }
  .heaven-trend-actions { justify-content: flex-end; }
  .stage-in { grid-template-columns: 1fr; }
  .hexagram-board { border-right: 0; border-bottom: 1px solid var(--wt-line); }
  .wt-stage .bagua { width: 440px; height: 440px; }
}

@media (max-width: 640px) {
  .heaven-shell { width: 100%; padding: 16px 10px 28px; }
  .wt-title-line { display: grid; gap: 5px; }
  .wt-tabs { gap: 16px; }
  .wt-tabs .wt-tab { font-size: 13px; letter-spacing: 2px; }
  .heaven-proverb { text-align: center; }
  .heaven-trend-actions { display: grid; grid-template-columns: repeat(3,1fr); }
  .button { padding-inline: 8px; }
  .wt-empty { padding: 55px 14px; }
  .wt-empty .big { font-size: 28px; }
  .wt-empty p { font-size: 11px; letter-spacing: 1px; }
  .hexagram-board, .trend-reading-panel { padding: 18px 13px; }
  .hexagram-heading { min-height: auto; }
  .hexagram-heading h3 { font-size: 20px; }
  .hexagram-line-row { grid-template-columns: 34px 104px minmax(0,1fr); gap: 5px; padding-inline: 2px; }
  .hex-line i { width: 42px; }
  .hex-line.yang-line i { width: 94px; }
  .hexagram-line-detail small { white-space: normal; }
  .heaven-calibration-heading { align-items: flex-start; flex-direction: column; }
  .heaven-calibration-summary { justify-content: flex-start; }
  .heaven-line-check > summary { grid-template-columns: 78px minmax(0,1fr) 18px; gap: 8px; }
  .heaven-check-result { grid-column: 2; text-align: left; }
  .heaven-line-check-body { padding-left: 10px; }
  .heaven-manual-fields { grid-template-columns: 1fr; }
  .heaven-manual-field { grid-template-columns: 1fr; }
  .heaven-reading-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
  .heaven-reading-current { padding: 18px 15px; }
  .heaven-reading-history { grid-template-columns: 1fr; overflow-y: auto; }
  .heaven-reading-history-list-wrap { max-height: 210px; border-right: 0; border-bottom: 1px solid var(--wt-line); }
  .heaven-reading-history-detail { overflow: visible; padding: 18px 15px; }
  .heaven-hex-transition { min-height: 172px; grid-template-columns: minmax(96px,1fr) 48px minmax(96px,1fr); gap: 5px; }
  .compact-hex-lines { width: min(100%,112px); }
  .compact-hex-line { gap: 8px; }
  .compact-hex-line i { width: 47px; }
  .compact-hex-line.yang i { width: 102px; }
  .compact-hex-change span { font-size: 10px; white-space: normal; }
}

}

@media (min-width: 721px) {
  body[data-active-view="heavenView"] {
    --wt-bg: #0b1120;
  }

  body[data-active-view="heavenView"] .overview-strip {
    display: flex;
    flex: 0 0 var(--summary-height);
  }

  :root body[data-active-view="heavenView"] .app-main {
    height: var(--workspace-height);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--wt-bg);
  }

  body[data-active-view="heavenView"] #heavenView.heaven-shell {
    width: 100%;
    max-width: none;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    padding: var(--page-pad-y) var(--page-pad-x);
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--wt-bg);
    color: var(--wt-text);
  }

  body[data-active-view="heavenView"] #heavenView.heaven-shell > * {
    width: min(var(--table-wide), 100%);
    margin-right: auto;
    margin-left: auto;
  }

  body[data-active-view="heavenView"] #heavenView.heaven-shell > .heaven-panel {
    background: transparent;
  }

  body[data-active-view="heavenView"] #heavenView #heavenHeartPanel {
    width: min(var(--table-wide), 100%) !important;
    max-width: var(--table-wide) !important;
    min-height: 0;
    margin-right: auto !important;
    margin-left: auto !important;
    background: transparent;
    color: var(--wt-text);
  }

  body[data-active-view="heavenView"] #heavenView #heavenHeartPanel .heart-stage,
  body[data-active-view="heavenView"] #heavenView #heavenHeartPanel .heart-stage-inner {
    min-height: 610px;
    background-color: transparent;
    background-image: none;
  }
}

#heavenView #heavenFortunePanel .qi-framework-layers {
  display: block;
  margin-top: 8px;
  border: 0;
}

#heavenView #heavenFortunePanel .fortune-basics .qi-framework-panel { padding: 0; }
#heavenView #heavenFortunePanel .fortune-basics .workspace-heading {
  min-height: 0;
  margin: 0;
  padding: 0 0 11px;
}

#heavenView #heavenFortunePanel .qi-framework-layer,
#heavenView #heavenFortunePanel .qi-framework-layer:nth-child(2),
#heavenView #heavenFortunePanel .qi-framework-layer:nth-child(3),
#heavenView #heavenFortunePanel .qi-framework-layer:last-child {
  min-height: 0;
  grid-template-columns: 72px 70px minmax(0, 1fr);
  gap: 9px;
  padding: 11px 0;
  border-right: 0;
  border-bottom: 1px solid var(--wt-line-soft);
}

#heavenView #heavenFortunePanel .qi-framework-layer:last-child { border-bottom: 0; }
#heavenView #heavenFortunePanel .qi-framework-layer > span { color: var(--wt-faint); font-size: 10px; font-weight: 400; }
#heavenView #heavenFortunePanel .qi-framework-layer > strong { margin: 0; color: var(--wt-gold-bright); font-size: 14px; }
#heavenView #heavenFortunePanel .qi-framework-layer > small { min-height: 0; margin: 0; color: var(--wt-muted); font-size: 10px; line-height: 1.6; }
#heavenView #heavenFortunePanel .qi-framework-layer > div {
  width: auto;
  height: 3px;
  grid-column: 2 / -1;
  margin: 0;
  border-radius: 2px;
}

#heavenView #heavenFortunePanel .personal-fortune-panel {
  margin-top: 14px;
  padding: 14px 0 0;
  border: 0;
  background: transparent;
}

#heavenView #heavenFortunePanel .personal-fortune-result {
  display: block;
  margin-top: 0;
  border: 0;
}

#heavenView #heavenFortunePanel .personal-primary-grid {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
  border: 0;
}

#heavenView #heavenFortunePanel .personal-preferences {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 10px;
}

#heavenView #heavenFortunePanel .personal-preferences > section {
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
}

#heavenView #heavenFortunePanel .personal-day-master {
  min-height: 118px;
  padding: 0;
  border-right: 1px solid var(--wt-line);
}

.heaven-reading-dialog.wentian-v2-dialog {
  --wt-panel: #0d1526;
  --wt-text: #d8d2bd;
  --wt-paper: #e8e2cd;
  --wt-gold: #c9a55c;
  --wt-gold-bright: #e3c887;
  --wt-cinnabar: #d76b61;
  --wt-line: rgba(201, 165, 92, 0.18);
  --wt-line-soft: rgba(255, 255, 255, 0.06);
  --wt-muted: rgba(216, 210, 189, 0.55);
  --wt-faint: rgba(216, 210, 189, 0.35);
  --wt-notice-bg: rgba(215, 107, 97, 0.08);
  --wt-notice-border: rgba(215, 107, 97, 0.35);
  --wt-notice-text: #efb0a9;
  --wt-backdrop: rgba(4, 8, 16, 0.72);
  --wt-dialog-shadow: 0 30px 90px rgba(0, 0, 0, 0.48);
  --wt-soft-gold: rgba(201, 165, 92, 0.08);
  --wt-history-bg: rgba(255, 255, 255, 0.02);
  --heaven-serif: "Kaiti SC", "STKaiti", "KaiTi", "STSong", "SimSun", serif;
  width: min(1080px, calc(100vw - 24px));
  height: min(760px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid var(--wt-line);
  border-radius: 12px;
  background: var(--wt-panel);
  color: var(--wt-text);
  box-shadow: var(--wt-dialog-shadow);
}

.heaven-reading-dialog.wentian-v2-dialog[open] { display: grid; }
.heaven-reading-dialog.wentian-v2-dialog::backdrop { background: var(--wt-backdrop); backdrop-filter: blur(4px); }
.wentian-v2-dialog .dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--wt-line); }
.wentian-v2-dialog .dialog-header h2 { margin: 3px 0 0; color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 20px; }
.wentian-v2-dialog .dialog-eyebrow { color: var(--wt-gold); font-size: 10px; letter-spacing: 1.5px; }
.wentian-v2-dialog .icon-button { width: 34px; height: 34px; border: 1px solid var(--wt-line); border-radius: 50%; background: transparent; color: var(--wt-muted); }
.wentian-v2-dialog .heaven-reading-tabs { display: flex; padding: 0 18px; border-bottom: 1px solid var(--wt-line); }
.wentian-v2-dialog .heaven-reading-tabs button { padding: 11px 2px 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--wt-faint); }
.wentian-v2-dialog .heaven-reading-tabs button + button { margin-left: 24px; }
.wentian-v2-dialog .heaven-reading-tabs button.active { border-bottom-color: var(--wt-gold); color: var(--wt-gold-bright); }
.wentian-v2-dialog .heaven-reading-current { min-height: 0; max-height: none; overflow-y: auto; padding: 22px 28px 28px; }
.wentian-v2-dialog .heaven-reading-loading { height: 100%; min-height: 0; }
.wentian-v2-dialog .heaven-reading-loading canvas { width: 100%; height: 100%; min-height: 0; display: block; }
.wentian-v2-dialog .empty-state { padding: 48px 20px; color: var(--wt-faint); text-align: center; }
.wentian-v2-dialog .heaven-reading-result > header,
.wentian-v2-dialog .heaven-reading-history-detail > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.wentian-v2-dialog .heaven-reading-result > header span,
.wentian-v2-dialog .heaven-reading-history-detail > header span { color: var(--wt-gold); font-family: var(--heaven-serif); font-size: 12px; font-weight: 700; }
.wentian-v2-dialog .heaven-reading-result h3,
.wentian-v2-dialog .heaven-reading-history-detail h3 { margin: 5px 0 0; color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 22px; font-weight: 600; }
.wentian-v2-dialog .heaven-reading-result time,
.wentian-v2-dialog .heaven-reading-history-detail time { color: var(--wt-faint); font-size: 11px; }
.wentian-v2-dialog .heaven-reading-result > p,
.wentian-v2-dialog .heaven-reading-history-detail > p { color: var(--wt-muted); font-size: 12px; }
.wentian-v2-dialog .heaven-reading-answer { margin-top: 22px; color: var(--wt-text); font-family: var(--heaven-serif); font-size: 15px; line-height: 1.95; }
.wentian-v2-dialog .mentor-answer-heading { display: block; margin: 20px 0 7px; color: var(--wt-gold-bright); font-size: 16px; }
.wentian-v2-dialog .mentor-answer-paragraph { margin: 0 0 10px; }
.wentian-v2-dialog .mentor-answer-list { margin: 0 0 12px; padding-left: 24px; }
.wentian-v2-dialog .heaven-reading-history { min-height: 0; max-height: none; display: grid; grid-template-columns: 270px minmax(0, 1fr); overflow: hidden; }
.wentian-v2-dialog .heaven-reading-history-list-wrap { overflow-y: auto; border-right: 1px solid var(--wt-line); background: var(--wt-history-bg); }
.wentian-v2-dialog .heaven-reading-history-heading { display: flex; justify-content: space-between; padding: 15px 16px 10px; color: var(--wt-faint); font-size: 11px; }
.wentian-v2-dialog .heaven-reading-history-item { width: 100%; display: grid; gap: 4px; padding: 13px 16px; border: 0; border-top: 1px solid var(--wt-line); background: transparent; color: var(--wt-text); text-align: left; }
.wentian-v2-dialog .heaven-reading-history-item:hover,
.wentian-v2-dialog .heaven-reading-history-item.active { background: rgba(201, 165, 92, 0.08); box-shadow: inset 3px 0 var(--wt-gold); }
.wentian-v2-dialog .heaven-reading-history-item span { overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wentian-v2-dialog .heaven-reading-history-item small,
.wentian-v2-dialog .heaven-reading-history-item time { color: var(--wt-faint); font-size: 10px; }
.wentian-v2-dialog .heaven-reading-history-detail { min-width: 0; overflow-y: auto; padding: 24px 28px; }

@media (max-width: 640px) {
  body[data-active-view="heavenView"] #heavenView.heaven-shell { width: 100%; padding: 16px 10px 28px; }
  .heaven-reading-dialog.wentian-v2-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); }
  .wentian-v2-dialog .heaven-reading-current { padding: 18px 15px; }
  .wentian-v2-dialog .heaven-reading-history { grid-template-columns: 1fr; overflow-y: auto; }
  .wentian-v2-dialog .heaven-reading-history-list-wrap { max-height: 210px; border-right: 0; border-bottom: 1px solid var(--wt-line); }
  .wentian-v2-dialog .heaven-reading-history-detail { overflow: visible; padding: 18px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  #heavenView *, #heavenView *::before, #heavenView *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@scope (#heavenView) {

/* Fortune and heart keep production behavior while sharing the transplanted night sky. */
.heaven-panel:not(.active-heaven-panel) { display: none; }
.fortune-heading { min-height: 64px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 0 2px 10px; }
.fortune-calendar-heading h3 { margin: 5px 0 0; color: var(--wt-paper); font-size: 19px; font-weight: 600; }
.fortune-heading-actions { display: flex; align-items: flex-end; gap: 8px; }
.qi-time-field { display: grid; gap: 5px; color: var(--wt-faint); font-size: 10px; }
.qi-time-field input { min-height: 38px; padding: 7px 10px; border: 1px solid var(--wt-control-border); border-radius: 7px; outline: 0; background: var(--wt-control-bg); color: var(--wt-paper); color-scheme: inherit; }
.fortune-stage { min-height: 570px; display: grid; grid-template-columns: minmax(0,1.55fr) minmax(350px,.78fr); position: relative; overflow: hidden; border: 1px solid var(--wt-line); border-radius: 14px; background: var(--wt-fortune-stage-bg); }
.fortune-stage > .stars, .heart-stage-shell > .stars { position: absolute; inset: 0; pointer-events: none; }
.fortune-stage > .stars i, .heart-stage-shell > .stars i { position: absolute; border-radius: 50%; background: var(--wt-paper); opacity: .15; animation: wt-tw 4s ease-in-out infinite alternate; }
.fortune-bagua { left: 32%; width: 620px; height: 620px; opacity: .055; }
.qi-climate-panel { min-width: 0; display: grid; align-content: center; justify-items: center; position: relative; z-index: 2; padding: 56px 52px; border-right: 1px solid var(--wt-line); text-align: center; }
.qi-climate-panel::before, .qi-climate-panel::after { content: ""; position: absolute; border-radius: 50%; filter: blur(34px); opacity: .2; }
.qi-climate-panel::before { width: 250px; height: 250px; top: 22%; left: 19%; background: var(--wt-gold); }
.qi-climate-panel::after { width: 190px; height: 190px; right: 18%; bottom: 18%; background: var(--wt-cinnabar); }
.qi-section-mark, .heart-stage-index { position: relative; z-index: 1; color: var(--wt-cinnabar); font-family: var(--heaven-serif); font-size: 11px; letter-spacing: 2px; }
.qi-climate-caption { position: relative; z-index: 1; margin: 18px 0 0; color: var(--wt-faint); font-size: 12px; letter-spacing: 5px; }
.qi-climate-panel h3 { position: relative; z-index: 1; margin: 14px 0 0; color: var(--wt-paper); font-size: 48px; font-weight: 500; letter-spacing: 5px; }
.qi-climate-panel > strong { position: relative; z-index: 1; margin-top: 18px; color: var(--wt-gold-bright); font-size: 16px; font-weight: 500; letter-spacing: 2px; }
.human-field-summary { max-width: 650px; position: relative; z-index: 1; margin: 20px auto 0; color: var(--wt-muted); font-size: 12px; line-height: 2; }
.fortune-basics { min-width: 0; position: relative; z-index: 2; padding: 16px; background: var(--wt-surface); backdrop-filter: blur(5px); }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--wt-line); }
.workspace-heading > div > span { color: var(--wt-cinnabar); font-family: var(--heaven-serif); font-size: 10px; letter-spacing: 1px; }
.workspace-heading h3 { margin: 3px 0 0; color: var(--wt-paper); font-size: 17px; font-weight: 600; }
.text-fold-button { padding: 5px 0; border: 0; background: transparent; color: var(--wt-faint); font-size: 10px; }
.qi-framework-principle { margin: 10px 0 0; color: var(--wt-faint); font-size: 10px; line-height: 1.65; }
.qi-framework-layers { margin-top: 8px; }
.qi-framework-layers.is-folded { display: none; }
.qi-framework-layer { display: grid; grid-template-columns: 72px 70px minmax(0,1fr); align-items: center; gap: 9px; padding: 11px 0; border-bottom: 1px solid var(--wt-line-soft); }
.qi-framework-layer:last-child { border-bottom: 0; }
.qi-framework-layer > span { color: var(--wt-faint); font-size: 10px; }
.qi-framework-layer > strong { color: var(--wt-gold-bright); font-family: var(--heaven-serif); font-size: 14px; }
.qi-framework-layer > small { color: var(--wt-muted); font-size: 10px; line-height: 1.6; }
.qi-layer-balance { grid-column: 2 / -1; height: 3px; display: flex; overflow: hidden; border-radius: 2px; background: var(--wt-track); }
.qi-layer-balance i { width: var(--qi-segment); height: 100%; display: block; }
.phase-wood { background: #6e9f75; }.phase-fire { background: #d76b61; }.phase-earth { background: #c99a4d; }.phase-metal { background: #d8d2bd; }.phase-water { background: #688eba; }
.phase-text-wood { color: #7fb88a; }.phase-text-fire { color: #e07b70; }.phase-text-earth { color: #d9ad60; }.phase-text-metal { color: #e3ddc9; }.phase-text-water { color: #7fa3cd; }
.personal-fortune-panel { margin-top: 14px; padding: 14px 0 0; border: 0; border-radius: 0; background: transparent; }
.personal-profile-empty { padding: 30px 12px; color: var(--wt-faint); font-size: 11px; text-align: center; }
.personal-primary-grid { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 12px; margin-top: 12px; }
.personal-day-master { display: grid; place-items: center; align-content: center; min-height: 118px; border-right: 1px solid var(--wt-line); }
.personal-day-master > span { color: var(--wt-faint); font-size: 10px; }
.personal-day-master-character { margin-top: 7px; font-family: var(--heaven-serif); font-size: 35px; line-height: 1; }
.personal-day-master-element { margin-top: 5px; font-size: 11px; }
.personal-day-master small { margin-top: 5px; color: var(--wt-faint); font-size: 9px; }
.personal-preferences { display: grid; align-content: center; gap: 10px; }
.personal-preferences section > span { display: block; margin-bottom: 5px; color: var(--wt-faint); font-size: 10px; }
.personal-preference-line { display: flex; align-items: baseline; gap: 8px; margin: 3px 0; }
.personal-preference-line strong { width: 30px; color: var(--wt-muted); font-size: 9px; }
.personal-preference-line p { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.personal-preference-line em { padding: 2px 5px; border: 1px solid var(--wt-line); border-radius: 4px; color: var(--wt-paper); font-size: 9px; font-style: normal; }
.fortune-sector-catalog { width: 100%; margin-top: 12px; overflow: hidden; border: 1px solid var(--wt-line); border-radius: 10px; background: var(--wt-surface); }
.fortune-sector-catalog > summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; cursor: pointer; list-style: none; }
.fortune-sector-catalog > summary::-webkit-details-marker { display: none; }
.fortune-sector-catalog > summary > span:first-child { display: grid; gap: 3px; }
.fortune-sector-catalog > summary small { color: var(--wt-cinnabar); font-size: 9px; letter-spacing: 1px; }
.fortune-sector-catalog > summary strong { color: var(--wt-paper); font-size: 15px; font-weight: 600; }
.fortune-sector-summary-hint { display: flex; align-items: center; gap: 8px; color: var(--wt-faint); font-size: 10px; }
.fortune-sector-summary-hint i { font-size: 14px; font-style: normal; transition: transform .35s ease; }
.fortune-sector-catalog[open] .fortune-sector-summary-hint i { transform: rotate(180deg); }
.fortune-sector-groups { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-top: 1px solid var(--wt-line); }
.fortune-sector-group { min-width: 0; padding: 14px; border-right: 1px solid var(--wt-line-soft); }
.fortune-sector-group:last-child { border-right: 0; }
.fortune-sector-group header { display: grid; grid-template-columns: 7px auto 1fr; align-items: center; gap: 7px; padding-bottom: 10px; border-bottom: 1px solid var(--wt-line-soft); }
.fortune-sector-group header i { width: 7px; height: 7px; border-radius: 50%; }
.fortune-sector-group header strong { font-size: 12px; }
.fortune-sector-group header small { color: var(--wt-faint); font-size: 10px; text-align: right; }
.fortune-sector-group ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.fortune-sector-group li { padding: 3px 6px; border: 1px solid var(--wt-line-soft); border-radius: 4px; color: var(--wt-muted); font-size: 11px; line-height: 1.5; }
.heart-journey { max-width: 640px; display: flex; align-items: center; justify-content: center; margin: 2px auto 12px; padding: 10px 16px; border: 1px solid var(--wt-line); border-radius: 9px; background: var(--wt-surface-raised); }
.heart-journey span { display: flex; align-items: center; gap: 6px; color: var(--wt-faint); font-family: var(--heaven-serif); font-size: 11px; white-space: nowrap; }
.heart-journey span i { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--wt-line); border-radius: 50%; font-style: normal; }
.heart-journey span.active { color: var(--wt-gold-bright); }
.heart-journey span.active i { border-color: var(--wt-gold); background: rgba(201,165,92,.1); }
.heart-journey b { width: 46px; height: 1px; margin: 0 8px; background: var(--wt-line); }
.heart-stage-shell { min-height: 610px; position: relative; overflow: hidden; border: 1px solid var(--wt-line); border-radius: 14px; background: var(--wt-heart-stage-bg); }
.heart-bagua { width: 760px; height: 760px; opacity: .035; }
.heart-toolbar-controls { display: flex; gap: 7px; position: absolute; top: 14px; right: 14px; z-index: 9; }
.heart-toolbar-controls .button { min-height: 32px; padding: 5px 10px; font-size: 10px; }
.heart-whispers span { position: absolute; top: var(--whisper-y); left: var(--whisper-x); z-index: 1; color: rgba(216,210,189,.13); font-family: var(--heaven-serif); font-size: 12px; letter-spacing: 3px; writing-mode: vertical-rl; animation: heart-whisper var(--whisper-duration) ease-in-out var(--whisper-delay) infinite alternate; }
@keyframes heart-whisper { from { opacity: .18; transform: translateY(8px); } to { opacity: .68; transform: translateY(-8px); } }
.heart-stage { min-height: 610px; display: none; position: relative; z-index: 3; opacity: 0; }
.heart-stage.active-heart-stage { display: block; opacity: 1; animation: heart-stage-enter 1.15s ease both; }
.heart-stage.is-leaving { animation: heart-stage-leave 1.05s ease both; }
@keyframes heart-stage-enter { from { opacity: 0; filter: blur(6px); transform: translateY(10px); } to { opacity: 1; filter: none; transform: none; } }
@keyframes heart-stage-leave { to { opacity: 0; filter: blur(7px); transform: translateY(-7px); } }
.heart-stage-inner { min-height: 610px; display: grid; align-content: center; justify-items: center; padding: 56px 22px; text-align: center; }
.heart-stage-inner > h3 { margin: 20px 0 0; color: var(--wt-paper); font-size: 27px; font-weight: 500; letter-spacing: 4px; }
.heart-guidance { margin-top: 22px; color: var(--wt-muted); font-size: 12px; line-height: 1.8; }
.heart-guidance p { margin: 5px 0; }
.heart-motto { margin: 28px 0 26px; padding-top: 18px; border-top: 1px solid var(--wt-line); color: var(--wt-gold-bright); font-size: 15px; font-weight: 700; letter-spacing: 2px; }
.heart-rise { opacity: 0; filter: blur(5px); transform: translateY(12px); transition: opacity 1.2s ease,filter 1.2s ease,transform 1.2s ease; }
.heart-rise.is-visible { opacity: 1; filter: none; transform: none; }
.heart-return-button { position: absolute; top: 14px; left: 14px; z-index: 8; min-height: 32px; padding: 5px 10px; font-size: 10px; }
.breathing-stage { grid-template-rows: auto 220px auto auto; align-content: center; }
.breathing-scene { width: 220px; height: 220px; display: grid; place-items: center; position: relative; margin-top: 12px; }
.heart-breath-ripple { width: 180px; height: 180px; position: relative; }
.heart-breath-ripple span, .heart-breath-ripple > i { position: absolute; inset: 50%; border: 1px solid rgba(201,165,92,.32); border-radius: 50%; transform: translate(-50%,-50%) scale(.38); transition: transform 3s ease-in-out,opacity 2s ease; }
.heart-breath-ripple span:nth-child(1) { width: 100%; height: 100%; }.heart-breath-ripple span:nth-child(2) { width: 76%; height: 76%; }.heart-breath-ripple span:nth-child(3) { width: 52%; height: 52%; }
.heart-breath-ripple > i { width: 30%; height: 30%; border: 0; background: radial-gradient(circle,rgba(230,195,122,.6),rgba(201,165,92,.06) 65%,transparent 70%); box-shadow: 0 0 32px rgba(201,165,92,.28); }
.breathing-scene[data-phase="inhale"] .heart-breath-ripple span, .breathing-scene[data-phase="inhale"] .heart-breath-ripple > i { transform: translate(-50%,-50%) scale(1); transition-duration: 3s; }
.breathing-scene[data-phase="hold"] .heart-breath-ripple span, .breathing-scene[data-phase="hold"] .heart-breath-ripple > i { transform: translate(-50%,-50%) scale(1); }
.breathing-scene[data-phase="exhale"] .heart-breath-ripple span, .breathing-scene[data-phase="exhale"] .heart-breath-ripple > i { transform: translate(-50%,-50%) scale(.38); transition-duration: 4s; }
.breathing-phase { position: absolute; z-index: 2; color: var(--wt-paper); font-family: var(--heaven-serif); font-size: 22px; font-weight: 500; }
.breathing-stage > h3 { margin: 2px 0 0; font-size: 17px; letter-spacing: 2px; }
.breathing-stage #beginCastingButton { margin-top: 44px; }
.heart-incense { width: 2px; height: 270px; position: absolute; top: 50%; right: 7%; margin: 0; border-radius: 2px; background: linear-gradient(180deg,rgba(201,168,106,.05),rgba(201,168,106,.38)); transform: translateY(-50%); }
.heart-incense::after { content: "一炷香"; display: block; position: absolute; top: calc(100% + 14px); left: 50%; color: var(--wt-faint); font-family: var(--heaven-serif); font-size: 10px; letter-spacing: .22em; white-space: nowrap; transform: translateX(-50%); }
.heart-incense i { width: 10px; height: 10px; position: absolute; top: 0; left: 50%; margin: -5px 0 0 -5px; border-radius: 50%; background: radial-gradient(circle,#ffd9a0 0,#e08840 45%,transparent 75%); box-shadow: 0 0 14px 4px rgba(255,180,90,.35); transform: none; }
.heart-incense i::after { content: ""; width: 8px; height: 22px; position: absolute; bottom: 5px; left: 50%; border-radius: 50%; background: rgba(216,210,189,.18); filter: blur(4px); opacity: 0; transform: translateX(-50%); }
.heart-incense i.is-burning { animation: heart-incense-burn 45s linear 1s forwards,heart-incense-glow 1.8s ease-in-out infinite; }
.heart-incense i.is-burning::after { animation: heart-incense-smoke 2.2s ease-out infinite; }
@keyframes heart-incense-glow { 0%,100% { box-shadow: 0 0 10px 3px rgba(255,180,90,.26); } 50% { box-shadow: 0 0 18px 6px rgba(255,180,90,.5); } }
@keyframes heart-incense-smoke { 0% { opacity: 0; transform: translate(-50%,0) scale(.65); } 28% { opacity: .55; } 100% { opacity: 0; transform: translate(-70%,-28px) scale(1.2); } }
.heart-casting-layout, .heart-reveal-layout { min-height: 610px; display: grid; grid-template-columns: minmax(0,1.15fr) minmax(360px,.85fr); }
.heart-hexagram-shell, .heart-reveal-board { padding: 56px 30px 28px; border-right: 1px solid var(--wt-line); background: var(--wt-stage-veil); }
.casting-action-panel, .heart-first-thought { display: grid; align-content: center; justify-items: center; padding: 54px 24px; text-align: center; background: var(--wt-surface-soft); }
.heart-coins { display: flex; gap: 22px; margin: 42px 0 30px; perspective: 900px; }
.heart-coin { width: 82px; height: 82px; position: relative; border-radius: 50%; transform-style: preserve-3d; filter: drop-shadow(0 9px 12px rgba(0,0,0,.24)); }
.heart-coin-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; }
.heart-coin-face { position: absolute; inset: 0; border: 1px solid #e2c070; border-radius: 50%; backface-visibility: hidden; background: radial-gradient(circle at 34% 26%,#e1c36f 0,#bd8f34 36%,#80591d 76%,#4c3414 100%); color: #3c290b; box-shadow: inset 0 0 0 3px rgba(67,43,12,.42),inset 0 0 0 7px rgba(240,205,112,.22),inset -5px -7px 12px rgba(55,34,8,.34),inset 5px 6px 10px rgba(255,228,139,.22); }
.heart-coin-face::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(65,42,11,.5); border-radius: 50%; box-shadow: 0 0 0 1px rgba(239,205,113,.25); }
.heart-coin-face::after { content: ""; width: 27%; height: 27%; position: absolute; top: 36.5%; left: 36.5%; border-radius: 1px; background: #0b1120; box-shadow: inset 0 0 0 2px #3d290d,0 0 0 2px rgba(231,191,91,.58),0 2px 4px rgba(0,0,0,.38); }
.heart-coin-face.front { background: radial-gradient(circle at 34% 26%,#ecd27e 0,#c99b3d 37%,#855d20 76%,#4c3414 100%); }
.heart-coin-face.back { transform: rotateY(180deg); }
.heart-coin-face.back { background: radial-gradient(circle at 66% 28%,#d9b85f 0,#ad7f2d 42%,#6e4a18 78%,#3e2a12 100%); }
.coin-hole { display: none; }
.coin-glyph { position: absolute; z-index: 2; color: rgba(55,34,8,.9); font-family: var(--heaven-serif); font-size: 14px; font-weight: 700; font-style: normal; line-height: 1; text-shadow: 0 1px rgba(255,224,130,.3); }
.coin-glyph-top { top: 8px; left: 50%; transform: translateX(-50%); }
.coin-glyph-right { top: 50%; right: 9px; transform: translateY(-50%); }
.coin-glyph-bottom { bottom: 8px; left: 50%; transform: translateX(-50%); }
.coin-glyph-left { top: 50%; left: 9px; transform: translateY(-50%); }
.heart-coin-face.back .coin-glyph { color: rgba(58,37,12,.8); font-size: 13px; }
.heart-coin-ring { position: absolute; inset: -7px; border: 1px solid rgba(201,165,92,.25); border-radius: 50%; opacity: 0; }
.heart-coin-ring.is-bursting { animation: coin-ring .7s ease-out; }
@keyframes coin-ring { from { opacity: .8; transform: scale(.7); } to { opacity: 0; transform: scale(1.45); } }
.heart-coin.is-shaking { animation: coin-shake .12s linear infinite alternate; }
@keyframes coin-shake { to { transform: translate(2px,-2px) rotate(2deg); } }
.casting-action-panel > h3, .heart-first-thought > h3 { color: var(--wt-paper); font-size: 18px; font-weight: 500; }
.heart-cast-button { --hold-progress:0turn; width: 100px; height: 100px; display: grid; place-items: center; position: relative; margin-top: 18px; border: 1px solid var(--wt-line); border-radius: 50%; background: conic-gradient(var(--wt-gold) var(--hold-progress),rgba(255,255,255,.03) 0); color: var(--wt-paper); }
.heart-cast-button::before { content:""; position:absolute; inset:4px; border-radius:50%; background:var(--wt-panel); }
.heart-cast-button span { position: relative; z-index: 2; font-family: var(--heaven-serif); line-height: 1.5; }
#heavenHeartPanel .heart-yao-empty { min-height: 7px; }
.heart-line-texts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; position: static; margin: 0; padding: 12px 18px 16px; }
.heart-line-text { min-width: 0; padding: 8px 10px; border: 1px solid var(--wt-line-soft); background: var(--wt-surface-raised); color: var(--wt-muted); text-align: left; }
.heart-line-text strong { color: var(--wt-paper); font-size: 10px; }.heart-line-text p { display: none; margin: 5px 0 0; font-size: 9px; line-height: 1.5; }.heart-line-text:hover p,.heart-line-text.is-inspected p { display: block; }
.heart-first-thought p { max-width: 320px; color: var(--wt-muted); font-size: 12px; line-height: 2; }
.heart-interpretation-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 48px 34px 18px; border-bottom: 1px solid var(--wt-line); }
.heart-interpretation-heading h3 { margin: 6px 0 0; color: var(--wt-paper); font-size: 25px; }.heart-interpretation-heading small { color: var(--wt-gold); }
.heart-read-actions { display: flex; gap: 8px; }
.heart-read-guaci { margin: 18px 34px; color: var(--wt-muted); font-family: var(--heaven-serif); font-size: 13px; }
.heart-read-layout { display: grid; grid-template-columns: 300px minmax(0,1fr); gap: 28px; padding: 0 34px 30px; }
.heart-read-lines, .heart-read-texts { display: grid; align-content: start; gap: 4px; }
.heart-read-line { min-height: 46px; display: grid; grid-template-columns: 40px 170px; align-items: center; color: var(--wt-faint); }.heart-read-line .hex-line i { height: 6px; }
.heart-read-text { min-height: 46px; padding: 7px 10px; border-left: 2px solid transparent; }.heart-read-text.moving { border-left-color: var(--wt-cinnabar); background: rgba(215,107,97,.06); }.heart-read-text strong { color: var(--wt-paper); font-size: 11px; }.heart-read-text p { margin: 4px 0 0; color: var(--wt-muted); font-size: 10px; }
.heart-read-motto { margin: 4px 34px; color: var(--wt-gold); text-align: right; }
.heaven-footnote { margin: 9px 2px 0; color: var(--wt-faint); font-size: 10px; text-align: right; }

@media (max-width: 960px) {
  .fortune-stage { grid-template-columns: 1fr; }
  .qi-climate-panel { min-height: 440px; border-right: 0; border-bottom: 1px solid var(--wt-line); }
  .fortune-bagua { left: 50%; }
  .heart-casting-layout, .heart-reveal-layout { grid-template-columns: 1fr; }
  .heart-hexagram-shell, .heart-reveal-board { border-right: 0; border-bottom: 1px solid var(--wt-line); }
  .heart-line-texts { position: relative; right: auto; bottom: auto; left: auto; padding: 14px; }
  .fortune-sector-groups { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fortune-sector-group:nth-child(2n) { border-right: 0; }
  .fortune-sector-group { border-bottom: 1px solid var(--wt-line-soft); }
}
@media (max-width: 640px) {
  .fortune-heading { align-items: stretch; flex-direction: column; }
  .fortune-heading-actions { display: grid; grid-template-columns: 1fr auto auto; }
  .fortune-stage { min-height: 0; }
  .qi-climate-panel { min-height: 390px; padding: 44px 20px; }
  .qi-climate-panel h3 { font-size: 34px; }
  .fortune-basics { padding: 10px; }
  .qi-framework-layer { grid-template-columns: 62px 60px minmax(0,1fr); }
  .heart-journey { overflow-x: auto; justify-content: flex-start; }
  .heart-journey b { width: 18px; margin-inline: 4px; }
  .heart-stage-shell,.heart-stage,.heart-stage-inner { min-height: 560px; }
  .breathing-stage #beginCastingButton { margin-top: 36px; }
  .heart-incense { right: 8%; height: 230px; }
  .heart-incense::after { display: block; }
  .heart-coins { gap: 9px; }.heart-coin { width: 68px; height: 68px; }
  .coin-glyph { font-size: 11px; }
  .coin-glyph-top { top: 7px; }.coin-glyph-right { right: 7px; }.coin-glyph-bottom { bottom: 7px; }.coin-glyph-left { left: 7px; }
  .heart-hexagram-shell,.heart-reveal-board,.casting-action-panel,.heart-first-thought { padding-inline: 14px; }
  .heart-line-texts { grid-template-columns: 1fr; }
  .fortune-sector-groups { grid-template-columns: 1fr; }
  .fortune-sector-group { border-right: 0; }
  .heart-read-layout { grid-template-columns: 1fr; padding-inline: 14px; }
  .heart-interpretation-heading { align-items: stretch; flex-direction: column; padding-inline: 14px; }
  .heart-read-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

}
