/* =========================================================
   阿呱 · 六爻问事
   styles.css — 宣纸、朱砂、墨金
   ========================================================= */

/* ---------- 基础 ---------- */
:root {
  --paper: #f1e9db;
  --paper-soft: #f7f1e6;
  --paper-deep: #e7dcc9;
  --ink: #211d17;
  --ink-soft: #4e4639;
  --ink-mute: #6d6557;
  --red: #a63a2b;
  --red-deep: #7f291d;
  --gold: #b18a4d;
  --gold-soft: #d5ba89;
  --line: rgba(44, 37, 27, 0.14);
  --line-soft: rgba(44, 37, 27, 0.075);
  --dark: #141310;
  --dark-2: #1a1814;
  --dark-line: rgba(219, 193, 149, 0.17);
  --paper-on-dark: #ece3d2;
  --mute-on-dark: #a39987;
  --gold-on-dark: #cba970;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-panel: 0 30px 80px rgba(49, 38, 20, 0.13), 0 2px 0 rgba(255, 255, 255, 0.5) inset;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
textarea, input { font: inherit; color: inherit; }
svg { display: block; }
ul, ol { margin: 0; padding: 0; }
p, h1, h2, h3, h4, figure, blockquote { margin: 0; }
em, i { font-style: normal; }

[hidden] { display: none !important; }

::selection {
  background: rgba(166, 58, 43, 0.9);
  color: var(--paper-soft);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(44, 37, 27, 0.04); }
::-webkit-scrollbar-thumb { background: rgba(66, 55, 40, 0.22); border-radius: 10px; border: 3px solid var(--paper); }

.container {
  width: min(1180px, calc(100% - 88px));
  margin: 0 auto;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.skip-link {
  position: fixed;
  left: 20px;
  top: -60px;
  z-index: 2000;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--paper);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

.text-btn {
  padding: 4px 0;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.text-btn:hover { color: var(--ink); border-color: var(--line); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.text-link:hover { color: var(--red); border-color: var(--red); }

.primary-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 26px;
  border-radius: 2px;
  background: linear-gradient(135deg, #2a251d, #15120e);
  color: var(--paper-soft);
  letter-spacing: 0.28em;
  font-size: 14px;
  box-shadow: 0 12px 30px rgba(35, 27, 15, 0.22);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(213, 186, 137, 0.16), transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(35, 27, 15, 0.28); }
.primary-btn:hover::after { transform: translateX(120%); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.coin-icon svg { width: 25px; height: 25px; fill: none; stroke: var(--gold-soft); stroke-width: 1.2; }
.coin-icon rect { fill: rgba(213, 186, 137, 0.18); }
.btn-arrow { display: inline-flex; margin-left: auto; }
.btn-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; }

/* ---------- 入场动画 ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }
.js .hero-copy .reveal:nth-child(2) { transition-delay: 0.08s; }
.js .hero-copy .reveal:nth-child(3) { transition-delay: 0.16s; }
.js .hero-copy .reveal:nth-child(4) { transition-delay: 0.24s; }
.js .hero-copy .reveal:nth-child(5) { transition-delay: 0.3s; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 82px;
  transition: background 0.4s ease, box-shadow 0.4s ease, height 0.4s ease;
}
.site-header.is-scrolled {
  height: 70px;
  background: rgba(243, 235, 222, 0.88);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: 0 1px 0 rgba(44, 37, 27, 0.09);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 36px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.brand-seal {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: var(--red);
  color: #f7efe2;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 246, 233, 0.35), 0 4px 12px rgba(127, 41, 29, 0.22);
  transform: rotate(-2deg);
}
.brand-type { display: flex; flex-direction: column; gap: 2px; }
.brand-type strong {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
}
.brand-type small {
  font-size: 8px;
  letter-spacing: 0.34em;
  color: var(--ink-mute);
  line-height: 1;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: 20px;
}
.site-nav a,
.nav-history {
  position: relative;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color 0.25s ease;
}
.site-nav a::after,
.nav-history::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--red);
  transition: right 0.35s var(--ease);
}
.site-nav a:hover,
.nav-history:hover { color: var(--ink); }
.site-nav a:hover::after,
.nav-history:hover::after { right: 0; }
.nav-history { display: inline-flex; align-items: center; gap: 7px; }
.nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 20px;
  background: var(--red);
  color: var(--paper-soft);
  font-size: 9px;
  letter-spacing: 0;
  line-height: 1;
}
.header-side {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.header-date {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.header-rule { width: 36px; height: 1px; background: var(--line); }
.header-cast {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease;
}
.header-cast span { color: var(--red); font-size: 14px; transition: transform 0.25s ease; }
.header-cast:hover { color: var(--red); }
.header-cast:hover span { transform: translate(2px, 2px); }

/* ---------- HERO ---------- */
#cast, #method { scroll-margin-top: 88px; }

.hero {
  position: relative;
  padding: 118px 0 80px;
  overflow: hidden;
}
.hero-wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ink-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
}
.blob-a {
  width: 54vw;
  height: 54vw;
  right: -18vw;
  top: -16vw;
  background: radial-gradient(circle at 40% 40%, rgba(175, 151, 112, 0.4), rgba(175, 151, 112, 0) 65%);
}
.blob-b {
  width: 36vw;
  height: 36vw;
  left: -16vw;
  top: 18vw;
  background: radial-gradient(circle at 50% 50%, rgba(125, 111, 88, 0.24), rgba(125, 111, 88, 0) 70%);
}
.blob-c {
  width: 30vw;
  height: 30vw;
  left: 34vw;
  bottom: -22vw;
  background: radial-gradient(circle at 50% 50%, rgba(166, 58, 43, 0.11), rgba(166, 58, 43, 0) 72%);
}
.hero-char {
  position: absolute;
  right: -3vw;
  top: 12vw;
  font-family: var(--serif);
  font-size: clamp(260px, 36vw, 620px);
  line-height: 0.8;
  color: rgba(35, 29, 21, 0.035);
  user-select: none;
}
.hero-hairline {
  position: absolute;
  background: linear-gradient(180deg, transparent, rgba(44, 37, 27, 0.12), transparent);
  width: 1px;
}
.hair-a { top: 9%; right: 11%; height: 28%; }
.hair-b { top: 24%; left: 5%; height: 40%; opacity: 0.7; }
.dust {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.55;
  box-shadow: 0 0 14px rgba(177, 138, 77, 0.5);
  animation: drift 9s ease-in-out infinite;
}
.dust-a { top: 22%; left: 43%; animation-delay: -1s; }
.dust-b { top: 56%; right: 7%; width: 2px; height: 2px; animation-delay: -4s; }
.dust-c { top: 38%; right: 35%; width: 3px; height: 3px; animation-delay: -6s; }
.dust-d { bottom: 21%; left: 17%; width: 2px; height: 2px; animation-delay: -2.5s; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.25; }
  50% { transform: translate3d(7px, -18px, 0); opacity: 0.75; }
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: 24px;
}
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.eyebrow-rule {
  display: inline-block;
  width: 44px;
  height: 1px;
  background: var(--red);
  transform-origin: left;
}
.eyebrow-en {
  font-size: 8px;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
  opacity: 0.7;
  margin-left: 3px;
}
.hero-title {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: clamp(56px, 6.1vw, 84px);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0.02em;
}
.hero-title em {
  position: relative;
  color: var(--red);
  padding: 0 0.02em;
}
.hero-title em::after {
  content: "";
  position: absolute;
  left: 0.08em;
  right: 0.02em;
  bottom: 0.03em;
  height: 0.1em;
  background: linear-gradient(90deg, var(--red), transparent);
  opacity: 0.25;
  transform: rotate(-1.5deg);
}
.hero-lead {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 26px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  max-width: 590px;
}
.hero-meta-item { display: inline-flex; align-items: baseline; gap: 8px; }
.hero-meta-item i {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.16em;
}
.hero-meta-item b {
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.hero-signature {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--ink-mute);
}
.sig-rule { width: 24px; height: 1px; background: var(--line); }
.sig-en { font-family: var(--sans); font-size: 8.5px; letter-spacing: 0.16em; color: var(--ink-mute); }

/* ---------- 八卦盘 ---------- */
.hero-art {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.bagua-stage {
  position: relative;
  width: min(404px, 31vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.bagua-halo {
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(212, 186, 139, 0.24), rgba(212, 186, 139, 0.04) 52%, transparent 70%);
  filter: blur(2px);
  animation: halo-breathe 9s ease-in-out infinite;
}
@keyframes halo-breathe {
  0%, 100% { transform: scale(0.97); opacity: 0.55; }
  50% { transform: scale(1.04); opacity: 0.9; }
}
.bagua-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(69, 56, 37, 0.18);
}
.bagua-ring.outer { inset: 2.5%; border-color: rgba(69, 56, 37, 0.2); }
.bagua-ring.inner { inset: 17%; border-color: rgba(69, 56, 37, 0.12); }
.bagua-ring.dashed {
  inset: 7.5%;
  border-color: rgba(166, 58, 43, 0.22);
  border-style: dashed;
  animation: spin-slow 120s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.bagua-ticks {
  position: absolute;
  inset: 10.5%;
  border-radius: 50%;
  background:
    repeating-conic-gradient(rgba(65, 52, 34, 0.35) 0deg 0.55deg, transparent 0.55deg 7.5deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  opacity: 0.7;
}
.bagua-wheel {
  position: absolute;
  inset: 0;
}
.bagua-item {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transform: translate(-50%, -50%);
  color: var(--ink-soft);
  will-change: transform;
}
.bagua-item .bg-name {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}
.bagua-item .bg-bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 25px;
}
.bg-bar { display: flex; justify-content: space-between; height: 2px; }
.bg-bar span { display: block; height: 100%; background: rgba(62, 50, 34, 0.72); }
.bg-bar.yang span { width: 100%; }
.bg-bar.yin span { width: 42%; }
.bagua-item.is-accent .bg-name { color: var(--red); }
.bagua-item.is-accent .bg-bar span { background: var(--red); opacity: 0.8; }
.bagua-core {
  position: relative;
  width: 27%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 12px 28px rgba(56, 43, 25, 0.16));
}
.bagua-core svg { width: 100%; height: 100%; animation: spin-slow 80s linear infinite; }
.orbit-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.6;
}
.dot-a { top: 14%; left: 48%; }
.dot-b { bottom: 20%; right: 12%; width: 3px; height: 3px; opacity: 0.4; }
.dot-c { left: 6%; bottom: 30%; width: 2px; height: 2px; background: var(--gold); opacity: 0.8; }
.art-seal {
  position: absolute;
  left: 3%;
  bottom: 16%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(166, 58, 43, 0.55);
  color: var(--red);
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1;
  border-radius: 2px;
  transform: rotate(-4deg);
  background: rgba(241, 233, 219, 0.4);
  box-shadow: inset 0 0 0 3px rgba(241, 233, 219, 0.55);
}
.art-caption {
  position: absolute;
  left: 4%;
  top: 14%;
  background: rgba(248, 242, 232, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(44, 37, 27, 0.1);
  padding: 9px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 10px 26px rgba(51, 39, 23, 0.06);
}
.art-caption b {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
}
.art-caption span { font-size: 8px; letter-spacing: 0.14em; color: var(--ink-mute); }

/* ---------- 起卦面板 ---------- */
.cast-panel {
  position: relative;
  margin-top: 30px;
  padding: 28px clamp(26px, 4vw, 52px) 0;
  background: linear-gradient(135deg, rgba(248, 242, 232, 0.82), rgba(239, 230, 214, 0.76));
  border: 1px solid rgba(83, 65, 41, 0.16);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.cast-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(83, 65, 41, 0.055);
  pointer-events: none;
}
.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: rgba(166, 58, 43, 0.45);
  border-style: solid;
  z-index: 1;
}
.corner-tl { left: 13px; top: 13px; border-width: 1px 0 0 1px; }
.corner-tr { right: 13px; top: 13px; border-width: 1px 1px 0 0; }
.corner-bl { left: 13px; bottom: 13px; border-width: 0 0 1px 1px; }
.corner-br { right: 13px; bottom: 13px; border-width: 0 1px 1px 0; }
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 2px 0 20px;
  border-bottom: 1px solid var(--line);
}
.panel-kicker {
  display: block;
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--red);
  text-transform: uppercase;
  line-height: 1.6;
}
.panel-head h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: 0.08em;
}
.live-clock { text-align: right; flex: 0 0 auto; }
.live-clock-time {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.live-clock small {
  display: block;
  margin-top: 7px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.cast-form {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: clamp(28px, 4vw, 58px);
  padding: 20px 0 18px;
}
.ask-field { min-width: 0; }
.field-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}
.field-label span {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
#questionInput {
  display: block;
  width: 100%;
  margin-top: 13px;
  padding: 8px 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(18px, 1.9vw, 23px);
  line-height: 1.55;
  letter-spacing: 0.03em;
  resize: none;
  outline: none;
  transition: border-color 0.3s ease;
}
#questionInput::placeholder { color: rgba(78, 70, 57, 0.38); }
#questionInput:focus { border-color: var(--ink-soft); }
#questionInput.is-error { border-color: var(--red); animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
.field-hint {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-mute);
  letter-spacing: 0.03em;
}
.ask-under {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-top: 18px;
}
.quick-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.quick-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-mute);
}
.quick-examples button {
  position: relative;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  padding: 2px 0;
  transition: color 0.2s ease;
}
.quick-examples button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(78, 70, 57, 0.18);
  transform: scaleX(0.55);
  transform-origin: left;
  transition: transform 0.25s ease, background 0.25s ease;
}
.quick-examples button:hover { color: var(--red); }
.quick-examples button:hover::after { transform: scaleX(1); background: rgba(166, 58, 43, 0.5); }
.char-count {
  flex: 0 0 auto;
  margin-top: 4px;
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.cast-side { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.category-block { min-width: 0; }
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px 5px 7px;
  border: 1px solid rgba(65, 52, 34, 0.17);
  border-radius: 1px;
  background: rgba(255, 252, 246, 0.3);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  transition: all 0.25s ease;
}
.category-chip .chip-seal {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  font-family: var(--serif);
  font-size: 10px;
  color: var(--ink-mute);
  border: 1px solid rgba(65, 52, 34, 0.16);
  transition: all 0.25s ease;
}
.category-chip:hover { border-color: rgba(65, 52, 34, 0.38); color: var(--ink); }
.category-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper-soft);
  box-shadow: 0 8px 18px rgba(35, 28, 18, 0.14);
}
.category-chip.is-active .chip-seal {
  color: var(--gold-soft);
  border-color: rgba(213, 186, 137, 0.45);
}
.category-note {
  min-height: 30px;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.cast-submit { width: 100%; }
.cast-submit .cast-btn-text { flex: 0 0 auto; }
.cast-alts {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: rgba(78, 70, 57, 0.4);
}
.panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
}
.foot-note { display: inline-flex; align-items: center; gap: 7px; }
.mini-seal {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(166, 58, 43, 0.45);
  color: var(--red);
  font-family: var(--serif);
  font-size: 9px;
  border-radius: 1px;
}
.foot-time b { font-weight: 400; color: var(--ink-soft); }

