.spelling-page { color:var(--text); }
.vocab-list-actions [data-mode="review"] { grid-column:1 / -1; }
.vocab-home > .vocab-filters { margin:0 0 16px; }
.vocab-filters .vocab-filter:focus-visible { outline:2px solid var(--brand-color); outline-offset:3px; }
.spelling-page [hidden] { display:none !important; }
.vocab-training-hero.card { margin-bottom:20px; padding:24px 28px; animation:none; }
.vocab-training-hero h1 { margin:0; font-size:clamp(24px,3vw,30px); letter-spacing:-.03em; }
.vocab-training-hero > p { margin:8px 0 0; color:var(--text-2); font-size:13.5px; line-height:1.7; }
.vocab-training-hero[hidden] { display:none !important; }
.vocab-training-modes { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:14px; }
.vocab-training-mode-group { display:flex; align-items:center; gap:4px; }
.vocab-training-divider { width:1px; height:26px; margin:0 8px; background:var(--line-strong); flex-shrink:0; }
.vocab-training-modes .vocab-mode-link { display:inline-flex; align-items:center; gap:6px; padding:9px 14px; border-radius:var(--control-radius); color:var(--text-2); text-decoration:none; font-size:14px; font-weight:650; }
.vocab-training-modes .vocab-mode-link:not([aria-current="page"]) { background:rgba(var(--brand-rgb),.05); }
.vocab-training-modes .vocab-mode-link:not([aria-current="page"]):hover, .vocab-training-modes .vocab-mode-link:not([aria-current="page"]):focus-visible { background:rgba(var(--brand-rgb),.09); color:var(--text); }
.vocab-training-modes .vocab-mode-link[aria-current="page"] { color:var(--brand-text); background:rgba(var(--brand-rgb),.12); }
.vocab-mode-settings { display:inline-flex; align-items:center; gap:6px; padding:9px 12px; border:0; border-radius:var(--control-radius); background:transparent; color:var(--text-2); text-decoration:none; font-size:13px; font-weight:650; }
.vocab-mode-settings:hover { background:var(--fill); color:var(--text); transform:none; }
.vocab-mode-link svg, .vocab-mode-settings svg { width:16px; height:16px; flex-shrink:0; }
.vocab-training-modes .vocab-mode-link:focus-visible, .vocab-mode-settings:focus-visible, .spelling-settings .button:focus-visible { outline:2px solid var(--brand-color); outline-offset:3px; }
.vocab-settings-dialog { width:460px; max-width:calc(100vw - 32px); max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); padding:24px; overflow:auto; border:1px solid var(--line); border-radius:var(--control-radius); background:var(--surface); box-shadow:0 24px 64px rgba(15,35,60,.22); }
.vocab-settings-dialog::backdrop, .spelling-settings::backdrop { background:rgba(15,26,40,.44); backdrop-filter:blur(2px); }
.vocab-settings-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.vocab-settings-head h2 { margin:0; font-size:21px; }
.vocab-settings-field { margin-top:16px; }
.vocab-settings-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:14px; }
.spelling-resume { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px 16px; margin:0 0 18px; background:var(--fill); border-radius:var(--control-radius); }
.spelling-resume p { flex:1 1 260px; margin:0; font-size:13.5px; line-height:1.7; }
.spelling-resume .spelling-actions { margin:0; }
.spelling-muted { color:var(--text-2); font-size:13px; line-height:1.7; }
.spelling-layout.card { padding:clamp(20px,4vw,40px); margin-top:12px; }
.spelling-main { min-width:0; }
.spelling-main h2 { font-size:21px; margin:12px 0 18px; }
.spelling-filters { display:flex; align-items:end; gap:12px; flex-wrap:wrap; }
.spelling-filters label { flex:1 1 170px; }
.spelling-page label { display:block; font-weight:600; font-size:13px; }
.spelling-page input:not([type=checkbox]):not([type=range]):not(.spelling-capture), .spelling-page select { display:block; width:100%; min-height:44px; margin:7px 0 0; border:1px solid var(--line-strong); border-radius:var(--field-radius); background:var(--surface); color:var(--text); padding:9px 11px; font:inherit; }
.spelling-page .button { min-height:42px; white-space:normal; text-decoration:none; }
.spelling-page button:disabled { opacity:.55; cursor:not-allowed; }

