/* ============================================================
 * 《你是时代峰峻里的谁？》样式
 * 主题：奶油橘底 + 橙 #f39800 · 系统无衬线字体 · 移动优先
 * 结果页：白色海报卡（横幅/大名字/图片位/引号金句）+ 描边内容卡
 * ============================================================ */

:root {
  --orange: #f39800;
  --orange-deep: #d97f00;
  --orange-soft: rgba(243, 152, 0, 0.14);
  --orange-line: rgba(243, 152, 0, 0.55);
  --bg: #fcd9a6;              /* 奶油橘页面底色 */
  --card: #ffffff;
  --card-line: rgba(0, 0, 0, 0.1);
  --text: #241a0d;
  --text-dim: rgba(62, 42, 10, 0.68);
  --text-faint: rgba(62, 42, 10, 0.46);
  --radius: 20px;
  color-scheme: light;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "TFJ Serif", Georgia, "Times New Roman", "Songti SC", "STSong",
    "SimSun", "Noto Serif SC", "Source Han Serif SC", serif;
  -webkit-font-smoothing: antialiased;
  font-weight: 600;
  line-height: 1.65;
  overflow-x: hidden;
}

/* ---------- 背景光效（橘底上做淡白晕染） ---------- */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.bg-glow-top {
  width: 560px; height: 560px;
  top: -260px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 62%);
}
.bg-glow-bottom {
  width: 480px; height: 480px;
  bottom: -240px; right: -160px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0) 60%);
}

/* ---------- 顶部进度条 ---------- */
#progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 50;
  background: rgba(0, 0, 0, 0.1);
  opacity: 0; transition: opacity 0.3s;
}
body.quiz-mode #progress { opacity: 1; }
#progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #d97f00, var(--orange), #ffcf70);
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 布局与屏幕切换 ---------- */
#app { position: relative; z-index: 1; min-height: 100vh; }
.wrap { max-width: 480px; margin: 0 auto; padding: 0 22px; }
.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.4s ease both; }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.pc-only { display: none; }
@media (min-width: 480px) { .pc-only { display: inline; } }

/* ---------- 首页 ---------- */
.hero { padding-top: 15vh; padding-bottom: 60px; text-align: center; }
@media (max-height: 700px) { .hero { padding-top: 10vh; } }

.pill {
  display: inline-block;
  font-size: 12px; letter-spacing: 3px;
  color: var(--orange-deep);
  border: 1px solid var(--orange-line);
  border-radius: 999px;
  padding: 5px 16px 5px 19px;
  margin-bottom: 26px;
  background: rgba(255, 255, 255, 0.55);
}

.hero-title {
  font-size: clamp(34px, 10vw, 48px);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: 1px;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-title .accent { color: var(--orange-deep); }

.hero-sub {
  font-size: 14.5px;
  color: var(--text-dim);
  margin-bottom: 34px;
}

.hero-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 18px;
  margin-bottom: 42px;
}
.stat { display: flex; flex-direction: column; min-width: 64px; }
.stat b {
  font-size: 30px; font-weight: 900; color: var(--orange-deep);
  line-height: 1.2;
}
.stat span { font-size: 12px; color: var(--text-faint); letter-spacing: 2px; }
.stat-line { width: 1px; height: 34px; background: rgba(0, 0, 0, 0.16); }

.hero-hint { margin-top: 18px; font-size: 12.5px; color: var(--text-faint); letter-spacing: 1px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; width: 100%;
  border: none; cursor: pointer;
  font-family: inherit; font-size: 17px; font-weight: 800;
  letter-spacing: 6px; text-indent: 6px;
  border-radius: 999px; padding: 16px 0;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #ffb340, var(--orange) 55%, #e08600);
  color: #000;
  box-shadow: 0 10px 30px rgba(180, 105, 0, 0.35);
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(180, 105, 0, 0.45); }

