* {
  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 12% -6%, rgba(192, 132, 252, 0.28), transparent 35%),
    radial-gradient(circle at 88% 2%, rgba(56, 189, 248, 0.22), transparent 34%),
    radial-gradient(circle at 50% 108%, rgba(251, 191, 36, 0.14), transparent 40%),
    linear-gradient(180deg, #f7f3ff 0%, #ecefff 52%, #e8f0fb 100%);
  color: #2c1810;
  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: 720px;
  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;
}

.app::before {
  content: '';
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 255, 255, 0.15), transparent 55%),
    radial-gradient(circle at 90% 0%, rgba(212, 173, 86, 0.20), transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(19, 37, 61, 0.22), transparent 60%);
  opacity: 0.8;
  z-index: -1;
}

.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);
  position: relative;
  overflow: hidden;
}

.header::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.52), transparent 60%);
  opacity: 0.0;
  transform: translateX(-40%);
  animation: headerGlow 12s ease-in-out infinite;
}

@keyframes headerGlow {
  0% {
    opacity: 0;
    transform: translateX(-40%);
  }
  35% {
    opacity: 0.6;
    transform: translateX(40%);
  }
  60% {
    opacity: 0;
    transform: translateX(80%);
  }
  100% {
    opacity: 0;
    transform: translateX(80%);
  }
}

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

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

.vision-text {
  margin-top: 4px;
  font-size: 11px;
  opacity: 0.9;
}

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

.form-box {
  background: linear-gradient(180deg, #fcfbff 0%, #f5f4ff 100%);
  border-radius: 12px;
  padding: 14px 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 10px 26px rgba(76, 29, 149, 0.08);
}

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

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

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

.owner-block .field-label {
  width: auto;
  flex: none;
  text-align: left;
}

.owner-block .field-input {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

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

.owner-summary {
  margin-bottom: 8px;
  padding: 6px 10px;
  background: #f8faff;
  border-radius: 8px;
  border: 1px solid rgba(129, 140, 248, 0.25);
  text-align: center;
}

.owner-summary:empty {
  display: none;
}

.range-block {
  margin-top: 0;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px 12px 10px;
  border: 1px dashed rgba(129, 140, 248, 0.25);
}

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

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

/* 与 .owner-block .field-row 一致：固定标签列宽，避免与上方生日行错位 */
.range-row.range-row-ymd {
  display: grid;
  grid-template-columns: 52px 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: 40px;
  font-size: 13px;
  color: #374151;
}

.field-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.95);
  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: 6px;
  border: 1px solid rgba(148, 163, 184, 0.95);
  font-size: 13px;
  background: #fff;
  color: #2c1810;
  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 0%, #7c3aed 50%, #0ea5e9 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  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: 6px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

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

.report-page-title{
  font-size: 18px;
  font-weight: 900;
  color: #3f1f91;
  text-align: center;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  margin-bottom: 4px;
  text-shadow: 0 1px 0 rgba(255,255,255,.75);
}

.download-row{
  display:flex;
  justify-content:center;
  margin-top: -4px;
}

.download-row-bottom{
  margin-top: 6px;
  margin-bottom: 2px;
}

#downloadReportBtn{
  display:none;
}

.result-download-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 8px;
  margin-bottom: 4px;
}

.download-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-width: 240px;
  width: min(100%, 320px);
  border:none;
  cursor:pointer;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  color:#fff;
  background: linear-gradient(135deg,#3f1f91 0%, #6d39cf 45%, #0ea5e9 100%);
  box-shadow: 0 12px 26px rgba(76,29,149,.22);
  letter-spacing: 0.06em;
}

.download-btn:hover{
  filter: saturate(1.05) brightness(1.02);
}

.download-btn:active{
  transform: translateY(1px);
}

.unlock-full-btn {
  min-width: 240px;
  width: min(100%, 320px);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #374151;
  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);
}

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

.report-preview-tip {
  width: min(100%, 680px);
  margin: 2px auto 0;
  font-size: 12px;
  color: #705944;
  line-height: 1.58;
  text-align: center;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(170, 145, 113, 0.32);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 252, 0.92));
}

.result-card {
  background: #f6f4ff;
  border-radius: 12px;
  padding: 12px 14px 14px;
  border: 1px solid rgba(145, 117, 222, 0.35);
  box-shadow: 0 12px 28px rgba(76, 29, 149, 0.10);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(246,244,255,1) 100%);
}

.result-card:nth-of-type(2) {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 12px 28px rgba(14, 116, 144, 0.10);
  background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(241,249,255,1) 100%);
}

.result-title {
  font-size: 15px;
  font-weight: 700;
  color: #3f1f91;
  margin-bottom: 6px;
  text-align: center;
  letter-spacing: 0.04em;
}

.result-card:nth-of-type(2) .result-title {
  color: #0f4c81;
}

