/* Space Grotesk 自托管(变量字体,latin 子集 6.7K,wght 覆盖 500-700):
   只用于拉丁字母品牌字,大陆拿不到 Google Fonts 也能稳定渲染 */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("./assets/fonts/space-grotesk-latin.woff2") format("woff2");
}

:root {
  --bg: #f4efe5;
  --paper: rgba(252, 249, 241, 0.88);
  --ink: #1d2a2f;
  --muted: #617076;
  --line: rgba(29, 42, 47, 0.12);
  --accent: #0f5b52;
  --accent-2: #d56f2a;
  --accent-3: #d9c7a0;
  --shadow: 0 20px 50px rgba(53, 42, 24, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  /* webfont 拿不到时(大陆为常态)按系统中文衬线回退,避免风格随机漂移 */
  font-family: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  color: var(--ink);
  background: #eef1f4 url("./bg_image.jpg") center center / cover no-repeat fixed;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: none;
}

body::after {
  content: none;
}

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

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

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

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

.brand-wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 160ms ease, opacity 160ms ease;
}

.brand-link:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.brand-logo {
  display: block;
  width: min(124px, 28vw);
  height: auto;
  object-fit: contain;
}

.brand-fallback {
  display: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: 0.04em;
  color: var(--ink);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -100px auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(15, 91, 82, 0.18), transparent 72%);
}

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

.hero-badge {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 91, 82, 0.1);
  color: var(--accent);
  font-size: 12px;
}

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

.hero-copy {
  max-width: 720px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  text-align: center;
}

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

.hero-meta span,
.hidden-badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.7);
}

.hero-player-strip {
  display: flex;
  justify-content: center;
  align-items: end;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 28px;
  min-height: 170px;
}

.hero-player {
  display: block;
  height: 168px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 22px rgba(29, 42, 47, 0.16));
}

.hero-player-left,
.hero-player-right {
  height: 168px;
  opacity: 0.96;
}

.hero-player-left,
.hero-player-center,
.hero-player-right {
  transform: none;
}

.hero-player-mirror {
  transform: scaleX(-1);
}

.hidden-badge {
  display: inline-flex;
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(213, 111, 42, 0.16), rgba(15, 91, 82, 0.14));
  color: var(--ink);
}

.quiz-stage {
  margin-top: 24px;
}

.panel {
  padding: 28px;
  position: relative;
}

.hidden {
  display: none;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

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

.quiz-brandbar {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  align-items: end;
}

.quiz-brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-decoration: none;
  transition: transform 160ms ease, opacity 160ms ease;
}

.quiz-brand-link:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.quiz-brand-logo {
  display: block;
  width: min(92px, 22vw);
  height: auto;
  object-fit: contain;
}

.quiz-brand-copy {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.quiz-brand-wordmark {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.quiz-brand-subtitle {
  display: block;
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-size: 28px;
}

.progress-copy {
  color: var(--muted);
  font-size: 13px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(29, 42, 47, 0.08);
  margin-top: 18px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #006847 0%, #d52b1e 40%, #3c3b6e 72%, #3c3b6e 100%);
  transition: width 220ms ease;
}

.question-card {
  margin-top: 24px;
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
}

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

.question-media {
  margin: 18px 0 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(248, 244, 235, 0.72);
}

.question-media-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.85fr) minmax(220px, 1.4fr);
  gap: 1px;
  background: var(--line);
}

.question-media-grid.single {
  display: block;
}

.question-media-image {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.72);
}

.question-media-caption {
  margin: 0;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.options-list {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.option-button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(248, 244, 235, 0.72);
  color: var(--ink);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.option-button:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 91, 82, 0.4);
}

.option-button.selected {
  background: linear-gradient(135deg, rgba(15, 91, 82, 0.1), rgba(213, 111, 42, 0.1));
  border-color: var(--accent);
}

.option-label {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  background: rgba(15, 91, 82, 0.1);
  color: var(--accent);
}

.option-text {
  display: block;
  font-size: 16px;
  line-height: 1.75;
}

.nav-row,
.action-stack {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
  margin-top: 22px;
}

.action-stack {
  flex-wrap: wrap;
}

.result-action-cell {
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 6px;
  min-width: 0;
}

.result-actions button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 64px;
  min-height: 64px;
  padding: 0 18px;
  white-space: nowrap;
}

