/* ==========================================================================
   家长AI学堂 · 性格评估问卷
   Design System — Imperial Red × Gold Scholar
   ========================================================================== */

:root {
  --red-900: #5C0F13;
  --red-800: #7A1419;
  --red-700: #8B0A0F;
  --red-600: #B8141A;
  --red-500: #C8312F;
  --red-100: #F5E6E3;

  --gold-900: #8B6A2F;
  --gold-700: #B8923D;
  --gold-600: #D4A94E;
  --gold-500: #E8C77D;
  --gold-300: #F3DFA8;
  --gold-100: #FAF2DE;

  --ink-900: #1A1412;
  --ink-700: #3B2F2B;
  --ink-500: #6A5A52;
  --ink-400: #8F7E74;
  --ink-300: #B8A89D;

  --cream-100: #FDF6E9;
  --cream-200: #F8ECD3;
  --cream-300: #EFDDBD;
  --paper: #FAF3E4;

  --radius: 14px;
  --radius-l: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  font-family: "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  color: var(--ink-900);
  background: var(--cream-100);
  overscroll-behavior: none;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.serif { font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif; }

/* ---- App shell: full viewport on mobile, centered column on desktop preview ---- */
.phone {
  width: 100%;
  height: 100vh;
  background: var(--cream-100);
  position: relative;
  overflow: hidden;
}

.app {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Desktop preview: keep a comfortable reading column, no fake-phone chrome */
@media (min-width: 640px) {
  body {
    align-items: flex-start;
    padding: 24px 0;
    background: #f1e8d2;
  }
  .phone {
    width: 430px;
    height: calc(100vh - 48px);
    max-height: 920px;
    border: 1px solid var(--cream-300);
    box-shadow: 0 20px 60px rgba(92, 15, 19, 0.12);
    border-radius: 12px;
  }
}

/* ---- Page scaffold ---- */
.page {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: var(--cream-100);
  animation: pageIn 0.45s cubic-bezier(.2,.7,.2,1);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Top bar ---- */
.topbar {
  min-height: 56px;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 20px 12px;
  display: flex; align-items: center;
  background: var(--cream-100);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}
.topbar::after {
  content: ""; position: absolute; bottom: 0; left: 20px; right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500) 20%, var(--gold-500) 80%, transparent);
  opacity: 0.5;
}
.topbar-back {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--ink-300);
  background: transparent; color: var(--ink-700);
  font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 2px;
}
.topbar-back:active { background: var(--cream-200); }
.topbar-title {
  flex: 1; text-align: center;
  font-family: "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 17px;
  color: var(--ink-900);
  letter-spacing: 2px;
}
.topbar-step {
  font-size: 12px; color: var(--gold-900);
  font-weight: 600; letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

/* ---- Bottom bar ---- */
.bottom-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 20px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: linear-gradient(180deg, rgba(253, 246, 233, 0) 0%, var(--cream-100) 40%);
  z-index: 20;
}

.btn-primary {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red-600) 0%, var(--red-800) 100%);
  color: var(--gold-300);
  font-family: "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 0 0 1px var(--gold-600),
    0 10px 24px rgba(139, 10, 15, 0.35);
  position: relative;
  transition: transform 0.1s;
}
.btn-primary:active { transform: scale(0.985); }
.btn-primary.disabled {
  background: #c9beb3;
  box-shadow: none;
  color: #fff;
  cursor: not-allowed;
}
.btn-primary.disabled:active { transform: none; }
.btn-arrow {
  display: inline-block; font-family: serif;
  font-size: 18px; letter-spacing: 0;
}

/* ============================================================
   WELCOME
   ============================================================ */

.page-welcome { overflow-y: auto; }

.welcome-hero {
  position: relative;
  width: 100%;
  height: 420px;
  flex-shrink: 0;
}
.welcome-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.welcome-hero-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, transparent 70%, var(--cream-100) 100%);
  pointer-events: none;
}

.welcome-body {
  padding: 0 24px 40px;
  margin-top: -40px;
  position: relative;
  z-index: 1;
}

