:root {
  --ink: #202530;
  --muted: #68707d;
  --paper: rgba(255, 255, 255, 0.88);
  --paper-solid: #fffdfb;
  --line: rgba(35, 42, 54, 0.1);
  --brand: #8f5f75;
  --brand-deep: #704357;
  --brand-soft: #f5e8ed;
  --shadow: 0 24px 70px rgba(38, 32, 43, 0.14);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: #f4eee9;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 5%, rgba(220, 165, 181, 0.28), transparent 32rem),
    radial-gradient(circle at 90% 30%, rgba(126, 153, 177, 0.2), transparent 28rem),
    linear-gradient(160deg, #f9f2ed 0%, #f2eceb 52%, #edf1f2 100%);
}

button { font: inherit; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(55px);
  opacity: 0.34;
  pointer-events: none;
}

.ambient-one { top: -6rem; left: -7rem; background: #e5a7bd; }
.ambient-two { right: -8rem; bottom: 8%; background: #9ab9c8; }

.app-shell {
  width: min(100% - 24px, 560px);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 0 36px;
}

.site-footer {
  padding: 0 16px calc(18px + env(safe-area-inset-bottom));
  color: rgba(53, 58, 67, 0.55);
  font-size: 12px;
  text-align: center;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.intro-panel { padding: 30px 24px 24px; overflow: hidden; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.intro-symbol {
  position: relative;
  display: grid;
  width: 108px;
  height: 108px;
  margin: 6px auto 24px;
  place-items: center;
  border: 1px solid rgba(143, 95, 117, 0.15);
  border-radius: 34px;
  background: linear-gradient(145deg, #fff, #f6e9ee);
  box-shadow: 0 18px 40px rgba(113, 65, 87, 0.18);
  font-size: 48px;
  transform: rotate(-3deg);
}

.intro-symbol::before,
.intro-symbol::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(143, 95, 117, 0.18);
  border-radius: inherit;
  inset: 8px;
}

.intro-symbol::after { inset: 17px; border-style: dashed; }

h1, h2, h3, h4, p { margin-top: 0; }

.hero-title {
  margin-bottom: 12px;
  font-size: clamp(31px, 9vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.04em;
  text-align: center;
}

.hero-subtitle {
  max-width: 420px;
  margin: 0 auto 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0;
}

.feature-card {
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.feature-card strong { display: block; margin-bottom: 3px; font-size: 18px; }
.feature-card span { color: var(--muted); font-size: 11px; }

.notice {
  margin: 18px 0;
  padding: 13px 14px;
  border-left: 3px solid var(--brand);
  border-radius: 4px 13px 13px 4px;
  color: #5c5260;
  background: #faf2f5;
  font-size: 12px;
  line-height: 1.65;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.primary-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  box-shadow: 0 14px 28px rgba(112, 67, 87, 0.26);
}

.secondary-btn {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.primary-btn:hover,
.secondary-btn:hover { transform: translateY(-1px); }
.primary-btn:active,
.secondary-btn:active { transform: translateY(1px); }
.primary-btn:disabled { cursor: not-allowed; opacity: 0.38; box-shadow: none; }

.quiz-panel { padding: 18px; }

.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.icon-btn {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.icon-btn:disabled { opacity: 0.32; cursor: not-allowed; }

.progress-wrap { flex: 1; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #ebe5e3; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b16e87, #7e779f); transition: width 260ms ease; }

.question-card {
  padding: 24px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.question-kicker { margin-bottom: 8px; color: var(--brand); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
.question-title { margin-bottom: 12px; font-size: 24px; line-height: 1.28; }
.question-prompt { margin-bottom: 22px; color: #515965; font-size: 15px; line-height: 1.75; }

.option-list { display: grid; gap: 10px; }

.option-btn {
  display: grid;
  width: 100%;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(41, 48, 60, 0.1);
  border-radius: 17px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.option-btn:hover { transform: translateY(-1px); border-color: rgba(143, 95, 117, 0.35); }
.option-btn.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px rgba(143, 95, 117, 0.12); }
.option-letter { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: var(--brand-deep); background: #f4ebee; font-weight: 900; }
.option-btn.selected .option-letter { color: #fff; background: var(--brand); }
.option-text { padding-top: 4px; font-size: 14px; line-height: 1.62; }

.quiz-actions { display: grid; grid-template-columns: 0.8fr 1.4fr; gap: 10px; margin-top: 16px; }

.tie-panel { padding: 24px 18px; }
.tie-title { font-size: 28px; line-height: 1.25; }
.tie-subtitle { margin-bottom: 20px; color: var(--muted); line-height: 1.7; }
.tie-list { display: grid; gap: 10px; }
.tie-option { min-height: 60px; }

.result-shell { display: grid; gap: 14px; }

.result-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-xl);
  color: var(--ink);
  background: var(--result-soft, #fff);
  box-shadow: var(--shadow);
}

.result-hero::after {
  position: absolute;
  width: 190px;
  height: 190px;
  right: -65px;
  top: -70px;
  border-radius: 50%;
  background: var(--result-accent, #888);
  content: "";
  opacity: 0.12;
}

.result-icon { position: relative; z-index: 1; margin-bottom: 12px; font-size: 52px; }
.result-overline { position: relative; z-index: 1; color: var(--result-accent); font-size: 12px; font-weight: 900; letter-spacing: 0.1em; }
.result-name { position: relative; z-index: 1; margin: 7px 0 10px; font-size: 35px; letter-spacing: -0.04em; }
.result-tagline { position: relative; z-index: 1; max-width: 430px; margin-bottom: 17px; color: #4d4f57; font-size: 16px; font-weight: 700; line-height: 1.65; }
.keyword-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; }
.keyword-pill { padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--result-accent) 25%, transparent); border-radius: 999px; color: var(--result-accent); background: rgba(255, 255, 255, 0.58); font-size: 11px; font-weight: 800; }

.result-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 19px;
}

.meta-box { position: relative; z-index: 1; padding: 11px 8px; border-radius: 15px; background: rgba(255, 255, 255, 0.65); text-align: center; }
.meta-box strong { display: block; font-size: 17px; }
.meta-box span { color: var(--muted); font-size: 10px; }

.content-card { padding: 20px 18px; }
.content-card h2 { margin-bottom: 12px; font-size: 19px; }
.combination-copy { color: #4f5661; font-size: 14px; line-height: 1.9; }
.combination-copy strong { color: var(--ink); }

.score-list { display: grid; gap: 11px; }
.score-row { display: grid; grid-template-columns: 98px 1fr 30px; gap: 9px; align-items: center; }
.score-name { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.score-track { height: 8px; overflow: hidden; border-radius: 99px; background: #ece8e7; }
.score-fill { height: 100%; border-radius: inherit; transition: width 600ms cubic-bezier(.2,.7,.2,1); }
.score-value { font-size: 12px; font-weight: 900; text-align: right; }

.report-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.report-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  list-style: none;
}

.report-section summary::-webkit-details-marker { display: none; }
.report-section summary::after { color: var(--result-accent); content: "+"; font-size: 22px; font-weight: 400; }
.report-section[open] summary::after { content: "−"; }
.report-body { padding: 0 18px 18px; color: #4e5560; font-size: 14px; line-height: 1.85; }
.report-body h4 { margin: 20px 0 8px; color: var(--ink); font-size: 15px; }
.report-body p { margin-bottom: 12px; }
.report-body ul, .report-body ol { margin: 7px 0 15px; padding-left: 22px; }
.report-body li { margin-bottom: 7px; }
.report-body blockquote { margin: 12px 0; padding: 12px 14px; border-left: 3px solid var(--result-accent); border-radius: 4px 12px 12px 4px; background: var(--result-soft); }
.report-body pre { overflow-x: auto; padding: 15px; border-radius: 14px; color: #fff; background: #292c34; white-space: pre-wrap; }
.report-body strong { color: var(--ink); }

.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.result-actions-three .primary-btn:last-child { grid-column: 1 / -1; }
.result-disclaimer { padding: 4px 10px 0; color: var(--muted); font-size: 11px; line-height: 1.65; text-align: center; }

.toast {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  padding: 11px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(31, 37, 48, 0.92);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
  font-size: 13px;
  transform: translate(-50%, 30px);
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 640px) {
  .intro-panel { padding: 40px 36px 32px; }
  .quiz-panel { padding: 24px; }
  .question-card { padding: 30px 26px 24px; }
  .content-card { padding: 24px; }
}

@media (max-width: 380px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { display: flex; align-items: center; justify-content: center; gap: 8px; }
  .feature-card strong { margin: 0; }
  .result-actions, .quiz-actions { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 84px 1fr 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  .ambient, .site-footer, .result-actions, .toast { display: none !important; }
  .app-shell { width: 100%; max-width: none; margin: 0; padding: 0; }
  .result-shell { display: block; }
  .result-hero, .content-card, .report-section {
    margin-bottom: 12px;
    border: 1px solid #ddd;
    box-shadow: none;
    background: #fff !important;
    break-inside: avoid;
  }
  .report-section summary::after { display: none; }
  .report-section[open] .report-body { display: block; }
  .result-disclaimer { color: #555; }
}