/* Same-session history and contextual sentence practice. */
.practice-session-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:10px 0 16px}
.practice-session-actions button,.sentence-practice button{min-height:44px}
.practice-session-note{font-size:12px;color:var(--muted,#68747a);margin:0}
.practice-draft-warning{padding:12px;border:1px solid #aa661b;border-radius:10px;background:#fff8e9;color:#70430c}
.sentence-practice{border:1px solid var(--line,#deddd4);border-radius:14px;padding:16px;margin:0 0 18px;background:#faf9f5}
.sentence-practice-toolbar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center}
.sentence-practice-toolbar label{display:flex;align-items:center;gap:8px;min-height:44px}
.sentence-original{font-size:clamp(24px,4.5vw,38px);line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0}
.sentence-cell{display:inline-flex;flex-direction:column;vertical-align:middle;align-items:center;border-radius:5px;margin:2px}
.sentence-original .sentence-cell{padding:0 4px}
.sentence-cell.is-current{outline:2px solid #357264;background:#e5f1e9}
.sentence-glyph{font-family:HanjaSerif,serif}
.sentence-punctuation{white-space:pre-wrap;align-self:center}
.sentence-comparison{display:flex;flex-wrap:wrap;align-items:flex-start;gap:5px;margin:18px 0;font-size:24px}
.sentence-comparison .sentence-cell{width:82px;max-width:24%;gap:5px;padding:4px}
.practice-ink-cell{display:inline-flex;width:96px;height:96px;max-width:100%;aspect-ratio:1;align-items:center;justify-content:center;vertical-align:middle;border:1px solid #d5dbd8;border-radius:7px;background:#fff}
.practice-ink-cell canvas{display:block;width:100%;height:100%;object-fit:contain}
.sentence-comparison .practice-ink-cell{width:74px;height:74px}
.practice-ink-empty{font:12px sans-serif;color:#77817e}
.practice-review-dialog{width:min(780px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 28px);box-sizing:border-box;padding:0;border-radius:18px;overscroll-behavior:contain}
.practice-review-dialog .dialog-heading{position:sticky;top:0;background:#fff;z-index:1;padding:18px 20px;border-bottom:1px solid #e4e7e4}
.practice-review-dialog .icon-button{min-height:44px;min-width:44px}
.practice-review-dialog .dialog-heading h2{margin:0;font-size:20px}
.practice-review-dialog .dialog-body{padding:16px 20px;overflow-wrap:anywhere}
.practice-review-dialog::backdrop{background:rgb(21 36 31 / .48)}
.practice-history-card{border:1px solid #dedfd8;border-radius:12px;padding:16px;margin:14px 0}
.practice-history-card h3{font-size:30px;line-height:1.7;white-space:pre-wrap;margin:6px 0}
.practice-history-card .eyebrow{margin:0}
@media(max-width:650px){.sentence-practice{padding:12px}.practice-review-dialog .dialog-body{padding:12px}.practice-review-dialog .dialog-heading{padding:12px}.sentence-comparison{gap:2px}.sentence-comparison .sentence-cell{width:70px;padding:2px;max-width:24%}.sentence-comparison .practice-ink-cell{width:66px;height:66px}}

/* Shared horizontal scroll keeps the source and actual ink vertically aligned,
   including punctuation, at every viewport width. It never widens the page. */
.sentence-preview{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;padding:4px 2px 8px}
.sentence-preview .sentence-original,.sentence-preview .sentence-handwriting{display:flex;flex-wrap:nowrap;align-items:center;width:max-content;gap:4px;margin:6px 0;white-space:pre}
.sentence-preview .sentence-cell{flex:none;width:68px;max-width:none;margin:0;padding:2px;box-sizing:border-box}
.sentence-preview .sentence-punctuation{flex:none;width:24px;text-align:center;white-space:pre;font-size:24px}
.sentence-preview .sentence-original .sentence-cell{height:54px;justify-content:center}
.sentence-preview .practice-ink-cell{width:64px;height:64px;box-sizing:border-box}
.sentence-row-label{font-size:13px;font-weight:600;margin:8px 0 0}
.sentence-explanation{border:1px solid var(--line,#deddd4);border-radius:14px;padding:20px;margin-bottom:18px;background:#fffdf8;line-height:1.8}
.sentence-explanation h2{margin-top:0}.sentence-explanation .sentence-reading{color:var(--muted,#68747a)}

.sentence-preview canvas{touch-action:pan-x pan-y;cursor:default}
.sentence-preview:focus-visible{outline:3px solid #cd715d;outline-offset:3px}
