:root {
  --ink: #10233f;
  --ink-soft: #33465f;
  --muted: #6b7c93;
  --line: #e1e8f1;
  --bg: #eef3f8;
  --card: #ffffff;
  --jade: #0f8a70;
  --jade-dark: #0a6d58;
  --jade-soft: #e8f6f1;
  --gold: #f0b64a;
  --warm: #fff7e8;
  --danger: #b83b2f;
  --shadow: 0 18px 50px rgba(16, 35, 63, 0.12);
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 4%, rgba(15, 138, 112, 0.1), transparent 32%),
    radial-gradient(
      circle at 92% 0%,
      rgba(240, 182, 74, 0.12),
      transparent 30%
    ),
    var(--bg);
  color: var(--ink);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
[hidden] {
  display: none !important;
}
.page {
  width: 100%;
  max-width: 560px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(28px + env(safe-area-inset-top)) 24px 58px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 45%),
    linear-gradient(150deg, #0b1b31 0%, #123554 56%, #0b5d55 100%);
  color: #ffffff;
}
.hero-glow {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(2px);
}
.hero-glow-a {
  width: 210px;
  height: 210px;
  right: -80px;
  top: -90px;
  background: radial-gradient(circle, rgba(240, 182, 74, 0.4), transparent 68%);
}
.hero-glow-b {
  width: 260px;
  height: 260px;
  left: -120px;
  bottom: -170px;
  background: radial-gradient(
    circle,
    rgba(56, 210, 180, 0.34),
    transparent 68%
  );
}
.brand-line {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(240, 182, 74, 0.7);
  border-radius: 9px;
  color: var(--gold);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  background: rgba(255, 255, 255, 0.06);
}
.hero h1 {
  position: relative;
  margin: 22px 0 0;
  font-size: clamp(32px, 9.2vw, 44px);
  line-height: 1.18;
  letter-spacing: 0.02em;
  font-weight: 800;
}
.hero h1 span {
  color: #8ee6d2;
}
.hero-sub {
  position: relative;
  margin: 12px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.05em;
}
.hero-rule {
  position: relative;
  width: 44px;
  height: 3px;
  margin: 20px 0 14px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), rgba(240, 182, 74, 0.12));
}
.hero-note {
  position: relative;
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}
main {
  position: relative;
  z-index: 2;
  margin-top: -34px;
  padding: 0 16px;
}
.card {
  padding: 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  animation: rise 0.34s ease both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.section-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 20px;
}
.step {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--jade-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(145deg, #f3fbf8, #dff4ec);
  border: 1px solid #cfeee4;
}
.section-head h2,
.state-card h2,
.result-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: -6px 0 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--jade-dark);
  font-size: 12px;
  background: var(--jade-soft);
  border: 1px solid #d3eee5;
}
.field {
  display: block;
  margin-bottom: 16px;
}
.field > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}
.field em {
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--jade);
}
.field input,
.field select {
  width: 100%;
  height: 52px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #fbfdff;
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
  appearance: none;
}
.field select {
  background-image:
    linear-gradient(45deg, transparent 50%, #7b8da3 50%),
    linear-gradient(135deg, #7b8da3 50%, transparent 50%);
  background-position:
    calc(100% - 19px) 23px,
    calc(100% - 14px) 23px;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}
.field input::placeholder {
  color: #a7b4c5;
}
.field input:focus,
.field select:focus {
  border-color: #58bca6;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(15, 138, 112, 0.1);
}
.field small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
}
.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  color: var(--ink-soft);
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}
.field .choice input {
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  accent-color: var(--jade);
  appearance: auto;
}
.field .choice input[type="checkbox"] {
  border-radius: 5px;
}
.field .choice input:focus {
  border-color: transparent;
  box-shadow: none;
}
.choice:has(input:checked) {
  border-color: var(--jade);
  background: var(--jade-soft);
  color: var(--jade-dark);
}
.choice:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}
.fixed-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 15px;
  border: 1px solid var(--jade);
  border-radius: 14px;
  background: var(--jade-soft);
  color: var(--jade-dark);
  font-size: 16px;
  font-weight: 700;
}
.fixed-track small {
  font-size: 11px;
  font-weight: 600;
  color: var(--jade);
}
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--jade);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 0;
  border-radius: 15px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}