.seal-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0 18px;
}
.seal {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  color: var(--gold-300);
  font-family: "Noto Serif SC", serif;
  font-weight: 700; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    inset 0 0 0 1px var(--gold-600),
    0 4px 10px rgba(139, 10, 15, 0.3);
  transform: rotate(-4deg);
}
.seal-meta {}
.seal-cn {
  font-family: "Noto Serif SC", serif;
  font-weight: 700; font-size: 15px;
  color: var(--ink-900); letter-spacing: 2px;
}
.seal-en {
  font-size: 9px; color: var(--gold-900);
  letter-spacing: 2.5px; margin-top: 2px;
}

.welcome-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.45;
  color: var(--ink-900);
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.welcome-title .accent {
  color: var(--red-700);
  position: relative;
  display: inline-block;
}
.welcome-title .accent::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 6px;
  background: var(--gold-500);
  opacity: 0.4;
  z-index: -1;
}

.welcome-lede {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-700);
  margin-bottom: 22px;
}
.welcome-lede b { color: var(--red-700); font-weight: 600; }

.stat-row {
  display: flex; align-items: stretch;
  background: linear-gradient(135deg, #fff7e4 0%, var(--cream-200) 100%);
  border: 1px solid var(--gold-500);
  border-radius: 14px;
  padding: 16px 8px;
  margin-bottom: 22px;
  position: relative;
}
.stat-row::before, .stat-row::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border: 1.5px solid var(--gold-700);
}
.stat-row::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.stat-row::after  { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.stat {
  flex: 1; text-align: center;
}
.stat-n {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--red-700);
  line-height: 1;
}
.stat-n .unit {
  font-size: 12px; margin-left: 1px; color: var(--gold-900);
}
.stat-l {
  font-size: 10.5px; color: var(--ink-500);
  margin-top: 6px; letter-spacing: 0.5px;
}
.stat-div {
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-500), transparent);
  margin: 4px 0;
}

.feature-list { margin-bottom: 26px; }
.feature {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px dashed rgba(139, 106, 47, 0.3);
}
.feature:last-child { border-bottom: none; }
.feature-i {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--gold-700);
  background: var(--gold-100);
  border: 1px solid var(--gold-500);
  min-width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.5px;
}
.feature-t {
  font-family: "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-900);
  margin-bottom: 3px;
}
.feature-s {
  font-size: 11.5px;
  color: var(--ink-500);
  letter-spacing: 0.3px;
}

.welcome-note {
  margin-top: 12px;
  text-align: center;
  font-size: 11px; color: var(--ink-400);
  letter-spacing: 1px;
}

/* ============================================================
   PROFILE
   ============================================================ */

.profile-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 24px 0;
}

.profile-hello {
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(135deg, #fff7e4, var(--cream-200));
  border-left: 3px solid var(--red-700);
  padding: 14px 16px;
  margin: 16px 0 24px;
  border-radius: 2px;
}
.profile-hello-ornament {
  color: var(--gold-700); font-size: 18px;
}
.profile-hello-t {
  font-family: "Noto Serif SC", serif;
  font-weight: 600; font-size: 15px;
  color: var(--ink-900);
}
.profile-hello-s {
  font-size: 11.5px; color: var(--ink-500); margin-top: 2px;
}

.section { margin-bottom: 22px; }
.section-l {
  display: flex; align-items: center; gap: 8px;
  font-family: "Noto Serif SC", serif;
  font-weight: 600; font-size: 13px;
  color: var(--red-700);
  letter-spacing: 3px;
  margin-bottom: 14px;
}
.section-mark { color: var(--gold-600); }

.field { margin-bottom: 16px; }
.field-l {
  font-size: 12.5px;
  color: var(--ink-700);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  font-weight: 500;
}
.field-l i { color: var(--red-600); font-style: normal; font-weight: 700; }

.field-i {
  width: 100%; height: 46px;
  padding: 0 14px;
  border: 1px solid var(--cream-300);
  border-bottom: 1.5px solid var(--ink-300);
  background: transparent;
  border-radius: 8px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink-900);
  outline: none;
  transition: border-color 0.2s;
}
.field-i:focus {
  border-bottom-color: var(--red-700);
  background: #fffaf0;
}
.field-i.err { border-bottom-color: var(--red-500); }
.field-i::placeholder { color: var(--ink-300); }
.field-err {
  color: var(--red-600); font-size: 11px;
  margin-top: 4px;
}

