.spell-dialog{box-sizing:border-box;width:min(720px,94vw);max-height:90vh;overflow:auto;border:2px solid #b8cfe7;border-radius:24px;padding:26px;background:#f5f9ff;color:#254460;font-family:inherit}.spell-dialog::backdrop{background:#18314c99}.spell-top,.spell-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}.spell-dialog button{font:inherit;cursor:pointer;border:2px solid #bacfe8;border-radius:14px;padding:12px 18px;background:white;color:#29486b;min-height:48px}.spell-dialog button:focus-visible{outline:3px solid #7540a7;outline-offset:3px}.spell-dialog button:disabled{opacity:.35}.spell-letters,.spell-choices{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0}.spell-letters button{font-size:24px;min-width:48px}.spell-answer{font-size:28px;letter-spacing:3px;overflow-wrap:anywhere;background:white;padding:18px;border-radius:14px;min-height:40px;white-space:pre-wrap}.spell-dialog #spell-feedback{line-height:1.8;margin:20px 0}.spell-dialog #spell-feedback button{display:block;margin-top:16px}.spell-dialog [hidden]{display:none!important}.spell-entry{margin:24px 0}.spell-dialog .primary{background:#7445b5;color:white}.spell-dialog #spell-next{margin-top:12px}@media(max-width:500px){.spell-dialog{padding:18px}.spell-letters{gap:8px}.spell-letters button{padding:8px 12px}.spell-actions{justify-content:flex-start}.spell-answer{font-size:24px}}

.exam-entry-actions{display:flex;flex-wrap:wrap;gap:1cm;align-items:center;margin:24px 0}.spell-dialog .exam-entry-actions button{width:auto;margin:0;flex:0 0 auto}.spell-cell{display:inline-block;min-width:.8em;text-align:center;margin:2px;padding:3px;border-radius:6px;letter-spacing:0}.spell-cell.letter-wrong{color:#a51c30;background:#ffe0e5;border-bottom:3px solid #bc2940}.spell-cell.letter-correct{color:#17653c;background:#def5e7;border-bottom:3px solid #36855c}.spell-dialog .meaning-correct:disabled{opacity:1;background:#dcf5e6;border-color:#308052;color:#175634}.spell-dialog .meaning-wrong:disabled{opacity:1;background:#ffe0e5;border-color:#bc2940;color:#a51c30}.spell-dialog .feedback-good,.spell-dialog .feedback-wrong{padding:16px;border-radius:14px;border:2px solid}.spell-dialog .feedback-good{background:#e0f6e9;color:#195f38;border-color:#73b68e}.spell-dialog .feedback-wrong{background:#fff1db;color:#75461c;border-color:#d9ae72}.spell-success #spell-feedback{animation:spell-celebrate .45s ease-out}.spell-error #spell-feedback{animation:spell-notice .4s ease-out}@keyframes spell-celebrate{0%{transform:scale(.96)}60%{transform:scale(1.025)}100%{transform:scale(1)}}@keyframes spell-notice{0%{transform:translateX(-4px)}40%{transform:translateX(4px)}70%{transform:translateX(-2px)}100%{transform:translateX(0)}}@media(prefers-reduced-motion:reduce){.spell-success #spell-feedback,.spell-error #spell-feedback{animation:none}}
.spell-choice-item{display:flex;flex-direction:column;gap:10px;flex:1 1 150px;min-width:0}.spell-dialog .spell-chinese{font-size:16px;background:#e6f4f3;min-height:48px}.spell-teaching{margin:18px 0;padding:16px;background:white;border-radius:18px}.spell-teaching img{display:block;width:min(100%,260px);aspect-ratio:1;object-fit:contain;margin:0 auto;border-radius:16px}.spell-teaching h2,.spell-teaching p{text-align:center}.exam-notebook{padding-left:22px}.exam-notebook li{margin:16px 0;padding:12px;background:white;border-radius:12px}.spell-dialog #spell-audio-status{min-height:1.4em;font-size:16px;color:#75461c}.spell-dialog .spell-choice-item button{width:100%;margin:0;overflow-wrap:anywhere}@media(max-width:420px){.spell-choice-item{flex-basis:100%}.exam-entry-actions{gap:20px}}
