/* Terminal geometry contract: reserve all transient UI space, never size frames from answers. */
html{scrollbar-gutter:stable}
.shell{--quiz-h:185px;--choice-h:76px;--flash-h:clamp(290px,52dvh,410px);--exam-h:clamp(210px,32dvh,300px);--exam-feedback-h:86px}
.view[data-view=home] .field{flex:none}
.view[data-view=home] .seg button,.view[data-view=home] .mode-grid .mode-tile{font-weight:800;border-width:2px;transform:none!important}
.view[data-view=home] .label,.view[data-view=home] .direction-field.inactive .label{justify-content:center;text-align:center}
.view[data-view=home] .primary{height:63px;min-height:63px;max-height:63px;transform:none!important}
.home-status-slot{height:32px;flex:none;overflow:hidden}.home-status-slot .status{height:22px;margin:8px 0 0;line-height:22px}
.home-record-slot{height:62px;flex:none;overflow:auto}.home-record-slot .record{margin:5px 0 0;min-height:48px;align-content:center}
.view[data-view=home] .credits{margin-top:6px}
.studyhead{height:40px;min-height:40px;max-height:40px;flex:none;overflow:hidden;white-space:nowrap}
.studyhead>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis}.studyhead .streak{margin-left:auto;flex:none}.studyhead strong{flex:none}
.view[data-view=study]:has(.answers){flex:none}
.quizprompt,.quizprompt.en{box-sizing:border-box;height:var(--quiz-h);min-height:var(--quiz-h);max-height:var(--quiz-h);flex:none;padding:38px 14px;overflow:hidden;position:relative}
.quiz-content{display:block;max-width:100%;max-height:100%;overflow:auto;overflow-wrap:anywhere;text-align:center}
.quizprompt .stamp{position:absolute;top:7px;right:12px;pointer-events:none}
.answers,.embedded-exam .options{grid-template-rows:none;grid-auto-rows:var(--choice-h);align-items:stretch;flex:none}
.answers .option,.embedded-exam .options .option{box-sizing:border-box;height:var(--choice-h);min-height:var(--choice-h);max-height:var(--choice-h);width:100%;border-width:2px;transform:none!important;animation:none!important;position:relative;overflow:hidden;padding:9px 39px 9px 14px}
.answers .option .opttext,.embedded-exam .exam-option-text{flex:1;min-width:0;max-height:100%;overflow:auto;overflow-wrap:anywhere;font-size:clamp(15px,2.1vw,21px);line-height:1.35}
.embedded-exam .exam-answer-mark{position:absolute;right:14px;top:50%;transform:translateY(-50%);font-size:1.2em;line-height:1}
.stage{flex:none}.flash,.flash:has(.all-senses){box-sizing:border-box;height:var(--flash-h);min-height:var(--flash-h);max-height:var(--flash-h);padding:22px 14px 42px;overflow:hidden;border-width:7px}
.flash .card-content{display:flex;flex-direction:column;justify-content:safe center;align-items:stretch;max-height:100%;width:100%;overflow:auto;min-height:0;flex:1}
.flash .prompt,.flash .revealed{flex:none;max-width:100%;overflow-wrap:anywhere}.flash .revealed{margin:12px 0 0;padding:12px 0 0;overflow:visible}.flash .hint{position:absolute;bottom:9px;left:10px;right:10px;max-height:30px;overflow:hidden;line-height:1.3}
.classification button{height:58px;min-height:58px;max-height:58px;border-width:2px;transform:none!important}.undo-slot{height:54px;flex:none;padding-top:8px}.undo-slot button{height:44px;min-height:44px}
.embedded-exam .top{height:40px;min-height:40px;max-height:40px}.embedded-exam .stem{height:var(--exam-h);min-height:var(--exam-h);max-height:var(--exam-h);overflow:auto;scrollbar-gutter:stable}
.exam-feedback-slot{height:var(--exam-feedback-h);overflow:auto;margin:8px 0;scrollbar-gutter:stable}.embedded-exam .exam-feedback-slot .feedback{margin:0;padding:6px 0;min-height:0}
.embedded-exam .exam-next{height:52px;min-height:52px;max-height:52px;width:100%;transform:none!important}
@media(max-width:510px){.shell{--quiz-h:145px;--choice-h:64px;--flash-h:clamp(260px,44dvh,360px);--exam-h:clamp(175px,27dvh,250px);--exam-feedback-h:86px}.view[data-view=home] .primary{height:55px;min-height:55px;max-height:55px}.quizprompt,.quizprompt.en{padding:30px 10px}.answers .option,.embedded-exam .options .option{padding:7px 30px 7px 11px}.answers .option .opttext,.embedded-exam .exam-option-text{font-size:clamp(15px,4.5vw,19px)}.embedded-exam .exam-answer-mark{right:10px}.flash,.flash:has(.all-senses){border-width:5px;padding:18px 10px 40px}.studyhead{font-size:12px;gap:5px}.studyhead .streak{font-size:11px}}

/* Keep full LCD interior available: feedback is absolutely positioned. */
.quizprompt,.quizprompt.en{padding:14px 16px;justify-content:center;align-items:center}
.quiz-content{width:100%;min-width:0;min-height:0;max-height:100%;line-height:1.25;padding:3px 0;overflow:auto;scrollbar-width:none;flex:0 1 auto}
.quiz-content::-webkit-scrollbar{display:none}
.quizprompt:has(.stamp) .quiz-content{padding:3px 0}
.quizprompt .stamp{z-index:3}
.answers .option .opttext,.embedded-exam .exam-option-text,.flash .card-content,.home-record-slot,.embedded-exam .stem,.exam-feedback-slot{scrollbar-width:thin;scrollbar-color:#68705b transparent}
.review-rows{background:transparent;border:0;border-radius:0;overflow:visible;gap:5px}
.review-rows li,.review-rows li:first-child{border:1px solid #978e7c;border-left:4px solid #36734b;border-radius:4px;box-shadow:none}
.review-rows li.miss{border-left-color:#9f4b3e;box-shadow:none}
.review-rows li.slow{border-left-color:#a57b29;box-shadow:none}
.embedded-exam .review{background:transparent}
@media(min-width:760px){.review-rows li{grid-template-columns:36px minmax(0,.9fr) minmax(0,1.1fr);align-items:center}.review-state{grid-row:auto}}
@media(max-width:510px){.quizprompt,.quizprompt.en{padding:10px 10px}.quiz-content{padding:3px 0}}
