/* 区度测试 · 酸性新粗野主义 */
:root {
  --bg: #0a0a0c;
  --bg-2: #141419;
  --ink: #0a0a0c;
  --paper: #f3efe4;
  --paper-2: #e6e0cf;
  --acid: #c8ff00;
  --hot: #ff2e7e;
  --cyan: #2ee6ff;
  --violet: #8b5cff;
  --orange: #ff8a2e;
  --muted: #8d8d98;
  --line: #2a2a33;
  --accent: var(--acid);
  --shadow: 6px 6px 0 var(--ink);
  --f-display: "ZCOOL QingKe HuangYou", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-num: "Archivo Black", "Arial Black", Impact, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
.mono { font-family: var(--f-mono); letter-spacing: .02em; }
[hidden] { display: none !important; }
::selection { background: var(--acid); color: var(--ink); }

/* ---------- 背景层 ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-blobs i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  filter: blur(90px); opacity: .22; mix-blend-mode: screen;
  animation: blob 22s ease-in-out infinite alternate;
}
.bg-blobs i:nth-child(1) { background: var(--accent); left: -20vmax; top: -20vmax; transition: background 1.2s; }
.bg-blobs i:nth-child(2) { background: var(--hot); right: -25vmax; top: 10vh; animation-duration: 28s; animation-delay: -6s; }
.bg-blobs i:nth-child(3) { background: var(--violet); left: 10vw; bottom: -35vmax; animation-duration: 32s; animation-delay: -12s; }
@keyframes blob {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(10vw, 8vh) scale(1.2); }
  100% { transform: translate(-6vw, 14vh) scale(.9); }
}
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-5%, 3%); } 40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 7%); } 80% { transform: translate(6%, 2%); } 100% { transform: translate(0, 0); }
}
#fx { position: fixed; inset: 0; z-index: 55; pointer-events: none; width: 100%; height: 100%; }

/* ---------- 自定义光标 ---------- */
.cursor { position: fixed; inset: 0; z-index: 100; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
  body, button, a, input { cursor: none; }
}
.cursor-dot, .cursor-ring { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform; }
.cursor-dot { width: 8px; height: 8px; margin: -4px; background: var(--acid); mix-blend-mode: difference; }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px; border: 1.5px solid var(--paper);
  mix-blend-mode: difference; transition: width .25s var(--ease-out), height .25s var(--ease-out), margin .25s var(--ease-out), background .25s;
}
.cursor.is-hover .cursor-ring { width: 74px; height: 74px; margin: -37px; background: var(--paper); }
.cursor.is-down .cursor-ring { width: 26px; height: 26px; margin: -13px; }

/* ---------- 屏幕切换 ---------- */
.screen { position: relative; z-index: 2; min-height: 100vh; min-height: 100dvh; display: none; }
.screen.is-active { display: block; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.3em; font-weight: 900; font-size: 1rem;
  border: 3px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.btn-acid { background: var(--acid); color: var(--ink); }
.btn-hot { background: var(--hot); color: var(--ink); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--paper); border-color: var(--paper); box-shadow: 4px 4px 0 var(--paper); }
.btn-ghost:hover { box-shadow: 6px 6px 0 var(--paper); }

/* =========================================================
   封面
   ========================================================= */
#cover { overflow: hidden; display: none; flex-direction: column; padding: 18px 16px 28px; }
#cover.is-active { display: flex; }
#cover > * { min-width: 0; max-width: 100%; }
#cover > .ticker { max-width: none; width: calc(100% + 32px); }
#qu-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.cover-top {
  position: relative; z-index: 3; display: flex; justify-content: space-between; gap: 12px;
  font-size: .72rem; color: var(--muted); text-transform: uppercase;
}
.tag-blink { color: var(--hot); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }

.cover-hero {
  position: relative; z-index: 3; flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; min-height: 52vh; pointer-events: none;
}
.kicker { font-size: .8rem; color: var(--acid); letter-spacing: .3em; margin: 0 0 8px; }
h1.glitch {
  position: relative; margin: 0; font-family: var(--f-display); font-weight: 400;
  font-size: clamp(4.2rem, 17vw, 13rem); line-height: .95; letter-spacing: .02em;
  color: var(--paper); mix-blend-mode: difference;
}
.glitch::before, .glitch::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
}
.glitch::before { color: var(--hot); transform: translate(-4px, 0); clip-path: inset(0 0 0 0); mix-blend-mode: screen; animation: glitchA 3.2s infinite steps(1); }
.glitch::after { color: var(--cyan); transform: translate(4px, 0); mix-blend-mode: screen; animation: glitchB 2.7s infinite steps(1); }
@keyframes glitchA {
  0%, 88%, 100% { clip-path: inset(0 0 100% 0); }
  89% { clip-path: inset(10% 0 60% 0); transform: translate(-8px, 2px); }
  91% { clip-path: inset(55% 0 20% 0); transform: translate(6px, -3px); }
  94% { clip-path: inset(30% 0 40% 0); transform: translate(-3px, 0); }
}
@keyframes glitchB {
  0%, 84%, 100% { clip-path: inset(0 0 100% 0); }
  85% { clip-path: inset(70% 0 5% 0); transform: translate(9px, 1px); }
  88% { clip-path: inset(5% 0 75% 0); transform: translate(-7px, -2px); }
  92% { clip-path: inset(40% 0 35% 0); transform: translate(5px, 2px); }
}
.slogan { margin: 14px 0 0; font-size: clamp(1.1rem, 3.6vw, 1.8rem); font-weight: 900; }
.slogan .hl { background: var(--acid); color: var(--ink); padding: 0 .25em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

.sticker {
  position: absolute; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%;
  font-family: var(--f-mono); font-weight: 800; font-size: .72rem; line-height: 1.15; text-align: center;
  color: var(--ink); border: 3px solid var(--ink);
}
.sticker span { display: block; }
.sticker-a { background: var(--hot); right: 6%; top: 8%; animation: spinSticker 9s linear infinite; }
.sticker-b { background: var(--cyan); left: 6%; bottom: 10%; animation: spinSticker 12s linear infinite reverse; width: 78px; height: 78px; }
.sticker-a::before {
  content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px dashed var(--hot); opacity: .7;
}
@keyframes spinSticker { to { transform: rotate(360deg); } }

.ticker {
  position: relative; z-index: 2; margin: 0 -16px; overflow: hidden; white-space: nowrap;
  border-block: 3px solid var(--ink); font-family: var(--f-display); font-size: clamp(1.2rem, 3.5vw, 1.9rem);
  padding: 6px 0; user-select: none;
}
.ticker-1 { background: var(--acid); color: var(--ink); transform: rotate(-2.5deg); }
.ticker-2 { background: var(--hot); color: var(--ink); transform: rotate(1.8deg); margin-top: -10px; }
.ticker-track { display: inline-block; animation: tick 28s linear infinite; }
.ticker-2 .ticker-track { animation-direction: reverse; animation-duration: 34s; }
.ticker-track span { margin: 0 .7em; }
.ticker-track b { color: var(--paper); -webkit-text-stroke: 1.5px var(--ink); font-weight: 400; }
@keyframes tick { to { transform: translateX(-50%); } }

.cover-actions { position: relative; z-index: 3; margin-top: 28px; width: 100%; max-width: 920px; align-self: center; }
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; perspective: 900px; }
.mode-card {
  position: relative; text-align: left; display: flex; flex-direction: column; gap: 6px;
  padding: 22px 20px 18px; border-radius: 22px; border: 3px solid var(--ink);
  background: var(--paper); color: var(--ink); box-shadow: 8px 8px 0 var(--acid);
  transform-style: preserve-3d; transition: box-shadow .25s var(--ease-out); will-change: transform;
  overflow: hidden;
}
.mode-card::after { /* 扫光 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .55), transparent 45%);
  opacity: 0; transition: opacity .25s;
}
.mode-card:hover::after { opacity: 1; }
.mode-card-deep { background: var(--ink); color: var(--paper); border-color: var(--paper); box-shadow: 8px 8px 0 var(--hot); }
.mode-card-deep::after { background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 46, 126, .35), transparent 45%); }
.mode-badge {
  align-self: flex-start; font-size: .7rem; padding: 2px 8px; border-radius: 99px;
  background: var(--ink); color: var(--acid);
}
.mode-card-deep .mode-badge { background: var(--hot); color: var(--ink); }
.mode-name { font-family: var(--f-display); font-size: clamp(2rem, 5vw, 3rem); line-height: 1; transform: translateZ(40px); }
.mode-meta { font-size: .78rem; opacity: .7; }
.mode-desc { font-size: .9rem; line-height: 1.5; opacity: .85; }
.mode-go { margin-top: 8px; font-weight: 900; font-size: 1.05rem; transform: translateZ(30px); }
.mode-card:hover .mode-go { text-decoration: underline wavy; text-underline-offset: 5px; }
.small-print { text-align: center; color: var(--muted); font-size: .78rem; margin: 18px 0 0; }

.resume {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 18px; padding: 12px 14px; border: 2px dashed var(--acid); border-radius: 14px;
  background: rgba(200, 255, 0, .08); font-size: .9rem;
}
.resume-btns { display: flex; gap: 10px; }
.resume .btn { min-height: 40px; font-size: .9rem; }

/* =========================================================
   答题
   ========================================================= */
#quiz { display: none; flex-direction: column; padding: 0 16px 20px; }
#quiz.is-active { display: flex; }
.hud { position: sticky; top: 0; z-index: 10; padding: 14px 0 8px; background: linear-gradient(var(--bg) 70%, transparent); }
.hud-row { display: flex; align-items: center; gap: 12px; max-width: 860px; margin: 0 auto; }
.hud-btn {
  width: 44px; height: 44px; flex: none; border-radius: 12px; border: 2px solid var(--line);
  font-size: 1.1rem; font-weight: 900; transition: background .2s, color .2s, border-color .2s;
}
.hud-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hud-btn:disabled { opacity: .3; pointer-events: none; }
.hud-count { font-size: 1rem; color: var(--muted); }
.hud-count b { font-family: var(--f-num); font-weight: 400; font-size: 1.7rem; color: var(--acid); }
.hud-count span { margin-left: 3px; }
.seismo { flex: 1; position: relative; height: 44px; min-width: 0; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.seismo canvas { width: 100%; height: 100%; display: block; }
.seismo span { position: absolute; right: 8px; top: 3px; font-size: .6rem; color: var(--muted); }

.worm-track { max-width: 860px; margin: 10px auto 0; height: 26px; position: relative; }
.worm-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--line); }
.worm { position: absolute; left: 0; top: 0; height: 26px; display: flex; align-items: center; transition: left .6s var(--ease-spring); }

