/* 多巴胺 look, in the toy-arcade manner of Softie Idioms / Dopa Drill: cream grid
   paper at rest, thick ink outlines with hard shadows, chunky heavy type, candy
   blocks tilted a few degrees. While the child writes and picks, the show layer
   (js/show.js) builds on top: rays backdrop, HUD, tadpole stage, lv1–lv10 classes.
   Characters, words and sentences stay in 楷体 (WenKai) because children copy them. */
@font-face { font-family: "WenKai"; src: url("../fonts/wenkai.woff2") format("woff2"); font-display: swap; }
:root {
  color-scheme: light;
  --ink: #302238;
  --paper: #fff8ec;
  --soft: #7d6a80;
  --pink: #ff7ab6;
  --pink-l: #ffe3ef;
  --blue: #4f6bff;
  --blue-l: #e3ebff;
  --yellow: #ffd23f;
  --yellow-l: #fff4c7;
  --mint: #3fd0a4;
  --mint-l: #dcfaef;
  --violet: #a77bff;
  --violet-l: #f0e6fc;
  --coral: #ff4f6d;
  --grid-line: #2fb36b;
  --grid-dash: #ff8a8a;
  --outline: #eadfd1;
  --line: 2.8px solid var(--ink);
  --pop: 0 5px 0 var(--ink);
  --kick: 0;
  --kai: "WenKai", "Kaiti SC", "STKaiti", "KaiTi", serif;
  --ui: "PingFang SC", "Hiragino Sans GB", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-family: var(--ui);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
html { overflow-x: hidden; }
body {
  color: var(--ink); background: var(--paper); font-synthesis: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
  overscroll-behavior: none; overflow-x: hidden;
}
/* Grid paper with two soft colour blobs; the rays backdrop fades in over it. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at 10% 20%, #ffcee166 0 170px, transparent 171px),
    radial-gradient(circle at 95% 70%, #d9e4ff88 0 230px, transparent 231px),
    linear-gradient(#7891bb14 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, #7891bb14 1px, transparent 1px) 0 0 / 28px 28px;
}
#bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
#rays { display: none; position: fixed; inset: -80vmax; z-index: 0; pointer-events: none; opacity: 0; background: repeating-conic-gradient(#ffb8d4 0 9deg, #c4d6ff 9deg 18deg); }
.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx.back { z-index: 1; }
main { position: relative; z-index: 2; overflow-x: clip; max-width: 520px; margin: 0 auto; padding: max(10px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
#show-actors { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.fx.front { z-index: 50; }
#cutins { position: fixed; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
#flash { position: fixed; inset: 0; z-index: 70; background: #fff; opacity: 0; pointer-events: none; }
.loading { text-align: center; margin-top: 40vh; font-size: 20px; font-weight: 800; }

button, .btn, select, input { font: inherit; color: inherit; }
button, .btn {
  border: var(--line); cursor: pointer; touch-action: manipulation;
  border-radius: 16px; padding: 11px 16px; font-size: 17px; font-weight: 850; line-height: 1.2;
  background: #fff; box-shadow: var(--pop);
  transition: transform .1s ease, box-shadow .1s ease;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
button:active, .btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
button:disabled { cursor: default; }
.primary { background: var(--yellow); }
.ghost { background: #fff; }
.danger { color: var(--coral); }
h1, h2, h3 { margin: 0; font-weight: 900; }

/* ---------------- tadpole crew (drawn in js/show.js) */
.tad { position: relative; width: 58px; flex: none; }
.tad svg { display: block; width: 100%; height: auto; overflow: visible; }
.tad .tail { transform-box: view-box; transform-origin: 40px 28px; animation: wag .42s ease-in-out infinite alternate; }
.tad:nth-child(2n) .tail { animation-delay: -.2s; }
.tad .joy { display: none; }
.tad.happy .joy { display: inline; }
.tad.happy .eyes { display: none; }
@keyframes wag { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }

/* ---------------- home */
.hero { text-align: center; position: relative; }
.theme-btn { display: block; margin: 0 0 6px auto; font-size: 13px; padding: 6px 12px; border-radius: 999px; box-shadow: 0 3px 0 var(--ink); }
.hero h1 { display: flex; justify-content: center; gap: 5px; margin: 4px 0 2px; }
.hero h1 span {
  display: grid; place-items: center; width: 50px; height: 52px; border: 3px solid var(--ink); border-radius: 13px;
  font-size: 31px; font-weight: 900; color: #fff; box-shadow: 0 5px 0 var(--ink);
  text-shadow: 2px 0 var(--ink), -2px 0 var(--ink), 0 2px var(--ink), 0 -2px var(--ink), 2px 2px var(--ink), -2px 2px var(--ink), 2px -2px var(--ink), -2px -2px var(--ink), 0 4px var(--ink);
  background-image:
    linear-gradient(transparent calc(50% - 1px), #ffffff70 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 1px), #ffffff70 calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
  rotate: var(--r); animation: hop 1.8s cubic-bezier(.3, 1.6, .5, 1) infinite; animation-delay: var(--d);
}
.hero h1 span:nth-child(1) { background-color: var(--pink); --r: -7deg; --d: 0s; }
.hero h1 span:nth-child(2) { background-color: var(--blue); --r: 5deg; --d: -.3s; }
.hero h1 span:nth-child(3) { background-color: var(--mint); --r: -3deg; --d: -.6s; }
.hero h1 span:nth-child(4) { background-color: var(--yellow); --r: 6deg; --d: -.9s; }
.hero h1 span:nth-child(5) { background-color: var(--violet); --r: -5deg; --d: -1.2s; }
.hero h1 span:nth-child(6) { background-color: var(--coral); --r: 4deg; --d: -1.5s; }
@keyframes hop { 0%, 60%, 100% { translate: 0 0; scale: 1; } 10% { translate: 0 3px; scale: 1.06 .92; } 28% { translate: 0 -9px; scale: .96 1.05; } }
.pond { position: relative; height: 150px; margin: 4px -8px 0; }
.pond::before { content: ""; position: absolute; left: 12%; bottom: 10px; width: 76%; height: 16px; border-radius: 50%; background: #e8d8cc99; }
.pond .pad { display: none; }
.pond .mascot { position: absolute; left: 50%; bottom: 18px; height: 112px; transform: translateX(-50%); filter: drop-shadow(0 4px 0 rgba(48, 34, 56, .18)); }
.pond .mascot.s0 { height: 96px; }
.pond .mascot.s1, .pond .mascot.s4 { height: 84px; }
.pond .side { position: absolute; bottom: 16px; width: 62px; animation: sway 2.6s ease-in-out infinite; }
.pond .side.l { left: 9%; scale: -1 1; }
.pond .side.r { right: 9%; animation-delay: -1.3s; }
@keyframes sway { 50% { translate: 0 -8px; rotate: -4deg; } }
.pond .float { position: absolute; top: 14px; display: grid; place-items: center; width: 40px; height: 44px; border: 2px solid var(--ink); border-radius: 10px; background: #fffdf5; font: 24px var(--kai); box-shadow: 0 3px 0 var(--ink); animation: float 3s ease-in-out infinite; }
.pond .float.f1 { left: 4%; rotate: -14deg; }
.pond .float.f2 { right: 4%; rotate: 12deg; animation-delay: -1.4s; }
@keyframes float { 50% { translate: 0 -9px; } }
.bob { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -8px; rotate: 3deg; } }
.bubble {
  position: relative; margin: 6px auto 0; max-width: 420px; padding: 11px 16px;
  background: #fffdf8; border: var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--ink);
  font-size: 16px; font-weight: 750; line-height: 1.6;
}
.bubble::before { content: ""; position: absolute; top: -10px; left: 50%; width: 16px; height: 16px; margin-left: -8px; background: #fffdf8; border-left: var(--line); border-top: var(--line); transform: rotate(45deg); border-radius: 4px 0 0 0; }
.track { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 16px 0 4px; }
.track li { width: 40px; height: 40px; border-radius: 50%; background: #fffcf3; border: 2.5px solid var(--ink); box-shadow: inset 0 -3px 0 #e2d4cc; display: grid; place-items: center; }
.track li img { max-width: 28px; max-height: 24px; filter: grayscale(1) opacity(.4); }
.track li.past { background: var(--mint-l); }
.track li.past img, .track li.now img { filter: none; }
.track li.now { background: var(--yellow); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5.5px var(--pink); transform: scale(1.14); }
.review-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 14px 16px; background: var(--pink-l); border: var(--line); border-radius: 20px; box-shadow: var(--pop); rotate: -1deg; }
.review-card h2 { font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 2px solid var(--ink); font: 23px var(--kai); }
.chip.warm { background: var(--pink-l); }
.lesson { margin-top: 22px; }
.lesson-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.lesson-head .no { font-size: 12px; font-weight: 900; background: var(--ink); color: var(--yellow); border-radius: 8px; padding: 4px 9px; }
.lesson-head h2 { font-size: 17px; }
.group {
  width: 100%; justify-content: space-between; margin-top: 11px; padding: 12px 14px 12px 18px; min-height: 70px;
  border-radius: 18px; background: #fffef9;
}
.lesson .group:nth-of-type(odd) { rotate: -.6deg; }
.lesson .group:nth-of-type(even) { rotate: .6deg; }
.lesson:nth-of-type(3n+1) .group { background: var(--mint-l); }
.lesson:nth-of-type(3n+2) .group { background: var(--blue-l); }
.lesson:nth-of-type(3n) .group { background: var(--pink-l); }
.group .gchars { font: 27px var(--kai); letter-spacing: 1px; white-space: nowrap; }
.group .gstate { font-size: 13px; color: var(--soft); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex: none; }
.group .gstate.go { background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink); border-radius: 12px; padding: 6px 13px; font-size: 16px; font-weight: 900; box-shadow: 0 3px 0 var(--ink); }
.group.done { background: #fff !important; }
.seal { font: 18px var(--kai); font-style: normal; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 3px solid #e2322b; color: #e2322b; transform: rotate(-10deg); }
.foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 24px; }
.foot button { font-size: 15px; padding: 13px 4px; position: relative; border-radius: 18px; }
.count { font-size: 12px; font-weight: 900; font-style: normal; position: absolute; top: -10px; right: -6px; min-width: 22px; height: 22px; border-radius: 11px; background: #ff4766; color: #fff; border: 2px solid var(--ink); display: grid; place-items: center; padding: 0 5px; }
.note { text-align: center; color: var(--soft); font-size: 11px; margin: 16px 0 0; line-height: 1.6; }
.note.warn { color: var(--coral); }

/* ---------------- round chrome */
.round-top, .page-top { display: flex; align-items: center; gap: 8px; }
.close { width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 22px; flex: none; box-shadow: 0 3px 0 var(--ink); }
.steps { list-style: none; display: flex; gap: 5px; padding: 0; margin: 0; flex: 1; }
.steps li { flex: 1; display: flex; }
.steps button { flex: 1; font-size: 13px; font-weight: 850; padding: 7px 0; border-radius: 11px; background: #fffdf7; color: var(--soft); border: 2px solid #d9cbbd; box-shadow: none; }
.steps .on button { background: var(--blue); color: #fff; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); rotate: -2deg; }
.steps .done button { background: var(--mint-l); color: var(--ink); border: 2px solid var(--ink); }
.tag { font-size: 13px; font-weight: 900; background: var(--pink); color: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 4px 8px; }
.page-top h2 { font-size: 22px; }

/* ---------------- HUD: progress lamps, 连击, 快乐能量 */
.hud { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; }
.pips { flex: 1; display: grid; grid-template-columns: repeat(6, 14px); gap: 5px; align-content: center; }
.pip { width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; background: #fffcf3; box-shadow: inset 0 -2px 0 #d4c3bb; transition: transform .2s, background .3s; }
.pip.done { background: var(--c); box-shadow: inset 0 -2px 0 #30223830; }
.pip.done.meh { background: #d9cfe0; }
.pip.done.rainbow { background: conic-gradient(#ff7ab6, #ffd23f, #3fdcb0, #3b6bff, #a77bff, #ff7ab6); }
.pip.now { background: var(--yellow); transform: scale(1.18); box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--pink); }
.combo-box { width: 74px; padding: 4px 6px 5px; border: 3px solid var(--ink); border-radius: 13px; background: #fffefa; box-shadow: 0 4px 0 var(--ink); rotate: 2.5deg; text-align: center; }
.combo-box > div { display: flex; align-items: baseline; justify-content: center; gap: 3px; }
.combo-box b { color: #ed4b96; font-size: 24px; line-height: 1; font-weight: 1000; }
.combo-box span { font-size: 10px; font-weight: 900; }
.combo-box small { display: block; font-size: 9px; margin: 2px 0 3px; font-weight: 800; white-space: nowrap; }
.combo-box .track, .energy-box .track { display: block; height: 4px; border-radius: 3px; background: #30223822; overflow: hidden; }
.combo-box .track i { display: block; height: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); transition: transform .25s; }
.combo-box.hot { background: #fff2a4; box-shadow: 0 4px 0 var(--ink), 0 0 16px #ffcf3f88; }
.energy-box { min-width: 108px; padding: 5px 8px; border: 3px solid var(--ink); border-radius: 13px; background: var(--yellow); box-shadow: 0 4px 0 var(--ink); rotate: -2deg; }
.energy-box > span:first-child { display: flex; align-items: baseline; justify-content: center; gap: 5px; font-size: 10px; font-weight: 900; }
.energy-box b { font-size: 22px; line-height: 1.2; font-weight: 1000; font-variant-numeric: tabular-nums; }
.energy-box .track { margin-top: 3px; }
.energy-box .track i { display: block; height: 100%; width: 0; background: #ed4b96; transition: width .4s; }
body.lv6 .energy-box { background: linear-gradient(100deg, #9fd0ff, #ff9ccc, #ffd23f, #9fd0ff); background-size: 300% 100%; animation: sheen 2s linear infinite; }
@keyframes sheen { to { background-position: 100% 0; } }

/* ---------------- stage: the crew bounces on the beat; friends join as energy rises */
.stage { position: relative; height: 92px; margin: 2px 0 8px; display: flex; align-items: flex-end; justify-content: center; }
.stage::after { content: ""; position: absolute; bottom: 3px; left: 8%; width: 84%; height: 8px; border-bottom: 2px solid var(--ink); border-radius: 50%; opacity: .55; }
.crew { display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; z-index: 1; }
.crew .tad { width: 56px; order: 2; translate: 0 calc(var(--kick) * -7px); scale: calc(1 + var(--kick) * .05) calc(1 - var(--kick) * .08); transform-origin: 50% 90%; }
.crew .tad.lead { width: 84px; }
.crew .tad:nth-child(2) { order: 1; }
.crew .tad:nth-child(3) { order: 3; }
.crew .tad:nth-child(4) { order: 0; width: 44px; }
.crew .tad:nth-child(5) { order: 4; width: 44px; }
.crew .tad:nth-child(2), .crew .tad:nth-child(4) { scale: calc(-1 * (1 + var(--kick) * .05)) calc(1 - var(--kick) * .08); }
.crew .tad + .tad { margin-left: -4px; }
.bunting { position: absolute; inset: -4px -2% auto; width: 104%; height: 30px; opacity: 0; transform: translateY(-20px); transition: opacity .5s, transform .5s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
body.lv3 .bunting { opacity: 1; transform: none; }
.beam { position: absolute; top: -30px; width: 130px; height: 170px; opacity: 0; transition: opacity .6s; mix-blend-mode: screen; filter: blur(2px); background: linear-gradient(rgba(255, 246, 200, .95), rgba(255, 246, 200, 0)); clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%); pointer-events: none; }
.beam.l { left: 0; transform-origin: 50% 0; animation: spot-l 3s ease-in-out infinite; }
.beam.r { right: 0; transform-origin: 50% 0; animation: spot-r 3.4s ease-in-out infinite; }
body.lv5 .beam { opacity: .7; }
@keyframes spot-l { 0%, 100% { transform: rotate(-24deg); } 50% { transform: rotate(10deg); } }
@keyframes spot-r { 0%, 100% { transform: rotate(24deg); } 50% { transform: rotate(-12deg); } }
.reach-tag { position: absolute; left: 50%; top: 0; z-index: 2; transform: translateX(-50%) scale(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); background: var(--ink); color: var(--yellow); border: 3px solid var(--yellow); border-radius: 999px; padding: 3px 14px; white-space: nowrap; font-weight: 900; font-size: 15px; }
body.reach .reach-tag { transform: translateX(-50%) scale(1); }
body.reach .crew .tad.lead { scale: 1.13 .86; }

/* ---------------- cards */
.card { position: relative; text-align: center; margin-top: 14px; padding: 16px 16px 18px; background: #fffdf8; border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 6px 0 var(--ink); }
.marquee { position: absolute; inset: -10px; border-radius: 32px; pointer-events: none; opacity: 0; transition: opacity .6s; padding: 5px; background: radial-gradient(circle, #fff 0 2.5px, #ffd23f 3px 4.5px, transparent 5px) 0 0 / 16px 16px; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: marquee .5s linear infinite; }
body.lv6 .marquee { opacity: 1; }
body.lv8 .marquee { background: radial-gradient(circle, #fff 0 2.5px, #ff7ab6 3px 4.5px, transparent 5px) 0 0 / 16px 16px, radial-gradient(circle, #fff 0 2.5px, #ffd23f 3px 4.5px, transparent 5px) 8px 8px / 16px 16px; }
@keyframes marquee { to { background-position: 16px 0, 24px 8px; } }
body.lv9 .card.write, body.lv9 .card.pick { box-shadow: 0 6px 0 var(--ink), 0 0 0 5px var(--pink), 0 0 40px 10px rgba(255, 210, 63, calc(.4 + var(--kick) * .6)); }
.counter { position: absolute; top: 12px; right: 14px; font-size: 13px; font-weight: 900; background: var(--yellow-l); border: 2px solid var(--ink); border-radius: 10px; padding: 3px 9px; box-shadow: 0 3px 0 var(--ink); rotate: 3deg; font-variant-numeric: tabular-nums; }
.actions { display: flex; gap: 10px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.actions .primary { flex: 1 1 180px; }

/* ---------------- 田字格 */
.tzg { position: relative; width: 100%; aspect-ratio: 1; background: #fff; border-radius: 8px; }
.tzg > svg { position: absolute; }
.tzg > svg.grid { inset: 0; width: 100%; height: 100%; }
.tzg > svg.char { inset: 6%; width: 88%; height: 88%; }
.tzg.big { width: min(76vw, 42vh, 330px); margin: 6px auto 0; border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); border-radius: 14px; }
.tzg.big > svg.grid { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
.tzg .hw { position: absolute; inset: 0; z-index: 2; }
.tzg .hw svg { display: block; touch-action: none; }
.tzg .overlay { position: absolute; z-index: 3; pointer-events: none; overflow: visible; }
.tzg svg.peek { z-index: 4; pointer-events: none; transition: opacity .4s; }
.tzg svg.peek.gone { opacity: 0; }
.start-dot { fill: rgba(255, 122, 182, .3); stroke: var(--pink); stroke-width: 10; animation: pulse .9s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.start-core { fill: var(--pink); }
@keyframes pulse { 50% { transform: scale(1.4); } }

/* ---------------- 认一认 */
.see .py, .paper small { font: 30px var(--kai); color: var(--blue); letter-spacing: 1px; }
.word { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font: 32px var(--kai); }
.word b, .w b { color: #ed4b96; }
.words { margin: 4px 0 0; font: 18px var(--kai); color: var(--soft); }
.speak { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 20px; flex: none; background: var(--mint-l); box-shadow: 0 3px 0 var(--ink); }
.parts { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; font-size: 24px; font-weight: 900; }
.parts .part { width: 58px; height: 58px; background: #fff; border-radius: 13px; border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink); padding: 4px; }
.parts .whole { font: 42px var(--kai); }
.hint { margin: 14px auto 0; max-width: 440px; padding: 10px 13px; border-left: 4px solid var(--pink); border-radius: 0 12px 12px 0; background: var(--pink-l); font: 17px/1.6 var(--kai); text-align: left; }

/* ---------------- 写一写 */
.prompt { display: flex; align-items: center; justify-content: center; gap: 12px; font: 36px var(--kai); margin-top: 4px; }
.w { display: inline-flex; align-items: flex-end; gap: 2px; }
.gap { position: relative; display: inline-block; min-width: 1.15em; border-bottom: 4px dashed #ed4b96; text-align: center; }
.gap small { position: absolute; left: 50%; top: -1.05em; transform: translateX(-50%); font: 20px var(--kai); color: var(--blue); white-space: nowrap; }
.prompt .w { padding-top: 22px; }
.stamp {
  position: absolute; z-index: 5; right: -14px; top: -16px; width: 76px; height: 76px; border-radius: 16px;
  display: grid; place-items: center; font: 32px var(--kai); pointer-events: none; background: #fff;
}
.stamp.red { border: 4px solid #e2322b; color: #e2322b; box-shadow: 0 0 0 4px #fff, 0 4px 0 6px rgba(226, 50, 43, .25); }
.stamp.blue { border: 4px solid var(--blue); color: var(--blue); font-size: 23px; }
.next { margin-top: 14px; width: min(100%, 340px); font-size: 20px; font-weight: 900; padding: 14px; background: var(--pink); color: #fff; text-shadow: 0 2px 0 rgba(48, 34, 56, .45); box-shadow: 0 6px 0 var(--ink); }

/* ---------------- 辨一辨 */
.meter { display: none; }
.ask { margin: 0; font-size: 13px; font-weight: 800; color: var(--soft); text-align: left; }
.sentence { font: 26px/1.8 var(--kai); margin: 12px 0 6px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.blank { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 12px; background: #fff4f8; border: 2.5px dashed #d28ca8; color: #c15a85; vertical-align: middle; }
.blank.filled { background: #e2f4df; border: 2.5px solid #79aa76; color: #2f6b45; animation: pop .3s ease-out; }
@keyframes pop { from { scale: 1.6; } }
.opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.opt { font: 38px var(--kai); min-height: 74px; padding: 0; border-radius: 16px; position: relative; z-index: 2; }
.opt:nth-child(1) { background: #fffef9; }
.opt:nth-child(2) { background: var(--yellow-l); }
.opt:nth-child(3) { background: var(--blue-l); }
.opt:nth-child(4) { background: var(--violet-l); }
body.lv4 .opt:nth-child(1) { background: var(--pink-l); }
body.lv4 .opt:nth-child(4) { background: var(--mint-l); }
body.lv8 .opt { box-shadow: 0 5px 0 var(--ink), 0 0 calc(var(--kick) * 18px) rgba(255, 210, 63, .9); }
.opt.flying { z-index: 20; box-shadow: none; border-color: transparent; background: transparent; }
.opt.no, .tile.no { animation: shake .4s; opacity: .35; }
@keyframes shake { 20%, 60% { translate: -7px 0; } 40%, 80% { translate: 7px 0; } }
.spot .sentence { font-size: 32px; }
.spot .sentence .w { padding-top: 22px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.tile { padding: 6px; border-radius: 16px; display: block; position: relative; }
.tile .tzg { border-radius: 8px; }
.tile.yes { background: var(--mint); }
.tile .missing { fill: var(--coral); opacity: .9; animation: blink .5s 3; }
@keyframes blink { 50% { opacity: .15; } }
.tile .why { display: block; font-size: 12px; font-weight: 900; color: var(--coral); margin-top: 4px; }
.tile.no { opacity: .85; }

/* ---------------- 本子上 */
.paper h2 { font-size: 22px; margin-top: 2px; }
.lead { font: 17px/1.6 var(--kai); color: var(--soft); margin: 10px 0; text-align: left; }
.paper-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 18px; }
.paper-tile { display: block; padding: 6px 6px 8px; border-radius: 16px; }
.paper-tile small { display: block; font-size: 20px; margin-bottom: 4px; }
.paper > .primary { width: min(100%, 340px); font-size: 19px; padding: 14px; }

/* ---------------- 结果 */
.result { padding-top: 20px; }
.stage-show { height: 176px; display: grid; place-items: center; }
.mascot.big { max-height: 156px; max-width: 70%; filter: drop-shadow(0 5px 0 rgba(48, 34, 56, .2)); }
.result .bubble { font-size: 17px; }
.score { font-size: 19px; font-weight: 900; margin: 20px 0 4px; }
.again p { margin: 6px 0; font-size: 14px; font-weight: 750; color: var(--soft); }
.again .chips { justify-content: center; }
.again.good { color: #1f9e6e; font-size: 16px; font-weight: 900; }

/* ---------------- 错字本、错字单、设置 */
.book-list { display: grid; gap: 10px; text-align: left; }
.book-item { display: flex; align-items: center; gap: 14px; background: var(--pink-l); border: 2.5px solid var(--ink); border-radius: 16px; padding: 8px 12px; box-shadow: 0 3px 0 var(--ink); }
.big-c { font: 40px var(--kai); width: 54px; text-align: center; }
.book-item b { display: block; font: 20px var(--kai); }
.book-item small { color: var(--soft); font-size: 13px; font-weight: 700; }
.book > .primary { margin-top: 16px; width: 100%; }
.sheet-img { width: 100%; border-radius: 14px; border: var(--line); margin-top: 12px; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
.sheet .btn { width: 100%; }
.settings .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px; border-bottom: 1.5px solid var(--outline); font-size: 15px; font-weight: 800; text-align: left; }
.settings select, .settings input { border: 2.5px solid var(--ink); border-radius: 12px; background: var(--yellow-l); padding: 7px 10px; font-size: 15px; font-weight: 700; max-width: 46%; -webkit-user-select: auto; user-select: auto; }
.settings .danger { margin-top: 18px; width: 100%; }
.about { text-align: left; margin-top: 18px; font-size: 12px; line-height: 1.7; color: var(--soft); }
.about h3 { font-size: 15px; color: var(--ink); }

/* ---------------- show overlays: cut-in banners, number slams, parade, finale */
.cutin-band { position: absolute; left: -20%; width: 140%; display: flex; align-items: center; justify-content: center; transform-origin: center; }
.band-bg { position: absolute; inset: 0; border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); background: repeating-linear-gradient(-45deg, var(--c1) 0 22px, var(--c2) 22px 44px); }
.band-text { position: relative; color: #fff; font-size: clamp(28px, 8vw, 46px); letter-spacing: .08em; white-space: nowrap; font-weight: 1000; text-shadow: 3px 0 var(--ink), -3px 0 var(--ink), 0 3px var(--ink), 0 -3px var(--ink), 0 7px var(--ink); }
.unit-slam { position: absolute; font-weight: 1000; color: var(--yellow); white-space: nowrap; transform-origin: center; text-shadow: 4px 0 var(--ink), -4px 0 var(--ink), 0 4px var(--ink), 0 -4px var(--ink), 3px 3px var(--ink), -3px 3px var(--ink), 3px -3px var(--ink), -3px -3px var(--ink), 0 10px #ff7ab6; }
.tad.parade { position: absolute; top: 0; left: 0; }
.tad.giant { position: absolute; left: 50%; bottom: -24px; width: min(400px, 92vw); transform: translate(-50%, 110%); transform-origin: 50% 88%; }

/* ---------------- fewer effects */
.calm *, .calm *::before, .calm *::after { animation: none !important; transition: none !important; }
.calm .bunting, .calm .beam, .calm .marquee { display: none; }

@media (max-height: 740px) {
  .pond { height: 128px; }
  .pond .mascot { height: 92px; }
  .stage { height: 76px; }
  .crew .tad.lead { width: 70px; }
  .crew .tad { width: 48px; }
  .sentence { font-size: 24px; }
}
@media (max-width: 360px) {
  .hero h1 span { width: 44px; height: 46px; font-size: 27px; }
  .opt { font-size: 32px; min-height: 64px; }
  .combo-box { width: 66px; }
  .energy-box { min-width: 96px; }
}
