:root {
  --bg: #f7f2e8;
  --paper: rgba(255, 251, 245, 0.9);
  --ink: #14263f;
  --muted: #56657d;
  --line: rgba(20, 38, 63, 0.12);
  --accent: #d52b1e;
  --accent-2: #006847;
  --accent-3: #1f5aa6;
  --accent-4: #ffffff;
  --shadow: 0 24px 56px rgba(20, 38, 63, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Serif SC", serif;
  background-image: url("./assets/background.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body::before {
  content: none;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
  position: relative;
  z-index: 1;
}

.hero, .panel {
  background: var(--paper);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.62);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero {
  padding: 36px 32px 28px;
  overflow: hidden;
  position: relative;
}

.hero::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0 33.33%, var(--accent-3) 33.33% 66.66%, var(--accent-2) 66.66% 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-2) 0 33.33%, var(--accent-3) 33.33% 66.66%, var(--accent) 66.66% 100%);
}

.panel::before {
  display: none;
}

.hero-topbar,
.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

.brand-wordmark,
.brand-pill,
.eyebrow,
.progress-copy {
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-wordmark {
  font-size: 16px;
  color: var(--accent);
}

.brand-logo {
  width: auto;
  height: 102px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(20, 38, 63, 0.12));
}

.hero h1 {
  margin: 20px 0 10px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  text-align: center;
}

.hero-copy {
  margin: 0 auto;
  max-width: 680px;
  text-align: center;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 26px;
}

.hero-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.56));
  font-size: 13px;
}

.hero-action-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.quiz-stage { margin-top: 24px; }
.panel { padding: 28px; position: relative; }
.hidden { display: none; }

.quiz-home-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
}

.quiz-brandbar { display: flex; justify-content: center; flex: 1 1 auto; }
.quiz-brand-copy { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.quiz-brand-wordmark { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 18px; }
.quiz-brand-subtitle { color: var(--muted); font-family: "Noto Sans SC", sans-serif; font-size: 12px; }
.progress-copy { display: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 90, 166, 0.12);
  border: 1px solid rgba(31, 90, 166, 0.18);
  color: var(--accent-3);
  font-size: 12px;
  white-space: nowrap;
}

.eyebrow--departure {
  background: rgba(213, 43, 30, 0.12);
  border-color: rgba(213, 43, 30, 0.18);
  color: #d52b1e;
}

.eyebrow--travel {
  background: rgba(31, 90, 166, 0.12);
  border-color: rgba(31, 90, 166, 0.18);
  color: #1f5aa6;
}

.eyebrow--return {
  background: rgba(0, 104, 71, 0.12);
  border-color: rgba(0, 104, 71, 0.18);
  color: #006847;
}

.question-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 4px;
  width: 100%;
}

.question-index {
  margin: 0;
  line-height: 1;
}

.progress-bar {
  margin: 16px 0 24px;
  height: 10px;
  border-radius: 999px;
  background: rgba(20, 38, 63, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  transition: width 180ms ease;
}

.question-card,
.result-card,
.story-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,0.62);
}

.question-card { padding: 24px; }
.question-text {
  margin: 0 0 16px;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.28;
  min-height: calc(1.28em * 2);
}

.options-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.option-button,
.ghost-button,
.primary-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.option-button {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 16px 15px;
  min-height: calc((1.6em * 2) + 31px);
  text-align: left;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255,255,255,0.74);
  border: 1px solid rgba(20, 38, 63, 0.1);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.option-button:hover { transform: translateY(-1px); background: rgba(255,255,255,0.96); }
.option-button.selected { border-color: rgba(213, 43, 30, 0.62); background: rgba(213, 43, 30, 0.14); }

.option-label {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(31, 90, 166, 0.18);
  color: #dfeeff;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.option-text {
  font-family: "Noto Sans SC", sans-serif;
  line-height: 1.6;
  font-size: 15px;
  color: #22344d;
  min-height: calc(1.6em * 2);
}

.nav-row, .result-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.nav-row { grid-template-columns: 1fr 1fr; }
.result-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ghost-button, .primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 16px;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

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

