:root {
  --ink: #0a2450;
  --ink-soft: #24406e;
  --blue: #1557c8;
  --blue-2: #2f7bea;
  --blue-deep: #0b2a5b;
  --sky: #eaf3ff;
  --sky-2: #dce9ff;
  --green: #2fb37a;
  --green-2: #3ec98a;
  --green-soft: #e6f8ef;
  --yellow: #ffd35c;
  --red: #e25454;
  --paper: #f4f8ff;
  --card: #ffffff;
  --muted: #5b6f8f;
  --line: #dbe7f8;
  --shadow: 0 18px 48px rgba(16, 51, 120, 0.12);
  --shadow-sm: 0 8px 22px rgba(16, 51, 120, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(47, 123, 234, 0.14), transparent 60%),
    radial-gradient(900px 480px at -10% 18%, rgba(47, 179, 122, 0.10), transparent 55%),
    var(--paper);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img, svg { display: block; }

.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-binary {
  position: absolute;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  letter-spacing: 4px;
  color: rgba(21, 87, 200, 0.07);
  writing-mode: vertical-rl;
  user-select: none;
}
.bg-binary.b1 { top: 12%; right: 4%; }
.bg-binary.b2 { top: 46%; left: 2%; }
.bg-binary.b3 { bottom: 3%; right: 14%; letter-spacing: 7px; }
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
}
.bg-glow.g1 { width: 360px; height: 360px; background: #bfd8ff; top: -120px; right: -80px; }
.bg-glow.g2 { width: 300px; height: 300px; background: #c8f3de; left: -120px; top: 42%; }

/* ---------- 顶部 ---------- */
.site-head {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 22px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.ccf-mark { width: 46px; height: 46px; flex: none; filter: drop-shadow(0 3px 8px rgba(21, 87, 200, 0.16)); }
.ccf-mark svg { width: 100%; height: 100%; }
.ccf-mark.mini { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-size: 15px; letter-spacing: 0.02em; }
.brand-text small { font-size: 12px; color: var(--muted); letter-spacing: 0.14em; }
.head-nav { display: flex; align-items: center; gap: 8px; }
.head-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}
.head-nav a:hover { background: #fff; color: var(--blue); box-shadow: var(--shadow-sm); }

main {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 0 24px 72px;
}

.view { animation: fadeUp 0.45s ease both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 首页 Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 20px;
  padding: 34px 0 10px;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line);
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47, 179, 122, 0.16); }

.hero-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 18px 0 2px;
  line-height: 0.92;
}
.hero-title .num {
  display: inline-block;
  font-size: clamp(78px, 10.5vw, 136px);
  font-weight: 900;
  letter-spacing: -0.05em;
  background: linear-gradient(165deg, #4a91ff 4%, #1557c8 45%, #0a2f78 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: skew(-5deg);
  filter: drop-shadow(0 10px 20px rgba(21, 87, 200, 0.18));
}
.hero-title .cn {
  position: relative;
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.hero-title .cn::after {
  content: "";
  position: absolute;
  left: 2%;
  right: -2%;
  bottom: 2px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 211, 92, 0.9), rgba(255, 211, 92, 0.2));
  z-index: -1;
}
.hero-sub {
  font-size: clamp(25px, 3.5vw, 42px);
  font-weight: 900;
  color: var(--blue-deep);
  letter-spacing: 0.01em;
  line-height: 1.25;
  margin-top: 6px;
}
.ribbon {
  display: inline-block;
  margin: 16px 0 10px;
  padding: 8px 20px;
  border-radius: 8px 10px 9px 7px;
  color: #fff;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 800;
  letter-spacing: 0.06em;
  background: linear-gradient(100deg, #2aa971, #45cf92);
  box-shadow: 0 10px 22px rgba(47, 179, 122, 0.28);
  transform: rotate(-1.4deg);
}
.slogan {
  font-size: clamp(15px, 1.7vw, 18px);
  font-weight: 700;
  color: #1d8f63;
  letter-spacing: 0.12em;
  margin-top: 4px;
}
.hero-desc {
  max-width: 620px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.9;
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-quote {
  margin-top: 22px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(36, 64, 110, 0.55);
}
.hero-quote::before { content: "— "; }

.hero-art {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
}
.art-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed rgba(21, 87, 200, 0.22);
}
.art-ring.ring-1 { width: 370px; height: 370px; }
.art-ring.ring-2 { width: 290px; height: 290px; border-style: solid; border-color: rgba(21, 87, 200, 0.10); }
.robot { position: relative; width: min(340px, 88%); height: auto; animation: floaty 5.5s ease-in-out infinite; filter: drop-shadow(0 22px 30px rgba(21, 87, 200, 0.16)); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.float-chip {
  position: absolute;
  display: grid;
  place-items: center;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 800;
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: 0 12px 26px rgba(16, 51, 120, 0.18);
  animation: floaty 6.5s ease-in-out infinite;
}
.chip-ai { top: 14%; left: 2%; background: linear-gradient(140deg, #2fb37a, #1f9463); transform: rotate(-8deg); animation-delay: 0.2s; }
.chip-code { top: 20%; right: 1%; background: linear-gradient(140deg, #2f7bea, #1557c8); transform: rotate(7deg); animation-delay: 0.7s; }
.chip-num { bottom: 16%; left: 4%; background: linear-gradient(140deg, #ffcf4d, #f0a91f); color: #4a2c00; transform: rotate(5deg); animation-delay: 1.1s; }
.chip-braces { bottom: 24%; right: 3%; background: #fff; color: var(--blue); border: 1.5px solid var(--line); transform: rotate(-6deg); animation-delay: 1.5s; }
.float-dot { position: absolute; border-radius: 50%; }
.dot-1 { width: 9px; height: 9px; background: var(--green); top: 8%; right: 22%; }
.dot-2 { width: 7px; height: 7px; background: var(--blue-2); bottom: 10%; right: 26%; }
.dot-3 { width: 11px; height: 11px; background: var(--yellow); top: 46%; left: 0; }

/* ---------- 信息卡 ---------- */
.info-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 34px 0 10px;
}
.info-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.info-icon {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--sky);
  color: var(--blue);
}
.info-icon svg { width: 22px; height: 22px; }
.info-card div { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.info-card span { font-size: 12px; color: var(--muted); letter-spacing: 0.12em; }
.info-card strong { font-size: 14.5px; font-weight: 700; }

/* ---------- 规则 ---------- */
.rules { margin: 58px 0 44px; }
.section-head { max-width: 660px; margin-bottom: 24px; }
.eyebrow {
  display: inline-block;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: var(--green);
  margin-bottom: 8px;
}
.section-head h2, .board-head h2, .entry-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.01em;
}
.section-head p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

.rule-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
}
.rule-card {
  position: relative;
  padding: 22px 22px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.rule-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-2), var(--blue));
}
.rule-card.accent { background: linear-gradient(160deg, #f0fbf6, #ffffff 70%); border-color: #bdecd8; }
.rule-card.accent::before { background: linear-gradient(90deg, var(--green-2), var(--green)); }
.rule-no {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: rgba(21, 87, 200, 0.45);
}
.rule-card.accent .rule-no { color: rgba(47, 179, 122, 0.6); }
.rule-card h3 { font-size: 18px; font-weight: 800; margin-top: 6px; }
.rule-main { font-size: 20px; font-weight: 900; color: var(--blue); margin-top: 8px; letter-spacing: 0.01em; }
.rule-card.accent .rule-main { color: #1d8f63; }
.rule-desc { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.75; }
.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(21, 87, 200, 0.5);
  min-width: 84px;
}
.flow-arrow svg { width: 40px; height: 24px; }
.flow-arrow span { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }

.rule-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed #c9dcf6;
  border-radius: 16px;
}
.rule-notes span { font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.rule-notes b { display: block; color: var(--ink-soft); font-size: 12px; letter-spacing: 0.08em; margin-bottom: 2px; }

/* ---------- 报名 ---------- */
.entry-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 30px 32px 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 24px;
}
.entry-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green-2), var(--yellow));
}
.entry-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.entry-head p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.entry-badge {
  flex: none;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: Arial, sans-serif;
  font-size: 17px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(145deg, var(--blue-2), var(--blue));
  box-shadow: 0 10px 20px rgba(21, 87, 200, 0.28);
}
.entry-card form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin-top: 22px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.04em; }
.field input {
  height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #f7faff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  width: 100%;
}
.field input::placeholder { color: #9aabc4; }
.field input:focus { border-color: var(--blue-2); background: #fff; box-shadow: 0 0 0 4px rgba(47, 123, 234, 0.12); }
.field input.invalid { border-color: #ef9a9a; background: #fff8f8; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s, color 0.18s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn.primary {
  color: #fff;
  background: linear-gradient(120deg, #2f7bea, #1557c8);
  box-shadow: 0 12px 26px rgba(21, 87, 200, 0.28);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px rgba(21, 87, 200, 0.34); }
.btn.ghost { color: var(--blue); background: #fff; border-color: #cfe0f8; }
.btn.ghost:hover { background: #f4f9ff; }
.btn.block { grid-column: 1 / -1; min-height: 54px; font-size: 17px; margin-top: 4px; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 13px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.fineprint { grid-column: 1 / -1; font-size: 12px; color: #8297b4; text-align: center; margin-top: -2px; }

.resume-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(120deg, #eafaf2, #f3fbff);
  border: 1px solid #bdecd8;
}
.resume-bar div { display: flex; flex-direction: column; line-height: 1.5; }
.resume-bar strong { font-size: 14px; }
.resume-bar span { font-size: 12.5px; color: var(--muted); }

/* ---------- 答题 ---------- */
body.mode-quiz .site-head,
body.mode-quiz .site-foot { display: none; }
.view-quiz { max-width: 820px; margin: 0 auto; padding-top: 10px; }
.quiz-shell { padding-bottom: 20px; }
.quiz-top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 0 12px;
  background: linear-gradient(180deg, rgba(244, 248, 255, 0.98) 70%, rgba(244, 248, 255, 0.7));
  backdrop-filter: blur(10px);
}
.quiz-top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.round-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-sm);
}
.round-chip.round2 { color: #1d8f63; border-color: #bdecd8; background: #f0fbf6; }
.timer {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--blue-deep);
  font-variant-numeric: tabular-nums;
}
.timer.warn { color: #c98a00; }
.timer.danger { color: var(--red); animation: pulseTime 1s ease-in-out infinite; }
@keyframes pulseTime { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.icon-text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
}
.icon-text-btn svg { width: 15px; height: 15px; }
.progress-track { height: 7px; border-radius: 999px; background: #e2ecfb; margin-top: 12px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0%; border-radius: inherit; background: linear-gradient(90deg, var(--green-2), var(--blue-2)); transition: width 0.35s ease; }
.quiz-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }

.question-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 30px 24px;
  box-shadow: var(--shadow);
  margin-top: 6px;
  scroll-margin-top: 96px;
}
.q-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q-head > span:first-child { font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; font-weight: 800; color: var(--blue); letter-spacing: 0.1em; }
.band-tag { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--sky); color: var(--blue); letter-spacing: 0.08em; }
.band-tag.band-2 { background: #fff5dc; color: #a57300; }
.band-tag.band-3 { background: #fdeaea; color: #bd3c3c; }
.q-text { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.65; margin: 18px 0 22px; font-weight: 700; letter-spacing: 0.01em; }
.options { display: grid; gap: 11px; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 60px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
  font-size: 16px;
  line-height: 1.55;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.18s;
}
.option:hover { border-color: #a9c9f5; background: #f6faff; }
.option.selected {
  border-color: var(--blue-2);
  background: linear-gradient(120deg, #eef6ff, #f7fbff);
  box-shadow: 0 0 0 3px rgba(47, 123, 234, 0.12);
}
.option-label {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eef4fd;
  color: var(--blue);
  font-weight: 800;
  font-size: 14px;
  transition: background 0.18s, color 0.18s;
}
.option.selected .option-label { background: var(--blue); color: #fff; }
.option-text { flex: 1; }
.answer-state { min-height: 18px; margin-top: 10px; font-size: 12px; color: var(--green); text-align: right; }
.answer-state.error { color: var(--red); }

.quiz-actions { display: flex; gap: 12px; margin-top: 18px; }
.quiz-actions .btn { flex: 1; min-height: 50px; }
.quiz-submit-row { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 22px; }
.submit-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 6px 10px;
}
.submit-link:hover { color: var(--blue); }
.quiz-tip { font-size: 11.5px; color: #93a6c2; }

/* ---------- 成绩 ---------- */
.view-result { max-width: 940px; margin: 0 auto; padding-top: 18px; }
.result-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 34px 36px;
  box-shadow: var(--shadow);
}
.result-top { display: flex; align-items: center; gap: 34px; }
.score-ring {
  --pct: 0;
  --ring: var(--blue-2);
  flex: none;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  padding: 10px;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), #e6eefc 0);
  display: grid;
  place-items: center;
  transition: background 0.6s ease;
}
.score-ring.fail { --ring: #9fb4d4; }
.score-ring.pass { --ring: var(--green); }
.score-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
.score-inner strong { font-size: 46px; font-weight: 900; line-height: 1; color: var(--ink); }
.score-inner span { font-size: 13px; color: var(--muted); margin-top: 6px; letter-spacing: 0.08em; }
.result-copy { flex: 1; min-width: 0; }
.result-copy h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 900; margin: 2px 0 8px; }
.result-copy > p { color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.result-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.stat-pill {
  padding: 10px 16px;
  border-radius: 14px;
  background: #f6faff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 108px;
}
.stat-pill span { font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; }
.stat-pill strong { font-size: 18px; font-weight: 800; margin-top: 2px; }
.result-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.my-rank-bar {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, #eef6ff, #f7fdff);
  border: 1px solid #cfe0f8;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
}
.review-wrap { margin-top: 22px; display: grid; gap: 18px; }
.review-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}
.review-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review-section-head h3 { font-size: 18px; font-weight: 800; }
.review-section-head span { font-size: 12px; color: var(--muted); }
.review-tabs { display: flex; gap: 8px; margin: 14px 0 12px; }
.review-tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 700;
}
.review-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.review-list { display: grid; gap: 10px; }
.review-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fcfdff; }
.review-item.hidden-item { display: none; }
.review-item[open] { background: #fff; box-shadow: var(--shadow-sm); }
.review-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.review-summary::-webkit-details-marker { display: none; }
.review-no { flex: none; font-family: Consolas, monospace; font-size: 12px; font-weight: 800; color: var(--blue); width: 24px; }
.review-title { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.6; }
.review-status { flex: none; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--green-soft); color: #1d8f63; }
.review-item.wrong .review-status { background: #fdeaea; color: #bd3c3c; }
.review-body { padding: 0 16px 16px 50px; }
.review-options { display: grid; gap: 7px; margin-bottom: 12px; }
.review-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-soft);
  background: #fff;
}
.review-option .letter { flex: none; width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: #eef4fd; color: var(--blue); font-size: 11.5px; font-weight: 800; }
.review-option b { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--green); white-space: nowrap; }
.review-option.correct { border-color: #a9e5c8; background: #f2fcf7; }
.review-option.correct .letter { background: var(--green); color: #fff; }
.review-option.wrong-pick { border-color: #f2bcbc; background: #fff7f7; }
.review-option.wrong-pick .letter { background: var(--red); color: #fff; }
.review-option.wrong-pick b { color: var(--red); }
.explain { background: #f6faff; border-left: 3px solid var(--blue-2); border-radius: 0 10px 10px 0; padding: 10px 14px; }
.explain b { font-size: 12px; color: var(--blue); letter-spacing: 0.08em; }
.explain p { font-size: 13px; color: var(--muted); line-height: 1.75; margin-top: 4px; }

/* ---------- 排行榜 ---------- */
.view-board { max-width: 1000px; margin: 0 auto; padding-top: 26px; }
.board-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.board-head p { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.board-updated { font-size: 12px; color: var(--muted); font-family: Consolas, monospace; white-space: nowrap; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.stat-card span { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.stat-card strong { font-size: 24px; font-weight: 900; margin-top: 2px; color: var(--blue); }
.stat-card:nth-child(2) strong { color: var(--green); }
.stat-card:nth-child(3) strong { color: #d18b00; }
.stat-card:nth-child(4) strong { color: var(--ink); }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; align-items: end; }
.podium-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 18px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.podium-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: #cddcf3; }
.podium-card.first::before { background: linear-gradient(90deg, #ffd35c, #f0a91f); }
.podium-card.second::before { background: linear-gradient(90deg, #c8d7ee, #9fb4d4); }
.podium-card.third::before { background: linear-gradient(90deg, #f0b487, #d98a4d); }
.podium-card.first { padding-top: 28px; padding-bottom: 24px; }
.podium-rank {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #eef4fd;
  color: var(--blue);
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 8px;
}
.podium-card.first .podium-rank { background: #fff4d2; color: #a57300; }
.podium-card strong { display: block; font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium-score { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }

.board-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.board-table { width: 100%; border-collapse: collapse; }
.board-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  padding: 13px 16px;
  background: #f6faff;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.board-table td {
  padding: 13px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid #eef4fd;
  white-space: nowrap;
}
.board-table tr:last-child td { border-bottom: none; }
.board-table tbody tr:hover { background: #f9fcff; }
.board-table tr.is-me { background: #eff7ff; box-shadow: inset 3px 0 0 var(--blue); }
.rank-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #eef4fd; color: var(--blue); font-weight: 800; font-size: 12px; }
.rank-badge.top1 { background: #fff4d2; color: #a57300; }
.rank-badge.top2 { background: #edf2fa; color: #4c6485; }
.rank-badge.top3 { background: #fdeee2; color: #a55f27; }
.board-table .name-cell { font-weight: 700; }
.board-table .score-cell { font-weight: 800; color: var(--blue); }
.board-table .time-cell { font-family: Consolas, monospace; font-size: 12.5px; color: var(--muted); }
.board-table .running { color: #a57300; font-weight: 700; font-size: 12.5px; }
.board-table .dash { color: #aabdd6; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 14px; }
.board-note { text-align: center; font-size: 12px; color: #93a6c2; margin-top: 14px; }

/* ---------- 页脚 ---------- */
.site-foot {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 26px 24px 34px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.foot-brand small { color: var(--muted); font-size: 11.5px; }
.foot-links { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-soft); }
.foot-links a:hover { color: var(--blue); }
.foot-links .muted { color: #9aabc4; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 25, 60, 0.42);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: min(430px, 100%);
  background: #fff;
  border-radius: 22px;
  padding: 26px 26px 22px;
  box-shadow: 0 30px 80px rgba(6, 25, 60, 0.28);
  animation: popIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes popIn { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: none; } }
.modal-card h3 { font-size: 20px; font-weight: 800; }
.modal-card p { color: var(--muted); font-size: 14px; line-height: 1.8; margin-top: 10px; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.icon-btn { border: none; background: #f1f6fe; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; color: var(--muted); line-height: 1; }
.palette-card { width: min(520px, 100%); }
.palette-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; margin-top: 18px; }
.palette-cell {
  aspect-ratio: 1;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fbfdff;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 13px;
}
.palette-cell.answered { background: #e6f8ef; border-color: #bdecd8; color: #1d8f63; }
.palette-cell.current { outline: 2px solid var(--blue-2); outline-offset: 1px; color: var(--blue); }
.palette-legend { display: flex; gap: 16px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.palette-legend span { display: inline-flex; align-items: center; gap: 5px; }
.palette-legend .dot { width: 10px; height: 10px; border-radius: 3px; background: #eef4fd; }
.palette-legend .dot.answered { background: #bdecd8; }
.palette-legend .dot.current { background: #fff; border: 2px solid var(--blue-2); }

.transition {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(600px 400px at 80% 10%, rgba(77, 216, 153, 0.35), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(47, 123, 234, 0.45), transparent 60%),
    linear-gradient(150deg, #0a2f78, #071d4b);
  color: #fff;
  text-align: center;
  animation: fadeIn 0.3s ease both;
}
.transition-inner { max-width: 520px; }
.transition-badge {
  display: inline-block;
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.22em;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #9df0c4;
}
.transition h2 { font-size: clamp(36px, 8vw, 58px); font-weight: 900; margin-top: 18px; }
.transition p { color: rgba(255, 255, 255, 0.78); margin-top: 10px; font-size: 15px; }
.transition-hint { font-size: 13px !important; }
.transition-hint b { color: #ffd35c; font-size: 20px; }
.transition .btn { margin-top: 24px; background: #fff; color: var(--blue); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 200;
  max-width: min(460px, calc(100% - 40px));
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(10, 36, 80, 0.94);
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 14px 30px rgba(6, 25, 60, 0.28);
  animation: toastIn 0.25s ease both;
}
.toast.error { background: rgba(160, 40, 40, 0.96); }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

.loading {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: rgba(244, 248, 255, 0.72);
  backdrop-filter: blur(3px);
}
.spinner {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 3.5px solid #d5e4f9;
  border-top-color: var(--blue-2);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { min-height: 360px; order: -1; margin-bottom: -10px; }
  .robot { width: min(290px, 70%); }
  .art-ring.ring-1 { width: 310px; height: 310px; }
  .art-ring.ring-2 { width: 240px; height: 240px; }
  .float-chip { font-size: 12px; padding: 8px 12px; }
  .rule-flow { grid-template-columns: 1fr; }
  .flow-arrow { flex-direction: row; min-height: 30px; gap: 10px; }
  .flow-arrow svg { transform: rotate(90deg); width: 24px; }
  .rule-notes { grid-template-columns: 1fr; }
  .result-top { gap: 24px; }
  .score-ring { width: 148px; height: 148px; }
  .score-inner strong { font-size: 40px; }
}

@media (max-width: 760px) {
  .site-head { padding: 16px 16px 8px; }
  main { padding: 0 16px 56px; }
  .brand-text strong { font-size: 13.5px; }
  .head-nav a { font-size: 12.5px; padding: 7px 10px; }
  .hero { padding-top: 18px; }
  .hero-art { min-height: 310px; }
  .robot { width: min(250px, 76%); }
  .art-ring.ring-1 { width: 260px; height: 260px; }
  .art-ring.ring-2 { width: 200px; height: 200px; }
  .hero-title { gap: 8px; }
  .hero-title .cn::after { height: 7px; }
  .hero-desc { font-size: 14px; }
  .hero-actions .btn { flex: 1; }
  .info-row { grid-template-columns: 1fr; margin-top: 22px; }
  .rules { margin-top: 42px; }
  .entry-card { padding: 24px 20px 20px; border-radius: 22px; }
  .entry-badge { width: 46px; height: 46px; font-size: 14px; border-radius: 14px; }
  .entry-card form { grid-template-columns: 1fr; }
  .resume-bar { flex-direction: column; align-items: flex-start; }
  .resume-bar .btn { width: 100%; }

  .question-card { padding: 22px 18px 18px; border-radius: 20px; }
  .quiz-top { padding-top: 10px; }
  .timer { font-size: 26px; }
  .option { min-height: 56px; font-size: 15px; padding: 10px 12px; }
  .option-label { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
  .answer-state { min-height: 16px; }

  .result-card { padding: 24px 20px; border-radius: 22px; }
  .result-top { flex-direction: column; align-items: flex-start; gap: 18px; }
  .score-ring { width: 136px; height: 136px; }
  .score-inner strong { font-size: 38px; }
  .result-actions .btn { flex: 1; }
  .review-section { padding: 18px 16px; }
  .review-body { padding-left: 16px; }

  .board-head { flex-direction: column; align-items: flex-start; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .podium { grid-template-columns: 1fr; }
  .podium-card.first { order: -1; }
  .board-table th, .board-table td { padding: 11px 10px; }
  .board-table .hide-sm { display: none; }
  .palette-grid { grid-template-columns: repeat(5, 1fr); }
  .site-foot { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .hide-sm { display: none; }
  .hero-title .num { font-size: 68px; }
  .hero-title .cn { font-size: 30px; }
  .hero-sub { font-size: 22px; }
  .ribbon { font-size: 16px; padding: 7px 14px; }
  .kicker { font-size: 11.5px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stat-card { padding: 12px 14px; }
  .stat-card strong { font-size: 21px; }
  .review-title { font-size: 13px; }
  .modal { padding: 12px; align-items: end; }
  .modal-card { border-radius: 20px; padding: 22px 18px 18px; width: 100%; }
  .palette-card { border-radius: 22px 22px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
