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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top, #f3f0ff 0, #e9e7ff 40%, #e2e8f0 100%);
  color: #1f2937;
  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.96);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  position: relative;
}

.header {
  padding: 20px 20px 16px;
  text-align: center;
  background: linear-gradient(135deg, #1e3a8a, #a855f7);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.title {
  font-size: 22px;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  margin-bottom: 6px;
}

.sub-title {
  font-size: 13px;
  opacity: 0.95;
  line-height: 1.5;
}

.form-section {
  padding: 18px 20px 6px;
}

.form-box {
  background: #f6f7ff;
  border-radius: 12px;
  padding: 14px 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.55);
}

.owner-block {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px 12px;
  margin-bottom: 12px;
  border: 1px solid rgba(148, 163, 184, 0.55);
}

.owner-label {
  font-size: 13px;
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 8px;
  text-align: center;
}

.owner-block .field-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.owner-block .field-row:last-child {
  margin-bottom: 0;
}

.owner-block .field-label {
  text-align: left;
}

.range-block {
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px 10px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

.range-title {
  font-size: 13px;
  font-weight: 700;
  color: #4c1d95;
  margin-bottom: 6px;
  text-align: center;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

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

.range-row.range-row-ymd {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.range-row.range-row-ymd .field-label {
  width: auto;
  min-width: 0;
  text-align: left;
}

.field-label {
  width: 44px;
  font-size: 13px;
  color: #374151;
}

.field-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  font-size: 13px;
  background: #fff;
}

.field-input:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35);
}

.owner-block .field-row-ymd .birthday-group,
.range-row-ymd .birthday-group {
  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%;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  font-size: 13px;
  background: #fff;
  color: #1f2937;
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.birthday-group .birthday-select:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.35);
}

.submit-btn {
  margin-top: 14px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #4c1d95, #a855f7);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

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

.footer-note {
  padding: 10px 20px 18px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  background: linear-gradient(to top, #eef2ff, #f3f4f6);
}

.footer-note p {
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
}

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

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

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

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

.pay-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1e3a8a, #a855f7);
  color: #fff;
  font-weight: 800;
  position: relative;
}

.pay-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  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 rgba(148, 163, 184, 0.6);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pay-amount-label {
  font-size: 13px;
  color: #6b7280;
}

.pay-amount-value {
  font-size: 22px;
  font-weight: 900;
  color: #4c1d95;
}

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

.pay-method {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: #fff;
  padding: 12px;
  font-size: 15px;
  font-weight: 800;
  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: #a855f7;
}

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

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

.pay-modal-actions {
  display: flex;
  gap: 12px;
  padding: 16px;
  justify-content: center;
  border-top: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.6);
}

.pay-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.pay-btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: #fff;
  color: #374151;
}

.pay-btn-primary {
  border: none;
  background: linear-gradient(135deg, #4c1d95, #a855f7);
  color: #fff;
}

.pay-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

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

.payqr-inner {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 18px 18px;
  width: 300px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 2px solid #4c1d95;
}

.payqr-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  position: relative;
}

.payqr-title {
  font-size: 15px;
  font-weight: 900;
  color: #4c1d95;
  text-align: center;
}

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

.payqr-body {
  text-align: center;
}

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

.payqr-tip {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.7);
  margin-bottom: 0;
}

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

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

.report-inner {
  width: 100%;
  max-width: 720px;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1e3a8a, #a855f7);
  color: #fff;
}

.report-title {
  font-weight: 900;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  font-size: 18px;
}

.report-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
}

.report-body {
  padding: 16px 16px 10px;
  max-height: min(70vh, 680px);
  overflow: auto;
  background: linear-gradient(to bottom, rgba(238, 242, 255, 0.7), rgba(248, 250, 252, 0.9));
}

.report-body::-webkit-scrollbar {
  width: 10px;
}

.report-body::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.35);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.report-body::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.18);
}

/* 报告区块：对齐「动土」页 result-card 视觉，减少多层描边 */
.report-modal .report-block {
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 12px;
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(246, 248, 255, 1) 100%);
  margin-bottom: 12px;
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.08);
}

.report-modal .report-block-title {
  font-size: 15px;
  font-weight: 700;
  color: #4338ca;
  margin-bottom: 8px;
  text-align: center !important;
  letter-spacing: 0.08em;
}

/* 概览：每行独立框结构 */
.report-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  background: #f5f7ff;
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 10px;
  padding: 10px;
}

