/* 注意：这里曾经有一行 @import url('https://fonts.font.im/...')。
   它比 HTML 里的 <link> 更隐蔽 —— @import 在样式表内部，浏览器必须等它下载完
   才能确定 CSSOM 完整，而 inline script 又要等 CSSOM 就绪，于是**解析期就被它卡住**
   整个 DOM 建不出来（document.body 恒为 null）。
   字体已统一由 index.html 的 JS 动态插入加载（见 web/index.html / public/index.html），
   覆盖同样的家族（Nunito / Playfair Display / Cinzel 都在其中），所以这里删掉不影响字形。
   §7.36 / §14.22 / §14.24 记这条，**不要改回 @import**。 */
/* vibe单词 —— 移动端优先样式（底部四键 + 顶部查词） */
:root {
  --bg: #f4f6fb;
  /* 环境光斑：磨砂皮肤的身份感，页面底层与全屏引导页共用同一份 */
  --ambient:
    radial-gradient(52rem 30rem at 88% -8%, rgba(86, 102, 245, .08), transparent 62%),
    radial-gradient(40rem 26rem at -14% 24%, rgba(20, 154, 104, .05), transparent 60%),
    radial-gradient(46rem 30rem at 50% 118%, rgba(217, 119, 6, .04), transparent 62%);
  --card: rgba(255, 255, 255, .66);
  --card-solid: #ffffff;
  --card-line: rgba(255, 255, 255, .65);
  --ink: #1a2032;
  --ink-body: #3a4258;
  --ink2: #667089;
  --ink3: #c2c7d6;
  --brand: #5666f5;
  --brand-soft: rgba(86, 102, 245, .10);
  --green: #149a68;  --green-soft: rgba(20, 154, 104, .12);
  --amber: #d97706;  --amber-soft: rgba(217, 119, 6, .12);
  --red: #ef5350;    --red-soft: rgba(239, 83, 80, .11);
  --violet: #6b4de6; --violet-soft: rgba(107, 77, 230, .10);
  --note-bg: rgba(255, 241, 180, .6);
  --note-border: #e2c67a;
  --note-ink: #97700a;
  --soft: rgba(23, 28, 46, .045);
  --soft2: rgba(23, 28, 46, .08);
  --toast-bg: rgba(23, 28, 46, .92);
  --tabbar-bg: rgba(255, 255, 255, .72);
  --topbar-bg: rgba(244, 246, 251, .7);
  --line: rgba(23, 28, 46, .09);
  --boot-rule: #b9c2d8;
  --boot-dot: #848fae;
  /* 统一圆角刻度：控件 12 / 列表项与小面板 16 / 卡片 20（胶囊仍 999） */
  --r-ctl: 12px;
  --r-item: 16px;
  --r-card: 20px;
  --radius: var(--r-card);
  --shadow: 0 1px 2px rgba(23, 28, 46, .04), 0 12px 32px -16px rgba(23, 28, 46, .10);
  --shadow-lift: 0 2px 4px rgba(23, 28, 46, .06), 0 18px 40px -18px rgba(23, 28, 46, .18);
  --ease: cubic-bezier(.22, .8, .32, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.42, .55, 1);
  --tab-h: 62px;
  --tabbar-pad: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  color-scheme: light;

  /* ===== 风格轴令牌（data-style）=====
     上面是「薄雾留白」的取值，它同时是回退值：JS 没跑起来时页面仍是完整可用的界面。
     另外三套皮肤在文件末尾只改这些令牌 + 少量结构覆写，不复制规则集。 */
  --font-custom: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-ui: var(--font-custom);
  --font-disp: var(--font-ui);   /* 词条、大数字等展示位 */
  --font-num: var(--font-ui);
  --font-label: var(--font-ui);
  --blur: blur(18px) saturate(160%);
  --on-brand: #ffffff;
  --btn-sh: 0 4px 12px -6px rgba(86, 102, 245, .32);
  --btn-sh-hover: 0 6px 16px -6px rgba(86, 102, 245, .38);
  --rule: var(--line);
  --pad-card: 18px;
  --pad-word: 24px 18px;
  --wc-align: center;
  --wc-justify: center;
  --r-pill: 999px;
  --num-w: 800;
  --num-track: -.5px;
  --label-w: 700;
  --label-track: .5px;
  --label-tf: none;
  --tag-tf: none;
  --tag-track: 0px;
  --hw-size: 40px;
  --hw-w: 800;
  --hw-track: .5px;
}
/* 深色模式：只覆写变量，规则集完全共用 */
:root[data-theme="dark"] {
  --bg: #0e1220;
  --ambient:
    radial-gradient(52rem 30rem at 88% -8%, rgba(125, 138, 255, .09), transparent 62%),
    radial-gradient(40rem 26rem at -14% 24%, rgba(56, 199, 144, .045), transparent 60%),
    radial-gradient(46rem 30rem at 50% 118%, rgba(157, 139, 255, .05), transparent 62%);
  --card: rgba(255, 255, 255, .075);
  --card-solid: #171c2e;
  --card-line: rgba(255, 255, 255, .11);
  --ink: #e9ecf6;
  --ink-body: #c3c9dd;
  --ink2: #8f97b2;
  --ink3: #565e7a;
  --brand: #7d8aff;
  --brand-soft: rgba(125, 138, 255, .15);
  --green: #38c790;  --green-soft: rgba(56, 199, 144, .15);
  --amber: #f0a13c;  --amber-soft: rgba(240, 161, 60, .15);
  --red: #f2635f;    --red-soft: rgba(242, 99, 95, .14);
  --violet: #9d8bff; --violet-soft: rgba(157, 139, 255, .15);
  --note-bg: rgba(240, 200, 90, .10);
  --note-border: rgba(240, 200, 90, .35);
  --note-ink: #d9b95c;
  --soft: rgba(255, 255, 255, .05);
  --soft2: rgba(255, 255, 255, .10);
  --toast-bg: rgba(56, 62, 86, .96);
  --tabbar-bg: rgba(15, 19, 33, .78);
  --topbar-bg: rgba(14, 18, 32, .72);
  --line: rgba(255, 255, 255, .09);
  --boot-rule: #414b6e;
  --boot-dot: #6f7aa4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .28), 0 12px 32px -16px rgba(0, 0, 0, .5);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .34), 0 18px 40px -18px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
/* 底色光斑只在这一层，卡片半透明+模糊后才透出层次 */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: var(--ambient);
}
/* 磨砂质感统一加在主要容器上（只有薄雾留白保留模糊，其余皮肤把 --blur 设为 none） */
.card, .task-btn, .wordcard, .popup, .setup-card, .noise-panel {
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 固定视口：html/body 不滚动（手机上拖不动页面），滚动只发生在 main 容器内部 */
html, body { margin: 0; padding: 0; height: 100%; overscroll-behavior: none; }
body {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15.5px; line-height: 1.65;
}
button { font-family: inherit; cursor: pointer; }
a { color: var(--brand); text-decoration: none; }
::selection { background: var(--brand-soft); }
input, textarea, select, button { font-size: 16px; } /* 防止 iOS 聚焦缩放 */

/* ================= 动画 ================= */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } }

/* 视图入场：轻微上移 + 放大，比纯 fadeUp 更「跟手」 */
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.99); } to { opacity: 1; transform: none; } }
/* 卡片切换：新词从右侧滑入，旧词向左滑出 */
@keyframes cardIn { from { opacity: 0; transform: translate3d(34px, 0, 0) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes cardOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate3d(-30px, 0, 0) scale(.97); } }
/* 翻面展开：带一点 3D 透视，弱化 display 切换的生硬感 */
@keyframes unfold { from { opacity: 0; transform: perspective(700px) rotateX(-10deg) translateY(10px); } to { opacity: 1; transform: none; } }
/* 弹层 / 区块左右滑入（列表 ↔ 文章） */
@keyframes slideFromRight { from { opacity: 0; transform: translate3d(26px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes slideFromLeft { from { opacity: 0; transform: translate3d(-26px, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translate3d(0, 100%, 0); } to { transform: none; } }
@keyframes sheetDown { from { transform: none; } to { transform: translate3d(0, 100%, 0); } }
@keyframes maskOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes icoPop { 0% { transform: translateY(0) scale(.82); } 60% { transform: translateY(-3px) scale(1.1); } 100% { transform: translateY(-1px) scale(1); } }
@keyframes okPulse { 0% { transform: scale(.97); } 55% { transform: scale(1.02); } 100% { transform: scale(1); } }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* 仅动画 transform/opacity（合成层），避免逐帧重绘阴影。
   入场统一用 backwards：动画结束后释放 transform，:active / :hover 反馈才不会被终值锁死 */
.el-in { animation: fadeUp .32s var(--ease-out) backwards; }
.el-in-r { animation: slideFromRight .34s var(--ease-out) backwards; }
.el-in-l { animation: slideFromLeft .34s var(--ease-out) backwards; }
.el-pop { animation: popIn .3s var(--spring) backwards; }
/* 列表交错入场：JS 用 --i 指定序号 */
.stagger > * { animation: fadeUp .34s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 42ms); }
:where(.view-quiet) .stagger > * { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .stagger > *, .gb-row { animation-delay: 0ms !important; }
  .boot, .boot *, .boot *::before, .boot *::after { animation: none !important; transition: none !important; }
}

/* ================= 顶栏：品牌 + 查词搜索框 ================= */
.topbar {
  flex-shrink: 0; position: relative; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.theme-btn {
  flex-shrink: 0; border: none; cursor: pointer;
  width: 38px; height: 38px; border-radius: var(--r-ctl);
  background: var(--card-solid); color: var(--ink2);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  transition: transform .16s var(--spring), background-color .25s var(--ease), color .25s;
}
.theme-btn:active { transform: scale(.88); }
.theme-btn svg { width: 18px; height: 18px; display: block; }
.brand { display: flex; align-items: center; gap: 6px; font-size: 16px; flex-shrink: 0; }
.topsearch {
  flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 4px 4px 10px;
  transition: border-color .2s, box-shadow .2s;
}
.topsearch:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.topsearch .ts-ico { display: flex; color: var(--ink2); }
.topsearch .ts-ico svg { width: 15px; height: 15px; }
.topsearch input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 15px; padding: 6px 0; -webkit-appearance: none; appearance: none;
}
.topsearch input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ts-clear {
  border: none; background: rgba(125, 125, 125, .16); color: var(--ink2); padding: 4px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: 50%; width: 22px; height: 22px; flex-shrink: 0;
  transition: color .15s, background-color .15s, transform .12s;
}
.ts-clear:hover { color: var(--ink); background: rgba(125, 125, 125, .28); }
.ts-clear:active { transform: scale(.9); }
.ts-clear svg { width: 12px; height: 12px; display: block; }
.ts-go {
  border: none; background: var(--brand); color: var(--on-brand); border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; padding: 7px 13px; flex-shrink: 0;
}
.ts-go:active { transform: scale(.95); }

/* 桌面悬浮微 Dock：默认移动端隐藏，>=768px 在媒体查询中激活 */
.desktop-dock { display: none; }

/* ================= 底部四键导航 ================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--tabbar-bg);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px -18px rgba(23, 28, 46, .4);
}
/* 软键盘弹起（app.js 探测后挂 html.kbd-open）：收起底部导航栏，
   把键盘上方的整条空间让给输入区；键盘收起后自动还原 */
html.kbd-open .tabbar { display: none; }
html.kbd-open main { padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
/* 滑动指示胶囊：跟随当前 tab 的图标，用 transform 位移 */
.tab-ind {
  position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none;
  border-radius: var(--r-pill); background: var(--brand-soft); opacity: 0;
  will-change: transform, width, height;
  transition: transform .34s var(--spring), width .34s var(--spring), height .34s var(--spring), opacity .2s;
}
.tab {
  position: relative; z-index: 1; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--tab-h); color: var(--ink2); padding: 6px 0;
  transition: color .22s var(--ease), transform .12s var(--ease);
}
.tab:active { transform: scale(.92); }
.tab .ico { font-size: 20px; line-height: 1; filter: grayscale(.35); transition: filter .24s var(--ease); }
.tab .ico svg { width: 21px; height: 21px; display: block; }
.tab .lb { font-family: var(--font-label); font-size: 11.5px; font-weight: 600; letter-spacing: var(--label-track); transition: color .22s var(--ease); }
.tab.active { color: var(--brand); }
.tab.active .ico { filter: none; transform: translateY(-1px); animation: icoPop .38s var(--spring) backwards; }
.badge {
  position: absolute; top: 8px; right: calc(50% - 24px);
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--red); color: #fff; border-radius: 999px;
  font-size: 11px; font-style: normal; line-height: 17px; text-align: center;
  animation: popIn .3s var(--spring) backwards;
}
.badge:empty { display: none; }

main {
  flex: 1; min-height: 0; width: 100%;
  max-width: 720px; margin: 0 auto;
  display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 12px 14px calc(var(--tabbar-pad) + 18px);
}
.view { display: none; }
.view.active { display: block; flex: 1 0 auto; }
/* App 壳里切回已经进过的页面时 show() 会挂 .view-quiet：不再重播入场动画，否则每次切标签都慢半拍 */
.view.active:where(:not(.view-quiet)) > * { animation: viewIn .4s var(--ease-out) backwards; }
.view.active > *:nth-child(2) { animation-delay: .06s; }
.view.active > *:nth-child(3) { animation-delay: .12s; }
.view.active > *:nth-child(4) { animation-delay: .18s; }
.view.active > *:nth-child(n + 5) { animation-delay: .22s; }
/* 首页：上半区签到，下半区 新词/复习，撑满固定视口
   （用 flex 逐级拉伸撑满，不依赖百分比高度：滚动容器里 min-height:100% 不可靠） */
#view-home.active { display: flex; flex-direction: column; }
#homeMain { flex: 1 0 auto; display: flex; flex-direction: column; gap: 16px; }
.home-top { flex: 1; display: flex; flex-direction: column; justify-content: center; }

/* 每日一句：压在报头之上的一句英文 + 汉译。不成卡片，只靠字阶与留白分层 */
.dq { text-align: center; }
.dq-en { margin: 0; font-family: var(--font-disp); font-size: 15px; line-height: 1.55; color: var(--ink-body); }
.dq-by { font-style: normal; margin-left: 5px; font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.dq-zh { margin: 4px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink2); }

/* ================= 卡片 / 按钮 ================= */
.card {
  background: var(--card); border: 1px solid var(--card-line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: var(--pad-card); margin-bottom: 14px;
  animation: viewIn .4s var(--ease-out) backwards;
}
/* 同上：安静页里的卡片不重播入场。:where 让优先级和 .card 持平，卡片上另挂的动画类照常生效 */
:where(.view-quiet) > .card { animation: none; }
.card h3 { margin: 0 0 12px; font-size: 15.5px; }
.btn {
  position: relative;
  border: none; border-radius: var(--r-ctl); padding: 13px 20px; min-height: 46px;
  font-size: 15.5px; font-weight: 600;
  transition: transform .16s var(--spring), box-shadow .22s var(--ease), opacity .2s, filter .2s;
}
.btn:active { transform: scale(.955); }
.btn.primary { background: var(--brand); color: var(--on-brand); box-shadow: var(--btn-sh); }
.btn.ghost { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.note { background: var(--note-bg); color: var(--note-ink); }
.btn.star { background: var(--soft); color: var(--ink2); }
.btn.star.on { background: var(--amber-soft); color: var(--amber); }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: max(0px, calc(var(--r-ctl) - 2px)); min-height: 40px; }
.btn.reveal { width: 100%; background: var(--brand-soft); color: var(--brand); margin-top: 18px; animation: popIn .3s var(--spring) backwards; transition: opacity .18s, transform .18s var(--ease); }
.btn.reveal.hiding { opacity: 0; transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero-actions.center { justify-content: center; }
.hero-actions .btn { flex: 1; min-width: 150px; }
.hint { color: var(--ink2); font-size: 13px; margin: 8px 0 0; }
kbd { background: var(--soft2); border-radius: 4px; padding: 0 5px; font-size: 11px; }
code { background: var(--soft); border-radius: 6px; padding: 1px 6px; font-size: 13px; }

/* ================= 首页：签到（上半） ================= */
.checkin-hero {
  width: 100%; text-align: center;
  padding: 30px 20px 22px; margin-bottom: 0;
  animation: fadeUp .38s var(--ease-out) backwards;
}
.ci-date { color: var(--ink2); font-size: 13px; }
.ci-big { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 12px; }
.ci-big b { font-family: var(--font-num); font-size: 56px; line-height: 1; font-weight: var(--num-w); color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: var(--num-track); }
.ci-big i { font-style: normal; color: var(--ink2); font-size: 13px; }
.ci-big.bump b { display: inline-block; animation: fireBump .62s var(--spring); }
@keyframes fireBump { 0% { transform: scale(.7); } 55% { transform: scale(1.3) translateY(-4px); } 100% { transform: scale(1); } }
.checkin-hero .ci-btn { margin-top: 22px; min-width: 210px; border-radius: var(--r-pill); padding: 14px 20px; font-size: 16.5px; }
.checkin-hero .ci-btn:disabled { background: var(--green-soft); color: var(--green); opacity: 1; box-shadow: none; }
.ci-hint { color: var(--ink2); font-size: 12.5px; margin-top: 14px; }
.ci-days { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.ci-dot {
  width: 19px; height: 19px; border-radius: 7px; background: var(--soft2); color: var(--bg);
  font-size: 11px; font-style: normal; line-height: 19px; text-align: center; flex-shrink: 0;
  animation: popIn .26s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 22ms);
}
.ci-dot.on { background: var(--green); color: #fff; }
.ci-dot.today { box-shadow: 0 0 0 2px var(--brand); }
.ci-cap { color: var(--ink2); font-size: 11.5px; width: 100%; text-align: center; margin-top: 2px; }

/* ================= 首页：新词 / 复习（下半） ================= */
.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.task-btn {
  border: 1px solid var(--card-line); background: var(--card); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 24px 12px 22px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: transform .18s var(--spring), box-shadow .25s var(--ease);
  animation: popIn .42s var(--spring) backwards; animation-delay: calc(.15s + var(--i, 0) * .1s);
}
.task-btn:active { transform: scale(.94); }
.task-btn .tb-count { font-family: var(--font-num); font-size: 40px; font-weight: var(--num-w); line-height: 1.25; color: var(--brand); font-variant-numeric: tabular-nums; letter-spacing: var(--num-track); }
.task-btn .tb-label { font-family: var(--font-label); font-size: 16px; font-weight: var(--label-w); letter-spacing: var(--label-track); text-transform: var(--label-tf); }
.task-btn .tb-sub { font-size: 11.5px; color: var(--ink2); }
.tb-review .tb-count { color: var(--green); }
.task-btn.zero .tb-count, .task-btn.zero .tb-sub { color: var(--green); }

/* ================= 首页：下半区（词书进度 + 今日阅读，共用一张卡） ================= */
.home-foot { margin-bottom: 0; }
.home-foot .hp-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hp-book { font-family: var(--font-label); font-size: 13px; letter-spacing: var(--label-track); color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-num { font-family: var(--font-num); font-size: 14px; font-weight: var(--num-w); color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: var(--num-track); flex-shrink: 0; }
.home-foot .progress { margin-top: 9px; }
.hr {
  display: block; width: 100%; margin-top: 12px; padding: 12px 0 0;
  border: 0; border-top: 1px solid var(--rule); background: none;
  text-align: left; color: var(--ink); transition: transform .18s var(--spring);
}
.hr:active { transform: scale(.985); }
/* 右下角常驻白噪音浮标（46px，占 x 330–376 / y 722–768），磨砂与硬壳两套皮肤里首页阅读行正好走到它上方，给文字留出避让区 */
.hr-t { display: block; max-width: calc(100% - 32px); font-family: var(--font-disp); font-size: 15.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-m { display: block; max-width: calc(100% - 32px); font-size: 11.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-go { color: var(--brand); margin-left: 6px; }

/* ================= 背单词（首页内嵌） ================= */
/* 撑满固定视口：卡片自动长高吸收大屏空白，评分键贴在卡片下沿 */
#studyWrap { flex: 1 0 auto; display: flex; flex-direction: column; }
#studyCard { flex: 1 0 auto; display: flex; flex-direction: column; }
#studySpelling { flex: 1 0 auto; margin-bottom: 0; }
#wordCard { flex: 1 0 auto; }
#studyEmpty, #studyDone { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: center; }
.study-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; animation: fadeUp .3s var(--ease-out) backwards; }
.study-head .progress { flex: 1; }
.study-head .progress-text { flex-shrink: 0; }
.progress { height: 7px; background: var(--soft2); border-radius: 99px; overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: var(--brand); border-radius: 99px; transition: width .55s var(--ease-out); }
.progress-text { color: var(--ink2); font-size: 12px; transition: color .2s; min-width: 92px; text-align: right; }

.wordcard {
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-card);
  padding: var(--pad-word); text-align: var(--wc-align); box-shadow: var(--shadow);
  min-height: 320px; display: flex; flex-direction: column; justify-content: center;
  will-change: transform, opacity; backface-visibility: hidden;
}
.wordcard.in { animation: cardIn .36s var(--ease-out) backwards; }
.wordcard.out { animation: cardOut .17s var(--ease) forwards; }
/* 出牌衔接：评分提交后旧卡 + 评分行 + 提示整组左滑淡出，再渲染下一张（!important 覆盖行内动画） */
#studyCard.leaving > * { animation: cardOut .19s var(--ease) forwards !important; pointer-events: none; }
.wc-tags { display: flex; gap: 6px; justify-content: var(--wc-justify); margin-bottom: 12px; }
.tag { font-size: 11px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand); font-weight: 600; text-transform: var(--tag-tf); letter-spacing: var(--tag-track); }
.tag:empty { display: none; }
.tag.review { background: var(--amber-soft); color: var(--amber); }
.tag.extra { background: var(--violet-soft); color: var(--violet); }
.tag.stage { background: var(--soft2); color: var(--ink2); font-weight: 400; }
.wc-word { font-family: var(--font-disp); font-size: var(--hw-size); font-weight: var(--hw-w); letter-spacing: var(--hw-track); word-break: break-word; transition: filter .25s var(--ease); }
.wc-phon { color: var(--ink2); font-size: 15px; margin-top: 4px; }
.wc-front-sent {
  margin-top: 14px; padding: 10px 14px; border-radius: var(--r-ctl);
  background: var(--soft); color: var(--ink); font-size: 13.5px; line-height: 1.55;
  text-align: left; display: flex; flex-direction: column;
  animation: fadeIn .24s var(--ease-out); max-height: 130px; overflow-y: auto;
}
.wc-front-sent-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; width: 100%;
}
.wc-front-sent-text { flex: 1; word-break: break-word; }
.wc-front-sent-text .tw.cur { color: var(--brand); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.wc-front-sent .sent-tts { flex-shrink: 0; margin-top: -1px; width: 26px; height: 26px; }
.wc-front-sent .cn {
  display: none; margin-top: 6px; color: var(--ink2); font-size: 13px; line-height: 1.5;
  border-top: 1px dashed var(--line); padding-top: 6px; width: 100%;
}
.wordcard.open .wc-front-sent .cn { display: block; animation: fadeIn .28s var(--ease-out); }
.wc-body { display: grid; grid-template-rows: 0fr; grid-auto-rows: 0fr; margin-top: 0; transition: grid-template-rows .42s var(--ease-out), margin-top .42s var(--ease-out); }
.wc-body > * { min-height: 0; overflow: hidden; }
.wordcard.open .wc-body { grid-template-rows: 1fr; grid-auto-rows: 1fr; margin-top: 16px; }
.wcb-in { overflow: hidden; min-height: 0; font-size: 16px; text-align: left; }
.wordcard.open .wcb-in { overflow-y: auto; max-height: 46vh; }
.wordcard.open .wcb-in > * { animation: fadeUp .34s var(--ease-out) backwards; animation-delay: .1s; }
.wc-trans .pos { color: var(--ink2); font-style: italic; margin-right: 5px; }
.wc-sent { margin-top: 12px; background: var(--soft); border-radius: var(--r-ctl); padding: 12px 14px; font-size: 14px; }
.wc-sent .cn { color: var(--ink2); font-size: 13px; margin-top: 4px; }
.wc-sent b { color: var(--brand); }
.wc-extra { margin-top: 12px; font-size: 13px; color: var(--ink2); text-align: left; }
.wc-extra .sec { margin-top: 8px; }
.wc-extra .sec b { color: var(--ink2); }
.wc-exam { margin-top: 12px; background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; text-align: left; }
.wc-exam .q { font-weight: 600; }
.wc-exam .choices { margin: 8px 0 4px; }
.wc-exam .choices div { padding: 3px 0; }
.wc-exam .right { color: var(--green); font-weight: 700; }
.wc-exam .explain { color: var(--ink2); font-size: 13px; margin-top: 6px; }
.wc-exam .showAns { border: none; background: none; color: var(--brand); font-size: 13px; padding: 0; }
.wc-trans .none, .popup-body .none { color: var(--ink2); font-size: 13px; }

.grade-row { display: flex; gap: 10px; margin-top: 14px; transition: gap .22s var(--ease-out); }
.btn.grade { flex: 1; padding: 15px 0; font-size: 15.5px; min-height: 54px; }
.grade-row.on { animation: cardIn .3s var(--ease-out) backwards; }   /* 评分行随卡片从右滑入（衔接） */
.grade-row.on .btn.grade { animation: popIn .32s var(--spring) backwards; }
.grade-row.on .btn.grade:nth-child(2) { animation-delay: .06s; }
.grade-row.on .btn.grade:nth-child(3) { animation-delay: .12s; }
/* 二段式标记：点「忘记」后忘记键动画收起、「继续」拉长占满整行 */
.btn.grade.forget { transition: flex-grow .22s var(--ease-out), opacity .18s var(--ease-out); overflow: hidden; white-space: nowrap; }
.grade-row.mark-forget { gap: 0; }
.grade-row.mark-forget .btn.forget { flex-grow: 0; opacity: 0; border: 0; pointer-events: none; }
.btn.forget { background: var(--red-soft); color: var(--red); }
.btn.fuzzy { background: var(--amber-soft); color: var(--amber); }
.btn.know { background: var(--green-soft); color: var(--green); }
.btn.grade.sel { transform: scale(.94); }
.study-note { text-align: center; color: var(--ink2); font-size: 12.5px; margin-top: 10px; min-height: 18px; transition: color .25s; }
.study-note.flash { animation: noteFlash .5s var(--ease-out) backwards; }
@keyframes noteFlash { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- TTS 播放 ---------- */
.wc-wordline { display: flex; align-items: center; justify-content: var(--wc-justify); gap: 10px; }
.tts-btn {
  border: none; background: var(--brand-soft); color: var(--brand);
  width: 34px; height: 34px; min-width: 34px; border-radius: 50%; font-size: 15px; line-height: 1;
  transition: transform .12s var(--ease), background .2s;
}
.tts-btn:active { transform: scale(.86); }
.tts-btn svg { width: 16px; height: 16px; display: block; margin: 0 auto; }
.wc-sent .tts-btn { width: 26px; height: 26px; min-width: 26px; font-size: 12px; margin-left: 6px; vertical-align: middle; }
.wc-sent .tts-btn svg { width: 13px; height: 13px; }
.wordcard.blur-word .wc-word { filter: blur(14px); user-select: none; }

/* ---------- 拼写默写 ---------- */
.group-spelling {
  display: flex; flex-direction: column; justify-content: space-between; gap: 0;
  min-height: min(440px, 58dvh); padding: clamp(20px, 4.5vw, 34px);
  border-radius: var(--r-card); animation: cardIn .32s var(--ease-out) backwards;
}
.spell-top { flex-shrink: 0; }
.spell-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink2); font-size: 13px; }
.spell-kicker {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 600;
}
#spellProgress { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--ink2); }
.spell-steps { display: flex; gap: 6px; margin-top: 12px; }
.spell-step { flex: 1; height: 6px; border-radius: 99px; background: var(--soft2); transition: background-color .25s var(--ease), box-shadow .25s var(--ease); }
.spell-step.cur { background: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.spell-step.done.ok { background: var(--green); }
.spell-step.done.bad { background: var(--red); }
.spell-stage { margin: auto 0; padding: 20px 8px 16px; text-align: center; }
.spell-meaning {
  margin: 0 0 12px; font-size: clamp(20px, 4.4vw, 26px); line-height: 1.5; text-align: center;
  color: var(--ink); font-weight: 500; overflow-wrap: anywhere;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.spell-sense { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 8px; max-width: 100%; }
.spell-sense:first-child { font-size: clamp(20px, 4.4vw, 26px); font-weight: 500; }
.spell-sense:nth-child(n+2) { font-size: clamp(15px, 3.2vw, 17px); color: var(--ink2); font-weight: 400; }
.spell-pos {
  font-family: var(--font-disp); font-style: italic; font-size: 12px; font-weight: 500;
  color: var(--ink2); background: var(--soft); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 7px; flex-shrink: 0;
}
.spell-cn { color: inherit; font-weight: inherit; }
.spell-score { display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; flex-wrap: wrap; }
.spell-score-num { font-family: var(--font-num); font-size: clamp(32px, 7vw, 42px); font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; line-height: 1.1; }
.spell-score-sep, .spell-score-total { font-family: var(--font-num); font-size: clamp(20px, 4.5vw, 24px); color: var(--ink2); font-variant-numeric: tabular-nums; }
.spell-score-unit { font-size: 16px; color: var(--ink2); margin-left: 6px; font-weight: 500; }
.spell-hint { margin: 4px 0 0; color: var(--ink2); font-size: 13px; text-align: center; line-height: 1.6; font-variant-numeric: tabular-nums; }
.spell-dock { width: 100%; max-width: 520px; margin: 12px auto 0; display: flex; flex-direction: column; align-items: stretch; }
.group-spelling:not([data-phase="summary"]) .spell-dock { min-height: 148px; justify-content: flex-start; }
.spell-next { width: 100%; margin-top: 12px; min-height: 46px; border-radius: var(--r-ctl); }
.group-spelling .spell-result { min-height: 36px; overflow-wrap: anywhere; }
.group-spelling[data-phase="feedback"] #btnSpellCheck { display: none; }
.spell-row { display: flex; gap: 8px; align-items: center; }
.spell-row.on { animation: popIn .28s var(--spring) backwards; }
.spell-row input {
  flex: 1; min-width: 0; height: 46px; box-sizing: border-box;
  border: 1.5px solid var(--line); border-radius: var(--r-ctl); padding: 10px 14px;
  font-size: 17px; font-weight: 500; outline: none; text-align: center; letter-spacing: 1.2px;
  background: var(--card-solid); color: var(--ink);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.spell-row input::placeholder { letter-spacing: 0; font-size: 14px; font-weight: 400; color: var(--ink3); }
.spell-row input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.spell-row input:disabled { opacity: 1; -webkit-text-fill-color: var(--ink); }
.spell-row input.is-warn { border-color: var(--amber); background: color-mix(in srgb, var(--amber-soft) 55%, var(--card-solid)); }
.spell-row input.is-ok { border-color: var(--green); background: color-mix(in srgb, var(--green-soft) 60%, var(--card-solid)); }
.spell-row input.is-bad { border-color: var(--red); background: color-mix(in srgb, var(--red-soft) 55%, var(--card-solid)); }
.spell-row .tts-btn { flex-shrink: 0; order: -1; width: 46px; min-width: 46px; height: 46px; border-radius: var(--r-ctl); }
.spell-row .btn { flex-shrink: 0; min-width: 72px; min-height: 46px; border-radius: var(--r-ctl); }
.spell-result {
  text-align: center; font-size: 14px; margin-top: 10px; min-height: 36px; line-height: 1.6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.sr-box {
  display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px;
  padding: 6px 14px; border-radius: 10px; background: var(--soft); max-width: 100%;
}
.sr-box.ok { background: var(--green-soft); }
.sr-box.warn { background: var(--amber-soft); }
.sr-box.bad { background: var(--red-soft); }
.spell-result .sr-ok { color: var(--green); font-weight: 600; }
.spell-result .sr-bad { color: var(--red); font-weight: 600; }
.spell-result .sr-hint { color: var(--ink2); font-size: 13px; }
.spell-result .sr-phon { font-family: var(--font-disp); font-size: 13px; color: var(--ink2); margin-left: 2px; }
.spell-result .sr-diff { font-family: var(--font-disp); font-size: 17px; font-weight: 600; letter-spacing: 1px; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 4px; }
.spell-result .sr-diff b.bad { color: var(--red); }
.group-spelling[data-phase="summary"] { justify-content: flex-start; gap: 10px; }
.group-spelling[data-phase="summary"] .spell-stage { margin: 6px 0 0; padding: 8px 0 4px; }
.group-spelling[data-phase="summary"] .spell-dock { flex: 1; max-width: 580px; margin-top: 2px; justify-content: space-between; }
.group-spelling[data-phase="summary"] .spell-result { flex: 1; justify-content: flex-start; align-items: stretch; margin-top: 0; }
.spell-sum-note { font-size: 13px; color: var(--ink2); margin-bottom: 10px; text-align: center; }
.spell-sum-note.ok { color: var(--green); font-weight: 600; }
.spell-sum-list { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; -webkit-overflow-scrolling: touch; text-align: left; padding: 2px; }
.spell-sum-row {
  display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--soft); color: var(--ink); text-align: left; font-size: 13px; cursor: pointer;
  transition: transform .14s var(--spring), border-color .2s, background-color .2s;
}
.spell-sum-row:hover { border-color: var(--brand); background: var(--card-solid); }
.spell-sum-row:active { transform: scale(.985); }
.spell-sum-row .ssr-w { font-family: var(--font-disp); font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.spell-sum-row .ssr-c { color: var(--ink2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spell-sum-row .ssr-tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.spell-sum-row.ok .ssr-tag { background: var(--green-soft); color: var(--green); }
.spell-sum-row.retry .ssr-tag { background: var(--amber-soft); color: var(--amber); }
.spell-sum-row.bad .ssr-tag { background: var(--red-soft); color: var(--red); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); } 40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); } 80% { transform: translateX(4px); }
}
.spell-row input.shake { animation: shake .3s var(--ease); border-color: var(--red); }

.empty { text-align: center; padding: 40px 18px; }
.empty p { color: var(--ink2); }
.empty-ico { width: 56px; height: 56px; color: var(--green); margin-bottom: 8px; animation: popIn .4s var(--spring) backwards; }

/* ================= 阅读 ================= */
/* 左滑删除：红底删除键垫在卡片底下，滑过阈值才淡入
   （磨砂卡片是半透明的，删除键不藏好会隔着卡片透出来） */
.art-row { position: relative; margin-bottom: 10px; }
.art-swipe-del {
  position: absolute; top: 0; right: 0; bottom: 0; width: 84px;
  border: none; background: var(--red); color: #fff;
  font-size: 14px; font-weight: 700; letter-spacing: 2px;
  border-radius: var(--r-item);
  opacity: 0; pointer-events: none;
  transition: opacity .18s var(--ease);
}
.art-row.revealed .art-swipe-del { opacity: 1; pointer-events: auto; }
.art-swipe-del:active { filter: brightness(.92); }
.read-list .art-item {
  position: relative;
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-item); padding: 15px 16px; margin-bottom: 0;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .2s var(--spring), box-shadow .25s var(--ease);
  will-change: transform;
}
.art-item.swiped { box-shadow: var(--shadow-lift); }
.art-item:active { transform: scale(.985); }
.art-item .t { font-weight: 700; font-size: 16px; padding-right: 30px; }
/* 触屏设备用左滑，不显示右上角 ✕；桌面鼠标保留点按删除 */
.art-item .art-del {
  display: none;
  position: absolute; top: 6px; right: 6px; z-index: 1;
  width: 32px; height: 32px; border: none; background: none;
  color: var(--ink3); font-size: 15px; line-height: 32px; border-radius: 9px;
  transition: color .2s, background-color .2s, transform .16s var(--spring);
}
.art-item .art-del:active { color: var(--red); background: var(--red-soft); transform: scale(.9); }
.art-item .m { color: var(--ink2); font-size: 12px; margin-top: 5px; display: flex; gap: 8px 10px; flex-wrap: wrap; align-items: center; }
.art-item .m .ok { color: var(--green); }
.art-item .m .warn { color: var(--red); font-weight: 700; }
.gen-top { text-align: center; }
.gen-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gen-btns .btn { width: 100%; }
.gen-hint { color: var(--ink2); font-size: 12px; margin-top: 8px; transition: opacity .25s; }
.read-head { margin-bottom: 10px; }
.exam-flag {
  display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 3px 12px; margin-bottom: 8px;
}
.exam-flag:empty { display: none; }

.article h2 { margin: 0 0 6px; font-size: 21px; line-height: 1.35; }
.art-meta { color: var(--ink2); font-size: 12px; margin-bottom: 10px; display: flex; gap: 8px 10px; flex-wrap: wrap; }
.art-outside { font-size: 12.5px; color: var(--ink2); background: var(--soft); border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; line-height: 1.7; }
.art-outside:empty { display: none; }
.art-outside .ow { color: var(--red); }
.art-text { font-size: 16.5px; line-height: 1.95; color: var(--ink-body); }
.art-text p { margin: 0 0 14px; text-indent: 0; }
.art-text .plabel { color: var(--brand); font-weight: 800; margin-right: 6px; }
.tw {
  color: var(--brand); font-weight: 700; cursor: pointer;
  border-bottom: 2px solid #bfc9ff; padding: 0 1px; border-radius: 4px;
  background: rgba(86, 102, 245, 0);
  transition: background-color .22s var(--ease), border-color .22s var(--ease), color .22s var(--ease);
}
.tw:active, .tw:hover { background: var(--brand-soft); }
.tw.old { color: var(--green); border-bottom-color: #9fdcc2; }
.tw.out { color: var(--red); border-bottom-color: #ffb4b4; background: var(--red-soft); }
.tw.known { color: var(--green); border-bottom: 2px dotted #9fdcc2; }
.tw.known::after { content: '✓'; font-size: 10px; vertical-align: super; margin-left: 1px; color: var(--green); }
.tw.forgot { color: var(--red); border-bottom: 2px dashed var(--red); animation: noteFlash .4s var(--ease-out) backwards; }
.art-sent { background: var(--soft); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 15px; }
.art-sent .cn { color: var(--ink2); font-size: 13px; margin-top: 3px; }

/* 真题题目区 */
.quiz-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 20px 0 4px; padding-top: 14px; border-top: 1px dashed var(--line);
}
.quiz-head b { font-size: 15.5px; }
.quiz-head span { color: var(--ink2); font-size: 12px; }
.q-item { background: var(--soft); border-radius: var(--r-item); padding: 14px 14px; margin-top: 12px; animation: fadeUp .34s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 55ms); }
.q-item .qt { font-weight: 600; line-height: 1.6; }
.q-item .qtype { font-size: 11px; color: var(--brand); background: var(--card-solid); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin-left: 6px; white-space: nowrap; }
.q-item .qc { margin-top: 10px; }
.q-item .qc div {
  padding: 11px 12px; border-radius: var(--r-ctl); background: var(--card-solid); border: 1px solid var(--line);
  margin-bottom: 7px; cursor: pointer; font-size: 14.5px; line-height: 1.6;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .16s var(--spring), box-shadow .2s;
}
.q-item .qc div b { color: var(--ink2); margin-right: 4px; }
.q-item .qc div:active { border-color: var(--brand); transform: scale(.99); }
.q-item .qc div.right { border-color: var(--green); background: var(--green-soft); animation: okPulse .42s var(--spring); }
.q-item .qc div.wrong { border-color: var(--red); background: var(--red-soft); animation: shake .34s var(--ease); }
.q-item .qe { color: var(--ink2); font-size: 13.5px; margin-top: 8px; display: none; line-height: 1.8; }
.q-item.answered .qe { display: block; animation: fadeUp .25s var(--ease) backwards; }

/* ================= 阅读笔记 ================= */
.art-notes .nc { color: var(--brand); font-weight: 700; }
.art-note-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.art-note-form textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; background: var(--card-solid);
  outline: none; resize: vertical; font-family: inherit; line-height: 1.7; min-height: 76px;
}
.art-note-form textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.art-note-form .btn { align-self: flex-start; }
.an-item { background: var(--note-bg); border: 1px solid var(--note-border); border-radius: 12px; padding: 11px 13px; margin-top: 10px; animation: fadeUp .3s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.an-quote {
  border-left: 3px solid var(--note-border); padding: 2px 0 2px 10px; margin-bottom: 6px;
  color: var(--ink2); font-size: 13px; line-height: 1.6; font-style: italic;
}
.an-text { font-size: 14.5px; line-height: 1.75; word-break: break-word; white-space: pre-wrap; }
.an-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; color: var(--ink2); font-size: 11.5px; }
.an-foot .note-del { border: none; background: none; color: var(--ink3); font-size: 12.5px; padding: 4px 6px; }
.an-foot .note-del:hover, .an-foot .note-del:active { color: var(--red); }

/* ================= 词库 ================= */
.dict-bar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.dict-search-wrap { position: relative; display: flex; align-items: center; width: 100%; }
.dict-search-wrap input {
  width: 100%;
  border: 1px solid var(--card-line); border-radius: var(--r-ctl); padding: 13px 40px 13px 15px; font-size: 16px; outline: none; background: var(--card);
  -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow);
}
.dict-search-wrap input:focus { box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow); }
.dict-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  border: none; background: rgba(125, 125, 125, .16); color: var(--ink2); padding: 4px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border-radius: 50%; width: 22px; height: 22px; flex-shrink: 0;
  transition: color .15s, background-color .15s, transform .12s;
}
.dict-clear:hover { color: var(--ink); background: rgba(125, 125, 125, .28); }
.dict-clear:active { transform: translateY(-50%) scale(.9); }
.dict-clear svg { width: 12px; height: 12px; display: block; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--card-line); background: var(--card-solid); color: var(--ink2); border-radius: var(--r-pill); padding: 8px 15px; font-size: 13.5px; box-shadow: var(--shadow); transition: background-color .22s var(--ease), color .22s var(--ease), transform .18s var(--spring), box-shadow .22s; }
.chip:active { transform: scale(.94); }
.chip.active { background: var(--ink); color: var(--bg); border-color: transparent; box-shadow: 0 6px 16px -8px rgba(23, 28, 46, .5); }
.dict-count { color: var(--ink2); font-size: 12px; margin: 4px 2px 8px; }
.book-chips { margin: 2px 2px 10px; }
.book-chips .chip { font-size: 12.5px; padding: 7px 12px; }
.book-chips .chip.active { background: var(--brand); }
.dict-item {
  background: var(--card-solid); border: 1px solid var(--card-line); border-radius: var(--r-item); margin-bottom: 8px; overflow: hidden; box-shadow: var(--shadow);
  animation: fadeUp .3s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 22ms);
  transition: box-shadow .25s var(--ease), transform .2s var(--spring);
}
.dict-item .row1 { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px; cursor: pointer; transition: background-color .2s; }
.dict-item .row1:active { background: var(--soft); }
.dict-item .dw { font-weight: 700; font-size: 16px; min-width: 90px; }
.dict-item .dp { color: var(--ink2); font-size: 12px; }
.dict-item .dt { color: var(--ink2); font-size: 13px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dict-item .ds { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--soft2); color: var(--ink2); white-space: nowrap; }
.dict-item .ds.new { background: var(--brand-soft); color: var(--brand); }
.dict-item .ds.learning { background: var(--amber-soft); color: var(--amber); }
.dict-item .ds.mastered { background: var(--green-soft); color: var(--green); }
.dict-item .ds.extra { background: var(--violet-soft); color: var(--violet); }
.dict-item .detail { display: grid; grid-template-rows: 0fr; grid-auto-rows: 0fr; opacity: 0; transition: grid-template-rows .34s var(--ease-out), opacity .26s var(--ease); }
.dict-item .detail > * { min-height: 0; overflow: hidden; }
.dict-item .detail > .dk {
  overflow: hidden; min-height: 0;
  padding: 0 14px; font-size: 14px; background: var(--soft); transition: padding .34s var(--ease-out);
}
.dict-item.open .detail { grid-template-rows: 1fr; opacity: 1; }
.dict-item.open .detail > .dk { padding: 12px 14px; border-top: 1px dashed var(--line); }
.detail .cn-line { margin-bottom: 4px; }
.detail .cn-line .pos { color: var(--ink2); font-style: italic; margin-right: 6px; }
.detail .sent { background: var(--card-solid); border-radius: 10px; padding: 8px 12px; margin-top: 8px; font-size: 13px; }
.detail .meta { color: var(--ink2); font-size: 12px; margin-top: 8px; }
.dict-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.dict-acts .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.dict-star-at { color: var(--ink2); font-size: 11.5px; }
.star-mark { color: var(--amber); font-style: normal; font-size: 12px; margin-left: 5px; vertical-align: 2px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--ink2); font-size: 13px; margin: 14px 0; }

