/* The three picture frames keep their reading order in every orientation. */
.local-library{margin:auto;text-align:center;max-width:760px}.local-library h1{font-family:Newsreader,Georgia,serif;font-size:clamp(32px,5vw,54px)}.local-library>div{display:flex;gap:20px;justify-content:center}.local-library a{display:grid;justify-items:center;align-content:start;gap:12px;width:min(44%,310px);padding:12px;text-decoration:none;color:var(--text)}.local-library a img{height:clamp(80px,18vw,155px);width:100%;object-fit:contain}.local-library .ui-symbol{width:28px;height:28px}
.studio,.story-strip,.story-choice,.story-frame,.story-frame *{box-sizing:border-box}
[data-exercise-id=in-between] .game-field{width:100%;min-height:0;display:grid;place-items:center}
.studio{width:min(100%,910px);display:grid;justify-items:center;align-content:center;gap:clamp(18px,4vh,42px)}
.story-strip{display:grid;width:min(100%,860px);grid-template-columns:1fr clamp(18px,3.7vw,44px) 1fr clamp(18px,3.7vw,44px) 1fr;align-items:center}
.story-frame{margin:0;min-width:0;position:relative}
.story-frame .picture{position:relative;display:grid;place-items:center;width:100%;aspect-ratio:240/184;border-radius:10px}
.story-frame img,.story-choice img{display:block;width:100%;height:auto;user-select:none}
.story-frame figcaption{margin-top:4px;display:flex;align-items:center;justify-content:center;gap:7px;min-height:22px;font-size:clamp(13px,1.4vw,16px);color:var(--text-muted)}
.frame-dots{font-size:9px;letter-spacing:2px;color:var(--link)}
.studio:not(.guided):not(.solved) figcaption .child-word{display:none}
.story-frame.middle:not(.filled) .picture{outline:2px dashed var(--practice-edge);outline-offset:-5px;background:color-mix(in srgb,var(--panel-left) 55%,transparent)}
.question-mark{font:500 clamp(34px,6vw,72px)/1 Newsreader,Georgia,serif;color:var(--link)}
.step-arrow{display:grid;place-items:center;color:var(--practice-edge);margin-bottom:26px}
.step-arrow .ui-symbol{width:clamp(15px,2.4vw,28px);height:auto}
.choices{display:flex;justify-content:center;gap:clamp(12px,3.3vw,40px);width:100%}
.choices[hidden],.replay-area[hidden]{display:none}
.story-choice{position:relative;width:clamp(120px,15vw,177px);padding:2px;display:block;border:2px solid var(--practice-edge);border-radius:10px;background:var(--practice-surface);line-height:0;cursor:pointer}
.story-choice[aria-pressed=true]{border-color:var(--success);box-shadow:0 0 0 2px var(--success)}
.choice-tick,.frame-check{position:absolute;right:4px;bottom:4px;display:grid;place-items:center;background:var(--success);color:var(--bg);width:27px;height:27px;border-radius:50%}
.choice-tick{display:none}.story-choice[aria-pressed=true] .choice-tick{display:grid}
.choice-tick svg,.frame-check svg{width:20px;height:20px}
.story-choice[data-tried]::after{content:'↶';position:absolute;bottom:4px;right:4px;border-radius:100%;width:24px;height:24px;display:grid;place-items:center;background:var(--practice-surface);color:var(--text);font:600 20px/1 Lexend}
.story-choice:focus-visible,.story-replay:focus-visible{outline:3px solid var(--link);outline-offset:4px}
.replay-area{display:grid;justify-items:center;gap:8px;min-height:80px;width:100%}
.story-replay{display:inline-flex;align-items:center;gap:9px;justify-content:center;min-height:56px;min-width:64px;border-radius:35px;border:1.5px solid var(--practice-edge);background:var(--practice-surface);color:var(--link);padding:6px 18px;font:500 16px Lexend;cursor:pointer}
.story-replay .ui-symbol{width:26px;height:26px}
.completed .story-replay{pointer-events:auto}
.replay-line{margin:0;text-align:center;color:var(--text);font:400 clamp(14px,1.8vw,19px)/1.3 Lexend;min-height:1.4em}
.current-frame .picture{outline:3px solid var(--success);outline-offset:1px}
[data-exercise-id=in-between] .level-preview img{width:clamp(22px,3.2vw,49px);height:auto;object-fit:contain}
[data-exercise-id=in-between] .intro-example>.ui-symbol{width:35px;height:35px}
html:not([data-motion=none]) .story-frame.filled img{animation:place-frame .19s ease-out}
@keyframes place-frame{from{transform:translateY(4px);opacity:.8}}
@media(prefers-reduced-motion:reduce){.story-frame.filled img{animation:none!important}}
@media(min-width:800px) and (min-height:520px){.exercise-page [data-exercise-id=in-between] .instruction{font-size:clamp(26px,3vw,32px)}}
@media(max-width:650px){
 [data-exercise-id=in-between] .task-bottom{position:relative}
 [data-exercise-id=in-between] .task-bottom .feedback{position:absolute;left:8px;right:8px;bottom:100%;width:auto;margin:0;text-align:center;line-height:1.22}
 .studio{gap:clamp(24px,5vh,50px)}
 .story-strip{grid-template-columns:1fr 13px 1fr 13px 1fr}
 .step-arrow .ui-symbol{width:12px}
 .choices{gap:8px}.story-choice{width:min(30%,145px)}
 .replay-line{max-width:29ch}
 [data-exercise-id=in-between] .intro-example>.ui-symbol{width:27px;height:27px}
}
@media(max-height:500px) and (orientation:landscape){
 .exercise-page .child-ui.intro-shell .exercise-start{display:grid;grid-template-columns:minmax(0,34fr) minmax(0,66fr);gap:14px;align-items:center}
 .exercise-page .child-ui.intro-shell{padding:2px 0;min-height:0}
 .exercise-page .child-ui.intro-shell .start-copy{gap:3px}
 .exercise-page .child-ui.intro-shell .start-copy h1{font-size:clamp(24px,3.3vw,32px)}
 .exercise-page .child-ui.intro-shell .start-copy .intro-description{font-size:15px;margin:0}
 .exercise-page .child-ui.intro-shell .intro-hint{min-height:25px}
 .exercise-page .child-ui.intro-shell .intro-example>.ui-symbol{width:23px;height:23px}
 .exercise-page .child-ui.intro-shell .level-choice .pill{min-height:64px;padding:3px 4px;gap:1px}
 .exercise-page .child-ui.intro-shell .level-leaves,.exercise-page .child-ui.intro-shell .level-leaves .ui-symbol{height:20px;width:auto}
 .exercise-page .child-ui.intro-shell .level-preview{min-height:20px;height:20px;width:auto}
 .exercise-page .child-ui.intro-shell .level-preview img{height:18px;width:auto}
 .exercise-page .child-ui.intro-shell .start-mark img{height:auto;max-height:50vh;width:100%}
 .studio{gap:8px}
 .story-strip{width:min(83vw,calc(104dvh + 44px));grid-template-columns:1fr 22px 1fr 22px 1fr}
 .story-frame .picture{aspect-ratio:240/184}.story-frame img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
 .story-frame figcaption{font-size:12px;margin:0;min-height:14px}
 .story-choice{width:clamp(74px,18vh,104px)}
 .replay-area{min-height:52px;gap:2px;grid-template-columns:auto auto;justify-content:center;align-items:center}
 [data-exercise-id=in-between] .exercise-start .start-mark img{max-height:48vh}
}