/* =========================================================
   RESULT
   ========================================================= */
.result {
  position: relative;
  padding: clamp(68px, 8vw, 112px) 0 clamp(70px, 9vw, 120px);
  background: var(--dark);
  color: var(--paper-on-dark);
  overflow: hidden;
  scroll-margin-top: 24px;
}
.result::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(90%, 980px);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(203, 169, 112, 0.5), transparent);
}
.result::after {
  content: "卦";
  position: absolute;
  right: -2vw;
  top: 6%;
  font-family: var(--serif);
  font-size: clamp(260px, 30vw, 520px);
  line-height: 1;
  color: rgba(236, 227, 210, 0.025);
  pointer-events: none;
}
.result-glow {
  position: absolute;
  left: 50%;
  top: -20%;
  width: 70vw;
  height: 70vw;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(177, 138, 77, 0.12), transparent 62%);
  pointer-events: none;
}
.result-grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(236, 227, 210, 0.35) 0.5px, transparent 0.6px);
  background-size: 7px 7px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, #000, transparent 28%, transparent 82%, #000);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 28%, transparent 82%, #000);
}
.result-container { position: relative; z-index: 2; }
.result-head { text-align: center; }
.result-kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 9px;
  letter-spacing: 0.42em;
  color: var(--gold-on-dark);
}
.result-kicker span { width: 38px; height: 1px; background: rgba(203, 169, 112, 0.4); }
.gua-number {
  display: inline-block;
  margin-top: 22px;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--mute-on-dark);
}
.gua-number b { color: var(--gold-on-dark); font-weight: 500; }
.result-title h2 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(44px, 5.8vw, 72px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.12em;
  color: var(--paper-on-dark);
}
.gua-sub {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--mute-on-dark);
}
.gua-sub i { width: 3px; height: 3px; border-radius: 50%; background: rgba(203, 169, 112, 0.55); }
.result-title-row { display: block; }
.verdict-grid {
  display: grid;
  grid-template-columns: minmax(370px, 0.95fr) minmax(0, 2.05fr);
  gap: 22px;
  margin-top: clamp(36px, 5vw, 58px);
}
.score-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--dark-line);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.score-ring {
  position: relative;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: conic-gradient(var(--gold-on-dark) calc(var(--p) * 1%), rgba(236, 227, 210, 0.09) 0);
  display: grid;
  place-items: center;
}
.score-ring::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #191712;
  border: 1px solid rgba(236, 227, 210, 0.07);
}
.score-ring::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(203, 169, 112, 0.14);
  border-top-color: rgba(203, 169, 112, 0.5);
  transform: rotate(25deg);
}
.score-ring-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.score-label {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.12em;
  color: var(--gold-on-dark);
}
.score-ring-inner strong {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--paper-on-dark);
}
.score-ring-inner small {
  margin-top: 5px;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: var(--mute-on-dark);
}
.score-caption { min-width: 0; }
.score-question {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.8;
  color: var(--paper-on-dark);
  overflow-wrap: anywhere;
}
.score-question::before { content: "「"; color: rgba(203, 169, 112, 0.7); }
.score-question::after { content: "」"; color: rgba(203, 169, 112, 0.7); }
.score-date {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(236, 227, 210, 0.1);
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 0.03em;
  color: var(--mute-on-dark);
  font-variant-numeric: tabular-nums;
}
.verdict-card {
  position: relative;
  padding: clamp(26px, 3.2vw, 40px);
  border: 1px solid var(--dark-line);
  background:
    radial-gradient(circle at 92% 6%, rgba(203, 169, 112, 0.12), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
}
.verdict-card .panel-kicker { color: var(--gold-on-dark); }
.verdict-card h3 {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.6vw, 34px);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.03em;
}
.verdict-card > p {
  margin-top: 15px;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.03em;
  color: var(--mute-on-dark);
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.result-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid rgba(236, 227, 210, 0.14);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--mute-on-dark);
}
.result-tag::before {
  content: "";
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
.result-tag.good { color: #c8b383; border-color: rgba(200, 179, 131, 0.28); }
.result-tag.bad { color: #c98f7d; border-color: rgba(201, 143, 125, 0.26); }
.result-tag.neutral { color: var(--mute-on-dark); }

/* 卦象双卡 */
.hex-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  margin-top: 22px;
}
.hex-card {
  position: relative;
  padding: clamp(22px, 2.8vw, 32px);
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.022);
}
.hex-card.primary {
  background:
    radial-gradient(circle at 8% 0%, rgba(203, 169, 112, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.025);
}
.hex-card > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(236, 227, 210, 0.1);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--mute-on-dark);
}
.hex-role { color: var(--gold-on-dark); font-size: 10px; letter-spacing: 0.26em; }
.hex-meta { font-size: 9px; letter-spacing: 0.1em; }
.hex-body {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  padding: 22px 0;
}
.hex-bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: clamp(108px, 12vw, 144px);
  flex: 0 0 auto;
}
.hex-bar { position: relative; display: flex; justify-content: space-between; height: 6px; }
.hex-bar span { display: block; height: 100%; background: linear-gradient(90deg, #d9c8a5, #bda77d); box-shadow: 0 0 12px rgba(203, 169, 112, 0.12); }
.hex-bar.yang span { width: 100%; }
.hex-bar.yin span { width: 43%; }
.hex-bar.is-moving::after {
  content: "";
  position: absolute;
  right: -15px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(166, 58, 43, 0.15);
}
.hex-name { min-width: 0; }
.hex-index { font-size: 9px; letter-spacing: 0.16em; color: var(--mute-on-dark); }
.hex-name h3 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.hex-keyword {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-on-dark);
}
.hex-classic {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(236, 227, 210, 0.07);
  font-size: 11px;
  line-height: 1.9;
  color: var(--mute-on-dark);
}
.hex-classic span { font-size: 9px; letter-spacing: 0.12em; color: rgba(203, 169, 112, 0.7); }
.hex-classic p { margin: 0; overflow-wrap: anywhere; }
.hex-connector {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--gold-on-dark);
}
.hex-connector::before,
.hex-connector::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  height: calc(50% - 24px);
  background: linear-gradient(180deg, transparent, rgba(203, 169, 112, 0.3));
}
.hex-connector::before { top: 8%; }
.hex-connector::after { bottom: 8%; transform: rotate(180deg); }
.hex-connector span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(203, 169, 112, 0.3);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--gold-on-dark);
  background: var(--dark);
}
.hex-empty {
  min-height: 222px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}
.empty-seal {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(203, 169, 112, 0.3);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--gold-on-dark);
  opacity: 0.7;
}
.hex-empty p {
  font-size: 11px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--mute-on-dark);
}
.hex-classic-note { font-size: 10px; color: var(--mute-on-dark); letter-spacing: 0.04em; }

/* 排盘 */
.chart-block {
  margin-top: 22px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.018);
}
.block-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 20px;
}
.block-head .panel-kicker { color: var(--gold-on-dark); }
.block-head h3 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0.1em;
}
.block-head > p {
  font-size: 10px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--mute-on-dark);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-scroll-hint { display: none; margin: 0 0 10px; font-size: 9px; letter-spacing: 0.04em; color: var(--mute-on-dark); }
.chart-help { margin-top: 10px; font-size: 10px; line-height: 1.8; color: var(--mute-on-dark); }
.chart-table {
  width: 100%;
  min-width: 780px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}