/* 转场擦除 */
.wipe {
  position: fixed; inset: 0; z-index: 95; pointer-events: none; display: grid; place-items: center;
  clip-path: inset(0 100% 0 0); background: var(--acid);
}
.wipe span { font-family: var(--f-display); font-size: 46vmin; line-height: 1; color: var(--ink); }
.worm i {
  flex: none; width: 16px; height: 16px; margin-right: -5px; border-radius: 50%;
  background: var(--acid); border: 2px solid var(--ink);
  animation: wiggle 1.1s ease-in-out infinite; animation-delay: calc(var(--i) * -.09s);
}
.worm i:nth-child(odd) { background: #b0e600; }
.worm i.head {
  width: 24px; height: 24px; background: var(--hot); position: relative; margin-right: 0;
}
.worm i.head::before, .worm i.head::after {
  content: ""; position: absolute; top: 6px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink);
}
.worm i.head::before { left: 5px; } .worm i.head::after { right: 5px; }
@keyframes wiggle { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }

.stage { flex: 1; display: grid; place-items: center; padding: 18px 0; perspective: 1200px; }
.qcard {
  width: 100%; max-width: 760px; background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 26px; box-shadow: 10px 10px 0 var(--accent);
  padding: 28px 26px 26px; position: relative; will-change: transform;
}
.qcard::before { /* 页角折痕 */
  content: ""; position: absolute; right: -3px; top: -3px; width: 46px; height: 46px;
  background: linear-gradient(225deg, var(--bg) 50%, var(--paper-2) 50%); border-bottom-left-radius: 10px;
  border-left: 3px solid var(--ink); border-bottom: 3px solid var(--ink);
}
.q-num {
  position: absolute; left: 22px; top: -30px; font-family: var(--f-num); font-size: 3.4rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--accent); pointer-events: none;
}
.q-type { display: inline-block; font-size: .72rem; padding: 2px 10px; border-radius: 99px; background: var(--ink); color: var(--accent); margin-bottom: 12px; }
.q-stem { font-size: clamp(1.15rem, 2.6vw, 1.55rem); font-weight: 900; line-height: 1.5; margin: 0 0 22px; text-wrap: pretty; }
.q-stem .w { display: inline-block; }

.opts { display: grid; gap: 10px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 14px 16px; min-height: 56px; border: 3px solid var(--ink); border-radius: 16px; background: #fff;
  color: var(--ink); font-weight: 700; line-height: 1.45; box-shadow: 4px 4px 0 var(--ink);
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s;
}
.opt:hover { transform: translate(-2px, -2px) rotate(-.4deg); box-shadow: 7px 7px 0 var(--ink); background: #fffbe6; }
.opt:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }
.opt.is-picked { background: var(--accent); }
.opt .key {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: var(--ink); color: var(--paper); font-family: var(--f-mono); font-weight: 800; font-size: .85rem;
}
.opt.is-picked .key { background: var(--hot); color: var(--ink); }

