/* 命之书 — 版心与组件与 jinri / rensheng 统一（紫红金 + 米色底、祥云标题、双层表单） */
:root {
  --red-main: #4c1d95;
  --red-dark: #1e3a8a;
  --gold: #6366f1;
  --gold-light: #a855f7;
  --beige: #eef2ff;
  --beige-dark: #e2e8f0;
  --cream: #f6f7ff;
  --text-dark: #1f2937;
  --text-soft: #6b7280;
  --shadow-soft: 0 3px 10px rgba(0, 0, 0, 0.08);
  --ink: var(--text-dark);
  --paper: var(--cream);
  --paper-dark: var(--beige-dark);
  --accent: var(--red-main);
  --accent-light: var(--gold-light);
  --red: var(--red-main);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Noto Serif SC", "SimSun", serif;
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(201, 162, 39, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 70%, rgba(184, 42, 42, 0.06) 0%, transparent 45%),
    repeating-linear-gradient(
      96deg,
      transparent,
      transparent 40px,
      rgba(201, 162, 39, 0.03) 40px,
      rgba(201, 162, 39, 0.03) 41px
    );
  color: var(--text-dark);
  min-height: 100vh;
  line-height: 1.75;
  position: relative;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.particle-bg {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12px 0 28px;
}

.app-scaler {
  transform-origin: top center;
  flex-shrink: 0;
}

.app {
  width: 520px;
  max-width: calc(100vw - 24px);
  margin: 0 auto;
  padding: 16px 12px 8px;
}

/* 顶部标题区 */
.app-header {
  text-align: center;
  margin-bottom: 8px;
}

.app-header-desc {
  margin: 10px 0 0;
  font-size: 13px;
  color: #8a7a62;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--red-main) 0%, var(--red-dark) 100%);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 14px 20px;
  margin-bottom: 16px;
  position: relative;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.title-bar h1 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.cloud {
  display: inline-block;
  width: 32px;
  height: 20px;
  background: var(--gold);
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  box-shadow:
    4px 0 0 var(--gold-light),
    -4px 0 0 var(--gold-light),
    0 3px 0 var(--gold-light);
  vertical-align: middle;
  margin: 0 4px;
}

.cloud-left {
  transform: scaleX(-1);
}

.section-divider {
  height: 2px;
  max-width: 160px;
  margin: 0 auto 20px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold) 20%,
    var(--red-main) 50%,
    var(--gold) 80%,
    transparent
  );
  opacity: 0.85;
  border-radius: 1px;
}

.form-section-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--red-dark);
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-align: center;
  font-family: inherit;
}

/* 表单区 */
.form-section {
  margin-bottom: 0;
}

.form-box {
  background: var(--beige-dark);
  border: 2px solid var(--red-main);
  border-radius: 8px;
  padding: 6px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.form-inner {
  background: var(--beige);
  border-radius: 0 2px 2px 0;
  padding: 20px 24px;
  border: 1px solid #dcc9a8;
  position: relative;
  margin: 0;
  box-sizing: border-box;
}

.form-row {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.form-row:last-of-type {
  margin-bottom: 0;
}

.form-row-photo {
  align-items: flex-start;
}

.form-row-birthday .birthday-group {
  flex: 1;
  min-width: 0;
}

.form-label-photo {
  min-width: 4.5em;
  padding-top: 28px;
}

.form-photo-col {
  flex: 1;
  min-width: 180px;
}

.photo-input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.photo-input-row .photo-upload-wrap {
  flex: 1;
  min-width: 0;
}

.photo-input-row .photo-actions {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  display: flex;
}

.photo-input-row .photo-label {
  min-height: 80px;
  height: 100%;
}

.photo-input-row .btn-camera {
  width: 100%;
  min-height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 12px;
}

.form-label {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-dark);
  min-width: 56px;
}

.form-input {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid #dcc9a8;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  background: var(--cream);
  color: var(--text-dark);
}

.form-input::placeholder {
  color: #8a7a62;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25);
}

.form-date {
  cursor: pointer;
}

.birthday-group {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.birthday-group select {
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  border-radius: 4px;
  border: 1px solid #dcc9a8;
  background: var(--cream);
  color: var(--text-dark);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
}

.birthday-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25);
}

