/* wxhc-v2 新皮基座 · 纸墨现代化 · 亮色单主题 */
:root {
  --radius: 8px;
  --v2-paper-card: #fffdf6;
  --v2-ink-70: rgba(21, 25, 24, 0.70);
  --v2-ink-45: rgba(21, 25, 24, 0.45);
  --v2-paper-texture: url("assets/synthesis-xuan-paper-v1.jpg");
}

body.v2-app {
  background:
    linear-gradient(180deg, rgba(251, 244, 228, 0.92), rgba(241, 231, 208, 0.94)),
    var(--v2-paper-texture) center / cover fixed;
  font-size: 16px;
}

body.v2-app::before {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 249, 231, 0.8), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(166, 64, 50, 0.05), transparent 32%),
    url("assets/watercolor-cosmos-v2-m.jpg") 80% 0% / min(640px, 90%) no-repeat;
  opacity: 0.22;
  mix-blend-mode: multiply;
}
body.v2-app.v2-on-start::before,
body.v2-app:has([data-v2-view="start"].is-active)::before,
body.v2-app.v2-on-birth::before,
body.v2-app:has([data-v2-view="birth"].is-active)::before,
body.v2-app.v2-on-choose::before,
body.v2-app:has([data-v2-view="choose"].is-active)::before {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 249, 231, 0.72), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(166, 64, 50, 0.04), transparent 32%);
  opacity: 0.16;
}

/* 旧壳：V1 主页彻底隔离；仅 .is-open 弹窗可浮层显示 */
body.v2-app:not(.v2-show-legacy) .shell.v2-legacy {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 60;
  background: transparent;
}
body.v2-app:not(.v2-show-legacy) .shell.v2-legacy > * {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.v2-app:not(.v2-show-legacy) .shell.v2-legacy > .wx-chat-modal.is-open,
body.v2-app:not(.v2-show-legacy) .shell.v2-legacy > .ai-prompt-modal.is-open {
  display: grid !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 70;
}
body.v2-app.v2-show-legacy .shell.v2-legacy {
  position: relative;
  display: block;
  width: min(1200px, calc(100% - 32px));
  height: auto;
  padding-top: 16px;
  overflow: visible;
  pointer-events: auto;
  z-index: 1;
}
body.v2-app.v2-show-legacy #v2App {
  display: none;
}
body.v2-app:not(.v2-show-legacy) .v2-legacy-banner {
  display: none !important;
}

#v2App {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: none;
}
body.v2-app:not(.v2-show-legacy) #v2App {
  display: flex;
  flex-direction: column;
}

.v2-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.v2-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  flex-shrink: 1;
}
.v2-brand-seal {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(124, 49, 38, 0.18);
}
.v2-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
  flex-shrink: 1;
}
.v2-brand-text strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.v2-brand-text span {
  font-size: 11px;
  color: var(--v2-ink-45);
  letter-spacing: 0.04em;
}
.v2-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.v2-top-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.v2-top-tools .v2-tool {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.9);
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.v2-top-tools .v2-tool:hover {
  border-color: rgba(166, 64, 50, 0.35);
  color: var(--cinnabar);
}
.v2-top-account {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  order: -1;
}
.v2-top-account[hidden] { display: none !important; }
#v2LoginLink[hidden],
.v2-login[hidden] {
  display: none !important;
}
body:not(.auth-pending) .boot-splash {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.v2-top-account .btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.v2-top-account .member-cta,
.v2-top-account .invite-cta {
  gap: 6px;
}
.v2-top-account .v2-admin-cta,
#adminLink.v2-admin-cta {
  border-color: rgba(38, 57, 95, 0.35);
  background: rgba(38, 57, 95, 0.08);
  color: #26395f;
  font-weight: 650;
}
.v2-top-account .member-ico,
.v2-top-account .invite-ico {
  width: 12px;
  height: 12px;
}
@media (max-width: 720px) {
  .v2-topbar {
    padding: 0 10px;
    gap: 6px;
    overflow: hidden;
  }
  .v2-top-actions {
    gap: 4px;
    flex-wrap: nowrap;
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    overflow: hidden;
  }
  .v2-brand {
    flex: 0 0 auto;
    max-width: none;
    min-width: 0;
    gap: 8px;
  }
  .v2-brand-seal {
    width: 32px;
    height: 32px;
  }
  .v2-brand-text {
    flex: 0 0 auto;
    min-width: 0;
  }
  .v2-brand-text strong {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    font-size: 14px;
    letter-spacing: 0.06em;
  }
  .v2-brand-text span {
    display: none;
  }
  .v2-top-tools .v2-tool {
    min-height: 28px;
    padding: 0 7px;
    font-size: 11px;
  }
  .v2-top-account {
    gap: 4px;
    flex-shrink: 0;
  }
  .v2-top-account .btn {
    min-height: 28px;
    min-width: 28px;
    padding: 0 7px;
    font-size: 11px;
  }
  .v2-top-account .member-ico,
  .v2-top-account .invite-ico {
    width: 11px;
    height: 11px;
  }
  /* 非 home：窄屏仅保留图标，避免顶栏撑破 */
  .v2-top-account .member-cta span,
  .v2-top-account .invite-cta span {
    display: none;
  }
  .v2-top-account .member-cta,
  .v2-top-account .invite-cta {
    width: 28px;
    padding: 0;
    justify-content: center;
  }
  /* home：隐藏品牌名，完整展示开通会员 / 邀请有礼 */
  body.v2-on-home .v2-brand-text {
    display: none;
  }
  body.v2-on-home .v2-top-account .member-cta span,
  body.v2-on-home .v2-top-account .invite-cta span {
    display: inline;
  }
  body.v2-on-home .v2-top-account .member-cta,
  body.v2-on-home .v2-top-account .invite-cta {
    width: auto;
    min-width: 0;
    padding: 0 8px;
    gap: 4px;
  }
  .v2-login {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
  }
}
.v2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.v2-btn:active {
  transform: scale(0.98);
}
.v2-btn-primary {
  background: var(--cinnabar);
  color: #fff9ec;
  border-color: var(--cinnabar);
}
.v2-btn-primary:hover {
  background: var(--red-deep);
}
.v2-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.v2-btn-ghost:hover {
  border-color: rgba(21, 25, 24, 0.28);
  background: rgba(255, 253, 246, 0.7);
}
.v2-btn-text {
  background: transparent;
  border: none;
  color: var(--v2-ink-70);
  min-height: 40px;
  padding: 0 8px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.v2-login {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.v2-view {
  display: none;
  flex: 1;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.v2-view.is-active {
  display: flex;
  flex-direction: column;
}

/* V0 欢迎 */
.v2-view[data-v2-view="start"] {
  width: min(720px, 100%);
  max-width: 100%;
  padding: 0 0 16px;
}
.v2-welcome {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 14px;
  padding: 18px 16px 28px;
  min-height: calc(100dvh - 56px);
  isolation: isolate;
}
.v2-welcome-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.v2-welcome-art img {
  display: block;
  width: min(100%, 520px);
  height: 100%;
  max-height: calc(100dvh - 56px);
  object-fit: contain;
  object-position: center 52%;
  user-select: none;
}
.v2-welcome > :not(.v2-welcome-art) {
  position: relative;
  z-index: 1;
}
.v2-welcome-seal {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  margin-top: 4px;
  box-shadow: 0 10px 28px -14px rgba(124, 49, 38, 0.55);
}
.v2-welcome h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(26px, 6vw, 28px);
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.35;
  color: var(--ink);
  max-width: 16em;
}
.v2-welcome-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(320px, 100%);
  margin-top: 8px;
}
.v2-welcome-actions .v2-btn-primary {
  width: 100%;
}

/* 生辰单页 · DESIGN.md 暖纸极简 */
.v2-view[data-v2-view="birth"] {
  position: relative;
  width: min(640px, 100%);
  max-width: 100%;
  padding: 16px 16px 28px;
  isolation: isolate;
}
.v2-birth-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.v2-birth-art img {
  display: block;
  width: min(100%, 560px);
  height: 100%;
  max-height: calc(100dvh - 56px);
  object-fit: contain;
  object-position: center 58%;
  user-select: none;
}
.v2-birth-page {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 8px 0 28px;
}
.v2-birth-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  min-height: 40px;
}
.v2-birth-back {
  min-height: 36px;
  padding: 0 12px;
  flex: 0 0 auto;
}
.v2-hour-link {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  padding: 8px 2px;
  cursor: pointer;
}
.v2-hour-link:hover { color: var(--red-deep); }
.v2-toolbar-spacer { flex: 1; }
.v2-progress,
.v2-steps-head { display: none !important; }

.v2-step-panel,
.v2-birth-card {
  display: block;
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  box-shadow: 0 10px 28px -22px rgba(47, 36, 17, 0.35);
}

[data-v2-view="birth"] #v2BirthMount .field,
#v2BirthMount .v2-step-panel .field {
  margin-bottom: 10px;
}
#v2BirthMount .field:last-child {
  margin-bottom: 0;
}
#v2BirthMount .field > label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--v2-ink-70);
}
#v2BirthMount .field.has-datetime-split > label[for="birthDateTime"],
#v2BirthMount #birthDateTime {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.v2-datetime-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}
.v2-dt-part label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--v2-ink-70);
}
#v2BirthMount input[type="date"],
#v2BirthMount input[type="time"],
#v2BirthMount select,
#v2BirthMount input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 16px;
}
#v2BirthMount .location-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
#v2BirthMount .location-mode-btn {
  min-height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
  font-size: 13px;
}
#v2BirthMount .location-mode-btn.is-active {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  background: rgba(166, 64, 50, 0.06);
}
#v2BirthMount .location-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
#v2BirthMount .location-select-grid label {
  font-size: 11px;
  color: var(--v2-ink-45);
}
#v2BirthMount .location-status {
  margin-top: 6px;
  font-size: 12px;
  color: var(--v2-ink-45);
  line-height: 1.4;
}
#v2BirthMount .birth-summary,
#v2BirthMount .case-library,
#v2BirthMount .form-actions,
#v2BirthMount .chart-load-status {
  display: none !important;
}
#v2BirthMount .v2-cal-pills {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
#v2BirthMount .v2-cal-pill {
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
}
#v2BirthMount .v2-cal-pill.is-active {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  background: rgba(166, 64, 50, 0.06);
}
#v2BirthMount #calendarType,
#v2BirthMount #gender {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.v2-gender-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.v2-gender-pill {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-weight: 600;
}
.v2-gender-pill.is-active {
  border-color: var(--cinnabar);
  color: var(--cinnabar);
  background: rgba(166, 64, 50, 0.06);
}