.summary-row {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 8px;
  align-items: stretch;
  padding: 8px;
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-radius: 8px;
  background: #fff;
}

.summary-label {
  font-size: 13px;
  font-weight: 700;
  color: #3730a3;
  background: #e9edff;
  border: 1px solid rgba(129, 140, 248, 0.25);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.summary-value {
  font-size: 13px;
  color: #334155;
  line-height: 1.7;
  word-break: break-word;
  background: #ffffff;
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  min-height: 100%;
}

/* 推荐日期：采用 gongsiqiming 同款 report-item 三栏结构 */
.report-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-item {
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.06);
  display: grid;
  grid-template-columns: 92px 170px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.report-rank-box,
.report-item-left,
.report-item-right {
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 10px;
  background: #fff;
}

.report-rank-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: #f2f4ff;
}

.report-item-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px 12px;
  background: #f2f4ff;
}

.name-rank {
  font-size: 15px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.01em;
}

.name-value {
  width: 100%;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  line-height: 1.3;
}

.report-item-right {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-item-sub {
  font-size: 13px;
  color: #334155;
  line-height: 1.65;
  text-align: left;
  width: 100%;
  margin: 0 auto;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  justify-content: center;
  white-space: normal;
}

.metric {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.26);
  color: #4338ca;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.analysis-line {
  margin-top: 6px;
  text-align: left;
  font-size: 13px;
  line-height: 1.62;
  color: #334155;
}

.analysis-line b {
  color: #0f172a;
}

.report-notes {
  list-style: none;
  padding-left: 0;
  margin: 0;
  color: #374151;
  font-size: 13px;
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 注意事项：每行独立框（与概览框风格统一） */
.report-notes li {
  position: relative;
  margin: 0;
  padding: 10px 12px 10px 14px;
  border: 1px solid rgba(129, 140, 248, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(248, 250, 255, 0.95), rgba(255, 255, 255, 0.98));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  border-left: 3px solid rgba(129, 140, 248, 0.55);
  word-break: break-word;
}

.report-notes li::before {
  display: none;
}

.report-footer {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-content: center;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.85);
}

.report-disclaimer {
  max-width: 680px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  line-height: 1.6;
}

.report-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

.report-footer .pay-btn-primary {
  min-width: 220px;
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: 0 14px 30px rgba(76, 29, 149, 0.22);
}

.report-footer .pay-btn-secondary {
  min-width: 220px;
  border-radius: 999px;
  padding: 11px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #334155;
  border: 2px solid rgba(148, 163, 184, 0.85);
  background: linear-gradient(180deg, #ffffff, #f3f6ff);
  box-shadow: 0 8px 20px rgba(30, 41, 59, 0.08);
}

.report-footer .pay-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(30, 41, 59, 0.12);
  border-color: #a855f7;
}

.report-preview-tip {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  font-size: 12px;
  color: #475569;
  text-align: center;
  line-height: 1.6;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(129, 140, 248, 0.35);
  background: linear-gradient(180deg, #f8faff, #f1f5ff);
}

/* 下载报告：文案严格居中 */
#downloadReportBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.report-footer .pay-btn-primary:hover {
  transform: translateY(-1px);
}

.report-footer .pay-btn-primary:active {
  transform: translateY(0);
}

@media (min-width: 900px) {
  .report-inner {
    max-width: 820px;
  }
}

@media (max-width: 520px) {
  .form-section {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .owner-block .field-row-ymd .birthday-group,
  .range-row-ymd .birthday-group {
    gap: 5px;
  }

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

  .pay-methods {
    grid-template-columns: 1fr;
  }
  .pay-modal-actions {
    flex-direction: column;
  }
  .pay-modal-actions .pay-btn {
    width: 100%;
  }

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

  .summary-label {
    text-align: left;
    white-space: normal;
  }

  .report-item {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }

  .report-rank-box {
    justify-content: flex-start;
  }

  .name-rank {
    font-size: 16px;
  }

  .name-value {
    font-size: 17px;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .report-item-sub {
    font-size: 13px;
    width: 100%;
  }

  .metric-row {
    flex-wrap: wrap;
    justify-content: center;
    white-space: normal;
  }

  .metric {
    font-size: 12px;
  }

  .report-notes {
    gap: 8px;
  }

  .report-notes li {
    padding: 9px 10px 9px 12px;
  }

  .report-brand {
    flex-direction: column;
    gap: 8px;
  }
}