/* 操作行/悬浮栏按钮字体与「分享赢好礼」金 pill 统一(button 默认不继承页面衬线字体) */
.result-actions button,
.result-dock button {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hidden-unlock-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.result-cta-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  color: var(--accent);
  font-size: 15px;
  line-height: 1.7;
  text-decoration: none;
}

.result-cta-link:hover {
  text-decoration: underline;
}

#start-button {
  display: block;
  margin: 0 auto;
}

.micro-copy {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 16px;
  padding: 14px 22px;
  font-size: 15px;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), #16443e);
  color: #fffaf2;
}

.ghost-button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

#save-image-button,
.save-image-button {
  background: linear-gradient(135deg, #1f4b99, #12336f);
  color: #f8fbff;
  border: 1px solid rgba(18, 51, 111, 0.28);
  box-shadow: 0 10px 24px rgba(18, 51, 111, 0.18);
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ghost-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.save-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 21; /* 比 social/promo(20) 高一层:三步卡点「保存」时直接叠在活动弹窗上 */
  display: grid;
  place-items: center;
  padding: 18px;
}

.save-preview-modal.hidden {
  display: none;
}

.save-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 20, 0.58);
  backdrop-filter: blur(6px);
}

.save-preview-panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(92vh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(252, 249, 241, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: 0 24px 70px rgba(10, 18, 20, 0.28);
}

.save-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.save-preview-header h3 {
  margin: 0;
  font-size: 18px;
}

.save-preview-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.save-preview-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.save-preview-image {
  display: block;
  width: 100%;
  max-height: calc(92vh - 104px);
  object-fit: contain;
  border-radius: 12px;
  background: #fffaf2;
  -webkit-touch-callout: default;
  user-select: auto;
}

.result-header {
  display: grid;
  justify-items: center;
  padding-top: 0;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  gap: 0;
}

.result-portrait-shell {
  width: min(360px, 78vw);
  height: 480px;
  margin-bottom: 0;
  margin-top: 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(213, 111, 42, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 239, 229, 0.88));
  border: 1px solid var(--line);
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  overflow: hidden;
  padding: 18px 18px 14px 18px;
}

.result-portrait {
  width: calc(100% + 36px);
  height: auto;
  max-height: 400px;
  object-fit: contain;
  object-position: center center;
  display: block;
  margin-top: 0;
  margin-left: -18px;
  margin-right: -18px;
  align-self: center;
  justify-self: center;
  transform: translateY(0);
}

.result-portrait-shell[data-role-code="BALO"] .result-portrait {
  transform: translateY(-24px);
}

.result-portrait-shell[data-role-code="COLL-NA"] .result-portrait {
  transform: translateY(-24px);
}

.result-portrait-shell[data-role-code="KARIUS"] .result-portrait {
  transform: translateY(-24px);
}

.result-portrait-shell[data-role-code="ZZZJ"] .result-portrait {
  transform: translateY(46px) scale(1.22);
  transform-origin: center top;
}

.result-prompt {
  margin: 0 0 4px;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  color: var(--ink);
  text-align: center;
}

.result-code {
  margin: 8px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: 0.08em;
  color: var(--muted);
}

.result-title {
  margin: 8px 0 6px;
  font-size: clamp(38px, 6vw, 60px);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 700;
}

.result-group,
.result-short-label {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.result-quote {
  margin: 0;
  padding-top: 8px;
  font-style: normal;
  font-weight: 700;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.4;
  text-align: center;
  align-self: end;
  justify-self: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr;
  gap: 16px;
  margin-top: 24px;
  align-items: stretch;
}

.result-right-col {
  display: grid;
  gap: 16px;
  align-content: start;
}

.result-card--radar {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  padding: 24px;
  height: 100%;
}

.result-story {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.story-lead,
.story-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
}

.story-oneliner {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.5;
}

.story-profile,
.story-vibe {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.85;
  white-space: pre-line;
}

.profile-subtitle {
  display: inline-block;
  margin-top: 10px;
  color: var(--ink);
  font-weight: 700;
}

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

.story-columns > *:only-child {
  grid-column: 1 / -1;
}

.story-card h4 {
  margin: 0 0 14px;
  font-size: 16px;
}

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

.quote-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 91, 82, 0.06);
  color: var(--ink);
  line-height: 1.7;
}