/* ================= 查词页 ================= */
.search-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.search-result { text-align: left; animation: fadeUp .3s var(--ease) backwards; }
.sr-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.sr-word { font-size: 28px; font-weight: 800; }
.sr-extra { margin-top: 10px; font-size: 13px; color: var(--ink2); }
.sr-status { margin-top: 12px; color: var(--ink2); font-size: 12.5px; background: var(--soft); border-radius: 10px; padding: 8px 12px; }
.search-result .btn { margin-top: 12px; }
.sr-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sr-acts .btn { margin-top: 12px; }
.search-result .wc-exam { margin-top: 14px; }
.search-result .cn-line { margin-bottom: 4px; }
.search-result .pos { color: var(--ink2); font-style: italic; margin-right: 6px; }
.search-result .sent { background: var(--soft); border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 14px; }
.search-result .sent .cn { color: var(--ink2); font-size: 13px; margin-top: 3px; }

/* ================= 设置 ================= */
.field { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.field > span { width: 120px; color: var(--ink2); font-size: 14px; flex-shrink: 0; }
.field input, .sel {
  flex: 1; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 11px 12px; font-size: 16px; outline: none; min-width: 0;
  transition: border-color .2s, box-shadow .2s; background: var(--card-solid); color: var(--ink);
}
.field input:focus, .sel:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
/* 开关（拼写模式） */
.switch { position: relative; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; border: none; padding: 0; flex: none; }
.switch .sl {
  display: block; width: 52px; height: 30px; border-radius: 999px; background: var(--soft2);
  position: relative; cursor: pointer; transition: background-color .25s var(--ease);
}
.switch .sl::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .28s var(--spring); will-change: transform;
}
.switch input:checked + .sl { background: var(--brand); }
.switch input:checked + .sl::after { transform: translateX(22px); }
.field .switch { margin-left: auto; }
#apiStatus { background: var(--soft); border-radius: 10px; padding: 10px 12px; margin-top: 10px; }

/* ================= 点词弹层 ================= */
.popup-mask {
  position: fixed; inset: 0; background: rgba(15, 20, 40, .38);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 50;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .22s var(--ease-out) backwards;
}
.popup-mask.closing { animation: maskOut .2s var(--ease) forwards; }
.popup {
  background: var(--card); border: 1px solid var(--card-line); border-bottom: none; border-radius: var(--r-card) var(--r-card) 0 0; width: 100%; max-width: 720px;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); max-height: 76vh; overflow-y: auto;
  animation: sheetUp .34s var(--ease-out) backwards; will-change: transform;
}
.popup-mask.closing .popup { animation: sheetDown .22s var(--ease) forwards; }
.popup::before {
  content: ''; display: block; width: 40px; height: 4px; border-radius: 99px;
  background: var(--soft2); margin: -6px auto 10px;
}
.popup-head { display: flex; align-items: baseline; gap: 10px; }
.popup-head .pw { font-size: 24px; font-weight: 800; }
.popup-head .p-phon { color: var(--ink2); font-size: 13px; }
.popup-close { margin-left: auto; border: none; background: var(--soft2); width: 34px; height: 34px; border-radius: 50%; font-size: 14px; transition: transform .16s var(--spring), background-color .2s, color .2s; }
.popup-close:active { transform: scale(.86) rotate(90deg); }
.popup-body { margin-top: 10px; font-size: 15px; }
.popup-body .cn-line { margin-bottom: 3px; }
.popup-body .pos { color: var(--ink2); font-style: italic; margin-right: 6px; }
.popup-body .sent { background: var(--soft); border-radius: 10px; padding: 9px 12px; margin-top: 10px; font-size: 13.5px; }
.popup-body .sent .cn { color: var(--ink2); font-size: 12.5px; margin-top: 3px; }
.popup-body textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card-solid); color: var(--ink);
  font-size: 15px; font-family: inherit; outline: none; resize: vertical; margin: 8px 0;
}
.popup-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.popup-actions .btn { flex: 1 1 44%; min-width: 130px; }

/* ================= 一组复盘（直接内嵌背词主舞台，迷你背词卡平铺） ================= */
.group-break {
  flex: 1 0 auto; display: flex; flex-direction: column;
  max-width: 820px; width: 100%; margin-inline: auto;
  will-change: transform, opacity;
}
.group-break.closing { animation: cardOut .17s var(--ease) forwards; pointer-events: none; }
.gb-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px;
  margin-bottom: 12px;
}
.gb-head-l { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gb-k {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 600;
}
.gb-tip { font-size: 12px; color: var(--ink3); }
.gb-tally { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.gb-tpill {
  display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--r-pill);
  font-family: var(--font-num); font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.gb-tpill.total { background: var(--soft2); color: var(--ink2); }
.gb-tpill.know { background: var(--green-soft); color: var(--green); }
.gb-tpill.fuzzy { background: var(--amber-soft); color: var(--amber); }
.gb-tpill.forget { background: var(--red-soft); color: var(--red); }
.gb-tpill.easy { background: var(--violet-soft); color: var(--violet); }
.gb-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  align-content: start; flex: 0 0 auto;
}
.gb-row {
  appearance: none; font: inherit; color: inherit;
  position: relative; display: flex; flex-direction: column; justify-content: flex-start;
  align-items: stretch;
  width: 100%; height: 100%; padding: 18px 20px 16px;
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-card);
  box-shadow: var(--shadow); text-align: var(--wc-align); cursor: pointer;
  will-change: transform, opacity; backface-visibility: hidden;
  transition: transform .18s var(--spring), border-color .2s var(--ease), box-shadow .2s var(--ease);
  animation: fadeUp .26s var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 32ms);
}
.gb-row:active { transform: scale(.985); }
@media (hover: hover) and (pointer: fine) {
  .gb-row:not(:active):hover {
    border-color: color-mix(in srgb, var(--brand) 48%, var(--card-line));
    transform: translateY(-2px);
  }
  .gb-row:hover .gb-spk { background: var(--brand); color: #fff; }
}
.gb-row.speaking {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow);
}
.gb-row.speaking .gb-spk { background: var(--brand); color: #fff; animation: icoPop .36s var(--spring); }
.gb-row.fuzzy { border-color: color-mix(in srgb, var(--amber) 34%, var(--card-line)); }
.gb-row.forget { border-color: color-mix(in srgb, var(--red) 36%, var(--card-line)); }
.gb-tags { margin-bottom: 10px; flex-wrap: wrap; width: 100%; justify-content: var(--wc-justify); }
.gb-row.know .gb-g { background: var(--green-soft); color: var(--green); }
.gb-row.fuzzy .gb-g { background: var(--amber-soft); color: var(--amber); }
.gb-row.forget .gb-g { background: var(--red-soft); color: var(--red); }
.gb-row.easy .gb-g { background: var(--violet-soft); color: var(--violet); }
.gb-wordline { gap: 8px; width: 100%; }
.gb-w {
  font-family: var(--font-disp); font-size: clamp(22px, 3vw, 27px);
  font-weight: var(--hw-w); letter-spacing: var(--hw-track);
  line-height: 1.15; color: var(--ink); word-break: break-word;
}
.gb-spk {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; min-width: 30px; font-size: 13px;
}
.gb-spk svg { width: 14px; height: 14px; display: block; margin: 0 auto; }
.gb-phon { font-size: 13.5px; color: var(--ink2); margin-top: 3px; line-height: 1.35; width: 100%; text-align: var(--wc-align); }
.gb-d {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  width: 100%; text-align: left; font-size: 13.5px; line-height: 1.55; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gb-d .pos { color: var(--ink2); font-style: italic; margin-right: 5px; font-weight: 500; }
.gb-sense-sep { color: var(--ink3); }
.gb-actions { margin-top: 14px; flex-shrink: 0; }
@media (min-width: 768px) {
  .gb-row {
    border: 1px solid var(--card-line);
    box-shadow: 0 14px 36px -14px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
}
@media (min-width: 560px) and (max-width: 719px) {
  .gb-row:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 6px); justify-self: center; }
}
@media (max-width: 559px) {
  .gb-head { gap: clamp(4px, 0.8dvh, 8px) 8px; margin-bottom: clamp(6px, 1.2dvh, 12px); }
  .gb-head-l { gap: 6px; }
  .gb-k { font-size: 11px; padding: 2px 8px; }
  .gb-tip { font-size: 11px; }
  .gb-tally { gap: 4px; }
  .gb-tpill { font-size: 10.5px; padding: 2px 7px; }
  .gb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(8px, 1.5dvh, 14px) clamp(8px, 2.2vw, 12px); }
  .gb-row { padding: clamp(10px, 1.8dvh, 18px) clamp(10px, 2.8vw, 16px) clamp(9px, 1.5dvh, 15px); }
  .gb-row:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 4px); justify-self: center; }
  .gb-tags { margin-bottom: clamp(4px, 0.9dvh, 8px); gap: 5px; }
  .gb-tags .tag { font-size: 10px; padding: 1px 6px; }
  .gb-wordline { gap: clamp(4px, 1.4vw, 8px); }
  .gb-w { font-size: clamp(14.5px, min(4vw, 2.3dvh), 21px); }
  .gb-spk { width: clamp(24px, 3.2dvh, 28px); height: clamp(24px, 3.2dvh, 28px); min-width: clamp(24px, 3.2dvh, 28px); }
  .gb-spk svg { width: clamp(12px, 1.6dvh, 14px); height: clamp(12px, 1.6dvh, 14px); }
  .gb-phon { font-size: clamp(11px, 1.5dvh, 13px); margin-top: 2px; }
  .gb-d { margin-top: clamp(6px, 1.1dvh, 10px); padding-top: clamp(5px, 0.9dvh, 8px); font-size: clamp(11.5px, 1.55dvh, 13px); line-height: 1.45; -webkit-line-clamp: 2; }
}
@media (min-width: 720px) {
  .gb-list:has(> :nth-child(5)) {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
  }
  .gb-list:has(> :nth-child(5)) .gb-row {
    grid-column: span 2;
    padding: 14px 16px;
  }
  .gb-list:has(> :nth-child(5)) .gb-row:nth-last-child(2):nth-child(3n+1) {
    grid-column: 2 / span 2;
  }
  .gb-list:has(> :nth-child(5)) .gb-row:last-child:nth-child(3n+2) {
    grid-column: 4 / span 2;
  }
  .gb-list:has(> :nth-child(5)) .gb-row:last-child:nth-child(3n+1) {
    grid-column: 3 / span 2;
  }
  .gb-list:has(> :nth-child(5)) .gb-d {
    margin-top: 8px;
    padding-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }
}

/* ================= 视口高度约束（背词卡 / 组复盘锁定视口，防止自评/操作键滚出屏外） ================= */
@media (min-height: 480px) {
  /* 只在首页真正处于背词状态时锁整页滚动。
     2026-11-16 修复：原选择器 main:has(#studyCard:not([style*="none"])) 不带视图限定，
     背过一次词后 #studyCard 的内联 display 变成 flex 且切页不还原，规则就在任何页面命中，
     把 main 的 overflow-y 压成 hidden —— 表现为「能点击但页面完全不能上下滑动」。 */
  main:has(#view-home.active #studyCard:not([style*="none"])),
  main:has(#view-home.active #groupBreak:not([style*="none"])) {
    overflow-y: hidden;
  }
  #view-home.active:has(#studyCard:not([style*="none"])),
  #view-home.active:has(#groupBreak:not([style*="none"])) {
    flex: 1 1 0;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  #studyWrap,
  [data-style="candy"] #studyWrap {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .study-head {
    flex-shrink: 0;
    margin-bottom: 10px;
  }
  #studyCard {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  #wordCard,
  #studyCard .wordcard {
    flex: 1 1 0;
    min-height: 0;
  }
  .wordcard.open {
    justify-content: flex-start;
  }
  .wordcard.open .wc-body {
    flex: 1 1 0;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
  }
  .wordcard.open .wcb-in {
    max-height: none;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  #triageRow,
  #gradeRow,
  #studyNote {
    flex-shrink: 0;
  }
  #gradeRow,
  #triageRow {
    margin-top: 10px;
  }
  #studyNote {
    margin-top: 6px;
    font-size: 12px;
    min-height: 0;
  }
  #studyNote:empty {
    display: none;
  }
  #groupBreak {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .gb-head {
    flex-shrink: 0;
    margin-bottom: 8px;
    gap: 6px 8px;
  }
  .gb-list {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    align-content: start;
    padding-bottom: 2px;
  }
  .gb-actions {
    flex-shrink: 0;
    margin-top: 10px;
  }
}

