/* AI 嘉豪 · Claude 气质（暖奶油 + 珊瑚橙，避免大块纯黑）
   bg #FAF9F5 · accent #D97757 · 主按钮暖陶土
*/

:root {
  --bg: #faf9f5;
  --bg-deep: #f3f1ea;
  --surface: #ffffff;
  --ink: #2c2a26;
  --ink-2: #5c574f;
  --muted: #8a847a;
  --line: rgba(44, 42, 38, 0.08);
  --line-strong: rgba(44, 42, 38, 0.14);
  --accent: #d97757;
  --accent-hover: #c46545;
  --accent-deep: #b5573f;
  --accent-soft: rgba(217, 119, 87, 0.12);
  --accent-wash: rgba(217, 119, 87, 0.08);
  --logo-tile: #d97757;
  /* 主按钮：暖陶土，不再用纯黑 */
  --btn: #c46545;
  --btn-hover: #b05538;
  --ok: #3d6b4f;
  --ok-soft: rgba(61, 107, 79, 0.11);
  --bad: #a33b32;
  --bad-soft: rgba(163, 59, 50, 0.09);
  --shadow: 0 1px 2px rgba(44, 42, 38, 0.04), 0 12px 32px rgba(44, 42, 38, 0.05);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  --header-h: 64px;
  --wrap: min(1080px, calc(100% - 40px));
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --coach-w: 240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

body.is-app .site-header {
  display: none;
}

button {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  max-width: 100%;
  display: block;
}
.hidden {
  display: none !important;
}

.view {
  animation: fade 0.28s var(--ease) both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.anim .reveal,
  .view,
  .reveal,
  .anim-pop {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0);
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  width: var(--wrap);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* 隐藏 symbol 精灵图，不占布局 */
.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* Logo：暖橙圆角 + 白星（奶油底上清晰，非黑底） */
.logo-mark {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: block;
  border-radius: 8px;
  /* 轻微软阴影，接近 Claude 产品标质感 */
  filter: drop-shadow(0 1px 2px rgba(217, 119, 87, 0.22));
  transition: filter 0.15s var(--ease), transform 0.15s var(--ease);
}
.logo-mark.sm {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}
.logo:hover .logo-mark {
  filter: drop-shadow(0 2px 6px rgba(217, 119, 87, 0.32));
  transform: translateY(-0.5px);
}
.logo-text {
  color: var(--ink);
  font-weight: 600;
}
.logo.mini {
  font-size: 14px;
}
.logo.mini .logo-text {
  color: var(--ink-2);
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: 0.15s var(--ease);
}
.site-nav a:hover {
  background: rgba(20, 20, 19, 0.05);
  color: var(--ink);
}

/* ── Buttons ── */
.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 999px;
  padding: 10px 18px;
  transition: 0.15s var(--ease);
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}
/* 主按钮：暖陶土 + 白字（替代纯黑，不突兀） */
.btn-primary {
  background: var(--btn);
  color: #fff;
  box-shadow: 0 1px 2px rgba(196, 101, 69, 0.18), 0 6px 16px rgba(196, 101, 69, 0.12);
}
.btn-primary:hover:not(:disabled) {
  background: var(--btn-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(20, 20, 19, 0.04);
}
.btn-lg {
  padding: 13px 22px;
  font-size: 15px;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}
.text-btn {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13.5px;
  padding: 0;
  font-weight: 500;
}
.text-btn:hover {
  color: var(--ink);
}
.text-link {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  border-bottom: 1px solid rgba(20, 20, 19, 0.2);
  padding-bottom: 1px;
}
.text-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Hero 非对称 ── */
.hero {
  width: var(--wrap);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(200px, 0.75fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: end;
}

.kicker {
  margin: 0 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-main h1 {
  margin: 0;
  font-size: clamp(38px, 5.8vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.lede {
  margin: 18px 0 0;
  max-width: 30em;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.stat-stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}
.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.stat-n {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.stat-l {
  font-size: 13px;
  color: var(--muted);
}
.side-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* 陪考官横向条 */
.hero-rail {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.rail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}
.rail-hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 12.5px;
}
.rail-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

/* app.js 渲染的 companion-card 在 rail 里压成横卡 */
.rail-track .companion-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: none;
  transform: none !important;
  transition: border-color 0.15s var(--ease);
}
.rail-track .companion-card:hover {
  border-color: rgba(193, 95, 60, 0.3);
  transform: none !important;
  box-shadow: none;
}
.rail-track .companion-card .avatar {
  aspect-ratio: 1;
  width: 56px;
  padding: 0;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
}
.rail-track .companion-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rail-track .companion-card .meta {
  padding: 0;
  border: none;
}
.rail-track .companion-card .meta strong {
  font-size: 13px;
  font-weight: 600;
}
.rail-track .companion-card .meta span {
  font-size: 11.5px;
  color: var(--muted);
}

/* ── 首页内容带 ── */
.band {
  padding: 64px 0;
}
.band-tint {
  background: var(--bg-deep);
}
.band-inner {
  width: var(--wrap);
  margin: 0 auto;
}
.band-head {
  margin-bottom: 28px;
  max-width: 18em;
}
.band-head h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.band-head.split {
  max-width: none;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: end;
}
.band-aside {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 28em;
}

.feature-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.feature-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.feature-idx {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding-top: 3px;
}
.feature-body h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.feature-body p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 40em;
}

.proctor-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.proctor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 20px 18px;
}
.proctor-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-wash);
  color: var(--accent);
  margin-bottom: 14px;
}
.proctor-icon svg {
  width: 18px;
  height: 18px;
}
.proctor h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.proctor p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
  margin-left: 14px;
}
.timeline-item {
  position: relative;
  padding: 0 0 28px 28px;
  display: grid;
  gap: 4px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-mark {
  position: absolute;
  left: -14px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid rgba(217, 119, 87, 0.28);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.timeline-item h3 {
  margin: 2px 0 6px;
  font-size: 17px;
  font-weight: 600;
}
.timeline-item p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 38em;
}

/* 收尾 CTA：暖色卡片，不用大块黑底 */
.end-cta {
  margin-top: 40px;
  padding: 28px 30px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #fff8f4 0%, #f7ebe3 55%, #f3e4da 100%);
  border: 1px solid rgba(217, 119, 87, 0.22);
  color: var(--ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 8px 28px rgba(217, 119, 87, 0.08);
}
.end-cta h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.end-cta p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

/* ── Footer · 精致卡片式 ── */
.site-footer {
  margin-top: 8px;
  padding: 0 0 36px;
  background: transparent;
}
.site-footer-inner {
  width: var(--wrap);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 32px 28px 18px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(0, 1.6fr);
  gap: 28px 40px;
  align-items: start;
}
.footer-brand .footer-tag {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 22em;
}
.footer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.footer-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border: 1px solid rgba(217, 119, 87, 0.2);
  transition: 0.15s var(--ease);
}
.footer-chip:hover {
  background: var(--accent-soft);
  border-color: rgba(217, 119, 87, 0.35);
  color: var(--accent-hover);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 28px;
}
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.footer-list a,
.footer-list span {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.footer-list a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.footer-list a:hover {
  color: var(--accent);
  border-bottom-color: rgba(217, 119, 87, 0.35);
}
.footer-biz {
  display: inline-flex !important;
  margin-top: 2px;
  font-weight: 600 !important;
  color: var(--accent-deep) !important;
  border-bottom: 1px solid rgba(217, 119, 87, 0.35) !important;
  padding-bottom: 1px;
  width: fit-content;
}
.footer-biz:hover {
  color: var(--accent-hover) !important;
  border-bottom-color: var(--accent-hover) !important;
}
.footer-bottom {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--muted);
}
.footer-motto {
  color: var(--ink-2);
  font-weight: 500;
  letter-spacing: 0.02em;
}
@media (max-width: 960px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 22px 24px;
  }
}
@media (max-width: 640px) {
  .footer-cols {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .site-footer-inner {
    padding: 24px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

/* reveal：默认始终可见，避免 JS/大题库未加载时 Chrome 整页空白
   仅在 app 就绪后加 html.anim 才做入场动画 */
.reveal {
  opacity: 1;
  transform: none;
}
html.anim .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
html.anim .reveal.is-in {
  opacity: 1;
  transform: none;
}
html.anim .reveal[data-d="1"] {
  transition-delay: 0.05s;
}
html.anim .reveal[data-d="2"] {
  transition-delay: 0.1s;
}
html.anim .reveal[data-d="3"] {
  transition-delay: 0.15s;
}
html.anim .reveal[data-d="4"] {
  transition-delay: 0.2s;
}

/* ── Setup ── */
.app-page {
  min-height: 100vh;
  background: var(--bg);
}
.app-bar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: rgba(250, 249, 245, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.bar-spacer {
  width: 64px;
}
.app-body {
  width: min(820px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 64px;
}
.setup-head {
  text-align: left;
  margin-bottom: 22px;
}
.setup-head h1 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.setup-head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 36em;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px;
  margin-bottom: 12px;
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 600;
}
.panel-hint {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}
.rules {
  margin: 0;
  padding-left: 1.1em;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.75;
}
.rules strong {
  color: var(--ink);
  font-weight: 600;
}
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tier-card {
  cursor: pointer;
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 14px;
  color: var(--ink);
  transition: 0.15s var(--ease);
}
.tier-card:hover {
  border-color: rgba(193, 95, 60, 0.35);
}
.tier-card.active {
  border-color: var(--accent);
  background: #fffaf7;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.tier-card .badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 999px;
  margin-bottom: 8px;
  font-family: var(--mono);
}
.tier-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
  font-weight: 600;
}
.tier-card .title {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.tier-card p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.tier-score-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--ink-2);
  font-family: var(--mono);
}
.setup-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.setup-summary {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}
.setup-summary b {
  color: var(--ink);
}
.setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.coach-intro-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.coach-intro-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: var(--bg);
  border: 1px solid var(--line);
}
.coach-intro-item img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-deep);
  flex-shrink: 0;
}
.coach-intro-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.coach-intro-item em {
  display: block;
  font-style: normal;
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
  margin: 2px 0 3px;
}
.coach-intro-item p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* ════════════════════════════════════
   QUIZ · 吃满宽度，消灭大片空白
   ════════════════════════════════════ */
