:root {
  --paper: #fff9e8;
  --paper-strong: #ffffff;
  --ink: #29486f;
  --ink-soft: #66809a;
  --line: #d6e8ee;
  --deep: #28527f;
  --deep-2: #4c8ec5;
  --sea: #48bbb7;
  --sea-soft: #d7f6ef;
  --sun: #ffc95b;
  --sun-soft: #fff3c9;
  --coral: #ff8b9a;
  --coral-soft: #ffe1e6;
  --mist: #eef7fb;
  --success: #33a582;
  --shadow: 0 18px 46px rgba(64, 113, 157, .14);
  --shadow-soft: 0 8px 20px rgba(64, 113, 157, .10);
  --radius-xl: 27px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --speed: 180ms;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 7% 12%, rgba(255, 203, 91, .34), transparent 21%),
    radial-gradient(circle at 91% 11%, rgba(103, 209, 229, .25), transparent 22%),
    radial-gradient(circle at 87% 89%, rgba(255, 151, 181, .20), transparent 24%),
    linear-gradient(135deg, #fff8df, #f4fcff 52%, #f8f1ff);
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: .46;
  background-image: radial-gradient(circle, rgba(23, 61, 77, .08) 0 1.4px, transparent 1.8px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}

/* 访问门禁：先验证密码，再展示游戏内容；适合小范围分享，不替代服务器鉴权。 */
body.access-locked { overflow: hidden; }
.access-gate {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 207, 101, .34), transparent 25%),
    radial-gradient(circle at 88% 14%, rgba(111, 216, 231, .30), transparent 27%),
    linear-gradient(135deg, #fff8df, #f0fcff 54%, #fdf0fa);
}
.access-gate[hidden] { display: none !important; }
.access-card {
  width: min(430px, 100%);
  padding: clamp(24px, 5vw, 38px);
  border: 3px solid rgba(255, 255, 255, .94);
  border-radius: 28px;
  background: rgba(255, 255, 253, .92);
  box-shadow: 0 10px 0 rgba(112, 183, 169, .72), 0 28px 66px rgba(43, 88, 127, .18);
  text-align: center;
}
.access-badge {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0 auto 13px;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff2b5, #d7f7f2);
  box-shadow: 0 5px 0 rgba(89, 174, 183, .22);
  font-size: 29px;
}
.access-card h1 { margin: 8px 0 8px; color: var(--deep); font-size: clamp(25px, 5vw, 34px); }
.access-card > p { margin: 0 auto 22px; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.access-card form { display: grid; gap: 8px; text-align: left; }
.access-card label { color: var(--deep); font-size: 12px; font-weight: 900; }
.access-input-wrap { display: flex; align-items: stretch; gap: 6px; }
.access-input-wrap input { width: 100%; min-height: 46px; padding: 10px 12px; border: 2px solid #cfe5eb; border-radius: 12px; color: var(--deep); background: #fff; font-size: 16px; letter-spacing: .08em; }
.access-input-wrap input:focus { border-color: #5dc8c0; outline: 3px solid rgba(93, 200, 192, .18); }
.access-toggle { flex: 0 0 auto; min-width: 53px; padding: 7px 9px; border: 1px solid #cfe1e8; border-radius: 11px; color: var(--deep); background: #f4fbfd; cursor: pointer; font-size: 11px; font-weight: 900; }
.access-toggle:hover { background: #e6f8f5; border-color: #79cfc7; }
.access-error { min-height: 18px; margin: 1px 2px 0; color: #c85e69; font-size: 11px; font-weight: 800; }
.access-error[hidden] { display: block; visibility: hidden; }
.access-submit { width: 100%; margin-top: 5px; min-height: 48px; border-radius: 14px; font-size: 15px; }
.access-note { display: block; margin-top: 22px; color: #8499a6; font-size: 10px; line-height: 1.5; }

/* 三种明亮主题：保留默认糖果色，同时提供天空蓝和蜜桃粉快速切换。 */
body[data-theme="sky"] {
  --ink: #244d79;
  --ink-soft: #6483a0;
  --deep: #245a90;
  --deep-2: #4d9bdb;
  --sea: #4daed0;
  --sea-soft: #d9f5ff;
  --sun: #ffd465;
  --sun-soft: #fff4c9;
  --coral: #ff9d8d;
  --coral-soft: #ffe5df;
  background: radial-gradient(circle at 8% 12%, rgba(126, 211, 255, .30), transparent 22%), radial-gradient(circle at 88% 86%, rgba(158, 224, 255, .28), transparent 25%), linear-gradient(135deg, #eaf8ff, #f8fdff 52%, #eef7ff);
}
body[data-theme="peach"] {
  --ink: #674a62;
  --ink-soft: #967783;
  --deep: #8a4f73;
  --deep-2: #d0799b;
  --sea: #e98f91;
  --sea-soft: #ffe3e0;
  --sun: #ffd36e;
  --sun-soft: #fff1c8;
  --coral: #ee7b8b;
  --coral-soft: #ffe0e8;
  background: radial-gradient(circle at 8% 10%, rgba(255, 221, 150, .34), transparent 22%), radial-gradient(circle at 89% 12%, rgba(255, 184, 205, .28), transparent 22%), linear-gradient(135deg, #fff6df, #fff7fb 52%, #f7f0ff);
}
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(69, 167, 157, .38); outline-offset: 2px; }

.app-shell { width: min(1680px, 100%); min-height: 100vh; margin: 0 auto; padding: 18px clamp(16px, 2.5vw, 38px) 24px; }
.topbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 15px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 52px; height: 52px; filter: drop-shadow(0 6px 7px rgba(23, 61, 77, .18)); }
.brand span { display: grid; line-height: 1.07; }
.brand strong { color: var(--deep); font-size: clamp(22px, 2vw, 31px); letter-spacing: .04em; }
.brand small { margin-top: 6px; color: #5f7b78; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.theme-picker { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid rgba(23, 61, 77, .13); border-radius: 999px; background: rgba(255,255,255,.72); box-shadow: var(--shadow-soft); }
.theme-swatch { width: 21px; height: 21px; min-height: 21px; padding: 0; border: 2px solid rgba(23,61,77,.18); border-radius: 50%; cursor: pointer; transition: transform var(--speed), box-shadow var(--speed), border-color var(--speed); }
.theme-swatch:hover { transform: translateY(-1px) scale(1.05); }
.theme-swatch.is-active { border-color: var(--deep); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--deep-2); }
.theme-candy { background: linear-gradient(135deg, #ffd064 0 45%, #62c8bf 46% 100%); }
.theme-sky { background: linear-gradient(135deg, #7dd9ff 0 45%, #4d9bdb 46% 100%); }
.theme-peach { background: linear-gradient(135deg, #ffd47a 0 45%, #e98f91 46% 100%); }

.primary-btn, .soft-btn, .text-btn, .wide-soft-btn, .icon-btn { border: 0; border-radius: 12px; cursor: pointer; font-weight: 800; transition: transform var(--speed), background var(--speed), box-shadow var(--speed), opacity var(--speed); }
.primary-btn { min-height: 44px; padding: 10px 19px; color: #fff; background: var(--sea); box-shadow: 0 6px 0 #277c76, 0 12px 21px rgba(39, 124, 118, .2); }
.primary-btn:hover:not(:disabled) { transform: translateY(-2px); background: #56b7ad; box-shadow: 0 8px 0 #277c76, 0 15px 25px rgba(39, 124, 118, .22); }
.primary-btn.compact { min-height: 40px; padding: 8px 15px; }
.soft-btn, .wide-soft-btn { min-height: 40px; padding: 9px 14px; color: var(--deep); border: 1px solid rgba(23, 61, 77, .13); background: rgba(255, 255, 255, .78); box-shadow: var(--shadow-soft); }
.soft-btn:hover:not(:disabled), .wide-soft-btn:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(69, 167, 157, .52); background: #fff; }
.text-btn { min-height: 40px; padding: 8px 12px; color: #d56d5c; background: transparent; }
.text-btn:hover:not(:disabled) { background: rgba(255,255,255,.64); }
button:disabled { cursor: not-allowed; opacity: .42; box-shadow: none; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.workspace.is-home { grid-template-columns: minmax(0, 1fr); }
.listening-stage { min-width: 0; }
.route-strip { display: flex; align-items: center; gap: 9px; min-height: 32px; padding: 0 4px 9px; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.route-strip i { width: clamp(24px, 4vw, 64px); height: 1px; background: repeating-linear-gradient(to right, #9ebcb4 0 5px, transparent 5px 9px); }
.route-step { display: flex; align-items: center; gap: 5px; }
.route-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: #fff; background: var(--deep-2); font-size: 10px; }

/* 首页：与听写卡分开的欢迎视图，进入应用时先让孩子知道下一步做什么。 */
.home-card { min-height: calc(100svh - 143px); display: grid; grid-template-columns: minmax(300px, 560px) minmax(220px, 300px); grid-template-rows: auto auto auto; align-content: center; justify-content: center; gap: 20px clamp(28px, 4vw, 72px); padding: clamp(24px, 4vw, 54px); overflow: hidden; border: 3px solid #fff; border-radius: var(--radius-xl); color: var(--ink); background: linear-gradient(135deg, #fff2b9 0%, #e5faff 48%, #d6f5ed 100%); box-shadow: 0 10px 0 #9ed9e9, 0 25px 52px rgba(64, 113, 157, .18); position: relative; }
.home-card[hidden], .mission-card[hidden], .route-strip[hidden] { display: none !important; }
.home-card::before, .home-card::after { content: ""; position: absolute; pointer-events: none; border-radius: 50%; }
.home-card::before { width: 430px; height: 430px; right: -180px; top: -210px; border: 1px solid rgba(255,255,255,.72); box-shadow: 0 0 0 52px rgba(255,255,255,.22), 0 0 0 104px rgba(255,255,255,.12); }
.home-card::after { width: 240px; height: 240px; left: -125px; bottom: -150px; border: 1px solid rgba(255,255,255,.56); box-shadow: 0 0 0 38px rgba(255,255,255,.18); }
.home-hero, .home-mascot, .home-features, .home-tip { position: relative; z-index: 1; }
.home-hero { align-self: center; padding: 8px 0; }
.home-hero h1 { margin: 10px 0 13px; color: var(--deep); font-size: clamp(30px, 4.2vw, 57px); line-height: 1.18; letter-spacing: .02em; }
.home-hero h1 em { color: #e78355; font-style: normal; }
.home-hero p { margin: 0; color: #5e7d91; font-size: clamp(14px, 1.4vw, 18px); font-weight: 700; line-height: 1.8; }
.home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; margin-top: 25px; }
.home-actions .primary-btn { min-height: 51px; padding: 11px 27px; border-radius: 15px; font-size: 16px; }
.home-actions .soft-btn { min-height: 47px; padding: 10px 17px; border-radius: 14px; }
.home-mascot { align-self: center; display: grid; justify-items: center; gap: 4px; min-height: 255px; padding-top: 26px; }
.home-mascot img { display: block; width: min(235px, 100%); height: 190px; object-fit: contain; }
.home-mascot > strong { color: var(--deep); font-size: 16px; }
.home-speech { position: absolute; top: 0; right: -3px; left: 2px; padding: 10px 12px; border: 2px solid #f1b77f; border-radius: 17px; color: #87513c; background: #fffdf4; box-shadow: 4px 5px 0 rgba(224, 156, 104, .22); font-size: 12px; font-weight: 800; line-height: 1.45; text-align: center; }
.home-speech::after { content: ""; position: absolute; bottom: -9px; left: 50%; width: 13px; height: 13px; border-right: 2px solid #f1b77f; border-bottom: 2px solid #f1b77f; background: #fffdf4; transform: translateX(-50%) rotate(45deg); }
.home-features { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(100%, 1100px); justify-self: center; }
.home-features article { display: flex; align-items: center; gap: 11px; min-height: 70px; padding: 11px 14px; border: 2px solid rgba(255,255,255,.76); border-radius: 16px; background: rgba(255,255,255,.66); box-shadow: 0 6px 13px rgba(81, 150, 173, .08); }
.home-features article > span { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 11px; background: #fff3c9; font-size: 18px; }
.home-features article:nth-child(2) > span { background: #d9f6ef; }
.home-features article:nth-child(3) > span { background: #ffe1e6; }
.home-features article div { display: grid; gap: 3px; }
.home-features strong { color: var(--deep); font-size: 13px; }
.home-features small { color: var(--ink-soft); font-size: 10px; line-height: 1.35; }
.home-tip { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; color: #668092; font-size: 11px; }
.home-tip b { padding: 4px 8px; border-radius: 999px; color: #9a6e31; background: #fff0b8; }

.mission-card { min-height: calc(100svh - 143px); padding: clamp(18px, 2vw, 28px); overflow: hidden; border: 3px solid #fff; border-radius: var(--radius-xl); color: var(--ink); background: linear-gradient(135deg, #bdeeff 0%, #e4faff 55%, #fff2bf 100%); box-shadow: 0 10px 0 #9ed9e9, 0 25px 52px rgba(64, 113, 157, .18); position: relative; }
.mission-card::before, .mission-card::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; pointer-events: none; }
.mission-card::before { width: 500px; height: 500px; right: -240px; top: -300px; border-color: rgba(255,255,255,.46); box-shadow: 0 0 0 62px rgba(255,255,255,.18), 0 0 0 124px rgba(255,255,255,.12); }
.mission-card::after { width: 290px; height: 290px; left: -150px; bottom: -175px; border-color: rgba(255,255,255,.38); box-shadow: 0 0 0 44px rgba(255,255,255,.17); }
.mission-topline, .challenge-zone, .answer-area, .letter-pad, .mission-footer { position: relative; z-index: 1; }
.mission-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.eyebrow { color: #278c9a; font-size: 11px; font-weight: 900; letter-spacing: .17em; }
.mission-topline h1 { margin: 6px 0 0; font-size: clamp(22px, 2.4vw, 34px); line-height: 1.2; }
.timer-chip { min-width: 94px; padding: 9px 12px; border: 2px solid rgba(80, 155, 198, .28); border-radius: 13px; background: rgba(255,255,255,.72); text-align: center; }
.timer-chip span { display: block; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.timer-chip strong { display: block; margin-top: 3px; font-size: 21px; font-variant-numeric: tabular-nums; }

.challenge-zone { display: grid; grid-template-columns: 230px minmax(0, 1fr); align-items: center; gap: clamp(14px, 3vw, 36px); width: min(100%, 860px); margin: 10px auto 12px; }
.mascot-card { position: relative; display: grid; justify-items: center; align-content: center; min-height: 224px; padding: 7px 12px 9px; border: 2px solid rgba(255,255,255,.88); border-radius: 22px; background: linear-gradient(145deg, #fff9d8, #e6f8ff); box-shadow: 0 7px 0 rgba(98, 177, 203, .23); }
.mascot-card svg { width: min(200px, 100%); height: 168px; }
.mascot-card .mascot-image { display: block; width: min(204px, 100%); height: 150px; margin-top: 34px; object-fit: contain; }
.mascot-card .mascot-caption { display: flex; align-items: baseline; gap: 8px; }
.mascot-card .mascot-caption strong { color: var(--deep); font-size: 17px; }
.mascot-speech { position: absolute; z-index: 2; top: 5px; right: 12px; left: 12px; padding: 7px 9px; border: 2px solid #f1b77f; border-radius: 15px; color: #87513c; background: #fffdf4; box-shadow: 3px 4px 0 rgba(224, 156, 104, .22); font-size: 12px; font-weight: 800; line-height: 1.35; text-align: center; }
.mascot-speech::after { content: ""; position: absolute; bottom: -8px; left: 42px; width: 12px; height: 12px; border-right: 2px solid #f1b77f; border-bottom: 2px solid #f1b77f; background: #fffdf4; transform: rotate(45deg); }
.mascot-shadow { fill: rgba(66, 113, 150, .16); }
.mascot-signal { fill: none; stroke: #65cfc4; stroke-width: 7; stroke-linecap: round; }
.signal-two { opacity: .48; }
.mascot-body { fill: #fffdf4; stroke: #315d91; stroke-width: 5; }
.mascot-face { fill: #3f89ba; stroke: #7adbd0; stroke-width: 4; }
.mascot-eye { fill: #ffe080; }
.mascot-smile { fill: none; stroke: #fff8dc; stroke-width: 4; stroke-linecap: round; }
.mascot-cheek { fill: #f38d7f; opacity: .9; }
.mascot-antenna, .mascot-arm { fill: none; stroke: #315d91; stroke-width: 5; stroke-linecap: round; }
.mascot-star { fill: #efb95a; }
.mascot-light { stroke: #efb95a; stroke-width: 5; stroke-linecap: round; }
.mascot-ear { fill: #ffd6dc; stroke: #315d91; stroke-width: 4; stroke-linejoin: round; }
.mascot-bubble { fill: #ffd15d; }
.mascot-pupil { fill: #2f577f; }
.mascot-heart { fill: #ff8293; stroke: #315d91; stroke-width: 2.5; }
.mascot-hand { fill: #fff7dc; stroke: #315d91; stroke-width: 3; }
.mascot-badge { fill: #ffd15d; stroke: #315d91; stroke-width: 2; stroke-linejoin: round; }
.mascot-face { fill: #62c6df; stroke: #7adbd0; }
.mascot-eye { fill: #fff0a9; }
.mascot-card { border: 0; background: transparent; box-shadow: none; }
.cat-ear { fill: #ffd6dc; stroke: #315d91; stroke-width: 4; stroke-linejoin: round; }
.cat-head, .cat-body { fill: #fffaf0; stroke: #315d91; stroke-width: 5; stroke-linejoin: round; }
.cat-face { fill: #62c6df; stroke: #7adbd0; stroke-width: 4; }
.cat-ear-inner { fill: #ff9eae; }
.cat-mouth { fill: none; stroke: #fffaf0; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.cat-eye-closed { fill: none; stroke: #8b5142; stroke-width: 3; stroke-linecap: round; }
.cat-tail, .cat-whisker { fill: none; stroke: #315d91; stroke-width: 4; stroke-linecap: round; }
.cat-nose { fill: #ff8a9a; }
.cat-collar { fill: none; stroke: #ff8a9a; stroke-width: 5; stroke-linecap: round; }
.cat-bell { fill: #ffd15d; stroke: #315d91; stroke-width: 2; }
.cat-paw { fill: #fffaf0; stroke: #315d91; stroke-width: 3; stroke-linecap: round; }
.cat-head, .cat-body { fill: #f3a34c; stroke: #8b5142; }
.cat-face { fill: #ffd98b; stroke: #e88959; }
.cat-ear-inner { fill: #ff9a9d; }
.cat-stripe { fill: none; stroke: #d7773f; stroke-width: 4; stroke-linecap: round; }
.cat-tail, .cat-whisker { stroke: #8b5142; }
.cat-nose { fill: #d86c67; }
.cat-mouth { stroke: #fff4d5; }
.mascot-eye { fill: #b9dd72; }
.mascot-pupil { fill: #38523b; }
.cat-collar { stroke: #66c8bd; }
.cat-bell { fill: #ffd15d; stroke: #8b5142; }
.cat-paw { fill: #ffd98b; stroke: #8b5142; }

.listen-panel { text-align: center; }
.listen-orb { width: min(240px, 100%); min-height: 118px; display: grid; place-items: center; align-content: center; gap: 8px; margin: 0 auto 12px; border: 3px solid #fff; border-radius: 26px; color: var(--deep); background: linear-gradient(145deg, #ffffff, #fff8d9); box-shadow: 0 7px 0 #91cae1, 0 17px 30px rgba(71, 136, 179, .18); cursor: pointer; transition: transform var(--speed), box-shadow var(--speed); }
.listen-orb svg { width: 40px; height: 40px; fill: none; stroke: var(--sea); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.listen-orb span { font-size: 17px; font-weight: 900; }
.listen-orb:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 10px 0 #91cae1, 0 22px 36px rgba(71, 136, 179, .22); }
.hint-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; min-height: 45px; max-width: 430px; margin: 0 auto; padding: 7px 10px; border: 2px solid rgba(255,255,255,.78); border-radius: 13px; background: rgba(255,255,255,.50); text-align: left; }
.hint-label { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.hint-row strong { overflow: hidden; font-size: clamp(17px, 2.2vw, 26px); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.hint-toggle { padding: 5px 8px; border: 1px solid #9fd2df; border-radius: 8px; color: var(--deep); background: #fff; cursor: pointer; font-size: 11px; font-weight: 800; }
.word-context { min-height: 20px; margin: 8px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }

.answer-area { width: min(100%, 740px); margin: 8px auto 8px; padding: 13px; border: 2px solid rgba(97, 164, 192, .22); border-radius: var(--radius-lg); background: rgba(255,255,255,.52); box-shadow: 0 6px 14px rgba(89, 147, 178, .08); }
.answer-area label { display: block; margin-bottom: 7px; color: var(--deep); font-size: 12px; font-weight: 800; }
.answer-area input { width: 100%; min-height: 53px; padding: 10px 14px; border: 2px solid transparent; border-radius: 12px; color: var(--deep); background: #fffef9; font-size: clamp(18px, 2vw, 25px); font-weight: 800; letter-spacing: .04em; }
.answer-area input::placeholder { color: #9badb1; font-size: 14px; letter-spacing: 0; }
.answer-area input:disabled { opacity: .72; background: #e4ece8; }
.answer-area input:focus { border-color: #8ae1d0; }
.answer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 2px; }
.answer-actions .primary-btn { min-height: 39px; padding: 8px 15px; }
.feedback { min-height: 20px; margin: 2px 0 0; color: var(--ink-soft); font-size: 12px; font-weight: 700; line-height: 1.5; }
.feedback.success { color: #23886f; }
.feedback.error { color: #bd5969; }
.feedback.neutral { color: var(--ink-soft); }

.letter-pad { width: min(100%, 680px); margin: 0 auto; padding: 8px; border: 2px solid rgba(97, 164, 192, .20); border-radius: 16px; background: rgba(255,255,255,.48); box-shadow: 0 6px 14px rgba(89, 147, 178, .07); }
.letter-pad.disabled { pointer-events: none; opacity: .5; }
.key-row { display: flex; justify-content: center; gap: 5px; margin: 4px 0; }
.row-2 { padding: 0 4%; }.row-3 { padding: 0 9%; }
.letter-key { min-width: 37px; min-height: 35px; padding: 5px 8px; border: 0; border-radius: 8px; color: #234754; background: #e8f1ed; box-shadow: 0 3px 0 #a3c2b8; cursor: pointer; font-size: 14px; font-weight: 900; text-transform: uppercase; }
.letter-key:hover { transform: translateY(-1px); background: #fffdf5; }.letter-key:active { transform: translateY(2px); box-shadow: 0 1px 0 #a3c2b8; }
.letter-key.wide { min-width: 126px; text-transform: none; }.letter-key.delete { color: #fff; background: #d87867; box-shadow: 0 3px 0 #a85a4d; }

.mission-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 740px); margin: 11px auto 0; }
.mission-footer > span { color: var(--deep); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }.mission-footer .soft-btn { color: var(--deep); }

.control-tower { display: flex; flex-direction: column; gap: 12px; }.guide-card, .stats-card, .mistake-card, .save-card { border: 1px solid rgba(23,61,77,.1); border-radius: var(--radius-lg); background: rgba(255,254,250,.83); box-shadow: var(--shadow-soft); }
.control-tower[hidden] { display: none !important; }
.guide-card { min-height: 162px; padding: 17px; overflow: hidden; position: relative; }.guide-card h2 { margin: 7px 0 4px; color: var(--deep); font-size: 21px; }.guide-card p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.guide-orbit { position: absolute; right: 12px; top: 13px; width: 98px; height: 72px; color: var(--sea); }.guide-orbit span { position: absolute; right: 15px; top: 19px; display: grid; place-items: center; width: 38px; height: 38px; border: 5px solid #ecfaf5; border-radius: 50%; background: var(--sea); color: #fff; font-weight: 900; }.guide-orbit i { position: absolute; inset: 3px 1px 5px 7px; border: 1px dashed #9dc9bf; border-radius: 50%; transform: rotate(-28deg); }.guide-orbit b { position: absolute; right: 0; top: 0; color: var(--sun); font-size: 20px; }
.stats-card, .mistake-card { padding: 15px; }.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }.section-heading > span { color: var(--deep); font-size: 14px; font-weight: 900; }.section-heading > small { color: var(--ink-soft); font-size: 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }.stat-grid > div { display: grid; justify-items: center; padding: 10px 4px; border-radius: 10px; background: #eff5f0; }.stat-grid > div:nth-child(1) { background: var(--sun-soft); }.stat-grid > div:nth-child(2) { background: var(--coral-soft); }.stat-grid strong { color: var(--deep); font-size: 25px; }.stat-grid small { margin-top: 2px; color: var(--ink-soft); font-size: 10px; }
.accuracy-row { display: flex; align-items: baseline; justify-content: space-between; margin: 12px 2px 9px; color: var(--ink-soft); font-size: 11px; }.accuracy-row strong { color: var(--sea); font-size: 18px; }.wide-soft-btn { width: 100%; min-height: 38px; padding: 8px; font-size: 11px; }
.mistake-list { max-height: 175px; overflow: auto; margin-top: 9px; }.mistake-list > p { margin: 8px 0; color: var(--ink-soft); font-size: 12px; }.mistake-item { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 8px 2px; border-bottom: 1px dashed #d6e1dc; }.mistake-item div { min-width: 0; display: grid; gap: 2px; }.mistake-item strong { overflow: hidden; color: var(--deep); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.mistake-item small { color: var(--ink-soft); font-size: 10px; }.mistake-item b { flex: 0 0 auto; padding: 4px 6px; border-radius: 999px; color: #a75549; background: var(--coral-soft); font-size: 10px; }
.save-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }.save-card strong, .save-card small { display: block; }.save-card strong { color: var(--deep); font-size: 12px; }.save-card small { margin-top: 2px; color: var(--ink-soft); font-size: 10px; }.save-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(42,137,111,.13); }

.dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 22px; border: 0; background: transparent; overflow: auto; }.dialog::backdrop { background: rgba(14, 41, 51, .61); backdrop-filter: blur(4px); }
.dialog-card { width: min(780px, 100%); max-height: calc(100vh - 44px); margin: auto; overflow: auto; padding: clamp(20px, 3vw, 32px); border: 2px solid #e6eee9; border-radius: 24px; color: var(--ink); background: #fffefa; box-shadow: 0 11px 0 #70b7a9, 0 30px 80px rgba(4, 22, 30, .35); }.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }.dialog-header h2 { margin: 5px 0 0; color: var(--deep); font-size: clamp(23px, 3vw, 32px); }.icon-btn { display: grid; place-items: center; width: 39px; height: 39px; color: var(--deep); background: #e9f1ed; font-size: 25px; }
.setup-section { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #f8fbf8; }.setup-section + .setup-section { margin-top: 12px; }.unit-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }.unit-option { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid #dce7e1; border-radius: 11px; cursor: pointer; background: #fff; }.unit-option:has(input:checked) { border-color: var(--sea); box-shadow: inset 0 0 0 1px var(--sea); background: #effaf6; }.unit-option input { width: 17px; height: 17px; accent-color: var(--sea); }.unit-option b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--deep); background: var(--sun-soft); }.unit-option span { display: grid; gap: 2px; min-width: 0; }.unit-option strong { overflow: hidden; color: var(--deep); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }.unit-option small { overflow: hidden; color: var(--ink-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }.unit-option em { color: var(--ink-soft); font-size: 10px; font-style: normal; white-space: nowrap; }
.setup-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }.setup-options label:not(.switch-row), .library-section label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }.setup-options select, .library-section input, .library-section textarea { width: 100%; min-height: 42px; padding: 9px 10px; border: 1px solid #cad9d1; border-radius: 10px; color: var(--deep); background: #fff; }.switch-row { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 9px; }.switch-row input { width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--sea); }.switch-row span { display: grid; gap: 3px; }.switch-row strong { color: var(--deep); font-size: 12px; }.switch-row small { color: var(--ink-soft); font-size: 10px; }.form-error { min-height: 17px; margin: 10px 2px 0; color: #b55248; font-size: 12px; font-weight: 800; }.dialog-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.library-card { width: min(1030px, 100%); }.library-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 14px; }.library-section { min-height: 390px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #f8fbf8; }.library-list { max-height: 370px; overflow: auto; margin-top: 10px; }.library-unit { padding: 10px 1px; border-bottom: 1px dashed #ceddd5; }.library-unit > div { display: flex; align-items: center; gap: 9px; }.library-unit b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--deep); background: var(--sun-soft); }.library-unit span { display: grid; gap: 2px; }.library-unit strong { color: var(--deep); font-size: 12px; }.library-unit small { color: var(--ink-soft); font-size: 9px; }.library-unit p { margin: 7px 0 0 35px; color: #6d8583; font-size: 10px; line-height: 1.55; }.library-section textarea { min-height: 185px; margin: 10px 0; resize: vertical; line-height: 1.55; }.file-input { position: relative; cursor: pointer; }.file-input input[type="file"] { margin-top: 4px; padding: 6px; font-size: 10px; }.import-report { min-height: 18px; margin: 8px 0; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }.import-report.error { color: #b55248; }.import-report.success { color: var(--success); }.backup-bar { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-lg); color: #e9f6f1; background: var(--deep); }.backup-bar strong, .backup-bar small { display: block; }.backup-bar strong { font-size: 13px; }.backup-bar small { margin-top: 3px; color: #bad8d0; font-size: 10px; line-height: 1.45; }.backup-bar .soft-btn { box-shadow: none; }.backup-bar .file-input input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.import-file-row { display: flex; align-items: end; gap: 10px; margin-top: 9px; }
.import-file-row .file-input { flex: 1; }
.sample-file-link { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 13px; border: 1px solid #bad9d4; border-radius: 10px; color: var(--deep); background: #effaf6; font-size: 11px; font-weight: 900; text-decoration: none; white-space: nowrap; }
.sample-file-link::before { content: "↓"; margin-right: 5px; color: var(--sea); font-size: 15px; }
.sample-file-link:hover { border-color: var(--sea); background: #e3f7f0; }
.import-format-row { display: flex; align-items: center; gap: 9px; margin-top: 8px; color: #6d8583; font-size: 10px; line-height: 1.45; }
.import-format-btn { min-height: 32px; padding: 6px 10px; border-radius: 9px; flex: 0 0 auto; font-size: 10px; }
.import-howto { margin: 9px 0 0; color: #6d8583; font-size: 10px; line-height: 1.55; }

.help-card { width: min(720px, 100%); }.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.help-grid section { padding: 14px; border-radius: 14px; background: #f1f7f3; }.help-grid b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; background: var(--sea); font-size: 12px; }.help-grid h3 { margin: 10px 0 4px; color: var(--deep); font-size: 15px; }.help-grid p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }.help-note { margin: 15px 0 0; padding: 10px 12px; border-radius: 10px; color: #5f726f; background: var(--sun-soft); font-size: 11px; }
.result-card { width: min(520px, 100%); text-align: center; }.result-mark { display: grid; place-items: center; width: 84px; height: 84px; margin: 0 auto 13px; border: 5px solid #fff8df; border-radius: 29px; color: var(--deep); background: var(--sun); box-shadow: 7px 7px 0 var(--coral); font-size: 44px; transform: rotate(6deg); }.result-card h2 { margin: 7px 0; color: var(--deep); font-size: 27px; }.result-card > p { margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 18px 0; }.result-grid div { display: grid; gap: 3px; padding: 12px 5px; border-radius: 12px; background: #eff7f2; }.result-grid div:nth-child(2) { background: var(--sun-soft); }.result-grid div:nth-child(3) { background: var(--sea-soft); }.result-grid strong { color: var(--deep); font-size: 25px; }.result-grid small { color: var(--ink-soft); font-size: 10px; }.result-card .dialog-footer { justify-content: center; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 22px; width: min(440px, calc(100vw - 32px)); padding: 12px 16px; border: 1px solid rgba(255,255,255,.7); border-radius: 13px; color: #fff; background: rgba(20, 58, 68, .94); box-shadow: 0 15px 35px rgba(2, 21, 29, .25); font-size: 13px; font-weight: 800; text-align: center; transform: translate(-50%, 130%); opacity: 0; transition: transform 260ms ease, opacity 260ms ease; }.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 1180px) { .workspace { grid-template-columns: minmax(0, 1fr) 270px; }.challenge-zone { grid-template-columns: 180px minmax(0, 1fr); }.mascot-card { min-height: 204px; }.mascot-card svg { height: 149px; }.mascot-card .mascot-image { height: 135px; margin-top: 30px; }.mission-card, .home-card { min-height: calc(100svh - 137px); }.letter-key { min-width: 33px; }.home-card { grid-template-columns: minmax(280px, 520px) minmax(210px, 280px); gap: 16px 30px; padding: 30px; }.home-mascot img { height: 165px; }.home-hero h1 { font-size: clamp(28px, 4vw, 47px); } }
@media (max-width: 900px) { .workspace { display: flex; flex-direction: column; }.mission-card, .home-card { min-height: 0; }.control-tower { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }.save-card { grid-column: 1 / -1; }.library-grid { grid-template-columns: 1fr; }.library-section { min-height: 0; }.library-list { max-height: 220px; }.home-card { grid-template-columns: minmax(260px, 500px) minmax(190px, 230px); gap: 14px 24px; } }
@media (max-width: 640px) { .top-actions .sound-test-btn, .top-actions .theme-picker { display: none; }.import-format-row { align-items: flex-start; flex-direction: column; gap: 5px; }.home-actions { gap: 7px; }.home-actions .home-start-btn, .home-actions #home-settings-btn { flex: 1 1 auto; } }

body[data-theme="sky"] .home-card { background: linear-gradient(135deg, #dff5ff 0%, #eefaff 48%, #d7f0ff 100%); }
body[data-theme="sky"] .mission-card { background: linear-gradient(135deg, #c9f0ff 0%, #edfaff 55%, #e5f3ff 100%); }
body[data-theme="peach"] .home-card { background: linear-gradient(135deg, #fff0c7 0%, #fff5ee 48%, #ffe1ec 100%); }
body[data-theme="peach"] .mission-card { background: linear-gradient(135deg, #ffe7c7 0%, #fff5ee 55%, #ffe2ef 100%); }
@media (max-width: 640px) { .app-shell { padding: 11px; }.topbar { align-items: flex-start; }.brand-mark { width: 43px; height: 43px; }.brand strong { font-size: 21px; }.brand small { display: none; }.top-actions { gap: 5px; flex-wrap: nowrap; }.top-actions .soft-btn { display: none; }.top-actions .soft-btn:first-child { display: inline-block; padding: 8px 10px; font-size: 11px; }.primary-btn.compact { padding: 8px 10px; font-size: 11px; }.route-strip { justify-content: center; font-size: 10px; }.route-strip i { width: 20px; }.home-card { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; gap: 13px; padding: 22px 16px; border-radius: 20px; }.home-hero { text-align: center; }.home-hero h1 { margin-top: 7px; font-size: 31px; }.home-hero p { font-size: 13px; }.home-actions { justify-content: center; margin-top: 18px; gap: 7px; }.home-actions .primary-btn { min-height: 45px; padding: 9px 20px; font-size: 14px; }.home-actions .soft-btn { min-height: 42px; padding: 8px 11px; font-size: 12px; }.home-mascot { min-height: 170px; padding-top: 34px; }.home-mascot img { width: 185px; height: 135px; }.home-speech { right: 12%; left: 12%; font-size: 11px; }.home-features { grid-template-columns: 1fr; gap: 7px; }.home-features article { min-height: 54px; padding: 8px 11px; }.home-features article > span { width: 30px; height: 30px; font-size: 15px; }.home-tip { font-size: 10px; text-align: center; }.mission-card { padding: 16px 11px; border-radius: 20px; }.mission-topline h1 { font-size: 22px; }.timer-chip { min-width: 78px; padding: 7px; }.timer-chip strong { font-size: 17px; }.challenge-zone { grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }.mascot-card { min-height: 0; grid-template-columns: 130px 1fr; grid-template-rows: auto auto; align-items: center; padding: 5px 10px; }.mascot-card .mascot-image { grid-column: 1; grid-row: 1 / span 2; height: 93px; margin-top: 0; }.mascot-card .mascot-caption { grid-column: 2; grid-row: 1; justify-content: flex-start; }.mascot-speech { position: static; grid-column: 2; grid-row: 2; padding: 6px 8px; font-size: 11px; text-align: left; }.mascot-speech::after { display: none; }.listen-orb { min-height: 94px; width: 190px; }.listen-orb svg { width: 32px; height: 32px; }.hint-row { max-width: 100%; }.word-context { min-height: 16px; }.answer-area { padding: 10px; }.answer-area input { min-height: 48px; font-size: 20px; }.answer-actions .text-btn { padding: 7px 6px; font-size: 11px; }.letter-pad { padding: 5px; }.key-row { gap: 3px; margin: 3px 0; }.row-2 { padding: 0 2%; }.row-3 { padding: 0 4%; }.letter-key { min-width: 0; flex: 1; min-height: 33px; padding: 4px; font-size: 12px; }.letter-key.wide { flex: 2.6; }.mission-footer { margin-top: 8px; }.mission-footer .soft-btn, .mission-footer .primary-btn { min-height: 38px; padding: 7px 9px; font-size: 11px; }.control-tower { grid-template-columns: 1fr; }.guide-card { min-height: 133px; }.stats-card, .mistake-card { padding: 13px; }.dialog { padding: 8px; }.dialog-card { max-height: calc(100vh - 16px); padding: 18px; border-radius: 19px; }.unit-picker, .setup-options, .help-grid { grid-template-columns: 1fr; }.switch-row { grid-column: auto; }.backup-bar { grid-template-columns: 1fr 1fr; }.backup-bar > div { grid-column: 1 / -1; }.backup-bar .soft-btn, .backup-bar .file-input { min-height: 38px; padding: 8px; font-size: 11px; }.result-grid { gap: 5px; }.result-grid strong { font-size: 21px; } }

/* Reference-style word board only; the page frame, mascot and status cards stay unchanged. */
@media (min-width: 901px) {
  .listen-panel { padding: 11px 14px; border: 3px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.78); box-shadow: 5px 6px 0 var(--line); }
  .listen-orb { width: 178px; min-height: 78px; border: 3px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; box-shadow: 5px 6px 0 var(--line); }
  .listen-orb:hover:not(:disabled) { transform: translate(-1px, -1px); background: #f3f8ff; box-shadow: 6px 7px 0 var(--line); }
  .listen-orb svg { stroke: var(--ink); }
  .listen-orb span { color: var(--ink); font-size: 16px; }
  .hint-row { border-color: transparent; background: transparent; }
  .hint-row strong { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 2.6vw, 34px); }
  .hint-toggle { width: 42px; height: 42px; border: 3px solid var(--line); border-radius: 50%; color: transparent; background: #fff; font-size: 0; }
  .hint-toggle::before { content: "◉"; color: var(--ink); font-size: 22px; }
  .answer-area { width: min(100%, 900px); min-height: 110px; margin: 22px auto 0; padding: 11px 18px; border: 3px dashed var(--line); border-radius: 22px; background: #fff; box-shadow: none; }
  .answer-area label { display: none; }
  .answer-area input { min-height: 75px; border: 0; color: var(--ink); background: transparent; font-family: Georgia, "Times New Roman", serif; font-size: clamp(28px, 3.4vw, 42px); letter-spacing: .14em; text-align: center; }
  .answer-area input::placeholder { color: transparent; }
  .answer-area input:disabled { background: transparent; }
  .feedback { position: absolute; right: 18px; bottom: 2px; left: 18px; min-height: 14px; margin: 0; font-size: 10px; text-align: center; }
  .letter-pad { width: min(100%, 680px); min-height: 62px; margin: 25px auto 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .letter-pad.disabled { opacity: .5; }
  .key-row { justify-content: center; flex-wrap: wrap; gap: 11px; margin: 0; padding: 0; }
  .candidate-row { width: 100%; }
  .letter-key { min-width: 58px; min-height: 57px; padding: 7px 13px; border: 3px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; box-shadow: 5px 6px 0 var(--line); font-size: 27px; text-transform: lowercase; }
  .letter-key:hover { transform: translate(-1px, -1px); background: #f2f7ff; }
  .letter-key:active { transform: translate(3px, 3px); box-shadow: 2px 3px 0 var(--line); }
  .letter-pad .action-row { display: none; }
  .letter-pad .action-row:has(button:nth-child(2)) { display: flex; width: 100%; margin-top: 8px; }
  .letter-pad .action-row .letter-key { min-width: 44px; min-height: 34px; padding: 4px 9px; font-size: 14px; }
  .letter-pad .action-row .wide { min-width: 88px; }
  .bottom-controls { display: flex; justify-content: center; align-items: center; gap: 13px; margin: 24px auto 0; }
  .bottom-controls .soft-btn, .bottom-controls .text-btn, .bottom-controls .primary-btn { min-height: 49px; padding: 8px 20px; border: 3px solid var(--line); border-radius: 15px; box-shadow: 5px 6px 0 var(--line); font-size: 15px; font-weight: 900; }
  .bottom-controls .soft-btn { color: var(--ink); background: #fff; }
  .bottom-controls .text-btn { color: #6c55ad; background: #fff; }
  .bottom-controls .primary-btn { color: #fff; background: var(--sea); box-shadow: 5px 6px 0 #187968; }
 .bottom-controls .reference-btn { display: inline-flex; }
 .bottom-controls .reference-btn[hidden] { display: none !important; }
  .mission-footer #question-progress { display: inline-grid; place-items: center; min-width: 84px; min-height: 35px; padding: 4px 12px; border: 3px solid var(--line); border-radius: 999px; color: #fff; background: var(--deep-2); box-shadow: 4px 5px 0 var(--line); }
}

@media (min-width: 901px) and (max-height: 760px) {
  .home-card { padding: 24px 30px; gap: 12px 20px; }
  .home-hero h1 { margin: 6px 0 9px; font-size: clamp(28px, 3.6vw, 44px); }
  .home-hero p { font-size: 13px; line-height: 1.55; }
  .home-actions { margin-top: 15px; }
  .home-mascot { min-height: 205px; padding-top: 20px; }
  .home-mascot img { height: 145px; }
  .home-features article { min-height: 58px; padding: 8px 11px; }
  .listen-panel { padding: 8px 11px; }
  .listen-orb { min-height: 60px; width: 150px; }
  .listen-orb span { font-size: 13px; }
  .hint-row strong { font-size: 25px; }
  .hint-toggle { width: 36px; height: 36px; }
  .hint-toggle::before { font-size: 18px; }
  .answer-area { min-height: 86px; margin-top: 16px; padding: 7px 12px; }
  .answer-area input { min-height: 56px; font-size: 32px; }
  .letter-pad { min-height: 49px; margin-top: 17px; }
  .key-row { gap: 8px; }
  .letter-key { min-width: 48px; min-height: 47px; padding: 5px 10px; font-size: 22px; box-shadow: 4px 5px 0 var(--line); }
  .bottom-controls { gap: 9px; margin-top: 17px; }
  .bottom-controls .soft-btn, .bottom-controls .text-btn, .bottom-controls .primary-btn { min-height: 41px; padding: 6px 14px; font-size: 12px; box-shadow: 4px 5px 0 var(--line); }
}

/* 错误提示板：覆盖在答题槽下方，不改变题目布局。 */
.error-panel { position: absolute; z-index: 8; top: calc(100% - 2px); left: 50%; display: flex; align-items: center; gap: 10px; width: min(100%, 900px); min-height: 58px; padding: 9px 13px; border: 3px solid #e27879; border-radius: 15px; background: #fff7f5; box-shadow: 4px 5px 0 #e27879; transform: translateX(-50%); }
.answer-area:has(.error-panel:not([hidden])) { z-index: 3; }
.error-panel[hidden] { display: none !important; }
.error-panel.show { animation: error-panel-pop 180ms ease-out; }
.error-panel-icon { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; color: #fff; background: #e27879; font-size: 22px; font-weight: 900; }
.error-panel-copy { min-width: 0; display: grid; gap: 1px; }
.error-panel-copy strong { color: #b7515c; font-size: 14px; }
.error-panel .feedback { position: static; min-height: 0; margin: 0; color: #b55d67; font-size: 11px; line-height: 1.35; text-align: left; }
.error-panel-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.error-panel-actions button { min-height: 32px; padding: 5px 9px; border: 2px solid #b85a61; border-radius: 9px; color: #a64d59; background: #fff; box-shadow: 2px 3px 0 rgba(184, 90, 97, .25); font-size: 10px; font-weight: 900; white-space: nowrap; }
.error-panel-actions button:hover:not(:disabled) { background: #ffe8e4; }
@keyframes error-panel-pop { from { opacity: 0; transform: translate(-50%, -6px) scale(.98); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

@media (max-width: 900px) {
  .error-panel { width: calc(100% - 12px); padding: 8px 10px; }
  .error-panel-actions { gap: 4px; }
  .error-panel-actions button { padding: 5px 7px; font-size: 9px; }
}

/* 答错后的独立弹框 */
.error-panel { position: fixed; z-index: 60; top: 50%; right: auto; left: 50%; display: grid; grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; width: min(310px, calc(100vw - 32px)); min-height: 146px; padding: 17px 18px; border: 3px solid #d8e4ec; border-radius: 19px; background: #fff; box-shadow: 0 0 0 9999px rgba(33, 53, 68, .18), 7px 8px 0 #2e3940, 0 22px 45px rgba(33, 53, 68, .22); transform: translate(-50%, -50%); }
.error-panel.show { animation: error-dialog-pop 180ms ease-out; }
.error-panel-icon { grid-row: 1 / 3; align-self: start; width: 30px; height: 30px; color: #d76c6e; background: transparent; font-size: 25px; }
.error-panel-copy { align-self: end; }
.error-panel-copy strong { color: var(--ink); font-size: 20px; letter-spacing: .04em; }
.error-panel .feedback { display: none; }
.error-panel-actions { grid-column: 2; justify-content: flex-start; gap: 12px; margin: 7px 0 0; }
.error-panel-actions button { min-height: 43px; padding: 7px 16px; border: 2px solid #d8e4ec; border-radius: 12px; color: var(--ink); background: #fff; box-shadow: 3px 4px 0 #d8e4ec; font-size: 15px; }
.error-panel-actions button:hover:not(:disabled) { color: var(--ink); background: #f1f7ff; }
.error-panel-actions #error-reveal-btn { border-color: transparent; box-shadow: none; color: #d76c5d; background: transparent; }
@keyframes error-dialog-pop { from { opacity: 0; transform: translate(-50%, -47%) scale(.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* 纯提示状态：1 秒后由脚本自动收起，不显示操作按钮。 */
.error-panel { grid-template-columns: 42px minmax(0, 1fr); grid-template-rows: auto; min-height: 112px; padding: 20px 22px; border-color: #b9e5f7; background: linear-gradient(145deg, #ffffff, #fffceb); box-shadow: 0 0 0 9999px rgba(74, 177, 231, .12), 7px 8px 0 #79bde5, 0 22px 45px rgba(71, 145, 200, .18); }
.error-panel-icon { grid-row: auto; color: #ff7d80; background: transparent; }
.error-panel-copy { align-self: center; }
.error-panel-copy strong { color: #285b88; font-size: 22px; }
.error-panel-actions { display: none; }

/* 答对反馈与答错反馈共用同一个轻量弹框，成功时使用明亮的薄荷绿。 */
.error-panel.success { border-color: #a6e5d0; background: linear-gradient(145deg, #ffffff, #effff8); box-shadow: 0 0 0 9999px rgba(74, 177, 231, .12), 7px 8px 0 #69c6aa, 0 22px 45px rgba(63, 156, 126, .2); }
.error-panel.success .error-panel-icon { color: #2eaa83; }
.error-panel.success .error-panel-icon { font-size: 0; }
.error-panel.success .error-panel-icon::after { content: "✓"; font-size: 25px; line-height: 1; }
.error-panel.success .error-panel-copy strong { color: #21876f; }

/* Keep the existing two-column cockpit inside the desktop viewport. */
@media (min-width: 901px) {
  html, body { height: 100%; overflow: hidden; }
  .app-shell { height: 100svh; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .topbar { flex: 0 0 auto; }
  .workspace { flex: 1 1 auto; min-height: 0; align-items: stretch; overflow: hidden; }
  .listening-stage { display: flex; flex-direction: column; min-height: 0; }
  .mission-card { flex: 1 1 auto; min-height: 0; height: 100%; }
  .control-tower { height: 100%; min-height: 0; }
}

@media (min-width: 901px) {
  /* 选中错误答案时不触发 mission-card 的内部滚动，提示板只做覆盖层。 */
  .workspace, .mission-card { overflow: visible; }
}

/* 拼写优先：中央放大答题板，听词辅助收进右上角。 */
.focus-column { min-width: 0; display: flex; flex-direction: column; }
.focus-heading { display: flex; align-items: center; justify-content: flex-start; gap: 10px; margin: 2px 0 6px; }
.focus-heading strong { color: var(--deep); font-size: 13px; }
.quick-support { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.eye-icon { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eye-icon .eye-outline { fill: none; }
.eye-icon .eye-slash { display: none; }
.hint-toggle.is-hidden .eye-slash { display: block; }
.hint-toggle.is-hidden .eye-icon { color: #7a8d9a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hint-toggle::before { content: none !important; }
.hint-toggle { color: var(--ink); }

@media (min-width: 901px) {
  .challenge-zone { grid-template-columns: minmax(0, 1fr) 190px; align-items: start; gap: clamp(18px, 3vw, 34px); width: min(100%, 900px); margin: 6px auto 0; }
  .focus-column { padding-top: 2px; }
  .focus-heading { margin-bottom: 8px; }
  .focus-heading strong { font-size: 14px; }
  .quick-support { padding-top: 0; }
  .quick-support .mascot-card { min-height: 128px; padding: 2px 8px 5px; }
  .quick-support .mascot-card .mascot-image { width: min(138px, 100%); height: 102px; margin-top: 22px; }
  .quick-support .mascot-card .mascot-caption strong { font-size: 14px; }
  .quick-support .mascot-speech { top: 0; right: 5px; left: 5px; padding: 5px 6px; font-size: 10px; line-height: 1.2; }
  .quick-support .mascot-speech::after { left: 34px; width: 10px; height: 10px; }
  .quick-support .listen-panel { padding: 8px 10px; border-radius: 16px; box-shadow: 3px 4px 0 var(--line); }
  .quick-support .listen-orb { width: 100%; min-height: 56px; margin-bottom: 7px; border-radius: 13px; box-shadow: 3px 4px 0 var(--line); }
  .quick-support .listen-orb svg { width: 26px; height: 26px; }
  .quick-support .listen-orb span { font-size: 13px; }
  .quick-support .hint-row { gap: 5px; min-height: 36px; padding: 5px 6px; }
  .quick-support .hint-label { font-size: 9px; }
  .quick-support .hint-row strong { font-size: 20px; }
  .quick-support .hint-toggle { width: 32px; height: 32px; padding: 4px; border-width: 2px; border-radius: 9px; color: var(--ink); }
  .quick-support .eye-icon { width: 20px; height: 20px; }
  .quick-support .word-context { min-height: 0; margin-top: 4px; font-size: 9px; line-height: 1.35; }
  .focus-column .answer-area { width: 100%; min-height: 126px; margin: 4px auto 0; padding: 14px 18px; border-radius: 20px; }
  .focus-column .answer-area input { min-height: 88px; font-size: clamp(34px, 4.4vw, 52px); letter-spacing: .16em; }
  .focus-column .letter-pad { width: 100%; min-height: 64px; margin: 16px auto 0; }
  .focus-column .bottom-controls { margin-top: 18px; }
  .mission-footer { width: min(100%, 900px); margin-top: 9px; }
}

@media (max-width: 900px) {
  .focus-heading { margin-top: 2px; }
  .quick-support { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr); align-items: center; gap: 8px; }
  .quick-support .mascot-card { min-height: 0; }
  .quick-support .mascot-speech { font-size: 10px; }
  .quick-support .listen-panel { padding: 7px 8px; }
  .quick-support .listen-orb { min-height: 58px; margin-bottom: 5px; }
  .quick-support .listen-orb svg { width: 27px; height: 27px; }
  .quick-support .listen-orb span { font-size: 12px; }
  .quick-support .hint-row { min-height: 34px; padding: 4px 6px; }
  .quick-support .hint-row strong { font-size: 18px; }
  .quick-support .word-context { display: none; }
}

@media (max-width: 640px) {
  .focus-heading { align-items: flex-start; flex-direction: column; gap: 2px; }
  .quick-support { grid-template-columns: 120px minmax(0, 1fr); }
  .quick-support .mascot-card { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .quick-support .mascot-card .mascot-image { grid-column: 1; grid-row: 1 / span 2; height: 82px; }
  .quick-support .mascot-card .mascot-caption { grid-column: 1; grid-row: 3; justify-content: center; }
  .quick-support .mascot-speech { position: absolute; top: 0; right: 3px; left: 3px; font-size: 9px; }
  .quick-support .listen-panel { min-width: 0; }
}

/* 听音板放在拼写板上方，辅助信息保持紧凑。 */
.focus-listen-panel { min-width: 0; }
.focus-listen-copy { min-width: 0; }
.focus-listen-copy .hint-row { max-width: none; margin: 0; }
.focus-listen-copy .word-context { margin-bottom: 0; }
.focus-note { margin: 9px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.4; text-align: center; }

@media (min-width: 901px) {
  .focus-listen-panel { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); align-items: center; gap: 15px; width: 100%; margin: 0 auto 9px; padding: 9px 12px; border: 3px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.78); box-shadow: 4px 5px 0 var(--line); }
  .focus-listen-panel .listen-orb { width: 100%; min-height: 68px; margin: 0; border: 3px solid var(--line); border-radius: 14px; box-shadow: 4px 5px 0 var(--line); }
  .focus-listen-panel .listen-orb svg { width: 30px; height: 30px; stroke: var(--ink); }
  .focus-listen-panel .listen-orb span { color: var(--ink); font-size: 14px; }
  .focus-listen-panel .hint-row { min-height: 42px; padding: 6px 8px; }
  .focus-listen-panel .hint-row strong { color: var(--ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(23px, 2.5vw, 32px); }
  .focus-listen-panel .hint-toggle { width: 36px; height: 36px; padding: 4px; border: 2px solid var(--line); border-radius: 10px; }
  .focus-listen-panel .word-context { margin-top: 5px; color: var(--ink-soft); font-size: 10px; line-height: 1.35; text-align: left; }
  .focus-note { margin-top: 9px; font-size: 11px; }
  .quick-support { align-self: start; }
}

@media (max-width: 900px) {
  .quick-support { display: block; }
  .quick-support .mascot-card { width: 100%; }
  .focus-listen-panel { display: grid; grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); align-items: center; gap: 10px; }
  .focus-listen-panel .listen-orb { min-height: 72px; margin: 0; }
  .focus-listen-panel .hint-row { min-height: 36px; }
  .focus-listen-panel .word-context { font-size: 10px; }
}

@media (max-width: 640px) {
  .focus-listen-panel { grid-template-columns: 1fr; gap: 7px; }
  .focus-listen-panel .listen-orb { width: min(210px, 100%); margin: 0 auto; }
  .focus-listen-panel .hint-row { width: 100%; }
  .focus-listen-panel .word-context { text-align: center; }
}

/* 紧凑电脑视口仍保持左右双栏，避免状态区被推到首屏之外。 */
@media (min-width: 801px) and (max-width: 900px) {
  html, body { height: 100%; overflow: hidden; }
  .app-shell { height: 100svh; min-height: 0; overflow: hidden; padding: 14px 22px 18px; }
  .workspace { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 12px; min-height: 0; height: calc(100svh - 91px); overflow: visible; }
  .listening-stage { display: flex; flex-direction: column; min-height: 0; }
  .mission-card { flex: 1 1 auto; min-height: 0; height: 100%; padding: 17px; overflow: visible; }
  .control-tower { display: flex; width: auto; height: 100%; min-height: 0; gap: 8px; }
  .guide-card { min-height: 132px; padding: 13px; }
  .guide-card h2 { font-size: 18px; }
  .guide-card p { font-size: 10px; }
  .stats-card, .mistake-card { padding: 12px; }
  .stat-grid { gap: 4px; margin-top: 9px; }
  .stat-grid > div { padding: 8px 3px; }
  .stat-grid strong { font-size: 21px; }
  .accuracy-row { margin: 9px 1px 7px; }
  .mistake-list { max-height: 138px; }
  .save-card { padding: 10px 12px; }
  .challenge-zone { grid-template-columns: minmax(0, 1fr) 170px; width: 100%; gap: 10px; }
  .focus-listen-panel { grid-template-columns: 128px minmax(0, 1fr); gap: 9px; }
  .focus-listen-panel .listen-orb { min-height: 62px; }
  .focus-listen-panel .listen-orb span { font-size: 12px; }
  .focus-listen-panel .hint-row strong { font-size: 22px; }
  .focus-column .answer-area { min-height: 112px; }
  .focus-column .answer-area input { min-height: 76px; font-size: 30px; }
  .focus-column .letter-pad { min-height: 48px; margin-top: 10px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .focus-column .letter-pad .action-row { display: none; }
  .focus-column .letter-pad .key-row { gap: 7px; margin: 0; }
  .focus-column .letter-pad .letter-key { min-width: 44px; min-height: 42px; padding: 5px 10px; font-size: 20px; box-shadow: 3px 4px 0 var(--line); }
  .focus-column .bottom-controls { margin-top: 13px; }
  .quick-support { display: block; }
  .quick-support .mascot-card { width: 100%; }
}

/* 方案 1｜单词卡聚焦：用一张居中的白色单词卡承载听音和拼写。 */
@media (min-width: 901px) {
  .mission-card {
    padding: 21px 24px 16px;
    border-radius: 30px;
    background: radial-gradient(circle at 9% 8%, rgba(255, 239, 167, .72), transparent 27%), linear-gradient(135deg, #d9f7fb 0%, #f8fffb 56%, #fff3c7 100%);
    box-shadow: 0 10px 0 #b1dfe6, 0 24px 48px rgba(64, 113, 157, .14);
  }
  .mission-card::before, .mission-card::after { display: none; }
  .mission-topline { width: min(100%, 940px); margin: 0 auto; align-items: center; }
  .mission-topline h1 { margin-top: 3px; color: var(--deep); font-size: clamp(19px, 1.8vw, 27px); }
  .mission-topline .eyebrow { font-size: 10px; letter-spacing: .19em; }
  .timer-chip { min-width: 86px; padding: 7px 10px; border-radius: 14px; }
  .timer-chip strong { font-size: 19px; }
  .challenge-zone { width: min(100%, 980px); grid-template-columns: minmax(0, 1fr) 142px; gap: 15px; margin: 13px auto 0; align-items: center; }
  .focus-column { padding: 23px 31px 18px; border: 2px solid rgba(255,255,255,.94); border-radius: 29px; background: #fff; box-shadow: 0 10px 0 #d4e9ed, 0 16px 28px rgba(61, 122, 143, .11); }
  .focus-listen-panel { display: grid; grid-template-columns: 126px minmax(0, 1fr); align-items: center; gap: 22px; width: 100%; margin: 0 0 23px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .focus-listen-panel .listen-orb { width: 112px; min-height: 112px; margin: 0; border: 0; border-radius: 50%; color: #fff; background: var(--sea); box-shadow: 0 8px 0 #278d88, 0 14px 22px rgba(49, 156, 149, .22); }
  .focus-listen-panel .listen-orb svg { width: 35px; height: 35px; stroke: #fff; stroke-width: 2.35; }
  .focus-listen-panel .listen-orb span { color: #fff; font-size: 13px; }
  .focus-listen-copy { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; }
  .focus-listen-copy .hint-row { display: block; width: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; text-align: center; }
  .focus-listen-copy .hint-label, .focus-listen-copy .hint-toggle { display: none !important; }
  .focus-listen-copy .hint-row strong { display: block; overflow: visible; color: var(--deep); font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: clamp(42px, 5vw, 60px); font-weight: 900; letter-spacing: .16em; line-height: 1.06; text-overflow: clip; white-space: normal; }
  .focus-listen-copy .word-context { min-height: 0; margin: 11px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.5; text-align: center; }
  .focus-heading { justify-content: center; margin: 0 0 9px; }
  .focus-heading .eyebrow { color: #278c9a; font-size: 12px; letter-spacing: .22em; }
  .focus-column .answer-area { width: 100%; min-height: 96px; margin: 0; padding: 8px 12px; border: 3px dashed #cfe5ea; border-radius: 18px; background: #fbffff; box-shadow: none; }
  .focus-column .answer-area input { min-height: 73px; border: 0; color: var(--deep); background: transparent; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: clamp(29px, 3.2vw, 42px); letter-spacing: .14em; text-align: center; }
  .focus-column .answer-area input::placeholder { color: #a8bac2; font-size: 15px; letter-spacing: 0; }
  .focus-column .answer-area input:disabled { background: transparent; }
  .focus-column .letter-pad { width: 100%; min-height: 53px; margin: 19px auto 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .focus-column .letter-pad .candidate-row { flex-wrap: wrap; gap: 8px; }
  .focus-column .letter-pad .letter-key { min-width: 46px; min-height: 46px; padding: 5px 11px; border-radius: 14px; color: var(--deep); background: #effaff; box-shadow: 0 5px 0 #cfe6ee; font-size: 23px; }
  .focus-column .letter-pad .letter-key:nth-child(2n) { background: #fff2c9; }
  .focus-column .letter-pad .letter-key:nth-child(3n) { background: #ffe2e7; }
  .focus-column .letter-pad .action-row { display: none; }
  .focus-column .bottom-controls { justify-content: center; gap: 10px; margin-top: 15px; }
  .focus-column .bottom-controls .soft-btn, .focus-column .bottom-controls .text-btn { min-height: 39px; padding: 8px 17px; border: 2px solid var(--line); border-radius: 12px; color: var(--deep); background: #fff; box-shadow: 0 4px 0 #d6e7ed; }
  .focus-column .bottom-controls .reference-btn { display: inline-flex; }
  .focus-column .bottom-controls .primary-btn { min-height: 39px; padding: 8px 17px; border-radius: 12px; box-shadow: 0 5px 0 #277c76; }
  .focus-note { margin: 11px 0 0; color: var(--ink-soft); font-size: 11px; }
  .quick-support { align-self: center; width: 142px; padding: 0; }
  .quick-support .mascot-card { width: 142px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .quick-support .mascot-card .mascot-image { width: 136px; height: auto; margin: 17px 0 0; filter: drop-shadow(0 7px 0 rgba(57, 117, 139, .12)); }
  .quick-support .mascot-card .mascot-caption { margin-top: 2px; }
  .quick-support .mascot-card .mascot-caption strong { color: var(--deep); font-size: 15px; }
  .quick-support .mascot-speech { top: -3px; right: -12px; left: -12px; padding: 7px 8px; border-color: #ffbd67; color: #9d6742; background: #fffdf1; font-size: 11px; }
  .quick-support .mascot-speech::after { left: 50%; border-color: #ffbd67; background: #fffdf1; }
  .mission-footer { width: min(100%, 980px); margin: 11px auto 0; }
  .mission-footer > span { color: var(--deep); font-size: 12px; }
}

@media (max-width: 900px) {
  .mission-card { background: linear-gradient(135deg, #dcf7fb 0%, #fffdf0 100%); }
  .mission-card::before, .mission-card::after { display: none; }
  .focus-column { padding: 18px 16px 16px; border: 2px solid rgba(255,255,255,.95); border-radius: 23px; background: #fff; box-shadow: 0 8px 0 #d4e9ed; }
  .focus-listen-panel { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 13px; align-items: center; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .focus-listen-panel .listen-orb { width: 92px; min-height: 92px; border: 0; border-radius: 50%; color: #fff; background: var(--sea); box-shadow: 0 6px 0 #278d88; }
  .focus-listen-panel .listen-orb svg { width: 29px; height: 29px; stroke: #fff; }
  .focus-listen-panel .listen-orb span { color: #fff; font-size: 12px; }
  .focus-listen-copy .hint-label, .focus-listen-copy .hint-toggle { display: none !important; }
  .focus-listen-copy .hint-row { display: block; min-height: 0; padding: 0; border: 0; background: transparent; text-align: center; }
  .focus-listen-copy .hint-row strong { display: block; color: var(--deep); font-size: clamp(34px, 8vw, 48px); letter-spacing: .12em; line-height: 1.1; white-space: normal; }
  .focus-listen-copy .word-context { margin: 8px 0 0; font-size: 11px; line-height: 1.45; text-align: center; }
  .focus-heading { justify-content: center; margin: 14px 0 8px; }
  .focus-heading .eyebrow { font-size: 11px; letter-spacing: .18em; }
  .focus-column .answer-area { width: 100%; min-height: 84px; margin: 0; padding: 7px 9px; border: 3px dashed #cfe5ea; border-radius: 16px; background: #fbffff; box-shadow: none; }
  .focus-column .answer-area label { display: none; }
  .focus-column .answer-area input { min-height: 67px; border: 0; background: transparent; font-size: 28px; text-align: center; }
  .focus-column .answer-area input::placeholder { color: #a8bac2; font-size: 13px; }
  .focus-column .letter-pad { margin-top: 12px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .focus-column .letter-pad .candidate-row { flex-wrap: wrap; gap: 6px; }
  .focus-column .letter-pad .letter-key { min-width: 38px; min-height: 38px; padding: 4px 8px; border-radius: 11px; font-size: 19px; }
  .focus-column .letter-pad .action-row { display: none; }
  .focus-column .bottom-controls { justify-content: center; gap: 7px; margin-top: 11px; }
  .focus-column .bottom-controls .soft-btn, .focus-column .bottom-controls .text-btn, .focus-column .bottom-controls .primary-btn { min-height: 36px; padding: 7px 12px; font-size: 12px; }
  .focus-column .bottom-controls .reference-btn { display: inline-flex; }
  .focus-note { margin-top: 8px; font-size: 10px; }
}

@media (max-width: 640px) {
  .focus-listen-panel { grid-template-columns: 1fr; gap: 10px; }
  .focus-listen-panel .listen-orb { margin: 0 auto; }
  .focus-listen-copy .hint-row strong { font-size: 42px; }
  .quick-support { margin-top: 10px; }
  .quick-support .mascot-card { width: 100%; }
}

/* 矮屏电脑也完整显示答题板和状态区。 */
@media (min-width: 901px) and (max-height: 700px) {
  .app-shell { padding-top: 10px; padding-bottom: 12px; }
  .topbar { min-height: 46px; margin-bottom: 8px; }
  .brand-mark { width: 44px; height: 44px; }
  .brand strong { font-size: 23px; }
  .brand small { margin-top: 3px; font-size: 10px; }
  .top-actions { gap: 6px; }.top-actions .soft-btn, .top-actions .primary-btn.compact { min-height: 34px; padding: 7px 10px; font-size: 12px; }
  .route-strip { min-height: 25px; padding-bottom: 4px; font-size: 10px; }.route-icon { width: 18px; height: 18px; }.route-strip i { width: 30px; }
  .workspace { height: calc(100svh - 77px); gap: 11px; }
  .mission-card { padding: 12px 16px 9px; border-radius: 24px; }
  .mission-topline h1 { margin-top: 2px; font-size: 20px; }.mission-topline .eyebrow { font-size: 9px; }.timer-chip { min-width: 75px; padding: 5px 8px; }.timer-chip span { font-size: 9px; }.timer-chip strong { font-size: 17px; }
  .challenge-zone { grid-template-columns: minmax(0, 1fr) 124px; gap: 9px; margin-top: 7px; }
  .focus-column { padding: 13px 17px 10px; border-radius: 22px; box-shadow: 0 7px 0 #d4e9ed, 0 12px 21px rgba(61, 122, 143, .09); }
  .focus-listen-panel { grid-template-columns: 86px minmax(0, 1fr); gap: 11px; margin-bottom: 10px; }
  .focus-listen-panel .listen-orb { width: 78px; min-height: 78px; box-shadow: 0 5px 0 #278d88; }.focus-listen-panel .listen-orb svg { width: 27px; height: 27px; }.focus-listen-panel .listen-orb span { font-size: 11px; }
  .focus-listen-copy .hint-row strong { font-size: clamp(30px, 3.9vw, 44px); }.focus-listen-copy .word-context { margin-top: 6px; font-size: 10px; }
  .focus-heading { margin: 2px 0 5px; }.focus-heading .eyebrow { font-size: 10px; }
  .focus-column .answer-area { min-height: 68px; padding: 5px 8px; border-radius: 14px; }.focus-column .answer-area input { min-height: 54px; font-size: 24px; }.focus-column .answer-area input::placeholder { font-size: 12px; }
  .focus-column .letter-pad { min-height: 40px; margin-top: 8px; }.focus-column .letter-pad .candidate-row { gap: 5px; }.focus-column .letter-pad .letter-key { min-width: 34px; min-height: 34px; padding: 3px 8px; border-radius: 10px; box-shadow: 0 4px 0 #cfe6ee; font-size: 18px; }
  .focus-column .bottom-controls { gap: 6px; margin-top: 7px; }.focus-column .bottom-controls .soft-btn, .focus-column .bottom-controls .text-btn, .focus-column .bottom-controls .primary-btn { min-height: 31px; padding: 5px 11px; font-size: 11px; }.focus-column .bottom-controls .primary-btn { box-shadow: 0 4px 0 #277c76; }.focus-note { margin-top: 5px; font-size: 9px; }
  .quick-support { width: 124px; }.quick-support .mascot-card { width: 124px; }.quick-support .mascot-card .mascot-image { width: 111px; margin-top: 13px; }.quick-support .mascot-card .mascot-caption strong { font-size: 13px; }.quick-support .mascot-speech { right: -14px; left: -14px; padding: 5px 6px; font-size: 9px; }
  .mission-footer { margin-top: 6px; }.mission-footer > span { font-size: 10px; }.mission-footer .soft-btn { min-height: 31px; padding: 5px 10px; font-size: 11px; }
  .control-tower { gap: 7px; }.guide-card { min-height: 112px; padding: 11px; }.guide-card h2 { margin: 5px 0 2px; font-size: 18px; }.guide-card p { font-size: 10px; line-height: 1.45; }.guide-orbit { transform: scale(.78); transform-origin: top right; }
  .stats-card, .mistake-card { padding: 11px; }.section-heading > span { font-size: 13px; }.stat-grid { gap: 4px; margin-top: 8px; }.stat-grid > div { padding: 7px 3px; }.stat-grid strong { font-size: 20px; }.accuracy-row { margin: 8px 1px 6px; }.wide-soft-btn { min-height: 30px; padding: 6px; font-size: 10px; }.mistake-list { max-height: 84px; margin-top: 6px; }.mistake-item { padding: 5px 1px; }.mistake-item strong { font-size: 11px; }.mistake-item small, .mistake-item b { font-size: 9px; }.save-card { padding: 8px 10px; }.save-card strong { font-size: 11px; }.save-card small { font-size: 9px; }
}

/* 720px 左右的标准笔记本屏幕只做轻量收紧，避免底部按钮被截断。 */
@media (min-width: 901px) and (min-height: 701px) and (max-height: 740px) {
  .mission-card { padding-bottom: 8px; }
  .challenge-zone { margin-top: 9px; }
  .focus-column { padding-bottom: 13px; }
  .focus-listen-panel { margin-bottom: 17px; }
  .focus-column .letter-pad { margin-top: 14px; }
  .focus-column .bottom-controls { margin-top: 11px; }
  .focus-note { margin-top: 7px; }
  .mission-footer { margin-top: 4px; transform: translateY(-3px); }
}

/* 反馈增强：用字母格明确展示拼写进度，输入框仍保留以支持实体键盘。 */
.answer-slots {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 0;
  margin: 0 auto 6px;
}
.answer-slot {
  width: 34px;
  height: 40px;
  padding: 0;
  border: 2px solid #cfe3ec;
  border-radius: 10px;
  color: var(--deep);
  background: #f5fbff;
  box-shadow: 0 3px 0 #e0edf1;
  font: 800 22px/1 "Trebuchet MS", "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
.answer-slot.empty { border-style: dashed; color: transparent; background: #f7fbfd; cursor: default; }
.answer-slot.filled { border-color: #63c7bd; background: #e5faf5; }
.answer-slot.filled:hover { background: #d4f5ed; transform: translateY(-1px); }
.answer-slot.space-slot { width: 15px; border-color: transparent; background: transparent; box-shadow: none; color: #9fc1ca; cursor: default; }
.answer-slots[hidden] { display: none; }

.listen-control { display: flex; min-width: 0; flex-direction: column; align-items: center; gap: 7px; }
.audio-status { display: block; max-width: 126px; color: #78919d; font-size: 10px; line-height: 1.35; text-align: center; }
.audio-status.is-ready { color: #279b91; }
.audio-status.is-speaking { color: #e59c36; }
.audio-status.is-error { color: #d96467; }
.status-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid #d6e7ed;
  border-radius: 12px;
  color: var(--deep);
  background: rgba(255,255,255,.82);
  box-shadow: 0 3px 0 rgba(202, 224, 232, .85);
  font: 800 12px/1.2 "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
.status-collapse-btn span { color: #73909e; font-size: 11px; font-weight: 700; }
.control-tower.is-collapsed > :not(.status-collapse-btn) { display: none; }

.library-unit-top { display: flex; min-width: 0; align-items: center; gap: 10px; }
.library-unit-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 9px; }
.mini-btn {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #cfe1e8;
  border-radius: 9px;
  color: var(--deep);
  background: #f8fcfd;
  font: 700 11px/1.1 "Microsoft YaHei", sans-serif;
  cursor: pointer;
}
.mini-btn:hover:not(:disabled) { background: #e7f8f7; border-color: #8bcfc8; }
.mini-btn.danger { color: #c7686c; }
.mini-btn.danger:hover:not(:disabled) { background: #fff0f0; border-color: #e5a5a5; }
.mini-btn:disabled { opacity: .45; cursor: not-allowed; }

@media (min-width: 901px) {
  .status-collapse-btn { margin-bottom: 0; }
  .control-tower { gap: 8px; }
  .control-tower > section { min-height: 0; }
  .focus-listen-copy .hint-row { position: relative; padding-right: 38px; }
  .focus-listen-copy .hint-toggle {
    display: grid !important;
    position: absolute;
    top: 50%;
    right: 0;
    width: 30px;
    height: 30px;
    padding: 4px;
    place-items: center;
    border: 2px solid #d6e8ee;
    border-radius: 9px;
    color: var(--deep);
    background: #fff;
    font-size: 0;
    transform: translateY(-50%);
  }
  .focus-listen-copy .hint-toggle:hover:not(:disabled) { border-color: #75c9c1; background: #f0fffb; }
  .focus-listen-copy .hint-toggle .eye-icon { width: 17px; height: 17px; }
  .focus-column .answer-area { min-height: 121px; padding-top: 9px; }
  .focus-column .answer-area input { min-height: 53px; font-size: clamp(24px, 2.65vw, 36px); }
  .focus-column .answer-area input::placeholder { font-size: 14px; }
  .focus-column .letter-pad { margin-top: 15px; }
}

@media (max-width: 900px) {
  .status-collapse-btn { margin: 0 0 7px; }
  .focus-listen-copy .hint-row { position: relative; padding-right: 35px; }
  .focus-listen-copy .hint-toggle {
    display: grid !important;
    position: absolute;
    top: 50%;
    right: 0;
    width: 28px;
    height: 28px;
    padding: 3px;
    place-items: center;
    border: 2px solid #d6e8ee;
    border-radius: 8px;
    color: var(--deep);
    background: #fff;
    font-size: 0;
    transform: translateY(-50%);
  }
  .focus-listen-copy .hint-toggle .eye-icon { width: 16px; height: 16px; }
  .focus-column .answer-area { min-height: 109px; }
  .focus-column .answer-area input { min-height: 49px; }
  .answer-slots { gap: 5px; margin-bottom: 4px; }
  .answer-slot { width: 27px; height: 32px; border-radius: 8px; font-size: 18px; }
  .answer-slot.space-slot { width: 10px; }
  .audio-status { max-width: 108px; font-size: 9px; }
}

@media (min-width: 901px) and (max-height: 700px) {
  .answer-slots { gap: 4px; margin-bottom: 3px; }
  .answer-slot { width: 25px; height: 29px; border-radius: 7px; font-size: 16px; box-shadow: 0 2px 0 #e0edf1; }
  .answer-slot.space-slot { width: 9px; }
  .focus-column .answer-area { min-height: 87px; padding-top: 5px; }
  .focus-column .answer-area input { min-height: 39px; font-size: 21px; }
  .focus-column .letter-pad { margin-top: 7px; }
  .audio-status { max-width: 90px; font-size: 8px; }
  .status-collapse-btn { min-height: 27px; padding: 5px 8px; font-size: 10px; }
  .status-collapse-btn span { font-size: 9px; }
}

/* 701–740px 高度的笔记本：保留字母格，但把各层间距压到首屏内。 */
@media (min-width: 901px) and (min-height: 701px) and (max-height: 740px) {
  .mission-card { padding-top: 14px; padding-bottom: 5px; }
  .challenge-zone { margin-top: 6px; }
  .focus-column { padding: 12px 17px 8px; }
  .focus-listen-panel { grid-template-columns: 82px minmax(0, 1fr); gap: 10px; margin-bottom: 8px; }
  .focus-listen-panel .listen-orb { width: 72px; min-height: 72px; box-shadow: 0 5px 0 #278d88; }
  .focus-listen-panel .listen-orb svg { width: 25px; height: 25px; }
  .focus-listen-panel .listen-orb span { font-size: 10px; }
  .audio-status { max-width: 82px; font-size: 8px; }
  .focus-listen-copy .hint-row strong { font-size: clamp(29px, 3.7vw, 41px); }
  .focus-listen-copy .word-context { margin-top: 5px; font-size: 9px; }
  .focus-heading { margin: 1px 0 4px; }
  .focus-column .answer-area { min-height: 80px; padding: 4px 7px; }
  .answer-slots { gap: 3px; margin-bottom: 2px; }
  .answer-slot { width: 24px; height: 27px; border-radius: 7px; font-size: 15px; box-shadow: 0 2px 0 #e0edf1; }
  .answer-slot.space-slot { width: 8px; }
  .focus-column .answer-area input { min-height: 35px; font-size: 20px; }
  .focus-column .answer-area input::placeholder { font-size: 11px; }
  .focus-column .letter-pad { min-height: 38px; margin-top: 6px; }
  .focus-column .bottom-controls { margin-top: 5px; }
  .focus-note { margin-top: 3px; }
  .mission-footer { margin-top: 2px; transform: none; }
}

/* 航程控制与题库检索。 */
.mission-footer #pause-session-btn { margin-left: auto; }
.mission-footer #pause-session-btn:not(:disabled) { border-color: #f0c878; background: #fff8df; }
.library-filters { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 8px; margin-top: 10px; }
.library-filters input, .library-filters select { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid #d6e6e0; border-radius: 10px; color: var(--deep); background: #fff; font: 700 11px/1.2 "Microsoft YaHei", sans-serif; }
.library-filters input:focus, .library-filters select:focus { border-color: #73c8c0; outline: 2px solid rgba(115, 200, 192, .2); }
.library-empty { margin: 20px 0; color: var(--ink-soft); font-size: 12px; text-align: center; }

@media (max-width: 640px) {
  .mission-footer { gap: 7px; }
  .mission-footer #pause-session-btn { margin-left: 0; }
  .library-filters { grid-template-columns: 1fr; }
  .top-actions .soft-btn:first-child, .top-actions .soft-btn:nth-child(2) { display: inline-block; }
}

/* 分级错误提示在反馈卡中直接可见，帮助孩子定位下一步。 */
.error-panel .feedback { display: block; max-width: 300px; }
.word-phonetic { margin: 6px 0 0; color: #5f88a1; font: 700 12px/1.3 "Trebuchet MS", "Microsoft YaHei", sans-serif; letter-spacing: .03em; text-align: center; }
.resume-card { width: min(470px, 100%); text-align: center; }
.resume-card .result-mark { margin: 0 auto 8px; }
.resume-card h2 { margin: 6px 0 8px; color: var(--deep); }
.resume-card p { margin: 0 auto; max-width: 330px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.resume-card .dialog-footer { justify-content: center; margin-top: 20px; }
.result-card .dialog-footer { flex-wrap: wrap; }
