:root {
  --ink: #173b33;
  --muted: #687a75;
  --green: #1f6553;
  --green2: #e7f2ed;
  --gold: #b78943;
  --cream: #f6f2e9;
  --white: #fff;
  --danger: #a23d3d;
  --shadow: 0 14px 38px rgba(22, 59, 51, 0.1);
}
* {
  box-sizing: border-box;
}
html {
  background: #eef2ef;
}
body {
  margin: 0;
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  background: linear-gradient(180deg, #e7eee9, #f7f5ef 42%, #eef2ef);
  min-height: 100vh;
}
.hero {
  position: relative;
  padding: calc(22px + env(safe-area-inset-top)) 22px 30px;
  color: #fff;
  background:
    radial-gradient(
      circle at 88% 10%,
      rgba(218, 185, 123, 0.34),
      transparent 28%
    ),
    linear-gradient(145deg, #163e34, #285f50);
  border-radius: 0 0 28px 28px;
}
.back {
  position: absolute;
  left: 18px;
  top: calc(16px + env(safe-area-inset-top));
  color: #fff;
  text-decoration: none;
  font-size: 34px;
}
.brand {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.18em;
  opacity: 0.88;
}
.tag {
  display: inline-block;
  margin-top: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  font-size: 12px;
}
.hero h1 {
  font-size: 30px;
  margin: 13px 0 8px;
}
.hero p {
  margin: 0;
  max-width: 620px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}
main {
  width: min(720px, 100%);
  margin: auto;
  padding: 18px 14px calc(36px + env(safe-area-inset-bottom));
}
.view {
  display: none;
}
.view.active {
  display: block;
}
.notice,
.panel,
.question-card,
.paywall,
.report,
.history-item {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(28, 78, 64, 0.08);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.notice {
  padding: 16px 18px;
  line-height: 1.65;
  font-size: 14px;
}
.cards {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}
.test-card {
  position: relative;
  padding: 20px;
  border: 0;
  border-radius: 20px;
  background: #fff;
  text-align: left;
  color: var(--ink);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.test-card::after {
  content: "›";
  position: absolute;
  right: 19px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 29px;
  color: var(--gold);
}
.test-card .code {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: var(--green2);
  color: var(--green);
  font-weight: 800;
}
.test-card h2 {
  margin: 14px 42px 7px 0;
  font-size: 20px;
}
.test-card p {
  margin: 0 38px 0 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}
.test-card small {
  display: block;
  margin-top: 12px;
  color: var(--gold);
}
button,
input,
select {
  font: inherit;
}
.primary,
.ghost,
.redeem button {
  min-height: 48px;
  border-radius: 14px;
  border: 0;
  padding: 0 20px;
  font-weight: 700;
}
.primary {
  background: linear-gradient(135deg, #1f6553, #2f8069);
  color: #fff;
}
.ghost {
  background: #fff;
  color: var(--green);
  border: 1px solid #cbd9d3;
}
.wide {
  width: 100%;
}
.privacy,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.evidence { margin-top:14px;border:1px solid rgba(28,78,64,.1);border-radius:14px;background:rgba(255,255,255,.72);padding:12px 14px;color:var(--muted);font-size:12px;line-height:1.7; }
.evidence summary { cursor:pointer;color:var(--green);font-weight:700; }
.evidence a { color:var(--green);font-weight:700; }
.panel {
  padding: 20px;
}
.text-back {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 5px 0;
  font-weight: 600;
}
.panel h2 {
  margin: 18px 0 4px;
}
.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}
.form-grid label {
  display: grid;
  gap: 7px;
  font-weight: 650;
  font-size: 14px;
}
.form-grid input,
.form-grid select,
.redeem input {
  width: 100%;
  height: 50px;
  border: 1px solid #cedbd6;
  border-radius: 13px;
  background: #fbfcfb;
  padding: 0 13px;
  color: var(--ink);
}
.form-grid .consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 13px 14px;
  border: 1px solid #e0e9e4;
  border-radius: 13px;
  background: #fbfcfb;
  line-height: 1.6;
  font-weight: 400;
  color: #435a52;
}
.data-notice {
  padding: 15px 16px 14px 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid #d8e5df;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4f8f6 0%, #f8faf8 100%);
  color: #51665f;
  font-size: 13px;
  line-height: 1.75;
}
.data-notice::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #4e8874, #c9ad70);
}
.data-notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 13px;
  letter-spacing: .02em;
}
.data-notice p { margin: 0; }
.consent input {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--green);
}
.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.progress {
  height: 7px;
  margin: 12px 0 18px;
  background: #dbe5e1;
  border-radius: 20px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), #e0bd76);
  transition: width 0.25s;
}
.question-card {
  padding: 22px;
  min-height: 345px;
}
.eyebrow {
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
}
.question-card h2 {
  font-size: 21px;
  line-height: 1.55;
  margin: 18px 0 8px;
}
.options {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 11px 14px;
  text-align: left;
  border: 1px solid #d9e2df;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}
.option.selected {
  border-color: var(--green);
  background: var(--green2);
}
.option b {
  display: inline-flex;
  flex: 0 0 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #edf2f0;
  color: var(--green);
}
.quiz-nav {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 11px;
  margin-top: 14px;
}
.quiz-nav button:disabled {
  opacity: 0.45;
}
.summary-card {
  padding: 24px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, #173f35, #2b705e);
  box-shadow: var(--shadow);
}
.summary-card h2 {
  margin: 5px 0 10px;
}
.score-pill {
  display: inline-block;
  padding: 7px 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
}
.paywall {
  margin-top: 15px;
  padding: 24px;
  text-align: center;
}
.lock {
  font-size: 32px;
}
.price small {
  display: block;
  color: var(--muted);
}
.price strong {
  font-size: 36px;
  color: var(--gold);
}
.pay-note {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}
.order-status {
  margin-top: 13px;
  border: 1px solid #d8c18f;
  border-radius: 14px;
  background: #fff9eb;
  padding: 13px;
  color: #6d572e;
  font-size: 13px;
  line-height: 1.7;
}
.order-status strong { color: var(--green); }
.redeem {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}
.redeem button {
  background: var(--gold);
  color: #fff;
}
.form-msg {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--danger);
}
.report {
  margin-top: 15px;
  padding: 22px;
}
.report section {
  padding: 17px 0;
  border-bottom: 1px solid #e9eeeb;
}
.report h2,
.report h3 {
  margin: 4px 0 10px;
}
.report p,
.report li {
  line-height: 1.8;
  color: #445953;
}
.theme-list {
  display: grid;
  gap: 9px;
  margin: 14px 0;
}
.theme-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid #e1e9e5;
  border-radius: 12px;
  background: #f8faf9;
  color: #344d45;
  font-size: 13px;
}
.theme-row span { min-width: 0; }
.theme-row b {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 12px;
  text-align: right;
}
.report ol,
.report ul { padding-left: 22px; }
.report .contact {
  padding: 20px;
  text-align: center;
  border: 0;
  background: var(--cream);
  border-radius: 16px;
}
.contact img {
  display: block;
  width: min(260px, 82%);
  margin: 14px auto;
  border-radius: 12px;
}
.phone {
  display: block;
  color: var(--green);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}