.seg {
  display: flex; gap: 10px;
}
.seg-b {
  flex: 1; height: 44px;
  border: 1px solid var(--cream-300);
  background: #fff;
  border-radius: 8px;
  font-family: inherit; font-size: 14px;
  color: var(--ink-700);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s;
}
.seg-b.on {
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  color: var(--gold-300);
  border-color: var(--red-800);
  box-shadow: inset 0 0 0 1px var(--gold-500);
  font-family: "Noto Serif SC", serif;
}

.chip-wrap {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  padding: 9px 14px;
  border: 1px solid var(--cream-300);
  background: #fff;
  border-radius: 20px;
  font-size: 12.5px;
  color: var(--ink-700);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.chip.on {
  background: var(--red-700);
  color: var(--gold-300);
  border-color: var(--red-800);
  box-shadow: inset 0 0 0 1px var(--gold-500);
}

.privacy {
  display: flex; gap: 8px;
  padding: 12px 14px;
  background: var(--cream-200);
  border-radius: 10px;
  font-size: 11px;
  color: var(--ink-500);
  line-height: 1.6;
  margin-top: 16px;
}
.privacy-dot { color: var(--gold-700); }

/* ============================================================
   INTRO
   ============================================================ */

.intro-scroll {
  flex: 1; overflow-y: auto;
  padding: 24px 24px 0;
}

.intro-head { margin-bottom: 26px; }
.intro-kicker {
  font-size: 10px;
  color: var(--gold-900);
  letter-spacing: 3.5px;
  font-weight: 600;
  margin-bottom: 10px;
}
.intro-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink-900);
  line-height: 1.55;
  margin-bottom: 14px;
  letter-spacing: 1px;
}
.intro-title .gold { color: var(--gold-700); }
.intro-title .accent { color: var(--red-700); }
.intro-lede {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.7;
}

.dim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 26px;
}
.dim-card {
  background: #fff;
  border: 1px solid var(--cream-300);
  border-top: 3px solid var(--c);
  padding: 14px 12px;
  border-radius: 4px;
  position: relative;
  min-height: 110px;
}
.dim-card::before {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 20px; height: 20px;
  background: var(--c);
  opacity: 0.08;
  clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.dim-num {
  font-family: "Noto Serif SC", serif;
  font-size: 11px;
  color: var(--gold-900);
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 4px;
}
.dim-icon {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 32px;
  color: var(--c);
  line-height: 1;
  margin-bottom: 6px;
  opacity: 0.9;
}
.dim-name {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-900);
  margin-bottom: 4px;
}
.dim-desc {
  font-size: 10.5px;
  color: var(--ink-500);
  line-height: 1.55;
  letter-spacing: 0.3px;
}

.tips-card {
  background: var(--cream-200);
  border: 1px solid var(--gold-500);
  border-radius: 10px;
  padding: 16px 18px;
  position: relative;
}
.tips-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 600; font-size: 14px;
  color: var(--red-700);
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}
.tips-orn { color: var(--gold-600); margin-right: 4px; }
.tips-list {
  list-style: none;
  font-size: 12px;
  color: var(--ink-700);
  line-height: 1.9;
}
.tips-list li {
  padding-left: 16px; position: relative;
}
.tips-list li::before {
  content: "·";
  position: absolute; left: 4px; top: -2px;
  color: var(--red-600); font-size: 22px;
  font-weight: 700;
}
.tips-list b { color: var(--red-700); font-weight: 600; }

/* ============================================================
   QUESTIONS
   ============================================================ */

.page-q { padding-top: calc(env(safe-area-inset-top, 0px) + 12px); }