.chart-table .cc-spirit { width: 8%; }
.chart-table .cc-hidden { width: 14%; }
.chart-table .cc-line { width: 28%; }
.chart-table .cc-najia { width: 14.5%; }
.chart-table .cc-rel { width: 11%; }
.chart-table .cc-position { width: 8%; }
.chart-table .cc-change { width: 16.5%; }
.chart-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--mute-on-dark);
  border-top: 1px solid rgba(236, 227, 210, 0.08);
  border-bottom: 1px solid rgba(236, 227, 210, 0.13);
  white-space: nowrap;
}
.chart-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(236, 227, 210, 0.07);
  vertical-align: middle;
  color: var(--paper-on-dark);
  transition: background 0.25s ease;
}
.chart-table tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
.chart-table tbody tr.is-target td { background: rgba(203, 169, 112, 0.065); }
.chart-table tbody tr.is-target td:first-child { box-shadow: inset 2px 0 0 var(--gold-on-dark); }
.chart-table tbody tr.is-moving td { color: var(--paper-on-dark); }
.chart-table .col-spirit { width: 80px; color: var(--mute-on-dark); letter-spacing: 0.08em; white-space: nowrap; }
.chart-table .col-spirit .spirit-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--gold-on-dark);
  vertical-align: middle;
}
.chart-table .col-hidden { width: 130px; color: rgba(163, 153, 135, 0.75); font-size: 10px; line-height: 1.7; }
.chart-table .col-hidden .hidden-rel { color: var(--mute-on-dark); }
.chart-table .col-hidden em { font-style: normal; }
.chart-table .col-line { min-width: 190px; }
.line-cell { display: flex; align-items: center; gap: 13px; }
.pos-label {
  font-family: var(--serif);
  font-size: 10px;
  color: var(--mute-on-dark);
  width: 30px;
  flex: 0 0 auto;
}
.mini-yao { display: flex; flex-direction: column; gap: 3px; width: 76px; }
.mini-bar { display: flex; justify-content: space-between; height: 4px; }
.mini-bar span { display: block; height: 100%; background: #d6c4a0; }
.mini-bar.yang span { width: 100%; }
.mini-bar.yin span { width: 43%; }
.mini-bar.is-moving span { background: var(--gold-on-dark); box-shadow: 0 0 8px rgba(203, 169, 112, 0.25); }
.yao-type { font-size: 10px; color: var(--mute-on-dark); letter-spacing: 0.08em; }
.moving-mark { color: var(--red); font-family: var(--serif); font-size: 15px; margin-left: 4px; }
.chart-table .col-najia { white-space: nowrap; font-family: var(--serif); font-size: 15px; letter-spacing: 0.06em; }
.chart-table .col-najia .el { font-family: var(--sans); font-size: 9px; margin-left: 4px; opacity: 0.72; }
.chart-table .col-rel { white-space: nowrap; font-family: var(--serif); font-size: 14px; letter-spacing: 0.08em; }
.chart-table .col-rel .target-mark {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  border: 1px solid rgba(203, 169, 112, 0.45);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 8px;
  color: var(--gold-on-dark);
  vertical-align: 1px;
}
.chart-table .col-position { width: 64px; }
.shi-ying-badge {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 10px;
  letter-spacing: 0;
}
.shi-ying-badge.shi { border: 1px solid rgba(203, 169, 112, 0.6); color: var(--gold-on-dark); }
.shi-ying-badge.ying { border: 1px solid rgba(236, 227, 210, 0.22); color: var(--mute-on-dark); }
.chart-table .col-change { width: 120px; white-space: nowrap; color: var(--mute-on-dark); font-size: 10px; line-height: 1.7; }
.chart-table .col-change .changed-najia { color: var(--paper-on-dark); font-family: var(--serif); font-size: 13px; }
.chart-table .col-change .no-change { color: rgba(163, 153, 135, 0.32); }
.chart-table .empty-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 4px;
  font-family: var(--sans);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: #c98f7d;
  border: 1px solid rgba(201, 143, 125, 0.3);
  vertical-align: 1px;
}
.chart-table .break-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 4px;
  font-size: 8px;
  line-height: 1.5;
  color: var(--mute-on-dark);
  border: 1px solid rgba(236, 227, 210, 0.14);
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-top: 16px;
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  color: var(--mute-on-dark);
}
.chart-legend b { font-weight: 400; color: var(--gold-on-dark); }
.el-mu { color: #8fb596 !important; }
.el-huo { color: #d08a74 !important; }
.el-tu { color: #c7ab78 !important; }
.el-jin { color: #d8d0c0 !important; }
.el-shui { color: #8fb0c2 !important; }

/* 解读区 */
.reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.7fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}
.reading-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.reading-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.target-block,
.read-card,
.side-panel {
  border: 1px solid var(--dark-line);
  background: rgba(255, 255, 255, 0.018);
  padding: clamp(22px, 2.8vw, 30px);
}
.block-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.block-title .panel-kicker { color: var(--gold-on-dark); }
.block-title h3 {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.block-title p { font-size: 10px; line-height: 1.8; color: var(--mute-on-dark); text-align: right; }
.target-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 14px; }
.target-card {
  position: relative;
  padding: 18px;
  border: 1px solid rgba(236, 227, 210, 0.1);
  background: rgba(255, 255, 255, 0.018);
}
.target-card.is-primary { border-color: rgba(203, 169, 112, 0.28); }
.target-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.target-rel {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.08em;
  color: var(--gold-on-dark);
}
.target-role { font-size: 10px; color: var(--mute-on-dark); letter-spacing: 0.05em; }
.strength-pill {
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid rgba(203, 169, 112, 0.3);
  color: var(--gold-on-dark);
  font-size: 9px;
  letter-spacing: 0.05em;
}
.strength-pill.weak { color: #c98f7d; border-color: rgba(201, 143, 125, 0.3); }
.target-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 11px;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: var(--mute-on-dark);
}
.target-meta b { font-weight: 400; color: var(--paper-on-dark); font-family: var(--serif); font-size: 12px; }
.hidden-mark {
  padding: 1px 5px;
  color: #c98f7d;
  border: 1px solid rgba(201, 143, 125, 0.25);
}
.strength-bar {
  height: 2px;
  margin-top: 15px;
  background: rgba(236, 227, 210, 0.09);
  overflow: hidden;
}
.strength-bar i {
  display: block;
  height: 100%;
  width: var(--w, 50%);
  background: linear-gradient(90deg, rgba(177, 138, 77, 0.4), var(--gold-on-dark));
  transform-origin: left;
  animation: bar-grow 1.1s var(--ease) both;
}
@keyframes bar-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.strength-bar.weak i { background: linear-gradient(90deg, rgba(201, 143, 125, 0.3), #c98f7d); }
.target-factors {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}
.factor-chip {
  padding: 3px 6px;
  font-size: 8.5px;
  letter-spacing: 0.03em;
  color: var(--mute-on-dark);
  border: 1px solid rgba(236, 227, 210, 0.1);
}
.factor-chip.good { color: #c3b182; border-color: rgba(195, 177, 130, 0.18); }
.factor-chip.bad { color: #c98f7d; border-color: rgba(201, 143, 125, 0.2); }
.side-note {
  margin-top: 13px;
  font-size: 10px;
  line-height: 1.8;
  color: var(--mute-on-dark);
}

.reading-sections { display: flex; flex-direction: column; gap: 22px; }
.read-card .read-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(236, 227, 210, 0.1);
}
.read-index {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--gold-on-dark);
  letter-spacing: 0.08em;
}
.read-head h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.1em;
}
.read-body { padding-top: 15px; }
.read-body p {
  font-size: 12.5px;
  line-height: 2.15;
  letter-spacing: 0.025em;
  color: #c2b8a5;
}
.read-body p + p { margin-top: 9px; }
.read-body p b { font-weight: 500; color: var(--paper-on-dark); }

/* 侧栏：七日 */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin-top: 16px;
}
.day-cell {
  position: relative;
  min-width: 0;
  padding: 9px 2px 10px;
  text-align: center;
  border: 1px solid rgba(236, 227, 210, 0.08);
  background: rgba(255, 255, 255, 0.012);
}
.day-cell.is-best {
  border-color: rgba(203, 169, 112, 0.38);
  background: linear-gradient(180deg, rgba(203, 169, 112, 0.11), rgba(203, 169, 112, 0.025));
}
.day-week { display: block; font-size: 9px; color: var(--mute-on-dark); letter-spacing: 0.04em; }
.day-cell.is-best .day-week { color: var(--gold-on-dark); }
.day-date {
  display: block;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 12px;
  color: var(--paper-on-dark);
  font-variant-numeric: tabular-nums;
}
.day-gz { display: block; margin-top: 3px; font-size: 8px; color: var(--mute-on-dark); }
.day-meter {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 40px;
  margin: 8px auto 0;
  width: 7px;
  background: rgba(236, 227, 210, 0.06);
}
.day-meter i {
  display: block;
  width: 100%;
  height: var(--h, 40%);
  background: linear-gradient(180deg, var(--gold-on-dark), rgba(203, 169, 112, 0.25));
  opacity: 0.65;
  transition: height 0.9s var(--ease);
}
.day-cell.is-best .day-meter i { opacity: 1; }
.day-hint {
  display: block;
  margin-top: 7px;
  min-height: 22px;
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--mute-on-dark);
}
.day-cell.is-best .day-hint { color: var(--gold-on-dark); }
.days-note {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--mute-on-dark);
  letter-spacing: 0.02em;
}
.timing-sep { height: 1px; margin: 18px 0 16px; background: rgba(236, 227, 210, 0.09); }
.timing-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--paper-on-dark);
}
.timing-title::before { content: ""; width: 14px; height: 1px; background: var(--gold-on-dark); }
.timing-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.timing-date {
  padding: 4px 8px;
  border: 1px solid rgba(203, 169, 112, 0.23);
  font-size: 9px;
  letter-spacing: 0.03em;
  color: var(--gold-on-dark);
  font-variant-numeric: tabular-nums;
}
.timing-date span { opacity: 0.65; margin-left: 4px; color: var(--mute-on-dark); }
.timing-text { margin-top: 12px; font-size: 11px; line-height: 2; color: #b4aa98; }
.timing-note { margin-top: 10px; font-size: 10px; line-height: 1.8; color: var(--mute-on-dark); }

/* 行动板 */
.action-board {
  display: grid;
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1.4fr);
  gap: 22px;
  margin-top: 22px;
  padding: clamp(22px, 2.8vw, 30px);
  border: 1px solid var(--dark-line);
  background:
    radial-gradient(circle at 100% 0%, rgba(203, 169, 112, 0.1), transparent 32%),
    rgba(255, 255, 255, 0.018);
}
.priority-block {
  padding-right: 22px;
  border-right: 1px solid rgba(236, 227, 210, 0.1);
}
.priority-block .panel-kicker { color: var(--gold-on-dark); }
.priority-block p {
  margin-top: 13px;
  font-family: var(--serif);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.8;
  letter-spacing: 0.02em;
  color: var(--paper-on-dark);
}
.advice-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.advice-col h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--gold-on-dark);
}
.advice-col.dont h4 { color: #c98f7d; }
.advice-col h4::after { content: ""; flex: 1; height: 1px; background: rgba(236, 227, 210, 0.1); }
.advice-col ul { display: flex; flex-direction: column; gap: 9px; }
.advice-col li {
  position: relative;
  padding-left: 14px;
  font-size: 11px;
  line-height: 1.8;
  color: #b9af9c;
}
.advice-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 4px;
  height: 1px;
  background: var(--gold-on-dark);
}
.advice-col.dont li::before { background: #c98f7d; }

.result-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
}
.result .primary-btn {
  background: linear-gradient(135deg, #e8ddc8, #d6c39c);
  color: #211b12;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  min-height: 48px;
  font-size: 12px;
  letter-spacing: 0.2em;
  padding: 0 22px;
}
.result .primary-btn .coin-icon svg { stroke: #6d542f; }
.result .primary-btn .coin-icon rect { fill: rgba(109, 84, 47, 0.12); }
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(236, 227, 210, 0.22);
  color: var(--paper-on-dark);
  font-size: 11px;
  letter-spacing: 0.16em;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.ghost-btn:hover { border-color: rgba(203, 169, 112, 0.55); background: rgba(203, 169, 112, 0.06); }
.result-action-btns { display: flex; gap: 10px; align-items: center; }
.result-saved {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: rgba(163, 153, 135, 0.7);
}
.result-saved::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-on-dark);
  opacity: 0.6;
}
.result-disclaimer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(236, 227, 210, 0.08);
  font-size: 10.5px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: #9a9080;
}
.empty-result { padding: 100px 0; text-align: center; }