@media (max-width: 767px) and (min-height: 480px) {
  .wordcard.open {
    padding-top: 18px;
    padding-bottom: 16px;
  }
  .wordcard.open .wc-front-sent {
    max-height: clamp(84px, 14dvh, 130px);
    flex-shrink: 0;
  }
  .gb-actions,
  #gradeRow,
  #triageRow {
    margin-top: clamp(8px, 1.3dvh, 14px);
  }
  .gb-actions .btn.grade,
  #gradeRow .btn.grade,
  #triageRow .btn.grade {
    min-height: clamp(44px, 6.2dvh, 54px);
    padding: clamp(10px, 1.4dvh, 15px) 0;
    font-size: clamp(14.5px, 1.85dvh, 15.5px);
  }
  body:has(#studyCard:not([style*="none"])) .noise,
  body:has(#groupBreak:not([style*="none"])) .noise,
  :root:has(#studyCard:not([style*="none"])) .noise,
  :root:has(#groupBreak:not([style*="none"])) .noise,
  body:has(#studyCard:not([style*="none"])) .noise-btn,
  body:has(#groupBreak:not([style*="none"])) .noise-btn {
    display: none !important;
  }
}

@media (max-width: 767px) and (min-height: 760px) {
  .gb-list:not(:has(> :nth-child(7))) {
    align-content: space-evenly;
  }
  .gb-list:not(:has(> :nth-child(7))) .gb-row {
    min-height: clamp(120px, 17.5dvh, 168px);
    justify-content: center;
  }
  .gb-list:not(:has(> :nth-child(7))) .gb-d {
    -webkit-line-clamp: 3;
  }
}

@media (min-width: 768px) and (min-height: 480px) {
  main:has(#studyCard:not([style*="none"])),
  main:has(#groupBreak:not([style*="none"])) {
    padding-bottom: 18px;
  }
  .wordcard.open {
    padding-top: 22px;
    padding-bottom: 20px;
  }
  .wordcard.open .wc-front-sent {
    max-height: 104px;
    flex-shrink: 0;
  }
}

/* ================= 发现新版本（热更新弹窗） ================= */
/* 同 #groupBreak：要盖过 z-index 60 的白噪音悬浮键 */
#updatePopup { z-index: 70; }
.up-sheet { display: flex; flex-direction: column; }
.up-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.up-k { font-family: var(--font-label); font-size: 11.5px; font-weight: 700; letter-spacing: var(--label-track); color: var(--brand); }
.up-v { font-family: var(--font-num); font-size: 12px; font-weight: var(--num-w); color: var(--ink2); font-variant-numeric: tabular-nums; letter-spacing: var(--num-track); }
.up-notes { margin: 10px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-body); }
.up-hint { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink2); }
.up-notes:empty, .up-hint:empty { display: none; }
.up-actions { display: flex; gap: 10px; margin-top: 16px; }
.up-actions .btn { flex: 1; }
/* 下载进度条（10-29）：全部走语义令牌，9 皮肤 × 明暗自动适配，零皮肤分支 */
.up-progress { margin: 4px 0 12px; }
.up-progress-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.up-progress-label { font-size: 12.5px; font-weight: 600; color: var(--ink-body); }
.up-progress-pct {
  font-family: var(--font-num); font-size: 12.5px; font-weight: var(--num-w);
  color: var(--brand); font-variant-numeric: tabular-nums;
}
.up-progress-track {
  height: 7px; border-radius: 999px; background: var(--soft2);
  overflow: hidden; position: relative;
}
.up-progress-bar {
  height: 100%; width: 0%; border-radius: 999px;
  background: var(--brand);
  transition: width .28s var(--ease-out);
}
/* 服务器没给 Content-Length（total=-1）时走不确定态：条纹来回跑，不谎报百分比 */
.up-progress.indeterminate .up-progress-bar {
  width: 38%;
  animation: upIndet 1.15s var(--ease) infinite;
}
@keyframes upIndet {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(300%); }
}
.up-progress-size {
  margin-top: 6px; font-family: var(--font-num); font-size: 11px;
  color: var(--ink2); font-variant-numeric: tabular-nums; text-align: right;
}
/* 降级：偏好减少动效时不跑条纹 */
@media (prefers-reduced-motion: reduce) {
  .up-progress-bar { transition: none; }
  .up-progress.indeterminate .up-progress-bar { animation: none; width: 100%; opacity: .45; }
}


/* ---------- 句子拆解 ---------- */
.btn.parse { background: var(--brand-soft); color: var(--brand); }
.p-trans { margin-top: 4px; font-size: 14px; background: var(--soft); border-radius: 12px; padding: 10px 13px; }
.p-trans b { color: var(--ink2); font-weight: 600; }
.p-sectitle { font-size: 13px; font-weight: 800; margin: 14px 0 8px; }
.p-sectitle i { font-style: normal; font-weight: 400; color: var(--ink2); font-size: 11.5px; margin-left: 4px; }

.chain { display: flex; flex-direction: column; }
.chain-node { display: flex; align-items: flex-start; gap: 8px; animation: fadeUp .3s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
.chain-node .role { flex-shrink: 0; min-width: 44px; text-align: center; font-size: 11px; color: #fff; border-radius: 6px; padding: 2px 7px; margin-top: 2px; }
.chain-node .chain-text { font-size: 14.5px; border-radius: 8px; padding: 2px 7px; line-height: 1.7; }
.chain-link {
  width: 2px; height: 12px; margin-left: 28px; background: var(--soft2); position: relative; margin-top: 1px; margin-bottom: 1px;
  transform-origin: top center; animation: barGrow .3s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 70ms);
}
.chain-link::after {
  content: ''; position: absolute; bottom: -1px; left: -2.5px;
  border-left: 3.5px solid transparent; border-right: 3.5px solid transparent; border-top: 5px solid var(--soft2);
}
.c0 { background: #e8f0fe; color: #1a56c4; } .r0 { background: #5b8af7; }
.c1 { background: #fde8e8; color: #c43030; } .r1 { background: #ef5350; }
.c2 { background: #ede7f6; color: #5e35b1; } .r2 { background: #7e57c2; }
.c3 { background: #e0f2f1; color: #00695c; } .r3 { background: #26a69a; }
.c4 { background: #fef3e2; color: #b26a00; } .r4 { background: #f6a723; }
.c5 { background: #fce4ec; color: #ad1457; } .r5 { background: #ec407a; }
/* 深色下成分色块换成暗色透明底 + 高亮文字 */
:root[data-theme="dark"] .c0 { background: rgba(91, 138, 247, .18); color: #a7c0ff; }
:root[data-theme="dark"] .c1 { background: rgba(239, 83, 80, .18); color: #ff9e9b; }
:root[data-theme="dark"] .c2 { background: rgba(126, 87, 194, .22); color: #cbb3f0; }
:root[data-theme="dark"] .c3 { background: rgba(38, 166, 154, .18); color: #7fd6cc; }
:root[data-theme="dark"] .c4 { background: rgba(246, 167, 35, .18); color: #ffcf7d; }
:root[data-theme="dark"] .c5 { background: rgba(236, 64, 122, .18); color: #f79cc0; }
/* 深色下目标词下划线降亮，避免刺眼 */
:root[data-theme="dark"] .tw { border-bottom-color: rgba(125, 138, 255, .45); }

.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 10px; animation: fadeUp .3s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 65ms); }
.step-no {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.step-body { flex: 1; background: var(--soft); border-radius: 10px; padding: 8px 12px; }
.step-body b { font-size: 13.5px; color: var(--brand); }
.step-body p { margin: 2px 0 0; font-size: 13px; line-height: 1.75; color: var(--ink-body); }
.step-link { margin-left: 10px; }

.gram-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gram-chip {
  border: 1px solid var(--line); background: var(--card-solid); color: var(--ink);
  border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 600;
  animation: popIn .28s var(--spring) backwards; animation-delay: calc(var(--i, 0) * 45ms);
  transition: border-color .18s var(--ease), background-color .18s var(--ease), transform .18s var(--spring);
}
.gram-chip:active { transform: scale(.94); background: var(--brand-soft); }
.gd-head { display: flex; align-items: center; gap: 8px; }
.gd-name { font-size: 19px; font-weight: 800; }
.gd-brief { margin-top: 8px; font-size: 14px; }
.gd-formula {
  margin-top: 10px; background: var(--brand-soft); color: var(--brand);
  border-radius: 10px; padding: 9px 13px; font-size: 13.5px; font-weight: 700;
}
.gd-explain { margin-top: 10px; font-size: 13.5px; line-height: 1.85; color: var(--ink-body); }
.gd-exs { margin-top: 10px; }
.gd-ex { background: var(--soft); border-radius: 10px; padding: 9px 12px; margin-bottom: 7px; font-size: 13.5px; }
.gd-ex .cn { color: var(--ink2); font-size: 12.5px; margin-top: 2px; }
.p-back { border: none; background: none; color: var(--brand); font-size: 13px; padding: 4px 0; margin-bottom: 8px; transition: transform .16s var(--spring), opacity .2s; }
.p-back:active { transform: translateX(-3px); opacity: .7; }
.p-load { text-align: center; color: var(--ink2); padding: 20px 0; font-size: 14px; animation: fadeUp .26s var(--ease-out) backwards; }
.p-load::after { content: ''; display: block; width: 26px; height: 26px; margin: 10px auto 0; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.ai-ask-box { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.ai-ask-row { display: flex; gap: 8px; align-items: center; }
.ai-ask-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; background: var(--card-solid); color: var(--ink); font: inherit; font-size: 13px; }
.ai-ask-row input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.ai-ask-result { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--soft); color: var(--ink); font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.ai-ask-result:empty { display: none; }
.sense-line.sense-primary { background: var(--brand-soft); border-radius: 6px; padding: 3px 6px; margin-left: -6px; margin-right: -6px; }
.sense-key { display: inline-block; margin-right: 5px; color: var(--brand); font-size: 10px; font-style: normal; font-weight: 800; letter-spacing: .04em; }

/* 骨架屏：网络请求期间保留版式，避免内容跳变 */
.skel { position: relative; overflow: hidden; background: var(--soft2); border-radius: 10px; }
.skel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: translateX(-100%); animation: shimmer 1.15s var(--ease-out) infinite;
}
:root[data-theme="dark"] .skel::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent);
}
.dict-list.loading { opacity: .5; transition: opacity .2s var(--ease); }

/* ================= Toast ================= */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-pad) + 16px);
  background: var(--toast-bg); color: #fff; padding: 11px 20px;
  border-radius: 999px; font-size: 14px; z-index: 99; max-width: 86vw; text-align: center;
  opacity: 0; pointer-events: none; will-change: transform, opacity;
  transform: translate3d(-50%, 16px, 0) scale(.96);
  transition: opacity .2s var(--ease), transform .32s var(--spring);
}
.toast.show { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); }
.toast.out { opacity: 0; transform: translate3d(-50%, 10px, 0) scale(.98); transition-duration: .24s; }

/* ================= 白噪音 ================= */
.noise {
  position: fixed; right: 14px; bottom: calc(var(--tabbar-pad) + 14px); z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
/* 面板弹出不得挤压圆形按钮：面板绝对定位到按钮上方，按钮位置永远锚在视口右下 */
.noise-panel { position: absolute; right: 0; bottom: calc(100% + 10px); }
.noise-btn {
  position: relative; width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; border: none;
  background: var(--card-solid); box-shadow: var(--shadow); font-size: 19px; color: var(--ink2);
  transition: transform .18s var(--spring), background-color .25s var(--ease);
}
.noise-btn:active { transform: scale(.9); }
.noise-btn.playing { background: var(--brand-soft); }
.noise-btn svg { width: 21px; height: 21px; display: block; margin: 0 auto; }
/* 呼吸光环用伪元素 transform/opacity 动画，避免逐帧重绘 box-shadow */
.noise-btn.playing::before {
  content: ''; position: absolute; inset: -1px; border-radius: 50%;
  border: 2px solid rgba(86, 102, 245, .45); pointer-events: none;
  animation: ringOut 2s var(--ease-out) infinite; will-change: transform, opacity;
}
@keyframes ringOut { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
.noise-panel {
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-item); box-shadow: var(--shadow);
  padding: 14px; width: 232px; transform-origin: bottom right;
}
.noise-panel.on { animation: panelPop .26s var(--spring) backwards; transform-origin: bottom right; }
@keyframes panelPop { from { opacity: 0; transform: translateY(10px) scale(.9); } }
.np-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.np-types { display: flex; flex-wrap: wrap; gap: 6px; }
.np-type { border: none; background: var(--soft2); color: var(--ink2); border-radius: 999px; padding: 7px 12px; font-size: 12.5px; transition: background-color .22s var(--ease), color .22s var(--ease), transform .16s var(--spring); }
.np-type.active { background: var(--brand); color: #fff; }
.np-type:active { transform: scale(.94); }
.np-vol { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; }
.np-vol-lab { font-size: 12.5px; color: var(--ink2); flex-shrink: 0; }
.np-vol input { flex: 1; accent-color: var(--brand); }

/* ============ 全屏新手引导：整屏分页，左滑推进 ============ */
.intro {
  position: fixed; inset: 0; z-index: 200;
  background-color: var(--bg); background-image: var(--ambient); color: var(--ink);
  display: flex; flex-direction: column;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 22px calc(16px + env(safe-area-inset-bottom, 0px));
  opacity: 0; transition: opacity .26s var(--ease-out);
}
.intro.on { opacity: 1; }
.intro-bar { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; }
.intro-bar .intro-mark { width: 58px; height: 21px; margin: 0; }
.intro-skip { border: none; background: none; padding: 4px 2px; font-size: 13px; color: var(--ink2); transition: color .2s var(--ease); }
/* 横向归拖拽，纵向仍可滚：pan-y 必须写在真正的滚动容器上，否则合成器会先接管手势并发 pointercancel */
.intro-view { flex: 1 1 auto; min-height: 0; overflow: hidden; touch-action: pan-y; }
.intro-track { display: flex; height: 100%; will-change: transform; }
.intro-pg { position: relative; flex: 0 0 100%; width: 100%; display: flex; flex-direction: column; justify-content: flex-start; overflow: hidden; }
/* 单页内容超高时只在本页内滚，不把整条 track 顶开。
   顶部留固定高度的白：每页的眉标落在同一条横线上，翻页时视线不用重新找位置 */
.intro-in { max-height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8.5vh 0 10px; touch-action: pan-y; }
.intro-pg.seen .intro-in > * { animation: fadeUp .44s var(--ease-out) backwards; }
.intro-pg.seen .intro-in > :nth-child(2) { animation-delay: .05s; }
.intro-pg.seen .intro-in > :nth-child(3) { animation-delay: .1s; }
.intro-pg.seen .intro-in > :nth-child(4) { animation-delay: .15s; }
.intro-pg.seen .intro-in > :nth-child(5) { animation-delay: .2s; }
.intro-k { font-family: var(--font-label); font-size: 11.5px; font-weight: 700; letter-spacing: var(--label-track); color: var(--brand); }
.intro-h { font-family: var(--font-disp); font-size: 23px; font-weight: 800; line-height: 1.42; letter-spacing: -.2px; margin: 9px 0 0; }
.intro-p { font-size: 13.5px; line-height: 1.8; color: var(--ink2); margin: 15px 0 0; }
/* 中文可以逐字断行，但「一次次」「用上一次」是一个词，不许被行宽劈开 */
.nb { white-space: nowrap; }
.intro-hint { display: flex; align-items: center; gap: 7px; margin-top: 22px; font-size: 11.5px; letter-spacing: .06em; color: var(--ink2); }
/* 抖的是「往左拖」这个手势本身，所以只给手指那条箭头加动画；指针设备改看静态键帽 */
.intro-hint .ih-ar { display: inline-block; font-family: var(--font-num); margin-left: 7px; animation: nudgeX 1.9s var(--ease) infinite; }
.ih-key { display: none; }
.kc {
  display: inline-block; min-width: 21px; margin: 0 3px; padding: 1px 5px;
  border: 1px solid var(--line); border-radius: 5px; background: var(--card-solid);
  font-family: var(--font-num); font-size: 11px; line-height: 1.35; text-align: center; color: var(--ink);
}
@keyframes nudgeX { 0%, 62%, 100% { transform: translateX(0); opacity: .5; } 78% { transform: translateX(-7px); opacity: 1; } }
/* 复习排期：一条真正的遗忘曲线。记忆每衰减到低点，正好有下一次复习把它拉回顶部；
   锯齿一个比一个浅，间隔一个比一个长，这就是背了不忘的全部机制。
   曲线跟着正文往下走一段再出现，让空白沉到页面底部而不是横在中间 */
.intro-axis { margin-top: 118px; }
.ia-cap, .intro-cap { font-family: var(--font-label); font-size: 11px; letter-spacing: var(--label-track); color: var(--ink2); }
.intro-cap { margin-top: 30px; }
.ia-curve { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.ia-base { stroke: var(--rule); stroke-width: 1; }
.ia-run { fill: none; stroke: var(--brand); stroke-width: 1.3; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 0; opacity: .82; }
.intro-pg.seen .ia-run { animation: iaDraw 1.15s var(--ease-out) .12s backwards; }
@keyframes iaDraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.intro-pg.seen .ia-dots { animation: fadeIn .5s var(--ease-out) .66s backwards; }
.ia-dot { fill: var(--brand); rx: 3.5px; ry: 3.5px; }
.ia-line { position: relative; height: 15px; margin-top: 5px; }
.ia-line b { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--font-num); font-size: 11.5px; font-weight: 400; line-height: 1; color: var(--ink2); }

.intro-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
/* 13 本词库落单的那张卡横跨两列，不给它留半个空格 */
.intro-list > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.intro-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  border: 1.5px solid var(--line); background: var(--card-solid); border-radius: var(--r-item); padding: 11px 12px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), transform .18s var(--spring);
}
.intro-row:active { transform: scale(.97); }
.intro-row b { font-size: 14px; font-weight: 700; line-height: 1.4; }
.intro-row span { font-size: 11.5px; color: var(--ink2); }
.intro-row.sel { border-color: var(--brand); background: var(--brand-soft); }
.intro-row.sel span { color: var(--brand); }
.intro-chips { display: flex; gap: 8px; margin-top: 18px; }
.intro-chip {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 1.5px solid var(--line); background: var(--card-solid); border-radius: 12px; padding: 12px 0 9px;
  font-family: var(--font-num); font-size: 17px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease), transform .18s var(--spring);
}
.intro-chip i { font-family: var(--font-ui); font-style: normal; font-size: 11px; font-weight: 400; line-height: 1.2; color: var(--ink2); }
.intro-chip:active { transform: scale(.95); }
.intro-chip.sel { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.intro-chip.sel i { color: var(--brand); opacity: .8; }
.intro-ol { list-style: none; counter-reset: istep; margin: 18px 0 0; padding: 0; }
.intro-ol li { counter-increment: istep; position: relative; padding-left: 30px; margin-top: 13px; }
.intro-ol li:first-child { margin-top: 0; }
.intro-ol li::before {
  content: counter(istep); position: absolute; left: 0; top: 3px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-family: var(--font-num); font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.intro-ol b { display: block; font-size: 14px; font-weight: 700; }
.intro-ol span { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.65; color: var(--ink2); }

/* 末页的确认清单：把前两页选下来的东西回读一遍，主动作才有落点 */
.intro-sum { margin: 26px 0 0; border-top: 1px solid var(--rule); }
.intro-sum > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.intro-sum dt { font-size: 13px; color: var(--ink2); }
.intro-sum dd { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); text-align: right; }

/* 第 4、5 页页底的实机缩略：直接挂真实类名（.wordcard/.card.article/.popup），
   皮肤与明暗靠既有规则跟随，这里只压尺寸、不另造一套视觉 */
.intro-pg .im-mock { margin: 26px 0 0; min-height: 0; animation: none; }
.intro-pg .im-mock .wc-tags { margin-bottom: 9px; }
.intro-pg .im-mock .wc-word { font-size: 26px; }
.intro-pg .im-mock .wc-phon { font-size: 13px; margin-top: 2px; }
.intro-pg .im-mock .wc-trans { margin-top: 13px; font-size: 14.5px; line-height: 1.6; }
.intro-pg .im-mock .wc-sent { margin-top: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.6; }
.intro-pg .im-mock .wc-sent .cn { font-size: 12.5px; }
.intro-pg .im-mock .grade-row { margin-top: 12px; gap: 8px; }
.intro-pg .im-mock .btn, .intro-pg .im-sheet .btn { display: flex; align-items: center; justify-content: center; }
.intro-pg .im-mock .btn.grade { min-height: 46px; padding: 0; font-size: 14px; }
.intro-pg .article.im-mock h2 { font-size: 17px; line-height: 1.4; margin-bottom: 4px; }
.intro-pg .article.im-mock .art-text { font-size: 13.5px; line-height: 1.85; }
.intro-pg .article.im-mock .art-text p { margin: 0; }
.intro-pg .im-sheet { margin-top: 10px; border: 1px solid var(--card-line); border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow); }
.intro-pg .im-sheet .popup { border: 0; border-radius: 0; padding: 14px 16px 16px; animation: none; }
.intro-pg .im-sheet .popup-head .pw { font-size: 19px; }
.intro-pg .im-sheet .popup-body { margin-top: 7px; font-size: 14px; }
.intro-pg .im-sheet .popup-actions { margin-top: 13px; gap: 8px; }
.intro-pg .im-sheet .popup-actions .btn { flex: 1 1 40%; min-width: 0; min-height: 38px; padding: 0; font-size: 13px; }

.intro-foot { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; }
.intro-dots { display: flex; align-items: center; gap: 5px; }
.intro-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--soft2); transition: background .28s var(--ease), width .28s var(--ease-out); }
.intro-dots i.on { width: 17px; background: var(--brand); }
.intro-go { min-width: 116px; }
/* 手机端不占这条 foot（往右拖就是回退）；≥700px 才露出来，见下面的桌面块 */
.intro-back { display: none; }

/* ---- 向导「三问」（App 壳）：一屏只问一件事。左上角页码代替圆点，
   词库是一行一本的细线单选列表，主按钮通栏，第 2 页起左边多一个「上一步」 ---- */
.intro-q3 { padding-left: 26px; padding-right: 26px; }
.intro-q3 .intro-bar { align-items: baseline; }
.iq-step { font-family: var(--font-disp); font-size: 15px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.iq-step small { font-size: 15px; color: var(--ink3); }
/* 整页缩放下翻页位移会差零点几像素，邻页贴边的字会在视口边缘露一条细线：
   视口两侧各放出 2px、页内再收回 2px，内容位置不变，邻页的字离裁切线就有了余量 */
.intro-q3 .intro-view { margin-inline: -2px; }
.intro-q3 .intro-pg { padding-inline: 2px; }
.intro-q3 .intro-in { padding-top: 5.5vh; }
.intro-q3 .intro-h { font-family: var(--font-ui); font-size: 29px; font-weight: 600; line-height: 1.3; letter-spacing: .01em; margin: 0; }
.intro-q3 .intro-p { margin-top: 10px; line-height: 1.7; }
.iq-list { margin-top: 22px; border-bottom: 1px solid var(--line); }
.iq-opt {
  display: grid; grid-template-columns: 1fr auto 22px; align-items: baseline; gap: 12px; width: 100%;
  padding: 16px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none;
  color: inherit; text-align: left; transition: opacity .16s var(--ease);
}
.iq-opt:active { opacity: .6; }
.iq-opt b { font-size: 17px; font-weight: 500; line-height: 1.3; transition: color .2s var(--ease); }
.iq-opt span { font-family: var(--font-disp); font-size: 14px; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.iq-opt u { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--ink3); align-self: center; justify-self: end; text-decoration: none; transition: border-color .2s var(--ease); }
.iq-opt.sel b { color: var(--brand); font-weight: 600; }
.iq-opt.sel u { border-color: var(--brand); background: radial-gradient(var(--brand) 0 4.5px, transparent 5.5px); }
.intro-q3 .intro-chips { margin-top: 24px; gap: 10px; }
.intro-q3 .intro-chip {
  height: 50px; padding: 0; justify-content: center; border: 1px solid var(--rule); border-radius: 14px;
  background: none; font-family: var(--font-disp); font-size: 19px; font-weight: 400;
}
.intro-q3 .intro-chip i { display: none; }
.intro-q3 .intro-chip.sel { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.intro-q3 .intro-sum dd { font-weight: 600; }
.intro-q3 .intro-foot { flex-direction: column; align-items: stretch; gap: 14px; }
.intro-q3 .intro-dots { display: none; }
.iq-hint { margin: 0; text-align: center; font-size: 12px; color: var(--ink3); }
.iq-acts { display: flex; align-items: center; gap: 12px; }
.intro-q3 .intro-back { display: inline-block; margin: 0; padding: 14px 10px; font-size: 14px; }
.intro-q3[data-step="0"] .intro-back { display: none; }
.intro-q3 .intro-go { flex: 1 1 auto; min-height: 52px; font-size: 16px; }

/* ================= 首次设置向导 ================= */
.setup-mask {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(13, 17, 34, .55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .28s var(--ease-out) backwards;
}
.setup-mask.closing { animation: maskOut .22s var(--ease) forwards; }
.setup-card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-card); box-shadow: 0 24px 60px -12px rgba(13, 17, 34, .5);
  width: min(92vw, 400px); padding: 26px 22px 22px; text-align: center;
  max-height: 90vh; overflow-y: auto;
}
.setup-card.on { animation: cardSwap .34s var(--ease-out) backwards; }
@keyframes cardSwap { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.setup-mask.closing .setup-card { animation: popOut .22s var(--ease) forwards; }
@keyframes popOut { to { opacity: 0; transform: scale(.96); } }
/* 品牌标记：和启动页同一个 wordmark，用蒙版取当前皮肤的字色 */
.su-logo {
  width: 86px; height: 32px; margin: 0 auto; background: var(--ink);
  -webkit-mask: url("img/wordmark.png") center / 100% 100% no-repeat;
  mask: url("img/wordmark.png") center / 100% 100% no-repeat;
}
.su-title { font-size: 21px; font-weight: 800; margin-top: 12px; }
.su-sub { color: var(--ink2); font-size: 13px; margin-top: 2px; }
.setup-card .btn { width: 100%; }
.setup-card .btn:disabled { opacity: .4; }

/* ================= 词条笔记（卡片内） ================= */
.wc-notes { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.notes-title { font-size: 13px; font-weight: 700; color: var(--ink2); margin-bottom: 8px; }
.note-item {
  display: flex; align-items: flex-start; gap: 8px; background: var(--note-bg); border: 1px solid var(--note-border);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 6px; font-size: 13.5px; line-height: 1.6;
  animation: fadeUp .28s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 45ms);
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.note-item span { flex: 1; word-break: break-word; white-space: pre-wrap; }
.note-del { border: none; background: none; color: var(--ink3); font-size: 12px; padding: 0 2px; }
.note-del:hover { color: var(--red); }
.note-add { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.note-add input {
  flex: 1; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; background: var(--card-solid); color: var(--ink);
  font-size: 15px; outline: none; min-width: 0;
}

/* ================= 作业成绩 / 全文翻译 ================= */
.quiz-result {
  display: flex; align-items: center; gap: 16px;
  background: var(--brand); color: #fff;
  border-radius: var(--r-item); padding: 16px 20px; margin: 12px 0 4px;
  box-shadow: 0 8px 20px -10px rgba(86, 102, 245, .42);
  animation: scorePop .5s var(--spring) backwards;
}
@keyframes scorePop { from { opacity: 0; transform: translateY(14px) scale(.92); } }
.qr-score { font-size: 38px; font-weight: 800; line-height: 1; }
.qr-score span { font-size: 15px; font-weight: 600; margin-left: 2px; }
.qr-score .qr-num { font-size: inherit; font-weight: inherit; margin-left: 0; }
.qr-text { font-size: 13.5px; line-height: 1.7; }
.qr-text b { font-size: 14px; }
.art-actions { margin: 4px 0 10px; }
.art-actions .btn { width: 100%; }
.art-translation {
  background: var(--soft); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
  font-size: 14.5px; line-height: 1.9; color: var(--ink-body);
  animation: fadeUp .3s var(--ease) backwards;
}
.art-translation p { margin: 0 0 10px; }
.art-translation .p-sectitle { margin-top: 0; }

/* ================= 删除 / 收起 ================= */
.removing { animation: itemOut .22s var(--ease) forwards; }
@keyframes itemOut { to { opacity: 0; transform: translate3d(-14px, 0, 0) scale(.96); } }

/* ================= 指针设备：hover 反馈 ================= */
@media (hover: hover) and (pointer: fine) {
  /* hover 规则写在文件末尾，必须排除 :active，否则按压反馈会被后写的 hover 覆盖 */
  .btn:not(:disabled):not(:active):hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
  .task-btn:not(:active):hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
  .btn.primary:not(:disabled):hover { box-shadow: var(--btn-sh-hover); }
  .btn.ghost:not(:disabled):hover { background: var(--brand-soft); }
  .btn.danger:not(:disabled):hover { background: var(--red-soft); }
  .art-item:not(:active):hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
  .art-item .art-del { display: block; }
  .art-item .art-del:hover { color: var(--red); background: var(--red-soft); }
  .dict-item:hover { box-shadow: var(--shadow-lift); }
  .dict-item .row1:hover { background: var(--soft); }
  .chip:not(.active):hover { color: var(--ink); }
  .gram-chip:hover { border-color: var(--brand); background: var(--brand-soft); }
  .intro-skip:hover { color: var(--ink); }
  .intro-row:not(:active):hover { border-color: var(--brand); }
  .intro-chip:not(:active):not(.sel):hover { border-color: var(--brand); }
  .tab:hover:not(.active) { color: var(--ink); }
  .q-item .qc div:hover:not(.right):not(.wrong):not(:active) { border-color: var(--brand); background: #fbfcff; }
  .noise-btn:not(:active):hover { transform: translateY(-2px); }
  .popup-close:hover { background: var(--red-soft); color: var(--red); }
  .note-del:hover { color: var(--red); }
  a.btn:hover { filter: brightness(1.02); }
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ================= 桌面端 (>=768px)：方向 2 静奢极简无界工作台 ================= */
@media (min-width: 768px) {
  /* 1. 隐藏移动端底部悬浮栏，释放全部底部视口 */
  .tabbar { display: none !important; }

  /* 2. 左侧 72px 悬浮微 Dock (钛黑毛玻璃、微边框、呼吸高亮) */
  .desktop-dock {
    display: flex !important;
    position: fixed; left: 24px; top: 50%; transform: translateY(-50%);
    width: 68px; padding: 22px 0;
    background: var(--tabbar-bg);
    backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid var(--card-line);
    border-radius: 26px;
    box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    flex-direction: column; align-items: center; justify-content: space-between;
    z-index: 50; gap: 20px;
    max-height: calc(100dvh - 24px); overflow-y: auto; scrollbar-width: none;
    animation: fadeIn .3s var(--ease-out);
  }
  .desktop-dock::-webkit-scrollbar { display: none; }
  .dock-brand {
    display: flex; align-items: center; justify-content: center;
    width: 100%; padding-bottom: 14px; border-bottom: 1px solid var(--line);
  }
  .dock-logo {
    font-size: 20px; font-weight: 900; letter-spacing: -1px; color: var(--ink);
    font-family: var(--font-disp, -apple-system, sans-serif);
  }
  .dock-dot { color: #38bdf8; font-style: normal; }
  .dock-items {
    display: flex; flex-direction: column; gap: 14px; align-items: center; width: 100%;
  }
  .dock-item {
    position: relative; width: 46px; height: 46px; border-radius: 14px;
    border: 1px solid transparent; background: transparent; color: var(--ink2);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s var(--ease);
  }
  .dock-item .ico svg { width: 20px; height: 20px; display: block; }
  .dock-label { display: none; }
  .dock-item:hover { color: var(--ink); background: rgba(125, 125, 125, 0.12); transform: scale(1.06); }
  .dock-item.active {
    color: #38bdf8; background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 4px 16px -2px rgba(56, 189, 248, 0.25);
  }
  .dock-item .badge {
    position: absolute; top: 4px; right: 4px; min-width: 14px; height: 14px;
    border-radius: 99px; background: var(--brand); color: #fff; font-size: 9px; font-weight: 700;
    display: none; align-items: center; justify-content: center; padding: 0 3px;
  }
  .dock-item .badge:not(:empty) { display: flex; }

  /* 3. 宽屏视口拓展至 1060px，为左侧微 Dock 留出呼吸留白 */
  main {
    max-width: 1060px; margin: 0 auto;
    padding-left: 98px; padding-right: 28px;
    padding-bottom: 40px;
  }
  .topbar {
    max-width: 1060px; margin: 0 auto;
    padding-left: 98px; padding-right: 28px;
  }

  /* 5. 桌面端卡片与背词舞台：静奢微发光与极细磨砂边框 */
  .wordcard,
  .group-spelling {
    min-height: 400px;
    max-width: 820px;
    margin-inline: auto;
    width: 100%;
    border: 1px solid var(--card-line);
    box-shadow: 0 20px 54px -16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }
  .group-spelling { min-height: 380px; }
  #studyWrap {
    max-width: 820px;
    margin-inline: auto;
    width: 100%;
  }
  .triage-row, .grade-row {
    max-width: 820px;
    margin-inline: auto;
    width: 100%;
  }

  /* 首页常驻活动卡片在大屏上的居中 */
  .home-top { max-width: 820px; margin-inline: auto; width: 100%; }
  #homeMain { max-width: 820px; margin-inline: auto; width: 100%; }
  /* —— 新手引导：电脑端不是把手机那一屏拉宽，而是收进和正文同宽的一条列。
     轨道仍按视口宽滑页（intro.w 不变，拖拽/键盘/动效都不用改），只有列内的东西回到 720；
     曲线、每日词量、三档自评共用一个「插图宽度」460，列里才有第二条可对齐的竖线。 */
  .intro { --intro-col: 720px; --intro-fig: 460px; }
  .intro-bar, .intro-foot { width: min(100%, var(--intro-col)); margin-inline: auto; }
  /* margin:auto 而不是 justify-content:center：内容超高时 auto 边距自己塌成 0，页内滚动照常，不会裁掉顶部。
     底部留 13px ≥ fadeUp 的 12px 位移，否则入场动画那一拍会把滚动条闪出来一下（桌面是经典滚动条，占位可见）。 */
  .intro-in { width: min(100%, var(--intro-col)); margin: auto; padding: 18px 0 13px; }
  /* 列宽翻倍之后要收的是行长，不是字号：四套皮肤各自定了 display/body 字号（.intro-h/.intro-p/.intro-k），
     桌面块去改字号只会让 frost/deck 生效、editorial/instrument 被自己的规则挡住（皮肤分叉）。
     34em 是按字符数收，中文一行约 34 字，任何字号下落地的都是同一个阅读宽度。 */
  .intro-p { max-width: 34em; }
  .intro-axis { width: min(100%, var(--intro-fig)); margin-top: 44px; }
  .intro-chips { max-width: var(--intro-fig); }
  /* 落单的那本词库横跨 720 会扁成一条横幅，改成「名称 ← 词数」的一行式收尾 */
  .intro-list > :last-child:nth-child(odd) { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; }
  /* 回退用文本键（和「跳过」同一套语言），不占主按钮的位置也不和它抢重量；
     JS 只切 visibility，所以「下一步」的右沿在有/无上一步时不动 */
  .intro-back { display: inline-block; margin-left: auto; padding: 12px 10px; transition: color .2s var(--ease), transform .18s var(--spring); }
  .intro-back:active { transform: scale(.97); }
  /* 三块「图」共用一个宽度：曲线、词量胶囊、实机缩略。列里只有两条竖线可对齐，
     缩略卡按 720 铺满的话，三档自评会被拉成 400px 宽的大按钮，就不像「一张卡片」了 */
  .intro-pg .im-mock, .intro-pg .im-sheet { width: min(100%, var(--intro-fig)); margin-top: 20px; }
}
@media (min-width: 768px) and (max-height: 640px) {
  .desktop-dock { padding: 14px 0; gap: 10px; }
  .desktop-dock .dock-brand { padding-bottom: 8px; }
  .desktop-dock .dock-items { gap: 8px; }
}
/* 键盘提示只给真有键盘鼠标的设备：宽屏平板（≥700px 但手指）仍然该看到「向左滑动」 */
@media (min-width: 700px) and (pointer: fine) {
  .ih-touch { display: none; }
  .ih-key { display: inline; }
}
@media (max-width: 380px) {
  .brand b { display: none; }
  .ci-dot { width: 17px; height: 17px; line-height: 17px; }
  .field > span { width: 96px; }
  .ci-big b { font-size: 48px; }
  .task-btn .tb-count { font-size: 34px; }
}

/* ================= 冷启动闪屏：声波语脉 · 音标波形 =================
   以语音与声学频谱为视觉锚点，突出「听音辨义 × 原生自然朗读」的现代数字工具质感。
   构图放在网页里，跟着热更新走，不用重新打包 APK。 */
html.no-boot #boot { display: none !important; }
.boot {
  position: fixed; inset: 0; z-index: 9999; overflow: hidden; background-color: #080c14;
  color: #f8fafc; display: flex; align-items: center; justify-content: center;
  user-select: none;
}
.boot-content {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; max-width: 360px; padding: 20px;
  animation: bootContentIn .45s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.boot-glow {
  position: absolute; width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%); pointer-events: none; opacity: 0.9;
}
.boot-mark {
  position: relative; display: flex; align-items: baseline;
  font-family: var(--font-disp, -apple-system, sans-serif);
  font-size: 48px; font-weight: 800; letter-spacing: -1.5px;
  color: #ffffff; line-height: 1;
}
.boot-char-i { position: relative; display: inline-block; }
.boot-i-dot {
  position: absolute; top: 3px; left: 50%; width: 8px; height: 8px; margin-left: -4px;
  border-radius: 50%; background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8, 0 0 18px var(--brand);
  animation: bootPulseDot 1.4s ease-in-out infinite;
}

/* 音频声学频谱条 */
.boot-spectrum {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; margin-top: 24px;
}
.boot-bar {
  width: 4px; border-radius: 3px;
  background: linear-gradient(180deg, #38bdf8 0%, var(--brand) 100%);
  animation: bootSoundWave 1.2s ease-in-out infinite alternate;
}
.boot-bar:nth-child(1) { height: 12px; animation-delay: 0.1s; }
.boot-bar:nth-child(2) { height: 26px; animation-delay: 0.35s; }
.boot-bar:nth-child(3) { height: 34px; animation-delay: 0.15s; background: linear-gradient(180deg, #60a5fa 0%, #a855f7 100%); }
.boot-bar:nth-child(4) { height: 20px; animation-delay: 0.45s; }
.boot-bar:nth-child(5) { height: 10px; animation-delay: 0.2s; }

.boot-sub {
  margin-top: 20px; font-size: 11.5px; color: var(--ink2);
  letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
  animation: fadeIn .4s var(--ease-out) .15s backwards;
}
.boot-phonetic {
  font-family: "Courier Prime", monospace, sans-serif;
  font-size: 13px; color: var(--ink3); margin-top: 5px; letter-spacing: 0.5px;
  animation: fadeIn .4s var(--ease-out) .25s backwards;
}

@keyframes bootContentIn { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
@keyframes bootPulseDot {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px #38bdf8; }
  50% { transform: scale(1.4); box-shadow: 0 0 16px #38bdf8, 0 0 24px var(--brand); }
}
@keyframes bootSoundWave {
  0% { transform: scaleY(0.3); opacity: 0.45; }
  100% { transform: scaleY(1.15); opacity: 1; }
}

/* 退场：声波与字标平滑上浮微淡出 */
.boot.out { opacity: 0; pointer-events: none; transition: opacity .26s var(--ease); }
.boot.out .boot-content { animation: bootContentOut .24s var(--ease) forwards; }
@keyframes bootContentOut { to { opacity: 0; transform: translateY(-14px) scale(0.97); } }

/* ---- 闪屏「散雾」（App 壳）：底色与墨色跟皮肤走，雾用品牌色兑底色。
   静止态就是完整构图，动画全写成 from → 静止态：减弱动效或动画被禁时照样看得到字标。 ---- */
.boot.boot-fog { background-color: var(--bg); color: var(--ink); }
.bf-fog {
  position: absolute; width: 440px; height: 440px; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 46%, var(--bg)) 0%, transparent 68%);
  top: 50%; left: 50%; margin: -220px 0 0 -220px;
}
.bf-fog-l { animation: bfFogL 1.5s cubic-bezier(.2, .7, .2, 1) backwards; }
.bf-fog-r { animation: bfFogR 1.5s cubic-bezier(.2, .7, .2, 1) backwards; }
.bf-in { position: relative; display: flex; flex-direction: column; align-items: center; }
.bf-mark {
  display: flex; font-family: var(--font-disp, Georgia, serif); font-size: 84px; font-weight: 400;
  letter-spacing: -2px; line-height: 1;
}
.bf-mark span { animation: bfClear .7s cubic-bezier(.2, .7, .2, 1) backwards; will-change: filter, opacity; }
.bf-mark span:nth-child(1) { animation-delay: .08s; }
.bf-mark span:nth-child(2) { animation-delay: .18s; }
.bf-mark span:nth-child(3) { animation-delay: .28s; }
.bf-mark span:nth-child(4) { animation-delay: .38s; }
.bf-rule { width: 120px; height: 1px; background: currentColor; margin: 22px 0 14px; animation: bfDraw .45s cubic-bezier(.2, .7, .2, 1) .7s backwards; }
.bf-sub { font-size: 12px; letter-spacing: .42em; padding-left: .42em; color: var(--ink2); animation: fadeIn .4s var(--ease-out) .85s backwards; }
@keyframes bfFogL { from { opacity: .95; transform: translate(-70px, -30px); } to { opacity: 0; transform: translate(-260px, -70px) scale(1.2); } }
@keyframes bfFogR { from { opacity: .95; transform: translate(80px, 60px); } to { opacity: 0; transform: translate(270px, 110px) scale(1.2); } }
@keyframes bfClear { from { opacity: 0; filter: blur(16px); transform: translateY(8px); } }
@keyframes bfDraw { from { transform: scaleX(0); } }
.boot.out .bf-in { animation: bootContentOut .24s var(--ease) forwards; }

/* ============================================================
   皮肤（<html data-style>）：四套界面风格，各自带深色
   深浅色轴照常工作：浅色块用 :root[data-style=x]，深色块用
   :root[data-style=x][data-theme=dark]（权重更高，只重述颜色令牌，
   圆角/字族/尺寸由浅色块继续生效）。
   文件开头的 :root 是「薄雾留白」的回退值：JS 未执行时界面依然完整。
   ============================================================ */

/* ---------- 01 排印辞书 —— 默认。辞书细线分栏，衬线词条，印泥朱砂单一点色 ---------- */
:root[data-style="editorial"] {
  --bg: #f6f4ef;
  --ambient: none;
  --ambient: none;
  --card: #fbfaf6;
  --card-solid: #fffdf8;
  --card-line: #e7e2d7;
  --ink: #201f1c;
  --ink-body: #3c3831;
  --ink2: #6b665c;
  --ink3: #b3ab9b;
  --brand: #9e3b2e;
  --brand-soft: rgba(158, 59, 46, .09);
  --green: #3f6b4d;    --green-soft: rgba(63, 107, 77, .12);
  --amber: #8a5a12;    --amber-soft: rgba(138, 90, 18, .13);
  --red: #9e3b2e;      --red-soft: rgba(158, 59, 46, .10);
  --violet: #5a4a7a;   --violet-soft: rgba(90, 74, 122, .10);
  --soft: rgba(32, 31, 28, .05);
  --soft2: rgba(32, 31, 28, .09);
  --toast-bg: rgba(32, 31, 28, .94);
  --tabbar-bg: #f6f4ef;
  --topbar-bg: rgba(246, 244, 239, .92);
  --line: rgba(32, 31, 28, .13);
  --rule: #d7d1c4;
  --boot-rule: #c9c2b2;
  --boot-dot: #8c8474;
  --shadow: none;
  --shadow-lift: none;
  --btn-sh: none;
  --btn-sh-hover: none;
  --font-disp: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif CJK SC", serif;
  --font-num: var(--font-disp);
  --blur: none;
  --r-card: 0px; --r-item: 0px; --r-ctl: 0px; --r-pill: 0px;
  --pad-word: 22px 0;
  --wc-align: left; --wc-justify: flex-start;
  --num-w: 600; --num-track: 0px;
  --label-w: 600; --label-track: .2px;
  --tag-tf: none; --tag-track: 0px;
  --hw-size: 44px; --hw-w: 600; --hw-track: 0px;
}
:root[data-style="editorial"][data-theme="dark"] {
  --bg: #141311;
  --card: #1b1a17;
  --card-solid: #211f1b;
  --card-line: #332f28;
  --ink: #e8e4da;
  --ink-body: #c6bfb2;
  --ink2: #948b7b;
  --ink3: #5b554b;
  --brand: #c8604e;
  --brand-soft: rgba(200, 96, 78, .14);
  --green: #7ba588;    --green-soft: rgba(123, 165, 136, .15);
  --amber: #c08e42;    --amber-soft: rgba(192, 142, 66, .15);
  --red: #c8604e;      --red-soft: rgba(200, 96, 78, .15);
  --violet: #9a8bb8;   --violet-soft: rgba(154, 139, 184, .15);
  --soft: rgba(232, 228, 218, .05);
  --soft2: rgba(232, 228, 218, .10);
  --toast-bg: rgba(48, 44, 38, .96);
  --tabbar-bg: #141311;
  --topbar-bg: rgba(20, 19, 17, .92);
  --line: rgba(232, 228, 218, .14);
  --rule: #3a352c;
  --boot-rule: #4a443a;
  --boot-dot: #8a8172;
}
/* 区块不再靠卡片底色分块，改用一条细线；文字与页面左边距对齐 */
:root[data-style="editorial"] .home-top { flex: 0 0 auto; justify-content: flex-start; }
/* 每日一句：与正文同起排，署名是这一栏唯一的朱砂 */
:root[data-style="editorial"] .dq { text-align: left; }
:root[data-style="editorial"] .dq-en { font-size: 16px; color: var(--ink); }
:root[data-style="editorial"] .dq-by { color: var(--brand); }
/* 引导页：衬线标题挑大梁，选项只靠一条细线和字色分层，不铺底色 */
:root[data-style="editorial"] .intro-h { font-size: 25px; line-height: 1.38; font-weight: 600; letter-spacing: -.1px; }
:root[data-style="editorial"] .intro-p { font-size: 14px; line-height: 1.85; color: var(--ink-body); }
:root[data-style="editorial"] .intro-row, :root[data-style="editorial"] .intro-chip { background: transparent; border-color: var(--rule); border-width: 1px; }
:root[data-style="editorial"] .intro-row.sel, :root[data-style="editorial"] .intro-chip.sel { background: transparent; border-color: var(--ink); color: var(--ink); }
:root[data-style="editorial"] .intro-row.sel span, :root[data-style="editorial"] .intro-chip.sel i { color: var(--brand); opacity: 1; }
:root[data-style="editorial"] .intro-ol li::before { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink2); }
/* 报头吃满上半区：日期—数字—按钮—提示沿顶部起排，连续打卡点沉到报头底边 */
:root[data-style="editorial"] .checkin-hero { display: block; }
:root[data-style="editorial"] .ci-days { margin-top: auto; }
:root[data-style="editorial"] .checkin-hero .ci-btn { align-self: flex-start; }
:root[data-style="editorial"] .card {
  background: transparent; border: 0; border-top: 1px solid var(--rule);
  border-radius: 0; box-shadow: none; padding: 18px 0 16px; margin-bottom: 0;
}
:root[data-style="editorial"] .card h3 { font-family: var(--font-disp); font-weight: 600; font-size: 17px; letter-spacing: .2px; }
:root[data-style="editorial"] .checkin-hero { padding: 26px 0 22px; text-align: left; }
:root[data-style="editorial"] .ci-big { justify-content: flex-start; }
:root[data-style="editorial"] .ci-days { justify-content: flex-start; }
:root[data-style="editorial"] .ci-dot { background: transparent; color: var(--ink2); box-shadow: inset 0 0 0 1px var(--rule); }
:root[data-style="editorial"] .ci-dot.on { background: var(--ink); color: var(--bg); box-shadow: none; }
:root[data-style="editorial"] .ci-dot.today { box-shadow: inset 0 0 0 2px var(--ink); }
:root[data-style="editorial"] .task-btn {
  background: transparent; border: 1px solid var(--rule); box-shadow: none;
  align-items: flex-start; padding: 16px 14px 15px;
}
:root[data-style="editorial"] .task-btn .tb-count { color: var(--ink); }
:root[data-style="editorial"] .tb-review .tb-count { color: var(--green); }
:root[data-style="editorial"] .wordcard {
  background: transparent; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  box-shadow: none; justify-content: flex-start; padding-top: 20px;
}
:root[data-style="editorial"] .tag { background: transparent; padding: 0; }
:root[data-style="editorial"] .tag.stage { color: var(--ink3); }
:root[data-style="editorial"] .wc-phon { font-size: 14px; letter-spacing: .3px; }
:root[data-style="editorial"] .wc-sent, :root[data-style="editorial"] .wc-exam {
  background: transparent; border-left: 2px solid var(--rule); border-radius: 0; padding-left: 12px;
}
:root[data-style="editorial"] .progress { height: 4px; background: var(--soft2); }
:root[data-style="editorial"] .topsearch { background: transparent; border-color: var(--rule); }
:root[data-style="editorial"] .theme-btn { background: transparent; border: 1px solid var(--rule); box-shadow: none; }
:root[data-style="editorial"] .tabbar { box-shadow: none; }
:root[data-style="editorial"] .tab-ind { border-radius: 0; }
:root[data-style="editorial"] .art-item, :root[data-style="editorial"] .dict-item { box-shadow: none; }
/* 词条列表：辞书的栏线，不是卡片堆 */
:root[data-style="editorial"] .dict-item {
  background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0;
}
:root[data-style="editorial"] .dict-item .row1 { padding-left: 0; padding-right: 0; }
:root[data-style="editorial"] .dict-item .detail > .dk { padding-left: 0; padding-right: 0; }
:root[data-style="editorial"] .read-list .art-item {
  background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding-left: 0; padding-right: 0;
}

/* ---------- 02 冷静仪表 —— 精密仪表面板：等宽数字、方格刻度、信号青 ---------- */
:root[data-style="instrument"] {
  --bg: #e7eaec;
  --ambient: none;
  --card: #f3f5f6;
  --card-solid: #ffffff;
  --card-line: #d5dade;
  --ink: #14181d;
  --ink-body: #333c44;
  --ink2: #606a74;
  --ink3: #a9b2ba;
  --brand: #0f766e;
  --brand-soft: rgba(15, 118, 110, .10);
  --green: #157f5f;    --green-soft: rgba(21, 127, 95, .12);
  --amber: #b8791f;    --amber-soft: rgba(184, 121, 31, .13);
  --red: #b3403c;      --red-soft: rgba(179, 64, 60, .11);
  --violet: #4a5a8c;   --violet-soft: rgba(74, 90, 140, .10);
  --soft: rgba(20, 24, 29, .05);
  --soft2: rgba(20, 24, 29, .10);
  --toast-bg: rgba(20, 24, 29, .95);
  --tabbar-bg: #e7eaec;
  --topbar-bg: rgba(231, 234, 236, .92);
  --line: rgba(20, 24, 29, .16);
  --rule: #c6ccd1;
  --boot-rule: #b0b8bf;
  --boot-dot: #7b858e;
  --shadow: none;
  --shadow-lift: none;
  --btn-sh: none;
  --btn-sh-hover: none;
  --font-num: ui-monospace, "SF Mono", Menlo, Consolas, "Cascadia Mono", monospace;
  --font-label: var(--font-num);
  --blur: none;
  --r-card: 6px; --r-item: 6px; --r-ctl: 5px; --r-pill: 5px;
  --wc-align: left; --wc-justify: flex-start;
  --num-w: 600; --num-track: -1px;
  --label-w: 600; --label-track: 0px; --label-tf: none;
  --tag-tf: none; --tag-track: 0px;
  --hw-size: 34px; --hw-w: 600; --hw-track: -.3px;
}
:root[data-style="instrument"][data-theme="dark"] {
  --bg: #0f1418;
  --card: #161c22;
  --card-solid: #1a2128;
  --card-line: #2a333b;
  --ink: #dfe5e9;
  --ink-body: #b6c0c8;
  --ink2: #838e98;
  --ink3: #4d5760;
  --brand: #34a89b;
  --brand-soft: rgba(52, 168, 155, .16);
  --green: #46ae87;    --green-soft: rgba(70, 174, 135, .16);
  --amber: #c9903a;    --amber-soft: rgba(201, 144, 58, .16);
  --red: #d9695f;      --red-soft: rgba(217, 105, 95, .16);
  --violet: #8fa0c8;   --violet-soft: rgba(143, 160, 200, .16);
  --soft: rgba(223, 229, 233, .05);
  --soft2: rgba(223, 229, 233, .11);
  --toast-bg: rgba(38, 46, 54, .96);
  --tabbar-bg: #0f1418;
  --topbar-bg: rgba(15, 20, 24, .92);
  --line: rgba(223, 229, 233, .16);
  --rule: #2f3941;
  --boot-rule: #3d4750;
  --boot-dot: #6d7a84;
}
:root[data-style="instrument"] .card { border: 1px solid var(--card-line); box-shadow: none; padding: 14px 16px; }
:root[data-style="instrument"] .card h3 { font-size: 11.5px; font-weight: 600; letter-spacing: .2px; color: var(--ink2); }
:root[data-style="instrument"] .home-top { flex: 0 0 auto; justify-content: flex-start; }
/* 每日一句：英文走等宽（拉丁字符才用等宽），译文留在 UI 字体里 */
:root[data-style="instrument"] .dq { text-align: left; }
:root[data-style="instrument"] .dq-en { font-family: var(--font-num); font-size: 13.5px; line-height: 1.6; letter-spacing: -.2px; }
:root[data-style="instrument"] .dq-by { font-family: var(--font-num); font-size: 11.5px; color: var(--brand); }
:root[data-style="instrument"] .dq-zh { font-size: 12.5px; }
/* 引导页：等宽小标题 + 方角控件，标题不再挑字重，靠字号差分层 */
:root[data-style="instrument"] .intro-k { font-family: var(--font-num); font-size: 10.5px; letter-spacing: .04em; }
:root[data-style="instrument"] .intro-h { font-size: 19px; line-height: 1.45; font-weight: 700; letter-spacing: -.1px; }
:root[data-style="instrument"] .intro-p { font-size: 12.5px; line-height: 1.75; }
:root[data-style="instrument"] .intro-row, :root[data-style="instrument"] .intro-chip { border-width: 1px; border-radius: 4px; background: var(--card); }
:root[data-style="instrument"] .intro-row { padding: 10px 11px; }
:root[data-style="instrument"] .intro-row b { font-size: 13px; }
:root[data-style="instrument"] .intro-ol li::before, :root[data-style="instrument"] .intro-dots i { border-radius: 2px; }
:root[data-style="instrument"] .ia-dot { rx: 1px; ry: 1px; }
:root[data-style="instrument"] .ia-cap, :root[data-style="instrument"] .intro-cap { font-family: var(--font-num); font-size: 10.5px; }
:root[data-style="instrument"] .intro-sum dd { font-size: 13px; }
:root[data-style="instrument"] .intro-ol b { font-size: 13px; }
:root[data-style="instrument"] .intro-ol span { font-size: 12px; }
/* 面板不拉伸：读数块按内容收拢，两块一起顶到页首，留白落在面板之外 */
:root[data-style="instrument"] .checkin-hero { padding: 18px 16px 20px; text-align: left; }
:root[data-style="instrument"] .ci-date, :root[data-style="instrument"] .ci-big i { font-size: 11px; }
:root[data-style="instrument"] .ci-cap { font-family: var(--font-num); font-size: 11px; text-align: left; }
:root[data-style="instrument"] .ci-big { justify-content: flex-start; gap: 10px; }
:root[data-style="instrument"] .ci-days { gap: 2px; justify-content: flex-start; }
:root[data-style="instrument"] .ci-dot { width: 13px; height: 26px; line-height: 26px; border-radius: 2px; font-size: 9px; }
:root[data-style="instrument"] .ci-dot.today { box-shadow: inset 0 0 0 1px var(--bg), 0 0 0 2px var(--brand); }
:root[data-style="instrument"] .checkin-hero .ci-btn { min-width: 0; width: 100%; font-size: 15px; }
:root[data-style="instrument"] .task-btn { border: 1px solid var(--card-line); box-shadow: none; align-items: flex-start; padding: 14px 14px 13px; gap: 1px; }
:root[data-style="instrument"] .task-btn .tb-count { color: var(--ink); }
:root[data-style="instrument"] .task-btn .tb-label { font-size: 11px; }
:root[data-style="instrument"] .task-btn .tb-sub { font-family: var(--font-num); font-size: 10px; }
:root[data-style="instrument"] .tb-review .tb-count { color: var(--green); }
:root[data-style="instrument"] .wordcard { border: 1px solid var(--card-line); box-shadow: none; padding: 18px 16px 16px; justify-content: flex-start; }
:root[data-style="instrument"] .tag { background: transparent; border: 1px solid currentColor; padding: 1px 6px; font-size: 10px; font-family: var(--font-num); }
:root[data-style="instrument"] .wc-phon { font-family: inherit; font-size: 13.5px; letter-spacing: 0.2px; }
:root[data-style="instrument"] .wc-sent, :root[data-style="instrument"] .wc-exam { border: 1px solid var(--rule); border-radius: 4px; }
/* 进度条画成分段刻度：一格一段，读完一格就是学完一段 */
:root[data-style="instrument"] .progress { height: 12px; border-radius: 3px; background: var(--soft); box-shadow: inset 0 0 0 1px var(--rule); }
:root[data-style="instrument"] .progress .bar { border-radius: 3px; background: repeating-linear-gradient(90deg, var(--brand) 0 6px, transparent 6px 9px); }
:root[data-style="instrument"] .progress-text { font-family: var(--font-num); font-size: 11px; letter-spacing: .5px; }
/* 三档评分合成一台仪表开关：选中那一格整块填色 */
:root[data-style="instrument"] .grade-row { gap: 0; border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
:root[data-style="instrument"] .btn.grade { border-radius: 0; border-right: 1px solid var(--rule); background: var(--card-solid); color: var(--ink2); font-size: 15px; }
:root[data-style="instrument"] .btn.grade:last-child { border-right: 0; }
:root[data-style="instrument"] .btn.forget.sel { background: var(--red); color: var(--on-brand); }
:root[data-style="instrument"] .btn.fuzzy.sel { background: var(--amber); color: var(--on-brand); }
:root[data-style="instrument"] .btn.know.sel { background: var(--green); color: var(--on-brand); }
:root[data-style="instrument"] .tabbar { box-shadow: none; }
:root[data-style="instrument"] .tab .lb { font-size: 10px; }
:root[data-style="instrument"] .topsearch { border-color: var(--rule); }
:root[data-style="instrument"] .theme-btn { background: var(--card-solid); border: 1px solid var(--rule); box-shadow: none; }

/* ---------- 03 薄雾留白 —— 现状深化：更冷的晨光、更完整的层次 ---------- */
:root[data-style="frost"] {
  --bg: #eef1f6;
  --blur: blur(20px) saturate(160%);
  --r-card: 22px;
  --shadow: 0 1px 2px rgba(23, 28, 46, .04), 0 14px 34px -18px rgba(23, 28, 46, .16);
  --shadow-lift: 0 2px 4px rgba(23, 28, 46, .06), 0 20px 44px -20px rgba(23, 28, 46, .22);
}
:root[data-style="frost"][data-theme="dark"] {
  --bg: #0e1220;
  --blur: blur(20px) saturate(160%);
  --r-card: 22px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .28), 0 14px 34px -18px rgba(0, 0, 0, .55);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, .34), 0 20px 44px -20px rgba(0, 0, 0, .62);
}
/* 引导页眉标只有 11.5px：这两套皮肤的品牌色在这个字号上压不满 4.5:1，改走正文字色，品牌色留给圆点和按钮 */
:root[data-style="frost"] .intro-k { color: var(--ink-body); }

/* ---------- 03b 薄雾留白 v2（App 端，11-08）—— 晨雾里的一页纸 ----------
   只在 App 壳（public/index.html 的 <html data-shell="app">）生效；网页端用 web/index.html，
   有自己的 home-redesign.css 覆盖层，不受这里影响。
   北极星：卡片退场、发丝线与留白分组；只留一个雾靛色；英文一律衬线；每屏一个主动作。
   重力色团（public/orb.js）垫在纸面之下，透过磨砂卡片隐约可见。
   设计稿：.oil-ui/frost-mobile/index.html（不进包） */
:root[data-shell="app"][data-style="frost"] {
  --bg: #f1f3f6;
  --ambient:
    radial-gradient(40rem 26rem at 86% -8%, rgba(150, 170, 202, .30), transparent 62%),
    radial-gradient(34rem 24rem at -12% 34%, rgba(205, 214, 228, .45), transparent 62%);
  --card: rgba(255, 255, 255, .62);
  --card-solid: #fbfcfd;
  --card-line: rgba(255, 255, 255, .9);
  --ink: #1b2130;
  --ink-body: #3a4152;
  --ink2: #687184;
  --ink3: #a3aab8;
  --brand: #3f5884;
  --brand-soft: rgba(63, 88, 132, .09);
  --on-brand: #ffffff;
  --green: #4d7a69;  --green-soft: rgba(77, 122, 105, .12);
  --amber: #a5824a;  --amber-soft: rgba(165, 130, 74, .13);
  --red: #ac5c56;    --red-soft: rgba(172, 92, 86, .11);
  --violet: #6a5f8e; --violet-soft: rgba(106, 95, 142, .11);
  --soft: rgba(27, 33, 48, .04);
  --soft2: rgba(27, 33, 48, .075);
  --line: rgba(27, 33, 48, .08);
  --rule: rgba(27, 33, 48, .12);
  --toast-bg: rgba(27, 33, 48, .92);
  --tabbar-bg: rgba(241, 243, 246, .78);
  --topbar-bg: rgba(241, 243, 246, .72);
  --boot-rule: #b9c1cf;
  --boot-dot: #7d879a;
  --shadow: 0 1px 1px rgba(27, 33, 48, .03), 0 18px 40px -26px rgba(27, 33, 48, .22);
  --shadow-lift: 0 2px 3px rgba(27, 33, 48, .04), 0 24px 48px -26px rgba(27, 33, 48, .28);
  --btn-sh: none;
  --btn-sh-hover: 0 8px 18px -10px rgba(63, 88, 132, .45);
  --blur: blur(20px) saturate(140%);
  --font-disp: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", "Noto Serif SC", Georgia, serif;
  --r-card: 24px; --r-item: 16px; --r-ctl: 14px;
  --num-w: 400; --num-track: -1px;
  --label-w: 500; --label-track: .04em;
  --hw-size: 44px; --hw-w: 400; --hw-track: -.5px;
}
:root[data-shell="app"][data-style="frost"][data-theme="dark"] {
  --bg: #0f131b;
  --ambient:
    radial-gradient(40rem 26rem at 86% -8%, rgba(88, 110, 152, .20), transparent 62%),
    radial-gradient(34rem 24rem at -12% 34%, rgba(48, 60, 86, .28), transparent 62%);
  --card: rgba(255, 255, 255, .035);
  --card-solid: #161b25;
  --card-line: rgba(255, 255, 255, .06);
  --ink: #e7eaf0;
  --ink-body: #c3c9d4;
  --ink2: #8e97a8;
  --ink3: #596273;
  --brand: #a9bcdc;
  --brand-soft: rgba(169, 188, 220, .12);
  --on-brand: #0f131b;
  --green: #8fbfa9;  --green-soft: rgba(143, 191, 169, .13);
  --amber: #d4b27a;  --amber-soft: rgba(212, 178, 122, .13);
  --red: #dc8c85;    --red-soft: rgba(220, 140, 133, .13);
  --violet: #b7a8d8; --violet-soft: rgba(183, 168, 216, .13);
  --soft: rgba(255, 255, 255, .04);
  --soft2: rgba(255, 255, 255, .08);
  --line: rgba(231, 234, 240, .08);
  --rule: rgba(231, 234, 240, .13);
  --toast-bg: rgba(40, 46, 58, .96);
  --tabbar-bg: rgba(15, 19, 27, .80);
  --topbar-bg: rgba(15, 19, 27, .74);
  --boot-rule: #333c4d;
  --boot-dot: #6b7487;
  --shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 20px 44px -26px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 3px rgba(0, 0, 0, .24), 0 26px 50px -26px rgba(0, 0, 0, .68);
  --btn-sh-hover: none;
}

/* ---------- 03c App 端其余皮肤 = 薄雾留白的版式 + 各自的色板 ----------
   app.js applyStyle 在 App 壳里把非 frost 的皮肤写成 data-style="frost" + data-tint="<皮肤名>"，
   所以上下所有 frost 规则原样生效，这里只换颜色。网页端仍用各皮肤自己的 :root[data-style="…"]。
   每套皮肤只给「底 / 字 / 品牌 / 语义色 / 雾色(--fog, --fog2)」，其余（细线、浅底、雾团、阴影、栏底）在这里统一从它们推出来。
   注意：这一段的优先级与 frost 深色块相同且排在后面，所以深色下要在下面的 [data-theme="dark"] 块里再写一遍表面色。 */
:root[data-shell="app"][data-style="frost"][data-tint] {
  --ambient:
    radial-gradient(40rem 26rem at 86% -8%, color-mix(in srgb, var(--fog) 30%, transparent), transparent 62%),
    radial-gradient(34rem 24rem at -12% 34%, color-mix(in srgb, var(--fog2) 20%, transparent), transparent 62%);
  --brand-soft: color-mix(in srgb, var(--brand) 10%, transparent);
  --green-soft: color-mix(in srgb, var(--green) 12%, transparent);
  --amber-soft: color-mix(in srgb, var(--amber) 13%, transparent);
  --red-soft: color-mix(in srgb, var(--red) 11%, transparent);
  --violet-soft: color-mix(in srgb, var(--violet) 11%, transparent);
  --soft: color-mix(in srgb, var(--ink) 4%, transparent);
  --soft2: color-mix(in srgb, var(--ink) 7.5%, transparent);
  --line: color-mix(in srgb, var(--ink) 8%, transparent);
  --rule: color-mix(in srgb, var(--ink) 12%, transparent);
  --toast-bg: color-mix(in srgb, var(--ink) 92%, transparent);
  --tabbar-bg: color-mix(in srgb, var(--bg) 78%, transparent);
  --topbar-bg: color-mix(in srgb, var(--bg) 72%, transparent);
  --boot-rule: color-mix(in srgb, var(--ink) 24%, var(--bg));
  --boot-dot: color-mix(in srgb, var(--ink) 52%, var(--bg));
  --shadow: 0 1px 1px color-mix(in srgb, var(--ink) 3%, transparent), 0 18px 40px -26px color-mix(in srgb, var(--ink) 22%, transparent);
  --shadow-lift: 0 2px 3px color-mix(in srgb, var(--ink) 4%, transparent), 0 24px 48px -26px color-mix(in srgb, var(--ink) 28%, transparent);
  --btn-sh-hover: 0 8px 18px -10px color-mix(in srgb, var(--brand) 45%, transparent);
}
:root[data-shell="app"][data-style="frost"][data-tint][data-theme="dark"] {
  --ambient:
    radial-gradient(40rem 26rem at 86% -8%, color-mix(in srgb, var(--fog) 24%, transparent), transparent 62%),
    radial-gradient(34rem 24rem at -12% 34%, color-mix(in srgb, var(--fog2) 16%, transparent), transparent 62%);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);
  --green-soft: color-mix(in srgb, var(--green) 13%, transparent);
  --amber-soft: color-mix(in srgb, var(--amber) 13%, transparent);
  --red-soft: color-mix(in srgb, var(--red) 13%, transparent);
  --violet-soft: color-mix(in srgb, var(--violet) 13%, transparent);
  --rule: color-mix(in srgb, var(--ink) 13%, transparent);
  --soft: rgba(255, 255, 255, .04);
  --soft2: rgba(255, 255, 255, .08);
  --toast-bg: color-mix(in srgb, var(--ink) 16%, var(--bg));
  --tabbar-bg: color-mix(in srgb, var(--bg) 80%, transparent);
  --topbar-bg: color-mix(in srgb, var(--bg) 74%, transparent);
  --shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 20px 44px -26px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 3px rgba(0, 0, 0, .24), 0 26px 50px -26px rgba(0, 0, 0, .68);
  --btn-sh-hover: none;
}

/* 排印辞书：米白纸、墨字、朱砂 */
:root[data-shell="app"][data-style="frost"][data-tint="editorial"] {
  --bg: #f6f4ef;
  --card-solid: #fffdf8;
  --ink: #201f1c;
  --ink-body: #3c3831;
  --ink2: #6b665c;
  --ink3: #b3ab9b;
  --brand: #9e3b2e;
  --on-brand: #ffffff;
  --green: #3f6b4d;
  --amber: #8a5a12;
  --red: #9e3b2e;
  --violet: #5a4a7a;
  --fog: #c9a98a;
  --fog2: #d9cdb6;
}
:root[data-shell="app"][data-style="frost"][data-tint="editorial"][data-theme="dark"] {
  --bg: #141311;
  --card-solid: #211f1b;
  --ink: #e8e4da;
  --ink-body: #c6bfb2;
  --ink2: #948b7b;
  --ink3: #5b554b;
  --brand: #d98572;
  --on-brand: #141311;
  --green: #7ba588;
  --amber: #c08e42;
  --red: #d98572;
  --violet: #9a8bb8;
  --fog: #8a4a3a;
  --fog2: #4a4234;
}

/* 冷静仪表：冷灰、信号青 */
:root[data-shell="app"][data-style="frost"][data-tint="instrument"] {
  --bg: #e7eaec;
  --card-solid: #f8fafb;
  --ink: #14181d;
  --ink-body: #333c44;
  --ink2: #606a74;
  --ink3: #a9b2ba;
  --brand: #0f766e;
  --on-brand: #ffffff;
  --green: #157f5f;
  --amber: #b8791f;
  --red: #b3403c;
  --violet: #4a5a8c;
  --fog: #6fb3ab;
  --fog2: #b4c2cc;
}
:root[data-shell="app"][data-style="frost"][data-tint="instrument"][data-theme="dark"] {
  --bg: #0f1418;
  --card-solid: #1a2128;
  --ink: #dfe5e9;
  --ink-body: #b6c0c8;
  --ink2: #838e98;
  --ink3: #4d5760;
  --brand: #5cc4b7;
  --on-brand: #0f1418;
  --green: #46ae87;
  --amber: #c9903a;
  --red: #d9695f;
  --violet: #8fa0c8;
  --fog: #2f7f77;
  --fog2: #33424e;
}

/* 字卡墙：暖木、琥珀棕 */
:root[data-shell="app"][data-style="frost"][data-tint="deck"] {
  --bg: #efe9df;
  --card-solid: #fffdf7;
  --ink: #26221b;
  --ink-body: #4a4235;
  --ink2: #76695a;
  --ink3: #b9ae9a;
  --brand: #9a5512;
  --on-brand: #ffffff;
  --green: #1f7a54;
  --amber: #a85f16;
  --red: #a8402f;
  --violet: #5f4b7a;
  --fog: #e0b068;
  --fog2: #dccdb2;
}
:root[data-shell="app"][data-style="frost"][data-tint="deck"][data-theme="dark"] {
  --bg: #191713;
  --card-solid: #2a251d;
  --ink: #e9e2d3;
  --ink-body: #c6bda9;
  --ink2: #9b907b;
  --ink3: #5c5545;
  --brand: #e0a15e;
  --on-brand: #191713;
  --green: #63b28c;
  --amber: #d9934a;
  --red: #d9776a;
  --violet: #a394c0;
  --fog: #8a6230;
  --fog2: #4a4030;
}

/* 多巴胺糖果：奶油底、珊瑚红、一点淡紫 */
:root[data-shell="app"][data-style="frost"][data-tint="candy"] {
  --bg: #fdf7ee;
  --card-solid: #ffffff;
  --ink: #312742;
  --ink-body: #443b51;
  --ink2: #716477;
  --ink3: #b3a5b8;
  --brand: #ba3527;
  --on-brand: #ffffff;
  --green: #23704c;
  --amber: #865600;
  --red: #b33335;
  --violet: #6742b0;
  --fog: #ff9d8a;
  --fog2: #c4b0f4;
}
:root[data-shell="app"][data-style="frost"][data-tint="candy"][data-theme="dark"] {
  --bg: #211c32;
  --card-solid: #30283f;
  --ink: #fff5e7;
  --ink-body: #eee3ed;
  --ink2: #bfaec6;
  --ink3: #75647f;
  --brand: #ffac9a;
  --on-brand: #321d2d;
  --green: #a7e186;
  --amber: #ffe088;
  --red: #ffacab;
  --violet: #ceb0ff;
  --fog: #b05a70;
  --fog2: #6a58b0;
}

/* 赛博霓虹：浅色档也是暗底，所以表面色照深色写 */
:root[data-shell="app"][data-style="frost"][data-tint="cyberpunk"] {
  --bg: #0b0f19;
  --card-solid: #172033;
  --ink: #f0fdfa;
  --ink-body: #cbd5e1;
  --ink2: #8493a8;
  --ink3: #4b5a70;
  --brand: #22c7e0;
  --on-brand: #04262b;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --violet: #c084fc;
  --fog: #06b6d4;
  --fog2: #d946ef;
  --card: rgba(255, 255, 255, .035);
  --card-line: rgba(255, 255, 255, .06);
  --soft: rgba(255, 255, 255, .04);
  --soft2: rgba(255, 255, 255, .08);
  --toast-bg: color-mix(in srgb, var(--ink) 16%, var(--bg));
  --shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 20px 44px -26px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 3px rgba(0, 0, 0, .24), 0 26px 50px -26px rgba(0, 0, 0, .68);
  --btn-sh-hover: none;
}
:root[data-shell="app"][data-style="frost"][data-tint="cyberpunk"][data-theme="dark"] {
  --bg: #080c14;
  --card-solid: #141d30;
  --ink: #f0fdfa;
  --ink-body: #a8b6c8;
  --ink2: #73829a;
  --ink3: #3d4b60;
  --brand: #22d3ee;
  --on-brand: #04262b;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --violet: #c084fc;
  --fog: #0891b2;
  --fog2: #a21caf;
}

/* 素笺石墨：去色灰阶、墨黑按键 */
:root[data-shell="app"][data-style="frost"][data-tint="graphite"] {
  --bg: #f6f7f8;
  --card-solid: #ffffff;
  --ink: #16181b;
  --ink-body: #33373d;
  --ink2: #6a7076;
  --ink3: #aeb3b9;
  --brand: #17181a;
  --on-brand: #ffffff;
  --green: #1f7a4d;
  --amber: #c2521c;
  --red: #c03a30;
  --violet: #5b4f86;
  --fog: #a9b0b8;
  --fog2: #d0d4d9;
}
:root[data-shell="app"][data-style="frost"][data-tint="graphite"][data-theme="dark"] {
  --bg: #0f1012;
  --card-solid: #1b1d21;
  --ink: #f3f4f6;
  --ink-body: #c9ccd1;
  --ink2: #8b9096;
  --ink3: #54585e;
  --brand: #e9eaec;
  --on-brand: #14161a;
  --green: #59b183;
  --amber: #e08a4e;
  --red: #e0705f;
  --violet: #a99ad6;
  --fog: #5a6068;
  --fog2: #33373d;
}

/* 瑞士网格：纯白、克莱因蓝 */
:root[data-shell="app"][data-style="frost"][data-tint="swiss"] {
  --bg: #ffffff;
  --card-solid: #ffffff;
  --card: rgba(250, 250, 252, .7);
  --card-line: rgba(10, 10, 11, .06);
  --ink: #0a0a0b;
  --ink-body: #2b2b2e;
  --ink2: #6e6e75;
  --ink3: #b4b4bb;
  --brand: #1b36d8;
  --on-brand: #ffffff;
  --green: #0f7a45;
  --amber: #a05a00;
  --red: #c2261f;
  --violet: #4237b8;
  --fog: #8f9df0;
  --fog2: #d6d9e8;
}
:root[data-shell="app"][data-style="frost"][data-tint="swiss"][data-theme="dark"] {
  --bg: #0a0a0b;
  --card-solid: #17171a;
  --card: rgba(255, 255, 255, .035);
  --card-line: rgba(255, 255, 255, .06);
  --ink: #f5f5f6;
  --ink-body: #cdcdd2;
  --ink2: #8b8b93;
  --ink3: #4d4d54;
  --brand: #8e9bff;
  --on-brand: #0a0a0b;
  --green: #4bbd84;
  --amber: #f0a94a;
  --red: #ff6b5e;
  --violet: #a79cff;
  --fog: #3a48c8;
  --fog2: #2a2a33;
}

/* 日系抹茶：米绿纸、苔绿（这一套的派生色是手调的，整段覆盖上面的通用推导） */
:root[data-shell="app"][data-style="frost"][data-tint="matcha"] {
  --bg: #f2f4ec;
  --ambient:
    radial-gradient(40rem 26rem at 86% -8%, rgba(160, 186, 132, .30), transparent 62%),
    radial-gradient(34rem 24rem at -12% 34%, rgba(214, 224, 198, .48), transparent 62%);
  --card-solid: #fbfcf8;
  --ink: #1e2a1c;
  --ink-body: #3a4636;
  --ink2: #667260;
  --ink3: #a2ab9b;
  --brand: #4f6f3a;
  --brand-soft: rgba(79, 111, 58, .10);
  --green: #3f7d6a;  --green-soft: rgba(63, 125, 106, .12);
  --soft: rgba(30, 42, 28, .04);
  --soft2: rgba(30, 42, 28, .075);
  --line: rgba(30, 42, 28, .08);
  --rule: rgba(30, 42, 28, .12);
  --toast-bg: rgba(30, 42, 28, .92);
  --tabbar-bg: rgba(242, 244, 236, .78);
  --topbar-bg: rgba(242, 244, 236, .72);
  --boot-rule: #bcc6ae;
  --boot-dot: #7f8b72;
  --shadow: 0 1px 1px rgba(30, 42, 28, .03), 0 18px 40px -26px rgba(30, 42, 28, .22);
  --shadow-lift: 0 2px 3px rgba(30, 42, 28, .04), 0 24px 48px -26px rgba(30, 42, 28, .28);
  --btn-sh-hover: 0 8px 18px -10px rgba(79, 111, 58, .45);
}
:root[data-shell="app"][data-style="frost"][data-tint="matcha"][data-theme="dark"] {
  --bg: #10150f;
  --ambient:
    radial-gradient(40rem 26rem at 86% -8%, rgba(104, 136, 84, .20), transparent 62%),
    radial-gradient(34rem 24rem at -12% 34%, rgba(52, 70, 44, .28), transparent 62%);
  --card-solid: #171d16;
  --ink: #e6ebe2;
  --ink-body: #c3cbbd;
  --ink2: #8f9a88;
  --ink3: #5a6455;
  --brand: #b4cc98;
  --brand-soft: rgba(180, 204, 152, .12);
  --on-brand: #10150f;
  --green: #8fc4b0;  --green-soft: rgba(143, 196, 176, .13);
  --soft: rgba(255, 255, 255, .04);
  --soft2: rgba(255, 255, 255, .08);
  --line: rgba(230, 235, 226, .08);
  --rule: rgba(230, 235, 226, .13);
  --toast-bg: rgba(40, 48, 38, .96);
  --tabbar-bg: rgba(16, 21, 15, .80);
  --topbar-bg: rgba(16, 21, 15, .74);
  --boot-rule: #353f30;
  --boot-dot: #6d786a;
  --shadow: 0 1px 1px rgba(0, 0, 0, .2), 0 20px 44px -26px rgba(0, 0, 0, .6);
  --shadow-lift: 0 2px 3px rgba(0, 0, 0, .24), 0 26px 50px -26px rgba(0, 0, 0, .68);
  --btn-sh-hover: none;
}

/* 顶栏：搜索框是一条描边胶囊，「搜索」退成雾靛浅底 */
:root[data-shell="app"][data-style="frost"] .topbar { border-bottom-color: transparent; }
:root[data-shell="app"][data-style="frost"] .topsearch { background: var(--card); border-color: var(--rule); }
:root[data-shell="app"][data-style="frost"] .ts-go { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
:root[data-shell="app"][data-style="frost"] .theme-btn { background: transparent; box-shadow: none; }

/* ===== 首页「刊头」版式（11-08 用户从 4 个版式里选定 B，并要求保留完整每日名言）=====
   像一份晨报：大字日期做报头、签到并进报头 → 每日名言当题记 → 一句话任务 + 主按钮 → 组队 / 词书两张半宽纸片 → 今日阅读。
   不改 JS 绑定的 id：#homeMain 换成命名网格；.home-foot 用 display:contents 拆开，
   词书半宽卡的底由 #homeMain::before 垫在 book 区，.hp-top 与 .progress 叠在上面。
   对比稿：.oil-ui/frost-mobile/home-explore/（不进包） */
:root[data-shell="app"][data-style="frost"] #homeMain {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px;
  grid-template-rows: auto auto 1fr auto auto;
  grid-template-areas: "mast mast" "dq dq" "task task" "team book" "read read";
}
:root[data-shell="app"][data-style="frost"] #homeMain > * { min-width: 0; }

/* ---- 报头：大字日期 + 签到 ---- */
:root[data-shell="app"][data-style="frost"] .home-top { grid-area: mast; flex: none; margin: 0; }
:root[data-shell="app"][data-style="frost"] .checkin-hero {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "date btn" "date stat" "days days";
  column-gap: 12px; text-align: left; padding: 2px 2px 0; margin: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none;
}
.mast-date { display: none; }
:root[data-shell="app"][data-style="frost"] .mast-date { grid-area: date; display: flex; align-items: flex-end; gap: 14px; padding-bottom: 16px; min-width: 0; }
:root[data-shell="app"][data-style="frost"] .mast-date b { font-family: var(--font-disp); font-size: 76px; line-height: .82; font-weight: 400; letter-spacing: -3px; color: var(--ink); font-variant-numeric: lining-nums; }
:root[data-shell="app"][data-style="frost"] .md-r { display: flex; flex-direction: column; gap: 2px; padding-bottom: 3px; min-width: 0; }
:root[data-shell="app"][data-style="frost"] #mdMon { font-family: var(--font-disp); font-size: 17px; letter-spacing: .02em; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] #mdWk { font-size: 12px; letter-spacing: .08em; color: var(--ink2); white-space: nowrap; }
:root[data-shell="app"][data-style="frost"] .ci-date,
:root[data-shell="app"][data-style="frost"] .ci-hint,
:root[data-shell="app"][data-style="frost"] .ci-cap { display: none; }
/* 签到：实心雾靛胶囊配宁静微光，签完收成绿色「已签到 ✓」 */
:root[data-shell="app"][data-style="frost"] .checkin-hero .ci-btn {
  grid-area: btn; align-self: end; justify-self: end; margin: 0; min-width: 0; min-height: 44px; padding: 0 18px;
  background: var(--brand); color: var(--on-brand); border: 0;
  box-shadow: 0 2px 8px -2px var(--brand), 0 0 0 1px var(--brand-soft);
  font-size: 13.5px; font-weight: 500; letter-spacing: .14em;
}
:root[data-shell="app"][data-style="frost"] .checkin-hero .ci-btn:active { transform: scale(.95); }
:root[data-shell="app"][data-style="frost"] .checkin-hero .ci-btn:disabled { opacity: 1; background: transparent; color: var(--green); box-shadow: none; animation: none; padding: 0 2px; letter-spacing: .06em; font-size: 13.5px; cursor: default; }
:root[data-shell="app"][data-style="frost"] .ci-big { grid-area: stat; justify-self: end; align-self: start; margin: 8px 0 16px; justify-content: flex-end; align-items: baseline; gap: 3px; white-space: nowrap; }
:root[data-shell="app"][data-style="frost"] .ci-big b { font-family: var(--font-disp); font-size: 15px; line-height: 1; font-weight: 400; letter-spacing: 0; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .ci-big i { font-size: 11.5px; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .ci-big[data-total]::after { content: "· 累计 " attr(data-total) " 天"; font-size: 11.5px; color: var(--ink2); margin-left: 3px; }
/* 报头下一根墨线，下面是本周 7 天（最近 14 天里只显示后 7 个点，配周几） */
:root[data-shell="app"][data-style="frost"] .ci-days {
  grid-area: days; margin: 0; padding: 11px 6px 18px; border-top: 1px solid var(--ink);
  display: flex; justify-content: space-between; flex-wrap: nowrap; gap: 0;
}
:root[data-shell="app"][data-style="frost"] .ci-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; font-size: 0; line-height: 0; background: var(--rule); box-shadow: none; overflow: visible; }
:root[data-shell="app"][data-style="frost"] .ci-dot:nth-child(-n+7) { display: none; }
:root[data-shell="app"][data-style="frost"] .ci-dot::after { content: attr(data-wd); position: absolute; top: 13px; left: 50%; transform: translateX(-50%); font-size: 10.5px; line-height: 1; font-style: normal; color: var(--ink3); white-space: nowrap; }
:root[data-shell="app"][data-style="frost"] .ci-dot.on { background: var(--brand); opacity: .75; }
:root[data-shell="app"][data-style="frost"] .ci-dot.on::after { color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .ci-dot.today {
  background: transparent; box-shadow: 0 0 0 1.5px var(--brand), 0 0 0 3.5px var(--brand-soft); opacity: 1;
}
:root[data-shell="app"][data-style="frost"] .ci-dot.today::after { color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .ci-dot.on.today { background: var(--brand); box-shadow: 0 0 0 1.5px var(--brand); }

/* ---- 每日名言：报头下的题记，居中衬线 ---- */
:root[data-shell="app"][data-style="frost"] .dq { grid-area: dq; text-align: center; margin: 4px 0 0; padding: 0 8px; border: 0; }
:root[data-shell="app"][data-style="frost"] .dq-en { font-style: italic; font-size: 15px; line-height: 1.55; color: var(--ink-body); }
/* 装了商城字体时它多半没有真斜体，浏览器合成的斜体很廉价 —— 只有默认（衬线）字栈才斜 */
:root[data-shell="app"][data-style="frost"][data-font]:not([data-font="default"]) .dq-en { font-style: normal; }
:root[data-shell="app"][data-style="frost"] .dq-by { display: block; margin: 6px 0 0; font-size: 11.5px; letter-spacing: .06em; color: var(--ink3); }
:root[data-shell="app"][data-style="frost"] .dq-zh { margin-top: 4px; font-size: 12.5px; line-height: 1.7; color: var(--ink2); }

/* ---- 一句话任务：「背 30 个新词，/ 复习 29 个。」两行分别就是新词键、复习键；主按钮挂在新词键 ::after ---- */
:root[data-shell="app"][data-style="frost"] .home-actions {
  grid-area: task; align-self: end; display: block; position: relative; margin: 18px 0 0; padding: 0 0 66px;
  background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root[data-shell="app"][data-style="frost"] .home-actions::before { content: "今日"; display: block; margin-bottom: 8px; font-size: 11px; letter-spacing: .24em; color: var(--brand); }
:root[data-shell="app"][data-style="frost"] .task-btn {
  display: flex; flex-direction: row; align-items: baseline; gap: 0; width: auto; padding: 0; margin: 0;
  background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none;
  font-family: var(--font-disp); font-size: 25px; line-height: 1.32; color: var(--ink); text-align: left;
}
:root[data-shell="app"][data-style="frost"] .task-btn:active { transform: none; opacity: .7; }
:root[data-shell="app"][data-style="frost"] .task-btn .tb-count { font-family: var(--font-disp); font-size: 38px; line-height: 1; font-weight: 400; letter-spacing: -1px; color: var(--ink); margin: 0 6px; font-variant-numeric: lining-nums tabular-nums; }
:root[data-shell="app"][data-style="frost"] .task-btn .tb-label { font-family: var(--font-disp); font-size: 25px; font-weight: 400; letter-spacing: 0; color: var(--ink); text-transform: none; margin: 0; }
:root[data-shell="app"][data-style="frost"] .task-btn .tb-sub { display: none; }
:root[data-shell="app"][data-style="frost"] .tb-new::before { content: "背"; }
:root[data-shell="app"][data-style="frost"] .tb-new .tb-label::before { content: "个"; }
:root[data-shell="app"][data-style="frost"] .tb-new .tb-label::after { content: "，"; }
:root[data-shell="app"][data-style="frost"] .tb-review .tb-label { order: -1; }
:root[data-shell="app"][data-style="frost"] .tb-review .tb-count::after { content: "个。"; font-size: 25px; letter-spacing: 0; margin-left: 6px; }
:root[data-shell="app"][data-style="frost"] .task-btn.zero .tb-count { color: var(--ink3); }
/* 主按钮：真按钮 #btnStartAll（'all' 模式 = 先复习、后新词）；两行任务句仍可单独点进「只背新词 / 只复习」 */
.home-cta { display: none; }
:root[data-shell="app"][data-style="frost"] .home-cta {
  display: flex; position: absolute; left: 0; right: 0; bottom: 0; height: 52px; padding: 0;
  align-items: center; justify-content: center; white-space: pre; border: 0;
  border-radius: 999px; background: var(--brand); color: var(--on-brand);
  font-family: var(--font-ui); font-size: 15px; font-weight: 500; letter-spacing: .12em;
  transition: transform .16s var(--spring);
}
:root[data-shell="app"][data-style="frost"] .home-cta:active { transform: scale(.97); }
:root[data-shell="app"][data-style="frost"] .home-actions.all-done .home-cta { display: none; }
/* 清零的半句不写「背 0 个」：只剩复习 →「复习 29 个。」；只剩新词 →「背 30 个新词。」；
   都清零 → 「今天的词都背完了。」+ 一行「再背五个 →」（点它就是 #btnNew，进空队列页里的「再背五个」）
   使用 refreshHome() 同步的显式状态类（不依赖 CSS :has()，兼容老版本 Android WebView / 平板）。 */
:root[data-shell="app"][data-style="frost"] .home-actions.only-review .tb-new { display: none; }
:root[data-shell="app"][data-style="frost"] .home-actions.only-new .tb-review { display: none; }
:root[data-shell="app"][data-style="frost"] .home-actions.only-new .tb-new .tb-label::after { content: "。"; }
:root[data-shell="app"][data-style="frost"] .home-actions.all-done { padding-bottom: 0; }
:root[data-shell="app"][data-style="frost"] .home-actions.all-done .tb-review { display: none; }
:root[data-shell="app"][data-style="frost"] .home-actions.all-done .tb-new { flex-direction: column; align-items: flex-start; }
:root[data-shell="app"][data-style="frost"] .home-actions.all-done .tb-new .tb-count,
:root[data-shell="app"][data-style="frost"] .home-actions.all-done .tb-new .tb-label { display: none; }
:root[data-shell="app"][data-style="frost"] .home-actions.all-done .tb-new::before { content: "今天的词都背完了。"; }
:root[data-shell="app"][data-style="frost"] .home-actions.all-done .tb-new::after {
  content: "再背五个  →"; display: block; margin-top: 10px;
  font-family: var(--font-ui); color: var(--brand); font-size: 14px; letter-spacing: .08em;
}

/* ---- 组队 / 词书：两张半宽浅纸片 ---- */
:root[data-shell="app"][data-style="frost"] .home-team-card,
:root[data-shell="app"][data-style="frost"] #homeMain::before,
:root[data-shell="app"][data-style="frost"] .hr {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; box-shadow: 0 1px 2px rgba(27, 33, 48, .04);
}
:root[data-shell="app"][data-style="frost"][data-theme="dark"] .home-team-card,
:root[data-shell="app"][data-style="frost"][data-theme="dark"] #homeMain::before,
:root[data-shell="app"][data-style="frost"][data-theme="dark"] .hr { box-shadow: none; }
:root[data-shell="app"][data-style="frost"] .home-team-card {
  grid-area: team; margin: 16px 0 0; padding: 14px; min-height: 96px; align-items: flex-start;
  -webkit-backdrop-filter: none; backdrop-filter: none; animation: none;
}
:root[data-shell="app"][data-style="frost"] .home-team-card:hover { border-color: var(--card-line); }
:root[data-shell="app"][data-style="frost"] .home-team-card:active { transform: scale(.985); }
:root[data-shell="app"][data-style="frost"] .htc-left { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
:root[data-shell="app"][data-style="frost"] .htc-title { order: 0; font-size: 13.5px; font-weight: 500; letter-spacing: 0; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
:root[data-shell="app"][data-style="frost"] .htc-badge,
:root[data-shell="app"][data-style="frost"] .htc-badge.active {
  order: 1; margin: 0; font-size: 10.5px; font-weight: 500; letter-spacing: .06em; border-radius: 4px; padding: 0 6px;
  color: var(--brand); background: transparent; border: 1px solid var(--brand-soft);
}
/* 半宽卡放不下长说明：标题已含搭档名、徽章已说明「双倍生效中」，说明行收起 */
:root[data-shell="app"][data-style="frost"] .htc-desc { display: none; }
:root[data-shell="app"][data-style="frost"] .htc-right { display: none; }
/* 词书半宽卡：.home-foot 拆开（display:contents），底板是 #homeMain::before */
:root[data-shell="app"][data-style="frost"] .home-foot { display: contents; }
:root[data-shell="app"][data-style="frost"] #homeMain::before { content: ""; grid-area: book; margin-top: 16px; }
:root[data-shell="app"][data-style="frost"] .home-foot .hp-top {
  grid-area: book; margin-top: 16px; padding: 14px 14px 32px; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 6px;
}
:root[data-shell="app"][data-style="frost"] .hp-book { font-size: 11.5px; letter-spacing: .08em; color: var(--ink2); max-width: 100%; }
:root[data-shell="app"][data-style="frost"] .hp-num { font-family: var(--font-disp); font-size: 22px; font-weight: 400; letter-spacing: 0; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .home-foot .progress { grid-area: book; align-self: end; margin: 0 14px 18px; height: 2px; background: var(--line); }
:root[data-shell="app"][data-style="frost"] .progress { height: 2px; background: var(--line); }

/* ---- 今日阅读：整行纸片；收在白噪音浮标（右下 46px）之上 ---- */
:root[data-shell="app"][data-style="frost"] .hr { grid-area: read; margin: 10px 0 52px; padding: 13px 16px; border-top: 1px solid var(--card-line); }
:root[data-shell="app"][data-style="frost"] .hr-t { font-size: 16px; }
:root[data-shell="app"][data-style="frost"] .hr-m { font-size: 11.5px; }

/* ===== 背词卡 ===== */
:root[data-shell="app"][data-style="frost"] .study-head .btn.ghost { background: transparent; color: var(--ink2); padding-left: 2px; padding-right: 6px; font-weight: 500; }
:root[data-shell="app"][data-style="frost"] .progress-text { font-variant-numeric: tabular-nums; }
:root[data-shell="app"][data-style="frost"] .wordcard,
:root[data-shell="app"][data-style="frost"] .group-spelling { border-radius: 28px; padding: 22px 24px; }
:root[data-shell="app"][data-style="frost"] .tag { background: transparent; padding: 0; font-size: 11px; font-weight: 500; letter-spacing: .24em; border-radius: 0; }
:root[data-shell="app"][data-style="frost"] .tag.review { background: transparent; }
:root[data-shell="app"][data-style="frost"] .tag.extra { background: transparent; }
:root[data-shell="app"][data-style="frost"] .tag.stage { background: transparent; color: var(--ink3); letter-spacing: .06em; }
:root[data-shell="app"][data-style="frost"] .wc-phon { font-family: var(--font-disp); font-size: 14.5px; }
:root[data-shell="app"][data-style="frost"] .wc-front-sent { font-family: var(--font-disp); font-size: 16px; line-height: 1.65; background: transparent; }
:root[data-shell="app"][data-style="frost"] .wc-front-sent-text .tw.cur { color: var(--ink); font-weight: inherit; text-decoration: none; border-bottom: 1px solid var(--brand); }
:root[data-shell="app"][data-style="frost"] .wc-trans .pos { font-family: var(--font-disp); color: var(--ink3); }
:root[data-shell="app"][data-style="frost"] .wc-sent,
:root[data-shell="app"][data-style="frost"] .wc-exam { background: transparent; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 0; }
:root[data-shell="app"][data-style="frost"] .wc-sent { font-family: var(--font-disp); font-size: 15px; }
:root[data-shell="app"][data-style="frost"] .wc-sent .cn { font-family: var(--font-ui); }
:root[data-shell="app"][data-style="frost"] .btn.reveal { background: transparent; border: 1px solid var(--rule); color: var(--ink2); font-weight: 500; letter-spacing: .1em; }
/* 三档评分：描边纸面键 + 一粒色点，按下才整块上色 */
:root[data-shell="app"][data-style="frost"] .btn.grade {
  background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: 16px;
  font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px;
}
:root[data-shell="app"][data-style="frost"] .btn.grade::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
:root[data-shell="app"][data-style="frost"] .btn.forget::before { background: var(--red); }
:root[data-shell="app"][data-style="frost"] .btn.fuzzy::before { background: var(--amber); }
:root[data-shell="app"][data-style="frost"] .btn.know::before { background: var(--green); }
:root[data-shell="app"][data-style="frost"] .btn.know { border-color: color-mix(in srgb, var(--green) 45%, transparent); }
:root[data-shell="app"][data-style="frost"] .btn.forget.sel { background: var(--red); border-color: var(--red); color: var(--on-brand); }
:root[data-shell="app"][data-style="frost"] .btn.fuzzy.sel { background: var(--amber); border-color: var(--amber); color: var(--on-brand); }
:root[data-shell="app"][data-style="frost"] .btn.know.sel { background: var(--green); border-color: var(--green); color: var(--on-brand); }
:root[data-shell="app"][data-style="frost"] .btn.grade.sel::before { background: var(--on-brand); }

/* ===== 阅读：正文衬线，目标词用荧光笔式底纹代替粗体蓝字 ===== */
:root[data-shell="app"][data-style="frost"] .article h2 { font-family: var(--font-disp); font-weight: 400; font-size: 24px; line-height: 1.3; letter-spacing: -.2px; }
:root[data-shell="app"][data-style="frost"] .art-text { font-family: var(--font-disp); font-size: 16.5px; line-height: 1.8; }
:root[data-shell="app"][data-style="frost"] .art-text .plabel { color: var(--ink3); font-weight: 400; }
:root[data-shell="app"][data-style="frost"] .tw:not(.plain) {
  color: var(--ink); font-weight: inherit; border-bottom: 0; border-radius: 2px;
  background: linear-gradient(transparent 62%, color-mix(in srgb, var(--brand) 18%, transparent) 62%);
}
:root[data-shell="app"][data-style="frost"] .tw:not(.plain):active,
:root[data-shell="app"][data-style="frost"] .tw:not(.plain):hover { background: var(--brand-soft); }
:root[data-shell="app"][data-style="frost"] .tw.old { color: var(--ink); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--green) 20%, transparent) 62%); }
:root[data-shell="app"][data-style="frost"] .tw.out { color: var(--red); background: linear-gradient(transparent 62%, var(--red-soft) 62%); }
:root[data-shell="app"][data-style="frost"] .tw.known { color: var(--green); background: none; border-bottom: 1px dotted var(--green); }
:root[data-shell="app"][data-style="frost"] .tw.forgot { color: var(--red); background: none; border-bottom: 1px dashed var(--red); }
:root[data-shell="app"][data-style="frost"] .wc-front-sent-text .tw:not(.cur),
:root[data-shell="app"][data-style="frost"] .wc-sent .tw,
:root[data-shell="app"][data-style="frost"] .art-text .tw.plain { background: none; color: inherit; border-bottom: 0; }
:root[data-shell="app"][data-style="frost"] .wc-sent .tw:active,
:root[data-shell="app"][data-style="frost"] .art-text .tw.plain:active { background: var(--brand-soft); }
:root[data-shell="app"][data-style="frost"] .wc-sent .tw b { color: var(--ink); font-weight: inherit; border-bottom: 1px solid var(--brand); }

/* ===== 底栏：去掉滑动胶囊，选中项只留一粒雾靛圆点 ===== */
:root[data-shell="app"][data-style="frost"] .tabbar { box-shadow: none; }
:root[data-shell="app"][data-style="frost"] .tab-ind { display: none; }
:root[data-shell="app"][data-style="frost"] .tab { color: var(--ink3); }
:root[data-shell="app"][data-style="frost"] .tab .ico { filter: none; }
:root[data-shell="app"][data-style="frost"] .tab .lb { font-size: 10.5px; font-weight: 500; letter-spacing: .06em; }
:root[data-shell="app"][data-style="frost"] .tab.active { color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .tab.active::after {
  content: ""; position: absolute; bottom: 4px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brand);
}
:root[data-shell="app"][data-style="frost"] .badge { background: var(--brand); color: var(--on-brand); }
:root[data-shell="app"][data-style="frost"] .noise-btn { background: var(--card); border: 1px solid var(--card-line); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }

/* ===== 重力色团（public/orb.js）===== */
.grav-orb { display: none; }
:root[data-shell="app"][data-style="frost"]:not([data-orb="off"]) .grav-orb {
  display: block; position: fixed; left: 0; top: 0; z-index: -1; pointer-events: none;
  width: var(--orb-size, 300px); height: var(--orb-size, 300px);
  margin: calc(var(--orb-size, 300px) / -2) 0 0 calc(var(--orb-size, 300px) / -2);
  border-radius: 50%; opacity: var(--orb-o, .78); filter: blur(var(--orb-blur, 34px)); will-change: transform;
  background:
    radial-gradient(circle at 34% 34%, var(--orb-a), transparent 58%),
    radial-gradient(circle at 70% 64%, var(--orb-b), transparent 60%),
    radial-gradient(circle at 50% 50%, var(--orb-c), transparent 70%);
}
/* 设置页「重力色团」调参台：只在薄雾留白下出现 */
.orb-card { display: none; }
:root[data-shell="app"][data-style="frost"] .orb-card { display: block; }
.orb-card .orb-body { transition: opacity .2s; }
:root[data-orb="off"] .orb-card .orb-body { opacity: .4; pointer-events: none; }
.orb-grp { font-size: 11.5px; letter-spacing: .16em; color: var(--ink2); margin: 16px 0 8px; }
.orb-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.orb-presets button, .orb-rests button {
  border: 1px solid var(--rule); background: transparent; color: var(--ink-body); font-size: 12px;
  border-radius: 12px; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.orb-presets button { padding: 9px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.orb-presets button.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); color: var(--ink); }
.orb-presets i { width: 34px; height: 34px; border-radius: 50%; filter: blur(1.5px); }
.orb-rests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.orb-rests button { padding: 7px 0; }
.orb-rests button.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.orb-range { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; color: var(--ink-body); }
.orb-range input { width: 100%; accent-color: var(--brand); }
.orb-range output { text-align: right; font-size: 12px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.orb-card .orb-acts { display: flex; gap: 10px; margin-top: 14px; }


/* ===== 商城（薄雾留白 · App，11-08 用户拍板）=====
   与首页「刊头」同一语法：积分做报头（大字衬线 + 墨线），攒分规则收成一排小签；
   双人成行 / 昨日排行并成两张半宽纸片；文字分类页签；商品按类分区陈列（renderShopGridFrost）；
   点商品 = 底部浮层，浮层里算好「需要 / 兑换后剩余」并直接兑换。
   组队横幅是 JS 内联样式（app.js 写的 style=""），这里必须 !important 才压得住。
   设计稿：.oil-ui/frost-mobile/shop-explore/（不进包） */
:root[data-shell="app"][data-style="frost"] #view-shop.active { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; align-content: start; }
:root[data-shell="app"][data-style="frost"] #view-shop.active > * { grid-column: 1 / -1; min-width: 0; }
:root[data-shell="app"][data-style="frost"] #view-shop.active > #shopTeamBanner,
:root[data-shell="app"][data-style="frost"] #view-shop.active > #shopBoardBanner { grid-column: auto; }

/* 报头：可用积分 */
:root[data-shell="app"][data-style="frost"] .shop-header {
  background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  padding: 4px 2px 0; margin: 0; gap: 0;
}
:root[data-shell="app"][data-style="frost"] .shop-user-banner {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink);
}
:root[data-shell="app"][data-style="frost"] .shop-user-banner .sub-avatar-wrap,
:root[data-shell="app"][data-style="frost"] .shop-user-banner .sub-name,
:root[data-shell="app"][data-style="frost"] .shop-user-banner .sub-coin { display: none; }
:root[data-shell="app"][data-style="frost"] .sub-points-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; margin: 0; }
:root[data-shell="app"][data-style="frost"] .sub-label { order: -1; flex-basis: 100%; margin-bottom: 6px; font-size: 11px; letter-spacing: .24em; color: var(--brand); }
:root[data-shell="app"][data-style="frost"] .sub-points { font-family: var(--font-disp); font-size: 56px; line-height: .95; font-weight: 400; letter-spacing: -1.5px; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
:root[data-shell="app"][data-style="frost"] .sub-points::after { content: "分"; margin-left: 8px; font-family: var(--font-ui); font-size: 13px; letter-spacing: 0; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .sub-daily-row { margin-top: 14px; gap: 4px; font-size: 12px; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .sub-daily-val { font-weight: 400; font-size: 15px; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .sub-daily-art,
:root[data-shell="app"][data-style="frost"] .sub-daily-art.full { margin-left: 10px; padding: 0; border: 0; background: none; font-size: 12px; font-weight: 400; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .sub-daily-art.full { color: var(--brand); }
:root[data-shell="app"][data-style="frost"] .sub-daily-bar { max-width: none; height: 2px; margin-top: 8px; border-radius: 2px; background: var(--line); }
:root[data-shell="app"][data-style="frost"] .sub-daily-bar > i { border-radius: 2px; background: var(--brand); }
:root[data-shell="app"][data-style="frost"] #btnPointsHistory {
  align-self: start; min-height: 0; padding: 22px 0 0; background: none; box-shadow: none;
  font-size: 12.5px; font-weight: 400; letter-spacing: .04em; color: var(--ink2);
}
:root[data-shell="app"][data-style="frost"] #btnPointsHistory::after { content: " ›"; }
/* 攒分规则：一排小签，左右滑 */
.srb-ic { font-style: normal; }
:root[data-shell="app"][data-style="frost"] .shop-rules-bar {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 2px; border-top: 0;
}
:root[data-shell="app"][data-style="frost"] .srb-item { flex: none; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px; font-size: 11.5px; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .srb-item b { font-weight: 500; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .srb-ic { display: none; }

/* 双人成行 / 昨日排行：两张半宽纸片 */
:root[data-shell="app"][data-style="frost"] #shopTeamBanner,
:root[data-shell="app"][data-style="frost"] #shopBoardBanner {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0;
  margin: 16px 0 0; padding: 13px 14px; min-height: 84px;
  background: var(--card); border: 1px solid var(--card-line); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(27, 33, 48, .04); -webkit-backdrop-filter: none; backdrop-filter: none; animation: none;
}
:root[data-shell="app"][data-style="frost"][data-theme="dark"] #shopTeamBanner,
:root[data-shell="app"][data-style="frost"][data-theme="dark"] #shopBoardBanner { box-shadow: none; }
:root[data-shell="app"][data-style="frost"] #shopTeamBanner > div,
:root[data-shell="app"][data-style="frost"] #shopBoardBanner .sbb-left { display: block; min-width: 0; }
:root[data-shell="app"][data-style="frost"] #stbIcon,
:root[data-shell="app"][data-style="frost"] #stbBtn,
:root[data-shell="app"][data-style="frost"] .sbb-icon,
:root[data-shell="app"][data-style="frost"] .sbb-btn { display: none; }
:root[data-shell="app"][data-style="frost"] #stbTitle,
:root[data-shell="app"][data-style="frost"] .sbb-title {
  font-size: 13.5px; font-weight: 500; letter-spacing: 0; line-height: 1.4; color: var(--ink);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
:root[data-shell="app"][data-style="frost"] #stbDesc,
:root[data-shell="app"][data-style="frost"] .sbb-desc {
  margin-top: 4px; font-size: 11.5px; line-height: 1.5; color: var(--ink2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}

/* 分类：文字页签 + 雾靛短线 */
:root[data-shell="app"][data-style="frost"] .shop-nav { gap: 20px; margin: 22px 2px 0; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
:root[data-shell="app"][data-style="frost"] .snav-btn {
  position: relative; padding: 0; min-height: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  font-size: 14px; font-weight: 400; color: var(--ink3);
}
:root[data-shell="app"][data-style="frost"] .snav-btn.active { background: none; border: 0; color: var(--ink); box-shadow: none; }
:root[data-shell="app"][data-style="frost"] .snav-btn.active::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 16px; height: 2px; margin-left: -8px; border-radius: 2px; background: var(--brand); }

/* 商品：分区陈列 */
:root[data-shell="app"][data-style="frost"] #shopGrid { display: block; }
:root[data-shell="app"][data-style="frost"] .fs-head { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 12px; }
:root[data-shell="app"][data-style="frost"] .fs-head h3 { margin: 0; font-family: var(--font-disp); font-weight: 400; font-size: 20px; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .fs-head h3 small { margin-left: 6px; font-family: var(--font-ui); font-size: 11.5px; color: var(--ink3); }
:root[data-shell="app"][data-style="frost"] .fs-more { padding: 0; border: 0; background: none; font-size: 12px; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .fs-empty { padding: 30px 0; text-align: center; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .shop-card.fs-sq,
:root[data-shell="app"][data-style="frost"] .shop-card.fs-th,
:root[data-shell="app"][data-style="frost"] .fs-list {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; box-shadow: 0 1px 2px rgba(27, 33, 48, .04);
}
:root[data-shell="app"][data-style="frost"][data-theme="dark"] .shop-card.fs-sq,
:root[data-shell="app"][data-style="frost"][data-theme="dark"] .shop-card.fs-th,
:root[data-shell="app"][data-style="frost"][data-theme="dark"] .fs-list { box-shadow: none; }
:root[data-shell="app"][data-style="frost"] .shop-card.fs-sq:hover,
:root[data-shell="app"][data-style="frost"] .shop-card.fs-th:hover { border-color: var(--card-line); }
:root[data-shell="app"][data-style="frost"] .shop-card:active { transform: scale(.97); }
:root[data-shell="app"][data-style="frost"] .shop-card.on { box-shadow: 0 0 0 1.5px var(--brand); }
/* 价格 / 状态：全店一种语法 */
:root[data-shell="app"][data-style="frost"] .fs-price { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-disp); font-size: 15px; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .fs-coin { width: 11px; height: 11px; border-radius: 50%; flex: none; background: radial-gradient(circle at 35% 35%, #f4cf7a, #d9a441); }
:root[data-shell="app"][data-style="frost"] .fs-own { font-size: 11.5px; letter-spacing: .06em; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .fs-using { font-size: 11.5px; letter-spacing: .06em; color: var(--green); }
:root[data-shell="app"][data-style="frost"] .fs-using::before { content: "● "; font-size: 8px; vertical-align: 2px; }
/* 头像 / 头像框：三列小方块 */
:root[data-shell="app"][data-style="frost"] .fs-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
:root[data-shell="app"][data-style="frost"] .shop-card.fs-sq { padding: 14px 6px 11px; gap: 8px; }
:root[data-shell="app"][data-style="frost"] .fs-av { width: 58px; height: 58px; font-size: 30px; margin-top: 2px; }
:root[data-shell="app"][data-style="frost"] .fs-sq .fs-n { font-size: 12.5px; line-height: 1.35; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .fs-p { min-height: 18px; display: flex; align-items: center; }
/* 主题皮肤：配色缩略卡 */
:root[data-shell="app"][data-style="frost"] .fs-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
:root[data-shell="app"][data-style="frost"] .shop-card.fs-th { padding: 12px; align-items: stretch; text-align: left; gap: 8px; }
:root[data-shell="app"][data-style="frost"] .fs-mini { position: relative; height: 74px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .06); }
:root[data-shell="app"][data-style="frost"] .fs-mini i { position: absolute; display: block; border-radius: 4px; }
:root[data-shell="app"][data-style="frost"] .fs-th .fs-n { font-size: 13.5px; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .fs-th .fs-d { margin-top: -5px; font-size: 11px; line-height: 1.5; color: var(--ink2); }
/* 字体 / 白噪音：列表行 */
:root[data-shell="app"][data-style="frost"] .fs-list { overflow: hidden; }
:root[data-shell="app"][data-style="frost"] .shop-card.fs-row {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
:root[data-shell="app"][data-style="frost"] .shop-card.fs-row:hover { border-color: transparent; }
:root[data-shell="app"][data-style="frost"] .shop-card.fs-row + .shop-card.fs-row { border-top: 1px solid var(--line); }
:root[data-shell="app"][data-style="frost"] .fs-sample { font-size: 24px; line-height: 1; text-align: center; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .fs-nz { position: relative; width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; font-size: 20px; }
:root[data-shell="app"][data-style="frost"] .fs-play { position: absolute; right: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--card-solid); color: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
:root[data-shell="app"][data-style="frost"] .fs-play svg { width: 10px; height: 10px; fill: currentColor; }
:root[data-shell="app"][data-style="frost"] .fs-row .fs-n { font-size: 14px; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .fs-row .fs-d { margin-top: 2px; font-size: 11.5px; line-height: 1.45; color: var(--ink2); }

/* 商品浮层：底部整宽纸面，状态行算好「需要 / 兑换后剩余」，一颗实心主按钮（预览弹窗原本是内联样式，故 !important） */
:root[data-shell="app"][data-style="frost"] #shopPreviewModal > .popup {
  width: 100% !important; max-width: 720px !important; border-radius: 28px 28px 0 0 !important; border: 0 !important;
  padding: 14px 24px calc(26px + env(safe-area-inset-bottom, 0px)) !important;
  background: var(--card-solid) !important; box-shadow: 0 -20px 50px -30px rgba(0, 0, 0, .4) !important;
}
:root[data-shell="app"][data-style="frost"] #shopPreviewModal > .popup > div:first-child { margin-bottom: 6px !important; }
:root[data-shell="app"][data-style="frost"] #shopPreviewModal > .popup > div:first-child > span { font-size: 11px !important; font-weight: 400 !important; letter-spacing: .24em; color: var(--brand) !important; }
:root[data-shell="app"][data-style="frost"] #spvName { margin-bottom: 6px !important; font-family: var(--font-disp); font-size: 26px !important; font-weight: 400 !important; }
:root[data-shell="app"][data-style="frost"] #spvDesc { font-size: 13px !important; line-height: 1.6 !important; }
:root[data-shell="app"][data-style="frost"] #spvStatus {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 16px -6px 0; padding: 12px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 13px !important; font-weight: 400 !important; color: var(--ink2) !important;
}
:root[data-shell="app"][data-style="frost"] #spvStatus:has(> .fs-using:only-child),
:root[data-shell="app"][data-style="frost"] #spvStatus:has(> .fs-own:only-child) { justify-content: center; }
:root[data-shell="app"][data-style="frost"] #spvStatus b { font-family: var(--font-disp); font-weight: 400; font-size: 17px; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .fs-cta { flex: 1; height: 52px; min-height: 52px; border-radius: 999px; font-size: 15px; font-weight: 500; letter-spacing: .1em; }
:root[data-shell="app"][data-style="frost"] .fs-cta:disabled { opacity: 1; background: var(--soft2); color: var(--ink2); box-shadow: none; }

/* ---------- 04 字卡墙 —— 破套路：产品自己的实物是一叠词卡，卡片有厚度 ---------- */
:root[data-style="deck"] {
  --bg: #efe9df;
  --ambient: none;
  --card: #fbf8f2;
  --card-solid: #fffdf7;
  --card-line: #e0d8c9;
  --ink: #26221b;
  --ink-body: #4a4235;
  --ink2: #76695a;
  --ink3: #c0b6a3;
  --brand: #a85f16;
  --brand-soft: rgba(168, 95, 22, .12);
  --green: #1f7a54;    --green-soft: rgba(31, 122, 84, .13);
  --amber: #a85f16;    --amber-soft: rgba(168, 95, 22, .13);
  --red: #a8402f;      --red-soft: rgba(168, 64, 47, .11);
  --violet: #5f4b7a;   --violet-soft: rgba(95, 75, 122, .11);
  --note-bg: rgba(255, 236, 170, .7);
  --note-border: #dcc285;
  --note-ink: #8a6608;
  --soft: rgba(38, 34, 27, .055);
  --soft2: rgba(38, 34, 27, .10);
  --toast-bg: rgba(38, 34, 27, .95);
  --tabbar-bg: #efe9df;
  --topbar-bg: rgba(239, 233, 223, .92);
  --line: rgba(38, 34, 27, .14);
  --rule: #ddd4c3;
  --boot-rule: #cabfa9;
  --boot-dot: #8f846f;
  /* 一叠卡：主卡后面露出第二张的纸边 */
  --shadow: 4px 5px 0 -1px var(--card-solid), 4px 5px 0 0 var(--rule);
  --shadow-lift: 6px 8px 0 -1px var(--card-solid), 6px 8px 0 0 var(--rule);
  --btn-sh: none;
  --btn-sh-hover: none;
  --font-num: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --blur: none;
  --r-card: 8px; --r-item: 8px; --r-ctl: 6px; --r-pill: 6px;
  --num-w: 700; --num-track: -.5px;
}
:root[data-style="deck"][data-theme="dark"] {
  --bg: #191713;
  --card: #232019;
  --card-solid: #2a251d;
  --card-line: #3a332a;
  --ink: #e9e2d3;
  --ink-body: #c6bda9;
  --ink2: #9b907b;
  --ink3: #5c5545;
  --brand: #d9934a;
  --brand-soft: rgba(217, 147, 74, .16);
  --green: #63b28c;    --green-soft: rgba(99, 178, 140, .16);
  --amber: #d9934a;    --amber-soft: rgba(217, 147, 74, .16);
  --red: #d9776a;      --red-soft: rgba(217, 119, 106, .16);
  --violet: #a394c0;   --violet-soft: rgba(163, 148, 192, .16);
  --note-bg: rgba(217, 147, 74, .14);
  --note-border: rgba(217, 147, 74, .4);
  --note-ink: #d9b072;
  --on-brand: #191713;
  --soft: rgba(233, 226, 211, .05);
  --soft2: rgba(233, 226, 211, .11);
  --toast-bg: rgba(58, 51, 42, .96);
  --tabbar-bg: #191713;
  --topbar-bg: rgba(25, 23, 19, .92);
  --line: rgba(233, 226, 211, .14);
  --rule: #453d31;
  --boot-rule: #554b3c;
  --boot-dot: #9b8f78;
  --shadow: 4px 5px 0 -1px var(--card-solid), 4px 5px 0 0 var(--rule);
  --shadow-lift: 6px 8px 0 -1px var(--card-solid), 6px 8px 0 0 var(--rule);
}
:root[data-style="deck"] .card { border: 1px solid var(--card-line); }
:root[data-style="deck"] .card h3 { font-size: 12px; font-weight: 700; letter-spacing: .2px; color: var(--ink2); }
/* 每日一句：像在今天这张卡上划过一道荧光笔 */
:root[data-style="deck"] .dq { text-align: left; }
:root[data-style="deck"] .dq-t {
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 2px; background: linear-gradient(transparent 64%, var(--note-bg) 64%);
}
/* 引导页：选项就是几张纸片，选中的一张压上荧光笔 */
:root[data-style="deck"] .intro-k { color: var(--ink-body); }
:root[data-style="deck"] .intro-row, :root[data-style="deck"] .intro-chip { border-color: var(--card-line); box-shadow: 2px 2px 0 -1px var(--card-solid), 2px 2px 0 0 var(--rule); }
:root[data-style="deck"] .intro-row.sel, :root[data-style="deck"] .intro-chip.sel { border-color: var(--note-border); background: var(--note-bg); color: var(--ink); }
:root[data-style="deck"] .intro-row.sel span, :root[data-style="deck"] .intro-chip.sel i { color: var(--note-ink); }
:root[data-style="deck"] .intro-ol li::before { background: var(--note-bg); box-shadow: inset 0 0 0 1px var(--note-border); color: var(--note-ink); border-radius: 4px; }
:root[data-style="deck"] .task-btn { border: 1px solid var(--card-line); }
:root[data-style="deck"] .wordcard { position: relative; z-index: 0; border: 1px solid var(--card-line); justify-content: flex-start; padding-top: 22px; }
/* 正在背的这张从牌堆里抽出来：后面再垫两张纸，各自歪一点点 */
:root[data-style="deck"] .wordcard::before,
:root[data-style="deck"] .wordcard::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-card);
}
:root[data-style="deck"] .wordcard::before { transform: rotate(-.55deg) translate(2px, 4px); }
:root[data-style="deck"] .wordcard::after { transform: rotate(.4deg) translate(4px, 8px); }
:root[data-style="deck"] .wc-tags { justify-content: flex-start; }
:root[data-style="deck"] .tag { font-family: var(--font-num); font-size: 10px; }
:root[data-style="deck"] .wc-wordline { justify-content: flex-start; }
:root[data-style="deck"] .wordcard { text-align: left; }
:root[data-style="deck"] .wc-sent { border-bottom: 2px solid var(--amber-soft); }
:root[data-style="deck"] .ci-dot { border-radius: 4px; box-shadow: inset 0 0 0 1px var(--card-line); }
:root[data-style="deck"] .tabbar { box-shadow: 0 -1px 0 var(--rule); }
:root[data-style="deck"] .theme-btn { border: 1px solid var(--card-line); box-shadow: none; }
:root[data-style="deck"] .topsearch { border-color: var(--card-line); }

/* ---------- 设置页的风格选择器：跟着当前皮肤走，不各自造型 ---------- */
.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.style-opt {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 5px;
  border: 1px solid var(--card-line); border-radius: var(--r-item); background: var(--card-solid);
  padding: 12px 12px 13px; text-align: left; color: var(--ink-body); box-shadow: var(--shadow);
  transition: transform .16s var(--spring), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.style-opt:active { transform: scale(.97); }
.style-opt .sw { display: flex; gap: 4px; }
.style-opt .sw b { width: 15px; height: 15px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.style-opt .sw b:nth-child(1) { background: var(--c1); }
.style-opt .sw b:nth-child(2) { background: var(--c2); }
.style-opt .sw b:nth-child(3) { background: var(--c3); }
.style-opt .so-n { font-family: var(--font-label); font-size: 14px; font-weight: 700; letter-spacing: var(--label-track); color: var(--ink); }
.style-opt .so-d { font-size: 11.5px; line-height: 1.5; color: var(--ink2); }
.style-opt[aria-checked="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.style-opt[aria-checked="true"]::before {
  content: ''; position: absolute; top: 11px; right: 11px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--brand); animation: popIn .28s var(--spring) backwards;
}
@media (min-width: 381px) {
  /* 9 项风格：首项（薄雾留白）跨两栏做精选顶行，其余 8 项组成整齐 2x4 对称网格，杜绝单卡孤悬空洞 */
  .style-grid .style-opt[data-style="frost"],
  .style-grid .style-opt.style-opt-featured,
  .style-grid .style-opt:first-child {
    grid-column: 1 / -1;
  }
}
@media (max-width: 380px) { .style-grid { grid-template-columns: 1fr; } }

/* 窄屏：皮肤令牌权重高于 :root，所以缩放值要带同等权重写在最后 */
@media (max-width: 380px) {
  :root, :root[data-style] { --hw-size: 34px; --num-track: -.3px; }
  :root[data-style="editorial"] { --hw-size: 36px; }
  :root[data-style="instrument"] { --hw-size: 30px; }
}
.art-swipe-done {
  position: absolute; top: 0; right: 84px; bottom: 0; width: 84px;
  border: none; background: var(--brand); color: #fff;
  font-size: 14px; font-weight: 700; line-height: 1.3;
  border-radius: var(--r-item) 0 0 var(--r-item);
  opacity: 0; pointer-events: none;
  transition: opacity .18s var(--ease);
}
.art-swipe-del { border-radius: 0 var(--r-item) var(--r-item) 0; }
.art-row.revealed .art-swipe-done { opacity: 1; pointer-events: auto; }
.art-item.done { opacity: 0.75; }
.art-item.done .t { text-decoration: none; }
.art-done-star {
  display: inline-block;
  margin-right: 5px;
  font-size: 15px;
  line-height: 1;
  vertical-align: -1px;
  filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.4));
  animation: popIn 0.3s var(--spring) backwards;
}

/* 例句单词可点击样式 */
.wc-sent .tw {
  color: inherit;
  font-weight: normal;
  border-bottom: 1px dotted rgba(86, 102, 245, 0.45);
  border-radius: 2px;
  cursor: pointer;
  padding: 0 1px;
}
.wc-sent .tw:hover, .wc-sent .tw:active {
  background: var(--brand-soft);
  color: var(--brand);
}
.wc-sent .tw b {
  color: var(--brand);
  font-weight: 700;
}

/* 阅读文章中普通单词点状下划线提示 */
.art-text .tw.plain {
  color: inherit;
  font-weight: normal;
  border-bottom: 1px dotted rgba(86, 102, 245, 0.4);
  cursor: pointer;
  border-radius: 2px;
  padding: 0 1px;
}
.art-text .tw.plain:hover, .art-text .tw.plain:active {
  background: var(--brand-soft);
  color: var(--brand);
}
:root[data-theme="dark"] .art-text .tw.plain {
  border-bottom-color: rgba(125, 138, 255, 0.35);
}

/* 选中但未提交的选项高亮 */
.q-item .qc div.sel {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  box-shadow: 0 0 0 1px var(--brand);
}
:root[data-theme="dark"] .q-item .qc div.sel {
  background: rgba(125, 138, 255, 0.2);
}

/* 派生词模块样式 */
.sec-deriv {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--ink-body);
}
.sec-deriv b {
  color: var(--brand);
}
.deriv-word {
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px dotted var(--brand);
  padding: 0 1px;
  border-radius: 2px;
}
.deriv-word:hover, .deriv-word:active {
  background: var(--brand-soft);
}
.sec-deriv .pos {
  color: var(--ink2);
  font-style: italic;
  font-size: 12px;
  margin-left: 2px;
}
/* 相近词：近义 / 形近两行，行首小标签 */
.sec-similar .sim-row {
  margin-top: 2px;
}
.sec-similar .sim-tag {
  display: inline-block;
  font-style: normal;
  font-size: 11px;
  line-height: 1.5;
  padding: 0 6px;
  margin-right: 6px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  vertical-align: 1px;
}

/* 同根词思维导图（横向分支：宽屏 3 栏；手机窄屏 <440px 左上锚定 + 2 栏横向分支） */
.deriv-mm {
  text-align: left;
  font-size: 13px;
  line-height: 1.4;
  margin-top: 10px;
  padding: 10px 12px 12px;
  border-radius: var(--r-item, 14px);
  background: var(--soft);
  border: 1px solid var(--line);
}
.deriv-mm .mm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.deriv-mm .mm-title {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}
.deriv-mm .mm-title b {
  color: var(--brand);
  font-weight: 700;
}
.deriv-mm .mm-sub,
.deriv-mm .mm-hint {
  font-size: 11px;
  color: var(--ink2);
}
.deriv-mm .mm-canvas {
  position: relative;
  width: 100%;
  min-width: 0;
}
.deriv-mm .mm-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.deriv-mm .mm-path {
  fill: none;
  stroke-linecap: round;
}
.deriv-mm .mm-tree {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 28px;
}
.deriv-mm .mm-root-col {
  flex-shrink: 0;
}
.deriv-mm .mm-root {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand);
  color: var(--on-brand, #fff);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
  max-width: 148px;
  word-break: break-word;
  box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .28);
}
.deriv-mm .mm-groups {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.deriv-mm .mm-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
  min-width: 0;
}
.deriv-mm .mm-branch {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 56px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--card-solid, #fff);
  color: var(--mm-c, var(--brand));
  border: 1px solid var(--mm-c, var(--brand));
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, transform .15s ease;
}
.deriv-mm .mm-branch:active {
  transform: scale(.96);
}
.deriv-mm .mm-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--mm-c, var(--brand));
  flex-shrink: 0;
}
.deriv-mm .mm-cnt {
  font-size: 10.5px;
  opacity: .72;
  font-weight: 600;
}
.deriv-mm .mm-leaves {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.deriv-mm .mm-group.is-collapsed .mm-leaves {
  display: none;
}
.deriv-mm .mm-group.is-collapsed .mm-branch {
  background: var(--mm-soft, var(--brand-soft));
}
.deriv-mm .mm-leaf {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--card-solid, #fff);
  border: 1px solid var(--line);
  border-left: 3px solid var(--mm-c, var(--brand));
  color: var(--ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.deriv-mm .mm-leaf:hover,
.deriv-mm .mm-leaf:active {
  background: var(--mm-soft, var(--brand-soft));
  border-color: var(--mm-c, var(--brand));
}
.deriv-mm .mm-leaf-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
}
.deriv-mm .mm-w {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.deriv-mm .mm-af {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--mm-c, var(--brand));
  background: var(--mm-soft, var(--brand-soft));
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  flex-shrink: 0;
}
.deriv-mm .mm-cn {
  font-size: 11.5px;
  color: var(--ink2);
  line-height: 1.38;
  margin-top: 2px;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 手机窄屏自适应（容器 < 440px）：左上锚定中心词 + 2 栏横向分支，留足叶卡空间且零横向溢出 */
.deriv-mm .mm-canvas[data-mm-layout="compact"] .mm-tree {
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
}
.deriv-mm .mm-canvas[data-mm-layout="compact"] .mm-root-col {
  align-self: flex-start;
}
.deriv-mm .mm-canvas[data-mm-layout="compact"] .mm-root {
  padding: 4px 10px;
  font-size: 12.5px;
}
.deriv-mm .mm-canvas[data-mm-layout="compact"] .mm-groups {
  padding-left: 14px;
  gap: 8px;
}
.deriv-mm .mm-canvas[data-mm-layout="compact"] .mm-group {
  gap: 14px;
}
.deriv-mm .mm-canvas[data-mm-layout="compact"] .mm-branch {
  padding: 3px 6px;
  font-size: 11px;
  width: 50px;
  min-width: 50px;
  justify-content: center;
}
.deriv-mm .mm-canvas[data-mm-layout="compact"] .mm-leaf {
  padding: 5px 8px;
}

/* 卡片右上角「太简单」快捷按钮 */
.wordcard { position: relative; }
.btn-card-easy {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink3);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.btn-card-easy:hover, .btn-card-easy:active {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
}
/* 二段式标记：已标记为太简单（再次点击取消） */
.btn-card-easy.on {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand);
  font-weight: 700;
}
.btn-card-easy.pop { animation: popIn .3s var(--spring); }
:root[data-style="instrument"] .btn-card-easy {
  border-radius: 3px;
  font-family: var(--font-num);
  font-size: 10.5px;
}
:root[data-style="deck"] .btn-card-easy {
  border-radius: 4px;
  box-shadow: 1px 1px 0 var(--card-line);
}

/* ================= 打印 / 导出 PDF 样式 ================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 15mm 18mm 15mm 18mm;
  }

  body, html {
    background: #fff !important;
    color: #111 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
  }
  #topbar, #tabs, #tabIndicator, #noiseWidget, #toast, #loginMask, #intro,
  .read-head, .art-actions, .quiz-submit-row, #quizResult, .tts-btn,
  .art-note-form, .note-del, .art-outside {
    display: none !important;
  }

  .view:not(#view-read) {
    display: none !important;
  }
  #view-read, #readArticle, .card.article {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    max-width: 100% !important;
  }

  #artTitle {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #000 !important;
    margin-bottom: 6px !important;
    text-align: center !important;
    letter-spacing: -0.2px !important;
  }
  #artMeta {
    text-align: center !important;
    color: #666 !important;
    font-size: 11.5px !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #ddd !important;
    padding-bottom: 10px !important;
  }
  .exam-flag {
    display: inline-block !important;
    margin: 0 auto 8px !important;
    text-align: center !important;
    border: 1px solid #333 !important;
    color: #000 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 1px 8px !important;
    border-radius: 3px !important;
  }
  .art-text {
    font-size: 14.5px !important;
    line-height: 1.8 !important;
    color: #222 !important;
  }
  .art-text p {
    margin-bottom: 14px !important;
    text-align: justify !important;
  }
  .art-text .plabel {
    font-weight: 800 !important;
    color: #000 !important;
    margin-right: 4px !important;
  }

  .tw, .tw.plain, .tw.cur {
    border-bottom: none !important;
    color: inherit !important;
    font-weight: normal !important;
    background: none !important;
  }
  .tw.cur b {
    font-weight: 700 !important;
    color: #000 !important;
  }

  #artQuestions {
    margin-top: 24px !important;
    border-top: 2px solid #222 !important;
    padding-top: 12px !important;
  }
  .quiz-head {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 12px !important;
    font-weight: 700 !important;
    color: #000 !important;
    border-bottom: 1px dashed #ccc !important;
    padding-bottom: 6px !important;
  }
  .q-item {
    page-break-inside: avoid !important;
    margin-top: 14px !important;
    padding: 10px 14px !important;
    background: #fafafa !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 6px !important;
  }
  .q-item .qt {
    font-weight: 700 !important;
    font-size: 13.5px !important;
    color: #111 !important;
  }
  .q-item .qc {
    margin-top: 8px !important;
  }
  .q-item .qc div {
    padding: 5px 8px !important;
    border: 1px solid #ddd !important;
    background: #fff !important;
    margin-bottom: 4px !important;
    font-size: 12.5px !important;
    border-radius: 4px !important;
  }
  .q-item .qc div.right {
    font-weight: 700 !important;
    border-color: #2e7d32 !important;
    background: #e8f5e9 !important;
  }
  .q-item .qc div.wrong {
    border-color: #c62828 !important;
    background: #ffebee !important;
  }
  .q-item .qe {
    display: block !important;
    margin-top: 8px !important;
    padding: 8px 10px !important;
    background: #f1f3f5 !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    color: #333 !important;
    line-height: 1.6 !important;
  }

  .art-translation {
    display: block !important;
    page-break-before: auto !important;
    margin-top: 22px !important;
    padding-top: 14px !important;
    border-top: 1px dashed #bbb !important;
    font-size: 13px !important;
    color: #333 !important;
  }
  .art-translation .p-sectitle {
    font-weight: 800 !important;
    font-size: 15px !important;
    margin-bottom: 8px !important;
    color: #000 !important;
  }

  .card.art-notes {
    page-break-inside: avoid !important;
    margin-top: 20px !important;
    padding: 12px !important;
    border: 1px solid #ddd !important;
    background: #fdfdfd !important;
  }
}

/* 阅读列表分类筛选 */
.read-filter-chips {
  display: flex;
  gap: 8px;
  margin: 14px 0 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.read-filter-chips::-webkit-scrollbar { display: none; }
.read-filter-chips .chip {
  padding: 6px 14px;
  font-size: 13px;
  flex-shrink: 0;
}
.art-tag-novel {
  color: var(--violet);
  background: var(--violet-soft);
  border: 1px solid rgba(124, 77, 255, 0.2);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* ================= 顶栏个人装扮与积分徽章 ================= */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 3px 8px 3px 4px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  transition: transform .15s, border-color .2s;
  user-select: none;
}
.user-profile-badge:active { transform: scale(.95); }
/* ===== 头像 =====
   图形本体来自 core.js 的 AVATARS（24×24、只用 currentColor），这里只给配色与尺寸。
   font-size 现在只是字号：头像框（core.js 的 FRAMES）已改为内联 SVG，
   环厚由框自己的 inset 百分比决定，不再靠 em 反推，所以改 font-size 不会再动环。 */
.avatar-box {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 16px;
  flex-shrink: 0;
}
.avatar-box > .avatar-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.avatar-box > svg,
.avatar-box > .avatar-text > svg {
  width: 78%;
  height: 78%;
  display: block;
}
/* 带背景的方形插画只裁切图片本身，保留头像框在容器外的装饰。
   商城列表直接放 img；顶栏和商城头部放在 .avatar-text 内。 */
.avatar-box > img.avatar-img,
.avatar-box > .avatar-text > img.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
}
.avatar-box.large {
  width: 54px;
  height: 54px;
  font-size: 30px;
}
/* ===== 头像框 =====
   图形本体来自 core.js 的 FRAMES（内联 SVG，卡通贴纸风），这里只负责摆放、尺寸与动画。
   几何：inset:-16.5% → 整框 = 1.33×box；环外径 0.596 box、内径 0.503 box，
   与旧版纯 CSS 环（28px 头像下 14.5~17px）基本重合，顶栏 28px 头像的胶囊不会被撑破。
   ⚠️ 框的大小现在完全由 inset 百分比决定，和 font-size 无关了（旧版靠 em 反推环厚）。 */
.avatar-frame {
  position: absolute;
  inset: -16.5%;
  border-radius: 50%;
  pointer-events: none;
  box-sizing: border-box;
}
.avatar-frame > svg { width: 100%; height: 100%; display: block; overflow: visible; }
/* 动画元素必须 transform-box:fill-box，否则 rotate/scale 会绕 viewBox 原点跑飞 */
.avatar-frame > svg [class^="fr-"] { transform-box: fill-box; transform-origin: 50% 50%; }

/* 自身发光的三种留一点外晕；金属/贴纸类不加（浅色底上会糊成一团） */
.avatar-frame.frame-neon > svg { filter: drop-shadow(0 0 .16em rgba(34, 211, 238, .5)); }
.avatar-frame.frame-fire > svg { filter: drop-shadow(0 0 .16em rgba(249, 115, 22, .5)); }
.avatar-frame.frame-galaxy > svg { filter: drop-shadow(0 0 .16em rgba(124, 58, 237, .45)); }

@keyframes frSway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes frTwinkle { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.82); opacity: .68; } }
@keyframes frTwinkle2 { 0%, 100% { transform: scale(.86); opacity: .62; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes frFlicker { 0%, 100% { transform: scaleY(1) scaleX(1); } 50% { transform: scaleY(1.14) scaleX(.94); } }
@keyframes frFlicker2 { 0%, 100% { transform: scaleY(1.1) scaleX(.95); } 50% { transform: scaleY(.92) scaleX(1.04); } }
@keyframes frGlitch { 0%, 84%, 100% { transform: none; } 86% { transform: translateX(.5px); } 91% { transform: translateX(-.4px); } 96% { transform: translateX(.25px); } }
@keyframes frGlitch2 { 0%, 78%, 100% { transform: none; } 82% { transform: translateX(-.5px); } 88% { transform: translateX(.4px); } }
@keyframes frBreathe { from { opacity: .45; } to { opacity: 1; } }

.avatar-frame svg .fr-sway { animation: frSway 3.4s ease-in-out infinite alternate; }
.avatar-frame svg .fr-twinkle { animation: frTwinkle 3.2s ease-in-out infinite; }
.avatar-frame svg .fr-twinkle2 { animation: frTwinkle2 2.4s ease-in-out infinite; }
.avatar-frame svg .fr-flicker { animation: frFlicker 1.3s ease-in-out infinite; }
.avatar-frame svg .fr-flicker2 { animation: frFlicker2 1.7s ease-in-out infinite; }
.avatar-frame svg .fr-glitch { animation: frGlitch 2.8s steps(1, end) infinite; }
.avatar-frame svg .fr-glitch2 { animation: frGlitch2 3.4s steps(1, end) infinite; }
.avatar-frame svg .fr-breathe { animation: frBreathe 2.6s ease-in-out infinite alternate; }

@media (prefers-reduced-motion: reduce) {
  .avatar-frame svg [class^="fr-"] { animation: none; }
}

.points-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-body);
}
.points-pill .coin { font-size: 14px; }

/* ================= 积分商城视图 ================= */
#view-shop.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.shop-header {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.shop-user-banner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sub-info {
  flex: 1;
  min-width: 0;
}
.sub-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-head);
}
.sub-points-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 3px;
}
.sub-coin { font-size: 17px; }
.sub-points {
  font-size: 24px;
  font-weight: 800;
  color: #f59e0b;
  font-family: var(--font-disp);
}
.sub-label {
  font-size: 12px;
  color: var(--ink2);
}
/* 今日积分进度：今日已得 x / 600 + 文章类 n/6 */
.sub-daily-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink2);
}
.sub-daily-label { font-size: 11.5px; }
.sub-daily-val {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  font-family: var(--font-disp);
}
.sub-daily-cap { font-size: 11.5px; }
.sub-daily-art {
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink2);
}
.sub-daily-art.full {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  border-color: color-mix(in srgb, var(--brand) 40%, transparent);
  color: var(--brand);
  font-weight: 700;
}
.sub-daily-bar {
  margin-top: 5px;
  height: 4px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
  max-width: 190px;
}
.sub-daily-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  transition: width .5s var(--ease-out, ease);
}
.shop-rules-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink2);
}
.shop-rules-bar b { color: var(--brand); font-weight: 700; }

.shop-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.shop-nav::-webkit-scrollbar { display: none; }
.snav-btn {
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--card-solid);
  color: var(--ink2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.snav-btn.active {
  background: var(--brand);
  color: var(--on-brand);
  border-color: var(--brand);
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.shop-card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--r-card);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform .15s, border-color .2s;
}
.shop-card:hover { border-color: var(--brand); }
.shop-card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--r-pill);
}
.shop-card-badge.equipped {
  background: var(--brand);
  color: var(--on-brand);
}
.shop-card-badge.unlocked {
  background: var(--brand-soft);
  color: var(--brand);
}
.shop-card-icon {
  margin: 6px 0 10px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-head);
  margin-bottom: 4px;
}
.shop-card-desc {
  font-size: 11.5px;
  color: var(--ink2);
  line-height: 1.4;
  margin-bottom: 12px;
  flex: 1;
}
.shop-card-action {
  width: 100%;
}
.shop-btn {
  width: 100%;
  border: none;
  padding: 7px 0;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s, background-color .15s;
}
.shop-btn.buy {
  background: #f59e0b;
  color: #fff;
}
.shop-btn.buy:hover { background: #d97706; }
.shop-btn.equip {
  background: var(--card-solid);
  border: 1px solid var(--line);
  color: var(--ink-body);
}
.shop-btn.equip:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.shop-btn.active-equipped {
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;   /* 可点击：同样打开商品预览 */
}

/* ================= 商品预览窗口 ================= */
/* 点商品卡片呼出的「先看后买」大图舞台：头像/头像框/字体样张/主题迷你模拟/白噪音试听 */
.spv-stage {
  min-height: 158px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 14px;
  margin-bottom: 14px;
  overflow: hidden;
}

/* 积分流水项 */
.ph-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.ph-item:last-child { border-bottom: none; }
.ph-reason { font-size: 13.5px; font-weight: 600; color: var(--ink-body); }
.ph-time { font-size: 11px; color: var(--ink2); margin-top: 2px; }
.ph-amount { font-size: 14px; font-weight: 700; font-family: var(--font-disp); }
.ph-amount.plus { color: #10b981; }
.ph-amount.minus { color: #ef4444; }

/* ================= 自定义字体配置（全站全局生效） ================= */
/* 字栈是「预览 ↔ 实际」的唯一事实来源：core.js SHOP_CATALOG 字体项的 preview 必须与这里逐字一致，
   index.html 的 Google Fonts 链接必须覆盖字栈里的全部在线家族。scripts/font-sync-test.js 锁这条。 */
/* 「默认字体」商品项（10-29 补）：把 --font-custom 显式写回 :root 的初始值，
   这样商城里能有一张「换回默认字体」的卡片（此前缺 → 换过字体后换不回来）。
   值必须与 :root 的 --font-custom 逐字一致 —— font-sync-test ① 断言 preview 与 CSS 一致。 */
html[data-font="default"] {
  --font-custom: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
html[data-font="serif"] {
  --font-custom: "Playfair Display", "Noto Serif SC", "Songti SC", SimSun, serif;
}
html[data-font="kaiti"] {
  --font-custom: "LXGW WenKai TC", "STKaiti", "KaiTi", "BiauKai", serif;
}
html[data-font="round"] {
  --font-custom: "Nunito", "Yuanti SC", "YouYuan", sans-serif;
}
html[data-font="mono"] {
  --font-custom: "JetBrains Mono", Consolas, "Courier New", monospace;
}
/* 手写行楷（练字感）、几何无衬线（现代清爽）、打字机衬线（复古读物） */
html[data-font="handwrite"] {
  --font-custom: "Ma Shan Zheng", "ZCOOL KuaiLe", "Xingkai SC", "STXingkai", KaiTi, cursive, serif;
}
html[data-font="geometric"] {
  --font-custom: "Poppins", "Century Gothic", "Futura", "Avenir Next", sans-serif;
}
html[data-font="typewriter"] {
  --font-custom: "Courier Prime", "Courier New", "American Typewriter", monospace;
}

/* 核心：选中任意字体后，全站所有变量及全部 UI 元素 100% 全局生效 */
html[data-font]:not([data-font="default"]) {
  --font-ui: var(--font-custom) !important;
  --font-disp: var(--font-custom) !important;
  --font-num: var(--font-custom) !important;
  --font-label: var(--font-custom) !important;
}
html[data-font]:not([data-font="default"]),
html[data-font]:not([data-font="default"]) body,
html[data-font]:not([data-font="default"]) button,
html[data-font]:not([data-font="default"]) input,
html[data-font]:not([data-font="default"]) select,
html[data-font]:not([data-font="default"]) textarea,
html[data-font]:not([data-font="default"]) .tab,
html[data-font]:not([data-font="default"]) .tab .lb,
html[data-font]:not([data-font="default"]) .card,
html[data-font]:not([data-font="default"]) .wordcard,
html[data-font]:not([data-font="default"]) .wc-word,
html[data-font]:not([data-font="default"]) .art-text,
html[data-font]:not([data-font="default"]) #artTitle,
html[data-font]:not([data-font="default"]) .brand,
html[data-font]:not([data-font="default"]) .sub-name,
html[data-font]:not([data-font="default"]) h1,
html[data-font]:not([data-font="default"]) h2,
html[data-font]:not([data-font="default"]) h3,
html[data-font]:not([data-font="default"]) p,
html[data-font]:not([data-font="default"]) span,
html[data-font]:not([data-font="default"]) div {
  font-family: var(--font-custom) !important;
}

/* 字体样张豁免：商城三处预览（网格图标 / 兑换确认 / 预览大窗）与长图·PDF 导出自带字栈，
   不能被上面的全局 !important 改掉——否则预览永远显示「已装配字体」而不是「将得到的字体」。
   传字栈用内联自定义属性 --fsp（不能写内联 font-family，!important 会吞掉它），
   这条规则特异性 (0,3,1) 压过全局 div/span/p 的 (0,2,2)，.fsp * 连后代一起兜住。 */
.fsp { font-family: var(--fsp, inherit); }
html[data-font]:not([data-font="default"]) .fsp,
html[data-font]:not([data-font="default"]) .fsp * {
  font-family: var(--fsp, inherit) !important;
}

/* ================= 新增皮肤主题 ================= */
/* 05 日系抹茶 */
:root[data-style="matcha"] {
  --bg: #f5f7f2;
  --card: #ffffff;
  --card-solid: #ffffff;
  --card-line: #e3e8dc;
  --line: #d8ded0;
  --ink: #1f3323;
  --ink-body: #2d4532;
  --ink2: #5b7360;
  --ink3: #9fb0a2;
  --brand: #2e7d32;
  --brand-soft: rgba(46, 125, 50, .12);
  --on-brand: #ffffff;
  --tabbar-bg: rgba(245, 247, 242, .88);
  --topbar-bg: rgba(245, 247, 242, .88);
}
:root[data-style="matcha"][data-theme="dark"] {
  --bg: #121913;
  --card: #182219;
  --card-solid: #1c271e;
  --card-line: #2a382c;
  --line: #2d3d2f;
  --ink: #e5ede6;
  --ink-body: #b8ccbb;
  --ink2: #7a947d;
  --ink3: #4a5c4c;
  --brand: #66bb6a;
  --brand-soft: rgba(102, 187, 106, .18);
  --on-brand: #0f2412;
  --tabbar-bg: rgba(18, 25, 19, .92);
  --topbar-bg: rgba(18, 25, 19, .92);
}

/* 06 赛博霓虹 */
:root[data-style="cyberpunk"] {
  --bg: #0b0f19;
  --card: #111827;
  --card-solid: #172033;
  --card-line: #1e293b;
  --line: #24324a;
  --ink: #f0fdfa;
  --ink-body: #cbd5e1;
  --ink2: #64748b;
  --ink3: #334155;
  --brand: #06b6d4;
  --brand-soft: rgba(6, 182, 212, .18);
  --on-brand: #042f2e;
  --tabbar-bg: rgba(11, 15, 25, .92);
  --topbar-bg: rgba(11, 15, 25, .92);
}
:root[data-style="cyberpunk"][data-theme="dark"] {
  --bg: #080c14;
  --card: #0f1624;
  --card-solid: #141d30;
  --card-line: #1c273d;
  --line: #202e48;
  --ink: #f0fdfa;
  --ink-body: #94a3b8;
  --ink2: #475569;
  --ink3: #1e293b;
  --brand: #22d3ee;
  --brand-soft: rgba(34, 211, 238, .2);
  --on-brand: #042f2e;
  --tabbar-bg: rgba(8, 12, 20, .94);
  --topbar-bg: rgba(8, 12, 20, .94);
}

/* 糖果书屋：所有覆写限定在 candy，复用原有组件与交互。 */
.candy-buddy { display: none; }
:root[data-style="candy"] {
  --bg: #fff9ed; --ambient: none;
  --card: #ffffff; --card-solid: #ffffff; --card-line: #e9dfd1;
  --ink: #312742; --ink-body: #443b51; --ink2: #716477; --ink3: #827188;
  --brand: #ba3527; --brand-soft: #ffe8e0; --on-brand: #ffffff;
  --green: #23704c; --green-soft: #e3f5d9;
  --amber: #865600; --amber-soft: #fff0ac;
  --red: #b33335; --red-soft: #ffe2e0;
  --violet: #6742b0; --violet-soft: #efe5ff;
  --note-bg: #fff0ac; --note-border: #d5a335; --note-ink: #745100;
  --soft: #f8f2e9; --soft2: #eee5da; --line: #e9dfd1; --rule: #e9dfd1;
  --topbar-bg: #fff9ed; --tabbar-bg: #ffffff; --toast-bg: #312742;
  --r-ctl: 16px; --r-item: 20px; --r-card: 26px; --r-pill: 999px;
  --shadow: 0 5px 0 #e9dfd1; --shadow-lift: 0 7px 0 #dfd2c2;
  --btn-sh: 0 4px 0 #84291f; --btn-sh-hover: 0 5px 0 #84291f;
  --blur: none; --pad-card: 20px; --pad-word: 32px 22px;
  --font-ui: "Segoe UI Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-disp: "Arial Rounded MT Bold", "Segoe UI Variable", "Microsoft YaHei", sans-serif;
  --font-num: var(--font-disp); --font-label: var(--font-ui);
  --num-w: 850; --label-w: 750; --label-track: 0px;
  --hw-size: 42px; --hw-w: 850; --hw-track: -.5px;
  --boot-rule: #e1c3ab; --boot-dot: #c45343;
  --candy-yellow: #ffdc64; --candy-blue: #72d5ee; --candy-coral: #ff735f;
  --candy-purple: #d0b8fa; --candy-deep: #312742;
}
:root[data-style="candy"][data-theme="dark"] {
  --bg: #211c32; --card: #30283f; --card-solid: #30283f; --card-line: #554362;
  --ink: #fff5e7; --ink-body: #eee3ed; --ink2: #cfbcd6; --ink3: #bca4c5;
  --brand: #ffac9a; --brand-soft: #53313c; --on-brand: #321d2d;
  --green: #a7e186; --green-soft: #354535;
  --amber: #ffe088; --amber-soft: #51432f;
  --red: #ffacab; --red-soft: #51313f;
  --violet: #ceb0ff; --violet-soft: #46365e;
  --note-bg: #51432f; --note-border: #9d824e; --note-ink: #ffe088;
  --soft: #3d324c; --soft2: #50405e; --line: #554362; --rule: #554362;
  --topbar-bg: #211c32; --tabbar-bg: #30283f; --toast-bg: #51405d;
  --shadow: 0 5px 0 #181321; --shadow-lift: 0 7px 0 #181321;
  --btn-sh: 0 4px 0 #b46d64; --btn-sh-hover: 0 5px 0 #b46d64;
  --boot-rule: #705472; --boot-dot: #ffac9a;
}
[data-style="candy"] .topbar { border-bottom: 0; padding-top: calc(13px + env(safe-area-inset-top, 0px)); padding-bottom: 12px; gap: 9px; }
[data-style="candy"] .brand { color: var(--brand); letter-spacing: -.5px; }
[data-style="candy"] .brand b { font-weight: 850; }
[data-style="candy"] .topsearch { border: 1.5px solid var(--line); padding-left: 12px; }
[data-style="candy"] .theme-btn { border: 1.5px solid var(--line); box-shadow: 0 3px 0 var(--line); color: var(--violet); }
[data-style="candy"] main { padding-top: 12px; padding-bottom: calc(var(--tabbar-pad) + 38px); }
[data-style="candy"] #homeMain { gap: 20px; flex: 0 0 auto; }
[data-style="candy"] .dq { display: none; }
[data-style="candy"] .dq-en { font-size: 15px; font-weight: 500; line-height: 1.5; color: var(--ink2); }
[data-style="candy"] .dq-by { font-weight: 400; font-size: 12px; }
[data-style="candy"] .dq-zh { font-size: 13px; margin-top: 5px; }
[data-style="candy"] .home-top { flex: 0 0 auto; }
[data-style="candy"] .checkin-hero { position: relative; overflow: hidden; text-align: left; padding: 22px 22px 19px; background: var(--candy-yellow); color: var(--candy-deep); border: 1.5px solid #d9b341; box-shadow: 0 5px 0 #d9b341; }
[data-style="candy"] .candy-buddy { display: block; position: absolute; width: 154px; height: 154px; object-fit: contain; right: 1px; top: 21px; pointer-events: none; animation: candyHello .65s var(--spring) backwards; }
[data-style="candy"] .ci-date { color: #675024; font-size: 13px; font-weight: 700; }
[data-style="candy"] .ci-big { justify-content: flex-start; gap: 7px; margin: 5px 0 11px; }
[data-style="candy"] .ci-big b { font-size: 57px; letter-spacing: -2px; color: var(--candy-deep); }
[data-style="candy"] .ci-big i { font-size: 13px; max-width: 72px; line-height: 1.4; text-align: left; font-weight: 750; color: #675024; }
[data-style="candy"] .ci-btn { min-width: 0; padding: 10px 19px; min-height: 43px; background: #ba3527; color: #ffffff; box-shadow: 0 4px 0 #84291f; }
[data-style="candy"] .checkin-hero .ci-btn { margin-top: 0; font-size: 15px; }
[data-style="candy"] .checkin-hero .ci-btn:disabled { background: #fff6d2; color: #554222; box-shadow: 0 3px 0 #c3a145; opacity: 1; }
[data-style="candy"] .ci-hint { color: #675024; font-size: 13px; margin-top: 12px; }
[data-style="candy"] .ci-days { justify-content: flex-start; gap: 5px; margin-top: 13px; }
[data-style="candy"] .ci-cap { color: #675024; text-align: left; }
[data-style="candy"] .ci-dot { width: 14px; height: 14px; line-height: 14px; font-size: 10px; color: #675024; border-color: #b6974b; background: #fff2b5; }
[data-style="candy"] .ci-dot.on { background: #ba3527; border-color: #ba3527; color: #fff; }
[data-style="candy"] .home-actions { gap: 14px; }
[data-style="candy"] .task-btn { text-align: left; align-items: flex-start; padding: 16px 19px 18px; border: 1.5px solid #d85445; border-radius: 24px; box-shadow: 0 5px 0 #d85445; color: var(--candy-deep); transition: transform .16s var(--spring), box-shadow .16s; }
[data-style="candy"] .tb-new { background: var(--candy-coral); }
[data-style="candy"] .tb-review { background: var(--candy-blue); border-color: #379cb9; box-shadow: 0 5px 0 #379cb9; }
[data-style="candy"] .tb-count { font-size: 43px; line-height: 1.1; letter-spacing: -1.5px; color: var(--candy-deep); }
[data-style="candy"] .tb-label { margin-top: 7px; color: var(--candy-deep); font-size: 17px; font-weight: 800; }
[data-style="candy"] .tb-sub { color: #312742; font-size: 12px; margin-top: 2px; }
[data-style="candy"] .home-foot { margin-bottom: 0; padding: 19px 20px 15px; }
[data-style="candy"] .hp-book { color: var(--ink); font-size: 15px; font-weight: 750; }
[data-style="candy"] .hp-num { color: var(--ink2); font-size: 13px; }
[data-style="candy"] .progress { height: 10px; background: var(--soft2); border-radius: 99px; }
[data-style="candy"] .bar { border-radius: 99px; background: var(--violet); }
[data-style="candy"] .hr { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
[data-style="candy"] .hr-t { color: var(--ink); font-size: 14px; font-weight: 650; }
[data-style="candy"] .hr-go { background: var(--violet-soft); color: var(--violet); border-radius: 50%; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; }
[data-style="candy"] .tabbar { left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); border: 1.5px solid var(--line); border-radius: 23px; padding: 2px 4px; box-shadow: 0 5px 0 var(--line); }
[data-style="candy"] .tab { min-height: 58px; }
[data-style="candy"] .tab .lb { font-size: 12px; font-weight: 700; }
[data-style="candy"] .tab.active[data-view="home"] { color: var(--brand); }
[data-style="candy"] .tab.active[data-view="read"] { color: var(--violet); }
[data-style="candy"] .tab.active[data-view="dict"] { color: var(--green); }
[data-style="candy"] .tab.active[data-view="settings"] { color: var(--amber); }
[data-style="candy"] .tab-ind { background: var(--soft); }
[data-style="candy"] .badge { background: #ba3527; font-size: 11px; }
[data-style="candy"] .wordcard { border: 1.5px solid var(--line); border-top: 8px solid var(--candy-purple); border-radius: 28px; }
/* 正反面共用同一块空间，释义在卡内滚动，自评始终位于导航上方。 */
@media (min-width: 768px) and (min-height: 601px) {
  [data-style="candy"] #studyWrap { flex: 0 0 auto; height: calc(100dvh - 182px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); min-height: 0; }
  [data-style="candy"] #studyCard { flex: 1; min-height: 0; }
  [data-style="candy"] #wordCard { flex: 1; min-height: 0; }
  [data-style="candy"] .wordcard.open { justify-content: flex-start; }
  [data-style="candy"] .wordcard.open .wc-body { flex: 1; min-height: 0; }
  [data-style="candy"] .wordcard.open .wcb-in { max-height: none; overscroll-behavior: contain; }
}
[data-style="candy"] .candy-finish { position: static; width: 156px; height: 156px; align-self: center; }
[data-style="candy"] #studyDone .empty-ico { display: none; }
[data-style="candy"] .wc-word { letter-spacing: -1px; overflow-wrap: anywhere; }
[data-style="candy"] .wc-phon { color: var(--ink2); font-size: 15px; }
[data-style="candy"] #studyCard:has(.wordcard.open) #studyNote { visibility: hidden; }
[data-style="candy"] .tts-btn { background: var(--violet-soft); color: var(--violet); border: 1px solid var(--line); }
[data-style="candy"] .tag { font-size: 12px; font-weight: 650; }
[data-style="candy"] .tag.new { background: var(--brand-soft); color: var(--brand); }
[data-style="candy"] .tag.stage { background: var(--violet-soft); color: var(--violet); }
[data-style="candy"] .btn.reveal { background: var(--candy-yellow); color: var(--candy-deep); box-shadow: 0 4px 0 #d9b341; }
[data-style="candy"] .grade { border: 1px solid var(--line); box-shadow: 0 3px 0 var(--line); }
[data-style="candy"] .btn.grade.know, [data-style="candy"] .btn.grade.go { background: var(--green-soft); color: var(--green); }
[data-style="candy"] .btn.grade.fuzzy { background: var(--amber-soft); color: var(--amber); }
[data-style="candy"] .btn.grade.forget { background: var(--red-soft); color: var(--red); }
[data-style="candy"] .btn.grade.easy { background: var(--violet-soft); color: var(--violet); }
[data-style="candy"] .gen-top { background: var(--violet-soft); border-color: var(--line); }
[data-style="candy"] .gen-hint { font-size: 13px; text-align: left; }
[data-style="candy"] .gen-top h3 { font-size: 20px; color: var(--violet); }
[data-style="candy"] #btnGenArticleRead { background: var(--violet); color: var(--card-solid); box-shadow: 0 4px 0 #482c83; }
[data-style="candy"] #btnGenStory { background: var(--card-solid); color: var(--violet); border: 1px solid var(--line); }
[data-style="candy"] .art-row { margin-bottom: 17px; }
[data-style="candy"] .art-item { border: 1.5px solid var(--line); box-shadow: 0 2px 0 var(--line); padding: 22px 20px; }
[data-style="candy"] .art-item .t { font-size: 19px; font-weight: 750; padding-right: 16px; }
[data-style="candy"] .art-item .m { font-size: 12px; line-height: 1.8; }
[data-style="candy"] .article { box-shadow: none; }
[data-style="candy"] .article h2 { font-size: 25px; line-height: 1.3; letter-spacing: -.5px; }
[data-style="candy"] .art-text { font-size: 17px; line-height: 1.95; color: var(--ink-body); }
[data-style="candy"] .tw { background: var(--brand-soft); color: var(--brand); border-bottom-color: var(--brand); border-radius: 4px; }
[data-style="candy"] .tw.old { background: var(--green-soft); color: var(--green); border-bottom-color: var(--green); }
[data-style="candy"] .chip { min-height: 38px; padding: 6px 13px; font-size: 13px; border: 1.5px solid var(--line); font-weight: 600; }
[data-style="candy"] .chip.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
[data-style="candy"] .book-chips { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: thin; }
[data-style="candy"] .book-chips .chip { flex-shrink: 0; order: 1; padding: 7px 15px; box-shadow: 0 2px 0 var(--line); }
[data-style="candy"] .book-chips .chip.active { order: 0; }
[data-style="candy"] .dict-item { border: 1px solid var(--line); border-radius: 18px; margin-bottom: 12px; background: var(--card-solid); padding: 0; }
[data-style="candy"] .dict-item .row1 { padding: 14px 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 9px; align-items: center; }
[data-style="candy"] .dict-item .dw { font-family: var(--font-disp); font-size: 19px; font-weight: 750; }
[data-style="candy"] .dict-item .dp { color: var(--ink2); grid-column: 1 / -1; grid-row: 2; word-break: normal; overflow-wrap: normal; }
[data-style="candy"] .dict-item .dt { min-width: 0; grid-column: 1 / -1; grid-row: 3; color: var(--ink-body); font-size: 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
[data-style="candy"] .dict-item .ds { grid-column: 2; grid-row: 1; }
[data-style="candy"] .dict-item { box-shadow: 0 3px 0 var(--line); }
[data-style="candy"] input, [data-style="candy"] select, [data-style="candy"] textarea { color: var(--ink); }
[data-style="candy"] input::placeholder, [data-style="candy"] textarea::placeholder { color: var(--ink2); opacity: 1; }
[data-style="candy"] .field input, [data-style="candy"] .field select, [data-style="candy"] #dictSearch { border: 1.5px solid var(--line); background: var(--card-solid); min-height: 44px; }
[data-style="candy"] .card h3 { font-size: 18px; }
[data-style="candy"] .style-opt { border: 1.5px solid var(--line); background: var(--soft); padding: 15px; }
[data-style="candy"] #view-settings > .card { box-shadow: 0 2px 0 var(--line); }
[data-style="candy"] .style-opt { box-shadow: none; }
[data-style="candy"] .style-opt[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 3px 0 var(--brand); }
[data-style="candy"] .so-n { font-size: 15px; }
[data-style="candy"] .so-d { font-size: 12px; color: var(--ink2); line-height: 1.6; }
[data-style="candy"] .hint { max-width: 58ch; }
[data-style="candy"] .sw { border-radius: 12px; }
[data-style="candy"] .popup { border: 1.5px solid var(--line); box-shadow: var(--shadow); }
[data-style="candy"] .noise-btn { background: var(--card-solid); color: var(--violet); border: 1px solid var(--line); }
[data-style="candy"] button:focus-visible, [data-style="candy"] input:focus-visible, [data-style="candy"] select:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }
[data-style="candy"] .btn:active, [data-style="candy"] .task-btn:active { transform: translateY(3px) scale(.985); box-shadow: none; }
@keyframes candyHello { from { opacity: 0; transform: translateY(15px) rotate(9deg) scale(.88); } to { opacity: 1; transform: none; } }
@media (hover: hover) {
  [data-style="candy"] .task-btn:hover { transform: translateY(-2px); }
}
@media (min-width: 700px) {
  [data-style="candy"] .topbar { padding-left: max(24px, calc((100vw - 900px) / 2)); padding-right: max(24px, calc((100vw - 900px) / 2)); }
  [data-style="candy"] main { max-width: 900px; padding-top: 32px; padding-left: 22px; padding-right: 22px; }
  [data-style="candy"] #homeMain { display: grid; grid-template-columns: 1.05fr 1fr; gap: 26px; align-content: start; }
  [data-style="candy"] .dq { grid-column: 1 / -1; padding: 0; }
  [data-style="candy"] .dq-en { font-size: 18px; }
  [data-style="candy"] .home-top { grid-row: span 2; }
  [data-style="candy"] .checkin-hero { height: 100%; min-height: 330px; padding: 28px; }
  [data-style="candy"] .candy-buddy { width: 208px; height: 208px; right: 0; top: 50px; }
  [data-style="candy"] .ci-big { margin-top: 20px; }
  [data-style="candy"] .ci-big b { font-size: 76px; }
  [data-style="candy"] .ci-days { margin-top: 32px; }
  [data-style="candy"] #readArticle > .card { max-width: 700px; margin-left: auto; margin-right: auto; }
  [data-style="candy"] #studyWrap { height: calc(100dvh - 214px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  [data-style="candy"] .tabbar { width: 560px; left: 50%; right: auto; transform: translateX(-50%); bottom: 20px; }
}
@media (min-height: 480px) {
  [data-style="candy"] #studyWrap {
    flex: 1 1 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
}
@media (max-width: 280px) {
  [data-style="candy"] .topbar { display: grid; grid-template-columns: 1fr 38px 38px; }
  [data-style="candy"] .topsearch { grid-row: 2; grid-column: 1 / -1; }
  [data-style="candy"] .mail-btn { grid-column: 2; grid-row: 1; }
  [data-style="candy"] .theme-btn:not(.mail-btn) { grid-column: 3; grid-row: 1; }
  [data-style="candy"] .home-actions { grid-template-columns: 1fr; }
  [data-style="candy"] .checkin-hero .candy-buddy { display: none; }
  [data-style="candy"] .ci-days { gap: 4px; }
  [data-style="candy"] .ci-dot { width: 12px; height: 12px; line-height: 12px; }
  [data-style="candy"] .grade-row { flex-wrap: wrap; }
  [data-style="candy"] .grade-row .btn { padding-left: 9px; padding-right: 9px; }
  [data-style="candy"] .study-head { flex-wrap: wrap; }
  [data-style="candy"] .study-head .progress-text { min-width: 0; }
  [data-style="candy"] .wc-wordline { flex-direction: column; }
  [data-style="candy"] .wc-word { font-size: 30px; }
  [data-style="candy"] .wordcard { padding: 22px 12px; }
  [data-style="candy"] .dict-item .row1 { grid-template-columns: minmax(0, 1fr) auto; }
  [data-style="candy"] .dict-item .ds { grid-column: 2; }
  [data-style="candy"] .hp-top { flex-wrap: wrap; }
  [data-style="candy"] .tabbar { left: 8px; right: 8px; }
}
@media (max-width: 359px) {
  [data-style="candy"] .brand { font-size: 14px; }
  [data-style="candy"] .brand b { display: block; }
  [data-style="candy"] .ts-go { padding: 7px 8px; }
  [data-style="candy"] .candy-buddy { width: 125px; height: 125px; right: -5px; top: 33px; }
  [data-style="candy"] .checkin-hero { padding-left: 18px; }
  [data-style="candy"] .ci-big i { font-size: 12px; }
  [data-style="candy"] .ci-dot { width: 12px; height: 12px; line-height: 12px; }
  [data-style="candy"] .ci-days { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-style="candy"] .candy-buddy { animation: none; }
  [data-style="candy"] .task-btn:hover { transform: none; }
}

/* ================= 首页双人成行常驻活动卡片 ================= */
.home-team-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: transform .15s, border-color .2s;
  user-select: none;
}
.home-team-card:hover { border-color: var(--brand); }
.home-team-card:active { transform: scale(0.985); }
.htc-left { flex: 1; min-width: 0; }
.htc-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #9e382b;
  background: rgba(158, 56, 43, 0.08);
  border: 1px solid rgba(158, 56, 43, 0.2);
  padding: 1px 7px;
  border-radius: 999px;
  margin-bottom: 4px;
}
.htc-badge.active {
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}
.htc-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
}
.htc-desc {
  font-size: 11.5px;
  color: var(--ink2);
  margin-top: 2px;
}
.htc-right {
  font-size: 26px;
  padding-left: 12px;
  flex-shrink: 0;
}

/* ================= 短视口与小屏手机适配（≤430px / 矮屏） =================
   禁止缩放根 html（杜绝 zoom: .66 将 12-14px 文字压碎至 8px 或使按钮触控区缩成 29px）。
   始终保持正文字号 >=12px、交互按钮与轻触按键高 >=44px，通过紧凑间距与弹性排版从容承载。 */
@media (max-height: 760px) {
  :root[data-shell="app"][data-style="frost"] .mast-date b { font-size: 60px; padding-bottom: 8px; }
  :root[data-shell="app"][data-style="frost"] .ci-big { margin: 4px 0 10px; }
  :root[data-shell="app"][data-style="frost"] .ci-days { padding: 8px 6px 12px; }
  :root[data-shell="app"][data-style="frost"] .home-actions { margin: 12px 0 0; padding: 0 0 58px; }
  :root[data-shell="app"][data-style="frost"] .task-btn { font-size: 23px; line-height: 1.25; }
  :root[data-shell="app"][data-style="frost"] .task-btn .tb-count { font-size: 34px; }
  :root[data-shell="app"][data-style="frost"] .home-team-card { min-height: 84px; margin: 12px 0 0; padding: 12px; }
}

@media (max-height: 680px) {
  main { padding-top: calc(var(--topbar-h) + 6px); }
  :root[data-shell="app"][data-style="frost"] .mast-date b { font-size: 50px; padding-bottom: 4px; }
  :root[data-shell="app"][data-style="frost"] .ci-big { margin: 2px 0 6px; }
  :root[data-shell="app"][data-style="frost"] .ci-days { padding: 6px 4px 8px; }
  :root[data-shell="app"][data-style="frost"] .home-actions { margin: 8px 0 0; padding: 0 0 52px; }
  :root[data-shell="app"][data-style="frost"] .task-btn { font-size: 21px; line-height: 1.2; }
  :root[data-shell="app"][data-style="frost"] .task-btn .tb-count { font-size: 30px; }
  :root[data-shell="app"][data-style="frost"] .home-team-card { min-height: 76px; margin: 8px 0 0; padding: 10px; }
  :root[data-shell="app"][data-style="frost"] .home-cta { height: 46px; font-size: 14px; }
}

@media (max-width: 430px) {
  /* 商城资料卡统计行：小屏剩余宽度不足时，让「文章 0/6」胶囊整体换行，
     禁止中文标签被逐字折断（「今日已/得」）——这是原有折行错乱，不是样式改版 */
  .sub-daily-row { flex-wrap: wrap; gap: 5px 4px; }
  .sub-daily-label, .sub-daily-val, .sub-daily-cap, .sub-daily-art { white-space: nowrap; }
  .sub-daily-art { margin-left: 2px; }
}

/* ================= 经典名著 · 书库卡片 ================= */
.book-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.book-card {
  display: flex; gap: 12px; padding: 12px; cursor: pointer;
  background: var(--card); border: 1px solid var(--card-line); border-radius: var(--r-item);
  box-shadow: var(--shadow);
  animation: fadeUp .34s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 42ms);
  transition: transform .18s var(--spring), box-shadow .22s var(--ease);
}
.book-card:active { transform: scale(.975); }
.bc-cover {
  position: relative; overflow: hidden;
  width: 46px; height: 64px; border-radius: 5px 9px 9px 5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 23px;
  background: var(--soft2); border: 1px solid var(--line); border-left: 5px solid var(--bc, #667089);
  box-shadow: inset -6px 0 10px -8px rgba(23, 28, 46, .35);
}
.bc-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; pointer-events: none; }
.bc-cover.bc-has-art > span { opacity: 0; }
.bc-lvl { display: none; }
.bc-info { min-width: 0; flex: 1; display: flex; flex-direction: column; }
/* 标题独占整行宽度；分类角标挪到「章 · 词」那一行的右侧 —— 卡片窄（单列约 185px），
   角标放标题里会把长书名挤成「重生…」，放元信息行才两者都读得清 */
.bc-title { font-weight: 800; font-size: 14.5px; letter-spacing: -.2px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 书籍分类角标：名著 / 四级网文 / 六级网文 */
.bc-title .art-tag-novel { flex-shrink: 0; font-size: 9px; padding: 0 4px; line-height: 14px; border-radius: 4px; letter-spacing: 0; }
.bc-meta { font-size: 11px; color: var(--ink2); margin-top: 5px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; min-width: 0; }
.bc-meta > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bc-meta .art-tag-novel { flex-shrink: 0; font-size: 9px; padding: 0 4px; line-height: 14px; border-radius: 4px; letter-spacing: 0; border: none; font-weight: 700; }
.art-tag-web { color: #0b7285; background: rgba(13, 148, 136, .12); border-color: rgba(13, 148, 136, .28); }
.art-tag-web6 { color: #7c3aed; background: rgba(124, 58, 237, .12); border-color: rgba(124, 58, 237, .28); }
.art-tag-my { color: #b45309; background: rgba(217, 119, 6, .13); border-color: rgba(217, 119, 6, .3); }
/* 导入中的书：整卡压暗 + 顶部进度条，明确「还不能点开」 */
.book-card { position: relative; }
.book-card.bc-busy { opacity: .72; }
.bc-trans {
  display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 6px;
  font-size: 10.5px; font-weight: 700; color: #b45309; font-variant-numeric: tabular-nums;
}
.bc-spin {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid rgba(217, 119, 6, .28); border-top-color: #d97706;
  animation: bcSpin .7s linear infinite;
}
.bc-trans.bc-fail { color: var(--red); }
@keyframes bcSpin { to { transform: rotate(360deg); } }
/* 导入读物的删除键：右上角，不挤占卡片内容 */
.bc-del {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--soft2); color: var(--ink3); font-size: 11px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.bc-del:active { transform: scale(.9); background: var(--red); color: #fff; border-color: var(--red); }
/* 「导入 TXT」独占一行，避免与两个生成键挤成三列 */
#btnImportTxt { grid-column: 1 / -1; }
.bc-author { font-size: 11.5px; color: var(--ink2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-prog { height: 4px; border-radius: 99px; background: var(--soft2); margin-top: 6px; overflow: hidden; }
.bc-prog i { display: block; height: 100%; border-radius: 99px; background: var(--bc, var(--brand)); transition: width .4s var(--ease-out); }
.bc-tip { font-size: 10.5px; color: var(--ink3); margin-top: auto; padding-top: 5px; }
.art-sec-head {
  font-size: 12px; font-weight: 700; color: var(--ink2); letter-spacing: .4px;
  margin: 4px 2px 9px;
}

/* ================= 经典名著 · 全屏阅读器（夸克式） ================= */
/* 层级：底栏 45 / 阅读器 46 / 点词弹层 50 / 悬浮键 60（阅读时隐藏）
   阅读器自带纸感主题（data-rdtheme: paper / white / green / night），不跟随应用皮肤；
   颜色全部走 --rd-* 变量，不影响其他组件。 */
.reader {
  position: fixed; inset: 0; z-index: 46;
  display: flex; flex-direction: column;
  background: var(--rd-bg); color: var(--rd-ink);
  animation: fadeIn .24s var(--ease-out) backwards;
  /* 默认主题 = 纸黄（与 data-rdtheme="paper" 相同，供初始化兜底） */
  --rd-bg: #f5efe2; --rd-ink: #38342c; --rd-ink2: #8b8271;
  --rd-line: rgba(112, 100, 72, .17); --rd-soft: rgba(112, 100, 72, .09);
  --rd-glass: rgba(246, 240, 228, .9); --rd-card: rgba(255, 252, 245, .78);
  --rd-sheet-bg: #fdfaf3; --rd-accent: #8a6a35; --rd-accent-ink: #fff;
  --rd-dot: rgba(94, 84, 58, .32); --rd-key-bg: #efe0b6; --rd-key-ink: #7a5a17;
  --rd-key-line: rgba(160, 122, 44, .38);
}
.reader[data-rdtheme="paper"] {
  --rd-bg: #f5efe2; --rd-ink: #38342c; --rd-ink2: #8b8271;
  --rd-line: rgba(112, 100, 72, .17); --rd-soft: rgba(112, 100, 72, .09);
  --rd-glass: rgba(246, 240, 228, .9); --rd-card: rgba(255, 252, 245, .78);
  --rd-sheet-bg: #fdfaf3; --rd-accent: #8a6a35; --rd-accent-ink: #fff;
  --rd-dot: rgba(94, 84, 58, .32); --rd-key-bg: #efe0b6; --rd-key-ink: #7a5a17;
  --rd-key-line: rgba(160, 122, 44, .38);
}
.reader[data-rdtheme="white"] {
  --rd-bg: #fafafa; --rd-ink: #26262b; --rd-ink2: #8a8a93;
  --rd-line: rgba(20, 20, 40, .10); --rd-soft: rgba(20, 20, 40, .05);
  --rd-glass: rgba(250, 250, 250, .9); --rd-card: #ffffff;
  --rd-sheet-bg: #ffffff; --rd-accent: #4b5bd6; --rd-accent-ink: #fff;
  --rd-dot: rgba(60, 60, 96, .28); --rd-key-bg: #fbeec2; --rd-key-ink: #8a6a1f;
  --rd-key-line: rgba(180, 140, 44, .40);
}
.reader[data-rdtheme="green"] {
  --rd-bg: #e4ecdc; --rd-ink: #333d2c; --rd-ink2: #7e8a72;
  --rd-line: rgba(64, 88, 52, .16); --rd-soft: rgba(64, 88, 52, .09);
  --rd-glass: rgba(228, 236, 220, .9); --rd-card: rgba(246, 250, 240, .8);
  --rd-sheet-bg: #eff5e8; --rd-accent: #4f7a3a; --rd-accent-ink: #fff;
  --rd-dot: rgba(64, 88, 52, .30); --rd-key-bg: #d5e5b8; --rd-key-ink: #4c621f;
  --rd-key-line: rgba(108, 140, 52, .40);
}
.reader[data-rdtheme="night"] {
  --rd-bg: #17181b; --rd-ink: #bebcb6; --rd-ink2: #7b7a7e;
  --rd-line: rgba(255, 255, 255, .09); --rd-soft: rgba(255, 255, 255, .07);
  --rd-glass: rgba(23, 24, 27, .9); --rd-card: rgba(34, 35, 39, .8);
  --rd-sheet-bg: #202126; --rd-accent: #c9a86a; --rd-accent-ink: #201b12;
  --rd-dot: rgba(255, 255, 255, .20); --rd-key-bg: rgba(214, 164, 80, .20); --rd-key-ink: #e0c084;
  --rd-key-line: rgba(214, 164, 80, .38);
}
body.reading .noise { display: none; }

.rd-top {
  flex-shrink: 0; display: flex; align-items: center; gap: 8px;
  padding: calc(9px + env(safe-area-inset-top, 0px)) 12px 9px;
  border-bottom: 1px solid var(--rd-line); background: var(--rd-glass);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.rbtn {
  width: 38px; height: 38px; border-radius: 12px; border: none; flex-shrink: 0;
  background: var(--rd-soft); color: var(--rd-ink); font-size: 16px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background-color .2s var(--ease), color .2s, transform .16s var(--spring);
}
.rbtn:active { transform: scale(.9); }
.rbtn.on { background: var(--rd-key-bg); color: var(--rd-key-ink); }
.rd-head {
  flex: 1; min-width: 0; border: none; background: transparent; color: var(--rd-ink);
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 2px 4px;
}
.rd-bname { font-size: 14px; font-weight: 800; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-cname { font-size: 11px; color: var(--rd-ink2); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* min-height:0：flex 子项默认 min-height:auto，真机 WebView 上会被内容撑高，
   把底部工具栏挤到正文上面（末行被遮）——显式归零，保证滚动区永远只有“可用高度”。 */
.rd-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
/* 底部留白含安全区：滚到章尾时末行不会被底部工具栏压住 */
.rd-inner { max-width: 640px; margin: 0 auto; padding: 22px 22px calc(56px + env(safe-area-inset-bottom, 0px)); }

.rd-ct { margin: 6px 0 22px; text-align: center; }
.rd-ct-no { font-family: var(--font-label); font-size: 10.5px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--rd-ink2); }
.rd-ct-title { font-family: var(--font-disp); font-size: 21px; font-weight: 800; margin: 9px 0 4px; letter-spacing: -.3px; color: var(--rd-ink); }
.rd-ct-sub { font-size: 13px; color: var(--rd-ink2); }

.rd-text { --rd-fs: 17px; font-size: var(--rd-fs); }
.rd-para { margin: 0 0 19px; }
.rd-e { display: block; line-height: 1.9; font-family: var(--font-disp); letter-spacing: .1px; }
.rd-c {
  display: block; margin-top: 7px; padding-left: 11px; border-left: 2px solid var(--rd-line);
  font-size: calc(var(--rd-fs) - 3.5px); line-height: 1.74; color: var(--rd-ink2);
}
/* 译文默认不显示：关闭态同时收起段落翻译与章节中文副题 */
.reader.rd-hide-cn .rd-c, .reader.rd-hide-cn .rd-ct-sub { display: none; }

/* 正文可点词：低调点状下划线；本章重点词纸感马克笔高亮 */
.rd-text .tw.plain {
  color: inherit; font-weight: normal;
  border-bottom: 1px dotted var(--rd-dot);
  cursor: pointer; border-radius: 2px; padding: 0 1px;
}
.rd-text .tw.plain:hover, .rd-text .tw.plain:active { background: var(--rd-soft); color: var(--rd-accent); border-bottom-color: var(--rd-accent); }
.rd-text .tw.rd-key {
  background: var(--rd-key-bg); color: var(--rd-key-ink); font-weight: 600;
  border-bottom: 1px solid var(--rd-key-line); border-radius: 3px;
}
.rd-text .tw.rd-key:hover, .rd-text .tw.rd-key:active { background: var(--rd-accent); color: var(--rd-accent-ink); border-bottom-color: var(--rd-accent); }

.rd-words { margin-top: 32px; border-top: 1px dashed var(--rd-line); padding-top: 15px; }
.rd-w-head { font-size: 12px; font-weight: 700; color: var(--rd-ink2); letter-spacing: .4px; margin-bottom: 10px; }
.rd-w-head span { font-weight: 800; color: var(--rd-accent); margin-left: 2px; }
.rd-w-list { display: flex; flex-wrap: wrap; gap: 7px; }
.rd-w {
  border: 1px solid var(--rd-line); background: var(--rd-card); color: var(--rd-ink);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-family: var(--font-disp);
  transition: background-color .2s var(--ease), color .2s, transform .16s var(--spring), border-color .2s;
}
.rd-w:active { transform: scale(.93); background: var(--rd-soft); color: var(--rd-accent); border-color: var(--rd-accent); }

.reader .rd-nav { display: flex; gap: 10px; margin-top: 30px; }
.reader .rd-nav .btn { flex: 1; box-shadow: none; background: var(--rd-soft); color: var(--rd-ink); border: 1px solid var(--rd-line); }
.reader .rd-nav .btn.primary { background: var(--rd-accent); color: var(--rd-accent-ink); border-color: transparent; }
.reader .rd-nav .btn:disabled { opacity: .45; pointer-events: none; }
.rd-foot { margin-top: 18px; text-align: center; font-size: 11.5px; color: var(--rd-ink2); opacity: .85; }

/* 底部工具栏（夸克式）：目录 / 进度 / 设置 */
.rd-bar {
  position: relative; z-index: 2;   /* 永远压在正文之上，不参与滚动 */
  flex-shrink: 0; display: flex; align-items: center; gap: 4px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  background: var(--rd-sheet-bg);   /* 兜底色：不支持磨砂的 WebView 上保证不透明，正文不会透出来 */
  border-top: 1px solid var(--rd-line);
}
@supports ((-webkit-backdrop-filter: blur(6px)) or (backdrop-filter: blur(6px))) {
  .rd-bar { background: var(--rd-glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
}
.rd-bbtn {
  width: 54px; flex-shrink: 0; border: none; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--rd-ink2); font-size: 10px; padding: 5px 0 3px; border-radius: 12px;
  transition: color .2s var(--ease), background-color .2s var(--ease), transform .16s var(--spring);
}
.rd-bbtn:active { transform: scale(.94); background: var(--rd-soft); }
.rd-bic { font-size: 17px; line-height: 1.1; color: var(--rd-ink); font-family: var(--font-disp); }
.rd-bbtn.on { color: var(--rd-accent); }
.rd-bbtn.on .rd-bic { color: var(--rd-accent); }

.rd-prog { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
.rd-prog-track { position: relative; flex: 1; height: 32px; margin: 0 2px; touch-action: none; cursor: pointer; }
.rd-prog-rail { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 99px; background: var(--rd-line); }
.rd-prog-fill { position: absolute; left: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 99px; background: var(--rd-accent); opacity: .9; }
.rd-prog-knob {
  position: absolute; top: 50%; left: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--rd-accent); transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px var(--rd-glass), 0 2px 6px rgba(20, 16, 8, .28);
}
.rd-prog-tip {
  position: absolute; bottom: 27px; transform: translateX(-50%);
  background: var(--rd-ink); color: var(--rd-bg);
  font-size: 11px; line-height: 1; padding: 5px 9px; border-radius: 8px;
  white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums;
}
.rd-pct { flex-shrink: 0; width: 34px; text-align: right; font-size: 11px; color: var(--rd-ink2); font-variant-numeric: tabular-nums; }

/* 目录 / 书签抽屉（左侧滑出） */
.rd-drawer { position: absolute; inset: 0; z-index: 3; }
.rd-drawer-mask {
  position: absolute; inset: 0; background: rgba(15, 18, 30, .38);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  animation: fadeIn .2s var(--ease-out) backwards;
}
.rd-drawer-panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(82vw, 360px);
  background: var(--rd-sheet-bg); color: var(--rd-ink); border-right: 1px solid var(--rd-line);
  box-shadow: 24px 0 60px -30px rgba(13, 17, 34, .5);
  display: flex; flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 0 calc(10px + env(safe-area-inset-bottom, 0px));
  animation: rdDrawerIn .3s var(--ease-out) backwards;
}
@keyframes rdDrawerIn { from { transform: translate3d(-100%, 0, 0); } }
.rd-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 14px 11px; border-bottom: 1px solid var(--rd-line); }
.rd-drawer-head b { font-size: 15px; }
.rd-drawer-head .popup-close { background: var(--rd-soft); color: var(--rd-ink2); }
.rd-toc { flex: 1; overflow-y: auto; padding: 8px 10px; }
.rd-toc-item {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  border: none; background: transparent; color: var(--rd-ink); padding: 10px 10px; border-radius: 12px;
  transition: background-color .2s var(--ease);
}
.rd-toc-item:active { background: var(--rd-soft); }
.rd-toc-item.on { background: var(--rd-soft); }
.rd-toc-no { font-family: var(--font-num); font-size: 12px; font-weight: 800; color: var(--rd-ink2); opacity: .75; width: 24px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rd-toc-item.on .rd-toc-no { color: var(--rd-accent); opacity: 1; }
.rd-toc-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rd-toc-cn { font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-toc-en { font-size: 11px; color: var(--rd-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-toc-state { font-size: 10.5px; color: var(--rd-ink2); opacity: .75; flex-shrink: 0; }
.rd-toc-item.on .rd-toc-state { color: var(--rd-accent); opacity: 1; font-weight: 700; }
.rd-bm-sec { border-top: 1px solid var(--rd-line); padding: 9px 10px 2px; max-height: 42%; display: flex; flex-direction: column; }
.rd-bm-head { font-size: 12px; font-weight: 700; color: var(--rd-ink2); padding: 2px 6px 7px; }
.rd-bm-n { color: var(--rd-accent); }
.rd-bm-list { overflow-y: auto; padding-bottom: 6px; }
.rd-bm { display: flex; align-items: center; gap: 4px; }
.rd-bm-go {
  flex: 1; min-width: 0; text-align: left; border: none; background: transparent; color: var(--rd-ink);
  padding: 8px 6px; border-radius: 10px; display: flex; flex-direction: column; gap: 2px;
  transition: background-color .2s var(--ease);
}
.rd-bm-go:active { background: var(--rd-soft); }
.rd-bm-t { font-size: 12.5px; font-weight: 700; color: var(--rd-accent); }
.rd-bm-x { font-size: 11.5px; color: var(--rd-ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.rd-bm-del {
  border: none; background: transparent; color: var(--rd-ink2); width: 30px; height: 30px;
  border-radius: 9px; flex-shrink: 0; transition: background-color .2s, color .2s;
}
.rd-bm-del:active { color: var(--red); background: var(--red-soft); }
.rd-bm-empty { font-size: 12px; color: var(--rd-ink2); padding: 6px; line-height: 1.6; }

/* 设置面板（底部上滑，夸克式）：字号 / 背景 / 显示翻译 */
.rd-sheet { position: absolute; inset: 0; z-index: 5; }
.rd-sheet-mask {
  position: absolute; inset: 0; background: rgba(12, 14, 22, .30);
  animation: fadeIn .18s var(--ease-out) backwards;
}
.rd-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: var(--rd-sheet-bg); color: var(--rd-ink);
  border-radius: 20px 20px 0 0;
  padding: 9px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 50px -22px rgba(12, 14, 30, .45);
  animation: sheetUp .28s var(--ease-out) backwards;
}
.rd-sheet-grip { width: 36px; height: 4px; border-radius: 99px; background: var(--rd-line); margin: 0 auto 8px; }
.rd-sheet-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; min-height: 30px; }
.rd-sheet-row + .rd-sheet-row { border-top: 1px solid var(--rd-line); }
.rd-sheet-label { width: 58px; flex-shrink: 0; font-size: 12.5px; color: var(--rd-ink2); }

.rd-sz { flex: 1; display: flex; align-items: center; gap: 11px; }
.rd-a-sm { font-size: 12px; color: var(--rd-ink2); }
.rd-a-lg { font-size: 19px; color: var(--rd-ink2); }
.rd-sz input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 99px; background: var(--rd-line); outline: none; margin: 0;
}
.rd-sz input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--rd-accent); border: 2.5px solid var(--rd-sheet-bg);
  box-shadow: 0 1px 4px rgba(20, 16, 8, .3); cursor: pointer;
}

.rd-themes { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rd-theme {
  width: 34px; height: 34px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid var(--rd-line);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; color: transparent;
  transition: transform .18s var(--spring), box-shadow .2s var(--ease);
}
.rd-theme:active { transform: scale(.92); }
.rd-theme[data-th="paper"] { background: #f5efe2; }
.rd-theme[data-th="white"] { background: #fcfcfc; }
.rd-theme[data-th="green"] { background: #e4ecdc; }
.rd-theme[data-th="night"] { background: #1d1e22; border-color: rgba(255, 255, 255, .16); }
.rd-theme.on { box-shadow: 0 0 0 2px var(--rd-sheet-bg), 0 0 0 3.5px var(--rd-accent); }
.rd-theme.on::after { content: '✓'; line-height: 1; }
.rd-theme.on[data-th="paper"] { color: #8a6a35; }
.rd-theme.on[data-th="white"] { color: #4b5bd6; }
.rd-theme.on[data-th="green"] { color: #4f7a3a; }
.rd-theme.on[data-th="night"] { color: #c9a86a; }

.rd-switch { position: relative; margin-left: auto; flex-shrink: 0; }
.rd-switch input { position: absolute; opacity: 0; pointer-events: none; }
.rd-switch i { display: block; width: 46px; height: 27px; border-radius: 999px; background: var(--rd-soft); position: relative; transition: background-color .22s var(--ease); box-shadow: inset 0 0 0 1px var(--rd-line); }
.rd-switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .22s var(--spring);
}
.rd-switch input:checked + i { background: var(--rd-accent); box-shadow: none; }
.rd-switch input:checked + i::after { transform: translateX(19px); }

/* ================= 阅读器 · 左右翻页（默认） ================= */
/* page 模式：容器禁原生滚动与滚动条，翻页 = scrollTop 整屏推进 + 双页滑动过渡。
   overscroll-behavior:none 压掉真机上的弹性越界（否则手指上下带一下，正文会越出被工具栏压住）。 */
.reader.rd-page .rd-scroll { overflow: hidden; scrollbar-width: none; overscroll-behavior: none; touch-action: none; }
.reader.rd-page .rd-scroll::-webkit-scrollbar { display: none; }

/* 翻页过渡：旧视口快照层（由 JS 定位盖住 #rdScroll 区域，随动画滑出）。
   z-index 必须低于 .rd-bar（2）：ghost 是 append 到 #reader 末尾的，同层时会压住底栏。 */
.rd-ghost {
  position: absolute; z-index: 1; overflow: hidden; pointer-events: none;
  background: var(--rd-bg); will-change: transform;
  box-shadow: 0 0 30px rgba(15, 15, 28, .12);
}
/* 过渡期间容器禁滚动（scroll 模式下滑入不撑出横向滚动） */
.rd-scroll.rd-x-clip { overflow: hidden; }

/* 翻页方式切换（设置面板内）：左右翻 / 上下滚 */
.rd-mode-group { flex: 1; display: flex; gap: 8px; }
.rd-mode {
  flex: 1; border: 1px solid var(--rd-line); background: var(--rd-soft); color: var(--rd-ink2);
  border-radius: 10px; padding: 7px 0; font-size: 12.5px; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s, border-color .2s, transform .16s var(--spring);
}
.rd-mode:active { transform: scale(.94); }
.rd-mode.on { background: var(--rd-accent); border-color: var(--rd-accent); color: var(--rd-accent-ink); font-weight: 700; }

/* ================= 设置项说明（问号按钮 + 底部弹层） ================= */
#view-settings .card > h3 { display: flex; align-items: center; gap: 8px; }
.q-btn {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%; border: none; flex-shrink: 0;
  background: var(--soft); color: var(--ink2); font-size: 12px; font-weight: 800; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background-color .2s var(--ease), color .2s, transform .16s var(--spring);
}
.q-btn:active { transform: scale(.86); background: var(--brand-soft); color: var(--brand); }
/* 说明文字移入问号弹层：卡片内原 hint 不再常显（账号状态/模式/API摘要是动态文本，保留） */
#view-settings .card .hint:not(#accStatus):not(#accModeLine):not(#accApiSummary) { display: none; }

#qSheet { position: fixed; inset: 0; z-index: 130; }
.qs-mask { position: absolute; inset: 0; background: rgba(12, 14, 22, .34); animation: fadeIn .18s var(--ease-out) backwards; }
.qs-panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 74vh;
  display: flex; flex-direction: column;
  background: var(--card-solid); color: var(--ink); border-radius: 20px 20px 0 0;
  padding: 9px 18px calc(14px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 50px -22px rgba(12, 14, 30, .45);
  animation: sheetUp .28s var(--ease-out) backwards;
}
.qs-grip { width: 36px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 8px; flex-shrink: 0; }
.qs-head { font-size: 15px; font-weight: 800; padding: 2px 0 8px; flex-shrink: 0; }
.qs-body { overflow-y: auto; padding-bottom: 4px; }
.qs-item { padding: 11px 0; border-top: 1px solid var(--rule); }
.qs-item:first-child { border-top: none; padding-top: 4px; }
.qs-label { font-size: 12.5px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.qs-text { font-size: 13px; line-height: 1.72; color: var(--ink2); }
.qs-text b { color: var(--ink); }
.qs-text code { font-family: var(--font-num); font-size: 12px; background: var(--soft); padding: 1px 5px; border-radius: 6px; }
.qs-foot { flex-shrink: 0; padding-top: 12px; }
.qs-foot .btn { width: 100%; }

/* ============================================================
   新增皮肤（免费）：08 素笺石墨 / 09 瑞士网格
   两块都是「中性极简」方向——现有七套全部带色相倾向
   （米纸 / 靛蓝 / 暖木 / 糖果 / 茶绿 / 霓虹），中性灰阶与
   纯白强排版是空着的。装饰上刻意不加任何材质：无阴影、
   无渐变光斑、无圆角修饰，只靠描边与字重拉开层次。
   ============================================================ */

/* ---------- 08 素笺石墨 —— 去色灰阶：界面只剩黑白灰，唯一点色是一点朱橙 ---------- */
:root[data-style="graphite"] {
  --bg: #f6f7f8;
  --ambient: none;
  --card: #ffffff;
  --card-solid: #ffffff;
  --card-line: #e4e6e9;
  --ink: #16181b;
  --ink-body: #33373d;
  --ink2: #6a7076;
  --ink3: #aeb3b9;
  --brand: #17181a;          /* 墨黑按键：去色皮肤的「点色」就是按键本身 */
  --brand-soft: rgba(22, 24, 27, .07);
  --on-brand: #ffffff;
  --green: #1f7a4d;   --green-soft: rgba(31, 122, 77, .11);
  --amber: #c2521c;   --amber-soft: rgba(194, 82, 28, .11);
  --red: #c03a30;     --red-soft: rgba(192, 58, 48, .10);
  --violet: #5b4f86;  --violet-soft: rgba(91, 79, 134, .10);
  --note-bg: #f1f2f4; --note-border: #d3d6da; --note-ink: #4a4f55;
  --soft: rgba(22, 24, 27, .05);
  --soft2: rgba(22, 24, 27, .09);
  --toast-bg: rgba(22, 24, 27, .95);
  --tabbar-bg: #ffffff;
  --topbar-bg: rgba(246, 247, 248, .93);
  --line: rgba(22, 24, 27, .10);
  --rule: #e4e6e9;
  --boot-rule: #ced2d7;
  --boot-dot: #7d8389;
  --shadow: none;
  --shadow-lift: none;
  --btn-sh: none;
  --btn-sh-hover: none;
  --blur: none;
  --r-card: 8px; --r-item: 6px; --r-ctl: 4px; --r-pill: 4px;
  --pad-word: 22px 16px;
  --num-w: 700; --num-track: -.2px;
  --label-w: 600; --label-track: .1px;
  --hw-size: 42px; --hw-w: 700; --hw-track: 0px;
}
:root[data-style="graphite"][data-theme="dark"] {
  --bg: #0f1012;
  --card: #17191c;
  --card-solid: #1b1d21;
  --card-line: #292c31;
  --ink: #f3f4f6;
  --ink-body: #c9ccd1;
  --ink2: #8b9096;
  --ink3: #54585e;
  --brand: #e9eaec;          /* 深色下墨黑按键不可见，反转为白键黑字，仍不引入色相 */
  --brand-soft: rgba(233, 234, 236, .10);
  --on-brand: #14161a;
  --green: #59b183;   --green-soft: rgba(89, 177, 131, .16);
  --amber: #e08a4e;   --amber-soft: rgba(224, 138, 78, .16);
  --red: #e0705f;     --red-soft: rgba(224, 112, 95, .15);
  --violet: #a99ad6;  --violet-soft: rgba(169, 154, 214, .16);
  --note-bg: #1f2226; --note-border: #34383e; --note-ink: #b9bdc3;
  --soft: rgba(243, 244, 246, .06);
  --soft2: rgba(243, 244, 246, .11);
  --toast-bg: rgba(38, 41, 45, .96);
  --tabbar-bg: #131518;
  --topbar-bg: rgba(15, 16, 18, .93);
  --line: rgba(243, 244, 246, .10);
  --rule: #292c31;
  --boot-rule: #34383e;
  --boot-dot: #6b7076;
}
/* 石墨：卡片靠 1px 描边立住（没有阴影可用），一切圆角压到 4~8px */
:root[data-style="graphite"] .card { border: 1px solid var(--card-line); box-shadow: none; }
:root[data-style="graphite"] .wordcard { border: 1px solid var(--card-line); box-shadow: none; }
:root[data-style="graphite"] .task-btn { border: 1px solid var(--card-line); box-shadow: none; }
:root[data-style="graphite"] .tabbar { box-shadow: 0 -1px 0 var(--rule); }
:root[data-style="graphite"] .topbar { border-bottom: 1px solid var(--rule); }
:root[data-style="graphite"] .theme-btn { border: 1px solid var(--rule); box-shadow: none; }
:root[data-style="graphite"] .topsearch { border: 1px solid var(--rule); }
:root[data-style="graphite"] .ci-dot { border-radius: 3px; }
:root[data-style="graphite"] .progress { height: 6px; border-radius: 3px; }
:root[data-style="graphite"] .progress .bar { border-radius: 3px; }
:root[data-style="graphite"] .intro-ol li::before { border-radius: 3px; }
:root[data-style="graphite"] .btn.primary { box-shadow: none; }

/* ---------- 09 瑞士网格 —— 纯白 + 极淡方格底纹 + 克莱因蓝一点 + 超粗无衬线排版 ---------- */
:root[data-style="swiss"] {
  --bg: #ffffff;
  /* 方格底纹：固定在视口层（body::before），滚动时纹丝不动，像屏幕上的坐标纸 */
  --ambient:
    repeating-linear-gradient(90deg, rgba(10, 10, 11, .045) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(0deg, rgba(10, 10, 11, .045) 0 1px, transparent 1px 32px);
  --card: #ffffff;
  --card-solid: #ffffff;
  --card-line: #e2e2e5;
  --ink: #0a0a0b;
  --ink-body: #2b2b2e;
  --ink2: #6e6e75;
  --ink3: #b4b4bb;
  --brand: #1b36d8;          /* 克莱因蓝：整屏唯一高饱和色 */
  --brand-soft: rgba(27, 54, 216, .08);
  --on-brand: #ffffff;
  --green: #0f7a45;   --green-soft: rgba(15, 122, 69, .10);
  --amber: #a05a00;   --amber-soft: rgba(160, 90, 0, .10);
  --red: #c2261f;     --red-soft: rgba(194, 38, 31, .09);
  --violet: #4237b8;  --violet-soft: rgba(66, 55, 184, .09);
  --note-bg: #f4f5f8; --note-border: #c9cdd8; --note-ink: #2b2b2e;
  --soft: rgba(10, 10, 11, .04);
  --soft2: rgba(10, 10, 11, .08);
  --toast-bg: rgba(10, 10, 11, .95);
  --tabbar-bg: #ffffff;
  --topbar-bg: rgba(255, 255, 255, .94);
  --line: rgba(10, 10, 11, .12);
  --rule: #e2e2e5;
  --boot-rule: #d6d6da;
  --boot-dot: #1b36d8;
  --shadow: none;
  --shadow-lift: none;
  --btn-sh: none;
  --btn-sh-hover: none;
  --blur: none;
  --font-disp: "Helvetica Neue", Helvetica, Inter, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: var(--font-disp);
  --font-label: var(--font-disp);
  --r-card: 0px; --r-item: 0px; --r-ctl: 0px; --r-pill: 0px;
  --pad-word: 26px 16px;
  --wc-align: left; --wc-justify: flex-start;
  --num-w: 800; --num-track: -1.2px;
  --label-w: 700; --label-track: .09em; --label-tf: uppercase;
  --tag-tf: uppercase; --tag-track: .06em;
  --hw-size: 46px; --hw-w: 800; --hw-track: -1.4px;
}
:root[data-style="swiss"][data-theme="dark"] {
  --bg: #0a0a0b;
  --ambient: none;           /* 深色下底纹会显脏，关掉，只留纯黑底 */
  --card: #131315;
  --card-solid: #17171a;
  --card-line: #2a2a2f;
  --ink: #f5f5f6;
  --ink-body: #cdcdd2;
  --ink2: #8b8b93;
  --ink3: #4d4d54;
  --brand: #7d8dff;
  --brand-soft: rgba(125, 141, 255, .16);
  --on-brand: #0a0a0b;
  --green: #4bbd84;   --green-soft: rgba(75, 189, 132, .16);
  --amber: #f0a94a;   --amber-soft: rgba(240, 169, 74, .16);
  --red: #ff6b5e;     --red-soft: rgba(255, 107, 94, .15);
  --violet: #a79cff;  --violet-soft: rgba(167, 156, 255, .16);
  --note-bg: #1a1a1e; --note-border: #33333a; --note-ink: #cdcdd2;
  --soft: rgba(245, 245, 246, .06);
  --soft2: rgba(245, 245, 246, .12);
  --toast-bg: rgba(30, 30, 34, .96);
  --tabbar-bg: #101012;
  --topbar-bg: rgba(10, 10, 11, .94);
  --line: rgba(245, 245, 246, .12);
  --rule: #2a2a2f;
  --boot-rule: #3a3a42;
  --boot-dot: #7d8dff;
}
/* 瑞士：直角到底 + 左对齐 + 小标题走大写小字，一切对齐到网格 */
:root[data-style="swiss"] .card { border: 1px solid var(--card-line); box-shadow: none; }
:root[data-style="swiss"] .card h3 {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink2);
}
:root[data-style="swiss"] .wordcard { border: 1px solid var(--card-line); box-shadow: none; justify-content: flex-start; text-align: left; }
:root[data-style="swiss"] .wc-tags, :root[data-style="swiss"] .wc-wordline { justify-content: flex-start; }
:root[data-style="swiss"] .task-btn { border: 1px solid var(--card-line); box-shadow: none; }
:root[data-style="swiss"] .checkin-hero { text-align: left; }
:root[data-style="swiss"] .ci-big, :root[data-style="swiss"] .ci-days { justify-content: flex-start; }
:root[data-style="swiss"] .ci-dot { border-radius: 0; }
:root[data-style="swiss"] .dq { text-align: left; }
:root[data-style="swiss"] .tag { border-radius: 0; }
:root[data-style="swiss"] .progress { height: 8px; border-radius: 0; }
:root[data-style="swiss"] .progress .bar { border-radius: 0; }
:root[data-style="swiss"] .intro-ol li::before { border-radius: 0; }
:root[data-style="swiss"] .tabbar { box-shadow: 0 -1px 0 var(--rule); }
:root[data-style="swiss"] .tab .lb { font-size: 10px; letter-spacing: .05em; }
:root[data-style="swiss"] .theme-btn { border: 1px solid var(--rule); box-shadow: none; }
:root[data-style="swiss"] .topsearch { border: 1px solid var(--rule); }
:root[data-style="swiss"] .btn.primary { box-shadow: none; }

/* ================= 今日排行榜 ================= */
/* 入口横幅：和「双人成行」同一套卡片语言，颜色全走令牌，9 套皮肤自动适配 */
.shop-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card-solid); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 13px 16px; margin-bottom: 12px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
  transition: transform .16s var(--spring), border-color .2s;
}
.shop-banner:active { transform: scale(.985); }
.sbb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sbb-icon { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.sbb-title { font-size: 14px; font-weight: 700; letter-spacing: .5px; color: var(--ink); }
.sbb-desc { font-size: 11.5px; color: var(--ink2); margin-top: 2px; }
.sbb-btn {
  border: 1px solid var(--line); background: var(--soft); color: var(--brand);
  padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}

/* 弹层：沿用 .popup 的底部抽屉，只调整内部节奏 */
.lb-sheet { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.lb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.lb-title { font-size: 16px; font-weight: 800; color: var(--ink); letter-spacing: .3px; }
.lb-sub { font-size: 11.5px; color: var(--ink2); margin-top: 3px; line-height: 1.45; }
.lb-body { display: flex; flex-direction: column; gap: 6px; }
.lb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  background: var(--soft); border: 1px solid transparent;
}
.lb-row.me { background: var(--brand-soft); border-color: var(--brand); }
.lb-rank {
  width: 24px; flex: 0 0 auto; text-align: center;
  font-size: 13px; font-weight: 800; color: var(--ink2);
  font-variant-numeric: tabular-nums;
}
.lb-rank.medal { font-size: 17px; }
.lb-ava { width: 30px; height: 30px; flex: 0 0 auto; }
.lb-name {
  flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lb-name .lb-tag {
  font-size: 10px; font-weight: 700; color: var(--brand);
  border: 1px solid var(--brand); border-radius: 999px;
  padding: 0 5px; margin-left: 5px; vertical-align: 1px;
}
.lb-nums { display: flex; gap: 7px; font-size: 11px; color: var(--ink2); white-space: nowrap; }
.lb-nums b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.lb-total {
  min-width: 38px; text-align: right; flex: 0 0 auto;
  font-size: 15px; font-weight: 800; color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.lb-foot {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink2); text-align: center; line-height: 1.6;
}
.lb-empty { text-align: center; color: var(--ink2); font-size: 12.5px; padding: 26px 0; }
.lb-loading { text-align: center; color: var(--ink2); font-size: 12.5px; padding: 26px 0; }

/* ================= 真题/故事 使用指南 ================= */
/* 布局说明（踩过的坑）：按钮原来用 position:absolute 挂在 .gen-top 右上角，但网页端
   pages-redesign.css 有 `#view-read .gen-top > * { position: relative }`（特异性 #id+class，
   高于单 class 的 .guide-q），把 absolute 覆盖成 relative —— 按钮因此掉回文档流，
   落在卡片左上角并被 top:10px 推下，正好压住「生成真题文章」。
   现在把按钮放进 .gen-bar 独占一行，它不再是 .gen-top 的直接子元素，规避了那条规则。 */
.gen-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.gen-bar-title {
  font-size: 12px; font-weight: 800; letter-spacing: .18em;
  color: var(--ink2);
}
/* 「?」按钮：未点击过时呼吸发光，点击一次后写 localStorage 永久熄灭 */
.guide-q {
  position: static; flex: 0 0 auto;
  width: 28px; height: 28px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-solid);
  color: var(--ink2); font-size: 15px; font-weight: 800; line-height: 1;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  transition: color .25s, border-color .25s, background .25s, transform .25s;
}
.guide-q:hover { color: var(--brand); border-color: var(--brand); transform: scale(1.08); }
/* 未看过：品牌色静谧光环强调，克制沉稳 */
.guide-q.glowing {
  color: var(--brand); border-color: var(--brand); border-width: 1.5px;
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* 指南弹层 */
.guide-sheet { max-width: 560px; border-radius: var(--r-card); }
.guide-body { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.guide-body h4 {
  font-size: 14px; font-weight: 800; color: var(--ink);
  margin: 14px 0 6px; letter-spacing: .02em;
}
.guide-body h4:first-child { margin-top: 2px; }
.guide-body ul { margin: 0 0 4px; padding-left: 18px; }
.guide-body li {
  font-size: 13px; line-height: 1.85; color: var(--ink-body);
  margin-bottom: 2px;
}
.guide-body li b { color: var(--ink); }
.guide-foot {
  margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--ink2); line-height: 1.7;
}

/* 真题原型对照（文章页可折叠） */
.proto-box {
  margin: 10px 0 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--soft); padding: 10px 12px;
}
.proto-box > summary {
  cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--brand);
  list-style: none; user-select: none;
}
.proto-box > summary::-webkit-details-marker { display: none; }
.proto-box > summary::before { content: '▸ '; }
.proto-box[open] > summary::before { content: '▾ '; }
.proto-item { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.proto-item:first-of-type { border-top: none; }
.proto-idx {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--ink2); margin-bottom: 3px;
}
.proto-text {
  font-size: 13px; line-height: 1.75; color: var(--ink-body);
  font-family: var(--font-disp);
}
.proto-note {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink2); line-height: 1.65;
}

/* ---------------- 今日海报（今日全部完成时弹一次） ----------------
   海报本身是 poster.js 画好的一张图，固定色板，不跟随皮肤；
   这里只管遮罩、摆放和图外的按钮。按钮不进图。 */
.dr-mask {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; overflow-y: auto; overscroll-behavior: contain;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)); box-sizing: border-box;
  background: rgba(10, 12, 17, .95);
  animation: drFade .3s ease backwards;
}
.dr-stage {
  margin: auto; display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.dr-poster {
  display: block; height: auto; aspect-ratio: 2 / 3;
  /* 小屏整页有 zoom（见「html { zoom }」那几条），vw / vh 不跟着缩，这里除回去 */
  width: min(330px, calc(100vw / var(--page-zoom, 1) - 56px), calc((100vh / var(--page-zoom, 1) - 200px) * .666));
  background: #1b1e26; border-radius: 2px;
  box-shadow: 0 40px 70px -34px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .05);
  -webkit-touch-callout: default; user-select: none;
}
.dr-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.dr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: #fff; box-shadow: none;
  font: 500 14px var(--font-ui); letter-spacing: .08em;
  transition: opacity .2s ease, transform .15s ease, background-color .2s ease;
}
.dr-btn.pri { background: #fff; color: #14161b; padding: 0 28px; }
.dr-btn:not(.pri):hover { background: rgba(255, 255, 255, .1); }
.dr-btn:active { transform: scale(.97); }
.dr-btn:disabled { opacity: .4; cursor: default; }
.dr-btn:focus-visible, .dr-sub button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.dr-btn svg {
  width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.dr-sub { display: flex; align-items: center; gap: 10px; }
.dr-sub button {
  border: 0; background: none; cursor: pointer; padding: 12px 8px; box-shadow: none;
  color: rgba(255, 255, 255, .64); font: 400 13px var(--font-ui); letter-spacing: .06em;
}
.dr-sub button:hover { color: #fff; }
.dr-sub i { width: 1px; height: 11px; background: rgba(255, 255, 255, .24); }
@keyframes drFade { from { opacity: 0; } }
@keyframes drIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }
@media (prefers-reduced-motion: reduce) {
  .dr-mask, .dr-poster { animation: none !important; }
}

/* ---------------- 阅读推荐：今日真题 + 今日短文 ---------------- */
.read-rec { margin: 0 0 14px; }
.rec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 2px 2px 10px; }
.rec-head b { font-size: 16px; color: var(--ink); }
.rec-head span { font-size: 12.5px; color: var(--ink2); }
.rec-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 720px) { .rec-grid { grid-template-columns: 1fr 1fr; } }
.rec-card {
  background: var(--card); border: 1px solid var(--card-line); border-radius: 16px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.rec-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; line-height: 1.6;
  padding: 0 8px; border-radius: 999px; color: var(--brand); background: var(--brand-soft);
  flex: none;
}
.rec-sub { font-size: 12px; color: var(--ink2); }
.rec-title { font-family: var(--font-disp); font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.rec-topic { font-size: 12px; color: var(--ink2); }
.rec-prev {
  font-size: 13px; line-height: 1.6; color: var(--ink-body);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.rec-hit { font-size: 12.5px; color: var(--green); }
.rec-words { display: block; margin-top: 2px; color: var(--ink2); font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-acts { display: flex; gap: 8px; margin-top: 4px; }
/* 背完页的紧凑入口 */
.study-rec { width: 100%; max-width: 420px; margin: 4px auto 12px; text-align: left; }
.rec-mini-head { font-size: 12.5px; color: var(--ink2); margin: 0 2px 6px; text-align: center; }
.rec-minis { display: flex; flex-direction: column; gap: 8px; }
.rec-mini {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "tag t" "tag s";
  column-gap: 10px; align-items: center; text-align: left; width: 100%;
  background: var(--card); border: 1px solid var(--card-line); border-radius: 12px;
  padding: 10px 12px; color: var(--ink); cursor: pointer; font: inherit;
}
.rec-mini .rec-tag { grid-area: tag; }
.rec-mini-t { grid-area: t; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-mini-s { grid-area: s; font-size: 12px; color: var(--ink2); }
.rec-mini:active { transform: scale(.98); }
/* 语料文章顶部说明 */
.corpus-note { font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.corpus-note a { color: var(--brand); }
.corpus-gloss { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--ink-body); }
.corpus-gloss summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.corpus-gloss .pos { color: var(--ink2); font-style: italic; font-size: 12px; }
.quiz-note { font-size: 12px; color: var(--ink2); margin: -4px 0 10px; }

/* ---------- 阅读页「刊头」版式（App 薄雾留白，11-10）----------
   像翻开今天的报纸：Reading 报头 → 今日真题（头条）→ 今日短文（二条）→ 书架 → 文章。
   新增节点（.read-mast / .read-sec-head / .bc-en / .rec-line）默认隐藏，
   只在 App 壳 + 薄雾留白下显示；其它皮肤与网页端版式不变。
   生成真题 / 小故事 / 导入 TXT 收进「书架与文章」右侧按钮打开的 #readNewModal（转调原按钮）。 */
.read-mast, .read-sec-head, .bc-en, .rec-line { display: none; }
.rn-row { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; padding: 14px 2px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; }
.rn-row b { font-size: 15.5px; font-weight: 600; }
.rn-row span { font-size: 12.5px; color: var(--ink2); }
.rn-row:active { opacity: .6; }
.rn-guide { margin-left: auto; border: 0; background: none; color: var(--brand); font-size: 13px; cursor: pointer; }
.read-new-sheet .popup-close { margin-left: 8px; }

:root[data-shell="app"][data-style="frost"] .read-mast { display: block; margin-top: 4px; }
:root[data-shell="app"][data-style="frost"] .rm-row { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
:root[data-shell="app"][data-style="frost"] .rm-title { font-family: var(--font-disp); font-size: 34px; line-height: 1.1; letter-spacing: -.5px; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .rm-date { font-size: 12px; color: var(--ink2); letter-spacing: .06em; }
:root[data-shell="app"][data-style="frost"] .rm-sub { display: flex; justify-content: space-between; min-height: 31px; padding: 7px 0; font-size: 11.5px; letter-spacing: .04em; color: var(--ink2); border-bottom: 1px solid var(--rule); }
:root[data-shell="app"][data-style="frost"] .rm-sub b { color: var(--brand); font-weight: 600; }
:root[data-shell="app"][data-style="frost"] #view-read .gen-top { display: none; }

/* 头条 / 二条 */
:root[data-shell="app"][data-style="frost"] .read-rec { margin: 0; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-head,
:root[data-shell="app"][data-style="frost"] .read-rec .rs-rest,
:root[data-shell="app"][data-style="frost"] .read-rec .rec-topic,
:root[data-shell="app"][data-style="frost"] .read-rec .rec-prev,
:root[data-shell="app"][data-style="frost"] .read-rec .rec-hit { display: none; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-grid { display: block; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-card { display: block; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-top { display: block; line-height: 1.4; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-tag,
:root[data-shell="app"][data-style="frost"] .read-rec .rec-sub { padding: 0; background: none; border: 0; font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-sub::before { content: " · "; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-title { font-weight: 400; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-line { display: block; font-size: 13px; line-height: 1.7; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-line i { font-family: var(--font-disp); font-style: italic; font-size: 14px; color: var(--ink-body); }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-exam { padding: 20px 0; border-bottom: 1px solid var(--rule); }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-exam .rec-title { font-size: 29px; line-height: 1.16; letter-spacing: -.4px; margin: 9px 0 10px; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-acts { align-items: center; gap: 18px; margin-top: 16px; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-exam .rec-open { height: 44px; padding: 0 22px; border-radius: 14px; font-size: 15px; font-weight: 600; letter-spacing: .04em; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-next,
:root[data-shell="app"][data-style="frost"] .read-rec .rec-voa .rec-open { height: auto; min-height: 0; padding: 0; background: none; border: 0; box-shadow: none; font-size: 13px; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-next { color: var(--ink2); font-weight: 400; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-voa { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--ink); }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-voa > * { grid-column: 1; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-voa .rec-title { font-size: 18px; line-height: 1.28; margin: 7px 0 6px; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-voa .rec-line { grid-column: 1 / -1; font-size: 12px; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-voa .rec-acts { grid-column: 2; grid-row: 2; align-self: end; flex-direction: column; align-items: flex-end; gap: 10px; margin: 0; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-voa .rec-open { color: var(--brand); font-weight: 600; white-space: nowrap; }
:root[data-shell="app"][data-style="frost"] .read-rec .rec-voa .rec-open::after { content: " →"; }

/* 分区标题 + 生成/导入入口 + 页签式分类 */
:root[data-shell="app"][data-style="frost"] .read-sec-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 16px 0 0; font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--ink2);
}
:root[data-shell="app"][data-style="frost"] .read-sec-add {
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 5px 12px;
  min-height: 30px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .16s var(--spring), opacity .2s;
}
:root[data-shell="app"][data-style="frost"] .read-sec-add:active { transform: scale(.96); }
:root[data-shell="app"][data-style="frost"] .read-filter-chips { gap: 20px; margin: 10px 0 14px; padding-bottom: 0; border-bottom: 1px solid var(--rule); }
:root[data-shell="app"][data-style="frost"] .read-filter-chips .chip { padding: 0 0 9px; background: none; border: 0; border-radius: 0; box-shadow: none; font-size: 13.5px; font-weight: 400; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .read-filter-chips .chip.active { color: var(--ink); font-weight: 600; background: none; box-shadow: inset 0 -2px 0 var(--brand); }
:root[data-shell="app"][data-style="frost"] #view-read.in-article .read-mast,
:root[data-shell="app"][data-style="frost"] #view-read.in-article .read-sec-head,
:root[data-shell="app"][data-style="frost"] #view-read.in-article .read-filter-chips { display: none; }

/* 书架：「全部」里横向一排书脊，分类页签里四列封面 */
:root[data-shell="app"][data-style="frost"] .book-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; margin-bottom: 8px; }
:root[data-shell="app"][data-style="frost"] .book-grid.bg-all { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; margin-bottom: 4px; }
:root[data-shell="app"][data-style="frost"] .book-grid.bg-all::-webkit-scrollbar { display: none; }
:root[data-shell="app"][data-style="frost"] .book-card { flex-direction: column; gap: 0; min-width: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-shell="app"][data-style="frost"] .bg-all .book-card { flex: none; width: 80px; }
:root[data-shell="app"][data-style="frost"] .bc-cover { position: relative; overflow: hidden; width: 100%; height: 106px; align-items: flex-end; justify-content: flex-start; padding: 10px 8px; border: 0; border-radius: 4px 8px 8px 4px; background: var(--bc, #667089); background: color-mix(in srgb, var(--bc, #667089) 42%, #5d6880); box-shadow: inset 3px 0 0 rgba(255, 255, 255, .18), 0 10px 18px -12px rgba(27, 33, 48, .5); }
:root[data-shell="app"][data-style="frost"] .bc-cover .bc-art { z-index: 0; }
:root[data-shell="app"][data-style="frost"] .bc-cover.bc-has-art::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(10, 14, 24, .14) 0%, rgba(10, 14, 24, .04) 36%, rgba(10, 14, 24, .58) 68%, rgba(10, 14, 24, .90) 100%); box-shadow: inset 3px 0 0 rgba(255, 255, 255, .24), inset 0 0 0 1px rgba(255, 255, 255, .12); }
:root[data-shell="app"][data-style="frost"] .bc-cover > span { display: none; }
:root[data-shell="app"][data-style="frost"] .bc-cover .bc-lvl { display: block; position: absolute; top: 7px; left: 9px; z-index: 2; padding: 1px 5px; border-radius: 4px; font-style: normal; font-size: 9.5px; font-weight: 600; line-height: 1.35; letter-spacing: .02em; color: rgba(255, 255, 255, .94); background: rgba(15, 20, 32, .48); border: 1px solid rgba(255, 255, 255, .18); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); pointer-events: none; }
:root[data-shell="app"][data-style="frost"] .bc-en { position: relative; z-index: 2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; font-family: var(--font-disp); font-style: normal; font-size: 12.5px; line-height: 1.25; color: #fff; text-align: left; word-break: break-word; text-shadow: 0 1px 4px rgba(0, 0, 0, .68); }
:root[data-shell="app"][data-style="frost"] .bc-info { margin-top: 7px; }
:root[data-shell="app"][data-style="frost"] .bc-title { font-size: 12px; font-weight: 400; letter-spacing: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; line-height: 1.3; overflow: hidden; }
:root[data-shell="app"][data-style="frost"] .bc-author,
:root[data-shell="app"][data-style="frost"] .bc-meta,
:root[data-shell="app"][data-style="frost"] .bc-prog { display: none; }
:root[data-shell="app"][data-style="frost"] .bc-tip,
:root[data-shell="app"][data-style="frost"] .bc-trans { margin-top: 2px; padding: 0; font-size: 10.5px; font-weight: 400; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 文章：发丝线行 */
:root[data-shell="app"][data-style="frost"] .art-sec-head { margin: 10px 0 0; padding-bottom: 8px; font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--ink2); border-bottom: 1px solid var(--rule); }
:root[data-shell="app"][data-style="frost"] .art-row { margin: 0; }
:root[data-shell="app"][data-style="frost"] .read-list .art-item { padding: 13px 0; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-shell="app"][data-style="frost"] .art-item .t { font-family: var(--font-disp); font-size: 16.5px; font-weight: 400; line-height: 1.3; }
:root[data-shell="app"][data-style="frost"] .art-item .m { margin-top: 4px; font-size: 11.5px; }
:root[data-shell="app"][data-style="frost"] .art-swipe-del,
:root[data-shell="app"][data-style="frost"] .art-swipe-done { border-radius: 0; }

/* ---------- 设置页「目录」版式（App 薄雾留白，11-11）----------
   首屏只有目录（.set-index）：每行一组设置 + 当前的值；点进去是二级页，
   由 #view-settings[data-sub] 决定露出哪张卡片、卡片里的哪一组字段。
   目录和页头默认不显示，其它皮肤与网页端仍是原来的整页卡片。 */
.set-index, .set-sub-head { display: none; }
:root[data-shell="app"][data-style="frost"] #view-settings:not([data-sub]) .set-index { display: block; margin-top: 4px; }
:root[data-shell="app"][data-style="frost"] #view-settings > .card { display: none; }
:root[data-shell="app"][data-style="frost"] .si-mast { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
:root[data-shell="app"][data-style="frost"] .si-mast b { font-family: var(--font-disp); font-size: 34px; font-weight: 400; line-height: 1.1; letter-spacing: -.5px; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] .si-mast span { font-size: 12px; color: var(--ink2); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-shell="app"][data-style="frost"] .si-sec { margin: 20px 0 2px; font-size: 11px; font-weight: 500; letter-spacing: .14em; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .si-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 12px; gap: 14px; align-items: baseline; width: 100%;
  padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none;
  color: var(--ink); text-align: left; transition: opacity .16s var(--ease);
}
:root[data-shell="app"][data-style="frost"] .si-row:active { opacity: .55; }
:root[data-shell="app"][data-style="frost"] .si-row b { font-size: 16px; font-weight: 500; }
:root[data-shell="app"][data-style="frost"] .si-row span { font-size: 13px; color: var(--ink2); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root[data-shell="app"][data-style="frost"] .si-row span i { font-family: var(--font-disp); font-style: normal; font-size: 14px; color: var(--ink-body, var(--ink)); }
:root[data-shell="app"][data-style="frost"] .si-row u { text-decoration: none; font-size: 15px; color: var(--ink3); }
:root[data-shell="app"][data-style="frost"] .si-reset { display: block; margin-top: 18px; padding: 6px 0; border: 0; background: none; font-size: 13px; color: var(--red); }

/* 二级页：页头一行「‹ 设置 + 标题」，卡片去壳，字段是发丝线分隔的行，说明直接写在字段下面 */
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] .set-sub-head { display: block; margin-top: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
:root[data-shell="app"][data-style="frost"] .ssh-back { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 0; border: 0; background: none; font-size: 13px; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] .ssh-back i { font-style: normal; font-size: 17px; line-height: 1; }
:root[data-shell="app"][data-style="frost"] .set-sub-head h2 { margin: 10px 0 0; font-size: 26px; font-weight: 600; line-height: 1.25; letter-spacing: .01em; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="plan"] > .card[data-sub~="plan"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="review"] > .card[data-sub~="review"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="mode"] > .card[data-sub~="mode"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="exam"] > .card[data-sub~="exam"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="story"] > .card[data-sub~="story"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="style"] > .card[data-sub~="style"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="orb"] > .card[data-sub~="orb"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="voice"] > .card[data-sub~="voice"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="import"] > .card[data-sub~="import"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="readmark"] > .card[data-sub~="readmark"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="account"] > .card[data-sub~="account"] {
  display: block; margin: 0; padding: 6px 0 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none; animation: fadeIn .22s var(--ease-out) backwards;
}
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] > .card > h3 { display: none; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] [data-grp],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] #btnSaveSettings { display: none; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="plan"] [data-grp="plan"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="review"] [data-grp="review"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="mode"] [data-grp="mode"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="exam"] [data-grp="exam"],
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="story"] [data-grp="story"] { display: block; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] .set-grp .field { justify-content: space-between; min-height: 58px; margin: 0; padding: 8px 0; border-top: 1px solid var(--line); }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] .set-grp .field:first-child { border-top: 0; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] .set-grp .field > span { width: auto; flex: 1 1 auto; font-size: 16px; font-weight: 500; color: var(--ink); }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] .set-grp .field input[type="number"] { flex: 0 0 92px; text-align: center; font-family: var(--font-disp); font-size: 18px; padding: 8px 6px; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] .set-grp .field .sel { flex: 0 1 216px; font-size: 14.5px; padding: 9px 10px; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] .card .hint:not(#accStatus) { display: block; margin: 0; padding: 0 0 14px; font-size: 12.5px; line-height: 1.75; color: var(--ink2); }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] .card > .hint[data-grp="plan"]:not(#accStatus) { display: none; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="plan"] .card > .hint[data-grp="plan"]:not(#accStatus) { display: block; padding-top: 14px; border-top: 1px solid var(--line); }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="style"] .card .hint,
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="orb"] .card .hint,
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="import"] .card .hint,
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="account"] .card .hint:not(#accStatus) { padding: 12px 0 0; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="import"] .iw-card-steps { display: block; margin-top: 12px; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="style"] .style-grid { margin-top: 12px; }
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="account"] #accStatus { margin-top: 12px; font-size: 15px; color: var(--ink); }

/* ---------- 流畅度（App 薄雾留白，11-11）----------
   背词卡片是整屏最大的一块（约 364×535），原来带 backdrop-filter: blur(20px)：
   翻面、滑出、下一张滑入的每一帧都要把它身后整块重新模糊一遍，中低端机掉帧主要在这。
   它身后只有纸底和已经柔焦过的色团，磨不磨砂看不出差别，改成略实一点的半透明底；
   白噪音按钮同理。顶栏 / 底栏下面有正文滚过，磨砂保留。 */
:root[data-shell="app"][data-style="frost"] .wordcard,
:root[data-shell="app"][data-style="frost"] .group-spelling,
:root[data-shell="app"][data-style="frost"] .noise-btn {
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: color-mix(in srgb, var(--card-solid) 82%, transparent);
}

/* ---------- 设置二级子页展开状态（全皮肤通用） ----------
   二级子页打开时隐藏底栏与白噪音悬浮键，收回安全区边距，避免遮挡底部主题卡片与说明文字 */
body:has(#view-settings[data-sub]) .tabbar,
:root:has(#view-settings[data-sub]) .tabbar {
  display: none !important;
}
body:has(#view-settings[data-sub]) .noise,
:root:has(#view-settings[data-sub]) .noise,
body:has(#view-settings[data-sub]) .noise-btn,
:root:has(#view-settings[data-sub]) .noise-btn {
  display: none !important;
}
body:has(#view-settings[data-sub]) main,
:root:has(#view-settings[data-sub]) main {
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)) !important;
}
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub] > .card {
  padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
}

/* 商城与书库网格底部预留充足间距，避免右下悬浮白噪音球遮盖卡片 */
#view-shop.active { padding-bottom: 24px; }
.book-grid { margin-bottom: 24px; }

/* ========== 语义化类（unslop 优化） ========== */
/* 云端切回按键 */
.btn-reconnect-cloud {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  font-weight: 600;
}
.btn-reconnect-cloud:active {
  opacity: .88;
}

/* 下载完成弹窗 */
.up-done-box {
  text-align: center;
  padding: 10px 4px;
}
.up-done-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.up-done-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.up-done-desc {
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 18px;
}

/* 商城兑换确认弹窗 */
.scm-popup {
  max-width: 360px;
  width: 90%;
  border-radius: 20px;
  padding: 20px;
  background: var(--card-solid);
  box-shadow: var(--shadow-lift);
}
.scm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.scm-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.scm-body {
  text-align: center;
  padding: 8px 0 14px;
}
.scm-preview {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.scm-item-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}
.scm-item-desc {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.5;
  margin-bottom: 16px;
  padding: 0 8px;
}
.scm-summary-box {
  background: var(--soft);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
}
.scm-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scm-summary-row.dashed {
  border-top: 1px dashed var(--line);
  padding-top: 8px;
}
.scm-summary-label {
  color: var(--ink2);
}
.scm-cost-val {
  font-weight: 700;
  color: var(--brand);
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.scm-after-val {
  font-weight: 600;
  color: var(--ink);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.scm-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.scm-actions .btn {
  flex: 1;
}

/* 重置进度确认弹窗 */
.reset-modal-popup {
  max-width: 340px;
  width: 90%;
  border-radius: 20px;
  padding: 20px;
  background: var(--card-solid);
  box-shadow: var(--shadow-lift);
}
.reset-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.reset-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--red);
}
.reset-modal-desc {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 16px;
}
.reset-modal-desc .ink {
  color: var(--ink);
}
.reset-modal-desc .brand {
  color: var(--brand);
}
.reset-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.reset-modal-actions .btn {
  flex: 1;
}
.btn.danger-solid {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  font-weight: 600;
}
.btn.danger-solid:active {
  opacity: .88;
}

/* ================= 导入背词记录与公开链接弹窗 ================= */
.iw-popup {
  background: var(--card-solid);
  box-shadow: var(--shadow-lift);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
}
.iw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.iw-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
}
.iw-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border-radius: var(--r-ctl);
  background: var(--soft);
  border: 1px solid var(--line);
}
.iw-tab {
  border: none;
  background: transparent;
  color: var(--ink2);
  border-radius: max(0px, calc(var(--r-ctl) - 3px));
  padding: 8px 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.iw-tab.active {
  background: var(--brand);
  color: var(--on-brand);
  box-shadow: var(--btn-sh);
}
.iw-pane {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.iw-pane.active {
  display: flex;
}
.iw-file-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: var(--r-ctl);
  background: var(--soft);
  border: 1px dashed var(--line);
}
.iw-file-name {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iw-subhint {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink2);
}
.iw-pane textarea {
  width: 100%;
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 10px 12px;
  background: var(--soft);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  outline: none;
}
.iw-pane textarea:focus {
  border-color: var(--brand);
  background: var(--card-solid);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
/* App 端 & 网页端专属品牌导入入口卡按钮 */
.iw-shanbay-entry {
  margin-top: 12px;
}
.iw-app-entries {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="import"] .iw-shanbay-entry {
  margin-top: 14px;
}
.iw-shanbay-hero-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: var(--r-item);
  border: 1px solid rgba(16, 185, 129, .28);
  background: linear-gradient(135deg, rgba(16, 185, 129, .10), rgba(20, 184, 138, .03)), var(--card-solid);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform .16s var(--spring), border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.iw-shanbay-hero-btn:hover:not(:disabled) {
  border-color: rgba(16, 185, 129, .5);
  box-shadow: 0 6px 18px -12px rgba(16, 185, 129, .45);
}
.iw-shanbay-hero-btn:active:not(:disabled) {
  transform: scale(.985);
}
.iw-shanbay-hero-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}
:root[data-theme="dark"] .iw-shanbay-hero-btn {
  border-color: rgba(20, 184, 138, .32);
  background: linear-gradient(135deg, rgba(20, 184, 138, .14), rgba(16, 185, 129, .05)), var(--soft);
}
:root[data-theme="dark"] .iw-shanbay-hero-btn:hover:not(:disabled) {
  border-color: rgba(20, 184, 138, .55);
}
.iw-sb-badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--r-ctl);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #14b88a);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 12px -4px rgba(16, 185, 129, .45);
}
.iw-sb-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.iw-sb-main b {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
.iw-sb-main small {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink2);
}
.iw-sb-arrow {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, .12);
  color: #10b981;
  font-size: 14px;
  font-weight: 700;
}
:root[data-theme="dark"] .iw-sb-arrow {
  background: rgba(20, 184, 138, .18);
  color: #14b88a;
}

/* 墨墨背单词：靛蓝 */
.iw-hero-maimemo {
  border-color: rgba(79, 70, 229, .26);
  background: linear-gradient(135deg, rgba(79, 70, 229, .10), rgba(99, 102, 241, .03)), var(--card-solid);
}
.iw-hero-maimemo:hover:not(:disabled) {
  border-color: rgba(79, 70, 229, .48);
  box-shadow: 0 6px 18px -12px rgba(79, 70, 229, .42);
}
.iw-hero-maimemo .iw-sb-badge {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .44);
}
.iw-hero-maimemo .iw-sb-arrow {
  background: rgba(79, 70, 229, .12);
  color: #4f46e5;
}
:root[data-theme="dark"] .iw-hero-maimemo {
  border-color: rgba(99, 102, 241, .34);
  background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(79, 70, 229, .05)), var(--soft);
}
:root[data-theme="dark"] .iw-hero-maimemo:hover:not(:disabled) {
  border-color: rgba(99, 102, 241, .58);
}
:root[data-theme="dark"] .iw-hero-maimemo .iw-sb-arrow {
  background: rgba(99, 102, 241, .20);
  color: #818cf8;
}

.iw-other-import-btn {
  margin-top: 10px;
  width: 100%;
  justify-content: center;
  border-style: dashed;
}

/* 弹窗内平台引导横幅 */
.iw-platform-banner {
  padding: 11px 13px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink2);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.iw-platform-banner.is-maimemo {
  border-color: rgba(79, 70, 229, .28);
  background: linear-gradient(135deg, rgba(79, 70, 229, .08), rgba(99, 102, 241, .02)), var(--soft);
}
.iw-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.iw-banner-desc {
  margin: 0;
  color: var(--ink2);
}
.iw-banner-desc code {
  padding: 1px 5px;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
  background: var(--soft2);
  border-radius: 5px;
}
.iw-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.iw-banner-actions a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* 墨墨背单词云词本与学习记录导入弹窗 */
.mm-token-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.mm-token-row .api-key-wrap {
  width: 100%;
  min-width: 0;
}
.mm-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mm-action-row .btn {
  flex: 1 1 130px;
  justify-content: center;
  text-align: center;
}
.mm-token-row .api-key-wrap input {
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 9px 12px;
  height: 40px;
  font-size: 13.5px;
  background: var(--soft);
  color: var(--ink);
  outline: none;
}
.mm-token-row .api-key-wrap input:focus {
  border-color: #4f46e5;
  background: var(--card-solid);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .16);
}
.mm-notepad-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mm-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink2);
}
.mm-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}
.mm-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: var(--soft);
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease);
}
.mm-item.is-checked,
.mm-item:has(input:checked) {
  border-color: rgba(79, 70, 229, .42);
  background: linear-gradient(135deg, rgba(79, 70, 229, .09), rgba(99, 102, 241, .03)), var(--card-solid);
}
:root[data-theme="dark"] .mm-item.is-checked,
:root[data-theme="dark"] .mm-item:has(input:checked) {
  border-color: rgba(99, 102, 241, .52);
  background: linear-gradient(135deg, rgba(99, 102, 241, .16), rgba(79, 70, 229, .06)), var(--soft);
}
.mm-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: #4f46e5;
}
.mm-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mm-item-body b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.mm-item-meta {
  font-size: 11.5px;
  color: var(--ink2);
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}
.mm-foot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.iw-card-steps {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--line);
  background: var(--soft);
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink2);
}
.iw-card-steps b {
  color: var(--ink);
}
.iw-card-steps a,
.iw-shanbay-guide a:not(.btn) {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.iw-card-steps a:hover,
.iw-shanbay-guide a:not(.btn):hover {
  text-decoration: underline;
}
.iw-card-steps kbd,
.iw-shanbay-guide kbd {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.iw-card-steps code,
.iw-shanbay-guide code,
.iw-subhint code {
  padding: 1px 5px;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink);
  background: var(--soft2);
  border-radius: 5px;
  word-break: break-all;
}
.iw-shanbay-guide {
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  background: var(--soft);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--ink2);
}
.iw-shanbay-guide summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
}
.iw-shanbay-guide ol {
  margin: 8px 0 10px;
  padding-left: 18px;
  line-height: 1.65;
}
.iw-shanbay-guide ol.iw-guide-steps {
  list-style: none;
  padding-left: 0;
}
.iw-shanbay-guide ol.iw-guide-steps li + li {
  margin-top: 4px;
}
.iw-guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.iw-guide-actions a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.iw-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.iw-url-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 10px 12px;
  font-size: 14px;
  background: var(--soft);
  color: var(--ink);
  outline: none;
}
.iw-url-row input:focus {
  border-color: var(--brand);
  background: var(--card-solid);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.iw-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.iw-field {
  margin-bottom: 0;
}
.iw-field > span {
  width: 106px;
  font-size: 13px;
}
.iw-field .sel {
  font-size: 13.5px;
  padding: 9px 10px;
  background: var(--soft);
}
.iw-preview-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.iw-source-status {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--ink2);
}
.iw-source-status.err {
  color: var(--red);
  font-weight: 600;
}
/* 状态提示内的紧凑操作按钮（如一键切回本机服务），适配浅色与深色/毛玻璃主题 */
.iw-inline-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: baseline;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
}
.iw-inline-btn:hover {
  background: var(--brand);
  color: var(--on-brand);
}
.iw-inline-btn:active {
  transform: scale(.97);
}
.iw-preview-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-item);
  background: var(--soft);
  border: 1px solid var(--line);
}
.iw-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.iw-stat {
  background: var(--card-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  padding: 8px 6px;
  text-align: center;
}
.iw-stat b {
  display: block;
  font-family: var(--font-num);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.iw-stat.brand b { color: var(--brand); }
.iw-stat.green b { color: var(--green); }
.iw-stat.amber b { color: var(--amber); }
.iw-stat.violet b { color: var(--violet); }
.iw-stat span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink2);
}
.iw-warn {
  padding: 8px 10px;
  border-radius: var(--r-ctl);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  line-height: 1.5;
}
.iw-sec-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink2);
  margin-bottom: 6px;
}
.iw-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.iw-sample-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: var(--r-pill);
  background: var(--card-solid);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink);
}
.iw-sample-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--r-pill);
  background: var(--soft2);
  color: var(--ink2);
}
.iw-sample-tag.mastered { background: var(--green-soft); color: var(--green); }
.iw-sample-tag.learning { background: var(--brand-soft); color: var(--brand); }
.iw-sample-tag.notebook { background: var(--violet-soft); color: var(--violet); }
.iw-strategy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.iw-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.iw-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.iw-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}
.iw-actions .btn {
  flex: 1;
}
@media (max-width: 520px) {
  .iw-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .iw-field {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }
  .iw-field > span {
    width: auto;
  }
  .iw-url-row,
  .mm-token-row {
    flex-direction: column;
    align-items: stretch;
  }
}
@media (min-width: 640px) {
  #importWordsModal,
  #maimemoImportModal {
    align-items: center;
    padding: 20px;
  }
  .iw-popup {
    max-width: 580px;
    border-radius: var(--r-card);
    border-bottom: 1px solid var(--card-line);
    padding: 20px 22px;
  }
  .iw-popup::before {
    display: none;
  }
}

/* ================= 账号自定义接入 API 面板 ================= */
.api-summary-line {
  font-size: 12.5px;
  color: var(--ink2);
  margin-bottom: 10px;
}
.api-summary-line b {
  color: var(--brand);
}
.api-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.api-switch-row {
  justify-content: space-between;
}
/* 例句语音：开关行的标题比 .field>span 默认的 120px 长，放开宽度并禁止断行 */
/* 例句音源包清单：每本词书一行（已下载 / 可下载 / 敬请期待） */
.vp-list { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 6px; }
.vp-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card-solid); }
.vp-row-cur { border-color: var(--brand); }
.vp-name { font-size: 14px; font-weight: 600; color: var(--ink-body); display: flex; align-items: center; gap: 6px; min-width: 0; }
.vp-cur { font-style: normal; font-size: 11px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 7px; flex: 0 0 auto; }
.vp-state { font-size: 12.5px; color: var(--ink3); white-space: nowrap; }
.vp-state.done { color: var(--green); font-weight: 600; }
.vp-state.ready, .vp-state.loading { color: var(--brand); font-weight: 600; }
.vp-state.soon { color: var(--ink3); }
.vp-act { display: flex; justify-content: flex-end; }
.vp-act .btn { min-width: 64px; }
@media (max-width: 430px) {
  .vp-row { grid-template-columns: 1fr auto; row-gap: 6px; }
  .vp-act { grid-column: 1 / -1; }
  .vp-act .btn { width: 100%; }
}

.voice-switch-row > span {
  width: auto;
  flex: 1 1 auto;
  white-space: nowrap;
}
.api-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.api-preset {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink2);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.api-preset:hover,
.api-preset.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}
.api-key-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.api-key-wrap input {
  flex: 1;
  min-width: 0;
}
.api-eye {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink2);
  border-radius: var(--r-ctl);
  padding: 0 10px;
  height: 40px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.api-eye:hover {
  color: var(--ink);
  border-color: var(--ink2);
}
.api-test-msg {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--soft);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink2);
  word-break: break-word;
}
.api-test-msg.ok {
  background: rgba(16, 185, 129, .12);
  color: #059669;
}
.api-test-msg.err {
  background: var(--red-soft);
  color: var(--red);
}
:root[data-theme="dark"] .api-test-msg.ok {
  color: #34d399;
}
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="account"] .api-panel .field {
  min-height: 48px;
}
:root[data-shell="app"][data-style="frost"] #view-settings[data-sub="account"] .api-panel .field > span {
  width: 84px;
  flex: 0 0 84px;
  font-size: 14px;
}

/* ================= 首页消息信箱按钮与开发者寄语弹窗 ================= */
.mail-btn {
  position: relative;
}
.mail-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #d9534f;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg), 0 2px 6px rgba(217, 83, 79, .38);
  pointer-events: none;
  animation: mailPulse 2.8s ease-in-out infinite;
}
@keyframes mailPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.mailbox-mask {
  background: rgba(8, 11, 10, .62);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
}
.mailbox-sheet {
  width: 100%;
  max-width: 576px;
  max-height: 90vh;
  padding: 0;
  border-radius: 24px;
  background:
    radial-gradient(36rem 16rem at 86% -10%, var(--brand-soft), transparent 64%),
    radial-gradient(28rem 14rem at 12% 112%, var(--amber-soft, rgba(200, 121, 63, .08)), transparent 60%),
    var(--card-solid);
  border: 1px solid var(--card-line);
  box-shadow:
    0 32px 84px -16px rgba(0, 0, 0, .52),
    inset 0 1px 0 rgba(255, 255, 255, .10);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: mailboxSheetIn .26s cubic-bezier(.16, 1, .3, 1);
}
@keyframes mailboxSheetIn {
  from { opacity: 0; transform: translateY(12px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.mb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 28px 12px;
}
.mb-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mb-kicker-rule {
  width: 24px;
  height: 1px;
  background: var(--brand);
  opacity: .85;
  flex-shrink: 0;
}
.mb-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mb-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  transition: background-color .18s ease, color .18s ease;
}
.mb-close:hover {
  background: var(--soft2);
  color: var(--ink);
}
.mb-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--soft2) transparent;
}
.mb-body::-webkit-scrollbar {
  width: 4px;
}
.mb-body::-webkit-scrollbar-track {
  background: transparent;
}
.mb-body::-webkit-scrollbar-thumb {
  background: var(--soft2);
  border-radius: 999px;
}
.mb-letter-card {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
}
.mb-letter-card + .mb-letter-card {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.mb-letter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mb-letter-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--brand);
}
.mb-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber, var(--brand));
  box-shadow: 0 0 0 3px var(--amber-soft, var(--brand-soft));
}
.mb-letter-state {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--ink2);
  opacity: .85;
}
.mb-letter-state.unread {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-soft, var(--brand-soft));
  color: var(--amber, var(--brand));
  opacity: 1;
}
.mb-letter-salutation {
  font-family: var(--font-disp);
  font-size: clamp(19px, 2.3vw, 22px);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.4;
}
.mb-letter-p {
  font-size: 14px;
  line-height: 1.78;
  color: var(--ink-body);
  margin-bottom: 8px;
}
.mb-letter-list {
  list-style: none;
  margin: 6px 0 14px;
  padding: 2px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.mb-letter-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 9px 2px;
  font-size: 13.5px;
  line-height: 1.66;
  color: var(--ink-body);
}
.mb-letter-list li + li {
  border-top: 1px dashed var(--line);
}
.mb-step-num {
  font-family: var(--font-disp);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--amber, var(--brand));
  font-variant-numeric: tabular-nums;
}
.mb-step-text {
  min-width: 0;
}
.mb-letter-hl {
  font-weight: 600;
  color: var(--amber, var(--brand));
}
.mb-letter-closing {
  font-family: var(--font-disp);
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink);
  font-weight: 500;
  margin-top: 4px;
}
.mb-letter-signoff {
  margin-top: 12px;
  text-align: right;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink2);
  font-weight: 500;
  letter-spacing: .02em;
}
.mb-foot {
  padding: 12px 28px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.mb-ack-btn {
  width: auto;
  min-width: 128px;
  height: 38px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: #14201c;
  color: #f3efe6;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .05em;
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(13, 17, 15, .36);
  transition: transform .16s ease, opacity .16s ease;
}
:root[data-theme="dark"] .mb-ack-btn {
  background: #f3efe6;
  color: #0d110f;
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .48);
}
.mb-ack-btn:hover {
  transform: translateY(-1px);
  opacity: .92;
}
.mb-ack-btn:active {
  transform: scale(.98);
}
@media (max-width: 520px) {
  .mailbox-sheet {
    max-width: 93vw;
    max-height: 88vh;
    border-radius: 22px;
  }
  .mb-head {
    padding: 16px 20px 10px;
  }
  .mb-body {
    padding: 4px 20px 12px;
  }
  .mb-foot {
    padding: 12px 20px 18px;
  }
  .mb-ack-btn {
    min-width: 116px;
    padding: 0 22px;
  }
}

/* ---------- 平板端 GPU 合成与开屏保护（App 端共用） ----------
   大屏触屏平板（>=768px 且无鼠标悬停）在高分辨率下同时运行开屏散雾 filter:blur、
   重力色团大半径模糊与多层 backdrop-filter 容易导致 WebView GPU 合成器卡死或 OOM；
   手机（<768px）与桌面鼠标端不受影响。 */
@media (min-width: 768px) and (pointer: coarse), (min-width: 768px) and (hover: none) {
  :root, :root[data-style] { --blur: none; }
  .desktop-dock, .topbar, .tabbar, .popup-mask, .card, .task-btn,
  .wordcard, .popup, .setup-card, .noise-panel, .noise-btn, .rd-bar {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .desktop-dock, .card, .task-btn, .wordcard, .popup, .setup-card {
    background: var(--card-solid);
  }
  .bf-mark span {
    will-change: auto;
    animation: fadeUp .45s var(--ease-out) backwards;
  }
  .grav-orb {
    filter: none !important;
    will-change: auto;
  }
}