.btn-ghost {
  display: block; margin: 26px auto 0;
  background: none; border: none; cursor: pointer;
  color: var(--text-faint); font-size: 13.5px; font-family: inherit; font-weight: 600;
  letter-spacing: 2px; padding: 10px 18px;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--text-dim); }
.btn-ghost.hidden { visibility: hidden; }

/* ---------- 答题页 ---------- */
.quiz { padding-top: 9vh; padding-bottom: 60px; }
.quiz-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 14px; }
.q-index {
  font-size: 15px; font-weight: 900; color: var(--orange-deep);
  letter-spacing: 2px;
}
.q-total { font-size: 13px; color: var(--text-faint); letter-spacing: 1px; }

.q-text {
  font-size: clamp(20px, 5.6vw, 24px);
  font-weight: 800; line-height: 1.5;
  margin-bottom: 30px; min-height: 2.9em;
}

.options { display: flex; flex-direction: column; gap: 12px; }

.option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  background: var(--card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  padding: 15px 16px;
  color: var(--text);
  font-family: inherit; font-size: 15.5px; font-weight: 600; line-height: 1.55;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(150, 90, 0, 0.1);
  transition: border-color 0.18s, background 0.18s, transform 0.12s, box-shadow 0.18s;
  animation: screenIn 0.35s ease both;
}
.option:hover { border-color: var(--orange-line); box-shadow: 0 4px 18px rgba(150, 90, 0, 0.18); }
.option:active { transform: scale(0.985); }
.option .letter {
  flex: 0 0 30px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--orange-line);
  border-radius: 50%;
  color: var(--orange-deep); font-size: 13px; font-weight: 800;
  transition: background 0.18s, color 0.18s;
}
.option.selected {
  border-color: var(--orange);
  background: #fff4e0;
}
.option.selected .letter { background: var(--orange); color: #fff; border-color: var(--orange); }
.option.picked-flash { border-color: var(--orange); background: #ffe7bd; }

/* ---------- 计算页 ---------- */
.loading {
  min-height: 72vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
}
.loader { display: flex; gap: 10px; margin-bottom: 30px; }
.loader span {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--orange);
  animation: bounce 1s ease-in-out infinite;
}
.loader span:nth-child(2) { animation-delay: 0.15s; }
.loader span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-12px); opacity: 1; }
}
.loading-text { font-size: 14.5px; color: var(--text-dim); letter-spacing: 2px; min-height: 1.6em; }

/* ---------- 结果页：白色海报主卡 ---------- */
.result { padding-top: 10vh; padding-bottom: 70px; }

.r-block { animation: screenIn 0.5s ease both; animation-delay: var(--d, 0s); }

.poster-card {
  position: relative;
  background: var(--card);
  border-radius: 26px;
  padding: 58px 24px 30px;
  box-shadow: 0 12px 34px rgba(150, 90, 0, 0.22);
  text-align: center;
}
.poster-ribbon {
  position: absolute; top: -30px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ffb340, var(--orange) 60%, #e08600);
  color: #fff;
  font-size: 19px; font-weight: 800; letter-spacing: 3px; text-indent: 3px;
  padding: 13px 36px;
  border-radius: 18px;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(180, 105, 0, 0.35);
}
.poster-name {
  font-size: clamp(38px, 11vw, 46px);
  font-weight: 900;
  letter-spacing: 3px;
  line-height: 1.2;
  margin-bottom: 20px;
}
.poster-match { padding: 4px 0 24px; }
.poster-match .m-label {
  font-size: 12.5px; letter-spacing: 6px; text-indent: 6px;
  color: var(--text-faint); margin-bottom: 2px;
}
.poster-match .m-value {
  font-size: 50px; font-weight: 900; color: var(--orange-deep);
  line-height: 1.15;
}
.poster-match .m-value i {
  font-style: normal; font-size: 22px; font-weight: 800; margin-left: 2px;
}
.poster-quote {
  text-align: center;
  padding: 0 4px;
}
.poster-quote p { color: var(--text); line-height: 1.8; }
.poster-quote .q-mark {
  display: inline-block;
  font-weight: 900; color: var(--orange);
  font-family: Georgia, "Songti SC", serif;
  line-height: 0;
  margin: 0 4px;
}
.poster-quote .q-keep { white-space: nowrap; }
/* 句长自适应字号：短句大字、长句小字 */
.poster-quote.q-s p { font-size: 20px; font-weight: 800; line-height: 1.7; }
.poster-quote.q-s .q-mark { font-size: 36px; vertical-align: -10px; }
.poster-quote.q-m p { font-size: 17px; font-weight: 700; }
.poster-quote.q-m .q-mark { font-size: 32px; vertical-align: -8px; }
.poster-quote.q-l p { font-size: 15.5px; font-weight: 600; }
.poster-quote.q-l .q-mark { font-size: 30px; vertical-align: -7px; }