.q-top {
  padding: 0 20px 8px;
  display: flex; align-items: center; gap: 12px;
}
.q-progress-wrap { flex: 1; }
.q-progress-track {
  position: relative;
  height: 4px;
  background: var(--cream-300);
  border-radius: 2px;
  overflow: hidden;
}
.q-progress-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--gold-600), var(--red-700));
  border-radius: 2px;
  transition: width 0.35s cubic-bezier(.2,.7,.2,1);
}
.q-progress-tick {
  position: absolute; top: -2px; bottom: -2px;
  width: 2px;
  background: var(--cream-100);
  transform: translateX(-1px);
}
.q-progress-label {
  display: flex; justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-500);
  letter-spacing: 0.5px;
}
.q-progress-label .q-count {
  font-weight: 600;
  color: var(--red-700);
  font-variant-numeric: tabular-nums;
}

.q-body {
  flex: 1;
  padding: 24px 24px 40px;
  overflow-y: auto;
  animation: qin 0.35s cubic-bezier(.2,.7,.2,1);
}
.q-body.leaving {
  animation: qout 0.2s ease-in forwards;
}
@keyframes qin {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes qout {
  to { opacity: 0; transform: translateX(-16px); }
}

.q-dim-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--c) 8%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--cream-300));
  padding: 6px 12px 6px 6px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.q-dim-chip {
  width: 24px; height: 24px;
  background: var(--c); color: var(--gold-300);
  font-family: "Noto Serif SC", serif;
  font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--gold-500);
}
.q-dim-name {
  font-family: "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--c);
  letter-spacing: 1px;
}
.q-dim-sub {
  font-size: 11px;
  color: var(--ink-400);
}

.q-ornament {
  text-align: center;
  font-size: 10.5px;
  color: var(--gold-900);
  letter-spacing: 4px;
  margin-bottom: 14px;
}

.q-text {
  font-family: "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 21px;
  color: var(--ink-900);
  line-height: 1.55;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
  text-wrap: pretty;
}

.q-options {
  display: flex; flex-direction: column; gap: 10px;
}
.q-opt {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px 14px 12px;
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.18s;
  position: relative;
}
.q-opt:active { transform: scale(0.99); }
.q-opt.on {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 5%, #fffaf0);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--c) 15%, transparent);
}
.q-opt-dot {
  width: 38px; height: 38px;
  border: 1.5px solid var(--cream-300);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-400);
  flex-shrink: 0;
  transition: all 0.18s;
}
.q-opt.on .q-opt-dot {
  background: var(--c);
  color: var(--gold-300);
  border-color: var(--c);
  box-shadow: inset 0 0 0 1px var(--gold-500);
}
.q-opt-text { flex: 1; min-width: 0; }
.q-opt-t {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink-900);
  margin-bottom: 2px;
  font-family: "Noto Serif SC", serif;
}
.q-opt-s {
  font-size: 11.5px;
  color: var(--ink-500);
}
.q-opt-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  opacity: 0; transform: scale(0.7);
  transition: all 0.2s;
}
.q-opt.on .q-opt-check { opacity: 1; transform: scale(1); }

.q-hint {
  text-align: center;
  font-size: 11px;
  color: var(--ink-400);
  margin-top: 22px;
  letter-spacing: 0.3px;
}

/* ============================================================
   RESULT
   ============================================================ */

.page-result { background: var(--cream-100); }

.result-scroll {
  flex: 1;
  overflow-y: auto;
}

/* HERO — classical document header */
.r-hero {
  position: relative;
  padding: 70px 28px 34px;
  background:
    linear-gradient(180deg, var(--red-800) 0%, var(--red-900) 100%);
  color: var(--gold-300);
  overflow: hidden;
}
.r-hero-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(232, 199, 125, 0.15), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(232, 199, 125, 0.08), transparent 50%);
  pointer-events: none;
}
.r-hero::before {
  content: "";
  position: absolute; left: 20px; right: 20px; top: 58px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}
.r-hero::after {
  content: "";
  position: absolute; left: 20px; right: 20px; bottom: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}