/* Likert 圆点刻度 */
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; align-items: start; }
.lk { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0; }
.lk .dot {
  display: grid; place-items: center; border-radius: 50%; border: 3px solid var(--ink);
  background: #fff; transition: transform .25s var(--ease-spring), background .2s, box-shadow .2s;
  box-shadow: 3px 3px 0 var(--ink);
}
.lk:nth-child(1) .dot, .lk:nth-child(5) .dot { width: 64px; height: 64px; }
.lk:nth-child(2) .dot, .lk:nth-child(4) .dot { width: 50px; height: 50px; }
.lk:nth-child(3) .dot { width: 40px; height: 40px; }
.lk:nth-child(1) .dot, .lk:nth-child(2) .dot { border-color: var(--ink); background: #dffaff; }
.lk:nth-child(4) .dot, .lk:nth-child(5) .dot { background: #ffe1ec; }
.lk:hover .dot { transform: scale(1.12) rotate(-8deg); }
.lk.is-picked .dot { background: var(--ink); transform: scale(1.15); box-shadow: 0 0 0 6px var(--accent); }
.lk.is-picked .dot::after { content: "✓"; color: var(--accent); font-weight: 900; font-size: 1.3rem; }
.lk .lbl { font-size: .82rem; font-weight: 700; text-align: center; line-height: 1.25; }
.lk .k { font-family: var(--f-mono); font-size: .65rem; opacity: .45; }
.likert-ends { display: flex; justify-content: space-between; font-size: .72rem; font-family: var(--f-mono); opacity: .55; margin-top: 10px; }

/* 主区选择 */
.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.zone {
  padding: 14px 10px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; font-weight: 900;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .2s var(--ease-spring), background .2s; text-align: center;
}
.zone small { display: block; font-family: var(--f-mono); font-size: .7rem; opacity: .5; font-weight: 500; }
.zone:hover { transform: translateY(-4px) rotate(var(--r, -2deg)); background: var(--acid); }
.zone.is-picked { background: var(--hot); }
.zone-note { font-size: .78rem; opacity: .6; margin: 14px 0 0; }

/* F1 二选一 */
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.duel-card {
  position: relative; padding: 22px 16px; border: 3px solid var(--ink); border-radius: 20px; min-height: 210px;
  display: flex; flex-direction: column; gap: 10px; align-items: center; justify-content: center; text-align: center;
  font-weight: 900; box-shadow: 5px 5px 0 var(--ink); transition: transform .3s var(--ease-spring);
}
.duel-card .big { font-size: 3.4rem; line-height: 1; }
.duel-card:nth-child(1) { background: var(--ink); color: var(--paper); }
.duel-card:nth-child(2) { background: var(--cyan); color: var(--ink); }
.duel-card:hover { transform: rotate(-2deg) scale(1.03); }
.duel-card:nth-child(2):hover { transform: rotate(2deg) scale(1.03); }
.duel-vs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); z-index: 2;
  background: var(--hot); color: var(--ink); font-family: var(--f-num); padding: 4px 12px; border: 3px solid var(--ink); border-radius: 10px;
}
.duel-wrap { position: relative; }

/* F2 输入 */
.f2 input {
  width: 100%; padding: 16px; border: 3px solid var(--ink); border-radius: 14px; font: inherit; font-weight: 700;
  font-size: 1.05rem; background: #fff; color: var(--ink); box-shadow: inset 3px 3px 0 rgba(0, 0, 0, .08);
}
.f2 input:focus { outline: none; box-shadow: 0 0 0 4px var(--accent); }
.f2-row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; }
.f2-count { font-family: var(--f-mono); font-size: .8rem; opacity: .6; }
.f2-warn { color: var(--hot); font-weight: 900; font-size: .9rem; min-height: 1.4em; margin-top: 8px; }

/* F3 拖拽排序 */
.sort { display: grid; gap: 10px; }
.sort-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 3px solid var(--ink); border-radius: 14px;
  background: #fff; font-weight: 900; font-size: 1.15rem; touch-action: none; user-select: none;
  box-shadow: 3px 3px 0 var(--ink); transition: transform .2s var(--ease-out);
}
.sort-item .grip { font-family: var(--f-mono); opacity: .4; letter-spacing: -2px; }
.sort-item .pos { margin-left: auto; font-family: var(--f-mono); font-size: .8rem; opacity: .5; }
.sort-item.is-drag { position: relative; z-index: 5; background: var(--acid); box-shadow: 8px 8px 0 var(--ink); transition: none; cursor: grabbing; }
.sort-ends { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: .75rem; opacity: .6; margin: 0 0 8px; }
.q-actions { display: flex; justify-content: flex-end; margin-top: 18px; }