/* AI 细读卡片 */
.ai-card {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 2.8vw, 30px);
  border: 1px solid rgba(139, 178, 189, 0.25);
  background:
    radial-gradient(circle at 100% 0%, rgba(105, 153, 166, 0.13), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.052), rgba(255, 255, 255, 0.012));
}
.ai-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(161, 202, 211, 0.72), rgba(203, 169, 112, 0.28), transparent);
  opacity: 0.8;
}
.ai-card.is-done { border-color: rgba(203, 169, 112, 0.24); }
.ai-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.ai-seal {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(161, 202, 211, 0.42);
  color: #b9d2d2;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  background: rgba(126, 169, 177, 0.07);
  box-shadow: inset 0 0 0 3px rgba(241, 233, 219, 0.035);
}
.ai-heading { min-width: 0; }
.ai-heading .panel-kicker { color: #b6a784; }
.ai-card .ai-heading h3 {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 24px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--paper-on-dark);
}
.ai-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  margin-left: auto;
  padding: 4px 8px;
  border: 1px solid rgba(236, 227, 210, 0.12);
  font-size: 9px;
  letter-spacing: 0.05em;
  color: var(--mute-on-dark);
  white-space: nowrap;
}
.ai-status::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(161, 202, 211, 0.8);
}
.ai-status[data-ai-state="loading"]::before,
.ai-status[data-ai-state="streaming"]::before {
  animation: ai-pulse 1.5s ease-in-out infinite;
}
.ai-status[data-ai-state="done"] { color: #c6b488; border-color: rgba(203, 169, 112, 0.25); }
.ai-status[data-ai-state="done"]::before { background: var(--gold-on-dark); }
.ai-status[data-ai-state="error"] { color: #c98f7d; border-color: rgba(201, 143, 125, 0.28); }
.ai-status[data-ai-state="error"]::before { background: #c98f7d; }
.ai-status[data-ai-state="idle"]::before { background: rgba(236, 227, 210, 0.35); }
@keyframes ai-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
.ai-mode {
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(203, 169, 112, 0.16);
  background: rgba(203, 169, 112, 0.045);
  font-size: 10px;
  line-height: 1.75;
  letter-spacing: 0.015em;
  color: #b6a98f;
}
.ai-body { margin-top: 17px; }
.ai-skeleton {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0 2px;
}
.ai-skeleton span {
  display: block;
  width: 100%;
  height: 11px;
  background: linear-gradient(90deg, rgba(236, 227, 210, 0.055) 0%, rgba(236, 227, 210, 0.13) 45%, rgba(236, 227, 210, 0.055) 100%);
  background-size: 220% 100%;
  animation: ai-shimmer 1.8s ease-in-out infinite;
}
.ai-skeleton span:nth-child(1) { width: 34%; }
.ai-skeleton span:nth-child(2) { width: 92%; }
.ai-skeleton span:nth-child(3) { width: 86%; }
.ai-skeleton span:nth-child(4) { width: 58%; }
@keyframes ai-shimmer {
  0% { background-position: 130% 0; }
  100% { background-position: -80% 0; }
}
.ai-copy h4 {
  margin: 23px 0 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(203, 169, 112, 0.15);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: #d6b980;
}
.ai-copy h4:first-child { margin-top: 0; }
.ai-copy p {
  font-family: var(--serif);
  font-size: clamp(13px, 1.35vw, 14px);
  line-height: 2.15;
  letter-spacing: 0.025em;
  color: #c9bfae;
}
.ai-copy p + p { margin-top: 7px; }
.ai-caret {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--gold-on-dark);
  animation: ai-blink 0.85s steps(1) infinite;
}
@keyframes ai-blink { 0%, 45% { opacity: 1; } 50%, 100% { opacity: 0; } }
.ai-error {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 14px;
  border: 1px solid rgba(201, 143, 125, 0.25);
  background: rgba(201, 143, 125, 0.045);
  color: #cbb09f;
  font-size: 11px;
  line-height: 1.8;
}
.ai-error p { flex: 1 1 260px; }
.ai-retry-btn,
.ai-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(203, 169, 112, 0.38);
  color: var(--gold-on-dark);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.ai-retry-btn:hover,
.ai-start-btn:hover {
  border-color: rgba(203, 169, 112, 0.7);
  background: rgba(203, 169, 112, 0.08);
  color: var(--paper-on-dark);
}
.ai-start {
  padding-top: 4px;
}
.ai-start p {
  font-size: 11px;
  line-height: 1.9;
  color: var(--mute-on-dark);
}
.ai-start-btn { margin-top: 13px; }
.ai-chat {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(236, 227, 210, 0.09);
}
.ai-chat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ai-chat-head span {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--paper-on-dark);
}
.ai-chat-head small {
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(163, 153, 135, 0.72);
}
.ai-chat-log {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 13px;
  max-height: 280px;
  overflow-y: auto;
}
.ai-chat-msg {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.ai-chat-msg > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(236, 227, 210, 0.13);
  font-size: 8px;
  letter-spacing: 0;
  color: var(--mute-on-dark);
}
.ai-chat-msg p {
  flex: 1;
  padding-top: 3px;
  font-size: 11.5px;
  line-height: 1.9;
  color: #c9bfae;
}
.ai-chat-msg.user > span { border-color: rgba(203, 169, 112, 0.35); color: var(--gold-on-dark); }
.ai-chat-msg.user p { color: var(--paper-on-dark); }
.ai-chat-msg.system > span { border-color: rgba(201, 143, 125, 0.32); color: #c98f7d; }
.ai-chat-msg.system p { color: #c98f7d; }
.ai-chat-msg.is-thinking p { display: flex; align-items: center; gap: 4px; padding-top: 9px; }
.ai-chat-msg.is-thinking i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-on-dark);
  animation: ai-pulse 1.2s ease-in-out infinite;
}
.ai-chat-msg.is-thinking i:nth-child(2) { animation-delay: 0.18s; }
.ai-chat-msg.is-thinking i:nth-child(3) { animation-delay: 0.36s; }
.ai-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 13px;
}
.ai-chat-suggestions button {
  padding: 5px 8px;
  border: 1px solid rgba(236, 227, 210, 0.13);
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--mute-on-dark);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.ai-chat-suggestions button:hover {
  color: var(--gold-on-dark);
  border-color: rgba(203, 169, 112, 0.4);
}
.ai-chat-form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.ai-chat-form input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(236, 227, 210, 0.15);
  background: rgba(255, 255, 255, 0.025);
  color: var(--paper-on-dark);
  font-size: 11px;
  outline: none;
}
.ai-chat-form input::placeholder { color: rgba(163, 153, 135, 0.65); }
.ai-chat-form input:focus { border-color: rgba(203, 169, 112, 0.4); }
.ai-chat-form button {
  height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(203, 169, 112, 0.35);
  color: var(--gold-on-dark);
  font-size: 10px;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ai-chat-form button:hover { background: rgba(203, 169, 112, 0.08); border-color: rgba(203, 169, 112, 0.6); }
.ai-chat-form button:disabled,
.ai-chat-form input:disabled { opacity: 0.45; cursor: wait; }
.ai-chat-note {
  margin-top: 9px;
  font-size: 9px;
  line-height: 1.7;
  color: rgba(163, 153, 135, 0.72);
}

.ai-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 13px;
  border-top: 1px solid rgba(236, 227, 210, 0.08);
  font-size: 10px;
  line-height: 1.7;
  letter-spacing: 0.035em;
  color: rgba(163, 153, 135, 0.8);
}
@media (max-width: 720px) {
  .ai-head { flex-wrap: wrap; }
  .ai-status { margin-left: 0; }
  .ai-card .ai-heading h3 { font-size: 20px; }
  .ai-copy p { font-size: 13px; line-height: 2.1; }
  .ai-foot { flex-direction: column; gap: 4px; }
  .ai-chat-head { flex-direction: column; gap: 3px; }
  .ai-chat-log { max-height: 220px; }
  .ai-chat-form input { font-size: 10.5px; }
}

/* =========================================================
   METHOD
   ========================================================= */
.method {
  position: relative;
  padding: clamp(80px, 10vw, 128px) 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(177, 138, 77, 0.08), transparent 32%),
    linear-gradient(180deg, var(--paper) 0%, #ede4d4 100%);
  border-top: 1px solid rgba(44, 37, 27, 0.08);
}
.section-head { max-width: 720px; }
.section-head.split {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  letter-spacing: 0.34em;
  color: var(--red);
}
.section-kicker i { display: inline-block; width: 24px; height: 1px; background: rgba(166, 58, 43, 0.5); }
.section-head h2 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.3vw, 56px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.05em;
}
.section-head > p {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 64px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.method-card {
  position: relative;
  padding: 40px 36px 38px;
  min-height: 330px;
}
.method-card + .method-card { border-left: 1px solid var(--line); }
.method-num {
  position: absolute;
  top: 28px;
  right: 32px;
  font-family: var(--serif);
  font-size: 13px;
  color: rgba(44, 37, 27, 0.28);
  letter-spacing: 0.1em;
}
.method-icon {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
}
.icon-quiet .quiet-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(44, 37, 27, 0.18);
}
.icon-quiet .quiet-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(44, 37, 27, 0.15);
}
.quiet-char {
  font-family: var(--serif);
  font-size: 23px;
  color: var(--ink-soft);
}
.icon-coins { gap: 1px; }
.mini-coin {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(166, 58, 43, 0.5);
  display: grid;
  place-items: center;
  margin-left: -5px;
  transform: rotate(6deg);
  background: rgba(241, 233, 219, 0.5);
}
.mini-coin:nth-child(2) { transform: rotate(-5deg) translateY(-4px); z-index: 1; }
.mini-coin:nth-child(3) { transform: rotate(3deg); }
.mini-coin i { width: 8px; height: 8px; border: 1px solid rgba(166, 58, 43, 0.55); }
.icon-reading { flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; }
.scroll-line { display: block; height: 1px; background: rgba(44, 37, 27, 0.28); width: 38px; }
.scroll-line.long { width: 50px; }
.scroll-line.short { width: 28px; }
.scroll-mark {
  position: absolute;
  right: -1px;
  bottom: 2px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--red);
  transform: rotate(-4deg);
  opacity: 0.8;
}
.method-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.15em;
}
.method-card h4 {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  text-transform: uppercase;
}
.method-card p {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 13px;
  line-height: 2;
  color: var(--ink-soft);
}
.method-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  margin-top: 30px;
}
.method-foot > p {
  max-width: 760px;
  font-size: 10px;
  line-height: 1.9;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

/* =========================================================
   HISTORY STRIP
   ========================================================= */
.history-strip {
  padding: clamp(64px, 8vw, 100px) 0;
  background: var(--paper-deep);
  border-top: 1px solid rgba(44, 37, 27, 0.08);
}
.history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}
.history-card {
  position: relative;
  display: flex;
  color: inherit;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(248, 242, 232, 0.35);
  transition: transform 0.3s var(--ease), border-color 0.3s ease, background 0.3s ease;
}
.history-card:hover { transform: translateY(-3px); border-color: rgba(44, 37, 27, 0.26); background: rgba(248, 242, 232, 0.6); }
.history-card .hc-top { width: 100%; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.history-mini-bars { display: flex; flex-direction: column; gap: 3px; width: 44px; }
.history-mini-bars .hm-bar { display: flex; justify-content: space-between; height: 2px; }
.history-mini-bars .hm-bar span { display: block; height: 100%; background: rgba(44, 37, 27, 0.5); }
.history-mini-bars .hm-bar.yang span { width: 100%; }
.history-mini-bars .hm-bar.yin span { width: 42%; }
.history-mini-bars .hm-bar.is-moving span { background: var(--red); }
.hc-date { font-size: 10px; letter-spacing: 0.04em; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.history-card h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.history-card p {
  font-size: 11px;
  line-height: 1.75;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hc-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 3px;
  font-size: 9px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.hc-arrow { margin-left: auto; color: var(--red); font-size: 14px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #12110e;
  color: var(--mute-on-dark);
  padding: 64px 0 28px;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(120px, 0.25fr) minmax(280px, 1.2fr);
  gap: 40px;
  align-items: start;
}
.footer-brand { display: flex; gap: 13px; align-items: flex-start; }
.footer-seal { width: 34px; height: 34px; font-size: 18px; }
.footer-brand strong {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--paper-on-dark);
}
.footer-brand p {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(163, 153, 135, 0.8);
}
.footer-links { display: flex; flex-direction: column; gap: 11px; padding-top: 3px; }
.footer-links a,
.footer-links button {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mute-on-dark);
  text-align: left;
  padding: 0;
  transition: color 0.25s ease;
}
.footer-links a:hover,
.footer-links button:hover { color: var(--gold-on-dark); }
.footer-disclaimer { font-size: 11px; line-height: 1.95; letter-spacing: 0.02em; color: #a39b8c; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid rgba(236, 227, 210, 0.08);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #918878;
}

/* =========================================================
   CAST OVERLAY
   ========================================================= */
.cast-overlay,
.modal,
.drawer {
  position: fixed;
  inset: 0;
  z-index: 300;
}
.overlay-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(177, 138, 77, 0.12), transparent 42%),
    rgba(11, 10, 8, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.5s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.cast-stage {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 34px;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--paper-on-dark);
  animation: stage-rise 0.7s var(--ease) both;
}
@keyframes stage-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.overlay-skip {
  position: fixed;
  top: 26px;
  right: 32px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(236, 227, 210, 0.55);
  padding: 7px 0 7px 14px;
  border-bottom: 1px solid rgba(236, 227, 210, 0.2);
  transition: color 0.25s ease, border-color 0.25s ease;
  z-index: 2;
}
.overlay-skip:hover { color: var(--paper-on-dark); border-color: rgba(203, 169, 112, 0.6); }
.cast-topline {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(203, 169, 112, 0.88);
}
.cast-topline-rule { width: 28px; height: 1px; background: rgba(203, 169, 112, 0.3); }
.casting-title {
  margin-top: 22px;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--paper-on-dark);
}
.cast-round {
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold-on-dark);
}
.coin-row {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 34px);
  height: 122px;
  margin-top: 30px;
  perspective: 900px;
}
.coin {
  position: relative;
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  perspective: 600px;
}
.coin-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: transform;
}
.coin.is-back .coin-inner { transform: rotateY(180deg); }
.coin-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 236, 190, 0.45), transparent 28%),
    radial-gradient(circle at 60% 70%, #7b5a2f, #a47a42 45%, #5e4323 100%);
  border: 1px solid rgba(52, 34, 14, 0.7);
  box-shadow:
    inset 0 0 0 4px rgba(61, 42, 19, 0.35),
    inset 0 0 0 5px rgba(228, 195, 137, 0.22),
    0 12px 24px rgba(0, 0, 0, 0.3);
  color: rgba(61, 39, 12, 0.78);
  font-family: var(--serif);
  font-size: 10px;
  line-height: 1;
}
.coin-face.back {
  transform: rotateY(180deg);
  background:
    radial-gradient(circle at 60% 30%, rgba(255, 236, 190, 0.3), transparent 30%),
    radial-gradient(circle at 50% 50%, #806033, #9a7441 50%, #5c4121 100%);
}
.coin-face span { position: absolute; }
.cf-top { top: 13%; left: 50%; transform: translateX(-50%); }
.cf-right { right: 12%; top: 50%; transform: translateY(-50%); }
.cf-bottom { bottom: 13%; left: 50%; transform: translateX(-50%); }
.cf-left { left: 12%; top: 50%; transform: translateY(-50%); }
.coin-hole {
  width: 22px;
  height: 22px;
  background: #171510;
  border-radius: 1px;
  box-shadow: inset 0 0 0 2px rgba(35, 24, 11, 0.6), 0 0 0 1px rgba(237, 208, 152, 0.26);
}
.coin-face.back .coin-hole { background: #171510; }
.cb-mark { font-size: 12px; opacity: 0.6; }
.cb-mark.one { top: 17%; left: 50%; transform: translateX(-50%); }
.cb-mark.two { bottom: 17%; left: 50%; transform: translateX(-50%); }
.coin.is-tossing .coin-inner { animation: coin-spin 0.52s cubic-bezier(0.3, 0.6, 0.3, 1) both; }
.coin.is-tossing { animation: coin-hop 0.52s ease-out both; }
@keyframes coin-spin {
  0% { transform: rotateY(0) rotateZ(0); }
  100% { transform: rotateY(1080deg) rotateZ(18deg); }
}
@keyframes coin-hop {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-24px); }
  70% { transform: translateY(4px); }
}
.cast-toss-result {
  min-height: 22px;
  margin-top: 15px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--paper-on-dark);
  transition: opacity 0.2s ease;
}
.cast-toss-result .toss-detail { color: var(--mute-on-dark); font-size: 10px; letter-spacing: 0.06em; margin-left: 8px; }
.cast-lines {
  width: min(310px, 100%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 24px;
  padding: 16px 18px;
  border-top: 1px solid rgba(236, 227, 210, 0.1);
  border-bottom: 1px solid rgba(236, 227, 210, 0.1);
}
.cast-line-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 13px;
  opacity: 0.18;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.cast-line-row.is-filled { opacity: 1; }
.cast-line-pos { width: 22px; font-size: 8px; letter-spacing: 0.08em; color: var(--mute-on-dark); text-align: right; flex: 0 0 auto; }
.cast-line-graphic { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cast-line-graphic .cl-bar { display: flex; justify-content: space-between; height: 3px; }
.cast-line-graphic .cl-bar span { display: block; height: 100%; background: rgba(236, 227, 210, 0.8); }
.cast-line-graphic .cl-bar.yang span { width: 100%; }
.cast-line-graphic .cl-bar.yin span { width: 42%; }
.cast-line-graphic .cl-bar.is-moving span { background: var(--gold-on-dark); }
.cast-line-value { width: 32px; font-size: 8px; letter-spacing: 0.04em; color: var(--gold-on-dark); text-align: left; flex: 0 0 auto; }
.cast-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(310px, 100%);
  margin-top: 13px;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--mute-on-dark);
  font-variant-numeric: tabular-nums;
}
.sound-btn {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--mute-on-dark);
  padding: 3px 0;
  border-bottom: 1px solid rgba(236, 227, 210, 0.12);
}
.sound-btn:hover { color: var(--paper-on-dark); }
.cast-hint { margin-top: 22px; font-size: 10px; letter-spacing: 0.08em; color: var(--mute-on-dark); }