.r-hero-emboss {
  position: absolute;
  top: 80px; right: 14px;
  font-family: "Noto Serif SC", serif;
  font-size: 180px;
  font-weight: 900;
  color: var(--gold-500);
  opacity: 0.08;
  line-height: 1;
  pointer-events: none;
}
.r-hero-stamp {
  position: relative;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 6px;
  color: var(--gold-300);
  margin-bottom: 8px;
}
.r-hero-meta {
  position: relative;
  font-size: 10.5px;
  color: var(--gold-500);
  letter-spacing: 1.5px;
  opacity: 0.8;
  margin-bottom: 22px;
}
.r-hero-meta .dot { margin: 0 6px; }
.r-hero-name {
  position: relative;
  padding: 14px 0;
  border-top: 1px solid rgba(232, 199, 125, 0.25);
  border-bottom: 1px solid rgba(232, 199, 125, 0.25);
}
.r-hero-for {
  font-size: 9.5px;
  letter-spacing: 3.5px;
  color: var(--gold-500);
  opacity: 0.75;
  margin-bottom: 6px;
}
.r-hero-child {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--cream-100);
  letter-spacing: 2px;
}
.r-hero-tag {
  margin-left: 10px;
  font-size: 12px;
  color: var(--gold-500);
  font-weight: 400;
  letter-spacing: 1px;
}
.r-hero-date {
  position: relative;
  margin-top: 12px;
  font-size: 10.5px;
  color: var(--gold-500);
  opacity: 0.75;
  letter-spacing: 1px;
}

/* Section headers */
.r-section-k {
  font-size: 10px;
  letter-spacing: 3.5px;
  color: var(--gold-900);
  font-weight: 600;
  margin-bottom: 6px;
}
.r-section-h {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink-900);
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  position: relative;
  padding-left: 14px;
}
.r-section-h::before {
  content: "";
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: linear-gradient(180deg, var(--red-700), var(--gold-600));
}

/* Archetype */
.r-archetype {
  padding: 30px 24px 6px;
}
.arch-card {
  background: #fff;
  border: 1px solid var(--gold-500);
  padding: 32px 20px 24px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.arch-card.in { opacity: 1; transform: translateY(0); }
.arch-card::before, .arch-card::after {
  content: ""; position: absolute; width: 20px; height: 20px;
  border: 2px solid var(--red-700);
}
.arch-card::before {
  top: 6px; left: 6px; border-right: none; border-bottom: none;
}
.arch-card::after {
  bottom: 6px; right: 6px; border-left: none; border-top: none;
}

.arch-seal {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 1px var(--gold-500),
    inset 0 0 0 4px var(--red-700),
    inset 0 0 0 5px var(--gold-500);
  transform: rotate(-3deg);
}
.arch-seal-inner {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--gold-300);
  letter-spacing: -2px;
  line-height: 1;
}
.arch-name {
  text-align: center;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 30px;
  color: var(--red-700);
  letter-spacing: 4px;
  margin-bottom: 6px;
}
.arch-tag {
  text-align: center;
  font-size: 12px;
  color: var(--gold-900);
  letter-spacing: 2.5px;
  font-weight: 500;
}
.arch-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 20px;
}
.arch-sep-line {
  flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-600), transparent);
}
.arch-sep-orn {
  color: var(--gold-700); font-size: 12px;
}
.arch-blurb {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-700);
  text-align: justify;
  padding: 0 4px;
  margin-bottom: 20px;
  text-wrap: pretty;
}
.arch-dims {
  display: flex;
  border-top: 1px dashed var(--cream-300);
  padding-top: 16px;
}
.arch-dim {
  flex: 1; text-align: center;
  padding: 0 4px;
  border-right: 1px solid var(--cream-300);
}
.arch-dim:last-child { border-right: none; }
.arch-dim-k {
  font-size: 10.5px;
  color: var(--ink-500);
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.arch-dim-v {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.5px;
}

/* Radar */
.r-radar {
  padding: 30px 24px 10px;
}
.radar-wrap {
  background: linear-gradient(135deg, #fff 0%, #fff7e4 100%);
  border: 1px solid var(--cream-300);
  border-radius: 12px;
  padding: 10px 0 0;
  margin-bottom: 16px;
  position: relative;
}
.radar-wrap::before, .radar-wrap::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 1.5px solid var(--gold-600);
}
.radar-wrap::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.radar-wrap::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.radar-svg {
  width: 100%;
  display: block;
  height: auto;
}

.radar-legend {
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: 10px;
  padding: 8px 14px;
}
.legend-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--cream-300);
}
.legend-row:last-child { border-bottom: none; }
.legend-rank {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 11px;
  color: var(--gold-700);
  min-width: 20px;
}
.legend-name {
  font-family: "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 13.5px;
  min-width: 50px;
}
.legend-bar-wrap {
  flex: 1;
  height: 6px;
  background: var(--cream-200);
  border-radius: 3px;
  overflow: hidden;
}
.legend-bar {
  height: 100%;
  width: 0;
  transition: width 1.2s cubic-bezier(.2,.7,.2,1);
  border-radius: 3px;
}
.legend-score {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-900);
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.legend-score span { font-size: 10px; color: var(--ink-500); margin-left: 1px; }