.quiz-foot { display: flex; justify-content: space-between; align-items: center; max-width: 760px; width: 100%; margin: 0 auto; gap: 12px; }
.kbd-hint { font-size: .7rem; color: var(--muted); }
.btn-skip { color: var(--muted); font-size: .9rem; text-decoration: underline; text-underline-offset: 4px; padding: 10px 6px; min-height: 44px; }
.btn-skip:hover { color: var(--hot); }
@media (hover: none) { .kbd-hint { visibility: hidden; } }

/* 浮动反应文字 */
.react {
  position: fixed; z-index: 70; pointer-events: none; font-family: var(--f-display); font-size: 1.6rem;
  color: var(--ink); background: var(--acid); padding: 2px 12px; border: 3px solid var(--ink); border-radius: 10px;
  white-space: nowrap;
}

/* =========================================================
   加载
   ========================================================= */
#loading { display: none; place-items: center; overflow: hidden; }
#loading.is-active { display: grid; }
#loading::before { /* 扫描线 */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 5px);
}
.load-wrap { text-align: center; padding: 16px; position: relative; }
.cocoon { width: 130px; margin: 0 auto 10px; animation: cocoonShake .35s infinite; transform-origin: 50% 0; }
.cocoon svg { width: 100%; filter: drop-shadow(6px 6px 0 var(--ink)) drop-shadow(0 0 30px rgba(200, 255, 0, .4)); }
@keyframes cocoonShake {
  0%, 100% { transform: rotate(-4deg) translateX(-2px); } 25% { transform: rotate(5deg) translateX(3px) scaleY(1.03); }
  50% { transform: rotate(-6deg) translateX(-3px); } 75% { transform: rotate(3deg) scaleY(.97); }
}
.load-pct { font-family: var(--f-num); font-size: clamp(4rem, 16vw, 8rem); line-height: 1; color: var(--acid); }
.load-msg { font-weight: 900; font-size: 1.1rem; min-height: 1.6em; margin: 10px 0 18px; }
.load-bar { width: min(420px, 80vw); height: 14px; margin: 0 auto; border: 3px solid var(--paper); border-radius: 99px; overflow: hidden; }
.load-bar i {
  display: block; height: 100%; width: 0; transition: width .25s;
  background: repeating-linear-gradient(-45deg, var(--acid) 0 12px, var(--hot) 12px 24px); background-size: 34px 34px;
  animation: stripes .5s linear infinite;
}
@keyframes stripes { to { background-position: 34px 0; } }
.glitch-soft { animation: jitter .18s infinite; }
@keyframes jitter {
  0% { transform: translate(0, 0); text-shadow: -2px 0 var(--hot), 2px 0 var(--cyan); }
  50% { transform: translate(1px, -1px); text-shadow: 2px 0 var(--hot), -2px 0 var(--cyan); }
  100% { transform: translate(-1px, 1px); text-shadow: -1px 0 var(--hot), 1px 0 var(--cyan); }
}

/* =========================================================
   结果
   ========================================================= */