.people-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.people-tag {
  display: inline-flex;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(213, 111, 42, 0.08);
  border: 1px solid rgba(213, 111, 42, 0.16);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.result-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
}

.result-card h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.result-card p {
  margin: 0;
  line-height: 1.75;
  color: var(--muted);
}

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

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(29, 42, 47, 0.12);
}

.score-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.score-name {
  line-height: 1.55;
}

.score-value {
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent);
  white-space: nowrap;
}

#result-panel.is-hidden-result {
  --hidden-bg: #243342;
  --hidden-stage: rgba(24, 34, 45, 0.78);
  --hidden-gold: #f2d36b;
  --hidden-gold-soft: rgba(242, 211, 107, 0.18);
  --hidden-text: #fff8ea;
  --hidden-muted: #e8d6b0;
  background:
    radial-gradient(circle at 88% 8%, rgba(242, 211, 107, 0.18), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(213, 111, 42, 0.2), transparent 32%),
    linear-gradient(135deg, #263244 0%, #365047 54%, #8a6033 100%);
  border-color: rgba(242, 211, 107, 0.58);
  border-width: 2px;
  color: var(--hidden-text);
}

#result-panel.is-hidden-result .result-header {
  border-bottom-color: rgba(242, 211, 107, 0.24);
}

#result-panel.is-hidden-result .result-prompt,
#result-panel.is-hidden-result .result-title,
#result-panel.is-hidden-result .result-quote,
#result-panel.is-hidden-result .story-oneliner,
#result-panel.is-hidden-result .result-card h4,
#result-panel.is-hidden-result .story-card h4,
#result-panel.is-hidden-result .profile-subtitle,
#result-panel.is-hidden-result .score-name,
#result-panel.is-hidden-result .legend-name {
  color: var(--hidden-text);
}

#result-panel.is-hidden-result .result-code,
#result-panel.is-hidden-result .eyebrow,
#result-panel.is-hidden-result .score-value {
  color: var(--hidden-gold);
}

#result-panel.is-hidden-result .result-group,
#result-panel.is-hidden-result .result-short-label,
#result-panel.is-hidden-result .story-profile,
#result-panel.is-hidden-result .story-vibe,
#result-panel.is-hidden-result .result-card p,
#result-panel.is-hidden-result .legend-level,
#result-panel.is-hidden-result .result-cta-link {
  color: var(--hidden-muted);
}

#result-panel.is-hidden-result .result-portrait-shell {
  position: relative;
  background:
    radial-gradient(circle at center, rgba(242, 211, 107, 0.28), transparent 54%),
    linear-gradient(180deg, rgba(24, 34, 45, 0.8), rgba(14, 22, 31, 0.86));
  border: 4px solid rgba(242, 211, 107, 0.58);
  box-shadow: inset 0 0 0 1px rgba(242, 211, 107, 0.16), 0 22px 42px rgba(6, 10, 16, 0.24);
}

#result-panel.is-hidden-result .result-portrait-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06) 0,
    rgba(255, 255, 255, 0.06) 2px,
    transparent 2px,
    transparent 9px
  );
  pointer-events: none;
}

#result-panel.is-hidden-result .hidden-badge {
  background: #111827;
  border: 2px solid rgba(242, 211, 107, 0.88);
  color: var(--hidden-text);
  box-shadow: 0 10px 28px rgba(6, 10, 16, 0.24);
}

#result-panel.is-hidden-result .result-card,
#result-panel.is-hidden-result .story-lead,
#result-panel.is-hidden-result .story-card {
  background: rgba(24, 34, 45, 0.68);
  border: 1px solid rgba(242, 211, 107, 0.34);
}

#result-panel.is-hidden-result .quote-item {
  background: rgba(242, 211, 107, 0.12);
  border: 1px solid rgba(242, 211, 107, 0.2);
  color: var(--hidden-text);
}

#result-panel.is-hidden-result .people-tag,
#result-panel.is-hidden-result .legend-item {
  background: rgba(242, 211, 107, 0.12);
  border-color: rgba(242, 211, 107, 0.26);
  color: var(--hidden-text);
}

#result-panel.is-hidden-result .score-row {
  border-bottom-color: rgba(242, 211, 107, 0.2);
}

#result-panel.is-hidden-result .legend-bar {
  background: rgba(255, 248, 234, 0.12);
}