/* ---------- 结果页：描边内容卡 ---------- */
.outline-card {
  border: 2px solid var(--orange-line);
  border-radius: 22px;
  padding: 18px 20px;
  margin-top: 22px;
  margin-bottom: 16px;
  background: var(--card);
  box-shadow: 0 4px 18px rgba(150, 90, 0, 0.12);
}
.outline-card p { font-size: 14.5px; color: rgba(50, 32, 8, 0.85); }

.r-title {
  text-align: center;
  font-size: 20px; font-weight: 900;
  color: var(--orange-deep);
  margin-bottom: 12px;
  letter-spacing: 1px;
}
.r-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.badge {
  font-size: 11.5px; letter-spacing: 1.5px;
  border-radius: 999px; padding: 3px 12px;
}
.badge.route { color: var(--orange-deep); border: 1px solid var(--orange-line); background: #fff; }
.badge.proto { color: var(--text-dim); border: 1px solid rgba(0, 0, 0, 0.16); background: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.chip {
  font-size: 12.5px; letter-spacing: 1px;
  color: var(--orange-deep);
  background: #fff;
  border: 1px solid rgba(243, 152, 0, 0.4);
  border-radius: 999px; padding: 5px 15px;
}

.card-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 800; color: var(--orange-deep);
  letter-spacing: 3px; margin-bottom: 10px;
}
.card-label::before {
  content: ""; width: 4px; height: 14px; border-radius: 2px;
  background: var(--orange);
}

/* 七维人格 */
.dim-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.dim-row:last-child { margin-bottom: 2px; }
.dim-key {
  flex: 0 0 18px; text-align: center;
  font-size: 12px; font-weight: 900; color: var(--orange-deep);
}
.dim-label { flex: 0 0 62px; font-size: 12px; color: var(--text-dim); }
.dim-track { flex: 1; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.13); overflow: hidden; }
.dim-fill {
  height: 100%; width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #d97f00, var(--orange), #ffcf70);
  transition: width 0.9s cubic-bezier(0.25, 1, 0.35, 1);
}

/* 五代彩蛋 */
.egg-card {
  margin-top: 34px;
  border: 1.5px dashed var(--orange-deep);
  border-radius: 22px;
  padding: 26px 22px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(150, 90, 0, 0.16);
  text-align: center;
  animation: eggIn 0.7s ease both;
}
@keyframes eggIn {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}
.egg-star { color: var(--orange); font-size: 18px; letter-spacing: 8px; margin-bottom: 10px; }
.egg-title {
  font-size: 21px; font-weight: 900; color: var(--orange-deep);
  margin-bottom: 6px;
}
.egg-sub { font-size: 12.5px; color: var(--text-faint); letter-spacing: 2px; margin-bottom: 22px; }
.egg-name { font-size: 26px; font-weight: 900; margin-bottom: 6px; }
.egg-proto { font-size: 12.5px; color: var(--text-dim); letter-spacing: 2px; margin-bottom: 16px; }
.egg-text { font-size: 14px; color: rgba(50, 32, 8, 0.82); margin-bottom: 8px; }
.egg-quote { font-size: 14.5px; color: var(--orange-deep); letter-spacing: 1px; }