#result { padding: 0 16px 60px; }
.r-hero {
  position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 40px 0 70px; overflow: visible;
}
.r-label { font-size: .85rem; color: var(--muted); letter-spacing: .3em; }
.r-score {
  font-family: var(--f-num); font-size: clamp(8rem, 38vw, 22rem); line-height: .85; margin: 8px 0 0;
  color: var(--accent); text-shadow: 8px 8px 0 var(--ink), 0 0 80px color-mix(in srgb, var(--accent) 45%, transparent);
  -webkit-text-stroke: 3px var(--ink); font-variant-numeric: tabular-nums; position: relative;
}
.r-score small { font-size: .16em; -webkit-text-stroke: 0; color: var(--muted); text-shadow: none; vertical-align: top; margin-left: .2em; }
.r-partial {
  display: inline-block; margin-top: 10px; background: var(--hot); color: var(--ink); font-weight: 900;
  padding: 2px 12px; border-radius: 99px; transform: rotate(-3deg); font-size: .85rem;
}
.r-tier {
  margin: 18px 0 0; font-family: var(--f-display); font-size: clamp(3rem, 12vw, 7rem); line-height: 1;
  background: var(--paper); color: var(--ink); padding: .08em .35em .12em; border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--accent); transform: rotate(-3deg); opacity: 0;
}
.r-title { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 900; margin: 30px 0 4px; opacity: 0; }
.r-grid { font-family: var(--f-mono); font-size: .95rem; color: var(--accent); opacity: 0; }
.r-suffix { color: var(--muted); max-width: 560px; margin: 8px auto 0; font-size: .92rem; opacity: 0; }
.r-scroll { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: .75rem; color: var(--muted); animation: bob 1.6s ease-in-out infinite; opacity: 0; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }
.shockwave {
  position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%;
  border: 6px solid var(--accent); pointer-events: none; z-index: 0;
}
.r-hero.is-butterfly .r-tier { filter: saturate(.3); box-shadow: 10px 10px 0 #6d6680; }

.r-body { max-width: 860px; margin: 0 auto; display: grid; gap: 22px; }
.panel {
  background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-radius: 24px;
  box-shadow: 8px 8px 0 var(--accent); padding: 24px 22px; position: relative;
}
.panel.dark { background: var(--bg-2); color: var(--paper); border-color: var(--line); box-shadow: 8px 8px 0 var(--ink); }
.panel-h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px; font-family: var(--f-display); font-weight: 400; font-size: 1.8rem; line-height: 1.1; }
.panel-h .no { font-family: var(--f-mono); font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--ink); color: var(--accent); }
.panel.dark .panel-h .no { background: var(--accent); color: var(--ink); }
.reveal { opacity: 0; transform: translateY(60px) rotate(1.5deg); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

.tagline { font-size: clamp(1.15rem, 2.8vw, 1.5rem); font-weight: 900; line-height: 1.5; margin: 0; }
.note { font-size: .8rem; opacity: .65; margin: 10px 0 0; }

.dims-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; }
.radar svg { width: 100%; height: auto; overflow: visible; }
.radar .poly { transform-origin: 50% 50%; }
.dim-list { display: grid; gap: 12px; }
.dim-row .top { display: flex; justify-content: space-between; font-weight: 900; font-size: .92rem; }
.dim-row .top span:last-child { font-family: var(--f-mono); }
.dim-bar { height: 12px; border: 2px solid var(--ink); border-radius: 99px; background: #fff; overflow: hidden; margin: 4px 0 2px; }
.dim-bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 99px; transition: width 1.2s var(--ease-out); }
.dim-row.is-top .dim-bar i { background: var(--hot); }
.dim-row .ends { display: flex; justify-content: space-between; font-size: .72rem; opacity: .6; gap: 8px; }
.dim-row .ends .on { opacity: 1; font-weight: 900; color: var(--hot); }
.tie-note { font-size: .8rem; background: #fff3; border: 2px dashed var(--ink); border-radius: 10px; padding: 6px 10px; margin-top: 12px; }

.gauge-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; margin-top: 22px; padding-top: 20px; border-top: 3px dashed var(--ink); }
.gauge svg { width: 100%; overflow: visible; }
.gauge .needle { transform-origin: 110px 110px; transition: transform 1.6s var(--ease-spring); }
.gauge-val { font-family: var(--f-num); font-size: 2.2rem; line-height: 1; }

.behav { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.behav li { display: flex; gap: 12px; align-items: flex-start; font-weight: 700; }
.behav li::before { content: "☐"; font-size: 1.2rem; line-height: 1.3; transition: color .3s; }
.behav li.is-checked::before { content: "☑"; color: var(--hot); }
.copy-text { font-size: 1.02rem; line-height: 1.9; margin: 0; }

.sugg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sugg div { border: 3px solid var(--ink); border-radius: 16px; padding: 14px; background: #fff; box-shadow: 4px 4px 0 var(--ink); }
.sugg div:nth-child(2) { background: #e9fbff; transform: rotate(1deg); }
.sugg div:nth-child(3) { background: #ffe9f1; transform: rotate(-1deg); }
.sugg b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 1.3rem; margin-bottom: 4px; }
.sugg p { margin: 0; font-size: .92rem; }

.quote {
  font-family: var(--f-display); font-size: clamp(1.8rem, 5vw, 3.2rem); line-height: 1.25; text-align: center;
  padding: 36px 18px; background: var(--ink); color: var(--accent); border-radius: 24px; border: 3px solid var(--accent); position: relative;
}
.quote::before, .quote::after { position: absolute; font-family: var(--f-num); font-size: 5rem; color: var(--hot); line-height: 1; }
.quote::before { content: "“"; left: 14px; top: 4px; }
.quote::after { content: "”"; right: 14px; bottom: -30px; }

/* 区种卡（全息） */
.species-stage { perspective: 1000px; display: grid; place-items: center; }
.species-card {
  --rx: 0deg; --ry: 0deg; --px: 50%; --py: 50%;
  width: min(420px, 100%); border-radius: 22px; border: 3px solid var(--ink); background: #fff; color: var(--ink);
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .15s;
  box-shadow: 10px 10px 0 var(--ink); position: relative; overflow: hidden;
}
.species-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55;
  background:
    radial-gradient(circle at var(--px) var(--py), rgba(255, 255, 255, .8), transparent 35%),
    linear-gradient(115deg, transparent 20%, rgba(46, 230, 255, .5) 35%, rgba(255, 46, 126, .5) 50%, rgba(200, 255, 0, .5) 65%, transparent 80%);
  background-size: 100% 100%, 250% 250%; background-position: 0 0, var(--px) var(--py);
}
.sc-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--ink); color: var(--paper); font-family: var(--f-mono); font-size: .78rem; }
.sc-rar { padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--ink); font-weight: 800; }
.sc-rar.legendary { background: linear-gradient(90deg, var(--cyan), var(--hot), var(--acid)); }
.sc-art { height: 150px; display: grid; place-items: center; font-family: var(--f-display); font-size: 5.5rem; line-height: 1; border-bottom: 3px solid var(--ink);
  background: repeating-linear-gradient(45deg, var(--paper) 0 14px, var(--paper-2) 14px 28px); }
