:root {
  color-scheme: dark;
  --ink: #080611;
  --ink-soft: #110d22;
  --panel: rgba(23, 18, 38, 0.82);
  --panel-strong: rgba(26, 20, 44, 0.94);
  --line: rgba(255, 255, 255, 0.12);
  --line-bright: rgba(255, 238, 190, 0.28);
  --text: #fffaf1;
  --muted: rgba(245, 239, 255, 0.66);
  --gold: #f3d06b;
  --gold-soft: #fff0b8;
  --purple: #b09dff;
  --cyan: #5ed0ff;
  --danger: #ff9d8f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(113, 76, 197, 0.24), transparent 34%),
    linear-gradient(180deg, #080611 0%, #0d0919 42%, #080611 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(243, 208, 107, 0.82);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.cosmos {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.star-field {
  position: absolute;
  inset: 0;
  opacity: 0.68;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.82) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(176, 157, 255, 0.72) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(94, 208, 255, 0.6) 0 1px, transparent 1.6px);
  background-position: 0 0, 43px 71px, 89px 24px;
  background-size: 124px 124px, 167px 167px, 213px 213px;
  mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0.48) 72%, transparent);
}

.nebula {
  position: absolute;
  width: min(62vw, 860px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.34;
}

.nebula-one {
  top: -28%;
  right: -18%;
  background: radial-gradient(circle, rgba(112, 78, 207, 0.55), transparent 68%);
}

.nebula-two {
  left: -22%;
  top: 38%;
  background: radial-gradient(circle, rgba(16, 134, 170, 0.34), transparent 68%);
}

.horizon-glow {
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -20%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(213, 157, 73, 0.14), transparent 66%);
  filter: blur(22px);
}

.site-header {
  position: relative;
  width: min(1280px, calc(100% - 48px));
  min-height: 88px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-seal {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 239, 187, 0.48);
  border-radius: 15px;
  color: #201307;
  background:
    radial-gradient(circle at 30% 25%, #fff8d5 0 8%, transparent 24%),
    linear-gradient(135deg, #ffeaa1, #c88f35);
  box-shadow: 0 10px 28px rgba(203, 142, 48, 0.24), inset 0 1px rgba(255, 255, 255, 0.66);
  font-family: "Songti SC", "STSong", serif;
  font-size: 22px;
  font-weight: 900;
}

.brand span:last-child {
  display: grid;
  gap: 2px;
}

.brand b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  letter-spacing: 0.08em;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255, 250, 241, 0.78);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.header-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(94, 208, 255, 0.8);
}

.floating-back {
  position: fixed;
  z-index: 30;
  left: max(12px, env(safe-area-inset-left));
  top: 50%;
  width: 54px;
  min-height: 76px;
  display: grid;
  place-items: center;
  gap: 0;
  padding: 8px 6px;
  border: 1px solid rgba(255, 238, 190, 0.28);
  border-radius: 18px;
  color: var(--gold-soft);
  background: rgba(13, 9, 25, 0.8);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  transform: translateY(-50%);
  cursor: pointer;
}

.floating-back span {
  font-size: 34px;
  line-height: 0.8;
}

.floating-back small {
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hecan-shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.hero-section {
  min-height: 690px;
  display: grid;
  grid-template-columns: minmax(340px, 0.88fr) minmax(560px, 1.12fr);
  align-items: center;
  gap: clamp(28px, 5vw, 84px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-heading h2,
.reading-hero h2,
.casting-section h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 660px;
  font-size: clamp(44px, 5.7vw, 78px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-copy h1 span {
  display: block;
  color: transparent;
  background: linear-gradient(90deg, #fff6d6 0%, #f3d06b 42%, #b09dff 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  max-width: 620px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-chips span,
.consensus-strip span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(255, 250, 241, 0.75);
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.stage-wrap {
  min-width: 0;
}

.three-d-viewport {
  position: relative;
  height: 540px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 44px;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 224, 143, 0.12), transparent 12%),
    radial-gradient(circle at 50% 48%, rgba(112, 73, 191, 0.2), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.12);
  perspective: 1100px;
  touch-action: pan-y;
  cursor: grab;
}

.three-d-viewport::before,
.three-d-viewport::after {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  transform: rotateX(64deg);
}

.three-d-viewport::after {
  inset: 24%;
  border-color: rgba(243, 208, 107, 0.08);
}

.three-d-viewport:active {
  cursor: grabbing;
}

.orbit-rig {
  --rig-x: -7deg;
  --rig-y: 0deg;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 720px;
  height: 430px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(var(--rig-x)) rotateY(var(--rig-y));
  transition: transform 260ms cubic-bezier(0.22, 0.8, 0.22, 1);
  animation: rig-breathe 7s ease-in-out infinite;
}

.orbit-rig.is-paused,
.orbit-rig.is-focused {
  animation-play-state: paused;
}

.orbit-rig.is-paused *,
.orbit-rig.is-paused *::before,
.orbit-rig.is-paused *::after {
  animation-play-state: paused !important;
}

.method-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 196px;
  height: 238px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border: 1px solid currentColor;
  border-radius: 30px;
  color: var(--gold);
  background: rgba(18, 13, 29, 0.84);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.44), inset 0 1px rgba(255, 255, 255, 0.18);
  transform-style: preserve-3d;
  transition:
    transform 720ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 420ms ease,
    filter 420ms ease,
    border-color 260ms ease;
  cursor: pointer;
}

.method-card::before,
.method-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.method-card::before {
  inset: 8px;
  border: 1px solid color-mix(in srgb, currentColor 42%, transparent);
  border-radius: 23px;
}

.method-card::after {
  inset: auto 20px -12px;
  height: 18px;
  border-radius: 50%;
  background: currentColor;
  filter: blur(20px);
  opacity: 0.26;
}

.method-card:hover {
  border-color: rgba(255, 255, 255, 0.68);
}

.method-card > * {
  position: relative;
  z-index: 1;
  transform: translateZ(12px);
}

.card-aura {
  position: absolute;
  inset: 18%;
  z-index: 0;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.11;
  filter: blur(28px);
}

.method-card strong {
  font-family: "Songti SC", "STSong", serif;
  color: var(--text);
  font-size: 27px;
  letter-spacing: 0.12em;
}

.method-card small,
.method-kicker {
  color: color-mix(in srgb, currentColor 68%, white);
  font-size: 10px;
  letter-spacing: 0.13em;
}

.method-bazi {
  color: var(--gold);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 224, 139, 0.22), transparent 40%),
    linear-gradient(145deg, rgba(48, 34, 18, 0.95), rgba(21, 15, 28, 0.93));
  transform: translate3d(-328px, -72px, 4px) rotateY(18deg) rotateZ(-5deg);
}

.method-ziwei {
  color: var(--purple);
  background:
    radial-gradient(circle at 80% 0%, rgba(176, 157, 255, 0.28), transparent 40%),
    linear-gradient(145deg, rgba(38, 26, 70, 0.95), rgba(19, 14, 34, 0.94));
  transform: translate3d(-98px, -152px, 88px) rotateX(5deg) rotateZ(2deg);
}

.method-qizheng {
  color: var(--cyan);
  background:
    radial-gradient(circle at 74% 16%, rgba(94, 208, 255, 0.25), transparent 40%),
    linear-gradient(145deg, rgba(15, 50, 67, 0.96), rgba(15, 16, 34, 0.94));
  transform: translate3d(148px, 34px, -26px) rotateY(-17deg) rotateZ(6deg);
}

.mini-pillars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 8px;
  border: 1px solid rgba(243, 208, 107, 0.18);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.2);
}

.mini-pillars i {
  display: grid;
  gap: 3px;
  font-style: normal;
}

.mini-pillars b,
.mini-pillars em {
  display: grid;
  place-items: center;
  color: #fff4ca;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  font-style: normal;
}

.mini-pillars em {
  color: rgba(255, 250, 241, 0.68);
}

.ziwei-mini-grid {
  width: 94px;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 2px;
}

.ziwei-mini-grid i {
  display: grid;
  place-items: center;
  border: 1px solid rgba(176, 157, 255, 0.32);
  color: rgba(243, 238, 255, 0.72);
  background: rgba(176, 157, 255, 0.06);
  font-size: 7px;
  font-style: normal;
}

.ziwei-mini-grid i:nth-child(6),
.ziwei-mini-grid i:nth-child(7),
.ziwei-mini-grid i:nth-child(10),
.ziwei-mini-grid i:nth-child(11) {
  visibility: hidden;
}

.celestial-disc {
  position: relative;
  width: 98px;
  aspect-ratio: 1;
  border: 1px solid rgba(94, 208, 255, 0.42);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 208, 255, 0.1), transparent 64%);
}

.celestial-disc .orbit,
.qizheng-orbit-result i {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(94, 208, 255, 0.25);
  border-radius: 50%;
  transform: rotate(28deg) scaleY(0.62);
}

.celestial-disc .orbit-b {
  inset: 30%;
  transform: rotate(-42deg) scaleY(0.58);
}

.celestial-disc .orbit-c {
  inset: 8%;
  border-style: dashed;
  opacity: 0.62;
}

.celestial-disc b,
.qizheng-orbit-result b,
.qizheng-orbit-result em {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(94, 208, 255, 0.82);
}

.celestial-disc .sun-dot {
  left: 46%;
  top: 46%;
  width: 10px;
  height: 10px;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(243, 208, 107, 0.9);
}

.celestial-disc .moon-dot {
  left: 18%;
  top: 38%;
  background: #f5f1ff;
}

.celestial-disc .p-one {
  right: 8%;
  top: 54%;
}

.celestial-disc .p-two {
  left: 46%;
  bottom: 4%;
}

.fusion-core {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 245, 206, 0.72);
  border-radius: 50%;
  color: #251508;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.9), transparent 20%),
    linear-gradient(145deg, #fff1b0, #d19d3f);
  box-shadow: 0 0 0 14px rgba(243, 208, 107, 0.06), 0 0 58px rgba(243, 208, 107, 0.34);
  transform: translate3d(-38px, -38px, 150px);
  cursor: pointer;
}

.fusion-core span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 30px;
  font-weight: 900;
}

.fusion-core i {
  position: absolute;
  inset: -20px;
  border: 1px dashed rgba(255, 239, 180, 0.32);
  border-radius: 50%;
  animation: core-spin 14s linear infinite;
}

.light-line {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), currentColor, rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 14px currentColor;
  opacity: 0.34;
  transform-origin: left center;
  pointer-events: none;
}

.line-bazi {
  color: var(--gold);
  transform: translate3d(-2px, 0, 82px) rotate(-159deg);
}

.line-ziwei {
  width: 150px;
  color: var(--purple);
  transform: translate3d(0, 0, 105px) rotate(-112deg);
}

.line-qizheng {
  width: 190px;
  color: var(--cyan);
  transform: translate3d(0, 0, 70px) rotate(26deg);
}

.three-d-viewport[data-focus="bazi"] .method-bazi,
.three-d-viewport[data-focus="ziwei"] .method-ziwei,
.three-d-viewport[data-focus="qizheng"] .method-qizheng {
  z-index: 12;
  transform: translate3d(-98px, -119px, 190px) rotate(0deg) scale(1.14);
}

.three-d-viewport[data-focus="bazi"] .method-card:not(.method-bazi),
.three-d-viewport[data-focus="ziwei"] .method-card:not(.method-ziwei),
.three-d-viewport[data-focus="qizheng"] .method-card:not(.method-qizheng) {
  opacity: 0.24;
  filter: blur(1px) saturate(0.4);
}

.three-d-viewport[data-focus] .fusion-core,
.three-d-viewport[data-focus] .light-line {
  opacity: 0.24;
}

.orbit-rig.is-converging .method-bazi,
.orbit-rig.is-converging .method-ziwei,
.orbit-rig.is-converging .method-qizheng {
  transform: translate3d(-98px, -119px, 120px) scale(0.45);
  opacity: 0.45;
}

.orbit-rig.is-converging .fusion-core {
  animation: fusion-pulse 1.5s ease both;
}

