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

.mini-site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  padding: 8px 14px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(49, 46, 129, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.mini-site-nav a {
  color: #4338ca;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.mini-site-nav a:hover {
  text-decoration: underline;
}

.mini-site-nav-hint {
  color: #64748b;
  font-size: 12px;
  text-align: center;
  line-height: 1.45;
  max-width: 420px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% -8%, rgba(167, 139, 250, 0.22), transparent 35%),
    radial-gradient(circle at 88% 0%, rgba(251, 191, 36, 0.16), transparent 32%),
    radial-gradient(circle at 50% 110%, rgba(56, 189, 248, 0.14), transparent 40%),
    linear-gradient(180deg, #f7f4ff 0%, #eff1ff 54%, #eef4fb 100%);
  color: #2b1f1a;
  min-height: 100vh;
  overflow-x: hidden;
}

.page-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

.app {
  width: 100%;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.975);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 24px 60px rgba(42, 34, 73, 0.17),
    0 2px 0 rgba(255, 255, 255, 0.68) inset;
  overflow: hidden;
}

.header {
  padding: 20px 20px 16px;
  text-align: center;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 38%),
    linear-gradient(135deg, #312e81 0%, #6d28d9 56%, #9333ea 100%);
  color: #fff;
  box-shadow: 0 10px 26px rgba(88, 28, 135, 0.28);
}

.title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
}

.sub-title {
  font-size: 13px;
  opacity: 0.98;
  line-height: 1.65;
}

.form-section {
  padding: 16px 20px 8px;
}

.form-box {
  background: linear-gradient(180deg, #fdf8ef, #f8efe2);
  border-radius: 12px;
  padding: 14px 14px 16px;
  border: 1px solid #e5d4bf;
  box-shadow: 0 6px 20px rgba(82, 61, 31, 0.08);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-row.full {
  grid-column: 1 / -1;
}

.advanced-toggle-row {
  justify-content: center;
}

.advanced-toggle-btn {
  border: 1px solid rgba(124, 58, 237, 0.36);
  background: linear-gradient(180deg, rgba(245, 241, 255, 0.95), rgba(236, 230, 255, 0.9));
  color: #5b21b6;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.advanced-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.advanced-fields.is-collapsed {
  display: none;
}

.field-label {
  width: 88px;
  font-size: 13px;
  color: #5b3f2c;
  flex-shrink: 0;
}

.field-input {
  flex: 1;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #deccb7;
  font-size: 13px;
  background: linear-gradient(180deg, #fffefd, #fffaf3);
  color: #2d241b;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.field-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
  background: #fff;
}

.field-row-birthday .birthday-group {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.birthday-group .birthday-select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid #deccb7;
  font-size: 13px;
  background: linear-gradient(180deg, #fffefd, #fffaf3);
  color: #2d241b;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.birthday-group .birthday-select:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
  background: #fff;
}

.form-cta-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(176, 143, 98, 0.45);
}

.submit-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 52%, #a855f7 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(91, 33, 182, 0.3);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(91, 33, 182, 0.34);
}

.tip-text {
  margin-top: 8px;
  font-size: 12px;
  color: #6b5344;
  text-align: center;
  line-height: 1.6;
}

.result-section {
  padding: 10px 20px 18px;
  display: none;
  flex-direction: column;
  gap: 10px;
}

.result-card {
  background: linear-gradient(180deg, #fffdfb, #fff8ef);
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 176, 103, 0.42);
  box-shadow: 0 8px 22px rgba(62, 38, 19, 0.08);
  position: relative;
}

.result-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 12px 0 0 12px;
  background: linear-gradient(180deg, #a855f7, #7c3aed);
  opacity: 0.9;
}

.result-card:nth-child(2n)::before {
  background: linear-gradient(180deg, #0ea5e9, #2563eb);
}

.result-card:nth-child(3n)::before {
  background: linear-gradient(180deg, #14b8a6, #0f766e);
}

.result-title {
  font-size: 16px;
  font-weight: 700;
  color: #5b21b6;
  margin-bottom: 8px;
  text-align: center;
  letter-spacing: 0.02em;
}

.result-text {
  font-size: 13px;
  color: #4f3b2c;
  line-height: 1.8;
  white-space: pre-wrap;
}

.summary-rows {
  display: grid;
  gap: 8px;
}

.summary-row {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.summary-label,
.summary-value {
  border-radius: 10px;
  border: 1px solid rgba(180, 155, 120, 0.22);
  padding: 9px 10px;
  min-height: 46px;
  display: flex;
  align-items: center;
}

.summary-label {
  justify-content: center;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #5b21b6;
  background: linear-gradient(180deg, rgba(243, 232, 255, 0.95), rgba(237, 233, 254, 0.82));
}

.summary-value {
  font-size: 13px;
  color: #4f3b2c;
  line-height: 1.75;
  white-space: pre-wrap;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 255, 0.92));
}

.summary-value .kv-grid {
  display: grid;
  gap: 8px;
}

.summary-value .kv-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.summary-value .kv-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 11.5px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  color: #4c1d95;
  background: linear-gradient(180deg, rgba(237, 233, 254, 0.96), rgba(221, 214, 254, 0.9));
  border: 1px solid rgba(167, 139, 250, 0.42);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 1px 4px rgba(124, 58, 237, 0.16);
}

.summary-value .kv-text {
  line-height: 1.75;
}

.summary-value .kv-plain {
  line-height: 1.75;
}

.score-meter {
  width: 100%;
  height: 7px;
  background: rgba(124, 58, 237, 0.12);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}

.score-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #84cc16 40%, #a855f7 100%);
}

.score-num {
  margin-left: 6px;
  color: #5b21b6;
  font-weight: 700;
}

.unlock-wrap {
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px dashed rgba(124, 58, 237, 0.4);
  background: linear-gradient(180deg, rgba(245, 241, 255, 0.96), rgba(238, 233, 255, 0.9));
  text-align: center;
}

.unlock-title {
  font-size: 13px;
  font-weight: 700;
  color: #5b21b6;
  margin-bottom: 6px;
}

.unlock-desc {
  font-size: 12px;
  color: #6b5344;
  line-height: 1.6;
  margin-bottom: 8px;
}

.unlock-btn {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 55%, #a855f7 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* 报告分组色：避免整屏同色单调 */
.summary-row:nth-child(4n+1) .summary-label {
  background: linear-gradient(180deg, rgba(243, 232, 255, 0.95), rgba(233, 224, 255, 0.82));
}
.summary-row:nth-child(4n+1) .summary-value {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 242, 255, 0.9));
  border-color: rgba(155, 123, 210, 0.28);
}