#result-panel.is-hidden-result .radar-chart svg text {
  fill: var(--hidden-text);
}

#result-panel.is-hidden-result .radar-chart svg polygon {
  stroke: rgba(242, 211, 107, 0.26);
}

#result-panel.is-hidden-result .radar-chart svg line {
  stroke: rgba(242, 211, 107, 0.18);
}

#result-panel.is-hidden-result #save-image-button,
#result-panel.is-hidden-result .save-image-button {
  background: linear-gradient(135deg, #f2d36b, #b7842b);
  color: #111827;
  border-color: rgba(242, 211, 107, 0.5);
  box-shadow: 0 12px 26px rgba(242, 211, 107, 0.22);
}

#result-panel.is-hidden-result .primary-button {
  background: linear-gradient(135deg, #f2d36b, #b7842b);
  color: #111827;
}

#result-panel.is-hidden-result .ghost-button {
  border-color: rgba(242, 211, 107, 0.32);
  color: var(--hidden-text);
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100% - 14px, 1080px);
    padding: 8px 0 20px;
  }

  .hero,
  .panel {
    padding: 16px;
    border-radius: 18px;
  }

  .question-media-grid {
    grid-template-columns: minmax(96px, 0.8fr) minmax(150px, 1.35fr);
  }

  .question-media-image {
    height: 150px;
  }

  .quiz-home-button {
    top: 10px;
    right: 10px;
    padding: 7px 10px;
    font-size: 12px;
  }

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

  .brand-wordmark {
    font-size: 15px;
  }

  .hero-player-strip {
    min-height: 124px;
    margin-top: 22px;
    gap: 2px;
  }

  .hero-player {
    height: 108px;
  }

  .hero-player-left,
  .hero-player-right {
    height: 108px;
  }

  .progress-row,
  .result-actions,
  .action-stack {
    flex-direction: column;
    align-items: stretch;
  }

  .progress-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    padding-right: 76px;
  }

  .progress-row > div:first-of-type {
    min-width: 44px;
  }

  .progress-copy {
    font-size: 11px;
    text-align: right;
  }

  .progress-bar {
    height: 8px;
    margin-top: 10px;
  }

  .result-actions {
    grid-template-columns: 1fr;
  }

  .quiz-brand-link {
    gap: 8px;
  }

  .quiz-brand-logo {
    width: 54px;
  }

  .quiz-brand-copy {
    gap: 1px;
    text-align: left;
  }

  .quiz-brand-wordmark {
    font-size: 12px;
    letter-spacing: 0.04em;
  }

  .quiz-brand-subtitle {
    font-size: 11px;
    line-height: 1.25;
  }

  .eyebrow {
    margin-bottom: 2px;
    font-size: 10px;
  }

  .section-title {
    font-size: 24px;
  }

  .result-grid,
  .story-columns {
    grid-template-columns: 1fr;
  }

  .question-card {
    margin-top: 14px;
    padding: 16px;
    border-radius: 16px;
  }

  .question-text {
    font-size: 20px;
    line-height: 1.35;
    min-height: auto;
  }

  .options-list {
    gap: 9px;
    margin-top: 14px;
  }

  .option-button {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 11px 12px;
    border-radius: 14px;
  }

  .option-label {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .option-text {
    font-size: 14px;
    line-height: 1.45;
  }

  .nav-row {
    gap: 10px;
    margin-top: 12px;
  }

  .nav-row button {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* Radar Chart Styles */
.radar-chart {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 10px;
}

.radar-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.dimension-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
  width: 100%;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.legend-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.legend-level {
  font-size: 12px;
  color: var(--muted);
}

.legend-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(29, 42, 47, 0.08);
  overflow: hidden;
}

.legend-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 600ms ease;
}