/* =========================================================
   MANUAL MODAL
   ========================================================= */
.modal-backdrop,
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(19, 16, 12, 0.58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade-in 0.3s ease both;
}
.modal {
  display: grid;
  place-items: center;
  padding: 30px 20px;
  z-index: 320;
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(660px, 100%);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--paper-soft);
  color: var(--ink);
  padding: 32px clamp(22px, 4vw, 40px) 28px;
  box-shadow: 0 40px 100px rgba(10, 8, 5, 0.35);
  border: 1px solid rgba(44, 37, 27, 0.18);
  animation: panel-in 0.4s var(--ease) both;
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal-head,
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.modal-head h2,
.drawer-head h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { border-color: var(--ink-soft); color: var(--ink); }
.modal-intro,
.drawer-intro {
  margin-top: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.85;
  color: var(--ink-mute);
}
.manual-rows { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.manual-row {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.manual-row-label {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
  text-align: right;
}
.manual-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.manual-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.25);
  color: var(--ink-soft);
  transition: all 0.2s ease;
}
.manual-option:hover { border-color: rgba(44, 37, 27, 0.32); }
.manual-option.is-selected { background: var(--ink); border-color: var(--ink); color: var(--paper-soft); }
.manual-option .mo-name { font-size: 9px; letter-spacing: 0.04em; }
.manual-option .mo-line { display: flex; flex-direction: column; gap: 2px; width: 34px; }
.manual-option .mo-bar { display: flex; justify-content: space-between; height: 2px; }
.manual-option .mo-bar span { display: block; height: 100%; background: currentColor; }
.manual-option .mo-bar.yang span { width: 100%; }
.manual-option .mo-bar.yin span { width: 42%; }
.manual-option.is-selected.moving .mo-line { color: var(--gold-soft); }
.manual-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  font-size: 9px;
  color: var(--ink-mute);
}
.manual-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-line { display: inline-block; width: 18px; height: 2px; background: var(--ink-soft); }
.legend-line.yin { background: linear-gradient(90deg, var(--ink-soft) 42%, transparent 42%, transparent 58%, var(--ink-soft) 58%); }
.legend-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--red); }
.manual-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.manual-actions .primary-btn { min-height: 48px; letter-spacing: 0.18em; font-size: 12px; }

/* =========================================================
   HISTORY DRAWER
   ========================================================= */