.radio-group {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.radio-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
}

.radio-item input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--red-main);
  border-radius: 50%;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.radio-item input:checked + .radio-custom {
  background: var(--red-main);
  border-color: var(--red-main);
}

.radio-item input:checked + .radio-custom::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--gold-light);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.error-msg {
  width: 100%;
  margin-left: 56px;
  margin-top: -6px;
  font-size: 12px;
  color: var(--red-main);
}

/* 照片上传与预览 */
.photo-preview {
  display: none;
  margin-bottom: 10px;
  text-align: center;
  min-height: 60px;
}

.photo-preview.is-visible {
  display: block;
}

.photo-preview-img {
  max-width: 100%;
  max-height: 220px;
  min-height: 80px;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: 1px solid #e0d4c0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  background: #faf8f3;
}

.photo-upload-wrap {
  position: relative;
}

.photo-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.photo-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 16px;
  border: 2px dashed #d4c4a8;
  border-radius: 8px;
  background: #fffef9;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.photo-label:hover {
  border-color: var(--red-main);
  background: #fdfbf7;
}

.photo-placeholder {
  font-size: 14px;
  color: #7a6a4d;
}

.photo-name {
  font-size: 13px;
  color: var(--red-main);
  margin-left: 8px;
  word-break: break-all;
}

.photo-actions {
  margin-top: 10px;
}

.btn-camera {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--red-main);
  background: #fff;
  color: var(--red-main);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-camera:hover {
  background: #fdf8f0;
}

/* 摄像头弹窗 */
.camera-modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.camera-modal.is-open {
  display: flex;
}

.camera-modal-inner {
  background: var(--paper);
  border-radius: 12px;
  overflow: hidden;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.camera-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--red-main);
  color: #fff;
  font-weight: 600;
}

.camera-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.camera-video {
  display: block;
  width: 100%;
  max-height: 50vh;
  object-fit: cover;
  background: #000;
}

.camera-modal-actions {
  display: flex;
  gap: 12px;
  padding: 16px;
  justify-content: flex-end;
}

/* 支付弹窗 */
.pay-modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.62);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pay-modal.is-open {
  display: flex;
}

.pay-modal-inner {
  background: var(--paper);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.28);
}

.pay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, var(--red-main) 0%, var(--red-dark) 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.pay-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.pay-modal-body {
  padding: 16px;
}

.pay-amount {
  border: 1px solid #e0d4c0;
  border-radius: 10px;
  background: #fffef9;
  padding: 14px 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pay-amount-label {
  font-size: 13px;
  color: #7a6a4d;
}

.pay-amount-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--red-main);
  letter-spacing: 0.02em;
}

.pay-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.pay-method {
  border-radius: 10px;
  border: 1px solid #d4c4a8;
  background: #fff;
  padding: 12px 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.pay-method:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  border-color: var(--red-main);
}

.pay-method:active {
  transform: translateY(0);
}

.pay-method:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.pay-method-wechat {
  color: #0f8a3a;
}

.pay-tip {
  font-size: 12px;
  color: #7a6a4d;
  line-height: 1.6;
}

.pay-modal-actions {
  display: flex;
  gap: 12px;
  padding: 16px;
  justify-content: center;
  border-top: 1px solid #e0d4c0;
  background: rgba(255, 255, 255, 0.35);
}

.pay-modal-actions .btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  margin-bottom: 16px;
  background: linear-gradient(180deg, var(--red-main) 0%, var(--red-dark) 100%);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 14px 24px;
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.1em;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.15s, box-shadow 0.15s;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(76, 29, 149, 0.35);
}

.submit-btn:active {
  transform: translateY(0);
}

.btn-text {
  margin: 0 10px;
}

