:root{--ink:#18243a;--muted:#718096;--line:#e4eaf2;--paper:#f5f8fc;--white:#fff;--blue:#356fdb;--coral:#ef765e;--yellow:#f5c85c;--mint:#77c9b1}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:var(--paper);color:var(--ink);font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif}.game-shell{max-width:1120px;margin:auto;padding:0 22px 50px}.game-top{height:76px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:9px;color:var(--ink);font-size:14px;font-weight:900;text-decoration:none}.brand b{display:grid;place-items:center;width:33px;height:33px;border-radius:10px;color:#fff;background:var(--blue);font-size:11px}.back{color:var(--muted);text-decoration:none;font-size:13px;font-weight:800}.game-intro{display:flex;align-items:end;justify-content:space-between;padding:48px 0 28px}.game-intro h1{margin:0 0 10px;font-size:clamp(30px,5vw,48px);letter-spacing:0}.game-intro p{margin:0;color:var(--muted);font-size:14px}.game-badge{display:grid;place-items:center;width:88px;height:88px;border-radius:22px;color:#fff;background:var(--coral);font-size:32px;font-weight:900}.game-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:18px;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fff}.game-controls select,.game-controls button,.answer-input{min-height:40px;padding:0 13px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:12px}.game-controls button,.primary{color:#fff;background:var(--blue);border-color:var(--blue);font-weight:800}.score{margin-left:auto;color:var(--muted);font-size:13px}.score strong{color:var(--blue);font-size:21px}.game-stage{min-height:410px;padding:28px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 12px 30px #263e640a}.stage-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.stage-head h2{margin:0;font-size:18px}.stage-head span{color:var(--muted);font-size:12px}.prompt{margin:35px auto 25px;text-align:center;font-size:clamp(28px,6vw,56px);font-weight:900;letter-spacing:.01em}.hint{text-align:center;color:var(--muted);font-size:14px}.options{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;max-width:780px;margin:30px auto 0}.option,.tile{min-height:76px;border:1px solid #dfe7f2;border-radius:12px;background:#fbfcfe;color:var(--ink);font-size:18px;font-weight:800;cursor:pointer}.option:hover,.tile:hover{border-color:var(--blue);background:#f1f6ff}.option.correct,.tile.correct{color:#176e56;border-color:var(--mint);background:#e7f8f1}.option.wrong,.tile.wrong{color:#b94b3c;border-color:var(--coral);background:#fff0ed}.answer-row{display:flex;justify-content:center;gap:10px;margin-top:25px}.answer-input{width:min(420px,100%);font-size:17px}.result{min-height:26px;margin:24px 0 0;text-align:center;color:var(--blue);font-weight:800}.finish{display:none;margin-top:22px;padding:24px;text-align:center;border-radius:14px;background:#fff7da}.finish.is-open{display:block}.finish strong{display:block;font-size:26px;color:#c08d13}.finish button{margin-top:15px}.wheel{display:grid;place-items:center;width:220px;height:220px;margin:20px auto;border:12px solid var(--yellow);border-radius:50%;background:var(--blue);color:#fff;font-size:28px;font-weight:900;box-shadow:0 10px 25px #356fdb30}.target-board{position:relative;min-height:285px;margin-top:20px;border-radius:14px;background:#edf3ff;overflow:hidden}.target{position:absolute;width:70px;height:70px;border:0;border-radius:50%;background:var(--coral);color:#fff;font-size:25px;font-weight:900}.small-note{margin-top:16px;color:#9aa6b7;font-size:11px;text-align:center}@media(max-width:650px){.game-intro{align-items:start;gap:18px}.game-badge{width:62px;height:62px;font-size:23px;border-radius:16px}.game-stage{padding:18px}.options{grid-template-columns:repeat(2,1fr)}.score{width:100%;margin-left:0}.game-controls{align-items:stretch}.game-controls>*{flex:1}.stage-head{gap:15px}.stage-head h2{font-size:16px}}
:root{--game-blue:#356fdb}body[data-theme=coral]{--blue:#e86f5e;--paper:#fff7f4}body[data-theme=mint]{--blue:#3da88d;--paper:#f1fbf7}
:root{--game-blue:#356fdb}.tile.correct{color:#fff;background:var(--blue);border-color:var(--blue);box-shadow:0 0 0 3px #356fdb22,0 8px 16px #356fdb25}.tile.selected{border-color:var(--blue);box-shadow:0 0 0 3px #356fdb22}.tile.wrong{animation:shake .24s ease}.finish.is-open{animation:pop .3s ease}@keyframes shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}@keyframes pop{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
:root{--match-pair:#356fdb}.match-grid{grid-template-rows:repeat(4,minmax(70px,1fr));}.english-tile{color:#356fdb;background:#f5f8ff}.chinese-tile{color:#d85f4f;background:#fff8f4}.tile.correct{color:#fff;background:var(--blue);border-color:var(--blue);box-shadow:0 0 0 3px #356fdb22,0 8px 16px #356fdb25;animation:match-pop .28s ease}.tile.selected{border-color:var(--blue);box-shadow:0 0 0 3px #356fdb22}.tile.wrong{animation:match-shake .24s ease}.match-control{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;font-weight:800}.match-control select{height:40px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink)}@keyframes match-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}@keyframes match-pop{from{transform:scale(.92);opacity:.65}to{transform:scale(1);opacity:1}}
:root{--match-blue:#356fdb}.match-grid{grid-template-rows:repeat(4,minmax(70px,1fr))}.english-tile{color:#356fdb;background:#f5f8ff}.chinese-tile{color:#d85f4f;background:#fff8f4}.tile.correct{color:#fff;background:var(--blue);border-color:var(--blue);box-shadow:0 0 0 3px #356fdb22,0 8px 16px #356fdb25;animation:match-pop .28s ease}.tile.selected{border-color:var(--blue);box-shadow:0 0 0 3px #356fdb22}.tile.wrong{animation:match-shake .24s ease}.match-control{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:12px;font-weight:800}.match-control select{height:40px;padding:0 10px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink)}.match-check{display:flex;align-items:center;gap:5px;color:var(--muted);font-size:12px;font-weight:800}.match-check input{accent-color:var(--blue)}.match-history{margin-top:22px;padding:20px;border:1px solid var(--line);border-radius:16px;background:#fff}.history-head{display:flex;justify-content:space-between;align-items:center}.history-head h2{margin:0;font-size:17px}.history-head button{border:0;color:var(--coral);background:transparent;font-size:12px}.history-row{display:grid;grid-template-columns:1fr 1fr auto auto;gap:15px;align-items:center;padding:13px 0;border-bottom:1px solid #edf1f6;font-size:12px}.history-row span,.history-row small{color:var(--muted)}.history-row strong{color:var(--blue);font-size:16px}.match-modal{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:20px;background:#15253b66;opacity:0;pointer-events:none;transition:.2s}.match-modal.is-open{opacity:1;pointer-events:auto}.match-modal-card{position:relative;width:min(440px,100%);padding:30px;border-radius:18px;background:#fff;box-shadow:0 20px 60px #15253b33}.match-modal-card h2{margin:0 0 18px;font-size:25px}.match-modal-card li{margin:12px 0;color:var(--muted);font-size:13px;line-height:1.6}.modal-close{position:absolute;right:15px;top:12px;border:0;color:var(--muted);background:transparent;font-size:24px}@keyframes match-shake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}@keyframes match-pop{from{transform:scale(.92);opacity:.65}to{transform:scale(1);opacity:1}}
body.match-enhanced {
  --game-font: "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --text-main: #263238;
  --text-sub: #667a78;
  --container-bg: rgba(255,255,255,.94);
  --header-bg: rgba(255,249,250,.88);
  --section-bg: #fff8f9;
  --board-bg: #f7fffb;
  --selector-bg: #f2f6f4;
  --selector-active: #ff5d78;
  --selector-active-text: #fff;
  --color-cn-bg: #fff2f5;
  --color-cn-border: #ffb8c5;
  --color-cn-text: #d93653;
  --color-cn-shadow: #ff8fa3;
  --color-en-bg: #ecfbf5;
  --color-en-border: #9ee7cf;
  --color-en-text: #147e68;
  --color-en-shadow: #67d5b5;
  --success-bg: #5b6ee1;
  --success-shadow: #3849b8;
  --bg-gradient: linear-gradient(135deg,#fff7f8 0%,#f2fff8 46%,#f6fbff 100%);
  --title-gradient: linear-gradient(90deg,#ff5d78,#28b795,#ffb84d);
  margin: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--theme-image, none), var(--bg-gradient);
  background-size: 400% 400%;
  background-position: center;
  background-repeat: no-repeat;
  background-blend-mode: soft-light, normal;
  animation: matchGradient 15s ease infinite;
  color: var(--text-main);
  font-family: var(--game-font);
}

body.match-enhanced[data-theme=ocean] {
  --theme-image: url("../assets/images/themes/match-ocean.webp");
  --bg-gradient: linear-gradient(120deg,#8be9ff 0%,#5f8cff 100%);
  --text-main: #1e3a8a;
  --text-sub: #2563eb;
  --section-bg: #f0f9ff;
  --board-bg: #e6fffa;
  --selector-bg: #bee3f8;
  --selector-active: #3182ce;
  --color-cn-bg: #eaf6ff;
  --color-cn-border: #7cc3ff;
  --color-cn-text: #1d4ed8;
  --color-cn-shadow: #3b82f6;
  --color-en-bg: #effdf4;
  --color-en-border: #86efac;
  --color-en-text: #166534;
  --color-en-shadow: #22c55e;
}

body.match-enhanced[data-theme=forest] {
  --theme-image: url("../assets/images/themes/match-forest.webp");
  --bg-gradient: linear-gradient(120deg,#c8f26a 0%,#7fe3a2 100%);
  --text-main: #14532d;
  --text-sub: #16a34a;
  --section-bg: #f0fff4;
  --board-bg: #f0fff4;
  --selector-bg: #c6f6d5;
  --selector-active: #38a169;
  --color-cn-bg: #ecfff4;
  --color-cn-border: #86efac;
  --color-cn-text: #14532d;
  --color-cn-shadow: #22c55e;
  --color-en-bg: #fff9e8;
  --color-en-border: #fcd34d;
  --color-en-text: #92400e;
  --color-en-shadow: #f59e0b;
}

body.match-enhanced[data-theme=candy] { --theme-image: url("../assets/images/themes/match-candy.webp"); }
body.match-enhanced[data-theme=sunset] { --theme-image: url("../assets/images/themes/match-sunset.webp"); --bg-gradient: linear-gradient(120deg,#ffd36b 0%,#ff8f70 100%); --text-main: #9a3412; --text-sub: #ea580c; --section-bg: #fffaf0; --board-bg: #fff5f5; --selector-bg: #feebc8; --selector-active: #dd6b20; }
body.match-enhanced[data-theme=lavender] { --theme-image: url("../assets/images/themes/match-lavender.webp"); --bg-gradient: linear-gradient(135deg,#f6f0ff 0%,#c9d5ff 100%); --text-main: #4c1d95; --text-sub: #7c3aed; --section-bg: #faf5ff; --board-bg: #f3ebf6; --selector-bg: #e9d8fd; --selector-active: #805ad5; }
body.match-enhanced[data-theme=mint] { --theme-image: url("../assets/images/themes/match-mint.webp"); --bg-gradient: linear-gradient(120deg,#8df7bc 0%,#83d8ff 100%); --text-main: #134e4a; --text-sub: #0f766e; --section-bg: #e6fffa; --board-bg: #f0fff4; --selector-bg: #b2f5ea; --selector-active: #319795; }
body.match-enhanced[data-theme=berry] { --theme-image: url("../assets/images/themes/match-berry.webp"); --bg-gradient: linear-gradient(135deg,#ff8fb3 0%,#7c3aed 100%); --text-main: #5b21b6; --text-sub: #be185d; --section-bg: rgba(255,255,255,.72); --board-bg: rgba(255,255,255,.45); --selector-bg: rgba(255,255,255,.72); --selector-active: #be185d; }
body.match-enhanced[data-theme=lemon] { --theme-image: url("../assets/images/themes/match-lemon.webp"); --bg-gradient: linear-gradient(135deg,#fff59d 0%,#7ee0c8 100%); --text-main: #115e59; --text-sub: #0ea5a3; --selector-active: #0f766e; }
body.match-enhanced[data-theme=aurora] { --theme-image: url("../assets/images/themes/match-aurora.webp"); --bg-gradient: linear-gradient(135deg,#9dfcff 0%,#9bffb8 48%,#7c8cff 100%); --text-main: #0f172a; --text-sub: #0f766e; --selector-active: #0f766e; }
body.match-enhanced[data-theme=dark] {
  --theme-image: url("../assets/images/themes/match-dark.webp");
  --bg-gradient: linear-gradient(120deg,#243b55,#141e30);
  --container-bg: rgba(26,32,44,.88);
  --header-bg: rgba(26,32,44,.5);
  --section-bg: #2d3748;
  --board-bg: #1a202c;
  --selector-bg: #4a5568;
  --selector-active: #f6e05e;
  --selector-active-text: #2d3748;
  --text-main: #e2e8f0;
  --text-sub: #a0aec0;
  --color-cn-bg: #3b4758;
  --color-cn-border: #f472b6;
  --color-cn-text: #ffb4c8;
  --color-cn-shadow: #be185d;
  --color-en-bg: #113a63;
  --color-en-border: #38bdf8;
  --color-en-text: #67e8f9;
  --color-en-shadow: #0284c7;
}

.match-app {
  width: 96vw;
  height: 96vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 3px solid rgba(255,255,255,.62);
  border-radius: 24px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
  backdrop-filter: blur(20px);
}

.match-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 24px;
  text-align: center;
  background: var(--header-bg);
  border-bottom: 1px solid rgba(0,0,0,.05);
}

.match-header > div { flex: 1; }
.match-kicker { margin: 0 0 3px; color: var(--text-sub); font-size: 13px; font-weight: 800; }
.match-header h1 {
  margin: 0;
  font-size: clamp(28px,4vw,42px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: 0;
  background: var(--title-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.1));
}
.match-subtitle { margin: 5px 0 0; color: var(--text-sub); font-size: 14px; letter-spacing: 0; }
.match-home {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(0,0,0,.12);
}

.match-controls {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 20px;
  background: var(--section-bg);
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.selector-group { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.selector-label { color: var(--text-sub); font-size: 13px; font-weight: 800; white-space: nowrap; }
.segmented-control { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--selector-bg); box-shadow: inset 0 2px 4px rgba(0,0,0,.04); }
.segmented-control button,
.match-select {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: var(--text-sub);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.segmented-control button { padding: 0 12px; }
.segmented-control button.active { color: var(--selector-active); background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.08); }
body.match-enhanced[data-theme=dark] .segmented-control button.active { color: var(--selector-active-text); background: var(--selector-active); }
.match-select { min-width: 104px; max-width: 184px; padding: 0 24px 0 10px; background: var(--selector-bg); outline: none; }
.progress-mini { min-width: 100px; display: flex; flex-direction: column; gap: 5px; color: var(--text-sub); font-size: 12px; font-weight: 900; }
.progress-mini i { display: block; width: 100%; height: 8px; overflow: hidden; border-radius: 99px; background: rgba(0,0,0,.08); }
.progress-mini b { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg,#ff5d78,#28b795); transition: width .3s ease; }

.match-btn,
.match-icon-btn,
.victory-btn,
.empty-state a {
  border: 0;
  outline: 0;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
  transition: transform .1s, box-shadow .1s, filter .18s;
}
.match-btn:active,
.match-icon-btn:active,
.victory-btn:active,
.empty-state a:active { transform: translateY(4px); box-shadow: 0 0 0 rgba(0,0,0,.18); }
.btn-primary { background: #667eea; }
.btn-warning { background: #ed8936; }
.btn-import { background: #14b8a6; }
.match-icon-btn {
  width: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: var(--text-sub);
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 0 #cbd5e0;
}
.match-icon-btn.speak { color: #fff; background: linear-gradient(135deg,#10b981,#059669); border-color: transparent; box-shadow: 0 4px 0 #047857; }
.match-icon-btn.off { filter: grayscale(.9); opacity: .65; }

.match-board-wrap { position: relative; flex: 1; overflow: hidden; padding: 14px; background: linear-gradient(180deg,rgba(255,255,255,.48),rgba(255,255,255,.12)), var(--board-bg); }
.match-board-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--theme-image);
  background-position: center;
  background-size: cover;
  opacity: .26;
  filter: saturate(1.08);
  pointer-events: none;
}
.board-status { position: absolute; z-index: 4; top: 15px; left: 50%; display: flex; align-items: center; gap: 10px; transform: translateX(-50%); pointer-events: none; }
.board-status span { min-width: 88px; padding: 7px 12px; border-radius: 999px; color: var(--text-sub); background: rgba(255,255,255,.82); box-shadow: 0 4px 12px rgba(0,0,0,.08); font-size: 13px; font-weight: 900; text-align: center; }
.board-status b { color: var(--selector-active); }

.match-board {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  gap: 12px;
  padding: 48px 132px 58px 0;
  grid-template-columns: repeat(var(--cols,4),1fr);
  grid-template-rows: repeat(var(--rows,3),1fr);
}
.match-board.grid-easy { --cols: 4; --rows: 3; }
.match-board.grid-medium { --cols: 4; --rows: 4; }
.match-board.grid-hard { --cols: 6; --rows: 4; }

.match-card {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: clamp(18px,4.1vmin,45px);
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
  user-select: none;
  touch-action: none;
  cursor: pointer;
  transition: transform .1s, box-shadow .1s, filter .16s, opacity .28s;
}
.match-card:hover { transform: translateY(-2px); z-index: 3; }
.match-card:active,
.match-card.selected { transform: translateY(6px) scale(.98); filter: brightness(.95); box-shadow: inset 0 2px 4px rgba(0,0,0,.12) !important; }
.match-card.type-en { color: var(--color-en-text); background: var(--color-en-bg); border-color: var(--color-en-border); box-shadow: 0 6px 0 var(--color-en-shadow), 0 10px 10px rgba(0,0,0,.05); }
.match-card.type-zh { color: var(--color-cn-text); background: var(--color-cn-bg); border-color: var(--color-cn-border); box-shadow: 0 6px 0 var(--color-cn-shadow), 0 10px 10px rgba(0,0,0,.05); }
.card-main { display: block; max-width: 100%; }
.card-meta { display: block; width: 100%; margin-top: 2px; font-family: "Times New Roman", "Cambria", serif; font-size: .36em; font-weight: 800; line-height: 1.1; opacity: .78; }
.card-sound { display: block; margin-top: 2px; font-size: .32em; line-height: 1; opacity: .58; }
.match-card.speaking { border-color: #10b981 !important; box-shadow: 0 0 0 4px rgba(16,185,129,.25), 0 6px 0 var(--color-en-shadow) !important; }
.match-card.wrong { animation: matchShake .4s; background: #fff5f5 !important; border-color: #fc8181 !important; color: #c53030 !important; }
.match-card.matched { color: #fff !important; background: var(--success-bg) !important; border-color: rgba(255,255,255,.82) !important; box-shadow: 0 6px 0 var(--success-shadow), 0 12px 18px rgba(52,73,184,.25) !important; animation: matchOut .42s forwards; pointer-events: none; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 90; min-width: 160px; padding: 12px 18px; border-radius: 999px; color: #fff; background: rgba(17,24,39,.86); box-shadow: 0 10px 28px rgba(0,0,0,.18); text-align: center; font-weight: 900; opacity: 0; transform: translate(-50%,18px); pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.guide-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 8px; border: 0; border-radius: 999px; color: var(--text-main); background: rgba(255,255,255,.9); box-shadow: 0 8px 22px rgba(0,0,0,.14); font-weight: 900; cursor: pointer; }
.guide-float i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--selector-active); font-style: normal; }

.match-modal,
.victory-layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.48); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.match-modal.active,
.victory-layer.active { opacity: 1; pointer-events: auto; }
.match-modal-card,
.victory-card { position: relative; width: min(460px,100%); padding: 28px; border-radius: 18px; border: 1px solid rgba(255,93,120,.16); background: var(--container-bg); color: var(--text-main); box-shadow: 0 24px 60px rgba(255,93,120,.22), 0 10px 28px rgba(38,50,56,.12); transform: scale(.92); transition: transform .28s cubic-bezier(.175,.885,.32,1.275); }
.match-modal.active .match-modal-card,
.victory-layer.active .victory-card { transform: scale(1); }
.match-modal-card h2,
.victory-card h2 { margin: 0 0 14px; font-size: 28px; line-height: 1.2; letter-spacing: 0; }
.match-modal-card section { padding: 13px 0; border-top: 1px dashed rgba(100,116,139,.25); }
.match-modal-card h3 { margin: 0 0 6px; font-size: 16px; }
.match-modal-card p { margin: 0; color: var(--text-sub); font-size: 14px; line-height: 1.7; }
.modal-close { position: absolute; right: 14px; top: 10px; border: 0; background: transparent; color: var(--text-sub); font-size: 28px; cursor: pointer; }
.upload-card { width: min(760px,100%); max-height: 88vh; overflow: auto; }
.upload-tip { margin: 0 0 16px !important; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.paste-box {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 12px;
  border: 2px solid rgba(20,184,166,.2);
  border-radius: 12px;
  outline: none;
  background: rgba(255,255,255,.88);
  color: var(--text-main);
  font: 800 14px/1.6 var(--game-font);
}
.paste-box:focus { border-color: #14b8a6; box-shadow: 0 0 0 4px rgba(20,184,166,.12); }
.upload-review { margin-top: 16px; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--text-sub); font-size: 13px; font-weight: 900; }
.review-head strong { color: var(--selector-active); font-size: 16px; }
.review-table-wrap { max-height: 250px; overflow: auto; border: 1px solid rgba(100,116,139,.18); border-radius: 12px; }
.review-table-wrap table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.72); }
.review-table-wrap th,
.review-table-wrap td { padding: 8px; border-bottom: 1px solid rgba(100,116,139,.14); text-align: left; font-size: 13px; }
.review-table-wrap th { position: sticky; top: 0; background: #f8fafc; color: #64748b; z-index: 1; }
.review-table-wrap input { width: 100%; min-height: 34px; border: 1px solid #dbe8f4; border-radius: 8px; padding: 0 8px; font: 800 13px var(--game-font); }
.upload-status { min-height: 22px; margin-top: 12px !important; color: #0f766e !important; font-weight: 900; }
.library-manager {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(100,116,139,.28);
}
.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.library-head strong { display: block; font-size: 17px; color: var(--text-main); }
.library-head span { display: block; margin-top: 2px; color: var(--text-sub); font-size: 12px; font-weight: 900; }
.library-actions { display: flex; gap: 8px; }
.mini-action {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(100,116,139,.22);
  border-radius: 9px;
  background: #fff;
  color: var(--text-sub);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.mini-action.danger { color: #e11d48; }
.library-list {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 8px;
}
.library-empty {
  margin: 0 !important;
  padding: 12px;
  border-radius: 12px;
  background: rgba(100,116,139,.08);
  color: var(--text-sub) !important;
  font-weight: 800;
}
.library-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(100,116,139,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}
.library-item span { min-width: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.library-item b { color: #0f766e; font-size: 15px; }
.library-item em { color: #e11d48; font-style: normal; font-size: 14px; font-weight: 900; }
.library-item small { color: var(--text-sub); font-family: "Times New Roman", "Cambria", serif; font-weight: 800; }
.library-item button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #fff1f2;
  color: #e11d48;
  font-weight: 900;
  cursor: pointer;
}
.victory-layer { z-index: 120; }
#confettiCanvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.victory-card { text-align: center; background: #fff; }
.victory-card p { margin: 0 0 8px; color: #ff5d78; font-weight: 950; }
.victory-card h2 { margin-bottom: 10px; font-size: clamp(30px,5vw,48px); background: linear-gradient(135deg,#ff5d78,#28b795); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.victory-card span { display: block; margin-bottom: 22px; color: #667a78; font-weight: 900; }
.victory-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin: 0 0 22px;
}
.victory-stats i {
  display: grid;
  gap: 3px;
  padding: 10px 8px;
  border-radius: 12px;
  background: #f8fafc;
  font-style: normal;
}
.victory-stats b { color: #14b8a6; font-size: 20px; line-height: 1; }
.victory-stats span { margin: 0; color: #64748b; font-size: 12px; }
.victory-btn { min-width: 150px; background: linear-gradient(135deg,#ff5d78,#28b795); box-shadow: 0 8px 0 rgba(20,126,104,.45); }
.empty-state { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--text-sub); text-align: center; }
.empty-state b { color: var(--text-main); font-size: 26px; }
.empty-state a { display: inline-flex; align-items: center; text-decoration: none; background: #667eea; }

@keyframes matchGradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes matchShake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes matchOut { 0% { transform: scale(1); opacity: 1; } 45% { transform: scale(1.08); opacity: .95; } 100% { transform: scale(0); opacity: 0; visibility: hidden; } }

@media (max-width: 900px) {
  .match-app { width: 100vw; height: 100vh; border-radius: 0; border-width: 0; }
  .match-header { padding: 12px 14px; }
  .match-home { min-height: 38px; padding: 0 12px; }
  .match-controls { gap: 8px; padding: 10px; }
  .match-btn { padding: 0 13px; }
  .match-board.grid-easy { --cols: 3; --rows: 4; }
  .match-board.grid-hard { --cols: 4; --rows: 6; }
  .match-card { font-size: clamp(16px,5.2vmin,32px); }
}

@media (max-width: 560px) {
  .match-header { align-items: flex-start; text-align: left; }
  .match-subtitle, .match-kicker { display: none; }
  .match-controls { justify-content: flex-start; overflow-y: auto; max-height: 34vh; }
  .selector-group { width: 100%; justify-content: space-between; }
  .segmented-control { flex: 1; }
  .segmented-control button { flex: 1; padding: 0 8px; }
  .match-select { flex: 1; min-width: 0; }
  .progress-mini { width: 100%; }
  .board-status { width: calc(100% - 20px); justify-content: center; gap: 6px; }
  .board-status span { min-width: 0; flex: 1; padding: 6px; font-size: 12px; }
  .match-board { gap: 8px; padding: 42px 0 58px; }
  .match-board.grid-medium { --cols: 4; --rows: 4; }
  .guide-float span { display: none; }
  .guide-float { padding: 0; width: 44px; justify-content: center; }
}

/* Match lab: a two-lane pairing board with an independent classroom-game identity. */
body.match-enhanced .match-board-wrap {
  padding: 68px clamp(16px,3vw,42px) 28px;
}
body.match-enhanced .match-board {
  display: grid;
  grid-template-columns: minmax(0,1fr) 142px minmax(0,1fr);
  grid-template-rows: minmax(0,1fr);
  gap: clamp(12px,2.1vw,28px);
  padding: 0;
}
body.match-enhanced .match-lane {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  gap: 12px;
  padding: 14px;
  border: 3px solid rgba(255,255,255,.76);
  border-radius: 22px;
  background: rgba(255,255,255,.54);
  box-shadow: 0 14px 28px rgba(32,52,81,.13), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
body.match-enhanced .match-lane::after {
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  right:-80px;
  top:-90px;
  border-radius:50%;
  background:rgba(255,255,255,.3);
  pointer-events:none;
}
body.match-enhanced .lane-title {
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:4px 8px;
}
body.match-enhanced .lane-title b { display:block; color:var(--text-main); font-size:18px; line-height:1.1; }
body.match-enhanced .lane-title small { display:block; margin-top:3px; color:var(--text-sub); font-size:12px; font-weight:800; }
body.match-enhanced .lane-mark {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:13px;
  color:#fff;
  background:linear-gradient(145deg,#38bdf8,#2563eb);
  box-shadow:0 5px 0 #1d4ed8;
  font-weight:950;
}
body.match-enhanced .lane-zh .lane-mark { background:linear-gradient(145deg,#fb7185,#e11d48); box-shadow:0 5px 0 #be123c; }
body.match-enhanced .lane-grid {
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(var(--lane-rows,3),minmax(0,1fr));
  gap:clamp(9px,1.25vw,15px);
  min-height:0;
}
body.match-enhanced .grid-medium .lane-grid { --lane-rows:4; }
body.match-enhanced .grid-hard .lane-grid { --lane-rows:6; grid-template-columns:repeat(2,minmax(0,1fr)); }
body.match-enhanced .match-card {
  min-height:0;
  padding:8px;
  border-width:3px;
  border-radius:16px;
  font-size:clamp(18px,2.45vw,34px);
  box-shadow:0 7px 0 var(--color-en-shadow),0 12px 18px rgba(0,0,0,.1);
}
body.match-enhanced .lane-zh .match-card { box-shadow:0 7px 0 var(--color-cn-shadow),0 12px 18px rgba(0,0,0,.1); }
body.match-enhanced .match-card.selected { outline:5px solid rgba(255,209,102,.85); outline-offset:2px; transform:translateY(5px) scale(.98); }
body.match-enhanced .match-card.matched {
  animation:matchLabResolved .48s ease forwards;
  background:linear-gradient(135deg,#16a34a,#14b8a6)!important;
  box-shadow:0 7px 0 #0f766e,0 12px 18px rgba(20,120,104,.25)!important;
}
body.match-enhanced .pair-console {
  position:relative;
  align-self:center;
  display:grid;
  place-items:center;
  align-content:center;
  gap:7px;
  min-height:226px;
  padding:18px 8px;
  border:4px solid rgba(255,255,255,.86);
  border-radius:28px;
  color:#17233d;
  background:linear-gradient(160deg,rgba(255,250,226,.95),rgba(221,245,255,.92));
  box-shadow:0 13px 0 rgba(33,65,97,.17),0 18px 30px rgba(32,52,81,.14);
  text-align:center;
  overflow:hidden;
}
body.match-enhanced .pair-icon { position:relative; z-index:1; display:grid; place-items:center; width:58px; height:58px; border:5px solid #fff; border-radius:20px; color:#fff; background:linear-gradient(145deg,#ffb300,#f97316); box-shadow:0 6px 0 #d97706; font-size:35px; font-weight:950; line-height:1; }
body.match-enhanced .pair-console>b { position:relative; z-index:1; font-size:17px; }
body.match-enhanced .pair-console>small { position:relative; z-index:1; color:#64748b; font-size:12px; font-weight:900; }
body.match-enhanced .pair-count { position:relative; z-index:1; display:flex; align-items:baseline; gap:2px; margin-top:5px; }
body.match-enhanced .pair-count strong { color:#ea580c; font-size:34px; line-height:1; }
body.match-enhanced .pair-count span { color:#64748b; font-size:14px; font-weight:950; }
body.match-enhanced .pair-orbit { position:absolute; width:170px; height:170px; border:2px dashed rgba(37,99,235,.2); border-radius:50%; }
body.match-enhanced .orbit-one { top:-95px; left:-88px; }
body.match-enhanced .orbit-two { right:-104px; bottom:-100px; border-color:rgba(225,29,72,.18); }
@keyframes matchLabResolved { 0% { transform:scale(1); } 45% { transform:scale(1.08) rotate(-2deg); opacity:1; } 100% { transform:scale(.78); opacity:0; visibility:hidden; } }

@media (max-width:900px) {
  body.match-enhanced .match-board-wrap { overflow:auto; padding:64px 14px 20px; }
  body.match-enhanced .match-board { min-height:640px; grid-template-columns:minmax(0,1fr) 104px minmax(0,1fr); gap:10px; }
  body.match-enhanced .match-lane { padding:10px; border-radius:18px; }
  body.match-enhanced .lane-title { gap:7px; padding:2px; }
  body.match-enhanced .lane-title b { font-size:15px; }
  body.match-enhanced .lane-title small { display:none; }
  body.match-enhanced .lane-mark { width:32px; height:32px; border-radius:11px; }
  body.match-enhanced .pair-console { min-height:180px; border-radius:22px; }
  body.match-enhanced .pair-icon { width:48px; height:48px; border-radius:16px; font-size:30px; }
  body.match-enhanced .pair-console>b { font-size:14px; }
  body.match-enhanced .pair-console>small { font-size:10px; }
}
@media (max-width:560px) {
  body.match-enhanced .match-board-wrap { padding:50px 10px 14px; }
  body.match-enhanced .match-board { min-height:720px; grid-template-columns:1fr; grid-template-rows:minmax(270px,1fr) 92px minmax(270px,1fr); gap:9px; }
  body.match-enhanced .match-lane { padding:9px; }
  body.match-enhanced .lane-grid { gap:8px; }
  body.match-enhanced .match-card { min-height:58px; border-radius:13px; font-size:clamp(16px,6vw,25px); }
  body.match-enhanced .pair-console { min-height:0; grid-template-columns:auto auto auto; gap:7px; padding:8px 12px; border-radius:18px; }
  body.match-enhanced .pair-icon { width:34px; height:34px; border-width:3px; border-radius:11px; font-size:22px; box-shadow:0 3px 0 #d97706; }
  body.match-enhanced .pair-console>b { font-size:14px; }
  body.match-enhanced .pair-console>small { display:none; }
  body.match-enhanced .pair-count { margin:0; }
  body.match-enhanced .pair-count strong { font-size:25px; }
  body.match-enhanced .pair-orbit { display:none; }
}

body.dictation-enhanced {
  --dt-bg: linear-gradient(135deg,#d9f8fa 0%,#ffe8d1 55%,#fff4a8 100%);
  --dt-image: url("../assets/images/themes/match-candy.webp");
  --dt-app: #fffef8;
  --dt-main: #24323f;
  --dt-soft: #65737f;
  --dt-primary: #2f80ed;
  --dt-secondary: #00a676;
  --dt-accent: #ffcf4a;
  --dt-border: #2d3436;
  --dt-shadow: rgba(0,0,0,.2);
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image:
    linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.34)),
    var(--dt-image),
    var(--dt-bg);
  background-size: cover, cover, 400% 400%;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--dt-main);
  font-family: "Trebuchet MS", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

body.dictation-enhanced[data-theme=candy] { --dt-image: url("../assets/images/themes/match-candy.webp"); }
body.dictation-enhanced[data-theme=ocean] { --dt-image: url("../assets/images/themes/match-ocean.webp"); --dt-bg: linear-gradient(135deg,#d9f8fa 0%,#a8e6ff 48%,#fff4a8 100%); --dt-app:rgba(255,254,248,.92); --dt-primary:#2f80ed; --dt-secondary:#00a676; --dt-accent:#ffcf4a; }
body.dictation-enhanced[data-theme=forest] { --dt-image: url("../assets/images/themes/match-forest.webp"); --dt-bg: linear-gradient(135deg,#dbf4c7 0%,#a7e8bd 45%,#f9e79f 100%); --dt-app:rgba(252,255,247,.92); --dt-primary:#2d9c71; --dt-secondary:#f2994a; --dt-accent:#56ccf2; }
body.dictation-enhanced[data-theme=sunset] { --dt-image: url("../assets/images/themes/match-sunset.webp"); --dt-bg: linear-gradient(135deg,#ffe0d3 0%,#ffb8a3 45%,#fff2b2 100%); --dt-app:rgba(255,252,248,.92); --dt-primary:#f15a5a; --dt-secondary:#2bae8b; --dt-accent:#ffd166; }
body.dictation-enhanced[data-theme=lavender] { --dt-image: url("../assets/images/themes/match-lavender.webp"); --dt-bg: linear-gradient(135deg,#f3d9ff 0%,#d8dcff 55%,#fff4ff 100%); --dt-app:rgba(255,249,254,.92); --dt-primary:#805ad5; --dt-secondary:#00b4d8; --dt-accent:#fee440; }
body.dictation-enhanced[data-theme=mint] { --dt-image: url("../assets/images/themes/match-mint.webp"); --dt-bg: linear-gradient(135deg,#d7fff1 0%,#9ff3d0 45%,#a8e6ff 100%); --dt-app:rgba(248,255,252,.92); --dt-primary:#319795; --dt-secondary:#2d9c71; --dt-accent:#ffd166; }
body.dictation-enhanced[data-theme=berry] { --dt-image: url("../assets/images/themes/match-berry.webp"); --dt-bg: linear-gradient(135deg,#f3d9ff 0%,#ffd6e8 50%,#d7f8c7 100%); --dt-app:rgba(255,249,254,.92); --dt-primary:#9b5de5; --dt-secondary:#00b4d8; --dt-accent:#fee440; }
body.dictation-enhanced[data-theme=lemon] { --dt-image: url("../assets/images/themes/match-lemon.webp"); --dt-bg: linear-gradient(135deg,#fff2b2 0%,#ffcf8a 45%,#a8e6ff 100%); --dt-app:rgba(255,253,244,.92); --dt-primary:#f2a900; --dt-secondary:#2f80ed; --dt-accent:#ff6b6b; }
body.dictation-enhanced[data-theme=aurora] { --dt-image: url("../assets/images/themes/match-aurora.webp"); --dt-bg: linear-gradient(135deg,#9dfcff 0%,#9bffb8 48%,#c9d5ff 100%); --dt-app:rgba(249,255,255,.9); --dt-primary:#0f766e; --dt-secondary:#667eea; --dt-accent:#ffcf4a; }
body.dictation-enhanced[data-theme=dark] { --dt-image: url("../assets/images/themes/match-dark.webp"); --dt-bg: linear-gradient(135deg,#243b55,#141e30); --dt-app:rgba(255,255,255,.88); --dt-primary:#4056d6; --dt-secondary:#0f766e; --dt-accent:#ffd166; }

.dictation-app {
  width: 95vw;
  height: 95vh;
  position: relative;
  overflow: auto;
  display: flex;
  flex-direction: column;
  padding: clamp(14px,2.1vw,24px);
  border: 4px solid var(--dt-border);
  border-radius: 24px;
  background: var(--dt-app);
  backdrop-filter: blur(12px);
  box-shadow: 12px 12px 0 var(--dt-shadow);
}

.dictation-app h1 {
  flex: 0 0 auto;
  margin: 0 0 14px;
  color: var(--dt-primary);
  font-size: clamp(28px,4.2vw,54px);
  line-height: 1.05;
  text-align: center;
  letter-spacing: 0;
  text-shadow: 3px 3px 0 rgba(0,0,0,.1);
}

.dictation-toolbar {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.dt-btn,
.dt-home,
.dt-mode button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border: 2px solid var(--dt-border);
  border-radius: 12px;
  background: #fff;
  color: var(--dt-main);
  box-shadow: 3px 3px 0 var(--dt-border);
  font: 900 14px/1.2 inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .15s;
}

.dt-btn:active,
.dt-home:active,
.dt-mode button:active,
.dt-sound:active,
.dt-eye:active,
.dt-letter:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--dt-border); }
.dt-btn.primary { color: #fff; background: var(--dt-primary); }
.dt-btn.secondary { color: #fff; background: var(--dt-secondary); }
.dt-btn.active { color: #fff; background: var(--dt-secondary); }
.dt-btn.muted { opacity: .58; filter: grayscale(1); }

.dt-mode {
  display: inline-flex;
  gap: 0;
  padding: 4px;
  border: 2px solid var(--dt-border);
  border-radius: 14px;
  background: #f1f2f6;
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.08);
}
.dt-mode button { min-height: 34px; border: 0; box-shadow: none; background: transparent; }
.dt-mode button.active { color: #fff; background: var(--dt-primary); box-shadow: 2px 2px 0 var(--dt-border); }

.dt-themes { display: inline-flex; gap: 8px; align-items: center; }
.dt-themes button {
  width: 30px;
  height: 30px;
  border: 2px solid var(--dt-border);
  border-radius: 50%;
  box-shadow: 2px 2px 0 var(--dt-border);
  cursor: pointer;
}
.dt-themes button.active { outline: 3px solid rgba(47,128,237,.25); transform: translateY(-2px); }
.dt-themes [data-theme=candy] { background-image: url("../assets/images/themes/match-candy.webp"); }
.dt-themes [data-theme=ocean] { background-image: url("../assets/images/themes/match-ocean.webp"); }
.dt-themes [data-theme=forest] { background-image: url("../assets/images/themes/match-forest.webp"); }
.dt-themes [data-theme=sunset] { background-image: url("../assets/images/themes/match-sunset.webp"); }
.dt-themes [data-theme=lavender] { background-image: url("../assets/images/themes/match-lavender.webp"); }
.dt-themes [data-theme=mint] { background-image: url("../assets/images/themes/match-mint.webp"); }
.dt-themes [data-theme=berry] { background-image: url("../assets/images/themes/match-berry.webp"); }
.dt-themes [data-theme=lemon] { background-image: url("../assets/images/themes/match-lemon.webp"); }
.dt-themes [data-theme=aurora] { background-image: url("../assets/images/themes/match-aurora.webp"); }
.dt-themes [data-theme=dark] { background-image: url("../assets/images/themes/match-dark.webp"); }
.dt-themes button { background-size: cover; background-position: center; }

.dt-timer {
  min-width: 84px;
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 2px solid var(--dt-border);
  border-radius: 12px;
  background: var(--dt-main);
  color: #fff;
  box-shadow: 3px 3px 0 var(--dt-border);
  font-weight: 950;
}

.dictation-game {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.45);
}

.dt-overlay {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 8;
  min-width: min(420px,86%);
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 2px solid var(--dt-border);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--dt-primary);
  font-size: clamp(20px,3vw,36px);
  font-weight: 950;
  text-align: center;
  box-shadow: 4px 4px 0 var(--dt-border);
  transform: translate(-50%,-50%);
  cursor: pointer;
}
.dictation-game.need-start { animation: dtShake .42s; }
.dictation-game.active .dt-overlay { display: none; }

.dt-progress {
  flex: 0 0 auto;
  display: grid;
  gap: 8px;
  justify-items: center;
  color: var(--dt-soft);
  font-size: 20px;
  font-weight: 950;
}
.dt-progress i { width: min(560px,80vw); height: 12px; overflow: hidden; border: 2px solid var(--dt-border); border-radius: 999px; background: #fff; box-shadow: 2px 2px 0 var(--dt-border); }
.dt-progress b { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg,var(--dt-primary),var(--dt-secondary),var(--dt-accent)); transition: width .25s ease; }

.dt-prompt-card {
  width: min(720px,100%);
  min-height: clamp(112px,20vh,190px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  gap: 14px;
  padding: clamp(14px,2.2vw,26px);
  border: 3px solid var(--dt-border);
  border-radius: 24px;
  background: #fff;
  box-shadow: 7px 7px 0 var(--dt-border);
}

.dt-sound,
.dt-eye {
  width: 54px;
  height: 54px;
  border: 2px solid var(--dt-border);
  border-radius: 50%;
  background: #fff;
  color: var(--dt-main);
  box-shadow: 3px 3px 0 var(--dt-border);
  font-weight: 950;
  cursor: pointer;
}
.dt-sound { color: #fff; background: var(--dt-primary); }
.dt-eye.active { color: #fff; background: var(--dt-secondary); }
.dt-cn {
  min-width: 0;
  color: var(--dt-main);
  font-size: clamp(30px,6vw,70px);
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  overflow-wrap: anywhere;
}
.dt-cn.hidden { color: transparent; text-shadow: 0 0 12px rgba(36,50,63,.28); }

.dt-slots,
.dt-letters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(7px,1vw,12px);
}
.dt-slots {
  min-height: clamp(62px,11vh,100px);
  padding: 12px;
  border: 2px solid var(--dt-border);
  border-radius: 18px;
  background: #f1f2f6;
  box-shadow: inset 4px 4px 0 rgba(0,0,0,.1);
}
.dt-slots.correct { animation: dtPop .35s; background: rgba(0,166,118,.14); }
.dt-slots.wrong { animation: dtShake .38s; background: rgba(255,107,107,.14); }
.dt-slot,
.dt-letter {
  width: clamp(38px,6.4vmin,66px);
  height: clamp(44px,7vmin,72px);
  display: grid;
  place-items: center;
  border: 2px solid var(--dt-border);
  border-radius: 12px;
  background: #fff;
  color: var(--dt-main);
  box-shadow: 3px 3px 0 var(--dt-border);
  font-size: clamp(24px,4.8vmin,44px);
  font-weight: 950;
  text-transform: none;
  cursor: pointer;
}
.dt-slot:not(.filled) { background: rgba(255,255,255,.45); box-shadow: inset 3px 3px 0 rgba(0,0,0,.08); }
.dt-letter { background: var(--dt-accent); }
.dt-letter.used { visibility: hidden; pointer-events: none; }

.dt-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.dt-actions,
.dt-stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dt-stats span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 2px solid var(--dt-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--dt-border);
  color: var(--dt-soft);
  font-weight: 950;
}
.dt-stats b { color: var(--dt-primary); font-size: 20px; }

.dt-modal,
.dt-victory {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20,18,60,.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.dt-modal.active,
.dt-victory.active { opacity: 1; pointer-events: auto; }
.dt-modal-card,
.dt-victory-card {
  position: relative;
  width: min(760px,100%);
  max-height: 88vh;
  overflow: auto;
  padding: clamp(22px,3vw,34px);
  border: 3px solid var(--dt-border);
  border-radius: 24px;
  background: var(--dt-app);
  color: var(--dt-main);
  box-shadow: 10px 10px 0 var(--dt-border);
}
.dt-modal-card h2,
.dt-victory-card h2 { margin: 0 0 16px; font-size: clamp(26px,4vw,44px); letter-spacing: 0; }
.dt-modal-card section { padding: 13px 0; border-top: 2px dashed rgba(45,52,54,.18); }
.dt-modal-card h3 { margin: 0 0 6px; font-size: 17px; }
.dt-modal-card p { margin: 0; color: var(--dt-soft); line-height: 1.7; font-size: 14px; }
.dt-manager { width: min(880px,100%); }
.dt-manager-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.dt-manager-row label { display: inline-flex; align-items: center; gap: 8px; color: var(--dt-soft); font-weight: 950; }
.dt-manager-row select {
  min-height: 42px;
  border: 2px solid var(--dt-border);
  border-radius: 12px;
  background: #fff;
  color: var(--dt-main);
  box-shadow: 3px 3px 0 var(--dt-border);
  font: 900 14px inherit;
}
.dt-victory { z-index: 140; }
.dt-victory-card { width: min(520px,100%); text-align: center; background: #fff; }
.dt-victory-card p { margin: 0 0 8px; color: var(--dt-secondary); font-weight: 950; }
.dt-victory-card span { display: block; margin-bottom: 18px; color: var(--dt-soft); font-weight: 900; }
.dt-victory-btn {
  min-height: 48px;
  padding: 0 28px;
  border: 2px solid var(--dt-border);
  border-radius: 14px;
  background: var(--dt-primary);
  color: #fff;
  box-shadow: 4px 4px 0 var(--dt-border);
  font: 950 16px inherit;
  cursor: pointer;
}

body.dictation-enhanced .guide-float {
  right: 18px;
  bottom: 16px;
  color: var(--dt-main);
  border: 2px solid var(--dt-border);
  background: #fff;
  box-shadow: 4px 4px 0 var(--dt-border);
}
body.dictation-enhanced .guide-float i { background: var(--dt-primary); color: #fff; }

@keyframes dtShake { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
@keyframes dtPop { from { transform: scale(.98); } 60% { transform: scale(1.03); } to { transform: scale(1); } }

@media (max-width: 760px) {
  .dictation-app { width: 100vw; height: 100vh; border-radius: 0; border-width: 0; box-shadow: none; }
  .dictation-toolbar { justify-content: flex-start; max-height: 30vh; overflow: auto; }
  .dictation-game { padding: 10px; }
  .dt-prompt-card { grid-template-columns: 48px 1fr 48px; gap: 8px; border-radius: 18px; box-shadow: 5px 5px 0 var(--dt-border); }
  .dt-sound, .dt-eye { width: 44px; height: 44px; }
  .dt-footer { align-items: stretch; flex-direction: column; }
  .dt-actions, .dt-stats { justify-content: center; }
}

@media (max-width: 480px) {
  .dictation-app h1 { font-size: 28px; }
  .dt-btn, .dt-home, .dt-mode button { min-height: 38px; padding: 7px 10px; font-size: 12px; }
  .dt-mode { width: 100%; }
  .dt-mode button { flex: 1; }
  .dt-timer { min-height: 38px; }
  .dt-cn { font-size: 34px; }
  .dt-slot, .dt-letter { width: 34px; height: 40px; font-size: 22px; border-radius: 9px; }
}

body.hanmai-enhanced {
  --hm-font-size: 14cqw;
  --hm-image: url("../assets/images/themes/match-dark.webp");
  --hm-primary: #20d6a5;
  --hm-secondary: #ffd166;
  --hm-primary-rgb: 32,214,165;
  --hm-secondary-rgb: 255,209,102;
  --hm-bg: #07120f;
  --hm-panel: rgba(9,20,24,.72);
  --hm-panel-soft: rgba(9,20,24,.48);
  --hm-text: #fff;
  --hm-muted: #9fb6ad;
  --hm-border: rgba(255,255,255,.22);
  --dt-app: #fffef8;
  --dt-main: #24323f;
  --dt-soft: #65737f;
  --dt-border: #2d3436;
  --dt-primary: var(--hm-primary);
  --dt-secondary: var(--hm-secondary);
  --dt-accent: var(--hm-secondary);
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--hm-text);
  font-family: "Trebuchet MS", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 15%,rgba(var(--hm-primary-rgb),.22),transparent 28%),
    radial-gradient(circle at 80% 80%,rgba(var(--hm-secondary-rgb),.18),transparent 32%),
    linear-gradient(180deg,rgba(0,0,0,.48),rgba(0,0,0,.72)),
    var(--hm-image),
    var(--hm-bg);
  background-size: auto, auto, auto, cover, auto;
  background-position: center;
}
body.hanmai-enhanced[data-theme=candy] { --hm-image:url("../assets/images/themes/match-candy.webp"); --hm-primary:#ff5d8f; --hm-secondary:#20d6a5; --hm-primary-rgb:255,93,143; --hm-secondary-rgb:32,214,165; }
body.hanmai-enhanced[data-theme=ocean] { --hm-image:url("../assets/images/themes/match-ocean.webp"); --hm-primary:#3a86ff; --hm-secondary:#ffb703; --hm-primary-rgb:58,134,255; --hm-secondary-rgb:255,183,3; }
body.hanmai-enhanced[data-theme=forest] { --hm-image:url("../assets/images/themes/match-forest.webp"); --hm-primary:#7ac74f; --hm-secondary:#ffd166; --hm-primary-rgb:122,199,79; --hm-secondary-rgb:255,209,102; }
body.hanmai-enhanced[data-theme=sunset] { --hm-image:url("../assets/images/themes/match-sunset.webp"); --hm-primary:#f77f00; --hm-secondary:#8338ec; --hm-primary-rgb:247,127,0; --hm-secondary-rgb:131,56,236; }
body.hanmai-enhanced[data-theme=lavender] { --hm-image:url("../assets/images/themes/match-lavender.webp"); --hm-primary:#c084fc; --hm-secondary:#34d399; --hm-primary-rgb:192,132,252; --hm-secondary-rgb:52,211,153; }
body.hanmai-enhanced[data-theme=mint] { --hm-image:url("../assets/images/themes/match-mint.webp"); --hm-primary:#20d6a5; --hm-secondary:#ffd166; --hm-primary-rgb:32,214,165; --hm-secondary-rgb:255,209,102; }
body.hanmai-enhanced[data-theme=berry] { --hm-image:url("../assets/images/themes/match-berry.webp"); --hm-primary:#8b5cf6; --hm-secondary:#b6f63c; --hm-primary-rgb:139,92,246; --hm-secondary-rgb:182,246,60; }
body.hanmai-enhanced[data-theme=lemon] { --hm-image:url("../assets/images/themes/match-lemon.webp"); --hm-primary:#facc15; --hm-secondary:#38bdf8; --hm-primary-rgb:250,204,21; --hm-secondary-rgb:56,189,248; }
body.hanmai-enhanced[data-theme=aurora] { --hm-image:url("../assets/images/themes/match-aurora.webp"); --hm-primary:#00d9ff; --hm-secondary:#ff3df2; --hm-primary-rgb:0,217,255; --hm-secondary-rgb:255,61,242; }
body.hanmai-enhanced[data-theme=dark] { --hm-image:url("../assets/images/themes/match-dark.webp"); }

.hanmai-app {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.02)),
    linear-gradient(120deg,rgba(var(--hm-primary-rgb),.08),rgba(var(--hm-secondary-rgb),.06));
}
.hm-header {
  flex: 0 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(var(--hm-primary-rgb),.34);
  border-radius: 16px;
  background: linear-gradient(90deg,rgba(var(--hm-primary-rgb),.14),rgba(var(--hm-secondary-rgb),.1));
  box-shadow: 0 0 18px rgba(var(--hm-primary-rgb),.16), inset 0 0 12px rgba(255,255,255,.04);
}
.hm-logo {
  flex: 0 0 auto;
  color: var(--hm-secondary);
  font-size: clamp(20px,3vw,34px);
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 14px rgba(var(--hm-secondary-rgb),.48);
}
.hm-toolbar {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.hm-btn,
.hm-range {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(var(--hm-primary-rgb),.36);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: var(--hm-text);
  box-shadow: 0 0 10px rgba(var(--hm-primary-rgb),.1), inset 0 0 8px rgba(255,255,255,.04);
  font: 900 13px/1.2 inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.hm-btn.primary { color: #06120f; background: var(--hm-primary); border-color: transparent; box-shadow: 0 0 20px rgba(var(--hm-primary-rgb),.45); }
.hm-btn.muted { opacity: .58; filter: grayscale(1); }
.hm-range { cursor: default; }
.hm-range input { width: 94px; accent-color: var(--hm-primary); }
.hm-speed-tabs {
  min-height: 40px;
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(var(--hm-primary-rgb),.36);
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 10px rgba(var(--hm-primary-rgb),.1), inset 0 0 8px rgba(255,255,255,.04);
}
.hm-speed-tabs button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: var(--hm-text);
  background: transparent;
  font: 950 12px/1.1 inherit;
  white-space: nowrap;
  cursor: pointer;
}
.hm-speed-tabs button.active {
  color: #06120f;
  background: var(--hm-secondary);
  box-shadow: 0 0 16px rgba(var(--hm-secondary-rgb),.42);
}

.hm-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 16px;
}
.hm-top-row {
  flex: 0 0 clamp(104px,20vh,170px);
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
}
.hm-cn-card,
.hm-en-card {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--hm-border);
  border-radius: 16px;
  background: var(--hm-panel);
  box-shadow: 0 0 12px rgba(var(--hm-primary-rgb),.18), inset 0 0 10px rgba(var(--hm-secondary-rgb),.08);
  text-align: center;
  overflow-wrap: anywhere;
}
.hm-cn-card {
  color: #d7fff4;
  font-size: clamp(22px,4vw,58px);
  font-weight: 950;
}
.hm-cn-card.active {
  color: #08120f;
  background: linear-gradient(135deg,var(--hm-primary),var(--hm-secondary));
  transform: translateY(-4px);
  box-shadow: 0 0 26px rgba(var(--hm-primary-rgb),.58), inset 0 0 14px rgba(255,255,255,.22);
}
.hm-bottom-area {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr minmax(220px,28vw) 1fr;
  gap: 18px;
  align-items: stretch;
}
.hm-bottom-col {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  min-width: 0;
}
.hm-en-card {
  container-type: inline-size;
  color: rgba(255,255,255,.28);
  background: var(--hm-panel-soft);
}
.hm-en-card span {
  max-width: 100%;
  font-size: var(--hm-font-size);
  font-weight: 950;
  line-height: .95;
  text-transform: none;
  letter-spacing: 0;
  filter: drop-shadow(0 0 12px rgba(var(--hm-primary-rgb),.2));
}
.hm-en-card.active {
  color: #fff;
  border-color: rgba(var(--hm-secondary-rgb),.78);
  background:
    radial-gradient(circle at center,rgba(var(--hm-secondary-rgb),.18),transparent 60%),
    linear-gradient(135deg,rgba(var(--hm-primary-rgb),.5),rgba(var(--hm-secondary-rgb),.28));
  box-shadow: 0 0 30px rgba(var(--hm-primary-rgb),.62), inset 0 0 28px rgba(var(--hm-secondary-rgb),.28);
  animation: hmCardHit .42s ease;
}
.hm-bottom-area.two-cards #hmEn2,
.hm-bottom-area.two-cards #hmEn3 { opacity: .12; }
.hm-mic-zone {
  min-width: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  border-radius: 20px;
  background: radial-gradient(circle,rgba(var(--hm-primary-rgb),.11),rgba(255,255,255,.035) 58%,transparent 70%);
}
.hm-wave {
  height: 86px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hm-wave i {
  width: 10px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg,var(--hm-secondary),var(--hm-primary));
  box-shadow: 0 0 16px rgba(var(--hm-primary-rgb),.56);
  animation: hmEqualizer 1s ease-in-out infinite;
  animation-play-state: paused;
}
.hm-wave i:nth-child(2) { animation-delay: .1s; }
.hm-wave i:nth-child(3) { animation-delay: .2s; }
.hm-wave i:nth-child(4) { animation-delay: .32s; }
.hm-wave i:nth-child(5) { animation-delay: .44s; }
.hm-wave.playing i { animation-play-state: running; }
.hm-mic {
  width: clamp(96px,16vw,170px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06120f;
  background: radial-gradient(circle at 35% 25%,#fff,var(--hm-secondary) 32%,var(--hm-primary) 100%);
  box-shadow: 0 0 34px rgba(var(--hm-primary-rgb),.62), inset -12px -16px 20px rgba(0,0,0,.18);
  font-size: clamp(28px,5vw,62px);
  font-weight: 950;
}
.hm-mic.pulse { animation: hmMicPulse .36s ease; }
.hm-progress {
  min-width: min(230px,100%);
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 14px 20px;
  border: 1px solid rgba(var(--hm-primary-rgb),.32);
  border-radius: 14px;
  background: rgba(0,0,0,.35);
  box-shadow: inset 0 0 12px rgba(var(--hm-primary-rgb),.12);
}
.hm-progress span { color: var(--hm-muted); font-size: 13px; font-weight: 900; }
.hm-progress b { color: var(--hm-secondary); font-size: clamp(24px,3vw,40px); line-height: 1; }
.hm-coach {
  min-height: 42px;
  display: grid;
  place-items: center;
  padding: 0 18px;
  border-radius: 999px;
  color: #06120f;
  background: var(--hm-secondary);
  font-weight: 950;
  box-shadow: 0 0 18px rgba(var(--hm-secondary-rgb),.44);
}

.hm-countdown {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0,0,0,.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.hm-countdown.active { opacity: 1; pointer-events: auto; }
.hm-countdown > div { width: min(760px,100%); display: grid; gap: 24px; justify-items: center; }
.hm-countdown strong { color: #fff; font-size: clamp(28px,5vw,58px); text-align: center; }
.hm-countdown i { width: 100%; height: 20px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: inset 0 0 10px rgba(0,0,0,.5); }
.hm-countdown b { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--hm-primary),var(--hm-secondary)); box-shadow: 0 0 18px var(--hm-primary); }

.hm-setting-grid,
.hm-theme-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}
.hm-option,
.hm-theme-choice {
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 2px solid var(--dt-border);
  border-radius: 14px;
  background: #fff;
  color: var(--dt-main);
  box-shadow: 4px 4px 0 var(--dt-border);
  font: 950 14px/1.35 inherit;
  cursor: pointer;
}
.hm-option.active,
.hm-theme-choice.active { color: #fff; background: var(--dt-primary); }
.hm-number { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: var(--dt-soft); font-weight: 950; }
.hm-number input { width: 90px; min-height: 40px; border: 2px solid var(--dt-border); border-radius: 10px; padding: 0 10px; font: 900 15px inherit; }
.hm-format-help {
  display: grid;
  gap: 7px;
  margin: 10px 0 12px;
  padding: 13px 14px;
  border: 2px solid rgba(45,52,54,.16);
  border-radius: 14px;
  background: #f8fafc;
  color: #24323f;
}
.hm-format-help b { font-size: 15px; }
.hm-format-help span { color: #536273; font-size: 13px; font-weight: 800; }
.hm-format-help code {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  color: #101828;
  font: 800 14px/1.7 "Microsoft YaHei", "PingFang SC", monospace;
  user-select: text;
}
.hm-paste-box,
body.hanmai-enhanced .paste-box {
  color: #101828;
  background: #fff;
  caret-color: #101828;
  border-color: rgba(32,214,165,.32);
  user-select: text;
}
body.hanmai-enhanced .paste-box::placeholder { color: #667085; opacity: 1; }
body.hanmai-enhanced .mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #24323f;
  background: #fff;
  border-color: #d0d5dd;
}
body.hanmai-enhanced .mini-action.danger { color: #e11d48; background: #fff1f2; }

body.arcade-enhanced {
  --arcade-bg: url("../assets/images/themes/match-candy.webp");
  --arcade-main: #3554d1;
  --arcade-hot: #ff5d78;
  --arcade-good: #20b486;
  --arcade-warn: #ffb703;
  --arcade-ink: #102033;
  --arcade-panel: rgba(255,255,255,.88);
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--arcade-ink);
  background:
    linear-gradient(120deg, rgba(255,255,255,.35), rgba(255,255,255,.12)),
    var(--arcade-bg) center/cover no-repeat;
  font-family: "HarmonyOS Sans SC", "MiSans", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
body.arcade-enhanced[data-theme=ocean] { --arcade-bg: url("../assets/images/themes/match-ocean.webp"); --arcade-main:#2563eb; --arcade-hot:#f59e0b; --arcade-good:#16a34a; }
body.arcade-enhanced[data-theme=forest] { --arcade-bg: url("../assets/images/themes/match-forest.webp"); --arcade-main:#15803d; --arcade-hot:#f97316; --arcade-good:#0f766e; }
body.arcade-enhanced[data-theme=sunset] { --arcade-bg: url("../assets/images/themes/match-sunset.webp"); --arcade-main:#ea580c; --arcade-hot:#7c3aed; --arcade-good:#059669; }
body.arcade-enhanced[data-theme=lavender] { --arcade-bg: url("../assets/images/themes/match-lavender.webp"); --arcade-main:#7c3aed; --arcade-hot:#ec4899; --arcade-good:#0d9488; }
body.arcade-enhanced[data-theme=mint] { --arcade-bg: url("../assets/images/themes/match-mint.webp"); --arcade-main:#0f766e; --arcade-hot:#f43f5e; --arcade-good:#16a34a; }
body.arcade-enhanced[data-theme=berry] { --arcade-bg: url("../assets/images/themes/match-berry.webp"); --arcade-main:#9333ea; --arcade-hot:#db2777; --arcade-good:#65a30d; }
body.arcade-enhanced[data-theme=lemon] { --arcade-bg: url("../assets/images/themes/match-lemon.webp"); --arcade-main:#0f766e; --arcade-hot:#eab308; --arcade-good:#22c55e; }
body.arcade-enhanced[data-theme=aurora] { --arcade-bg: url("../assets/images/themes/match-aurora.webp"); --arcade-main:#0891b2; --arcade-hot:#c026d3; --arcade-good:#16a34a; }
body.arcade-enhanced[data-theme=dark] { --arcade-bg: url("../assets/images/themes/match-dark.webp"); --arcade-main:#38bdf8; --arcade-hot:#fb7185; --arcade-good:#34d399; --arcade-ink:#eef7ff; --arcade-panel:rgba(12,18,32,.78); }
.arcade-app {
  width: min(1500px, 96vw);
  height: 96vh;
  margin: 2vh auto;
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,.58);
  border-radius: 26px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 24px 70px rgba(16,32,51,.26);
  backdrop-filter: blur(18px);
}
.arcade-header {
  min-height: 94px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 22px;
  background: rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(16,32,51,.08);
}
body.arcade-enhanced[data-theme=dark] .arcade-header { background: rgba(12,18,32,.56); }
.arcade-home,
.arcade-actions button,
.arcade-toolbar button,
.stage-actions button,
.speak-mini {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  color: var(--arcade-ink);
  background: rgba(255,255,255,.82);
  font: 900 13px/1 inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(16,32,51,.12);
}
.arcade-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.arcade-title { display: flex; align-items: center; justify-content: center; gap: 16px; text-align: left; }
.arcade-title > span {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--arcade-main), var(--arcade-hot));
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(16,32,51,.24), inset 0 -8px 14px rgba(0,0,0,.16);
}
.arcade-title p,
.arcade-title em { margin: 0; color: rgba(16,32,51,.62); font-style: normal; font-size: 13px; font-weight: 850; }
body.arcade-enhanced[data-theme=dark] .arcade-title p,
body.arcade-enhanced[data-theme=dark] .arcade-title em { color: rgba(238,247,255,.72); }
.arcade-title h1 { margin: 2px 0 4px; font-size: clamp(24px, 3.2vw, 42px); line-height: 1; letter-spacing: 0; }
.arcade-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  background: rgba(255,255,255,.66);
}
body.arcade-enhanced[data-theme=dark] .arcade-toolbar { background: rgba(12,18,32,.48); }
.arcade-toolbar label {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(16,32,51,.72);
  font-size: 13px;
  font-weight: 900;
}
body.arcade-enhanced[data-theme=dark] .arcade-toolbar label { color: rgba(238,247,255,.8); }
.arcade-toolbar select {
  height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 28px 0 10px;
  color: var(--arcade-ink);
  background: rgba(255,255,255,.88);
  font: 850 13px/1 inherit;
}
.arcade-toolbar .primary,
.stage-actions .primary { color: #fff; background: var(--arcade-main); }
.arcade-stat {
  min-width: 82px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  box-shadow: inset 0 0 0 1px rgba(16,32,51,.06);
}
.arcade-stat span { color: rgba(16,32,51,.58); font-size: 12px; font-weight: 900; }
.arcade-stat b { color: var(--arcade-main); font-size: 22px; line-height: 1; }
.arcade-stage {
  min-height: 0;
  overflow: hidden;
  padding: clamp(16px, 2.5vw, 34px);
  display: grid;
  place-items: center;
}
.arcade-stage.shake { animation: arcadeShake .28s ease; }
.arcade-idle,
.arcade-question,
.spell-game,
.sentence-game,
.speak-game,
.recite-game,
.reaction-game,
.wheel-game,
.pk-game,
.tense-game,
.forms-game,
.link-game {
  width: min(1080px, 100%);
  min-height: min(560px, 100%);
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(18px, 3vw, 36px);
  border-radius: 24px;
  background: var(--arcade-panel);
  box-shadow: 0 18px 50px rgba(16,32,51,.18), inset 0 0 0 1px rgba(255,255,255,.48);
}
.arcade-idle { justify-items: center; text-align: center; }
.arcade-orb {
  width: clamp(100px, 16vw, 170px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 25%, #fff, var(--arcade-hot) 18%, var(--arcade-main) 76%);
  font-size: clamp(38px, 6vw, 70px);
  font-weight: 950;
  box-shadow: 0 20px 40px rgba(16,32,51,.24), inset -12px -16px 20px rgba(0,0,0,.18);
}
.arcade-idle h2 { margin: 0; font-size: clamp(32px, 5vw, 58px); line-height: 1; letter-spacing: 0; }
.arcade-idle p { margin: 0; max-width: 520px; color: rgba(16,32,51,.68); font-weight: 850; }
.prompt-card,
.recite-card,
.speak-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}
.prompt-card span,
.recite-card span,
.speak-card span {
  padding: 6px 13px;
  border-radius: 999px;
  color: #fff;
  background: var(--arcade-hot);
  font-size: 13px;
  font-weight: 950;
}
.prompt-card h2,
.recite-card h2,
.speak-card h2 {
  margin: 0;
  max-width: 100%;
  color: var(--arcade-ink);
  font-size: clamp(34px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.prompt-card p,
.recite-card p,
.speak-card p {
  margin: 0;
  color: rgba(16,32,51,.66);
  font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 900;
}
body.arcade-enhanced[data-theme=dark] .prompt-card p,
body.arcade-enhanced[data-theme=dark] .recite-card p,
body.arcade-enhanced[data-theme=dark] .speak-card p { color: rgba(238,247,255,.74); }
.arcade-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.arcade-option {
  min-height: clamp(70px, 11vh, 118px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 3px solid rgba(16,32,51,.08);
  border-radius: 18px;
  color: var(--arcade-ink);
  background: rgba(255,255,255,.88);
  font: 950 clamp(18px, 2.6vw, 34px)/1.15 inherit;
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(16,32,51,.14);
  overflow-wrap: anywhere;
}
.arcade-option i { color: var(--arcade-hot); font-style: normal; }
.arcade-option:active,
.stage-actions button:active,
.arcade-actions button:active,
.arcade-toolbar button:active { transform: translateY(4px); box-shadow: none; }
.spell-slots,
.sentence-answer {
  min-height: 72px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.72);
}
.spell-game {
  align-content: stretch;
  grid-template-rows: auto auto 1fr auto;
}
.spell-answer-panel {
  padding: clamp(10px, 1.4vw, 18px);
  border: 4px solid rgba(255,255,255,.78);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(255,255,255,.58));
  box-shadow: inset 0 0 0 2px rgba(16,32,51,.06), 0 12px 28px rgba(16,32,51,.12);
}
.spell-game .spell-slots {
  min-height: clamp(96px, 16vh, 150px);
  align-items: center;
  gap: clamp(10px, 1.4vw, 18px);
  padding: clamp(14px, 2vw, 24px);
  background: rgba(255,255,255,.72);
}
.spell-slots button {
  width: clamp(68px, 7.6vw, 108px);
  height: clamp(72px, 8vw, 116px);
  border: 0;
  border-radius: 18px;
  color: var(--arcade-main);
  background: #fff;
  font-size: clamp(42px, 5.4vw, 78px);
  font-weight: 950;
  line-height: 1;
  text-transform: none;
  box-shadow: inset 0 -8px 0 rgba(16,32,51,.12), 0 8px 18px rgba(16,32,51,.12);
}
.letter-cloud,
.word-bank {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.letter-cloud button,
.word-bank button {
  min-width: clamp(62px, 6.6vw, 96px);
  min-height: clamp(58px, 6vw, 86px);
  border: 0;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--arcade-main), var(--arcade-good));
  font-size: clamp(30px, 4vw, 56px);
  font-weight: 950;
  line-height: 1;
  text-transform: none;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(16,32,51,.18);
}
.letter-cloud button:disabled,
.word-bank button:disabled { opacity: .35; transform: scale(.94); }
.sentence-answer {
  align-items: center;
  color: var(--arcade-main);
  font: 950 clamp(22px, 4vw, 42px)/1.2 inherit;
}
.stage-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.link-game {
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.link-col { display: grid; gap: 12px; }
.link-card {
  min-height: 72px;
  border: 3px solid rgba(16,32,51,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.9);
  color: var(--arcade-ink);
  font: 950 clamp(18px, 2.8vw, 32px)/1.1 inherit;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(16,32,51,.12);
}
.link-card.en { color: var(--arcade-main); }
.link-card.zh { color: var(--arcade-hot); }
.link-card.selected { outline: 4px solid rgba(255,183,3,.55); }
.link-card.done { color: #fff; background: var(--arcade-good); opacity: .82; }
.link-card.wrong { background: #ffe4e6; color: #be123c; }
.link-center {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--arcade-main);
  font-size: 28px;
  font-weight: 950;
}
.reaction-board {
  position: relative;
  min-height: 350px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.32));
}
.meteor-board {
  min-height: clamp(360px, 54vh, 560px);
  background:
    linear-gradient(90deg, transparent 24%, rgba(255,255,255,.34) 24% 25%, transparent 25% 49%, rgba(255,255,255,.34) 49% 50%, transparent 50% 74%, rgba(255,255,255,.34) 74% 75%, transparent 75%),
    radial-gradient(circle at 50% 0, rgba(255,255,255,.78), rgba(69,95,220,.2) 46%, rgba(15,23,42,.12));
}
.fruit-board {
  min-height: clamp(340px, 50vh, 520px);
  background: radial-gradient(circle at 50% 52%, rgba(255,255,255,.84), rgba(255,255,255,.36));
}
.falling {
  position: absolute;
  min-width: 130px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--arcade-main), var(--arcade-hot));
  font: 950 22px/1 inherit;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(16,32,51,.2);
  animation: arcadeFloat 4.8s ease-in-out infinite;
}
.meteor-board .falling {
  top: -78px;
  min-width: clamp(132px, 13vw, 210px);
  min-height: clamp(58px, 7vh, 82px);
  border-radius: 18px 999px 999px 18px;
  font-size: clamp(22px, 2.6vw, 38px);
  animation: meteorFall var(--fall-time, 5.6s) linear infinite;
  animation-delay: var(--fall-delay, 0s);
}
.meteor-board .falling::before {
  content: "";
  position: absolute;
  right: 88%;
  top: 50%;
  width: 70px;
  height: 12px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8));
}
.fruit-board .falling {
  width: clamp(116px, 12vw, 166px);
  aspect-ratio: 1.12;
  border-radius: 48% 52% 46% 54%;
  font-size: clamp(18px, 2.2vw, 30px);
  animation: arcadeFloat 3.8s ease-in-out infinite;
}
.target-0 { left: 8%; top: 14%; }
.target-1 { left: 35%; top: 6%; animation-delay: .4s; }
.target-2 { left: 66%; top: 17%; animation-delay: .8s; }
.target-3 { left: 15%; top: 58%; animation-delay: 1.2s; }
.target-4 { left: 46%; top: 50%; animation-delay: 1.6s; }
.target-5 { left: 71%; top: 63%; animation-delay: 2s; }
.meteor-board .target-0 { left: 7%; }
.meteor-board .target-1 { left: 24%; }
.meteor-board .target-2 { left: 42%; }
.meteor-board .target-3 { left: 59%; }
.meteor-board .target-4 { left: 14%; }
.meteor-board .target-5 { left: 72%; }
.speak-wave {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.speak-wave i {
  width: 12px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--arcade-hot), var(--arcade-main));
  animation: hmEqualizer 1s ease-in-out infinite;
}
.speak-wave i:nth-child(2) { animation-delay: .1s; }
.speak-wave i:nth-child(3) { animation-delay: .2s; }
.speak-wave i:nth-child(4) { animation-delay: .3s; }
.speak-wave i:nth-child(5) { animation-delay: .4s; }
.pk-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.pk-score b,
.pk-score strong {
  padding: 16px;
  border-radius: 18px;
  color: #fff;
  background: var(--arcade-main);
  font-size: clamp(18px, 3vw, 32px);
}
.pk-score strong { background: var(--arcade-hot); }
.recite-classroom {
  grid-template-columns: minmax(180px, .75fr) minmax(320px, 1.6fr) minmax(190px, .75fr);
  align-items: stretch;
}
.recite-student-panel,
.recite-tools,
.recite-main-card {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  min-width: 0;
  padding: clamp(18px, 2vw, 28px);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 0 0 1px rgba(16,32,51,.08);
  text-align: center;
}
.recite-student-panel span,
.recite-main-card span {
  padding: 7px 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--arcade-hot);
  font-size: 13px;
  font-weight: 950;
}
.recite-student-panel strong {
  display: grid;
  place-items: center;
  width: clamp(130px, 14vw, 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 25%, #fff, var(--arcade-warn) 18%, var(--arcade-main) 78%);
  font-size: clamp(24px, 3.8vw, 48px);
  font-weight: 950;
  box-shadow: 0 16px 30px rgba(16,32,51,.22), inset -10px -14px 18px rgba(0,0,0,.16);
}
.recite-score-mini b { display: block; color: var(--arcade-main); font-size: 40px; line-height: 1; }
.recite-score-mini em { color: rgba(16,32,51,.58); font-style: normal; font-size: 12px; font-weight: 900; }
.recite-main-card h2 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(42px, 7vw, 94px);
  line-height: 1.04;
  overflow-wrap: anywhere;
}
.recite-meta { margin: 0; color: rgba(16,32,51,.62); font-size: clamp(16px, 2vw, 24px); font-weight: 900; }
.recite-answer-box {
  display: grid;
  gap: 6px;
  padding: 18px 28px;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--arcade-good), var(--arcade-main));
  box-shadow: 0 12px 26px rgba(16,32,51,.18);
}
.recite-answer-box b { font-size: clamp(28px, 4vw, 58px); }
.recite-answer-box small { opacity: .82; font-weight: 900; }
.recite-tools button,
.recite-student-panel button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  color: var(--arcade-ink);
  background: #fff;
  font: 950 16px/1 inherit;
  box-shadow: 0 5px 0 rgba(16,32,51,.12);
  cursor: pointer;
}
.recite-tools .primary { color: #fff; background: var(--arcade-main); }
.big-wheel {
  width: clamp(210px, 34vw, 360px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 18px solid var(--arcade-warn);
  border-radius: 50%;
  color: #fff;
  background: conic-gradient(from 20deg, var(--arcade-main), var(--arcade-hot), var(--arcade-good), var(--arcade-main));
  font: 950 clamp(48px, 8vw, 96px)/1 inherit;
  box-shadow: 0 24px 50px rgba(16,32,51,.25), inset 0 0 0 12px rgba(255,255,255,.34);
}
.wheel-task {
  margin: 0;
  text-align: center;
  color: var(--arcade-ink);
  font-size: clamp(18px, 3vw, 30px);
  font-weight: 950;
}
.arcade-enhanced .toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16,32,51,.9);
  font-weight: 900;
  transition: .2s;
}
.arcade-enhanced .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@keyframes arcadeShake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@keyframes arcadeFloat { 0%, 100% { transform: translateY(-8px); } 50% { transform: translateY(18px); } }
@keyframes meteorFall {
  0% { transform: translateY(-110px) rotate(-8deg); opacity: 0; }
  8% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateY(calc(58vh + 150px)) rotate(6deg); opacity: 0; }
}
@media (max-width: 760px) {
  body.arcade-enhanced { overflow: auto; }
  .arcade-app { width: 100vw; height: auto; min-height: 100vh; margin: 0; border-radius: 0; border: 0; }
  .arcade-header { grid-template-columns: 1fr; justify-items: stretch; }
  .arcade-title { justify-content: flex-start; }
  .arcade-actions { justify-content: flex-start; }
  .arcade-toolbar { justify-content: stretch; }
  .arcade-toolbar label,
  .arcade-toolbar button,
  .arcade-stat { flex: 1 1 42%; }
  .arcade-options { grid-template-columns: 1fr; }
  .link-game { grid-template-columns: 1fr; }
  .recite-classroom { grid-template-columns: 1fr; }
  .link-center { justify-self: center; }
  .falling { position: static; margin: 8px; animation: none; }
  .reaction-board { min-height: 0; display: flex; flex-wrap: wrap; justify-content: center; padding: 12px; }
}
.hm-theme-choice { min-height: 120px; align-content: center; gap: 8px; }
.hm-theme-choice i {
  width: 100%;
  height: 66px;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
}
.hm-theme-choice[data-theme=candy] i { background-image:url("../assets/images/themes/match-candy.webp"); }
.hm-theme-choice[data-theme=ocean] i { background-image:url("../assets/images/themes/match-ocean.webp"); }
.hm-theme-choice[data-theme=forest] i { background-image:url("../assets/images/themes/match-forest.webp"); }
.hm-theme-choice[data-theme=sunset] i { background-image:url("../assets/images/themes/match-sunset.webp"); }
.hm-theme-choice[data-theme=lavender] i { background-image:url("../assets/images/themes/match-lavender.webp"); }
.hm-theme-choice[data-theme=mint] i { background-image:url("../assets/images/themes/match-mint.webp"); }
.hm-theme-choice[data-theme=berry] i { background-image:url("../assets/images/themes/match-berry.webp"); }
.hm-theme-choice[data-theme=lemon] i { background-image:url("../assets/images/themes/match-lemon.webp"); }
.hm-theme-choice[data-theme=aurora] i { background-image:url("../assets/images/themes/match-aurora.webp"); }
.hm-theme-choice[data-theme=dark] i { background-image:url("../assets/images/themes/match-dark.webp"); }

body.hanmai-enhanced .guide-float {
  right: 18px;
  bottom: 18px;
  color: #06120f;
  border: 1px solid rgba(var(--hm-primary-rgb),.45);
  background: var(--hm-secondary);
  box-shadow: 0 0 20px rgba(var(--hm-secondary-rgb),.4);
}
body.hanmai-enhanced .guide-float i { color: #06120f; background: #fff; }

@keyframes hmEqualizer {
  0%,100% { height: 22px; }
  50% { height: 78px; }
}
@keyframes hmMicPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes hmCardHit {
  0% { transform: scale(.96); filter: brightness(.8); }
  65% { transform: scale(1.035); filter: brightness(1.2); }
  100% { transform: scale(1); filter: brightness(1); }
}

@media (max-width: 980px) {
  .hm-header { align-items: flex-start; flex-direction: column; }
  .hm-toolbar { justify-content: flex-start; }
  .hm-top-row { flex-basis: 118px; gap: 10px; }
  .hm-bottom-area { grid-template-columns: 1fr 210px 1fr; gap: 12px; }
  .hm-bottom-col { gap: 12px; }
}

@media (max-width: 640px) {
  body.hanmai-enhanced { overflow: auto; }
  .hanmai-app { min-height: 100vh; height: auto; overflow: visible; padding: 10px; }
  .hm-header { min-height: 0; padding: 10px; }
  .hm-toolbar { max-height: 30vh; overflow: auto; }
  .hm-range { width: 100%; justify-content: space-between; }
  .hm-range input { flex: 1; }
  .hm-stage { min-height: 650px; }
  .hm-top-row { flex-basis: auto; grid-template-columns: repeat(2,1fr); }
  .hm-cn-card { min-height: 76px; font-size: 26px; }
  .hm-bottom-area { grid-template-columns: 1fr; }
  .hm-mic-zone { order: -1; min-height: 180px; }
  .hm-bottom-col { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .hm-en-card { min-height: 110px; }
  .hm-en-card span { font-size: clamp(40px,16vw,82px); }
  .hm-setting-grid, .hm-theme-grid { grid-template-columns: 1fr 1fr; }
}

body.arcade2 {
  --a-ink: #18243a; --a-sub: #596579; --a-card: rgba(255,255,255,.88); --a-line: rgba(255,255,255,.58);
  --a-blue: #4f7cff; --a-red: #ff607d; --a-yellow: #ffd166; --a-green: #19c79f;
  --a-bg: url("../assets/images/themes/match-candy.webp"), linear-gradient(135deg,#fff8fb,#e8fff7 52%,#edf4ff);
  margin: 0; min-height: 100vh; overflow: hidden; color: var(--a-ink);
  font-family: "HarmonyOS Sans SC","Noto Sans SC","Microsoft YaHei",system-ui,sans-serif;
  background: var(--a-bg); background-size: cover; background-position: center;
}
body.arcade2[data-theme=ocean]{--a-bg:url("../assets/images/themes/match-ocean.webp"),linear-gradient(135deg,#dff7ff,#e9f0ff)}
body.arcade2[data-theme=forest]{--a-bg:url("../assets/images/themes/match-forest.webp"),linear-gradient(135deg,#ebffe8,#e8fff9)}
body.arcade2[data-theme=sunset]{--a-bg:url("../assets/images/themes/match-sunset.webp"),linear-gradient(135deg,#fff1c9,#ffe2da)}
body.arcade2[data-theme=lavender]{--a-bg:url("../assets/images/themes/match-lavender.webp"),linear-gradient(135deg,#f7edff,#eaf0ff)}
body.arcade2[data-theme=mint]{--a-bg:url("../assets/images/themes/match-mint.webp"),linear-gradient(135deg,#e7fff8,#eaf7ff)}
body.arcade2[data-theme=berry]{--a-bg:url("../assets/images/themes/match-berry.webp"),linear-gradient(135deg,#ffe8f2,#f1e8ff)}
body.arcade2[data-theme=lemon]{--a-bg:url("../assets/images/themes/match-lemon.webp"),linear-gradient(135deg,#fffbc9,#e6fff3)}
body.arcade2[data-theme=aurora]{--a-bg:url("../assets/images/themes/match-aurora.webp"),linear-gradient(135deg,#e6ffff,#eefff0)}
body.arcade2[data-theme=dark]{--a-ink:#edf4ff;--a-sub:#bdd1f0;--a-card:rgba(14,24,44,.84);--a-line:rgba(255,255,255,.18);--a-bg:url("../assets/images/themes/match-dark.webp"),linear-gradient(135deg,#0b1020,#17233d)}
body.arcade2[data-game=witch]{--a-bg:url("../assets/images/games/generated/witch-classroom-bg.png"),linear-gradient(135deg,#efe7ff,#e5fff8)}
body.arcade2[data-game=police]{--a-bg:url("../assets/images/games/generated/police-chase-bg.png"),linear-gradient(135deg,#e9f4ff,#fff4dc)}
body.arcade2[data-game=meteor]{--a-bg:url("../assets/images/games/generated/meteor-rain-bg.png"),linear-gradient(135deg,#e6f6ff,#eef0ff)}
body.arcade2[data-game=fruit]{--a-bg:url("../assets/images/games/generated/fruit-ninja-bg.png"),linear-gradient(135deg,#e7fff2,#fff8d8)}
body.arcade2[data-game=pk]{--a-bg:url("../assets/images/games/generated/pk-battle-bg.png"),linear-gradient(135deg,#eaf2ff,#ffeaf0)}
body.arcade2[data-game=buzzer]{--a-bg:url("../assets/images/games/generated/buzzer-stage-bg.png"),linear-gradient(135deg,#eaf2ff,#fff4da)}
body.arcade2[data-game=bloom]{--a-bg:url("../assets/images/games/generated/word-bloom-bg.png"),linear-gradient(135deg,#efffed,#fff4f8)}
.arcade2-app{width:96vw;height:96vh;margin:2vh auto;display:flex;flex-direction:column;border:3px solid var(--a-line);border-radius:26px;background:rgba(255,255,255,.35);box-shadow:0 26px 70px rgba(16,32,60,.25);backdrop-filter:blur(18px);overflow:visible}
.arcade2-top{min-height:86px;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:18px;padding:14px 22px;background:rgba(255,255,255,.56);border-bottom:1px solid rgba(0,0,0,.06)}
body.arcade2[data-theme=dark] .arcade2-top{background:rgba(255,255,255,.88)}
.home-link,.top-actions button,.arcade2-controls button,.arcade2-controls select,.arcade2-controls label,.stage-actions button,.arcade2-modal button,.arcade2-modal input{min-height:40px;border:0;border-radius:999px;padding:0 14px;background:#fff;color:var(--a-ink);font-weight:900;text-decoration:none;box-shadow:0 4px 0 rgba(0,0,0,.12)}
body.arcade2 .primary{background:linear-gradient(135deg,var(--a-blue),#7c5cff)!important;color:white!important}
.title-block{text-align:center}.title-block b{display:inline-grid;place-items:center;width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--a-red),var(--a-yellow));color:#fff;font-size:20px}.title-block span{display:block;margin-top:4px;color:var(--a-sub);font-size:12px;font-weight:900}.title-block h1{margin:0;font-size:clamp(24px,3.7vw,42px);letter-spacing:0}
.top-actions,.arcade2-controls,.modal-actions,.stage-actions{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.arcade2-top,.arcade2-controls{position:relative;z-index:20;overflow:visible}.arcade2-controls{padding:12px 18px;background:rgba(255,255,255,.38);border-bottom:1px solid rgba(0,0,0,.05)}.arcade2-controls label{display:flex;align-items:center;gap:7px;color:var(--a-sub);font-size:13px}.arcade2-controls select{position:relative;z-index:3;box-shadow:none;background:transparent;padding:0;color:var(--a-ink);pointer-events:auto}.stat{font-weight:900;color:var(--a-sub)}.stat b{color:var(--a-blue);font-size:20px}
.arcade2-stage{position:relative;flex:1;overflow:hidden;padding:22px}.idle-panel{height:100%;display:grid;place-items:center;align-content:center;gap:16px;text-align:center}.idle-panel b{display:grid;place-items:center;width:120px;height:120px;border-radius:32px;background:linear-gradient(135deg,var(--a-blue),var(--a-red));color:#fff;font-size:52px;box-shadow:0 16px 0 rgba(0,0,0,.1)}.idle-panel h2{margin:0;font-size:44px}.idle-panel p{max-width:620px;color:var(--a-sub);font-size:18px;line-height:1.7}
.big-prompt{margin:auto;max-width:880px;padding:24px;border:4px solid rgba(255,255,255,.72);border-radius:28px;background:var(--a-card);text-align:center;box-shadow:0 16px 32px rgba(15,35,70,.13)}.big-prompt.compact{max-width:640px;padding:16px 22px}.big-prompt span{color:var(--a-red);font-weight:950}.big-prompt h2{margin:8px 0;font-size:clamp(34px,7vw,74px);line-height:1.05}.big-prompt p{margin:0;color:var(--a-sub);font-size:18px}.big-prompt button,.quick-card button{margin-top:12px}
.answers.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:20px auto 0;max-width:980px}.answer-card{min-height:100px;border:4px solid rgba(255,255,255,.7);border-radius:22px;background:var(--a-card);color:var(--a-ink);font-size:25px;font-weight:950;box-shadow:0 8px 0 rgba(0,0,0,.1);cursor:pointer}.answer-card i{display:block;color:var(--a-blue);font-style:normal;font-size:16px}.answer-card:hover{transform:translateY(-3px)}
.slots,.letters{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;margin-top:22px}.slots button{width:78px;height:86px;border:4px solid #fff;border-radius:18px;background:rgba(255,255,255,.86);font-size:50px;font-weight:950;color:var(--a-blue);box-shadow:0 8px 0 rgba(0,0,0,.11)}.slots button.fixed{background:linear-gradient(135deg,#4f7cff,#19c79f);color:#fff}.letters button{width:70px;height:70px;border:0;border-radius:999px;background:linear-gradient(135deg,#fff,#dff7ff);color:var(--a-ink);font-size:38px;font-weight:950;box-shadow:0 8px 0 rgba(0,0,0,.12)}.letters button:disabled{opacity:.3;transform:scale(.9)}
.sky,.fruit-field{position:relative;height:calc(100% - 145px);margin-top:10px;border-radius:24px;background:rgba(255,255,255,.28);overflow:hidden}.meteor-card{position:absolute;top:-90px;left:calc(8% + var(--x,0));min-width:132px;height:74px;border:4px solid #fff;border-radius:24px;background:linear-gradient(135deg,#4f7cff,#70e1ff);color:white;font-size:24px;font-weight:950;box-shadow:0 12px 0 rgba(0,0,0,.12);animation:fall var(--t) linear var(--d) infinite}.m0{--x:0%}.m1{--x:14%}.m2{--x:29%}.m3{--x:44%}.m4{--x:59%}.m5{--x:73%}@keyframes fall{to{transform:translateY(78vh) rotate(10deg)}}
.meteor-floor{position:absolute;left:46px;right:46px;bottom:28px;padding:8px 16px;border:3px dashed rgba(255,96,125,.55);border-radius:999px;color:var(--a-red);background:rgba(255,255,255,.65);font-weight:950;text-align:center}
.fruit-card{position:absolute;width:142px;height:110px;border:0;border-radius:48% 52% 45% 55%;background:linear-gradient(135deg,#ff6b8a,#ffd166);color:#fff;font-size:24px;font-weight:950;box-shadow:0 12px 0 rgba(0,0,0,.12);animation:flyFruit var(--fly,5s) ease-in-out infinite;touch-action:none}.fruit-card span{display:block;transform:rotate(-8deg)}.fruit-card.sliced{background:linear-gradient(135deg,#22c55e,#19c79f);transform:scale(.92) rotate(-12deg)!important}.fruit-card.bad-slice{background:linear-gradient(135deg,#ef4444,#7f1d1d);animation:shake .24s ease}.slice-mark{position:absolute;left:50%;top:50%;width:240px;height:8px;border-radius:999px;background:#fff;box-shadow:0 0 18px rgba(255,255,255,.9);transform:translate(-50%,-50%) rotate(-25deg) scaleX(0);opacity:0;pointer-events:none}.slice-mark.show{animation:sliceFlash .22s ease}.cut-trail{position:absolute;inset:0;pointer-events:none}.cut-trail i{position:absolute;height:7px;border-radius:999px;background:#fff;box-shadow:0 0 16px rgba(255,255,255,.95);transform-origin:left center;animation:trailFade .26s ease forwards}.f0{left:8%;top:12%}.f1{left:28%;top:44%;animation-delay:.4s}.f2{left:48%;top:16%;animation-delay:.8s}.f3{left:68%;top:50%;animation-delay:1.2s}.f4{left:78%;top:12%;animation-delay:1.6s}.f5{left:15%;top:62%;animation-delay:2s}@keyframes flyFruit{0%{transform:translate(-60px,120px) rotate(-16deg);opacity:0}18%,82%{opacity:1}50%{transform:translate(22px,-18px) rotate(8deg)}100%{transform:translate(80px,120px) rotate(18deg);opacity:.25}}@keyframes sliceFlash{50%{opacity:1;transform:translate(-50%,-50%) rotate(-25deg) scaleX(1)}}@keyframes trailFade{to{opacity:0;filter:blur(4px)}}
.witch2,.police2,.recite2,.wheel2,.buzzer2,.pk2,.train2,.link2,.bloom2,.chant2,.quick2,.tense2,.forms2,.spell2,.meteor2,.fruit2{height:100%}.witch2,.police2,.recite2,.wheel2,.buzzer2,.bloom2{display:grid;grid-template-columns:300px 1fr;gap:20px}.witch2 aside,.police2 aside,.recite2 aside,.wheel2 aside,.bloom2 aside{padding:22px;border-radius:24px;background:var(--a-card);box-shadow:0 12px 26px rgba(15,35,70,.12)}.pill,.remain{display:inline-block;margin:10px 0;padding:9px 14px;border-radius:999px;background:#fff;color:var(--a-blue);font-weight:950}
.poison-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.poison-grid button{border:4px solid #fff;border-radius:24px;background:linear-gradient(135deg,#805ad5,#ff6b8a);color:#fff;font-size:34px;font-weight:950;box-shadow:0 8px 0 rgba(0,0,0,.14)}.poison-grid .safe{background:linear-gradient(135deg,#22c55e,#7ee787);font-size:20px}.poison-grid .safe small{display:block}.poison-grid .poison{background:linear-gradient(135deg,#1f2937,#ef4444)}.poison-grid .poison-mark{background:linear-gradient(135deg,#111827,#a855f7);outline:5px solid rgba(255,209,102,.7)}
.poison-grid.witch-size-3{grid-template-columns:repeat(3,1fr)}.poison-grid.witch-size-5{grid-template-columns:repeat(5,1fr)}.poison-grid.witch-size-6{grid-template-columns:repeat(6,1fr)}
.witch-start{height:100%;display:grid;grid-template-columns:1.2fr 360px;gap:24px;align-items:center}.witch-hero{height:78%;display:grid;place-items:center;align-content:center;gap:14px;padding:34px;border:6px solid #fff;border-radius:36px;background:linear-gradient(180deg,rgba(255,255,255,.88),rgba(255,255,255,.55)),url("../assets/images/games/generated/witch-classroom-bg.png");background-size:cover;background-position:center;box-shadow:0 20px 0 rgba(60,20,100,.13)}.witch-hero h2{margin:0;font-size:clamp(44px,7vw,86px);text-shadow:0 4px 0 rgba(255,255,255,.75)}.witch-hero p{max-width:680px;text-align:center;color:#23304a;font-size:19px;line-height:1.8;font-weight:900}.witch-magic{width:260px;height:260px;border-radius:42px;background:url("../assets/images/games/generated/witch-character-panel.png");background-size:cover;background-position:center;box-shadow:0 18px 0 rgba(0,0,0,.12),0 0 46px rgba(168,85,247,.45);position:relative}.witch-magic::before{content:"";display:none}.witch-panel{padding:28px;border-radius:28px;background:var(--a-card);box-shadow:0 16px 30px rgba(15,35,70,.15)}.witch-panel label{display:grid;gap:8px;margin-bottom:18px;color:var(--a-sub);font-weight:950}.witch-panel select,.witch-panel button{width:100%;min-height:58px;border:0;border-radius:18px;padding:0 18px;background:#fff;color:var(--a-ink);font-size:18px;font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.12)}
.recite2{grid-template-columns:320px 1fr}.history{height:230px;overflow:auto;margin:12px 0;padding:12px;border-radius:18px;background:rgba(255,255,255,.55)}.history p{margin:0 0 8px;padding:8px;border-radius:12px;background:#fff;font-weight:800}.recite2 textarea{width:100%;height:130px;border:0;border-radius:16px;padding:12px;color:#111;background:#fff}.draw-cards{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-content:center}.draw-cards>div{min-height:260px;display:grid;place-items:center;padding:24px;border:6px solid #fff;border-radius:34px;background:var(--a-card);box-shadow:0 14px 0 rgba(0,0,0,.1)}.draw-cards span{color:var(--a-sub);font-weight:950}.draw-cards strong{font-size:clamp(38px,6vw,82px);text-align:center}.draw-cards small{display:block;font-size:26px;color:var(--a-red)}.draw-cards button{min-height:78px;font-size:24px;border-radius:18px}.draw-cards #rollBtn{grid-column:1 / 2}.draw-cards #resetRound{grid-column:2 / 3;background:#fff}.draw-cards .stop{background:linear-gradient(135deg,#ff607d,#ff9f1c)!important}
.train-track,.cars{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin:22px auto;max-width:980px}.train-track span,.cars button{min-width:120px;min-height:58px;border-radius:18px;padding:14px 18px;background:var(--a-card);font-size:24px;font-weight:950;box-shadow:0 8px 0 rgba(0,0,0,.1)}.cars button{background:linear-gradient(135deg,#ffd166,#ff9f1c);color:#fff;border:4px solid #fff}.cars button:disabled{opacity:.35}
.link2{display:grid;grid-template-columns:1fr 200px 1fr;align-items:center;gap:20px}.link-col{display:grid;gap:12px}.link-node{min-height:72px;border:4px solid #fff;border-radius:20px;background:var(--a-card);font-size:24px;font-weight:950;color:var(--a-ink);box-shadow:0 8px 0 rgba(0,0,0,.1)}.link-node.en{color:var(--a-blue)}.link-node.zh{color:var(--a-red)}.link-node.sel{outline:5px solid var(--a-yellow)}.link-node.done{background:linear-gradient(135deg,#22c55e,#19c79f);color:#fff}.link-node.bad{animation:shake .24s ease}#lines{position:absolute;inset:0;pointer-events:none}#lines line{stroke:var(--a-green);stroke-width:6;stroke-linecap:round}
.board-path{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;align-content:center;padding:18px;border-radius:30px;background:linear-gradient(135deg,rgba(255,255,255,.36),rgba(255,255,255,.12))}.board-path button{position:relative;min-height:78px;border:3px solid #fff;border-radius:18px;background:var(--a-card);color:var(--a-ink);font-weight:900;box-shadow:0 8px 0 rgba(0,0,0,.08)}.board-path button:nth-child(12n+7),.board-path button:nth-child(12n+8),.board-path button:nth-child(12n+9),.board-path button:nth-child(12n+10),.board-path button:nth-child(12n+11),.board-path button:nth-child(12n+12){transform:translateX(18px)}.board-path button::after{content:"";position:absolute;right:-14px;top:50%;width:16px;height:4px;background:rgba(79,124,255,.35)}.board-path button:nth-child(6n)::after{display:none}.board-path .cop{background:#4f7cff;color:#fff;animation:popIn .24s ease}.board-path .thief{background:#ff607d;color:#fff;animation:popIn .24s ease}.board-path span{display:block;font-size:13px}.board-path small{display:block;margin-top:3px;font-size:11px;opacity:.75}.dice-face{width:116px;height:116px;display:grid;place-items:center;margin:16px auto;border:8px solid #fff;border-radius:30px;background:linear-gradient(135deg,#ffd166,#ff607d);color:#fff;font-size:58px;font-weight:950;box-shadow:0 12px 0 rgba(0,0,0,.14)}.dice-face.roll{animation:spin .3s ease}
.versus{display:flex;justify-content:center;gap:24px;align-items:center;margin-bottom:16px}.versus b,.versus strong{padding:14px 24px;border-radius:999px;background:var(--a-card);font-size:24px;box-shadow:0 7px 0 rgba(0,0,0,.1)}
.pk-mode,.quick-settings,.judge-tools{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin:0 auto 14px}.pk-mode button,.quick-settings button,.judge-tools button{min-height:38px;border:0;border-radius:999px;padding:0 14px;background:#fff;color:var(--a-ink);font-weight:900;box-shadow:0 4px 0 rgba(0,0,0,.1)}.pk-mode button.active,.quick-settings button.active{background:var(--a-yellow);color:#5b3a00}.pk-mode span,.quick-settings span{padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.72);color:var(--a-sub);font-weight:900}
.buzzer2{grid-template-columns:1fr 1.4fr 1fr;align-items:center}.fighter{height:82%;display:grid;place-items:center;border-radius:30px;color:#fff;box-shadow:0 14px 0 rgba(0,0,0,.12)}.fighter.blue{background:linear-gradient(135deg,#3b82f6,#06b6d4)}.fighter.red{background:linear-gradient(135deg,#ef4444,#fb7185)}.fighter button{min-width:170px;min-height:86px;border:5px solid #fff;border-radius:999px;background:rgba(255,255,255,.2);color:#fff;font-size:28px;font-weight:950}.judge{margin-top:15px;padding:14px;border-radius:18px;background:rgba(255,255,255,.7)}.judge button{margin:6px}
.fighter strong{font-size:64px;text-shadow:0 4px 0 rgba(0,0,0,.15)}.less-motion *{animation-duration:.001s!important;transition-duration:.001s!important}
.quick-card{height:68%;display:grid;place-items:center;align-content:center;gap:10px;border-radius:34px;background:var(--a-card);box-shadow:0 16px 30px rgba(15,35,70,.14)}.quick-card h2{margin:0;font-size:clamp(56px,9vw,120px)}.quick-actions{display:flex;justify-content:center;gap:20px;margin-top:24px}.quick-actions button{min-width:220px;min-height:72px;border:0;border-radius:999px;font-size:24px;font-weight:950}
.cross-board{display:grid;gap:10px;align-content:center}.cross-board div{display:flex;justify-content:center;gap:6px}.cross-board button{width:54px;height:54px;border:3px solid #fff;border-radius:12px;background:var(--a-card);font-size:25px;font-weight:950}.bloom-grid{grid-template-columns:repeat(var(--cols),54px);grid-template-rows:repeat(var(--rows),54px);justify-content:center;align-content:center}.bloom-grid button.ghost{visibility:hidden;pointer-events:none}.cross-board button.sel{outline:5px solid var(--a-yellow);background:#fff7d6}.cross-board button.fixed{color:#fff;background:var(--a-blue)}.bloom2 aside button{display:block;width:100%;margin-bottom:10px;padding:12px;border:0;border-radius:16px;background:#fff;color:var(--a-ink);font-weight:900;text-align:left}.bloomletters{margin-top:14px}.pk-judge button:first-child{background:#dbeafe;color:#1d4ed8}.pk-judge button:nth-child(2){background:#ffe4e6;color:#be123c}.question-clock{display:inline-grid;place-items:center;min-width:76px;min-height:38px;margin:10px auto;padding:0 14px;border-radius:999px;background:#fff;color:var(--a-red);font-size:22px;font-weight:950;box-shadow:0 5px 0 rgba(0,0,0,.1)}.wheel2 textarea{width:100%;height:150px;margin-top:12px;border:0;border-radius:16px;padding:12px;color:#111;background:#fff}.wheel-face{width:360px;height:360px;margin:auto;border:18px solid #fff;border-radius:50%;display:grid;place-items:center;background:conic-gradient(#ff607d,#ffd166,#19c79f,#4f7cff,#ff607d);color:#fff;font-size:86px;font-weight:950;text-shadow:0 4px 0 rgba(0,0,0,.18);box-shadow:0 20px 0 rgba(0,0,0,.14)}.wheel-face.spin{animation:spin .65s ease}@keyframes spin{to{transform:rotate(720deg) scale(1.04)}}@keyframes popIn{50%{transform:scale(1.08)}}
.chant2{display:grid;grid-template-rows:1fr 100px 1fr auto;gap:14px}.chant-card{display:grid;place-items:center;border:5px solid #fff;border-radius:30px;background:var(--a-card);font-size:clamp(36px,6vw,76px);font-weight:950;text-align:center}.chant-card.en{color:var(--a-red)}.wave{display:flex;justify-content:center;align-items:center;gap:10px}.wave i{width:18px;height:58px;border-radius:99px;background:var(--a-blue);animation:wave 1s ease-in-out infinite}.wave i:nth-child(2){animation-delay:.1s}.wave i:nth-child(3){animation-delay:.2s}.wave i:nth-child(4){animation-delay:.3s}@keyframes wave{50%{height:18px}}
.arcade2-toast{position:fixed;left:50%;bottom:36px;z-index:30;transform:translateX(-50%) translateY(30px);opacity:0;padding:14px 22px;border-radius:999px;background:#102040;color:#fff;font-weight:950;transition:.2s}.arcade2-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.arcade2-modal,.victory{position:fixed;inset:0;z-index:40;display:none;place-items:center;background:rgba(13,24,45,.58);padding:20px}.arcade2-modal.show,.victory.show{display:grid}.arcade2-modal>div,.victory section{position:relative;width:min(560px,100%);padding:28px;border-radius:26px;background:#fff;color:#18243a;box-shadow:0 25px 70px rgba(0,0,0,.25)}.arcade2-modal .wide{width:min(860px,100%)}.arcade2-modal [data-close]{position:absolute;right:16px;top:12px;width:38px;height:38px;padding:0}.arcade2-modal textarea{width:100%;height:210px;padding:16px;border:2px solid #dbe5f2;border-radius:18px;color:#111;background:#fff;font-size:16px}.bank-preview{max-height:180px;overflow:auto;margin-top:12px}.bank-preview p{display:flex;justify-content:space-between;margin:6px 0;padding:8px 12px;border-radius:12px;background:#f4f7fb}.victory canvas{position:absolute;inset:0;width:100%;height:100%}.victory section{text-align:center}.victory h2{font-size:44px}.shake{animation:shake .24s ease}@keyframes shake{25%{transform:translateX(-8px)}75%{transform:translateX(8px)}}
.recite-bank-box{margin:8px 0 18px;padding:16px;border-radius:20px;background:#f6f8fc}.recite-bank-box h3{margin:0 0 8px}.recite-bank-box p{margin:0 0 12px;color:#596579;font-weight:800}.recite-bank-box input[type=file]{display:none}
.unit-bank-card{padding:26px!important}
.unit-bank-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px}
.unit-bank-layout aside{display:grid;align-content:start;gap:10px;padding:16px;border-radius:22px;background:linear-gradient(180deg,#f3f7ff,#fff4fa);box-shadow:inset 0 0 0 2px rgba(53,111,219,.12)}
.unit-bank-layout aside>b{font-size:18px;color:#102040}
.unit-list{display:grid;gap:8px;max-height:280px;overflow:auto;padding-right:2px}
.unit-list button,.unit-bank-layout aside>button{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:44px;border:0;border-radius:16px;padding:8px 12px;background:#fff;color:#17233d;font-weight:950;box-shadow:0 5px 0 rgba(0,0,0,.08);cursor:pointer}
.unit-list button.active{background:linear-gradient(135deg,#356fdb,#ff6b8a);color:#fff}
.unit-list small{font-size:12px;opacity:.78}
.unit-bank-layout main{min-width:0}
.unit-bank-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;padding:14px 16px;border-radius:18px;background:#f8fbff}
.unit-bank-head strong{font-size:20px;color:#102040}.unit-bank-head span{font-weight:950;color:#356fdb}
body.arcade2{overflow:auto}
body.arcade2[data-game=recite] .arcade2-stage{overflow:auto}
body.arcade2[data-game=recite] .recite2{min-height:0}
body.arcade2[data-game=recite] .history{height:170px}
body.arcade2[data-game=recite] .recite2 textarea{height:100px}
body.arcade2[data-game=recite] .recite-draw{align-content:start}
body.arcade2[data-game=recite] .recite-draw>div{min-height:220px}
body.arcade2[data-game=recite] .recite-big-btn{min-height:78px!important;font-size:28px!important}
.arcade2-controls label{min-height:46px;padding:0 8px 0 16px;gap:9px;font-size:14px;cursor:pointer}
.arcade2-controls select{min-width:108px;height:38px;border-radius:999px;background:#f7fbff!important;color:var(--a-ink);font-size:15px;cursor:pointer;appearance:auto;-webkit-appearance:menulist}
.arcade2-modal{overflow:auto}
.arcade2-modal>div{max-height:calc(100vh - 40px);overflow:auto}
body.arcade2[data-game=fruit] .arcade2-stage{padding:16px 22px 24px;overflow:hidden}
body.arcade2[data-game=fruit] .fruit-stage{display:grid;grid-template-rows:auto minmax(430px,1fr);gap:14px;height:100%}
body.arcade2[data-game=fruit] .fruit-target{grid-template-columns:minmax(220px,1fr) auto auto auto;padding:12px 18px;border-width:5px;background:rgba(255,255,255,.84)}
body.arcade2[data-game=fruit] .fruit-target h2{font-size:clamp(34px,4.4vw,58px);line-height:1.05}
body.arcade2[data-game=fruit] .fruit-target .fruit-back-button{min-height:48px;padding:0 18px;border:2px solid rgba(255,255,255,.9);background:#e64455;color:#fff;box-shadow:0 5px 0 #a92e3d;white-space:nowrap}
body.arcade2[data-game=fruit] .fruit-target .fruit-back-button:hover{background:#d93849}
body.arcade2[data-game=fruit] .fruit-target .fruit-back-button:focus-visible{outline:4px solid #17233d;outline-offset:3px}
body.arcade2[data-game=fruit] .fruit-playground{position:relative;height:100%;min-height:430px;margin:0;border:5px solid rgba(255,255,255,.55);border-radius:34px;background:linear-gradient(180deg,rgba(42,165,105,.22),rgba(255,255,255,.18));box-shadow:inset 0 0 0 2px rgba(255,255,255,.25),0 18px 0 rgba(15,35,70,.1);overflow:hidden}
body.arcade2[data-game=fruit] .fruit-card{left:var(--x);top:var(--y);width:clamp(168px,14vw,220px);height:clamp(126px,10.5vw,164px);display:grid;place-items:center;align-content:center;gap:4px;padding:12px;border:5px solid rgba(255,255,255,.9);border-radius:46% 54% 50% 50%;background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.85) 0 11%,transparent 12%),linear-gradient(135deg,#ff5d78,#ffd166);font-size:clamp(24px,2.6vw,40px);line-height:1.05;text-align:center;transform:translate(-50%,-50%);animation:fruitPulse 1.8s ease-in-out var(--delay) infinite;white-space:normal;overflow-wrap:anywhere}
body.arcade2[data-game=fruit] .fruit-card i{width:28px;height:18px;border-radius:999px 0 999px 0;background:#35c772;transform:rotate(-28deg);box-shadow:0 4px 0 rgba(0,0,0,.1)}
body.arcade2[data-game=fruit] .fruit-card span{display:block;max-width:100%;transform:none;text-shadow:0 3px 0 rgba(0,0,0,.12)}
body.arcade2[data-game=fruit] .fruit-card.sliced{animation:none!important;background:linear-gradient(135deg,#22c55e,#19c79f);transform:translate(-50%,-50%) scale(.96) rotate(-10deg)!important}
body.arcade2[data-game=fruit] .fruit-card.bad-slice{animation:shake .24s ease!important;background:linear-gradient(135deg,#ef4444,#7f1d1d)}
body.arcade2[data-game=fruit] .slice-mark{width:320px;height:10px}
.fruit-splash{height:100%;display:grid;place-items:center;align-content:center;gap:20px;text-align:center;padding:30px;border:6px solid rgba(255,255,255,.7);border-radius:38px;background:linear-gradient(180deg,rgba(255,255,255,.9),rgba(255,255,255,.54)),url("../assets/images/games/generated/fruit-ninja-bg.png");background-size:cover;background-position:center;box-shadow:0 20px 0 rgba(15,35,70,.12)}
.fruit-splash-icons{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}.fruit-splash-icons i{display:grid;place-items:center;width:64px;height:64px;border-radius:24px;background:rgba(255,255,255,.86);font-style:normal;font-size:38px;box-shadow:0 9px 0 rgba(0,0,0,.1)}
.fruit-splash h2{margin:2px 0 0;font-size:clamp(38px,6vw,74px);line-height:1;color:#18304f;text-shadow:0 4px 0 rgba(255,255,255,.75)}
.fruit-splash p{max-width:680px;margin:0;color:#40506a;font-size:20px;font-weight:900;line-height:1.6}
.fruit-difficulty{display:grid;grid-template-columns:repeat(3,minmax(180px,240px));gap:18px}.fruit-difficulty button{min-height:142px;border:5px solid #fff;border-radius:30px;background:rgba(255,255,255,.86);color:#18243a;box-shadow:0 12px 0 rgba(15,35,70,.13);cursor:pointer}.fruit-difficulty button.selected{background:linear-gradient(135deg,#e6fff3,#fff6ce);outline:6px solid rgba(255,209,102,.72);transform:translateY(4px);box-shadow:0 8px 0 rgba(15,35,70,.12)}.fruit-difficulty b{display:block;font-size:38px}.fruit-difficulty strong{display:block;margin-top:6px;font-size:24px}.fruit-difficulty span{display:block;margin-top:6px;color:#ff5d78;font-weight:950}
.fruit-splash-actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.fruit-splash-actions button{min-width:190px;min-height:62px;border:0;border-radius:999px;padding:0 24px;background:#fff;color:#18243a;font-size:20px;font-weight:950;box-shadow:0 8px 0 rgba(0,0,0,.12)}.fruit-sound-tip{padding:10px 16px;border-radius:999px;background:rgba(255,255,255,.78);color:#536078;font-weight:900}
.fruit-combo-layer{position:absolute;inset:0;z-index:18;display:grid;place-items:center;pointer-events:none}.fruit-combo-layer canvas{position:absolute;inset:0;width:100%;height:100%}.fruit-combo-layer section{position:relative;display:grid;place-items:center;min-width:min(560px,86vw);padding:34px 48px;border:9px solid #fff;border-radius:42px;background:linear-gradient(135deg,#ff174f,#ffb703 54%,#22c55e);color:#fff;text-shadow:0 6px 0 rgba(0,0,0,.22);box-shadow:0 24px 0 rgba(0,0,0,.2),0 0 54px rgba(255,209,102,.9);animation:comboPop 1.08s ease both}.fruit-combo-layer b{font-size:clamp(96px,13vw,170px);line-height:.82}.fruit-combo-layer strong{font-size:clamp(46px,7vw,88px);line-height:1.02;letter-spacing:0}.fruit-combo-layer span{margin-top:10px;padding:8px 18px;border-radius:999px;background:rgba(255,255,255,.24);font-size:clamp(20px,2.4vw,30px);font-weight:950}@keyframes comboPop{0%{opacity:0;transform:scale(.58) rotate(-8deg)}18%{opacity:1;transform:scale(1.12) rotate(2deg)}72%{opacity:1;transform:scale(1) rotate(0)}100%{opacity:0;transform:scale(1.04) translateY(-24px)}}
@keyframes fruitPulse{0%,100%{filter:saturate(1);box-shadow:0 12px 0 rgba(0,0,0,.12),0 0 0 rgba(255,209,102,0)}50%{filter:saturate(1.12);box-shadow:0 12px 0 rgba(0,0,0,.12),0 0 26px rgba(255,209,102,.42)}}
@media(max-width:760px){body.arcade2[data-game=fruit] .fruit-target{grid-template-columns:1fr;justify-items:center;text-align:center}body.arcade2[data-game=fruit] .fruit-playground{min-height:560px}body.arcade2[data-game=fruit] .fruit-card{width:138px;height:110px;font-size:24px}.fruit-count-5 .fruit-card{width:126px;height:100px;font-size:21px}.fruit-difficulty{grid-template-columns:1fr}.fruit-splash{min-height:620px}.fruit-splash-actions button{width:100%}}
body.arcade2[data-game=fruit].fruit-play-mode{overflow:hidden}
body.arcade2[data-game=fruit].fruit-play-mode .arcade2-app{width:100vw;height:100vh;margin:0;border:0;border-radius:0;background:rgba(255,255,255,.18)}
body.arcade2[data-game=fruit].fruit-play-mode .arcade2-top{display:none}
body.arcade2[data-game=fruit].fruit-play-mode .arcade2-controls{min-height:56px;padding:8px 14px;background:rgba(255,255,255,.72);backdrop-filter:blur(12px)}
body.arcade2[data-game=fruit].fruit-play-mode .arcade2-controls label:nth-child(1),body.arcade2[data-game=fruit].fruit-play-mode .arcade2-controls label:nth-child(2),body.arcade2[data-game=fruit].fruit-play-mode .arcade2-controls label:nth-child(3),body.arcade2[data-game=fruit].fruit-play-mode .arcade2-controls label:nth-child(4),body.arcade2[data-game=fruit].fruit-play-mode #startBtn,body.arcade2[data-game=fruit].fruit-play-mode #resetBtn{display:none}
body.arcade2[data-game=fruit].fruit-play-mode .arcade2-stage{padding:10px 18px 18px;overflow:hidden}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-stage{grid-template-rows:auto minmax(0,1fr);gap:10px}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-target{min-height:88px;padding:10px 18px;border-radius:24px}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-target h2{font-size:clamp(36px,5vw,64px)}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-playground{min-height:0;height:100%;border-radius:38px}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-card{top:112%;left:var(--x);width:clamp(150px,12vw,190px);height:clamp(112px,9vw,142px);animation:fruitLaunch var(--dur) linear var(--delay) infinite;will-change:transform,opacity}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-card:nth-child(2n){background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.85) 0 11%,transparent 12%),linear-gradient(135deg,#7ddc58,#24b47e)}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-card:nth-child(3n){background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.85) 0 11%,transparent 12%),linear-gradient(135deg,#ff9f1c,#ffd166)}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-card:nth-child(4n){background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.85) 0 11%,transparent 12%),linear-gradient(135deg,#8b5cf6,#ff5d78)}
body.arcade2[data-game=fruit].fruit-play-mode .fruit-card.sliced{animation:none!important}
@keyframes fruitLaunch{0%{opacity:0;transform:translate(-50%,4vh) rotate(-14deg) scale(.88)}8%{opacity:1;transform:translate(-50%,-8vh) rotate(-8deg) scale(.94)}22%{opacity:1;transform:translate(-50%,-38vh) rotate(2deg) scale(.99)}40%{opacity:1;transform:translate(-50%,calc(-82vh + var(--peak))) rotate(10deg) scale(1.03)}54%{opacity:1;transform:translate(-50%,calc(-88vh + var(--peak))) rotate(16deg) scale(1.04)}68%{opacity:1;transform:translate(-50%,calc(-74vh + var(--peak))) rotate(24deg) scale(1.02)}82%{opacity:1;transform:translate(-50%,-42vh) rotate(38deg) scale(.99)}94%{opacity:1;transform:translate(-50%,-12vh) rotate(54deg) scale(.94)}100%{opacity:0;transform:translate(-50%,6vh) rotate(64deg) scale(.9)}}

.spell-battle{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr);gap:16px;height:100%}
.spell-battle-toolbar{grid-column:1/-1}
.spell-team{display:grid;grid-template-rows:auto auto auto auto 1fr auto;gap:12px;align-content:start;min-width:0;min-height:0;padding:18px;border:6px solid rgba(255,255,255,.78);border-radius:32px;color:#fff;box-shadow:0 16px 0 rgba(15,35,70,.14);overflow:auto}
.spell-team.blue{background:linear-gradient(145deg,rgba(37,99,235,.95),rgba(14,165,233,.86))}
.spell-team.red{background:linear-gradient(145deg,rgba(225,29,72,.95),rgba(251,113,133,.88))}
.spell-team h2{margin:0;text-align:center;font-size:clamp(26px,3vw,42px);text-shadow:0 4px 0 rgba(0,0,0,.12)}
.spell-team>strong{justify-self:center;font-size:clamp(42px,5vw,76px);line-height:1;text-shadow:0 5px 0 rgba(0,0,0,.16)}
.spell-team-prompt{display:grid;gap:5px;justify-items:center;padding:12px;border-radius:22px;background:rgba(255,255,255,.18);text-align:center}
.spell-team-prompt b{font-size:clamp(26px,3.5vw,52px);line-height:1.08}.spell-team-prompt small{font-weight:950;opacity:.86}
.spell-team .spell-slots{margin-top:0;background:rgba(255,255,255,.18)}
.spell-team .spell-slots button{width:clamp(44px,4.6vw,78px);height:clamp(50px,5.2vw,86px);font-size:clamp(30px,4vw,56px)}
.spell-team .spell-letters{margin-top:0}.spell-team .spell-letters button{width:clamp(42px,4.6vw,68px);height:clamp(42px,4.6vw,68px);font-size:clamp(24px,3.2vw,42px)}
.spell-team.win{animation:formWin .64s ease both;outline:8px solid rgba(255,209,102,.9)}
.spell-team.bad{animation:shake .26s ease}

.dice-real{display:grid!important;grid-template-columns:repeat(3,1fr)!important;grid-template-rows:repeat(3,1fr)!important;gap:8px!important;place-items:center!important;padding:18px!important;background:linear-gradient(135deg,#fff,#f5f9ff)!important;color:#17233d!important}
.dice-real i{width:14px;height:14px;border-radius:50%;background:transparent;box-shadow:none}.dice-real i.on{background:#17233d;box-shadow:0 2px 0 rgba(0,0,0,.18)}
.dice-real.ready i.on{background:#ff607d;animation:diceReady 1s ease-in-out infinite}.dice-real.roll,.dice-real.rolling{animation:spin .3s ease}
.dice-real::before{display:none!important}.dice-real span{display:none!important}
body.arcade2[data-game=police] .dice-real{width:112px!important;height:112px!important;gap:10px!important;padding:22px!important}
body.arcade2[data-game=police] .dice-real i{width:12px!important;height:12px!important}
@keyframes diceReady{50%{transform:scale(1.35);background:#4f7cff}}

.wheel-dual{grid-template-columns:minmax(0,1fr) 330px}.wheel-dual .wheel-show{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr auto;gap:18px;align-items:center}
.wheel-lane{position:relative;display:grid;justify-items:center;gap:10px;min-width:0;padding:18px;border-radius:30px;background:rgba(255,255,255,.34);box-shadow:inset 0 0 0 2px rgba(255,255,255,.36)}
.wheel-lane>span{padding:8px 16px;border-radius:999px;background:#fff;color:var(--a-blue);font-weight:950;box-shadow:0 5px 0 rgba(0,0,0,.1)}
.wheel-pointer{position:absolute;z-index:3;top:58px;left:50%;width:0;height:0;transform:translateX(-50%);border-left:18px solid transparent;border-right:18px solid transparent;border-top:46px solid #17233d;filter:drop-shadow(0 5px 0 rgba(0,0,0,.18))}
.wheel-dual .wheel-face{width:clamp(220px,24vw,340px);height:auto;aspect-ratio:1;background:repeating-conic-gradient(from -9deg,#ff607d 0 18deg,#ffd166 18deg 36deg,#19c79f 36deg 54deg,#4f7cff 54deg 72deg);box-shadow:0 20px 0 rgba(0,0,0,.14),inset 0 0 0 13px rgba(255,255,255,.3)}
.wheel-dual .wheel-face{position:relative;overflow:hidden}
.wheel-dual .wheel-face>b{position:relative;z-index:2;display:grid;place-items:center;width:54%;aspect-ratio:1;border:8px solid rgba(255,255,255,.92);border-radius:50%;background:rgba(255,255,255,.22);font-size:inherit;line-height:1;text-align:center;word-break:keep-all;overflow-wrap:normal}
.wheel-marks{position:absolute;inset:14px;border-radius:50%;animation:inherit}
.wheel-marks span{position:absolute;left:50%;top:50%;width:40px;margin-left:-20px;margin-top:-11px;color:rgba(255,255,255,.95);font-size:13px;font-weight:950;text-align:center;text-shadow:0 2px 0 rgba(0,0,0,.18);transform:rotate(calc(360deg / var(--n) * var(--i))) translateY(calc(-1 * clamp(82px,10vw,138px))) rotate(calc(-360deg / var(--n) * var(--i)))}
.wheel-task-face{font-size:clamp(56px,7vw,94px)}.wheel-name-face{font-size:clamp(26px,3.6vw,54px)!important;background:repeating-conic-gradient(from 8deg,#2563eb 0 18deg,#22d3ee 18deg 36deg,#8b5cf6 36deg 54deg,#ef5da8 54deg 72deg)!important}.wheel-name-face>b{width:62%!important}
.wheel-dual aside select{width:100%;min-height:42px;margin:8px 0 10px;border:0;border-radius:999px;padding:0 14px;background:#f7fbff;color:#17233d;font-weight:950;box-shadow:0 5px 0 rgba(0,0,0,.1)}
.wheel-face.spin{animation:wheelSpin .72s cubic-bezier(.18,.72,.26,1.02)!important}.wheel-face.spin-reverse{animation-name:wheelSpinReverse!important}
.wheel-dual .wheel-used{grid-column:1/-1}
@keyframes wheelSpin{to{transform:rotate(1080deg) scale(1.04)}}@keyframes wheelSpinReverse{to{transform:rotate(-1080deg) scale(1.04)}}

.forms-arena{position:relative;display:grid;grid-template-rows:auto auto auto;align-content:center;gap:14px;height:100%;overflow:hidden;padding:18px 22px;border:6px solid rgba(255,255,255,.72);border-radius:34px;background:radial-gradient(circle at 12% 18%,rgba(255,209,102,.36),transparent 22%),radial-gradient(circle at 88% 15%,rgba(79,124,255,.32),transparent 24%),linear-gradient(135deg,rgba(255,255,255,.76),rgba(232,244,255,.54));box-shadow:inset 0 0 0 2px rgba(255,255,255,.34)}
.forms-orbit{position:absolute;inset:0;pointer-events:none}.forms-orbit i{position:absolute;width:110px;height:110px;border-radius:34px;background:linear-gradient(135deg,#4f7cff,#19c79f);opacity:.16;animation:formsFloat 4s ease-in-out infinite}.forms-orbit i:nth-child(1){left:7%;top:12%}.forms-orbit i:nth-child(2){right:9%;top:22%;animation-delay:.8s;background:linear-gradient(135deg,#ff607d,#ffd166)}.forms-orbit i:nth-child(3){left:52%;bottom:7%;animation-delay:1.4s;background:linear-gradient(135deg,#8b5cf6,#22d3ee)}
.forms-main{position:relative;z-index:1;display:grid;place-items:center;gap:6px;margin:auto;width:min(760px,100%);padding:16px 20px;border:5px solid rgba(255,255,255,.82);border-radius:30px;background:rgba(255,255,255,.86);text-align:center;box-shadow:0 12px 0 rgba(15,35,70,.1)}
.forms-main span{padding:7px 14px;border-radius:999px;background:linear-gradient(135deg,#ff607d,#ffd166);color:#fff;font-weight:950}.forms-main h2{margin:0;font-size:clamp(42px,6.4vw,88px);line-height:1;color:#17233d;text-shadow:0 5px 0 rgba(79,124,255,.12)}
.forms-main p{margin:0;color:#596579;font-size:clamp(18px,2.4vw,28px);font-weight:950}.forms-main button{min-height:44px;border:0;border-radius:999px;padding:0 18px;background:#fff;color:#17233d;font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.1)}
.forms-options{position:relative;z-index:1;margin-top:0!important}.forms-options .form-card{min-height:clamp(76px,10vh,108px);transition:transform .16s ease,filter .16s ease}.forms-options .form-card.right{background:linear-gradient(135deg,#22c55e,#19c79f)!important;color:#fff;animation:formWin .58s ease both}.forms-options .form-card.wrong{background:linear-gradient(135deg,#ef4444,#ff8a8a)!important;color:#fff;animation:shake .26s ease both}
.forms-result{position:relative;z-index:1;min-height:58px;display:grid;place-items:center;padding:12px 18px;border-radius:20px;background:rgba(255,255,255,.8);color:#17233d;font-size:clamp(18px,2.2vw,28px);font-weight:950;text-align:center}.forms-result b{color:#ff607d;margin-right:8px}
@keyframes formsFloat{50%{transform:translateY(22px) rotate(12deg)}}@keyframes formWin{50%{transform:scale(1.05);filter:saturate(1.3)}}

body.arcade2[data-game=quick]{--a-bg:url("../assets/images/games/generated/quick-quiz-stage.png"),linear-gradient(135deg,#fff4fa,#e9f7ff)}
body.arcade2[data-game=buzzer]{--a-bg:url("../assets/images/games/generated/buzzer-battle-stage.png"),linear-gradient(135deg,#eaf2ff,#fff4da)}
body.arcade2[data-game=forms]{--a-bg:url("../assets/images/games/generated/forms-energy-stage.png"),linear-gradient(135deg,#eff7ff,#fff8df)}
body.arcade2[data-game=wheel]{--a-bg:url("../assets/images/games/generated/wheel-classroom-stage.png"),linear-gradient(135deg,#e9f7ff,#fff4df)}
.team-avatar{width:clamp(150px,15vw,220px)!important;height:clamp(150px,15vw,220px)!important;background-size:contain!important;background-repeat:no-repeat!important;background-position:center bottom!important}
.blue-avatar{background-image:url("../assets/images/games/generated/buzzer-blue-hero.png")!important}
.red-avatar{background-image:url("../assets/images/games/generated/buzzer-red-hero.png")!important}
.team-avatar::before,.team-avatar::after,.team-avatar i{display:none!important}
.battle-buzzer{gap:14px!important}
.battle-buzzer .battle-team{min-height:360px!important;padding:12px!important}
.battle-buzzer .battle-team h2{font-size:30px!important}
.battle-buzzer .battle-team strong{font-size:58px!important}
.battle-buzzer .battle-team button{min-height:62px!important}
.battle-buzzer .battle-question{min-height:210px!important;padding:15px!important}
.battle-buzzer .battle-question h2{font-size:clamp(28px,4.1vw,52px)!important}
.battle-console .judge-tools{margin:6px auto!important;gap:8px!important}
.battle-console .judge-tools button{min-height:34px!important;padding:0 12px!important;font-size:13px!important}
.buzzer-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px auto;width:min(720px,100%)}
.buzzer-choice{min-height:56px;border:4px solid rgba(255,255,255,.78);border-radius:18px;background:rgba(255,255,255,.9);color:#17233d;font-size:clamp(17px,1.85vw,25px);font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.12);cursor:pointer}
.buzzer-choice i{display:inline-grid;place-items:center;width:34px;height:34px;margin-right:10px;border-radius:50%;background:linear-gradient(135deg,#4f7cff,#19c79f);color:#fff;font-style:normal}
.buzzer-choice:disabled{opacity:.55;cursor:not-allowed}.buzzer-choice.right{background:linear-gradient(135deg,#22c55e,#19c79f);color:#fff;animation:formWin .58s ease both}.buzzer-choice.wrong{background:linear-gradient(135deg,#ef4444,#ff8a8a);color:#fff;animation:shake .26s ease both}
.quick-hero-card::before{left:24px!important;bottom:18px!important;width:240px!important;height:260px!important;background:url("../assets/images/games/generated/quick-host-character.png") center top/cover no-repeat!important;box-shadow:none!important}
.quick-hero-card{min-height:360px!important}
.quick-actions{margin-top:12px!important}.quick-actions button{min-height:58px!important}
body.arcade2[data-game=buzzer] .arcade2-top,body.arcade2[data-game=quick] .arcade2-top{min-height:66px!important;padding:8px 20px!important}
body.arcade2[data-game=buzzer] .title-block b,body.arcade2[data-game=quick] .title-block b{width:34px!important;height:34px!important}
body.arcade2[data-game=buzzer] .title-block h1,body.arcade2[data-game=quick] .title-block h1{font-size:clamp(22px,3vw,34px)!important}
body.arcade2[data-game=buzzer] .arcade2-controls,body.arcade2[data-game=quick] .arcade2-controls{padding:8px 14px!important}
body.arcade2[data-game=buzzer] .arcade2-stage,body.arcade2[data-game=quick] .arcade2-stage{padding:12px 20px 16px!important}
body.arcade2[data-game=buzzer] .home-link,body.arcade2[data-game=buzzer] .top-actions button,body.arcade2[data-game=quick] .home-link,body.arcade2[data-game=quick] .top-actions button{min-height:34px!important}
body.arcade2[data-game=quick] .quick-arena{gap:10px!important;padding:12px!important}
body.arcade2[data-game=quick] .quick-hero-card{min-height:300px!important}
body.arcade2[data-game=quick] .quick-hero-card h2{font-size:clamp(48px,8vw,92px)!important}
body.arcade2[data-game=quick] .quick-actions button{min-height:50px!important;font-size:20px!important}
body.arcade2[data-game=quick] .quick-hero-card>button{min-height:38px!important;margin-top:2px!important;padding:0 16px!important}
body.arcade2[data-game=quick] .quick-hero-card p{margin:0!important}
body.arcade2[data-game=quick] #speakQuick{position:absolute!important;left:50%!important;bottom:18px!important;z-index:5!important;transform:translateX(-50%)!important;margin:0!important;min-width:150px!important}
body.arcade2[data-game=buzzer] .battle-vs{width:76px!important;height:76px!important;font-size:32px!important}
body.arcade2[data-game=buzzer] .battle-judge{min-height:48px!important;padding:7px!important}
.forms-arena{background:linear-gradient(180deg,rgba(255,255,255,.76),rgba(255,255,255,.42)),url("../assets/images/games/generated/forms-energy-stage.png") center/cover!important}
.wheel-lane{background:linear-gradient(180deg,rgba(255,255,255,.5),rgba(255,255,255,.2)),url("../assets/images/games/generated/wheel-classroom-stage.png") center/cover}
@media(max-width:760px){body.arcade2{overflow:auto}.arcade2-app{width:100vw;height:auto;min-height:100vh;margin:0;border-radius:0}.arcade2-top{grid-template-columns:1fr}.top-actions{justify-content:center}.arcade2-stage{min-height:620px}.answers.grid4{grid-template-columns:1fr 1fr}.witch2,.police2,.recite2,.wheel2,.buzzer2,.bloom2,.link2{grid-template-columns:1fr}.draw-cards{grid-template-columns:1fr}.slots button{width:52px;height:60px;font-size:34px}.letters button{width:54px;height:54px;font-size:28px}.wheel-face{width:260px;height:260px}.board-path{grid-template-columns:repeat(3,1fr)}}

.spell-upgraded{display:grid;grid-template-rows:auto auto auto 1fr auto;align-content:center}
.spell-upgraded .big-prompt{max-width:980px;background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(255,255,255,.78));border-radius:30px}
.spell-slots button{width:clamp(64px,7vw,104px);height:clamp(74px,8vw,116px);font-size:clamp(44px,6vw,74px);border-width:5px}
.spell-letters button{width:clamp(58px,6vw,86px);height:clamp(58px,6vw,86px);font-size:clamp(34px,4.8vw,54px)}

.meteor-upgraded{display:grid;grid-template-rows:auto 1fr}
.meteor-hud{display:grid;grid-template-columns:1fr auto auto;gap:16px;align-items:center;padding:16px 22px;border:4px solid rgba(255,255,255,.75);border-radius:28px;background:rgba(255,255,255,.78);box-shadow:0 14px 0 rgba(15,35,70,.1)}
.meteor-hud span{color:var(--a-red);font-weight:950}.meteor-hud h2{margin:4px 0 0;font-size:clamp(34px,5vw,62px)}
.meteor-hud button{min-height:48px;border:0;border-radius:999px;padding:0 18px;background:#fff;color:var(--a-ink);font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.12)}
.meteor-sky{height:auto;margin-top:16px;background:linear-gradient(180deg,rgba(15,25,70,.32),rgba(255,255,255,.18));border:4px solid rgba(255,255,255,.35)}
.meteor-card{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:8px;min-width:150px}
.meteor-card i{width:26px;height:26px;border-radius:50%;background:radial-gradient(circle,#fff 0 28%,#ffd166 30% 60%,#ff607d 62%);box-shadow:0 0 22px rgba(255,209,102,.85)}
.meteor-card.hit{background:linear-gradient(135deg,#22c55e,#19c79f)!important;animation:none!important;transform:scale(1.08)}
.meteor-card.miss{background:linear-gradient(135deg,#ef4444,#7f1d1d)!important;animation:shake .24s ease!important}

.pk-stage{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr);gap:18px;height:100%}
body.arcade2[data-game=pk] .arcade2-stage{padding:14px 16px 18px;overflow:hidden}
.pk-toolbar{grid-column:1 / -1;margin-bottom:0!important}
.pk-team{display:grid;align-content:start;gap:14px;min-height:100%;border:5px solid rgba(255,255,255,.72);border-radius:30px;color:#fff;box-shadow:0 16px 0 rgba(0,0,0,.12)}
.pk-team.blue{background:linear-gradient(145deg,rgba(37,99,235,.96),rgba(34,211,238,.82))}
.pk-team.red{background:linear-gradient(145deg,rgba(220,38,38,.96),rgba(251,113,133,.84))}
.pk-team span{font-weight:950;opacity:.88}.pk-team strong{font-size:clamp(58px,8vw,108px);line-height:1;text-shadow:0 5px 0 rgba(0,0,0,.14)}
.pk-team button{min-width:150px;min-height:54px;border:0;border-radius:999px;background:rgba(255,255,255,.92);color:#17203a;font-weight:950;box-shadow:0 7px 0 rgba(0,0,0,.18)}
.pk-team.active,.pk-team.locked{outline:8px solid rgba(255,209,102,.85);box-shadow:0 18px 0 rgba(0,0,0,.14),0 0 42px rgba(255,209,102,.75)}
.pk-team.waiting{filter:saturate(.74);opacity:.78}
.pk-answer-side{padding:12px}
.pk-team-head{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px;padding:8px 14px;border-radius:20px;background:rgba(255,255,255,.2)}
.pk-team-head span{font-size:25px}.pk-team-head strong{grid-row:1 / 3;grid-column:2;font-size:clamp(48px,6vw,76px)}.pk-team-head em{font-style:normal;font-weight:950;opacity:.9}
.pk-side-question{display:grid;place-items:center;align-content:center;gap:6px;min-height:118px;padding:12px;border-radius:22px;background:rgba(255,255,255,.88);color:#17203a;text-align:center;box-shadow:0 8px 0 rgba(0,0,0,.12)}
.pk-side-question b{color:var(--a-sub);font-size:15px}.pk-side-question h2{margin:0;font-size:clamp(26px,3.8vw,46px);line-height:1.08}.pk-side-question .pk-side-speak{min-height:36px}
.pk-side-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pk-side-answer{min-height:66px!important;border-radius:20px!important;font-size:clamp(20px,2.2vw,30px)!important}
.pk-side-answer:disabled{opacity:.42;filter:grayscale(.2)}
.pk-side-answer.wrong{background:linear-gradient(135deg,#ef4444,#ff7a59)!important;color:#fff!important;animation:answerShake .28s ease both}
.pk-team.pk-miss{animation:answerShake .28s ease both}
.pk-buzz{min-width:min(220px,90%)!important;min-height:110px!important;border:6px solid rgba(255,255,255,.8)!important;border-radius:28px!important;background:rgba(255,255,255,.22)!important;color:#fff!important;font-size:28px!important;text-shadow:0 3px 0 rgba(0,0,0,.16)}
.pk-same .pk-team:not(.locked) .pk-buzz{animation:pkBuzzPulse 1.15s ease-in-out infinite}
.pk-same .pk-team.locked .pk-buzz{background:#fff!important;color:#17203a!important}
.pk-question p{font-weight:900}
.pk-score-pop{position:absolute;z-index:22;top:42%;left:50%;display:grid;place-items:center;min-width:270px;padding:22px 32px;border:7px solid #fff;border-radius:32px;color:#fff;text-align:center;text-shadow:0 4px 0 rgba(0,0,0,.18);box-shadow:0 18px 0 rgba(0,0,0,.16);transform:translate(-50%,-50%);animation:pkScorePop .85s ease both}.pk-score-pop.blue{background:linear-gradient(135deg,#2563eb,#22d3ee)}.pk-score-pop.red{background:linear-gradient(135deg,#dc2626,#fb7185)}.pk-score-pop b{font-size:34px}.pk-score-pop strong{font-size:82px;line-height:.9}.pk-team.pk-scored{animation:pkTeamScore .62s ease}
.countdown-warning{display:inline-grid!important;place-items:center;min-width:96px;border-radius:999px;background:linear-gradient(135deg,#ef4444,#ff9f1c)!important;color:#fff!important;box-shadow:0 0 0 6px rgba(239,68,68,.18),0 0 30px rgba(239,68,68,.76),inset 0 -4px 0 rgba(0,0,0,.16)!important;animation:countdownPulse .72s ease-in-out infinite}
.countdown-big{position:fixed;z-index:80;left:50%;top:42%;display:grid;place-items:center;width:clamp(150px,18vw,260px);height:clamp(150px,18vw,260px);border:10px solid #fff;border-radius:50%;background:radial-gradient(circle at 32% 24%,#fff7b8,#ff9f1c 45%,#ef4444);color:#fff;font-size:clamp(96px,13vw,180px);font-weight:950;line-height:1;text-shadow:0 8px 0 rgba(0,0,0,.2);box-shadow:0 24px 0 rgba(0,0,0,.18),0 0 64px rgba(239,68,68,.72);transform:translate(-50%,-50%) scale(.55);opacity:0;pointer-events:none}
.countdown-big.show{display:none;opacity:0}
@keyframes pkBuzzPulse{50%{transform:scale(1.04);box-shadow:0 9px 0 rgba(0,0,0,.2),0 0 30px rgba(255,255,255,.44)}}
@keyframes pkScorePop{0%{opacity:0;transform:translate(-50%,-50%) scale(.65) rotate(-6deg)}22%{opacity:1;transform:translate(-50%,-50%) scale(1.1) rotate(2deg)}100%{opacity:0;transform:translate(-50%,-70%) scale(1)}}
@keyframes pkTeamScore{50%{transform:scale(1.035);filter:brightness(1.22)}}
@keyframes countdownPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.1);filter:saturate(1.3) brightness(1.05)}}
@keyframes countdownBigPop{0%,100%{transform:translate(-50%,-50%) scale(.9)}50%{transform:translate(-50%,-50%) scale(1.08)}}
@keyframes answerShake{25%{transform:translateX(-6px) rotate(-1.5deg)}50%{transform:translateX(6px) rotate(1.5deg)}75%{transform:translateX(-3px)}}
.pk-arena{display:grid;align-content:center}

.sentence-train{display:grid;grid-template-rows:auto auto auto auto;gap:18px;min-height:100%;align-content:start}
body.arcade2[data-game=sentence] .arcade2-stage{overflow:auto;touch-action:pan-y;-webkit-overflow-scrolling:touch}
body.arcade2[data-game=sentence] .sentence-train .big-prompt.compact{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;width:100%;max-width:none;min-height:62px;margin:0;padding:6px 20px;border-radius:24px;text-align:left}
body.arcade2[data-game=sentence] .sentence-train .big-prompt>div{display:contents}
body.arcade2[data-game=sentence] .sentence-train .big-prompt h2{margin:0;font-size:clamp(22px,2vw,30px);line-height:1.12;overflow-wrap:anywhere}
body.arcade2[data-game=sentence] .sentence-train .big-prompt span{white-space:nowrap}
body.arcade2[data-game=sentence] .sentence-train .big-prompt button{min-height:36px;margin:0;padding:0 16px;white-space:nowrap}
.train-line{position:relative;display:grid;align-content:center;min-height:190px;padding:28px;border-radius:34px;background:linear-gradient(180deg,rgba(255,255,255,.6),rgba(255,255,255,.28));overflow:hidden}
.train-line>i{position:absolute;left:3%;right:3%;bottom:38px;height:8px;border-radius:999px;background:repeating-linear-gradient(90deg,#4f7cff 0 26px,#fff 26px 42px)}
.train-convoy{position:relative;z-index:1;display:flex;align-items:flex-end;justify-content:center;gap:12px;width:100%;transform:translateX(0);transform-style:preserve-3d}
.train-engine{position:relative;display:block;flex:0 0 166px;width:166px;height:104px;transform:perspective(420px) rotateY(-9deg) rotateX(3deg) scale(1.12);transform-style:preserve-3d;filter:drop-shadow(0 10px 0 rgba(20,29,48,.2));isolation:isolate}
.train-engine>span,.train-engine>.engine-wheel{position:absolute;display:block}
.engine-cabin{z-index:2;left:20px;top:14px;width:52px;height:48px;border:4px solid #ffe08a;border-radius:12px 12px 5px 5px;background:linear-gradient(145deg,#ff8c42 0%,#e94839 52%,#a82739 100%);box-shadow:inset 6px 0 rgba(255,255,255,.22),inset -8px -3px rgba(80,13,31,.28),5px 6px 0 #78283a;transform:translateZ(7px)}
.engine-cabin i{position:absolute;left:8px;top:7px;width:27px;height:21px;border:3px solid #fff0bd;border-radius:5px;background:linear-gradient(145deg,#9ff1ff,#4084cf);box-shadow:inset -5px -4px rgba(14,56,113,.28)}
.engine-boiler{z-index:3;left:58px;top:39px;width:76px;height:31px;border:4px solid #ffe08a;border-radius:18px 24px 10px 10px;background:linear-gradient(180deg,#ffca5c 0%,#f47b36 40%,#bd3441 100%);box-shadow:inset 0 6px rgba(255,255,255,.32),inset 0 -7px rgba(92,19,44,.23),0 7px 0 #7f2b3c;transform:translateZ(12px)}
.engine-nose{z-index:4;left:119px;top:48px;width:29px;height:25px;border:4px solid #ffe08a;border-radius:7px 13px 7px 4px;background:linear-gradient(145deg,#ffdf70,#ef7835);box-shadow:inset -5px -5px rgba(133,42,36,.2),4px 5px 0 #832f3b;transform:translateZ(16px)}
.engine-nose::after{content:"";position:absolute;right:3px;top:5px;width:9px;height:9px;border:2px solid #fff8cb;border-radius:50%;background:#fff3a1;box-shadow:0 0 10px #ffe38a}
.engine-stack{z-index:4;left:104px;top:18px;width:17px;height:27px;border:3px solid #ffe08a;border-radius:5px 5px 2px 2px;background:linear-gradient(90deg,#813148,#e65036 55%,#8e2940);box-shadow:inset 4px 0 rgba(255,255,255,.22),3px 4px 0 #76283b;transform:translateZ(10px)}
.engine-stack::before{content:"";position:absolute;left:-5px;top:-5px;width:21px;height:7px;border-radius:5px;background:linear-gradient(180deg,#ffdb75,#d84b39);box-shadow:0 2px 0 #86283a}
.engine-wheel{z-index:5;bottom:14px;width:25px;height:25px;border:4px solid #f9dc89;border-radius:50%;background:radial-gradient(circle,#69bde8 0 22%,#27405d 25% 58%,#172538 60%);box-shadow:0 4px 0 #172538,0 0 0 2px rgba(255,255,255,.32);transform:translateZ(18px)}
.engine-wheel::after{content:"";position:absolute;left:7px;top:2px;width:4px;height:12px;border-radius:4px;background:#ffe79a;transform:rotate(35deg)}
.engine-wheel.wheel-one{left:28px;width:22px;height:22px}.engine-wheel.wheel-two{left:76px}.engine-wheel.wheel-three{left:111px}
.train-engine::before,.train-engine::after{content:"";position:absolute;z-index:-1;left:109px;top:0;width:21px;height:19px;border-radius:50%;background:rgba(255,255,255,.82);filter:blur(1px);opacity:0;transform:translate(0,10px) scale(.55)}
.train-track{flex:1 1 520px;min-width:0;margin:0;max-width:980px}
.train-track span::after{content:"";position:absolute;left:18px;right:18px;bottom:-18px;height:18px;background:radial-gradient(circle at 20% 50%,#26324a 0 6px,transparent 7px),radial-gradient(circle at 80% 50%,#26324a 0 6px,transparent 7px)}
.train-track span.filled{color:#fff}
.train-track span.ok{background:linear-gradient(135deg,#2563eb,#19c79f)}
.train-track span.wrong{background:linear-gradient(135deg,#ef4444,#ff7a59);animation:answerShake .28s ease both}
.sentence-complete .train-convoy{animation:trainDepart3D 1.28s cubic-bezier(.38,.02,.76,.32) forwards}
.sentence-complete .train-track span.ok{background:linear-gradient(135deg,#ffd166,#19c79f,#4f7cff);box-shadow:0 8px 0 rgba(0,0,0,.1),0 0 26px rgba(255,209,102,.92);animation:trainCarSpark .55s ease both}
.sentence-complete .train-engine{animation:engineRumble .2s ease-in-out 3 alternate}
.sentence-complete .train-engine::before{animation:steamPuff .68s ease-out .15s 2 both}
.sentence-complete .train-engine::after{animation:steamPuff .68s ease-out .43s 2 both}
.sentence-complete .engine-wheel{animation:wheelSpin .24s linear 5}
.sentence-feedback{min-height:30px;margin:0 auto;padding:5px 14px;border-radius:999px;background:rgba(255,255,255,.78);color:#17203a;font-size:15px;font-weight:950;text-align:center;box-shadow:0 4px 0 rgba(0,0,0,.08)}
@keyframes trainDepart3D{0%{transform:translate3d(0,0,0) rotateY(0) scale(1)}9%{transform:translate3d(-18px,-2px,0) rotateY(-2deg) scale(1.02)}20%{transform:translate3d(12px,0,0) rotateY(1deg) scale(1.03)}100%{transform:translate3d(112vw,-26px,-90px) rotateY(-8deg) scale(.78)}}
@keyframes engineRumble{to{filter:brightness(1.18) drop-shadow(0 13px 0 rgba(20,29,48,.24));transform:perspective(420px) rotateY(-12deg) rotateX(5deg) translateY(-4px) scale(1.12)}}
@keyframes trainCarSpark{50%{filter:brightness(1.25);transform:translateY(-8px)}}
@keyframes wheelSpin{to{transform:translateZ(18px) rotate(360deg)}}
@keyframes steamPuff{to{opacity:.72;transform:translate(28px,-24px) scale(1.45)}}
@media(max-width:760px){body.arcade2[data-game=sentence] .sentence-train .big-prompt.compact{grid-template-columns:1fr auto;padding:10px 14px}body.arcade2[data-game=sentence] .sentence-train .big-prompt>div{display:block}body.arcade2[data-game=sentence] .sentence-train .big-prompt h2{font-size:clamp(23px,5vw,34px)}.train-engine{flex-basis:126px;width:126px;height:94px;transform:scale(.82);transform-origin:left bottom}.train-track{flex-basis:420px;max-width:100%}.train-convoy{gap:4px}}
@media(prefers-reduced-motion:reduce){.sentence-complete .train-convoy,.sentence-complete .train-engine,.sentence-complete .train-engine::before,.sentence-complete .train-engine::after{animation-duration:.01ms!important}}

/* Sentence train: make the prompt and audio control read clearly while the word wagons form one convoy. */
body.arcade2[data-game=sentence] .sentence-train .big-prompt.compact{display:flex;box-sizing:border-box;width:100%;flex-direction:column;justify-content:center;gap:10px;min-height:112px;padding:12px 20px;text-align:center}
body.arcade2[data-game=sentence] .sentence-train .big-prompt>div{display:block}
body.arcade2[data-game=sentence] .sentence-train .big-prompt span{display:block;font-size:15px;line-height:1.1}
body.arcade2[data-game=sentence] .sentence-train .big-prompt h2{margin:5px auto 0;font-size:clamp(30px,3.4vw,44px);line-height:1.18;text-align:center;overflow-wrap:anywhere}
body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn{min-height:48px;margin:0;padding:0 24px;border:2px solid #fff3bd;border-radius:16px;color:#fff;background:linear-gradient(180deg,#48a9ff 0%,#2075e2 56%,#1553b4 100%);box-shadow:0 7px 0 #103d88,0 10px 18px rgba(16,61,136,.25),inset 0 2px 0 rgba(255,255,255,.58);font-size:17px;font-weight:950;text-shadow:0 1px 1px rgba(10,40,90,.25);transition:transform .12s ease,box-shadow .12s ease,filter .12s ease}
body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn:hover{filter:brightness(1.08);transform:translateY(-2px);box-shadow:0 9px 0 #103d88,0 13px 20px rgba(16,61,136,.27),inset 0 2px 0 rgba(255,255,255,.65)}
body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn:active{transform:translateY(5px);box-shadow:0 2px 0 #103d88,inset 0 2px 4px rgba(8,37,83,.2)}
body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn span{display:inline;margin-right:8px;color:inherit;font-size:18px}
.train-convoy{gap:0}
.train-engine{flex-basis:230px;width:230px;height:150px;transform:none;filter:drop-shadow(0 10px 8px rgba(20,29,48,.22))}
.train-engine>img{display:block;width:100%;height:100%;object-fit:contain}
.train-track{display:flex;flex:1 1 520px;flex-wrap:wrap;align-content:flex-end;justify-content:flex-start;gap:13px 22px;min-width:0;margin:0;max-width:980px;padding-bottom:14px}
.train-track span{position:relative;flex:0 1 126px;min-width:96px;min-height:58px;margin:0;border:3px solid #fff0b5;border-radius:12px 12px 9px 9px;background:linear-gradient(180deg,#85dcff 0%,#43a8df 48%,#287ac1 49%,#1a5799 100%);color:#fff;text-align:center;text-shadow:0 2px 1px rgba(17,53,91,.45);box-shadow:inset 0 5px 0 rgba(255,255,255,.3),inset 0 -6px 0 rgba(11,49,92,.24),0 8px 0 rgba(21,44,71,.2);}
.train-track span::before{content:"";position:absolute;left:-24px;top:50%;width:22px;height:7px;border:2px solid #7d552d;border-radius:6px;background:linear-gradient(180deg,#ffe18b,#b77a3b);transform:translateY(-50%);box-shadow:0 2px 0 rgba(45,35,27,.28)}
.train-track span::after{left:12px;right:12px;bottom:-17px;height:12px;background:radial-gradient(circle at 18% 50%,#25374a 0 5px,transparent 6px),radial-gradient(circle at 82% 50%,#25374a 0 5px,transparent 6px)}
.train-track span.filled{color:#fff}
.sentence-feedback{display:grid;place-items:center;min-height:38px;padding:7px 18px;font-size:18px}
@media(max-width:760px){body.arcade2[data-game=sentence] .sentence-train .big-prompt.compact{grid-template-columns:1fr;padding:11px 12px}.train-line{min-height:170px;padding:18px 12px}.train-engine{flex-basis:150px;width:150px;height:112px}.train-track{flex-basis:calc(100% - 150px);gap:10px 18px}.train-track span{flex-basis:100px;min-width:80px;min-height:52px;padding:11px 10px;font-size:18px}.sentence-feedback{font-size:16px}}

.police-stage{grid-template-columns:minmax(0,1fr) 310px;gap:14px}
body.arcade2[data-game=police] .arcade2-stage{padding:14px 18px 18px;overflow:hidden}
.police-table{padding:12px;border:8px solid rgba(255,219,128,.78);border-radius:34px;background:radial-gradient(ellipse at 50% 46%,rgba(255,231,166,.18),transparent 47%),linear-gradient(145deg,rgba(29,25,39,.97),rgba(86,39,59,.94) 58%,rgba(24,38,68,.98));box-shadow:inset 0 0 0 3px rgba(255,255,255,.14),inset 0 0 42px rgba(255,209,102,.18),0 22px 0 rgba(25,15,28,.24)}
.police-board-wrap{display:grid;grid-template-rows:auto auto;align-content:center;gap:12px;min-width:0}
.police-board-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:12px 18px;border:3px solid rgba(255,228,148,.62);border-radius:24px;background:linear-gradient(135deg,rgba(255,255,255,.18),rgba(255,255,255,.08));color:#fff;box-shadow:0 8px 0 rgba(0,0,0,.18)}
.police-board-head span{padding:7px 13px;border-radius:999px;background:#ffd166;color:#382100;font-weight:950}.police-board-head strong{font-size:28px;text-align:center}.police-board-head em{font-style:normal;font-weight:950;color:#ffe9a6}
.police-route{position:relative;display:grid;grid-template-columns:repeat(var(--police-cols,8),minmax(54px,1fr));gap:9px;align-content:center;min-height:0;padding:16px;border:4px solid rgba(211,170,89,.7);border-radius:28px;background:radial-gradient(ellipse at center,rgba(255,225,154,.16),rgba(255,255,255,.03) 62%,rgba(0,0,0,.1)),linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.03));box-shadow:inset 0 0 26px rgba(255,209,102,.16),inset 0 0 0 5px rgba(36,22,30,.3)}
.police-route::before{content:"";position:absolute;inset:9px;border:2px solid rgba(255,226,142,.34);border-radius:22px;pointer-events:none}
.police-tile{position:relative;display:grid;place-items:center;aspect-ratio:.82;border:4px solid rgba(255,226,142,.9);border-radius:18px;background:linear-gradient(145deg,#fff5d0,#d7a744);color:#523316;font-size:20px;font-weight:950;box-shadow:0 10px 0 rgba(0,0,0,.3),inset 0 0 0 3px rgba(255,255,255,.4),inset 0 -18px 26px rgba(90,47,20,.16);transform:perspective(420px) rotateX(4deg)}
.police-tile::before{content:"";position:absolute;inset:7px;border:2px solid rgba(103,62,24,.28);border-radius:13px;pointer-events:none}
.police-tile::after{content:"令";position:absolute;right:9px;bottom:6px;color:rgba(74,44,19,.28);font-size:22px;font-weight:950}
.police-tile:nth-child(2n){background:linear-gradient(145deg,#ffe3ea,#db7f93)}.police-tile:nth-child(3n){background:linear-gradient(145deg,#d9f2ff,#54a8d9)}
.police-tile b{position:absolute;left:9px;top:7px;z-index:1;font-size:13px;opacity:.72}
.police-token{position:absolute;z-index:4;left:50%;top:50%;display:grid;place-items:center;width:min(66px,76%);height:min(66px,76%);border:5px solid #fff;border-radius:50%;font-style:normal;font-size:30px;font-weight:950;color:#fff;text-shadow:0 3px 0 rgba(0,0,0,.22);transform:translate(-50%,-50%);box-shadow:0 10px 0 rgba(0,0,0,.24),0 0 18px rgba(255,255,255,.56)}
.cop-token{background:linear-gradient(145deg,#2563eb,#22d3ee)}.thief-token{background:linear-gradient(145deg,#ef4444,#fb7185)}
.police-tile.cop.thief .cop-token{transform:translate(-68%,-50%)}.police-tile.cop.thief .thief-token{transform:translate(-32%,-50%)}
.police-tile.just-moved{outline:7px solid rgba(255,209,102,.9);filter:brightness(1.12)}
.police-tile.just-moved.cop.thief{outline:9px solid rgba(239,68,68,.95);box-shadow:0 10px 0 rgba(0,0,0,.3),0 0 42px rgba(239,68,68,.85),inset 0 0 0 4px rgba(255,255,255,.55);animation:policeCatchTile .72s ease-in-out infinite}
.police-tile.just-moved.cop.thief::after{content:"抓住了";z-index:6;right:auto;bottom:auto;left:50%;top:-28px;min-width:96px;padding:5px 10px;border:4px solid #fff;border-radius:999px;background:linear-gradient(135deg,#ef4444,#ff9f1c);color:#fff;font-size:20px;text-align:center;text-shadow:0 3px 0 rgba(0,0,0,.2);transform:translateX(-50%) rotate(-5deg);box-shadow:0 8px 0 rgba(0,0,0,.18)}
.police-tile.just-moved .police-token{animation:policeStep .36s ease both}
.police-tile.just-moved.cop.thief .police-token{animation:policeCatchToken .62s ease-in-out infinite}
.police-console{display:grid;align-content:start;gap:7px;padding:12px!important;border:4px solid rgba(255,226,142,.72);border-radius:28px!important;background:linear-gradient(180deg,rgba(255,252,232,.96),rgba(255,238,198,.88))!important;color:#17203a!important}
.police-role-art{width:100%;height:102px;margin:0;border-radius:18px;background:url("../assets/images/games/generated/police-thief-characters.png") center/cover;box-shadow:0 7px 0 rgba(0,0,0,.14)}
.police-console h2{margin:0;font-size:29px}.police-console p{margin:0;color:#5b6478;font-weight:900;line-height:1.28}
.dice-real{position:relative;width:98px;height:98px;margin:0 auto;border:7px solid #fff;border-radius:22px;background:linear-gradient(145deg,#fff,#f1f5ff);color:transparent;box-shadow:0 8px 0 rgba(0,0,0,.2),inset 0 0 0 3px #dbeafe}
.dice-real.rolling{animation:diceTumble .12s linear infinite;filter:drop-shadow(0 0 18px rgba(255,209,102,.8))}
.dice-real span{display:grid;place-items:center;width:100%;height:100%;color:#17203a;font-size:54px;font-weight:950}.dice-real::before{content:"";position:absolute;inset:0;background:no-repeat center/100% 100%}
.dice-real.d1 span,.dice-real.d2 span,.dice-real.d3 span,.dice-real.d4 span,.dice-real.d5 span,.dice-real.d6 span{display:none}
.dice-real.d1::before{background-image:radial-gradient(circle at 50% 50%,#17203a 0 10px,transparent 11px)}
.dice-real.d2::before{background-image:radial-gradient(circle at 30% 30%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 70% 70%,#17203a 0 9px,transparent 10px)}
.dice-real.d3::before{background-image:radial-gradient(circle at 28% 28%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 50% 50%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 72% 72%,#17203a 0 9px,transparent 10px)}
.dice-real.d4::before{background-image:radial-gradient(circle at 30% 30%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 70% 30%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 30% 70%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 70% 70%,#17203a 0 9px,transparent 10px)}
.dice-real.d5::before{background-image:radial-gradient(circle at 30% 30%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 70% 30%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 50% 50%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 30% 70%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 70% 70%,#17203a 0 9px,transparent 10px)}
.dice-real.d6::before{background-image:radial-gradient(circle at 30% 25%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 70% 25%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 30% 50%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 70% 50%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 30% 75%,#17203a 0 9px,transparent 10px),radial-gradient(circle at 70% 75%,#17203a 0 9px,transparent 10px)}
.police-console button{min-height:38px;border:0;border-radius:14px;background:#fff;color:#17203a;font-weight:950;box-shadow:0 5px 0 rgba(0,0,0,.13)}
.police-console button:disabled{opacity:.48;filter:grayscale(.25);transform:none;cursor:not-allowed}
.police-map-tip{display:block;margin-top:-2px;color:#6b7280;font-size:12px;font-weight:900;line-height:1.35;text-align:center}
.police-dice-btn{min-height:50px!important;font-size:21px!important;border-radius:18px!important}
.police-score-card{display:grid;grid-template-columns:1fr auto 1fr auto;align-items:center;gap:6px;margin-top:0;padding:8px 10px;border-radius:16px;background:rgba(255,255,255,.7);font-weight:950}.police-score-card span{color:#ef4444;font-size:21px}
.police-challenge-layer{position:fixed;inset:0;z-index:70;display:grid;place-items:center;padding:22px;background:rgba(13,19,32,.58);backdrop-filter:blur(4px)}
.police-challenge-card{position:relative;width:min(620px,92vw);padding:30px;border:8px solid #fff;border-radius:34px;background:linear-gradient(145deg,#fff8dd,#fff);color:#17203a;text-align:center;box-shadow:0 24px 0 rgba(0,0,0,.22),0 0 48px rgba(255,209,102,.48)}
.police-challenge-card.cop{outline:8px solid rgba(37,99,235,.42)}.police-challenge-card.thief{outline:8px solid rgba(239,68,68,.42)}
.police-challenge-card>button{position:absolute;right:16px;top:14px;width:42px;height:42px;border:0;border-radius:50%;background:#17203a;color:#fff;font-size:24px;font-weight:950}
.police-challenge-card span{display:inline-block;padding:8px 16px;border-radius:999px;background:#ffd166;color:#412800;font-weight:950}.police-challenge-card h2{margin:14px 0 10px;font-size:34px}.police-challenge-card p{margin:0 auto 12px;font-size:clamp(44px,7vw,76px);font-weight:950;line-height:1.05}.police-challenge-card strong{display:block;margin:8px auto 14px;color:#2563eb;font-size:44px}
.police-challenge-tools,.police-challenge-actions{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin-top:14px}.police-challenge-tools button,.police-challenge-actions button{min-height:52px;border:0;border-radius:999px;padding:0 20px;background:#fff;color:#17203a;font-size:18px;font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.13)}.police-challenge-actions .primary{background:linear-gradient(135deg,#2563eb,#19c79f);color:#fff}
@keyframes diceTumble{to{transform:rotate(18deg) scale(1.04)}}
@keyframes policeStep{0%{transform:translate(-50%,-50%) scale(.82) rotate(-8deg)}55%{transform:translate(-50%,-82%) scale(1.18) rotate(5deg)}100%{transform:translate(-50%,-50%) scale(1)}}
@keyframes policeCatchTile{50%{transform:perspective(420px) rotateX(4deg) scale(1.04);filter:brightness(1.22)}}
@keyframes policeCatchToken{0%,100%{filter:brightness(1)}50%{filter:brightness(1.32);box-shadow:0 10px 0 rgba(0,0,0,.24),0 0 28px rgba(255,255,255,.9)}}

.buzzer-stage{grid-template-columns:minmax(190px,1fr) minmax(420px,1.35fr) minmax(190px,1fr);gap:18px}.buzzer-console{display:grid;align-content:center;gap:14px}
.buzzer-console .big-prompt{width:100%;box-sizing:border-box}.buzzer-console #answerLine{font-size:clamp(32px,5vw,64px);font-weight:950;color:var(--a-blue)}
.judge{min-height:92px;display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;color:#17203a;font-weight:950}.judge b{font-size:28px;color:var(--a-red)}
.battle-buzzer{position:relative;isolation:isolate}
.battle-buzzer::before{content:"";position:absolute;inset:3%;z-index:0;border-radius:38px;background:radial-gradient(circle at 18% 42%,rgba(79,124,255,.22),transparent 24%),radial-gradient(circle at 82% 42%,rgba(255,96,125,.22),transparent 24%),linear-gradient(180deg,rgba(255,255,255,.38),rgba(255,255,255,.12));pointer-events:none}
.battle-team,.battle-console{position:relative;z-index:1}
.battle-team{min-height:430px;padding:18px;border:7px solid rgba(255,255,255,.82);overflow:hidden}
.battle-team::after{content:"";position:absolute;left:14%;right:14%;bottom:24px;height:16px;border-radius:50%;background:rgba(0,0,0,.18);filter:blur(5px)}
.battle-team h2{margin:4px 0 0;font-size:34px;text-shadow:0 4px 0 rgba(0,0,0,.18)}
.battle-team strong{font-size:70px;line-height:1;text-shadow:0 6px 0 rgba(0,0,0,.16)}
.battle-team small{font-size:16px;font-weight:950;opacity:.9}
.battle-team button{position:relative;z-index:2;min-width:190px!important;min-height:78px!important;background:rgba(255,255,255,.22)!important}
.battle-team button:disabled{opacity:.5;filter:grayscale(.2)}
.team-avatar{position:relative;width:136px;height:152px;border:8px solid #fff;border-radius:36px 36px 30px 30px;background:linear-gradient(180deg,#fff,#dbeafe);box-shadow:0 14px 0 rgba(0,0,0,.16),inset 0 -24px 0 rgba(0,0,0,.08)}
.team-avatar::before{content:"";position:absolute;left:50%;top:16px;width:62px;height:62px;border-radius:20px;background:#ffe0a8;transform:translateX(-50%);box-shadow:inset 0 -8px 0 rgba(0,0,0,.08)}
.team-avatar::after{content:"";position:absolute;left:30px;right:30px;top:88px;height:44px;border-radius:16px;background:currentColor;box-shadow:inset 0 -10px 0 rgba(0,0,0,.14)}
.team-avatar i{position:absolute;left:45px;top:40px;width:10px;height:10px;border-radius:50%;background:#17203a;box-shadow:36px 0 0 #17203a,18px 24px 0 3px #ef4444}
.blue-avatar{color:#2563eb}.red-avatar{color:#ef4444}
.battle-vs{position:absolute;left:50%;top:-16px;z-index:3;display:grid;place-items:center;width:92px;height:92px;border:8px solid #fff;border-radius:50%;background:linear-gradient(135deg,#ffd166,#ff607d);color:#fff;font-size:34px;font-weight:950;text-shadow:0 4px 0 rgba(0,0,0,.2);transform:translateX(-50%) rotate(-8deg);box-shadow:0 12px 0 rgba(0,0,0,.15)}
.battle-question{min-height:250px;background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(255,255,255,.72))!important}
.battle-question h2{font-size:clamp(28px,3.5vw,48px)}
.battle-question strong{display:block;margin-top:12px;color:#2563eb;font-size:44px}
.battle-judge{border:5px solid rgba(255,255,255,.72);background:rgba(255,255,255,.78);box-shadow:0 10px 0 rgba(0,0,0,.08)}
.battle-judge button{min-height:54px;border:0;border-radius:999px;padding:0 18px;background:#fff;color:#17203a;font-size:17px;font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.13)}
.battle-buzzer.attack-blue .blue-avatar{animation:battleAttackBlue .72s ease both}.battle-buzzer.attack-red .red-avatar{animation:battleAttackRed .72s ease both}
.battle-buzzer.hit-blue .blue-avatar,.battle-buzzer.hit-red .red-avatar{animation:battleHit .72s ease both}
.battle-buzzer.attack-blue::after,.battle-buzzer.attack-red::after{content:"";position:absolute;top:43%;z-index:2;width:34%;height:24px;border-radius:999px;background:linear-gradient(90deg,#fff,rgba(255,209,102,.95),rgba(255,96,125,.75));box-shadow:0 0 30px rgba(255,209,102,.8);animation:battleBeam .62s ease both}
.battle-buzzer.attack-blue::after{left:22%;transform-origin:left center}.battle-buzzer.attack-red::after{right:22%;transform-origin:right center;transform:scaleX(-1)}
@keyframes battleAttackBlue{45%{transform:translateX(70px) translateY(-8px) rotate(6deg) scale(1.08)}}
@keyframes battleAttackRed{45%{transform:translateX(-70px) translateY(-8px) rotate(-6deg) scale(1.08)}}
@keyframes battleHit{20%,60%{transform:translateX(-12px) rotate(-4deg);filter:brightness(1.25)}40%,80%{transform:translateX(12px) rotate(4deg);filter:brightness(.85)}}
@keyframes battleBeam{from{opacity:0;transform:scaleX(.15)}55%{opacity:1}to{opacity:0;transform:scaleX(1)}}

.recite-stage{grid-template-columns:340px 1fr}.recite-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px}.recite-tools button{min-height:42px;border:0;border-radius:14px;background:#fff;color:var(--a-ink);font-weight:950;box-shadow:0 5px 0 rgba(0,0,0,.1)}.recite-tools button:last-child{grid-column:1 / -1}
.recite-draw>div{min-height:300px;background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,255,255,.7))}
.recite-big-btn{min-height:104px!important;font-size:34px!important;border-radius:28px!important}
.draw-cards .stop{background:linear-gradient(135deg,#ef4444,#ff9f1c)!important;color:#fff!important;box-shadow:0 12px 0 rgba(120,20,20,.22),0 0 28px rgba(255,96,125,.35)!important}
@keyframes reciteStopPulse{50%{box-shadow:0 12px 0 rgba(120,20,20,.22),0 0 28px rgba(255,96,125,.45)}}

.fruit-stage{display:grid;grid-template-rows:auto 1fr;gap:16px}
.fruit-target{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:14px;padding:16px 22px;border:4px solid rgba(255,255,255,.72);border-radius:28px;background:rgba(255,255,255,.78);box-shadow:0 14px 0 rgba(15,35,70,.1)}
.fruit-target span{color:var(--a-red);font-weight:950}.fruit-target h2{margin:4px 0 0;font-size:clamp(34px,5vw,64px)}.fruit-target button{min-height:46px;border:0;border-radius:999px;padding:0 18px;background:#fff;color:var(--a-ink);font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.12)}
.fruit-stage .fruit-field{height:auto;border:4px solid rgba(255,255,255,.38);background:linear-gradient(180deg,rgba(80,180,110,.22),rgba(255,255,255,.2))}
.fruit-stage .fruit-card{background:radial-gradient(circle at 30% 28%,rgba(255,255,255,.72) 0 14%,transparent 15%),linear-gradient(135deg,#ff5d78,#ffd166)}

.link-stage{position:relative;grid-template-columns:minmax(250px,1fr) minmax(150px,190px) minmax(250px,1fr);align-items:stretch;padding:12px;gap:18px;overflow:hidden}
body.arcade2[data-game=link] .arcade2-stage{overflow:hidden}
.link-col{position:relative;z-index:2;display:grid;grid-template-rows:auto repeat(6,minmax(0,1fr));gap:10px;min-height:0;padding:14px;border:5px solid rgba(255,255,255,.6);border-radius:28px;background:linear-gradient(180deg,rgba(255,255,255,.42),rgba(255,255,255,.18));box-shadow:0 12px 0 rgba(0,0,0,.08)}
.link-col h3{margin:0;text-align:center;color:var(--a-ink);font-size:20px;font-weight:950}
.link-node{position:relative;display:grid;place-items:center;min-height:0!important;border-radius:20px!important;font-size:clamp(22px,3vw,38px)!important;line-height:1.08;transition:transform .18s ease,opacity .24s ease,filter .24s ease;touch-action:manipulation;user-select:none;cursor:pointer}
.link-node span{display:block;max-width:100%;overflow-wrap:anywhere}
.link-en .link-node{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(216,236,255,.96));color:#2563eb!important}
.link-zh .link-node{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(255,226,234,.96));color:#e11d48!important}
.link-node.sel{outline:6px solid var(--a-yellow)!important;transform:translateY(-4px) scale(1.02);box-shadow:0 12px 0 rgba(0,0,0,.13),0 0 28px rgba(255,209,102,.72)!important}
.link-node.done{pointer-events:none}
.link-node.matched-pop{background:linear-gradient(135deg,#22c55e,#19c79f)!important;color:#fff!important;animation:linkCardHit .52s ease both}
.link-node.matched-out{opacity:0;transform:scale(.72) translateY(-14px);visibility:hidden}
.link-node.bad{background:linear-gradient(135deg,#ef4444,#ff7a59)!important;color:#fff!important;animation:answerShake .28s ease both}
.link-center{position:relative;z-index:2;display:grid;place-items:center;align-content:center;gap:10px;min-height:100%;border:4px solid rgba(255,255,255,.7);border-radius:28px;background:rgba(255,255,255,.72);box-shadow:0 12px 0 rgba(0,0,0,.09)}
.link-center span{color:var(--a-sub);font-weight:950}.link-center strong{font-size:58px;color:var(--a-green);line-height:1}.link-center em{font-style:normal;color:var(--a-red);font-weight:950}.link-center button{min-height:42px;border:0;border-radius:999px;padding:0 16px;background:#fff;color:var(--a-ink);font-weight:950;box-shadow:0 5px 0 rgba(0,0,0,.1)}
#lines{position:absolute;inset:0;z-index:3;width:100%;height:100%;overflow:visible;pointer-events:none}
#lines line{stroke:rgba(255,209,102,.98);stroke-width:11;stroke-linecap:round;filter:drop-shadow(0 0 12px rgba(255,209,102,.95));stroke-dasharray:900;stroke-dashoffset:900;animation:linkDraw .45s ease forwards}
#lines line.fade{animation:linkFade .28s ease forwards}
@keyframes linkDraw{to{stroke-dashoffset:0}}
@keyframes linkFade{to{opacity:0;stroke-width:18px}}
@keyframes linkCardHit{45%{transform:scale(1.08);filter:brightness(1.12)}}

.tense-stage{display:grid;align-content:center;gap:16px}.tense-filter{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.tense-filter i{padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.7);color:var(--a-sub);font-style:normal;font-weight:900}.tense-filter i.target{background:linear-gradient(135deg,#111827,#ef4444);color:#fff}
.tense-bubble-game{align-content:stretch;gap:18px;padding:14px;background:linear-gradient(135deg,rgba(255,244,249,.94),rgba(224,247,255,.94));border:5px solid rgba(255,255,255,.88);border-radius:30px;box-shadow:0 18px 0 rgba(0,0,0,.08)}
.tense-hud{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:18px}
.tense-hud>div{display:flex;align-items:center;justify-content:center;gap:12px;min-height:60px;border-radius:18px;background:#fff;color:#49394e;font-weight:950;box-shadow:0 8px 0 rgba(0,0,0,.08)}
.tense-hud span{font-size:22px}.tense-hud b{font-size:24px;color:#ef5da8}
.tense-board{position:relative;display:grid;place-items:center;gap:12px;min-height:270px;padding:28px;border-radius:28px;background:linear-gradient(100deg,rgba(255,255,255,.72),rgba(221,247,255,.75));overflow:hidden}
.tense-board::before,.tense-board::after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.58);filter:blur(.2px)}
.tense-board::before{width:72px;height:72px;left:10%;top:14%}.tense-board::after{width:48px;height:48px;right:14%;bottom:20%}
.tense-command{position:relative;z-index:1;width:min(760px,100%);padding:14px;border-radius:18px;background:rgba(255,255,255,.72);text-align:center;color:#5b4058;font-size:22px;font-weight:950}
.tense-board h2{position:relative;z-index:1;margin:0;text-align:center;color:#5b4058;font-size:clamp(34px,4vw,58px);line-height:1.18}
.tense-board p{position:relative;z-index:1;margin:0;color:#64748b;font-size:18px;font-weight:900}
.tense-tag{position:relative;z-index:1;width:min(720px,100%);min-height:32px;border-radius:999px;background:linear-gradient(90deg,#ef5da8,#63c9f4);color:#fff;text-align:center;font-weight:950;line-height:32px}
.tense-explain{position:relative;z-index:1;min-height:30px;color:#17233d;font-weight:950}.tense-explain small{display:block;margin-top:4px;color:#64748b}
.tense-bubbles{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:18px}
.tense-bubble{position:relative;min-height:92px;border:4px solid #fff;border-radius:28px;background:radial-gradient(circle at 20% 18%,rgba(255,255,255,.9) 0 18%,transparent 19%),linear-gradient(135deg,#fff5b8,#a9edf4);color:#5b4058;font-size:clamp(22px,2.4vw,34px);font-weight:950;line-height:1.05;box-shadow:0 9px 0 rgba(73,57,78,.2),0 16px 24px rgba(37,99,235,.12);cursor:pointer;touch-action:manipulation;transition:transform .16s ease,filter .16s ease}
.tense-bubble:hover{transform:translateY(-4px)}
.tense-bubble.right{background:linear-gradient(135deg,#22c55e,#67e8f9);color:#fff;animation:linkCardHit .48s ease both}
.tense-bubble.wrong{background:linear-gradient(135deg,#ef4444,#ff8a8a);color:#fff;animation:answerShake .28s ease both}
.tense-actions button.active{background:linear-gradient(135deg,#ef5da8,#63c9f4);color:#fff}

.quick-stage .quick-card{background:linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,255,255,.7));border:5px solid rgba(255,255,255,.74)}
.quick-card strong{font-size:clamp(30px,5vw,64px);color:var(--a-red)}.quick-actions button:nth-child(2){background:#fff7d6;color:#714900}
.quick-arena{position:relative;display:grid;grid-template-rows:auto 1fr auto;gap:16px;padding:18px;border:6px solid rgba(255,255,255,.82);border-radius:34px;background:radial-gradient(circle at 12% 24%,rgba(255,209,102,.28),transparent 20%),radial-gradient(circle at 88% 20%,rgba(79,124,255,.24),transparent 22%),linear-gradient(135deg,rgba(232,244,255,.78),rgba(255,244,250,.86))}
.quick-hero-card{position:relative;min-height:390px;overflow:hidden;background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(255,255,255,.68))!important}
.quick-hero-card::before{content:"";position:absolute;left:28px;bottom:24px;width:170px;height:190px;border-radius:42px;background:linear-gradient(180deg,#7dd3fc,#2563eb);box-shadow:0 14px 0 rgba(0,0,0,.14),inset 0 -28px 0 rgba(0,0,0,.1)}
.quick-hero-card::after{content:"GO";position:absolute;right:34px;top:36px;display:grid;place-items:center;width:120px;height:120px;border:7px solid #fff;border-radius:36px;background:linear-gradient(135deg,#ffd166,#ff607d);color:#fff;font-size:42px;font-weight:950;transform:rotate(8deg);box-shadow:0 12px 0 rgba(0,0,0,.14)}
.quick-hero-card>*{position:relative;z-index:1}
.quick-hero-card h2{text-shadow:0 6px 0 rgba(255,255,255,.85)}
.quick-hero-card>button{min-width:148px;min-height:44px;border:0;border-radius:999px;background:linear-gradient(135deg,#ffd166,#ff7b9c);color:#fff;font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.12)}
.quick-pause-layer{position:absolute;inset:0;z-index:4;display:grid;place-items:center;align-content:center;gap:12px;background:rgba(16,32,64,.74);color:#fff;text-align:center;backdrop-filter:blur(3px)}
.quick-pause-layer b{font-size:clamp(36px,6vw,76px)}.quick-pause-layer small{font-size:20px;font-weight:950}
.quick-paused .quick-hero-card{outline:8px solid rgba(255,209,102,.9)}
.quick-actions button{box-shadow:0 8px 0 rgba(0,0,0,.12)}.quick-actions button:first-child{background:#ffe4e6;color:#be123c}.quick-actions button:nth-child(3){background:linear-gradient(135deg,#2563eb,#19c79f);color:#fff}.quick-actions button:nth-child(4){background:#eef2ff;color:#4338ca}

body.arcade2[data-game=quick] .quick-hero-card{height:auto!important;min-height:0!important;display:grid;grid-template-rows:auto auto auto minmax(72px,1fr) auto auto;justify-items:center;align-content:center;gap:8px;padding:20px 24px 18px}
body.arcade2[data-game=quick] .quick-hero-card::after{width:72px;height:72px;top:14px;right:16px;border-width:4px;border-radius:24px;font-size:26px}
body.arcade2[data-game=quick] .quick-hero-card .quick-prompt{width:min(100%,900px);max-width:calc(100% - 110px);font-size:clamp(38px,6.2vw,82px)!important;line-height:1.08;overflow-wrap:anywhere;word-break:normal;text-align:center}
body.arcade2[data-game=quick] .quick-hero-card p{max-width:100%;line-height:1.35}
body.arcade2[data-game=quick] .quick-hero-card .quick-answer{display:block;max-width:100%;padding:8px 20px;border:2px solid rgba(255,255,255,.9);border-radius:16px;background:linear-gradient(135deg,#fff7d6,#e8fff4);color:#b4233c;font-size:clamp(26px,4vw,48px);line-height:1.25;text-align:center;overflow-wrap:anywhere}
body.arcade2[data-game=quick] .quick-hero-card .quick-answer[hidden]{display:none}
body.arcade2[data-game=quick] #speakQuick{position:relative!important;left:auto!important;bottom:auto!important;transform:none!important;z-index:2!important;margin:0!important;min-width:150px}
body.arcade2[data-game=quick] .quick-arena{grid-template-rows:auto minmax(0,1fr) auto}
@media(max-width:760px){body.arcade2[data-game=quick] .quick-hero-card{padding:18px 14px;gap:7px}body.arcade2[data-game=quick] .quick-hero-card .quick-prompt{max-width:100%;font-size:clamp(34px,9vw,58px)!important}body.arcade2[data-game=quick] .quick-hero-card::after{width:54px;height:54px;top:10px;right:10px;font-size:19px}body.arcade2[data-game=quick] .quick-actions{gap:8px;flex-wrap:wrap}body.arcade2[data-game=quick] .quick-actions button{min-width:calc(50% - 8px);min-height:48px;font-size:16px}}

.bloom-stage{grid-template-columns:310px 1fr}.bloom-play{display:grid;grid-template-rows:1fr auto auto;align-content:center;gap:14px;padding:18px;border-radius:30px;background:rgba(255,255,255,.32)}.bloom-progress{display:flex;justify-content:space-between;gap:8px;margin:12px 0;padding:10px 12px;border-radius:16px;background:#fff;color:var(--a-blue);font-weight:950}.bloomletters{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
.bloom-stable .bloom-play{grid-template-rows:1fr auto auto;overflow:hidden}
.bloom-word-grid{display:grid;align-content:center;gap:12px;min-height:0;padding:14px;border:5px solid rgba(255,255,255,.66);border-radius:28px;background:rgba(255,255,255,.48)}
.bloom-word-row{display:grid;grid-template-columns:42px 1fr;align-items:center;gap:12px}
.bloom-word-row>span{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#4f7cff,#19c79f);color:#fff;font-weight:950}
.bloom-word-row>div{display:flex;flex-wrap:wrap;gap:8px}
.bloom-cell{width:clamp(42px,4.5vw,66px)!important;height:clamp(42px,4.5vw,66px)!important;border:4px solid #fff!important;border-radius:14px!important;background:#fff!important;color:#17233d!important;font-size:clamp(24px,3vw,42px)!important;font-weight:950!important;box-shadow:0 6px 0 rgba(0,0,0,.1)!important}
.bloom-cell.sel{outline:6px solid rgba(255,209,102,.88);background:#fff7d6!important}.bloom-cell.fixed{background:linear-gradient(135deg,#4f7cff,#19c79f)!important;color:#fff!important}.bloom-cell.wrong{background:#ffe4e6!important;color:#be123c!important}
.bloom-stable .bloomletters{max-height:156px;overflow:auto;padding:10px;border-radius:22px;background:rgba(255,255,255,.38)}
.bloom-stable .bloomletters button{width:clamp(44px,4.6vw,64px);height:clamp(44px,4.6vw,64px);font-size:clamp(24px,3vw,40px)}

.wheel-stage{grid-template-columns:1fr 330px}.wheel-show{display:grid;place-items:center;align-content:center;gap:18px}.wheel-used{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:780px;padding:12px 18px;border-radius:999px;background:rgba(255,255,255,.64);font-weight:900}.wheel-used span{padding:6px 10px;border-radius:999px;background:#fff;color:var(--a-blue)}.wheel-used em{color:var(--a-sub);font-style:normal}

@media(max-width:900px){
  .pk-stage,.buzzer-stage,.police-stage,.recite-stage,.bloom-stage,.wheel-stage,.link-stage{grid-template-columns:1fr}
  .unit-bank-layout{grid-template-columns:1fr}
  .tense-hud{grid-template-columns:repeat(2,minmax(0,1fr))}
  .tense-bubbles{grid-template-columns:1fr 1fr}
  .tense-board h2{font-size:32px}
  .pk-team{min-height:150px}
  .meteor-hud,.fruit-target{grid-template-columns:1fr}
}

body.arcade2[data-game=police] .police2 aside::before{
  content:"";
  display:block;
  width:180px;
  height:180px;
  margin:0 auto 12px;
  border-radius:28px;
  background:url("../assets/images/games/generated/police-thief-characters.png") center/cover;
  box-shadow:0 10px 0 rgba(0,0,0,.1);
}
body.arcade2[data-game=police] .police-stage aside::before{display:none}
body.arcade2 .victory{
  background:linear-gradient(180deg,rgba(255,255,255,.3),rgba(19,30,55,.38)),url("../assets/images/games/generated/victory-celebration-bg.png") center/cover;
}
body.arcade2[data-game=police] .victory.police-caught-result section{border:8px solid #ffd166;background:linear-gradient(145deg,#fff7d6,#fff);box-shadow:0 24px 0 rgba(0,0,0,.2),0 0 54px rgba(255,209,102,.82)}
body.arcade2[data-game=police] .victory.police-caught-result h2{color:#ef4444;text-shadow:0 4px 0 rgba(255,209,102,.36);font-size:clamp(48px,7vw,88px)}
body.arcade2[data-game=police] .victory.police-caught-result p{font-size:22px;font-weight:950;line-height:1.7}

body.arcade2[data-game=witch]{
  --a-bg:url("../assets/images/games/premium-v2/witch/witch-premium-bg.png"),linear-gradient(135deg,#120d2b,#20344f);
}
body.arcade2[data-game=witch] .witch-hero{
  background:linear-gradient(180deg,rgba(255,255,255,.72),rgba(255,255,255,.42)),url("../assets/images/games/premium-v2/witch/witch-premium-bg.png") center/cover;
}
body.arcade2[data-game=witch] .witch-magic{
  background:url("../assets/images/games/premium-v2/witch/witch-premium-character.png") center/cover;
}
body.arcade2[data-game=witch] .poison-grid button{
  background:linear-gradient(145deg,rgba(25,19,56,.88),rgba(91,56,145,.78)),url("../assets/images/games/premium-v2/witch/witch-premium-safe-card.png") center/cover;
}
body.arcade2[data-game=witch] .poison-grid .safe{
  background:linear-gradient(145deg,rgba(19,199,159,.84),rgba(255,255,255,.62)),url("../assets/images/games/premium-v2/witch/witch-premium-safe-card.png") center/cover;
  color:#08251e;
  text-shadow:0 1px 0 rgba(255,255,255,.7);
}
body.arcade2[data-game=witch] .poison-grid .poison,
body.arcade2[data-game=witch] .poison-grid .poison-mark{
  background:linear-gradient(145deg,rgba(32,18,54,.3),rgba(130,22,98,.18)),url("../assets/images/games/premium-v2/witch/witch-premium-poison-card.png") center/cover;
  color:#fff;
  text-shadow:0 3px 8px rgba(0,0,0,.75);
}
body.arcade2[data-game=witch] .arcade2-app{
  background:rgba(11,13,32,.46);
  border-color:rgba(255,255,255,.38);
  box-shadow:0 30px 90px rgba(4,6,18,.55);
}
body.arcade2[data-game=witch] .arcade2-top,
body.arcade2[data-game=witch] .arcade2-controls{
  background:rgba(18,20,46,.5);
  border-color:rgba(255,255,255,.16);
}
body.arcade2[data-game=witch] .title-block h1,
body.arcade2[data-game=witch] .title-block span,
body.arcade2[data-game=witch] .stat,
body.arcade2[data-game=witch] .arcade2-controls label{
  color:#f6f1ff;
}
body.arcade2[data-game=witch] .stat b{color:#ffd166}
body.arcade2[data-game=witch] .witch-hero{
  background:linear-gradient(145deg,rgba(255,255,255,.18),rgba(42,32,85,.38));
  backdrop-filter:blur(8px);
}
body.arcade2[data-game=witch] .witch-hero h2{
  color:#fff;
  text-shadow:0 5px 18px rgba(0,0,0,.45);
}
body.arcade2[data-game=witch] .witch-hero p{
  color:#f0eaff;
  text-shadow:0 2px 10px rgba(0,0,0,.45);
}
body.arcade2[data-game=witch] .witch-panel{
  background:rgba(255,255,255,.9);
}
body.arcade2[data-game=witch] .witch2 aside button{
  min-height:40px;
  margin:6px 6px 0 0;
  border:0;
  border-radius:999px;
  padding:0 14px;
  background:#fff;
  color:#17203a;
  font-weight:950;
  box-shadow:0 5px 0 rgba(0,0,0,.12);
}

body.arcade2[data-game=witch].witch-splash-mode{
  background:
    radial-gradient(circle at 52% 34%,rgba(67,255,229,.22),transparent 28%),
    radial-gradient(circle at 28% 78%,rgba(255,205,91,.18),transparent 20%),
    url("../assets/images/games/premium-v2/witch/witch-premium-splash-v3.png") center/cover no-repeat,
    #100b22;
}
body.arcade2[data-game=witch].witch-splash-mode .arcade2-app{
  width:100vw;
  height:100vh;
  margin:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  backdrop-filter:none;
}
body.arcade2[data-game=witch].witch-splash-mode .arcade2-top,
body.arcade2[data-game=witch].witch-splash-mode .arcade2-controls{
  display:none;
}
body.arcade2[data-game=witch].witch-splash-mode .arcade2-stage{
  padding:0;
}
.witch-splash{
  position:relative;
  width:100%;
  height:100%;
  min-height:680px;
  overflow:hidden;
  isolation:isolate;
}
.witch-splash::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:linear-gradient(90deg,rgba(8,5,20,.18),rgba(5,8,22,.08) 45%,rgba(4,2,12,.34));
}
.witch-splash::after{
  content:"";
  position:absolute;
  left:18%;
  right:10%;
  top:18%;
  bottom:14%;
  z-index:-1;
  background:radial-gradient(ellipse at 50% 50%,rgba(64,255,226,.28),rgba(126,77,255,.18) 42%,transparent 68%);
  filter:blur(10px);
}
.witch-splash-home,
.witch-splash-full{
  position:absolute;
  top:28px;
  z-index:5;
  min-height:44px;
  border:1px solid rgba(255,255,255,.44);
  border-radius:999px;
  padding:0 18px;
  background:rgba(8,25,31,.62);
  color:#f8fffb;
  font-weight:950;
  text-decoration:none;
  box-shadow:0 8px 24px rgba(0,0,0,.25),inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter:blur(10px);
}
.witch-splash-home{left:28px;display:grid;place-items:center}
.witch-splash-full{right:28px}
.witch-splash-character{
  position:absolute;
  left:3.5vw;
  bottom:-4vh;
  width:min(39vw,560px);
  height:min(82vh,760px);
  background:url("../assets/images/games/premium-v2/witch/witch-premium-character.png") bottom center/contain no-repeat;
  filter:drop-shadow(0 32px 36px rgba(0,0,0,.52));
  animation:witchFloat 4.8s ease-in-out infinite;
  display:none;
}
.witch-splash-copy{
  position:absolute;
  left:33vw;
  right:7vw;
  top:18vh;
  display:grid;
  justify-items:center;
  text-align:center;
  color:#eaffff;
  text-shadow:0 5px 18px rgba(0,0,0,.55),0 0 32px rgba(61,255,226,.45);
}
.witch-emblem{
  display:grid;
  place-items:center;
  width:104px;
  height:104px;
  border-radius:30px;
  background:linear-gradient(145deg,#5b39f0,#2bd7e8);
  color:#fff;
  font-size:18px;
  font-weight:950;
  box-shadow:0 0 0 6px rgba(255,255,255,.16),0 18px 45px rgba(42,229,224,.28);
  transform:rotate(3deg);
}
.witch-splash-copy h2{
  margin:18px 0 6px;
  font-size:clamp(72px,10.6vw,158px);
  line-height:.96;
  letter-spacing:0;
  font-weight:950;
  color:#dcffff;
  -webkit-text-stroke:2px rgba(255,255,255,.36);
}
.witch-splash-copy p{
  margin:0 0 34px;
  font-size:clamp(24px,3vw,42px);
  font-weight:950;
  color:#d8fff8;
}
.witch-enter-button{
  min-width:min(36vw,430px);
  min-height:94px;
  border:5px solid #ffeaa6;
  border-radius:24px;
  background:linear-gradient(180deg,#fff3a8,#ffc247 55%,#f49822);
  color:#4d2507;
  font-size:clamp(28px,3vw,44px);
  font-weight:950;
  box-shadow:0 12px 0 #a55216,0 0 36px rgba(255,209,102,.72),inset 0 3px 0 rgba(255,255,255,.75);
  cursor:pointer;
  animation:witchButtonPulse 1.9s ease-in-out infinite;
}
.witch-enter-button:hover{transform:translateY(-4px)}
.witch-cauldron{
  position:absolute;
  left:45vw;
  bottom:-2vh;
  width:310px;
  height:170px;
  border-radius:50% 50% 24% 24%;
  background:radial-gradient(ellipse at 50% 18%,#61ffe8 0 18%,#126869 19% 34%,#111827 35% 70%,#060815 71%);
  box-shadow:0 -20px 46px rgba(60,255,224,.52),0 28px 32px rgba(0,0,0,.42);
  display:none;
}
.witch-cauldron::before{
  content:"";
  position:absolute;
  left:42px;
  right:42px;
  top:-48px;
  height:76px;
  background:radial-gradient(ellipse,rgba(87,255,233,.58),rgba(87,255,233,0) 68%);
  filter:blur(4px);
  animation:witchMist 2.8s ease-in-out infinite;
}
.witch-audio-prompt{
  position:fixed;
  inset:0;
  z-index:12;
  display:none;
  place-items:center;
  padding:24px;
  background:rgba(4,8,18,.42);
  backdrop-filter:blur(8px);
}
.witch-audio-prompt.show{display:grid}
.witch-audio-prompt section{
  width:min(420px,100%);
  display:grid;
  justify-items:center;
  gap:12px;
  padding:28px;
  border:1px solid rgba(255,255,255,.32);
  border-radius:28px;
  background:linear-gradient(145deg,rgba(18,24,54,.94),rgba(35,75,84,.88));
  color:#fff;
  text-align:center;
  box-shadow:0 28px 80px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.16);
}
.witch-audio-prompt b{
  display:grid;
  place-items:center;
  width:78px;
  height:78px;
  border-radius:50%;
  background:linear-gradient(135deg,#5b39f0,#2bd7e8);
  font-size:34px;
  box-shadow:0 0 0 8px rgba(255,255,255,.1),0 0 34px rgba(43,215,232,.48);
}
.witch-audio-prompt h3{
  margin:4px 0 0;
  font-size:28px;
}
.witch-audio-prompt p{
  margin:0;
  color:#e0fffb;
  line-height:1.6;
  font-weight:850;
}
.witch-audio-prompt button{
  min-width:220px;
  min-height:56px;
  border:0;
  border-radius:999px;
  background:linear-gradient(180deg,#fff0a8,#ffbf36);
  color:#472200;
  font-size:20px;
  font-weight:950;
  box-shadow:0 7px 0 #a55216;
}
.witch-audio-prompt small{
  color:#b9fff7;
  font-weight:800;
}

body.arcade2[data-game=witch].witch-play-mode .arcade2-app{
  background:rgba(10,11,29,.58);
}
body.arcade2[data-game=witch].witch-play-mode,
body.arcade2[data-game=witch].witch-play-mode .arcade2-app,
body.arcade2[data-game=witch].witch-play-mode .arcade2-stage{
  overflow:auto;
}
.witch-lobby{
  height:100%;
  display:grid;
  grid-template-columns:minmax(420px,1.25fr) minmax(330px,.75fr);
  gap:26px;
  align-items:center;
}
.witch-lobby-hero,
.witch-lobby-panel{
  border:1px solid rgba(255,255,255,.36);
  border-radius:30px;
  background:linear-gradient(145deg,rgba(19,20,48,.78),rgba(49,35,84,.45));
  color:#f9fbff;
  box-shadow:0 24px 56px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.16);
  backdrop-filter:blur(12px);
}
.witch-lobby-hero{
  min-height:500px;
  display:grid;
  align-content:end;
  justify-items:start;
  padding:34px;
  position:relative;
  overflow:hidden;
}
.witch-lobby-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(13,11,32,.6)),url("../assets/images/games/premium-v2/witch/witch-premium-splash-v3.png") center/cover;
  opacity:.82;
}
.witch-lobby-character{
  position:absolute;
  right:4%;
  bottom:0;
  width:min(38%,310px);
  height:72%;
  background:url("../assets/images/games/premium-v2/witch/witch-premium-character.png") bottom center/contain no-repeat;
  filter:drop-shadow(0 24px 30px rgba(0,0,0,.45));
  display:none;
}
.witch-lobby-hero span,
.witch-lobby-hero h2,
.witch-lobby-hero p{position:relative;max-width:76%}
.witch-lobby-hero span{color:#9ffdf1;font-weight:950}
.witch-lobby-hero h2{margin:10px 0;font-size:clamp(36px,5vw,72px);line-height:1.04}
.witch-lobby-hero p{margin:0;font-size:20px;line-height:1.7;font-weight:850;color:#e9e5ff}
.witch-lobby-panel{
  padding:22px;
  max-height:100%;
  overflow:auto;
}
.witch-lobby-actions,
.witch-theme-row{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-bottom:18px;
}
.witch-lobby-actions button,
.witch-theme-row button,
.witch-lobby-panel select,
.witch-lobby-start,
.witch-lobby-ghost{
  min-height:54px;
  border:0;
  border-radius:18px;
  padding:0 16px;
  background:rgba(255,255,255,.94);
  color:#17203a;
  font-weight:950;
  box-shadow:0 6px 0 rgba(0,0,0,.18);
}
.witch-lobby-actions button,
.witch-lobby-panel select{min-height:48px}
.witch-lobby-panel label{
  display:grid;
  gap:8px;
  margin:0 0 16px;
  color:#d8fff8;
  font-weight:950;
}
.witch-theme-row{
  grid-template-columns:repeat(2,1fr);
  max-height:150px;
  overflow:auto;
  padding-right:4px;
}
.witch-theme-row button{
  min-height:42px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  color:#fff;
  box-shadow:none;
  border:1px solid rgba(255,255,255,.2);
}
.witch-theme-row button.active{
  background:linear-gradient(135deg,#ffd166,#ff8a4c);
  color:#3d2105;
}
.witch-lobby-start{
  width:100%;
  min-height:58px;
  margin-top:8px;
  background:linear-gradient(180deg,#fff0a8,#ffbf36)!important;
  color:#472200!important;
  font-size:24px;
}
.witch-lobby-ghost{
  width:100%;
  margin-top:12px;
  background:rgba(255,255,255,.18);
  color:#fff;
  box-shadow:none;
  border:1px solid rgba(255,255,255,.2);
}
body.arcade2[data-game=witch] .poison-grid{
  gap:18px;
}
body.arcade2[data-game=witch] .poison-grid button{
  min-height:118px;
  border-color:rgba(255,255,255,.86);
  border-radius:26px;
  box-shadow:0 12px 0 rgba(0,0,0,.32),0 0 24px rgba(139,92,246,.22);
}
body.arcade2[data-game=witch] .witch-board{
  grid-template-columns:300px 1fr;
  gap:22px;
  padding:4px;
}
body.arcade2[data-game=witch] .witch-board-panel{
  position:relative;
  overflow:auto;
  padding:26px 22px;
  border:1px solid rgba(255,255,255,.34);
  border-radius:28px;
  background:
    linear-gradient(160deg,rgba(18,18,45,.92),rgba(50,31,84,.78)),
    radial-gradient(circle at 20% 0,rgba(91,255,232,.24),transparent 36%);
  color:#f8fbff;
  box-shadow:0 22px 50px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.16);
}
body.arcade2[data-game=witch] .witch-board-panel::before{
  content:"";
  display:block;
  width:100%;
  height:132px;
  margin:0 0 18px;
  border-radius:24px;
  background:
    linear-gradient(180deg,rgba(8,8,22,.08),rgba(8,8,22,.55)),
    url("../assets/images/games/premium-v2/witch/witch-premium-splash-v3.png") left 44%/cover;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.18),0 10px 22px rgba(0,0,0,.22);
}
body.arcade2[data-game=witch] .witch-board-panel h2{
  margin:6px 0 10px;
  font-size:30px;
  color:#fff;
}
body.arcade2[data-game=witch] .witch-board-panel p{
  margin:0 0 14px;
  color:#e7e0ff;
  line-height:1.55;
  font-weight:850;
}
.witch-state{
  display:inline-grid;
  place-items:center;
  min-height:30px;
  padding:0 12px;
  border-radius:999px;
  background:rgba(91,255,232,.18);
  color:#a9fff5;
  font-size:13px;
  font-weight:950;
}
.witch-player-list{
  display:grid;
  gap:8px;
  margin:16px 0;
}
.witch-player-list b{
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-radius:999px;
  padding:0 14px;
  background:rgba(255,255,255,.12);
  color:#e9e5ff;
}
.witch-player-list b::after{
  content:"等待";
  color:#b9b2d5;
  font-size:12px;
}
.witch-player-list b.active{
  background:linear-gradient(135deg,#ffd166,#ff8a4c);
  color:#3d2105;
  box-shadow:0 0 26px rgba(255,209,102,.34);
}
.witch-player-list b.active::after{
  content:"当前";
  color:#6b3700;
}
.witch-score-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:16px 0;
}
.witch-score-row b{
  display:grid;
  place-items:center;
  min-height:58px;
  border-radius:18px;
  background:rgba(255,255,255,.13);
  color:#d8fff8;
  text-align:center;
}
.witch-score-row strong{
  display:block;
  color:#ffd166;
  font-size:26px;
}
.witch-player-setup{
  min-height:100%;
  display:grid;
  grid-template-rows:auto auto 1fr auto;
  gap:18px;
}
.witch-setup-bar{
  min-height:74px;
  display:grid;
  grid-template-columns:auto auto 1fr auto;
  align-items:center;
  gap:16px;
  padding:14px 20px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:24px;
  background:linear-gradient(145deg,rgba(17,23,54,.88),rgba(20,92,83,.52));
  color:#f8fbff;
  box-shadow:0 14px 32px rgba(0,0,0,.24);
}
.witch-setup-bar button,
.witch-inline-settings button,
.witch-board-settings button{
  min-height:42px;
  border:0;
  border-radius:999px;
  padding:0 16px;
  background:linear-gradient(135deg,#ffd166,#ff8a4c);
  color:#3d2105;
  font-weight:950;
  box-shadow:0 5px 0 rgba(0,0,0,.18);
}
.witch-setup-bar b{
  display:grid;
  place-items:center;
  min-height:42px;
  padding:0 18px;
  border-radius:999px;
  background:linear-gradient(135deg,#ff6bb4,#ffd166);
  color:#3d2105;
  font-size:20px;
}
.witch-setup-bar strong{
  font-size:28px;
}
.witch-setup-bar span{
  justify-self:end;
  color:#b9fff7;
  font-weight:950;
}
.witch-player-setup .witch-board-grid button b{
  display:block;
  font-size:26px;
  color:#fff;
  text-shadow:0 3px 12px rgba(0,0,0,.48);
}
.witch-player-setup .witch-board-grid button small{
  margin-top:8px;
  display:block;
  font-size:18px;
  color:#d8fff8;
  text-shadow:0 2px 10px rgba(0,0,0,.5);
}
.witch-inline-settings,
.witch-board-settings{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  padding:12px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:20px;
  background:rgba(10,13,33,.45);
}
.witch-inline-settings label,
.witch-board-settings label{
  display:flex;
  align-items:center;
  gap:8px;
  color:#e9e5ff;
  font-weight:950;
}
.witch-inline-settings select,
.witch-board-settings select{
  min-height:42px;
  min-width:120px;
  border:0;
  border-radius:999px;
  padding:0 34px 0 14px;
  background:#fff;
  color:#17203a;
  font-weight:950;
  box-shadow:0 5px 0 rgba(0,0,0,.14);
}
.witch-setup-tip{
  min-height:54px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  color:#e9e5ff;
  font-weight:950;
  text-align:center;
}
body.arcade2[data-game=witch] .witch-board-panel button{
  min-height:44px;
  margin:8px 6px 0 0;
  border:0;
  border-radius:999px;
  padding:0 16px;
  background:rgba(255,255,255,.92);
  color:#17203a;
  font-weight:950;
  box-shadow:0 5px 0 rgba(0,0,0,.18);
}
.witch-start-main{
  width:100%;
  min-height:68px!important;
  margin:12px 0 14px!important;
  font-size:24px;
  background:linear-gradient(180deg,#fff0a8,#ffbf36)!important;
  color:#472200!important;
}
.witch-manual-play{
  min-height:0;
  display:grid;
  grid-template-rows:auto 1fr;
  gap:14px;
}
.witch-manual-tip{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  padding:12px 16px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:22px;
  background:linear-gradient(145deg,rgba(17,23,54,.86),rgba(20,92,83,.5));
  color:#f8fbff;
  box-shadow:0 14px 32px rgba(0,0,0,.22);
}
.witch-manual-tip b{font-size:20px;color:#9ffdf1}
.witch-manual-tip span{font-weight:850;color:#e9e5ff}
.witch-manual-tip button{
  min-height:48px;
  border:0;
  border-radius:999px;
  padding:0 22px;
  background:linear-gradient(180deg,#fff0a8,#ffbf36)!important;
  color:#472200!important;
  font-weight:950;
  box-shadow:0 6px 0 rgba(0,0,0,.2);
}
body.arcade2[data-game=witch] .witch-board-grid{
  padding:8px;
  border-radius:30px;
  background:linear-gradient(145deg,rgba(255,255,255,.12),rgba(13,9,32,.24));
}
body.arcade2[data-game=witch] .witch-board-grid button{
  position:relative;
  display:grid;
  place-items:center;
  overflow:hidden;
  transition:transform .18s ease, filter .18s ease;
}
body.arcade2[data-game=witch] .witch-board-grid button:hover{
  transform:translateY(-4px) rotate(.5deg);
  filter:brightness(1.12);
}
body.arcade2[data-game=witch] .witch-board-grid button span{
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  border-radius:50%;
  background:rgba(9,8,24,.42);
  color:#fff;
  font-size:36px;
  text-shadow:0 3px 10px rgba(0,0,0,.55);
}
body.arcade2[data-game=witch] .witch-board-grid .safe{
  transform:rotateY(360deg);
}
body.arcade2[data-game=witch] .witch-board-grid .safe b{
  display:block;
  font-size:28px;
  color:#051f1b;
}
body.arcade2[data-game=witch] .witch-board-grid .safe small{
  margin-top:4px;
  font-size:18px;
  color:#05372e;
}
body.arcade2[data-game=witch] .witch-board-grid .poison{
  animation:witchPoisonPop .45s ease;
}
.arcade2-stage.witch-poison-flash::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:20;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 48%,rgba(255,64,146,.42),transparent 24%),
    radial-gradient(circle at 50% 52%,rgba(96,36,168,.42),transparent 42%);
  animation:witchDangerFlash .72s ease forwards;
}
body.arcade2[data-game=witch] .arcade2-modal{
  background:rgba(6,8,22,.72);
  backdrop-filter:blur(8px);
}
body.arcade2[data-game=witch] .arcade2-modal>div{
  border:1px solid rgba(255,255,255,.32);
  background:
    linear-gradient(145deg,rgba(21,22,54,.96),rgba(61,38,91,.94)),
    url("../assets/images/games/premium-v2/witch/witch-premium-splash-v3.png") center/cover;
  color:#f8fbff;
  box-shadow:0 30px 90px rgba(0,0,0,.46),inset 0 1px 0 rgba(255,255,255,.15);
}
body.arcade2[data-game=witch] .arcade2-modal>div::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:26px;
  background:linear-gradient(145deg,rgba(10,11,28,.9),rgba(28,20,54,.72));
  z-index:-1;
}
body.arcade2[data-game=witch] .arcade2-modal h2{
  margin-top:0;
  color:#fff;
}
body.arcade2[data-game=witch] .arcade2-modal p,
body.arcade2[data-game=witch] .arcade2-modal .muted{
  color:#e7e0ff;
  font-weight:850;
  line-height:1.65;
}
body.arcade2[data-game=witch] .arcade2-modal textarea{
  min-height:220px;
  border:2px solid rgba(159,253,241,.36);
  background:rgba(255,255,255,.94);
  color:#101827;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.08);
}
body.arcade2[data-game=witch] .arcade2-modal input[type=file]{
  width:100%;
  min-height:42px;
  margin-top:8px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px;
  padding:8px 14px;
  background:rgba(255,255,255,.14);
  color:#fff;
  box-shadow:none;
}
body.arcade2[data-game=witch] .arcade2-modal input[type=file]::file-selector-button{
  min-height:30px;
  margin-right:12px;
  border:0;
  border-radius:999px;
  padding:0 14px;
  background:linear-gradient(135deg,#ffd166,#ff8a4c);
  color:#3d2105;
  font-weight:950;
}
.witch-bank-card{
  width:min(1040px,100%)!important;
}
.witch-bank-layout{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:18px;
}
.witch-bank-layout aside{
  padding:16px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:22px;
  background:rgba(255,255,255,.09);
}
.witch-bank-layout aside>b{
  display:block;
  margin-bottom:10px;
  color:#a9fff5;
}
.witch-unit-list{
  display:grid;
  gap:8px;
  max-height:260px;
  overflow:auto;
  margin-bottom:12px;
}
.witch-unit-list button{
  min-height:58px!important;
  display:grid;
  justify-items:start;
  gap:3px;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:16px!important;
  background:rgba(255,255,255,.12)!important;
  color:#fff!important;
  box-shadow:none!important;
}
.witch-unit-list button.active{
  background:linear-gradient(135deg,#ffd166,#ff8a4c)!important;
  color:#3d2105!important;
}
.witch-unit-list small{
  opacity:.78;
  font-weight:850;
}
.witch-bank-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.witch-bank-head strong{
  font-size:20px;
}
.witch-bank-head span{
  padding:7px 12px;
  border-radius:999px;
  background:rgba(91,255,232,.14);
  color:#a9fff5;
  font-weight:950;
}
body.arcade2[data-game=witch] .bank-preview p{
  background:rgba(255,255,255,.12);
  color:#fff;
}
.witch-bank-intro{
  margin:10px 0 14px;
  padding:14px 16px;
  border:1px solid rgba(159,253,241,.32);
  border-radius:18px;
  background:rgba(91,255,232,.12);
}
.witch-bank-intro b{color:#a9fff5}
.witch-bank-intro p{margin:8px 0 0}
body.arcade2[data-game=witch] .victory.witch-result{
  background:
    radial-gradient(circle at 50% 42%,rgba(130,22,98,.34),transparent 28%),
    linear-gradient(180deg,rgba(6,8,22,.5),rgba(6,8,22,.86)),
    url("../assets/images/games/premium-v2/witch/witch-premium-splash-v3.png") center/cover;
}
body.arcade2[data-game=witch] .victory.witch-result section{
  border:1px solid rgba(255,255,255,.28);
  background:linear-gradient(145deg,rgba(24,20,48,.96),rgba(83,35,80,.92));
  color:#fff;
}
body.arcade2[data-game=witch] .victory.witch-result h2{
  color:#ffd166;
}
body.arcade2[data-game=witch] .victory.witch-result p{
  font-size:22px;
  line-height:1.7;
}
@keyframes witchPoisonPop{50%{transform:scale(1.06);filter:brightness(1.25)}}
@keyframes witchDangerFlash{
  0%{opacity:0;filter:blur(12px)}
  35%{opacity:1;filter:blur(0)}
  100%{opacity:0;filter:blur(20px)}
}
@keyframes witchFloat{50%{transform:translateY(-12px)}}
@keyframes witchButtonPulse{50%{box-shadow:0 12px 0 #a55216,0 0 56px rgba(255,209,102,.9),inset 0 3px 0 rgba(255,255,255,.75)}}
@keyframes witchMist{50%{transform:translateY(-16px) scale(1.08);opacity:.72}}

@media(max-width:900px){
  .witch-splash{min-height:100vh}
  .witch-splash-character{left:-7vw;width:54vw;height:70vh;opacity:.88}
  .witch-splash-copy{left:8vw;right:8vw;top:19vh}
  .witch-splash-copy h2{font-size:clamp(58px,16vw,104px)}
  .witch-splash-copy p{font-size:clamp(20px,6vw,34px)}
  .witch-enter-button{min-width:72vw;min-height:82px}
  .witch-cauldron{left:50%;transform:translateX(-50%);width:250px}
  .witch-lobby{grid-template-columns:1fr;align-items:start;overflow:auto}
  .witch-lobby-hero{min-height:360px}
  .witch-lobby-hero span,.witch-lobby-hero h2,.witch-lobby-hero p{max-width:100%}
  .witch-lobby-character{opacity:.34;width:46%;height:80%}
  .witch-bank-layout{grid-template-columns:1fr}
  .witch-setup-bar{grid-template-columns:1fr;text-align:center}
  .witch-setup-bar span{justify-self:center}
}

/* 2026-09-08: keep spelling candidates and Word Bloom rows fully visible on classroom screens. */
body.arcade2[data-game=spelling] .arcade2-stage{
  padding:10px 22px 22px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
body.arcade2[data-game=spelling] .spell2{
  height:100%;
  min-height:0;
  box-sizing:border-box;
}
body.arcade2[data-game=spelling] .spell-upgraded{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:16px;
}
body.arcade2[data-game=spelling] .spell-upgraded .quick-settings{
  margin:0 auto;
}
body.arcade2[data-game=spelling] .spell-upgraded .big-prompt{
  width:min(520px,100%);
  min-height:0;
  padding:10px 18px;
  border-radius:24px;
}
body.arcade2[data-game=spelling] .spell-upgraded .big-prompt h2{
  margin:2px 0;
  font-size:clamp(42px,5.4vw,66px);
  line-height:1;
}
body.arcade2[data-game=spelling] .spell-upgraded .big-prompt button{
  margin-top:8px;
}
body.arcade2[data-game=spelling] .spell-slots{
  position:relative;
  z-index:2;
  min-height:92px;
  margin:0 auto;
  padding:10px 12px;
  align-content:center;
}
body.arcade2[data-game=spelling] .spell-slots button{
  width:clamp(48px,5vw,78px);
  height:clamp(56px,5.6vw,84px);
  font-size:clamp(34px,4.4vw,58px);
}
body.arcade2[data-game=spelling] .spell-letters{
  position:relative;
  z-index:1;
  margin:0 auto;
  padding:14px 12px;
  max-width:min(980px,100%);
  min-height:96px;
  max-height:156px;
  overflow:auto;
  align-content:center;
  scroll-padding:12px;
}
body.arcade2[data-game=spelling] .spell-letters button{
  width:clamp(52px,5.3vw,72px);
  height:clamp(52px,5.3vw,72px);
  font-size:clamp(30px,4vw,50px);
}
body.arcade2[data-game=spelling] .stage-actions{
  margin:0 auto;
  padding-bottom:2px;
}
body.arcade2[data-game=spelling] .stage-actions button{
  min-height:44px;
}
body.arcade2[data-game=spelling] .spell-battle{
  grid-template-rows:auto minmax(0,1fr);
  gap:12px;
}
body.arcade2[data-game=spelling] .spell-battle-toolbar{
  margin:0 auto;
}
body.arcade2[data-game=spelling] .spell-team{
  grid-template-rows:auto auto minmax(66px,auto) minmax(58px,auto) minmax(78px,1fr) auto;
  gap:6px;
  padding:10px 12px;
  overflow:hidden;
}
body.arcade2[data-game=spelling] .spell-team h2{
  font-size:clamp(22px,2.2vw,30px)!important;
  line-height:1!important;
}
body.arcade2[data-game=spelling] .spell-team>strong{
  font-size:clamp(36px,3.7vw,52px)!important;
  line-height:.9!important;
}
body.arcade2[data-game=spelling] .spell-team-prompt{
  padding:7px 10px!important;
  gap:2px!important;
}
body.arcade2[data-game=spelling] .spell-team-prompt b{
  font-size:clamp(26px,2.7vw,38px)!important;
  line-height:1!important;
}
body.arcade2[data-game=spelling] .spell-team-prompt small{
  line-height:1!important;
}
body.arcade2[data-game=spelling] .spell-team .spell-slots{
  position:relative;
  z-index:2;
  width:100%;
  min-height:68px;
  padding:8px;
}
body.arcade2[data-game=spelling] .spell-team .spell-slots button{
  width:clamp(36px,3.5vw,54px)!important;
  height:clamp(40px,3.9vw,58px)!important;
  font-size:clamp(24px,3vw,38px)!important;
}
body.arcade2[data-game=spelling] .spell-team .spell-letters{
  position:relative;
  z-index:1;
  width:100%;
  min-height:98px;
  max-height:132px;
  padding:10px 8px;
  gap:6px;
  overflow:auto;
}
body.arcade2[data-game=spelling] .spell-team .spell-letters button{
  width:clamp(36px,3.5vw,50px)!important;
  height:clamp(36px,3.5vw,50px)!important;
  font-size:clamp(22px,2.6vw,32px)!important;
}
body.arcade2[data-game=spelling] .spell-team .stage-actions{
  width:100%;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
body.arcade2[data-game=spelling] .spell-team .stage-actions button{
  min-width:0;
  min-height:34px!important;
  padding:0 8px;
  font-size:13px!important;
}

body.arcade2[data-game=bloom] .arcade2-stage{
  padding:12px 22px 18px;
  overflow:hidden;
}
body.arcade2[data-game=bloom] .bloom-stage{
  height:100%;
  min-height:0;
  align-items:stretch;
}
body.arcade2[data-game=bloom] .bloom-stage aside{
  overflow:auto;
}
body.arcade2[data-game=bloom] .bloom-play{
  grid-template-rows:minmax(0,1fr) auto auto auto;
  gap:8px;
  padding:12px;
  overflow:hidden;
}
body.arcade2[data-game=bloom] .bloom-word-grid{
  align-content:center;
  gap:9px;
  padding:12px 14px;
  overflow:hidden;
}
body.arcade2[data-game=bloom] .bloom-word-row{
  grid-template-columns:38px 1fr;
  gap:10px;
  min-height:50px;
}
body.arcade2[data-game=bloom] .bloom-word-row>span{
  width:38px;
  height:38px;
}
body.arcade2[data-game=bloom] .bloom-word-row>div{
  gap:7px;
  align-items:center;
}
body.arcade2[data-game=bloom] .bloom-cell{
  width:clamp(38px,4vw,58px)!important;
  height:clamp(38px,4vw,58px)!important;
  font-size:clamp(22px,2.6vw,36px)!important;
}
body.arcade2[data-game=bloom] .bloom-stable .bloomletters{
  max-height:126px;
  padding:8px;
}
body.arcade2[data-game=bloom] .bloom-stable .bloomletters button{
  width:clamp(42px,4.2vw,58px);
  height:clamp(42px,4.2vw,58px);
  font-size:clamp(24px,3vw,38px);
}

@media(max-width:900px){
  body.arcade2[data-game=spelling] .arcade2-stage,
  body.arcade2[data-game=bloom] .arcade2-stage{
    overflow:auto;
  }
  body.arcade2[data-game=spelling] .spell-battle{
    grid-template-columns:1fr;
  }
  body.arcade2[data-game=bloom] .bloom-stage{
    grid-template-columns:1fr;
  }
}

/* Word Bloom crossword rebuild: clue-first filling, not one-cell-at-a-time typing. */
body.arcade2[data-game=bloom] .bloom-cross{
  grid-template-columns:310px minmax(0,1fr);
  gap:18px;
}
body.arcade2[data-game=bloom] .bloom-cross aside{
  display:grid;
  align-content:start;
  gap:9px;
  padding:18px!important;
  overflow:hidden!important;
}
body.arcade2[data-game=bloom] .bloom-cross aside h2{
  margin:0;
  font-size:28px;
}
body.arcade2[data-game=bloom] .bloom-cross aside p{
  margin:0;
  font-size:15px;
  line-height:1.45;
}
body.arcade2[data-game=bloom] .bloom-clues{
  display:grid;
  gap:10px;
}
body.arcade2[data-game=bloom] .bloom-clue{
  display:grid!important;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:8px;
  margin:0!important;
  min-height:52px;
  padding:9px 12px!important;
  border:3px solid rgba(255,255,255,.8)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.82)!important;
  box-shadow:0 6px 0 rgba(0,0,0,.08)!important;
  cursor:pointer;
}
body.arcade2[data-game=bloom] .bloom-clue b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.arcade2[data-game=bloom] .bloom-clue small{
  padding:4px 8px;
  border-radius:999px;
  background:#e9f7ff;
  color:#2563eb;
  font-weight:950;
}
body.arcade2[data-game=bloom] .bloom-clue.active{
  border-color:#ffd166!important;
  background:linear-gradient(135deg,#fff7d6,#fff)!important;
  transform:translateY(-2px);
}
body.arcade2[data-game=bloom] .bloom-clue.done{
  background:linear-gradient(135deg,#dcfce7,#ecfeff)!important;
  color:#166534!important;
}
body.arcade2[data-game=bloom] .bloom-rules{
  display:grid;
  gap:4px;
  padding:10px;
  border-radius:18px;
  background:rgba(220,252,231,.75);
  color:#234;
  font-size:12px;
  font-weight:900;
}
body.arcade2[data-game=bloom] .bloom-board-wrap{
  position:relative;
  display:grid;
  place-items:center;
  min-height:0;
  padding:12px;
  border:5px solid rgba(255,255,255,.8);
  border-radius:32px;
  background:linear-gradient(180deg,rgba(244,255,241,.88),rgba(255,255,255,.54));
  box-shadow:inset 0 0 0 3px rgba(255,255,255,.42),0 14px 0 rgba(0,0,0,.08);
  overflow:hidden;
}
body.arcade2[data-game=bloom] .bloom-cross-grid{
  position:absolute;
  left:50%;
  top:50%;
  display:grid;
  grid-template-columns:repeat(var(--cols),clamp(36px,4.1vw,54px));
  grid-template-rows:repeat(var(--rows),clamp(36px,4.1vw,54px));
  gap:6px;
  justify-content:center;
  align-content:center;
  transform:translate(-50%,-50%) scale(var(--bloom-scale,1));
  transform-origin:center center;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .ghost{
  visibility:hidden;
  pointer-events:none;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .bloom-cell{
  position:relative;
  display:grid!important;
  place-items:center!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  border:4px solid #fff!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.94)!important;
  color:#17233d!important;
  font-size:clamp(22px,2.6vw,34px)!important;
  font-weight:950!important;
  box-shadow:0 7px 0 rgba(0,0,0,.11)!important;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .bloom-cell i{
  position:absolute;
  left:5px;
  top:3px;
  color:#2563eb;
  font-size:11px;
  font-style:normal;
  line-height:1;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .bloom-cell span{
  display:block;
  line-height:1;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .bloom-cell.fixed{
  background:linear-gradient(135deg,#fff2b8,#fff7d6)!important;
  color:#284052!important;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .bloom-cell.sel{
  outline:6px solid rgba(255,209,102,.92)!important;
  background:#fff7d6!important;
  transform:translateY(-3px) scale(1.03);
  box-shadow:0 9px 0 rgba(0,0,0,.13),0 0 24px rgba(255,209,102,.72)!important;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .bloom-cell.filled{
  background:linear-gradient(135deg,#dff7ff,#fff)!important;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .bloom-cell.word-done{
  background:linear-gradient(135deg,#22c55e,#19c79f)!important;
  color:#fff!important;
  animation:linkCardHit .45s ease both;
}
body.arcade2[data-game=bloom] .bloom-cross-grid .bloom-cell.wrong{
  background:linear-gradient(135deg,#ef4444,#ff8a8a)!important;
  color:#fff!important;
  animation:answerShake .28s ease both;
}
body.arcade2[data-game=bloom] .bloom-active-line{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 12px;
  border-radius:18px;
  background:rgba(255,255,255,.75);
  color:#17233d;
  font-weight:950;
}
body.arcade2[data-game=bloom] .bloom-active-line b{
  color:#2563eb;
}
body.arcade2[data-game=bloom] .bloom-cross .bloomletters{
  min-height:64px;
  max-height:78px;
  justify-content:center;
  align-content:center;
  overflow:auto;
}
body.arcade2[data-game=bloom] .bloom-cross .bloomletters button{
  width:clamp(42px,4.2vw,58px);
  height:clamp(42px,4.2vw,58px);
}
body.arcade2[data-game=bloom] .bloom-cross .letter-placeholder{
  width:auto!important;
  min-width:260px;
  padding:0 18px;
  border-radius:999px;
  font-size:18px;
}

/* Letter wheel: teacher-controlled stop, then answer by the selected letter. */
body.arcade2[data-game=wheel] .arcade2-stage{
  padding:14px 20px 18px;
  overflow:hidden;
}
.wheel-refit{
  grid-template-columns:minmax(0,1fr) 340px;
  gap:14px;
  height:100%;
}
.wheel-refit .wheel-show{
  display:grid;
  grid-template-columns:minmax(360px,1fr) minmax(250px,.72fr);
  grid-template-rows:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  min-width:0;
}
.wheel-refit .wheel-lane{
  min-height:0;
  height:100%;
  align-content:center;
  padding:12px!important;
}
.wheel-refit .wheel-letter-lane .wheel-face{
  width:min(430px,33vw);
}
.wheel-refit .wheel-student-lane .wheel-face{
  width:min(270px,21vw);
}
.wheel-refit .wheel-face{
  aspect-ratio:1;
  height:auto;
  border:15px solid #fff;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:repeating-conic-gradient(from -7deg,#ff5d78 0 13.84deg,#ffd166 13.84deg 27.68deg,#4f7cff 27.68deg 41.52deg,#19c79f 41.52deg 55.36deg);
  color:#fff;
  box-shadow:0 20px 0 rgba(0,0,0,.14),inset 0 0 0 2px rgba(255,255,255,.32);
}
.wheel-refit .wheel-face>b{
  width:42%;
  aspect-ratio:1;
  display:grid;
  place-items:center;
  border:8px solid rgba(255,255,255,.92);
  border-radius:50%;
  background:rgba(23,35,61,.24);
  font-size:clamp(42px,5.2vw,76px);
  line-height:1;
}
.wheel-refit .wheel-name-face{
  background:repeating-conic-gradient(from 10deg,#ffd166 0 45deg,#ff607d 45deg 90deg,#8b5cf6 90deg 135deg,#4f7cff 135deg 180deg)!important;
}
.wheel-refit .wheel-name-face>b{
  width:54%;
  font-size:clamp(22px,2.5vw,38px);
  text-align:center;
}
.wheel-refit .wheel-pointer{
  top:44px;
}
.wheel-refit .wheel-used{
  grid-column:1/-1;
  min-height:38px;
  border-radius:999px;
}
.wheel-console{
  display:grid;
  align-content:center;
  align-content:start;
  gap:8px;
  padding:12px!important;
  border:6px solid rgba(255,255,255,.74);
  border-radius:30px;
  background:rgba(255,255,255,.84)!important;
  text-align:center;
}
.wheel-modebar{
  justify-content:center;
}
.wheel-console label{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:10px;
  color:#586276;
  font-weight:950;
}
.wheel-console select{
  min-height:42px;
  border:0;
  border-radius:999px;
  padding:0 14px;
  background:#f7fbff;
  color:#17233d;
  font-weight:950;
  box-shadow:0 5px 0 rgba(0,0,0,.1);
}
.wheel-console h2{
  margin:4px 0 0;
  font-size:clamp(24px,3vw,38px);
}
.wheel-big-letter{
  display:grid;
  place-items:center;
  width:86px;
  height:86px;
  margin:0 auto;
  border:8px solid #fff;
  border-radius:34px;
  background:linear-gradient(135deg,#fff7d6,#e0f2fe);
  color:#17233d;
  font-size:54px;
  line-height:1;
  box-shadow:0 10px 0 rgba(0,0,0,.12);
}
.wheel-console p{
  min-height:44px;
  margin:0;
  color:#17233d;
  font-size:17px;
  font-weight:950;
  line-height:1.45;
}
.wheel-spin-main{
  min-height:50px!important;
  border-radius:24px!important;
  font-size:20px!important;
}
.wheel-judge-actions{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.wheel-judge-actions button{
  min-width:0;
  min-height:40px;
}
.wheel-judge-actions .correct{
  background:#dcfce7!important;
  color:#166534!important;
}
.wheel-judge-actions .wrong{
  background:#ffe4e6!important;
  color:#be123c!important;
}
.wheel-refit.is-spinning .wheel-face{
  animation:wheelSpin .48s linear infinite!important;
}
.wheel-refit.is-spinning .wheel-name-face{
  animation:wheelSpinReverse .54s linear infinite!important;
}

body.arcade2[data-game=forms]{
  overflow:auto;
}
body.arcade2[data-game=forms] .arcade2-app{
  min-height:min(760px,100vh);
}
body.arcade2[data-game=forms] .arcade2-stage{
  overflow:auto;
  padding:12px 20px 18px;
}
body.arcade2[data-game=forms] .arcade2-controls{
  position:relative;
  z-index:30;
  overflow:visible;
}
body.arcade2[data-game=forms] .arcade2-controls select{
  position:relative;
  z-index:31;
}
body.arcade2[data-game=forms] .forms-arena{
  min-height:520px;
  height:auto;
  grid-template-rows:auto auto auto;
  align-content:start;
}
body.arcade2[data-game=forms] .forms-main{
  padding:12px 18px;
}
body.arcade2[data-game=forms] .forms-main h2{
  font-size:clamp(46px,5.6vw,76px);
}
body.arcade2[data-game=forms] .forms-options .form-card{
  min-height:74px;
}
body.arcade2[data-game=tense] .tense-right-flash .tense-board{
  outline:8px solid rgba(34,197,94,.72);
  animation:formWin .58s ease both;
}
body.arcade2[data-game=tense] .tense-wrong-flash .tense-board{
  outline:8px solid rgba(239,68,68,.72);
  animation:answerShake .3s ease both;
}
body.arcade2[data-game=tense] .tense-skip-flash .tense-board{
  outline:8px solid rgba(255,209,102,.72);
}
body.arcade2[data-game=tense] .tense-explain b{
  color:#ef4444;
  margin-right:8px;
}
body.arcade2[data-game=tense] .tense-explain small{
  display:block;
  margin-top:6px;
  color:#2563eb;
  font-size:18px;
}

@media(max-width:900px){
  .wheel-refit,
  .wheel-refit .wheel-show{
    grid-template-columns:1fr;
  }
body.arcade2[data-game=wheel] .arcade2-stage{
  overflow:auto;
}
}

body.arcade2[data-game=gomoku]{--a-bg:url("../assets/images/games/generated/pk-battle-bg.png"),linear-gradient(135deg,#eaf3ff,#fff4df)}
.gomoku2{position:relative;display:grid;grid-template-columns:300px minmax(0,1fr);gap:20px;height:100%}
.gomoku-panel{padding:22px;border-radius:24px;background:rgba(255,255,255,.78);box-shadow:0 14px 30px rgba(15,35,70,.14)}
.gomoku-panel>span{display:inline-grid;padding:8px 12px;border-radius:999px;background:#111a2e;color:#fff;font-weight:950;font-size:12px}
.gomoku-panel h2{margin:16px 0 10px;font-size:32px;line-height:1.1}
.gomoku-panel p{margin:0;color:var(--a-sub);font-weight:800;line-height:1.7}
.gomoku-score{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}
.gomoku-score b{display:grid;place-items:center;min-height:56px;border-radius:18px;color:#fff;font-size:18px;box-shadow:0 8px 0 rgba(0,0,0,.12)}
.gomoku-score .blue{background:linear-gradient(135deg,#2563eb,#22d3ee)}
.gomoku-score .red{background:linear-gradient(135deg,#e11d48,#fb7185)}
.gomoku-panel button{width:100%;min-height:48px;border:0;border-radius:16px;background:#fff;color:var(--a-ink);font-weight:950;box-shadow:0 6px 0 rgba(0,0,0,.1)}
.gomoku-board{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));gap:6px;align-content:center;min-height:0;padding:16px;border:8px solid rgba(255,255,255,.7);border-radius:28px;background:linear-gradient(135deg,rgba(255,255,255,.72),rgba(255,255,255,.34));box-shadow:inset 0 0 0 2px rgba(17,26,46,.08)}
.gomoku-board button{position:relative;display:grid;place-items:center;gap:2px;min-width:0;aspect-ratio:1;border:2px solid rgba(255,255,255,.8);border-radius:12px;background:linear-gradient(180deg,#fff,#edf5ff);color:#17233d;box-shadow:0 5px 0 rgba(0,0,0,.1);font-weight:950;overflow:hidden}
.gomoku-board button span{max-width:100%;font-size:clamp(11px,1.2vw,17px);line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gomoku-board button small{max-width:100%;color:var(--a-sub);font-size:clamp(9px,.92vw,12px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gomoku-board button.blue,.gomoku-board button.red{color:#fff;transform:scale(.96)}
.gomoku-board button.blue{background:linear-gradient(135deg,#2563eb,#22d3ee)}
.gomoku-board button.red{background:linear-gradient(135deg,#e11d48,#fb7185)}
.gomoku-board button.blue::after,.gomoku-board button.red::after{content:"";position:absolute;inset:18%;border:5px solid rgba(255,255,255,.72);border-radius:50%}
.gomoku-board button:disabled small{color:rgba(255,255,255,.72)}
.gomoku-challenge{position:absolute;inset:0;z-index:20;display:grid;place-items:center;background:rgba(17,26,46,.42);backdrop-filter:blur(5px)}
.gomoku-challenge>div{position:relative;width:min(560px,92%);padding:28px;border:6px solid #fff;border-radius:28px;background:linear-gradient(180deg,#fff,#eef5ff);text-align:center;box-shadow:0 26px 0 rgba(0,0,0,.16)}
.gomoku-challenge #gomokuClose{position:absolute;right:12px;top:12px;width:42px;height:42px;border:0;border-radius:50%;background:#111a2e;color:#fff;font-size:22px;font-weight:950}
.gomoku-challenge span{color:var(--a-red);font-weight:950}
.gomoku-challenge h2{margin:8px 0;font-size:clamp(48px,7vw,84px);line-height:1}
.gomoku-challenge p{margin:0 0 18px;color:var(--a-sub);font-size:24px;font-weight:900}
.gomoku-challenge .correct{background:linear-gradient(135deg,#19c79f,#43e2b5)!important;color:#fff!important}
.gomoku-challenge .wrong{background:linear-gradient(135deg,#ef4444,#ff8a8a)!important;color:#fff!important}

@media(max-width:900px){
  .gomoku2{
    grid-template-columns:1fr;
    min-height:760px;
  }
  .gomoku-board{
    padding:10px;
    gap:4px;
  }
  .gomoku-panel h2{
    font-size:26px;
  }
}

/* Independent chant stages: word rhythm deck and sentence broadcast deck. */
body.hanmai-enhanced[data-chant-mode=word] {
  --hm-bg:#081528;
  --hm-panel:rgba(13,32,56,.86);
  --hm-panel-soft:rgba(16,43,72,.72);
  --hm-text:#edf8ff;
  --hm-muted:#a7c5d8;
  background:
    radial-gradient(circle at 18% 78%,rgba(61,180,255,.2),transparent 28%),
    radial-gradient(circle at 80% 18%,rgba(255,182,72,.18),transparent 25%),
    linear-gradient(135deg,rgba(4,13,28,.87),rgba(8,27,54,.8)),
    url("../assets/images/games/generated/forms-energy-stage.png") center/cover,
    #081528;
}
body.hanmai-enhanced[data-chant-mode=word] .hanmai-app { padding:18px; background:linear-gradient(180deg,rgba(7,17,35,.15),rgba(7,17,35,.45)); }
body.hanmai-enhanced[data-chant-mode=word] .hm-header {
  min-height:76px; padding:12px 18px; border:1px solid rgba(117,205,255,.34); border-radius:18px;
  background:linear-gradient(90deg,rgba(8,28,53,.94),rgba(16,63,96,.7)); box-shadow:0 12px 28px rgba(0,0,0,.23),inset 0 1px 0 rgba(255,255,255,.12);
}
body.hanmai-enhanced[data-chant-mode=word] .hm-logo { display:flex; align-items:center; gap:10px; color:#fff; text-shadow:none; }
body.hanmai-enhanced[data-chant-mode=word] .hm-logo::before { content:"节"; display:grid; place-items:center; width:40px; height:40px; border:3px solid #fff; border-radius:14px; color:#08213a; background:linear-gradient(145deg,#ffd36b,#ff8b38); box-shadow:0 5px 0 #bd5b23; font-size:19px; }
body.hanmai-enhanced[data-chant-mode=word] .hm-btn,
body.hanmai-enhanced[data-chant-mode=word] .hm-range,
body.hanmai-enhanced[data-chant-mode=word] .hm-speed-tabs { border-color:rgba(148,214,255,.28); border-radius:12px; background:rgba(255,255,255,.1); box-shadow:none; }
body.hanmai-enhanced[data-chant-mode=word] .hm-btn.primary { color:#08213a; background:linear-gradient(145deg,#ffdb77,#ff9a48); box-shadow:0 5px 0 #b95c28; }
body.hanmai-enhanced[data-chant-mode=word] .hm-speed-tabs button.active { color:#08213a; background:#7ce3ff; box-shadow:none; }
body.hanmai-enhanced[data-chant-mode=word] .hm-stage { position:relative; gap:12px; padding:16px 2vw 8px; }
body.hanmai-enhanced[data-chant-mode=word] .hm-stage::before { content:"节奏领读台"; position:absolute; left:50%; top:20px; transform:translateX(-50%); z-index:0; color:rgba(211,242,255,.11); font-size:clamp(54px,8vw,124px); font-weight:950; white-space:nowrap; letter-spacing:0; }
body.hanmai-enhanced[data-chant-mode=word] .hm-top-row { position:relative; z-index:1; flex-basis:clamp(94px,17vh,134px); gap:10px; padding:10px; border:1px solid rgba(175,225,255,.25); border-radius:22px; background:rgba(5,21,43,.58); }
body.hanmai-enhanced[data-chant-mode=word] .hm-cn-card { border:2px solid rgba(128,218,255,.35); border-radius:16px; color:#c8f2ff; background:linear-gradient(145deg,rgba(29,78,115,.93),rgba(11,46,78,.93)); box-shadow:0 6px 0 rgba(5,30,56,.84); font-size:clamp(21px,3.2vw,46px); }
body.hanmai-enhanced[data-chant-mode=word] .hm-cn-card.active { color:#07213c; background:linear-gradient(145deg,#91e8ff,#44b4ee); box-shadow:0 6px 0 #1e77ae,0 0 24px rgba(111,220,255,.7); }
body.hanmai-enhanced[data-chant-mode=word] .hm-bottom-area { grid-template-columns:minmax(180px,1fr) minmax(250px,28vw) minmax(180px,1fr); gap:24px; padding:10px 0; }
body.hanmai-enhanced[data-chant-mode=word] .hm-bottom-col { gap:14px; }
body.hanmai-enhanced[data-chant-mode=word] .hm-en-card span { text-transform:none; }
body.hanmai-enhanced[data-chant-mode=word] .hm-en-card { border:2px solid rgba(165,224,255,.24); border-radius:22px; color:rgba(219,245,255,.35); background:linear-gradient(155deg,rgba(12,48,83,.9),rgba(7,27,53,.93)); box-shadow:0 8px 0 rgba(2,15,33,.72); }
body.hanmai-enhanced[data-chant-mode=word] .hm-en-card.active { color:#fff; border-color:#ffe08a; background:linear-gradient(145deg,#2c98d3,#1969ab); box-shadow:0 8px 0 #0b416d,0 0 26px rgba(112,223,255,.52); }
body.hanmai-enhanced[data-chant-mode=word] .hm-mic-zone { position:relative; border:2px solid rgba(255,221,129,.36); border-radius:32px; background:linear-gradient(160deg,rgba(17,64,102,.88),rgba(6,31,59,.9)); box-shadow:0 12px 0 rgba(3,19,38,.7),0 18px 34px rgba(0,0,0,.22); }
body.hanmai-enhanced[data-chant-mode=word] .hm-mic-zone::before { content:"全班节奏"; position:absolute; top:18px; color:#a9e9ff; font-size:13px; font-weight:950; letter-spacing:0; }
body.hanmai-enhanced[data-chant-mode=word] .hm-mic { width:clamp(88px,13vw,142px); color:#102d4b; background:radial-gradient(circle at 35% 28%,#fff,#ffe090 34%,#f18435 74%,#bf4e1b); box-shadow:0 0 0 10px rgba(255,223,135,.1),0 0 34px rgba(255,176,67,.55); }
body.hanmai-enhanced[data-chant-mode=word] .hm-progress { border-color:rgba(144,220,255,.28); background:rgba(4,22,43,.62); }
body.hanmai-enhanced[data-chant-mode=word] .hm-progress b { color:#ffcf6a; }
body.hanmai-enhanced[data-chant-mode=word] .hm-coach { background:linear-gradient(145deg,#ffdb7f,#ff9c4b); color:#17263b; box-shadow:0 5px 0 #bd5d28; }

body.hanmai-enhanced[data-chant-mode=sentence] {
  --hm-bg:#191338;
  --hm-panel:rgba(36,25,76,.82);
  --hm-panel-soft:rgba(42,27,91,.68);
  --hm-text:#f8f6ff;
  --hm-muted:#cec8eb;
  background:linear-gradient(135deg,rgba(24,12,59,.84),rgba(11,31,76,.75)),url("../assets/images/games/generated/quick-quiz-stage.png") center/cover,#191338;
}
body.hanmai-enhanced[data-chant-mode=sentence] .hanmai-app { padding:18px 5vw; background:linear-gradient(180deg,rgba(37,17,76,.18),rgba(14,19,62,.5)); }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-header { border:0; border-radius:0 0 24px 24px; background:rgba(28,18,63,.85); box-shadow:0 12px 25px rgba(0,0,0,.23); }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-logo { color:#fff; text-shadow:none; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-logo::after { content:"句型演播台"; display:block; margin-top:4px; color:#ffcb78; font-size:12px; font-weight:900; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-btn.primary { color:#24133f; background:linear-gradient(145deg,#ffe085,#f8a85d); box-shadow:0 5px 0 #af5d42; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-stage { gap:16px; padding:24px 2vw 14px; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-top-row { flex-basis:clamp(88px,15vh,120px); grid-template-columns:repeat(4,1fr); gap:8px; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-cn-card { border:0; border-radius:14px; color:#e8e2ff; background:rgba(50,37,102,.82); box-shadow:inset 0 -4px 0 rgba(255,255,255,.08); font-size:clamp(17px,2.4vw,31px); }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-cn-card.active { color:#2c1749; background:linear-gradient(145deg,#ffd894,#ffab8c); box-shadow:0 6px 0 #b45a72; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-bottom-area { grid-template-columns:minmax(0,1fr) minmax(142px,180px) minmax(0,1fr); gap:16px; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-en-card { border:1px solid rgba(255,255,255,.18); border-radius:18px; background:rgba(43,31,89,.72); }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-en-card.active { color:#fff; background:linear-gradient(145deg,#784bcc,#3e66c9); box-shadow:0 0 0 4px rgba(255,211,132,.48),0 10px 0 #33235e; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-en-card span { font-size:clamp(21px,3.1vw,42px); text-transform:none; line-height:1.16; word-break:normal; overflow-wrap:normal; hyphens:none; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-mic-zone { gap:13px; border:3px solid rgba(255,214,140,.64); border-radius:28px; background:linear-gradient(160deg,rgba(69,48,142,.92),rgba(31,31,83,.92)); box-shadow:0 14px 0 rgba(16,13,48,.7); }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-mic-zone::after { content:"听 - 读 - 跟"; position:absolute; top:21px; color:#ffe2a1; font-size:13px; font-weight:950; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-mic { width:clamp(66px,7vw,88px); color:#2d174c; background:radial-gradient(circle at 35% 25%,#fff,#ffe0a2 34%,#c477c9 72%,#653a9b); }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-progress { min-width:0; padding:10px 6px; border-color:rgba(255,229,175,.32); background:rgba(20,13,55,.55); }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-progress b { font-size:clamp(20px,2vw,29px); }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-progress b { color:#ffe096; }
body.hanmai-enhanced[data-chant-mode=sentence] .hm-coach { background:#ffe096; color:#351c58; box-shadow:0 5px 0 #b66a59; }

/* Time lab: answers are time capsules, not generic bubbles. */
body.arcade2[data-game=tense] { --a-bg:linear-gradient(135deg,#101b41,#2d1d5a 54%,#0e5475); }
body.arcade2[data-game=tense] .arcade2-stage { padding:16px 28px 22px; background:radial-gradient(circle at 20% 30%,rgba(66,180,255,.15),transparent 24%),radial-gradient(circle at 83% 72%,rgba(255,172,84,.14),transparent 24%); }
body.arcade2[data-game=tense] .tense-time-lab { position:relative; gap:14px; padding:18px; border:3px solid rgba(175,227,255,.32); border-radius:30px; background:linear-gradient(160deg,rgba(10,27,63,.9),rgba(15,56,91,.84)); box-shadow:0 18px 0 rgba(3,12,35,.38),inset 0 1px 0 rgba(255,255,255,.12); }
body.arcade2[data-game=tense] .tense-time-lab::before { content:"TIME LAB"; position:absolute; right:28px; top:86px; color:rgba(149,224,255,.11); font-size:clamp(46px,7vw,100px); font-weight:950; letter-spacing:0; pointer-events:none; }
body.arcade2[data-game=tense] .tense-hud { position:relative; z-index:1; grid-template-columns:repeat(4,1fr); gap:10px; }
body.arcade2[data-game=tense] .tense-hud>div { min-height:58px; gap:9px; border:1px solid rgba(149,223,255,.24); border-radius:14px; color:#9ecbe1; background:rgba(3,18,46,.54); box-shadow:inset 0 -3px 0 rgba(255,255,255,.05); }
body.arcade2[data-game=tense] .tense-hud span { font-size:13px; font-weight:950; }
body.arcade2[data-game=tense] .tense-hud b { color:#ffe093; font-size:22px; }
body.arcade2[data-game=tense] .tense-board { min-height:275px; border:2px solid rgba(149,223,255,.24); border-radius:24px; background:linear-gradient(135deg,rgba(14,41,83,.92),rgba(12,76,111,.8)); box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); }
body.arcade2[data-game=tense] .tense-board::before { width:130px; height:130px; left:-38px; top:-42px; border:2px solid rgba(154,226,255,.22); background:transparent; }
body.arcade2[data-game=tense] .tense-board::after { width:94px; height:94px; right:3%; bottom:-40px; border:2px dashed rgba(255,216,139,.3); background:transparent; }
body.arcade2[data-game=tense] .tense-command { width:auto; min-height:34px; padding:8px 18px; border:1px solid rgba(255,218,140,.5); border-radius:999px; color:#ffe6aa; background:rgba(6,21,53,.62); font-size:15px; }
body.arcade2[data-game=tense] .tense-board h2 { max-width:min(100%,1000px); color:#f5fbff; font-size:clamp(31px,4.2vw,58px); text-shadow:0 3px 0 rgba(3,17,45,.5); }
body.arcade2[data-game=tense] .tense-board p { color:#bfe6f6; }
body.arcade2[data-game=tense] .tense-tag { width:auto; min-height:34px; padding:0 18px; background:linear-gradient(90deg,#e77852,#f4c15d); color:#192c4c; line-height:34px; }
body.arcade2[data-game=tense] .tense-explain { color:#e5f7ff; }
body.arcade2[data-game=tense] .tense-bubbles { position:relative; z-index:1; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
body.arcade2[data-game=tense] .tense-bubble { min-height:82px; display:flex; align-items:center; gap:13px; padding:11px 16px; border:2px solid rgba(178,232,255,.55); border-radius:18px; color:#effaff; background:linear-gradient(145deg,#224f87,#15345f); box-shadow:0 7px 0 #0a1d3b,0 12px 18px rgba(1,9,31,.25); text-align:left; }
body.arcade2[data-game=tense] .tense-bubble::before { content:""; position:absolute; inset:6px; border:1px solid rgba(255,255,255,.12); border-radius:12px; pointer-events:none; }
body.arcade2[data-game=tense] .tense-bubble i { position:relative; z-index:1; display:grid; place-items:center; flex:0 0 34px; width:34px; height:34px; border-radius:10px; color:#12335d; background:#9ee6ff; font-size:13px; font-style:normal; font-weight:950; }
body.arcade2[data-game=tense] .tense-bubble span { position:relative; z-index:1; font-size:clamp(18px,2vw,28px); }
body.arcade2[data-game=tense] .tense-bubble:hover { transform:translateY(-4px); filter:brightness(1.12); }
body.arcade2[data-game=tense] .tense-bubble.right { background:linear-gradient(145deg,#1aa56f,#41d7ab); box-shadow:0 7px 0 #09785c,0 0 28px rgba(70,236,177,.45); }
body.arcade2[data-game=tense] .tense-bubble.wrong { background:linear-gradient(145deg,#cf4f63,#ee7d6e); box-shadow:0 7px 0 #913542; }
body.arcade2[data-game=tense] .tense-actions button { border-color:rgba(159,225,255,.35); background:rgba(7,27,60,.7); color:#dff5ff; }
body.arcade2[data-game=tense] .tense-actions button.active { background:linear-gradient(145deg,#f0bd5a,#e98655); color:#162c4f; }
@media(max-width:760px) {
  body.hanmai-enhanced[data-chant-mode=word] .hanmai-app,body.hanmai-enhanced[data-chant-mode=sentence] .hanmai-app { padding:9px; }
  body.hanmai-enhanced[data-chant-mode=word] .hm-bottom-area,body.hanmai-enhanced[data-chant-mode=sentence] .hm-bottom-area { grid-template-columns:1fr; }
  body.hanmai-enhanced[data-chant-mode=word] .hm-mic-zone,body.hanmai-enhanced[data-chant-mode=sentence] .hm-mic-zone { min-height:180px; grid-row:1; }
  body.hanmai-enhanced[data-chant-mode=word] .hm-bottom-col,body.hanmai-enhanced[data-chant-mode=sentence] .hm-bottom-col { grid-template-columns:1fr 1fr; grid-template-rows:1fr; min-height:128px; }
  body.hanmai-enhanced[data-chant-mode=sentence] .hm-en-card span { font-size:clamp(20px,6.2vw,32px); word-break:normal; overflow-wrap:normal; }
  body.arcade2[data-game=tense] .arcade2-stage { padding:9px; overflow:auto; }
  body.arcade2[data-game=tense] .tense-time-lab { padding:11px; }
  body.arcade2[data-game=tense] .tense-bubbles { grid-template-columns:1fr; }
  body.arcade2[data-game=tense] .tense-bubble { min-height:64px; }
}
.bank-import-summary{position:sticky;top:0;z-index:1;padding:10px 12px;margin:0 0 10px;border-radius:8px;background:#e9f5f1;color:#245447;font-size:14px}.bank-import-summary .warning{color:#b54708}

body.arcade2[data-game=sentence] .train-convoy{width:100%;min-width:0;gap:0}
body.arcade2[data-game=sentence] .train-engine{flex:0 0 230px;width:230px;height:150px}
body.arcade2[data-game=sentence] .train-track{display:flex;flex:1 1 0;width:0;flex-wrap:nowrap;align-content:flex-end;justify-content:flex-start;gap:0;min-width:0;margin:0;max-width:none;padding:0 0 14px;overflow:visible}
body.arcade2[data-game=sentence] .train-track span{position:relative;z-index:1;box-sizing:border-box;flex:0 0 calc(100% / var(--wagon-count));min-width:0;min-height:58px;margin:0;padding:10px 4px;border:3px solid #fff0b5;border-right-width:1px;border-radius:12px 5px 5px 12px;background:linear-gradient(180deg,#85dcff 0%,#43a8df 48%,#287ac1 49%,#1a5799 100%);color:#fff;text-align:center;text-shadow:0 2px 1px rgba(17,53,91,.45);font-size:clamp(12px,1.35vw,18px);white-space:normal;box-shadow:inset 0 5px 0 rgba(255,255,255,.3),inset 0 -6px 0 rgba(11,49,92,.24),0 8px 0 rgba(21,44,71,.2)}
body.arcade2[data-game=sentence] .train-track span:not(:first-child){border-left-width:1px;border-radius:5px}
body.arcade2[data-game=sentence] .train-track span:last-child{border-right-width:3px;border-radius:5px 12px 12px 5px}
body.arcade2[data-game=sentence] .train-track span::before{content:"";position:absolute;z-index:-1;left:-5px;top:50%;width:9px;height:7px;border:2px solid #7d552d;border-radius:6px;background:linear-gradient(180deg,#ffe18b,#b77a3b);transform:translateY(-50%);box-shadow:0 2px 0 rgba(45,35,27,.28)}
body.arcade2[data-game=sentence] .sentence-complete .train-convoy{animation-duration:1.95s}
body.arcade2[data-game=sentence] .sentence-train .big-prompt.compact{position:relative;min-height:82px;padding:8px 180px}
body.arcade2[data-game=sentence] .sentence-train .big-prompt h2{font-size:clamp(30px,3.1vw,42px)}
body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn{position:absolute;right:18px;top:50%;min-height:44px;padding:0 16px;transform:translateY(-50%)}
body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn:hover{transform:translateY(calc(-50% - 2px))}
body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn:active{transform:translateY(calc(-50% + 5px))}
body.arcade2[data-game=sentence] .train-line{min-height:170px;padding:10px 14px}
@media(max-width:760px){body.arcade2[data-game=sentence] .sentence-train .big-prompt.compact{min-height:0;padding:11px 12px 66px}.train-line{overflow-x:auto}.train-convoy{width:max-content;min-width:100%}.train-engine{flex-basis:128px;width:128px;height:100px}.train-track{flex:0 0 auto;width:max-content}.train-track span{flex:0 0 82px;min-width:82px;min-height:52px;padding:11px 8px;font-size:16px}body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn{right:auto;top:auto;bottom:10px;left:50%;transform:translateX(-50%)}body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn:hover{transform:translate(-50%,-2px)}body.arcade2[data-game=sentence] .sentence-train .big-prompt button#sayCn:active{transform:translate(-50%,5px)}body.arcade2[data-game=sentence] .sentence-train .big-prompt h2{font-size:clamp(28px,7vw,34px)}}
@media(max-width:760px){body.arcade2[data-game=sentence] .train-engine{flex:0 0 128px!important;width:128px!important;height:100px!important}body.arcade2[data-game=sentence] .train-track{flex:0 0 auto!important;width:max-content!important}body.arcade2[data-game=sentence] .train-track span{flex:0 0 82px!important;width:82px;min-width:82px;max-width:82px;min-height:52px;padding:11px 8px;font-size:16px}}
@media(max-width:760px){body.arcade2[data-game=sentence] .train-convoy{justify-content:flex-start!important}}
body.arcade2[data-game=sentence] .train-track span.filled{z-index:2;min-height:66px;padding:8px 5px;border-color:#fff4b0;border-radius:10px;color:#fff;font-size:clamp(17px,1.55vw,21px);font-weight:1000;line-height:1.04;overflow-wrap:anywhere;text-shadow:0 2px 2px rgba(12,38,76,.55);box-shadow:inset 0 0 0 2px rgba(255,255,255,.24),0 0 0 2px rgba(255,255,255,.76),0 0 18px rgba(255,221,104,.62),0 8px 0 rgba(21,44,71,.24)}
body.arcade2[data-game=sentence] .train-track span.filled.ok{border-color:#fff4b0;background:linear-gradient(150deg,#13c999 0%,#0c9f86 50%,#087663 100%);box-shadow:inset 0 0 0 2px rgba(255,255,255,.28),0 0 0 2px #fff,0 0 24px rgba(40,255,194,.8),0 8px 0 rgba(9,81,70,.35)}
body.arcade2[data-game=sentence] .train-track span.filled.wrong{border-color:#ffd0c8;background:linear-gradient(150deg,#ff856f 0%,#e95057 52%,#b52d50 100%);box-shadow:inset 0 0 0 2px rgba(255,255,255,.25),0 0 0 2px #fff,0 0 22px rgba(255,89,100,.64),0 8px 0 rgba(106,31,50,.3)}
@media(max-width:760px){body.arcade2[data-game=sentence] .train-track span.filled{min-height:64px;padding:8px 5px;font-size:18px}}
.saved-question-manager{margin:16px 0;border:1px solid #d8dee8;border-radius:6px;background:#fff}.saved-question-manager summary{padding:12px 14px;font-weight:700;cursor:pointer}.saved-question-list{max-height:280px;overflow:auto;border-top:1px solid #e5e9ef}.saved-question-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 12px;border-bottom:1px solid #edf0f4}.saved-question-row span{min-width:0;display:grid;gap:3px}.saved-question-row b,.saved-question-row small{overflow-wrap:anywhere}.saved-question-row small{color:#657080}.saved-question-row button{flex:none}


/* Global Modal & Responsive Viewport Safety */
html, body {
  overflow-y: auto !important;
  box-sizing: border-box;
}
.game-shell, .arcade2-app {
  min-height: min-content;
}
@media (max-height: 850px) {
  .game-intro {
    padding: 18px 0 14px !important;
  }
  .game-controls {
    margin-bottom: 10px !important;
    padding: 8px 12px !important;
  }
}