.drawer { z-index: 330; }
.drawer-backdrop { position: fixed; }
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, calc(100% - 36px));
  display: flex;
  flex-direction: column;
  background: var(--paper-soft);
  color: var(--ink);
  padding: 32px 30px 22px;
  box-shadow: -30px 0 80px rgba(10, 8, 5, 0.25);
  animation: drawer-in 0.45s var(--ease) both;
}
@keyframes drawer-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.drawer-intro { font-size: 10px; line-height: 1.9; }
.history-list {
  flex: 1;
  overflow-y: auto;
  margin-top: 18px;
  padding-right: 4px;
}
.history-empty {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  color: var(--ink-mute);
}
.history-empty .empty-coin {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(44, 37, 27, 0.18);
  font-family: var(--serif);
  font-size: 17px;
  color: var(--ink-mute);
}
.history-empty b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}
.history-empty p { max-width: 240px; font-size: 10px; line-height: 1.8; }
.history-empty .text-link { margin-top: 4px; }
.history-item {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 9px;
  padding: 16px 38px 16px 0;
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.2s ease, padding-left 0.2s ease;
}
.history-item:hover { background: rgba(255, 255, 255, 0.3); padding-left: 8px; }
.history-item .hi-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.history-item .hi-hex { font-family: var(--serif); font-size: 16px; letter-spacing: 0.08em; color: var(--ink); }
.history-item .hi-cat {
  padding: 1px 6px;
  font-size: 8px;
  color: var(--red);
  border: 1px solid rgba(166, 58, 43, 0.25);
}
.history-item .hi-date { margin-left: auto; font-size: 9px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.history-item .hi-question {
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.history-item .hi-foot { display: flex; align-items: center; gap: 9px; font-size: 9px; color: var(--ink-mute); letter-spacing: 0.04em; }
.history-item .hi-score { color: #7c5d32; }
.history-delete {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: rgba(78, 70, 57, 0.35);
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}
.history-delete:hover { color: var(--red); background: rgba(166, 58, 43, 0.08); }
.drawer-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 9px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.danger-text:hover { color: var(--red); border-color: rgba(166, 58, 43, 0.35); }

/* ---------- Toast / 回到顶部 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  z-index: 500;
  transform: translate(-50%, 14px);
  padding: 11px 20px;
  max-width: calc(100% - 40px);
  background: rgba(28, 24, 18, 0.94);
  color: var(--paper-soft);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid rgba(203, 169, 112, 0.26);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.to-top {
  position: fixed;
  right: 26px;
  bottom: 28px;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(44, 37, 27, 0.16);
  background: rgba(243, 235, 222, 0.85);
  color: var(--ink-soft);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
}
.to-top svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--paper-soft); }

.cast-stage:focus,
.modal-panel:focus,
.drawer-panel:focus { outline: none; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#cast:focus,
.result:focus { outline: none; }

/* ---------- 结果入场 / 補漏 ---------- */
.result-inner > * {
  animation: result-rise 0.8s var(--ease) both;
}
.result-inner > :nth-child(2) { animation-delay: 0.05s; }
.result-inner > :nth-child(3) { animation-delay: 0.1s; }
.result-inner > :nth-child(4) { animation-delay: 0.15s; }
.result-inner > :nth-child(5) { animation-delay: 0.2s; }
@keyframes result-rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.history-entry { position: relative; }
.history-entry .history-item { border-bottom: 1px solid var(--line-soft); }
.history-card .hc-top,
.history-card .hc-foot { width: 100%; }
.history-card .hc-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.history-card .hp-question {
  font-size: 11px;
  line-height: 1.75;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.history-card .hc-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: auto;
  padding-top: 3px;
  font-size: 10px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}
.target-card.is-risk {
  border-color: rgba(201, 143, 125, 0.25);
  background: rgba(201, 143, 125, 0.035);
}
.target-card.is-risk .target-rel { color: #c98f7d; }
.target-card.is-risk .strength-pill { color: #c98f7d; border-color: rgba(201, 143, 125, 0.3); }
.target-card.is-risk .strength-bar i { background: linear-gradient(90deg, rgba(201, 143, 125, 0.3), #c98f7d); }
button:focus-visible,
a:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--red);
  outline-offset: 3px;
}
.history-card { color: inherit; }
.history-empty .text-link { border: 0; background: none; }
@media (max-height: 820px) and (min-width: 961px) {
  .hero { padding-top: 108px; }
  .hero-title { font-size: clamp(52px, 5.5vw, 76px); }
  .hero-lead { margin-top: 16px; }
  .hero-meta { margin-top: 20px; padding-top: 12px; }
  .hero-signature { margin-top: 14px; }
  .bagua-stage { width: min(360px, 28vw); }
  .cast-panel { margin-top: 26px; padding-top: 22px; }
  .cast-form { padding: 16px 0; }
  .panel-head { padding-bottom: 14px; }
}
/* 深色区里的导航 */
.site-header.is-on-dark {
  background: rgba(20, 18, 14, 0.82);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  box-shadow: 0 1px 0 rgba(219, 193, 149, 0.12);
}
.site-header.is-on-dark .brand-type strong { color: var(--paper-on-dark); }
.site-header.is-on-dark .brand-type small { color: rgba(236, 227, 210, 0.45); }
.site-header.is-on-dark .site-nav a,
.site-header.is-on-dark .nav-history { color: rgba(236, 227, 210, 0.72); }
.site-header.is-on-dark .site-nav a:hover,
.site-header.is-on-dark .nav-history:hover { color: var(--paper-on-dark); }
.site-header.is-on-dark .header-date { color: rgba(236, 227, 210, 0.5); }
.site-header.is-on-dark .header-rule { background: rgba(236, 227, 210, 0.18); }
.site-header.is-on-dark .header-cast { color: var(--paper-on-dark); }
.site-header.is-on-dark .header-cast span { color: var(--gold-on-dark); }
.site-header.is-on-dark .brand-seal { box-shadow: inset 0 0 0 1px rgba(255, 246, 233, 0.35), 0 4px 16px rgba(0, 0, 0, 0.28); }
/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1120px) {
  .container { width: calc(100% - 56px); }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.7fr); }
  .bagua-stage { width: min(390px, 34vw); }
  .cast-form { gap: 32px; }
  .reading-grid { grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr); }
  .score-card { flex-direction: column; align-items: flex-start; gap: 18px; }
  .score-caption { width: 100%; }
}

@media (max-width: 960px) {
  .container { width: calc(100% - 44px); }
  .header-date, .header-rule { display: none; }
  .header-side { gap: 0; }
  .site-nav { gap: 22px; margin-left: auto; }
  .header-cast { display: none; }
  .hero { padding-top: 122px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr); gap: 10px; }
  .hero-title { font-size: clamp(54px, 8.6vw, 76px); }
  .hero-lead { font-size: 14px; }
  .bagua-stage { width: min(330px, 33vw); }
  .art-caption { display: none; }
  .art-seal { left: 0; bottom: 8%; }
  .cast-form { grid-template-columns: 1fr; gap: 24px; }
  .cast-side { gap: 14px; }
  .category-chips { gap: 6px; }
  .verdict-grid { grid-template-columns: 1fr; }
  .score-card { flex-direction: row; align-items: center; }
  .score-caption { width: auto; }
  .hex-pair { grid-template-columns: 1fr; }
  .chart-scroll-hint { display: block; }
  .hex-connector { height: 46px; }
  .hex-connector::before { display: none; }
  .hex-connector::after { display: none; }
  .hex-empty { min-height: 120px; }
  .reading-grid { grid-template-columns: 1fr; }
  .reading-side { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: start; }
  .days-panel { grid-column: span 1; }
  .timing-panel { grid-column: span 1; }
  .action-board { grid-template-columns: 1fr; }
  .priority-block { padding-right: 0; padding-bottom: 20px; border-right: 0; border-bottom: 1px solid rgba(236, 227, 210, 0.1); }
  .method-grid { margin-top: 48px; }
  .method-card { padding: 32px 24px; min-height: 300px; }
  .method-card p { font-size: 12px; }
  .history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: minmax(180px, 0.6fr) minmax(280px, 1.4fr); }
  .footer-links { display: none; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 36px); }
  .site-header { height: 68px; }
  .site-header.is-scrolled { height: 62px; }
  .brand-seal { width: 31px; height: 31px; font-size: 18px; }
  .brand-type strong { font-size: 19px; }
  .brand-type small { font-size: 7px; }
  .site-nav { gap: 18px; }
  .site-nav a, .nav-history { font-size: 11px; }
  .hero { padding: 106px 0 62px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { position: absolute; right: -70px; top: 60px; opacity: 0.25; pointer-events: none; }
  .bagua-stage { width: 330px; }
  .bagua-core { opacity: 0.8; }
  .art-seal { display: none; }
  .hero-copy { position: relative; z-index: 2; }
  .hero-title { margin-top: 20px; font-size: clamp(48px, 13vw, 68px); }
  .hero-lead { margin-top: 22px; font-size: 13.5px; line-height: 1.95; }
  .hero-meta { margin-top: 25px; padding-top: 15px; gap: 9px 18px; }
  .hero-meta-item b { font-size: 10px; }
  .hero-meta-item i { font-size: 10px; }
  .hero-signature { margin-top: 22px; }
  .sig-en { display: none; }
  .eyebrow-en { display: none; }
  .cast-panel { margin-top: 32px; padding: 24px 18px 0; }
  .cast-panel::before { inset: 5px; }
  .panel-head { padding-bottom: 16px; }
  .panel-head h2 { font-size: 21px; }
  .live-clock-time { font-size: 24px; }
  .live-clock small { font-size: 8px; }
  .cast-form { padding: 22px 0 20px; }
  #questionInput { font-size: 19px; }
  .ask-under { flex-direction: column; gap: 10px; }
  .char-count { margin-top: 0; }
  .quick-examples { gap: 7px 11px; }
  .category-chip { font-size: 10px; min-height: 30px; padding: 4px 8px 4px 6px; }
  .category-chip .chip-seal { width: 16px; height: 16px; font-size: 9px; }
  .panel-foot { flex-direction: column; align-items: flex-start; gap: 7px; padding: 14px 0 16px; }
  .result { padding-top: 58px; }
  .result-title h2 { font-size: clamp(40px, 12vw, 54px); }
  .gua-sub { gap: 7px 10px; font-size: 10px; }
  .score-card { flex-direction: column; align-items: flex-start; padding: 20px; }
  .score-ring { width: 112px; height: 112px; }
  .score-ring-inner strong { font-size: 26px; }
  .score-label { font-size: 19px; }
  .verdict-card { padding: 24px 20px; }
  .verdict-card h3 { font-size: 22px; }
  .hex-card { padding: 20px; }
  .hex-body { gap: 20px; }
  .hex-bars { width: 100px; }
  .hex-name h3 { font-size: 26px; }
  .hex-classic { grid-template-columns: 38px minmax(0, 1fr); font-size: 10px; }
  .chart-block { padding: 20px 16px; }
  .block-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .block-head > p { text-align: left; }
  .block-head h3 { font-size: 22px; }
  .reading-side { grid-template-columns: 1fr; }
  .target-block, .read-card, .side-panel { padding: 20px 18px; }
  .block-title { align-items: flex-start; flex-direction: column; gap: 7px; }
  .block-title p { text-align: left; }
  .days-grid { gap: 2px; }
  .day-cell { padding: 8px 1px; }
  .day-date { font-size: 10px; }
  .day-gz { display: none; }
  .day-hint { font-size: 7px; min-height: 19px; }
  .action-board { padding: 20px 18px; }
  .advice-columns { grid-template-columns: 1fr; gap: 20px; }
  .result-actions { flex-direction: column; align-items: flex-start; }
  .result-action-btns { width: 100%; }
  .result-action-btns .primary-btn, .result-action-btns .ghost-btn { flex: 1; }
  .method { padding: 68px 0; }
  .section-head h2 { font-size: 34px; }
  .section-head > p { font-size: 12px; }
  .method-grid { grid-template-columns: 1fr; margin-top: 36px; }
  .method-card { min-height: auto; padding: 28px 22px; }
  .method-card + .method-card { border-left: 0; border-top: 1px solid var(--line); }
  .method-icon { width: 50px; height: 50px; margin-bottom: 16px; }
  .method-card p { margin-top: 12px; }
  .method-foot { flex-direction: column; gap: 16px; }
  .history-strip { padding: 60px 0; }
  .section-head.split { flex-direction: column; align-items: flex-start; gap: 14px; }
  .history-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
  .footer-disclaimer { max-width: none; }
  .footer-bottom { flex-direction: column; gap: 8px; margin-top: 32px; }
  .overlay-skip { top: 18px; right: 18px; }
  .cast-stage { justify-content: flex-start; padding-top: 78px; }
  .coin-row { height: 106px; margin-top: 24px; gap: 22px; }
  .coin { width: 76px; height: 76px; }
  .coin-face { font-size: 9px; }
  .coin-hole { width: 19px; height: 19px; }
  .cast-lines { margin-top: 18px; padding: 12px 14px; }
  .cast-hint { margin-top: 16px; }
  .modal-panel { padding: 24px 18px 22px; }
  .manual-row { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; }
  .manual-options { gap: 4px; }
  .manual-option { min-height: 48px; padding: 7px 2px; }
  .manual-option .mo-name { font-size: 8px; }
  .drawer-panel { width: calc(100% - 22px); padding: 26px 20px 18px; }
  .to-top { right: 16px; bottom: 18px; }
  .toast { bottom: 24px; }
}