/* ==========================================================================
   词库选择：与词义训练同语言的卡片（进度条 + 徽标 + 悬浮上浮）
   ========================================================================== */
.spelling-group-title { margin:26px 0 12px; font-size:14px; font-weight:650; color:var(--text-2); letter-spacing:.02em; }
.spelling-library-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(248px,1fr)); gap:14px; }
.spelling-library {
  display:flex; flex-direction:column; gap:6px;
  padding:18px 20px; background:var(--fill);
  border:0; border-radius:var(--card-radius);
  transition:transform .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.spelling-library:hover { transform:translateY(-3px); background:var(--fill-strong); }
.spelling-library.is-selected { background:rgba(var(--brand-rgb), .08); box-shadow:0 10px 24px -14px rgba(233,127,31,.4); }
.spelling-library.is-selected:hover { background:rgba(var(--brand-rgb), .12); }
.spelling-library.is-locked { background:var(--fill); }
.spelling-library.is-locked:hover { transform:none; }
/* 灰底卡片上的次级按钮回白底，避免融进卡片 */
.spelling-library .spelling-actions .button:not(.button-primary) { background:var(--surface); }
.spelling-library .spelling-actions .button:not(.button-primary):hover { background:var(--surface); }
/* 进度条轨道在灰底上加深一档 */
.spelling-library-bar { background:var(--fill-strong); }
.spelling-library-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.spelling-library-head h4 { margin:0; font-size:16.5px; line-height:1.5; }
.spelling-vip-pill { padding:3px 10px; border-radius:999px; font-size:11.5px; font-weight:700; color:var(--warn-text); background:var(--warn-bg); white-space:nowrap; flex-shrink:0; }
.spelling-library-desc { margin:0; font-size:13px; color:var(--text-2); line-height:1.6; min-height:40px; }
.spelling-library-count { display:flex; align-items:baseline; gap:5px; margin-top:4px; }
.spelling-library-count strong { font-size:24px; font-weight:800; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.spelling-library-count span { font-size:12.5px; color:var(--text-3); }
.spelling-library-bar { height:7px; border-radius:999px; background:var(--fill); overflow:hidden; margin:2px 0; }
.spelling-library-bar span { display:block; height:100%; border-radius:999px; background:var(--brand-color); transition:width .3s var(--ease); }
.spelling-library.is-locked .spelling-library-bar span { background:var(--line-strong); }
.spelling-library-progress { margin:0; font-size:12px; color:var(--text-3); font-variant-numeric:tabular-nums; }
.spelling-library-progress .is-ok { color:var(--success-text); font-weight:600; }
.spelling-library-progress .is-bad { color:var(--warn-text); font-weight:600; }
.spelling-lock { font-weight:650; color:var(--text-2); }
.spelling-actions { display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
.spelling-library .spelling-actions { margin-top:10px; }
.spelling-library .spelling-actions .button { padding:8px 11px; font-size:12.5px; }
.spelling-library .spelling-actions .button-primary { flex:1; }
.spelling-library-footlink { font-size:12px; color:var(--text-2); text-decoration:none; }
.spelling-library-footlink:hover { color:var(--brand-text); text-decoration:underline; text-underline-offset:3px; }

/* ==========================================================================
   练习页头：返回 + 词库名 + 进度点数/计时/暂停
   ========================================================================== */
.spelling-settings.card { width:560px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 32px); margin:auto; padding:24px; overflow:auto; color:var(--text); animation:none; border:1px solid var(--line); border-radius:var(--control-radius); box-shadow:0 24px 64px rgba(15,35,60,.22); }
.spelling-settings:not([open]) { display:none; }
.spelling-settings::backdrop, .spelling-settings-backdrop { background:rgba(15,26,40,.44); backdrop-filter:blur(2px); }
.spelling-settings-backdrop { position:fixed; inset:0; z-index:1000; }
.spelling-settings.is-fallback { position:fixed; inset:0; z-index:1001; }
.spelling-settings-head { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.spelling-settings-head h2 { margin:0; font-size:21px; }
.spelling-settings-head .button { padding:7px 12px; }
.spelling-settings-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; margin:20px 0; }
.spelling-settings-nav .button { display:inline-flex; align-items:center; justify-content:center; gap:5px; padding:8px 4px; font-size:12px; border-radius:999px; }
.spelling-settings-nav .button svg { width:15px; height:15px; flex-shrink:0; }
.spelling-settings-nav .button[aria-pressed=true] { border-color:transparent; background:var(--fill-strong); color:var(--brand-text); }
.spelling-settings form { margin:0; }
.spelling-settings fieldset { border:0; padding:0; margin:0; min-width:0; }
.spelling-setting-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.spelling-settings-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:20px; padding-top:16px; border-top:1px solid var(--line); }
.spelling-settings label { margin:0; }
.spelling-settings output { float:right; font-variant-numeric:tabular-nums; }
.spelling-settings input[type=range] { width:100%; accent-color:var(--brand-color); min-height:28px; }
.spelling-presets { display:flex; gap:5px; }
.spelling-presets .button { padding:5px 7px; flex:1; font-size:12px; }
.spelling-preview { margin:0; font:24px/1.5 var(--font-mono,monospace); letter-spacing:.13em; overflow-wrap:anywhere; }
.spelling-settings .spelling-checkbox { display:flex; align-items:center; gap:8px; line-height:1.7; margin:14px 0; }
.spelling-checkbox input { width:18px; height:18px; accent-color:var(--brand-color); flex-shrink:0; }
.spelling-setting { min-width:0; }
.spelling-setting--wide { grid-column:1 / -1; }
.spelling-settings #sp-settings-status { margin-bottom:0; }
.spelling-practice, .spelling-wordlist, .spelling-summary { min-width:0; }
.spelling-study-head { display:flex; align-items:center; flex-wrap:wrap; gap:10px; font-size:13px; }
.spelling-back {
  display:inline-flex; align-items:center; gap:5px; min-height:36px; padding:6px 13px;
  border:0; border-radius:999px; background:var(--fill); color:var(--text-2);
  font-size:13px; font-weight:600; cursor:pointer;
  transition:background .15s var(--ease), color .15s var(--ease);
}
.spelling-back:hover { background:var(--fill-strong); color:var(--text); }
.spelling-back:focus-visible { outline:2px solid var(--brand-color); outline-offset:2px; }
.spelling-study-title { flex:1; min-width:120px; font-size:14px; font-weight:650; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.spelling-study-meta { display:flex; align-items:center; gap:8px; margin-left:auto; }
.spelling-chip {
  display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border-radius:999px;
  background:var(--fill); color:var(--text-2); font-size:12.5px; font-weight:650; font-variant-numeric:tabular-nums;
}
.spelling-study-head time { padding:5px 11px; border-radius:999px; background:var(--fill); color:var(--text-2); font-size:12.5px; font-weight:650; font-variant-numeric:tabular-nums; }
.spelling-study-head .button { min-height:36px; padding:6px 14px; font-size:13px; border-radius:999px; }
.spelling-progressbar { height:8px; margin:18px 0 4px; border-radius:999px; background:var(--fill); overflow:hidden; }
.spelling-progressbar span { display:block; height:100%; width:0; border-radius:999px; background:var(--brand-color); transition:width .3s var(--ease); }
.spelling-pause-panel { padding:70px 12px; text-align:center; }
.spelling-pause-panel h2 { margin:0 0 8px; }
.spelling-pause-panel p { margin:0 0 18px; color:var(--text-2); font-size:13.5px; }

/* ==========================================================================
   单词台：释义提示 + 字母方块
   ========================================================================== */
.spelling-word-stage { position:relative; padding:clamp(24px,4.5vw,44px) 0 20px; text-align:center; }
.spelling-prompt {
  display:block; margin:0 auto 26px; max-width:40em; padding:10px 18px;
  border-radius:14px; background:var(--fill); color:var(--text);
  font-size:clamp(16px,2vw,19px); font-weight:650; line-height:1.7; text-align:center;
  white-space:pre-line; overflow-wrap:anywhere;
}
.spelling-stage-phonetic { min-height:22px; margin:14px 0 0; text-align:center; color:var(--text-3); font-size:15px; font-family:"Segoe UI",system-ui,sans-serif; }
/* 音标统一以斜杠包裹：/teik/；空元素不加。 */
.spelling-stage-phonetic:not(:empty)::before, .spelling-stage-phonetic:not(:empty)::after,
.spelling-wordcard-phonetic:not(:empty)::before, .spelling-wordcard-phonetic:not(:empty)::after,
.spelling-word-card-phonetic:not(:empty)::before, .spelling-word-card-phonetic:not(:empty)::after { content:'/'; opacity:.75; }
.spelling-word { position:relative; min-height:96px; display:flex; align-items:center; justify-content:center; margin:18px auto 0; max-width:100%; cursor:text; }
.spelling-word:focus-within { outline:none; }
.spelling-mask { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; max-width:100%; }
.spelling-word.is-size-long .spelling-mask { gap:6px; }
.spelling-word.is-size-huge .spelling-mask { gap:4px; }

/* 字母位：无框矩形，只有字母与底部横条——给(灰字浅条) / 待填(空条) / 已输(绿红) */
.spelling-slot {
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:60px;
  font:700 32px/1 "SF Mono",SFMono-Regular,Consolas,Menlo,"Cascadia Mono",monospace;
  letter-spacing:0; user-select:none;
  transition:color .12s var(--ease);
}
.spelling-slot::after {
  content:''; position:absolute; left:4px; right:4px; bottom:7px; height:3px;
  border-radius:2px; background:var(--line-strong);
  transition:background .12s var(--ease);
}
.spelling-slot.is-hint { color:var(--text-3); }
.spelling-slot.is-hint::after { background:var(--line-strong); }
.spelling-slot.is-blank { color:transparent; }
.spelling-slot.is-blank::after { background:var(--line-strong); }
.spelling-slot.is-gap { width:18px; height:60px; }
.spelling-slot.is-gap::after { content:none; }
.spelling-slot.is-correct { color:var(--success-text); }
.spelling-slot.is-correct::after { background:var(--ios-green); }
.spelling-slot.is-wrong { color:var(--danger-text); }
.spelling-slot.is-wrong::after { background:var(--danger-text); }
.spelling-slot.is-selected { background:rgba(var(--brand-rgb), .08); border-radius:8px; }
.spelling-word.is-size-long .spelling-slot { width:38px; height:52px; font-size:26px; }
.spelling-word.is-size-long .spelling-slot.is-gap { width:14px; }
.spelling-word.is-size-huge .spelling-slot { width:32px; height:46px; font-size:22px; }
.spelling-word.is-size-huge .spelling-slot.is-gap { width:10px; }
/* 当前光标位：底条变为品牌色并闪烁 */
.spelling-word:focus-within .spelling-slot.is-current::after {
  background:var(--brand-color); animation:sp-caret 1.05s steps(1) infinite;
}
.spelling-word:focus-within .spelling-slot.is-end::after { left:0; right:2px; }
@keyframes sp-caret { 0%,55% { opacity:1; } 56%,100% { opacity:.15; } }
/* 答对波浪：整排字母依次轻弹，横条随之变绿 */
.spelling-word.is-win .spelling-slot { animation:sp-pop .5s var(--ease-out) both; animation-delay:calc(var(--i,0) * 38ms); color:var(--success-text); }
.spelling-word.is-win .spelling-slot::after { background:var(--ios-green); }
@keyframes sp-pop {
  0% { transform:scale(1); }
  40% { transform:scale(1.16); }
  100% { transform:scale(1); }
}
/* 答错抖动 */
.spelling-word.is-miss { animation:sp-shake .34s var(--ease) both; }
@keyframes sp-shake {
  0%,100% { transform:translateX(0); }
  25% { transform:translateX(-6px); }
  55% { transform:translateX(5px); }
  80% { transform:translateX(-2px); }
}
/* A real, focusable input opens mobile keyboards and exposes editing to assistive tech.
   It overlays the word, but never paints a separate input field or a second caret. */
.spelling-page input.spelling-capture, .spelling-page input.spelling-capture:focus { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; min-height:44px; border:0; border-radius:0; background:transparent; opacity:0; color:transparent; caret-color:transparent; font-size:18px; outline:none; box-shadow:none; cursor:text; }
.spelling-speech { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:8px; margin:18px 0 0; min-height:38px; }
.spelling-speech .button { min-height:36px; padding:6px 14px; border-radius:999px; font-size:13px; }
.spelling-speech .spelling-muted { font-size:12.5px; }
#sp-answer-help { max-width:52em; margin:12px auto 0; }
#sp-answer-actions { justify-content:center; margin-top:22px; }
.spelling-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }

/* ==========================================================================
   反馈区：判定行 + 词卡 + 逐字对照 + 连对进度
   ========================================================================== */
.spelling-feedback { margin:24px auto 0; padding-top:22px; border-top:1px solid var(--line); max-width:52em; text-align:left; }
.spelling-feedback.is-correct { padding-top:20px; }
.spelling-verdict { display:flex; align-items:center; gap:12px; margin:0 0 14px; }
.spelling-verdict-icon {
  display:inline-flex; align-items:center; justify-content:center; flex-shrink:0;
  width:42px; height:42px; border-radius:999px; font-size:20px; font-weight:800;
}
.spelling-feedback.is-correct .spelling-verdict-icon { background:var(--success-bg); color:var(--success-text); }
.spelling-feedback.is-wrong .spelling-verdict-icon { background:var(--danger-bg); color:var(--danger-text); }
.spelling-feedback.is-mastered .spelling-verdict-icon { background:var(--warn-bg); color:var(--warn-text); }
.spelling-verdict h2 { margin:0; font-size:19px; line-height:1.4; }
.spelling-feedback.is-correct .spelling-verdict h2 { color:var(--success-text); }
.spelling-feedback.is-wrong .spelling-verdict h2 { color:var(--danger-text); }
.spelling-verdict-note { margin:3px 0 0; font-size:13px; color:var(--text-2); line-height:1.6; }

.spelling-wordcard { padding:16px 18px; border-radius:var(--control-radius); background:var(--fill); }
.spelling-wordcard-top { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.spelling-wordcard-word { font-size:24px; font-weight:800; letter-spacing:-.01em; color:var(--text); overflow-wrap:anywhere; }
.spelling-wordcard-phonetic { font-size:14px; color:var(--text-3); font-family:"Segoe UI",system-ui,sans-serif; }
.spelling-wordcard-speak {
  display:inline-flex; align-items:center; gap:5px; margin-left:auto; padding:6px 13px;
  border:1px solid var(--line); border-radius:999px; background:var(--surface);
  font-size:12.5px; font-weight:600; color:var(--brand-text); cursor:pointer;
  transition:transform .15s var(--ease), box-shadow .15s var(--ease);
}
.spelling-wordcard-speak:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 8px 20px -10px rgba(233,127,31,.5); }
.spelling-wordcard-speak:disabled { opacity:.5; cursor:not-allowed; }
.spelling-wordcard-definition { margin:10px 0 0; font-size:15px; line-height:1.8; color:var(--text); white-space:pre-line; overflow-wrap:anywhere; }
.spelling-wordcard-example { margin:10px 0 0; padding:9px 13px; border-radius:10px; background:var(--warn-bg); font-size:13.5px; line-height:1.75; color:var(--text-2); white-space:pre-line; overflow-wrap:anywhere; }
.spelling-mastery-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin:14px 0 0; }
.spelling-dots { display:inline-flex; align-items:center; gap:6px; }
.spelling-dot { width:12px; height:12px; border-radius:999px; background:var(--fill-strong); border:1.5px solid var(--line-strong); }
.spelling-dot.is-hit { background:var(--ios-green); border-color:var(--ios-green); }
.spelling-dot.is-final { box-shadow:0 0 0 3px rgba(52,199,89,.18); }
.spelling-mastery-row .spelling-muted { font-size:12.5px; }
.spelling-feedback.is-wrong .spelling-mastery-row .spelling-muted { color:var(--text-2); }