.stage-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.stage-controls button,
.reading-actions button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: rgba(255, 250, 241, 0.78);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.stage-hint {
  margin: 10px 0 0;
  color: rgba(245, 239, 255, 0.48);
  text-align: center;
  font-size: 11px;
}

.intake-section,
.reading-section {
  position: relative;
  margin-top: 90px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 26px;
}

.section-heading h2,
.reading-hero h2,
.casting-section h2 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
}

.section-heading > p:last-child,
.reading-hero p,
.casting-section p {
  color: var(--muted);
  line-height: 1.8;
}

.intake-card,
.casting-section,
.reading-hero,
.system-snapshot,
.theme-board,
.evidence-grid article,
.timeline-section,
.action-card,
.calibration-details {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 46%),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
}

.intake-card {
  padding: clamp(20px, 4vw, 38px);
  border-radius: 36px;
}

.profile-source {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid rgba(243, 208, 107, 0.18);
  border-radius: 22px;
  background: rgba(243, 208, 107, 0.05);
}

.profile-orb {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #251606;
  background: linear-gradient(145deg, #fff0b5, #bd8130);
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  font-weight: 900;
}

.profile-source > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.profile-source b,
.profile-source small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-source small {
  color: var(--muted);
}

.profile-source button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(243, 208, 107, 0.28);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(243, 208, 107, 0.06);
  cursor: pointer;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr 0.75fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-name,
.field-place {
  grid-column: span 2;
}

.field > span,
.focus-fieldset legend {
  color: rgba(255, 250, 241, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field > span small {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--text);
  background: rgba(4, 3, 10, 0.44);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.65;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(245, 239, 255, 0.3);
}

.focus-fieldset {
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.focus-fieldset legend {
  margin-bottom: 10px;
}

.focus-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.focus-grid label {
  cursor: pointer;
}

.focus-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.focus-grid span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  transition: 180ms ease;
}

.focus-grid input:checked + span {
  border-color: rgba(243, 208, 107, 0.54);
  color: #251606;
  background: linear-gradient(145deg, #fff0b2, #c68d35);
  box-shadow: 0 10px 26px rgba(201, 143, 53, 0.22);
  font-weight: 800;
}

.focus-grid input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.yangzhai-fieldset {
  margin-top: 22px;
  border: 1px solid rgba(243, 208, 107, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.yangzhai-fieldset summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  color: rgba(255, 250, 241, 0.84);
  cursor: pointer;
  font-weight: 800;
}

.yangzhai-fieldset summary small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.yangzhai-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 0 16px 16px;
}

.yangzhai-wide {
  grid-column: span 2;
}

.question-field {
  margin-top: 22px;
}

.generate-button {
  width: 100%;
  min-height: 62px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 247, 210, 0.62);
  border-radius: 19px;
  color: #241408;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.64), transparent 24%),
    linear-gradient(110deg, #ffe9a1, #d49a3d 54%, #b09dff 140%);
  box-shadow: 0 18px 42px rgba(201, 143, 53, 0.26), inset 0 1px rgba(255, 255, 255, 0.8);
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.generate-button b {
  font-size: 20px;
}

.generate-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.form-note,
.reading-disclaimer {
  margin: 14px 0 0;
  color: rgba(245, 239, 255, 0.42);
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.casting-section {
  margin-top: 56px;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 36px;
  display: none;
  grid-template-columns: 116px 1fr;
  align-items: center;
  gap: 28px;
}

.casting-section[aria-hidden="false"] {
  display: grid;
}

.casting-core {
  position: relative;
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #251606;
  background: linear-gradient(145deg, #fff2b9, #ca9137);
  box-shadow: 0 0 54px rgba(243, 208, 107, 0.28);
}

.casting-core span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 34px;
  font-weight: 900;
}

.casting-core i {
  position: absolute;
  inset: -12px;
  border: 1px solid rgba(243, 208, 107, 0.24);
  border-radius: 50%;
  animation: core-spin 7s linear infinite;
}

.casting-core i:nth-child(2) {
  inset: -22px;
  border-color: rgba(176, 157, 255, 0.24);
  animation-direction: reverse;
}

.casting-core i:nth-child(3) {
  inset: -34px;
  border-style: dashed;
  border-color: rgba(94, 208, 255, 0.2);
  animation-duration: 12s;
}

.casting-steps {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.casting-steps span {
  min-height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition: 300ms ease;
}

.casting-steps span.is-complete {
  background: linear-gradient(90deg, var(--gold), var(--purple), var(--cyan));
  box-shadow: 0 0 14px rgba(176, 157, 255, 0.34);
}

.reading-section {
  display: grid;
  gap: 24px;
}

.reading-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 28px;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 36px;
  background:
    radial-gradient(circle at 92% 0%, rgba(176, 157, 255, 0.18), transparent 38%),
    linear-gradient(145deg, rgba(255, 228, 145, 0.08), transparent 52%),
    var(--panel-strong);
}

.reading-hero p:last-child {
  max-width: 720px;
  margin-bottom: 0;
}

.resonance-dial {
  --dial-value: 33;
  width: 122px;
  height: 122px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--dial-value) * 1%), rgba(255, 255, 255, 0.08) 0);
  box-shadow: 0 0 38px rgba(243, 208, 107, 0.14);
}

.resonance-dial::before {
  content: "";
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: #100c1b;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.12);
}

.resonance-dial span {
  position: absolute;
  display: grid;
  place-items: center;
}

.resonance-dial b {
  font-family: "Songti SC", "STSong", serif;
  font-size: 34px;
}

.resonance-dial small {
  color: var(--muted);
  font-size: 10px;
}

.consensus-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.consensus-strip span:first-child {
  border-color: rgba(243, 208, 107, 0.28);
  color: var(--gold-soft);
}

.system-snapshots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.system-snapshot {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  border-radius: 28px;
}

.system-snapshot header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.system-snapshot header span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 22px;
  font-weight: 900;
}

.system-snapshot header small {
  color: var(--muted);
  font-size: 10px;
}

.system-snapshot h3 {
  margin: auto 0 8px;
  font-size: 18px;
}

.system-snapshot p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.snapshot-bazi {
  border-color: rgba(243, 208, 107, 0.22);
}

.snapshot-ziwei {
  border-color: rgba(176, 157, 255, 0.22);
}

.snapshot-qizheng {
  border-color: rgba(94, 208, 255, 0.22);
}

.result-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.result-pillars div {
  display: grid;
  place-items: center;
  gap: 3px;
  padding: 10px 4px;
  border: 1px solid rgba(243, 208, 107, 0.14);
  border-radius: 13px;
  background: rgba(243, 208, 107, 0.04);
}

.result-pillars small {
  color: var(--muted);
  font-size: 8px;
}

.result-pillars b,
.result-pillars em {
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
  font-style: normal;
}

.result-pillars em {
  color: rgba(255, 250, 241, 0.72);
}

.ziwei-orbit-result,
.qizheng-orbit-result {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 2px auto 22px;
  border: 1px solid rgba(176, 157, 255, 0.3);
  border-radius: 26px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(176, 157, 255, 0.18) 50%, transparent 51%),
    linear-gradient(transparent 49%, rgba(176, 157, 255, 0.18) 50%, transparent 51%);
}

.ziwei-orbit-result i {
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(176, 157, 255, 0.2);
  border-radius: 18px;
}

.ziwei-orbit-result b,
.ziwei-orbit-result em {
  position: absolute;
  display: grid;
  place-items: center;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
}

.ziwei-orbit-result b {
  left: 8px;
  top: 8px;
  color: #24173e;
  background: var(--purple);
}

.ziwei-orbit-result em {
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(176, 157, 255, 0.34);
  color: #eae4ff;
  background: rgba(176, 157, 255, 0.08);
}

.qizheng-orbit-result {
  border-radius: 50%;
  border-color: rgba(94, 208, 255, 0.3);
  background: radial-gradient(circle, rgba(94, 208, 255, 0.09), transparent 64%);
}

.qizheng-orbit-result i:nth-child(2) {
  inset: 28%;
  transform: rotate(-38deg) scaleY(0.58);
}

.qizheng-orbit-result i:nth-child(3) {
  inset: 8%;
  border-style: dashed;
  opacity: 0.6;
}

.qizheng-orbit-result b {
  left: 46%;
  top: 46%;
  width: 11px;
  height: 11px;
  background: var(--gold);
}

.qizheng-orbit-result em {
  right: 14%;
  top: 28%;
}

.theme-board,
.timeline-section {
  padding: clamp(22px, 4vw, 34px);
  border-radius: 30px;
}

.compact-heading {
  margin-bottom: 22px;
}

.compact-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.theme-bars {
  display: grid;
  gap: 15px;
}

.theme-row {
  display: grid;
  grid-template-columns: 64px 1fr 42px;
  align-items: center;
  gap: 12px;
}

.theme-row span,
.theme-row b {
  font-size: 12px;
}

.theme-row b {
  color: var(--gold-soft);
  text-align: right;
}

.theme-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.theme-track i {
  display: block;
  width: var(--value, 50%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--purple), var(--cyan));
  box-shadow: 0 0 16px rgba(176, 157, 255, 0.34);
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.evidence-grid article {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 13px;
  padding: 20px;
  border-radius: 24px;
}

.evidence-grid b {
  font-size: 14px;
}

.evidence-grid p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.evidence-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-family: "Songti SC", "STSong", serif;
  font-weight: 900;
}

.evidence-mark.shared {
  color: #251606;
  background: var(--gold);
}

.evidence-mark.support {
  color: #24173e;
  background: var(--purple);
}

.evidence-mark.caveat {
  color: #0b2b38;
  background: var(--cyan);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.timeline article {
  position: relative;
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
}

.timeline article::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 0;
  width: 36px;
  height: 2px;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(243, 208, 107, 0.44);
}