.v2-step-error {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--cinnabar);
}
.v2-step-nav {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.v2-step-nav .v2-btn {
  flex: 1;
  min-height: 48px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* 时辰攻略页 · 编辑式步骤（Notion 暖纸阅读节奏） */
.v2-hour-help {
  width: min(520px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
  padding: 4px 0 40px;
}
.v2-hour-hero {
  display: grid;
  grid-template-columns: 1fr; /* 覆盖全局 header 的 1fr auto，避免标题被挤成竖排 */
  gap: 10px;
  padding: 2px 2px 6px;
  margin: 0;
  border: 0;
  align-items: start;
}
.v2-hour-help h1 {
  margin: 0;
  width: 100%;
  max-width: none;
  font-family: var(--serif);
  font-size: clamp(24px, 5.8vw, 30px);
  letter-spacing: 0.03em;
  line-height: 1.22;
  color: var(--ink);
  writing-mode: horizontal-tb;
  white-space: normal;
}
.v2-hour-lead,
.v2-hour-sec-lead {
  margin: 0;
  color: var(--v2-ink-70);
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 40em;
}
.v2-hour-section {
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 24px -22px rgba(47, 36, 17, 0.28);
}
.v2-hour-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1.35;
}
.v2-hour-dst {
  background: linear-gradient(180deg, rgba(255, 249, 231, 0.95), var(--v2-paper-card));
  border-color: rgba(170, 131, 49, 0.28);
}
.v2-hour-section h3 {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--v2-ink-70);
  letter-spacing: 0.04em;
}
.v2-hour-tips {
  margin: 0;
  padding-left: 1.15em;
  color: var(--v2-ink-70);
  font-size: 13.5px;
  line-height: 1.62;
  display: grid;
  gap: 8px;
}
.v2-hour-periods,
.v2-hour-chips {
  display: grid;
  gap: 8px;
}
.v2-hour-periods { grid-template-columns: 1fr; }
.v2-hour-chips { grid-template-columns: 1fr 1fr; }
.v2-hour-period,
.v2-hour-chip {
  display: grid;
  gap: 3px;
  text-align: left;
  min-height: 52px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.v2-hour-period b,
.v2-hour-chip b {
  font-size: 14px;
  color: var(--ink);
  font-family: var(--serif);
  letter-spacing: 0.04em;
}
.v2-hour-period span,
.v2-hour-chip span {
  font-size: 12px;
  color: var(--v2-ink-45);
  line-height: 1.35;
}
.v2-hour-period.is-active,
.v2-hour-chip.is-active {
  border-color: rgba(166, 64, 50, 0.55);
  background: rgba(166, 64, 50, 0.06);
  box-shadow: inset 3px 0 0 var(--cinnabar);
}
.v2-hour-period.is-active b,
.v2-hour-chip.is-active b { color: var(--cinnabar); }
.v2-hour-apply {
  width: 100%;
  min-height: 48px;
  margin-top: 4px;
}
.v2-hour-apply:disabled { opacity: 0.4; }

/* 欢迎 / 选择页：收紧层级，突出单一主 CTA */
[data-v2-view="start"] .v2-welcome {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}
[data-v2-view="choose"] .v2-choose {
  width: min(420px, 100%);
  margin: 0 auto;
}
[data-v2-view="start"] .v2-welcome h1,
[data-v2-view="choose"] .v2-choose h1 {
  letter-spacing: 0.04em;
  line-height: 1.28;
}
[data-v2-view="start"] .v2-welcome-actions {
  width: min(360px, 100%);
}
[data-v2-view="choose"] .v2-choose-primary {
  box-shadow: 0 12px 28px -20px rgba(124, 49, 38, 0.55);
}
.v2-topbar {
  background: rgba(255, 253, 246, 0.86);
  backdrop-filter: blur(14px);
}
.v2-welcome-seal,
.v2-choose-logo {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
@media (prefers-reduced-motion: no-preference) {
  [data-v2-view="start"].is-active .v2-welcome-seal,
  [data-v2-view="choose"].is-active .v2-choose-logo {
    animation: v2-soft-rise 0.55s ease both;
  }
  [data-v2-view="start"].is-active .v2-welcome h1,
  [data-v2-view="choose"].is-active .v2-choose h1 {
    animation: v2-soft-rise 0.6s ease 0.06s both;
  }
  [data-v2-view="start"].is-active .v2-welcome-actions,
  [data-v2-view="choose"].is-active .v2-choose-actions {
    animation: v2-soft-rise 0.65s ease 0.12s both;
  }
}
@keyframes v2-soft-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.v2-ask-block {
  border-color: var(--line);
}
.v2-home-main {
  display: grid;
  gap: 16px;
  align-content: start;
}
.v2-home-main > .v2-card {
  margin: 0;
}
.v2-dm-month {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px dashed rgba(21, 25, 24, 0.1);
  font-size: 12px;
  color: var(--v2-ink-70);
  line-height: 1.35;
  min-width: 0;
  flex-wrap: nowrap;
}
.v2-god-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(166, 64, 50, 0.35);
  background: linear-gradient(135deg, rgba(166, 64, 50, 0.12), rgba(124, 49, 38, 0.08));
  color: var(--cinnabar);
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.v2-dm-month-desc {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--v2-ink-70);
}

@media (min-width: 720px) {
  .v2-hour-periods { grid-template-columns: 1fr 1fr; }
  .v2-hour-chips { grid-template-columns: repeat(3, 1fr); }
}
@media (max-height: 760px) {
  .v2-birth-card { padding: 13px; }
  #v2BirthMount .field { margin-bottom: 8px; }
  #v2BirthMount input[type="date"],
  #v2BirthMount input[type="time"],
  #v2BirthMount .location-mode-btn,
  .v2-gender-pill { min-height: 40px; }
  .v2-step-nav { margin-top: 10px; }
}

/* 仪式动画 */
.v2-ritual {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(251, 244, 228, 0.96), rgba(241, 231, 208, 0.98)),
    var(--v2-paper-texture) center / cover;
}
.v2-ritual.is-open {
  display: grid;
}
.v2-ritual-inner {
  width: min(360px, 100%);
  text-align: center;
}
.v2-ritual-title {
  margin: 0 0 28px;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--ink);
  line-height: 1.5;
}
.v2-ritual-seals {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.v2-ritual-seals span {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--v2-ink-45);
  border: 1px solid var(--line);
  background: var(--v2-paper-card);
  opacity: 0.35;
  transform: scale(0.92);
}
@media (prefers-reduced-motion: no-preference) {
  .v2-ritual-seals span {
    transition: opacity 0.35s ease, transform 0.35s ease, background 0.35s ease, color 0.35s ease;
  }
}
.v2-ritual-seals span.is-on {
  opacity: 1;
  transform: scale(1);
  color: #fff6e3;
  background: linear-gradient(145deg, var(--cinnabar), var(--red-deep));
  border-color: transparent;
}
.v2-ritual-ink {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(166, 64, 50, 0.18), transparent 62%);
  opacity: 0.7;
}
@media (prefers-reduced-motion: no-preference) {
  .v2-ritual-ink {
    animation: v2InkPulse 2s ease-in-out infinite;
  }
}
@keyframes v2InkPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.45; }
  50% { transform: scale(1.05); opacity: 0.85; }
}
.v2-legacy-banner {
  display: none;
  margin: 0 auto 12px;
  width: min(1200px, calc(100% - 32px));
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(166, 64, 50, 0.22);
  background: rgba(255, 253, 246, 0.92);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
body.v2-app.v2-show-legacy .v2-legacy-banner {
  display: block;
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .v2-view {
    padding: 32px 24px 48px;
  }
  .v2-view[data-v2-view="start"] {
    width: min(760px, 100%);
    padding: 0 0 24px;
  }
  .v2-view[data-v2-view="birth"] {
    width: min(720px, 100%);
    padding: 24px 24px 40px;
  }
  .v2-birth-art img {
    width: min(100%, 640px);
    object-position: center 55%;
  }
  .v2-view[data-v2-view="choose"] {
    width: min(720px, 100%);
    padding: 24px 24px 40px;
  }
  .v2-choose-art img {
    width: min(100%, 640px);
    object-position: center 58%;
  }
  .v2-choose {
    padding-top: 28px;
  }
  .v2-welcome {
    gap: 16px;
    padding: 28px 24px 36px;
  }
  .v2-welcome-art img {
    width: min(100%, 640px);
    object-position: center 48%;
  }
  .v2-welcome h1 {
    font-size: 28px;
  }
}

@media (min-width: 1024px) {
  .v2-view[data-v2-view="start"] {
    width: min(820px, 100%);
  }
  .v2-welcome-art img {
    width: min(100%, 700px);
  }
  .v2-view[data-v2-view="birth"] {
    width: min(780px, 100%);
  }
  .v2-birth-art img {
    width: min(100%, 700px);
  }
  .v2-view[data-v2-view="choose"] {
    width: min(780px, 100%);
  }
  .v2-choose-art img {
    width: min(100%, 700px);
  }
}

/* —— V1 命局主页 —— */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.v2-quota-chip {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(170, 131, 49, 0.45);
  background: rgba(170, 131, 49, 0.1);
  color: #7a5a16;
  font-size: 12px;
  font-weight: 600;
}
.v2-btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}
.v2-view[data-v2-view="home"] {
  width: min(1200px, 100%);
  padding: 12px 16px 24px;
  flex: 1;
  min-height: 0;
}
.v2-home {
  display: grid;
  gap: 14px;
}
.v2-card {
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 22px -20px rgba(47, 36, 17, 0.3);
}
.v2-overview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
  margin-bottom: 14px;
}
.v2-overview-head-main {
  min-width: 0;
  flex: 1 1 auto;
}
.v2-overview-sys {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  flex: 0 0 auto;
  align-items: center;
  align-self: flex-start;
}
.v2-sys-btn {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.95);
  color: var(--v2-ink-45);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.v2-sys-btn:hover {
  border-color: rgba(176, 133, 49, 0.35);
  color: var(--ink);
}
.v2-sys-btn.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #8f3f32, #b85a45);
}
.v2-overview.is-ziwei .v2-sys-btn.is-active,
body.v2-on-home[data-overview-sys="ziwei"] .v2-sys-btn.is-active {
  background: linear-gradient(135deg, #5c496d, #6a567f);
}
.v2-overview.is-western .v2-sys-btn.is-active,
body.v2-on-home[data-overview-sys="western"] .v2-sys-btn.is-active {
  background: linear-gradient(135deg, #1f3154, #26395f);
}
.v2-overview-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.v2-overview-head b {
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.08em;
  flex: 0 0 auto;
}
.v2-overview-title .v2-btn {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
.v2-overview-head p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--v2-ink-45);
  line-height: 1.45;
}
/* 四柱 · 干支纵向 + 五行色（测测式速读） */
.v2-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  min-height: 118px;
  align-content: start;
}
.v2-pillar {
  display: grid;
  justify-items: stretch;
  gap: 5px;
  text-align: center;
  padding: 8px 3px 10px;
  border-radius: var(--radius);
  background: rgba(251, 244, 228, 0.72);
  border: 1px solid var(--line);
  position: relative;
  min-width: 0;
}
.v2-pillar.is-day {
  background: rgba(166, 64, 50, 0.06);
  border-color: rgba(166, 64, 50, 0.28);
  box-shadow: inset 0 0 0 1px rgba(166, 64, 50, 0.08);
}
.v2-pillar > small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: var(--v2-ink-45);
  letter-spacing: 0.06em;
}
.v2-pillar > small i {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #fff6e3;
  background: var(--cinnabar);
  border-radius: 999px;
  padding: 0 5px;
  line-height: 1.5;
}
.v2-gz-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 2px;
  min-width: 0;
  width: 100%;
}
.v2-gz-polar,
.v2-gz-god {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--v2-ink-45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-gz-polar {
  text-align: right;
  padding-right: 1px;
}
.v2-gz-god {
  text-align: left;
  padding-left: 1px;
  color: rgba(124, 49, 38, 0.72);
}
.v2-gz {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
}
.v2-pillar .v2-gz {
  width: 1.85em;
  height: 1.85em;
  display: grid;
  place-items: center;
  justify-self: center;
  font-size: clamp(18px, 4.6vw, 22px);
  border-radius: 8px;
  border: 1px solid transparent;
}
.v2-gz[data-el="木"] { color: #2f7a52; background: rgba(47, 122, 82, 0.12); border-color: rgba(47, 122, 82, 0.22); }
.v2-gz[data-el="火"] { color: #b33a2a; background: rgba(179, 58, 42, 0.12); border-color: rgba(179, 58, 42, 0.22); }
.v2-gz[data-el="土"] { color: #9a6a28; background: rgba(154, 106, 40, 0.14); border-color: rgba(154, 106, 40, 0.26); }
.v2-gz[data-el="金"] { color: #b08918; background: rgba(176, 137, 24, 0.14); border-color: rgba(176, 137, 24, 0.28); }
.v2-gz[data-el="水"] { color: #2f6f9a; background: rgba(47, 111, 154, 0.12); border-color: rgba(47, 111, 154, 0.24); }
.v2-dm-row > .v2-gz {
  width: auto;
  height: auto;
  padding: 2px 8px;
  font-size: 18px;
  border-radius: 8px;
}

.v2-daymaster {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px 12px 11px;
  border-radius: var(--radius);
  background: rgba(255, 253, 246, 0.9);
  border: 1px solid var(--line);
  align-items: start;
  min-height: 148px;
}
.v2-daymaster.has-ss {
  grid-template-columns: minmax(0, 1fr) minmax(0, 11em);
  column-gap: 12px;
}
.v2-dm-main {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.v2-dm-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  font-size: 13px;
  color: var(--v2-ink-70);
  line-height: 1.4;
}
.v2-dm-day {
  flex-wrap: nowrap;
  gap: 6px 8px;
  min-width: 0;
  align-items: center;
}
.v2-ss-highlight {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  width: 100%;
  max-width: 11.5em;
  justify-self: stretch;
}
.v2-ss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(45, 134, 89, 0.4);
  background: linear-gradient(135deg, rgba(45, 134, 89, 0.18), rgba(45, 134, 89, 0.08));
  color: #246846;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.v2-ss-btn-ziwei {
  border-color: rgba(106, 86, 127, 0.4);
  background: linear-gradient(135deg, rgba(106, 86, 127, 0.18), rgba(106, 86, 127, 0.08));
  color: #5c496d;
}
.v2-ss-highlight .v2-aspect-analysis {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  color: var(--v2-ink-70);
  font-size: 11px;
}
.v2-ss-grid {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: stretch;
  min-width: 0;
}
.v2-ss-highlight .bazi-shensha-chip {
  width: 100%;
  max-width: none;
}
.v2-ss-highlight .bazi-shensha-chip.is-open {
  flex: 0 0 auto;
  max-width: none;
}
.v2-dm-label {
  flex: 0 0 5em;
  font-size: 12px;
  color: var(--v2-ink-45);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.v2-dm-yong,
.v2-dm-ji {
  flex-wrap: nowrap;
  align-items: center;
}
.v2-dm-yong .v2-chip-row,
.v2-dm-ji .v2-chip-row {
  flex-wrap: nowrap;
  min-width: 0;
}
.v2-dm-yong .v2-chip,
.v2-dm-ji .v2-chip {
  flex-shrink: 0;
}
.v2-dm-row > .v2-gz {
  font-size: 18px;
}
.v2-dm-strength {
  font-style: normal;
  font-size: 12px;
  font-weight: 650;
  color: var(--cinnabar);
  background: rgba(166, 64, 50, 0.08);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}
.v2-dm-strength-ziwei {
  color: #5c496d;
  background: rgba(106, 86, 127, 0.12);
}
.v2-dm-strength-west {
  color: #26395f;
  background: rgba(38, 57, 95, 0.12);
}
.v2-dm-note {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  font-size: 12px;
  color: var(--v2-ink-70);
  line-height: 1.45;
}
.v2-dm-hint {
  flex: 1 1 100%;
  margin: -2px 0 0 5em;
  font-size: 11px;
  line-height: 1.4;
  color: var(--v2-ink-45);
  letter-spacing: 0.02em;
}
.v2-ws-glyph {
  width: 1.85em;
  height: 1.85em;
  display: grid;
  place-items: center;
  justify-self: center;
  font-size: clamp(22px, 5vw, 28px);
  border-radius: 8px;
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1;
}
.v2-zw-branch {
  display: grid;
  place-items: center;
  justify-self: center;
  width: auto;
  min-width: 1.85em;
  max-width: 100%;
  height: auto;
  min-height: 1.85em;
  padding: 4px 6px;
  border-radius: 8px;
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.15;
  font-size: clamp(12px, 2.8vw, 15px);
  letter-spacing: 0.04em;
  color: #5c496d;
  background: rgba(106, 86, 127, 0.12);
  border: 1px solid rgba(106, 86, 127, 0.22);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-zw-branch.is-helper {
  color: #6a7a68;
  background: rgba(90, 120, 96, 0.1);
  border-color: rgba(90, 120, 96, 0.22);
  font-size: clamp(11px, 2.5vw, 13px);
}
.v2-zw-stars,
.v2-ws-sign {
  font-size: 11px;
  line-height: 1.35;
  color: var(--v2-ink-70);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 1.4em;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.v2-ws-sign-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.v2-ws-inline-sym {
  font-style: normal;
  font-size: 18px;
  font-weight: 650;
  margin-right: 4px;
  line-height: 1;
}
.v2-ws-trait {
  font-style: normal;
  color: var(--v2-ink-45);
  font-weight: 500;
}
.v2-zw-bright-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: center;
  align-items: center;
  min-width: 0;
}
.v2-pillar .v2-zw-bright-row {
  min-height: 1.5em;
}
.v2-zw-bright {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid rgba(106, 86, 127, 0.22);
  background: rgba(106, 86, 127, 0.08);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  color: #5c496d;
}
.v2-zw-bright b {
  font-weight: 650;
  letter-spacing: 0.02em;
}
.v2-zw-bright i {
  font-style: normal;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.04em;
  opacity: 0.92;
}
.v2-zw-bright.is-empty {
  border-style: dashed;
  opacity: 0.55;
}
.v2-zw-bright[data-lv="庙"] {
  border-color: rgba(176, 133, 49, 0.45);
  background: rgba(201, 162, 39, 0.14);
  color: #8a6d12;
}
.v2-zw-bright[data-lv="旺"] {
  border-color: rgba(166, 64, 50, 0.4);
  background: rgba(166, 64, 50, 0.1);
  color: #a13624;
}
.v2-zw-bright[data-lv="得"],
.v2-zw-bright[data-lv="利"] {
  border-color: rgba(45, 134, 89, 0.35);
  background: rgba(45, 134, 89, 0.1);
  color: #246846;
}
.v2-zw-bright[data-lv="平"] {
  border-color: rgba(21, 25, 24, 0.14);
  background: rgba(21, 25, 24, 0.05);
  color: var(--v2-ink-70);
}
.v2-zw-bright[data-lv="不"],
.v2-zw-bright[data-lv="陷"] {
  border-color: rgba(47, 111, 154, 0.35);
  background: rgba(47, 111, 154, 0.1);
  color: #245a7d;
}
.v2-dm-body {
  flex-wrap: wrap;
  align-items: center;
}
.v2-dm-body .v2-zw-bright-row {
  justify-content: flex-start;
}
.v2-dm-helpers {
  align-items: flex-start;
  flex-wrap: wrap;
}
.v2-dm-helpers .v2-helper-grid {
  flex: 1 1 auto;
  min-width: 0;
}
.v2-helper-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
  flex: 1;
  min-width: 0;
}
.v2-helper-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(106, 86, 127, 0.28);
  background: rgba(106, 86, 127, 0.1);
  color: #5c496d;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-radius 0.15s ease, box-shadow 0.15s ease;
}
.v2-helper-chip:hover {
  border-color: rgba(106, 86, 127, 0.45);
  background: rgba(106, 86, 127, 0.14);
}
.v2-helper-chip[data-lv="庙"] {
  border-color: rgba(176, 133, 49, 0.45);
  background: rgba(201, 162, 39, 0.14);
  color: #8a6d12;
}
.v2-helper-chip[data-lv="旺"] {
  border-color: rgba(166, 64, 50, 0.4);
  background: rgba(166, 64, 50, 0.1);
  color: #a13624;
}
.v2-helper-chip-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.v2-helper-chip-name {
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1;
}
.v2-helper-chip-lv {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.9;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(21, 25, 24, 0.06);
}
.v2-helper-chip-detail {
  display: none;
  gap: 3px;
  padding-top: 6px;
  margin-top: 5px;
  border-top: 1px dashed rgba(21, 25, 24, 0.12);
}
.v2-helper-chip-brief {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  font-weight: 500;
}
.v2-helper-chip-meta {
  font-size: 11px;
  line-height: 1.4;
  color: var(--v2-ink-45);
}
.v2-helper-chip.is-open {
  border-radius: 12px;
  padding: 8px 11px 9px;
  box-shadow: 0 6px 16px rgba(21, 25, 24, 0.06);
  flex: 1 1 100%;
  max-width: 100%;
}
.v2-helper-chip.is-open .v2-helper-chip-detail {
  display: grid;
}
.v2-zw-star-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(106, 86, 127, 0.28);
  background: rgba(106, 86, 127, 0.1);
  color: #5c496d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.v2-zw-star-tag.is-empty {
  border-style: dashed;
  opacity: 0.55;
  font-weight: 500;
}
.v2-ws-life {
  font-size: 26px;
  line-height: 1;
}
.v2-ss-highlight .bazi-shensha-chip.sihua-lu {
  border-left: 3px solid #c9a227;
  background: linear-gradient(180deg, rgba(255, 248, 220, 0.95), rgba(255, 252, 244, 0.88));
}
.v2-ss-highlight .bazi-shensha-chip.sihua-lu .bazi-shensha-chip-name {
  color: #8a6d12;
}
.v2-ss-highlight .bazi-shensha-chip.sihua-quan {
  border-left: 3px solid #c0432e;
  background: linear-gradient(180deg, rgba(255, 236, 232, 0.95), rgba(255, 252, 244, 0.88));
}
.v2-ss-highlight .bazi-shensha-chip.sihua-quan .bazi-shensha-chip-name {
  color: #a13624;
}
.v2-ss-highlight .bazi-shensha-chip.sihua-ji {
  border-left: 3px solid #2f6f9a;
  background: linear-gradient(180deg, rgba(230, 242, 250, 0.95), rgba(255, 252, 244, 0.88));
}
.v2-ss-highlight .bazi-shensha-chip.sihua-ji .bazi-shensha-chip-name {
  color: #245a7d;
}
.v2-ss-highlight .bazi-shensha-chip.sihua-ke {
  border-left: 3px solid #6a567f;
  background: linear-gradient(180deg, rgba(240, 234, 246, 0.95), rgba(255, 252, 244, 0.88));
}
.v2-ss-highlight .bazi-shensha-chip.sihua-ke .bazi-shensha-chip-name {
  color: #5c496d;
}
.v2-ss-highlight .v2-sihua-palace {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  color: var(--ink);
  background: rgba(21, 25, 24, 0.08);
  border: 1px solid rgba(21, 25, 24, 0.12);
}
.v2-zw-life,
.v2-ws-life {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.v2-pillar-ziwei.is-day {
  border-color: rgba(106, 86, 127, 0.35);
  background: rgba(106, 86, 127, 0.06);
}
.v2-pillar-west.is-day {
  border-color: rgba(38, 57, 95, 0.35);
  background: rgba(38, 57, 95, 0.06);
}
.v2-pillar-west[data-el="火"] .v2-ws-glyph { color: #b33a2a; background: rgba(179, 58, 42, 0.12); border: 1px solid rgba(179, 58, 42, 0.22); }
.v2-pillar-west[data-el="土"] .v2-ws-glyph { color: #9a6a28; background: rgba(154, 106, 40, 0.14); border: 1px solid rgba(154, 106, 40, 0.26); }
.v2-pillar-west[data-el="风"] .v2-ws-glyph { color: #6a7f96; background: rgba(106, 127, 150, 0.14); border: 1px solid rgba(106, 127, 150, 0.26); }
.v2-pillar-west[data-el="水"] .v2-ws-glyph { color: #2f6f9a; background: rgba(47, 111, 154, 0.12); border: 1px solid rgba(47, 111, 154, 0.24); }
.v2-god-chip-ziwei {
  color: #5c496d;
  background: rgba(106, 86, 127, 0.1);
  border-color: rgba(106, 86, 127, 0.28);
}
.v2-god-chip-west {
  color: #26395f;
  background: rgba(38, 57, 95, 0.1);
  border-color: rgba(38, 57, 95, 0.28);
}

/* 紫微概览：宫位卡内容居中，亮度标签只留亮度字 */
.v2-overview.is-ziwei .v2-pillars {
  min-height: 132px;
  align-items: stretch;
}
.v2-overview.is-ziwei .v2-pillar {
  padding: 10px 4px 12px;
  gap: 8px;
  min-height: 118px;
  align-content: center;
  justify-items: center;
}
.v2-overview.is-ziwei .v2-pillar > small {
  width: 100%;
  justify-content: center;
}
.v2-overview.is-ziwei .v2-zw-branch {
  min-width: 1.7em;
  min-height: 1.7em;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: clamp(13px, 2.4vw, 17px);
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  justify-self: center;
}
.v2-overview.is-ziwei .v2-zw-branch.is-helper {
  font-size: clamp(12px, 2.2vw, 15px);
}
.v2-overview.is-ziwei .v2-zw-bright-row {
  display: flex;
  gap: 4px;
  min-height: 1.5em;
  width: 100%;
  justify-content: center;
  align-items: center;
}
.v2-overview.is-ziwei .v2-zw-bright {
  min-height: 22px;
  min-width: 1.6em;
  padding: 0 8px;
  font-size: 12px;
  justify-content: center;
}
.v2-overview.is-ziwei .v2-zw-bright i {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.06em;
}
.v2-overview.is-ziwei .v2-ss-highlight-sihua .v2-ss-btn {
  display: none;
}
.v2-overview.is-ziwei .v2-ss-highlight .v2-sihua-note {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.v2-overview.is-ziwei .v2-zw-life {
  font-size: 16px;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.v2-overview.is-ziwei .v2-zw-body-palace {
  flex: 0 0 auto;
  overflow: visible;
  text-overflow: clip;
  min-width: auto;
}
.v2-overview.is-ziwei .v2-dm-strength {
  font-size: 12px;
  padding: 2px 8px;
  flex-shrink: 0;
}
.v2-overview.is-ziwei .v2-god-chip {
  min-height: 24px;
  padding: 0 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.v2-overview.is-ziwei .v2-helper-grid {
  flex-wrap: wrap;
  gap: 6px;
}
.v2-overview.is-ziwei .v2-helper-chip {
  min-height: 26px;
  padding: 4px 9px;
  flex: 0 0 auto;
  border-radius: 999px;
}
.v2-overview.is-ziwei .v2-helper-chip-main {
  gap: 5px;
  white-space: nowrap;
}
.v2-overview.is-ziwei .v2-helper-chip-name {
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.v2-overview.is-ziwei .v2-helper-chip-lv {
  font-size: 10px;
  padding: 0 5px;
  min-height: 16px;
  flex-shrink: 0;
}
.v2-overview.is-ziwei .v2-helper-chip.is-open {
  flex: 1 1 100%;
  min-width: 0;
  border-radius: 12px;
}
.v2-overview.is-ziwei .v2-zw-star-tag {
  min-height: 20px;
  padding: 0 7px;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.v2-overview.is-ziwei .v2-ss-btn {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
}
.v2-overview.is-ziwei .v2-ss-highlight .bazi-shensha-chip {
  min-height: 24px;
  padding: 3px 7px 3px 6px;
}
.v2-overview.is-ziwei .v2-ss-highlight .bazi-shensha-chip-name {
  font-size: 12px;
}
.v2-overview.is-ziwei .v2-ss-highlight .bazi-shensha-chip-tag,
.v2-overview.is-ziwei .v2-ss-highlight .v2-sihua-palace {
  font-size: 10px;
  min-height: 16px;
  padding: 0 6px;
}
.v2-overview.is-ziwei .v2-daymaster {
  min-height: 148px;
}

/* 西占概览：宫位卡/日主区对齐八字体量 */
.v2-overview.is-western .v2-pillars {
  min-height: 132px;
}
.v2-overview.is-western .v2-pillar {
  padding: 8px 3px 10px;
  gap: 6px;
  min-height: 118px;
}
.v2-overview.is-western .v2-ws-glyph {
  font-size: clamp(22px, 3.2vw, 28px);
  min-width: 1.75em;
  min-height: 1.75em;
}
.v2-overview.is-western .v2-ws-sign {
  font-size: 12px;
}
.v2-overview.is-western .v2-daymaster {
  min-height: 148px;
}
.v2-overview.is-western .v2-daymaster.has-ss {
  grid-template-columns: minmax(0, 1fr) minmax(0, 11.5em);
  column-gap: 10px;
}
.v2-overview.is-western .v2-dm-label {
  min-width: 4.2em;
  flex: 0 0 auto;
}
.v2-overview.is-western .v2-dm-main {
  gap: 6px;
  min-width: 0;
}
.v2-overview.is-western .v2-dm-day {
  min-width: 0;
}
.v2-overview.is-western .v2-ws-life {
  flex-shrink: 0;
}
.v2-overview.is-western .v2-ws-sign-name {
  white-space: nowrap;
  flex-shrink: 0;
}
.v2-overview.is-western .v2-ss-highlight {
  max-width: none;
  width: 100%;
  min-width: 0;
}
.v2-overview.is-western .v2-ss-highlight .bazi-shensha-chip.is-open {
  max-width: 100%;
}
.v2-overview.is-ziwei .v2-ss-grid {
  gap: 4px;
}
.v2-wx-seg[data-el="主星"] { background: #6a567f; }
.v2-wx-seg[data-el="辅曜"] { background: #9a86b0; }
.v2-wx-seg[data-el="煞曜"] { background: #c0432e; }
.v2-wx-seg[data-el="火象"] { background: #b33a2a; }
.v2-wx-seg[data-el="土象"] { background: #9a6a28; }
.v2-wx-seg[data-el="风象"] { background: #6a7f96; }
.v2-wx-seg[data-el="水象"] { background: #2f6f9a; }
.v2-wx-seg[data-el="命宫"] { background: #6a567f; }
.v2-wx-seg[data-el="财帛"] { background: #aa8331; }
.v2-wx-seg[data-el="官禄"] { background: #a64032; }
.v2-wx-seg[data-el="夫妻"] { background: #3d6b8a; }
.v2-wx-seg[data-el="迁移"] { background: #3d6b8a; }
.v2-chip-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.v2-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
}
.v2-chip.is-muted { color: var(--v2-ink-45); font-weight: 500; }
.v2-chip[data-el="木"] { color: #3f7a5c; border-color: rgba(63, 122, 92, 0.35); background: rgba(63, 122, 92, 0.08); }
.v2-chip[data-el="火"] { color: #a64032; border-color: rgba(166, 64, 50, 0.35); background: rgba(166, 64, 50, 0.08); }
.v2-chip[data-el="土"] { color: #8a6a3d; border-color: rgba(138, 106, 61, 0.35); background: rgba(138, 106, 61, 0.1); }
.v2-chip[data-el="金"] { color: #9a7424; border-color: rgba(154, 116, 36, 0.4); background: rgba(170, 131, 49, 0.12); }
.v2-chip[data-el="水"] { color: #3d6b8a; border-color: rgba(61, 107, 138, 0.35); background: rgba(61, 107, 138, 0.08); }

/* 五行比例 · 单行色条 */
.v2-wuxing,
.v2-elements {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  min-height: 48px;
  align-content: start;
}
.v2-wx-stack.is-labeled {
  height: 22px;
  border-radius: 8px;
}
.v2-wx-stack.is-labeled .v2-wx-seg {
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
}
.v2-wx-stack.is-labeled .v2-wx-seg em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 246, 227, 0.95);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  writing-mode: horizontal-tb;
  line-height: 1;
}
.v2-wx-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.v2-wx-head span {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  color: var(--v2-ink-70);
}
.v2-wx-head em {
  font-style: normal;
  font-size: 12px;
  color: var(--v2-ink-45);
}
.v2-wx-stack {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(21, 25, 24, 0.06);
}
.v2-wx-seg { display: block; height: 100%; min-width: 2px; }
.v2-wx-seg[data-el="木"],
.v2-wx-col[data-el="木"] .v2-wx-col-fill { background: #5f8b74; }
.v2-wx-seg[data-el="火"],
.v2-wx-col[data-el="火"] .v2-wx-col-fill { background: #a64032; }
.v2-wx-seg[data-el="土"],
.v2-wx-col[data-el="土"] .v2-wx-col-fill { background: #8a6a3d; }
.v2-wx-seg[data-el="金"],
.v2-wx-col[data-el="金"] .v2-wx-col-fill { background: #aa8331; }
.v2-wx-seg[data-el="水"],
.v2-wx-col[data-el="水"] .v2-wx-col-fill { background: #3d6b8a; }
.v2-wx-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  align-items: end;
}
.v2-wx-col {
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}
.v2-wx-col-track {
  width: 100%;
  max-width: 36px;
  height: 72px;
  border-radius: 8px;
  background: rgba(21, 25, 24, 0.06);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.v2-wx-col-fill {
  width: 100%;
  border-radius: 8px 8px 4px 4px;
  min-height: 6px;
  transition: height 0.35s ease;
}
.v2-wx-col b {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  line-height: 1;
}
.v2-wx-col[data-el="木"] b { color: #3f7a5c; }
.v2-wx-col[data-el="火"] b { color: #a64032; }
.v2-wx-col[data-el="土"] b { color: #8a6a3d; }
.v2-wx-col[data-el="金"] b { color: #9a7424; }
.v2-wx-col[data-el="水"] b { color: #3d6b8a; }
.v2-wx-col span {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.v2-wx-col small {
  font-size: 10px;
  color: var(--v2-ink-45);
  letter-spacing: 0.02em;
}
.v2-portrait {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--v2-ink-70);
  padding-top: 2px;
}
.v2-overview {
  padding: 16px 14px 14px;
}
.v2-link {
  border: none;
  background: none;
  color: var(--cinnabar);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}
.v2-chart-link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding-top: 14px;
  width: 100%;
  min-height: 48px;
  padding: 14px 12px 10px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(166, 64, 50, 0.45);
  background: rgba(166, 64, 50, 0.08);
  color: var(--red-deep);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  box-sizing: border-box;
}
.v2-chart-link:hover {
  background: rgba(166, 64, 50, 0.14);
  border-color: rgba(166, 64, 50, 0.7);
}
.v2-side-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.v2-side-tools .v2-tool {
  width: 100%;
  min-height: 42px;
  justify-content: center;
}
.v2-main-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}
.v2-main-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.v2-main-tools .v2-tool {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border-radius: 999px;
}
.v2-note-field .v2-note-optional {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--v2-ink-45);
}
.v2-note-input,
.v2-note-field #caseNote {
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  box-sizing: border-box;
}
.v2-step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: stretch;
}
.v2-step-nav .v2-btn {
  flex: 1 1 140px;
}
.v2-case-save-tip {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 12px;
  color: var(--v2-ink-45);
}
.v2-member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 12px;
  flex-wrap: wrap;
}
.v2-member-pay {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(176, 122, 42, 0.55);
  color: #3a2410;
  text-decoration: none;
  font-family: var(--ui);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: linear-gradient(135deg, #fff1c4 0%, #f0c56a 48%, #d89a3a 100%);
  box-shadow:
    0 8px 18px -10px rgba(176, 122, 42, 0.85),
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 0 0 1px rgba(255, 236, 180, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.v2-member-pay[hidden] {
  display: none !important;
}
.v2-member-pay-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #8a4f12;
}
.v2-member-pay-text {
  position: relative;
  z-index: 1;
}
.v2-member-pay-arrow {
  position: relative;
  z-index: 1;
  font-style: normal;
  font-weight: 700;
  opacity: 0.85;
  transition: transform 0.18s ease;
}
.v2-member-pay::after {
  content: "";
  position: absolute;
  top: 0;
  left: -70%;
  width: 42%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: v2MemberPayShine 3.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes v2MemberPayShine {
  0%, 58% { left: -70%; }
  100% { left: 140%; }
}
.v2-member-pay:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
  box-shadow:
    0 12px 22px -10px rgba(176, 122, 42, 0.95),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(255, 236, 180, 0.45);
  text-decoration: none;
}
.v2-member-pay:hover .v2-member-pay-arrow {
  transform: translateX(2px);
}
.v2-member-pay:active {
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .v2-member-pay::after { animation: none; display: none; }
}
.v2-ask-block h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.06em;
}
.v2-ask-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.v2-ask-head h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.v2-ask-head #v2AskHistory {
  flex: 0 0 auto;
  white-space: nowrap;
}
.v2-ask-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--v2-ink-45);
}
.v2-themes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.v2-theme {
  position: relative;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--v2-paper-card);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.v2-theme:active { transform: scale(0.98); }
.v2-theme-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 12px;
  color: #fff6e3;
  background: var(--cinnabar);
}
.v2-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 10px;
  font-weight: 700;
  color: #7a5a16;
  background: #f3e2b0;
  border: 1px solid rgba(170, 131, 49, 0.5);
  border-radius: 999px;
  padding: 1px 6px;
}
.v2-ask-box {
  background: rgba(255, 253, 246, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}
.v2-ask-block.v2-card .v2-ask-box {
  background: rgba(255, 255, 255, 0.55);
}
.v2-ask-box textarea {
  width: 100%;
  min-height: 84px;
  border: none;
  resize: vertical;
  background: transparent;
  font-size: 15px;
  line-height: 1.55;
  outline: none;
}
.v2-ask-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}
#v2AskCount {
  font-size: 12px;
  color: var(--v2-ink-45);
}
.v2-ask-tip {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--v2-ink-45);
}
.v2-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.v2-feature {
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--v2-paper-card);
  padding: 14px 12px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}
.v2-feature.is-member {
  background: linear-gradient(160deg, #fff8e8, #f4e6c4);
  border-color: rgba(170, 131, 49, 0.35);
}
.v2-feature-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  color: #fff6e3;
  background: var(--cinnabar);
  font-size: 14px;
}
.v2-feature.is-member .v2-feature-ico {
  background: linear-gradient(145deg, #c49a3c, #8a6420);
}
.v2-feature b {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.04em;
}
.v2-feature span {
  font-size: 12px;
  color: var(--v2-ink-45);
  line-height: 1.45;
}
.v2-feature em {
  margin-top: auto;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--cinnabar);
}
.v2-tools {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.v2-tool {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 253, 246, 0.9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.v2-home-foot {
  display: none !important;
}

.v2-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.v2-sheet.is-open { display: flex; }
.v2-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(21, 25, 24, 0.35);
}
.v2-sheet-card {
  position: relative;
  width: min(480px, 100%);
  max-height: min(78dvh, 640px);
  overflow: auto;
  background: var(--v2-paper-card);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--line);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.v2-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.v2-sheet-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
}
.v2-case-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.v2-case-item b {
  display: block;
  font-size: 14px;
}
.v2-case-item span {
  display: block;
  font-size: 12px;
  color: var(--v2-ink-45);
  margin-top: 2px;
}
.v2-case-actions {
  display: flex;
  gap: 6px;
}
.v2-recent-choices {
  display: grid;
  gap: 10px;
}
.v2-settings-list {
  display: grid;
  gap: 8px;
}
.v2-settings-row {
  min-height: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 14px;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}

@media (min-width: 1024px) {
  body.v2-app:not(.v2-show-legacy) #v2App {
    min-height: 100dvh;
    height: auto;
    overflow: visible;
  }
  .v2-view[data-v2-view="home"] {
    width: min(1280px, calc(100% - 40px));
    overflow: visible;
    padding: 16px 20px 36px;
    max-height: none;
  }
  /* PC：上行 命例 | 提问；下行 会员全宽，避免右栏过高、会员卡片被压扁 */
  .v2-home {
    grid-template-columns: minmax(400px, 460px) minmax(0, 1fr);
    grid-template-areas:
      "side ask"
      "members members";
    align-items: stretch;
    gap: 18px 20px;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .v2-home-side {
    grid-area: side;
    position: static;
    top: auto;
    align-self: stretch;
    z-index: auto;
    height: auto;
    max-height: none;
  }
  .v2-home-side .v2-overview {
    height: 100%;
    max-height: none;
    overflow: visible;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 10px 28px -22px rgba(47, 36, 17, 0.38);
    display: flex;
    flex-direction: column;
  }
  .v2-home-main {
    grid-area: ask;
    gap: 14px;
    height: auto;
    max-height: none;
    overflow: visible;
    align-content: stretch;
    align-self: stretch;
    display: grid;
    grid-template-rows: 1fr;
  }
  .v2-home-main > .v2-card {
    padding: 18px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 28px -22px rgba(47, 36, 17, 0.38);
  }
  .v2-ask-block {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .v2-ask-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
  }
  .v2-ask-head h2 {
    margin: 0;
    flex: 1;
    min-width: 0;
  }
  .v2-ask-head #v2AskHistory {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .v2-ask-block .v2-themes {
    flex: 0 0 auto;
  }
  .v2-ask-box {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 14px 16px;
    border-radius: 10px;
  }
  .v2-ask-box textarea {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    font-size: 15px;
    line-height: 1.55;
  }
  .v2-ask-bar {
    flex: 0 0 auto;
    margin-top: 10px;
  }
  .v2-member-block {
    grid-area: members;
    padding: 16px 18px;
    border-radius: 10px;
    box-shadow: 0 10px 28px -22px rgba(47, 36, 17, 0.38);
    gap: 12px;
  }
  .v2-home-foot {
    display: none !important;
  }
  .v2-overview-head {
    margin-bottom: 12px;
  }
  .v2-themes {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
  }
  .v2-theme {
    min-height: 44px;
    padding: 10px 8px;
    font-size: 13px;
    border-radius: 10px;
  }
  .v2-theme-ico {
    width: 22px;
    height: 22px;
    font-size: 12px;
  }
  .v2-ask-block h2 {
    font-size: 22px;
    margin: 0;
    letter-spacing: 0.08em;
  }
  .v2-pillars {
    gap: 8px;
    margin-bottom: 12px;
  }
  .v2-pillar {
    padding: 8px 3px 10px;
  }
  .v2-pillar .v2-gz {
    font-size: 20px;
    width: 1.75em;
    height: 1.75em;
  }
  .v2-gz-polar,
  .v2-gz-god {
    font-size: 9px;
  }
  .v2-daymaster {
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
  }
  .v2-chart-link {
    font-size: 14px;
    min-height: 42px;
    padding: 10px 14px;
    letter-spacing: 0.04em;
    margin-top: 12px;
  }
  .v2-member-head {
    align-items: center;
    gap: 12px 16px;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(47, 36, 17, 0.08);
    margin-bottom: 2px;
  }
  .v2-member-title {
    font-size: 16px;
    letter-spacing: 0.14em;
  }
  .v2-member-pay {
    font-size: 12.5px;
    min-height: 36px;
    padding: 0 14px 0 12px;
    gap: 7px;
  }
  .v2-member-heroes {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .v2-member-block .synthesis-hero {
    min-height: 92px;
    padding: 16px 18px;
    gap: 12px 16px;
    border-radius: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "seal text cta";
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
  .v2-member-block .synthesis-hero:hover {
    transform: translateY(-3px);
  }
  .v2-member-block .synthesis-hero-seal {
    grid-area: seal;
    width: 48px;
    height: 48px;
    font-size: 24px;
    flex-shrink: 0;
  }
  .v2-member-block .synthesis-hero-text {
    grid-area: text;
    gap: 6px;
    min-width: 0;
  }
  .v2-member-block .synthesis-hero-title-row {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 6px;
  }
  .v2-member-block .synthesis-hero-title-row b {
    display: block;
    margin: 0;
    font-size: 16px;
    letter-spacing: 0.08em;
    line-height: 1.35;
    white-space: normal;
  }
  .v2-member-block .synthesis-hero-title-row .ym-badge {
    margin-left: 0;
    flex: 0 0 auto;
  }
  .v2-member-block .synthesis-hero-text i {
    display: block !important;
    margin-top: 0;
    font-size: 12.5px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    opacity: 0.92;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .v2-member-block .synthesis-hero-cta {
    grid-area: cta;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 40px;
    min-width: 118px;
    padding: 8px 16px;
    font-size: 13.5px;
    letter-spacing: 0.08em;
    white-space: nowrap;
    border-radius: 999px;
  }
  .v2-sheet {
    align-items: center;
  }
  .v2-sheet-card {
    border-radius: var(--radius);
  }
}

/* 宽屏：三列竖向卡片 — 印章+文案 / 全宽 CTA，提升点击意愿 */
@media (min-width: 1200px) {
  .v2-view[data-v2-view="home"] {
    width: min(1380px, calc(100% - 48px));
  }
  .v2-home {
    grid-template-columns: minmax(420px, 480px) minmax(0, 1fr);
    gap: 20px 22px;
  }
  .v2-member-block {
    gap: 14px;
    padding: 18px 20px;
  }
  .v2-member-heroes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .v2-member-block .synthesis-hero {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "seal text"
      "seal text"
      "cta cta";
    align-items: start;
    min-height: 178px;
    padding: 18px 18px 16px;
    gap: 10px 14px;
  }
  .v2-member-block .synthesis-hero-seal {
    width: 52px;
    height: 52px;
    font-size: 26px;
    margin-top: 2px;
  }
  .v2-member-block .synthesis-hero-text {
    gap: 8px;
    padding-top: 2px;
  }
  .v2-member-block .synthesis-hero-title-row {
    align-items: flex-start;
    gap: 8px;
  }
  .v2-member-block .synthesis-hero-title-row b {
    font-size: 17px;
    letter-spacing: 0.1em;
    line-height: 1.4;
  }
  .v2-member-block .synthesis-hero-text i {
    font-size: 13px;
    line-height: 1.55;
    letter-spacing: 0.045em;
    max-width: 28em;
  }
  .v2-member-block .synthesis-hero-cta {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    margin-top: 4px;
    padding: 10px 16px;
    font-size: 14px;
    letter-spacing: 0.12em;
    justify-content: center;
  }
  .v2-member-block .synthesis-hero:hover .synthesis-hero-cta {
    transform: none;
  }
}
@media (max-width: 767px) {
  :root { --v2-paper-texture: url("assets/synthesis-xuan-paper-mobile-v1.jpg"); }
  html,
  body.v2-app {
    overflow-x: clip;
  }
  #v2App {
    max-width: 100%;
    overflow-x: clip;
  }
  .v2-view[data-v2-view="home"] {
    padding: 10px 12px calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .v2-home {
    gap: 10px;
  }
  .v2-home-side {
    position: static;
    top: auto;
    z-index: auto;
    max-height: none;
  }
  .v2-home-side .v2-overview {
    padding: 12px;
    max-height: none;
    overflow: visible;
  }
  .v2-overview-title {
    gap: 6px;
  }
  .v2-overview-sys {
    flex: 1 1 auto;
    justify-content: flex-end;
    min-width: 0;
  }
  .v2-chart-link {
    font-size: 13px;
    line-height: 1.35;
    min-height: 44px;
    padding: 10px 12px;
    letter-spacing: 0.02em;
  }
  .v2-member-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .v2-member-pay {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    font-size: 12.5px;
    padding: 0 12px;
  }
  .v2-member-pay-text {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v2-pillars {
    gap: 4px;
    margin-bottom: 8px;
  }
  .v2-pillar {
    padding: 6px 2px 8px;
  }
  .v2-pillar .v2-gz {
    font-size: 17px;
    width: 1.65em;
    height: 1.65em;
  }
  .v2-gz-polar,
  .v2-gz-god {
    font-size: 8px;
  }
  .v2-daymaster {
    padding: 8px 10px;
    margin-bottom: 8px;
    gap: 10px;
  }
  /* Mobile overview rule: stack highlight below content — no side-by-side overlap */
  .v2-daymaster.has-ss,
  .v2-overview.is-western .v2-daymaster.has-ss,
  .v2-overview.is-ziwei .v2-daymaster.has-ss {
    grid-template-columns: 1fr !important;
    column-gap: 0;
    row-gap: 10px;
  }
  .v2-dm-main {
    gap: 6px;
    min-width: 0;
    width: 100%;
  }
  .v2-ss-highlight {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .v2-ss-btn {
    min-height: 24px;
    padding: 0 7px;
    font-size: 10px;
    align-self: flex-start;
    width: auto;
  }
  .v2-ss-grid {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .v2-ss-highlight .bazi-shensha-chip {
    min-height: 24px;
    padding: 3px 8px;
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
  }
  .v2-ss-highlight .bazi-shensha-chip.is-open {
    flex: 1 1 100%;
    width: 100%;
  }
  .v2-ss-highlight .bazi-shensha-chip-name {
    font-size: 11px;
    white-space: nowrap;
  }
  /* Overview copy: single-line, no wrap, no overlap */
  .v2-overview .v2-dm-row,
  .v2-overview .v2-dm-day,
  .v2-overview .v2-dm-yong,
  .v2-overview .v2-dm-ji,
  .v2-overview .v2-dm-month,
  .v2-overview .v2-dm-body,
  .v2-overview .v2-dm-helpers {
    flex-wrap: nowrap;
    min-width: 0;
    overflow: hidden;
  }
  .v2-overview .v2-dm-label,
  .v2-overview .v2-dm-strength,
  .v2-overview .v2-god-chip,
  .v2-overview .v2-ws-sign-name,
  .v2-overview .v2-ws-trait,
  .v2-overview .v2-zw-life,
  .v2-overview .v2-zw-star-tag,
  .v2-overview .v2-helper-chip-name,
  .v2-overview .v2-chip,
  .v2-overview .v2-dm-note {
    white-space: nowrap;
  }
  .v2-overview .v2-dm-month-desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
  }
  .v2-overview .v2-dm-helpers {
    flex-wrap: wrap;
    overflow: visible;
  }
  .v2-overview .v2-dm-helpers .v2-helper-grid {
    flex: 1 1 100%;
    width: 100%;
  }
  .v2-overview.is-western .v2-dm-label {
    flex: 0 0 4em;
    min-width: 4em;
    font-size: 11px;
  }
  .v2-overview.is-western .v2-ws-life {
    font-size: 22px;
  }
  .v2-overview.is-western .v2-dm-strength-west {
    font-size: 11px;
    padding: 2px 6px;
  }
  .v2-overview.is-western .v2-aspect-analysis {
    -webkit-line-clamp: 3;
    font-size: 10.5px;
  }
  .v2-overview.is-western .v2-ss-highlight .bazi-shensha-chip-main {
    white-space: nowrap;
  }
  .v2-overview.is-ziwei .v2-zw-life {
    font-size: 14px;
    letter-spacing: 0.02em;
    flex: 0 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v2-overview.is-ziwei .v2-zw-body-palace {
    flex: 0 0 auto;
    overflow: visible;
    text-overflow: clip;
  }
  .v2-overview.is-ziwei .v2-dm-label {
    flex: 0 0 3.6em;
    min-width: 3.6em;
    font-size: 11px;
  }
  .v2-overview.is-ziwei .v2-dm-day {
    gap: 4px 6px;
  }
  .v2-overview.is-ziwei .v2-dm-strength {
    font-size: 11px;
    padding: 2px 6px;
  }
  .v2-overview.is-ziwei .v2-helper-grid {
    gap: 5px;
  }
  .v2-overview.is-ziwei .v2-helper-chip {
    min-height: 24px;
    padding: 3px 8px;
  }
  .v2-overview.is-ziwei .v2-helper-chip-name {
    font-size: 11px;
  }
  .v2-overview.is-ziwei .v2-pillars {
    min-height: 112px;
  }
  .v2-overview.is-ziwei .v2-pillar {
    min-height: 100px;
    align-content: center;
    justify-items: center;
  }
  .v2-overview.is-ziwei .v2-ss-grid {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 5px;
  }
  .v2-overview.is-ziwei .v2-ss-highlight .bazi-shensha-chip {
    width: 100%;
    flex: 0 0 auto;
  }
  .v2-overview.is-ziwei .v2-ss-highlight .bazi-shensha-chip-main {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v2-overview.is-ziwei .v2-ss-highlight .v2-sihua-note {
    font-size: 10px;
  }
  .v2-overview-sys {
    flex: 0 0 auto;
    justify-content: flex-end;
  }
  .v2-sys-btn {
    min-height: 30px;
    padding: 0 11px;
    font-size: 12px;
  }
  .v2-dm-hint {
    margin-left: 5em;
    font-size: 10px;
  }
  .v2-dm-label {
    flex: 0 0 5em;
    font-size: 11px;
  }
  .v2-dm-yong,
  .v2-dm-ji {
    flex-wrap: nowrap;
  }
  .v2-dm-yong .v2-chip,
  .v2-dm-ji .v2-chip {
    min-height: 22px;
    padding: 0 6px;
    font-size: 11px;
  }
  .v2-god-chip {
    min-height: 22px;
    padding: 0 8px;
    font-size: 12px;
    letter-spacing: 0.1em;
  }
  .v2-dm-month-desc {
    font-size: 11px;
  }
  .v2-home-foot {
    display: none !important;
  }
  .v2-ask-block h2 {
    font-size: 18px;
    margin: 0 0 8px;
  }
  .v2-themes {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 8px;
  }
  .v2-theme {
    min-height: 40px;
    font-size: 12px;
  }
  .v2-ask-box {
    padding: 10px;
  }
  .v2-ask-box textarea {
    min-height: 64px;
    font-size: 14px;
  }
  .v2-member-block {
    gap: 8px;
    padding: 12px;
  }
  .v2-member-heroes {
    gap: 6px;
  }
  .v2-member-block .synthesis-hero {
    grid-template-columns: auto 1fr;
    min-height: 56px;
    padding: 8px 10px;
    gap: 10px;
    border-radius: 10px;
  }
  .v2-member-block .synthesis-hero-seal {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  .v2-member-block .synthesis-hero-text b {
    font-size: 13px;
  }
  .v2-member-block .synthesis-hero-text i {
    display: block !important;
    margin-top: 2px;
    font-size: 10.5px;
    line-height: 1.35;
    opacity: 0.88;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .v2-member-block .synthesis-hero-cta {
    display: none !important;
  }
}

/* —— 排盘后选择页 #/choose —— */
.v2-view[data-v2-view="choose"] {
  position: relative;
  width: min(640px, 100%);
  max-width: 100%;
  padding: 16px 16px 28px;
  isolation: isolate;
}
.v2-choose-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.v2-choose-art img {
  display: block;
  width: min(100%, 520px);
  height: 100%;
  max-height: calc(100dvh - 56px);
  object-fit: contain;
  object-position: center 62%;
  user-select: none;
}
.v2-choose {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 14px;
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 20px 0 32px;
  min-height: calc(100dvh - 56px - 40px);
}
.v2-choose-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 24px -12px rgba(124, 49, 38, 0.5);
}
.v2-choose h1 {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.08em;
}
.v2-choose-lead {
  margin: 0;
  max-width: 28em;
  font-size: 15px;
  line-height: 1.65;
  color: var(--v2-ink-70);
}
.v2-choose-actions {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.v2-choose-primary,
.v2-choose-secondary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 72px;
  padding: 16px 18px;
  border-radius: var(--radius);
  text-align: left;
  border: 1px solid transparent;
}
.v2-choose-primary {
  background: var(--cinnabar);
  color: #fff9ec;
  border-color: var(--cinnabar);
}
.v2-choose-primary:active,
.v2-choose-secondary:active {
  transform: scale(0.98);
}
.v2-choose-primary b,
.v2-choose-secondary b {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
  font-weight: 650;
}
.v2-choose-primary span {
  font-size: 12px;
  opacity: 0.88;
  line-height: 1.4;
}
.v2-choose-secondary {
  background: var(--v2-paper-card);
  color: var(--ink);
  border-color: var(--line);
}
.v2-choose-secondary span {
  font-size: 12px;
  color: var(--v2-ink-45);
  line-height: 1.4;
}

/* —— V3 统一 AI 结果页 #/answer —— */
.v2-view[data-v2-view="answer"] {
  width: min(720px, 100%);
  padding: 12px 16px 28px;
}
.v2-answer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: calc(100dvh - 56px - 40px);
}
.v2-answer-head {
  display: grid;
  gap: 10px;
}
.v2-answer-meta h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 4.5vw, 24px);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.v2-answer-q {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--v2-ink-70);
}
.v2-answer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.v2-answer-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--v2-paper-card);
  font-size: 12px;
  font-weight: 650;
  color: var(--v2-ink-70);
}
.v2-answer-stage {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 28px 12px 20px;
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.v2-answer-breath {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(255, 249, 231, 0.95), transparent 45%),
    linear-gradient(145deg, var(--cinnabar), var(--red-deep));
  opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) {
  .v2-answer-breath {
    animation: v2-ink-breathe 2.4s ease-in-out infinite;
  }
}
@keyframes v2-ink-breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.7; }
  50% { transform: scale(1); opacity: 1; }
}
.v2-answer-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
}
.v2-answer-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--v2-ink-45);
}
.v2-answer-steps li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(21, 25, 24, 0.18);
  flex: 0 0 auto;
}
.v2-answer-steps li.is-done { color: var(--v2-ink-70); }
.v2-answer-steps li.is-done::before { background: var(--cinnabar); }
.v2-answer-steps li.is-on {
  color: var(--ink);
  font-weight: 650;
}
.v2-answer-steps li.is-on::before {
  background: var(--cinnabar);
  box-shadow: 0 0 0 4px rgba(166, 64, 50, 0.15);
}
.v2-answer-stage-hint {
  margin: 0;
  font-size: 13px;
  color: var(--v2-ink-45);
}
.v2-answer-body {
  flex: 1;
  max-width: 40em;
  margin: 0 auto;
  width: 100%;
  padding: 18px 16px;
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 1.8;
  color: var(--ink);
}
.v2-answer-body h3 {
  margin: 1.2em 0 0.45em;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--red-deep);
}
.v2-answer-body h3:first-child { margin-top: 0; }
.v2-answer-body p {
  margin: 0 0 0.85em;
}
.v2-answer-body p:last-child { margin-bottom: 0; }
.v2-answer-upsell {
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}
.v2-answer-upsell .wx-upsell {
  margin: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
.v2-answer-error {
  display: grid;
  gap: 10px;
  padding: 20px 16px;
  background: var(--v2-paper-card);
  border: 1px solid rgba(166, 64, 50, 0.28);
  border-radius: var(--radius);
  text-align: center;
}
.v2-answer-error b {
  font-family: var(--serif);
  font-size: 18px;
}
.v2-answer-error p {
  margin: 0;
  color: var(--v2-ink-70);
  font-size: 14px;
  line-height: 1.55;
}
.v2-answer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.v2-answer-copy-state {
  font-size: 12px;
  color: var(--v2-ink-45);
}
.v2-answer-follow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.v2-answer-follow textarea {
  width: 100%;
  min-height: 44px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 16px;
  font-family: var(--ui);
  background: #fff;
}
.v2-answer-quota {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--v2-ink-70);
}
.v2-answer-quota a {
  color: var(--cinnabar);
  font-weight: 650;
  text-decoration: none;
}
.v2-answer-quota a:hover { text-decoration: underline; }
.v2-answer-quota #v2AnswerPay.is-member { display: none; }
.v2-answer-stage[hidden],
.v2-answer-body[hidden],
.v2-answer-upsell[hidden],
.v2-answer-error[hidden],
.v2-answer-actions[hidden],
.v2-answer-follow[hidden],
.v2-answer [hidden] {
  display: none !important;
}

/* —— M5 专业命盘：顶栏保留 + 仅露出 detail（不走 v2-show-legacy） —— */
body.v2-app.v2-chart-mode #v2App {
  display: flex !important;
  flex-direction: column;
  min-height: auto;
}
body.v2-app.v2-chart-mode #v2App .v2-view {
  display: none !important;
}
body.v2-app.v2-chart-mode .shell.v2-legacy {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: min(1200px, calc(100% - 24px)) !important;
  height: auto !important;
  margin: 0 auto !important;
  padding: 8px 0 40px !important;
  overflow: visible !important;
  pointer-events: auto !important;
  z-index: 2 !important;
  background: transparent !important;
}
body.v2-app.v2-chart-mode .shell.v2-legacy > *:not(#detailView):not(.wx-chat-modal.is-open):not(.ai-prompt-modal.is-open) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body.v2-app.v2-chart-mode .shell.v2-legacy > .wx-chat-modal.is-open,
body.v2-app.v2-chart-mode .shell.v2-legacy > .ai-prompt-modal.is-open {
  display: grid !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 70 !important;
}
body.v2-app.v2-chart-mode .shell.v2-legacy > #detailView {
  display: block !important;
  visibility: visible !important;
  pointer-events: auto !important;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0 4px 24px;
}
body.v2-app.v2-chart-mode .detail-header {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "back pills"
    ". ai";
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
  padding: 12px 14px;
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
body.v2-app.v2-chart-mode #backBtn { grid-area: back; }
body.v2-app.v2-chart-mode .detail-title { grid-area: title; }
body.v2-app.v2-chart-mode .detail-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.06em;
}
body.v2-app.v2-chart-mode .detail-title p,
body.v2-app.v2-chart-mode #detailSubtitle { display: none !important; }
body.v2-app.v2-chart-mode .system-nav { display: none !important; }
body.v2-app.v2-chart-mode .v2-chart-pills {
  grid-area: pills;
  display: grid;
  gap: 8px;
  min-width: 0;
}
body.v2-app.v2-chart-mode .v2-chart-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
body.v2-app.v2-chart-mode .v2-chart-pill-label {
  flex: 0 0 auto;
  min-width: 4.5em;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--v2-ink-50, #8a7d6a);
}
body.v2-app.v2-chart-mode .v2-chart-pill-group {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
body.v2-app.v2-chart-mode .v2-chart-pill {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 650;
  color: var(--v2-ink-70);
  cursor: pointer;
}
body.v2-app.v2-chart-mode .v2-chart-pill.is-active {
  color: #fff6e3;
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}
body.v2-app.v2-chart-mode .v2-chart-ai {
  grid-area: ai;
  justify-self: end;
  align-self: end;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 0;
  background: var(--cinnabar);
  color: #fff9ec;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
body.v2-app.v2-chart-mode .v2-chart-ai[hidden] { display: none !important; }
body.v2-app.v2-chart-mode .v2-chart-ai:active { transform: scale(0.98); }
body.v2-app.v2-chart-mode .plate-card {
  background: var(--v2-paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px -20px rgba(47, 36, 17, 0.3);
}
body.v2-app.v2-chart-mode .chart-layout {
  gap: 12px;
}
@media (min-width: 1024px) {
  body.v2-app.v2-chart-mode .detail-header {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "back pills"
      ". ai";
  }
  body.v2-app.v2-chart-mode .detail-title { display: none; }
}

/* —— M6：会员功能（提问区下方） + 桌面 V3 右栏嵌入 —— */
.v2-member-block {
  display: grid;
  gap: 10px;
}
.v2-member-title {
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--ink);
  font-weight: 650;
}
.v2-member-heroes {
  display: grid;
  gap: 6px;
}
.v2-member-block .synthesis-hero {
  margin: 0;
  min-height: 58px;
  padding: 10px 12px;
  gap: 10px;
  border-radius: 10px;
  grid-template-columns: auto 1fr;
  animation: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.v2-member-block .yangming-hero {
  background-color: #152927;
  background-image: url("/assets/hero-yangming-bg.jpg");
  color: #f1f0dc;
  border-color: rgba(194, 181, 125, 0.78);
  text-decoration: none;
}
.v2-member-block .yangming-hero .synthesis-hero-text b {
  color: #f3f1d9;
}
.v2-member-block .synthesis-hero-seal {
  width: 36px;
  height: 36px;
  font-size: 18px;
}
.v2-member-block .synthesis-hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 4px;
}
.v2-member-block .synthesis-hero-title-row {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.v2-member-block .synthesis-hero-title-row b {
  display: block;
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.06em;
  line-height: 1.35;
}
.v2-member-block .synthesis-hero-title-row .ym-badge {
  margin-left: 0;
}
.v2-member-block .synthesis-hero-text b {
  font-size: 14px;
  letter-spacing: 0.06em;
}
.v2-member-block .synthesis-hero-text i {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  opacity: 0.88;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v2-member-block .synthesis-hero-cta {
  display: none !important;
}
@media (min-width: 1024px) {
  .v2-member-block .synthesis-hero-cta {
    display: inline-flex !important;
  }
  .v2-member-block .synthesis-hero-text i {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.45;
  }
  .v2-member-block .synthesis-hero-text b {
    white-space: normal;
  }
}
.v2-home-foot {
  display: none !important;
}
@media (max-width: 560px) {
  .v2-member-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .v2-member-pay {
    width: 100%;
    justify-content: center;
  }
}

.v2-answer-dock {
  min-width: 0;
}
.v2-settings-account {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  gap: 8px;
}
.v2-settings-account[hidden] { display: none !important; }
.v2-settings-email {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  word-break: break-all;
}
.v2-settings-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 12px;
  color: var(--v2-ink-70);
}
.v2-settings-row i {
  margin-left: auto;
  font-style: normal;
  color: var(--v2-ink-45);
  font-size: 12px;
  font-weight: 600;
}
.v2-settings-lang {
  cursor: default;
}
.v2-settings-lang #v2SettingsLangSlot {
  margin-left: auto;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .v2-home {
    width: min(720px, 100%);
    margin: 0 auto;
  }
}

@media (min-width: 1024px) {
  body.v2-answer-docked .v2-home-main > :not(#v2AnswerDock) {
    display: none !important;
  }
  body.v2-answer-docked .v2-home-side,
  body.v2-answer-docked .v2-member-block {
    display: none !important;
  }
  body.v2-answer-docked .v2-home {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "ask";
  }
  body.v2-answer-docked #v2AnswerDock {
    display: block !important;
  }
  body.v2-answer-docked .v2-view[data-v2-view="answer"] {
    display: block !important;
    width: 100%;
    max-width: none;
    padding: 0 0 24px;
    min-height: 0;
  }
  body.v2-answer-docked .v2-answer {
    min-height: calc(100dvh - 96px);
  }

  /* PC 会员卡排版（置于文末，覆盖 M6 默认横向压缩样式） */
  .v2-member-block {
    gap: 14px;
  }
  .v2-member-head {
    align-items: center;
    gap: 12px 16px;
    padding-bottom: 10px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(47, 36, 17, 0.08);
  }
  .v2-member-heroes {
    gap: 12px;
  }
  .v2-member-block .synthesis-hero {
    min-height: 96px;
    padding: 16px 18px;
    gap: 12px 16px;
    border-radius: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "seal text cta";
    align-items: center;
  }
  .v2-member-block .synthesis-hero-seal {
    grid-area: seal;
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  .v2-member-block .synthesis-hero-text {
    grid-area: text;
    gap: 6px;
    justify-content: center;
  }
  .v2-member-block .synthesis-hero-title-row {
    gap: 6px;
  }
  .v2-member-block .synthesis-hero-title-row b,
  .v2-member-block .yangming-hero .synthesis-hero-title-row b,
  .v2-member-block .renji-hero .synthesis-hero-title-row b {
    font-size: 16px;
    letter-spacing: 0.08em;
    line-height: 1.35;
    white-space: normal;
  }
  .v2-member-block .yangming-hero .synthesis-hero-title-row b {
    color: #f3f1d9;
  }
  .v2-member-block .renji-hero .synthesis-hero-title-row b {
    color: #fff0d2;
  }
  .v2-member-block .synthesis-hero-text i {
    margin-top: 0;
    font-size: 12.5px;
    line-height: 1.5;
    letter-spacing: 0.04em;
    opacity: 0.92;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .v2-member-block .synthesis-hero-cta {
    grid-area: cta;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 118px;
    padding: 8px 16px;
    font-size: 13.5px;
    letter-spacing: 0.08em;
    border-radius: 999px;
  }
}

@media (min-width: 1200px) {
  .v2-member-block {
    padding: 18px 20px;
    gap: 14px;
  }
  .v2-member-heroes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .v2-member-block .synthesis-hero {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "seal text"
      "seal text"
      "cta cta";
    align-items: start;
    min-height: 188px;
    padding: 18px 18px 16px;
    gap: 10px 14px;
  }
  .v2-member-block .synthesis-hero-seal {
    width: 52px;
    height: 52px;
    font-size: 26px;
    margin-top: 2px;
  }
  .v2-member-block .synthesis-hero-text {
    gap: 8px;
    padding-top: 2px;
    justify-content: flex-start;
  }
  .v2-member-block .synthesis-hero-title-row {
    align-items: flex-start;
    gap: 8px;
  }
  .v2-member-block .synthesis-hero-title-row b,
  .v2-member-block .yangming-hero .synthesis-hero-title-row b,
  .v2-member-block .renji-hero .synthesis-hero-title-row b {
    font-size: 17px;
    letter-spacing: 0.1em;
    line-height: 1.4;
  }
  .v2-member-block .synthesis-hero-text i {
    font-size: 13px;
    line-height: 1.55;
    letter-spacing: 0.045em;
  }
  .v2-member-block .synthesis-hero-cta {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin-top: 6px;
    padding: 10px 16px;
    font-size: 14px;
    letter-spacing: 0.12em;
  }
  .v2-member-block .synthesis-hero:hover .synthesis-hero-cta {
    transform: none;
  }
}