.primary-button {
  color: #fff7f3;
  background: linear-gradient(135deg, #d52b1e 0%, #1f5aa6 52%, #006847 100%);
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(31, 90, 166, 0.26);
}

.ghost-button:hover, .primary-button:hover { transform: translateY(-1px); }
.ghost-button:disabled, .primary-button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.section-title, .result-title {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
}

.result-header { text-align: center; }
.result-title { margin-top: 18px; font-size: clamp(42px, 8vw, 82px); line-height: 1; }
.result-label {
  margin: 14px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.result-share-inline {
  margin: 8px 0 0;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.result-hook {
  margin: 16px auto 0;
  max-width: 1080px;
  white-space: nowrap;
  font-family: "Noto Sans SC", sans-serif;
  font-size: clamp(17px, 2vw, 24px);
  line-height: 1.7;
  color: #22344d;
}

.result-flag {
  width: min(220px, 42vw);
  height: min(220px, 42vw);
  margin: 12px auto 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.result-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.result-card {
  padding: 18px;
}

.result-card--story {
  grid-row: span 2;
}

.result-card-label {
  margin: 0 0 10px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.result-body,
.result-quote {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: #22344d;
}

.result-body {
  font-size: 17px;
  line-height: 1.72;
}

.result-quote {
  font-size: 24px;
  line-height: 1.55;
}

.result-actions {
  align-items: start;
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(220px, 260px));
  justify-content: center;
}

.result-action-cell { display: grid; gap: 10px; }
@media (max-width: 860px) {
  .progress-row, .options-list, .nav-row, .result-actions {
    grid-template-columns: 1fr;
    display: grid;
  }

  .hero-topbar {
    display: flex;
    align-items: center;
  }

  .hero h1 {
    text-align: center;
    font-size: clamp(30px, 8vw, 44px);
    line-height: 1.08;
    margin: 14px 0 8px;
  }
  .hero-copy {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 14px;
    line-height: 1.65;
    max-width: 26em;
  }
  .brand-wordmark { white-space: nowrap; }
  .brand-logo { height: 56px; }
  .progress-copy { display: none; }
  .quiz-home-button {
    position: absolute;
    top: 12px;
    right: 12px;
    justify-self: auto;
    margin-bottom: 0;
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 11px;
  }
  .progress-row { align-items: start; }
  .question-meta-row { align-items: flex-start; }
  .result-grid { grid-template-columns: 1fr; }
  .result-card--story { grid-row: auto; }
  .result-hook { text-align: center; margin-left: auto; margin-right: auto; white-space: normal; }
  .result-title { font-size: clamp(36px, 12vw, 72px); }
  .hero-action-row { justify-content: stretch; }
  .hero-action-row .primary-button { width: 100%; }
  .result-actions { grid-template-columns: 1fr; }
  .quiz-brand-wordmark { font-size: 16px; }
  .quiz-brand-subtitle { font-size: 11px; }
  .hero-meta { margin: 18px 0 20px; gap: 10px; }
  .hero-meta span { font-size: 12px; padding: 7px 10px; }
  .question-meta-row { margin: 0 0 3px; gap: 10px; }
  .question-meta-row { align-items: center; }
  .question-index { font-size: 18px; }
  .question-index {
    display: inline-flex;
    align-items: center;
    height: 28px;
  }
  .eyebrow {
    font-size: 11px;
    height: 28px;
    padding: 0 10px;
  }
  .progress-bar { margin: 8px 0 14px; height: 8px; }
  .question-card { padding: 16px; }
  .question-text {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.24;
    min-height: calc(1.24em * 2);
  }
  .options-list { gap: 8px; }
  .option-button {
    padding: 10px;
    min-height: calc((1.4em * 2) + 20px);
    gap: 8px;
  }
  .option-label {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }
  .option-text {
    font-size: 12px;
    line-height: 1.4;
    min-height: calc(1.4em * 2);
  }
  .nav-row { margin-top: 14px; gap: 10px; }
  .ghost-button, .primary-button {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
  }
}

/* ── 找到我们 / 社交入口 ── */
.find-us {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.find-us::before {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--line);
}

.find-us-label {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.find-us-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.find-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.56));
  color: var(--ink);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.find-chip svg {
  width: 16px;
  height: 16px;
  display: block;
}

.find-chip:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.98);
}

.find-chip--wechat { color: var(--accent-2); border-color: rgba(0, 104, 71, 0.28); }
.find-chip--xhs { color: var(--accent); border-color: rgba(213, 43, 30, 0.28); }
.find-chip--site { color: var(--accent-3); border-color: rgba(31, 90, 166, 0.28); }

/* ── 微信双码弹窗 ── */
.social-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.social-modal.hidden { display: none; }

.social-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 38, 63, 0.46);
}

.social-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  padding: 26px 22px 24px;
  text-align: center;
  background: var(--paper);
  border: 1px solid rgba(255,255,255,0.62);
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.social-modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0 33.33%, var(--accent-3) 33.33% 66.66%, var(--accent-2) 66.66% 100%);
}

.social-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.social-modal-title {
  margin: 6px 0 8px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.social-modal-copy {
  margin: 0 0 16px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.social-modal-copy.hidden { display: none; }

.social-modal-link {
  width: 100%;
  margin-top: 18px;
  text-decoration: none;
}

/* .primary-button 的 display:inline-flex 会盖过 .hidden,需更高优先级才能在微信弹窗里真正隐藏跳转按钮 */
#social-modal-link.hidden { display: none; }

.social-qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#social-modal-media.hidden { display: none; }

.social-qr { margin: 0; }

.social-qr img {
  width: 100%;
  max-width: 160px;
  aspect-ratio: 1;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.social-qr figcaption {
  margin-top: 8px;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