.timeline time {
  color: var(--gold-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 22px;
  font-weight: 800;
}

.timeline b {
  display: block;
  margin: 10px 0 6px;
  font-size: 13px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.action-card {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 18px;
  padding: clamp(22px, 4vw, 32px);
  border-color: rgba(243, 208, 107, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at 0 50%, rgba(243, 208, 107, 0.14), transparent 34%),
    var(--panel-strong);
}

.action-seal {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 246, 205, 0.48);
  border-radius: 23px;
  color: #251606;
  background: linear-gradient(145deg, #fff1b1, #c98f35);
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
  font-weight: 900;
}

.action-card small {
  color: var(--gold);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.action-card h3 {
  margin: 6px 0 8px;
  font-size: 20px;
}

.action-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.calibration-details {
  overflow: hidden;
  border-radius: 24px;
}

.calibration-details summary {
  padding: 18px 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.calibration-details > div {
  padding: 0 20px 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.calibration-details ul {
  margin: 0;
  padding-left: 18px;
}

.reading-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.site-footer {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 max(34px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(245, 239, 255, 0.36);
  font-size: 11px;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.page-toast {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  max-width: min(520px, calc(100% - 36px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 233, 170, 0.34);
  border-radius: 999px;
  color: #fff8e1;
  background: rgba(17, 12, 30, 0.94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.12);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.page-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes rig-breathe {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -8px;
  }
}

@keyframes core-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fusion-pulse {
  0%,
  100% {
    transform: translate3d(-38px, -38px, 150px) scale(1);
  }
  50% {
    transform: translate3d(-38px, -38px, 190px) scale(1.28);
    box-shadow: 0 0 0 30px rgba(243, 208, 107, 0.04), 0 0 86px rgba(243, 208, 107, 0.62);
  }
}

@media (max-width: 1080px) {
  .hero-section {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-top: 52px;
  }

  .hero-copy {
    max-width: 820px;
  }

  .stage-wrap {
    width: min(820px, 100%);
    margin: 12px auto 0;
  }

	  .form-grid {
	    grid-template-columns: repeat(2, 1fr);
	  }

	  .yangzhai-grid {
	    grid-template-columns: repeat(2, 1fr);
	  }

	  .field-name,
	  .field-place {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .site-header,
  .hecan-shell,
  .site-footer {
    width: min(100% - 30px, 680px);
  }

  .site-header {
    min-height: 74px;
  }

  .header-status {
    display: none;
  }

  .hecan-shell {
    padding-top: 18px;
  }

  .hero-section {
    padding-top: 20px;
    gap: 26px;
  }

  .hero-copy h1 {
    font-size: clamp(39px, 12vw, 56px);
  }

  .hero-lead {
    font-size: 15px;
  }

  .three-d-viewport {
    height: 440px;
    border-radius: 32px;
  }

  .orbit-rig {
    width: 390px;
    height: 360px;
  }

  .method-card {
    width: 132px;
    height: 166px;
    gap: 5px;
    padding: 12px;
    border-radius: 23px;
  }

  .method-card strong {
    font-size: 21px;
  }

  .method-kicker,
  .method-card small {
    font-size: 8px;
  }

  .method-bazi {
    transform: translate3d(-190px, -62px, 6px) rotateY(14deg) rotateZ(-5deg);
  }

  .method-ziwei {
    transform: translate3d(-64px, -132px, 70px) rotateX(5deg) rotateZ(3deg);
  }

  .method-qizheng {
    transform: translate3d(58px, 24px, -18px) rotateY(-14deg) rotateZ(5deg);
  }

  .mini-pillars {
    gap: 2px;
    padding: 5px;
  }

  .mini-pillars b,
  .mini-pillars em {
    font-size: 11px;
  }

  .ziwei-mini-grid,
  .celestial-disc {
    width: 70px;
  }

  .fusion-core {
    width: 60px;
    height: 60px;
    transform: translate3d(-30px, -30px, 120px);
  }

  .fusion-core span {
    font-size: 25px;
  }

  .light-line {
    width: 110px;
  }

  .line-bazi {
    transform: translate3d(0, 0, 70px) rotate(-157deg);
  }

  .line-ziwei {
    width: 105px;
  }

  .line-qizheng {
    width: 100px;
  }

  .three-d-viewport[data-focus="bazi"] .method-bazi,
  .three-d-viewport[data-focus="ziwei"] .method-ziwei,
  .three-d-viewport[data-focus="qizheng"] .method-qizheng {
    transform: translate3d(-66px, -83px, 160px) rotate(0) scale(1.13);
  }

  .orbit-rig.is-converging .method-bazi,
  .orbit-rig.is-converging .method-ziwei,
  .orbit-rig.is-converging .method-qizheng {
    transform: translate3d(-66px, -83px, 100px) scale(0.42);
  }

  .intake-section,
  .reading-section {
    margin-top: 68px;
  }

  .intake-card,
  .reading-hero,
  .theme-board,
  .timeline-section {
    border-radius: 28px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

	  .focus-grid {
	    grid-template-columns: repeat(3, 1fr);
	  }

	  .yangzhai-fieldset summary {
	    align-items: flex-start;
	    flex-direction: column;
	    gap: 4px;
	  }

	  .yangzhai-grid {
	    grid-template-columns: 1fr;
	  }

	  .yangzhai-wide {
	    grid-column: auto;
	  }

  .system-snapshots,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .system-snapshot {
    min-height: 292px;
  }

  .reading-hero {
    grid-template-columns: 1fr auto;
  }

  .resonance-dial {
    width: 96px;
    height: 96px;
  }

  .resonance-dial::before {
    width: 76px;
    height: 76px;
  }

  .resonance-dial b {
    font-size: 26px;
  }

  .timeline {
    grid-template-columns: 1fr;
  }

  .timeline article {
    min-height: 110px;
  }

  .floating-back {
    width: 48px;
    min-height: 68px;
    left: 7px;
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .brand small {
    display: none;
  }

  .hero-chips span:last-child {
    display: none;
  }

  .three-d-viewport {
    height: 390px;
  }

  .orbit-rig {
    width: 340px;
    transform: translate(-50%, -50%) rotateX(-4deg) rotateY(var(--rig-y));
  }

  .method-card {
    width: 118px;
    height: 150px;
    padding: 10px;
  }

  .method-bazi {
    transform: translate3d(-166px, -48px, 4px) rotateY(12deg) rotateZ(-5deg);
  }

  .method-ziwei {
    transform: translate3d(-58px, -116px, 56px) rotateZ(3deg);
  }

  .method-qizheng {
    transform: translate3d(48px, 24px, -16px) rotateY(-12deg) rotateZ(5deg);
  }

  .ziwei-mini-grid,
  .celestial-disc {
    width: 62px;
  }

  .stage-hint {
    padding-left: 36px;
  }

  .profile-source {
    grid-template-columns: 42px 1fr;
  }

  .profile-orb {
    width: 42px;
    height: 42px;
  }

  .profile-source button {
    grid-column: 1 / -1;
  }

  .reading-hero {
    grid-template-columns: 1fr;
  }

  .resonance-dial {
    justify-self: start;
  }

  .action-card {
    grid-template-columns: 52px 1fr;
  }

  .action-seal {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .orbit-rig {
    animation: none;
  }
}

@supports not (transform-style: preserve-3d) {
  .orbit-rig {
    transform: translate(-50%, -50%);
  }

  .method-card,
  .method-bazi,
  .method-ziwei,
  .method-qizheng {
    transform: none;
  }

  .method-bazi {
    left: 20%;
    top: 33%;
  }

  .method-ziwei {
    left: 50%;
    top: 24%;
  }

  .method-qizheng {
    left: 72%;
    top: 52%;
  }
}

/* 三术同轴术盘：3D 深度直接作用于四柱、十二宫与星轨。 */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.three-d-viewport {
  height: 620px;
  isolation: isolate;
  border-color: rgba(192, 224, 255, 0.13);
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 222, 127, 0.1), transparent 9%),
    radial-gradient(circle at 50% 48%, rgba(104, 87, 183, 0.19), transparent 38%),
    radial-gradient(ellipse at 50% 82%, rgba(44, 172, 207, 0.1), transparent 43%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.042), rgba(2, 3, 10, 0.22));
  perspective: 1180px;
  perspective-origin: 50% 42%;
}

.three-d-viewport::before {
  inset: 7%;
  border: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, transparent 0 38px, rgba(174, 220, 255, 0.045) 39px 40px),
    linear-gradient(90deg, transparent 49.85%, rgba(243, 208, 107, 0.08) 50%, transparent 50.15%),
    linear-gradient(0deg, transparent 49.85%, rgba(94, 208, 255, 0.06) 50%, transparent 50.15%);
  opacity: 0.64;
  transform: none;
}

.three-d-viewport::after {
  inset: auto 10% 9%;
  height: 25%;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(94, 208, 255, 0.12), transparent 68%);
  filter: blur(16px);
  opacity: 0.7;
  transform: none;
}

.orbit-rig {
  --rig-x: 54deg;
  --rig-y: -6deg;
  --disc-size: 560px;
  --ziwei-size: 338px;
  --bazi-width: 240px;
  --bazi-height: 168px;
  position: absolute;
  left: 50%;
  top: 51%;
  width: var(--disc-size);
  height: var(--disc-size);
  transform: translate(-50%, -50%) rotateX(var(--rig-x)) rotateY(var(--rig-y)) rotateZ(-4deg);
  transform-style: preserve-3d;
  transition: transform 260ms cubic-bezier(0.22, 0.8, 0.22, 1);
  animation: instrument-arrival 950ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.orbit-rig.is-paused,
.orbit-rig.is-focused {
  animation-play-state: paused;
}

.orbit-rig.is-paused *,
.orbit-rig.is-paused *::before,
.orbit-rig.is-paused *::after,
.orbit-rig.is-offscreen *,
.orbit-rig.is-document-hidden * {
  animation-play-state: paused !important;
}

.time-axis {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 250px;
  pointer-events: none;
  transform: translate3d(-1px, -125px, 0) rotateX(-90deg);
  transform-origin: center;
  transform-style: preserve-3d;
  background: linear-gradient(transparent, rgba(255, 239, 187, 0.72), rgba(94, 208, 255, 0.3), transparent);
  box-shadow: 0 0 18px rgba(255, 232, 161, 0.35);
}

.time-axis i {
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 239, 187, 0.54);
  border-radius: 50%;
  background: #130d21;
  box-shadow: 0 0 18px rgba(243, 208, 107, 0.42);
  transform: translateX(-50%) rotateX(90deg);
}

.time-axis i:nth-child(1) { top: 15%; }
.time-axis i:nth-child(2) { top: 49%; }
.time-axis i:nth-child(3) { top: 82%; }

.plate-layer {
  --layer-z: 0px;
  --layer-scale: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  box-shadow: none;
  opacity: 1;
  transform: translate(-50%, -50%) translateZ(var(--layer-z)) scale(var(--layer-scale));
  transform-style: preserve-3d;
  transition:
    transform 760ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 420ms ease,
    filter 420ms ease;
  cursor: pointer;
}

.plate-layer::before,
.plate-layer::after {
  content: none;
}

.plate-layer > * {
  position: absolute;
  z-index: auto;
  transform: none;
}

.plate-layer:focus-visible {
  outline: none;
}

.plate-layer:focus-visible .plate-face {
  outline: 2px solid rgba(255, 244, 195, 0.92);
  outline-offset: 6px;
}

.plate-edge,
.plate-face {
  inset: 0;
  display: block;
  transform-style: preserve-3d;
}

.plate-face {
  transform: translateZ(3px);
}

.method-qizheng {
  --layer-z: 0px;
  z-index: 2;
  width: var(--disc-size);
  height: var(--disc-size);
  border-radius: 50%;
}

.qizheng-edge {
  inset: 5px;
  border: 1px solid rgba(166, 225, 255, 0.18);
  border-radius: 50%;
  background: rgba(4, 11, 19, 0.68);
  box-shadow:
    0 0 0 8px rgba(17, 50, 65, 0.24),
    0 0 0 14px rgba(94, 208, 255, 0.04),
    0 32px 68px rgba(0, 0, 0, 0.58);
  transform: translateZ(-16px);
}

.qizheng-face {
  overflow: hidden;
  border: 1px solid rgba(178, 229, 255, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 31%, rgba(34, 104, 132, 0.08) 31.3% 31.8%, transparent 32.1% 43%, rgba(94, 208, 255, 0.13) 43.3% 43.8%, transparent 44.1% 66%, rgba(146, 220, 251, 0.12) 66.4% 67%, transparent 67.4%),
    radial-gradient(circle at 50% 50%, rgba(9, 30, 43, 0.24), rgba(3, 7, 14, 0.88) 72%);
  box-shadow:
    inset 0 0 34px rgba(94, 208, 255, 0.1),
    0 0 38px rgba(94, 208, 255, 0.13);
  animation: qizheng-assemble 1.45s 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.qizheng-face::before,
.qizheng-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.qizheng-face::before {
  background: repeating-conic-gradient(from -90deg, rgba(193, 235, 255, 0.38) 0 0.7deg, transparent 0.7deg 12.857deg);
  -webkit-mask: radial-gradient(circle, transparent 0 71.5%, #000 72% 95%, transparent 95.5%);
  mask: radial-gradient(circle, transparent 0 71.5%, #000 72% 95%, transparent 95.5%);
}

.qizheng-face::after {
  inset: 8%;
  border: 1px solid rgba(190, 232, 255, 0.24);
  background: repeating-conic-gradient(from 7deg, rgba(94, 208, 255, 0.34) 0 0.8deg, transparent 0.8deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 79%, #000 80% 100%);
  mask: radial-gradient(circle, transparent 0 79%, #000 80% 100%);
  animation: qizheng-turn 32s linear infinite;
}

.qizheng-sweep {
  inset: 2.5%;
  display: block;
  border-radius: 50%;
  background: conic-gradient(from 40deg, transparent 0 70%, rgba(216, 247, 255, 0.5) 78%, transparent 86% 100%);
  -webkit-mask: radial-gradient(circle, transparent 0 91%, #000 92% 95%, transparent 96%);
  mask: radial-gradient(circle, transparent 0 91%, #000 92% 95%, transparent 96%);
  animation: qizheng-turn 14s linear infinite reverse;
}

.qizheng-ticks,
.qizheng-bodies,
.qizheng-orbits {
  inset: 0;
  display: block;
  transform-style: preserve-3d;
  pointer-events: none;
}

.qizheng-ticks i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(183, 230, 255, 0.16);
  color: rgba(225, 246, 255, 0.74);
  background: rgba(5, 18, 28, 0.78);
  font-family: "Songti SC", "STSong", serif;
  font-size: 9px;
  font-style: normal;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-246px) rotate(var(--counter-angle)) translateZ(5px);
}

.qizheng-bodies i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(207, 240, 255, 0.54);
  border-radius: 50%;
  color: #eafaff;
  background: radial-gradient(circle at 35% 28%, #f7fdff, #5ed0ff 24%, #123a4e 66%);
  box-shadow: 0 0 14px rgba(94, 208, 255, 0.45);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-190px) rotate(var(--counter-angle)) translateZ(var(--node-z));
}

.qizheng-bodies i:nth-child(1) {
  color: #2e1b05;
  background: radial-gradient(circle at 35% 28%, #fff, #ffe48a 28%, #d68e1d 70%);
  box-shadow: 0 0 20px rgba(255, 218, 111, 0.72);
}

.qizheng-bodies i:nth-child(2) {
  color: #1a2030;
  background: radial-gradient(circle at 35% 28%, #fff, #d9e5ff 34%, #7585a9 72%);
}

.qizheng-orbit {
  position: absolute;
  inset: 22%;
  display: block;
  border: 1px solid rgba(130, 218, 255, 0.27);
  border-radius: 50%;
  box-shadow: inset 0 0 12px rgba(94, 208, 255, 0.08);
  transform-style: preserve-3d;
}

.qizheng-orbit.orbit-one {
  transform: translateZ(20px) rotateX(68deg) rotateZ(22deg);
  animation: orbit-precession-one 18s linear infinite;
}

.qizheng-orbit.orbit-two {
  inset: 27%;
  border-color: rgba(255, 232, 161, 0.25);
  transform: translateZ(34px) rotateY(62deg) rotateZ(-16deg);
  animation: orbit-precession-two 23s linear infinite reverse;
}

.qizheng-orbit.orbit-three {
  inset: 32%;
  border-style: dashed;
  transform: translateZ(46px) rotateX(48deg) rotateY(34deg);
  animation: orbit-precession-three 28s linear infinite;
}

.layer-caption {
  display: grid;
  gap: 2px;
  pointer-events: none;
  text-align: center;
}

.plate-layer .layer-caption small,
.plate-layer .layer-caption em {
  color: rgba(221, 242, 255, 0.64);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.12em;
}

.plate-layer .layer-caption strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  letter-spacing: 0.14em;
}

.qizheng-caption {
  left: 50%;
  bottom: 38px;
  min-width: 170px;
  padding: 7px 12px;
  border: 1px solid rgba(133, 218, 255, 0.18);
  border-radius: 999px;
  background: rgba(3, 13, 23, 0.76);
  transform: translateX(-50%) translateZ(24px);
}

.plate-layer .qizheng-caption strong { color: #c9f2ff; }
.plate-layer .qizheng-caption em { color: rgba(126, 216, 255, 0.76); }

.method-ziwei {
  --layer-z: 48px;
  z-index: 4;
  width: var(--ziwei-size);
  height: var(--ziwei-size);
}

.ziwei-edge {
  inset: 4px;
  border: 1px solid rgba(188, 172, 255, 0.28);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(42, 29, 70, 0.95), rgba(13, 9, 25, 0.94));
  box-shadow: 18px 28px 44px rgba(0, 0, 0, 0.42), 0 0 26px rgba(176, 157, 255, 0.1);
  transform: translateZ(-13px);
}

.ziwei-face {
  border: 1px solid rgba(195, 181, 255, 0.54);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(199, 183, 255, 0.08), transparent 38%),
    rgba(17, 12, 32, 0.9);
  box-shadow: inset 0 0 32px rgba(176, 157, 255, 0.08), 0 0 34px rgba(131, 107, 218, 0.15);
  animation: ziwei-assemble 1.1s 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.ziwei-corner {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(176, 157, 255, 0.2);
  transform: translateZ(5px) rotate(45deg);
  pointer-events: none;
}

.ziwei-corner.corner-one { left: -18px; top: -18px; }
.ziwei-corner.corner-two { right: -18px; bottom: -18px; }

.ziwei-palace-grid {
  inset: 8px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
  pointer-events: none;
}

.ziwei-palace-grid i {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  border: 1px solid rgba(190, 175, 255, 0.22);
  border-radius: 8px;
  color: rgba(239, 235, 255, 0.82);
  background: linear-gradient(145deg, rgba(176, 157, 255, 0.09), rgba(12, 8, 25, 0.28));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  font-style: normal;
  transform: translateZ(6px);
  transition: 320ms ease;
}

.ziwei-palace-grid i:empty {
  border-color: rgba(176, 157, 255, 0.05);
  background: rgba(4, 3, 10, 0.28);
  transform: translateZ(0);
}

.ziwei-palace-grid i b {
  color: #f4efff;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
}

.ziwei-palace-grid i small {
  color: rgba(205, 194, 255, 0.52);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.ziwei-palace-grid i.is-life,
.ziwei-palace-grid i.is-body {
  border-color: rgba(255, 233, 154, 0.72);
  background: linear-gradient(145deg, rgba(255, 218, 111, 0.2), rgba(85, 60, 139, 0.34));
  box-shadow: 0 0 20px rgba(219, 186, 101, 0.22), inset 0 1px rgba(255, 255, 255, 0.18);
  transform: translateZ(19px);
}

.ziwei-palace-grid i.is-life::after,
.ziwei-palace-grid i.is-body::before {
  position: absolute;
  top: 3px;
  padding: 1px 3px;
  border-radius: 4px;
  color: #241606;
  background: var(--gold);
  font-size: 6px;
  font-weight: 900;
}

.ziwei-palace-grid i.is-life::after { content: "命"; right: 3px; }
.ziwei-palace-grid i.is-body::before { content: "身"; left: 3px; }

.ziwei-core {
  left: 50%;
  top: 50%;
  width: calc(50% - 13px);
  height: calc(50% - 13px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(205, 194, 255, 0.18);
  border-radius: 16px;
  background: radial-gradient(circle, rgba(100, 76, 165, 0.32), rgba(8, 6, 17, 0.82) 68%);
  box-shadow: inset 0 0 24px rgba(176, 157, 255, 0.1);
  transform: translate(-50%, -50%) translateZ(11px);
  pointer-events: none;
}

.plate-layer .ziwei-core small {
  color: rgba(213, 203, 255, 0.55);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.plate-layer .ziwei-core strong {
  color: #eee8ff;
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
  letter-spacing: 0.14em;
}

.plate-layer .ziwei-core b,
.plate-layer .ziwei-core em {
  color: rgba(255, 240, 190, 0.74);
  font-size: 8px;
  font-style: normal;
}

.method-bazi {
  --layer-z: 102px;
  z-index: 6;
  width: var(--bazi-width);
  height: var(--bazi-height);
}

.bazi-edge {
  inset: 4px;
  border: 1px solid rgba(255, 221, 126, 0.28);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(83, 53, 17, 0.94), rgba(23, 15, 20, 0.96));
  box-shadow: 20px 30px 42px rgba(0, 0, 0, 0.46), 0 0 32px rgba(243, 208, 107, 0.13);
  transform: translateZ(-14px);
}

.bazi-face {
  overflow: visible;
  border: 1px solid rgba(255, 225, 139, 0.62);
  border-radius: 24px;
  background:
    linear-gradient(90deg, transparent 0 24.6%, rgba(255, 229, 152, 0.08) 25% 25.4%, transparent 25.8% 49.6%, rgba(255, 229, 152, 0.08) 50% 50.4%, transparent 50.8% 74.6%, rgba(255, 229, 152, 0.08) 75% 75.4%, transparent 75.8%),
    radial-gradient(circle at 50% 0%, rgba(255, 222, 128, 0.18), transparent 44%),
    rgba(31, 21, 14, 0.94);
  box-shadow: inset 0 0 28px rgba(243, 208, 107, 0.1), 0 0 36px rgba(243, 208, 107, 0.15);
  animation: bazi-assemble 880ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.bazi-inscription {
  left: 50%;
  top: 9px;
  z-index: 4;
  display: flex;
  align-items: baseline;
  gap: 7px;
  transform: translateX(-50%) translateZ(23px);
  white-space: nowrap;
}

.plate-layer .bazi-inscription small {
  color: rgba(255, 232, 167, 0.54);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.plate-layer .bazi-inscription strong {
  color: #fff0b4;
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  letter-spacing: 0.12em;
}

.bazi-face .mini-pillars {
  position: absolute;
  inset: 36px 14px 15px;
  width: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  transform-style: preserve-3d;
}

.bazi-face .mini-pillars i {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr 1fr;
  place-items: center;
  gap: 2px;
  min-width: 0;
  padding: 7px 3px 6px;
  border: 1px solid rgba(255, 227, 144, 0.46);
  border-radius: 9px;
  color: #fff0b4;
  background: linear-gradient(155deg, rgba(255, 225, 140, 0.23), rgba(71, 42, 15, 0.83));
  box-shadow: 5px 8px 14px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.18);
  transform-style: preserve-3d;
}

.bazi-face .mini-pillars i:nth-child(1) { transform: translateZ(12px); }
.bazi-face .mini-pillars i:nth-child(2) { transform: translateZ(18px); }
.bazi-face .mini-pillars i:nth-child(3) { transform: translateZ(27px); }
.bazi-face .mini-pillars i:nth-child(4) { transform: translateZ(15px); }

.bazi-face .mini-pillars i::before,
.bazi-face .mini-pillars i::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.bazi-face .mini-pillars i::before {
  top: 5px;
  right: -7px;
  width: 7px;
  height: calc(100% - 5px);
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, #684019, #241409);
  transform: rotateY(90deg);
  transform-origin: left center;
}

.bazi-face .mini-pillars i::after {
  left: 5px;
  bottom: -7px;
  width: calc(100% - 5px);
  height: 7px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(#4f3013, #1d1108);
  transform: rotateX(-90deg);
  transform-origin: center top;
}

.bazi-face .mini-pillars small {
  color: rgba(255, 233, 169, 0.52);
  font-size: 7px;
  font-style: normal;
}

.bazi-face .mini-pillars b,
.bazi-face .mini-pillars em {
  display: grid;
  place-items: center;
  color: #fff2bd;
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
  font-style: normal;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 221, 117, 0.28);
}

.bazi-face .mini-pillars em {
  color: rgba(255, 244, 207, 0.7);
}

.bazi-flow {
  left: 12%;
  right: 12%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 224, 132, 0.62), transparent);
  box-shadow: 0 0 12px rgba(243, 208, 107, 0.4);
  opacity: 0.38;
  transform: translateZ(31px);
  animation: bazi-flow 2.8s ease-in-out infinite;
}

.bazi-flow.flow-one { top: 48%; }
.bazi-flow.flow-two { top: 72%; animation-delay: -1.35s; }

.fusion-core {
  --core-z: 174px;
  position: absolute;
  z-index: 10;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(255, 245, 206, 0.84);
  border-radius: 50%;
  color: #291805;
  background: radial-gradient(circle at 34% 28%, #fff, #ffe89a 23%, #c78a2e 72%);
  box-shadow: 0 0 0 10px rgba(243, 208, 107, 0.05), 0 0 42px rgba(243, 208, 107, 0.38);
  transform: translate(-50%, -50%) translateZ(var(--core-z));
  transform-style: preserve-3d;
  transition: transform 760ms cubic-bezier(0.16, 1, 0.3, 1), opacity 360ms ease;
  cursor: pointer;
  animation: fusion-arrival 760ms 820ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.fusion-core span {
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
}

.fusion-core small {
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.fusion-core i {
  position: absolute;
  inset: -17px;
  border: 1px solid rgba(255, 239, 180, 0.28);
  border-radius: 50%;
  animation: core-spin 13s linear infinite;
}

.fusion-core i:nth-of-type(2) {
  inset: -27px;
  border-color: rgba(94, 208, 255, 0.2);
  border-style: dashed;
  animation-duration: 19s;
  animation-direction: reverse;
}

.orbit-rig.is-exploded .method-qizheng { --layer-z: -46px; }
.orbit-rig.is-exploded .method-ziwei { --layer-z: 72px; }
.orbit-rig.is-exploded .method-bazi { --layer-z: 164px; }
.orbit-rig.is-exploded .fusion-core { --core-z: 252px; }

.three-d-viewport[data-focus="bazi"] .method-bazi,
.three-d-viewport[data-focus="ziwei"] .method-ziwei,
.three-d-viewport[data-focus="qizheng"] .method-qizheng {
  --layer-z: 220px;
  --layer-scale: 1.08;
  z-index: 12;
  transform: translate(-50%, -50%) translateZ(var(--layer-z)) scale(var(--layer-scale));
}

.three-d-viewport[data-focus="bazi"] .plate-layer:not(.method-bazi),
.three-d-viewport[data-focus="ziwei"] .plate-layer:not(.method-ziwei),
.three-d-viewport[data-focus="qizheng"] .plate-layer:not(.method-qizheng) {
  opacity: 0.16;
  filter: saturate(0.35) brightness(0.68);
}

.three-d-viewport[data-focus] .fusion-core {
  opacity: 0.28;
}

.orbit-rig.is-converging .qizheng-sweep {
  animation-duration: 2.2s;
}

.orbit-rig.is-converging .plate-layer {
  opacity: 1;
  transform: translate(-50%, -50%) translateZ(var(--layer-z)) scale(var(--layer-scale));
}

.orbit-rig.is-converging .qizheng-face::after {
  animation-duration: 4.2s;
}

.orbit-rig.is-converging .ziwei-palace-grid i:not(:empty) {
  animation: palace-lock 900ms var(--cell-delay, 0ms) ease both;
}

.orbit-rig.is-converging .bazi-face .mini-pillars i {
  animation: pillar-lock 820ms var(--pillar-delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1) both;
}

.orbit-rig.is-converging .fusion-core {
  animation: fusion-lock 1.5s ease-in-out infinite;
}

.method-bazi.is-calculated .bazi-face {
  border-color: rgba(255, 232, 157, 0.9);
  box-shadow: inset 0 0 30px rgba(243, 208, 107, 0.16), 0 0 46px rgba(243, 208, 107, 0.22);
}

.method-ziwei.is-basic .ziwei-face {
  border-color: rgba(211, 199, 255, 0.78);
}

.method-qizheng.is-pending .qizheng-caption em {
  color: rgba(126, 216, 255, 0.9);
}

.stage-phase {
  position: absolute;
  z-index: 14;
  left: 18px;
  bottom: 16px;
  max-width: min(320px, calc(100% - 36px));
  display: grid;
  gap: 3px;
  padding: 10px 13px;
  border: 1px solid rgba(186, 225, 255, 0.13);
  border-radius: 14px;
  color: rgba(247, 244, 255, 0.74);
  background: rgba(5, 5, 14, 0.66);
  backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity 220ms ease, border-color 220ms ease;
}

.three-d-viewport.is-casting .stage-phase {
  border-color: rgba(255, 229, 151, 0.34);
  opacity: 1;
}

.stage-phase span {
  color: rgba(94, 208, 255, 0.66);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.stage-phase b {
  color: #fff4cf;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
}

.stage-phase small {
  overflow: hidden;
  color: rgba(231, 235, 248, 0.5);
  font-size: 9px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-controls {
  flex-wrap: wrap;
}

.stage-controls button[aria-pressed="true"] {
  border-color: rgba(243, 208, 107, 0.44);
  color: #fff0b8;
  background: rgba(243, 208, 107, 0.09);
}

@keyframes instrument-arrival {
  from { opacity: 0; transform: translate(-50%, -43%) rotateX(68deg) rotateY(-10deg) rotateZ(-18deg) scale(0.76); }
  70% { opacity: 1; transform: translate(-50%, -51%) rotateX(var(--rig-x)) rotateY(var(--rig-y)) rotateZ(-2deg) scale(1.025); }
  to { opacity: 1; transform: translate(-50%, -50%) rotateX(var(--rig-x)) rotateY(var(--rig-y)) rotateZ(-4deg) scale(1); }
}

@keyframes qizheng-assemble {
  from { opacity: 0; transform: scale(0.28) rotate(-36deg); filter: brightness(2); }
  72% { opacity: 1; transform: scale(1.035) rotate(2deg); }
  to { opacity: 1; transform: scale(1) rotate(0); filter: brightness(1); }
}

@keyframes ziwei-assemble {
  from { opacity: 0; transform: translateZ(-35px) scale(0.42) rotate(28deg); }
  76% { opacity: 1; transform: translateZ(6px) scale(1.04) rotate(-2deg); }
  to { opacity: 1; transform: translateZ(3px) scale(1) rotate(0); }
}

@keyframes bazi-assemble {
  from { opacity: 0; transform: translateZ(-48px) scale(0.58); }
  72% { opacity: 1; transform: translateZ(12px) scale(1.04); }
  to { opacity: 1; transform: translateZ(3px) scale(1); }
}

@keyframes fusion-arrival {
  from { opacity: 0; transform: translate(-50%, -50%) translateZ(80px) scale(0.2); }
  72% { opacity: 1; transform: translate(-50%, -50%) translateZ(var(--core-z)) scale(1.18); }
  to { opacity: 1; transform: translate(-50%, -50%) translateZ(var(--core-z)) scale(1); }
}

@keyframes qizheng-turn { to { transform: rotate(360deg); } }
@keyframes orbit-precession-one { to { transform: translateZ(20px) rotateX(68deg) rotateZ(382deg); } }
@keyframes orbit-precession-two { to { transform: translateZ(34px) rotateY(62deg) rotateZ(344deg); } }
@keyframes orbit-precession-three { to { transform: translateZ(46px) rotateX(48deg) rotateY(34deg) rotateZ(360deg); } }

@keyframes bazi-flow {
  0%, 100% { opacity: 0.14; transform: translateZ(31px) scaleX(0.45); }
  50% { opacity: 0.62; transform: translateZ(31px) scaleX(1); }
}

@keyframes pillar-lock {
  from { opacity: 0.25; transform: translateZ(-34px) scale(0.7); filter: brightness(2); }
  72% { opacity: 1; transform: translateZ(34px) scale(1.06); }
  to { opacity: 1; transform: translateZ(20px) scale(1); filter: brightness(1); }
}

@keyframes palace-lock {
  from { opacity: 0.2; transform: translateZ(-20px) scale(0.65); }
  70% { opacity: 1; transform: translateZ(20px) scale(1.05); }
  to { opacity: 1; transform: translateZ(6px) scale(1); }
}

@keyframes fusion-lock {
  0%, 100% { box-shadow: 0 0 0 10px rgba(243, 208, 107, 0.04), 0 0 38px rgba(243, 208, 107, 0.32); }
  50% { box-shadow: 0 0 0 24px rgba(243, 208, 107, 0.03), 0 0 76px rgba(243, 208, 107, 0.68); }
}

@media (max-width: 760px) {
  .three-d-viewport {
    height: 470px;
    border-radius: 32px;
    perspective: 900px;
  }

  .orbit-rig {
    --rig-x: 46deg;
    --rig-y: -4deg;
    --disc-size: 400px;
    --ziwei-size: 242px;
    --bazi-width: 178px;
    --bazi-height: 126px;
    top: 50%;
  }

  .qizheng-ticks i {
    width: 13px;
    height: 13px;
    border-color: rgba(183, 230, 255, 0.1);
    font-size: 6px;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-176px) rotate(var(--counter-angle)) translateZ(4px);
  }

  .qizheng-ticks i:nth-child(even) {
    color: rgba(225, 246, 255, 0.35);
  }

  .qizheng-bodies i {
    width: 17px;
    height: 17px;
    font-size: 7px;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-137px) rotate(var(--counter-angle)) translateZ(var(--node-z));
  }

  .qizheng-caption {
    bottom: 23px;
    min-width: 134px;
    padding: 5px 8px;
  }

  .plate-layer .qizheng-caption small { display: none; }
  .plate-layer .qizheng-caption strong { font-size: 12px; }

  .ziwei-palace-grid {
    inset: 6px;
    gap: 2px;
  }

  .ziwei-palace-grid i {
    border-radius: 5px;
  }

  .ziwei-palace-grid i b { font-size: 9px; }
  .ziwei-palace-grid i small { font-size: 5px; }

  .ziwei-core {
    width: calc(50% - 10px);
    height: calc(50% - 10px);
    border-radius: 10px;
    gap: 2px;
  }

  .plate-layer .ziwei-core small { display: none; }
  .plate-layer .ziwei-core strong { font-size: 13px; }
  .plate-layer .ziwei-core b,
  .plate-layer .ziwei-core em { font-size: 6px; }

  .bazi-inscription {
    top: 6px;
  }

  .plate-layer .bazi-inscription small { display: none; }
  .plate-layer .bazi-inscription strong { font-size: 11px; }

  .bazi-face .mini-pillars {
    inset: 28px 9px 10px;
    gap: 5px;
  }

  .bazi-face .mini-pillars i {
    padding: 5px 1px 4px;
    border-radius: 6px;
  }

  .bazi-face .mini-pillars b,
  .bazi-face .mini-pillars em { font-size: 13px; }
  .bazi-face .mini-pillars small { font-size: 5px; }

  .fusion-core {
    width: 48px;
    height: 48px;
  }

  .fusion-core span { font-size: 18px; }
  .fusion-core small { font-size: 5px; }

  .orbit-rig.is-exploded .method-qizheng { --layer-z: -28px; }
  .orbit-rig.is-exploded .method-ziwei { --layer-z: 54px; }
  .orbit-rig.is-exploded .method-bazi { --layer-z: 124px; }
  .orbit-rig.is-exploded .fusion-core { --core-z: 194px; }

  .three-d-viewport[data-focus="bazi"] .method-bazi,
  .three-d-viewport[data-focus="ziwei"] .method-ziwei,
  .three-d-viewport[data-focus="qizheng"] .method-qizheng {
    --layer-z: 154px;
    --layer-scale: 1.04;
  }

  .stage-phase {
    left: 12px;
    bottom: 10px;
    max-width: calc(100% - 24px);
    padding: 8px 10px;
  }
}

@media (max-width: 430px) {
  .three-d-viewport {
    height: 420px;
  }

  .orbit-rig {
    --disc-size: 352px;
    --ziwei-size: 214px;
    --bazi-width: 160px;
    --bazi-height: 114px;
    top: 48%;
  }

  .qizheng-ticks i {
    width: 11px;
    height: 11px;
    font-size: 5px;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-155px) rotate(var(--counter-angle)) translateZ(3px);
  }

  .qizheng-bodies i {
    width: 15px;
    height: 15px;
    font-size: 6px;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-119px) rotate(var(--counter-angle)) translateZ(var(--node-z));
  }

  .qizheng-caption {
    bottom: 18px;
  }

  .stage-controls {
    gap: 6px;
  }

  .stage-controls button {
    min-height: 40px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .stage-hint {
    padding-left: 28px;
  }
}

@media (hover: none) {
  .nebula {
    filter: blur(10px);
  }

  .plate-face,
  .plate-edge {
    backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orbit-rig,
  .qizheng-face,
  .ziwei-face,
  .bazi-face,
  .fusion-core,
  .qizheng-sweep,
  .qizheng-face::after,
  .qizheng-orbit,
  .bazi-flow {
    animation: none !important;
  }
}

@supports not (transform-style: preserve-3d) {
  .orbit-rig {
    transform: translate(-50%, -50%);
  }

  .plate-layer,
  .method-qizheng,
  .method-ziwei,
  .method-bazi {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }

  .fusion-core {
    transform: translate(-50%, -50%);
  }
}

/* Immersive, data-bearing summary cards. */
.immersive-summary-deck {
  gap: clamp(18px, 2vw, 30px);
}

.tool-summary-card {
  --pointer-x: 50%;
  --pointer-y: 45%;
  --card-accent: 243, 208, 107;
  position: relative;
  isolation: isolate;
  min-height: 430px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transform: none;
  transform-style: flat;
  transition:
    border-color 260ms ease,
    box-shadow 260ms ease,
    filter 120ms ease;
  box-shadow:
    0 34px 75px rgba(0, 0, 0, 0.38),
    0 12px 30px rgba(var(--card-accent), 0.06),
    inset 0 1px rgba(255, 255, 255, 0.07);
}

.tool-summary-card::before,
.tool-summary-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.tool-summary-card::before {
  z-index: -2;
  inset: 10px;
  border: 1px solid rgba(var(--card-accent), 0.12);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 27%),
    radial-gradient(circle at 50% 120%, rgba(var(--card-accent), 0.11), transparent 53%);
  transform: translateZ(-34px) scale(0.985);
}

.tool-summary-card::after {
  z-index: -3;
  left: 10%;
  right: 10%;
  bottom: -42px;
  height: 82px;
  border-radius: 50%;
  background: rgba(var(--card-accent), 0.25);
  filter: blur(34px);
  opacity: 0.25;
  transform: translateZ(-70px) rotateX(78deg);
  transition: opacity 260ms ease, filter 260ms ease;
}

.snapshot-bazi.tool-summary-card {
  --card-accent: 243, 208, 107;
  background:
    linear-gradient(155deg, rgba(243, 208, 107, 0.09), transparent 38%),
    rgba(20, 16, 31, 0.84);
}

.snapshot-ziwei.tool-summary-card {
  --card-accent: 176, 157, 255;
  background:
    linear-gradient(155deg, rgba(176, 157, 255, 0.11), transparent 40%),
    rgba(18, 15, 34, 0.86);
}

.snapshot-qizheng.tool-summary-card {
  --card-accent: 94, 208, 255;
  background:
    linear-gradient(155deg, rgba(94, 208, 255, 0.1), transparent 40%),
    rgba(14, 16, 31, 0.86);
}

.summary-card-aura,
.summary-card-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.summary-card-aura {
  z-index: -1;
  inset: -28%;
  background:
    radial-gradient(
      circle at var(--pointer-x) var(--pointer-y),
      rgba(var(--card-accent), 0.3),
      rgba(var(--card-accent), 0.08) 18%,
      transparent 42%
    );
  filter: blur(12px);
  opacity: 0.38;
  transform: translateZ(-18px);
  transition: opacity 260ms ease;
}

.summary-card-grid {
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(rgba(var(--card-accent), 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--card-accent), 0.035) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 84%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 84%);
  opacity: 0.55;
  transform: translateZ(-8px);
}

.tool-summary-card > header {
  position: relative;
  z-index: 4;
}

.tool-summary-card > .result-pillars,
.tool-summary-card > .ziwei-orbit-result,
.tool-summary-card > .qizheng-orbit-result {
  position: relative;
  z-index: 3;
  transition: filter 260ms ease;
}

.tool-summary-card > h3 {
  position: relative;
  z-index: 4;
}

.tool-summary-card > p {
  position: relative;
  z-index: 3;
}

.tool-card-enter {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(var(--card-accent), 0.16);
}

.tool-card-enter > span {
  display: grid;
  gap: 3px;
}

.tool-card-enter small {
  color: rgba(230, 226, 242, 0.52);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.tool-card-enter b {
  color: rgb(var(--card-accent));
  font-size: 13px;
}

.tool-card-enter > i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid rgba(var(--card-accent), 0.28);
  border-radius: 50%;
  color: rgb(var(--card-accent));
  background: rgba(var(--card-accent), 0.075);
  box-shadow: 0 0 24px rgba(var(--card-accent), 0.1);
  font-size: 17px;
  font-style: normal;
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.tool-summary-card:is(:hover, :focus-visible, .is-pointer-active) {
  border-color: rgba(var(--card-accent), 0.48);
  box-shadow:
    0 48px 96px rgba(0, 0, 0, 0.5),
    0 18px 48px rgba(var(--card-accent), 0.13),
    inset 0 1px rgba(255, 255, 255, 0.1);
}

.tool-summary-card:is(:hover, :focus-visible, .is-pointer-active) .summary-card-aura,
.tool-summary-card:is(:hover, :focus-visible, .is-pointer-active)::after {
  opacity: 0.72;
}

.tool-summary-card:is(:hover, :focus-visible, .is-pointer-active) > .result-pillars,
.tool-summary-card:is(:hover, :focus-visible, .is-pointer-active) > .ziwei-orbit-result,
.tool-summary-card:is(:hover, :focus-visible, .is-pointer-active) > .qizheng-orbit-result {
  filter: drop-shadow(0 18px 28px rgba(var(--card-accent), 0.13));
}

.tool-summary-card:is(:hover, :focus-visible) .tool-card-enter > i {
  transform: translate3d(3px, -3px, 12px);
  background: rgba(var(--card-accent), 0.14);
  box-shadow: 0 0 32px rgba(var(--card-accent), 0.22);
}

.tool-summary-card:focus-visible {
  outline: 2px solid rgb(var(--card-accent));
  outline-offset: 5px;
}

.tool-summary-card.is-pressed {
  filter: brightness(0.96);
  transition-duration: 80ms;
}

@media (min-width: 1081px) {
  .reading-section .immersive-summary-deck {
    margin-block: 12px 42px;
  }

}

@media (max-width: 900px), (hover: none) {
  .tool-summary-card {
    min-height: 340px;
    transform: none !important;
    transform-style: flat;
    will-change: auto;
  }

  .tool-summary-card > header,
  .tool-summary-card > .result-pillars,
  .tool-summary-card > .ziwei-orbit-result,
  .tool-summary-card > .qizheng-orbit-result,
  .tool-summary-card > h3,
  .tool-summary-card > p,
  .tool-card-enter,
  .summary-card-aura,
  .summary-card-grid {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-summary-card,
  .tool-summary-card *,
  .tool-summary-card::before,
  .tool-summary-card::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .tool-summary-card {
    transform: none !important;
    will-change: auto;
  }

  .tool-summary-card > header,
  .tool-summary-card > .result-pillars,
  .tool-summary-card > .ziwei-orbit-result,
  .tool-summary-card > .qizheng-orbit-result,
  .tool-summary-card > h3,
  .tool-summary-card > p,
  .tool-card-enter,
  .summary-card-aura,
  .summary-card-grid {
    transform: none !important;
  }
}

@supports not (transform-style: preserve-3d) {
  .tool-summary-card,
  .tool-summary-card > * {
    transform: none !important;
  }
}

/* 三术合参：与三张单盘不同的同轴观察舱。 */
.hecan-tool-switcher {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  backdrop-filter: blur(16px);
}

.hecan-tool-switcher a {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  color: rgba(245, 239, 255, 0.58);
  text-decoration: none;
  font-size: 11px;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.hecan-tool-switcher a:hover,
.hecan-tool-switcher a.active {
  color: #fff8e6;
  background: linear-gradient(120deg, rgba(243, 208, 107, 0.14), rgba(176, 157, 255, 0.12), rgba(94, 208, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(255, 238, 190, 0.13);
}

.hecan-detail-gate {
  position: relative;
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: clamp(16px, 2.8vw, 26px);
  border: 1px solid rgba(255, 238, 190, 0.12);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 0%, rgba(243, 208, 107, 0.13), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(94, 208, 255, 0.1), transparent 30%),
    rgba(7, 8, 18, 0.58);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.055);
}

.hecan-detail-heading {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.hecan-detail-heading h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(28px, 3vw, 44px);
}

.hecan-detail-heading p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

#hecanAccessBadge {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(255, 238, 190, 0.18);
  border-radius: 999px;
  color: rgba(255, 249, 232, 0.82);
  background: rgba(255, 255, 255, 0.055);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hecan-detail-content {
  display: grid;
  gap: 18px;
  min-width: 0;
  transition: filter 240ms ease, opacity 240ms ease;
}

.hecan-detail-gate.locked .hecan-detail-content {
  max-height: 860px;
  overflow: hidden;
  filter: blur(13px) brightness(0.58) saturate(0.72);
  opacity: 0.68;
  pointer-events: none;
  user-select: none;
  mask-image: linear-gradient(to bottom, black 0%, black 48%, transparent 100%);
}

.hecan-detail-lock {
  position: relative;
  z-index: 5;
}

.hecan-record-list {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 12px;
  padding: clamp(14px, 2vw, 18px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 58%),
    rgba(8, 10, 20, 0.52);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055);
}

.hecan-record-list:empty {
  display: none;
}

.hecan-record-list header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hecan-record-list h3 {
  margin: 0;
  color: rgba(255, 249, 232, 0.92);
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(20px, 2vw, 26px);
}

.hecan-record-list p {
  margin: 5px 0 0;
  color: rgba(245, 239, 255, 0.62);
  font-size: 12px;
  line-height: 1.7;
}

.hecan-record-count {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(255, 238, 190, 0.14);
  border-radius: 999px;
  color: rgba(255, 249, 232, 0.78);
  background: rgba(255, 255, 255, 0.045);
  font-size: 11px;
  font-weight: 900;
}

.hecan-record-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.hecan-record-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.042);
}

.hecan-record-item.current {
  border-color: rgba(243, 208, 107, 0.32);
  box-shadow: inset 0 0 0 1px rgba(243, 208, 107, 0.08);
}

.hecan-record-item b {
  color: rgba(255, 249, 232, 0.9);
  font-size: 13px;
}

.hecan-record-item small {
  color: rgba(245, 239, 255, 0.58);
  font-size: 11px;
  line-height: 1.55;
}

.hecan-record-item button {
  justify-self: start;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 238, 190, 0.14);
  border-radius: 999px;
  color: rgba(255, 249, 232, 0.82);
  background: rgba(255, 255, 255, 0.045);
  cursor: pointer;
}

.hecan-detail-gate.locked .hecan-detail-lock {
  position: absolute;
  top: clamp(112px, 10vw, 168px);
  left: 50%;
  width: min(760px, calc(100% - 42px));
  transform: translateX(-50%);
}

.hecan-lock-panel,
.hecan-unlocked-note {
  display: grid;
  gap: 18px;
  border: 1px solid rgba(255, 238, 190, 0.2);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.045)),
    rgba(9, 9, 20, 0.86);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px) saturate(1.45);
}

.hecan-lock-panel {
  grid-template-columns: 76px 1fr;
  align-items: start;
  padding: clamp(20px, 3vw, 30px);
}

.hecan-lock-seal {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 24px;
  color: #24180a;
  background: linear-gradient(135deg, var(--gold), #fff0ae);
  font-family: "Songti SC", "STSong", serif;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(243, 208, 107, 0.25);
}

.hecan-lock-panel h3 {
  margin: 0;
  color: rgba(255, 249, 232, 0.96);
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(24px, 3vw, 34px);
}

.hecan-lock-panel p:not(.eyebrow) {
  margin: 9px 0 0;
  color: rgba(245, 239, 255, 0.72);
  font-size: 13px;
  line-height: 1.8;
}

.hecan-lock-meta,
.hecan-lock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.hecan-lock-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 999px;
  color: rgba(255, 250, 241, 0.66);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
}

.hecan-lock-actions button {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 250, 241, 0.8);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.hecan-lock-actions .primary-btn {
  color: #24180a;
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), #fff0ae);
  box-shadow: 0 14px 34px rgba(243, 208, 107, 0.2);
}

.hecan-lock-actions .ghost-btn:hover,
.hecan-lock-actions .primary-btn:hover {
  transform: translateY(-1px);
}

.hecan-unlocked-note {
  grid-template-columns: 1fr;
  padding: 13px 16px;
  color: rgba(245, 239, 255, 0.7);
  font-size: 12px;
  line-height: 1.7;
}

.hecan-unlocked-note b {
  color: var(--gold-soft);
}

.fusion-confidence-matrix {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.046), transparent 54%),
    rgba(9, 9, 20, 0.66);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
}

.fusion-consultation {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid rgba(255, 238, 190, 0.13);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 4%, rgba(243, 208, 107, 0.14), transparent 28%),
    radial-gradient(circle at 92% 18%, rgba(94, 208, 255, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(18, 13, 31, 0.86), rgba(6, 7, 16, 0.9));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.07);
}

.fusion-consultation::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 78%);
}

.fusion-consultation > header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.fusion-consultation h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(26px, 3vw, 42px);
}

.fusion-consultation > header > p {
  max-width: 460px;
  margin: 0;
  color: rgba(255, 250, 241, 0.72);
  font-size: 11px;
  line-height: 1.75;
  text-align: right;
}

.fusion-consultation > header small {
  color: rgba(245, 239, 255, 0.45);
  font-size: 9px;
}

.consultation-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.consultation-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.075), transparent 35%),
    rgba(255, 255, 255, 0.026);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045);
}