.restart-row { margin-top: 40px; }

/* ---------- 页脚 ---------- */
.site-footer {
  position: relative; z-index: 1;
  text-align: center;
  font-size: 11px; color: var(--text-faint);
  letter-spacing: 1px;
  padding: 0 30px calc(26px + env(safe-area-inset-bottom));
}

/* ============================================================
 * 视觉升级：聚光灯束 / 名字墙 / 进度灯点 / 计算翻转 / 帷幕转场
 * 匹配度圆环 / 奖状海报 / 七维雷达 / 终极彩蛋彩纸
 * ============================================================ */

/* ---------- 首页：舞台聚光灯束 ---------- */
#screen-home { position: relative; overflow: hidden; }
.hero { position: relative; z-index: 1; }
.spotlight {
  position: absolute; top: -40px; left: 50%;
  width: 300px; height: 76vh;
  transform-origin: top center;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,0));
  clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%);
  opacity: 0.55; filter: blur(2px);
  pointer-events: none;
  animation: spotlight-sway 7s ease-in-out infinite alternate;
}
.spotlight-2 {
  width: 170px; height: 58vh; left: 20%;
  opacity: 0.32; animation-duration: 9.5s; animation-delay: -3.5s;
}
@keyframes spotlight-sway {
  from { transform: rotate(-4deg); }
  to { transform: rotate(4deg); }
}

