/* ================= 哈珀背单词 · 全局样式 ================= */
/* 主色：哈珀学英语同款靛紫（#5B46E5）+ 冷灰蓝底。变量名 --orange / --cream 沿用旧名，值已是紫色体系 */
:root {
  --orange: #5B46E5;
  --orange-deep: #4A36C9;
  --orange-light: #8B6CF2;
  --cream: #EEECFF;
  --cream-deep: #E4E1FF;
  --bg: #F5F6FB;
  --ink: #1B1F3A;
  --ink-light: #7A7F98;
  --green: #4CC17E;
  --green-deep: #2FA863;
  --blue: #5B9BFF;
  --purple: #9B7BFF;
  --red: #FF6B5E;
  --pink: #FF8FA3;
  --yellow: #FFC53D;
  --card-shadow: 0 4px 14px rgba(91, 70, 229, .12);
  --radius: 18px;
  --fit-bottom: 0px;   /* 「适配手机浏览器」开关写入：给安卓虚拟按键 / 手势条腾出的高度，0 = 关（见 js/viewport.js） */
  --inset-b: max(env(safe-area-inset-bottom, 0px), var(--fit-bottom, 0px));
  --tabbar-h: calc(62px + var(--inset-b));
  --app-h: 100dvh;   /* 真实可视高度。dvh 自动跟随窗口/地址栏/iframe；js/viewport.js 仅在软键盘弹出时临时覆盖它 */
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #E9EBF5;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul, li { list-style: none; }

/* ---------- App 外壳：手机宽度居中 ---------- */
.app-shell {
  max-width: 480px; margin: 0 auto; height: 100vh; height: var(--app-h, 100dvh); overflow: hidden;
  background: var(--bg);
  position: relative; display: flex; flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,.08);
}
/* 下拉刷新提示条：平时藏在外壳顶部之外，下拉时随手指落下（见 main.js initPullToRefresh） */
.ptr { position: absolute; top: 0; left: 0; right: 0; height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--orange-deep); pointer-events: none; z-index: 55; opacity: 0; transform: translateY(-44px);
  background: linear-gradient(180deg, var(--cream) 0%, rgba(255,246,231,0) 100%); }
.ptr-ico { display: inline-flex; font-size: 16px; }
.ptr.spin .ptr-ico { animation: boot-step-spin .8s linear infinite; }
/* 唯一的滚动区：顶栏(.top-bar/.page-tabs 的 sticky)贴着它的顶部，底部导航是它下面的 flex 兄弟，不再叠在内容上 */
.view-container { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 12px; }

/* ---------- PC 提示 ---------- */
.pc-tip {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #E4E1FF; padding: 8px 18px; border-radius: 999px;
  font-size: 13px; z-index: 999; display: flex; gap: 10px; align-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.pc-tip button { color: #fff; font-size: 16px; }

/* ---------- 顶部状态栏（页面内） ---------- */
.top-bar {
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 8px; display: flex; align-items: center; gap: 10px;
  position: sticky; top: 0; z-index: 20; background: linear-gradient(180deg, var(--cream) 60%, rgba(255,246,231,0));
  max-height: 96px; overflow: hidden; opacity: 1; transition: max-height .22s ease, padding .22s ease, opacity .16s ease;
}
.view-container.header-hidden .top-bar { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; pointer-events: none; }
.boot-progress-message { margin-top: 8px; color: var(--ink-light); font-size: 13px; }
/* 启动清单：一行一个阶段，完成打勾 + 自身耗时，当前阶段下面挂一行细节 */
.boot-steps { margin: 10px auto 0; width: min(280px, 82vw); text-align: left; }
.boot-step {
  display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 4px 6px;
  font-size: 12.5px; color: var(--ink-light); padding: 2px 0; opacity: .65;
}
.boot-step.doing { opacity: 1; color: var(--ink); font-weight: 600; }
.boot-step.done .boot-step-mark { color: var(--green-deep); }
.boot-step.fail { opacity: 1; color: var(--red); }
.boot-step-mark { font-style: normal; font-size: 12px; text-align: center; }
.boot-step.doing .boot-step-mark::before {
  content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  border: 2px solid var(--orange-light); border-top-color: var(--orange);
  animation: boot-step-spin .7s linear infinite;
}
.boot-step-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boot-step-ms { font-weight: 500; font-size: 11px; color: var(--ink-light); opacity: .8; }
.boot-step-detail { grid-column: 2 / 4; font-size: 11px; color: var(--ink-light); font-weight: 400; }
@keyframes boot-step-spin { to { transform: rotate(360deg); } }
.boot-progress-track { width: 150px; height: 4px; margin: 16px auto 0; border-radius: 99px; overflow: hidden; background: var(--cream-deep); }
.boot-progress-track i { display: block; width: 45%; height: 100%; border-radius: inherit; background: var(--orange); animation: boot-progress-slide 1.1s ease-in-out infinite; }
@keyframes boot-progress-slide { from { transform: translateX(-110%); } to { transform: translateX(330%); } }
/* ---------- 首页「百词斩」：过关情况总览卡 + 关卡列表 ---------- */
.pass-card { margin: 4px 16px 0; background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 14px 16px 16px; }
.pass-head { display: flex; align-items: baseline; justify-content: space-between; }
.pass-big { font-size: 26px; font-weight: 800; color: var(--orange-deep); }
.pass-unit { font-size: 13px; color: var(--ink-light); margin-left: 4px; }
.pass-rate { font-size: 15px; font-weight: 700; color: var(--orange); }
.pass-bar { height: 8px; border-radius: 99px; background: var(--cream-deep); margin: 10px 0 8px; overflow: hidden; }
.pass-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange-light), var(--orange-deep)); transition: width .4s ease; }
.pass-sub { font-size: 12.5px; color: var(--ink-light); }
.pass-go { margin-top: 12px; width: 100%; height: 44px; border-radius: 999px; font-size: 15px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); box-shadow: var(--card-shadow); }