.consultation-bazi { border-color: rgba(243, 208, 107, 0.22); }
.consultation-ziwei { border-color: rgba(176, 157, 255, 0.22); }
.consultation-qizheng { border-color: rgba(94, 208, 255, 0.22); }
.consultation-fusion {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
  border-color: rgba(255, 248, 232, 0.26);
  background:
    radial-gradient(circle at 40% -10%, rgba(243, 208, 107, 0.14), transparent 35%),
    radial-gradient(circle at 100% 30%, rgba(176, 157, 255, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.042);
}

.consultation-fusion header,
.consultation-fusion .consultation-verdict,
.consultation-fusion .consultation-evidence {
  grid-column: 1;
}

.consultation-fusion .consultation-stages,
.consultation-fusion .consultation-double {
  grid-column: 2;
}

.consultation-fusion .consultation-double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.consultation-fusion .consultation-action-plan {
  grid-column: 1 / -1;
}

.consultation-card header,
.consultation-card h3,
.consultation-verdict,
.consultation-stages p,
.consultation-double li,
.consultation-evidence span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.consultation-card header small {
  color: rgba(245, 239, 255, 0.5);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.consultation-card h3 {
  margin: 7px 0 0;
  color: rgba(255, 249, 232, 0.94);
  font-family: "Songti SC", "STSong", serif;
  font-size: 17px;
  line-height: 1.35;
}

.consultation-verdict {
  margin: 0;
  color: rgba(255, 250, 241, 0.82);
  font-size: 11px;
  line-height: 1.75;
}

.consultation-stages {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.consultation-stages li {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 14px;
  background: rgba(4, 6, 13, 0.32);
}

.consultation-stages span,
.consultation-double b {
  display: block;
  color: var(--gold-soft);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.consultation-stages p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.consultation-double {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.consultation-double section {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.consultation-double ul {
  display: grid;
  gap: 5px;
  margin: 7px 0 0;
  padding-left: 15px;
  color: rgba(245, 239, 255, 0.63);
  font-size: 8px;
  line-height: 1.55;
}

.consultation-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.consultation-evidence span {
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: rgba(255, 250, 241, 0.58);
  background: rgba(255, 255, 255, 0.018);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: normal;
}

.consultation-note {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: rgba(245, 239, 255, 0.43);
  font-size: 9px;
  line-height: 1.6;
}

.fusion-confidence-matrix > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.fusion-confidence-matrix h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(24px, 3vw, 38px);
}

.fusion-confidence-matrix > header > p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  text-align: right;
}

.fusion-confidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fusion-confidence-row {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(94, 208, 255, 0.07), transparent 38%),
    rgba(255, 255, 255, 0.026);
}

.fusion-confidence-row.level-high {
  border-color: rgba(243, 208, 107, 0.27);
}

.fusion-confidence-row.level-medium {
  border-color: rgba(176, 157, 255, 0.24);
}

.fusion-confidence-row.level-low {
  border-color: rgba(94, 208, 255, 0.2);
}

.fusion-confidence-row > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.fusion-confidence-row h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.fusion-confidence-row small {
  color: rgba(245, 239, 255, 0.48);
  font-size: 9px;
}

.fusion-confidence-row > header strong {
  min-width: 58px;
  display: grid;
  justify-items: end;
  color: var(--gold-soft);
  font-size: 24px;
  line-height: 1;
}

.fusion-confidence-row > header strong span {
  margin-top: 5px;
  color: rgba(245, 239, 255, 0.55);
  font-size: 9px;
  font-weight: 700;
}

.fusion-confidence-row > p {
  min-height: 36px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.fusion-confidence-cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.fusion-confidence-cell {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 8px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(4, 6, 13, 0.42);
}

.fusion-confidence-cell.is-active {
  border-color: rgba(255, 238, 190, 0.22);
  background: rgba(255, 255, 255, 0.05);
}

.fusion-confidence-cell.is-pending {
  opacity: 0.58;
}

.fusion-confidence-cell span {
  color: rgba(245, 239, 255, 0.52);
  font-size: 8px;
}

.fusion-confidence-cell b {
  color: #fff8e8;
  font-size: 18px;
}

.fusion-confidence-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fusion-confidence-row ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fusion-confidence-row li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  color: rgba(245, 239, 255, 0.62);
  font-size: 9px;
  line-height: 1.55;
}

.fusion-confidence-row li b {
  color: rgba(255, 248, 232, 0.82);
}

.fusion-confidence-row li span {
  min-width: 0;
}

.fusion-confidence-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.fusion-observatory {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid rgba(190, 213, 255, 0.14);
  border-radius: 38px;
  background:
    radial-gradient(circle at 50% 22%, rgba(94, 208, 255, 0.11), transparent 27%),
    radial-gradient(circle at 15% 72%, rgba(243, 208, 107, 0.08), transparent 28%),
    radial-gradient(circle at 86% 70%, rgba(176, 157, 255, 0.1), transparent 30%),
    linear-gradient(155deg, rgba(18, 14, 32, 0.96), rgba(5, 7, 15, 0.98));
  box-shadow: 0 42px 110px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 255, 255, 0.07);
  isolation: isolate;
}

.fusion-observatory::before,
.fusion-observatory::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.fusion-observatory::before {
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 40%, black, transparent 76%);
}

.fusion-observatory::after {
  left: 12%;
  right: 12%;
  bottom: -90px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(243, 208, 107, 0.18), rgba(176, 157, 255, 0.2), rgba(94, 208, 255, 0.2));
  filter: blur(56px);
  opacity: 0.42;
}