/* 加载中 */
.loading-section {
  display: none;
  padding: 36px 12px;
  text-align: center;
}

.loading-section.is-active {
  display: block;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border: 4px solid var(--paper-dark);
  border-top-color: var(--red-main);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.loading-text {
  font-size: 15px;
  color: var(--ink);
  opacity: 0.9;
}

/* 报告区 */
.report-section {
  display: none;
  padding: 8px 0 16px;
}

.report-section.is-active {
  display: block;
}

.report-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.report-unlock-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid rgba(76, 29, 149, 0.35);
  background: linear-gradient(180deg, #faf5ff 0%, #f3e8ff 100%);
  text-align: center;
}

.report-unlock-banner[hidden] {
  display: none !important;
}

.report-mode-tip {
  margin: 12px 0 0;
  max-width: 100%;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  text-align: center;
}

.report-unlock-btn {
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.btn-secondary,
.btn-primary {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-secondary {
  border: 1px solid var(--red-main);
  background: #fff;
  color: var(--red-main);
}

.btn-secondary:hover {
  background: #fdf8f0;
}

.btn-primary {
  border: none;
  background: var(--red-main);
  color: #fff;
}

.btn-primary:hover {
  background: var(--gold-light);
}

/* —— 命之书报告正文：卷轴感 + 分章配色 —— */
.report-paper {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.97) 0%, #fffdf8 38%, #faf6f0 100%);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 12px;
  padding: 20px 18px 36px;
  box-shadow:
    0 4px 24px rgba(76, 29, 149, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85),
    inset 0 1px 0 rgba(201, 162, 39, 0.12);
  max-height: 75vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.report-paper::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 162, 39, 0.45) 15%,
    var(--gold-light) 50%,
    rgba(201, 162, 39, 0.45) 85%,
    transparent
  );
  pointer-events: none;
  opacity: 0.9;
}

.report-paper-top {
  height: 0;
  margin: 0;
  padding: 0;
}

.report-paper .report-title {
  position: relative;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  margin: 8px 0 6px;
  padding: 0 8px 14px;
  border-bottom: none;
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 45%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

@supports not (background-clip: text) {
  .report-paper .report-title {
    color: var(--red-main);
    -webkit-text-fill-color: unset;
  }
}

.report-paper .report-title::after {
  content: "";
  display: block;
  width: 120px;
  max-width: 55%;
  height: 2px;
  margin: 12px auto 0;
  border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 30%, var(--red-main) 50%, var(--gold) 70%, transparent);
}

.report-paper .report-subtitle {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: #8a7a62;
  margin: 0 0 18px;
  text-indent: 0;
}