.home-tools { display: flex; gap: 8px; padding: 10px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.home-tools::-webkit-scrollbar { display: none; }
.home-tool {
  flex: none; background: #fff; border-radius: 999px; padding: 7px 13px; font-size: 12.5px; font-weight: 600;
  color: var(--ink-light); box-shadow: var(--card-shadow); white-space: nowrap;
}
.lv-list { margin: 0 16px; display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.lv-item {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
  background: #fff; border-radius: 14px; padding: 8px 12px; text-align: left;
  box-shadow: var(--card-shadow); border: 2px solid transparent;
}
.lv-item.current { border-color: var(--orange); }
.lv-item.locked { opacity: .55; box-shadow: none; background: var(--cream); }
.lv-no {
  width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff; background: var(--orange-light);
}
.lv-item.done .lv-no { background: var(--green); }
.lv-item.current .lv-no { background: linear-gradient(135deg, var(--orange), var(--orange-deep)); }
.lv-item.locked .lv-no { background: var(--cream-deep); color: var(--ink-light); font-size: 14px; }
.lv-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lv-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.lv-now { font-style: normal; font-size: 11px; font-weight: 700; color: var(--orange-deep); background: var(--cream-deep); border-radius: 99px; padding: 1px 7px; margin-left: 6px; }
.lv-meta { font-size: 12px; color: var(--ink-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-bar { height: 4px; border-radius: 99px; background: var(--cream-deep); overflow: hidden; }
.lv-bar i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.lv-item.current .lv-bar i { background: var(--orange); }
.lv-act { font-size: 13px; font-weight: 700; color: var(--orange-deep); white-space: nowrap; }
.lv-item.done .lv-act { color: var(--green-deep); }

.search-box {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 9px 14px;
  box-shadow: var(--card-shadow);
}
.search-box input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; color: var(--ink); }
.menu-btn { font-size: 20px; width: 38px; height: 38px; border-radius: 50%; background: #fff; box-shadow: var(--card-shadow); flex-shrink: 0; }

.currency-bar { display: flex; justify-content: flex-end; gap: 8px; padding: 4px 16px 8px; }
.currency {
  display: flex; align-items: center; gap: 5px; background: #fff;
  border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 13px; font-weight: 600;
  box-shadow: var(--card-shadow);
}
.currency .plus {
  width: 18px; height: 18px; border-radius: 50%; background: var(--orange); color: #fff;
  font-size: 13px; line-height: 18px; text-align: center; font-weight: 700;
}

/* ---------- 当前词库栏 ---------- */
.lib-bar {
  margin: 4px 16px 10px; background: linear-gradient(135deg, var(--orange) 0%, #9A86F5 100%);
  border-radius: var(--radius); padding: 14px 16px; color: #fff; position: relative; overflow: hidden;
  box-shadow: 0 6px 18px rgba(91, 70, 229,.28);
}
.lib-bar::after { content: ""; position: absolute; right: 70px; top: -6px; width: 64px; height: 64px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13.5' r='7.5'/%3E%3Cpath d='M12 6C12 4 13 3 14.6 3'/%3E%3Cpath d='M9.6 12.6h.01M14.4 12.6h.01'/%3E%3Cpath d='M10.8 15.4h2.4l-1.2 1.6z'/%3E%3C/svg%3E") no-repeat center / contain; opacity: .2; pointer-events: none; }
.lib-bar-top { display: flex; align-items: center; justify-content: space-between; }
.lib-name { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.lib-tag { font-size: 11px; background: rgba(255,255,255,.25); border-radius: 999px; padding: 2px 8px; font-weight: 400; }
.btn-switch {
  background: #fff; color: var(--orange-deep); font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; position: relative; z-index: 1;
}
.lib-sub-row { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; }
.lib-sub { font-size: 12px; opacity: .92; }
.unit-link { font-size: 12px; background: rgba(255,255,255,.22); padding: 4px 10px; border-radius: 999px; }

/* ---------- 统计栏 ---------- */
.stat-bar { display: flex; margin: 0 16px 10px; background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.stat-cell { flex: 1; text-align: center; padding: 10px 0 8px; position: relative; }
.stat-cell + .stat-cell::before { content: ""; position: absolute; left: 0; top: 20%; height: 60%; width: 1px; background: #DEDFED; }
.stat-num { font-size: 20px; font-weight: 800; font-family: "DIN Alternate", "Segoe UI", sans-serif; }
.stat-cell.chopped .stat-num { color: var(--green); }
.stat-cell.learning .stat-num { color: var(--orange); }
.stat-label { font-size: 11px; color: var(--ink-light); margin-top: 1px; }

/* ---------- 闯关地图 ---------- */
.map-wrap { position: relative; margin: 10px 8px 20px; }
.map-scroll { overflow-y: auto; max-height: calc(var(--app-h, 100dvh) - 380px); min-height: 320px; position: relative; }
.level-path { position: relative; width: 100%; }
.level-node { position: relative; display: flex; align-items: center; justify-content: center; height: 118px; }
.level-disc {
  width: 74px; height: 74px; border-radius: 50%; position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.18);
  box-shadow: 0 6px 14px rgba(91, 70, 229,.3);
}
.level-disc small { font-size: 10px; font-weight: 600; opacity: .9; margin-top: 1px; }
.lv-done   { background: linear-gradient(160deg, #57C98A, #2FA863); box-shadow: 0 6px 14px rgba(47,168,99,.35); }
.lv-current{ background: linear-gradient(160deg, #9A86F5, var(--orange-deep)); }
.lv-locked { background: #C0C2D4; box-shadow: 0 4px 10px rgba(0,0,0,.08); }
.lv-locked .lv-lock { font-size: 22px; }
@keyframes pulse {
  0%,100% { transform: scale(1); box-shadow: 0 6px 14px rgba(91, 70, 229,.3); }
  50% { transform: scale(1.06); box-shadow: 0 8px 22px rgba(91, 70, 229,.5); }
}
.lv-badge {
  position: absolute; top: -6px; right: -8px; background: var(--yellow); color: #7A4B00;
  font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 7px; z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.lv-progress { margin-top: 6px; font-size: 11px; color: var(--ink-light); z-index: 2; white-space: nowrap; }

/* ---------- 右侧悬浮按钮组 ---------- */
.float-col { position: fixed; right: calc(var(--pane-right-w, 0px) + 12px); bottom: calc(var(--tabbar-h) + 22px); display: flex; flex-direction: column; gap: 12px; z-index: 30; max-width: 480px; }
.float-btn {
  width: 46px; height: 46px; border-radius: 50%; background: #fff;
  box-shadow: 0 4px 12px rgba(91, 70, 229,.22); display: flex; align-items: center; justify-content: center;
  font-size: 20px; position: relative; transition: transform .15s;
}
.float-btn:active { transform: scale(.9); }
.float-btn.add { background: linear-gradient(160deg, #9A86F5, var(--orange-deep)); color: #fff; font-size: 26px; font-weight: 300; }
.float-pop { position: absolute; right: 56px; top: 50%; transform: translateY(-50%); background: #fff; border-radius: 12px; padding: 8px 14px; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.15); color: var(--orange-deep); }
.float-pop::before { content: ""; position: absolute; right: -5px; top: 50%; transform: translateY(-50%) rotate(45deg); width: 10px; height: 10px; background: #fff; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: relative; flex-shrink: 0; padding-bottom: var(--inset-b);
  width: 100%; max-width: 480px; height: var(--tabbar-h);
  background: #fff; display: flex; border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(27, 31, 58,.1); z-index: 40;
}
.tab-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #A3A8BD; font-size: 10px; }
.tab-item.active { color: var(--orange-deep); font-weight: 700; }
.tab-icon { font-size: 22px; line-height: 1; }
.tab-icon-big { font-size: 28px; }
.tab-item.tab-center { color: var(--orange-deep); font-weight: 700; }
.tab-center .tab-icon-big {
  background: linear-gradient(160deg, #9A86F5, var(--orange-deep)); color: #fff;
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin-top: -18px; box-shadow: 0 6px 14px rgba(91, 70, 229,.4); font-size: 22px;
}

/* ---------- 左侧抽屉 ---------- */
.drawer-mask, .modal-mask { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(40,25,12,.45); z-index: 90; opacity: 0; transition: opacity .25s; }
.drawer-mask.show, .modal-mask.show { opacity: 1; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: 72%; max-width: 300px; z-index: 95;
  background: var(--cream); border-radius: 0 22px 22px 0;
  transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.8,.3,1);
  display: flex; flex-direction: column; padding-bottom: var(--inset-b);
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 40px 20px 20px; background: linear-gradient(135deg, var(--orange), #9A86F5); color: #fff; }
.drawer-avatar { width: 56px; height: 56px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.drawer-name { font-size: 17px; font-weight: 700; margin-top: 10px; }
.drawer-sub { font-size: 12px; opacity: .9; margin-top: 3px; }
.drawer-menu { flex: 1; padding: 12px 0; overflow-y: auto; }
.drawer-menu li { padding: 14px 22px; font-size: 15px; display: flex; align-items: center; gap: 12px; }
.drawer-menu li:active { background: rgba(91, 70, 229,.1); }
.dm-icon { font-size: 18px; }
.dm-toggle { justify-content: space-between; }
.switch { width: 42px; height: 24px; background: #DEE1EF; border-radius: 999px; position: relative; transition: background .2s; flex-shrink: 0; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch.on { background: var(--green); }
.switch.on i { left: 21px; }
.drawer-foot { padding: 16px 22px; font-size: 11px; color: var(--ink-light); border-top: 1px solid #D7D8E9; }

/* ---------- 通用弹窗 ---------- */
.modal-mask { z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
/* 关键修复：hidden 遮罩层应 display:none，否则透明层会拦截全部点击 */
.modal-mask[hidden], .drawer-mask[hidden] { display: none !important; }
.modal {
  background: #fff; border-radius: 24px; width: 100%; max-width: 340px;
  padding: 24px 20px 20px; position: relative; text-align: center;
  animation: popIn .3s cubic-bezier(.2,.8,.3,1.2);
  max-height: calc(var(--app-h, 100dvh) * .8); overflow-y: auto;
}
@keyframes popIn { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 12px; right: 14px; font-size: 20px; color: #B8BDD3; }
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.modal-desc { font-size: 13px; color: var(--ink-light); line-height: 1.7; }
.modal-highlight { background: var(--cream-deep); border-radius: 12px; padding: 10px 12px; margin: 12px 0; font-size: 13px; line-height: 1.8; color: var(--ink); }
.btn-primary {
  display: block; width: 100%; background: linear-gradient(135deg, var(--orange), var(--orange-deep));
  color: #fff; font-size: 16px; font-weight: 700; padding: 13px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(91, 70, 229,.35); margin-top: 14px;
}
.btn-primary:active { transform: scale(.97); }
.btn-ghost { display: block; width: 100%; border: 1.5px solid #DEE1EF; color: var(--ink-light); font-size: 13px; padding: 10px; border-radius: 999px; margin-top: 10px; background: #fff; }
.btn-check-row { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; font-size: 12px; color: var(--ink-light); }
.btn-check-row .switch { width: 34px; height: 19px; }
.btn-check-row .switch i { width: 13px; height: 13px; }
.btn-check-row .switch.on i { left: 17px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 20%; left: 50%; transform: translateX(-50%);
  background: rgba(40,25,12,.85); color: #fff; font-size: 14px;
  padding: 10px 20px; border-radius: 12px; z-index: 200; max-width: 80vw; text-align: center;
  animation: popIn .25s;
}
/* 贴底变体：拼写/写一写等带dock键盘的页面，提示放键盘/功能键上方，不遮中部格子 */
.toast.low { top: auto; bottom: 260px; }

/* ================= 词库列表页 ================= */
.page-tabs { display: flex; background: #fff; padding: 0 12px; gap: 4px; border-bottom: 1px solid #E2E3EF; position: sticky; top: 0; z-index: 20; }
.page-tab { flex: 1; text-align: center; padding: 13px 0 11px; font-size: 15px; color: var(--ink-light); border-bottom: 3px solid transparent; font-weight: 600; }
.page-tab.active { color: var(--orange-deep); border-bottom-color: var(--orange); }

.lib-head { margin: 14px 16px; background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 16px; display: flex; gap: 14px; }
.lib-cover {
  width: 76px; height: 100px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(160deg, #FFD591, var(--orange)); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 26px; font-weight: 800;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.35);
}
.lib-cover small { font-size: 10px; font-weight: 600; }
.lib-head-info { flex: 1; min-width: 0; }
.lib-head-name { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.lang-tag { font-size: 10px; background: #EDF3FF; color: var(--blue); border-radius: 999px; padding: 2px 7px; font-weight: 600; }
.lib-head-meta { font-size: 11px; color: var(--ink-light); margin-top: 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fav-btn { font-size: 18px; }

.lesson-group { margin: 0 16px 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.lesson-item { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid #E5E6F1; }
.lesson-item:last-child { border-bottom: none; }
.lesson-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--cream-deep); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-right: 12px; flex-shrink: 0; }
.lesson-info { flex: 1; min-width: 0; }
.lesson-name { font-size: 14px; font-weight: 700; }
.lesson-sub { font-size: 11px; color: var(--ink-light); margin-top: 2px; }
.lesson-arrow { color: #B8B9CD; font-size: 16px; }

.page-bottom-bar {
  position: fixed; bottom: var(--tabbar-h); left: calc(50% + var(--shell-shift, 0px)); transform: translateX(-50%); width: min(100%, var(--center-w, 100%)); max-width: var(--sheet-max, 480px);
  background: #fff; padding: 12px 16px calc(12px + var(--inset-b)); display: flex; gap: 12px; z-index: 35;
  border-radius: 20px 20px 0 0; box-shadow: 0 -4px 20px rgba(27, 31, 58,.1);
}
.btn-outline-orange { flex: 1; border: 2px solid var(--orange); color: var(--orange-deep); font-size: 15px; font-weight: 700; padding: 12px; border-radius: 999px; background: #fff; }
.btn-solid-orange { flex: 1.4; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; font-size: 15px; font-weight: 700; padding: 12px; border-radius: 999px; box-shadow: 0 6px 16px rgba(91, 70, 229,.35); }

/* ================= 记忆卡 / 训练页 ================= */
.study-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.study-count { font-size: 14px; font-weight: 700; color: var(--ink-light); }
.study-count b { color: var(--orange-deep); font-size: 17px; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: var(--card-shadow); display: flex; align-items: center; justify-content: center; font-size: 15px; }

.card-tabs { display: flex; margin: 8px 16px; background: #DEE0EE; border-radius: 999px; padding: 4px; }
.card-tab { flex: 1; text-align: center; padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--ink-light); border-radius: 999px; }
.card-tab.active { background: #fff; color: var(--orange-deep); box-shadow: 0 2px 8px rgba(0,0,0,.08); }

/* 豆包老师讲解卡片 */
.ai-teacher-card { text-align:left; }
.ai-teacher-head { font-size:18px; font-weight:800; color:var(--ink); margin-bottom:12px; }
.ai-teacher-body { font-size:14px; line-height:1.9; color:var(--ink); white-space:normal; word-break:break-word; min-height:120px; }
.ai-loading { opacity:.6; }

.word-card {
  margin: 12px 16px; background: #fff; border-radius: 24px; box-shadow: var(--card-shadow);
  padding: 28px 20px 20px; min-height: 330px; position: relative;
  display: flex; flex-direction: column; animation: cardIn .35s ease;
}
@keyframes cardIn { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.word-main { text-align: center; }
.word-text { font-size: 40px; font-weight: 800; letter-spacing: 1px; }
.word-phon { font-size: 15px; color: var(--ink-light); margin-top: 6px; font-family: "Segoe UI", "Lucida Sans Unicode", sans-serif; }
.word-actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.speak-btn {
  width: 46px; height: 46px; border-radius: 50%; background: #fff; border: 1.5px solid #DEE1EF;
  color: #6B7B8C; font-size: 20px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(27, 31, 58,.10);
}
.speak-btn.small { width: 34px; height: 34px; font-size: 15px; }
.speak-btn.slow { background: #fff; border: 1.5px solid #DEE1EF; color: #6B7B8C; box-shadow: 0 3px 10px rgba(27, 31, 58,.10); }
.speak-btn.phonic { background: #fff; border: 1.5px solid #DEE1EF; color: #6B7B8C; box-shadow: 0 3px 10px rgba(27, 31, 58,.10); }
.speak-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
.speak-btn.small svg { width: 17px; height: 17px; }
/* 带文字标签的发音按钮：胶囊样式，避免圆形内文字溢出重叠 */
.speak-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: #fff; white-space: nowrap;
  background: linear-gradient(160deg, #9A86F5, var(--orange-deep));
  box-shadow: 0 4px 10px rgba(91, 70, 229,.3);
}
.speak-pill.slow { background: linear-gradient(160deg, #74C0FF, #3E97F5); box-shadow: 0 4px 10px rgba(62,151,245,.3); }
.speak-pill svg { width: 15px; height: 15px; flex-shrink: 0; }
.speak-pill:active { transform: scale(.96); }

.speak-btn:active { transform: scale(.92); }
.round-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--cream-deep); font-size: 17px; display: flex; align-items: center; justify-content: center; }
.round-btn.faved { background: #FFE3E8; }
/* 卡片单词区收藏按钮：与发音按钮同大圆，线稿心形，激活变粉 */
.word-actions .fav-btn { width: 46px; height: 46px; background: #fff; color: #C0C2D4; box-shadow: 0 5px 12px rgba(27, 31, 58,.12); }
.word-actions .fav-btn svg { width: 21px; height: 21px; }
.word-actions .fav-btn.faved { background: #FFE3E8; color: var(--pink); }
.word-actions .fav-btn.faved svg path { fill: currentColor; }
.word-actions .fav-btn:active { transform: scale(.92); }

.word-meaning { text-align: center; margin-top: 18px; }
.word-pos { display: inline-block; font-size: 12px; background: #EDF3FF; color: var(--blue); border-radius: 6px; padding: 1px 8px; font-style: italic; font-family: Georgia, serif; }
.word-cn { font-size: 19px; font-weight: 700; margin-top: 8px; }
.sentence-box { margin-top: 16px; background: var(--cream); border-radius: 14px; padding: 12px 14px; text-align: left; }
.sentence-en { font-size: 14px; line-height: 1.6; }
.sentence-en b { color: var(--orange-deep); }
.sentence-cn { font-size: 12px; color: var(--ink-light); margin-top: 4px; line-height: 1.6; }
.sentence-actions { display: flex; gap: 8px; margin-top: 10px; }

/* 自然拼读字母块 */
.phonic-wrap { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.phonic-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.phonic-tiles { display: flex; gap: 4px; }
.phonic-tile {
  min-width: 34px; height: 42px; border-radius: 10px; color: #fff; font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 6px;
  box-shadow: 0 3px 0 rgba(0,0,0,.15); text-transform: lowercase;
}
.phonic-sound { font-size: 11px; color: var(--ink-light); font-family: "Segoe UI", sans-serif; }
.c0 { background: #5B46E5; } .c1 { background: #5B9BFF; } .c2 { background: #4CC17E; } .c3 { background: #9B7BFF; }
.c4 { background: #FF6B5E; } .c5 { background: #F5A623; } .c6 { background: #2AB3BF; }

/* 卡片底部按钮 */
.card-func-row { display: flex; justify-content: center; gap: 10px; margin: 14px 16px 6px; }
.func-btn { flex: 1; background: #fff; border-radius: 14px; padding: 10px 0; text-align: center; box-shadow: var(--card-shadow); font-size: 12px; font-weight: 600; color: var(--ink); }
.func-btn .fi { font-size: 18px; display: block; margin-bottom: 2px; }
.mode-row { display: flex; gap: 10px; margin: 8px 16px 0; }
.mode-btn { flex: 1; border-radius: 999px; padding: 9px 0; font-size: 12px; font-weight: 700; background: #fff; color: var(--ink-light); box-shadow: var(--card-shadow); border: 1.5px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mode-btn .fi { font-size: 17px; line-height: 1; }
.mode-btn.active { background: var(--cream-deep); color: var(--orange-deep); border-color: var(--orange); }

/* 我的笔记 */
.note-area { width: 100%; min-height: 160px; border: none; outline: none; background: var(--cream); border-radius: 14px; padding: 14px; font-size: 14px; line-height: 1.8; resize: none; color: var(--ink); }

/* ================= 学练一体 ================= */
.step-bar { display: flex; align-items: center; justify-content: space-between; margin: 14px 22px 4px; position: relative; }
.step-line { position: absolute; left: 24px; right: 24px; top: 16px; height: 4px; background: #D7D8E9; border-radius: 999px; z-index: 0; }
.step-line-fill { position: absolute; left: 24px; top: 16px; height: 4px; background: linear-gradient(90deg, var(--green), #57C98A); border-radius: 999px; z-index: 1; transition: width .4s; }
.step-node { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 36px; cursor: pointer; }
.step-dot { width: 32px; height: 32px; border-radius: 50%; background: #D5D6E8; color: #A3A8BD; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; transition: all .3s; }
.step-node.done .step-dot { background: var(--green); color: #fff; }
.step-node.current .step-dot { background: var(--orange); color: #fff; box-shadow: 0 0 0 5px rgba(91, 70, 229,.2); animation: pulse 1.4s infinite; }
.step-name { font-size: 11px; color: var(--ink-light); font-weight: 600; }
.step-node.current .step-name { color: var(--orange-deep); }

.train-card { margin: 10px 16px; background: #fff; border-radius: 24px; box-shadow: var(--card-shadow); padding: 22px 20px; min-height: 260px; display: flex; flex-direction: column; justify-content: center; animation: cardIn .3s ease; }
.train-tip { text-align: center; font-size: 13px; color: var(--ink-light); margin-bottom: 12px; }
.train-tip b { color: var(--orange-deep); }

/* 选择题选项 */
.choice-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.choice-item { background: var(--cream); border-radius: 14px; padding: 13px 16px; font-size: 15px; font-weight: 600; text-align: left; border: 2px solid transparent; display: flex; align-items: center; gap: 10px; }
.choice-item .choice-letter { width: 26px; height: 26px; border-radius: 8px; background: #fff; font-size: 12px; font-weight: 800; color: var(--ink-light); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.choice-item.correct { background: #E6F7EE; border-color: var(--green); color: var(--green-deep); }
.choice-item.wrong { background: #FFEBE9; border-color: var(--red); color: var(--red); animation: shake .3s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* 音节拆分练习 */
.syl-quiz { display: flex; justify-content: center; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.syl-tile {
  padding: 12px 18px; border-radius: 14px; background: var(--cream-deep); font-size: 20px; font-weight: 800;
  box-shadow: 0 3px 0 #E3CFae; color: var(--ink);
}
.syl-tile.picked { background: var(--orange); color: #fff; box-shadow: 0 3px 0 var(--orange-deep); }
.syl-tile.wrong { background: #FFEBE9; color: var(--red); animation: shake .3s; }
.syl-answer { display: flex; justify-content: center; gap: 8px; min-height: 52px; margin-bottom: 8px; }
.syl-slot { width: 84px; height: 48px; border-bottom: 3px dashed #C5C6D6; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: var(--orange-deep); }

/* 拼写键盘（重点功能） */
.spell-wrap { display: flex; flex-direction: column; gap: 14px; }
.spell-hint-card {
  background: var(--cream); border-radius: 16px; padding: 16px; text-align: center;
}
.spell-hint-card .word-pos { margin-bottom: 6px; }
.spell-hint-cn { font-size: 22px; font-weight: 800; }
.spell-hint-audio { margin-top: 10px; display: flex; justify-content: center; gap: 12px; }

.spell-slots { display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; }
.spell-slot {
  min-width: 40px; height: 48px; border-radius: 10px; background: var(--cream);
  border: 2px solid #DEE1EF; font-size: 28px; font-weight: 800; text-transform: lowercase;
  display: flex; align-items: center; justify-content: center; color: var(--ink);
  padding: 0 4px; overflow: hidden;
}
.spell-slot.filled { background: #fff; border-color: var(--orange); box-shadow: 0 3px 8px rgba(91, 70, 229,.18); }
.spell-slot.ok { background: #E6F7EE; border-color: var(--green); color: var(--green-deep); animation: popIn .25s; }
.spell-slot.err { background: #FFEBE9; border-color: var(--red); color: var(--red); animation: shake .3s; }
.spell-slot.hinted { background: #EEECFF; border-color: var(--yellow); color: #B8860B; }

/* 标准全功能虚拟键盘（仿系统键盘 QWERTY 布局与配色） */
.kb { display: flex; flex-direction: column; gap: 5px; padding: 10px 8px; background: #D9EAF8; border-radius: 16px; box-shadow: 0 6px 18px rgba(59,124,204,.18); }
/* 底部停靠面板：键盘固定在屏幕底部（仿系统键盘弹出位置） */
.kb-dock { position: fixed; bottom: 0; left: calc(50% + var(--shell-shift, 0px)); transform: translateX(-50%); width: min(100%, var(--center-w, 100%)); max-width: var(--sheet-max, 480px); z-index: 45; padding: 10px 10px calc(10px + var(--inset-b)); background: var(--bg); border-radius: 16px 16px 0 0; box-shadow: 0 -4px 20px rgba(27, 31, 58,.12); }
.kb-spacer { height: 340px; }  /* 为停靠键盘占位，避免遮挡内容 */
.kb-row { display: flex; justify-content: center; gap: 4px; }
/* 字母键：白底 + 浅蓝描边 + 立体下沉阴影；大热区（50px 高，缝隙 4px 贴近） */
.kb-key {
  flex: 1; max-width: 35px; height: 50px; border-radius: 8px;
  background: #fff; border: 2px solid #B7D6F5; color: #2A6DB5;
  font-size: 21px; font-weight: 800;
  box-shadow: 0 3px 0 #B7D6F5;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: box-shadow .06s, transform .06s;
}
.kb-key:active { box-shadow: 0 1px 0 #B7D6F5; transform: translateY(2px); }
/* 候选字母（单词包含）米黄色高亮 —— 低饱和，不用亮黄 */
.kb-key.in-word { background: #FBF3D5; border-color: #D5D9EA; box-shadow: 0 3px 0 #D5D9EA; }
.kb-key.flash { background: #FFE9A8; border-color: #E5C96A; box-shadow: 0 3px 0 #E5C96A; }
/* 功能键：浅灰蓝底 + 深蓝图标/文字 */
.kb-fn {
  flex: 1; max-width: 48px; height: 50px; border-radius: 8px;
  background: #CFE0F2; border: 2px solid #B7D6F5; color: #2A5B8F;
  font-size: 15px; font-weight: 700;
  box-shadow: 0 3px 0 #B7D6F5;
  display: flex; align-items: center; justify-content: center; padding: 0;
  transition: box-shadow .06s, transform .06s;
}
.kb-fn:active { box-shadow: 0 1px 0 #B7D6F5; transform: translateY(2px); }
.kb-fn.on { background: #2A6DB5; border-color: #2A6DB5; color: #fff; box-shadow: 0 3px 0 #1F5291; }  /* Shift 开启态 */
.kb-space { flex: 5; max-width: 230px; background: #E8F1FB; font-size: 14px; }  /* 空格：浅蓝加宽长键 */
.kb-return { background: var(--orange); border-color: var(--orange-deep); color: #fff; max-width: 80px; font-size: 16px; font-weight: 800; box-shadow: 0 3px 0 var(--orange-deep); }
.kb-return:active { background: var(--orange-deep); box-shadow: 0 1px 0 var(--orange-deep); }
.kb-hint { background: #FBF3D5; border-color: #D5D9EA; box-shadow: 0 3px 0 #D5D9EA; color: #8A6D1A; max-width: 52px; }
.kb-sys { max-width: 82px; font-size: 12px; }
.kb-all { max-width: 42px; }
.kb-apost { max-width: 36px; font-size: 18px; }

/* ================= 写一写 · 临摹写风格（蓝天云朵 + 练习纸） ================= */
.sp-sky { min-height: calc(var(--app-h, 100dvh) - 90px); background: linear-gradient(180deg, #9FD8FF 0%, #C9EBFF 40%, #EAF7FF 100%); position: relative; overflow: hidden; }
/* 扁平白云（圆角组合，静态装饰） */
.sp-sky .cloud { position: absolute; width: 96px; height: 26px; background: rgba(255,255,255,.85); border-radius: 999px; }
.sp-sky .cloud::before, .sp-sky .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.sp-sky .cloud::before { width: 44px; height: 44px; top: -20px; left: 14px; }
.sp-sky .cloud::after { width: 30px; height: 30px; top: -13px; right: 16px; }
.sp-sky .c1 { top: 84px; left: -24px; }
.sp-sky .c2 { top: 168px; right: -26px; }
.sp-sky .c3 { top: 298px; left: 8%; width: 70px; opacity: .7; }
/* 顶部标题栏 */
.sp-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; position: relative; }
.sp-back { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(160deg, #6FB2FF, #3E8EF7); color: #fff; font-size: 20px; font-weight: 700; box-shadow: 0 4px 10px rgba(62,142,247,.4); flex-shrink: 0; }
.sp-back:active { transform: scale(.92); }
.sp-title { font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 2px 6px rgba(38,110,190,.3); }
/* W 金币栏：金色圆形 W + 数字 + 橙色加号 */
.sp-coin-bar { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 4px 6px 4px 5px; font-size: 13px; font-weight: 700; color: var(--ink); box-shadow: 0 3px 8px rgba(59,124,204,.18); }
.coin-w { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(160deg, #FFD24A, #F5A623); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -2px 3px rgba(160,90,0,.35); }
.coin-plus { width: 18px; height: 18px; border-radius: 50%; background: var(--orange); color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }
.coin-plus:active { background: var(--orange-deep); }
/* 释义区：左侧竖排圆形喇叭/乌龟 + 白底蓝框发光卡 */
.sp-hint-row { display: flex; gap: 12px; margin: 12px 16px 0; position: relative; align-items: stretch; }
.sp-audio-col { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.sp-audio { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(160deg, #6FB2FF, #3E8EF7); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 12px rgba(62,142,247,.4); }
.sp-audio:active { transform: scale(.92); }
.sp-audio.slow { background: linear-gradient(160deg, #8FE0A8, #4CC17E); box-shadow: 0 5px 12px rgba(76,193,126,.4); }
.sp-hint-card { flex: 1; background: #fff; border: 2px solid #8FC3F7; border-radius: 18px; padding: 14px 16px 12px; box-shadow: 0 0 0 3px rgba(143,195,247,.3), 0 0 18px rgba(111,178,255,.45), 0 8px 18px rgba(59,124,204,.15); }
.sp-hint-card .word-pos { display: inline-block; font-size: 12px; color: #3A4753; font-style: italic; }
.sp-cn { font-size: 24px; font-weight: 800; color: #22303C; margin-top: 4px; }
/* 仿真练习纸答题区：白色纸张 + 槽位下的一条书写横线 + 卷边 */
.sp-paper { margin: 16px 20px 0; background: #fff; border-radius: 8px; position: relative; box-shadow: 0 10px 24px rgba(59,124,204,.22); padding: 18px 12px 16px; }
.sp-paper .spell-slots { position: relative; z-index: 1; border-bottom: 2px solid #D9E8F6; padding-bottom: 16px; margin-bottom: 4px; }
.sp-curl { position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; background: linear-gradient(135deg, rgba(255,255,255,0) 0 50%, #D9E8F6 50% 100%); border-radius: 0 0 8px 0; box-shadow: -1px -1px 3px rgba(59,124,204,.15); }
/* 练习纸上的字母槽（答题输入区） */
.sp-paper .spell-slots { position: relative; z-index: 1; }
.sp-paper .spell-slot { background: rgba(255,255,255,.92); border-color: #B7D6F5; color: #1F5FA8; }
.sp-paper .spell-slot.filled { background: #fff; border-color: #3E8EF7; box-shadow: 0 3px 8px rgba(62,142,247,.2); }
.sp-paper .spell-slot.ok { background: #E6F7EE; border-color: var(--green); color: var(--green-deep); }
.sp-paper .spell-slot.err { background: #FFEBE9; border-color: var(--red); color: var(--red); }
.sp-paper .spell-slot.hinted { background: #EEECFF; border-color: var(--yellow); color: #B8860B; }
/* 蓝天语境下的底部键盘：蓝色浮雕主题（白底蓝边 + 立体阴影 + 按下高亮黄） */
.sp-sky .kb-dock { background: linear-gradient(180deg, #E7F3FD, #F6FAFF); box-shadow: 0 -4px 20px rgba(59,124,204,.2); }
/* 底行功能键宽度 */
.kb-sys { max-width: 78px; font-size: 12px; }
.kb-all { max-width: 40px; }
.kb-apost { max-width: 34px; }
/* 键盘下方浅色小字水印 */
.kb-mark { text-align: center; font-size: 11px; color: #9DB8D4; padding-top: 8px; }
/* 系统键盘输入模式（写一写页） */
.sys-input {
  width: 100%; border: none; outline: none; background: #fff; border-radius: 12px;
  padding: 12px; font-size: 22px; font-weight: 800; text-align: center; letter-spacing: 4px;
  border: 2px solid #9CC4EE; text-transform: lowercase; color: var(--ink);
}
.sys-input:focus { border-color: #3E8EF7; }
/* 写一写功能按钮栏：提示一下(100W) / 跳过（与书写纸之间留足垂直间距） */
.sp-func-row { display: flex; gap: 12px; margin: 22px 16px 0; position: relative; }
.sp-fn { flex: 1; position: relative; background: #fff; border: 2px solid #B7D6F5; border-radius: 999px; padding: 11px 0; font-size: 14px; font-weight: 700; color: #2A6DB5; box-shadow: 0 4px 10px rgba(59,124,204,.15); }
.sp-fn:active { transform: scale(.97); }
.sp-fn.skip { flex: .7; background: rgba(255,255,255,.85); }
.sp-fn-badge { position: absolute; top: -9px; right: -6px; background: linear-gradient(160deg, #FFD24A, #F5A623); color: #fff; font-size: 10px; font-weight: 800; border-radius: 999px; padding: 2px 8px; box-shadow: 0 2px 5px rgba(184,134,11,.35); }

.spell-actions { display: flex; gap: 10px; align-items: center; }
.btn-hint { flex: 1; background: #fff; border: 2px solid var(--yellow); color: #B8860B; font-size: 14px; font-weight: 700; padding: 10px; border-radius: 999px; }
.btn-chop { flex: 1.4; background: linear-gradient(135deg, #57C98A, var(--green-deep)); color: #fff; font-size: 15px; font-weight: 700; padding: 11px; border-radius: 999px; box-shadow: 0 6px 14px rgba(47,168,99,.35); }
.btn-share-s { width: 44px; height: 44px; border-radius: 50%; background: #fff; box-shadow: var(--card-shadow); font-size: 17px; flex-shrink: 0; }

/* 读测评 */
.eval-box { text-align: center; padding: 10px 0; }
.eval-mic {
  width: 84px; height: 84px; border-radius: 50%; margin: 12px auto;
  background: linear-gradient(160deg, #74C0FF, #3E97F5); color: #fff; font-size: 34px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px rgba(62,151,245,.35);
}
.eval-mic.rec { background: linear-gradient(160deg, #FF8FA3, var(--red)); animation: pulse 1.2s infinite; }
.eval-score { font-size: 44px; font-weight: 800; color: var(--green); font-family: "DIN Alternate", sans-serif; }
.eval-score.mid { color: var(--yellow); } .eval-score.low { color: var(--red); }
.eval-word { font-size: 15px; color: var(--ink-light); margin-top: 4px; }
/* AI 测评（豆包大模型出题） */
.ai-quiz-loading { text-align: center; padding: 26px 0 12px; }
.ai-loading-ring {
  width: 42px; height: 42px; margin: 0 auto 10px; border-radius: 50%;
  border: 4px solid var(--cream-deep); border-top-color: var(--orange);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-loading-text { font-size: 13px; color: var(--ink-light); }
.ai-fallback-tip { font-size: 12px; color: var(--orange-deep); text-align: center; margin-bottom: 4px; }
.ai-quiz-meta { font-size: 11px; color: var(--ink-light); font-weight: 600; text-align: center; margin-bottom: 8px; }
.ai-quiz-q { font-size: 16px; font-weight: 700; color: var(--ink); text-align: center; line-height: 1.6; margin: 6px 0 4px; }
.ai-quiz-explain { font-size: 12px; color: var(--green-deep); background: #E6F7EE; border-radius: 10px; padding: 9px 12px; margin-top: 10px; line-height: 1.6; }

/* 自动播放 */
.auto-play-badge { position: fixed; top: 16px; right: calc(var(--pane-right-w, 0px) + 16px); background: var(--ink); color: #E4E1FF; font-size: 12px; padding: 6px 12px; border-radius: 999px; z-index: 60; }

/* ================= 快速过滤（熟练词筛选） ================= */
.filter-count { text-align: center; font-size: 13px; color: var(--ink-light); margin: 10px 0 2px; }
.filter-know { display: flex; gap: 12px; margin: 0 16px 14px; }
.btn-know { flex: 1; padding: 13px; border-radius: 999px; font-size: 15px; font-weight: 700; }
.btn-know.yes { background: linear-gradient(135deg, #57C98A, var(--green-deep)); color: #fff; box-shadow: 0 6px 14px rgba(47,168,99,.3); }
.btn-know.no { background: #fff; border: 2px solid var(--orange); color: var(--orange-deep); }

/* ================= 我的 / 词书 ================= */
.mine-head { padding: 26px 20px 18px; background: linear-gradient(135deg, var(--orange), #9A86F5); color: #fff; border-radius: 0 0 26px 26px; }
.mine-avatar { display: flex; align-items: center; gap: 14px; }
.mine-avatar .drawer-avatar { background: rgba(255,255,255,.25); }
.mine-stats { display: flex; margin-top: 18px; background: rgba(255,255,255,.18); border-radius: 14px; padding: 10px 0; }
.mine-stats .stat-cell { color: #fff; }
.mine-stats .stat-cell + .stat-cell::before { background: rgba(255,255,255,.3); }
.mine-stats .stat-label { color: rgba(255,255,255,.85); }
.mine-stats .stat-num { color: #fff; }
.mine-version { margin: 16px 16px 4px; padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: 14px; box-shadow: var(--card-shadow); font-size: 12px; color: var(--ink-light); }
.mine-version-label { margin-right: 8px; }
.mine-version b { color: var(--orange-deep); font-size: 13px; }
.mine-version button { color: var(--orange-deep); font-size: 12px; font-weight: 700; white-space: nowrap; }
/* 个人学习报告 */
.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 16px 14px; }
.report-card { background: #fff; border-radius: 14px; padding: 14px 8px; text-align: center; box-shadow: var(--card-shadow); }
.report-card b { display: block; font-size: 22px; font-weight: 800; color: var(--orange-deep); font-variant-numeric: tabular-nums; }
.report-card span { display: block; font-size: 11px; color: var(--ink-light); margin-top: 3px; }
.report-recent { margin: 0 16px 14px; background: #fff; border-radius: 14px; box-shadow: var(--card-shadow); padding: 12px 14px; }
.report-recent-h { font-size: 12px; font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.report-item { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink); padding: 7px 0; border-bottom: 1px solid #E2E3EF; }
.report-item:last-child { border-bottom: none; }
.report-item span:first-child { font-weight: 700; }
.report-item span:last-child { color: var(--ink-light); font-size: 11px; }

.word-row { display: flex; align-items: center; margin: 0 16px 10px; background: #fff; border-radius: 14px; padding: 13px 15px; box-shadow: var(--card-shadow); }
.word-row .wr-main { flex: 1; min-width: 0; }
.wr-word { font-size: 16px; font-weight: 700; }
.wr-word .wr-phon { font-size: 11px; color: var(--ink-light); font-weight: 400; margin-left: 6px; }
.wr-cn { font-size: 12px; color: var(--ink-light); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-status { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 10px; flex-shrink: 0; }
.wr-status.chopped { background: #E6F7EE; color: var(--green-deep); }
.wr-status.learning { background: #EEECFF; color: var(--orange-deep); }
.wr-status.new { background: #E8E9F3; color: #A3A8BD; }
.wr-play { margin-left: 10px; }

/* 我的词书：词库页底部折叠区（默认收起，不占位置） */
.mine-wordbook { margin: 18px 16px 6px; background: #fff; border-radius: 14px; box-shadow: var(--card-shadow); overflow: hidden; }
.mine-wordbook > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.mine-wordbook > summary::-webkit-details-marker { display: none; }
.mine-wordbook > summary::after { content: '▾'; margin-left: auto; color: var(--ink-light); font-size: 12px; transition: transform .2s; }
.mine-wordbook[open] > summary::after { transform: rotate(180deg); }
.mine-wordbook .mwb-hint { font-size: 11px; font-weight: 500; color: var(--ink-light); }
.mine-wordbook .mwb-tabs { display: flex; gap: 8px; padding: 0 16px 10px; }
.mine-wordbook .mwb-tabs button { flex: 1; font-size: 12px; font-weight: 700; padding: 7px 0; border-radius: 999px; background: var(--cream); color: var(--ink-light); }
.mine-wordbook .mwb-tabs button.on { background: #EEECFF; color: var(--orange-deep); }
.mine-wordbook .word-row { margin: 0 12px 8px; box-shadow: none; border: 1px solid var(--cream-deep); }
.mine-wordbook .mwb-foot { text-align: center; padding: 4px 16px 14px; font-size: 11px; color: var(--ink-light); }

.section-title { margin: 18px 16px 10px; font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: space-between; }
.section-title .link-more { font-size: 12px; color: var(--ink-light); font-weight: 500; }

/* 设置/说明行 */
.setting-row { display: flex; align-items: center; justify-content: space-between; background: #fff; margin: 0 16px 10px; border-radius: 14px; padding: 14px 16px; box-shadow: var(--card-shadow); font-size: 14px; font-weight: 600; }
/* 设置弹窗内的多选一段组（如：写一写跳转方式） */
.setting-row.col { flex-direction: column; align-items: stretch; gap: 10px; }
.set-opts { display: flex; gap: 6px; }
.set-opts button { flex: 1; padding: 8px 4px; border-radius: 999px; border: 1.5px solid #DEE1EF; background: var(--bg); color: var(--ink-light); font-size: 12px; font-weight: 700; white-space: nowrap; }
.set-opts button.active { border-color: var(--orange); background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; }
/* 设置弹窗内「再拼写 N 次」的次数输入行 */
.set-n-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-light); }
.set-n-row input { width: 60px; padding: 6px 8px; border: 1.5px solid #DEE1EF; border-radius: 8px; font-size: 14px; font-weight: 700; text-align: center; color: var(--ink); background: #fff; }

/* ================= 用户系统（登录/注册弹窗 + 我的页按钮） ================= */
.auth-input { width: 100%; border: 2px solid #E4E9F0; outline: none; background: #fff; border-radius: 12px; padding: 11px 12px; font-size: 14px; margin-bottom: 10px; color: var(--ink); }
.auth-input:focus { border-color: var(--orange); }
.au-tabs { display: flex; background: #DEE0EE; border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.au-tab { flex: 1; text-align: center; font-size: 13px; font-weight: 600; padding: 7px 0; border-radius: 999px; color: var(--ink-light); }
.au-tab.active { background: #fff; color: var(--orange-deep); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.au-code-row { display: flex; gap: 8px; align-items: center; }
.au-code-row .auth-input { flex: 1; margin-bottom: 10px; }
.au-send { flex-shrink: 0; border: 2px solid var(--orange); color: var(--orange-deep); border-radius: 12px; padding: 9px 12px; font-size: 12px; font-weight: 700; background: #fff; margin-bottom: 10px; white-space: nowrap; }
.au-send:disabled { border-color: #C4C6D6; color: var(--ink-light); }
.au-send:active:not(:disabled) { transform: scale(.96); }
.mine-login { background: #fff; color: var(--orange-deep); border: 2px solid rgba(255,255,255,.6); border-radius: 999px; padding: 8px 22px; font-size: 13px; font-weight: 700; }
.mine-logout { background: rgba(255,255,255,.22); color: #fff; border-radius: 999px; padding: 8px 22px; font-size: 13px; font-weight: 700; }

/* 空状态 */
.empty { text-align: center; padding: 60px 30px; color: var(--ink-light); font-size: 14px; }
.empty .em { font-size: 50px; display: block; margin-bottom: 12px; opacity: .7; }

/* CSV 导入 */
.import-box { margin: 0 16px; background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--card-shadow); }
.import-zone { border: 2px dashed #E3CFAe; border-radius: 14px; padding: 28px 14px; text-align: center; color: var(--ink-light); font-size: 13px; }
.import-zone .em { font-size: 36px; display: block; margin-bottom: 8px; }
.import-name { margin-top: 10px; }
.import-name input { width: 100%; border: none; outline: none; background: var(--cream); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-top: 6px; }
.csv-help { font-size: 11px; color: var(--ink-light); line-height: 1.8; margin-top: 10px; background: var(--cream); padding: 10px 12px; border-radius: 10px; text-align: left; }
.csv-help code { background: #fff; padding: 1px 5px; border-radius: 4px; font-size: 10px; }

/* 下载发音进度 */
.dl-progress { margin: 0 16px 12px; background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--card-shadow); }
.dl-bar { height: 8px; background: var(--cream); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.dl-bar-fill { height: 100%; background: linear-gradient(90deg, var(--orange), var(--green)); border-radius: 999px; transition: width .3s; }

/* 每日一词 / 发现 等简单页 */
.simple-page { padding: 24px 20px; text-align: center; }
.simple-page .em { font-size: 56px; }
.simple-page h3 { margin: 14px 0 8px; font-size: 18px; }
.simple-page p { font-size: 13px; color: var(--ink-light); line-height: 1.8; }

/* 斩词动画标记 */
.chop-fly { position: fixed; top: 40%; left: 50%; transform: translate(-50%,-50%); z-index: 300; font-size: 60px; animation: chopFly 1s forwards; pointer-events: none; }
@keyframes chopFly { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.3) rotate(-30deg); } 30% { opacity: 1; transform: translate(-50%,-50%) scale(1.25) rotate(8deg); } 100% { opacity: 0; transform: translate(-50%,-80%) scale(1) rotate(0); } }

/* 滚动条隐藏（地图页） */
.map-scroll::-webkit-scrollbar { width: 0; }

@media (max-width: 350px) {
  .word-text { font-size: 32px; }
  .kb-key { max-width: 31px; height: 46px; font-size: 19px; }
  .kb-fn { max-width: 44px; height: 46px; font-size: 13px; }
}

/* ================= 选择词库（单词鸭式封面网格） ================= */
.chip-row { display: flex; gap: 8px; margin: 0 16px 12px; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; background: #fff; color: var(--ink-light); font-size: 13px; font-weight: 600; box-shadow: var(--card-shadow); }
.chip.active { background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; }

.lib-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 16px 14px; }
.lib-card { background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 14px 10px 12px; text-align: center; position: relative; border: 2px solid transparent; }
.lib-card:active { transform: scale(.97); }
.lib-card.active { border-color: var(--orange); background: #F5F6FB; }
.lib-card-cover { width: 64px; height: 84px; margin: 0 auto; border-radius: 10px; background: linear-gradient(160deg, #FFD591, var(--orange)); display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35), 0 4px 10px rgba(91, 70, 229,.25); }
.lib-card-name { font-size: 13px; font-weight: 700; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-card-sub { font-size: 10px; color: var(--ink-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-card-bar { height: 6px; background: var(--cream); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.lib-card-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--green)); border-radius: 999px; }
/* 词库页 · 单词列表（参考单词鸭词库列表） */
.cover-seg { display: flex; gap: 8px; margin: 0 16px 10px; }
.cover-seg button { flex: 1; padding: 10px 0; border-radius: 12px; font-size: 13px; font-weight: 800; background: #fff; color: var(--ink-light); border: 1.5px solid var(--cream-deep); }
.cover-seg button.on { background: var(--orange); color: #fff; border-color: var(--orange); }
.filter-tabs { display: flex; gap: 6px; margin: 0 16px 8px; overflow-x: auto; }
.filter-tabs button { flex-shrink: 0; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #fff; color: var(--ink-light); border: 1.5px solid transparent; }
.filter-tabs button.on { background: #EEECFF; color: var(--orange-deep); border-color: var(--orange); }
.lib-word-count { margin: 0 16px 10px; font-size: 12px; color: var(--ink-light); }
.lib-word-list { display: flex; flex-direction: column; gap: 10px; margin: 0 16px 14px; }
.lib-word-card { background: #fff; border-radius: 16px; box-shadow: var(--card-shadow); padding: 16px 16px 16px; display: flex; align-items: center; gap: 12px; }
.lib-word-card .lwc-main { flex: 1; min-width: 0; }
.lib-word-card .lwc-word { font-size: 26px; font-weight: 800; color: var(--ink); text-transform: lowercase; }
.lib-word-card .lwc-phon { font-size: 13px; color: var(--ink-light); margin-top: 2px; }
.lib-word-card .lwc-cn { font-size: 15px; color: var(--ink); margin-top: 6px; }
.lib-word-card .lwc-st { font-size: 11px; font-weight: 700; margin-top: 8px; }
.lib-word-card .lwc-st.st-new { color: #A3A8BD; }
.lib-word-card .lwc-st.st-learning { color: var(--orange-deep); }
.lib-word-card .lwc-st.st-chopped { color: var(--green-deep); }
.lib-word-card .lwc-play { width: 44px; height: 44px; border-radius: 50%; background: var(--cream); font-size: 18px; flex-shrink: 0; }
.lib-word-card.cm-front .lwc-word, .lib-word-card.cm-front .lwc-phon { color: transparent; text-shadow: 0 0 0 rgba(0,0,0,.35); }
.lib-word-card.cm-back .lwc-cn { color: transparent; text-shadow: 0 0 0 rgba(0,0,0,.35); }
.btn-ghost.mini { padding: 5px 12px; font-size: 12px; border-radius: 999px; background: #EEECFF; color: var(--orange-deep); }

/* 词库详情 / 单元页 · 筛选控件 */
.lib-filter-row { display: flex; gap: 8px; margin: 0 16px 10px; }
.lib-filter-row select {
  flex: 1; min-width: 0; padding: 9px 10px; border-radius: 12px; font-size: 13px; font-weight: 700;
  background: #fff; color: var(--ink); border: 1.5px solid var(--cream-deep); -webkit-appearance: none; appearance: none;
}
.unit-filter-row { display: flex; align-items: center; gap: 8px; margin: 0 16px 8px; }
.unit-filter-row .filter-tabs { margin: 0; flex: 1; }
.unit-sort {
  flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; font-size: 13px; font-weight: 800;
  background: #fff; color: var(--ink-light); border: 1.5px solid var(--cream-deep);
}
.lesson-item { cursor: pointer; }
.lesson-item:active { background: #F5F6FB; }
.lib-word-card[data-wid] { cursor: pointer; }
.lib-word-card[data-wid]:active { transform: scale(.99); }

@media print {
  html, body, .app-shell, .view-container { height: auto !important; overflow: visible !important; }
  body.printing-word-list * { visibility: hidden !important; height: auto; }
  body.printing-word-list #lib-word-list, body.printing-word-list #lib-word-list *,
  body.printing-word-list #unit-list, body.printing-word-list #unit-list * { visibility: visible !important; }
  body.printing-word-list #lib-word-list, body.printing-word-list #unit-list { position: absolute; left: 0; top: 0; width: 100%; }
}
.lib-card-tag { position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 700; background: #EEECFF; color: #B8860B; border-radius: 999px; padding: 2px 8px; }
.lib-card-tag.using { background: var(--green); color: #fff; }
.lib-card-tag.fav { left: auto; right: 10px; background: #EEECFF; }

/* ================= 选择关卡（单词鸭式关卡网格） ================= */
.lv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 16px 16px; }
.lv-cell { background: #fff; border-radius: 16px; box-shadow: var(--card-shadow); padding: 14px 4px 10px; text-align: center; }
.lv-cell:active { transform: scale(.96); }
.lvc-no { font-size: 22px; font-weight: 800; font-family: "DIN Alternate", "Segoe UI", sans-serif; }
.lvc-tag { font-size: 11px; font-weight: 700; margin-top: 3px; color: var(--ink-light); }
.lvc-sub { font-size: 10px; color: var(--ink-light); margin-top: 2px; }
.lv-cell.done .lvc-no { color: var(--green); }
.lv-cell.done .lvc-tag { color: var(--green-deep); }
.lv-cell.cur { background: linear-gradient(160deg, #9A86F5, var(--orange-deep)); }
.lv-cell.cur .lvc-no, .lv-cell.cur .lvc-sub { color: #fff; }
.lv-cell.cur .lvc-tag { color: #E4E1FF; }
.lv-cell.lock { background: #DDDEEC; box-shadow: none; }
.lv-cell.lock .lvc-no { color: #B8BDD3; }
.lv-cell.lock .lvc-sub { visibility: hidden; }

/* ================= 背一背（单词鸭式快背模式） ================= */
.recite-count-row { display: flex; align-items: center; gap: 10px; margin: 4px 16px 0; }
.recite-count-row .recite-progress { flex: 1; margin: 0; }
/* 卡片上方左右半透明数字：左=不认识次数（红），右=认识次数（绿） */
.rc-num { font-size: 26px; font-weight: 800; opacity: .4; min-width: 22px; text-align: center; font-family: "DIN Alternate", "Segoe UI", sans-serif; line-height: 1; }
.rc-num.no { color: var(--red); }
.rc-num.yes { color: var(--green); }
.recite-progress { height: 6px; margin: 4px 16px 0; background: var(--cream); border-radius: 999px; overflow: hidden; }
.recite-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange), var(--green)); transition: width .3s; border-radius: 999px; }
.recite-card { margin: 12px 16px 10px; background: #fff; border-radius: 24px; box-shadow: 0 4px 16px rgba(31,45,61,.08); padding: 22px 20px 64px; min-height: 320px; text-align: center; animation: cardIn .3s ease; position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
/* 拖动印章：左滑不认识 / 右滑认识，随拖动距离淡入 */
.rc-stamp { position: absolute; top: 14px; z-index: 2; font-size: 14px; font-weight: 800; border-radius: 10px; padding: 4px 12px; border: 2.5px solid; opacity: 0; pointer-events: none; transition: opacity .1s; }
.rc-stamp.no { left: 14px; color: var(--red); border-color: var(--red); background: #FFEBE9; transform: rotate(-8deg); }
.rc-stamp.yes { right: 14px; color: var(--green-deep); border-color: var(--green); background: #E6F7EE; transform: rotate(8deg); }
/* 卡片 3D 翻转：正面=测试卡（单词），背面=官方例句释义卡 */
.rc-inner { display: flex; flex-direction: column; position: relative; min-height: 244px; }
/* 2D 换面方案（不依赖 preserve-3d/backface-visibility，全引擎可靠）：
 * 背面默认 display:none；.flipped 时切换两面显示；.flipping 播放 scaleX 翻页动画 */
.rc-face { display: flex; flex-direction: column; flex: 1; }
.rc-dict { display: none; overflow-y: auto; padding-bottom: 6px; }
.rc-inner.flipped .rc-front { display: none; }
.rc-inner.flipped .rc-dict { display: flex; }
@keyframes rcFlip { 0% { transform: scaleX(1); } 50% { transform: scaleX(0); } 100% { transform: scaleX(1); } }
.rc-inner.flipping { animation: rcFlip .36s ease; }
.rc-count { font-size: 12px; color: var(--ink-light); font-weight: 600; }
.recite-card .word-text { font-size: 44px; margin-top: 12px; }
.rc-tap { margin-top: auto; padding-top: 16px; font-size: 12px; color: #B8BDD3; }

/* ================= 背一背页 v2（记忆卡 UI，浅灰白底） ================= */
.rc-page { background: #F3F5F8; min-height: calc(var(--app-h, 100dvh) - 90px); }
.rc-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px; gap: 8px; }
.rc-back-btn { width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 22px; font-weight: 700; line-height: 1; box-shadow: 0 2px 8px rgba(31,45,61,.1); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.rc-back-btn:active { transform: scale(.92); }
.rc-topmid { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rc-title { font-size: 12px; color: var(--ink-light); font-weight: 600; }
.rc-prog-no { font-size: 14px; font-weight: 700; color: var(--ink); }
.rc-prog-no b { color: var(--orange-deep); font-size: 18px; }
.rc-topright { display: flex; align-items: center; gap: 6px; }
.rc-topright .icon-btn { width: 32px; height: 32px; font-size: 14px; box-shadow: 0 2px 8px rgba(31,45,61,.08); }
/* 撤销按钮 + 绿色计数徽章 */
.rc-undo { display: flex; align-items: center; gap: 5px; background: #fff; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; color: var(--ink); box-shadow: 0 2px 8px rgba(31,45,61,.08); }
.rc-undo b { background: var(--green); color: #fff; border-radius: 999px; padding: 0 7px; font-size: 11px; min-width: 16px; height: 16px; line-height: 16px; display: inline-block; text-align: center; }
/* 卡片顶部双 Tab（官方例句/报错举报 · 三方词典/我的笔记） */
.rc-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.rc-tab { font-size: 12px; font-weight: 600; color: var(--ink-light); background: #F1F3F6; border-radius: 999px; padding: 5px 14px; }
.rc-tab.active { background: var(--ink); color: #fff; }
/* 单词区：绿色大标题 + 美音标签（垂直节奏均匀） */
.rc-word { display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.rc-word-text { font-size: 42px; font-weight: 800; color: var(--green-deep); letter-spacing: 1px; line-height: 1.2; }
.rc-us { font-size: 11px; background: #EDF3FF; color: var(--blue); border-radius: 4px; padding: 1px 5px; font-weight: 600; }
.rc-phon { font-size: 15px; color: var(--ink-light); font-family: "Segoe UI", "Lucida Sans Unicode", sans-serif; }
.rc-word-sub { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; }
.rc-meaning { text-align: center; font-size: 20px; font-weight: 700; color: var(--ink); margin-top: 14px; }
.rc-meaning .word-pos { margin-right: 6px; }
/* 虚线例句区块：橙高亮例句 + 小图标 + 中文翻译（无例句整块不渲染） */
.rc-example { border: 2px dashed #C9D4E0; border-radius: 14px; padding: 12px 14px 10px; margin-top: 16px; background: #FBFCFE; text-align: left; }
.rc-ex-en { font-size: 15px; line-height: 1.6; color: var(--ink); }
.rc-ex-en b { color: var(--orange-deep); font-weight: 800; }
/* 例句音频图标行：🔊 播放 / 🐌 慢速 / 🎤 跟读 */
.rc-ex-icons { display: flex; gap: 14px; margin: 8px 0 2px; }
.rc-ex-icon { width: 32px; height: 32px; border-radius: 50%; background: #FFF3E0; border: 1.5px solid #FFE1B8; font-size: 15px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .12s; }
.rc-ex-icon:active { transform: scale(.9); }
.rc-ex-icons { display: flex; gap: 10px; margin: 8px 0 6px; }
.rc-mini { width: 30px; height: 30px; border-radius: 50%; background: #EDF3FF; color: #3E8EF7; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.rc-mini:active { transform: scale(.92); }
.rc-ex-cn { font-size: 12px; color: var(--ink-light); line-height: 1.6; }
/* 豆包引擎标签：例句框左下方（流内布局，不挤压例句框） */
.rc-engine-row { display: flex; justify-content: flex-start; margin-top: 12px; }
.rc-engine { display: flex; align-items: center; gap: 5px; background: #F1F3F6; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 700; color: var(--ink-light); }
.rc-engine:active { transform: scale(.95); }
.rc-eng-dot { width: 7px; height: 7px; border-radius: 50%; background: #C4CBD4; flex-shrink: 0; }
.rc-eng-dot.on { background: var(--green); box-shadow: 0 0 4px rgba(76,193,126,.8); }
/* 卡片左下喇叭 / 右下爱心（固定角标，两面均可见） */
.rc-corner-l, .rc-corner-r { position: absolute; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 1.5px solid #D8DEE6; color: #6B7A8C; box-shadow: 0 2px 8px rgba(31,45,61,.08); z-index: 3; cursor: pointer; padding: 0; transition: background .15s, color .15s, box-shadow .15s, transform .08s; -webkit-tap-highlight-color: transparent; }
.rc-corner-l { left: 16px; }
.rc-corner-r { right: 16px; }
.rc-corner-l svg, .rc-corner-r svg { width: 20px; height: 20px; display: block; }
.rc-corner-l:hover, .rc-corner-r:hover { background: #F3F6FB; color: #3A4A5C; }
.rc-corner-l:active, .rc-corner-r:active { transform: translateY(1px) scale(.96); box-shadow: 0 1px 3px rgba(31,45,61,.08); }
.rc-corner-r.faved { color: #FF6B9D; border-color: #FFC3D5; }
/* 认识 / 不认识 圆钮：紧挨左下喇叭 / 右下爱心，替代不好用的滑动 */
.rc-judge { position: absolute; bottom: 14px; width: 44px; height: 44px; border-radius: 50%; z-index: 3;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900;
  border: 2px solid; box-shadow: 0 3px 10px rgba(31,45,61,.12); cursor: pointer; padding: 0;
  -webkit-tap-highlight-color: transparent; transition: transform .08s; }
.rc-judge:active { transform: scale(.9); }
.rc-judge.no { left: 64px; color: #FF6B5E; border-color: #FFC9C3; background: #FFF3F1; }
.rc-judge.yes { right: 64px; color: #2FA863; border-color: #B9E6CC; background: #EDFAF2; }
@media (max-width: 360px) { .rc-judge { width: 40px; height: 40px; } .rc-judge.no { left: 58px; } .rc-judge.yes { right: 58px; } }
/* 浅灰底页面内的功能按钮：白色浅边框 */
.rc-page .func-btn { background: #fff; border: 1.5px solid #E4E9F0; box-shadow: none; }
.rc-page .mode-btn { background: #fff; border: 1.5px solid #E4E9F0; box-shadow: none; }
.rc-page .mode-btn.active { background: #F5F6FB; border-color: var(--orange); color: var(--orange-deep); }
/* 音节拆分：单词内音节分隔点 + 音节块（上字母下近似发音） */
.rc-syl-dot { color: #B8BDD3; font-weight: 800; padding: 0 1px; }
.syl-blocks { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 20px; }
.syl-block { min-width: 78px; padding: 9px 18px 8px; border-radius: 12px; color: #fff; display: flex; flex-direction: column; align-items: center; box-shadow: 0 3px 8px rgba(31,45,61,.18); }
.syl-block:active { transform: scale(.94); }
.syl-g { font-size: 17px; font-weight: 800; letter-spacing: 1px; line-height: 1.2; }
.syl-p { font-size: 13px; font-weight: 600; border-top: 1.5px solid rgba(255,255,255,.7); margin-top: 3px; padding-top: 3px; min-width: 44px; text-align: center; }
/* 自然拼读：字母组合 → 发音 chips */
.gph-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 20px; }
/* 音素卡片：白底卡片，彩色字母块在上、深色音素在下、中间分隔线 */
.gph-chip { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 12px 14px 10px; border-radius: 14px; background: #fff; border: 2px solid #EEF2F7; box-shadow: 0 2px 8px rgba(30,50,90,.05); transition: border-color .15s, box-shadow .15s; cursor: pointer; }
.gph-chip:active { transform: scale(.94); }
/* 点击/自动播放高亮：橙色外框（对齐新设计图） */
.gph-chip.active { border-color: #FF9500; box-shadow: 0 4px 14px rgba(255,149,0,.22); }
.gph-g { font-size: 20px; font-weight: 800; color: #3E97F5; line-height: 1.2; }
/* 自然拼读配色：辅音蓝 / 元音橙 / 哑音灰 */
.gph-g.con { color: #3E97F5; }
.gph-g.vow { color: #FF7A18; }
.gph-g.silent { color: #B9C2CC; }
.gph-p { font-size: 15px; font-weight: 600; color: #4A5568; border-top: 1.5px solid #E4E9F0; margin-top: 6px; padding-top: 6px; min-width: 40px; text-align: center; }
/* 自然拼读大词着色（辅音蓝/元音橙/哑音灰） */
.ph-con { color: #3E97F5; }
.ph-vow { color: #FF7A18; }
.ph-silent { color: #B9C2CC; }
/* 自动拼读按钮 */
.phonic-auto-row { text-align: center; margin-top: 18px; }
.phonic-auto-btn { padding: 9px 22px; border-radius: 12px; font-size: 14px; font-weight: 700; border: 2px solid #F5A623; background: #FFF6EA; color: #E8890C; cursor: pointer; transition: background .15s; }
.phonic-auto-btn:active { transform: scale(.95); background: #FFEED6; }
/* 背面（三方词典）：Tab 固定在顶部，单词垂直居中于剩余区域 */
/* 背面（三方词典）：Tab 固定在顶部，单词垂直居中于剩余区域 */
.rc-dict { justify-content: flex-start; }
.rc-dict .rc-word { margin-top: 48px; }
.rc-dict .rc-tap { margin-top: auto; }
.rc-dict-img { display: block; width: 148px; height: 148px; object-fit: cover; border-radius: 16px;
  margin: 26px auto 0; background: #e3e4f0; box-shadow: 0 6px 18px rgba(27, 31, 58,.16); }
.rc-dict-img + .rc-word { margin-top: 16px; }
/* 底部水印 */
.rc-mark { text-align: center; font-size: 11px; color: #B7C0CC; padding: 16px 0 12px; }

/* ================= 单元页（词书单词列表 · 遮盖/排序/过滤） ================= */
.unit-page { padding-bottom: calc(var(--tabbar-h) + 88px); }
#lib-body { padding-bottom: calc(var(--tabbar-h) + 88px); }
/* 面包屑：词库名 › Lesson 范围（点击范围弹选择窗） */
.unit-crumb { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.unit-crumb .crumb-lib { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-crumb .crumb-sep { color: var(--ink-light); }
.unit-crumb .crumb-scope { font-size: 14px; font-weight: 800; color: var(--orange-deep); background: var(--cream); border-radius: 999px; padding: 6px 12px; white-space: nowrap; }
.unit-crumb .crumb-scope:active { transform: scale(.95); }
/* 工具区：遮盖 / 排序 按钮 + 状态过滤 chips */
.unit-toolbar { margin: 6px 0 0; }
.unit-tool-row { display: flex; gap: 10px; padding: 0 16px; }
.unit-tool { flex: 1; background: #fff; border-radius: 12px; padding: 11px 12px; font-size: 13px; font-weight: 700; color: var(--ink); box-shadow: var(--card-shadow); }
.unit-tool:active { transform: scale(.97); }
.unit-count { margin: 10px 16px 8px; font-size: 12px; color: var(--ink-light); font-weight: 600; }
/* 单词行：已斩绿色底 + 掌握标绿 */
.unit-row { gap: 8px; }
.unit-row.is-chopped { background: #EAF9F0; }
.w-text { font-size: 16px; font-weight: 700; }
.w-text.mastered { color: var(--green-deep); }
/* 行内操作按钮（喇叭 / 爱心 / 斩词·恢复） */
.unit-row .round-btn { flex-shrink: 0; font-size: 15px; width: 34px; height: 34px; background: var(--cream); }
.unit-row .round-btn svg { display: block; }
.unit-row .round-btn.faved { background: #FFE3E8; color: #FF6B9D; }
.unit-chop-btn { flex-shrink: 0; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 7px 12px; color: #fff; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); }
.unit-chop-btn:active { transform: scale(.94); }
.unit-chop-btn.restore { background: #fff; color: var(--green-deep); border: 1.5px solid #B7E6CC; }
/* 遮盖模式：灰条遮住内容，点按临时显示（CSS 类切换，不重渲染列表） */
.unit-row .masked { position: relative; }
.unit-row .masked > * { visibility: hidden; }
.unit-row .masked::after { content: ""; position: absolute; inset: 0; background: #D9DAEA; border-radius: 6px; }
.unit-row .masked.peek > * { visibility: visible; }
.unit-row .masked.peek::after { display: none; }
/* 范围弹窗的连续区间选择行 */
.scope-range { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 6px; }
.scope-range select { font-size: 14px; font-weight: 700; padding: 8px 10px; border-radius: 10px; border: 1.5px solid var(--cream-deep); background: var(--cream); color: var(--ink); }

/* ================= 豆包老师 · AI 讲解卡片 ================= */
.db-card { display: flex; flex-direction: column; align-items: stretch; text-align: left; margin-top: 6px; }
.db-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.db-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(160deg, #B18CFF, #7B5CFF); display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 4px 12px rgba(123,92,255,.3); flex-shrink: 0; }
.db-name { font-size: 17px; font-weight: 800; color: var(--ink); }
.db-sub { font-size: 12px; color: var(--ink-light); margin-top: 1px; }
/* 模型切换（轻量版/高级版）+ 来源模型灰字标注：背一背/学练一体两处卡片共用 */
.db-head-info { flex: 1; min-width: 0; }
.db-model-src { font-size: 10px; color: #A0A2BD; margin-top: 2px; letter-spacing: .2px; }
.db-model-switch { display: inline-flex; background: #E8E8F2; border-radius: 999px; padding: 2px; gap: 2px; flex-shrink: 0; }
.db-model-switch button { border: none; background: transparent; font-size: 11px; padding: 3px 10px; border-radius: 999px; color: var(--ink-light); cursor: pointer; }
.db-model-switch button.active { background: #fff; color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.db-model-row { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
.db-body { min-height: 150px; max-height: 300px; overflow-y: auto; background: #F7F8FC; border: 1.5px solid #ECEDF5; border-radius: 14px; padding: 12px 12px; font-size: 15px; line-height: 1.85; color: var(--ink); white-space: normal; }
.db-thinking { color: var(--ink-light); font-size: 14px; animation: dbBlink 1.2s ease-in-out infinite; }
@keyframes dbBlink { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
.db-err { color: #E4572E; font-size: 14px; text-align: center; padding: 8px 0; }
.db-retry { display: block; margin: 8px auto 0; padding: 8px 20px; border-radius: 12px; border: 1.5px solid var(--orange); background: #FFF6EA; color: var(--orange-deep); font-size: 13px; font-weight: 700; cursor: pointer; }
.db-play { margin-top: 14px; align-self: center; padding: 11px 26px; border-radius: 999px; border: none; background: linear-gradient(135deg, #8A6DFF, #6A4DFF); color: #fff; font-size: 15px; font-weight: 700; box-shadow: 0 6px 16px rgba(106,77,255,.32); cursor: pointer; transition: transform .12s, opacity .12s; }
.db-play:active:not(:disabled) { transform: scale(.95); }
.db-play:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* 豆包老师 · 聊天气泡（模拟豆包：AI 左白底 / 用户右紫底） */
.db-msg { max-width: 92%; margin-bottom: 10px; padding: 9px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.8; word-break: break-word; }
.db-msg:last-child { margin-bottom: 0; }
.db-ai { margin-right: auto; background: #fff; border: 1.5px solid #ECEDF5; border-top-left-radius: 4px; color: var(--ink); }
.db-user { margin-left: auto; background: linear-gradient(135deg, #8A6DFF, #6A4DFF); border-top-right-radius: 4px; color: #fff; }

/* 豆包老师 · 底部输入行（圆角输入框 + 圆形发送钮） */
.db-input-row { display: flex; gap: 8px; margin-top: 10px; }
.db-input { flex: 1; min-width: 0; padding: 10px 16px; border: 1.5px solid #E4E6F0; border-radius: 999px; background: #F7F8FC; font-size: 14px; color: var(--ink); outline: none; transition: border-color .15s, background .15s; }
.db-input:focus { border-color: #8A6DFF; background: #fff; }
.db-input:disabled { opacity: .6; }
.db-send { width: 42px; height: 42px; flex-shrink: 0; border: none; border-radius: 50%; background: linear-gradient(135deg, #8A6DFF, #6A4DFF); color: #fff; font-size: 16px; cursor: pointer; box-shadow: 0 4px 12px rgba(106,77,255,.3); transition: transform .12s, opacity .12s; }
.db-send:active:not(:disabled) { transform: scale(.92); }
.db-send:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* 按住说话圆钮 */
.db-mic { width: 42px; height: 42px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1.5px solid #E4E6F0; border-radius: 50%; background: #F7F8FC; color: #6A4DFF; cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; transition: transform .12s, background .12s, color .12s, box-shadow .12s; }
.db-mic:disabled { opacity: .5; cursor: not-allowed; }
.db-mic.rec { background: linear-gradient(135deg, #FF6B5E, #F5385D); border-color: transparent; color: #fff; box-shadow: 0 0 0 6px rgba(245,56,93,.18); animation: dbMicPulse 1s ease-in-out infinite; }
@keyframes dbMicPulse { 0%,100% { box-shadow: 0 0 0 5px rgba(245,56,93,.16); } 50% { box-shadow: 0 0 0 11px rgba(245,56,93,.05); } }
.db-mic-hint { margin-top: 6px; text-align: center; font-size: 12px; color: var(--ink-light); }
.db-mic-hint.cancel { color: #F5385D; font-weight: 700; }

/* ================= 学习设置：分组小标题 ================= */
.set-group-title { margin: 14px 16px 6px; font-size: 12px; font-weight: 800; color: var(--ink-light); letter-spacing: .5px; }
#mine-settings .setting-row, #mine-settings .set-group-title { margin-left: 4px; margin-right: 4px; }
#mine-settings .set-group-title:first-child { margin-top: 4px; }

/* ================= 飞行侠 · 单词拼写打字小游戏 ================= */
.fly-wrap { position: fixed; top: 0; bottom: 0; left: calc(50% + var(--shell-shift, 0px)); transform: translateX(-50%);
  width: min(100%, var(--center-w, 100%)); max-width: var(--sheet-max, 480px); display: flex; flex-direction: column;
  background: linear-gradient(180deg, #1f6f9c 0%, #123b57 60%, #0c2a3f 100%);
  color: #fff; z-index: 60; overflow: hidden; user-select: none; -webkit-user-select: none; }
.fly-hud { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.fly-back { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 22px; line-height: 1; }
.fly-title { font-size: 16px; font-weight: 800; letter-spacing: 1px; }
.fly-gold, .fly-hud > span { min-width: 36px; text-align: right; font-weight: 800; opacity: .9; }
.fly-timer { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fly-pause { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 16px; }

/* --- 开始页 --- */
.fly-start { padding-bottom: 24px; overflow-y: auto; }
.fly-panel { margin: 12px 16px; padding: 16px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.18); box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.fly-panel-h { text-align: center; font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.fly-seg { display: flex; gap: 8px; }
.fly-seg button { flex: 1; padding: 10px 0; border-radius: 12px; font-size: 14px; font-weight: 800;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); border: 1.5px solid transparent; }
.fly-seg button.on { background: #fff; color: #12405c; border-color: #fff; }
.fly-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; font-size: 15px; font-weight: 800; }
.fly-arrow { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 18px; }
.fly-toggle { margin-top: 10px; font-size: 14px; cursor: pointer; }
.fly-switch { width: 44px; height: 25px; border-radius: 999px; background: rgba(255,255,255,.25); position: relative; flex-shrink: 0; transition: background .2s; }
.fly-switch i { position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: left .2s; }
.fly-switch.on { background: #ffd36b; }
.fly-switch.on i { left: 22px; }
.fly-sample { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255,255,255,.25); }
.fly-sample-t { text-align: center; font-size: 12px; opacity: .8; margin-bottom: 10px; }
.fly-sample-body { display: flex; align-items: center; justify-content: center; gap: 16px; }
.fly-plane-mini { font-size: 40px; transform: rotate(135deg); filter: drop-shadow(0 6px 6px rgba(0,0,0,.3)); }
.fly-sample-card { background: rgba(255,255,255,.85); color: #123b57; border-radius: 10px; padding: 10px 14px; text-align: center; }
.fly-sample-q { font-size: 15px; font-weight: 800; }
.fly-sample-a { margin-top: 6px; font-size: 13px; letter-spacing: 3px; color: #6b8ea3; }
.fly-go { margin: 16px 16px 0; padding: 16px; border-radius: 16px; border: none;
  background: linear-gradient(180deg, #ffd36b, #f5a623); color: #5a3c00; font-size: 18px; font-weight: 900;
  display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.fly-go span { font-size: 11px; font-weight: 700; opacity: .8; }
.fly-ghost { margin: 10px 16px 0; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }

/* --- 游戏页（雷电式：飞机自顶部俯冲） --- */
.fly-sky { position: relative; flex: 1; min-height: 260px; margin: 0; overflow: hidden; }
.fly-plane { position: absolute; top: 0; left: 50%; margin-left: -23px; width: 46px; height: 46px;
  will-change: transform; transform: translate(0, 6px); transition: none; z-index: 4; }
.fly-plane-body { display: block; font-size: 44px; line-height: 46px; text-align: center; transform: rotate(135deg); }
.fly-plane.danger { animation: flyDive .28s infinite; }
.fly-plane.danger .fly-plane-body { filter: drop-shadow(0 0 12px #ff6b5e); }
.fly-plane.hit .fly-plane-body { font-size: 52px; filter: drop-shadow(0 0 16px #ffd36b); }
@keyframes flyDive { 0%,100%{ margin-left: -27px } 50%{ margin-left: -19px } }

.fly-danger-vignette { position: absolute; inset: 0; pointer-events: none; z-index: 3; opacity: 0;
  box-shadow: inset 0 0 60px 20px rgba(255,80,70,.55); transition: opacity .2s; }
.fly-danger-vignette.on { opacity: 1; animation: flyPulse .5s infinite; }
@keyframes flyPulse { 0%,100%{ opacity: .55 } 50%{ opacity: 1 } }

.fly-card { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); width: 78%; max-width: 300px;
  background: rgba(255,255,255,.95); color: #123b57; border-radius: 14px; padding: 14px 14px 16px; text-align: center;
  box-shadow: 0 10px 26px rgba(0,0,0,.32); }
.fly-card.threat { box-shadow: 0 0 0 3px #ff6b5e, 0 10px 26px rgba(0,0,0,.32); }
.fly-card.boom { animation: flyBoom .5s; }
@keyframes flyBoom { 0%,100%{ transform: translateX(-50%) } 25%{ transform: translate(-54%,4px) rotate(-2deg) } 65%{ transform: translate(-46%,4px) rotate(2deg) } }
.fly-turret { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); font-size: 20px; color: #f5a623;
  filter: drop-shadow(0 -2px 4px rgba(245,166,35,.6)); }
.fly-card-img { display: block; width: 92px; height: 92px; object-fit: cover; border-radius: 10px;
  margin: 0 auto 8px; background: #eef2f4; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.fly-card-img[hidden] { display: none; }   /* 配图提示关闭 / 无配图：整块不占位 */
.fly-q { font-size: 16px; font-weight: 800; min-height: 22px; }
.fly-slots { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 10px; }
.fly-slot { width: 22px; height: 30px; border-bottom: 3px solid #9db8c6; font-size: 20px; font-weight: 800; line-height: 30px; color: #123b57; text-transform: lowercase; }
.fly-slot.ok { color: #2FA863; border-color: #2FA863; }
.fly-slot.hint { color: #f5a623; border-color: #f5a623; }
.fly-slot.bad { animation: flyShake .22s; }
@keyframes flyShake { 0%,100%{ transform: translateX(0) } 33%{ transform: translateX(-4px) } 66%{ transform: translateX(4px) } }
.fly-bullet { position: absolute; width: 5px; height: 20px; margin-left: -2px; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ffd36b 45%, #7c66f0);
  box-shadow: 0 0 12px 2px rgba(255, 211, 107, .9), 0 0 26px 6px rgba(255, 157, 60, .35);
  transition: transform .18s linear, opacity .18s linear; z-index: 6; }
.fly-muzzle { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffd36b 40%, rgba(255, 157, 60, 0) 72%);
  animation: flyMuzzle .12s ease-out forwards; z-index: 6; pointer-events: none; }
@keyframes flyMuzzle { from { transform: scale(.4); opacity: 1 } to { transform: scale(1.6); opacity: 0 } }
.fly-burst { position: absolute; left: 50%; top: 20%; transform: translateX(-50%); font-size: 40px; color: #ffd36b; animation: flyBurst .5s ease-out forwards; z-index: 6; }
@keyframes flyBurst { from{ transform: translateX(-50%) scale(.3); opacity: 1 } to{ transform: translateX(-50%) scale(2.2); opacity: 0 } }

.fly-tools { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; }
.fly-tool { padding: 8px 16px; border-radius: 12px; background: rgba(255,255,255,.16); color: #fff; font-weight: 800; font-size: 14px; }
.fly-progress { font-weight: 800; font-variant-numeric: tabular-nums; opacity: .85; }

.fly-kb { margin: 0 6px 6px; background: #b9c6cd; }
.fly-kb .kb-key.in-word { background: #FBF3D5; border-color: #D5D9EA; box-shadow: 0 3px 0 #D5D9EA; }
.fly-kb .kb-key.flash { background: #cdefd7; border-color: #2FA863; box-shadow: 0 3px 0 #2FA863; }
.fly-kb .kb-key.flash-bad { background: #ffd6d2; border-color: #FF6B5E; box-shadow: 0 3px 0 #FF6B5E; }

.fly-mask { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  transition: opacity .18s; }
.fly-mask[hidden] { display: none; }
.fly-pausebox { width: 78%; max-width: 320px; background: #eef3f6; color: #123b57; border-radius: 16px; padding: 20px 16px; text-align: center; }
.fly-pause-h { font-size: 18px; font-weight: 900; }
.fly-pause-tip { margin: 10px 0 16px; font-size: 12px; color: #5b7180; line-height: 1.5; }
.fly-pause-btns { display: flex; gap: 8px; }
.fly-pause-btns button { flex: 1; padding: 12px 0; border-radius: 12px; font-weight: 800; font-size: 14px; background: #d5dfe4; color: #123b57; }
.fly-pause-btns button.main { background: linear-gradient(180deg, #ffd36b, #f5a623); color: #5a3c00; }

/* --- 战报页 --- */
.fly-report { text-align: center; }
.fly-report-h { font-size: 17px; font-weight: 900; margin-bottom: 14px; }
.fly-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.fly-grid div { background: rgba(255,255,255,.12); border-radius: 12px; padding: 12px 4px; }
.fly-grid b { display: block; font-size: 20px; font-weight: 900; }
.fly-grid span { font-size: 11px; opacity: .8; }

/* ================= 飞行侠 · 特效增强 ================= */
/* --- 动态天空：太阳光晕 + 三层视差流云（向上掠过，营造俯冲速度感） --- */
.fly-sky { background: radial-gradient(ellipse 120% 55% at 50% -8%, rgba(255, 244, 214, .16), transparent 62%); }
.fly-sun { position: absolute; top: -34px; right: -28px; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 170, .9) 0%, rgba(255, 211, 107, .38) 42%, rgba(255, 211, 107, 0) 70%);
  animation: flySunBreath 4s ease-in-out infinite; pointer-events: none; z-index: 1; }
@keyframes flySunBreath { 0%, 100% { transform: scale(1); opacity: .9 } 50% { transform: scale(1.12); opacity: 1 } }
/* 纯 CSS 云朵（无 emoji 依赖，颜色透明可控）：圆角长条 + 两个圆形云团 */
.fly-cloud { position: absolute; top: 108%; z-index: 1; pointer-events: none;
  width: 92px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, .9);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .12)); animation: flyCloudRise linear infinite; }
.fly-cloud::before, .fly-cloud::after { content: ''; position: absolute; border-radius: 50%; background: inherit; }
.fly-cloud::before { width: 38px; height: 38px; top: -17px; left: 15px; }
.fly-cloud::after  { width: 26px; height: 26px; top: -10px; right: 17px; }
.fly-cloud.c1 { left: 6%;  transform: scale(1);    opacity: .55; animation-duration: 17s; animation-delay: -3s; }
.fly-cloud.c2 { left: 58%; transform: scale(1.45); opacity: .38; animation-duration: 25s; animation-delay: -11s; }
.fly-cloud.c3 { left: 30%; transform: scale(.72);  opacity: .68; animation-duration: 13s; animation-delay: -7s; z-index: 7; }
.fly-cloud.c4 { left: 78%; transform: scale(.9);   opacity: .48; animation-duration: 20s; animation-delay: -15s; }
@keyframes flyCloudRise { from { top: 108% } to { top: -22% } }
/* 开始页 / 战报页装饰层 */
.fly-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.fly-deco .fly-cloud { top: 108%; }
.fly-start > :not(.fly-deco), .fly-over > :not(.fly-deco) { position: relative; z-index: 1; }
.fly-logo-plane { position: absolute; left: -60px; bottom: 12%; font-size: 42px; z-index: 2;
  transform: rotate(45deg); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3));
  animation: flyLogoFly 9s ease-in-out infinite; }
@keyframes flyLogoFly {
  0%   { left: -15%; bottom: 6%;  transform: rotate(35deg) scale(.8); opacity: 0 }
  8%   { opacity: 1 }
  46%  { left: 55%;  bottom: 46%; transform: rotate(45deg) scale(1) }
  60%  { left: 72%;  bottom: 58%; transform: rotate(55deg) scale(1.05); opacity: 1 }
  100% { left: 118%; bottom: 88%; transform: rotate(60deg) scale(1.1); opacity: 0 }
}
.fly-best { display: block; font-size: 11px; font-weight: 700; opacity: .78; margin-top: 4px; letter-spacing: 1px; }

/* --- HUD：计时 + 实时得分 --- */
.fly-hud-mid { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.fly-score { font-size: 12px; font-weight: 800; color: #ffd36b; letter-spacing: .5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .35); font-variant-numeric: tabular-nums; }

/* --- 连击徽章 --- */
.fly-combo { position: absolute; top: 10px; right: 12px; z-index: 10; padding: 6px 12px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 157, 60, .92), rgba(240, 110, 40, .92)); color: #fff;
  font-size: 13px; font-weight: 900; letter-spacing: .5px; box-shadow: 0 4px 12px rgba(240, 110, 40, .45);
  pointer-events: none; }
.fly-combo b { font-size: 16px; font-variant-numeric: tabular-nums; }
.fly-combo.pop { animation: flyComboPop .22s ease-out; }
.fly-combo.hot { background: linear-gradient(180deg, #ff7a3c, #e63e2e);
  box-shadow: 0 0 16px 4px rgba(255, 90, 40, .55), 0 4px 12px rgba(230, 62, 46, .5); }
@keyframes flyComboPop { 0% { transform: scale(1) } 45% { transform: scale(1.22) } 100% { transform: scale(1) } }

/* --- 飞机：引擎尾焰 + 双拖尾 --- */
.fly-flame { position: absolute; left: 50%; bottom: 86%; width: 10px; height: 20px; margin-left: -5px;
  border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: linear-gradient(180deg, #fff3c4 0%, #ffd36b 40%, #7c66f0 78%, rgba(255, 107, 94, 0) 100%);
  transform-origin: 50% 0; animation: flyFlame .14s ease-in-out infinite alternate; pointer-events: none; }
@keyframes flyFlame { from { transform: scaleY(.72) scaleX(1.1); opacity: .85 } to { transform: scaleY(1.15) scaleX(.9); opacity: 1 } }
.fly-trail { position: absolute; bottom: 92%; width: 3px; height: 52px; border-radius: 2px;
  background: linear-gradient(0deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, 0));
  animation: flyTrail .9s ease-in-out infinite alternate; pointer-events: none; }
.fly-trail.t1 { left: 34%; }
.fly-trail.t2 { left: 62%; animation-delay: -.45s; }
@keyframes flyTrail { from { opacity: .35; transform: scaleY(.82) } to { opacity: .8; transform: scaleY(1.05) } }
/* 飞机被子弹命中：抖动 + 闪白 */
.fly-plane.shot .fly-plane-body { animation: flyShot .16s linear; }
@keyframes flyShot {
  0%, 100% { transform: rotate(135deg) translateX(0); filter: brightness(1) }
  25% { transform: rotate(135deg) translateX(-3px); filter: brightness(2.4) drop-shadow(0 0 8px #fff) }
  60% { transform: rotate(135deg) translateX(3px); filter: brightness(1.7) }
}

/* --- 爆炸粒子：--dx/--dy 飞行方向与距离，--sz 尺寸；spark 为命中小火花 --- */
.fly-particle { position: absolute; width: var(--sz, 8px); height: var(--sz, 8px); border-radius: 50%;
  background: #ffd36b; box-shadow: 0 0 8px rgba(255, 211, 107, .8); z-index: 8; pointer-events: none;
  animation: flyParticle .7s cubic-bezier(.12, .62, .38, 1) forwards; }
.fly-particle.spark { background: #fff3c4; box-shadow: 0 0 6px rgba(255, 243, 196, .9);
  animation-duration: .38s; }
@keyframes flyParticle {
  from { transform: translate(0, 0) scale(1); opacity: 1 }
  to   { transform: translate(var(--dx), var(--dy)) scale(.12); opacity: 0 }
}

/* --- 飘字：得分 / PERFECT / 连击 --- */
.fly-float { position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%); z-index: 9;
  font-weight: 900; pointer-events: none; white-space: nowrap;
  animation: flyFloat .95s ease-out forwards; }
.fly-float.score   { font-size: 21px; color: #ffd36b; text-shadow: 0 2px 8px rgba(0, 0, 0, .45), 0 0 14px rgba(255, 211, 107, .5); }
.fly-float.perfect { bottom: 172px; font-size: 26px; color: #ffde59; letter-spacing: 2px;
  text-shadow: 0 0 16px rgba(255, 222, 89, .75), 0 3px 8px rgba(0, 0, 0, .4); }
.fly-float.combo   { bottom: 168px; font-size: 17px; color: #7fe3ff; text-shadow: 0 0 12px rgba(127, 227, 255, .6), 0 2px 6px rgba(0, 0, 0, .4); }
@keyframes flyFloat {
  0%   { transform: translateX(-50%) translateY(0) scale(.7); opacity: 0 }
  18%  { transform: translateX(-50%) translateY(-14px) scale(1.12); opacity: 1 }
  100% { transform: translateX(-50%) translateY(-62px) scale(1); opacity: 0 }
}

/* --- 屏幕震动（击落/被撞时，仅天空层） --- */
.fly-sky.shake { animation: flyShakeSky .3s linear; }
@keyframes flyShakeSky {
  0%, 100% { transform: translate(0, 0) }
  15% { transform: translate(-6px, 3px) } 30% { transform: translate(5px, -4px) }
  45% { transform: translate(-4px, -3px) } 60% { transform: translate(4px, 3px) }
  75% { transform: translate(-2px, 1px) }  90% { transform: translate(2px, -1px) }
}

/* --- 战报：总分 + 评级徽章 --- */
.fly-total { font-size: 38px; font-weight: 900; color: #ffd36b; line-height: 1.1; margin-bottom: 12px;
  text-shadow: 0 3px 10px rgba(0, 0, 0, .3); font-variant-numeric: tabular-nums; }
.fly-total span { display: block; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .85); margin-top: 2px; }
.fly-rank { width: 66px; height: 66px; margin: -38px auto 8px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 900;
  color: #5a3c00; background: linear-gradient(160deg, #ffe98a, #f5a623);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35), 0 0 0 4px rgba(255, 255, 255, .25);
  animation: flyRankPop .55s cubic-bezier(.2, 1.7, .4, 1) both .1s; }
.fly-rank.rank-S { background: linear-gradient(160deg, #fff3c4, #ffd36b 55%, #7c66f0); color: #7a4a00;
  box-shadow: 0 6px 22px rgba(255, 180, 60, .6), 0 0 0 4px rgba(255, 222, 89, .45); }
.fly-rank.rank-A { background: linear-gradient(160deg, #eaf6ff, #a9d4f5); color: #1c5d8f; }
.fly-rank.rank-B { background: linear-gradient(160deg, #ffe3c2, #e8a06a); color: #7a4415; }
.fly-rank.rank-C { background: linear-gradient(160deg, #e6ebee, #b8c4cc); color: #4a5b66; }
@keyframes flyRankPop { from { transform: scale(0) rotate(-30deg); opacity: 0 } to { transform: scale(1) rotate(0); opacity: 1 } }
.fly-report-time { margin-top: 10px; font-size: 12px; opacity: .75; }

/* ================= 词库 · AI 学习素材面板 ================= */
.asset-hint { font-size: 11px; font-weight: 600; color: var(--ink-light); margin-left: 6px; }
.asset-panel { margin: 0 16px 8px; background: #fff; border-radius: 14px; padding: 14px 16px; box-shadow: var(--card-shadow); }
.asset-loading { font-size: 13px; color: var(--ink-light); text-align: center; padding: 6px 0; }
.asset-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: var(--ink); }
.asset-row span { width: 62px; flex-shrink: 0; }
.asset-row b { width: 58px; text-align: right; font-variant-numeric: tabular-nums; color: var(--orange-deep); }
.asset-bar { flex: 1; height: 8px; border-radius: 999px; background: #DDDEEC; overflow: hidden; }
.asset-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--orange-light), var(--orange-deep)); transition: width .4s; }
.asset-bar.img i { background: linear-gradient(90deg, #7FC8A9, #2FA863); }
.asset-panel .btn-solid-orange { width: 100%; margin-top: 4px; }
.asset-panel .btn-solid-orange:disabled { opacity: .5; }
.asset-warn { font-size: 12px; color: var(--red); margin-bottom: 8px; }
.asset-tip { font-size: 11px; color: var(--ink-light); line-height: 1.6; margin-top: 8px; }
/* 网络热词（发现页） */
.tw-card { margin: 0 16px 10px; background: #fff; border-radius: 14px; box-shadow: var(--card-shadow); padding: 13px 15px; }
.tw-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tw-head b { font-size: 17px; color: var(--ink); }
.tw-head .word-pos { font-size: 11px; color: var(--ink-light); }
.tw-cn { font-size: 13px; color: var(--orange-deep); font-weight: 700; }
.tw-en { font-size: 13px; color: var(--ink); line-height: 1.7; margin-top: 6px; }
.tw-cn2 { font-size: 12px; color: var(--ink-light); line-height: 1.6; }
.tw-note { font-size: 12px; color: #2A6DB5; background: #F0F5FF; border-radius: 10px; padding: 8px 10px; margin-top: 8px; line-height: 1.6; }
.asset-queue { font-size: 11px; color: var(--orange-deep); background: #EEECFF; border-radius: 8px; padding: 5px 8px; margin-bottom: 8px; }

/* ================= AI 测评 · 本关试卷 ================= */
.exam-empty { text-align: center; padding: 14px 6px 4px; }
.exam-empty p { font-size: 13px; color: var(--ink-light); line-height: 1.8; margin: 10px 0 16px; }
.exam-progress { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--ink-light); margin-bottom: 12px; }
.exam-track { flex: 1; height: 6px; border-radius: 6px; background: #DDDEEC; overflow: hidden; }
.exam-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange-light), var(--orange-deep)); transition: width .3s; }
.exam-report { text-align: center; padding: 6px 2px 2px; }
.exam-grade { width: 76px; height: 76px; margin: 6px auto 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 900; color: #fff; }
.exam-grade.grade-S { background: linear-gradient(135deg, #FFD36B, #F5A623); }
.exam-grade.grade-A { background: linear-gradient(135deg, #7FD8A9, #2FA863); }
.exam-grade.grade-B { background: linear-gradient(135deg, #7FB3F5, #3E86D6); }
.exam-grade.grade-C { background: linear-gradient(135deg, #B1B3C8, #787CA2); }
.exam-score { font-size: 14px; font-weight: 700; color: var(--ink); }
.exam-score b { font-size: 22px; color: var(--orange-deep); }
.exam-allright { margin-top: 14px; font-size: 15px; font-weight: 700; color: var(--green-deep); }
.exam-wrong-h { text-align: left; font-size: 12px; font-weight: 800; color: var(--ink-light); margin: 16px 0 8px; }
.exam-wrong-list { text-align: left; display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow: auto; }
.exam-wrong-item { background: #F0F1F7; border-radius: 12px; padding: 10px 12px; }
.ewi-q { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.5; }
.ewi-a { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 12px; }
.ewi-bad { color: var(--red); }
.ewi-ok { color: var(--green-deep); }
.ewi-ex { font-size: 11px; color: var(--ink-light); margin-top: 5px; line-height: 1.6; }
.exam-nav { display: flex; gap: 10px; margin-top: 14px; }
.exam-nav .btn-ghost { flex: 0 0 96px; }
.exam-nav .btn-primary { flex: 1; }
.exam-nav .btn-ghost:disabled { opacity: .4; }

/* ================= 统一圆形图标按钮（白底 · 线稿 · 无文字）================= */
.ico-btn { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1.5px solid #D8DEE6; color: #6B7A8C;
  box-shadow: 0 2px 8px rgba(31,45,61,.08); cursor: pointer;
  transition: background .15s, color .15s, transform .08s; -webkit-tap-highlight-color: transparent; }
.ico-btn svg { width: 20px; height: 20px; display: block; }
.ico-btn:hover { background: #F3F6FB; color: #3A4A5C; }
.ico-btn:active { transform: translateY(1px) scale(.95); }
.ico-btn:disabled { opacity: .4; }
.ico-btn.ico-sm { width: 32px; height: 32px; }
.ico-btn.ico-sm svg { width: 17px; height: 17px; }
.ico-btn.ico-lg { width: 48px; height: 48px; }
.ico-btn.ico-lg svg { width: 24px; height: 24px; }
.ico-btn.on, .ico-btn.active { background: var(--cream-deep); color: var(--orange-deep); border-color: var(--orange); }
.ico-btn.accent { background: var(--orange); border-color: var(--orange-deep); color: #fff; box-shadow: 0 4px 12px rgba(91, 70, 229,.3); }
.exam-tag { font-style: normal; background: var(--cream-deep); color: var(--orange-deep); border-radius: 6px; padding: 1px 6px; font-size: 11px; font-weight: 800; }
.exam-img { display: block; width: 120px; height: 120px; object-fit: cover; border-radius: 12px; margin: 8px auto 2px; background: #e3e4f0; box-shadow: 0 4px 12px rgba(27, 31, 58,.14); }

.exam-wordcard { display: flex; gap: 12px; align-items: center; background: var(--cream); border-radius: 14px; padding: 12px; margin: 8px 0 4px; }
.exam-wordcard[hidden] { display: none; }
.ewc-img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: #e3e4f0; }
.ewc-body { min-width: 0; flex: 1; }
.ewc-w { font-size: 18px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.ewc-say { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--orange-deep); flex-shrink: 0; }
.ewc-say svg { width: 15px; height: 15px; }
.ewc-ph { font-size: 12px; color: var(--ink-light); margin-top: 2px; }
.ewc-cn { font-size: 13px; color: var(--ink); margin-top: 4px; }
.ewc-sent { font-size: 12px; color: var(--ink-light); margin-top: 4px; line-height: 1.5; }

/* ================= 豆包老师 · 端到端语音大模型聊天页 ================= */
.dlg-page {
  position: fixed; top: 0; bottom: var(--tabbar-h); left: calc(50% + var(--shell-shift, 0px)); transform: translateX(-50%);
  width: min(100%, var(--center-w, 100%)); max-width: var(--sheet-max, 480px); background: var(--bg);
  display: flex; flex-direction: column; overflow: hidden; z-index: 20;
}
.dlg-top { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.dlg-title { font-size: 17px; font-weight: 800; color: var(--ink); }
.dlg-top-actions { display: flex; align-items: center; gap: 8px; }
.dlg-scene-top { font-size: 18px; color: var(--orange-deep); }
.dlg-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 16px 4px; display: flex; flex-direction: column; gap: 8px; }
.dlg-msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.6; word-break: break-word; box-shadow: var(--card-shadow); }
.dlg-msg.ai { align-self: flex-start; background: #fff; color: var(--ink); border-bottom-left-radius: 5px; }
.dlg-msg.me { align-self: flex-end; background: linear-gradient(135deg, var(--orange), var(--orange-deep)); color: #fff; border-bottom-right-radius: 5px; }

.dlg-status { flex-shrink: 0; font-size: 12.5px; color: var(--ink-light); text-align: center; padding: 6px 16px 2px; min-height: 20px; }
@keyframes dlgStatusPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
.dlg-status.busy { color: var(--orange-deep); animation: dlgStatusPulse 1.1s ease-in-out infinite; }

.dlg-ctrl { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 8px 34px 18px; }
.dlg-mic {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 96px; height: 96px; border-radius: 50%; border: none; cursor: pointer; touch-action: none;
  -webkit-user-select: none; user-select: none;
  background: linear-gradient(160deg, #9A86F5, var(--orange-deep)); color: #fff;
  box-shadow: 0 8px 22px rgba(91, 70, 229,.42); transition: transform .12s, box-shadow .18s;
}
.dlg-mic svg { width: 30px; height: 30px; }
.dlg-mic span { font-size: 11px; font-weight: 700; }
.dlg-mic:active { transform: scale(.95); }
.dlg-mic:disabled { opacity: .55; }
.dlg-mic.rec { background: linear-gradient(160deg, #FF6B5E, #F5385D); box-shadow: 0 0 0 8px rgba(245,56,93,.16); animation: dlgMicPulse 1s ease-in-out infinite; }
@keyframes dlgMicPulse { 0%,100% { box-shadow: 0 0 0 7px rgba(245,56,93,.16); } 50% { box-shadow: 0 0 0 15px rgba(245,56,93,.04); } }
.dlg-ctrl .ico-btn.rec { background: #F5385D; border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(245,56,93,.4); animation: dlgMicPulse 1.1s ease-in-out infinite; }

.dlg-sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
.dlg-sheet {
  position: fixed; left: calc(50% + var(--shell-shift, 0px)); bottom: 0; transform: translateX(-50%);
  width: min(100%, var(--center-w, 100%)); max-width: var(--sheet-max, 480px); background: #fff; border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(18px + var(--inset-b)); z-index: 41; box-shadow: 0 -8px 30px rgba(0,0,0,.16);
}
.dlg-sheet-h { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.dlg-sheet-label { font-size: 12px; font-weight: 800; color: var(--ink-light); letter-spacing: .5px; margin: 6px 0; }
.dlg-preset { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.dlg-preset button { border: 1.5px solid #DEE1EF; background: #fff; color: var(--ink-light); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; }
.dlg-preset button.on { border-color: var(--orange); background: var(--cream-deep); color: var(--orange-deep); }
.dlg-switch-row { display: flex; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--ink); padding: 8px 0; }
.dlg-sheet-note { margin-top: 8px; font-size: 11.5px; color: var(--ink-light); line-height: 1.6; }

/* ================= 更换词库页 ================= */
.sw-mine { font-size: 13px; font-weight: 700; color: var(--orange-deep); flex-shrink: 0; }
.sw-wrap { display: flex; gap: 0; align-items: flex-start; }
.sw-side { flex: 0 0 84px; align-self: stretch; background: #E5E6F1; padding: 6px 0 40px; display: flex; flex-direction: column; }
.sw-cat { padding: 13px 6px; font-size: 13px; color: var(--ink-light); font-weight: 600; border-left: 3px solid transparent; text-align: center; background: none; }
.sw-cat.on { background: var(--bg); color: var(--orange-deep); font-weight: 800; border-left-color: var(--orange); }
.sw-main { flex: 1; min-width: 0; padding: 10px 14px 40px; }
.sw-banner { background: var(--cream); border-radius: 12px; padding: 10px 14px; font-size: 12.5px; color: var(--ink-light); }
.sw-banner b { color: var(--orange-deep); }
.sw-recent { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 12.5px; color: var(--ink); }
.sw-recent span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-histlist { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sw-histitem { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: var(--card-shadow); text-align: left; }
.sw-histitem small { color: var(--ink-light); font-weight: 400; flex-shrink: 0; }
.sw-main .lib-grid { margin: 10px 0 0; }

/* ================= 课程（课文精读）================= */
.course-head { margin: 12px 16px 6px; font-size: 12px; font-weight: 800; color: var(--ink-light); letter-spacing: .5px; }
.course-home-title { margin: 18px 18px 10px; display: flex; flex-direction: column; gap: 3px; text-align: left; color: var(--ink); }
.course-home-title b { font-size: 16px; font-weight: 800; }
.course-home-title small { font-size: 12px; font-weight: 500; color: var(--ink-light); }
.course-book-card.is-foreign .course-book-icon { background: #e9e6ff; color: #4b3fd8; }
.course-books { margin: 0 16px; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--card-shadow); }
.course-book-card { display: flex; align-items: center; width: 100%; min-height: 78px; padding: 12px 16px; border: 0; border-bottom: 1px solid #dbddec; background: #fff; color: var(--ink); text-align: left; }
.course-book-card:last-child { border-bottom: 0; }
.course-book-card:active { background: var(--cream); }
.course-book-icon { width: 40px; height: 40px; display: grid; place-items: center; margin-right: 12px; border-radius: 11px; background: #fff0d2; font-size: 23px; color: #35374c; }
.course-book-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.course-book-info b { font-size: 14px; }
.course-book-info small { color: var(--ink-light); font-size: 11px; }
.course-book-arrow { color: #8f92b2; font-size: 20px; }
.course-item { display: block; width: calc(100% - 32px); margin: 0 16px 10px; text-align: left; background: #fff; border-radius: 14px; box-shadow: var(--card-shadow); padding: 14px 16px; }
.course-item:active { transform: scale(.99); }
.course-item-t { font-size: 15px; font-weight: 700; color: var(--ink); }
.course-item-s { font-size: 11.5px; color: var(--ink-light); margin-top: 4px; }

/* 课程页顶部：下拉切换新概念四册 */
.course-book-sel { position: relative; flex: 1; margin-left: 6px; display: flex; align-items: center; }
.course-book-sel select {
  appearance: none; -webkit-appearance: none;
  width: 100%; padding: 8px 30px 8px 12px;
  font-size: 16px; font-weight: 800; color: var(--ink);
  background: #fff; border: 1.5px solid var(--cream-deep); border-radius: 12px;
  box-shadow: var(--card-shadow); outline: none; cursor: pointer;
}
.course-book-caret { position: absolute; right: 12px; color: var(--ink-light); font-size: 12px; pointer-events: none; }

.course-reader { position: fixed; inset: 0; left: calc(50% + var(--shell-shift, 0px)); transform: translateX(-50%); width: min(100%, var(--center-w, 100%)); max-width: var(--sheet-max, 480px); background: #fff; display: flex; flex-direction: column; z-index: 60; }
.course-reader .top-bar { flex-shrink: 0; border-bottom: 1px solid #DEE0EE; padding-left: 10px; padding-right: 10px; gap: 0; }   /* 右上角固定浮着 ⚡刷新、分享（嵌入实验室时还有「首页」）三个按钮，共占约 120px，再留 16px 余量；顶栏右侧的「A字 / 打字 / 设置」让开它们，不再被盖住 */
body.cr-active .hr-btn, body.cr-active .hr-share { display: none !important; }   /* 课文页的分享 / 刷新已内嵌进顶栏 */
.cr-topbtn.cr-ico { min-width: 40px; width: 40px; height: 34px; padding: 0; display: inline-grid; place-items: center; align-self: center; box-sizing: border-box; margin-left: 6px; text-decoration: none; }   /* 和 A字 / 打字 / 设置 同高同底色，顶栏里一排对齐 */
.cr-phint { margin: 12px 2px 4px; font-size: 12px; line-height: 1.5; color: var(--ink-light); }
.cr-topbtn.cr-ico svg { width: 17px; height: 17px; }
.course-reader .cr-topbtn { margin-left: 6px; }
.cr-topbtn { flex-shrink: 0; min-width: 40px; height: 34px; padding: 0 10px; border-radius: 10px; background: var(--cream); color: var(--ink); font-size: 14px; font-weight: 700; margin-left: 8px; }
.cr-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 30px; touch-action: pan-y; }   /* pan-y：竖向滚动交给浏览器，横向滑动留给逐句精听的左滑 / 右滑切句 */
.cr-title { font-size: calc(var(--course-fs) + 3px); font-weight: 800; color: var(--ink); margin-bottom: 8px; }
.cr-hint { background: #FFF8EE; border-radius: 8px; padding: 8px 12px; font-size: 11.5px; color: var(--ink-light); margin-bottom: 14px; }
.cr-line { padding: 9px 0; border-radius: 8px; }
.cr-line.cur { background: #FFF4E4; box-shadow: 0 0 0 8px #FFF4E4; }
.cr-en { display: block; font-size: var(--course-fs); line-height: 1.55; color: var(--ink); font-weight: 500; }
.cr-cn { display: block; font-size: calc(var(--course-fs) - 2px); line-height: 1.5; color: var(--ink-light); margin-top: 3px; }
.cr-line.cur .cr-en { color: var(--orange-deep); }
.course-reader[data-mode="en"] .cr-cn { display: none; }
.course-reader[data-mode="cn"] .cr-en { display: none; }
.course-reader[data-mode="cn"] .cr-cn { color: var(--ink); font-size: var(--course-fs); }

/* 简洁播放条：细进度线 + 一行 [句] [⏮ ▶ ⏭] [···] */
.cr-panel { flex-shrink: 0; border-top: 1px solid #DEE0EE; background: #fff; padding: 0 0 var(--inset-b); }
.cr-seekline { height: 3px; background: #D7D9EA; }
.cr-seekline i { display: block; height: 100%; width: 0; background: var(--orange); transition: width .2s; }
.cr-bar2 { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px 12px; }
.cr-b2 { font-size: 24px; color: var(--ink); line-height: 1; padding: 6px; background: none; }
.cr-b2:active { transform: scale(.9); }
.cr-b2l { display: flex; align-items: center; gap: 6px; }
.cr-b2.side { font-size: 17px; color: var(--ink-light); min-width: 38px; height: 38px; border-radius: 50%; }
.cr-b2.side.lbl { font-size: 13px; font-weight: 800; padding: 0 10px; width: auto; border-radius: 999px; background: var(--cream); }
.cr-b2.side.on { color: #fff; background: var(--orange); }
.cr-b2c { display: flex; align-items: center; gap: 28px; }
.cr-b2.play { font-size: 30px; color: var(--orange-deep); }

.cr-speeds { display: flex; justify-content: center; gap: 6px; background: var(--cream); border-radius: 999px; padding: 4px; margin: 6px auto 0; width: fit-content; }
.cr-speeds button { padding: 5px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink-light); }
.cr-speeds button.on { background: var(--orange); color: #fff; }
.cr-morerow { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.cr-morerow button { flex: 1 1 44%; padding: 11px 6px; border-radius: 12px; background: var(--cream); color: var(--ink); font-size: 13px; font-weight: 700; }
.cr-morerow button.on { background: var(--orange); color: #fff; }

.cr-fontpick { display: flex; gap: 8px; margin: 8px 0 14px; }
.cr-fontpick button { flex: 1; padding: 12px 4px; border-radius: 12px; background: var(--cream); color: var(--ink); font-weight: 700; }
.cr-fontpick button.on { background: var(--orange); color: #fff; }
.cr-pgroup { font-size: 13px; font-weight: 800; color: var(--orange-deep); margin: 12px 0 8px; }
.cr-type-tip { color: var(--ink-light); font-size: 12px; margin: -2px 0 14px; }
.cr-type-sentence { line-height: 2.5; font-size: 18px; text-align: left; padding: 12px; background: var(--cream); border-radius: 12px; }
.cr-type-blank { display: inline-flex; gap: 5px; margin: 0 4px; padding: 3px 2px; border-bottom: 2px solid var(--orange); vertical-align: middle; cursor: pointer; }
.cr-type-blank i { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 34px; line-height: 1; border: 2px solid #b6d5f4; border-radius: 7px; background: #fff; color: #1763a4; font-style: normal; font-weight: 700; }
.cr-type-blank.active i { border-color: #f0b83f; background: #fff8df; }
.cr-type-blank i.wrong { border-color: #e85d5d; background: #fff0f0; color: #d13c3c; }
.cr-type-blank.bad { border-color: #e85d5d; }
.cr-type-hint { min-height: 20px; color: var(--ink-light); font-size: 12px; margin: 10px 2px; }
.cr-type-hint.ok { color: #299b68; font-weight: 800; }
.cr-type-actions { display: flex; gap: 8px; margin: 8px 0; }
.cr-type-actions button { flex: 1; border: 0; border-radius: 12px; padding: 10px; background: var(--cream); color: var(--ink); }
.cr-type-actions button.on { background: var(--orange); color: white; }
.cr-type-lock { display: block; text-align: left; font-size: 13px; padding: 10px 2px; }
.cr-type-kb { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; padding: 8px 4px; background: #eaf5ff; border-radius: 12px; }
.cr-type-kb button { width: 27px; height: 30px; border: 1px solid #b9d8f6; border-radius: 6px; background: #fff; color: #1763a4; font-weight: 700; }
.cr-type-kb i { width: 8px; }
.cr-type-page { z-index: 70; height: 100dvh; min-height: 100dvh; max-height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(7,16,13,.62); backdrop-filter: blur(2px); padding: 0; }
.cr-type-card { width: 100%; max-height: 88svh; display: flex; flex-direction: column; background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 32px rgba(24,34,26,.28); overflow: hidden; animation: cr-type-card-in .2s ease-out; }
@keyframes cr-type-card-in { from { transform: translateY(18px); opacity: .5; } to { transform: translateY(0); opacity: 1; } }
.cr-type-page-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; box-sizing: border-box; padding: 22px 18px max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 0; }
.cr-type-page .cr-type-sentence { margin-top: 18px; font-size: 21px; line-height: 2.4; }
.cr-type-page .cr-type-sentence { cursor: pointer; }
.cr-type-page .cr-type-kb { margin: 22px -10px 0; padding: 14px 8px; gap: 6px; flex-shrink: 0; }
.cr-type-page .cr-type-kb button { width: 30px; height: 36px; font-size: 16px; }
.cr-type-page .cr-type-page-scroll { background: #fff; }
.cr-type-page .cr-type-kb { background: #e8f4ff; box-shadow: inset 0 4px 0 rgba(255,255,255,.65), 0 4px 0 #c7e0f7; border-radius: 16px; }
.cr-type-page .cr-type-kb button { background: #fff; border: 1px solid #a8cff4; box-shadow: 0 2px 0 #b8d7f3; color: #1260a2; }
.cr-type-page .cr-type-kb button.used { background: #fff3c8; border-color: #f0c34a; color: #a26b00; }
.cr-type-page .cr-type-kb button.next-key { background: #efe3ff; border-color: #b98af0; color: #6b21a8; }
.cr-type-page .cr-kb-row { display: flex; justify-content: center; gap: 5px; width: 100%; }
.cr-type-page .cr-kb-row:not(:last-child) button:not(.kb-special) { flex: 1 1 0; width: auto; min-width: 0; }
.cr-type-page .cr-type-kb button { flex: 1 1 0; min-width: 0; }
.cr-type-page .cr-type-kb .kb-special { background: #d6eaff; }
.cr-type-page .cr-type-kb .kb-system, .cr-type-page .cr-type-kb .kb-space { flex: 1 1 auto; width: auto; max-width: 120px; font-size: 11px; white-space: nowrap; }
.cr-type-page .cr-type-kb .kb-confirm { flex: 0 0 54px; background: #ff7628; border-color: #ff7628; color: #fff; font-size: 14px; }
.cr-type-page #cr-type-done { flex-shrink: 0; margin-top: 10px; margin-bottom: max(4px, env(safe-area-inset-bottom)); }
.cr-type-setting-lock { display: block; margin: 14px 0; padding: 12px; border-radius: 12px; background: var(--cream); color: var(--ink); font-size: 13px; text-align: left; }
.cr-type-setting-lock input { width: 18px; height: 18px; vertical-align: middle; accent-color: var(--orange); }
.cr-type-count { color: var(--ink-light); font-size: 13px; margin-right: 14px; }
.cr-pgrid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.cr-pgrid button { padding: 10px 4px; border-radius: 10px; background: var(--cream); color: var(--ink); font-size: 12.5px; font-weight: 600; }
.cr-pgrid button.on { background: var(--orange); color: #fff; }

/* 可点单词 + 重点词分级上色 */
.cr-w { cursor: pointer; border-radius: 3px; }
.cr-w:active { background: #FFE3BE; }
.cr-w-r { color: #E5484D; font-weight: 600; }   /* 生词（全书仅一次）*/
.cr-w-o { color: #B5651D; font-weight: 600; }   /* 较难（2~3 次）*/
.cr-w-k { color: #8A63D2; }                      /* 词库考纲词 */

/* 底部单词释义条 */
.cr-dict { flex-shrink: 0; position: relative; border-top: 1px solid #DEE0EE; background: #FFFDF8; padding: 10px 34px 10px 16px; }
.cr-dict-w { font-size: 16px; font-weight: 800; color: var(--orange-deep); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cr-dict-ph { font-size: 12px; font-weight: 400; color: var(--ink-light); }
.cr-dict-play { font-size: 15px; }
.cr-dict-cn { font-size: 13px; color: var(--ink); margin-top: 3px; line-height: 1.5; }
.cr-dict-cn b { color: var(--ink-light); font-weight: 700; margin-right: 5px; font-style: italic; }
.cr-dict-x { position: absolute; top: 6px; right: 10px; font-size: 18px; color: var(--ink-light); line-height: 1; padding: 4px; }

/* 复读机模式（逐句精听）：只显示当前句 */
.cr-rptrbar { display: none; }
.course-reader[data-rptr="1"] .cr-rptrbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #FFF8EE; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px;
  font-size: 12px; color: var(--ink-light);
}
.cr-rptrbar #cr-rptr-cnt { font-size: 15px; font-weight: 800; color: var(--ink); }
.cr-rptrbar #cr-rptr-play { color: var(--orange-deep); font-weight: 600; }
.course-reader[data-rptr="1"] .cr-hint,
.course-reader[data-rptr="1"] .cr-title,
.course-reader[data-rptr="1"] .cr-sub { display: none; }
.course-reader[data-rptr="1"] .cr-line:not(.cur) { display: none; }
.course-reader[data-rptr="1"] #cr-lines {
  min-height: 46vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.course-reader[data-rptr="1"] .cr-line.cur { background: none; box-shadow: none; }
.course-reader[data-rptr="1"] .cr-line.cur .cr-en { font-size: calc(var(--course-fs) + 4px); color: var(--ink); }
.course-reader[data-rptr="1"][data-blind="1"] #cr-lines { filter: blur(10px); opacity: .3; }

/* ================= 豆包老师 · 场景学习（暗色沉浸式，参考商用口语陪练的对话风格）=================
 * 字号按参考图换算（截图约 2.75 倍屏）：气泡英文 ≈18px（--fs 可在设置里调小/中/大）、标题 21px、场景卡大字 ≈34px。 */
.dlg-quick { flex-shrink: 0; padding: 4px 16px 0; }
.dlg-quick-btn { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border: 1.5px dashed var(--orange); border-radius: 14px; background: #fff7ef; color: var(--orange-deep); font-size: 15px; font-weight: 800; text-align: left; cursor: pointer; }
.dlg-quick-btn small { font-size: 11.5px; font-weight: 500; color: var(--ink-light); }

body.scn-open { overflow: hidden; }
.scn { position: fixed; top: 0; bottom: 0; left: calc(50% + var(--shell-shift, 0px)); transform: translateX(-50%); width: min(100%, var(--center-w, 100%)); max-width: var(--sheet-max, 480px); z-index: 300; display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% 0%, #1c2230 0%, #0e1014 60%); color: #f3f4f6; font-family: inherit; }
.scn [hidden] { display: none !important; }
.scn button { font-family: inherit; cursor: pointer; }
.scn-round { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.scn-round svg { width: 22px; height: 22px; }
.scn-top { flex-shrink: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 8px; }
.scn-title { font-size: 21px; font-weight: 800; line-height: 1.25; }
.scn-timer { display: inline-block; margin-top: 8px; padding: 5px 16px; border-radius: 999px; background: rgba(255,255,255,.16); font-size: 16px; font-variant-numeric: tabular-nums; }
.scn-acts { display: flex; gap: 10px; }
.scn-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 16px 6px; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.scn-msg { border-radius: 22px; word-break: break-word; }
.scn-msg .t { font-size: var(--fs, 18px); line-height: 1.55; }
.scn-msg.ai { align-self: stretch; background: #262629; padding: 16px 18px 10px; }
.scn-msg .tr { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.1); font-size: calc(var(--fs, 18px) - 3px); line-height: 1.6; color: #b8bcc6; }
.scn-msg .ops { display: flex; gap: 22px; margin-top: 8px; }
.scn-msg .ops button { border: 0; background: none; color: #d5d8df; padding: 4px 2px; }
.scn-msg .ops svg { width: 26px; height: 26px; }
.scn-msg .ops button:active { color: #7c66f0; }
.scn-msg.me { align-self: flex-end; max-width: 86%; background: linear-gradient(135deg, #5b46e5, #4a36c9); color: #fff; padding: 12px 18px; font-size: var(--fs, 18px); line-height: 1.5; border-bottom-right-radius: 8px; }
.scn-msg.hint { align-self: stretch; border: 1.5px dashed #7c66f0; background: rgba(255,154,77,.08); padding: 14px 18px; }
.scn-msg.hint .lab { font-size: 13px; color: #7c66f0; margin-bottom: 4px; }
.scn-msg.hint .tip { margin-top: 6px; font-size: 13px; color: #9aa0ad; }
.scn-bottom { flex-shrink: 0; padding: 8px 16px calc(16px + var(--inset-b)); display: flex; flex-direction: column; gap: 12px; }
.scn-hint { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 15px 22px; border: 2px dashed #6b6e78; border-radius: 26px; background: transparent; color: #e5e7ec; font-size: 17px; font-weight: 700; }
.scn-hint svg { width: 26px; height: 26px; }
.scn-hint.busy { opacity: .55; }
.scn-bar { display: flex; align-items: center; gap: 12px; }
.scn-talk { flex: 1; height: 60px; border: 0; border-radius: 999px; background: #47474b; color: #fff; font-size: 18px; font-weight: 800; touch-action: none; user-select: none; -webkit-user-select: none; }
.scn-talk.rec { background: linear-gradient(135deg, #5b46e5, #4a36c9); box-shadow: 0 0 0 6px rgba(255,138,48,.22); animation: scnPulse 1.1s ease-in-out infinite; }
@keyframes scnPulse { 50% { box-shadow: 0 0 0 11px rgba(255,138,48,.08); } }
.scn-kbbtn { width: 60px; height: 60px; border-radius: 50%; border: 0; background: #47474b; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.scn-kbbtn svg { width: 28px; height: 28px; }
.scn-textbar input { flex: 1; min-width: 0; height: 60px; border: 0; border-radius: 999px; background: #47474b; color: #fff; font-size: 17px; padding: 0 22px; outline: none; }
.scn-textbar input::placeholder { color: #9aa0ad; }
.scn-send { height: 60px; padding: 0 22px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #5b46e5, #4a36c9); color: #fff; font-size: 16px; font-weight: 800; }

/* 场景卡（开场）：大字、点击开始 */
.scn-intro { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: calc(14px + env(safe-area-inset-top)) 16px calc(16px + var(--inset-b)); gap: 14px; }
.scn-intro > .scn-round { align-self: flex-end; }
.scn-intro-card { flex: 1; min-height: 0; overflow-y: auto; border-radius: 34px; background: rgba(255,255,255,.09); padding: 28px 24px; }
.scn-intro-lv { display: inline-block; padding: 3px 12px; border-radius: 999px; background: rgba(255,138,48,.2); color: #7c66f0; font-size: 13px; font-weight: 700; }
.scn-intro-title { margin: 12px 0 16px; font-size: 34px; line-height: 1.25; font-weight: 800; }
.scn-intro-body p { margin: 0 0 14px; font-size: 18px; line-height: 1.7; color: #e5e7ec; }
.scn-intro-body figure { margin: 0 0 14px; }
.scn-intro-body img { width: 100%; border-radius: 18px; display: block; }
.scn-intro-body figcaption { margin-top: 6px; font-size: 13px; color: #9aa0ad; text-align: center; }
.scn-intro-goal { margin-top: 8px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.08); font-size: 16px; line-height: 1.6; color: #e5e7ec; }
.scn-intro-goal b { display: block; margin-bottom: 4px; color: #7c66f0; font-size: 13px; }
.scn-start { flex-shrink: 0; height: 58px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #5b46e5, #4a36c9); color: #fff; font-size: 19px; font-weight: 800; }

/* 弹窗（设置 / 退出确认 / 评分中） */
.scn-modal { position: absolute; inset: 0; z-index: 5; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; }
.scn-modal-card { width: 100%; background: #1f2126; border-radius: 26px 26px 0 0; padding: 22px 20px calc(22px + var(--inset-b)); display: flex; flex-direction: column; gap: 14px; }
.scn-modal-h { font-size: 19px; font-weight: 800; }
.scn-modal-p { font-size: 15px; color: #b8bcc6; line-height: 1.6; }
.scn-row { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.scn-row input[type=checkbox] { width: 22px; height: 22px; accent-color: #5b46e5; }
.scn-row-sub { display: block; font-size: 12px; opacity: .6; font-weight: 400; margin-top: 2px; }
.scn-seg button small { display: none; }
.scn-seg { display: flex; background: #33353c; border-radius: 999px; padding: 3px; }
.scn-seg button { border: 0; background: none; color: #c8ccd5; padding: 6px 16px; border-radius: 999px; font-size: 15px; }
.scn-seg button.on { background: #5b46e5; color: #fff; font-weight: 700; }
.scn-primary { height: 52px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #5b46e5, #4a36c9); color: #fff; font-size: 17px; font-weight: 800; }
.scn-ghost { height: 50px; border: 0; border-radius: 999px; background: #33353c; color: #e5e7ec; font-size: 16px; }

/* 学习报告 */
.scn-result { flex: 1; min-height: 0; overflow-y: auto; padding: calc(16px + env(safe-area-inset-top)) 20px calc(24px + var(--inset-b)); position: relative; }
.scn-result-x { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; }
.scn-result-title { font-size: 20px; font-weight: 800; padding-right: 56px; margin-bottom: 18px; }
.scn-ring { --p: 0; width: 168px; height: 168px; margin: 6px auto 20px; border-radius: 50%; background: conic-gradient(#5b46e5 calc(var(--p) * 1%), #33353c 0); display: flex; align-items: center; justify-content: center; }
.scn-ring > div { width: 136px; height: 136px; border-radius: 50%; background: #14161b; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.scn-ring b { font-size: 48px; line-height: 1; font-weight: 800; }
.scn-ring small { margin-top: 4px; font-size: 12px; color: #9aa0ad; }
.scn-dims { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.scn-dim { display: grid; grid-template-columns: 84px 1fr 32px; gap: 10px; align-items: center; font-size: 14px; color: #d5d8df; }
.scn-dim .bar { height: 8px; background: #33353c; border-radius: 4px; overflow: hidden; }
.scn-dim .bar i { display: block; height: 100%; background: linear-gradient(90deg, #8b6cf2, #5b46e5); border-radius: 4px; }
.scn-dim b { text-align: right; }
.scn-sec { background: #1f2126; border-radius: 18px; padding: 14px 16px; margin-bottom: 12px; }
.scn-sec h4 { margin: 0 0 6px; font-size: 14px; color: #7c66f0; }
.scn-sec p, .scn-sec li { margin: 0; font-size: 15px; line-height: 1.7; color: #e5e7ec; }
.scn-sec ul { margin: 0; padding-left: 18px; }
.scn-imp { padding: 8px 0; border-top: 1px solid rgba(255,255,255,.08); }
.scn-imp:first-of-type { border-top: 0; }
.scn-imp .said { font-size: 14px; color: #9aa0ad; text-decoration: line-through; }
.scn-imp .better { font-size: 16px; font-weight: 700; color: #fff; margin: 2px 0; }
.scn-imp small { font-size: 13px; color: #9aa0ad; }
.scn-result-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.scn-note { margin-top: 14px; font-size: 12px; color: #6f7480; text-align: center; }
.scn-word { border: 0; padding: 0; background: transparent; color: #7c66f0; font: inherit; text-decoration: underline; text-decoration-color: rgba(255,154,77,.55); text-underline-offset: 3px; cursor: pointer; }
.scn-word-card { position: absolute; left: 16px; right: 16px; bottom: calc(112px + var(--inset-b)); z-index: 4; padding: 12px 34px 12px 14px; background: #fffaf2; color: #20232b; border: 1px solid #ced0e5; border-radius: 10px; box-shadow: 0 3px 12px rgba(0,0,0,.12); transition: transform .28s ease, opacity .28s ease; }
.scn-word-card.is-flow { position: relative; left: auto; right: auto; bottom: auto; z-index: auto; margin: -4px 16px 12px; transform: none; opacity: 1; }
.scn-word-card.is-collapsed { transform: translateY(calc(100% - 18px)); opacity: .72; }
.scn-word-card-word { font-size: 18px; font-weight: 800; color: #e86f25; }
.scn-word-card-play { display: inline-flex; width: 24px; height: 24px; padding: 3px; border: 0; background: transparent; color: #515474; vertical-align: middle; }
.scn-word-card-play svg { width: 100%; height: 100%; }
.scn-word-card-phon { margin-top: 2px; color: #737985; font-size: 12px; }
.scn-word-card-cn { margin-top: 5px; font-size: 14px; font-weight: 700; }
.scn-word-card-tip { margin-top: 5px; color: #7a7f98; font-size: 12px; }
.scn-word-card-source { margin-top: 5px; color: #7e82a6; font-size: 11px; }
.scn-word-card-sent { margin-top: 7px; color: #6f7480; font-size: 12px; line-height: 1.45; }
.scn-word-card-x { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border: 0; background: transparent; color: #9aa0ad; padding: 2px; }
.scn-word-card-x svg { width: 100%; height: 100%; }

/* 场景学习主题：深色为默认，浅色对应纸面阅读模式。 */
.scn.scn-light { background: #e9eaf3; color: #1b1f3a; }
.scn.scn-light .scn-top { background: #f8f8fd; }
.scn.scn-light .scn-title, .scn.scn-light .scn-timer { color: #1b1f3a; }
.scn.scn-light .scn-timer { background: #e8eaf3; }
.scn.scn-light .scn-intro-card { background: #f8f8fd; }
.scn.scn-light .scn-intro-title { color: #1b1f3a; }
.scn.scn-light .scn-intro-body p { color: #2e3254; }
.scn.scn-light .scn-intro-body figcaption { color: #7a7f98; }
.scn.scn-light .scn-intro-goal { background: #e8eaf3; color: #2e3254; }
.scn.scn-light .scn-mode-tip { color: #7a7f98; }
.scn.scn-light .scn-mode button { background: #e8eaf3; color: #2e3254; }
.scn.scn-light .scn-round { background: #fff; color: #515474; box-shadow: 0 1px 5px rgba(73,52,32,.12); }
.scn.scn-light .scn-msg.ai { background: #fff; color: #1b1f3a; box-shadow: 0 2px 9px rgba(73,52,32,.08); }
.scn.scn-light .scn-msg .tr { border-color: #d2d3e7; color: #63678f; }
.scn.scn-light .scn-msg .ops button { color: #515474; }
.scn.scn-light .scn-hint { border-color: #abadc5; color: #444661; }
.scn.scn-light .scn-talk, .scn.scn-light .scn-kbbtn { background: #fff; color: #2e3254; box-shadow: 0 2px 9px rgba(73,52,32,.1); }
.scn.scn-light .scn-modal { background: rgba(73,52,32,.28); }
.scn.scn-light .scn-modal-card { background: #f8f8fd; color: #1b1f3a; }
.scn.scn-light .scn-seg { background: #e8eaf3; }
.scn.scn-light .scn-seg button { color: #7a7f98; }
.scn.scn-light .scn-ghost { background: #e8eaf3; color: #2e3254; }

/* 场景列表抽屉（挂在 body 上，浅色，与豆包老师页一致） */
.scn-sheet-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 290; }
.scn-sheet { position: fixed; left: calc(50% + var(--shell-shift, 0px)); bottom: 0; transform: translateX(-50%); width: min(100%, var(--center-w, 100%)); max-width: var(--sheet-max, 480px); max-height: calc(var(--app-h, 100dvh) * .78); z-index: 291; background: #fff; border-radius: 22px 22px 0 0; display: flex; flex-direction: column; padding: 18px 16px calc(18px + var(--inset-b)); }
.scn-sheet-h { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 800; color: var(--ink); }
.scn-sheet-x { border: 0; background: #eaeaf3; width: 32px; height: 32px; border-radius: 50%; font-size: 15px; color: var(--ink-light); }
.scn-sheet-tip { margin: 6px 0 12px; font-size: 13px; color: var(--ink-light); }
.scn-sheet-body { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.scn-empty { padding: 30px 0; text-align: center; color: var(--ink-light); font-size: 14px; }
.scn-card { display: flex; gap: 12px; align-items: center; text-align: left; border: 0; background: #f1f2f8; border-radius: 16px; padding: 10px; cursor: pointer; }
.scn-card img, .scn-card .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: #ffe6cf; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.scn-card .tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.scn-card b { font-size: 16px; color: var(--ink); }
.scn-card .lv { align-self: flex-start; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: #ffe6cf; color: var(--orange-deep); }
.scn-card small { font-size: 12.5px; color: var(--ink-light); }

/* 场景学习 · 教学模式切换 / 剧本进度 */
.scn-mode { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.scn-mode button { flex: 1; height: 46px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #e5e7ec; font-size: 15px; font-weight: 700; }
.scn-mode button.on { background: linear-gradient(135deg, #5b46e5, #4a36c9); color: #fff; }
.scn-mode-tip { width: 100%; padding: 0 6px; font-size: 13px; line-height: 1.5; color: #9aa0ad; text-align: center; }
.scn-modetag { display: inline-block; margin: 8px 0 0 8px; padding: 4px 12px; border-radius: 999px; background: rgba(255,138,48,.2); color: #7c66f0; font-size: 13px; font-weight: 700; vertical-align: top; }
.scn-progress { flex-shrink: 0; padding: 4px 16px 6px; }
.scn-progress .dots { display: flex; gap: 6px; margin-bottom: 6px; }
.scn-progress .dots i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.16); }
.scn-progress .dots i.done { background: #4CC17E; }
.scn-progress .dots i.cur { background: #7c66f0; }
.scn-progress .txt { font-size: 14px; color: #d5d8df; }
.scn-progress .txt b { color: #fff; }
.scn-progress .note { margin-left: 10px; font-size: 12.5px; color: #7c66f0; }
.scn-steps { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 16px; }
.scn-steps span { padding: 4px 12px; border-radius: 999px; font-size: 13px; background: #262629; color: #d5d8df; }
.scn-steps span.ok { background: rgba(76,193,126,.18); color: #7be0a4; }
.scn-steps span.skip { background: rgba(255,154,77,.16); color: #7c66f0; }

/* 场景学习 · 列表页（全屏，沿用教学页的暗色沉浸风格） */
.scnl { z-index: 290; }
.scnl-top { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: calc(14px + env(safe-area-inset-top)) 16px 4px; }
.scnl-title { font-size: 24px; font-weight: 800; }
.scnl-title small { margin-left: 10px; font-size: 13px; font-weight: 500; color: #9aa0ad; }
.scnl-tip { flex-shrink: 0; padding: 4px 20px 10px; font-size: 13.5px; line-height: 1.5; color: #9aa0ad; }
.scnl-filter { flex-shrink: 0; display: flex; gap: 8px; padding: 0 16px 12px; overflow-x: auto; }
.scnl-filter button { flex: 0 0 auto; height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); color: #d5d8df; font-size: 14px; font-weight: 700; }
.scnl-filter button.on { background: linear-gradient(135deg, #5b46e5, #4a36c9); color: #fff; }
.scnl-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px calc(24px + var(--inset-b)); display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.scnl-card { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; border-radius: 24px; padding: 14px 16px 14px 14px; background: #262629; color: #f3f4f6; }
.scnl-card:active { background: #2f3035; }
.scnl-course-card { border: 1.5px dashed #7c66f0; background: #f8f8fd; color: #2e3254; }
.scnl-course-card:active { background: #fff0dd; }
.scn.scn-light .scnl-course-card { background: #f8f8fd; color: #2e3254; }
.scnl-card .no { position: absolute; top: 8px; left: 12px; font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #7c66f0; z-index: 1; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.scnl-card img, .scnl-card .ph { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 18px; object-fit: cover; background: linear-gradient(135deg, #232533, #5a3b22); display: flex; align-items: center; justify-content: center; font-size: 36px; }
.scnl-card .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.scnl-card b { font-size: 19px; line-height: 1.3; }
.scnl-card .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.scnl-card .tags i { font-style: normal; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.scnl-card .lv { background: rgba(255,138,48,.2); color: #7c66f0; }
.scnl-card .md { background: rgba(255,255,255,.1); color: #c8ccd5; }
.scnl-card small { font-size: 13.5px; line-height: 1.5; color: #9aa0ad; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scnl-card .go { flex: 0 0 auto; font-size: 30px; color: #6b6e78; line-height: 1; }
.scnl-empty { padding: 70px 20px; text-align: center; color: #9aa0ad; font-size: 15px; line-height: 1.8; }
.scnl-retry { margin-top: 12px; height: 44px; padding: 0 28px; border: 0; border-radius: 999px; background: #47474b; color: #fff; font-size: 15px; font-weight: 700; }

/* ================= 三板块外壳（PC / 平板）=================
 * 手机（< 768px）：和以前完全一样（底部导航 + 单列）。
 * 平板（768–1199）：左侧图标导航栏 + 中间主区，词汇卡是右侧可开合的抽屉。
 * PC（≥ 1200）：左 词库与关卡（上面是导航）| 中 学习主区 | 右 词汇卡 + 本关单词。
 * 全屏层（练习键盘 / 飞行游戏 / 课文 / 场景对话 / 抽屉）用 --shell-shift / --center-w 居中在中间栏。 */
:root { --shell-shift: 0px; --center-w: 100vw; --sheet-max: 480px; --pane-right-w: 0px; }
.pane, .pane-toggle { display: none; }

@media (min-width: 768px) {
  :root { --rail-w: 92px; --shell-shift: calc(var(--rail-w) / 2); --center-w: calc(100vw - var(--rail-w)); --sheet-max: 700px; --tabbar-h: var(--inset-b); }
  body { background: var(--bg); }
  .app-shell { max-width: none; width: 100%; margin: 0; box-shadow: none; background: var(--bg);
    display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .tabbar { grid-column: 1; grid-row: 1; width: auto; max-width: none; height: auto; border-radius: 0; box-shadow: none; border-right: 1px solid #E8EAF3;
    flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 8px; padding: 58px 8px calc(12px + var(--inset-b)); }
  .tab-item { flex: none; min-height: 62px; border-radius: 14px; font-size: 11px; }
  .tab-item:hover, .tab-item.active { background: var(--cream); }
  .tab-center .tab-icon-big { margin-top: 0; width: auto; height: auto; background: none; box-shadow: none; color: inherit; font-size: 22px; border-radius: 0; }
  .view-container { grid-column: 2; grid-row: 1; padding-inline: max(0px, calc((100% - 760px) / 2)); }
  .view-container { padding-top: 44px; }   /* 顶部右上角是分享 / 刷新两个悬浮按钮：让出一条空位，不压住金币计数 */

  /* 右侧词汇卡：平板上是抽屉，右下角「词汇卡」按钮开合 */
  .pane-right { display: flex; position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); z-index: 80; transform: translateX(104%); transition: transform .25s ease;
    box-shadow: -10px 0 30px rgba(27, 31, 58, .16); }
  .pane-right.open { transform: none; }
  .pane-toggle { display: flex; align-items: center; position: fixed; right: 16px; bottom: 20px; z-index: 70; height: 40px; padding: 0 18px; border-radius: 999px;
    background: linear-gradient(135deg, var(--orange-light), var(--orange-deep)); color: #fff; font-size: 14px; font-weight: 800; box-shadow: var(--card-shadow); }
  .pane-toggle.on { background: var(--ink); }
}

@media (min-width: 1200px) {
  :root { --left-w: 300px; --right-w: 380px; --shell-shift: calc((var(--left-w) - var(--right-w)) / 2); --center-w: calc(100vw - var(--left-w) - var(--right-w)); --pane-right-w: var(--right-w); }
  .app-shell { grid-template-columns: var(--left-w) minmax(0, 1fr) var(--right-w); grid-template-rows: auto minmax(0, 1fr); }
  .tabbar { flex-direction: row; gap: 2px; padding: 52px 8px 8px; }
  .tab-item { flex: 1; min-height: 56px; }
  .pane-left { display: flex; grid-column: 1; grid-row: 2; }
  .view-container { grid-row: 1 / 3; padding-top: 0; }
  .pane-right { position: static; transform: none; grid-column: 3; grid-row: 1 / 3; width: auto; z-index: auto; box-shadow: none; }
  .pane-toggle { display: none; }
}

/* 侧栏通用 */
.pane { background: #fff; flex-direction: column; min-height: 0; overflow: hidden; }
.pane-left { border-right: 1px solid #E8EAF3; }
.pane-right { border-left: 1px solid #E8EAF3; }
.pn-head { flex-shrink: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 52px 18px 10px; }
.pn-head b { font-size: 17px; font-weight: 800; color: var(--ink); }
.pn-sub { font-size: 12px; color: var(--ink-light); }
.pn-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 14px 18px; overscroll-behavior: contain; }
.pn-sec { margin: 16px 2px 8px; font-size: 12px; font-weight: 800; color: var(--ink-light); letter-spacing: .04em; }
.pn-empty { padding: 24px 12px; text-align: center; font-size: 13px; color: var(--ink-light); line-height: 1.8; }
.pn-empty a { color: var(--orange-deep); font-weight: 700; }

/* 左：词库卡 + 关卡列表 */
.pl-lib { background: linear-gradient(135deg, #2B2370, var(--orange) 55%, var(--orange-light)); color: #fff; border-radius: 16px; padding: 14px 14px 12px; }
.pl-lib-name { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pl-lib-name b { font-weight: 800; line-height: 1.3; }
.pl-lib-sub { margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .82); }
.pl-lib .pass-bar { background: rgba(255, 255, 255, .25); margin: 10px 0 2px; }
.pl-lib .pass-bar i { background: #fff; }
.pl-lib-btns { display: flex; gap: 8px; margin-top: 12px; }
.pl-go { flex: 1; height: 36px; border-radius: 999px; background: #fff; color: var(--orange-deep); font-size: 13px; font-weight: 800; }
.pl-ghost { height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .2); color: #fff; font-size: 12.5px; font-weight: 700; }
.pl-levels { display: flex; flex-direction: column; gap: 6px; }
.pl-lv { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 12px; background: #F5F6FB; text-align: left; border: 2px solid transparent; }
.pl-lv b { font-size: 15px; font-weight: 800; color: var(--ink); }
.pl-lv span { font-size: 12px; color: var(--ink-light); }
.pl-lv i { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink-light); }
.pl-lv:hover { background: var(--cream); }
.pl-lv.cur { background: var(--cream); border-color: var(--orange); }
.pl-lv.cur b, .pl-lv.cur span { color: var(--orange-deep); }
.pl-lv.done b { color: var(--green-deep); }
.pl-lv.lock { opacity: .55; cursor: default; }

/* 右：词汇卡 + 本关单词 */
.pr-card { margin-top: 2px; }
.pr-empty { background: #F5F6FB; border-radius: 16px; padding: 22px 16px; text-align: center; color: var(--ink-light); font-size: 13px; line-height: 1.7; }
.pr-empty b { display: block; margin-bottom: 6px; font-size: 15px; color: var(--ink); }
.pr-word { background: #fff; border: 1px solid #E8EAF3; border-radius: 16px; padding: 16px 16px 14px; box-shadow: var(--card-shadow); }
.pr-word-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pr-word-text { font-family: Georgia, "Times New Roman", "Noto Serif SC", serif; font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1.15; word-break: break-word; }
.pr-play { flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: var(--orange-deep); }
.pr-play.sm { width: 30px; height: 30px; }
.pr-play:hover { background: var(--cream-deep); }
.pr-ph { margin-top: 4px; font-size: 14px; color: var(--ink-light); }
.pr-pos { display: inline-block; margin-top: 8px; padding: 2px 10px; border-radius: 999px; background: var(--cream); color: var(--orange-deep); font-size: 12px; font-weight: 800; }
.pr-box { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #F5F6FB; font-size: 14px; line-height: 1.7; color: var(--ink); }
.pr-box em { display: block; margin-bottom: 2px; font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--ink-light); }
.pr-ex { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; font-weight: 700; }
.pr-ex-cn { margin-top: 2px; font-size: 13px; color: var(--ink-light); }
.pr-hint { margin-top: 12px; font-size: 12px; color: var(--ink-light); text-align: center; }
.pr-list { display: flex; flex-direction: column; gap: 4px; }
.pr-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; align-items: baseline; width: 100%; padding: 8px 12px; border-radius: 10px; text-align: left; }
.pr-row b { font-size: 14px; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-row span { font-size: 12.5px; color: var(--ink-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-row:hover { background: #F5F6FB; }
.pr-row.on { background: var(--cream); }
.pr-row.on b { color: var(--orange-deep); }
.pr-list.no-cn .pr-row { grid-template-columns: minmax(0, 1fr); }
.pr-list.no-cn .pr-row span { display: none; }

/* PC：三块独立圆角卡片（和哈珀学英语一致）——左 = 导航 + 词库关卡，中 = 学习主区，右 = 词汇卡；卡片之间留间距 */
@media (min-width: 1200px) {
  :root { --card-gap: 16px; --center-w: calc(100vw - var(--left-w) - var(--right-w) - 4 * var(--card-gap)); --pane-right-w: calc(var(--right-w) + 2 * var(--card-gap)); }
  body { background: #E9EBF5; }
  .app-shell { padding: var(--card-gap); column-gap: var(--card-gap); row-gap: 0; background: #E9EBF5; }
  .tabbar { border-right: 0; border-radius: 20px 20px 0 0; background: #fff; box-shadow: 0 2px 14px rgba(27, 31, 58, .06); }
  .pane-left { border-right: 0; border-radius: 0 0 20px 20px; box-shadow: 0 8px 14px rgba(27, 31, 58, .06); }
  .view-container { border-radius: 20px; background: var(--bg); box-shadow: 0 2px 14px rgba(27, 31, 58, .06); }
  .pane-right { border-left: 0; border-radius: 20px; box-shadow: 0 2px 14px rgba(27, 31, 58, .06); }
  .pn-head { padding-top: 46px; }
}

/* 左上角「返回实验室」和右上角「分享 / 强制刷新」是固定悬浮按钮：手机和平板在顶部给它们留一条 44px 的空位，不再压住页面自己的返回 / 设置按钮 */
@media (max-width: 1199px) {
  .app-shell { padding-top: 44px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .view-container { padding-top: 0; }
  .tabbar { padding-top: 14px; }
}

/* 参考哈珀学英语的留空：外边距 ≈ 24px、卡片间距 18px；左右两栏随窗口宽度伸缩，把两侧空位吃掉，中间内容撑到 1000px 才开始留白 */
@media (min-width: 768px) and (max-width: 1199px) {
  .view-container { padding-inline: max(0px, calc((100% - 900px) / 2)); }
}
@media (min-width: 1200px) {
  :root { --card-gap: 18px; --shell-pad-x: 24px; --left-w: clamp(300px, 17vw, 380px); --right-w: clamp(380px, 24vw, 520px);
    --center-w: calc(100vw - 2 * var(--shell-pad-x) - 2 * var(--card-gap) - var(--left-w) - var(--right-w));
    --pane-right-w: calc(var(--right-w) + var(--shell-pad-x) + var(--card-gap)); }
  .app-shell { padding: 20px var(--shell-pad-x); }
  .view-container { padding-inline: max(14px, calc((100% - 1000px) / 2)); }
  .tabbar { padding-top: 28px; }
  .pn-head { padding-top: 28px; }
}

/* 三块的分配对齐哈珀学英语：主栏目（学习主界面）放最左、最宽；中栏 = 导航 + 词库与关卡；最右 = 词汇卡。顶部留 44px 给左上 / 右上的悬浮按钮 */
@media (min-width: 1200px) {
  :root { --mid-w: clamp(300px, 24vw, 470px); --right-w: clamp(330px, 24vw, 470px);
    --shell-shift: calc(-18px - (var(--mid-w) + var(--right-w)) / 2);
    --center-w: calc(100vw - 2 * var(--shell-pad-x) - 2 * var(--card-gap) - var(--mid-w) - var(--right-w));
    --pane-right-w: calc(var(--mid-w) + var(--right-w) + 60px); }
  .app-shell { padding: 44px var(--shell-pad-x) 20px; grid-template-columns: minmax(0, 1fr) var(--mid-w) var(--right-w); grid-template-rows: auto minmax(0, 1fr); }
  .view-container { grid-column: 1; grid-row: 1 / 3; }
  .tabbar { grid-column: 2; grid-row: 1; padding-top: 12px; }
  .pane-left { grid-column: 2; grid-row: 2; }
  .pane-right { grid-column: 3; grid-row: 1 / 3; }
  .pn-head { padding-top: 16px; }
}
/* 课文播放条：左边「中英 / 句」比右边「···」宽，原来两端对齐会把中间的播放键挤向右；改成三列网格，播放键永远在正中间 */
.cr-bar2 { display: grid; grid-template-columns: 1fr auto 1fr; }
.cr-bar2 .cr-b2l { justify-self: start; }
.cr-bar2 > #cr-more { justify-self: end; }
/* ===== 右栏：词汇卡（照搬哈珀学英语的词汇卡样式；--brand = 品牌紫）===== */
#pane-right { --brand: var(--orange); --brand-soft: var(--cream); --line: #E8EAF3; --muted: #7A7F98; --faint: #A3A8BD;
  --serif: Georgia, "Times New Roman", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif; }
#pane-right .v-head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 6px; }
#pane-right .v-head h2 { margin: 0; font-size: 15px; font-weight: 900; font-family: var(--serif); }
#pane-right .pill { height: 30px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
#pane-right .pill.outline { box-shadow: 0 1px 2px rgba(40, 44, 90, .06); }
#pane-right .pill.on { background: var(--brand); border-color: var(--brand); color: #fff; }
#pane-right .v-tabs { flex-shrink: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 14px 6px; }
#pane-right .v-tab { height: 36px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 900; font-size: 13px; }
#pane-right .v-tab b { font-size: 11px; opacity: .85; margin-left: 4px; }
#pane-right .v-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
#pane-right .v-tools { flex-shrink: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 14px 0; }
#pane-right .v-levels { display: flex; flex-wrap: wrap; gap: 6px; }
#pane-right .v-sub { flex-shrink: 0; display: flex; gap: 6px; padding: 10px 14px 6px; flex-wrap: wrap; }
#pane-right .chip { height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid #DEE1EF; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; box-shadow: none; flex-shrink: 0; }
#pane-right .chip span { margin-left: 2px; font-size: 11px; opacity: .8; }
#pane-right .chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
#pane-right .chip.refresh { color: var(--brand); border-style: dashed; background: transparent; }
#pane-right .v-list { flex: 1; min-height: 0; overflow: auto; padding: 8px 14px 18px; overscroll-behavior: contain; }
#pane-right .v-empty { padding: 28px 12px; text-align: center; color: var(--faint); font-size: 13px; line-height: 1.7; }
#pane-right .vcard { border: 1px solid var(--line); border-radius: 18px; padding: 12px; margin: 0 0 12px; background: #fff; }
#pane-right .vcard.cur { box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }
#pane-right .vc-top { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
#pane-right .vc-word { flex: 1 1 auto; font-family: var(--serif); font-weight: 700; font-size: 20px; min-width: min-content; overflow-wrap: break-word; color: var(--ink); }
#pane-right .vc-ico { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #F7F8FC; display: grid; place-items: center; padding: 0; color: var(--muted); }
#pane-right .vc-ico svg { width: 15px; height: 15px; }
#pane-right .vc-ico.faved { color: #EF4467; } #pane-right .vc-ico.faved svg { fill: #EF4467; }
#pane-right .vc-ph { color: var(--faint); font-size: 13px; margin-top: 2px; }
#pane-right .band { display: inline-block; margin-top: 6px; padding: 1px 8px; border-radius: 6px; background: #FFF1DD; color: #B45309; font-size: 11px; font-weight: 700; border: 1px solid #F7D9AC; }
#pane-right .band.b-pri { background: #E7F7EE; color: #12803F; border-color: #BFE8CF; }
#pane-right .band.b-mid { background: #FFF1DD; color: #B45309; border-color: #F7D9AC; }
#pane-right .band.b-col { background: #E5F1FF; color: #1D5FB8; border-color: #BCD8F8; }
#pane-right .band.b-ielts { background: #F1E9FF; color: #6A34C9; border-color: #DAC8F7; }
#pane-right .band.b-x { background: #F1F2F8; color: #7A7F98; border-color: #E0E2EE; }
#pane-right .vc-def { margin-top: 6px; color: var(--muted); font-size: 13px; }
#pane-right .vc-box { margin-top: 8px; border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.55; }
#pane-right .vc-box small { display: block; font-size: 11px; font-weight: 700; color: #6A64C8; margin-bottom: 2px; }
#pane-right .vc-box.zh-box { background: #F4F5FB; white-space: pre-line; }
#pane-right .vc-box.ex-box { background: #F1F6FF; }
#pane-right .vc-box .exen { font-family: var(--serif); font-weight: 600; } #pane-right .vc-box .exzh { color: var(--muted); font-size: 13px; margin-top: 2px; }
#pane-right .vcard.collapsed .vc-def, #pane-right .vcard.collapsed .vc-box { display: none; }
#pane-right .vcard.collapsed .vc-ico[data-vc="fold"] svg { transform: rotate(180deg); }
#pane-right .v-names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
#pane-right .v-name { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 700; }
#pane-right .v-name.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

/* 电脑上点右栏的「收起」：右栏消失，主栏和中栏占满；右下角出现「词汇卡」按钮可以再展开 */
@media (min-width: 1200px) {
  html.hw-right-off { --right-w: 0px; --pane-right-w: calc(var(--mid-w) + 42px); --shell-shift: calc(-9px - var(--mid-w) / 2);
    --center-w: calc(100vw - 2 * var(--shell-pad-x) - var(--card-gap) - var(--mid-w)); }
  html.hw-right-off .app-shell { grid-template-columns: minmax(0, 1fr) var(--mid-w); }
  html.hw-right-off .pane-right { display: none; }
  html.hw-right-off .pane-toggle { display: flex; }
}
/* 首页血条：没学过的词占全部的比例，满格绿 → 学一个短一点、越学越红 */
.hp-bar { height: 12px; border-radius: 99px; background: #E4E1FF; margin: 10px 0 8px; overflow: hidden; }
.hp-bar i { display: block; height: 100%; border-radius: inherit; transition: width .5s ease, background .5s ease; }
.pass-sub b { color: var(--ink); }
.pass-links { display: flex; gap: 14px; margin-top: 8px; font-size: 13px; font-weight: 800; }
.pass-links a { color: var(--orange-deep); }
.mine-lists { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 16px 12px; }
.mine-lists a { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); color: var(--ink); }
.mine-lists b { font-size: 22px; color: var(--orange-deep); } .mine-lists span { font-size: 12.5px; color: var(--ink-light); font-weight: 700; }
/* 已通过词表 / 难词表 */
.pw-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 16px; }
.pw-tabs button { height: 38px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 800; font-size: 13.5px; box-shadow: var(--card-shadow); }
.pw-tabs button b { margin-left: 4px; opacity: .8; font-size: 12px; }
.pw-tabs button.on { background: var(--orange); color: #fff; }
.pw-tip { margin: 4px 18px 10px; font-size: 12.5px; color: var(--ink-light); line-height: 1.7; }
.pw-tip b { color: var(--orange-deep); }
.pw-list { display: flex; flex-direction: column; gap: 8px; margin: 0 16px 16px; }
.pw-row { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff; box-shadow: var(--card-shadow); }
.pw-speak { width: 34px; height: 34px; border-radius: 50%; background: var(--cream); font-size: 15px; }
.pw-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.pw-main b { font-family: Georgia, "Times New Roman", "Noto Serif SC", serif; font-size: 17px; color: var(--ink); }
.pw-ph { font-size: 12.5px; color: var(--ink-light); } .pw-cn { font-size: 13.5px; color: var(--ink); }
.pw-main small { flex-basis: 100%; font-size: 11.5px; color: var(--ink-light); }
.pw-act { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--cream); color: var(--orange-deep); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
/* 主栏卡片大小不变，里面的内容列统一收窄成手机宽度（约 480px）居中；练习键盘 / 飞行侠 / 课文 / 抽屉这些全屏层也是同一个宽度 */
@media (min-width: 768px) {
  :root { --sheet-max: 480px; }
  .view-container { padding-inline: max(14px, calc((100% - 480px) / 2)); }
}
/* 顶部那条留给悬浮按钮的空位里，正中间放上 App 名称 */
.app-title { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 5; height: 44px; display: flex; align-items: center; font-size: 16px; font-weight: 800; letter-spacing: .06em; color: var(--ink); pointer-events: none; white-space: nowrap; }
/* 登录 / 注册窗口里的提示、额度用完卡片、「我的」页会员与积分 */
.au-msg { min-height: 18px; margin: 8px 2px 0; font-size: 13px; line-height: 1.6; color: #D64550; text-align: left; }
.au-msg.ok { color: var(--green-deep); }
.au-note { margin-top: 10px; font-size: 12px; line-height: 1.7; color: var(--ink-light); text-align: left; }
.au-note b { color: var(--orange-deep); }
.quota-card { margin: 20px 16px; padding: 22px 18px 18px; border-radius: 20px; background: #fff; box-shadow: var(--card-shadow); text-align: center; }
.quota-ico { font-size: 38px; } .quota-card h3 { margin: 6px 0 4px; font-size: 18px; color: var(--ink); }
.quota-card p { margin: 0 0 14px; font-size: 13px; line-height: 1.7; color: var(--ink-light); }
.quota-row { display: flex; gap: 8px; } .quota-row .auth-input { flex: 1; margin: 0; } .quota-row .btn-primary { flex: none; width: 76px; }
.quota-back { display: inline-block; margin-top: 14px; font-size: 13px; font-weight: 700; color: var(--orange-deep); }
.vip-card { margin: 0 16px 12px; padding: 14px; border-radius: 18px; background: #fff; box-shadow: var(--card-shadow); }
.vip-login { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 8px 0; text-align: center; font-size: 13px; color: var(--ink-light); } .vip-login b { color: var(--ink); font-size: 14px; }
.vip-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.vip-badge { padding: 3px 12px; border-radius: 999px; background: #EEF0F7; color: var(--ink-light); font-size: 12.5px; font-weight: 800; } .vip-badge.on { background: linear-gradient(135deg, #FFD36B, #F5A623); color: #5B3A00; }
.vip-sub { font-size: 12.5px; color: var(--ink-light); }
.vip-block { padding: 10px 0; border-top: 1px solid #EEF0F7; } .vip-top + .vip-block { border-top: 0; }
.vip-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--ink-light); } .vip-line b { font-size: 15px; color: var(--ink); }
.vip-bar { height: 8px; margin: 8px 0 6px; border-radius: 99px; background: var(--cream-deep); overflow: hidden; } .vip-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--orange-light), var(--orange-deep)); }
.vip-hint { font-size: 12px; line-height: 1.7; color: var(--ink-light); }
.vip-tabs { display: inline-flex; gap: 4px; } .vip-tabs button { padding: 3px 10px; border-radius: 999px; background: #F3F4FA; color: var(--ink-light); font-size: 12px; font-weight: 700; } .vip-tabs button.on { background: var(--orange); color: #fff; }
.vip-rank { margin-top: 8px; font-size: 13px; color: var(--ink-light); }
.vip-rank-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 6px 4px; border-radius: 8px; color: var(--ink); } .vip-rank-row.me { background: var(--cream); font-weight: 800; }
.vip-rank-row i { font-style: normal; font-weight: 800; color: var(--orange-deep); text-align: center; } .vip-rank-row b { color: var(--orange-deep); }
