/* Keep recognition actions in normal flow, outside the flipping faces. */
.rc-vocab-flip>.rc-vocab-front-actions{position:static;width:100%;margin:12px 0 0;padding-top:0;box-sizing:border-box}
.rc-vocab-source{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.rc-vocab-front-word{max-width:100%;min-width:0}
.rc-vocab-front-word h3{max-width:100%;overflow-wrap:anywhere}
@media(max-width:640px){.rc-vocab-front{padding-bottom:24px}.rc-vocab-front-word h3{font-size:clamp(26px,8vw,44px)}}

/* Result comparison uses one shared column grid for both rows. */
.rc-spell-comparison{width:100%;min-width:0;color:var(--rc-ink)}
.rc-spell-status{font-weight:800;color:#92400e;margin:8px 0}.rc-spell-status.is-correct{color:#087648}
.rc-spell-legend{font-size:12px;color:var(--rc-muted);margin:8px 0}
.rc-spell-scroll{max-width:100%;overflow-x:auto;padding:8px 0 12px;overscroll-behavior-x:contain}
.rc-spell-table{width:max-content;min-width:100%;display:grid;gap:8px}
.rc-spell-compare-row{display:grid;grid-template-columns:80px repeat(var(--spell-columns),30px);gap:4px;align-items:center;justify-content:center}
.rc-spell-row-label{text-align:left;font-size:13px;font-weight:700;color:var(--rc-ink)}
.rc-spell-letter{display:flex;align-items:center;justify-content:center;min-height:38px;border-radius:4px;font:700 23px/1.2 monospace;color:var(--rc-ink);border-bottom:2px solid transparent}
.rc-spell-letter.is-given{color:#64748b;background:#e7edf0}
.rc-spell-letter.is-correct{color:#087648;background:#e4f4eb;border-color:#087648}
.rc-spell-letter.is-wrong,.rc-spell-letter.is-missing{color:#b42318;background:#fff0ee;border-color:#b42318}
.rc-spell-letter.is-unanswered{color:#64748b;background:#f1f5f9}
.rc-spell-letter.is-answer-change{color:#14532d;background:#d8f1de}
@media(max-width:640px){.rc-spell-compare-row{grid-template-columns:72px repeat(var(--spell-columns),27px);gap:3px}.rc-spell-letter{font-size:21px}.rc-vocab-spelling-panel{min-width:0}}

/* Result face determines card height, including comparison and actions. */
.rc-vocab-flip.has-spelling-result .rc-vocab-card-inner{min-height:0}
.rc-vocab-flip.has-spelling-result .rc-vocab-front{position:relative;inset:auto;min-height:520px}

/* Continuous word: prefix and editable letters share one baseline. */
.rc-vocab-spelling-panel{--spell-width:32px;--spell-size:34px}
.rc-spell-input-scroll{max-width:100%;width:100%;overflow-x:auto;padding:8px 0}
.rc-vocab-spelling-cells{display:flex;flex-wrap:nowrap;gap:0;width:max-content;min-width:100%;justify-content:center;align-items:baseline}
.rc-spell-given-input,.rc-vocab-spelling-cell{box-sizing:border-box;flex:0 0 var(--spell-width);width:var(--spell-width);min-width:var(--spell-width);height:48px;padding:0;border-radius:0;font:600 var(--spell-size)/48px monospace;text-align:center;letter-spacing:0;color:var(--rc-ink);background:transparent}
.rc-vocab-spelling-cell{border:0;border-bottom:2px solid #63999e;box-shadow:none}
.rc-vocab-spelling-cell:focus{outline:none;border-bottom-color:#007f86;background:transparent;box-shadow:0 2px 0 #007f86}
.rc-spell-given-input{border:0}
.rc-spell-compare-row{grid-template-columns:repeat(var(--spell-columns),var(--spell-width));gap:0}
.rc-spell-row-label{grid-column:1/-1;text-align:center;font-size:12px;font-weight:400;color:#526b70;margin:4px 0}
.rc-spell-letter{height:48px;min-height:48px;font:600 var(--spell-size)/48px monospace;border:0;border-radius:0;background:transparent!important}
.rc-spell-letter.is-given,.rc-spell-letter.is-answer,.rc-spell-letter.is-answer-change{color:var(--rc-ink)}
.rc-spell-status{font-size:13px;font-weight:600}
@media(max-width:640px){.rc-vocab-spelling-panel{--spell-width:24px;--spell-size:27px}.rc-spell-compare-row{grid-template-columns:repeat(var(--spell-columns),var(--spell-width));gap:0}.rc-vocab-spelling-cells{gap:0}.rc-vocab-spelling-cell{width:var(--spell-width);height:44px;font-size:var(--spell-size)}}
/* Separate each writable letter with an explicit short underline. */
.rc-vocab-spelling-cell{border-bottom:0!important;border-radius:0;background-image:linear-gradient(#527f85,#527f85)!important;background-position:center calc(100% - 5px)!important;background-size:calc(100% - 7px) 2px!important;background-repeat:no-repeat!important;box-shadow:none!important}
.rc-vocab-spelling-cell:focus{background-image:linear-gradient(#007f86,#007f86)!important;outline:none;box-shadow:none!important}

.rc-vocab-pos{font-size:.55em;font-weight:500;color:#486970;white-space:nowrap}
.rc-vocab-return-front{align-self:center;margin-top:24px;padding:10px 18px;border:1px solid #7fa6aa;background:transparent;color:var(--rc-ink);cursor:pointer;font:600 14px/1.4 sans-serif}

.rc-vocab-pos-recognition{font-size:15px;margin:0;line-height:1.4;font-weight:500}