.fusion-observatory-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.fusion-observatory-header h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(30px, 4vw, 50px);
}

.fusion-observatory-header > div:first-child > p:last-child {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.fusion-scene-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.fusion-scene-actions button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: rgba(245, 239, 255, 0.65);
  background: rgba(4, 6, 13, 0.6);
  cursor: pointer;
}

.fusion-scene-actions button:hover,
.fusion-scene-actions button.active {
  border-color: rgba(255, 238, 190, 0.3);
  color: #fff8e6;
  background: rgba(255, 255, 255, 0.075);
}

.fusion-observation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(520px, 1fr);
  gap: 16px;
  min-height: 0;
}

.fusion-layer-rail,
.fusion-final-analysis {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  background: rgba(8, 8, 18, 0.58);
  backdrop-filter: blur(18px);
}

.fusion-layer-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: minmax(104px, auto);
  gap: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.fusion-layer-rail > button {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.fusion-layer-rail > button::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% 20%;
  height: 74%;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.18;
}

.fusion-layer-rail > button[data-fusion-layer="sky"]::after { background: var(--cyan); }
.fusion-layer-rail > button[data-fusion-layer="earth"]::after { background: var(--gold); }
.fusion-layer-rail > button[data-fusion-layer="human"]::after { background: var(--purple); }