.sc-art span { background: var(--accent); padding: 0 .15em; border: 3px solid var(--ink); border-radius: 14px; transform: rotate(-4deg); box-shadow: 5px 5px 0 var(--ink); font-size: .7em; }
.sc-body { padding: 16px; }
.sc-name { font-family: var(--f-display); font-size: 2.2rem; line-height: 1.05; }
.sc-latin { font-style: italic; font-family: Georgia, serif; opacity: .65; font-size: .9rem; }
.sc-fields { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: .88rem; }
.sc-fields dt { font-weight: 900; opacity: .55; }
.sc-fields dd { margin: 0; }
.sc-sum { margin: 14px 0 0; padding: 10px 12px; border-left: 6px solid var(--hot); background: var(--paper); font-weight: 900; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { font-size: .75rem; font-weight: 700; border: 2px solid var(--ink); border-radius: 99px; padding: 1px 10px; background: #fff; }

/* 彩蛋 */
.egg-main { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 3px solid var(--ink); border-radius: 18px; background: var(--accent); }
.egg-main .em { font-size: 2.6rem; line-height: 1; }
.egg-main h4 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; }
.egg-main p { margin: 0; font-size: .92rem; }
details.fold { margin-top: 12px; border: 2px solid var(--ink); border-radius: 14px; background: #fff; }
details.fold > summary { cursor: pointer; padding: 10px 14px; font-weight: 900; list-style: none; display: flex; justify-content: space-between; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; font-family: var(--f-mono); transition: transform .3s; }
details.fold[open] > summary::after { transform: rotate(45deg); }
details.fold .fold-body { padding: 0 14px 14px; display: grid; gap: 10px; font-size: .9rem; }
.egg-sub { padding: 10px 12px; border-radius: 12px; background: var(--paper); }
.egg-sub b { display: block; }
.receipts { display: grid; gap: 8px; margin-top: 14px; }
.receipt { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border: 2px dashed var(--ink); border-radius: 12px; font-size: .92rem; }
.receipt .k { font-family: var(--f-mono); font-size: .72rem; padding: 1px 8px; border-radius: 99px; background: var(--ink); color: var(--paper); flex: none; }
.cert { font-family: var(--f-display); font-size: 1.4rem; }

/* 成就墙 */
.ach-sum { font-family: var(--f-mono); font-size: .85rem; margin: -6px 0 14px; opacity: .7; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ach {
  position: relative; padding: 12px; border-radius: 14px; border: 2px solid var(--line); background: #1b1b22;
  min-height: 96px; font-size: .8rem; color: var(--muted);
}
.ach b { display: block; font-size: .95rem; color: var(--paper); margin-bottom: 4px; }
.ach.on { background: var(--paper); color: var(--ink); border-color: var(--ink); box-shadow: 4px 4px 0 var(--accent); }
.ach.on b { color: var(--ink); }
.ach .cat { font-family: var(--f-mono); font-size: .62rem; opacity: .6; }
.ach .new {
  position: absolute; right: -8px; top: -10px; background: var(--hot); color: var(--ink); font-family: var(--f-num);
  font-size: .7rem; padding: 2px 8px; border: 2px solid var(--ink); border-radius: 8px; transform: rotate(8deg);
  animation: pop .6s var(--ease-spring) both;
}
@keyframes pop { from { transform: scale(0) rotate(-40deg); } }
.ach.locked b { color: var(--muted); letter-spacing: .2em; }

/* 回顾 */
.review { display: grid; gap: 10px; }
.rv { padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: #17171d; }
.rv .s { font-size: .88rem; color: var(--muted); }
.rv .a { font-weight: 900; margin: 4px 0; }
.rv .a.skip { color: var(--muted); font-style: italic; }
.rv .r { color: var(--accent); font-size: .9rem; }

.next-gap { text-align: center; font-family: var(--f-display); font-size: clamp(1.4rem, 4vw, 2.2rem); line-height: 1.3; }
.next-gap small { display: block; font-family: var(--f-body); font-size: .8rem; color: var(--muted); margin-top: 6px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.disclaimer { font-size: .82rem; color: var(--muted); line-height: 1.8; text-align: center; }
.disclaimer details { margin-top: 10px; text-align: left; }
.disclaimer summary { cursor: pointer; text-align: center; text-decoration: underline; text-underline-offset: 4px; }
.disclaimer ol { padding-left: 1.3em; }
.linkish { text-decoration: underline; text-underline-offset: 4px; color: var(--muted); font-size: .82rem; min-height: 44px; }
.linkish:hover { color: var(--hot); }

/* 信息不足 */
.insuff { max-width: 640px; margin: 0 auto; min-height: 100vh; display: grid; place-items: center; text-align: center; }
.insuff h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.6rem, 9vw, 4.6rem); margin: 0; line-height: 1.1; }

/* 弹层 */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 12, .78); backdrop-filter: blur(6px); }
.modal-card {
  width: min(520px, 100%); max-height: 90vh; overflow: auto; background: var(--paper); color: var(--ink);
  border: 3px solid var(--ink); border-radius: 24px; box-shadow: 12px 12px 0 var(--accent); padding: 26px 22px; text-align: center;
}
.modal-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 2.2rem; margin: 6px 0 10px; line-height: 1.1; }
.modal-card .actions { margin-top: 18px; }
.butterfly { font-size: 5rem; filter: grayscale(.75) opacity(.75); display: inline-block; animation: flap 1.4s ease-in-out infinite; }
@keyframes flap { 0%, 100% { transform: scaleX(1) translateY(0); } 50% { transform: scaleX(.35) translateY(-10px); } }
.share-preview { width: 100%; border-radius: 14px; border: 3px solid var(--ink); margin-top: 8px; }