.summary-row:nth-child(4n+2) .summary-label {
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.95), rgba(209, 236, 255, 0.82));
  color: #1d4ed8;
}
.summary-row:nth-child(4n+2) .summary-value {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 249, 255, 0.9));
  border-color: rgba(98, 163, 220, 0.3);
}

.summary-row:nth-child(4n+3) .summary-label {
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.95), rgba(214, 250, 229, 0.82));
  color: #0f766e;
}
.summary-row:nth-child(4n+3) .summary-value {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 252, 245, 0.9));
  border-color: rgba(90, 170, 138, 0.28);
}

.summary-row:nth-child(4n+4) .summary-label {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.95), rgba(255, 238, 213, 0.82));
  color: #b45309;
}
.summary-row:nth-child(4n+4) .summary-value {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.9));
  border-color: rgba(217, 151, 72, 0.28);
}

.result-download-wrap {
  display: flex;
  justify-content: center;
  margin-top: 2px;
}

.download-report-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  min-width: 220px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 54%, #a855f7 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(91, 33, 182, 0.3);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.download-report-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(91, 33, 182, 0.34);
}

.footer-note {
  padding: 10px 16px 16px;
  border-top: 1px solid #e7dbcd;
  background: linear-gradient(to top, #edf2ff, #f9f7ff);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  color: #6b5344;
  line-height: 1.55;
  text-align: left;
}

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

/* ========== 支付弹窗（完整版解锁） ========== */
.pay-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  z-index: 100050;
  padding: 16px;
  box-sizing: border-box;
}

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

.pay-modal-inner {
  width: 100%;
  max-width: 360px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(30, 27, 75, 0.35);
}

.pay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

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

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

.pay-amount {
  text-align: center;
  margin-bottom: 14px;
}

.pay-amount-label {
  font-size: 12px;
  color: #64748b;
}

.pay-amount-value {
  font-size: 22px;
  font-weight: 800;
  color: #5b21b6;
}

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

.pay-method {
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(180deg, #faf5ff, #f3e8ff);
  color: #5b21b6;
}

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

.pay-method-direct {
  color: #fff;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  border-color: rgba(124, 58, 237, 0.55);
}

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

.pay-method:active {
  transform: scale(0.98);
}

.pay-tip {
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
}

.pay-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 16px 16px;
}

.pay-modal-actions .btn-secondary {
  min-width: 120px;
}

.pay-modal-actions .btn-secondary,
.pay-modal-actions .btn-primary {
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pay-modal-actions .btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.pay-modal-actions .btn-primary {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
  color: #fff;
}

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

.payqr-box {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.5);
  z-index: 100060;
  padding: 16px;
  box-sizing: border-box;
}

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

.payqr-inner {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(30, 27, 75, 0.35);
}

.payqr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #312e81, #6d28d9);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.payqr-close-btn {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

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

.payqr-qrcode {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.payqr-tip {
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .page-wrap {
    padding: 10px;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

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

  .advanced-fields {
    grid-template-columns: 1fr;
  }

  .field-row.full {
    grid-column: auto;
  }

  .field-label {
    width: 76px;
  }

  /* 手机端保持年/月/日同一行三等分，略缩小字号与间距 */
  .field-row-birthday .birthday-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .field-row-birthday .birthday-select {
    min-height: 44px;
    font-size: 12px;
    padding: 8px 4px;
  }

  .title {
    font-size: 24px;
  }

  .summary-row {
    grid-template-columns: 1fr;
  }

  .summary-label {
    justify-content: flex-start;
    text-align: left;
  }
}