/* Analysis */
.r-analysis {
  padding: 30px 24px 10px;
}
.an-block {
  background: #fff;
  border-left: 3px solid var(--c);
  border-radius: 0 8px 8px 0;
  padding: 16px 16px 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 0 var(--cream-300);
}
.an-head {
  display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 10px;
}
.an-idx {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--c);
  line-height: 1;
  opacity: 0.8;
}
.an-title {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--ink-900);
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}
.an-sub {
  font-size: 11px;
  color: var(--c);
  letter-spacing: 1px;
  opacity: 0.85;
}
.an-body {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-700);
  text-wrap: pretty;
}

.r-pullquote {
  margin: 20px 0 4px;
  padding: 22px 20px 20px;
  background: var(--red-900);
  color: var(--gold-300);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.r-pullquote::before {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 100px; height: 100px;
  background: radial-gradient(circle, var(--gold-700), transparent 70%);
  opacity: 0.2;
}
.pq-orn {
  font-family: "Noto Serif SC", serif;
  font-size: 48px;
  color: var(--gold-600);
  line-height: 0.8;
  margin-bottom: 6px;
}
.pq-text {
  font-family: "Noto Serif SC", serif;
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.pq-text b { color: var(--gold-500); font-weight: 700; }
.pq-auth {
  font-size: 11px;
  color: var(--gold-500);
  letter-spacing: 1.5px;
  text-align: right;
}

/* Growth path */
.r-path { padding: 30px 24px 10px; }
.path-steps {
  background: #fff;
  border: 1px solid var(--cream-300);
  border-radius: 12px;
  padding: 6px 18px;
}
.path-step {
  display: flex; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--cream-300);
  position: relative;
}
.path-step:last-child { border-bottom: none; }
.path-step-n {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--gold-700);
  background: var(--gold-100);
  border: 1px solid var(--gold-500);
  min-width: 38px; max-width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.5px;
}
.path-step-t {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--red-700);
  margin-bottom: 3px;
  letter-spacing: 1px;
}
.path-step-d {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-700);
}