@media (max-width: 420px) {
  .hero-title { font-size: 46px; }
  .quick-examples .quick-label { display: none; }
  .site-nav a:nth-child(2) { display: none; }
  .score-ring { width: 100px; height: 100px; }
  .score-ring-inner strong { font-size: 23px; }
  .score-label { font-size: 17px; }
  .hex-body { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hex-name h3 { font-size: 25px; }
  .hex-classic { grid-template-columns: 36px minmax(0, 1fr); }
  .days-grid { grid-template-columns: repeat(7, minmax(36px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .day-block { min-width: 36px; }
  .method-num { right: 22px; }
  .modal { padding: 16px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   H5 · MOBILE-FIRST OVERRIDES
   ========================================================= */
.chart-mobile-list { display: none; }

@media (max-width: 720px) {
  :root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
  }

  html {
    -webkit-tap-highlight-color: transparent;
    -webkit-text-size-adjust: 100%;
  }

  body {
    padding-bottom: var(--safe-bottom);
    overscroll-behavior-y: contain;
  }

  .paper-noise { opacity: 0.12; }
  .skip-link { top: -70px; }

  /* App bar */
  .site-header {
    height: calc(56px + var(--safe-top));
    padding-top: var(--safe-top);
    background: rgba(243, 235, 222, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(44, 37, 27, 0.08);
  }
  .site-header.is-scrolled {
    height: calc(52px + var(--safe-top));
    background: rgba(243, 235, 222, 0.96);
  }
  .header-inner { height: 56px; gap: 10px; }
  .brand { gap: 9px; }
  .brand-seal { width: 30px; height: 30px; font-size: 17px; }
  .brand-type strong { font-size: 18px; letter-spacing: 0.14em; }
  .brand-type small { font-size: 7px; letter-spacing: 0.3em; }
  .site-nav { margin-left: auto; gap: 17px; }
  .site-nav a, .nav-history {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    font-size: 11px;
    letter-spacing: 0.12em;
  }
  .header-side { display: none; }
  .nav-count { min-width: 16px; height: 16px; font-size: 8px; }

  /* Compact hero */
  .hero {
    padding: calc(72px + var(--safe-top)) 0 28px;
  }
  .hero-grid { display: block; }
  .hero-art { display: none; }
  .hero-wash .hero-char {
    top: 120px;
    right: -78px;
    font-size: 330px;
    color: rgba(35, 29, 21, 0.045);
  }
  .dust { display: none; }
  .ink-blob { filter: blur(48px); opacity: 0.34; }
  .eyebrow { gap: 8px; font-size: 9px; letter-spacing: 0.18em; }
  .eyebrow-rule { width: 28px; }
  .eyebrow-en { display: none; }
  .hero-title {
    margin-top: 13px;
    font-size: clamp(35px, 10.4vw, 42px);
    line-height: 1.22;
    letter-spacing: 0;
  }
  .hero-lead {
    margin-top: 12px;
    max-width: 94%;
    font-family: var(--sans);
    font-size: 12.5px;
    line-height: 1.85;
    letter-spacing: 0.025em;
  }
  .hero-lead br { display: none; }
  .hero-meta, .hero-signature { display: none; }

  /* Cast panel: get question + CTA into first screen */
  .cast-panel {
    margin-top: 19px;
    padding: 17px 16px 0;
    background: rgba(249, 243, 232, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 16px 40px rgba(49, 38, 20, 0.12);
  }
  .cast-panel::before { inset: 5px; }
  .corner { width: 10px; height: 10px; }
  .panel-head { padding-bottom: 11px; gap: 12px; }
  .panel-head h2 { margin-top: 5px; font-size: 19px; letter-spacing: 0.05em; }
  .panel-kicker { font-size: 8px; letter-spacing: 0.28em; }
  .live-clock-time { font-size: 21px; }
  .live-clock small { margin-top: 4px; font-size: 8px; }
  .cast-form { padding: 13px 0 14px; gap: 13px; }
  .field-label { font-size: 11px; gap: 7px; letter-spacing: 0.1em; }
  .field-label span { display: none; }
  #questionInput {
    margin-top: 5px;
    padding: 4px 0 10px;
    font-size: 17px;
    line-height: 1.5;
  }
  .field-hint { display: none; }
  .ask-under {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
  }
  .quick-label { flex: 0 0 auto; font-size: 9px; letter-spacing: 0.08em; }
  .quick-examples {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 13px;
    padding-bottom: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .quick-examples::-webkit-scrollbar { display: none; }
  .quick-examples button {
    flex: 0 0 auto;
    min-height: 32px;
    font-size: 11px;
  }
  .char-count { display: none; }
  .cast-side { gap: 10px; }
  .category-block > .field-label { font-size: 11px; }
  .category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    margin-top: 7px;
    padding-bottom: 3px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .category-chips::-webkit-scrollbar { display: none; }
  .category-chip {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 6px 11px 6px 8px;
    font-size: 10.5px;
  }
  .category-chip .chip-seal { width: 18px; height: 18px; font-size: 9px; }
  .category-note { display: none; }
  .cast-submit { min-height: 52px; font-size: 13px; }
  .cast-alts { justify-content: space-between; gap: 8px; }
  .cast-alts .dot { display: none; }
  .cast-alts .text-btn { min-height: 36px; padding: 8px 0; font-size: 11px; }
  .panel-foot {
    padding: 10px 0 12px;
    font-size: 9px;
    gap: 8px;
  }
  .foot-time { display: none; }
  .foot-note {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Result: reduce the editorial poster, increase reading area */
  .result { padding: 48px 0 58px; }
  .result::after { display: none; }
  .result-glow { width: 120vw; height: 120vw; top: -50vw; opacity: .8; }
  .result-kicker { gap: 10px; font-size: 8px; letter-spacing: 0.32em; }
  .result-kicker span { width: 24px; }
  .gua-number { margin-top: 15px; font-size: 9px; letter-spacing: 0.2em; }
  .result-title h2 { margin-top: 8px; font-size: 38px; letter-spacing: 0.06em; }
  .gua-sub { margin-top: 10px; gap: 6px 9px; font-size: 9px; line-height: 1.8; letter-spacing: 0.06em; }
  .verdict-grid { gap: 10px; margin-top: 23px; }
  .score-card {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 15px;
  }
  .score-ring { width: 92px; height: 92px; }
  .score-ring::after { inset: -5px; }
  .score-label { font-size: 16px; }
  .score-ring-inner strong { margin-top: 4px; font-size: 22px; }
  .score-ring-inner small { font-size: 7px; margin-top: 3px; }
  .score-caption { flex: 1; width: auto; }
  .score-question { font-size: 13px; line-height: 1.7; }
  .score-date { margin-top: 8px; padding-top: 8px; font-size: 9px; line-height: 1.65; }
  .verdict-card { padding: 17px 16px; }
  .verdict-card h3 { margin-top: 11px; font-size: 20px; line-height: 1.62; }
  .verdict-card > p { margin-top: 9px; font-size: 11px; line-height: 1.85; }
  .tag-row { gap: 6px; margin-top: 13px; }
  .result-tag { padding: 4px 7px; font-size: 8.5px; }

  .hex-pair { margin-top: 13px; }
  .hex-card { padding: 16px 15px; }
  .hex-card > header { padding-bottom: 10px; font-size: 8.5px; }
  .hex-role { font-size: 9px; }
  .hex-body { gap: 16px; padding: 14px 0; }
  .hex-bars { width: 86px; gap: 6px; }
  .hex-bar { height: 5px; }
  .hex-bar.is-moving::after { right: -11px; width: 4px; height: 4px; }
  .hex-index { font-size: 8px; }
  .hex-name h3 { margin-top: 4px; font-size: 24px; }
  .hex-keyword { margin-top: 5px; font-size: 9.5px; }
  .hex-classic { grid-template-columns: 33px 1fr; gap: 8px; padding: 9px 0; font-size: 9.5px; line-height: 1.8; }
  .hex-connector { height: 36px; }
  .hex-empty { min-height: 110px; gap: 10px; }
  .empty-seal { width: 38px; height: 38px; font-size: 15px; }
  .hex-empty p { font-size: 10px; line-height: 1.8; }

  .chart-block { margin-top: 13px; padding: 15px 14px; }
  .block-head { padding-bottom: 12px; }
  .block-head h3 { font-size: 20px; }
  .block-head > p { font-size: 9px; }
  .chart-scroll, .chart-scroll-hint, .chart-legend { display: none; }
  .chart-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 2px 0 6px;
  }
  .cm-row {
    position: relative;
    padding: 11px 12px;
    border: 1px solid rgba(236, 227, 210, 0.09);
    background: rgba(255, 255, 255, 0.012);
  }
  .cm-row.is-target {
    border-color: rgba(203, 169, 112, 0.32);
    background: rgba(203, 169, 112, 0.055);
    box-shadow: inset 2px 0 0 var(--gold-on-dark);
  }
  .cm-row.is-moving { border-right-color: rgba(203, 169, 112, 0.2); }
  .cm-head { display: flex; align-items: center; gap: 9px; }
  .cm-pos {
    width: 30px;
    flex: 0 0 auto;
    font-family: var(--serif);
    font-size: 10px;
    color: var(--mute-on-dark);
    letter-spacing: 0.04em;
  }
  .cm-line { display: flex; width: 56px; flex: 0 0 auto; }
  .cm-bar { display: flex; justify-content: space-between; width: 100%; height: 4px; }
  .cm-bar span { display: block; height: 100%; background: #d6c4a0; }
  .cm-bar.yang span { width: 100%; }
  .cm-bar.yin span { width: 42%; }
  .cm-bar.is-moving span { background: var(--gold-on-dark); box-shadow: 0 0 8px rgba(203, 169, 112, 0.24); }
  .cm-type { font-size: 9px; color: var(--mute-on-dark); letter-spacing: 0.04em; }
  .cm-moving-symbol { color: var(--red); font-weight: 500; }
  .cm-badges { display: flex; align-items: center; gap: 4px; margin-left: auto; }
  .cm-badge {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(236, 227, 210, 0.18);
    border-radius: 50%;
    font-family: var(--serif);
    font-size: 9px;
    color: var(--mute-on-dark);
  }
  .cm-badge.shi { border-color: rgba(203, 169, 112, 0.55); color: var(--gold-on-dark); }
  .cm-badge.target { border-color: rgba(203, 169, 112, 0.4); color: var(--gold-on-dark); border-radius: 2px; }
  .cm-badge.ying { color: #a8a092; }
  .cm-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 13px;
    margin-top: 7px;
    font-size: 10px;
    color: var(--mute-on-dark);
  }
  .cm-liuqin { font-family: var(--serif); font-size: 13px; color: var(--paper-on-dark); letter-spacing: 0.05em; }
  .cm-najia { font-family: var(--serif); font-size: 12px; color: var(--paper-on-dark); }
  .cm-najia em, .cm-hidden-item em { font-family: var(--sans); font-size: 9px; font-style: normal; opacity: 0.75; }
  .cm-liushen { font-size: 9px; }
  .cm-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 14px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(236, 227, 210, 0.06);
    font-size: 9px;
    line-height: 1.6;
    color: rgba(163, 153, 135, 0.82);
  }
  .cm-sub .empty-tag, .cm-sub .break-tag { margin-left: 3px; }
  .cm-dim { opacity: 0.5; }
  .chart-help { margin-top: 8px; font-size: 9px; line-height: 1.7; }

  .reading-grid { margin-top: 13px; gap: 13px; }
  .reading-main, .reading-side { gap: 13px; }
  .target-block, .read-card, .side-panel { padding: 16px 14px; }
  .block-title { margin-bottom: 12px; gap: 6px; }
  .block-title h3 { font-size: 19px; }
  .block-title p { font-size: 9px; line-height: 1.7; }
  .target-cards { grid-template-columns: 1fr; gap: 9px; }
  .target-card { padding: 14px; }
  .target-card-head { gap: 7px; }
  .target-rel { font-size: 18px; }
  .target-role { font-size: 9px; }
  .target-meta { margin-top: 8px; font-size: 9px; gap: 5px 10px; }
  .strength-bar { margin-top: 11px; }
  .target-factors { margin-top: 10px; gap: 4px; }
  .factor-chip { font-size: 8px; padding: 3px 5px; }
  .read-head { gap: 8px; padding-bottom: 10px; }
  .read-index { font-size: 9px; }
  .read-head h3 { font-size: 18px; letter-spacing: 0.06em; }
  .read-body { padding-top: 10px; }
  .read-body p { font-size: 12.5px; line-height: 2.02; }
  .read-body p + p { margin-top: 7px; }

  .days-grid {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    margin-top: 11px;
    padding-bottom: 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .days-grid::-webkit-scrollbar { display: none; }
  .day-cell {
    flex: 0 0 65px;
    min-height: 134px;
    padding: 9px 3px 10px;
    scroll-snap-align: start;
  }
  .day-week { font-size: 9px; }
  .day-date { margin-top: 3px; font-size: 11px; }
  .day-gz { display: block; font-size: 8px; margin-top: 3px; }
  .day-meter { height: 34px; margin-top: 6px; }
  .day-hint { min-height: 25px; margin-top: 5px; font-size: 7.5px; line-height: 1.4; }
  .days-note { margin-top: 11px; font-size: 10.5px; line-height: 1.8; }
  .timing-dates { margin-top: 9px; gap: 5px; }
  .timing-date { padding: 4px 7px; font-size: 8.5px; }
  .timing-text { margin-top: 9px; font-size: 10.5px; line-height: 1.9; }
  .timing-note { font-size: 9px; }

  /* AI card */
  .ai-card { padding: 16px 14px; }
  .ai-head { gap: 10px; }
  .ai-seal { width: 31px; height: 31px; font-size: 9px; }
  .ai-card .ai-heading h3 { margin-top: 4px; font-size: 19px; }
  .ai-status { margin-left: 0; padding: 4px 7px; font-size: 8px; }
  .ai-mode { margin-top: 11px; padding: 6px 8px; font-size: 9.5px; line-height: 1.7; }
  .ai-body { margin-top: 13px; }
  .ai-copy h4 { margin: 18px 0 7px; font-size: 13px; }
  .ai-copy p { font-size: 13px; line-height: 2.02; }
  .ai-error { font-size: 10.5px; padding: 10px 11px; }
  .ai-foot { margin-top: 15px; padding-top: 10px; font-size: 9px; }
  .ai-chat { margin-top: 17px; padding-top: 14px; }
  .ai-chat-head span { font-size: 14px; }
  .ai-chat-head small { font-size: 8px; }
  .ai-chat-msg p { font-size: 11px; line-height: 1.85; }
  .ai-chat-msg > span { width: 22px; height: 22px; }
  .ai-chat-suggestions { gap: 6px; margin-top: 10px; }
  .ai-chat-suggestions button { min-height: 34px; padding: 6px 8px; font-size: 9px; }
  .ai-chat-form { margin-top: 10px; }
  .ai-chat-form input { height: 42px; font-size: 16px; }
  .ai-chat-form button { height: 42px; min-width: 54px; font-size: 11px; }
  .ai-chat-note { font-size: 9px; }

  /* Action board */
  .action-board { margin-top: 13px; padding: 16px 14px; gap: 14px; }
  .priority-block { padding-bottom: 14px; }
  .priority-block p { margin-top: 9px; font-size: 17px; line-height: 1.75; }
  .advice-columns { gap: 15px; }
  .advice-col h4 { margin-bottom: 9px; font-size: 16px; }
  .advice-col ul { gap: 7px; }
  .advice-col li { font-size: 10.5px; line-height: 1.8; }
  .result-actions { margin-top: 17px; gap: 12px; }
  .result-saved { font-size: 9px; }
  .result-action-btns { width: 100%; }
  .result-action-btns .ghost-btn, .result-action-btns .primary-btn { min-height: 46px; flex: 1; }
  .result-disclaimer { margin-top: 14px; padding-top: 12px; font-size: 9.5px; line-height: 1.9; }

  /* H5 sheets */
  .modal {
    place-items: end stretch;
    padding: 0;
  }
  .modal-backdrop, .drawer-backdrop {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  .modal-panel {
    width: 100%;
    max-height: 90dvh;
    border-radius: 18px 18px 0 0;
    padding: 22px 17px calc(18px + var(--safe-bottom));
    animation: h5-sheet-up 0.35s var(--ease) both;
  }
  .modal-panel .modal-head h2 { font-size: 22px; }
  .icon-btn.close-btn { width: 38px; height: 38px; }
  .manual-rows { margin-top: 14px; }
  .manual-options { gap: 5px; }
  .manual-option { min-height: 54px; }
  .manual-actions { padding-top: 15px; }
  .drawer-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(84dvh, 760px);
    border-radius: 18px 18px 0 0;
    padding: 22px 17px calc(14px + var(--safe-bottom));
    animation: h5-sheet-up 0.35s var(--ease) both;
  }
  .drawer-head h2 { font-size: 24px; }
  .drawer-intro { font-size: 10px; }
  .history-delete { width: 34px; height: 34px; right: 2px; }
  .drawer-foot { padding-top: 12px; }

  /* Safe area / overlay */
  .to-top {
    right: 14px;
    bottom: calc(16px + var(--safe-bottom));
    width: 40px;
    height: 40px;
  }
  .toast { bottom: calc(20px + var(--safe-bottom)); }
  .site-footer { padding-bottom: calc(20px + var(--safe-bottom)); }
  .cast-overlay { min-height: 100dvh; }
  .cast-stage {
    min-height: 100dvh;
    height: 100dvh;
    padding: calc(66px + var(--safe-top)) 0 calc(24px + var(--safe-bottom));
  }
  .overlay-skip { top: calc(14px + var(--safe-top)); right: 18px; }
  .cast-topline { font-size: 8px; }
  .coin { width: 76px; height: 76px; }
  .cast-lines { width: min(300px, 100%); }
  .cast-hint { margin-top: 14px; }
}

@keyframes h5-sheet-up {
  from { transform: translateY(100%); opacity: 0.7; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 390px) {
  .hero-title { font-size: 34px; }
  .hero-lead { font-size: 12px; }
  .panel-head h2 { font-size: 18px; }
  .result-title h2 { font-size: 35px; }
  .score-ring { width: 84px; height: 84px; }
  .score-question { font-size: 12.5px; }
  .cast-panel { padding-left: 14px; padding-right: 14px; }
  .container { width: calc(100% - 28px); }
  .site-nav { gap: 14px; }
}

@media (max-width: 720px) {
  .cast-form { grid-template-columns: minmax(0, 1fr); }
  .cast-form > *, .cast-side, .category-block { min-width: 0; max-width: 100%; }
  .category-chips, .quick-examples { width: 100%; max-width: 100%; }
}

@media (max-width: 720px) {
  .site-header.is-on-dark,
  .site-header.is-on-dark.is-scrolled {
    background: rgba(20, 18, 14, 0.94);
    box-shadow: 0 1px 0 rgba(219, 193, 149, 0.14);
  }
  .cast-alts > span { display: none; }
  .category-chips {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 22px), transparent 100%);
  }
  .quick-examples {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent 100%);
  }
}

.h5-feature-strip { display: none; }
@media (max-width: 720px) {
  .h5-feature-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 21px;
    font-family: var(--serif);
    font-size: 9.5px;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
  }
  .h5-feature-strip i {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(166, 58, 43, 0.55);
  }
  .cm-meta .empty-tag,
  .cm-meta .break-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 4px;
    font-family: var(--sans);
    font-size: 8px;
    line-height: 1.5;
    letter-spacing: 0.03em;
    color: #c98f7d;
    border: 1px solid rgba(201, 143, 125, 0.3);
    vertical-align: 1px;
  }
  .cm-meta .break-tag { color: var(--mute-on-dark); border-color: rgba(236, 227, 210, 0.14); }
}

@media (max-width: 720px) {
  .reading-side { grid-template-columns: minmax(0, 1fr); min-width: 0; width: 100%; }
  .side-panel { min-width: 0; max-width: 100%; }
  .days-grid { width: 100%; max-width: 100%; }
  .days-panel, .timing-panel { width: 100%; }
}

@media (max-width: 720px) {
  body { padding-bottom: 0; }
}

@media (max-width: 720px) {
  .site-header.is-scrolled .header-inner { height: 52px; }
  .site-nav a, .nav-history { min-height: 44px; }
  .category-chip { min-height: 40px; }
  .to-top { width: 44px; height: 44px; }
  .icon-btn.close-btn { width: 40px; height: 40px; }
}

/* =========================================================
   H5 · RESULT SECTION NAVIGATION
   ========================================================= */
.result-subnav { display: none; }

@media (max-width: 720px) {
  .result-subnav {
    display: flex;
    align-items: center;
    gap: 6px;
    position: sticky;
    top: calc(52px + var(--safe-top));
    z-index: 40;
    margin: 18px -18px 0;
    padding: 8px 18px;
    overflow-x: auto;
    background: rgba(20, 18, 14, 0.94);
    border-top: 1px solid rgba(236, 227, 210, 0.07);
    border-bottom: 1px solid rgba(236, 227, 210, 0.09);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .result-subnav::-webkit-scrollbar { display: none; }
  .result-subnav button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(236, 227, 210, 0.13);
    border-radius: 18px;
    color: var(--mute-on-dark);
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: 0.08em;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  }
  .result-subnav button.is-active {
    color: var(--gold-on-dark);
    border-color: rgba(203, 169, 112, 0.48);
    background: rgba(203, 169, 112, 0.08);
  }
  .result-subnav button:active { background: rgba(203, 169, 112, 0.13); }
  #rt-verdict, #rt-chart-marker, #rt-ai, #rt-reading, #rt-days, #rt-action {
    scroll-margin-top: calc(104px + var(--safe-top));
  }
}

@media (max-width: 720px) {
  /* .result 的装饰层需要裁切，但 overflow:hidden 会破坏 sticky 子导航 */
  .result { overflow: clip; }
}

/* =========================================================
   H5 · PHASE 2 — RESULT HUD, AI SHEET, BOTTOM DOCK
   ========================================================= */

.ai-entry { display: none; }

@media (max-width: 720px) {
  /* Keep the sticky section rail edge-to-edge without clipped corners */
  .result-subnav {
    margin: 18px -14px 0;
    padding: 8px 14px;
    box-shadow: 0 10px 22px rgba(8, 7, 5, 0.16);
  }
  .result-subnav button[data-result-ai] {
    color: var(--gold-on-dark);
    border-color: rgba(203, 169, 112, 0.38);
    background: rgba(203, 169, 112, 0.06);
  }

  /* Inline AI teaser replaces the long inline card on phones */
  .ai-entry:not([hidden]) {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px 12px;
    padding: 15px 14px 13px;
    border: 1px solid rgba(203, 169, 112, 0.24);
    background:
      linear-gradient(135deg, rgba(203, 169, 112, 0.055), transparent 56%),
      rgba(255, 255, 255, 0.015);
  }
  .ai-entry .ai-seal {
    grid-row: 1;
    width: 32px;
    height: 32px;
    font-size: 9px;
  }
  .ai-entry-copy { min-width: 0; }
  .ai-entry-copy .panel-kicker { font-size: 8px; }
  .ai-entry-copy strong {
    display: block;
    margin-top: 4px;
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.04em;
    color: var(--paper-on-dark);
  }
  .ai-entry-copy p {
    margin-top: 5px;
    font-size: 10px;
    line-height: 1.75;
    color: var(--mute-on-dark);
  }
  .ai-entry-btn {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    margin-top: 2px;
    padding: 0 12px;
    border: 1px solid rgba(203, 169, 112, 0.3);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--gold-on-dark);
    background: rgba(203, 169, 112, 0.06);
  }
  .ai-entry-btn:active { background: rgba(203, 169, 112, 0.14); }

  /* Full-height AI conversation sheet */
  .ai-sheet:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
  }
  .ai-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 9, 7, 0.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }
  .ai-sheet-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    height: min(88dvh, 840px);
    max-height: calc(100dvh - 12px);
    margin: 0 auto;
    padding-bottom: var(--safe-bottom);
    border: 1px solid rgba(236, 227, 210, 0.1);
    border-bottom: 0;
    border-radius: 20px 20px 0 0;
    background: var(--ink);
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.45);
    outline: none;
    animation: h5-sheet-up 0.35s var(--ease) both;
  }
  .ai-sheet-bar {
    position: relative;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(236, 227, 210, 0.07);
  }
  .ai-sheet-handle {
    width: 42px;
    height: 4px;
    border-radius: 99px;
    background: rgba(236, 227, 210, 0.24);
  }
  .ai-sheet-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    color: var(--mute-on-dark);
  }
  .ai-sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ai-sheet-body::-webkit-scrollbar { display: none; }
  .ai-sheet-body .ai-card {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 4px 16px calc(24px + var(--safe-bottom));
  }
  .ai-sheet-body .ai-card::before { display: none; }
  .ai-sheet-body .ai-card .ai-head { padding-right: 2px; }

  /* Fixed result dock with safe-area */
  .result-dock:not([hidden]) {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: flex;
    gap: 8px;
    padding: 8px 14px calc(8px + var(--safe-bottom));
    border-top: 1px solid rgba(236, 227, 210, 0.1);
    background: rgba(20, 18, 14, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.22);
  }
  .result-dock[hidden] { display: none !important; }
  .result-dock .dock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 46px;
    border: 1px solid rgba(236, 227, 210, 0.15);
    color: var(--paper-on-dark);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    background: rgba(255, 255, 255, 0.025);
  }
  .result-dock .dock-btn:active { background: rgba(236, 227, 210, 0.07); }
  .result-dock .dock-ai {
    flex: 0 0 88px;
    color: var(--gold-on-dark);
    border-color: rgba(203, 169, 112, 0.38);
    background: rgba(203, 169, 112, 0.07);
  }
  .result-dock .dock-ai[hidden] { display: none !important; }
  .result-dock .dock-seal {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(203, 169, 112, 0.35);
    font-size: 7px;
    letter-spacing: 0;
  }
  .result-dock .dock-copy { flex: 1; }
  .result-dock .dock-again {
    flex: 1.15;
    border-color: rgba(203, 169, 112, 0.58);
    color: #19150f;
    background: var(--gold-on-dark);
    font-weight: 500;
  }
  body.has-result-dock .result { padding-bottom: calc(96px + var(--safe-bottom)); }
  body.has-result-dock .site-footer { padding-bottom: calc(86px + var(--safe-bottom)); }
}