.fusion-layer-rail > button:hover,
.fusion-layer-rail > button.active {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.055);
  transform: translateY(-3px);
}

.fusion-layer-rail small,
.fusion-final-analysis > small,
.fusion-selection small {
  color: rgba(245, 239, 255, 0.46);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.fusion-layer-rail b {
  position: relative;
  z-index: 1;
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
}

.fusion-layer-rail span,
.fusion-selection span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.fusion-selection {
  min-height: 112px;
  display: none;
  align-content: center;
  gap: 6px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fusion-selection b {
  font-size: 13px;
}

.fusion-scene-shell {
  position: relative;
  min-width: 0;
  min-height: clamp(520px, 44vw, 640px);
  overflow: hidden;
  border: 1px solid rgba(170, 211, 255, 0.12);
  border-radius: 29px;
  background:
    radial-gradient(circle at 50% 42%, rgba(94, 208, 255, 0.06), transparent 24%),
    radial-gradient(circle at 50% 60%, rgba(176, 157, 255, 0.07), transparent 44%),
    linear-gradient(180deg, rgba(3, 6, 14, 0.72), rgba(3, 4, 10, 0.94));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  isolation: isolate;
}

.fusion-scene-shell::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 7%;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 50px, rgba(255, 255, 255, 0.024) 51px 52px);
  pointer-events: none;
}

#fusionCanvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

#fusionCanvas:active { cursor: grabbing; }

.fusion-scene-topline {
  position: absolute;
  z-index: 7;
  left: 16px;
  right: 16px;
  top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.fusion-scene-topline span,
.fusion-scene-topline b {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: rgba(255, 250, 241, 0.78);
  background: rgba(4, 6, 13, 0.58);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fusion-axis-legend {
  position: absolute;
  z-index: 6;
  right: 15px;
  top: 50%;
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
  pointer-events: none;
}

.fusion-axis-legend span {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
}

.fusion-axis-legend span:nth-child(1) { color: var(--cyan); }
.fusion-axis-legend span:nth-child(2) { color: var(--gold); }
.fusion-axis-legend span:nth-child(3) { color: var(--purple); }

.fusion-tooltip {
  position: absolute;
  z-index: 10;
  max-width: 230px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff8e8;
  background: rgba(5, 6, 14, 0.94);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  font-size: 9px;
  line-height: 1.5;
}

.fusion-fallback {
  position: absolute;
  z-index: 8;
  inset: 74px 28px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(5, 6, 14, 0.92);
}

.fusion-scene-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
}

.fusion-final-analysis {
  display: flex;
  flex-direction: column;
  padding: 22px;
}

.fusion-final-analysis h3 {
  margin: 10px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(22px, 2.4vw, 31px);
  line-height: 1.25;
}

.fusion-final-analysis > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.fusion-analysis-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.fusion-analysis-list p {
  position: relative;
  margin: 0;
  padding: 10px 10px 10px 27px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  color: rgba(255, 250, 241, 0.76);
  background: rgba(255, 255, 255, 0.025);
  font-size: 9px;
  line-height: 1.6;
}

.fusion-analysis-list p::before {
  content: "同";
  position: absolute;
  left: 8px;
  top: 10px;
  color: var(--gold);
  font-family: "Songti SC", "STSong", serif;
}

.fusion-analysis-list.contrast p::before {
  content: "异";
  color: var(--cyan);
}

.fusion-question-echo {
  margin-top: auto !important;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.fusion-trend {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 25px;
  background: rgba(5, 7, 15, 0.58);
}

.fusion-trend > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.fusion-trend h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 24px;
}

.fusion-trend label {
  min-width: min(410px, 42vw);
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px 10px;
  color: var(--muted);
  font-size: 9px;
}

.fusion-trend output {
  justify-self: end;
  color: var(--gold-soft);
  font-size: 14px;
  font-weight: 800;
}

.fusion-trend input[type="range"] {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--purple);
}

#fusionTrendChart {
  width: 100%;
  height: auto;
  min-height: 220px;
  display: block;
  margin-top: 12px;
  overflow: visible;
}

#fusionTrendChart .trend-grid {
  stroke: rgba(255, 255, 255, 0.075);
  stroke-width: 1;
}

#fusionTrendChart .trend-axis-label,
#fusionTrendChart .trend-value-label {
  fill: rgba(245, 239, 255, 0.48);
  font-size: 10px;
  font-family: Inter, ui-sans-serif, sans-serif;
}

#fusionTrendChart .trend-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px currentColor);
}

#fusionTrendChart .trend-line.sky { stroke: var(--cyan); color: rgba(94, 208, 255, 0.38); }
#fusionTrendChart .trend-line.earth { stroke: var(--gold); color: rgba(243, 208, 107, 0.32); }
#fusionTrendChart .trend-line.human { stroke: var(--purple); color: rgba(176, 157, 255, 0.36); }

#fusionTrendChart .trend-dot {
  stroke-width: 2;
  cursor: pointer;
}

