.table-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:22px}.back-link{display:block;margin-bottom:20px;color:var(--muted);font-size:12px;font-weight:700;text-decoration:none}.table-title h1{margin:0;font-size:clamp(28px,4vw,46px);letter-spacing:-.04em}.table-actions{display:flex;gap:8px}.table-card{overflow:hidden}.table-scroll{position:relative;overflow:auto;min-height:300px}table{width:100%;min-width:920px;border-collapse:collapse;table-layout:fixed}thead{position:sticky;top:0;z-index:5;background:#f1f3f6}th{height:42px;padding:0 13px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);color:var(--muted);font-size:10px;letter-spacing:.07em;text-align:left;text-transform:uppercase}td{height:48px;padding:7px 13px;border-right:1px solid #edf0f3;border-bottom:1px solid #edf0f3;color:#4f5665;font-size:12px}tr:hover td{background:#fafbfc}tr.selected td{background:#f0f5fa}.check-cell{width:48px;text-align:center}td.check-cell{position:relative;padding:0;cursor:pointer}.check-cell-control{position:absolute;inset:0;display:grid;place-items:center;cursor:pointer}.check-cell-control input{cursor:pointer}.id-cell{width:66px;text-align:center}.word-cell{width:190px}.known-cell{width:110px}.phonetic-cell{width:180px;text-align:center}.note-cell{width:64px;text-align:center}.word-button,.known-button,.phonetic-button,.note-button{border:0;background:transparent;cursor:pointer}.word-button{color:var(--ink);font-size:14px;font-weight:800}.known-button{padding:5px 8px;border-radius:7px;color:var(--muted);font-size:11px}.known-button.active{background:#edf7f0;color:#267241}.meaning-cell{transition:color .3s,filter .3s}.meaning-cell.known{color:#cbd5e1;font-style:italic;text-decoration:none;filter:blur(4px)}.phonetic-button{color:var(--sub);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.note-button{color:var(--sub);font-size:17px}.table-loading{position:absolute;inset:42px 0 0;display:grid;place-items:center;background:rgba(255,255,255,.82);color:var(--muted);font-size:13px}.pagination-bar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:14px 18px;border-top:1px solid var(--line);background:#fafbfc;color:var(--muted);font-size:11px}.pagination-bar label{display:flex;align-items:center;gap:7px}.pagination-bar select,.page-jump input{height:31px;padding:0 8px}.pagination{display:flex;align-items:center;justify-content:center;gap:4px}.pagination button,.page-jump button{height:31px;min-width:31px;padding:0 8px;border:1px solid var(--line);border-radius:6px;background:#fff;color:var(--muted);cursor:pointer}.pagination button.active{border-color:var(--ink);background:var(--ink);color:#fff}.pagination button:disabled{opacity:.35;cursor:not-allowed}.page-jump{display:flex;justify-content:flex-end;gap:5px}.page-jump input{width:58px}.table-summary{display:flex;gap:22px;padding:10px 18px;border-top:1px solid var(--line);color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.06em}.detail-word,.study-word{margin:0;font-size:34px;letter-spacing:-.03em}.detail-phonetic{color:var(--muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.detail-meaning,.study-meaning{margin:18px 0;padding:16px;border-left:3px solid var(--sub);background:var(--soft);line-height:1.75}.detail-example{margin-top:10px;padding:11px 13px;border:1px solid var(--line);border-radius:8px;line-height:1.6}.detail-example small{display:block;margin-top:3px;color:var(--muted)}.study-dialog{text-align:center}.study-controls{display:flex;justify-content:center;gap:8px}
@media(max-width:760px){.table-heading{align-items:flex-start;flex-direction:column}.pagination-bar{grid-template-columns:1fr}.pagination-bar label,.page-jump{justify-content:center}.table-summary{overflow:auto;white-space:nowrap}}
.pagination-bar .page-size-control{display:inline-flex;align-items:center;gap:9px;width:max-content}.select-wrap{position:relative;display:inline-flex}.page-size-control select{-webkit-appearance:none;appearance:none;min-width:76px;height:34px;padding:0 36px 0 12px;border:1px solid #d8dde5;border-radius:9px;background:#fff;color:var(--ink);font-weight:700;cursor:pointer;transition:border-color .18s,box-shadow .18s,background-color .18s}.select-chevron{position:absolute;top:50%;right:11px;width:16px;height:16px;color:#737c89;pointer-events:none;transform:translateY(-50%)}.page-size-control select:hover{border-color:#aeb7c3;background-color:#fff}.page-size-control select:focus{border-color:#899bad;box-shadow:0 0 0 3px rgba(75,100,126,.12)}.page-size-control select:focus+.select-chevron{color:var(--ink)}.page-size-control select::-ms-expand{display:none}
.table-heading{align-items:center}.table-title{text-align:right}.table-title h2{margin:0;font-size:clamp(24px,3vw,38px);letter-spacing:-.035em}@media(max-width:760px){.table-heading{align-items:flex-start}.table-title{text-align:left}}
.known-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:76px;border:1px solid #dfe3e8;background:#f3f4f6;transition:border-color .18s,background-color .18s,color .18s}.known-button:hover{border-color:#c6ccd4}.known-button.active{border-color:#cfe5d5;background:#edf7f0}.known-button .lucide-icon{flex:none}.phonetic-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:30px;padding:4px 8px;border-radius:6px;transition:background-color .18s,color .18s}.phonetic-button:hover{background:#f5f8fb;color:#526171}.phonetic-button .lucide-icon{flex:none;color:#b2bac5;transition:color .18s}.phonetic-button:hover .lucide-icon,.phonetic-button.playing .lucide-icon{color:#38a7d8}.phonetic-button.playing{background:#f1f9fd;color:#4e6675}.note-button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;color:#c0c6cf;transition:background-color .18s,color .18s}.note-button:hover{background:#f3f4f6;color:#8b96a5}.note-button.active{color:#3b82f6}.note-button.active:hover{background:#eff6ff;color:#2563eb}
.phonetic-button,.detail-phonetic{font-family:"Noto Sans","Segoe UI",sans-serif;font-weight:500;letter-spacing:.03em}.phonetic-button{font-size:13px}
.table-title{display:flex;align-items:center;justify-content:flex-end;gap:9px}.table-title h3{margin:0;color:var(--ink);font-size:clamp(18px,2vw,24px);line-height:1.25;letter-spacing:-.02em}.ai-settings-button{display:grid;width:32px;height:32px;flex:0 0 auto;place-items:center;border:1px solid transparent;border-radius:8px;background:transparent;color:#a5adb8;cursor:pointer}.ai-settings-button svg{width:16px;height:16px}.ai-settings-button:hover,.ai-settings-button:focus-visible{border-color:var(--line);background:#fff;color:var(--ink);outline:none}.word-cell-inner{display:flex;align-items:center;justify-content:space-between;gap:7px}.word-button{min-width:0;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.word-ai-button{display:grid;width:28px;height:28px;flex:0 0 auto;place-items:center;border:0;border-radius:999px;background:transparent;color:#c0c7d0;cursor:pointer;opacity:0;transform:translateX(-3px);transition:opacity .18s,transform .18s,background-color .18s,color .18s}.word-ai-button:hover,.word-ai-button:focus-visible{background:#eaf4ff;color:#3478c7;outline:none}.word-cell-inner:hover .word-ai-button,.word-cell-inner:focus-within .word-ai-button{opacity:1;transform:none}.ai-settings-dialog{padding:26px 28px 24px}.ai-settings-heading{display:grid;grid-template-columns:42px 1fr;align-items:center;gap:13px;padding-right:36px;margin-bottom:24px}.ai-settings-heading h2{margin:0;font-size:19px;letter-spacing:-.02em}.ai-settings-heading p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.55}.ai-settings-mark{display:grid;width:42px;height:42px;place-items:center;border-radius:11px;background:#eef5fb;color:#58748f}.ai-settings-mark svg{width:20px;height:20px}.ai-settings-form{display:grid;gap:17px}.ai-field{display:grid;gap:7px;color:var(--sub);font-size:12px;font-weight:750}.ai-field-title{display:flex;align-items:center;justify-content:space-between}.ai-field code{padding:2px 6px;border-radius:5px;background:#eef2f6;color:#54708b;font-family:"SFMono-Regular",Consolas,monospace;font-size:10px}.ai-field input{width:100%;height:41px;padding:0 11px}.ai-field textarea{min-height:96px;margin:0;padding:11px 12px;line-height:1.65}.ai-field small{color:var(--muted);font-size:10px;font-weight:500}.ai-switch-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 14px;border:1px solid var(--line);border-radius:10px;background:#fafbfc;cursor:pointer}.ai-switch-row strong,.ai-switch-row small{display:block}.ai-switch-row strong{font-size:12px}.ai-switch-row small{margin-top:3px;color:var(--muted);font-size:10px}.ai-switch-row input{position:relative;width:38px;height:22px;flex:0 0 auto;margin:0;border:0;border-radius:999px;background:#c7cdd5;box-shadow:none;appearance:none;cursor:pointer;transition:background-color .18s}.ai-switch-row input::after{position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(20,24,36,.25);content:"";transition:transform .18s}.ai-switch-row input:checked{background:#607b96}.ai-switch-row input:checked::after{transform:translateX(16px)}.ai-switch-row input:focus-visible{outline:3px solid rgba(75,100,126,.18);outline-offset:2px}.ai-settings-actions{display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:8px;padding-top:4px}@media(hover:none){.word-ai-button{opacity:.48;transform:none}}@media(max-width:760px){.table-title{justify-content:flex-start}.ai-settings-dialog{padding:23px 20px}.ai-settings-actions{grid-template-columns:auto 1fr}.ai-settings-actions span{display:none}.ai-settings-actions .button.secondary{grid-column:1}.ai-settings-actions .button.primary{grid-column:2;grid-row:2}.ai-settings-actions .button.ghost{grid-column:1/-1;justify-self:start}}
.study-dialog{width:min(460px,calc(100vw - 32px));padding:34px 32px 30px}.study-dialog #studyBody{display:flex;flex-direction:column;align-items:center}.study-progress{margin-bottom:12px}.study-word{font-size:clamp(34px,7vw,46px);line-height:1.1}.study-phonetic-button{gap:8px;margin-top:11px;padding:7px 12px;border:1px solid transparent;border-radius:999px;color:#60758b;font-size:13px}.study-phonetic-button:hover,.study-phonetic-button:focus-visible{border-color:#dbe4ec;background:#f5f8fb;color:#38536c;outline:none}.study-speaker-icon{display:grid;width:18px;height:18px;flex:0 0 auto;place-items:center;transform-origin:center}.study-phonetic-button.playing .study-speaker-icon{color:#38a7d8;animation:study-speaker-pulse .65s ease-in-out infinite}.study-meaning-reveal{position:relative;width:100%;min-height:126px;margin:27px 0 23px;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--soft);cursor:pointer;outline:none}.study-meaning-reveal:focus-visible{border-color:#899bad;box-shadow:0 0 0 3px rgba(75,100,126,.12)}.study-meaning-reveal .study-meaning{display:grid;min-height:124px;margin:0;padding:20px;place-items:center;border:0;background:transparent;color:var(--ink);font-size:14px;line-height:1.8;white-space:pre-line}.study-meaning-cover{position:absolute;inset:0;display:grid;place-items:center;padding:18px;background:rgba(241,244,247,.64);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:#718096;font-size:12px;font-weight:700;letter-spacing:.03em;transition:opacity .2s,visibility .2s,backdrop-filter .2s}.study-meaning-reveal:hover .study-meaning-cover,.study-meaning-reveal:focus .study-meaning-cover,.study-meaning-reveal.revealed .study-meaning-cover{visibility:hidden;opacity:0;backdrop-filter:blur(0);-webkit-backdrop-filter:blur(0)}.study-controls{width:100%}.study-next{width:100%;min-height:42px}.study-next:hover{transform:translateY(-1px)}@keyframes study-speaker-pulse{0%,100%{transform:scale(.9);opacity:.68}50%{transform:scale(1.14);opacity:1}}@media(max-width:520px){.study-dialog{padding:30px 20px 22px}.study-meaning-reveal{margin-block:23px 19px}}@media(prefers-reduced-motion:reduce){.study-phonetic-button.playing .study-speaker-icon{animation:none}.study-meaning-cover{transition:none}}
.spelling-dialog{width:min(460px,calc(100vw - 32px));padding:34px 32px 30px}.spelling-dialog #spellingBody{display:flex;flex-direction:column;align-items:stretch}.spelling-progress{align-self:center;margin-bottom:16px}.spelling-meaning{display:grid;min-height:132px;padding:22px;place-items:center;border:1px solid var(--line);border-radius:12px;background:var(--soft);color:var(--ink);font-size:14px;line-height:1.8;text-align:center;white-space:pre-line}.spelling-field{display:grid;gap:9px;margin-top:22px;color:var(--muted);font-size:11px;font-weight:700}.spelling-input{width:100%;height:52px;padding:0 15px;border:1px solid #cfd7e1;border-radius:11px;background:#fff;color:var(--ink);font-size:22px;font-weight:750;letter-spacing:.05em;text-align:center;transition:border-color .16s,background-color .16s,color .16s}.spelling-input:focus{border-color:#899bad;box-shadow:none}.spelling-input.error,.spelling-input.error:focus{border-color:#dc6679;background:#fff1f3;color:#a8243a;box-shadow:none}.spelling-input.correct,.spelling-input.correct:focus,.spelling-input.correct:read-only{border-color:#3fa399;background:#eef8f1;color:#3fa399;box-shadow:none;-webkit-text-fill-color:#3fa399;transition:none}@media(max-width:760px){.table-actions{flex-wrap:wrap}}@media(max-width:520px){.spelling-dialog{padding:30px 20px 22px}.spelling-meaning{min-height:118px;padding:18px}.spelling-input{font-size:19px}}
.spelling-dialog{overflow:visible}.spelling-dialog .dialog-close{z-index:2}.spelling-dialog #spellingBody{position:relative;z-index:1}.spelling-confetti-canvas{position:fixed;inset:0;z-index:10;width:100vw;height:100vh;pointer-events:none}.spelling-complete{display:grid;min-height:310px;place-items:center;align-content:center;padding:20px 8px 4px;text-align:center;animation:spelling-complete-enter .4s ease-out both}.spelling-complete-mark{position:relative;display:grid;width:76px;height:76px;place-items:center;border-radius:50%;background:#eef8f1;color:#3fa399;box-shadow:0 12px 30px rgba(63,163,153,.18);animation:spelling-complete-pop .62s cubic-bezier(.2,.8,.2,1.25) both}.spelling-complete-mark::after{position:absolute;inset:-8px;border:1px solid rgba(63,163,153,.24);border-radius:50%;content:"";animation:spelling-complete-ring .8s ease-out .12s both}.spelling-complete h2{margin:24px 0 0;color:var(--ink);font-size:24px;letter-spacing:-.025em}.spelling-complete p{margin:8px 0 24px;color:var(--muted);font-size:13px}.spelling-complete-button{width:100%;min-height:42px}@keyframes spelling-complete-enter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes spelling-complete-pop{0%{opacity:0;transform:scale(.62) rotate(-8deg)}70%{opacity:1;transform:scale(1.08) rotate(2deg)}100%{opacity:1;transform:scale(1) rotate(0)}}@keyframes spelling-complete-ring{from{opacity:.7;transform:scale(.76)}to{opacity:0;transform:scale(1.25)}}@media(prefers-reduced-motion:reduce){.spelling-complete,.spelling-complete-mark,.spelling-complete-mark::after{animation:none}}
.spelling-game{display:grid;gap:5px;margin:-13px 0 11px}.spelling-game-scene{position:relative;height:136px;overflow:hidden;border:1px solid #e2e7ec;border-radius:12px;background:radial-gradient(circle at 50% 78%,rgba(63,163,153,.12),transparent 38%),linear-gradient(180deg,#f7f9fb 0%,#eef2f5 100%)}.spelling-game-scene::after{position:absolute;right:22px;bottom:12px;left:22px;height:1px;background:linear-gradient(90deg,transparent,#ccd5de 24%,#ccd5de 76%,transparent);content:"";opacity:.8}.spelling-rock-host{position:absolute;top:-5px;left:50%;z-index:1;width:225px;transform:translateX(-50%);transform-origin:50% 58%;will-change:transform}.spelling-rock-svg{display:block;width:100%;height:auto;overflow:visible}.spelling-cannon{position:absolute;bottom:2px;left:8px;z-index:2;width:62px;transform-origin:27px 43px;will-change:transform}.spelling-cannon svg{display:block;width:100%;height:auto}.spelling-cannonball{position:absolute;bottom:34px;left:49px;z-index:4;display:block;width:19px;height:19px;opacity:0;filter:drop-shadow(0 3px 3px rgba(26,26,46,.28));pointer-events:none;will-change:opacity,transform}.spelling-cannonball svg{display:block;width:100%;height:100%}.spelling-cannonball::after{position:absolute;top:7px;left:-13px;width:15px;height:5px;border-radius:999px;background:linear-gradient(90deg,transparent,rgba(246,196,83,.75));content:"";opacity:0;filter:blur(1px)}.spelling-cannonball.active::after{opacity:1}.spelling-game-meter{display:flex;align-items:center;gap:9px;color:#778291;font-size:9px;font-weight:800;letter-spacing:.04em}.spelling-game-meter-label{min-width:66px}.spelling-game-meter-track{height:5px;flex:1;overflow:hidden;border-radius:999px;background:#e4e9ee}.spelling-game-meter-fill{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#3fa399,#64beb1);transition:width .28s ease}.spelling-game.broken .spelling-game-meter-fill{background:#f6c453}@media(max-width:520px){.spelling-game{margin-top:-9px}.spelling-game-scene{height:126px}.spelling-rock-host{width:208px}.spelling-cannon{width:56px}.spelling-cannonball{bottom:31px;left:44px;width:18px;height:18px}}
.spelling-dialog #spellingBody{min-height:390px}.spelling-phaser-layer{position:absolute;inset:0;z-index:3;overflow:hidden;border-radius:12px;pointer-events:none}.spelling-phaser-layer canvas{display:block;width:100%!important;height:100%!important;pointer-events:none}.spelling-game-viewport{position:relative;z-index:0;height:150px;flex:0 0 auto;margin:-13px 0 10px;overflow:hidden;border:1px solid #e2e7ec;border-radius:12px;background:radial-gradient(circle at 50% 70%,rgba(246,196,83,.13),transparent 28%),radial-gradient(circle at 50% 88%,rgba(63,163,153,.14),transparent 42%),linear-gradient(180deg,#f8fafc 0%,#edf2f5 100%)}.spelling-game-viewport::after{position:absolute;right:22px;bottom:15px;left:22px;height:1px;background:linear-gradient(90deg,transparent,#c7d1db 22%,#c7d1db 78%,transparent);content:"";opacity:.82}.spelling-progress,.spelling-meaning,.spelling-field{position:relative;z-index:1}.spelling-progress{margin-bottom:10px}.spelling-meaning{min-height:78px;padding:14px 18px}.spelling-field{gap:9px;margin-top:14px;cursor:text}.spelling-letter-slots{display:flex;min-height:54px;align-items:center;justify-content:center;gap:6px;padding:7px 9px;border:1px solid #cfd7e1;border-radius:11px;background:#fff;transition:border-color .16s,background-color .16s}.spelling-field:focus-within .spelling-letter-slots{border-color:#899bad}.spelling-letter-slot{position:relative;display:grid;width:29px;height:38px;flex:0 0 auto;place-items:center;border-bottom:2px solid #cad2dc;color:#263447;font-size:21px;font-weight:800;line-height:1;text-transform:none;transition:border-color .14s,color .14s,background-color .14s,transform .14s}.spelling-letter-slot.current{border-bottom-color:#607b96;background:#f4f7fa}.spelling-letter-slot.filled{border-bottom-color:#3fa399;background:#eef8f6;color:#277d75}.spelling-letter-slot.wrong{border-bottom-color:#dc6679;background:#fff0f2;color:#b52d45}.spelling-letter-slot.hit{animation:spelling-letter-hit .2s ease-out}.spelling-letter-slots.compact{gap:4px}.spelling-letter-slots.compact .spelling-letter-slot{width:23px;font-size:18px}.spelling-letter-slots.very-compact{gap:2px;padding-inline:5px}.spelling-letter-slots.very-compact .spelling-letter-slot{width:18px;font-size:15px}.spelling-keyboard-input{position:absolute;width:1px;height:1px;padding:0;border:0;opacity:0;pointer-events:none}.spelling-field.error .spelling-letter-slots{border-color:#dc6679;background:#fff7f8;animation:spelling-field-error .24s ease-out}.spelling-field.error .spelling-letter-slot.current{border-bottom-color:#dc6679;background:#fff0f2}.spelling-field-label{user-select:none}@keyframes spelling-letter-hit{0%{transform:translateY(0) scale(1)}45%{transform:translateY(2px) scale(.88)}100%{transform:translateY(0) scale(1)}}@keyframes spelling-field-error{0%,100%{transform:translateX(0)}30%{transform:translateX(-4px)}65%{transform:translateX(4px)}}@media(max-width:520px){.spelling-dialog #spellingBody{min-height:372px}.spelling-game-viewport{height:136px;margin-top:-9px}.spelling-letter-slots{gap:4px;padding-inline:5px}.spelling-letter-slot{width:25px;height:36px;font-size:19px}.spelling-letter-slots.compact .spelling-letter-slot{width:20px;font-size:16px}.spelling-letter-slots.very-compact .spelling-letter-slot{width:16px;font-size:14px}}@media(prefers-reduced-motion:reduce){.spelling-letter-slot.hit,.spelling-field.error .spelling-letter-slots{animation:none}}
.study-phonetic-button.playing .study-speaker-icon{animation:none}
.svg-icon-defs{position:absolute;width:0;height:0;overflow:hidden}
.button.secondary.spelling-action{border-color:#3fa399;color:#3fa399}.button.secondary.spelling-action:hover:not(:disabled){border-color:#3fa399;background:#f0f9f8;color:#3fa399}
#studySelected:hover:not(:disabled),#spellSelected:hover:not(:disabled),#openImport:hover:not(:disabled){transform:none}

/* Phaser 拼写战斗 */
.spelling-dialog{width:min(560px,calc(100vw - 28px));max-width:560px;height:calc(100dvh - 24px);max-height:none;padding:22px 24px 24px;overflow:hidden;border-radius:18px}
.spelling-dialog:focus{outline:none}
.spelling-dialog .dialog-close{top:10px;right:7px;z-index:8;display:grid;width:26px;height:26px;place-items:center;padding:0;border:0;background:transparent}

.note-dialog{width:min(760px,calc(100vw - 32px));height:min(590px,calc(100vh - 32px));padding:0;overflow:hidden}
.note-dialog[open]{display:flex;flex-direction:column}
.note-dialog .dialog-close{top:14px;right:14px;z-index:5}
.note-dialog-heading{display:flex;flex:0 0 auto;align-items:center;gap:11px;padding:14px 54px 13px 18px;border-bottom:1px solid var(--line);background:#fafbfc}
.note-dialog-heading h2{margin:0;font-size:15px;line-height:1.25}
.note-dialog-heading p{margin:3px 0 0;color:var(--muted);font-size:10px}
.note-dialog-mark{display:grid;width:32px;height:32px;flex:0 0 auto;place-items:center;border-radius:8px;background:#eaf3ff;color:#3478c7}
.note-dialog-mark svg{width:16px;height:16px}
.note-editor-shell{display:flex;min-height:0;flex:1;padding:14px 18px;background:#fff}
.note-editor-shell>textarea{min-height:320px}
.note-dialog .EasyMDEContainer{display:flex;min-width:0;min-height:0;flex:1;flex-direction:column}
.note-dialog .editor-toolbar{flex:0 0 auto;padding:5px 7px;border-color:var(--line);border-radius:9px 9px 0 0;background:#fafbfc}
.note-dialog .editor-toolbar button{width:30px;height:30px;margin:0 1px;border:0;border-radius:6px;color:#667085;font-size:13px;line-height:30px}
.note-dialog .editor-toolbar button:hover,.note-dialog .editor-toolbar button.active{border:0;background:#edf2f7;color:var(--ink)}
.note-dialog .editor-toolbar button.bold,.note-dialog .editor-toolbar button.heading{font-weight:850}
.note-dialog .editor-toolbar button.italic{font-family:Georgia,serif;font-style:italic}
.note-dialog .editor-toolbar button.strikethrough{text-decoration:line-through}
.note-dialog .editor-toolbar button.code{font-size:10px}
.note-dialog .editor-toolbar i.separator{height:22px;margin:4px 5px;border-left-color:#d8dde4;border-right:0}
.note-dialog .CodeMirror{min-height:0;flex:1;border-color:var(--line);border-radius:0 0 9px 9px;color:var(--ink);font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;font-size:13px;line-height:1.65}
.note-dialog .CodeMirror-scroll{min-height:100%}
.note-dialog .editor-preview{padding:22px 24px;background:#fff;color:#3f4754;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:14px;line-height:1.75}
.note-dialog .editor-preview h1,.note-dialog .editor-preview h2,.note-dialog .editor-preview h3{color:var(--ink);line-height:1.35}
.note-dialog .editor-preview blockquote{margin:16px 0;padding:3px 14px;border-left:3px solid #9eb6cb;color:var(--muted)}
.note-dialog .editor-preview code{padding:2px 5px;border-radius:4px;background:#f0f3f6;font-family:"SFMono-Regular",Consolas,monospace;font-size:.9em}
.note-dialog .editor-preview pre{padding:13px 15px;overflow:auto;border-radius:8px;background:#f4f6f8}
.note-dialog .editor-preview pre code{padding:0;background:transparent}
.note-dialog .editor-preview table{width:100%;min-width:0;table-layout:auto}
.note-dialog .editor-preview th,.note-dialog .editor-preview td{height:auto;padding:8px 10px;border:1px solid var(--line);font-size:12px}
.note-dialog .editor-preview a{color:#2563a9}
.note-dialog-footer{display:flex;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:8px;padding:11px 18px;border-top:1px solid var(--line);background:#fff}
.note-character-count{margin-right:auto;color:var(--muted);font-family:"SFMono-Regular",Consolas,monospace;font-size:10px}
.note-character-count .over-limit{color:var(--danger);font-weight:800}
.note-preview-mode .editor-toolbar{display:none}
.note-preview-mode .CodeMirror{border-radius:9px}
@media(max-width:640px){.note-dialog{height:calc(100vh - 16px);width:calc(100vw - 16px);max-height:none}.note-dialog-heading{padding-left:14px}.note-editor-shell{padding:10px}.note-dialog-footer{padding:9px 10px}.note-dialog .editor-preview{padding:18px 16px}}
.ai-unsaved-dialog{width:min(420px,calc(100vw - 32px));padding:26px}
.ai-unsaved-dialog h2{margin:0;color:var(--ink);font-size:17px;line-height:1.55}
.ai-unsaved-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}
.id-cell{width:52px}
.word-cell{padding-right:7px;padding-left:7px}
.word-button{flex:1;overflow:visible;overflow-wrap:anywhere;line-height:1.35;text-overflow:clip;white-space:normal;word-break:normal}
.word-ai-button{transform:none;transition:opacity .18s,background-color .18s,color .18s}
.known-cell{width:92px;padding-right:7px;padding-left:7px;text-align:center}
.known-button{width:70px;min-width:0;padding:5px;gap:4px}
.spelling-dialog #spellingBody{display:flex;height:100%;min-height:0;flex-direction:column}
.spelling-battle-header{position:relative;z-index:4;display:flex;min-height:36px;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:-10px;padding-right:34px}
.spelling-battle-header .spelling-progress{align-self:center;margin:0}
.spelling-header-lead{display:flex;min-width:0;min-height:30px;align-items:center;gap:9px}
.spelling-header-lead>.spelling-progress{display:inline-flex;min-height:30px;align-items:center;margin:0;line-height:1}
.spelling-practice-switch{display:inline-flex;padding:2px;border:1px solid #dfe5eb;border-radius:8px;background:#f6f8fa}
.spelling-practice-switch button{min-height:24px;padding:3px 7px;border:0;border-radius:6px;background:transparent;color:#87919d;font-size:9px;font-weight:800;cursor:pointer}
.spelling-practice-switch button:hover{color:#34495f}
.spelling-practice-switch button.active{background:#fff;color:#34495f;box-shadow:0 1px 3px rgba(22,38,56,.11)}
.spelling-practice-switch button:focus-visible{outline:2px solid rgba(63,163,153,.3);outline-offset:1px}
.spelling-mode-area{--spelling-setting-height:30px;--spelling-setting-font-size:9px;position:relative;display:flex;align-items:center;justify-content:flex-end;gap:6px}
.spelling-mode-switch-wrap{position:relative;display:flex}
.spelling-mode-switch{display:inline-flex;height:var(--spelling-setting-height);padding:2px;border:1px solid #d9e1e9;border-radius:8px;background:#f2f5f8}
.spelling-mode-switch button{height:24px;min-height:24px;padding:3px 7px;border:0;border-radius:6px;background:transparent;color:#778392;font-size:var(--spelling-setting-font-size);font-weight:800;cursor:pointer}
.spelling-mode-switch button:hover{color:#34495f}
.spelling-mode-switch button.active{background:#fff;color:#277d75;box-shadow:0 1px 4px rgba(22,38,56,.12)}
.spelling-mode-switch button:focus-visible{outline:2px solid rgba(63,163,153,.3);outline-offset:1px}
.spelling-mode-hint{position:absolute;top:37px;right:2px;width:max-content;color:#c2792d;font-size:9px;font-weight:700}
.spelling-enemy-button{display:grid;width:30px;height:var(--spelling-setting-height);min-height:var(--spelling-setting-height);place-items:center;padding:0;border:0;border-radius:8px;background:transparent;color:#778392;cursor:pointer}
.spelling-enemy-button:hover{background:#f2f5f8;color:#34495f}
.spelling-enemy-button:focus-visible{outline:2px solid rgba(63,163,153,.3);outline-offset:1px}
.spelling-enemy-button.customized{color:#277d75}
.spelling-game-viewport{position:relative;width:100%;height:auto;min-height:220px;flex:1 1 auto;margin:8px 0 13px;overflow:hidden;border:0;border-radius:14px;background:#081523;box-shadow:inset 0 0 0 1px #18364d,inset 0 0 45px rgba(47,203,193,.06),0 10px 24px rgba(16,35,52,.1)}
.spelling-game-viewport::after{display:none}
.spelling-phaser-layer{inset:0;width:100%;height:100%;aspect-ratio:auto;z-index:1;display:grid;overflow:hidden;place-items:center;border-radius:13px;transform:none}
.spelling-phaser-layer canvas{width:100%!important;height:100%!important;max-width:none;max-height:none;margin:0!important;object-fit:fill}
.spelling-battle-controls{position:relative;z-index:4;width:min(920px,100%);flex:0 0 auto;margin:0 auto}
.spelling-battle-controls .spelling-meaning{min-height:86px;padding:14px 18px;border-color:#dfe5eb;background:#f5f7f9;font-size:13px;line-height:1.65}
.spelling-battle-controls .spelling-field{margin-top:12px;cursor:default}
.spelling-battle-controls .spelling-letter-slots{min-height:52px;cursor:default;user-select:none}
.spelling-field.error .spelling-letter-slots{animation:none}
.spelling-dialog .spelling-complete{min-height:0;flex:1}
.spelling-dialog.spelling-focus-mode{width:min(460px,calc(100vw - 32px));max-width:460px;height:min(416px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);padding:26px 28px 28px;overflow:visible}
.spelling-dialog.spelling-focus-mode #spellingBody{display:grid;height:auto;min-height:360px;grid-template-rows:auto minmax(0,1fr) auto}
.spelling-focus-header{display:flex;min-height:30px;align-items:center;margin:-12px 0 0;padding-right:34px}
.spelling-focus-header .spelling-progress{align-self:center;margin:0}
.spelling-focus-mode .spelling-meaning{width:100%;min-height:148px;align-self:center;padding:24px}
.spelling-focus-mode .spelling-meaning>span{display:-webkit-box;max-width:100%;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3}
.spelling-focus-mode .spelling-field{width:100%;align-self:end;margin-top:0}
.spelling-enemy-dialog.web-dialog{position:fixed;width:min(430px,calc(100vw - 32px));height:min(440px,calc(100dvh - 64px));padding:54px 28px 24px;overflow:hidden}
.spelling-enemy-dialog[data-web-dialog-open]{display:flex;flex-direction:column}
.spelling-settings-tabs{position:absolute;top:15px;left:50%;display:grid;width:min(220px,calc(100% - 92px));grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:2px;border:1px solid #dfe5eb;border-radius:9px;background:#f6f8fa;transform:translateX(-50%)}
.spelling-settings-tabs button{min-height:28px;padding:0 9px;border:0;border-radius:6px;background:transparent;color:#8994a0;font-size:11px;font-weight:750;cursor:pointer}
.spelling-settings-tabs button.active{background:#fff;color:#277d75;box-shadow:0 1px 3px rgba(32,49,67,.12)}
.spelling-settings-tabs button:focus-visible{outline:2px solid rgba(63,163,153,.3);outline-offset:1px}
.spelling-enemy-form{display:grid;min-height:0;flex:1 1 auto;grid-template-rows:minmax(0,1fr) auto;gap:14px;margin:0}
.spelling-settings-panel{display:grid;min-height:0;align-items:center;overflow:hidden;padding:2px}
.spelling-settings-panel>[hidden]{display:none!important}
.spelling-enemy-settings-section{display:grid;width:100%;gap:16px}
.spelling-enemy-avatar-control{display:grid;justify-items:center;gap:6px}
.spelling-enemy-preview{display:grid;width:76px;height:76px;overflow:hidden;place-items:center;border:3px solid #fff;border-radius:50%;background:linear-gradient(145deg,#344b61,#172a3c);color:#eefbff;box-shadow:0 0 0 1px #cbd6df,0 10px 28px rgba(31,51,70,.18);font-size:28px;font-weight:850}
.spelling-enemy-preview img{display:block;width:100%;height:100%;object-fit:cover}
.spelling-enemy-preview svg{display:block}
.spelling-enemy-upload{position:relative;min-width:100px;overflow:hidden}
.spelling-enemy-upload.loading{cursor:wait;opacity:.6;pointer-events:none}
.spelling-enemy-upload.loading span::after{content:"…"}
.spelling-enemy-avatar-control>small{color:var(--muted);font-size:10px}
.spelling-enemy-name-field{position:relative;display:grid;gap:7px;color:var(--muted);font-size:11px;font-weight:750}
.spelling-enemy-name-field input{width:100%;height:42px;padding:0 52px 0 12px;font-size:13px}
.spelling-enemy-name-field small{position:absolute;right:12px;bottom:13px;color:#9aa4af;font-size:10px;font-weight:650}
.spelling-difficulty-field{display:grid;width:100%;min-inline-size:0;gap:14px;margin:0;padding:18px 0 0;border:0}
.spelling-difficulty-field>p{margin:0;color:#7c8794;font-size:11px;text-align:center}
.spelling-difficulty-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.spelling-difficulty-options button{display:grid;min-height:54px;place-items:center;align-content:center;gap:3px;padding:7px 6px;border:1px solid #d7dee5;border-radius:8px;background:#fff;color:#6f7b88;cursor:pointer}
.spelling-difficulty-options button:hover{border-color:#aebac5;background:#f7f9fa}
.spelling-difficulty-options button.active{border-color:#7abbb4;background:#eef8f6;color:#277d75;box-shadow:inset 0 0 0 1px rgba(63,163,153,.08)}
.spelling-difficulty-options button:focus-visible{outline:2px solid rgba(63,163,153,.3);outline-offset:1px}
.spelling-difficulty-options button span{font-size:12px;font-weight:800}
.spelling-difficulty-options button small{font-size:9px;font-weight:750;opacity:.78}
.spelling-enemy-actions{display:grid;grid-template-columns:auto 1fr auto auto;gap:8px;align-items:center;margin-top:2px}
.spelling-enemy-actions .button{gap:6px}

@media(max-height:680px) and (min-width:521px){
  .spelling-battle-controls .spelling-meaning{min-height:72px;padding-block:10px}
}

@media(max-width:520px){
  .spelling-dialog{width:calc(100vw - 16px);max-width:none;height:calc(100dvh - 12px);padding:18px 14px 16px;border-radius:14px}
  .spelling-dialog #spellingBody{min-height:0}
  .spelling-battle-header{gap:8px;margin-top:-6px;padding-right:32px}
  .spelling-header-lead{gap:6px}
  .spelling-practice-switch button{padding-inline:6px}
  .spelling-mode-switch button{padding-inline:7px}
  .spelling-enemy-button{width:30px}
  .spelling-game-viewport{height:auto;min-height:180px;margin-top:8px}
  .spelling-battle-controls .spelling-meaning{min-height:78px;padding:11px 13px;font-size:12px}
  .spelling-dialog.spelling-focus-mode{width:calc(100vw - 24px);max-width:460px;height:min(376px,calc(100dvh - 24px));padding:22px 20px 24px}
  .spelling-dialog.spelling-focus-mode #spellingBody{min-height:330px}
  .spelling-focus-header{margin-top:-8px}
  .spelling-enemy-dialog{padding:54px 20px 22px}
}