.level-low {
  background: linear-gradient(90deg, #6b7280, #9ca3af);
}

.level-mid {
  background: linear-gradient(90deg, var(--accent-3), #b8a88a);
}

.level-high {
  background: linear-gradient(90deg, var(--accent), #0d7a6f);
}

@media (max-width: 820px) {
  .dimension-legend {
    grid-template-columns: 1fr;
  }

  .radar-chart {
    max-width: 300px;
    padding: 15px;
  }
}

/* ---- 社交/导流入口 pill(微信 / 小红书 / 主站 / AI预测) ----
   磨砂浅色 pill + 金边,内放彩色品牌 glyph(SVG)与文字标签。
   封面 hero、结算页顶部(--result)与 footer 共用同一套样式与同一个弹窗。 */
.hero-social {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-social--footer {
  margin-top: 18px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(193, 161, 99, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(246, 236, 214, 0.5));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(160, 130, 70, 0.12);
  font-family: inherit;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.social-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(160, 130, 70, 0.2);
}

.social-pill-label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* --art:整张磨砂金 pill 图作为按钮主体,小字标签挂下方;
   按钮本体去掉 CSS 底色边框,避免 pill 套 pill */
.social-pill--art {
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.social-pill--art:hover {
  box-shadow: none;
}

.social-pill-art {
  display: block;
  height: 48px;
  width: auto;
  border-radius: 14px; /* 贴合图内金边圆角,剪掉四角白底 */
  box-shadow: 0 3px 12px rgba(160, 130, 70, 0.18);
}

.social-pill--art .social-pill-label {
  font-size: 12.5px;
  color: var(--muted);
}

@media (max-width: 480px) {
  .social-pill-art {
    height: 42px;
    border-radius: 12px;
  }
}

/* --quiet:封面页脚线风格 —— 细分隔线 + 细线条小图标一行,
   低调不抢「开始测试」CTA;大金 pill 只在结算页出现 */
.hero-social--quiet {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  gap: 26px;
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 150ms ease, color 150ms ease;
}

.quiet-link:hover {
  opacity: 1;
  color: var(--ink);
}

.quiet-icon {
  display: block;
  width: 20px;
  height: 20px;
  color: rgba(150, 122, 64, 0.9); /* 金棕描边,呼应纸面金线 */
  flex: 0 0 auto;
}

@media (max-width: 480px) {
  .hero-social--quiet {
    gap: 16px;
  }
}

/* ---- 「分享赢好礼」金 pill(结算页操作行 + 底部悬浮栏) ---- */
.promo-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border: 1px solid rgba(193, 161, 99, 0.7);
  border-radius: 999px;
  background: linear-gradient(135deg, #cfa961, #e9d3a0);
  color: #33270f;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(170, 125, 40, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease;
  animation: promo-glow 2.4s ease-in-out infinite;
}

.promo-button:hover {
  transform: translateY(-1px);
}

@keyframes promo-glow {
  0%,
  100% {
    box-shadow: 0 6px 18px rgba(170, 125, 40, 0.22);
  }
  50% {
    box-shadow: 0 6px 26px rgba(170, 125, 40, 0.42);
  }
}

/* ---- 活动弹窗(两 tab:分享赢好礼 / 解锁隐藏人格) ---- */
.promo-modal-panel {
  width: min(400px, 100%);
  overflow-y: auto;
}

/* 桌面端放宽:400px 下海报字读不清 */
@media (min-width: 821px) {
  .promo-modal-panel {
    width: min(720px, 92vw);
    max-height: min(88vh, 940px);
  }
}

.promo-tabs {
  display: flex;
  gap: 8px;
}

.promo-tab {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.promo-tab.is-active {
  border-color: rgba(193, 161, 99, 0.7);
  background: linear-gradient(135deg, rgba(233, 211, 160, 0.55), rgba(255, 255, 255, 0.8));
  color: var(--ink);
  font-weight: 600;
}

.promo-pane {
  display: grid;
}

.promo-pane.hidden {
  display: none;
}

.promo-poster {
  display: block;
  width: 100%;
  border-radius: 12px;
  cursor: zoom-in; /* 点击新开原图(JS) */
}

.promo-poster.is-missing {
  display: none;
}

.promo-placeholder {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 230px;
  padding: 18px;
  border: 1px dashed rgba(193, 161, 99, 0.6);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.promo-placeholder strong {
  color: var(--ink);
  font-size: 15.5px;
}

.promo-placeholder-emoji {
  font-size: 30px;
  line-height: 1;
}

.promo-placeholder.hidden {
  display: none;
}

/* 「三步参与」对齐海报动线(①保存结果图 ②发朋友圈集赞 ③截图发公众号兑奖)。
   sticky 钉在弹窗底部:海报完整可滚动阅读,动作按钮始终可见。
   近实底+顶部细线,避免半透明渐变压在海报奖品区上显得混浊。 */
.promo-steps {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 10px;
  margin: 14px -16px -16px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: rgba(252, 249, 241, 0.97);
}

.promo-step {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  text-align: left;
  font-family: inherit;
}

button.promo-step {
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease;
}

button.promo-step:hover {
  border-color: rgba(193, 161, 99, 0.7);
  background: linear-gradient(135deg, rgba(233, 211, 160, 0.35), rgba(255, 255, 255, 0.8));
}

.promo-step-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cfa961, #e9d3a0);
  color: #33270f;
  font-size: 13px;
  font-weight: 700;
}

.promo-step-copy {
  display: grid;
  min-width: 0;
}

.promo-step-copy strong {
  color: var(--ink);
  font-size: 14.5px;
}

/* ---- 弹窗「直接找到我们」一键关注行 ----
   方形金徽章(ref/make-badges.py 由空白金底+品牌icon合成),
   不抢三步卡兑奖主动线,只在 sticky 区底部补一排快捷入口 */
.promo-follow {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.promo-follow-label {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.promo-follow-row {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.promo-follow-pill {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 150ms ease;
}

.promo-follow-pill:hover {
  transform: translateY(-1px);
}

.promo-follow-art {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 13px; /* 贴合徽章图内金边圆角,剪掉四角白底 */
  box-shadow: 0 3px 12px rgba(160, 130, 70, 0.18);
}

@media (max-width: 480px) {
  .promo-follow-row {
    gap: 14px;
  }

  .promo-follow-art {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}

/* ---- 底部渐变悬浮操作栏(结果页) ----
   按钮固定在视口底部上层;栏上沿是 透明→米色 渐变,正文滚到按钮
   后面时平滑淡出。渐变区点击穿透,只有按钮可点。滚到原按钮排时
   整栏自动隐藏(JS 加 .is-docked),避免两排叠加。 */
.result-dock {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 14;
  padding: 46px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(
    to bottom,
    rgba(244, 239, 229, 0) 0%,
    rgba(244, 239, 229, 0.82) 40%,
    rgba(244, 239, 229, 0.96) 100%
  );
  pointer-events: none;
  transition: opacity 200ms ease, visibility 200ms ease;
}

.result-dock-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  pointer-events: auto;
}

.result-dock .ghost-button {
  background: rgba(255, 252, 245, 0.92);
  box-shadow: 0 4px 14px rgba(53, 42, 24, 0.14);
}

.result-dock .primary-button {
  box-shadow: 0 4px 14px rgba(15, 91, 82, 0.28);
}

.result-dock .promo-button {
  padding: 12px 18px;
}

/* dock 第二行:官方入口细线行(复用封面 quiet 词汇)。
   flex-basis 100% 在按钮行上方独占一行;dock 常显→结算即见/截图必带 */
.dock-follow {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 2px;
}

.dock-follow-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.result-dock.is-active {
  display: block;
}

.result-dock.is-docked {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 480px) {
  .result-dock {
    padding-top: 38px;
  }

  .result-dock-inner {
    gap: 8px;
  }

  .result-dock .ghost-button,
  .result-dock .primary-button,
  .result-dock .promo-button {
    padding: 12px 14px;
    font-size: 13.5px;
  }

  .dock-follow {
    gap: 14px;
  }
}

/* ---- 社交弹窗(克隆 save-preview 风格) ---- */
.social-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

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

.social-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 20, 0.58);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.social-modal-panel {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  max-height: min(92vh, 620px);
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(252, 249, 241, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: 0 24px 70px rgba(10, 18, 20, 0.28);
}

.social-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.social-modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.social-modal-copy {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.social-modal-close {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

/* 媒体区:单码居中;微信双码(群聊+公众号)并排,窄屏自动换行堆叠 */
.social-modal-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  justify-items: center;
}

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

.social-modal-media--dual {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.social-modal-qr {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  margin: 0;
}

.social-modal-qr-img {
  display: block;
  width: 100%;
  max-width: 240px;
  object-fit: contain;
  border-radius: 12px;
  background: #fffaf2;
  -webkit-touch-callout: default;
  user-select: auto;
}

.social-modal-qr-caption {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.social-modal-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.social-modal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 6px;
  padding: 12px 24px;
  text-decoration: none;
  text-align: center;
}

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