/* 命盘顶部：4 列框结构；面板内字体与字号统一（衬线、同大，对齐参考稿） */
.report-bazi-panel {
  margin-bottom: 22px;
  padding: 12px 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(76, 29, 149, 0.14);
  background: linear-gradient(180deg, #faf9ff 0%, #f5f3ff 48%, #faf8ff 100%);
  box-shadow: 0 2px 14px rgba(76, 29, 149, 0.06);
  font-family: "Noto Serif SC", "SimSun", "Songti SC", serif;
}

.report-kv-section {
  padding: 6px 4px 12px;
  margin-bottom: 2px;
  border-bottom: 1px solid rgba(76, 29, 149, 0.1);
}

.report-kv-section--pillars {
  border-bottom: none;
  padding-bottom: 2px;
  margin-bottom: 0;
}

.report-kv-row {
  margin-bottom: 8px;
}

.report-kv-row:last-child {
  margin-bottom: 0;
}

.report-kv-row--4 {
  display: grid;
  /* 标签列略窄、值列略宽，便于日期等单行显示 */
  grid-template-columns: minmax(3.2em, auto) minmax(0, 1.15fr) minmax(3.2em, auto) minmax(0, 1.15fr);
  gap: 6px;
}

.report-kv-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 0;
  min-height: 44px;
  padding: 10px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(76, 29, 149, 0.16);
  box-shadow:
    0 1px 3px rgba(76, 29, 149, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.report-kv-cell--pillar {
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.report-kv-cell--empty {
  visibility: hidden;
  border: none;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}

.report-kv-cell .report-k,
.report-kv-cell .report-v {
  display: block;
  width: 100%;
  text-align: center;
}

.report-bazi-panel .report-k,
.report-bazi-panel .report-v,
.report-bazi-panel .report-v--pillar {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.06em;
  color: #4c1d95;
  word-break: break-all;
}

.report-bazi-panel .report-v--date {
  white-space: nowrap;
  word-break: normal;
  letter-spacing: 0.02em;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.report-bazi-panel .report-kv-cell--date {
  min-width: 0;
}

.report-pillars-block {
  padding-top: 10px;
}

.report-bazi-panel .report-pillars-title {
  text-align: center;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #4c1d95;
  margin: 0 0 8px;
  text-indent: 0;
}

.report-h2 {
  --h2-accent: var(--red-main);
  --h2-tint: rgba(76, 29, 149, 0.1);
  font-size: 17px;
  font-weight: 700;
  color: #312e81;
  margin: 26px 0 14px;
  padding: 11px 14px 11px 16px;
  border-radius: 0 10px 10px 0;
  border-left: 4px solid var(--h2-accent);
  background: linear-gradient(90deg, var(--h2-tint), rgba(255, 255, 255, 0) 72%);
  letter-spacing: 0.06em;
  text-indent: 0;
}

.report-h2.theme-opening {
  --h2-accent: #b45309;
  --h2-tint: rgba(180, 83, 9, 0.12);
}

.report-h2.theme-bazi {
  --h2-accent: #5b21b6;
  --h2-tint: rgba(91, 33, 182, 0.11);
}

.report-h2.theme-wuxing {
  --h2-accent: #0f766e;
  --h2-tint: rgba(15, 118, 110, 0.11);
}

.report-h2.theme-shishen {
  --h2-accent: #4338ca;
  --h2-tint: rgba(67, 56, 202, 0.1);
}

.report-h2.theme-face {
  --h2-accent: #be185d;
  --h2-tint: rgba(190, 24, 93, 0.09);
}

.report-h2.theme-personality {
  --h2-accent: #1d4ed8;
  --h2-tint: rgba(29, 78, 216, 0.09);
}

.report-h2.theme-dayun {
  --h2-accent: #6d28d9;
  --h2-tint: rgba(109, 40, 217, 0.1);
}

.report-h2.theme-liunian {
  --h2-accent: #c2410c;
  --h2-tint: rgba(194, 65, 12, 0.1);
}

.report-h2.theme-career {
  --h2-accent: #1e40af;
  --h2-tint: rgba(30, 64, 175, 0.09);
}

.report-h2.theme-wealth {
  --h2-accent: #047857;
  --h2-tint: rgba(4, 120, 87, 0.1);
}

.report-h2.theme-love {
  --h2-accent: #db2777;
  --h2-tint: rgba(219, 39, 119, 0.09);
}

.report-h2.theme-marriage {
  --h2-accent: #a21caf;
  --h2-tint: rgba(162, 28, 175, 0.09);
}

.report-h2.theme-health {
  --h2-accent: #15803d;
  --h2-tint: rgba(21, 128, 61, 0.1);
}

.report-h2.theme-luck {
  --h2-accent: #b45309;
  --h2-tint: rgba(180, 83, 9, 0.12);
}

.report-h2.theme-closing {
  --h2-accent: #4b5563;
  --h2-tint: rgba(75, 85, 99, 0.08);
}

.report-paper p {
  font-size: 15px;
  line-height: 1.92;
  margin-bottom: 12px;
  text-indent: 2em;
  color: #374151;
}

.report-paper p strong {
  color: var(--red-main);
  font-weight: 700;
}

.report-paper .no-indent {
  text-indent: 0;
}

.report-paper .report-meta {
  font-size: 13px;
  color: #7a6a4d;
  margin-bottom: 20px;
}

.report-paper .report-teaser-tip {
  margin-top: 22px;
  padding: 16px 16px 16px 48px;
  position: relative;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.65) 0%, rgba(253, 230, 138, 0.35) 50%, rgba(243, 232, 255, 0.5) 100%);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.75;
  color: #5c4d3a;
  text-indent: 0;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(180, 83, 9, 0.08);
}

.report-paper .report-teaser-tip::before {
  content: "◆";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--red-main);
  opacity: 0.75;
}

.report-paper .report-footer {
  margin-top: 28px;
  padding: 16px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(76, 29, 149, 0.28);
  background: linear-gradient(180deg, rgba(250, 245, 255, 0.9) 0%, rgba(238, 242, 255, 0.5) 100%);
  font-size: 12px;
  line-height: 1.75;
  color: #6b5c7a;
  text-align: center;
  text-indent: 0;
}

.report-paper-pdf {
  max-height: none !important;
  overflow: visible !important;
  padding: 14px 18px 22px !important;
  box-shadow: none !important;
  border: 1px solid #ddd !important;
  background: #fff !important;
}

.report-paper-pdf::before {
  display: none;
}

.report-paper-pdf .report-title {
  font-size: 18px;
  -webkit-text-fill-color: var(--red-main);
  color: var(--red-main);
  background: none;
}

.report-paper-pdf .report-subtitle {
  font-size: 11px;
}

.report-paper-pdf .report-bazi-panel {
  padding: 8px 8px 10px;
  margin-bottom: 12px;
  font-family: "Noto Serif SC", "SimSun", "Songti SC", serif;
}

.report-paper-pdf .report-kv-section {
  padding: 4px 2px 6px;
}

.report-paper-pdf .report-kv-row--4 {
  gap: 3px;
}

.report-paper-pdf .report-kv-row {
  margin-bottom: 3px;
}

.report-paper-pdf .report-kv-cell {
  min-height: 0;
  padding: 5px 4px;
  border-radius: 6px;
}

.report-paper-pdf .report-kv-cell--pillar {
  min-height: 0;
  padding-top: 6px;
  padding-bottom: 6px;
}

.report-paper-pdf .report-bazi-panel .report-k,
.report-paper-pdf .report-bazi-panel .report-v,
.report-paper-pdf .report-bazi-panel .report-v--pillar {
  font-size: 10px;
}

.report-paper-pdf .report-bazi-panel .report-v--date {
  font-size: 9px;
  white-space: nowrap;
  letter-spacing: 0;
}

.report-paper-pdf .report-bazi-panel .report-pillars-title {
  font-size: 10px;
  margin-bottom: 4px;
}

.report-paper-pdf .report-h2 {
  font-size: 14px;
  margin: 16px 0 8px;
  padding: 8px 10px;
  background: #f3f4f6;
  border-left-width: 3px;
}

.report-paper-pdf p {
  font-size: 12px;
  line-height: 1.82;
  margin-bottom: 8px;
}

.report-paper-pdf .report-teaser-tip {
  padding: 10px 12px 10px 36px;
  font-size: 12px;
}

.report-paper-pdf .report-footer {
  font-size: 10px;
  margin-top: 18px;
  padding: 10px;
}

.report-paper-pdf .report-title::after {
  margin-top: 8px;
}

/* 页脚免责声明（与 jinri 双层框一致） */
.footer-note {
  margin-top: 18px;
  background: var(--beige-dark);
  border: 2px solid var(--red-main);
  border-radius: 6px;
  padding: 5px;
  box-shadow:
    inset 0 0 0 1px rgba(201, 162, 39, 0.18),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

.footer-note-inner {
  background: var(--beige);
  border-radius: 4px;
  padding: 14px 14px 16px;
  border: 1px solid #dcc9a8;
  text-align: center;
}

.footer-line {
  display: block;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold) 15%,
    var(--red-main) 50%,
    var(--gold) 85%,
    transparent
  );
  margin: 0 auto 12px;
  max-width: 120px;
  opacity: 0.9;
}

