/* games.css — 游戏厅：大厅、游戏台面与四个游戏。配色沿用 listening.css 的 --listen-* 变量，自动跟随深浅色 */
:root {
  --game-num: "Space Grotesk", "IBM Plex Mono", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --game-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --game-radius: 14px;
  --good: #3f9a76;
  --amber: #d6a23a;
  --mine-red: #d9534f;
}
:root[data-theme="dark"] {
  --good: #4fae88;
  --amber: #cfa046;
  --mine-red: #ef6b63;
}

.games { width: min(1120px, 92vw); margin: 0 auto; }
.games *, .games *::before, .games *::after { box-sizing: border-box; }
.games [hidden] { display: none !important; }

/* ---------- 首屏 ---------- */
.games-hero { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: center; gap: 48px; padding: 64px 0 52px; }
.games-hero h1 { margin: 0; font: 700 clamp(38px, 5vw, 60px)/1.2 var(--game-serif); letter-spacing: 0; }
.daily-card { position: relative; display: grid; gap: 8px; padding: 26px 26px 22px; overflow: hidden; border: 1px solid var(--listen-line); border-radius: 18px; background: var(--listen-glass); box-shadow: var(--listen-shadow); backdrop-filter: blur(16px); transition: transform .25s ease, border-color .25s ease; }
.daily-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--good), var(--amber), var(--listen-coral)); }
.daily-card:hover { transform: translateY(-3px); border-color: var(--listen-blue); }
.daily-kicker { color: var(--listen-green); font: 600 11px "IBM Plex Mono", monospace; letter-spacing: .14em; }
.daily-card strong { font-size: 19px; line-height: 1.4; }
.daily-meta { color: var(--listen-muted); font-size: 13px; }
.daily-go { justify-self: start; margin-top: 8px; padding: 8px 15px; border-radius: 999px; color: #fff; background: var(--listen-ink); font-size: 13px; }
:root[data-theme="dark"] .daily-go { color: var(--listen-bg); }

/* ---------- 大厅 ---------- */
.games-lobby { padding: 8px 0 72px; }
.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.lobby-group { margin: 0; font: 600 25px/1.4 var(--game-serif); }
.lobby-second { margin-top: 48px; }
.game-card { display: grid; grid-template-rows: auto 1fr auto; gap: 14px; min-height: 280px; padding: 18px; border: 1px solid var(--listen-line); border-radius: 18px; background: var(--listen-glass); box-shadow: 0 10px 28px rgba(43, 61, 91, .05); backdrop-filter: blur(10px); transition: transform .25s cubic-bezier(.22, 1, .36, 1), border-color .25s ease, box-shadow .25s ease; }
.game-card:hover, .game-card:focus-visible { transform: translateY(-4px); border-color: var(--listen-blue); box-shadow: var(--listen-shadow); }
.game-info { display: grid; align-content: start; gap: 6px; }
.game-info strong { font-size: 18px; }
.game-info span { color: var(--listen-muted); font-size: 13px; line-height: 1.6; }
.game-best { color: var(--listen-muted); font-size: 12px; }
.game-best b { margin-left: 4px; color: var(--listen-ink); font: 600 15px var(--game-num); }

/* 卡片上的小插画，纯 CSS */
.game-art { position: relative; display: grid; height: 120px; overflow: hidden; border-radius: 12px; background: var(--listen-green-soft); }
.art-2048 { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 14px 18%; }
.art-2048 i { display: grid; place-items: center; border-radius: 8px; color: #fff; font: 700 15px var(--game-num); font-style: normal; }
.art-2048 i:nth-child(1) { color: #26314a; background: rgba(255, 255, 255, .8); }
.art-2048 i:nth-child(2) { color: #26314a; background: #dbe6fb; }
.art-2048 i:nth-child(3) { background: #7d9ce0; }
.art-2048 i:nth-child(4) { background: linear-gradient(135deg, #6a7fd6, #9b7fe0); font-size: 13px; }
.art-snake i { position: absolute; width: 22px; height: 22px; border-radius: 7px; background: var(--listen-green); }
.art-snake i:nth-child(1) { left: calc(50% + 2px); top: calc(50% - 22px); }
.art-snake i:nth-child(2) { left: calc(50% - 22px); top: calc(50% - 22px); opacity: .85; }
.art-snake i:nth-child(3) { left: calc(50% - 46px); top: calc(50% - 22px); opacity: .7; }
.art-snake i:nth-child(4) { left: calc(50% - 46px); top: calc(50% + 2px); opacity: .55; }
.art-snake b { position: absolute; left: calc(50% + 40px); top: calc(50% - 18px); width: 14px; height: 14px; border-radius: 50%; background: #e2725b; animation: art-pulse 1.6s ease-in-out infinite; }
.art-mines { grid-template-columns: repeat(3, 34px); justify-content: center; align-content: center; gap: 4px; }
.art-mines i { display: grid; place-items: center; height: 34px; border-radius: 6px; background: var(--listen-glass); color: #3c6fd8; font: 700 15px var(--game-num); font-style: normal; }
.art-mines i:nth-child(2) { color: #3a9a6c; }
.art-mines i.f::before { content: "⚑"; color: var(--mine-red); }
.art-mines i:nth-child(4) { background: rgba(255, 255, 255, .25); box-shadow: inset 0 -3px rgba(0, 0, 0, .08); }
.art-mines i.m { background: rgba(255, 255, 255, .25); box-shadow: inset 0 -3px rgba(0, 0, 0, .08); }
@keyframes art-pulse { 50% { transform: scale(1.25); } }

/* ---------- 游戏台面 ---------- */
.game-stage { position: relative; padding: 34px 0 64px; }
.stage-bar { display: grid; grid-template-columns: auto auto 1fr auto auto; align-items: center; gap: 18px; margin-bottom: 26px; }
.stage-bar .sound-toggle { justify-self: start; }
.stage-back { color: var(--listen-muted); font-size: 13px; white-space: nowrap; }
.stage-back:hover { color: var(--listen-ink); }
.stage-bar h1 { margin: 0; font: 700 26px/1.3 var(--game-serif); }
.stage-stats { display: flex; gap: 8px; }
.stage-stat { display: grid; min-width: 74px; padding: 7px 12px; border: 1px solid var(--listen-line); border-radius: 10px; background: var(--listen-glass); text-align: center; }
.stage-stat span { color: var(--listen-muted); font-size: 11px; }
.stage-stat b { font: 600 18px/1.3 var(--game-num); font-variant-numeric: tabular-nums; }
.stage-stat b.bump { animation: stat-bump .3s ease; }
@keyframes stat-bump { 40% { transform: scale(1.18); color: var(--listen-green); } }
.stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-btn { min-height: 36px; padding: 0 14px; border: 1px solid var(--listen-line); border-radius: 999px; color: var(--listen-ink); background: var(--listen-glass); font: inherit; font-size: 13px; cursor: pointer; transition: border-color .2s, background-color .2s, transform .15s; }
.stage-btn:hover { border-color: var(--listen-blue); }
.stage-btn:active { transform: scale(.97); }
.stage-btn[aria-pressed="true"] { border-color: var(--listen-ink); color: var(--listen-bg); background: var(--listen-ink); }
.stage-btn.primary { border-color: var(--listen-ink); color: var(--listen-bg); background: var(--listen-ink); }
.stage-btn:disabled { opacity: .55; cursor: default; }
.stage-body { position: relative; display: grid; justify-items: center; }
.stage-hint { margin: 22px auto 0; max-width: 560px; color: var(--listen-muted); font-size: 12.5px; line-height: 1.7; text-align: center; }

.stage-result { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; border-radius: 18px; background: color-mix(in srgb, var(--listen-bg) 55%, transparent); backdrop-filter: blur(6px); animation: result-fade .25s ease; }
.result-card { width: min(420px, 100%); max-height: calc(100% - 20px); overflow: auto; padding: 26px 24px 22px; border: 1px solid var(--listen-line); border-radius: 18px; background: var(--listen-bg); box-shadow: var(--listen-shadow); text-align: center; animation: result-rise .35s cubic-bezier(.22, 1, .36, 1); }
.result-card h3 { margin: 0 0 8px; font: 700 22px/1.4 var(--game-serif); }
.result-body { color: var(--listen-muted); font-size: 14px; line-height: 1.7; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
@keyframes result-fade { from { opacity: 0; } }
@keyframes result-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }

.game-toast { position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); z-index: 40; max-width: 88vw; padding: 10px 16px; border-radius: 999px; color: var(--listen-bg); background: var(--listen-ink); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .2s, transform .2s; }
.game-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 2048 ---------- */
.g2048-board { --gap: 10px; position: relative; width: min(440px, 92vw); aspect-ratio: 1; padding: var(--gap); border-radius: 16px; background: color-mix(in srgb, var(--listen-blue) 22%, var(--listen-glass)); box-shadow: var(--listen-shadow); touch-action: none; user-select: none; outline: none; }
.g2048-board:focus-visible { box-shadow: 0 0 0 3px var(--listen-blue), var(--listen-shadow); }
.g2048-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); height: 100%; }
.g2048-cells i { border-radius: 10px; background: color-mix(in srgb, var(--listen-bg) 70%, transparent); }
.g2048-tiles { position: absolute; inset: var(--gap); }
.g2048-tile { position: absolute; top: 0; left: 0; display: grid; place-items: center; width: calc((100% - 3 * var(--gap)) / 4); height: calc((100% - 3 * var(--gap)) / 4); border-radius: 10px; color: #26314a; background: #eef3fc; font: 700 clamp(22px, 7vw, 36px) var(--game-num); transform: translate(calc(var(--c) * (100% + var(--gap))), calc(var(--r) * (100% + var(--gap)))); transition: transform .11s ease-in-out; will-change: transform; }
.g2048-tile.long { font-size: clamp(17px, 5.4vw, 28px); }
.g2048-tile.new { animation: tile-in .18s ease .08s backwards; }
.g2048-tile.merged { animation: tile-merge .18s ease; z-index: 2; }
.g2048-tile.dying { z-index: 1; }
@keyframes tile-in { from { opacity: 0; scale: .4; } }
@keyframes tile-merge { 50% { scale: 1.14; } }
.g2048-tile[data-v="4"] { background: #dde7fb; }
.g2048-tile[data-v="8"] { color: #fff; background: #93b3f0; }
.g2048-tile[data-v="16"] { color: #fff; background: #7a9de6; }
.g2048-tile[data-v="32"] { color: #fff; background: #6b86d9; }
.g2048-tile[data-v="64"] { color: #fff; background: #5c6fcb; }
.g2048-tile[data-v="128"] { color: #fff; background: #7f76d4; box-shadow: 0 0 18px rgba(127, 118, 212, .35); }
.g2048-tile[data-v="256"] { color: #fff; background: #9177d6; box-shadow: 0 0 20px rgba(145, 119, 214, .4); }
.g2048-tile[data-v="512"] { color: #fff; background: #a774cf; box-shadow: 0 0 22px rgba(167, 116, 207, .45); }
.g2048-tile[data-v="1024"] { color: #fff; background: #3fa58f; box-shadow: 0 0 24px rgba(63, 165, 143, .5); }
.g2048-tile[data-v="2048"] { color: #fff; background: linear-gradient(135deg, #3fa58f, #6a7fd6 55%, #a774cf); box-shadow: 0 0 30px rgba(106, 127, 214, .6); }
.g2048-tile[data-v="big"] { color: #fff; background: #1d2433; }
:root[data-theme="dark"] .g2048-tile { color: #e8edf4; background: #2a3242; }
:root[data-theme="dark"] .g2048-tile[data-v="4"] { background: #34405a; }

/* ---------- 贪吃蛇 ---------- */
.snake-wrap { position: relative; width: min(480px, 92vw); overflow: hidden; border: 1px solid var(--listen-line); border-radius: 16px; background: var(--listen-glass); box-shadow: var(--listen-shadow); touch-action: none; user-select: none; }
.snake-canvas { display: block; width: 100%; aspect-ratio: 1; }
.snake-wrap.dead { animation: snake-shake .35s ease; }
@keyframes snake-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.snake-cover { position: absolute; inset: 0; display: grid; place-content: center; gap: 6px; background: color-mix(in srgb, var(--listen-bg) 62%, transparent); text-align: center; backdrop-filter: blur(2px); }
.snake-cover strong { font: 700 22px var(--game-serif); }
.snake-cover span { color: var(--listen-muted); font-size: 13px; }
.snake-pad { display: grid; grid-template-columns: repeat(3, 64px); grid-template-areas: ". up ." "left pause right" ". down ."; gap: 8px; margin-top: 18px; }
.snake-pad button { height: 54px; border: 1px solid var(--listen-line); border-radius: 14px; color: var(--listen-ink); background: var(--listen-glass); font-size: 18px; touch-action: manipulation; }
.snake-pad button:active { background: var(--listen-green-soft); }
.snake-pad [data-dir="up"] { grid-area: up; }
.snake-pad [data-dir="down"] { grid-area: down; }
.snake-pad [data-dir="left"] { grid-area: left; }
.snake-pad [data-dir="right"] { grid-area: right; }
.snake-pad [data-dir="pause"] { grid-area: pause; font-size: 14px; }

/* ---------- 扫雷 ---------- */
.mines-mode { display: inline-flex; gap: 0; margin-bottom: 14px; padding: 3px; border: 1px solid var(--listen-line); border-radius: 999px; background: var(--listen-glass); }
.mines-mode button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; color: var(--listen-muted); background: transparent; font: inherit; font-size: 13px; }
.mines-mode button[aria-pressed="true"] { color: var(--listen-bg); background: var(--listen-ink); }
.mines-scroll { width: 100%; overflow-x: auto; }
.mines-board { --cell: 30px; width: max-content; margin: 0 auto; padding: 8px; border-radius: 14px; background: color-mix(in srgb, var(--listen-blue) 18%, var(--listen-glass)); box-shadow: var(--listen-shadow); user-select: none; -webkit-touch-callout: none; }
.mines-row { display: contents; }
.mines-board { display: grid; gap: 2px; }
.mc { display: grid; place-items: center; width: var(--cell); height: var(--cell); padding: 0; border: 0; border-radius: 5px; color: inherit; background: color-mix(in srgb, var(--listen-bg) 66%, var(--listen-blue)); box-shadow: inset 0 -3px rgba(0, 0, 0, .12); font: 700 calc(var(--cell) * .52) var(--game-num); cursor: pointer; touch-action: manipulation; transition: background-color .12s; }
.mc:hover:not(.open) { background: color-mix(in srgb, var(--listen-bg) 50%, var(--listen-blue)); }
.mc:focus-visible { outline: 2px solid var(--listen-ink); outline-offset: -2px; }
.mc.open { background: color-mix(in srgb, var(--listen-bg) 92%, transparent); box-shadow: none; cursor: default; }
.mc.peek { background: color-mix(in srgb, var(--listen-blue) 30%, var(--listen-bg)); }
.mc.flag::before { content: "⚑"; color: var(--mine-red); font-size: calc(var(--cell) * .55); }
.mc.mine::before { content: ""; width: 46%; height: 46%; border-radius: 50%; background: var(--listen-ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--listen-ink) 30%, transparent); }
.mc.boom { background: var(--mine-red); }
.mc.boom::before { background: #fff; }
.mc.wrong { background: color-mix(in srgb, var(--mine-red) 25%, var(--listen-bg)); }
.mc.wrong::after { content: "✕"; position: absolute; color: var(--mine-red); font-size: calc(var(--cell) * .6); }
.mc.wrong { position: relative; }
.mc.n1 { color: #3c6fd8; } .mc.n2 { color: #2f9466; } .mc.n3 { color: #d24c45; } .mc.n4 { color: #6c4bc4; }
.mc.n5 { color: #b5652a; } .mc.n6 { color: #1f8f97; } .mc.n7 { color: var(--listen-ink); } .mc.n8 { color: var(--listen-muted); }
:root[data-theme="dark"] .mc.n1 { color: #7fa6f5; } :root[data-theme="dark"] .mc.n2 { color: #5fc796; } :root[data-theme="dark"] .mc.n3 { color: #f0817a; } :root[data-theme="dark"] .mc.n4 { color: #ad95f2; }
:root[data-theme="dark"] .mc.n5 { color: #e2a065; } :root[data-theme="dark"] .mc.n6 { color: #5cc8cf; }
.mines-board.won { box-shadow: 0 0 0 3px var(--good), var(--listen-shadow); }

/* ---------- 英语游戏：卡片插画 ---------- */
.art-builder { grid-template-columns: repeat(4, auto); justify-content: center; align-content: center; gap: 6px; padding: 0 10px; }
.art-builder i { padding: 6px 10px; border-radius: 8px; color: var(--listen-ink); background: var(--listen-bg); box-shadow: 0 2px 0 rgba(0, 0, 0, .08); font: 600 13px var(--game-num); font-style: normal; }
.art-builder i.hole { width: 36px; border: 2px dashed color-mix(in srgb, var(--listen-green) 55%, transparent); background: transparent; box-shadow: none; animation: art-blink 1.4s ease-in-out infinite; }
.art-builder b { grid-column: 1 / -1; justify-self: center; margin-top: 4px; color: var(--listen-muted); font-size: 12px; font-weight: 500; }
@keyframes art-blink { 50% { opacity: .35; } }
.art-sprint { grid-template-columns: 46px 96px; grid-template-rows: repeat(3, 12px); justify-content: center; align-content: center; gap: 8px 16px; }
.art-sprint b { grid-row: 1 / -1; align-self: center; width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--listen-green), var(--listen-coral)); animation: art-pulse 1.6s ease-in-out infinite; }
.art-sprint i { border-radius: 6px; background: var(--listen-bg); }
.art-sprint i:nth-of-type(2) { background: var(--good); }
.art-rain i { position: absolute; top: 0; padding: 3px 8px; border-radius: 6px; color: var(--listen-ink); background: var(--listen-bg); font: 600 12px var(--game-num); font-style: normal; animation: art-fall 3.2s linear infinite; }
.art-rain i:nth-child(1) { left: 10%; animation-delay: -.4s; }
.art-rain i:nth-child(2) { left: 55%; animation-delay: -1.5s; }
.art-rain i:nth-child(3) { left: 30%; animation-delay: -2.3s; }
.art-rain i:nth-child(4) { left: 68%; animation-delay: -3s; }
@keyframes art-fall { from { transform: translateY(-30px); } to { transform: translateY(124px); } }
.eg-loading { color: var(--listen-muted); }

/* ---------- 句子拼图 ---------- */
.bd { display: grid; justify-items: center; gap: 18px; width: min(720px, 100%); }
.bd-card { width: 100%; padding: 22px 24px; border: 1px solid var(--listen-line); border-radius: 16px; background: var(--listen-glass); box-shadow: var(--listen-shadow); text-align: center; }
.bd-zh { margin: 0; font: 600 clamp(19px, 3vw, 24px)/1.6 var(--game-serif); }
.bd-src { margin: 8px 0 0; color: var(--listen-muted); font-size: 12px; }
.bd-answer { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 66px; padding: 12px; border: 2px dashed color-mix(in srgb, var(--listen-blue) 60%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--listen-blue) 7%, transparent); transition: border-color .25s, background-color .25s; }
.bd-answer.ok { border-style: solid; border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
.bd-answer.shake { animation: snake-shake .35s ease; }
.bd-end { color: var(--listen-muted); font: 600 20px var(--game-num); }
.bd-pool { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; min-height: 52px; }
.chip { padding: 9px 15px; border: 1px solid var(--listen-line); border-radius: 12px; color: var(--listen-ink); background: var(--listen-bg); box-shadow: 0 3px 0 color-mix(in srgb, var(--listen-ink) 12%, transparent), 0 8px 18px rgba(43, 61, 91, .06); font: 600 17px var(--game-num); cursor: pointer; touch-action: manipulation; transition: transform .12s, box-shadow .12s, background-color .2s, border-color .2s, color .2s; }
.chip:hover { transform: translateY(-2px); border-color: var(--listen-blue); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--listen-ink) 12%, transparent); }
.chip.ghost { visibility: hidden; pointer-events: none; }
.bd-answer .chip { background: color-mix(in srgb, var(--listen-blue) 14%, var(--listen-bg)); }
.bd-answer .chip.hinted { border-color: var(--amber); }
.bd-answer .chip.bad { border-color: var(--mine-red); color: var(--mine-red); }
.bd-answer.ok .chip { border-color: transparent; color: #fff; background: var(--good); animation: chip-ok .45s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes chip-ok { 40% { transform: translateY(-10px) scale(1.06); } }
.bd-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.bd-feedback { min-height: 24px; margin: 0; color: var(--listen-muted); font-size: 14px; line-height: 1.6; text-align: center; }

/* ---------- 听音快答 ---------- */
.sp { width: min(640px, 100%); }
.sp-intro { display: grid; justify-items: center; gap: 10px; padding: 36px 24px; border: 1px solid var(--listen-line); border-radius: 18px; background: var(--listen-glass); box-shadow: var(--listen-shadow); text-align: center; }
.sp-intro p { margin: 0; color: var(--listen-muted); line-height: 1.7; }
.sp-intro .sp-big { color: var(--listen-ink); font: 700 56px/1.1 var(--game-num); }
.sp-intro .sp-voice { color: var(--listen-ink); font-size: 13px; }
.sp-start { min-height: 44px; margin-top: 8px; padding: 0 30px; font-size: 15px; }
.sp-play { display: grid; justify-items: center; gap: 18px; }
.sp-top { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; width: 100%; }
.sp-timer { height: 8px; overflow: hidden; border-radius: 999px; background: var(--listen-line); }
.sp-timer i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--listen-green), var(--listen-coral)); transform-origin: left; }
.sp-timer i.low { background: var(--mine-red); }
.sp-time { font: 600 18px var(--game-num); font-variant-numeric: tabular-nums; }
.sp-combo { grid-column: 1 / -1; min-height: 20px; color: var(--listen-ink); font: 700 14px var(--game-num); text-align: center; }
.sp-combo.pop { animation: combo-pop .35s ease; }
@keyframes combo-pop { 40% { transform: scale(1.3); color: var(--good); } }
.sp-speaker { display: grid; align-content: center; justify-items: center; gap: 6px; width: 120px; height: 120px; border: 0; border-radius: 50%; color: #fff; background: linear-gradient(135deg, #4968b8, #8f76c9); box-shadow: 0 14px 34px rgba(73, 104, 184, .35); cursor: pointer; transition: transform .15s; }
.sp-speaker:active { transform: scale(.95); }
.sp-wave { display: flex; align-items: center; gap: 4px; height: 34px; }
.sp-wave i { width: 5px; height: 12px; border-radius: 3px; background: #fff; }
.sp-speaker.speaking .sp-wave i { animation: wave .8s ease-in-out infinite; }
.sp-speaker.speaking .sp-wave i:nth-child(2) { animation-delay: .15s; }
.sp-speaker.speaking .sp-wave i:nth-child(3) { animation-delay: .3s; }
.sp-speaker.speaking .sp-wave i:nth-child(4) { animation-delay: .45s; }
@keyframes wave { 50% { height: 32px; } }
.sp-replay { font-size: 12px; }
.sp-en { min-height: 28px; margin: 0; color: var(--listen-ink); font: 600 18px/1.5 var(--game-num); text-align: center; opacity: 0; transition: opacity .2s; }
.sp-en.reveal, .sp-en.reading { opacity: 1; }
.sp-options { display: grid; gap: 10px; width: 100%; }
.sp-option { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 12px; min-height: 56px; padding: 10px 16px; border: 1px solid var(--listen-line); border-radius: 14px; color: var(--listen-ink); background: var(--listen-glass); font: inherit; font-size: 15px; line-height: 1.5; text-align: left; cursor: pointer; transition: transform .12s, border-color .2s, background-color .2s; }
.sp-option b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--listen-green); background: var(--listen-green-soft); font: 700 14px var(--game-num); }
.sp-option:hover:not(:disabled) { border-color: var(--listen-blue); transform: translateX(3px); }
.sp-option:disabled { cursor: default; }
.sp-option.right { border-color: var(--good); background: color-mix(in srgb, var(--good) 16%, var(--listen-bg)); }
.sp-option.right b { color: #fff; background: var(--good); }
.sp-option.wrong { border-color: var(--mine-red); background: color-mix(in srgb, var(--mine-red) 12%, var(--listen-bg)); }
.sp-options.enter .sp-option { animation: option-in .35s cubic-bezier(.22, 1, .36, 1) both; }
.sp-options.enter .sp-option:nth-child(2) { animation-delay: .05s; }
.sp-options.enter .sp-option:nth-child(3) { animation-delay: .1s; }
@keyframes option-in { from { opacity: 0; transform: translateY(10px); } }
.sp-options.shake { animation: snake-shake .35s ease; }
.sp-result { display: grid; gap: 8px; text-align: left; }
.sp-result p { margin: 0; }
.sp-missed-title { color: var(--listen-ink); font-weight: 600; }
.sp-missed { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-missed li { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; }
.sp-missed span { display: grid; }
.sp-missed strong { color: var(--listen-ink); font-weight: 600; }
.sp-missed small { color: var(--listen-muted); font-size: 12.5px; }
.sp-missed-say { width: 32px; height: 32px; padding: 0; border: 1px solid var(--listen-line); border-radius: 8px; background: var(--listen-glass); cursor: pointer; }

/* ---------- 打字雨 ---------- */
.rain { display: grid; gap: 12px; width: min(760px, 100%); }
.rain-field { position: relative; height: 460px; overflow: hidden; border: 1px solid var(--listen-line); border-radius: 18px; background: linear-gradient(180deg, color-mix(in srgb, var(--listen-blue) 12%, var(--listen-bg)), var(--listen-glass)); box-shadow: var(--listen-shadow); user-select: none; }
.rain-ground { position: absolute; inset: auto 0 0; height: 30px; border-top: 2px solid color-mix(in srgb, var(--listen-green) 40%, transparent); background: linear-gradient(0deg, color-mix(in srgb, var(--listen-green) 20%, transparent), transparent); }
.rain-ground.hit { animation: ground-hit .45s ease; }
@keyframes ground-hit { 30% { border-color: var(--mine-red); background: color-mix(in srgb, var(--mine-red) 35%, transparent); } }
.rain-cover { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; gap: 6px; background: color-mix(in srgb, var(--listen-bg) 62%, transparent); text-align: center; backdrop-filter: blur(2px); }
.rain-cover strong { font: 700 22px var(--game-serif); }
.rain-cover span { color: var(--listen-muted); font-size: 13px; }
.drop { position: absolute; top: 0; padding: 5px 11px; border: 1px solid var(--listen-line); border-radius: 10px; color: var(--listen-ink); background: var(--listen-bg); box-shadow: 0 6px 16px rgba(43, 61, 91, .1); font: 600 17px var(--game-num); white-space: nowrap; will-change: transform; }
.drop b { color: var(--good); }
.drop.target { z-index: 2; border-color: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.drop.pop { animation: drop-pop .26s ease forwards; }
@keyframes drop-pop { to { opacity: 0; scale: 1.5; } }
.drop.splash { border-color: var(--mine-red); color: var(--mine-red); opacity: 0; transition: opacity .4s; }
.spark { position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--amber); pointer-events: none; animation: spark .6s ease-out forwards; }
.spark:nth-of-type(3n) { background: var(--good); }
@keyframes spark { to { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
.gain { position: absolute; color: var(--good); font: 700 16px var(--game-num); font-style: normal; pointer-events: none; transform: translate(-50%, -50%); animation: gain-up .8s ease-out forwards; }
@keyframes gain-up { to { opacity: 0; transform: translate(-50%, -160%); } }
.rain-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.rain-lives { color: var(--mine-red); font-size: 20px; letter-spacing: 2px; }
.rain-typed { min-width: 140px; padding: 8px 16px; border: 1px solid var(--listen-line); border-radius: 12px; background: var(--listen-glass); font: 700 22px var(--game-num); letter-spacing: .06em; text-align: center; }
.rain-typed.bad { color: var(--mine-red); animation: snake-shake .3s ease; }
.rain-typed.ok { color: var(--good); }
.rain-level { justify-self: end; color: var(--listen-muted); font-size: 13px; }
.rain-input { width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--listen-line); border-radius: 12px; color: var(--listen-ink); background: var(--listen-glass); font: 600 18px var(--game-num); }
.rain-input:focus { outline: 2px solid var(--listen-blue); outline-offset: 1px; }

/* ---------- 原创游戏：大厅里的大卡片（迷你极光天空） ---------- */
.feature-card { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 28px; margin-bottom: 48px; padding: 18px; overflow: hidden; border: 1px solid var(--listen-line); border-radius: 22px; background: var(--listen-glass); box-shadow: var(--listen-shadow); transition: transform .25s cubic-bezier(.22, 1, .36, 1), border-color .25s; }
.feature-card:hover, .feature-card:focus-visible { transform: translateY(-4px); border-color: var(--listen-blue); }
.feature-sky { position: relative; height: 230px; overflow: hidden; border-radius: 16px; background: linear-gradient(180deg, #0b1430, #1a2550); }
.feature-sky i { position: absolute; left: -10%; width: 120%; height: 70px; border-radius: 50%; filter: blur(14px); opacity: .7; animation: sky-wave 7s ease-in-out infinite alternate; }
.feature-sky .r1 { top: -24px; background: linear-gradient(90deg, #8ab4ff, #7fd8c8, #c9b8ff); }
.feature-sky .r2 { bottom: -28px; background: linear-gradient(90deg, #c9b8ff, #8ab4ff, #7fd8c8); animation-delay: -2.5s; }
.feature-sky .r3 { top: 38%; height: 26px; opacity: .25; background: linear-gradient(90deg, transparent, #7fd8c8, transparent); animation-duration: 9s; }
@keyframes sky-wave { from { transform: translateX(-4%) scaleY(.85); } to { transform: translateX(4%) scaleY(1.2); } }
.feature-sky .comet { position: absolute; top: 46%; left: 24%; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 4px #8ab4ff, -18px 0 10px -2px rgba(127, 216, 200, .7), -34px 0 12px -4px rgba(201, 184, 255, .45); animation: sky-comet 3.2s ease-in-out infinite; }
@keyframes sky-comet { 0%, 100% { transform: translateY(-18px); } 50% { transform: translateY(20px); } }
.feature-sky s { position: absolute; width: 10px; height: 10px; background: #ffd36b; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: sky-star 4s linear infinite; }
.feature-sky s:nth-of-type(1) { top: 30%; animation-delay: 0s; }
.feature-sky s:nth-of-type(2) { top: 42%; animation-delay: -.6s; }
.feature-sky s:nth-of-type(3) { top: 54%; animation-delay: -1.2s; }
.feature-sky s:nth-of-type(4) { top: 38%; animation-delay: -2.4s; }
.feature-sky s:nth-of-type(5) { top: 60%; animation-delay: -3.1s; }
@keyframes sky-star { from { left: 105%; } to { left: -5%; } }
.feature-copy { display: grid; gap: 10px; padding-right: 12px; }
.feature-copy .eyebrow { margin: 0; }
.feature-copy strong { font: 700 clamp(26px, 3vw, 34px)/1.25 var(--game-serif); }
.feature-copy > span:not(.eyebrow):not(.game-best) { color: var(--listen-muted); font-size: 14px; line-height: 1.75; }
.feature-go { position: absolute; right: 22px; bottom: 18px; padding: 8px 16px; border-radius: 999px; color: var(--listen-bg); background: var(--listen-ink); font-size: 13px; }

/* ---------- 今日英语连续天数、音效开关 ---------- */
.daily-streak { margin-left: 6px; padding: 1px 8px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, var(--good), #4968b8); font-style: normal; letter-spacing: .04em; }
.sound-toggle { min-height: 30px; padding: 0 10px; border: 1px solid var(--listen-line); border-radius: 999px; color: var(--listen-muted); background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.sound-toggle[aria-pressed="true"] { color: var(--listen-ink); border-color: color-mix(in srgb, var(--listen-blue) 60%, transparent); }

/* ---------- 成就墙 ---------- */
.lobby-note { max-width: 300px; margin: 0 0 4px; color: var(--listen-muted); font-size: 12px; }
.badge-count { margin-left: 8px; color: var(--listen-muted); font: 500 14px var(--game-num); }
.badge-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.badge { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 12px; padding: 12px; border: 1px dashed var(--listen-line); border-radius: 14px; background: transparent; }
.badge-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--listen-muted); background: color-mix(in srgb, var(--listen-ink) 6%, transparent); font: 700 13px var(--game-num); }
.badge-text { display: grid; gap: 2px; }
.badge strong { color: var(--listen-muted); font-size: 14px; }
.badge small { color: var(--listen-muted); font-size: 12px; line-height: 1.5; }
.badge.got { border-style: solid; background: var(--listen-glass); box-shadow: 0 8px 22px rgba(43, 61, 91, .06); }
.badge.got .badge-icon { color: #fff; background: linear-gradient(135deg, #4968b8, #8f76c9 55%, var(--good)); box-shadow: 0 6px 16px rgba(73, 104, 184, .35); }
.badge.got strong { color: var(--listen-ink); }

/* 解锁提示：从右上角滑入 */
.badge-toast { position: fixed; top: calc(18px + env(safe-area-inset-top, 0px)); right: 18px; z-index: 50; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 12px; width: min(330px, calc(100vw - 36px)); padding: 12px 16px 12px 12px; border: 1px solid var(--listen-line); border-radius: 16px; background: var(--listen-bg); box-shadow: var(--listen-shadow); opacity: 0; transform: translateX(30px); transition: opacity .3s, transform .35s cubic-bezier(.22, 1, .36, 1); }
.badge-toast.show { opacity: 1; transform: none; }
.badge-toast .badge-icon { width: 52px; height: 52px; color: #fff; background: linear-gradient(135deg, #4968b8, #8f76c9 55%, var(--good)); }
.badge-toast.show .badge-icon { animation: badge-pop .6s cubic-bezier(.22, 1.6, .36, 1); }
@keyframes badge-pop { 0% { transform: scale(.3) rotate(-30deg); } 100% { transform: none; } }
.badge-toast small { display: block; color: var(--listen-green); font-size: 11px; letter-spacing: .1em; }
.badge-toast strong { display: block; font-size: 16px; }
.badge-toast em { display: block; color: var(--listen-muted); font-size: 12px; font-style: normal; }

/* ---------- 极光穿梭 ---------- */
.glide { width: min(860px, 100%); }
.glide-wrap { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #0b1430; box-shadow: var(--listen-shadow); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.glide-canvas { display: block; width: 100%; height: 100%; }
.glide-cover { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: #fff; background: rgba(5, 8, 22, .45); text-align: center; backdrop-filter: blur(2px); }
.glide-cover strong { font: 700 30px var(--game-serif); letter-spacing: .06em; }
.glide-cover span { color: rgba(255, 255, 255, .78); font-size: 13px; }
.glide-cover .stage-btn.primary { border-color: #fff; color: #0b1430; background: #fff; }

/* ---------- 积木消除 ---------- */
:root { --k0: #ef7466; --k1: #f0b03e; --k2: #4cb487; --k3: #35afc2; --k4: #5b86ea; --k5: #9877e3; --k6: #e46aa8; }
.c0 { --bc: var(--k0); } .c1 { --bc: var(--k1); } .c2 { --bc: var(--k2); } .c3 { --bc: var(--k3); } .c4 { --bc: var(--k4); } .c5 { --bc: var(--k5); } .c6 { --bc: var(--k6); }
.bk { display: grid; justify-items: center; gap: 22px; width: min(460px, 100%); }
.bk-board-wrap { position: relative; width: 100%; }
.bk-board { --pad: 10px; --gap: 4px; display: grid; grid-template-columns: repeat(8, 1fr); gap: var(--gap); width: 100%; aspect-ratio: 1; padding: var(--pad); border: 1px solid var(--listen-line); border-radius: 18px; background: color-mix(in srgb, var(--listen-blue) 14%, var(--listen-glass)); box-shadow: var(--listen-shadow); user-select: none; -webkit-user-select: none; }
.bk-board.shake { animation: bk-shake .3s ease; }
@keyframes bk-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.bk-cell { position: relative; border-radius: 7px; background: color-mix(in srgb, var(--listen-ink) 6%, transparent); transition: filter .5s ease calc(var(--i) * 6ms); }
.bk-cell[class*=" c"], .bk-piece i { background: linear-gradient(160deg, color-mix(in srgb, var(--bc) 72%, #fff), var(--bc) 60%); box-shadow: inset 0 -3px rgba(0, 0, 0, .16), inset 0 2px rgba(255, 255, 255, .35); }
.bk-piece i { border-radius: 5px; }
.bk-cell.drop { animation: bk-drop .22s cubic-bezier(.22, 1.4, .36, 1); }
@keyframes bk-drop { from { transform: scale(.7); } }
.bk-cell.clear { animation: bk-clear .42s ease var(--d, 0ms) forwards; }
@keyframes bk-clear { 0% { transform: scale(1); filter: brightness(1); } 35% { transform: scale(1.12); filter: brightness(1.6); } 100% { transform: scale(.2) rotate(20deg); opacity: 0; } }
.bk-cell[data-g] { background: color-mix(in srgb, var(--bc, var(--listen-blue)) 42%, transparent); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bc, var(--listen-blue)) 70%, transparent); }
.bk-cell[data-g="0"] { --bc: var(--k0); } .bk-cell[data-g="1"] { --bc: var(--k1); } .bk-cell[data-g="2"] { --bc: var(--k2); } .bk-cell[data-g="3"] { --bc: var(--k3); } .bk-cell[data-g="4"] { --bc: var(--k4); } .bk-cell[data-g="5"] { --bc: var(--k5); } .bk-cell[data-g="6"] { --bc: var(--k6); }
.bk-cell[data-g="bad"] { --bc: var(--mine-red); background: color-mix(in srgb, var(--mine-red) 22%, transparent); }
.bk-cell.hot { animation: bk-hot .8s ease-in-out infinite alternate; }
@keyframes bk-hot { to { filter: brightness(1.35) saturate(1.2); box-shadow: 0 0 12px color-mix(in srgb, var(--bc, #fff) 70%, transparent), inset 0 0 0 2px rgba(255, 255, 255, .7); } }
.bk-cell.star::after { content: "★"; position: absolute; inset: 0; display: grid; place-items: center; color: #e0a018; font-size: clamp(14px, 3.6vw, 22px); line-height: 1; text-shadow: 0 0 10px rgba(255, 205, 80, .8); animation: bk-twinkle 1.6s ease-in-out infinite; pointer-events: none; }
.bk-cell.star[class*=" c"]::after { color: #fff; font-size: clamp(11px, 2.6vw, 16px); }
@keyframes bk-twinkle { 50% { transform: scale(.82) rotate(18deg); opacity: .75; } }
.bk-board.over .bk-cell[class*=" c"] { filter: grayscale(.9) brightness(.92); }
.bk-fx { position: absolute; inset: 10px; pointer-events: none; }
.bk-pop { position: absolute; z-index: 3; padding: 2px 8px; border-radius: 999px; color: var(--listen-ink); background: var(--listen-bg); box-shadow: 0 4px 14px rgba(0, 0, 0, .14); font: 700 15px var(--game-num); white-space: nowrap; transform: translate(-50%, -50%); animation: bk-pop 1.1s ease forwards; }
.bk-pop.big { padding: 6px 16px; font-size: 20px; }
.bk-pop.star { color: #9a6a00; background: #fff6da; }
.bk-pop.perfect { color: #fff; background: linear-gradient(90deg, var(--k4), var(--k5), var(--k6)); }
@keyframes bk-pop { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -150%); } }
.bk-tray { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.bk-slot { display: grid; place-items: center; height: 132px; padding: 8px; border: 1px solid var(--listen-line); border-radius: 16px; background: var(--listen-glass); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: border-color .2s, transform .2s, opacity .2s, box-shadow .2s; }
.bk-slot:hover:not(:disabled) { border-color: var(--listen-blue); transform: translateY(-2px); }
.bk-slot[aria-pressed="true"] { border-color: var(--listen-ink); box-shadow: 0 0 0 2px var(--listen-ink); }
.bk-slot:focus-visible { outline: 3px solid var(--listen-blue); outline-offset: 2px; }
.bk-slot:disabled { cursor: default; }
.bk-slot.empty { border-style: dashed; background: transparent; }
.bk-slot.nofit .bk-piece { opacity: .35; filter: grayscale(.8); }
.bk-slot.lifted .bk-piece { opacity: .2; }
.bk-slot.deal .bk-piece { animation: bk-deal .35s cubic-bezier(.22, 1.4, .36, 1) backwards; }
.bk-slot.deal:nth-child(2) .bk-piece { animation-delay: .06s; }
.bk-slot.deal:nth-child(3) .bk-piece { animation-delay: .12s; }
@keyframes bk-deal { from { opacity: 0; transform: translateY(16px) scale(.6); } }
.bk-piece { --s: 20px; --gap: 3px; display: grid; grid-template-columns: repeat(var(--w), var(--s)); grid-template-rows: repeat(var(--h), var(--s)); gap: var(--gap); pointer-events: none; }
.bk-float { position: fixed; top: 0; left: 0; z-index: 60; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .25)); will-change: transform; }
.bk-float i { border-radius: 7px; }
/* 大厅卡片插画 */
.art-blocks { grid-template-columns: repeat(6, 18px); grid-auto-rows: 18px; justify-content: center; align-content: center; gap: 3px; }
.art-blocks i { border-radius: 4px; background: color-mix(in srgb, var(--listen-ink) 7%, transparent); }
.art-blocks i[class] { background: linear-gradient(160deg, color-mix(in srgb, var(--bc) 72%, #fff), var(--bc) 60%); }
.art-blocks i.hot { animation: art-hot 1.4s ease-in-out infinite; }
@keyframes art-hot { 50% { filter: brightness(1.4); transform: scale(1.08); } }
.game-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (prefers-reduced-motion: reduce) {
  .g2048-tile { transition: none; }
  .g2048-tile.new, .g2048-tile.merged, .snake-wrap.dead, .art-snake b, .art-rain i, .art-sprint i, .chip, .bd-answer.ok .chip, .bd-answer.shake, .sp-options.enter .sp-option, .sp-options.shake, .sp-combo.pop, .sp-speaker.speaking .sp-wave i, .drop.pop, .spark, .gain, .rain-ground.hit, .feature-sky i, .feature-sky .comet, .feature-sky s, .badge-toast.show .badge-icon, .bk-board.shake, .bk-cell.drop, .bk-cell.hot, .bk-cell.star::after, .bk-slot.deal .bk-piece, .art-blocks i.hot { animation: none; }
  .bk-cell.clear { animation: none; opacity: 0; }
  .bk-pop { animation-duration: .01s; animation-delay: .9s; opacity: 1; }
}

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .games-hero { grid-template-columns: 1fr; gap: 28px; padding: 48px 0 36px; }
  .daily-card { max-width: 460px; }
  .game-grid, .game-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 两列时落单的最后一张卡片占满一行，不留空位 */
  .game-grid > .game-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .stage-bar { grid-template-columns: auto 1fr auto; }
  .stage-stats, .stage-actions { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .games-hero { padding: 34px 0 26px; }
  .games-hero h1 { font-size: 34px; }
  .games-hero .intro-lede { font-size: 13px; }
  .game-grid { gap: 10px; }
  .game-card { min-height: 0; gap: 10px; padding: 12px; border-radius: 14px; }
  .game-art { height: 88px; }
  .art-2048 { padding: 10px 16%; gap: 6px; }
  .art-mines { grid-template-columns: repeat(3, 24px); }
  .art-mines i { height: 24px; font-size: 12px; }
  .game-info strong { font-size: 16px; }
  .game-info span { font-size: 12px; }
  /* 手机上台面要尽量矮：标题一行，分数和按钮挤在下一行，键盘不被底部导航挡住 */
  .game-stage { padding: 12px 0 84px; }
  .stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
  .stage-bar h1 { flex: 1 1 calc(100% - 120px); font-size: 20px; }
  .stage-stats { flex: none; gap: 6px; }
  .stage-stat { min-width: 52px; padding: 3px 8px; border-radius: 8px; }
  .stage-stat span { font-size: 10px; }
  .stage-stat b { font-size: 15px; }
  .stage-actions { flex: 1 1 auto; justify-content: flex-end; gap: 6px; }
  .stage-btn { min-height: 34px; padding: 0 11px; font-size: 12.5px; }
  .stage-hint { margin-top: 14px; }
  .g2048-board { --gap: 8px; }
  .bk { gap: 14px; }
  .bk-board { --pad: 7px; --gap: 3px; border-radius: 14px; }
  .bk-fx { inset: 7px; }
  .bk-cell { border-radius: 5px; }
  .bk-tray { gap: 8px; }
  .bk-slot { height: 104px; padding: 6px; border-radius: 12px; }
  .bk-piece { --s: 15px; --gap: 2px; }
  .bk-pop { font-size: 13px; }
  .bk-pop.big { font-size: 17px; }
  .art-blocks { grid-template-columns: repeat(6, 12px); grid-auto-rows: 12px; gap: 2px; }
}
@media (max-width: 620px) {
  .lobby-group { font-size: 21px; }
  .lobby-second { margin-top: 32px; }
  .bd { gap: 14px; }
  .bd-card { padding: 16px; }
  .chip { padding: 8px 12px; font-size: 15px; }
  .bd-pool { gap: 8px; }
  .sp-intro { padding: 26px 18px; }
  .sp-speaker { width: 96px; height: 96px; }
  .sp-option { min-height: 50px; font-size: 14px; }
  .rain-field { height: min(400px, 46vh); }
  .drop { font-size: 15px; }
  .rain-typed { min-width: 100px; font-size: 18px; }
}
@media (max-width: 760px) {
  .feature-card { grid-template-columns: 1fr; gap: 16px; padding: 14px; }
  .feature-sky { height: 170px; }
  .feature-go { position: static; justify-self: start; }
  .glide-wrap { aspect-ratio: 3 / 4; max-height: 64vh; }
}
@media (max-width: 620px) {
  .feature-card { margin-bottom: 32px; }
  .badge-wall { grid-template-columns: 1fr 1fr; gap: 8px; }
  .badge { grid-template-columns: 1fr; justify-items: center; gap: 8px; padding: 12px 8px; text-align: center; }
  .badge-toast { right: 12px; left: 12px; width: auto; }
  /* 底部有固定导航栏，提示条要在它上面 */
  .game-toast { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .art-builder { gap: 4px; padding: 0 6px; }
  .art-builder i { padding: 4px 6px; font-size: 11px; }
  .art-builder i.hole { width: 22px; }
  .art-builder b { font-size: 11px; }
  .art-sprint { grid-template-columns: 36px 72px; grid-template-rows: repeat(3, 10px); gap: 7px 12px; }
  .art-sprint b { width: 36px; height: 36px; }
}

/* ---------- 释义配对 ---------- */
.mt { width: min(760px, 100%); }
.mt-intro { display: grid; justify-items: center; gap: 10px; padding: 36px 24px; border: 1px solid var(--listen-line); border-radius: 18px; background: var(--listen-glass); box-shadow: var(--listen-shadow); text-align: center; }
.mt-intro p { margin: 0; color: var(--listen-muted); line-height: 1.7; }
.mt-intro .mt-big { color: var(--listen-ink); font: 700 56px/1.1 var(--game-num); }
.mt-play { display: grid; justify-items: center; gap: 16px; }
.mt-board { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; width: 100%; }
.mt-col { display: grid; gap: 10px; align-content: start; }
.mt-item { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 10px; min-height: 58px; padding: 8px 14px; border: 1px solid var(--listen-line); border-radius: 14px; color: var(--listen-ink); background: var(--listen-glass); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s ease, background-color .2s ease, transform .15s ease, opacity .3s ease; }
.mt-item b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--listen-green); background: var(--listen-green-soft); font: 700 13px var(--game-num); }
.mt-item span { overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; }
.mt-item[data-side="en"] span { font: 600 16px/1.35 var(--game-num); }
.mt-item:hover:not(:disabled) { border-color: var(--listen-blue); }
.mt-item.picked { border-color: var(--listen-ink); background: color-mix(in srgb, var(--listen-ink) 8%, var(--listen-bg)); box-shadow: 0 0 0 2px var(--listen-ink) inset; }
.mt-item.picked b { color: var(--listen-bg); background: var(--listen-ink); }
.mt-item.done { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, var(--listen-bg)); cursor: default; opacity: .55; }
.mt-item.done b { color: var(--listen-ink); background: color-mix(in srgb, var(--good) 40%, var(--listen-bg)); }
.mt-item.wrong { border-color: var(--mine-red); background: color-mix(in srgb, var(--mine-red) 12%, var(--listen-bg)); animation: snake-shake .35s ease; }
.mt-board.enter .mt-item { animation: option-in .35s cubic-bezier(.22, 1, .36, 1) both; }
.mt-board.enter .mt-col .mt-item:nth-child(2) { animation-delay: .04s; }
.mt-board.enter .mt-col .mt-item:nth-child(3) { animation-delay: .08s; }
.mt-board.enter .mt-col .mt-item:nth-child(4) { animation-delay: .12s; }
.mt-board.enter .mt-col .mt-item:nth-child(5) { animation-delay: .16s; }
.mt-add { justify-self: start; margin-top: 4px; }
.art-match { grid-template-columns: repeat(2, auto); justify-content: center; align-content: center; gap: 6px 8px; }
.art-match i { padding: 4px 9px; border-radius: 7px; color: var(--listen-ink); background: var(--listen-bg); box-shadow: 0 2px 0 rgba(0, 0, 0, .08); font: 600 12px var(--game-num); font-style: normal; text-align: center; }
.art-match i.on { box-shadow: 0 0 0 2px var(--listen-ink) inset; }
.art-match i.ok { color: var(--listen-ink); background: color-mix(in srgb, var(--good) 38%, var(--listen-bg)); }
@media (max-width: 620px) {
  .mt-intro { padding: 26px 18px; }
  .mt-board { gap: 8px; }
  .mt-col { gap: 8px; }
  .mt-item { grid-template-columns: 1fr; gap: 2px; min-height: 64px; padding: 8px 10px; }
  .mt-item b { display: none; }
  .mt-item span { font-size: 13.5px; }
  .mt-item[data-side="en"] span { font-size: 14.5px; }
  .art-match { gap: 4px 6px; }
  .art-match i { padding: 3px 6px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .mt-item.wrong, .mt-board.enter .mt-item { animation: none; }
}
