/* 张卓老师趣味中文游戏乐园 · 学生端样式（手机优先；汉字和拼音不缩小） */
@font-face { font-family: "Kanit"; font-weight: 600; font-display: swap; src: url(/fonts/kanit-thai-600-normal.woff2) format("woff2"); unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Kanit"; font-weight: 600; font-display: swap; src: url(/fonts/kanit-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2190-2199, U+2212; }

:root {
  --red: #A61D24; --red-hi: #C2333A; --gold: #C9A04A; --gold-lt: #F2D58A; --cream: #FFF8EC; --paper: #FFFDF7;
  --ink: #2A2422; --muted: #6F625A; --line: #E8D9BF;
  --sky: #3fa9f5; --sun: #ffb400; --grass: #43a047; --berry: #ff5a7a; --violet: #7b61ff; --ok: #1f9d55; --bad: #e0483e;
  --t1: #d93a2b; --t2: #c27400; --t3: #1f8a5c; --t4: #2b5bd7; --t0: #8a7560;
  --f-ui: "Kanit", "Noto Sans Thai", "Leelawadee UI", "Thonburi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body: "Noto Sans Thai", "Leelawadee UI", "Thonburi", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-han: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --f-py: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  --r: 18px; --sh: 0 3px 0 rgba(0,0,0,.12), 0 8px 18px rgba(80,40,10,.12);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--f-body); color: var(--ink); background-color: #fff3d6; background-image: radial-gradient(circle at 12% 8%, #ffe7a8 0 9%, transparent 9.5%), radial-gradient(circle at 92% 22%, #ffd6e0 0 7%, transparent 7.5%), radial-gradient(circle at 80% 92%, #d6f0ff 0 10%, transparent 10.5%), linear-gradient(180deg, #fff8e8, #ffeccc); background-attachment: fixed; overscroll-behavior: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-ui); font-weight: 600; margin: .3em 0; line-height: 1.25; text-align: center; }
h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; color: var(--muted); }
.hz, .word .hz { font-family: var(--f-han); }
.py { font-family: var(--f-py); letter-spacing: .01em; }
.py .t1 { color: var(--t1); } .py .t2 { color: var(--t2); } .py .t3 { color: var(--t3); } .py .t4 { color: var(--t4); } .py .t0 { color: var(--t0); }
.emoji, .pic.emoji { font-family: var(--f-emoji); line-height: 1; }

#app { min-height: 100%; }
.screen { min-height: 100vh; min-height: 100dvh; max-width: 720px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; align-items: stretch; }
.topbar { display: flex; align-items: center; gap: 8px; padding: 8px 0; min-height: 52px; }
.topbar.slim { min-height: 42px; padding: 4px 0; }
.topbar.slim .top-title small { display: none; }
.mini-badge { width: 40px; height: auto; }
.top-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.top-title b { font-family: var(--f-han); font-size: .95rem; color: var(--red); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title small { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip { background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 6px 12px; font-family: var(--f-ui); font-size: .9rem; min-height: 38px; box-shadow: 0 2px 0 var(--line); }
.chip.icon { padding: 6px 10px; font-family: var(--f-emoji); }

/* ---------- 首页 / 语言 */
.hero { text-align: center; padding: 8px 0 4px; }
.badge { width: min(240px, 62vw); height: auto; filter: drop-shadow(0 6px 10px rgba(120, 30, 20, .2)); }
.hero h1 { font-family: var(--f-han); color: var(--red); font-size: clamp(1.45rem, 6vw, 2rem); margin-top: 6px; }
.hero .sub { margin: 2px 0; font-family: var(--f-ui); color: var(--ink); font-size: 1.02rem; }
.hero .sub.en { color: var(--muted); font-size: .95rem; }
.big-choices { display: grid; gap: 14px; margin-top: 18px; }
.big-btn { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 76px; border-radius: 24px; font-family: var(--f-ui); font-size: 1.55rem; color: #fff; box-shadow: var(--sh); transition: transform .1s; }
.big-btn:active, .go-btn:active, .opt:active, .game-card:active { transform: translateY(3px) scale(.98); }
.big-btn.th { background: linear-gradient(135deg, #ff6b6b, var(--red)); }
.big-btn.en { background: linear-gradient(135deg, #4fc3f7, #2b5bd7); }
.big-btn .flag { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: grid; place-items: center; font-size: 1.6rem; }
.bob { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-1deg); } }

/* ---------- 房间号 */
.code-disp { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.code-disp span { width: 46px; height: 58px; border-radius: 14px; background: #fff; border: 3px solid var(--line); display: grid; place-items: center; font: 600 1.8rem var(--f-py); }
.code-disp span.on { border-color: var(--sky); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 340px; width: 100%; margin: 6px auto 0; }
.key { min-height: 62px; border-radius: 18px; background: #fff; font: 600 1.6rem var(--f-py); box-shadow: var(--sh); }
.note { text-align: center; color: var(--muted); font-size: 1rem; margin: 8px 0; min-height: 1.3em; }
.note.warn { color: var(--bad); font-weight: 600; }
.note.big { font-size: 1.15rem; color: var(--ink); background: #fff; border-radius: 16px; padding: 14px; }

/* ---------- 昵称和头像 */
.nick { width: 100%; font-size: 1.6rem; padding: 14px 18px; border-radius: 18px; border: 3px solid var(--line); text-align: center; font-family: var(--f-ui); background: #fff; }
.nick:focus { border-color: var(--sky); outline: none; }
.av-preview { display: inline-block; font-family: var(--f-emoji); font-size: 2.2rem; vertical-align: middle; margin-left: 4px; }
.av-preview.pop { animation: pop .4s; }
.av-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.av-tabs::-webkit-scrollbar { display: none; }
.av-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 14px; border-radius: 999px; background: #fff; border: 3px solid var(--line); font: 600 1.05rem var(--f-ui); color: var(--ink); box-shadow: 0 2px 0 var(--line); }
.av-tab .ti { font-family: var(--f-emoji); font-size: 1.4rem; }
.av-tab.on { background: var(--sun); border-color: #e09a00; color: #3a2a00; }
.avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; margin: 6px 0 16px; }
.av { aspect-ratio: 1; border-radius: 20px; background: #fff; font-size: clamp(2rem, 8vw, 2.7rem); font-family: var(--f-emoji); box-shadow: 0 3px 0 var(--line); border: 3px solid transparent; transition: transform .1s; animation: optIn .3s both; }
.av:nth-child(4n+2) { animation-delay: .03s; } .av:nth-child(4n+3) { animation-delay: .06s; } .av:nth-child(4n) { animation-delay: .09s; }
.av.on { border-color: var(--sun); background: #fff6d6; transform: scale(1.08); box-shadow: 0 0 0 4px rgba(255, 180, 0, .25); }
.go-btn { min-height: 64px; border-radius: 22px; background: linear-gradient(135deg, #34c97b, #1f9d55); color: #fff; font: 600 1.45rem var(--f-ui); box-shadow: var(--sh); margin-top: auto; }
.screen.profile .go-btn { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; }

/* ---------- 选游戏 */
.banner { background: var(--sun); color: #3a2a00; border-radius: 14px; padding: 10px; text-align: center; font-family: var(--f-ui); }
.game-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.game-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 140px; border-radius: 24px; color: #fff; padding: 12px 8px; box-shadow: var(--sh); overflow: hidden; border: 4px solid transparent; }
.game-card:last-child { grid-column: 1 / -1; min-height: 110px; }
.game-card .gicon { font-size: 2.8rem; font-family: var(--f-emoji); filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .2)); }
.game-card b { font-family: var(--f-ui); font-size: 1.15rem; text-shadow: 0 2px 0 rgba(0, 0, 0, .18); }
.game-card small { font-size: .85rem; opacity: .95; text-align: center; }
.game-card.on { border-color: #fff; box-shadow: 0 0 0 4px var(--sun), var(--sh); }
.g-fish { background: linear-gradient(160deg, #4fc3f7, #1565c0); }
.g-treasure { background: linear-gradient(160deg, #ffd54f, #f57f17); }
.g-race { background: linear-gradient(135deg, #ef5350, #c2185b 45%, #1e63d6); }
.g-match { background: linear-gradient(135deg, #ff6b9a, #ffb74d, #81c784, #4fc3f7, #9575cd); }
.g-farm { background: linear-gradient(160deg, #9ccc65, #2e7d32); }

/* ---------- 等待室 */
.me-card { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border-radius: 20px; padding: 10px 16px; margin: 6px auto; box-shadow: 0 3px 0 var(--line); }
.me-card b { font-family: var(--f-ui); font-size: 1.3rem; }
.big-av { font-size: 2.6rem; font-family: var(--f-emoji); }
.wait-anim { display: flex; justify-content: center; gap: 14px; font-size: 3rem; font-family: var(--f-emoji); margin: 14px 0 0; }
.bounce { display: inline-block; animation: hop 1.1s ease-in-out infinite; }
.bounce.b2 { animation-delay: .18s; } .bounce.b3 { animation-delay: .36s; }
@keyframes hop { 40% { transform: translateY(-16px); } 60% { transform: translateY(0) scaleY(.92); } }
.my-game { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-radius: 20px; padding: 12px 14px; color: #fff; box-shadow: var(--sh); margin: 10px 0; }
.my-game small { width: 100%; opacity: .9; }
.my-game b { font-family: var(--f-ui); font-size: 1.25rem; }
.my-game .chip { color: var(--ink); }
.room-info { text-align: center; color: var(--muted); margin: 4px 0; }
.room-info.small { font-size: .85rem; }
.big-emoji { font-size: 4rem; text-align: center; font-family: var(--f-emoji); }

/* ---------- 游戏画面 */
.screen.play { padding-bottom: 12px; }
.hud { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 16px; padding: 6px 10px; box-shadow: 0 2px 0 var(--line); }
.hud-av { font-size: 1.8rem; font-family: var(--f-emoji); }
.hud-time { font: 700 clamp(1.5rem, 4vw + .5rem, 2.1rem) var(--f-py); min-width: 3.6em; color: var(--ink); background: #eef7ff; border-radius: 10px; padding: 0 8px; text-align: center; font-variant-numeric: tabular-nums; }
.hud-time.low { color: #fff; background: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.08); } }
.hud-pts { margin-left: auto; font: 600 clamp(1.25rem, 3vw + .5rem, 1.7rem) var(--f-ui); display: inline-block; }
.hud-pts.bump { animation: pop .45s; }
.hud-count { font: 600 clamp(1.1rem, 2.5vw + .45rem, 1.5rem) var(--f-ui); color: var(--muted); }
.scene { position: relative; height: clamp(170px, 30vh, 280px); border-radius: 22px; margin: 8px 0; overflow: hidden; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08); flex-shrink: 0; font-family: var(--f-emoji); isolation: isolate; }
.scene.small { height: clamp(84px, 14vh, 130px); }
.qbox { position: relative; flex: 1; display: flex; flex-direction: column; gap: 10px; background: #fff; border-radius: 22px; padding: 12px; box-shadow: 0 3px 0 var(--line); }
/* 题目文字：中文、拼音、泰文、英文都尽量大（手机按屏幕宽度放大，电脑上更大） */
.prompt { margin: 0; text-align: center; font-family: var(--f-ui); color: var(--ink); font-size: clamp(1.45rem, 4.2vw + .6rem, 2.3rem); line-height: 1.3; animation: optIn .3s both; }
.stem { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; min-height: 92px; padding: 4px; text-align: center; animation: stemIn .35s both; }
.stem .word { display: inline-flex; flex-direction: column; align-items: center; }
.stem-word .py { font-size: clamp(1.8rem, 5.4vw + .6rem, 3rem); }
.stem-word .hz { font-size: clamp(3.2rem, 14vw + .4rem, 6rem); line-height: 1.12; }
.big-py { font-size: clamp(3rem, 12vw + .4rem, 5rem); font-weight: 700; }
.stem-pic { font-size: clamp(3.4rem, 15vw, 5.4rem); }
.stem .mean { width: 100%; margin: 0; font: 600 clamp(1.9rem, 6.2vw + .6rem, 3.1rem) var(--f-ui); line-height: 1.3; }
.stem .mean.small { font-size: clamp(1.6rem, 4.6vw + .5rem, 2.5rem); color: var(--ink); }
.pic.digit { font: 800 2.6rem var(--f-py); color: var(--violet); background: #f1edff; border-radius: 14px; padding: 0 12px; min-width: 64px; text-align: center; }
.stem-pic.digit { font-size: clamp(3rem, 12vw, 4.4rem); }
.pic.swatch { display: inline-block; width: 58px; height: 58px; border-radius: 50%; border: 3px solid rgba(0, 0, 0, .15); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1); }
.stem-pic.swatch { width: 84px; height: 84px; }
.listen, .listen-big { border-radius: 50%; background: #e8f4ff; font-family: var(--f-emoji); box-shadow: 0 3px 0 #b9dbf7; }
.listen { width: 56px; height: 56px; font-size: 1.6rem; }
.listen-big { width: 104px; height: 104px; font-size: 3.1rem; animation: pulse 1.8s infinite; }
.trans { width: 100%; margin: 4px 0 0; color: var(--ink); font: 600 clamp(1.5rem, 4.2vw + .5rem, 2.4rem) var(--f-ui); line-height: 1.35; }

.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opts.n3 { grid-template-columns: 1fr 1fr 1fr; }
.opts.n2 { grid-template-columns: 1fr 1fr; }
.opts.col { grid-template-columns: 1fr; }
.opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 86px; border-radius: 18px; padding: 8px 6px; background: #fff; border: 3px solid #dfe9f5; box-shadow: 0 4px 0 #cfdbe9; transition: transform .08s, background .2s; animation: optIn .32s both; overflow-wrap: anywhere; }
.opt:nth-child(2) { animation-delay: .05s; } .opt:nth-child(3) { animation-delay: .1s; } .opt:nth-child(4) { animation-delay: .15s; }
@keyframes optIn { from { opacity: 0; transform: translateY(14px) scale(.92); } }
@keyframes stemIn { from { opacity: 0; transform: scale(.85); } }
.opt .word { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.12; }
.opt .word .py, .opt-py { font-size: clamp(1.5rem, 4.2vw + .5rem, 2.4rem); }
.opt .word .hz { font-size: clamp(2.5rem, 10vw + .4rem, 4rem); }
.opt .pic.emoji { font-size: clamp(2.4rem, 8vw + .3rem, 3.4rem); }
.opt .pic.digit { font-size: 2rem; }
.opt .mean { font: 600 clamp(1.6rem, 5.4vw + .4rem, 2.6rem) var(--f-ui); line-height: 1.25; text-align: center; color: var(--ink); }
.opt .mean.long { font-family: var(--f-ui); font-weight: 600; font-size: clamp(1.4rem, 4vw + .45rem, 2.1rem); text-align: left; }
.opt.long { min-height: 64px; align-items: flex-start; text-align: left; padding: 10px 14px; }
.opt .big-label { font-size: clamp(1.9rem, 6vw + .4rem, 2.8rem); font-weight: 700; font-family: var(--f-py); }
.opt .tone-mark { font: 800 2.6rem var(--f-py); line-height: .8; height: .6em; }
.opt .tone-mark.t1, .mcard .tone-mark.t1 { color: var(--t1); } .opt .tone-mark.t2, .mcard .tone-mark.t2 { color: var(--t2); } .opt .tone-mark.t3, .mcard .tone-mark.t3 { color: var(--t3); } .opt .tone-mark.t4, .mcard .tone-mark.t4 { color: var(--t4); }
.opt .lbl { font: 600 clamp(1.5rem, 4.4vw + .45rem, 2.4rem) var(--f-ui); }
.opt.right { background: #e3f9e9; border-color: var(--ok); box-shadow: 0 4px 0 #9ad9b0, 0 0 0 5px rgba(31, 157, 85, .2); animation: pop .35s; }
.opt.wrong { background: #ffe9e6; border-color: var(--bad); box-shadow: 0 4px 0 #f2a59e; animation: shake .4s; }
.opt:disabled { cursor: default; }
@keyframes pop { 50% { transform: scale(1.07); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* 句子（逐词注音） */
.sent { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 2px 4px; width: 100%; }
.sent .tok { display: inline-flex; flex-direction: column; align-items: center; }
.sent .tok .py { font-size: clamp(1.15rem, 3.2vw + .4rem, 1.8rem); line-height: 1.2; min-height: 1.2em; }
.sent .tok .hz { font-size: clamp(2rem, 7vw + .3rem, 3.3rem); line-height: 1.25; }
.sent.nopinyin .tok .py { display: none; }
.sent .tok.blank .hz { min-width: 2.2em; border-bottom: 4px solid var(--violet); color: var(--violet); text-align: center; }
.sent .tok.punct .hz { min-width: .6em; }
.is-sent { flex-direction: column; }

/* 反馈 */
.feedback { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 5; border-radius: 18px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; animation: up .25s ease-out; box-shadow: 0 8px 22px rgba(0, 0, 0, .15); }
.feedback.ok { background: #effcf3; border: 3px solid var(--ok); }
.feedback.no { background: #fff4ec; border: 3px solid #ffb48a; }
.fb-msg { font: 600 clamp(1.4rem, 4vw + .5rem, 2.1rem) var(--f-ui); }
.feedback small { color: var(--ink); font-size: clamp(1.05rem, 2.4vw + .45rem, 1.4rem); }
.fb-ans { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 14px; }
.fb-ans .word { display: inline-flex; flex-direction: column; align-items: center; }
.fb-ans .word .py { font-size: clamp(1.3rem, 3.4vw + .45rem, 2rem); } .fb-ans .word .hz { font-size: clamp(2.3rem, 8vw + .3rem, 3.4rem); }
.fb-ans .sent .tok .hz { font-size: clamp(1.9rem, 6vw + .3rem, 2.6rem); }
.fb-pic { font-size: clamp(2.4rem, 8vw, 3.4rem); }
.fb-mean { font: 600 clamp(1.35rem, 4vw + .45rem, 2.1rem) var(--f-ui); }
.next-btn { margin-top: 4px; min-height: 56px; padding: 0 28px; border-radius: 16px; background: var(--sky); color: #fff; font: 600 clamp(1.3rem, 3vw + .5rem, 1.7rem) var(--f-ui); box-shadow: 0 4px 0 #1f7fc4; }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }

/* 配对 */
.mboard { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mcol { display: flex; flex-direction: column; gap: 10px; }
.mcard { min-height: 80px; border-radius: 16px; background: #fff; border: 3px solid #e7defa; box-shadow: 0 4px 0 #d8ccf5; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; transition: transform .15s, opacity .3s; animation: flipIn .45s both; overflow-wrap: anywhere; }
.mcol .mcard:nth-child(2) { animation-delay: .07s; } .mcol .mcard:nth-child(3) { animation-delay: .14s; } .mcol .mcard:nth-child(4) { animation-delay: .21s; }
.mcol:last-child .mcard { animation-delay: .1s; } .mcol:last-child .mcard:nth-child(2) { animation-delay: .17s; } .mcol:last-child .mcard:nth-child(3) { animation-delay: .24s; } .mcol:last-child .mcard:nth-child(4) { animation-delay: .31s; }
@keyframes flipIn { from { opacity: 0; transform: perspective(500px) rotateY(90deg) scale(.8); } }
.mcard .word { display: inline-flex; flex-direction: column; align-items: center; }
.mcard .word .py, .mcard .opt-py { font-size: clamp(1.35rem, 3.8vw + .4rem, 2.1rem); } .mcard .word .hz { font-size: clamp(2.3rem, 8vw + .3rem, 3.4rem); }
.mcard .pic.emoji { font-size: clamp(2.2rem, 7.5vw, 3.1rem); } .mcard .mean { font: 600 clamp(1.4rem, 4.2vw + .4rem, 2.2rem) var(--f-ui); text-align: center; }
.mcard .tone-mark { font: 800 2.2rem var(--f-py); line-height: .8; }
.mcard .pic.swatch { width: 40px; height: 40px; }
.mcard.sound { flex-direction: row; gap: 8px; color: #fff; border-color: transparent; }
.mcard.sound .snd { font-family: var(--f-emoji); font-size: 2rem; }
.mcard.sound .snd-n { font: 700 1.8rem var(--f-py); }
.mcard.sound.sc0 { background: #ff7a59; box-shadow: 0 4px 0 #d9532f; } .mcard.sound.sc1 { background: #3fa9f5; box-shadow: 0 4px 0 #1f7fc4; }
.mcard.sound.sc2 { background: #43a047; box-shadow: 0 4px 0 #2e7d32; } .mcard.sound.sc3 { background: #9b6bff; box-shadow: 0 4px 0 #7546e0; }
.mcard.right { border-color: #ffe0b2; box-shadow: 0 4px 0 #ffcc80; }
.mcard.sel { border-color: var(--violet); background: #f3efff; transform: scale(1.05); box-shadow: 0 0 0 5px rgba(123, 97, 255, .25); }
.mcard.sound.sel { border-color: #fff; transform: scale(1.06); }
.mcard.done { background: #e3f9e9; border-color: var(--ok); opacity: .4; pointer-events: none; transform: scale(.94); animation: none; }
.mcard.sound.done { background: #9ccfa9; }
.mcard.shake { animation: shake .4s; border-color: var(--bad); }

/* 暂停 / 结束遮罩 */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(40, 20, 10, .55); display: grid; place-items: center; padding: 16px; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: fade .2s; }
.ov-card { background: #fff; border-radius: 26px; padding: 22px 26px; text-align: center; max-width: 380px; width: 100%; box-shadow: 0 16px 40px rgba(0, 0, 0, .25); animation: stemIn .3s both; }
.ov-card h2 { font-size: 1.7rem; }
.ov-card p { color: var(--ink); font-size: 1.2rem; }
.dots::after { content: ''; animation: dots 1.2s infinite steps(4); }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@keyframes fade { from { opacity: 0; } }
.net-banner { position: fixed; left: 50%; top: 8px; transform: translate(-50%, -150%); z-index: 60; background: #333; color: #fff; padding: 8px 16px; border-radius: 999px; font-size: 1.05rem; transition: transform .3s; max-width: 92vw; text-align: center; }
.net-banner.show { transform: translate(-50%, 0); }

/* 结果 */
.stars-row { display: flex; justify-content: center; gap: 8px; font-size: 3.6rem; }
.star { color: #e6dccb; text-shadow: 0 3px 0 rgba(0, 0, 0, .1); }
.star.on { color: var(--sun); animation: starIn .6s both; }
.star.on:nth-child(2) { animation-delay: .2s; } .star.on:nth-child(3) { animation-delay: .4s; }
@keyframes starIn { from { transform: scale(0) rotate(-180deg); } 70% { transform: scale(1.3) rotate(10deg); } }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
.stat { background: #fff; border-radius: 18px; padding: 12px 8px; text-align: center; box-shadow: 0 3px 0 var(--line); display: flex; flex-direction: column; animation: optIn .4s both; }
.stat:nth-child(2) { animation-delay: .08s; } .stat:nth-child(3) { animation-delay: .16s; } .stat:nth-child(4) { animation-delay: .24s; }
.stat .si { font-size: 1.8rem; font-family: var(--f-emoji); }
.stat b { font: 700 1.8rem var(--f-ui); }
.stat small { color: var(--ink); font-size: 1.1rem; }
.cheer { text-align: center; font: 600 1.4rem var(--f-ui); color: var(--red); }

/* 彩带 / 飘字 / 通用特效 */
.confetto { position: fixed; top: -10px; width: 9px; height: 14px; border-radius: 2px; z-index: 70; pointer-events: none; animation: fall 1.5s ease-in forwards; }
.scene .confetto { position: absolute; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); opacity: .3; } }
.float-text { position: fixed; z-index: 80; transform: translate(-50%, 0); pointer-events: none; font: 700 1.9rem var(--f-ui); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .4), 0 0 10px rgba(0, 0, 0, .3); animation: floatUp 1.1s ease-out forwards; white-space: nowrap; }
.float-text.gold { color: #ffe066; } .float-text.red { color: #ffdddd; } .float-text.big { font-size: 2.3rem; }
@keyframes floatUp { 0% { transform: translate(-50%, 10px) scale(.6); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1.15); opacity: 1; } to { transform: translate(-50%, -70px) scale(1); opacity: 0; } }
.sp { position: absolute; z-index: 6; pointer-events: none; line-height: 1; font-family: var(--f-emoji); }
.sp.pt { z-index: 9; margin: -.5em 0 0 -.5em; }
.qbox > .sp.pt { z-index: 12; }
.fly { position: fixed; z-index: 90; pointer-events: none; line-height: 1; font-family: var(--f-emoji); filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); }
.bigtext { position: absolute; left: 50%; top: 46%; z-index: 20; transform: translate(-50%, -50%); white-space: nowrap; pointer-events: none; font: 700 clamp(1.5rem, 6vw, 2.6rem) var(--f-ui); color: #fff; padding: 4px 18px; border-radius: 999px; background: rgba(0, 0, 0, .35); text-shadow: 0 3px 0 rgba(0, 0, 0, .35); }
.bigtext.rare { background: linear-gradient(135deg, #7b61ff, #3fa9f5); }
.bigtext.legend { background: linear-gradient(135deg, #ffb400, #ff5a5f); box-shadow: 0 0 0 4px rgba(255, 255, 255, .6), 0 0 30px rgba(255, 200, 60, .9); }
.bigtext.combo { background: linear-gradient(135deg, #ff7a1a, #e0483e); top: 30%; }
.bigtext.turbo { background: linear-gradient(135deg, #ff3d00, #ffb400); top: 24%; }
.flash { position: absolute; inset: 0; z-index: 19; pointer-events: none; }
.tray { position: absolute; left: 8px; bottom: 6px; z-index: 8; display: flex; gap: 3px; align-items: center; background: rgba(255, 255, 255, .9); border-radius: 14px; padding: 2px 10px; font-size: 1.35rem; max-width: calc(100% - 16px); overflow: hidden; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.tray b { font: 700 1.2rem var(--f-ui); color: var(--ink); margin-right: 2px; }
.tray .recent { display: flex; gap: 1px; }
.streak { position: absolute; right: 8px; bottom: 6px; z-index: 8; font: 700 1.4rem var(--f-ui); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); animation: pulse 1s infinite; }
.streak:empty { display: none; }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(.3); opacity: 0; } 50% { transform: scale(1.1); opacity: 1; } }

/* 通用：加速时的速度线 */
@keyframes sway { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
.speedlines { position: absolute; inset: 0; opacity: 0; transition: opacity .2s; pointer-events: none; }
.speedlines .sl { position: absolute; height: 3px; width: 60px; border-radius: 2px; background: rgba(255, 255, 255, .8); animation: sl .35s linear infinite; }
.sl.l0 { top: 15%; animation-delay: -.1s; } .sl.l1 { top: 30%; animation-delay: -.25s; } .sl.l2 { top: 45%; } .sl.l3 { top: 60%; animation-delay: -.15s; } .sl.l4 { top: 75%; animation-delay: -.3s; } .sl.l5 { top: 88%; animation-delay: -.05s; }
@keyframes sl { from { transform: translateX(110%); left: 100%; } to { transform: translateX(-100%); left: -20%; } }
@keyframes shimmer { to { filter: saturate(1.5) brightness(1.08); transform: scale(1.04); } }

/* 小屏：场景略矮，留更多空间给题目 */
@media (max-height: 640px) { .scene { height: 140px; } .opt { min-height: 70px; } .stem { min-height: 66px; } .stem-word .hz { font-size: 3.1rem; } }
/* 电脑 / 平板横屏：场景在左、题目在右；页面更宽，字更大 */
@media (min-width: 700px) {
  .screen.play { max-width: 1280px; display: grid; grid-template-columns: minmax(300px, 0.9fr) 1.3fr; grid-template-rows: auto auto 1fr; column-gap: 18px; align-content: start; }
  .screen.play .topbar, .screen.play .hud { grid-column: 1 / -1; }
  .screen.play .scene { height: min(62vh, 560px); min-height: 320px; align-self: start; }
  .screen.play .scene.small { height: min(40vh, 300px); min-height: 220px; }
  .screen.play .qbox { align-self: start; min-height: min(62vh, 560px); padding: 18px; }
  /* 电脑上场景很大：里面的角色和道具也放大 */
  .tray { font-size: 1.8rem; } .tray b { font-size: 1.5rem; }
  .streak { font-size: 1.8rem; }
}
@media (min-width: 1100px) {
  .prompt { font-size: 2.5rem; }
  .opt { min-height: 130px; }
  .opt .mean { font-size: 2.8rem; }
  .opt .word .hz { font-size: 4.4rem; }
  .opt .word .py, .opt-py { font-size: 2.6rem; }
  .stem .mean { font-size: 3.4rem; }
  .stem-word .hz { font-size: 6.6rem; }
  .stem-word .py { font-size: 3.2rem; }
  .trans { font-size: 2.5rem; }
  .sent .tok .hz { font-size: 3.6rem; } .sent .tok .py { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ================= 立体（3D 感）效果 ================= */
/* 角色：地上有影子，跳的时候先压扁、再拉长（卡通弹性） */
.char { position: absolute; display: inline-block; line-height: 1; font-family: var(--f-emoji); }
.char .hero { display: inline-block; transform-origin: 50% 100%; animation: squash 1.3s ease-in-out infinite; }
.char .shadow { position: absolute; left: 8%; right: 8%; bottom: -6px; height: 9px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .38), transparent); animation: shadowK 1.3s ease-in-out infinite; z-index: -1; }
@keyframes squash { 0%, 100% { transform: translateY(0) scale(1.12, .88); } 28% { transform: translateY(-15px) scale(.9, 1.12); } 50% { transform: translateY(-19px) scale(1, 1); } 76% { transform: translateY(-3px) scale(.95, 1.06); } }
@keyframes shadowK { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .45; } }
/* 立体旋转金币 */
/* 稀有奖励：3D 旋转揭晓卡 */
.reveal { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, rgba(20, 10, 60, .1), rgba(20, 10, 60, .55)); overflow: hidden; }
.rv-rays { position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 240, 170, .6) 0 8deg, transparent 8deg 20deg); animation: rotC 5s linear infinite; transform: translate(-50%, -50%); }
@keyframes rotC { to { transform: translate(-50%, -50%) rotate(360deg); } }
.rv-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 24px 8px; border-radius: 22px; background: linear-gradient(160deg, #fff, #e8efff); border: 4px solid #7b61ff; box-shadow: 0 10px 0 rgba(0, 0, 0, .2), 0 0 32px rgba(123, 97, 255, .8); }
.reveal.legend .rv-card { border-color: #ffb400; background: linear-gradient(160deg, #fffbe6, #ffe39a); box-shadow: 0 10px 0 rgba(0, 0, 0, .2), 0 0 44px rgba(255, 190, 40, 1); }
.rv-e { font-size: clamp(3rem, 11vh, 5.4rem); font-family: var(--f-emoji); line-height: 1.1; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .25)); }
.rv-card b { font: 700 clamp(1.2rem, 3vh, 1.7rem) var(--f-ui); color: #5b3fd6; white-space: nowrap; }
.reveal.legend .rv-card b { color: #c2410c; }
@keyframes susp { from { translate: 0 0; } to { translate: 0 -2px; } }
/* 配对卡片：配对成功后 3D 翻转飞走 */
.mcard.done { animation: doneFlip .6s both; }
@keyframes doneFlip { 0% { transform: none; opacity: 1; } 45% { transform: perspective(500px) rotateY(180deg) scale(1.12); opacity: 1; } 100% { transform: perspective(500px) rotateY(360deg) scale(.94); opacity: .4; } }
/* 选项按钮：按下有立体感；答对的选项朝自己弹出来，答错的左右扭一下 */
.opts { perspective: 900px; }
.opt { transform-style: preserve-3d; }
.opt:not(:disabled):active { transform: rotateX(12deg) translateY(3px) scale(.97); }
.opt.right { animation: pop3d .6s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop3d { 0% { transform: none; } 40% { transform: translateZ(50px) rotateX(-14deg) scale(1.08); } 100% { transform: none; } }
.opt.wrong { animation: wrong3d .5s; }
@keyframes wrong3d { 25% { transform: rotateY(-16deg) translateX(-6px); } 50% { transform: rotateY(14deg) translateX(6px); } 75% { transform: rotateY(-6deg); } }
/* 选游戏的卡片：图标浮动，按下立体倾斜 */
.game-cards { perspective: 900px; }
.game-card .gicon { animation: floaty 2.4s ease-in-out infinite; display: inline-block; }
.game-card:nth-child(2) .gicon { animation-delay: .3s; } .game-card:nth-child(3) .gicon { animation-delay: .6s; } .game-card:nth-child(4) .gicon { animation-delay: .9s; } .game-card:nth-child(5) .gicon { animation-delay: 1.2s; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(-6deg) scale(1.08); } }
.game-card { transform-style: preserve-3d; transition: transform .15s; }
.game-card:active { transform: rotateX(10deg) scale(.97); }
@media (min-width: 700px) { .reveal .rv-card { scale: 1.3; } }
/* 只有拼音的选项（听音选拼音等）：拼音要特别大 */
.opt > .opt-py, .mcard > .opt-py { font-size: clamp(1.8rem, 6.5vw + .3rem, 3rem); font-weight: 600; }
.opt { min-height: clamp(86px, 12vh, 140px); }
@media (max-height: 640px) { .opt { min-height: 70px; } }

/* ================= 钓鱼（海底世界 · Kenney CC0 游戏美术） ================= */
.gi { display: block; -webkit-user-select: none; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.sea2 { background: linear-gradient(180deg, #8ad7ff 0, #d4f2ff 34%, #55c1f2 34%, #2f97dc 58%, #1d6cbd 100%); }
.sea2 .sky { position: absolute; left: 0; right: 0; top: 0; height: 34%; z-index: 1; overflow: hidden; }
.sun2 { position: absolute; right: 34%; top: 6%; height: 80%; width: auto; animation: rot 40s linear infinite; }
.cloud2 { position: absolute; left: 0; height: 46%; width: auto; opacity: .95; }
.water2 { position: absolute; left: 0; right: 0; top: 34%; bottom: 0; z-index: 1; overflow: hidden; }
.lightrays { position: absolute; inset: -10% -40%; background: repeating-linear-gradient(105deg, transparent 0 50px, rgba(255, 255, 255, .11) 50px 92px, transparent 92px 170px); -webkit-mask-image: linear-gradient(#000, transparent 78%); mask-image: linear-gradient(#000, transparent 78%); animation: rays 9s ease-in-out infinite alternate; }
@keyframes rays { to { transform: translateX(70px) skewX(-6deg); } }
.surface { position: absolute; left: 0; right: 0; top: calc(34% - 9px); height: 24px; z-index: 8; background: url(/img/g/fish/surface.webp) repeat-x 0 0 / 48px 48px; animation: surf 2.6s linear infinite; pointer-events: none; }
.surface.s2 { top: calc(34% - 4px); opacity: .55; animation-duration: 4.4s; animation-direction: reverse; z-index: 2; }
@keyframes surf { to { background-position: 48px 0; } }
.backlayer { position: absolute; left: 0; right: 0; bottom: 11%; height: 42%; z-index: 2; pointer-events: none; }
.bgdeco { position: absolute; bottom: 0; width: auto; opacity: .6; }
.seabed2 { position: absolute; left: 0; right: 0; bottom: 0; height: 14%; z-index: 3; background: url(/img/g/fish/sand-top.webp) repeat-x 0 0 / auto 100%; }
.decor { position: absolute; left: 0; right: 0; bottom: 10%; height: 100%; z-index: 4; pointer-events: none; }
.decor .gi { position: absolute; bottom: 0; width: auto; transform-origin: 50% 100%; }
.decor .sway { animation: sway2 3.4s ease-in-out infinite alternate; }
@keyframes sway2 { from { transform: rotate(-5deg) skewX(-5deg); } to { transform: rotate(5deg) skewX(5deg); } }
.bubbles2 .bub2 { position: absolute; bottom: 4%; width: 11px; height: auto; opacity: 0; animation: bubble2 6s ease-in infinite; }
.bub2.q0 { left: 7%; } .bub2.q1 { left: 18%; animation-delay: -1.3s; width: 8px; } .bub2.q2 { left: 29%; animation-delay: -2.6s; width: 6px; } .bub2.q3 { left: 42%; animation-delay: -3.4s; width: 14px; } .bub2.q4 { left: 53%; animation-delay: -.7s; }
.bub2.q5 { left: 64%; animation-delay: -4.2s; width: 7px; } .bub2.q6 { left: 75%; animation-delay: -1.9s; } .bub2.q7 { left: 86%; animation-delay: -5s; width: 9px; } .bub2.q8 { left: 94%; animation-delay: -2.2s; width: 6px; }
@keyframes bubble2 { 0% { transform: translate(0, 0) scale(.6); opacity: 0; } 12% { opacity: .9; } 50% { transform: translate(10px, -110px) scale(1); } 85% { opacity: .75; } 100% { transform: translate(-8px, -230px) scale(1.1); opacity: 0; } }
.swim2 { position: absolute; left: 0; z-index: 5; }
.swim2:not(.to-r):not(.hooked2) .dir, .dir.flip { transform: scaleX(-1); }
.swim2.faces-left:not(.hooked2):not(.to-r) .dir { transform: none; } .swim2.faces-left.to-r:not(.hooked2) .dir { transform: scaleX(-1); }
.swim2 .bob { animation: bob2 1.9s ease-in-out infinite alternate; }
@keyframes bob2 { from { transform: translateY(-5px) rotate(-3deg); } to { transform: translateY(5px) rotate(3deg); } }
.fishimg { height: clamp(36px, 9.5vh, 76px); width: auto; animation: tail .45s ease-in-out infinite alternate; transform-origin: 70% 50%; filter: drop-shadow(0 3px 2px rgba(0, 30, 80, .25)); }
.fishimg.small { height: clamp(26px, 6.5vh, 50px); }
@keyframes tail { from { transform: skewY(-4deg); } to { transform: skewY(4deg) scaleX(.95); } }
.hooked2 { z-index: 9; }
.boat2 { position: absolute; left: 2%; top: 34%; height: 44%; width: auto; aspect-ratio: 220 / 130; translate: 0 -76%; z-index: 7; animation: rock2 3.2s ease-in-out infinite; transform-origin: 50% 85%; }
@keyframes rock2 { 0%, 100% { transform: rotate(-2.5deg) translateY(0); } 50% { transform: rotate(2.5deg) translateY(3px); } }
.boat2 > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.boat2 .boat-back { z-index: 1; } .boat2 .boat-front { z-index: 3; }
.boat2 .flag { transform-box: fill-box; transform-origin: 0 50%; animation: flag .5s ease-in-out infinite alternate; }
@keyframes flag { to { transform: scaleX(.8) skewY(8deg); } }
.char.sailor { left: 21%; top: 6%; z-index: 2; font-size: clamp(1.6rem, 6.5vh, 3.4rem); }
.char.sailor .hero { animation: sit 2.2s ease-in-out infinite; }
.char.sailor .shadow { display: none; }
@keyframes sit { 50% { transform: translateY(-3px) rotate(-4deg); } }
.rig2 { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: visible; }
.line2 { position: absolute; width: 2px; margin-left: -1px; background: rgba(255, 255, 255, .95); box-shadow: 0 0 1px rgba(0, 0, 0, .3); }
.hookbox { position: absolute; width: 14px; height: 21px; margin-left: -10px; }
.hookbox svg { width: 100%; height: 100%; display: block; }
.bobber2 { position: absolute; width: 15px; height: 15px; margin: -9px 0 0 -7.5px; border-radius: 50%; background: linear-gradient(#ff4b3e 50%, #fff 50%); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.caught { position: absolute; width: 0; height: 0; opacity: 0; }
.caught.on { opacity: 1; }
.caught .gi { position: absolute; right: -8px; top: 0; translate: 0 -50%; transform-origin: 100% 50%; animation: dangle .3s ease-in-out infinite alternate; }
.caught .bone { height: clamp(26px, 6vh, 44px); width: auto; }
@keyframes dangle { from { transform: rotate(-78deg); } to { transform: rotate(-102deg); } }
.tray.img { gap: 4px; padding: 3px 10px; }
.tray.img .ti { height: 24px; width: auto; }
.tray .mini { height: 20px; width: auto; }
.tray.bucket2 { left: auto; right: 8px; top: 6px; bottom: auto; }
.sea2 .streak { left: auto; right: 10px; top: auto; bottom: 16%; }
.sp .pti { width: 1.3em; height: auto; }
.ring2 { z-index: 9; } .ring2 .gi { width: 90px; height: auto; }
.jumpfish { z-index: 9; }
.fly .flyimg { width: 1.7em; height: auto; }
.score-pop { z-index: 22; white-space: nowrap; font: 800 clamp(1.7rem, 5.5vh, 2.8rem) var(--f-ui); color: #ffd21f; -webkit-text-stroke: 2px #fff; paint-order: stroke fill; text-shadow: 0 3px 0 #e08a00, 0 6px 8px rgba(0, 0, 0, .3); }
.bang { z-index: 22; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #e5533d; font: 800 1.6rem var(--f-ui); display: grid; place-items: center; box-shadow: 0 3px 0 rgba(0, 0, 0, .2); }
.rv-e .rvimg { height: clamp(80px, 20vh, 150px); width: auto; animation: tail .4s ease-in-out infinite alternate; }
.reveal.epic .rv-card { border-color: #ff5ab4; background: linear-gradient(160deg, #fff, #ffe3f4); box-shadow: 0 10px 0 rgba(0, 0, 0, .2), 0 0 40px rgba(255, 90, 180, .9); }
.reveal.epic .rv-card b { color: #c2187a; }
.rv-sparkles { position: absolute; inset: 0; pointer-events: none; }
.rvs { position: absolute; width: 48px; height: auto; animation: twinkle 1.2s ease-in-out infinite; }
.rvs.s0 { left: 18%; top: 18%; } .rvs.s1 { left: 74%; top: 14%; animation-delay: .3s; } .rvs.s2 { left: 82%; top: 62%; animation-delay: .6s; } .rvs.s3 { left: 12%; top: 66%; animation-delay: .9s; } .rvs.s4 { left: 46%; top: 6%; animation-delay: .45s; width: 34px; } .rvs.s5 { left: 50%; top: 82%; animation-delay: .75s; width: 34px; }

/* ================= 寻宝（宝藏岛 · Kenney 3D 美术） ================= */
.isle2 { background: linear-gradient(180deg, #5fc4ff 0, #bdeaff 40%); }
.isle2 .sky { position: absolute; left: 0; right: 0; top: 0; height: 40%; z-index: 1; overflow: hidden; }
.isle2 .sun2 { right: 30%; top: 8%; height: 70%; }
.farsea { position: absolute; left: 0; right: 0; top: 39%; height: 22%; z-index: 1; overflow: hidden; background: linear-gradient(#3cbcf0, #1e95d8); }
.farsea .glints { position: absolute; inset: 0 -60px; background: radial-gradient(circle, rgba(255, 255, 255, .9) 0 1.5px, transparent 2.5px) 0 0 / 46px 18px, radial-gradient(circle, rgba(255, 255, 255, .6) 0 1px, transparent 2px) 23px 9px / 46px 18px; animation: glint2 5s linear infinite, twk 1.6s ease-in-out infinite alternate; }
@keyframes glint2 { to { transform: translateX(46px); } }
@keyframes twk { to { opacity: .35; } }
.horizon { position: absolute; left: 0; right: 0; top: calc(39% - 8px); height: 18px; z-index: 2; background: url(/img/g/fish/surface.webp) repeat-x 0 0 / 36px 36px; animation: surf 3.4s linear infinite; opacity: .9; }
.ship2 { position: absolute; left: 0; height: 24%; z-index: 2; }
.ship2 .dir { height: 100%; } .ship2 .gi { height: 100%; width: auto; animation: rock2 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
.ship2:not(.to-r) .dir { transform: scaleX(-1); }
.sand2 { position: absolute; left: 0; right: 0; top: 50%; bottom: 0; z-index: 3; background: url(/img/g/bg/dunes.webp) repeat-x 0 0 / auto 100%; }
.foam { position: absolute; left: -40px; right: -40px; top: calc(50% + 2px); height: 10px; z-index: 3; background: radial-gradient(ellipse at 50% 0, rgba(255, 255, 255, .95) 0 40%, transparent 42%) 0 0 / 40px 10px repeat-x; animation: foam 2.6s ease-in-out infinite alternate; opacity: .8; }
@keyframes foam { to { transform: translateX(20px) translateY(2px); opacity: .45; } }
.props { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.props .prop { position: absolute; width: auto; filter: drop-shadow(0 4px 3px rgba(80, 50, 0, .25)); }
.props .far { filter: saturate(.8) brightness(1.05); }
.props .palm { transform-origin: 50% 100%; animation: palm2 4s ease-in-out infinite alternate; }
.props .palm.d2 { animation-duration: 3.3s; animation-delay: -1.4s; }
@keyframes palm2 { from { transform: rotate(-2.2deg) skewX(-2deg); } to { transform: rotate(2.2deg) skewX(2deg); } }
.props .sway3 { transform-origin: 50% 100%; animation: sway2 2.8s ease-in-out infinite alternate; }
.props .tilt { transform: rotate(-62deg); }
.isle2 .dot { position: absolute; z-index: 4; width: 3%; aspect-ratio: 1.5; border-radius: 50%; background: rgba(140, 80, 20, .38); box-shadow: inset 0 2px 0 rgba(90, 50, 10, .25); translate: -50% 50%; transition: background .3s; }
.isle2 .dot.on { background: #e5533d; box-shadow: 0 0 0 2px #fff; }
.xmark { position: absolute; z-index: 5; width: 9%; aspect-ratio: 1; translate: -50% 50%; animation: pulse 1.2s ease-in-out infinite; }
.xmark i { position: absolute; left: 42%; top: -8%; width: 16%; height: 116%; border-radius: 6px; background: #e5533d; box-shadow: 0 2px 0 #a8321f; rotate: 45deg; }
.xmark i + i { rotate: -45deg; }
.xmark.dug { opacity: 0; }
.hole2 { position: absolute; z-index: 4; height: 11%; width: auto; translate: -20% 40%; opacity: 0; transform: scale(.3); transition: opacity .3s, transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.hole2.on { opacity: 1; transform: scale(1); }
.char.explorer2 { z-index: 6; font-size: 2rem; font-size: clamp(1.5rem, 21cqh, 4.2rem); translate: -50% 0; transition: left .6s cubic-bezier(.3, 1.2, .5, 1), bottom .6s cubic-bezier(.3, 1.2, .5, 1); }
.char.explorer2.jump { transition: none; animation: popIn .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes popIn { from { transform: scale(0); opacity: 0; } }
.chests2 { position: absolute; inset: 0; z-index: 12; display: none; align-items: flex-end; justify-content: center; gap: 5%; padding-bottom: 7%; background: radial-gradient(ellipse at 50% 75%, rgba(40, 20, 0, .1), rgba(30, 15, 0, .55)); flex-wrap: wrap; align-content: flex-end; }
.chests2.show { display: flex; }
.chests2 { container-type: size; }
.chests2 .chest-hint { width: 100%; text-align: center; font: 700 clamp(1.2rem, 4.5vh, 2rem) var(--f-ui); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); margin-bottom: auto; padding-top: 3%; }
.chest2 { position: relative; height: 52%; height: min(62cqh, 27cqw * 260 / 189); aspect-ratio: 189 / 260; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chest2 .frames { position: absolute; inset: 0; transform-origin: 50% 100%; animation: chestIdle2 1.7s ease-in-out infinite; }
.chest2:nth-of-type(2) .frames { animation-delay: .28s; } .chest2:nth-of-type(3) .frames { animation-delay: .56s; }
@keyframes chestIdle2 { 0%, 62%, 100% { transform: none; } 70% { transform: scale(1.06, .94); } 78% { transform: rotate(-5deg) translateY(-6%); } 88% { transform: rotate(5deg); } }
.chest2.chosen .frames, .chest2.fade .frames, .chest2.locked .frames { animation: none; }
.chest2 .cf { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; filter: drop-shadow(0 6px 4px rgba(0, 0, 0, .35)); }
.chest2 .cf.on { opacity: 1; }
.chest2 .cshadow { position: absolute; left: 4%; right: 4%; bottom: -3%; height: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent); }
.chest2 .beam { position: absolute; left: 50%; top: 55%; width: 260%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 246, 190, .95) 0 12%, transparent 45%), repeating-conic-gradient(rgba(255, 228, 120, .75) 0 9deg, transparent 9deg 22deg); -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 68%); mask-image: radial-gradient(circle, #000 25%, transparent 68%); opacity: 0; transform: scale(.2); transition: opacity .3s, transform .5s cubic-bezier(.3, 1.4, .5, 1); pointer-events: none; }
.chest2.open .beam { opacity: 1; transform: scale(1); animation: rot 5s linear infinite; }
.chest2.fade { opacity: .25; transform: scale(.85) translateY(6%); transition: opacity .3s, transform .3s; }
.padlock { position: absolute; left: 50%; top: 66%; width: 26%; aspect-ratio: 1 / 1.05; translate: -50% -50%; z-index: 3; border-radius: 22%; background: linear-gradient(#ffd85a, #f0a500); box-shadow: inset 0 -4px 0 #c98200, 0 3px 0 rgba(0, 0, 0, .3); }
.padlock::before { content: ''; position: absolute; left: 18%; right: 18%; bottom: 82%; height: 62%; border: max(3px, .5vh) solid #9aa7b4; border-bottom: 0; border-radius: 50% 50% 0 0; }
.padlock::after { content: ''; position: absolute; left: 50%; top: 36%; width: 20%; height: 34%; translate: -50% 0; border-radius: 40% 40% 20% 20%; background: #6b4300; }
.lootrise { z-index: 14; }
.lootimg { height: clamp(46px, 15vh, 110px); width: auto; filter: drop-shadow(0 0 10px rgba(255, 236, 140, .95)) drop-shadow(0 4px 3px rgba(0, 0, 0, .3)); }
.coinimg { display: block; width: 1.1em; height: auto; animation: coinSpin2 .5s linear infinite; }
@keyframes coinSpin2 { 50% { transform: scaleX(.15); } }
.rv-e .rvloot { animation: lootFloat 1.4s ease-in-out infinite alternate; }
@keyframes lootFloat { from { transform: translateY(-4px) rotate(-6deg); } to { transform: translateY(4px) rotate(6deg); } }
.tray.bag2 { left: auto; right: 8px; top: 6px; bottom: auto; }
.isle2 .streak { left: 10px; right: auto; top: 8px; bottom: auto; }
.twk2 { position: absolute; z-index: 4; width: 4.5%; height: auto; min-width: 14px; translate: -50% -50%; animation: twinkle 2.6s ease-in-out infinite; }

/* 场景是一个“容器”：里面的东西可以按场景高度（cqh）来定大小，手机和电脑上比例一致 */
.scene { container-type: size; }

/* ================= 赛车（Kenney 3D 赛车 · 视差滚动） ================= */
.track2 { background: #5fb24a; }
.track2 .sky { position: absolute; left: 0; right: 0; top: 0; height: 50%; z-index: 0; background: linear-gradient(#52bcff, #cdeffd); overflow: hidden; }
.cloud3 { position: absolute; left: 0; height: 26%; width: auto; opacity: .95; }
.bgloop { position: absolute; left: 0; background-repeat: repeat-x; background-position: 0 100%; pointer-events: none; will-change: transform; }
.bgloop.mtn { top: 12%; height: 32%; background-image: url(/img/g/bg/mountains.webp); z-index: 1; }
.bgloop.hl { top: 24%; height: 24%; background-image: url(/img/g/bg/hills-far.webp); z-index: 2; }
.track2 .grass { position: absolute; left: 0; right: 0; top: 46%; height: 12%; z-index: 3; background: linear-gradient(#86d066, #5fb24a); }
.track2 .grass.low { top: auto; bottom: 0; height: 2%; background: #5fb24a; }
.side { position: absolute; left: 0; bottom: 43%; height: 0; z-index: 4; will-change: transform; }
.side .tp { position: absolute; bottom: 0; width: auto; translate: -50% 0; filter: drop-shadow(0 3px 2px rgba(0, 40, 0, .22)); }
.side .wave { transform-origin: 30% 100%; animation: wave3 .7s ease-in-out infinite alternate; }
@keyframes wave3 { from { transform: skewY(-3deg) scaleX(.96); } to { transform: skewY(3deg) scaleX(1.04); } }
.kerb { position: absolute; left: 0; top: 56%; height: 4%; z-index: 5; background: repeating-linear-gradient(90deg, #e5392f 0 32px, #fff 32px 64px); box-shadow: 0 2px 0 rgba(0, 0, 0, .15); will-change: transform; }
.kerb.low { top: auto; bottom: 2%; height: 3%; }
.road2 { position: absolute; left: 0; right: 0; top: 60%; bottom: 5%; z-index: 5; overflow: hidden; background: linear-gradient(#70747d, #50535b 60%, #464950); }
.stripes2 { position: absolute; left: 0; top: 50%; height: max(4px, 2cqh); translate: 0 -50%; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .9) 0 48px, transparent 48px 96px); will-change: transform; }
.road2.boost .speedlines { opacity: 1; }
.lanes2 { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.car2 { position: absolute; translate: -50% 0; transition: left .55s cubic-bezier(.3, 1.2, .5, 1); }
.car2.far { bottom: 30%; height: 11%; z-index: 1; }
.car2.mid { bottom: 18%; height: 14%; z-index: 2; }
.car2.me { bottom: 3%; height: 18%; z-index: 3; }
.car2 .body2 { position: relative; height: 100%; animation: susp .3s ease-in-out infinite alternate; }
.car2.mid .body2 { animation-delay: -.12s; } .car2.far .body2 { animation-delay: -.2s; }
.carimg { display: block; height: 100%; width: auto; }
.car2 .cshadow { position: absolute; left: 4%; right: 4%; bottom: -10%; height: 26%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .45), transparent); }
.driver2 { position: absolute; left: 40%; bottom: 48%; font-size: 1.4rem; font-size: clamp(1rem, 10cqh, 3rem); line-height: 1; font-family: var(--f-emoji); filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .3)); }
.flame2 { position: absolute; right: 95%; top: 38%; height: 34%; width: 0; border-radius: 50%; transform-origin: 100% 50%; background: linear-gradient(to left, #fff 0, #fff3a0 18%, #ffb020 45%, rgba(255, 90, 0, .85) 70%, rgba(255, 60, 0, 0)); box-shadow: 0 0 12px rgba(255, 170, 30, .9); transition: width .2s; }
.lanes2.boost .me .flame2 { width: 42%; animation: flick .1s steps(2) infinite; }
.lanes2.turbo .me .flame2 { width: 75%; height: 44%; top: 33%; }
@keyframes flick { 50% { transform: scale(1.18, .8); } }
.lanes2.boost .me .body2 { animation-duration: .09s; }
.car2.me.spin .body2 { animation: skid .75s ease-out; }
@keyframes skid { 0% { transform: none; } 20% { transform: rotate(-16deg) translateY(-14%); } 45% { transform: rotate(12deg) translateX(-6%); } 70% { transform: rotate(-6deg); } 100% { transform: none; } }
.puff { z-index: 5; }
.puff .gi { width: 9cqh; min-width: 14px; height: auto; opacity: .8; }
.gantry { position: absolute; bottom: 6%; height: 54%; width: auto; z-index: 5; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, .25)); }
.progress2 { position: absolute; left: 12px; right: 34%; top: 9px; height: 12px; border-radius: 8px; background: rgba(255, 255, 255, .8); z-index: 8; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.progress2 .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px; background: linear-gradient(90deg, #ffb400, #ff5a5f); transition: width .5s; }
.marker2 { position: absolute; top: 50%; left: 0; height: 22px; width: auto; translate: -50% -62%; transition: left .5s; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .3)); }
.progress2 .goal { position: absolute; right: -10px; top: 50%; height: 30px; width: auto; translate: 0 -72%; }
.tray.lapbox2 { left: auto; right: 8px; top: 6px; bottom: auto; }
.track2 .streak { right: 10px; left: auto; top: auto; bottom: 9%; }

/* ================= 农场（Kenney 3D 作物） ================= */
.farm2 { background: linear-gradient(180deg, #62c6ff 0, #cff0ff 44%, #7ccb5c 44%, #5aa845 100%); }
.farm2 .sky { position: absolute; left: 0; right: 0; top: 0; height: 44%; z-index: 0; overflow: hidden; }
.farm2 .sun2 { left: 34%; right: auto; top: 8%; height: 66%; }
.hills2 { position: absolute; left: 0; right: 0; background-repeat: repeat-x; background-size: auto 100%; background-position: 0 100%; pointer-events: none; }
.hills2.f { top: 20%; height: 26%; background-image: url(/img/g/bg/hills-far.webp); z-index: 1; }
.hills2.n { top: 30%; height: 22%; background-image: url(/img/g/bg/hills-near.webp); background-position: 300px 100%; z-index: 1; }
.farm2 .props { position: absolute; inset: 0; pointer-events: none; }
.farm2 .props.back { z-index: 2; } .farm2 .props.front { z-index: 7; }
.farm2 .prop { position: absolute; width: auto; filter: drop-shadow(0 3px 2px rgba(0, 50, 0, .2)); }
.farm2 .prop.far { filter: saturate(.85); }
.farm2 .tree { transform-origin: 50% 100%; animation: palm2 3.6s ease-in-out infinite alternate; }
.farm2 .tree.d2 { animation-delay: -1.2s; } .farm2 .tree.d3 { animation-delay: -2.2s; }
.farm2 .sway3 { transform-origin: 50% 100%; animation: sway2 2.6s ease-in-out infinite alternate; } .farm2 .sway3.d2 { animation-delay: -1.3s; }
.tractor2 { position: absolute; left: 0; height: 15%; z-index: 2; }
.tractor2 .dir { height: 100%; } .tractor2 .gi { height: 100%; width: auto; animation: susp .25s ease-in-out infinite alternate; }
.tractor2:not(.to-r) .dir { transform: scaleX(-1); }
.peek { position: absolute; left: 0; right: 0; bottom: 51%; height: 16%; z-index: 3; overflow: hidden; pointer-events: none; }
.peeker { position: absolute; bottom: 0; height: 100%; width: auto; translate: -50% 0; transform: translateY(70%); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2)); }
.fence2 { position: absolute; left: 0; right: 0; bottom: 47%; height: 9%; z-index: 4; background: url(/img/g/bg/fence.webp) repeat-x 0 100% / auto 100%; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .15)); }
.meadow { position: absolute; left: 0; right: 0; top: 52%; bottom: 0; z-index: 4; background: linear-gradient(#86d266, #5aa845); }
.soil { position: absolute; left: 24%; right: 0; bottom: 0; height: 44%; z-index: 4; clip-path: polygon(14% 0, 92% 0, 100% 100%, 0 100%); background: repeating-linear-gradient(180deg, #b0703a 0 9px, #9a5e2e 9px 13px); box-shadow: inset 0 4px 0 rgba(0, 0, 0, .1); }
.plot2 { position: absolute; z-index: 5; aspect-ratio: 121 / 200; translate: -50% 0; }
.plot2 > .gi { position: absolute; inset: 0; width: 100%; height: 100%; transform-origin: 50% 88%; }
.plot2 .dirt { filter: drop-shadow(0 3px 2px rgba(60, 30, 0, .25)); }
.plot2.empty .crop { visibility: hidden; }
.plot2.ripe .crop { animation: ripe2 1.1s ease-in-out infinite; }
@keyframes ripe2 { 0%, 100% { transform: none; } 30% { transform: scale(1.08, .94); } 55% { transform: scale(.96, 1.06) rotate(-4deg); } 80% { transform: rotate(3deg); } }
.plot2.dry .crop { filter: grayscale(.85) brightness(.85); transform: rotate(18deg); transition: transform .2s; }
.plot2 .ring { position: absolute; left: -12%; right: -12%; bottom: 3%; height: 22%; border-radius: 50%; border: 3px solid rgba(255, 230, 90, .95); box-shadow: 0 0 10px rgba(255, 230, 90, .8); opacity: 0; transition: opacity .3s; }
.plot2.cur .ring { opacity: 1; animation: pulse 1.2s ease-in-out infinite; }
.plot2 .arrow { position: absolute; left: 50%; bottom: 94%; width: 34%; aspect-ratio: 1; translate: -50% 0; opacity: 0; background: #ffd23f; clip-path: polygon(30% 0, 70% 0, 70% 45%, 100% 45%, 50% 100%, 0 45%, 30% 45%); filter: drop-shadow(0 2px 0 #c98200); }
.plot2.cur .arrow { opacity: 1; animation: bounceY .7s ease-in-out infinite alternate; }
@keyframes bounceY { to { transform: translateY(-30%); } }
.char.farmer2 { left: 13%; bottom: 8%; z-index: 6; font-size: 2rem; font-size: clamp(1.5rem, 22cqh, 4.4rem); translate: -50% 0; }
.seedbag { z-index: 9; } .seedbag .gi { height: 16cqh; min-height: 26px; width: auto; }
.seed { z-index: 9; width: 6px; height: 7px; border-radius: 50%; background: #7a4a1c; }
.raincloud2 { z-index: 9; } .raincloud2 .gi { height: 18cqh; min-height: 30px; width: auto; }
.raindrop2 { z-index: 9; width: 5px; height: 10px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: #3fa9f5; box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.sunbeam { z-index: 8; } .sunbeam .gi { width: 34cqh; min-width: 60px; height: auto; }
.harvest { z-index: 12; } .harvest .gi { height: 20cqh; min-height: 34px; width: auto; filter: drop-shadow(0 0 8px rgba(255, 240, 160, .95)); }
.tray.basket2 { left: auto; right: 8px; top: 6px; bottom: auto; }
.farm2 .streak { left: 10px; right: auto; top: 8px; bottom: auto; }

/* ================= 配对（彩虹天空 · 漂浮小岛） ================= */
.rainbow2 { background: linear-gradient(180deg, #a9e2ff 0, #e3f5ff 60%, #ffeaf4 100%); }
.arc2 { position: absolute; left: 50%; bottom: -95%; height: 180%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; z-index: 0; background: radial-gradient(circle, transparent 50%, #b07cf0 50% 54%, #4fc3f7 54% 58%, #6fd36f 58% 62%, #ffe14f 62% 66%, #ffae3d 66% 70%, #ff6b8b 70% 74%, transparent 74%); opacity: .8; animation: shimmer 4s ease-in-out infinite alternate; }
.cloud4 { position: absolute; left: 0; height: 30%; width: auto; z-index: 1; opacity: .95; }
.isle3 { position: absolute; z-index: 3; height: 34%; aspect-ratio: 240 / 95; animation: isleBob 3.2s ease-in-out infinite alternate; }
.isle3.r { animation-delay: -1.6s; height: 30%; }
@keyframes isleBob { from { transform: translateY(-4%); } to { transform: translateY(6%); } }
.isle3 .base { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 4px rgba(60, 80, 140, .25)); }
.isle3 .top { position: absolute; bottom: 62%; width: auto; }
.isle3 .t1 { right: 8%; height: 150%; }
.isle3 .castle { left: 22%; height: 130%; }
.isle3 .flag3 { right: 10%; height: 110%; transform-origin: 30% 100%; animation: wave3 .8s ease-in-out infinite alternate; }
.char.buddy2 { left: 26%; bottom: 58%; z-index: 2; font-size: 1.8rem; font-size: clamp(1.4rem, 30cqh, 4rem); translate: -50% 0; }
.floater { position: absolute; left: 0; z-index: 2; }
.floater .gi { height: 16cqh; min-height: 16px; width: auto; animation: lootFloat 1.6s ease-in-out infinite alternate; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .2)); }
.tray.jar2 { left: auto; right: 8px; top: 6px; bottom: auto; }
.rainbow2 .streak { left: auto; right: 10px; top: auto; bottom: 6px; color: #ff7a1a; text-shadow: 0 2px 0 #fff; }

/* ================= 实时名次、金色题、领奖台 ================= */
.hud-rank { display: inline-flex; align-items: baseline; gap: 1px; padding: 2px 9px; border-radius: 12px; background: #fff3cf; color: #9a5b00; font: 700 clamp(1.15rem, 3vw + .4rem, 1.6rem) var(--f-ui); box-shadow: 0 2px 0 #f0d48a; white-space: nowrap; }
.hud-rank[hidden] { display: none; }
.hud-rank small { font-size: .72em; opacity: .75; }
.hud-rank.first { background: linear-gradient(135deg, #ffe066, #ffb400); color: #6b3d00; }
.hud-rank.up { animation: rankUp .7s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rankUp { 0% { transform: scale(1); } 35% { transform: scale(1.35) rotate(-6deg); background: #c8f7d4; } 100% { transform: scale(1); } }
.hud { flex-wrap: nowrap; min-width: 0; }
.hud-count { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 380px) { .hud-count { display: none; } }
.rank-pop { position: fixed; z-index: 95; left: 50%; top: 64px; translate: -50% 0; min-width: 240px; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 18px; background: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-family: var(--f-ui); animation: optIn .25s both; }
.rank-pop > b { display: block; text-align: center; font-size: 1.25rem; margin-bottom: 6px; }
.rp-row { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; padding: 3px 0; }
.rp-m { font-size: 1.4rem; width: 1.6em; text-align: center; } .rp-av { font-family: var(--f-emoji); font-size: 1.5rem; } .rp-n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-pop p { margin: 8px 0 0; text-align: center; color: #c2410c; font-weight: 600; }
.bigtext.rankup { background: linear-gradient(135deg, #22c55e, #0ea5e9); top: 30%; }
.bigtext.golden { background: linear-gradient(135deg, #ffd23f, #ff9f1a); color: #fff; top: 24%; box-shadow: 0 0 0 4px rgba(255, 255, 255, .7), 0 0 30px rgba(255, 190, 40, .95); }
/* 幸运金色题：金色闪光边框 */
.qbox.golden { background: linear-gradient(#fffdf2, #fff6d6); box-shadow: 0 0 0 4px #ffd23f, 0 0 26px rgba(255, 196, 40, .75), 0 3px 0 var(--line); animation: goldGlow 1.6s ease-in-out infinite alternate; }
@keyframes goldGlow { to { box-shadow: 0 0 0 4px #ffb400, 0 0 40px rgba(255, 196, 40, .95), 0 3px 0 var(--line); } }
.gold-badge { align-self: center; padding: 3px 16px; border-radius: 999px; font: 700 clamp(1.1rem, 3vw + .4rem, 1.6rem) var(--f-ui); color: #7a4300; background: linear-gradient(90deg, #ffe680, #ffc933, #ffe680); background-size: 200% 100%; animation: shimmerBar 1.4s linear infinite; box-shadow: 0 2px 0 #e0a400; }
@keyframes shimmerBar { to { background-position: -200% 0; } }
/* 结果页：最终名次 + 领奖台 */
.final-rank { margin: 6px auto 2px; padding: 8px 18px; border-radius: 16px; background: #eef7ff; font: 700 clamp(1.3rem, 4vw + .4rem, 2rem) var(--f-ui); text-align: center; }
.final-rank.top { background: linear-gradient(135deg, #fff1b8, #ffd76a); color: #6b3d00; box-shadow: 0 3px 0 #e8b400; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 8px; width: 100%; max-width: 460px; margin: 8px auto; }
.pd { display: flex; flex-direction: column; align-items: center; gap: 2px; animation: pdUp .6s cubic-bezier(.3, 1.4, .5, 1) both; min-width: 0; }
@keyframes pdUp { from { transform: translateY(40px); opacity: 0; } }
.pd-av { font-family: var(--f-emoji); font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1; }
.pd1 .pd-av { font-size: clamp(2.8rem, 11vw, 4.2rem); animation: hop 1.4s ease-in-out infinite; }
.pd-n { font: 700 1.05rem var(--f-ui); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-p { font: 600 .95rem var(--f-ui); color: var(--muted); }
.pd-block { width: 100%; display: grid; place-items: center; border-radius: 12px 12px 4px 4px; font-size: 1.8rem; color: #fff; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12); }
.pd1 .pd-block { height: 92px; background: linear-gradient(#ffd23f, #f0a500); }
.pd2 .pd-block { height: 68px; background: linear-gradient(#dfe6ee, #aeb9c6); }
.pd3 .pd-block { height: 50px; background: linear-gradient(#f2b27a, #c9773a); }
.pd.me .pd-n { color: #c2410c; }

/* 题目选项：汉字和拼音不在中间断行；三个选项在手机上排成 2+1 */
.opt .word .hz, .opt .word .py, .opt-py { white-space: nowrap; }
.opts.n3 { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.hud-pts { white-space: nowrap; }
@media (max-width: 430px) { .hud-count { display: none; } .hud { gap: 6px; padding: 6px 8px; } .hud-av { font-size: 1.6rem; } }