.result-hint {
  font-size: 13px;
  color: #586174;
  text-align: center;
  line-height: 1.7;
  background: linear-gradient(180deg, rgba(235,239,255,.90), rgba(255,255,255,.95));
  border: 1px solid rgba(136,147,245,.24);
  border-radius: 10px;
  padding: 7px 11px;
}

.date-list {
  list-style: none;
  margin-top: 6px;
  padding-left: 0;
}

.date-item {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(145, 117, 222, 0.36);
  padding: 10px;
  font-size: 13px;
  color: #1f2937;
  margin-bottom: 6px;
  display: grid;
  grid-template-columns: 47% 53%;
  gap: 8px;
  align-items: center;
}

.date-main {
  font-weight: 700;
  font-size: 12.5px;
  color: #352078;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-left,
.date-right {
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(129, 140, 248, 0.22);
  padding: 8px 10px;
}

.date-left{
  background: linear-gradient(135deg, rgba(124,58,237,.13), rgba(167,139,250,.08));
  border-color: rgba(139, 112, 217, 0.42);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.date-right{
  background: linear-gradient(135deg, rgba(14,165,233,.10), rgba(99,102,241,.06));
  border-color: rgba(96, 165, 250, 0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.date-sub {
  font-size: 12px;
  color: #556074;
  line-height: 1.6;
  text-align: center;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  min-width: 0;
}

.date-tier{
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.date-tier-best{
  background: linear-gradient(135deg, #7c3aed 0%, #0ea5e9 100%);
  color: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.35);
}

.date-tier-good{
  background: linear-gradient(135deg, #22c55e 0%, #84cc16 100%);
  color: #064e3b;
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.date-tier-normal{
  background: rgba(99,102,241,.08);
  color: #3730a3;
  border: 1px solid rgba(99,102,241,.18);
}

.date-tags{
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
}

.date-tag{
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(99,102,241,.08);
  border: 1px solid rgba(99,102,241,.18);
  color: #3730a3;
}

.unlock-benefit-card{
  width: min(100%, 680px);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), rgba(14, 165, 233, 0.06));
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.10);
  text-align: center;
}

.unlock-benefit-title{
  font-size: 12.5px;
  font-weight: 900;
  color: #4c1d95;
  margin-bottom: 4px;
}

/* 整块在卡片内居中，但三行内部左对齐，保证（1）（2）（3）同一竖线 */
.unlock-benefit-body{
  display: inline-block;
  max-width: 100%;
  text-align: left;
  vertical-align: top;
}

.unlock-benefit-line{
  font-size: 12px;
  color: #5b3a2b;
  line-height: 1.65;
  margin: 0;
  text-align: left;
}

.result-card.is-unlock-highlight{
  border-color: rgba(124, 58, 237, 0.65) !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.22), 0 18px 42px rgba(124, 58, 237, 0.18) !important;
  animation: unlockGlow 2.1s ease-in-out;
}

@keyframes unlockGlow{
  0%{ transform: translateY(0); }
  35%{ transform: translateY(-2px); }
  100%{ transform: translateY(0); }
}

.pay-modal {
  display: none;
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  z-index: 10050;
  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: 400px;
  box-shadow: 0 14px 48px rgba(0,0,0,0.22);
}
.pay-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, #1e3a8a, #a855f7);
  color: #fff;
  font-weight: 700;
}
.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 rgba(148,163,184,.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,.9);
  background: #fff;
  padding: 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: #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: flex-end;
  border-top: 1px solid rgba(148,163,184,.45);
  background: rgba(255,255,255,0.5);
}
.pay-btn { padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; }
.pay-btn-secondary { border: 1px solid #c4a882; background: #fff; color: #5b3a2b; }
.pay-btn-primary { border: none; background: linear-gradient(135deg, #4c1d95, #a855f7); color: #fff; }
.pay-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

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

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

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

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

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

  .header {
    padding: 16px 12px 12px;
  }

  .title {
    font-size: 20px;
  }

  .form-section,
  .result-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;
  }

  .date-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .date-left,
  .date-right {
    padding: 7px 10px;
  }
  .date-sub {
    text-align: center;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .date-main {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .pay-modal { padding: 10px; }
  .pay-methods { grid-template-columns: 1fr; }
  .pay-modal-actions { flex-direction: column; }
  .pay-modal-actions .pay-btn { width: 100%; }
}

/* 微信支付二维码弹窗 */
.payqr-box {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.payqr-box.is-open {
  display: flex;
}
.payqr-inner {
  background: #fff9f0;
  border-radius: 10px;
  padding: 16px 18px 18px;
  width: 280px;
  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: 700;
  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: #5b3a2b;
}
.payqr-body {
  text-align: center;
}
.payqr-qrcode {
  width: 220px;
  height: 220px;
  margin: 0 auto 10px;
  background: #fff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.payqr-tip {
  font-size: 12px;
  color: rgba(0,0,0,0.7);
  margin-bottom: 0;
}