#fusionTrendChart .trend-dot.sky { fill: #0b1722; stroke: var(--cyan); }
#fusionTrendChart .trend-dot.earth { fill: #1d1609; stroke: var(--gold); }
#fusionTrendChart .trend-dot.human { fill: #171126; stroke: var(--purple); }
#fusionTrendChart .trend-dot.is-selected { r: 6; fill: #fff8e8; }

#fusionTrendChart .trend-shared-marker {
  fill: rgba(255, 248, 232, 0.88);
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 7;
  paint-order: stroke;
}

.fusion-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  color: var(--muted);
  font-size: 9px;
}

.fusion-trend-legend span::before {
  content: "";
  width: 17px;
  height: 2px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
  background: currentColor;
}

.fusion-trend-legend span[data-series="sky"] { color: var(--cyan); }
.fusion-trend-legend span[data-series="earth"] { color: var(--gold); }
.fusion-trend-legend span[data-series="human"] { color: var(--purple); }
.fusion-trend-legend em { margin-left: auto; color: rgba(245, 239, 255, 0.38); font-style: normal; }

.fusion-year-detail {
  min-height: 52px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.fusion-year-detail > div {
  padding: 10px 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.fusion-year-detail > div:nth-child(1) { border-color: var(--cyan); }
.fusion-year-detail > div:nth-child(2) { border-color: var(--gold); }
.fusion-year-detail > div:nth-child(3) { border-color: var(--purple); }
.fusion-year-detail b { display: block; margin-bottom: 4px; color: #fff8e8; font-size: 11px; }

.yangzhai-calibration {
  position: relative;
  z-index: 1;
  padding: 20px;
  border: 1px solid rgba(243, 208, 107, 0.17);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(243, 208, 107, 0.065), rgba(94, 208, 255, 0.035)),
    rgba(255, 255, 255, 0.025);
}

.yangzhai-calibration > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.yangzhai-calibration h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 24px;
}

.yangzhai-calibration p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.yangzhai-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.yangzhai-chips span {
  padding: 7px 10px;
  border: 1px solid rgba(243, 208, 107, 0.18);
  border-radius: 999px;
  color: var(--gold-soft);
  background: rgba(243, 208, 107, 0.045);
  font-size: 11px;
}

.yangzhai-note {
  padding: 10px 12px;
  border: 1px solid rgba(94, 208, 255, 0.15);
  border-radius: 14px;
  background: rgba(94, 208, 255, 0.035);
}

.yangzhai-columns {
  display: grid;
  grid-template-columns: minmax(260px, 0.92fr) minmax(0, 1.08fr);
  gap: 14px;
}

.yangzhai-main,
.yangzhai-risk-list article {
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 3px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(5, 4, 13, 0.28);
}

.yangzhai-main small,
.yangzhai-risk-list small {
  color: rgba(245, 239, 255, 0.48);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.yangzhai-main h3 {
  margin: 8px 0 8px;
  font-size: 21px;
}

.yangzhai-main b,
.yangzhai-risk-list b {
  display: block;
  margin-top: 10px;
  color: #fff7d8;
  font-size: 13px;
}

.yangzhai-risk-list {
  display: grid;
  gap: 10px;
}

.yangzhai-risk-list article.good,
.yangzhai-main.good { border-left-color: #79d88f; }
.yangzhai-risk-list article.watch,
.yangzhai-main.watch { border-left-color: var(--gold); }
.yangzhai-risk-list article.risk,
.yangzhai-main.risk { border-left-color: var(--danger); }
.yangzhai-risk-list article.neutral,
.yangzhai-main.neutral { border-left-color: rgba(245, 239, 255, 0.28); }

.fusion-rules {
  margin-top: 14px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.02);
}

.fusion-rules summary {
  padding: 13px 0;
  color: rgba(255, 250, 241, 0.76);
  font-size: 10px;
  cursor: pointer;
}

.fusion-rules ul {
  margin: 0;
  padding: 0 0 15px 18px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.fusion-rules p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.fusion-rules h4 {
  margin: 14px 0 6px;
  color: rgba(255, 248, 232, 0.82);
  font-size: 10px;
  letter-spacing: 0.08em;
}

@media (max-width: 1260px) {
  .site-header {
    width: min(100% - 36px, 1180px);
  }

  .header-status { display: none; }

  .fusion-confidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consultation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .consultation-fusion {
    grid-template-columns: 1fr;
  }

  .consultation-fusion .consultation-double {
    grid-template-columns: 1fr;
  }

  .consultation-fusion header,
  .consultation-fusion .consultation-verdict,
  .consultation-fusion .consultation-evidence,
  .consultation-fusion .consultation-stages,
  .consultation-fusion .consultation-double {
    grid-column: 1;
  }

  .fusion-observation-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fusion-final-analysis {
    grid-column: 1 / -1;
    min-height: 240px;
    display: grid;
    grid-template-columns: 0.75fr 1.25fr 1fr;
    gap: 16px;
    align-items: start;
  }

  .fusion-final-analysis > small,
  .fusion-final-analysis > h3,
  .fusion-final-analysis > p:first-of-type { grid-column: 1; }
  .fusion-analysis-list { margin-top: 0; }
  .fusion-question-echo { margin-top: 0 !important; }
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .hecan-tool-switcher {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .hecan-tool-switcher a { flex: 1 0 auto; }

  .fusion-observatory-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .fusion-scene-actions { justify-content: flex-start; }

  .fusion-confidence-matrix > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .fusion-consultation > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hecan-detail-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .fusion-consultation > header > p {
    max-width: none;
    text-align: left;
  }

  .fusion-confidence-matrix > header > p {
    max-width: none;
    text-align: left;
  }

  .fusion-observation-grid {
    grid-template-columns: 1fr;
  }

  .fusion-layer-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: auto auto;
  }

  .fusion-selection { grid-column: 1 / -1; }
  .fusion-scene-shell { min-height: 620px; }

  .fusion-final-analysis {
    grid-column: auto;
    display: flex;
  }

	  .fusion-trend > header { align-items: flex-start; flex-direction: column; }
	  .fusion-trend label { width: 100%; min-width: 0; }
	  .fusion-year-detail { grid-template-columns: 1fr; }
	  .yangzhai-calibration > header { grid-template-columns: 1fr; }
	  .yangzhai-chips { justify-content: flex-start; }
	  .yangzhai-columns { grid-template-columns: 1fr; }
	}

@media (max-width: 600px) {
  .fusion-confidence-matrix { padding: 16px; border-radius: 22px; }
  .fusion-consultation { padding: 16px; border-radius: 24px; }
  .hecan-detail-gate { padding: 14px; border-radius: 24px; }
  .hecan-detail-gate.locked .hecan-detail-lock {
    top: 130px;
    width: calc(100% - 24px);
  }
  .hecan-lock-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }
  .hecan-lock-seal {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 28px;
  }
  .fusion-confidence-grid { grid-template-columns: 1fr; }
  .consultation-grid { grid-template-columns: 1fr; }
  .fusion-confidence-row { border-radius: 15px; }
  .fusion-observatory { padding: 16px; border-radius: 28px; }
  .fusion-observatory-header h2 { font-size: 32px; }
  .fusion-layer-rail { grid-template-columns: 1fr; }
  .fusion-selection { grid-column: auto; }
  .fusion-scene-shell { min-height: 480px; border-radius: 22px; }
  .fusion-scene-actions button:nth-last-child(-n + 3) { display: none; }
	  .fusion-trend { padding: 15px; }
	  #fusionTrendChart { min-height: 180px; }
	  .fusion-trend-legend em { width: 100%; margin-left: 0; }
	  .yangzhai-calibration { padding: 15px; border-radius: 20px; }
	}

@media (max-width: 760px) {
  body.mobile-hecan-entry {
    background:
      radial-gradient(circle at 50% 4%, rgba(120, 91, 226, 0.34), transparent 34%),
      radial-gradient(circle at 90% 16%, rgba(88, 198, 255, 0.18), transparent 30%),
      linear-gradient(180deg, #070511 0%, #110b22 48%, #070511 100%);
  }

  body.mobile-hecan-entry .floating-back {
    left: max(10px, env(safe-area-inset-left));
    top: max(14px, env(safe-area-inset-top));
    width: auto;
    min-height: 42px;
    grid-auto-flow: column;
    gap: 3px;
    padding: 8px 12px 8px 9px;
    border-radius: 999px;
    transform: none;
  }

  body.mobile-hecan-entry .floating-back span {
    font-size: 24px;
  }

  body.mobile-hecan-entry .site-header {
    width: min(100% - 24px, 520px);
    min-height: 66px;
    padding-top: max(12px, env(safe-area-inset-top));
    justify-content: flex-end;
  }

  body.mobile-hecan-entry .brand {
    display: none;
  }

  body.mobile-hecan-entry .hecan-tool-switcher {
    order: 0;
    width: calc(100% - 86px);
    margin-left: 86px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    scrollbar-width: none;
  }

  body.mobile-hecan-entry .hecan-tool-switcher::-webkit-scrollbar {
    display: none;
  }

  body.mobile-hecan-entry .hecan-tool-switcher a {
    min-height: 34px;
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
  }

  body.mobile-hecan-entry .hecan-shell {
    width: min(100% - 22px, 520px);
    padding: 8px 0 54px;
  }

  body.mobile-hecan-entry .hero-section {
    padding-top: 8px;
    gap: 16px;
  }

  body.mobile-hecan-entry .hero-copy .eyebrow {
    font-size: 11px;
  }

  body.mobile-hecan-entry .hero-copy h1 {
    max-width: 330px;
    font-size: clamp(34px, 10vw, 44px);
    line-height: 1.05;
  }

  body.mobile-hecan-entry .hero-lead {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  body.mobile-hecan-entry .hero-chips {
    gap: 7px;
    margin-top: 13px;
  }

  body.mobile-hecan-entry .hero-chips span {
    padding: 7px 9px;
    font-size: 10px;
  }

  body.mobile-hecan-entry .stage-wrap {
    margin-top: 0;
  }

  body.mobile-hecan-entry .three-d-viewport {
    height: min(74vw, 328px);
    min-height: 292px;
    border-radius: 28px;
  }

  body.mobile-hecan-entry .stage-phase {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    padding: 10px 12px;
    border-radius: 18px;
  }

  body.mobile-hecan-entry .stage-phase span,
  body.mobile-hecan-entry .stage-phase small {
    font-size: 10px;
  }

  body.mobile-hecan-entry .stage-phase b {
    font-size: 14px;
  }

  body.mobile-hecan-entry .stage-controls {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  body.mobile-hecan-entry .stage-controls button {
    min-height: 38px;
    padding-inline: 6px;
    font-size: 12px;
  }

  body.mobile-hecan-entry .stage-hint {
    margin-top: 8px;
    font-size: 11px;
  }

  body.mobile-hecan-entry .intake-section,
  body.mobile-hecan-entry .reading-section {
    margin-top: 38px;
  }

  body.mobile-hecan-entry .intake-card {
    padding: 16px;
    border-radius: 24px;
  }

  body.mobile-hecan-entry .profile-source {
    grid-template-columns: 42px 1fr;
    gap: 10px;
  }

  body.mobile-hecan-entry .profile-source button {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.mobile-hecan-entry .form-grid,
  body.mobile-hecan-entry .yangzhai-grid,
  body.mobile-hecan-entry .system-snapshots,
  body.mobile-hecan-entry .reading-hero,
  body.mobile-hecan-entry .theme-board,
  body.mobile-hecan-entry .timeline-grid {
    grid-template-columns: 1fr;
  }

  body.mobile-hecan-entry .field-name,
  body.mobile-hecan-entry .field-place,
  body.mobile-hecan-entry .yangzhai-wide {
    grid-column: auto;
  }

  body.mobile-hecan-entry .focus-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.mobile-hecan-entry .generate-button {
    min-height: 56px;
    border-radius: 18px;
  }

  body.mobile-hecan-entry .reading-hero,
  body.mobile-hecan-entry .system-snapshot,
  body.mobile-hecan-entry .theme-card,
  body.mobile-hecan-entry .timeline-section {
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fusion-layer-rail > button,
  .hecan-tool-switcher a,
  .fusion-scene-actions button {
    transition-duration: 0.01ms !important;
  }
}