/* CTA — Teacher WeChat */
.cta-block {
  padding: 36px 18px 14px;
  background:
    linear-gradient(180deg, var(--cream-100) 0%, #fbe9c7 100%);
  margin-top: 20px;
}
.cta-crown {
  text-align: center;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold-900);
  font-weight: 600;
  margin-bottom: 14px;
}
.cta-card {
  background:
    linear-gradient(180deg, #fffdf4 0%, #fff7e4 100%);
  border: 2px solid var(--gold-600);
  border-radius: 16px;
  padding: 28px 22px 24px;
  position: relative;
  box-shadow: 0 14px 40px rgba(184, 20, 26, 0.14);
}
.cta-card::before, .cta-card::after {
  content: ""; position: absolute; width: 24px; height: 24px;
  border: 2px solid var(--red-700);
}
.cta-card::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.cta-card::after { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.cta-ornament {
  text-align: center;
  font-size: 14px;
  color: var(--gold-700);
  margin-bottom: 8px;
}
.cta-title {
  text-align: center;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-900);
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.cta-accent {
  color: var(--red-700);
  position: relative;
}
.cta-accent::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0px;
  height: 5px;
  background: var(--gold-500);
  opacity: 0.35;
  z-index: -1;
}
.cta-lede {
  font-size: 12.5px;
  color: var(--ink-700);
  line-height: 1.75;
  text-align: center;
  margin-bottom: 16px;
}
.cta-lede b { color: var(--red-700); }

.cta-list {
  list-style: none;
  background: rgba(232, 199, 125, 0.12);
  border: 1px dashed var(--gold-600);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 22px;
}
.cta-list li {
  font-size: 12px;
  line-height: 1.85;
  color: var(--ink-700);
  display: flex; gap: 8px;
  padding: 3px 0;
}
.cta-list b { color: var(--red-700); font-weight: 600; }
.cta-li-i {
  color: var(--gold-700);
  font-weight: 700;
  font-family: "Noto Serif SC", serif;
  min-width: 16px;
}

.qr-box {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--gold-500);
  border-radius: 10px;
  margin-bottom: 14px;
}
.qr-frame {
  width: 128px; height: 128px;
  position: relative;
  background: #FDF6E9;
  padding: 6px;
  flex-shrink: 0;
}
.qr-svg {
  width: 100%; height: 100%;
  display: block;
}
.qr-corner {
  position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--red-700);
}
.qr-corner.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.qr-corner.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.qr-corner.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.qr-corner.br { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.qr-side {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.qr-avatar {
  position: relative;
  width: 38px; height: 38px; margin-bottom: 6px;
}
.qr-avatar-ring {
  position: absolute; inset: -2px;
  border-radius: 50%;
  background: conic-gradient(var(--gold-600), var(--red-700), var(--gold-600));
}
.qr-avatar-in {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--red-600), var(--red-800));
  color: var(--gold-300);
  font-family: "Noto Serif SC", serif;
  font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 2px solid #fff;
}
.qr-name {
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-900);
  margin-bottom: 2px;
  letter-spacing: 1px;
}
.qr-role {
  font-size: 10px;
  color: var(--red-700);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  font-weight: 500;
}
.qr-cred {
  font-size: 10.5px;
  color: var(--ink-500);
  line-height: 1.7;
  margin-bottom: 6px;
}
.qr-wxid {
  font-size: 10.5px;
  color: var(--ink-500);
  letter-spacing: 0.5px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px dashed var(--cream-300);
}
.qr-wxid b {
  color: var(--red-700);
  font-family: "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 1px;
}

.qr-save {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #07C160 0%, #058d46 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: "Noto Serif SC", serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    0 6px 18px rgba(7, 193, 96, 0.3);
  margin-bottom: 12px;
}

.cta-urgency {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11.5px;
  color: var(--ink-700);
  letter-spacing: 0.5px;
}
.cta-urgency b { color: var(--red-600); font-size: 13px; }
.blink-dot {
  width: 7px; height: 7px; background: var(--red-600);
  border-radius: 50%;
  animation: blink 1.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 var(--red-600);
}
@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(184, 20, 26, 0.5); }
  50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(184, 20, 26, 0); }
}

.r-foot {
  padding: 20px 24px 36px;
  text-align: center;
}
.r-restart {
  background: transparent;
  border: 1px solid var(--ink-300);
  color: var(--ink-500);
  font-family: "Noto Serif SC", serif;
  font-size: 12px;
  padding: 9px 22px;
  border-radius: 20px;
  letter-spacing: 2px;
  cursor: pointer;
  margin-bottom: 14px;
}
.r-foot-note {
  font-size: 10px;
  color: var(--ink-400);
  line-height: 1.7;
  letter-spacing: 0.3px;
}

/* scrollbar */
.result-scroll::-webkit-scrollbar,
.profile-scroll::-webkit-scrollbar,
.intro-scroll::-webkit-scrollbar,
.page-welcome::-webkit-scrollbar,
.q-body::-webkit-scrollbar { width: 0; }
