/* ============================================================
   观相 · BaZi Profile 页
   书册式版式：书封 → 免费画像（三模块）→ 解锁 → 深度解读
   ============================================================ */

.bazi-body {
  min-height: 100vh;
}

/* ---------- 顶栏 ---------- */
.bazi-topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 4vw, 52px);
  background: linear-gradient(
    180deg,
    rgba(16, 20, 27, 0.92) 0%,
    rgba(16, 20, 27, 0.8) 55%,
    rgba(16, 20, 27, 0) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.bazi-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  text-decoration: none;
}
.bazi-brand .topbar__mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(150, 40, 30, 0.4);
}
.bazi-brand__name {
  font-family: var(--kaiti);
  font-size: 19px;
  letter-spacing: 0.2em;
}
.bazi-brand__sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--gold-bright);
}
.bazi-topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bazi-account {
  display: inline-flex;
  align-items: center;
  height: 34px;
  max-width: 220px;
  padding: 0 14px;
  border: 1px solid rgba(245, 242, 234, 0.28);
  border-radius: 999px;
  background: rgba(245, 242, 234, 0.06);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.bazi-account:hover {
  border-color: var(--cinnabar);
  background: rgba(194, 65, 47, 0.18);
}
.bazi-account.is-signed-in {
  border-color: rgba(200, 161, 95, 0.55);
}
.bazi-account span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.unlock-code {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(35, 35, 35, 0.14);
  text-align: left;
}
.unlock-code__hint {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.unlock-buy {
  margin: 0 0 12px;
}
.bazi-back {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(245, 242, 234, 0.72);
  text-decoration: none;
  padding: 8px 0;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0 1px;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease), color 0.3s ease;
}
.bazi-back:hover {
  color: var(--paper);
  background-size: 100% 1px;
}

/* ---------- 主区与书册 ---------- */
.bazi-main {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  padding: clamp(104px, 14vh, 132px) clamp(14px, 4vw, 40px) 72px;
}
.bazi-book {
  width: 100%;
  max-width: 760px;
  background:
    radial-gradient(700px 300px at 18% 0%, rgba(201, 161, 95, 0.07), transparent 60%),
    var(--paper);
  color: var(--ink);
  border-radius: var(--radius-card);
  border: 1px solid rgba(35, 35, 35, 0.055);
  box-shadow: 0 44px 110px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* ---------- 书封 ---------- */
.book-cover {
  padding: clamp(38px, 6vw, 56px) clamp(24px, 6vw, 56px) 32px;
  text-align: center;
  border-bottom: 1px solid var(--line-paper);
}
.book-cover__eyebrow {
  font-family: "Cinzel", var(--serif);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.book-cover__title {
  margin: 16px 0 0;
  font-family: "Epilogue", var(--sans);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.book-cover__meta {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.book-cover__sub {
  margin: 8px 0 0;
  font-family: var(--kaiti);
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--cinnabar);
}

/* ---------- 书章 ---------- */
.book-section {
  padding: 30px clamp(24px, 6vw, 52px) 34px;
  border-bottom: 1px solid var(--line-paper);
}
.book-section__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.book-section__no {
  font-family: "Cinzel", var(--serif);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.book-section__lead {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ---------- 排盘氛围展示（精密计算标本） ---------- */
.chart-plate {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
}
.plate-cell {
  position: relative;
  padding: 14px 8px 12px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.65), rgba(239, 234, 224, 0.5)),
    var(--paper-deep);
  border: 1px solid rgba(35, 35, 35, 0.1);
  border-radius: 12px;
}
.plate-cell--day {
  border-color: rgba(169, 123, 47, 0.5);
  box-shadow: 0 8px 20px rgba(169, 123, 47, 0.12);
}
.plate-cell__title {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.plate-cell__shen {
  margin: 7px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.plate-cell__stem,
.plate-cell__branch {
  margin: 3px 0 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 26px;
  line-height: 1.1;
  color: var(--ink);
}
.plate-cell__branch {
  margin-top: 6px;
}
.plate-cell__meta {
  margin: 6px 0 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.plate-cell__hidden {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
}
.plate-cell__nayin {
  margin: 4px 0 0;
  font-size: 9.5px;
  color: var(--ink-dim);
}

/* ---------- 免费画像模块 ---------- */
.profile {
  margin-top: 20px;
}
.profile-module {
  padding: 18px 0 20px;
  border-bottom: 1px dotted rgba(35, 35, 35, 0.16);
}
.profile-module:last-child {
  border-bottom: 0;
}
.profile-module__title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.profile-module__body {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.profile-module__li {
  margin: 0 0 8px;
}
.profile-module__li:last-child {
  margin-bottom: 0;
}
.profile-module__li b {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- 书尾 / 解锁 ---------- */
.book-footer {
  padding: 30px clamp(24px, 6vw, 52px) 38px;
  text-align: center;
}
.unlock-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 30px;
  border: 0;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.unlock-all:hover {
  background: var(--cinnabar);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(178, 58, 46, 0.22);
}
.unlock-all:disabled {
  opacity: 0.6;
  cursor: wait;
}
.book-footer__note {
  margin: 16px auto 0;
  max-width: 34em;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.book-disclaimer {
  margin: 12px auto 0;
  max-width: 36em;
  font-size: 11px;
  line-height: 1.7;
  color: var(--ink-dim);
}
.book-empty {
  padding: 80px 40px;
  text-align: center;
}
.book-empty h1 {
  font-family: var(--serif);
  font-weight: 900;
  color: var(--ink);
}
.book-empty p {
  color: var(--ink-soft);
  margin: 12px 0 26px;
}
.book-empty .unlock-all {
  text-decoration: none;
}

/* ---------- 深度解读（付费层） ---------- */
.deepdive {
  animation: deepdiveIn 0.55s var(--ease) both;
}
@keyframes deepdiveIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.deepdive__pending,
.deepdive__error {
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}
.deepdive__error {
  color: var(--cinnabar);
}
.deepdive__summary {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
}
.deepdive__body-inner {
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-soft);
}
.deepdive__body-inner strong {
  display: block;
  margin-top: 18px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.deepdive__body-inner strong:first-child {
  margin-top: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .bazi-main {
    padding-top: 96px;
  }
  .bazi-brand__sub {
    display: none;
  }
  .book-section {
    padding: 26px 20px 28px;
  }
  .book-footer {
    padding: 26px 20px 32px;
  }
  .chart-plate {
    grid-template-columns: repeat(2, 1fr);
  }
}