.quiz-layout {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  /* 侧栏更窄，主区吃满 */
  grid-template-columns: var(--coach-w) minmax(0, 1fr);
  background: var(--bg);
}

.quiz-side {
  padding: 14px 12px;
  border-right: 1px solid var(--line);
  background: var(--bg-deep);
  min-width: 0;
}

.quiz-main {
  /* 关键：不要 max-width:760 把右边空死 */
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: 14px 18px 28px;
  display: flex;
  flex-direction: column;
}

.quiz-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}
.quiz-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-2);
  font-weight: 500;
  flex: 1;
  min-width: 0;
}
.quiz-meta .dot {
  opacity: 0.35;
}
.live-score {
  font-size: 11.5px;
  font-family: var(--mono);
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
.live-score b {
  color: var(--accent);
  font-weight: 600;
}

.progress {
  height: 3px;
  background: rgba(20, 20, 19, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}

.quiz-phase {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid rgba(217, 119, 87, 0.22);
  margin-bottom: 10px;
}
.quiz-phase.is-bonus {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.bonus-banner {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--accent-wash);
  border: 1px solid rgba(193, 95, 60, 0.2);
  color: var(--accent-hover);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

/* 答题卡：占满主列 */
.quiz-card {
  position: relative;
  flex: 1;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.react-stamp {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 3px 8px;
  border-radius: 8px;
  transform: rotate(10deg) scale(0.4);
  opacity: 0;
  transition: 0.25s var(--ease);
  pointer-events: none;
  z-index: 2;
}
.react-stamp.show {
  opacity: 0.9;
  transform: rotate(10deg) scale(1);
}
.react-stamp.ok {
  color: var(--ok);
  border-color: var(--ok);
}
.react-stamp.bad {
  color: var(--bad);
  border-color: var(--bad);
}

.q-topic {
  display: inline-flex;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 8px;
}

.q-text {
  margin: 0 0 6px;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.4;
  letter-spacing: -0.02em;
  font-weight: 600;
  padding-right: 4rem;
}

.answer-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* 选项：更密，2 列大屏 */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
  align-content: start;
}

.option {
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 12px 12px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  -webkit-tap-highlight-color: rgba(217, 119, 87, 0.15);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  color: var(--ink);
  transition: 0.12s var(--ease);
  min-height: 48px;
}
.option:hover:not(.locked) {
  border-color: rgba(217, 119, 87, 0.35);
  background: #fff;
}
.option .key {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-2);
  font-family: var(--mono);
}
.option.selected {
  border-color: var(--accent);
  background: #fffaf7;
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.option.correct {
  border-color: var(--ok);
  background: var(--ok-soft);
}
.option.wrong {
  border-color: var(--bad);
  background: var(--bad-soft);
}
/* 判分后仍可点击进入下一题（不用 disabled，避免吞触摸） */
.option.locked {
  cursor: pointer;
}

.explain {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
}
.explain b {
  color: var(--ink);
  font-weight: 600;
}

.quiz-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.coach {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.coach img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
}
.coach-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.coach-text strong {
  font-size: 12px;
  font-weight: 600;
}
.coach-text span {
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.3;
}

/* 侧栏陪考：固定贴顶，语音时轻微高亮 */
.coach-stage {
  position: sticky;
  top: 12px;
}
.coach-stage-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 12px;
  box-shadow: none;
  text-align: center;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.coach-stage.is-speaking .coach-stage-card {
  border-color: rgba(193, 95, 60, 0.45);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.coach-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  min-height: 28px;
}
.coach-lang {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 7px;
  border-radius: 999px;
}
.btn-speak {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  width: 32px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.btn-speak:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.coach-avatar-wrap {
  position: relative;
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
}
.coach-stage-card img,
.coach-avatar-wrap img {
  width: 100%;
  max-height: 180px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, var(--bg));
}
.speak-ring {
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  border: 2px solid transparent;
  pointer-events: none;
}
.coach-stage.is-speaking .speak-ring {
  border-color: var(--accent);
  animation: pulse-ring 1s var(--ease) infinite;
}
@keyframes pulse-ring {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.02);
  }
}
.coach-voice-note {
  margin: 8px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
}
.btn-voice.is-muted {
  opacity: 0.7;
  border-style: dashed;
}
body.voice-muted .btn-speak {
  opacity: 0.55;
}
.coach-stage-meta {
  margin-top: 8px;
  text-align: left;
}
.coach-stage-meta .vibe {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.vibe-ico {
  display: inline-flex;
  width: 11px;
  height: 11px;
}
.vibe-ico svg {
  width: 100%;
  height: 100%;
}
.coach-stage-meta strong {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 500;
}
.coach-stage-meta b {
  display: block;
  font-size: 14.5px;
  margin: 2px 0 4px;
  font-weight: 600;
}
.coach-stage-meta p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.4;
}
.coach-bubble {
  margin-top: 8px;
  background: #fff8f4;
  color: var(--ink);
  border: 1px solid rgba(217, 119, 87, 0.2);
  font-size: 12px;
  line-height: 1.4;
  padding: 9px 10px;
  border-radius: 10px 10px 10px 4px;
  text-align: left;
}
.anim-pop {
  animation: pop 0.28s var(--ease) both;
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Result */
.result-page {
  min-height: 100vh;
  padding: 36px 14px 64px;
  background: var(--bg);
}
.result-card {
  width: min(700px, 100%);
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  text-align: center;
}
.result-kicker {
  margin: 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.persona-img {
  width: min(200px, 64vw);
  margin: 16px auto 6px;
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--bg);
}
.persona-img img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}
.persona-visual-tip {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.rarity {
  display: inline-block;
  margin-top: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid rgba(217, 119, 87, 0.25);
}
.persona-name {
  margin: 12px 0 4px;
  font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -0.03em;
  font-weight: 600;
}
.persona-en {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-family: var(--mono);
}
.persona-blurb {
  max-width: 34em;
  margin: 14px auto 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.traits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 8px;
}
.traits span {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-size: 12.5px;
  font-weight: 500;
}
.score-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.score-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 8px;
}
.score-box b {
  display: block;
  font-size: 22px;
  letter-spacing: -0.03em;
  font-weight: 600;
}
.score-box span {
  font-size: 11.5px;
  color: var(--muted);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}
.badges .b {
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid rgba(217, 119, 87, 0.22);
}
.advice {
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 10px 0 14px;
}
.advice b {
  color: var(--ink);
  font-weight: 600;
}
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.wrong-list {
  margin-top: 22px;
  text-align: left;
}
.wrong-list h4 {
  margin: 0 0 8px;
  font-weight: 600;
}
.wrong-item {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.wrong-item b {
  color: var(--ink);
  font-weight: 600;
}

/* ── 响应式 ── */
@media (max-width: 1100px) {
  :root {
    --coach-w: 210px;
  }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .band-head.split {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .rail-track {
    grid-template-columns: 1fr 1fr;
  }
  .proctor-board {
    grid-template-columns: 1fr 1fr;
  }
  .options {
    grid-template-columns: 1fr;
  }

  /* 平板/手机：陪考官顶栏横条，主区全宽 */
  .quiz-layout {
    grid-template-columns: 1fr;
  }
  .quiz-side {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
  }
  /* 窄屏：头像 + 文案横排，台词/语音条全宽，避免多子节点乱折 */
  .coach-stage-card {
    position: static;
    display: grid;
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "top top"
      "img meta"
      "bubble bubble"
      "note note";
    gap: 8px 10px;
    text-align: left;
    align-items: center;
    padding: 10px;
  }
  .coach-stage-top {
    grid-area: top;
    margin-bottom: 0;
  }
  .coach-avatar-wrap {
    grid-area: img;
    max-width: 64px;
    margin: 0;
  }
  .coach-stage-card img,
  .coach-avatar-wrap img {
    width: 64px;
    max-height: 64px;
    margin: 0;
  }
  .coach-stage-meta {
    grid-area: meta;
    margin-top: 0;
  }
  .coach-bubble {
    grid-area: bubble;
    margin-top: 0;
  }
  .coach-voice-note {
    grid-area: note;
    margin-top: 0;
    display: none; /* 窄屏省高，靠气泡与喇叭即可 */
  }
  .coach-stage-meta p {
    display: none;
  }
  .coach-stage-meta .vibe {
    display: none;
  }
  .coach-stage-card {
    padding: 8px 10px;
    gap: 6px 10px;
  }
  .coach-bubble {
    font-size: 11.5px;
    padding: 7px 9px;
  }
  .quiz-main {
    padding: 12px 12px 24px;
  }
  .quiz-card {
    padding: 14px;
  }
  .q-text {
    font-size: 16.5px;
    padding-right: 3.2rem;
  }
}

@media (max-width: 640px) {
  :root {
    --wrap: calc(100% - 28px);
    --header-h: 58px;
  }
  /* 小屏导航：只留「开始测试」，避免挤爆 */
  /* 小屏只保留主按钮，隐藏文字链 */
  .site-nav > a {
    display: none;
  }
  .site-nav a {
    padding: 6px 8px;
    font-size: 12.5px;
  }
  .options {
    touch-action: manipulation;
  }
  .rail-track,
  .proctor-board,
  .tier-grid,
  .coach-intro-list,
  .score-row {
    grid-template-columns: 1fr;
  }
  .rail-track {
    grid-template-columns: 1fr 1fr;
  }
  .feature-row {
    grid-template-columns: 40px 1fr;
  }
  .quiz-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .quiz-foot .btn {
    width: 100%;
  }
  .coach {
    width: 100%;
  }
  .quiz-top {
    gap: 8px;
  }
  .quiz-meta {
    flex: 1 1 100%;
    order: -1;
  }
  .btn-voice .voice-lab {
    display: none;
  }
  .live-score {
    font-size: 11px;
    padding: 4px 8px;
  }
}

/* 桌面：侧栏已有陪考官，底栏只留按钮，避免重复 */
@media (min-width: 901px) {
  .quiz-foot .coach {
    display: none;
  }
  .quiz-foot {
    justify-content: flex-end;
  }
}