/* 逐字对照：上为正确拼写，下为你的输入 */
.spelling-diff { margin:14px 0 0; }
.spelling-diff-line { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin:0 0 8px; }
.spelling-diff-label { flex:0 0 auto; min-width:64px; font-size:12.5px; font-weight:600; color:var(--text-3); }
.spelling-diff-chars { display:flex; flex-wrap:wrap; gap:4px; font:600 16px/1 "SF Mono",SFMono-Regular,Consolas,Menlo,monospace; overflow-wrap:anywhere; }
.spelling-diff-chars span { display:inline-flex; align-items:center; justify-content:center; min-width:24px; height:30px; padding:0 4px; border-radius:7px; background:var(--fill); color:var(--text); }
.spelling-diff-chars del { color:var(--danger-text); background:var(--danger-bg); text-decoration:line-through; }
.spelling-diff-chars ins { color:var(--success-text); background:var(--success-bg); text-decoration:none; }
.spelling-diff-empty { font-size:13px; color:var(--text-3); }

/* 自动下一词：文字 + 细进度条 */
#sp-auto-next-status { margin:14px 0 0; text-align:center; font-variant-numeric:tabular-nums; }
.spelling-autobar { height:4px; margin:8px auto 0; max-width:280px; border-radius:999px; background:var(--fill); overflow:hidden; }
.spelling-autobar span { display:block; height:100%; width:100%; border-radius:999px; background:var(--ios-green); transition:width .12s linear; }
.spelling-feedback .spelling-actions { justify-content:center; margin-top:18px; }
.spelling-feedback p { line-height:1.8; white-space:pre-line; overflow-wrap:anywhere; }

