/* Focused word building and a separate reading workspace. */
body.game-open #content{max-width:1640px;margin-inline:auto;width:100%;box-sizing:border-box}
.game-open .game-layout.quiz-workspace{grid-template-columns:minmax(0,1fr) minmax(230px,280px);gap:16px;align-items:stretch;min-height:540px;height:auto;width:100%;max-width:1600px;margin-inline:auto}
.game-open .quiz-workspace .word-stage{display:flex;flex-direction:column;min-width:0;padding:24px;min-height:540px}
.game-open .quiz-workspace .round-body{flex:1;min-height:0;padding:28px 0;gap:20px;align-items:center;justify-content:center}
.game-open .quiz-workspace .selection-hint{color:#e3edfc;text-align:center;font-size:15px;margin:0;line-height:1.5}
.game-open .quiz-workspace .selected-letters,.game-open .quiz-workspace .letter-bank{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;width:100%;max-width:530px;min-height:0;margin:0 auto;padding:0;border:0;align-items:stretch;flex:none}
.game-open .quiz-workspace .letter-tile{display:grid;place-items:center;flex:none;width:100%;min-width:0;max-width:none;min-height:0;height:auto;aspect-ratio:1;padding:0;box-sizing:border-box;font-size:clamp(22px,3vw,40px);line-height:1}
.game-open .quiz-workspace .letter-placeholder{background:#ffffff08;border:1px dashed #adc7e477;box-shadow:none}
.game-open .quiz-workspace .letter-placeholder:hover{transform:none}
.game-open .quiz-workspace .word-feedback{min-height:25px;margin:0;text-align:center}
.game-open .quiz-workspace .word-feedback.good{color:#d4ffdd}
.game-open .quiz-workspace .word-feedback.bad{color:#ffd5cf}
.game-open .quiz-workspace .word-targets{display:block;align-self:start;min-width:0;min-height:0;padding:16px;overflow:visible}
.game-open .quiz-workspace .word-targets .section-head{align-items:center;gap:8px;margin:0 0 12px}
.game-open .quiz-workspace .word-targets h2{font-size:16px}
.game-open .quiz-workspace .word-targets small{font-size:12px;white-space:nowrap}
.game-open .quiz-workspace .slots-grid{display:grid;flex:none;grid-template-columns:repeat(auto-fit,minmax(64px,1fr));grid-auto-rows:36px;align-content:start;gap:6px;max-height:min(70dvh,620px);overflow:auto;padding:0 3px 3px 0}
.game-open .quiz-workspace .word-slot{display:grid;place-items:center;min-width:0;min-height:36px;padding:4px;font-size:14px;line-height:1.2;letter-spacing:2px;cursor:default}
.game-open .quiz-workspace .word-slot.found,.game-open .quiz-workspace .word-slot.reveal{letter-spacing:0}
.game-open .quiz-workspace .word-targets p{font-size:12px;line-height:1.5;margin:12px 0 0}
.game-open .quiz-workspace .word-targets .notice{padding:10px;margin-top:12px}
.game-open .quiz-workspace .game-toolbar{gap:12px;min-width:0;padding-right:0!important}
.game-open .quiz-workspace .game-toolbar>div{flex:1;min-width:0}
body.game-open .quiz-workspace #game-focus,body.game-open .quiz-workspace #game-sound{position:static!important;width:40px;height:40px;min-width:40px;flex:none;margin:0!important;padding:0}
.game-open .quiz-workspace .round-summary{width:100%;max-width:620px;padding:20px 0}
.game-open .quiz-workspace .round-summary>strong{font-size:56px}
.game-open .quiz-workspace .round-summary p{color:#dfebfb;line-height:1.5}
.quiz-result-actions{display:flex;flex-wrap:nowrap;justify-content:center;align-items:stretch;gap:10px;width:100%;max-width:520px;margin:22px auto 0}
.quiz-result-actions>.button{display:inline-flex;flex:1 1 0;align-items:center;justify-content:center;min-width:0;min-height:44px;padding:10px 8px;font-size:14px;line-height:1.3;text-decoration:none;white-space:nowrap}
.quiz-result-actions .notes-link{gap:5px}
.quiz-result-actions .pdf-icon{width:18px;height:22px;flex:0 0 18px}
body.quiz-focus #content{display:block;max-width:1640px!important;width:100%;min-height:100dvh;margin-inline:auto;padding:16px!important}
body.quiz-focus .game-layout.quiz-workspace{height:auto;min-height:calc(100dvh - 32px);grid-template-columns:minmax(0,1fr) minmax(240px,290px);align-items:stretch;max-width:none}
body.quiz-focus .quiz-workspace .word-stage{min-height:calc(100dvh - 32px)}
.quiz-review{--review-top:80px;max-width:1500px;margin-inline:auto}
.quiz-review .review-card{padding:20px}
.review-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;position:sticky;top:var(--review-top);z-index:8;background:#fff;border-bottom:1px solid #dce6f2;margin-bottom:20px;padding:8px 0 14px}
.review-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:12px;min-width:0}
.review-meta h2{margin:0;font-size:20px;overflow-wrap:anywhere}
.review-meta>span{font-size:15px;color:#5e7490;white-space:nowrap}
.review-navigation{display:flex;align-items:center;gap:8px}
.review-navigation .button{min-height:44px}
.review-navigation #replay-previous{width:44px;padding:8px}
.review-progress{min-width:44px;text-align:center;font-size:13px;white-space:nowrap;color:#5d7492}
.review-navigation .workspace-focus{display:inline-grid;place-items:center;width:44px;min-width:44px;height:44px;padding:0;font-size:23px;line-height:1}
.review-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(230px,280px);align-items:start;gap:18px}
.review-study{min-width:0;border:1px solid #d9e4f1;border-radius:14px;background:#fff;overflow:clip}
.review-word-header{scroll-margin-top:calc(var(--review-top) + 100px);padding:24px;background:#163c65 url('/assets/wonder/sprites/bg_game.jpg') center/cover;text-align:center;color:#fff}
.review-word-header>small{font-size:13px;color:#e1ebfa}
.quiz-review .letter-bank{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;width:100%;max-width:340px;min-height:0;margin:18px auto;padding:0}
.quiz-review .letter-tile{display:grid;place-items:center;flex:none;width:100%;min-width:0;max-width:none;height:auto;min-height:0;aspect-ratio:1;padding:0;font-size:26px;line-height:1}
.quiz-review #replay-word{font-size:clamp(30px,3vw,44px);line-height:1.25;letter-spacing:1px;color:#ffe3a4;margin:18px 0;overflow-wrap:anywhere}
.quiz-review .replay-word-actions{justify-content:center;gap:10px}
.quiz-review .replay-word-actions .button{min-height:44px}
.review-meaning{padding:22px}
.review-meaning>h3{font-size:18px;margin:0 0 14px}
.quiz-review .replay-definition{font-size:16px;line-height:1.75;max-height:none;overflow:visible;text-align:left;color:#274465;overflow-wrap:anywhere}
.review-definition-article p{margin:0;white-space:pre-line}
.review-definition-article h4{font-size:15px;margin:0 0 8px}
.review-definition-article+.review-definition-article{border-top:1px solid #e0e8f2;margin-top:18px;padding-top:18px}
.review-word-page{display:inline-flex;margin-top:16px;font-size:14px}
.review-exercise{margin:0 22px 22px;padding:12px 14px;border-left:3px solid #7aa6d6;background:#f0f6fe;border-radius:0 8px 8px 0;color:#365b82;font-size:15px;line-height:1.6}
.review-word-list{position:sticky;top:calc(var(--review-top) + 88px);min-width:0;padding:14px;border:1px solid #dce6f2;border-radius:12px;background:#f7faff}
.review-word-list h3{font-size:16px;margin:0 0 12px}
.quiz-review .replay-events{max-height:min(62dvh,600px);gap:6px;overflow:auto}
.quiz-review .replay-event{display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:42px;padding:8px;text-align:left;border-radius:8px;background:#fff;color:#274b77}
.quiz-review .replay-event strong{font-size:14px;overflow-wrap:anywhere}
.quiz-review .replay-event small{font-size:11px;color:#6d82a0}
.quiz-review .replay-event span{font-size:11px;max-width:78px;text-align:right;color:#5f7897;margin:0}
.quiz-review .replay-event.active{border-color:#719bcf;background:#e8f1ff}
.quiz-review .replay-event:focus-visible{outline:3px solid #90b4e1;outline-offset:1px}
.quiz-review .replay-record-actions{margin-top:12px}
.quiz-review .replay-record-actions .button{width:100%;min-height:44px;margin:0;font-size:12px;padding:9px}
.quiz-review .replay-bottom-actions{gap:10px;margin-top:20px}
.quiz-review .replay-bottom-actions>.button{min-height:44px}
body.review-focus .sidebar,body.review-focus .topbar,body.review-focus footer,body.review-focus #impersonation-banner{display:none!important}
body.review-focus .shell{margin-left:0!important}
body.review-focus #content{display:block;max-width:1540px;width:100%;min-height:100dvh;margin-inline:auto;padding:16px!important;box-sizing:border-box}
body.review-focus .quiz-review{--review-top:0px}
@media(max-width:1000px){
 .game-open .game-layout.quiz-workspace,body.quiz-focus .game-layout.quiz-workspace{grid-template-columns:minmax(0,1fr) 230px;gap:12px}
 .game-open .quiz-workspace .word-stage{padding:18px}
 .game-open .quiz-workspace .game-toolbar{gap:8px}
 .game-open .quiz-workspace .game-status-label{display:none}
 .review-grid{grid-template-columns:minmax(0,1fr) 230px;gap:12px}
}
@media(max-width:760px){
 .game-open .game-layout.quiz-workspace,body.quiz-focus .game-layout.quiz-workspace{grid-template-columns:minmax(0,1fr);height:auto;min-height:0}
 .game-open .quiz-workspace .word-stage{padding:16px;min-height:480px}
 body.quiz-focus #content{padding:12px!important}
 body.quiz-focus .quiz-workspace .word-stage{min-height:calc(100dvh - 24px)}
 .game-open .quiz-workspace .round-body{gap:18px;padding:24px 0}
 .game-open .quiz-workspace .letter-bank,.game-open .quiz-workspace .selected-letters{gap:7px}
 .game-open .quiz-workspace .letter-tile{font-size:clamp(22px,5vw,32px)}
 .game-open .quiz-workspace .game-toolbar{gap:7px;flex-wrap:nowrap}
 .game-open .quiz-workspace .game-toolbar h2{font-size:14px;overflow-wrap:anywhere}
 .game-open .quiz-workspace .game-toolbar .game-clock{font-size:21px}
 body.game-open .quiz-workspace #game-focus,body.game-open .quiz-workspace #game-sound{width:34px;height:36px;min-width:34px}
 .game-open .quiz-workspace .slots-grid{max-height:310px;grid-template-columns:repeat(auto-fit,minmax(64px,1fr))}
 .game-open .quiz-workspace .word-slot{font-size:14px}
 .game-open .quiz-workspace .selection-hint{font-size:13px}
 .quiz-result-actions{gap:7px}
 .quiz-result-actions>.button{font-size:12px;padding:9px 6px}
 .quiz-result-actions .notes-link{gap:4px}
 .quiz-result-actions .pdf-icon{width:16px;height:20px;flex-basis:16px}
 .quiz-review{--review-top:70px}
 .quiz-review .review-card{padding:14px}
 .review-grid{grid-template-columns:minmax(0,1fr)}
 .review-toolbar{gap:10px;padding-top:0}
 .review-navigation{display:grid;grid-template-columns:44px 40px minmax(0,1fr) 44px;gap:6px;width:100%}
 .review-navigation #replay-next{font-size:13px;line-height:1.3;white-space:normal;padding:8px}
 .review-progress{min-width:0;font-size:12px}
 .review-meta{justify-content:space-between;width:100%}
 .review-meta h2{font-size:18px}
 .review-word-header{padding:20px 14px;scroll-margin-top:calc(var(--review-top) + 134px)}
 .quiz-review .letter-tile{font-size:23px}
 .review-meaning{padding:18px}
 .review-exercise{margin:0 18px 18px;font-size:14px}
 .review-word-list{position:static}
 .quiz-review .replay-events{max-height:290px}
 .quiz-review .replay-bottom-actions>.button{font-size:12px;padding:9px 11px}
 body.review-focus #content{padding:12px!important}
}
/* The word-building area stays at the viewport centre, independent of the word list. */
.game-open .game-layout.quiz-workspace,body.quiz-focus .game-layout.quiz-workspace{position:relative;container-type:inline-size;grid-template-columns:minmax(0,1fr);max-width:1600px}
.game-open .quiz-workspace .word-stage{width:100%;align-items:center}
.game-open .quiz-workspace .game-toolbar,.game-open .quiz-workspace .game-foot{width:100%;max-width:620px;margin-inline:auto}
.game-open .quiz-workspace .round-body{width:100%}
.game-open .quiz-workspace .word-targets{position:static;width:100%;max-width:none}
.game-open .quiz-workspace .slots-grid{grid-template-columns:repeat(auto-fit,minmax(64px,1fr));max-height:310px}
.game-open .quiz-workspace .word-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:100%;max-width:530px;margin-inline:auto}
.game-open .quiz-workspace .word-actions>button{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:48px;height:auto;padding:10px 8px;border-radius:9px;font-size:16px;line-height:1.3}
.game-open .quiz-workspace .letter-tile.picked{animation:none}
body.game-open .quiz-workspace #game-focus,body.game-open .quiz-workspace #game-sound{width:44px;height:44px;min-width:44px;border-radius:9px}
@container (min-width:1180px){
 .game-open .quiz-workspace>.word-targets{position:absolute;top:16px;right:16px;width:240px;max-height:calc(100% - 32px);overflow:auto}
 .game-open .quiz-workspace>.word-targets .slots-grid{max-height:min(62dvh,580px)}
}
@media(max-width:760px){
 .game-open .quiz-workspace .word-actions{gap:7px}
 .game-open .quiz-workspace .word-actions>button{min-height:46px;font-size:14px;padding:10px 6px}
 .game-open .quiz-workspace .game-foot{gap:10px;flex-wrap:wrap;justify-content:center}
}
.game-open .quiz-workspace .word-actions>button{flex-direction:column;gap:5px;font-size:15px;font-weight:600}
.game-open .quiz-workspace .word-actions kbd{font-family:inherit;font-size:11px;font-weight:500;line-height:1.2;opacity:.82;white-space:nowrap}
@media(max-width:760px){.game-open .quiz-workspace .word-actions>button{font-size:12px;gap:4px}.game-open .quiz-workspace .word-actions kbd{font-size:10px}}