.ai-sheet { display: none; }
.ai-sheet[hidden] { display: none !important; }
.result-dock { display: none; }
.result-dock[hidden] { display: none !important; }

/* Sticky HUD: result identity + section scroller */
.result-hud { display: none; }

@media (max-width: 720px) {
  .result-subnav {
    overflow: visible;
    gap: 9px;
  }
  .result-hud {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 70px;
    max-width: 100px;
    padding-right: 9px;
    border-right: 1px solid rgba(236, 227, 210, 0.11);
    white-space: nowrap;
  }
  .result-hud b {
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.05em;
    color: var(--paper-on-dark);
  }
  .result-hud em {
    font-style: normal;
    font-size: 8px;
    line-height: 1.3;
    letter-spacing: 0.04em;
    color: var(--gold-on-dark);
  }
  .result-nav-scroll {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .result-nav-scroll::-webkit-scrollbar { display: none; }
  .result-subnav button { flex: 0 0 auto; }
}

@media (max-width: 720px) {
  .result-subnav button { min-height: 38px; }
  #rt-verdict, #rt-chart-marker, #rt-ai, #rt-reading, #rt-days, #rt-action {
    scroll-margin-top: calc(112px + var(--safe-top));
  }
}

@media (max-width: 720px) {
  .result-subnav {
    margin-left: -18px;
    margin-right: -18px;
    padding-left: 18px;
    padding-right: 18px;
  }
}
@media (max-width: 390px) {
  .result-subnav {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 720px) {
  body.has-result-dock .to-top { bottom: calc(72px + var(--safe-bottom)); }
  body.has-result-dock .toast { bottom: calc(76px + var(--safe-bottom)); }
  body.has-result-dock .result-actions { margin-bottom: 6px; }
}

/* Frog monogram used by the 阿呱 brand */
.brand-frog svg { width: 78%; height: 78%; }

.frog-note { display: none; }