/* ==========================================================================
   掌握瞬间：庆祝粒子（仅在「新掌握」触发一次）
   ========================================================================== */
.spelling-confetti { position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.spelling-confetti i {
  position:absolute; left:50%; top:38%; width:8px; height:8px; border-radius:2px;
  background:var(--c,var(--brand-color)); opacity:0; transform:translate(-50%,-50%);
  animation:sp-fly .8s var(--ease-out) forwards; animation-delay:var(--d,0ms);
}
.spelling-confetti i:nth-child(odd) { border-radius:999px; }
@keyframes sp-fly {
  0% { opacity:0; transform:translate(-50%,-50%) scale(.4) rotate(0deg); }
  18% { opacity:1; }
  100% { opacity:0; transform:translate(calc(-50% + var(--dx,0px)),calc(-50% + var(--dy,-70px))) scale(1) rotate(220deg); }
}

/* ==========================================================================
   错词本 / 已掌握：卡片列表
   ========================================================================== */
.spelling-wordlist-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.spelling-wordlist-head h2 { margin:0; }
.spelling-count-pill { padding:4px 12px; border-radius:999px; background:var(--fill); color:var(--text-2); font-size:13px; font-weight:650; font-variant-numeric:tabular-nums; }
.spelling-wordlist-hint { margin:14px 0 14px; padding:11px 15px; border-radius:12px; background:var(--fill); font-size:12.5px; line-height:1.7; color:var(--text-2); }
.spelling-words-items { display:flex; flex-direction:column; gap:10px; margin-top:4px; }
.spelling-word-card {
  display:flex; align-items:center; gap:14px; padding:14px 16px;
  border:1.5px solid var(--line); border-radius:var(--control-radius); background:var(--surface);
  transition:border-color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}
.spelling-word-card:hover { border-color:rgba(247,154,62,.45); transform:translateY(-1px); box-shadow:0 10px 24px -16px rgba(233,127,31,.4); }
.spelling-word-card-main { flex:1; min-width:0; }
.spelling-word-card-head { display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; }
.spelling-word-card-head strong { font-size:17px; font-weight:700; color:var(--text); overflow-wrap:anywhere; }
.spelling-word-card-phonetic { font-size:12.5px; color:var(--text-3); font-family:"Segoe UI",system-ui,sans-serif; }
.spelling-word-card-mastered-pill { padding:2px 9px; border-radius:999px; background:var(--success-bg); color:var(--success-text); font-size:11px; font-weight:700; }
.spelling-word-card-def { margin:4px 0 0; font-size:13.5px; line-height:1.65; color:var(--text-2); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.spelling-word-card-badges { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 0; }
.spelling-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:999px; font-size:11.5px; font-weight:650; font-variant-numeric:tabular-nums; }
.spelling-badge.is-wrong { background:var(--danger-bg); color:var(--danger-text); }
.spelling-badge.is-streak { background:var(--success-bg); color:var(--success-text); }
.spelling-badge.is-time { background:var(--fill); color:var(--text-3); font-weight:600; }
.spelling-badge.is-neutral { background:var(--fill); color:var(--text-2); }
.spelling-word-card-last { margin:7px 0 0; font-size:12px; color:var(--text-3); }
.spelling-word-card-last code { padding:1px 7px; border-radius:6px; background:var(--danger-bg); color:var(--danger-text); font:600 11.5px/1.6 "SF Mono",SFMono-Regular,Consolas,Menlo,monospace; }
.spelling-word-card-actions { display:flex; flex-direction:column; align-items:center; gap:7px; flex:0 0 auto; }
.spelling-row-speak { width:34px; height:34px; border-radius:999px; border:1px solid var(--line); background:var(--surface); font-size:14px; cursor:pointer; transition:border-color .15s, background .15s; }
.spelling-row-speak:hover:not(:disabled) { border-color:rgba(247,154,62,.55); background:rgba(var(--brand-rgb), .05); }
.spelling-row-speak:disabled { opacity:.4; cursor:not-allowed; }
.spelling-row-mark { padding:7px 13px; border-radius:11px; border:1px solid rgba(247,154,62,.5); background:rgba(var(--brand-rgb), .05); font-size:12.5px; font-weight:700; color:var(--brand-text); cursor:pointer; white-space:nowrap; transition:background .15s var(--ease); }
.spelling-row-mark:hover:not(:disabled) { background:var(--warn-bg); }
.spelling-row-mark:disabled { opacity:.5; cursor:not-allowed; }
.spelling-empty { padding:44px 16px; text-align:center; }
.spelling-empty-icon { font-size:40px; line-height:1; margin:0 0 12px; }
.spelling-empty-title { margin:0 0 6px; font-size:16px; font-weight:700; }
.spelling-empty-note { margin:0 auto; max-width:30em; font-size:13px; color:var(--text-2); line-height:1.7; }
.spelling-words-foot { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:9px; margin-top:18px; }
.spelling-words-foot .spelling-muted { font-variant-numeric:tabular-nums; }
.spelling-words-foot .button { min-height:38px; padding:7px 14px; font-size:13px; }
.spelling-words-foot .button-primary { min-height:42px; padding:9px 20px; font-size:14px; }

/* ==========================================================================
   结算页
   ========================================================================== */
.spelling-summary { text-align:center; }
.spelling-summary h2 { margin:6px 0 4px; font-size:22px; }
.spelling-done-note { margin:0 0 24px; font-size:13.5px; color:var(--text-2); line-height:1.7; }
.spelling-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:0 0 26px; }
.spelling-stats > div { padding:16px 8px 14px; border-radius:16px; background:var(--fill); }
.spelling-stats dt { color:var(--text-3); font-size:12.5px; }
.spelling-stats dd { margin:7px 0 0; font-size:30px; font-weight:800; font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.spelling-stats dd.is-ok { color:var(--success-text); }
.spelling-stats dd.is-warn { color:var(--brand-text); }
.spelling-stats dd.is-bad { color:var(--danger-text); }
.spelling-summary .spelling-actions { justify-content:center; }

.spelling-notice, .spelling-alert { padding:14px; background:var(--fill); border-radius:var(--control-radius); line-height:1.8; }
.spelling-alert { background:var(--danger-bg); color:var(--danger-text); }
.spelling-status { min-height:22px; font-size:13px; color:var(--text-2); }

@media (max-width:700px) {
  .vocab-training-hero.card { padding:20px 18px; }
  .vocab-training-modes { flex-direction:column; align-items:stretch; gap:8px; }
  .vocab-training-mode-group { flex-wrap:wrap; }
  .vocab-training-divider { width:100%; height:1px; margin:2px 0; }
  .vocab-training-modes .vocab-mode-link { padding:8px 12px; font-size:13px; }
  .vocab-mode-settings { padding:8px; font-size:12px; }
  .vocab-settings-dialog { padding:20px 16px; max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); }
  .spelling-settings.card { padding:20px 16px; max-height:calc(100vh - 24px); max-height:calc(100dvh - 24px); }
  .spelling-setting-grid { grid-template-columns:1fr; }
  .spelling-settings-nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .spelling-layout.card { padding:20px 16px; }
  .spelling-library-grid { grid-template-columns:1fr; }
  .spelling-study-head { gap:8px; }
  .spelling-study-title { flex-basis:100%; order:-1; }
  .spelling-slot { width:38px; height:50px; border-radius:10px; font-size:23px; }
  .spelling-slot.is-gap { width:14px; }
  .spelling-word { gap:6px; min-height:80px; }
  .spelling-prompt { margin-bottom:20px; }
  .spelling-wordcard-speak { margin-left:0; }
  .spelling-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .spelling-word-card { flex-wrap:wrap; }
  .spelling-word-card-actions { flex-direction:row; width:100%; justify-content:flex-end; }
  .spelling-diff-label { min-width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  .spelling-page *, .spelling-page *::before, .spelling-page *::after { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  .spelling-confetti { display:none; }
}
@media (forced-colors:active) {
  .spelling-slot::after { background:CanvasText; }
  .spelling-slot.is-wrong { color:CanvasText; }
  .spelling-word:focus-within .spelling-slot.is-current::after { background:Highlight; }
}
