#sentence-dialog{box-sizing:border-box;width:min(760px,calc(100% - 24px));max-height:90dvh;overflow:auto;background:#26171c;color:#f9e6d6;border:1px solid #b45a59;border-radius:20px;padding:24px;font-size:16px;line-height:1.6}#sentence-dialog::backdrop{background:#12080ee8}#sentence-close{display:block;margin-left:auto;background:#4d2931;color:#ffe7d2;min-height:44px}#sentence-dialog h2{font-size:28px;margin:12px 0}#sentence-dialog h3{font-size:20px}#sentence-dialog .eyebrow{color:#ffd487;font-size:14px}#sentence-dialog select{display:block;width:100%;margin:12px 0;background:#40252d;color:#fff0df;min-height:48px}#sentence-dialog input{width:20px;height:20px;vertical-align:middle}#sentence-dialog progress{width:100%;height:8px;accent-color:#f4bb6c;margin:14px 0 24px}.sentence-hud{display:flex;justify-content:space-between;gap:12px;color:#ffd487}.sentence-zh{font-size:clamp(26px,5vw,40px);line-height:1.65;overflow-wrap:anywhere;margin-top:14px;letter-spacing:normal}.sentence-py{color:#efc7b1;font-size:18px;overflow-wrap:anywhere}.sentence-context{background:#40252c;border-left:3px solid #ffc777;padding:14px}.sentence-options{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:24px 0}.sentence-options button{background:#522b34;border:1px solid #b36462;border-radius:16px;padding:18px 12px;color:#fff1de;font-size:24px;min-height:88px;overflow-wrap:anywhere}.sentence-options button:hover{background:#79303d;border-color:#ffda9a}.sentence-options small{font-size:14px;color:#efbf9d}.sentence-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}.sentence-actions button{min-height:48px;font-size:16px;background:#59313a;color:#fff0db}.sentence-actions .primary{background:#ffda9a;color:#47131c}.sentence-explanation{padding:18px;border:1px solid #9d625a;border-radius:12px;color:#ffe1a5}#sentence-status{color:#e9c5b8;font-size:16px}.sentence-review{border-bottom:1px solid #70464a;padding:10px 0}.sentence-review .sentence-zh{font-size:24px}#sentence-dialog button:focus-visible{outline:3px solid #ffe099;outline-offset:3px}@media(max-width:480px){#sentence-dialog{padding:16px}.sentence-options{grid-template-columns:1fr}.sentence-options button{min-height:64px;font-size:22px}}

/* Longer HSK3–5 content: compact word options, readable full-sentence alternatives. */
.game-world #sentence-dialog #sentence-body .sentence-options button{position:relative;min-width:0;gap:4px;padding:14px 12px 12px;line-height:1.5}
.game-world #sentence-dialog #sentence-body .sentence-options small{position:absolute;top:4px;left:7px;font-size:12px}
.game-world #sentence-dialog #sentence-body[data-exercise="meaning"] .sentence-options button{font-size:18px;text-align:left;align-items:stretch}
.game-world #sentence-dialog #sentence-body[data-exercise="dialogue"] .sentence-options button{font-size:20px;text-align:left;align-items:stretch}
.game-world #sentence-dialog .sentence-hud{padding-right:64px;flex-wrap:wrap;gap:4px 10px}
.game-world #sentence-dialog .sentence-hud b{white-space:nowrap}
@media(max-width:600px){
 .game-world #sentence-dialog #sentence-body[data-exercise="fill"] .sentence-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .game-world #sentence-dialog #sentence-body .sentence-options{margin:14px 0}
 .game-world #sentence-dialog #sentence-body .sentence-options button{min-height:84px;padding:18px 10px 10px}
 .game-world #sentence-dialog .sentence-zh{font-size:25px;line-height:1.5;margin-top:10px}
 .game-world #sentence-dialog .sentence-context{padding:10px;margin:12px 0}
 .game-world #sentence-dialog progress{margin:8px 0 12px}
}
@media(max-height:450px) and (orientation:landscape){
 .game-world #sentence-dialog{padding:14px;max-height:94dvh}
 .game-world #sentence-dialog .sentence-zh{font-size:26px}
 .game-world #sentence-dialog progress{margin:8px 0}
 .game-world #sentence-dialog .sentence-options{margin:14px 0;gap:10px}
}

/* A verdict is readable before the learner reaches the full sentence and explanation. */
.game-world #sentence-dialog .sentence-verdict{margin:14px 0 18px;padding:16px 18px;background:#173b3e;border:2px solid #82e4b0;box-shadow:inset 0 0 0 2px #0e292c,0 5px 0 #0c2123;border-radius:10px;color:#f5fff6}
.game-world #sentence-dialog .sentence-verdict.is-wrong{background:#492735;border-color:#ff93a0;box-shadow:inset 0 0 0 2px #311d29,0 5px 0 #271821;color:#fff6f5}
.game-world #sentence-dialog .sentence-verdict-title{display:block;font-size:clamp(26px,5vw,34px);line-height:1.2;letter-spacing:.01em;color:#aaffcb}
.game-world #sentence-dialog .sentence-verdict.is-wrong .sentence-verdict-title{color:#ffc2c8}
.game-world #sentence-dialog .sentence-verdict-row{display:flex;align-items:baseline;flex-wrap:wrap;gap:2px 10px;margin-top:10px;font-size:18px;line-height:1.4}
.game-world #sentence-dialog .sentence-verdict-row span:first-child{color:#d5e4dc}
.game-world #sentence-dialog .sentence-verdict.is-wrong .sentence-verdict-row span:first-child{color:#f5d1d4}
.game-world #sentence-dialog .sentence-verdict-row.is-chosen .sentence-verdict-choice,.game-world #sentence-dialog .sentence-verdict-row.is-chosen b{color:#ffd3d7}
.game-world #sentence-dialog .sentence-verdict-row.is-answer{font-size:21px;font-weight:700}
.game-world #sentence-dialog .sentence-verdict-row.is-answer .sentence-verdict-choice,.game-world #sentence-dialog .sentence-verdict-row.is-answer b{color:#aaffcb}
.game-world #sentence-dialog .sentence-verdict.is-wrong .sentence-verdict-row.is-answer{border-top:1px solid #c67d83;padding-top:9px}
.game-world #sentence-dialog .sentence-verdict-choice{font-weight:700;overflow-wrap:anywhere;min-width:0}
.game-world #sentence-dialog .sentence-answer-detail h3{margin:12px 0;font-size:clamp(19px,3vw,24px);line-height:1.5}
@media(max-width:600px){
 .game-world #sentence-dialog .sentence-verdict{padding:12px 14px;margin:12px 0 16px}
 .game-world #sentence-dialog .sentence-verdict-row{font-size:16px;margin-top:7px}
 .game-world #sentence-dialog .sentence-verdict-row.is-answer{font-size:19px}
 .game-world #sentence-dialog .sentence-answer-detail .sentence-zh{margin-top:8px}
 .game-world #sentence-dialog .sentence-answer-detail .sentence-explanation{padding:12px;margin:12px 0}
}
/* Fade only content; the sticky session header remains stable. */
#sentence-body>:not(.sentence-hud){transition:opacity 160ms ease-out}
#sentence-body.sentence-leaving>:not(.sentence-hud){opacity:0}
@media(prefers-reduced-motion:reduce){#sentence-body>:not(.sentence-hud){transition:none}}

#sentence-body.sentence-entering>:not(.sentence-hud){animation:sentence-enter 160ms ease-out}
@keyframes sentence-enter{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){#sentence-body.sentence-entering>:not(.sentence-hud){animation:none}}