.btn:active {
  transform: scale(0.985);
}
.btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #11967a, #0b715b);
  box-shadow: 0 10px 24px rgba(15, 138, 112, 0.22);
}
.btn-ghost {
  color: var(--ink-soft);
  background: #ffffff;
  border: 1px solid var(--line);
}
.btn + .btn,
.result-actions .btn + .btn {
  margin-top: 10px;
}
.link-btn {
  display: block;
  width: 100%;
  margin: 14px 0 0;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--jade);
  font-size: 12.5px;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.fineprint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.form-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--danger);
  background: #fff1ef;
  font-size: 12.5px;
}
.state-card {
  text-align: center;
  padding-top: 34px;
  padding-bottom: 30px;
}
.state-card p {
  margin: 10px auto 18px;
  max-width: 380px;
  color: var(--muted);
  font-size: 13.5px;
}
.state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
  border-radius: 20px;
  color: var(--jade-dark);
  background: var(--jade-soft);
  border: 1px solid #cfece3;
  font-size: 23px;
  font-weight: 800;
}
.state-icon-warm {
  color: #9a6511;
  background: var(--warm);
  border-color: #f4dfb6;
}
.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 16px;
  border: 3px solid #dceee8;
  border-top-color: var(--jade);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.summary-box {
  margin: 0 0 18px;
  padding: 13px 15px;
  border-radius: 14px;
  color: var(--ink-soft);
  background: #f6f9fc;
  border: 1px solid var(--line);
  font-size: 13px;
}
.summary-box b {
  color: var(--ink);
}
.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.eyebrow {
  margin: 0 0 4px;
  color: var(--jade);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.result-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--jade-dark);
  background: var(--jade-soft);
  font-size: 11px;
  font-weight: 700;
}
.result-list {
  display: grid;
  gap: 14px;
}
.score-item {
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(15, 138, 112, 0.08),
      transparent 36%
    ),
    linear-gradient(180deg, #ffffff, #f8fcfb);
}
.score-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.score-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}
.score-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.score-total {
  flex: 0 0 auto;
  text-align: right;
}
.score-total strong {
  display: block;
  color: var(--jade-dark);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.score-total span {
  color: var(--muted);
  font-size: 11px;
}
.rank-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.rank-cell {
  padding: 10px 6px;
  border-radius: 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #e8eef6;
}
.rank-cell b {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}
.rank-cell span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}
.subject-title {
  margin: 16px 0 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.subject-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e8eef6;
  font-size: 12px;
}
.subject-cell span {
  color: var(--muted);
}
.subject-cell b {
  color: var(--ink);
}
.result-actions {
  margin-top: 18px;
}
.wechat-card {
  margin: 8px 0 4px;
  padding: 18px 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fcfa, #eef8f4);
  border: 1px solid #d7eee6;
}
.wechat-qr {
  display: block;
  width: min(230px, 70vw);
  height: auto;
  margin: 0 auto 10px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 35, 63, 0.1);
}
.wechat-card p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}
.wechat-card .wechat-hint {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}
.used-message {
  margin: 16px auto !important;
  padding: 15px 12px;
  border-radius: 14px;
  color: var(--ink) !important;
  background: var(--warm);
  border: 1px solid #f1ddb7;
  font-size: 16px !important;
  font-weight: 800;
}
.follow-card {
  margin-top: 22px;
  padding: 20px 16px 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(240, 182, 74, 0.3), transparent 42%),
    linear-gradient(160deg, #0d7d66 0%, #0a5f4e 100%);
  color: #ffffff;
  text-align: left;
}
.follow-eyebrow {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}
.follow-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.45;
  color: #ffffff;
}
.follow-copy {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.9);
}
.follow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.follow-item {
  padding: 10px 8px 9px;
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  text-align: center;
}
.follow-item img {
  display: block;
  width: 100%;
  max-width: 140px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 0 auto 7px;
  border-radius: 10px;
  background: #ffffff;
}
.follow-item strong {
  display: block;
  font-size: 13.5px;
}
.follow-item span {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}
.follow-item-hot {
  box-shadow: 0 0 0 3px rgba(240, 182, 74, 0.9);
}
.follow-item-hot strong {
  color: var(--jade-dark);
}
.follow-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  padding: 11px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 35, 63, 0.92);
  box-shadow: 0 10px 30px rgba(16, 35, 63, 0.24);
  font-size: 12.5px;
  text-align: center;
  transform: translateX(-50%);
}
.footer {
  padding: 24px 22px 4px;
  text-align: center;
  color: #8b99ab;
  font-size: 10.5px;
  line-height: 1.7;
}
.footer p {
  margin: 2px 0;
}
@media (min-width: 640px) {
  .page {
    margin: 24px auto;
    min-height: auto;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(16, 35, 63, 0.16);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