.warning {
  padding: 14px !important;
  border: 1px solid #efd3d3 !important;
  background: #fff5f5;
  border-radius: 14px;
  color: #7a3131;
}
.hidden {
  display: none !important;
}
dialog {
  width: min(410px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  padding: 24px;
  text-align: center;
  color: var(--ink);
  box-shadow: 0 25px 90px rgba(0, 0, 0, 0.3);
}
dialog::backdrop {
  background: rgba(9, 28, 23, 0.65);
}
dialog img {
  width: min(300px, 90%);
  display: block;
  margin: 14px auto;
  border-radius: 12px;
}
.close {
  position: absolute;
  right: 14px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 30px;
  color: #71817d;
}
.history-item {
  padding: 16px;
  margin: 12px 0;
}
.history-item h3 {
  margin: 0 0 6px;
}
.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.history-delete {
  flex: 0 0 auto;
  padding: 6px 11px;
  border: 1px solid #d9bdb8;
  border-radius: 999px;
  background: #fff8f6;
  color: #9a4338;
  font-size: 12px;
  cursor: pointer;
}
.history-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
@media (min-width: 650px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
  .test-card {
    min-height: 245px;
  }
  .hero {
    text-align: center;
  }
  .hero p {
    margin: auto;
  }
  .tag {
    margin-top: 24px;
  }
}