.footer-note .footer-line:last-of-type {
  margin-top: 12px;
  margin-bottom: 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--red-dark);
  letter-spacing: 0.04em;
  line-height: 1.65;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.footer-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  flex-shrink: 0;
}

/* 微信支付二维码弹窗 */
.payqr-box {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10060;
  padding: 16px;
}

.payqr-box.is-open {
  display: flex;
}

.payqr-inner {
  width: 320px;
  max-width: 92vw;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.payqr-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  background: linear-gradient(180deg, var(--red-main) 0%, var(--red-dark) 100%);
  color: #fff;
  position: relative;
}

.payqr-title {
  font-size: 14px;
  text-align: center;
  font-weight: 700;
}

.payqr-close-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.payqr-body {
  padding: 14px 14px 16px;
  text-align: center;
}

.payqr-qrcode {
  width: 220px;
  height: 220px;
  margin: 0 auto 10px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payqr-tip {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .page-wrap {
    padding: 10px 0 22px;
  }

  .title-bar h1 {
    font-size: 16px;
    letter-spacing: 0.08em;
  }

  .app-header-desc {
    font-size: 12px;
  }

  .form-inner {
    padding: 16px 14px;
  }

  .form-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-label {
    min-width: auto;
  }

  .form-input {
    padding: 12px 12px;
    font-size: 16px;
    min-width: 100%;
  }

  .birthday-group {
    flex-direction: column;
    width: 100%;
  }

  .radio-group {
    gap: 14px;
  }

  .error-msg {
    margin-left: 0;
  }

  .photo-label {
    min-height: 72px;
    padding: 14px;
  }

  .form-label-photo {
    padding-top: 0;
  }

  .photo-input-row .photo-label,
  .photo-input-row .btn-camera {
    min-height: 72px;
  }

  .btn-camera {
    width: 100%;
  }

  .submit-btn {
    padding: 12px 16px;
    font-size: 16px;
  }

  .report-toolbar .btn-secondary,
  .report-toolbar .btn-primary {
    flex: 1 1 140px;
  }

  .report-paper {
    padding: 18px 14px 28px;
    max-height: 78vh;
  }

  .report-paper .report-title {
    font-size: 18px;
    letter-spacing: 0.08em;
  }

  .report-bazi-panel {
    padding: 10px 8px 12px;
  }

  .report-kv-section {
    padding-left: 2px;
    padding-right: 2px;
  }

  .report-kv-row--4 {
    gap: 5px;
  }

  .report-kv-row {
    margin-bottom: 6px;
  }

  .report-kv-cell {
    min-height: 40px;
    padding: 8px 4px;
  }

  .report-kv-cell--pillar {
    min-height: 40px;
  }

  .report-bazi-panel .report-k,
  .report-bazi-panel .report-v,
  .report-bazi-panel .report-v--pillar,
  .report-bazi-panel .report-pillars-title {
    font-size: 14px;
  }

  .report-bazi-panel .report-v--date {
    font-size: 12px;
  }

  .report-paper .report-h2 {
    font-size: 15px;
    margin: 20px 0 10px;
    padding: 9px 10px 9px 12px;
  }

  .report-paper p {
    font-size: 14px;
    line-height: 1.85;
  }

  .report-paper .report-teaser-tip {
    padding-left: 40px;
    font-size: 13px;
  }

  .camera-modal {
    padding: 10px;
  }

  .camera-modal-inner {
    max-width: 100%;
  }

  .camera-video {
    max-height: 55vh;
  }

  .pay-modal {
    padding: 10px;
  }

  .pay-modal-inner {
    max-width: 100%;
  }

  .pay-methods {
    grid-template-columns: 1fr;
  }

  .pay-modal-actions {
    flex-direction: column;
  }

  .pay-modal-actions .btn-secondary,
  .pay-modal-actions .btn-primary {
    width: 100%;
  }
}