.exit-overlay { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: grid; place-items: center; text-align: center; padding: 16px; }
.breath { width: 160px; height: 160px; margin: 0 auto 24px; border-radius: 50%; background: radial-gradient(circle, var(--acid), transparent 70%); animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.55); opacity: .5; } 50% { transform: scale(1.1); opacity: 1; } }
.exit-time { font-family: var(--f-num); font-size: 3.6rem; color: var(--paper); }

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 85; transform: translate(-50%, 140%);
  background: var(--acid); color: var(--ink); font-weight: 900; padding: 10px 18px; border: 3px solid var(--ink); border-radius: 14px;
  box-shadow: 5px 5px 0 var(--ink); transition: transform .45s var(--ease-spring); max-width: calc(100vw - 32px); text-align: center;
}
.toast.is-on { transform: translate(-50%, 0); }

.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translate(-2px, 1px); } 20%, 80% { transform: translate(4px, -2px); }
  30%, 50%, 70% { transform: translate(-7px, 3px) rotate(-.4deg); } 40%, 60% { transform: translate(7px, -3px) rotate(.4deg); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .mode-cards { grid-template-columns: 1fr; gap: 14px; }
  .mode-card { padding: 16px 16px 14px; }
  .mode-desc { font-size: .85rem; }
  .sticker-a { width: 72px; height: 72px; font-size: .6rem; right: 2%; top: 2%; }
  .sticker-b { display: none; }
  .cover-hero { min-height: 40vh; }
  .qcard { padding: 24px 16px 18px; border-radius: 20px; box-shadow: 6px 6px 0 var(--accent); }
  .q-num { font-size: 2.6rem; top: -24px; left: 14px; }
  .lk:nth-child(1) .dot, .lk:nth-child(5) .dot { width: 52px; height: 52px; }
  .lk:nth-child(2) .dot, .lk:nth-child(4) .dot { width: 44px; height: 44px; }
  .lk:nth-child(3) .dot { width: 36px; height: 36px; }
  .lk .lbl { font-size: .72rem; }
  .zones { grid-template-columns: repeat(2, 1fr); }
  .duel { grid-template-columns: 1fr; }
  .duel-card { min-height: 140px; }
  .dims-wrap { grid-template-columns: 1fr; }
  .gauge-wrap { grid-template-columns: 1fr; text-align: center; }
  .gauge { max-width: 240px; margin: 0 auto; }
  .sugg { grid-template-columns: 1fr; }
  .panel { padding: 20px 16px; box-shadow: 6px 6px 0 var(--accent); }
  .seismo span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