/* ---------- 首页：人物名字墙跑马灯 ---------- */
.name-wall {
  margin: 28px -22px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.name-track {
  display: inline-flex; white-space: nowrap;
  animation: wall-scroll 38s linear infinite;
  will-change: transform;
}
.name-track span { font-size: 13px; color: var(--text-faint); letter-spacing: 1px; }
.name-track span i { font-style: normal; color: var(--orange); margin: 0 14px; }
@keyframes wall-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- 答题页：舞台灯进度点 ---------- */
.quiz-dots { display: flex; gap: 7px; margin-bottom: 20px; }
.quiz-dots .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(0,0,0,0.12);
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.quiz-dots .dot.lit { background: var(--orange); box-shadow: 0 0 8px rgba(243,152,0,0.55); }
.quiz-dots .dot.now { background: var(--orange-deep); transform: scale(1.3); }

/* ---------- 计算页：扫描光束 + 神秘卡翻转 ---------- */
.loading { position: relative; overflow: hidden; }
.scan-beam {
  position: absolute; top: 0; bottom: 0; width: 90px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: scan-sweep 1.6s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes scan-sweep { from { left: 4%; } to { left: 86%; } }
.mystery-card {
  position: relative; width: 132px; height: 178px;
  margin-bottom: 30px; perspective: 900px;
}
.m-face {
  position: absolute; inset: 0;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 30px rgba(150,90,0,0.25);
}
.m-front {
  background: linear-gradient(160deg, #fff7e8, #ffe7bd);
  border: 2px solid var(--orange-line);
  color: var(--orange-deep); font-size: 46px; font-weight: 900;
  animation: mystery-flip 1.9s ease-in-out infinite;
}
.m-back {
  background: linear-gradient(160deg, #ffb340, var(--orange) 55%, #e08600);
  transform: rotateY(180deg);
  color: #fff; font-size: 42px; letter-spacing: 4px;
}
@keyframes mystery-flip {
  0%, 42% { transform: rotateY(0); }
  58%, 100% { transform: rotateY(180deg); }
}

/* ---------- 全局：帷幕转场 ---------- */
#curtain { position: fixed; inset: 0; z-index: 90; pointer-events: none; visibility: hidden; overflow: hidden; }
#curtain.sweep { visibility: visible; }
#curtain .curtain-inner {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.05) 0 12px, transparent 12px 30px),
    linear-gradient(120deg, #ffb340, var(--orange) 45%, #d97f00);
  transform: translateX(-105%);
  box-shadow: 0 0 50px rgba(0,0,0,0.25);
}
#curtain.sweep .curtain-inner { animation: curtain-sweep 0.55s ease-in-out both; }
@keyframes curtain-sweep {
  0% { transform: translateX(-105%); }
  45%, 55% { transform: translateX(0); }
  100% { transform: translateX(105%); }
}

/* ---------- 结果页：匹配度环形进度 ---------- */
.poster-match {
  padding: 4px 0 22px;
  display: flex; flex-direction: column; align-items: center;
}
.poster-match .m-label {
  font-size: 12.5px; letter-spacing: 6px; text-indent: 6px;
  color: var(--text-faint); margin-bottom: 6px;
}
.ring-wrap { position: relative; width: 128px; height: 128px; }
.ring-track { fill: none; stroke: rgba(243,152,0,0.16); stroke-width: 10; }
.ring-fill {
  fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: center;
  stroke-dasharray: 339.292; stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.3s cubic-bezier(0.25, 1, 0.35, 1) 0.3s;
  filter: drop-shadow(0 0 6px rgba(243,152,0,0.4));
}
.ring-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900; color: var(--orange-deep);
}
.ring-num i { font-style: normal; font-size: 15px; font-weight: 800; margin: 10px 0 0 2px; }

/* ---------- 结果页：奖状感海报 ---------- */
.poster-card::before {
  content: ""; position: absolute; inset: 12px;
  border: 1.5px solid rgba(217,127,0,0.28);
  border-radius: 18px;
  pointer-events: none;
}
.sunburst {
  position: absolute; top: 26px; left: 50%;
  width: 330px; height: 330px; margin-left: -165px;
  background: repeating-conic-gradient(from 0deg, rgba(243,152,0,0.10) 0deg 9deg, transparent 9deg 18deg);
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  mask-image: radial-gradient(circle, #000 0%, transparent 68%);
  pointer-events: none; opacity: 0.85;
  animation: sun-spin 46s linear infinite;
}
@keyframes sun-spin { to { transform: rotate(360deg); } }
.p-star { position: absolute; color: var(--orange); opacity: 0.55; font-size: 13px; pointer-events: none; }
.p-star.tl { top: 20px; left: 20px; }
.p-star.br { bottom: 16px; right: 20px; }

/* ---------- 结果页：七维雷达图 ---------- */
.radar-wrap { display: flex; justify-content: center; padding-top: 4px; }
.radar-wrap svg { overflow: visible; }
.radar-grid { fill: none; stroke: rgba(0,0,0,0.12); stroke-width: 1; }
.radar-axis { stroke: rgba(0,0,0,0.08); stroke-width: 1; }
.radar-poly {
  fill: rgba(243,152,0,0.22); stroke: var(--orange); stroke-width: 2; stroke-linejoin: round;
  transform-box: fill-box; transform-origin: center;
  transition: transform 1s cubic-bezier(0.25, 1, 0.35, 1) 0.35s;
}
.radar-dot { fill: #fff; stroke: var(--orange); stroke-width: 2; }
.radar-label { font-size: 11px; fill: var(--text-dim); text-anchor: middle; font-weight: 600; }
.radar-legend {
  margin-top: 4px; text-align: center;
  font-size: 11px; color: var(--text-faint); letter-spacing: 1px;
}

/* ---------- 终极彩蛋：彩纸雨 ---------- */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 80; }
.confetti { position: absolute; top: -5vh; animation: confetti-fall linear both; }
@keyframes confetti-fall {
  0% { transform: translateY(-6vh) rotate(0deg); opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(108vh) rotate(660deg); opacity: 0; }
}

/* ---------- 首页：背景名字带（三条斜向大字滚动带） ---------- */
.name-bg {
  position: absolute; inset: 0;
  overflow: hidden; pointer-events: none; z-index: 0;
}
.name-band {
  position: absolute; left: -12%; width: 124%;
  padding: 14px 0; overflow: hidden;
}
.band-1 { top: 4%; transform: rotate(-7deg); background: rgba(255,255,255,0.42); }
.band-2 { top: 36%; transform: rotate(6deg); background: rgba(243,152,0,0.07); }
.band-3 { top: 66%; transform: rotate(-9deg); background: rgba(255,255,255,0.34); }
.band-track {
  display: inline-flex; white-space: nowrap;
  font-size: 46px; font-weight: 900; letter-spacing: 3px;
  color: rgba(217,127,0,0.15);
  animation: wall-scroll 64s linear infinite;
  will-change: transform;
}
.band-track span i { font-style: normal; margin: 0 26px; }
.band-2 .band-track { animation-duration: 82s; animation-direction: reverse; }
.band-3 .band-track { animation-duration: 55s; }

/* ---------- 全局：光标聚光灯（黑蒙版被指针掏空，边缘羽化模拟光源） ----------
   单元素实现：#torch-light 是一个透明圆，自身背景从中心透明渐变到蒙版色（羽化边），
   box-shadow 0 0 0 9999px 把圆外整页压上同一色值的蒙版；位置更新只写 transform，
   走合成器动画，移动端流畅。触屏抬手后整体淡出。 */
#torch-light {
  position: fixed; left: 0; top: 0; z-index: 70;
  width: 300px; height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 52%,
    rgba(0,0,0,0.22) 78%);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.22);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
  will-change: transform;
}
body.torch-on #torch-light { opacity: 1; }
body.torch-off #torch-light { opacity: 0; }
@media (pointer: coarse) {
  #torch-light { width: 260px; height: 260px; margin: -130px 0 0 -130px; }
}
@media (prefers-reduced-motion: reduce) {
  #torch-light { display: none; }
}

/* 聚光灯仅首页生效：非首页隐藏光圈 */
#torch-light { display: none; }
body.torch-home #torch-light { display: block; }

/* ---------- 结果页：头像嵌环 + 弧末引线（独立 av- 类名，避免与匹配度旧环样式冲突） ---------- */
.callout-ring { position: relative; width: 260px; height: 260px; margin: 6px auto 14px; }
.callout-ring svg { display: block; overflow: visible; }
.av-track { fill: none; stroke: rgba(243,152,0,0.16); stroke-width: 9; }
.av-arc {
  fill: none; stroke: var(--orange); stroke-width: 9;
  stroke-linecap: round; stroke-linejoin: round;
  transition: stroke-dashoffset 1.2s cubic-bezier(0.25, 1, 0.35, 1) 0.3s;
}
.av-dot { fill: var(--orange); stroke: #fff; stroke-width: 2.5; opacity: 0; transition: opacity 0.4s ease 1.35s; }
.av-lead { fill: none; stroke: var(--orange-deep); stroke-width: 2; opacity: 0; transition: opacity 0.4s ease 1.45s; }
.av-pct {
  font-family: Georgia, serif; font-size: 18px; font-weight: 900;
  fill: var(--orange-deep); opacity: 0; transition: opacity 0.4s ease 1.5s;
}
.av-center {
  position: absolute; inset: 63px; border-radius: 50%; overflow: hidden;
  background: #fff7e8;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(150,90,0,0.18);
}
.av-center img { width: 100%; height: 100%; object-fit: cover; }
.av-center .av-letter { font-size: 56px; font-weight: 900; color: var(--orange-deep); }
.meta-line {
  text-align: center; font-size: 13px; color: var(--text-dim);
  letter-spacing: 1px; margin: 2px 0 14px;
}
.meta-line b { color: var(--orange-deep); font-size: 15px; }

/* ---------- 雷达图点位交互：悬停/点按显示百分比 ---------- */
.radar-hit { fill: transparent; cursor: pointer; }
.radar-tip { transition: opacity 0.18s ease; pointer-events: none; }
.radar-tip-box { fill: rgba(36,26,13,0.92); stroke: rgba(243,152,0,0.55); stroke-width: 1; }
.radar-tip-text { fill: #fff; font-size: 12.5px; font-weight: 600; font-family: inherit; }

/* 首页开始按钮：改为内容宽度（不通栏） */
#btn-start {
  width: auto;
  padding: 16px 56px;
}

/* 匹配度与原型分两行 */
.meta-line { margin-bottom: 4px; }
.meta-proto {
  text-align: center; font-size: 12.5px; color: var(--text-dim);
  letter-spacing: 1px; margin-bottom: 14px;
}

/* ---------- 门禁：邀请码解锁页 ---------- */
.gate { padding-top: 16vh; text-align: center; }
.gate-title { font-size: clamp(28px, 8vw, 40px); font-weight: 900; margin-bottom: 8px; }
.gate-sub { font-size: 14px; color: var(--text-dim); margin-bottom: 34px; }
.gate-input {
  width: 100%; max-width: 320px; display: block; margin: 0 auto 18px;
  background: #fff; border: 2px solid var(--orange-line); border-radius: 14px;
  padding: 15px 16px; text-align: center;
  font-family: inherit; font-size: 18px; font-weight: 800; letter-spacing: 2px;
  color: var(--text); text-transform: uppercase;
}
.gate-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(243,152,0,0.18); }
.gate-error { min-height: 1.5em; font-size: 13.5px; color: #b03a2e; margin-top: 14px; }
.gate-notice {
  margin-top: 26px; font-size: 11.5px; color: var(--text-faint);
  line-height: 1.9; font-family: sans-serif; font-weight: 400;
}

/* ---------- 首页内联解锁框（点开始测试后出现） ---------- */
#unlock-box { margin-top: -6px; }
.gate-input.inline {
  display: block; width: 300px; max-width: 86%;
  margin: 0 auto 14px; padding: 14px 16px; font-size: 17px;
}
.btn-unlock-inline { width: auto; padding: 14px 52px; font-size: 16px; }

/* 开始/解锁按钮统一：干净胶囊形，半透明橙底 + 清晰文字（已取消羽化/光晕） */
#btn-start, #btn-unlock {
  position: relative;
  width: auto;
  padding: 16px 56px;
  font-size: 18px;
  font-weight: 700;
  color: rgba(36, 26, 13, 0.92);
  border-radius: 999px;
  background: linear-gradient(135deg,
    rgba(255, 179, 64, 0.62),
    rgba(243, 152, 0, 0.62) 55%,
    rgba(224, 134, 0, 0.62));
  box-shadow: 0 8px 22px rgba(180, 105, 0, 0.18);
  transition: background 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, transform 0.18s ease;
}
#btn-start:hover, #btn-unlock:hover {
  background: linear-gradient(135deg,
    rgba(255, 179, 64, 0.78),
    rgba(243, 152, 0, 0.78) 55%,
    rgba(224, 134, 0, 0.78));
  box-shadow: 0 10px 26px rgba(180, 105, 0, 0.26);
}

/* 开始按钮 → 输码框 过渡动画 */
#btn-start.hiding { opacity: 0; transform: translateY(-6px) scale(0.97); }
#btn-start.btn-loading { animation: pulseGlow 0.9s ease-in-out infinite; }
@keyframes pulseGlow { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
#unlock-box.entering { animation: unlockIn 0.28s cubic-bezier(0.25, 1, 0.35, 1) both; }
@keyframes unlockIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* 名字带位置改用视口高度锚定：开始按钮→输码框切换时页面高度变化，
   百分比定位会被拉开，vh 定位保持三条带子始终在同一位置 */
.band-1 { top: 4vh; }
.band-2 { top: 36vh; }
.band-3 { top: 66vh; }
