/* 집중 화면 (2026-11-19, 시안 C; dist/focus-mode.js): while an activity is open the page shows only the sheet — the activity's
   box and the row or round title above it. Everything off the box's path is hidden; the path's wrappers lose their own
   boxes (padding, cards, columns) so the sheet spans the screen. Off: ⚙ 설정 › 집중 화면. */
body[data-focus="on"]{background:var(--b-teal-mist,var(--t-bg))}
body[data-focus="on"] :is(.header,.mission-banner){display:none!important}
body[data-focus="on"] [data-focus="path"]{display:block!important;position:static!important;inset:auto!important;width:auto!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;transform:none!important}
body[data-focus="on"] [data-focus="path"]>*:not([data-focus]),body[data-focus="on"] [data-focus="sheet"]>*:not([data-focus]){display:none!important}
body[data-focus="on"] [data-focus~="sheet"]{display:block!important;box-sizing:border-box;min-height:calc(100dvh - 12px);margin:12px 0 0!important;padding:8px max(12px,env(safe-area-inset-left,0px)) calc(28px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-right,0px))!important;border:0!important;border-radius:24px 24px 0 0!important;background:var(--b-paper,var(--t-card))!important;box-shadow:0 -6px 22px #13292b1f!important;height:auto!important;overflow:visible!important;animation:focus-sheet-up .34s cubic-bezier(.2,.8,.2,1)}
body[data-focus="on"] [data-focus="head"]{margin:0 0 8px!important;border-radius:16px!important;box-shadow:none!important;background:var(--b-card,var(--t-card))!important}
body[data-focus="on"] [data-focus~="host"]{margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body[data-focus="on"] [data-focus~="host"]:not([data-focus~="sheet"]){padding:0!important}
@keyframes focus-sheet-up{from{opacity:.4}to{opacity:1}}
@media(prefers-reduced-motion:reduce){body[data-focus="on"] [data-focus~="sheet"]{animation:none}}
/* Full screen (2026-11-19, owner: “전체적인 액티비티를 전체 화면을 써서 … 녹음을 보낼 때 더 길게 보이고 옆으로 공간을 더 많이”): the sheet
   is the whole screen, and the activity's own frame grows into it — the frame and its stage stretch down (buttons move
   to the bottom, near the thumb), and long lists (단어 읽기 목록, 선생님께 보낼 녹음) take the extra height. */
body[data-focus="on"] [data-focus~="sheet"]{display:flex!important;flex-direction:column;min-height:100dvh;margin:0!important;padding:6px max(8px,env(safe-area-inset-left,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(8px,env(safe-area-inset-right,0px))!important;border-radius:0!important;box-shadow:none!important}
body[data-focus="on"] [data-focus="head"]{flex:none;margin:0 0 6px!important}
body[data-focus="on"] [data-focus~="host"]{flex:1 1 auto;display:flex!important;flex-direction:column;min-height:0}
body[data-focus="on"] [data-focus~="host"]>:not([hidden]):not(script):not(style),
body[data-focus="on"] [data-focus~="host"] .book-panel>div:not([class]):not([hidden]){flex:1 1 auto;display:flex!important;flex-direction:column;min-height:0;max-width:none!important}
body[data-focus="on"] [data-focus~="host"] .activity-toolbar{flex:none}
body[data-focus="on"] [data-focus~="host"] .book-panel>:is(.study-stage,.reading-stage,.word-matching,.timed-quiz),
body[data-focus="on"] [data-focus~="host"] .book-panel>div>:is(.study-stage,.reading-stage){flex:1 1 auto;max-width:none!important}
body[data-focus="on"] [data-focus~="host"] :is(.word-matching,.timed-quiz){display:flex!important;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .timed-quiz>.study-stage,body[data-focus="on"] [data-focus~="host"] .word-matching>.matching-playfield{flex:1 1 auto}
/* 짝꿍 찾기: the cards grow with the board (up to 120px tall) instead of leaving its lower half empty (owner 2026-11-19:
   "짝꿍찾기는 버튼 크기를 키워서 균형을 맞춰 주는게 좋겠어") */
body[data-focus="on"] [data-focus~="host"] .word-matching>.matching-playfield:has(>.matching-board){display:flex;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .matching-playfield>.matching-board{flex:1 1 auto;min-height:0;grid-template-rows:minmax(0,1fr);align-content:stretch}
body[data-focus="on"] [data-focus~="host"] .word-matching .matching-board>.matching-column{grid-template-rows:repeat(4,minmax(var(--match-card-h,60px),1fr))!important;max-height:510px;align-self:center;height:100%}
body[data-focus="on"] [data-focus~="host"] :is(.study-ghost,.reading-ghost){display:flex;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .study-ghost>.study-word-card,body[data-focus="on"] [data-focus~="host"] .reading-ghost>:first-child{flex:1 1 auto}
body[data-focus="on"] [data-focus~="host"] .study-stage-cover.word-challenge{width:100%}
body[data-focus="on"] .sentence-rec-list{max-height:max(8.6em,calc(100dvh - 420px))}
body[data-focus="on"] [data-focus~="host"] :is(.study-stage,.reading-stage){display:flex!important;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] :is(.study-stage,.reading-stage)>:is(.study-ghost,.reading-ghost){flex:1 1 auto}
body[data-focus="on"] [data-focus~="host"] .study-ghost>:not(.study-word-card){flex:none}
body[data-focus="on"] [data-focus~="host"] .reading-ghost>.reading-screen{display:flex;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .reading-ghost>.reading-screen>.reading-target{flex:1 1 auto}
body[data-focus="on"] [data-focus~="host"] .book-panel>.study-word-card,body[data-focus="on"] [data-focus~="host"] .book-panel>div:not([class])>.reading-screen{flex:1 1 auto;display:flex!important;flex-direction:column;justify-content:flex-start}
body[data-focus="on"] [data-focus~="host"] .book-panel>:is(.study-next,.study-actions){flex:none}
body[data-focus="on"] [data-focus~="host"] .book-panel>.study-word-card>.study-letter-tiles{margin-top:auto!important}
body[data-focus="on"] [data-focus~="host"] .book-panel>.study-word-card>:last-child{margin-bottom:auto!important}
body[data-focus="on"] [data-focus~="host"] .reading-screen>.reading-target{flex:1 1 auto;align-content:center}
/* game-kit activities (복습 게임, 게임 활동): the view and its card grow down; the content starts right under the top row (intro screens sit where O/X sits — owner 2026-11-19), word rain's field grows */
body[data-focus="on"] [data-focus~="host"] .game-kit>.game-kit-view{flex:1 1 auto;grid-template-rows:auto minmax(0,1fr)}
body[data-focus="on"] [data-focus~="host"] .game-kit-view>.game-kit-card{display:flex!important;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .game-kit-card>.wr-play{flex:1 1 auto;margin:0!important}
/* Start screens all begin at the same height, the middle-ish place 워드 레인's had (owner 2026-11-19: "워드 레인 설명
   위치에 맞춰서 다 통일"): --start-top below the card's top row, so a game with an extra row (O/X's sound switch, the
   puzzle's 난이도) runs longer below instead of starting higher; on a short screen it shrinks to 8px */
body[data-focus="on"] [data-focus~="host"] .game-kit-card{--start-top:max(8px,min(calc((100dvh - 560px) / 2),calc(100dvh - 610px)))}
body[data-focus="on"] [data-focus~="host"] .game-kit-card:is(.is-ready,:has(>*>.sp-hello),:has(>*>.cw-hello))>:has(.game-kit-intro):not(.wr-play){margin-top:var(--start-top)!important;margin-bottom:auto!important}
body[data-focus="on"] [data-focus~="host"] .game-kit-card.is-ready .mc-start{align-content:start}
body[data-focus="on"] [data-focus~="host"] .wr-card.is-ready .wr-cover{justify-content:flex-start;padding-top:var(--start-top)}
body[data-focus="on"] [data-focus~="host"] .game-kit-card>.ss-start{justify-content:flex-start;padding-top:calc(var(--start-top) + 59px)}
/* 파닉스: the word, steps and buttons sit in the middle of the card (owner 2026-11-19: "파닉스 동그라미 친 부분은 중앙으로 위치") */
body[data-focus="on"] [data-focus~="host"] .phx-card>.phx-body{margin-block:auto!important}
/* 철자 퍼즐 · 문장 퍼즐: the puzzle (뜻, 답 칸, 조각, 버튼) sits in the middle of the tall card instead of its top (owner 2026-11-19:
   "이 두개 엑티비티 문제가 활동창 중앙에 오도록"); its inner layout is untouched, only its outer margins take the spare height */
body[data-focus="on"] [data-focus~="host"] .timed-quiz>.word-builder{margin-block:auto!important}
/* 문장 읽기 기록 도전의 선생님 녹음 (owner 2026-11-19: "단어 읽기 녹음 만큼 창이 길어지고"): the finished Day's card grows to the
   bottom like 단어 읽기's, its sentence list takes the spare height and 녹음 시작 sits at the bottom */
body[data-focus="on"] [data-focus~="host"] .book-panel>#readingActivity>.reading-complete:has([data-reading-record-host]){flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
body[data-focus="on"] [data-focus~="host"] .reading-complete>[data-reading-record-host]{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
body[data-focus="on"] [data-focus~="host"] .reading-complete .sentence-rec{flex:1 1 auto;grid-template-rows:minmax(0,1fr) auto auto;align-content:stretch;min-height:0}
body[data-focus="on"] [data-focus~="host"] .reading-complete .sentence-rec-list{max-height:none;min-height:8.6em}
/* …and the card never grows past the screen (owner 2026-11-23: “선생님께 보내는 문장 녹음 마치면 화면이 더 아래로 확장되는 디자인
   수정”): the sheet is one screen high while the recording shows, the sentence list scrolls inside it, and 학습 마치기 stays in view (a
   phone on its side is too short for that: there the page scrolls as before). */
@media (min-height:520px){body[data-focus="on"] [data-focus~="sheet"]:has([data-reading-record-host]){height:100dvh;max-height:100dvh}
body[data-focus="on"] [data-focus~="sheet"]:has([data-reading-record-host]) :is(.book-panel,#readingActivity,.student-inline-activity):has([data-reading-record-host]){min-height:0!important}}
body[data-focus="on"] [data-focus~="host"] .reading-complete:has(.sentence-rec.is-sent) .sentence-rec-note{min-height:1.4em!important}
/* 복습 문장 퍼즐 (dist/activities/sentence-puzzle.js): while playing, its puzzle sits in the middle of the card like 내 학습's
   (owner 2026-11-19: "복습에 있는 문장퍼즐 ui 내 학습에 있는 것과 동일하게"); the toolbar sits 8 px above the card, as the other games */
body[data-focus="on"] [data-focus~="host"] .sp-card>.sp-body:has(>.sp-prompt){flex:1 1 auto;display:flex;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .sp-card>.sp-body>.sp-prompt{margin-top:auto}
body[data-focus="on"] [data-focus~="host"] .sp-card>.sp-body>.sp-actions{margin-bottom:auto}
/* 문법 탐정: its start layer covers the play area, which now takes the spare height, so it never needs to scroll */
body[data-focus="on"] [data-focus~="host"] .gd-card.is-ready>.gd-play{flex:1 1 auto}
body[data-focus="on"] [data-focus~="host"] .gd-card.is-ready .gd-cover{padding-top:var(--start-top)}
/* 스펠링 비: the picture takes the extra height, so the keyboard and 확인 sit at the bottom */
body[data-focus="on"] [data-focus~="host"] .sb-card:not(.is-ready)>.sb-play{flex:1 1 auto;margin:0!important;display:flex;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .sb-card:not(.is-ready) .sb-play>.sb-under{flex:1 1 auto;display:flex!important;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .sb-under>.hm-scene{flex:1 1 auto}
/* wide screens: the activity takes the sheet's width (up to 960px) instead of its usual narrow column */
body[data-focus="on"] [data-focus~="host"] :is(.book-panel,.book-panel>*,.book-panel>div:not([class])>*,.game-kit,.game-kit-view,.game-kit-card,.study-stage-cover.word-challenge,.study-word-card,.word-matching,.timed-quiz,.reading-screen){max-width:min(100%,960px)!important;width:100%!important;margin-inline:auto!important;box-sizing:border-box}

/* 학습 마치기 under the recording card sits in the middle (2026-11-19). */
body[data-focus="on"] [data-focus~="host"] .reading-complete>button[data-reading="finish-day"]{align-self:center}
/* 연습 | 기록 도전 칸은 모든 활동이 같은 모양 (2026-11-21, owner: “내 학습에 들어가는 모든 엑티비티도 연습과 기록 도전이 뜨는 창을
   3번째 사진과 같이 통일”): while the two tiles are showing, the activity's own frame (timer, track, footer, the ghost
   behind the cover) steps aside; under the toolbar one white card reaches the bottom with the tiles in its middle. */
body[data-focus="on"] [data-focus~="host"] :has(.activity-mode-entry):not([data-focus]){flex:1 1 auto!important;display:flex!important;flex-direction:column!important;position:static!important;inset:auto!important;min-height:0!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;gap:0!important}
body[data-focus="on"] [data-focus~="host"] :has(.activity-mode-entry)>:not(:has(.activity-mode-entry)):not(.activity-mode-entry):not(.activity-toolbar):not(.study-error):not(.activity-module-error):not([role="alert"]){display:none!important}
body[data-focus="on"] [data-focus~="host"] :has(.activity-mode-entry)>.activity-toolbar{flex:none;width:100%!important;max-width:none!important;margin:0 0 8px!important}
body[data-focus="on"] [data-focus~="host"] .activity-mode-entry{flex:1 1 auto;position:static!important;inset:auto!important;min-height:0!important;align-content:center;margin:0!important;padding:20px 14px!important;background:var(--b-card,var(--t-card,var(--n-ffffff,#fff)))!important;border:1px solid var(--b-line,var(--t-line,var(--n-dfe6e4,#dfe6e4)))!important;border-radius:24px!important;box-shadow:none!important}
/* A sheet that is itself the host (오답노트 리뷰) reaches the bottom too: the host rule's min-height:0 came last and won. */
body[data-focus="on"] [data-focus~="host"][data-focus~="sheet"]{min-height:100dvh!important}
/* 오답노트 리뷰 (2026-11-21, owner: “문제가 적혀있는 흰색창이 밑 부분 까지 내려오고 문제가 흰 바탕을 중심에”): the question block sits in the middle. */
body[data-focus="on"] [data-focus~="host"] .notes-card>.notes-stage{margin-block:auto!important}
/* One white box for every activity (2026-11-21, owner: “앱의 모든 엑티비티가 내 학습 탭의 열었을때의 흰색 네모 크기를 유지하고 시작하면
   그 활동의 크기가 변동 없이 흰색 네모 크기로 유지되도록. 설명의 창 크기도 그 흰색 네모 크기와 똑같게 … 그 흰색 네모 크기의 중앙에 게임이
   맞춰 시작”): the 연습 | 기록 도전 card's box — under the toolbar, down to the bottom of the sheet, white, 1px line, 24px
   corners — is every activity's box: its start screen, its play and its result. The content sits in the box's middle. */
body[data-focus="on"] [data-focus~="host"]{--focus-box-bg:var(--b-card,var(--t-card,var(--n-ffffff,#fff)));--focus-box-line:var(--b-line,var(--t-line,var(--n-dfe6e4,#dfe6e4)))}
body[data-focus="on"] [data-focus~="host"] .book-panel>.game-kit{flex:1 1 auto;display:flex!important;flex-direction:column;min-height:0}
body[data-focus="on"] [data-focus~="host"] .game-kit>.game-kit-view{gap:0!important;min-height:0}
body[data-focus="on"] [data-focus~="host"] .game-kit-view>.activity-toolbar{margin-bottom:8px!important}
/* One toolbar line for every activity (owner 2026-11-23: “가로 모드시 닫기 버튼 줄에 있는 내용의 위치가 변동되는 액티비티가 있어 다 확인해서
   위치 변동 없게 수정”): the game kit's toolbar was 620px wide in the middle while the 연습 | 기록 도전 line and the five basic
   activities span the white box, so on a wide screen 닫기 jumped ~170px inward. Every toolbar now spans the box. */
body[data-focus="on"] [data-focus~="host"] :is(.game-kit-view,.game-kit)>.activity-toolbar,body[data-focus="on"] [data-focus~="host"] .activity-toolbar{width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
/* …and 방법 · 닫기 sit at the same x in every activity on wide screens: 방법 is one width and stands 10px from 닫기. */
@media (min-width:360px){body[data-focus="on"] [data-focus~="host"] .activity-toolbar:has(.activity-help-button),body[data-focus="on"] #studyPanel .compact-game-toolbar:has(.activity-help-button){column-gap:10px!important}
body[data-focus="on"] [data-focus~="host"] .activity-toolbar>.activity-help-button{width:64px!important;padding:0!important;font-size:12px!important}}
body[data-focus="on"] [data-focus~="host"] :is(.game-kit-card,.study-word-card,.reading-screen,.timed-quiz,.word-matching,.study-stage-cover.word-challenge,.say-challenge,.notes-card):not(:has(.activity-mode-entry)){background:var(--focus-box-bg)!important;border:1px solid var(--focus-box-line)!important;border-radius:24px!important;box-shadow:none!important}
body[data-focus="on"] [data-focus~="host"] .game-kit-card{min-height:0}
body[data-focus="on"] [data-focus~="host"] .game-kit-card:is(.is-ready,:has(>*>.sp-hello),:has(>*>.cw-hello))>:has(.game-kit-intro):not(.wr-play){margin-top:auto!important;margin-bottom:auto!important}
body[data-focus="on"] [data-focus~="host"] .game-kit-card.is-ready .mc-start{align-content:center}
body[data-focus="on"] [data-focus~="host"] .wr-card.is-ready .wr-cover{justify-content:center;padding-top:0}
body[data-focus="on"] [data-focus~="host"] .game-kit-card>.ss-start{justify-content:center;padding-top:0}
body[data-focus="on"] [data-focus~="host"] .gd-card.is-ready .gd-cover{padding-top:0;justify-content:center}
body[data-focus="on"] [data-focus~="host"] .sb-card.is-ready>.sb-play{flex:1 1 auto;margin:0!important;display:flex;flex-direction:column}
body[data-focus="on"] [data-focus~="host"] .sb-card.is-ready .sb-start{margin-block:auto}
/* 단어 읽기 연습: its buttons sit inside the box's bottom edge (they were under the card) */
body[data-focus="on"] [data-focus~="host"] .book-panel:has(>.study-word-card){display:grid!important;grid-template-rows:auto minmax(0,1fr) auto;row-gap:0}
body[data-focus="on"] [data-focus~="host"] .book-panel:has(>.study-word-card)>.study-word-card{grid-row:2/4;grid-column:1;padding-bottom:84px!important}
body[data-focus="on"] [data-focus~="host"] .book-panel:has(>.study-word-card)>:is(.study-next,.study-actions){grid-row:3;grid-column:1;align-self:end;position:relative;z-index:1;margin:0 14px 16px!important;width:auto!important;max-width:620px;justify-self:stretch;box-sizing:border-box}
body[data-focus="on"] [data-focus~="host"] .book-panel:has(>.study-word-card)>:not(.study-word-card,.study-next,.study-actions,.activity-toolbar){grid-column:1}
/* 짝꿍 찾기: the field never pushes the box past the bottom (its measured min-height came from the whole window) */
body[data-focus="on"] [data-focus~="host"] .book-panel>.word-matching{min-height:0!important}
body[data-focus="on"] [data-focus~="host"] .word-matching>.matching-playfield{min-height:0!important}
/* the game itself sits in the box's middle once it starts (메모리 카드, O/X 스피드, 섀도잉) */
body[data-focus="on"] [data-focus~="host"] .game-kit-card>:is(.mc-play,.ox-frame,.sh-frame){margin-block:auto!important}
body[data-focus="on"] [data-focus~="host"] .game-kit-card>.game-kit-finish{margin-block:auto!important}
/* The sheet sits flush at the top (2026-11-22, owner: “엑티비티 집중 모두 확장시 영상처럼 위아래 흔들리는 현상 수정”): the sheet no
   longer slides in (its 36px slide made the page taller while it ran, so the scroll jumped and settled back — the shake),
   and no list padding is left above it, so the page is exactly one screen tall. */
body[data-focus="on"] .student-learn-panel .student-activity-list[data-focus="path"]{padding:0!important;gap:0!important}
/* 파닉스 · 섀도잉 기록 도전 (2026-11-22, owner: “아래다 녹음 버튼 넣어 원래대로 녹음은 그대로 할 수 있게”): the list scrolls inside
   the box and 힌트 · 말하기 · 넘어가기 stay at its bottom, however many words the Day has (they used to fall below the screen). */
body[data-focus="on"] [data-focus~="host"] .game-kit-view>.say-challenge{display:flex;flex-direction:column;min-height:0}
body[data-focus="on"] [data-focus~="host"] .say-challenge>.say-card{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
body[data-focus="on"] [data-focus~="host"] .say-card>.say-list{flex:1 1 auto;min-height:0;max-height:none;align-content:start}
body[data-focus="on"] [data-focus~="host"] .say-card>:is(.say-note,.say-actions){flex:none}
/* (2026-11-22, owner: “이거 스크롤로 안내려가 창 크기를 연습 / 도전 기록 나오는 창 크키안에 하단 버튼까지 나오게 해줘”): the sheet is
   exactly one screen tall while a 기록 도전 reading list is open, so the card ends at the screen's bottom like the 연습 | 기록 도전
   box, the list scrolls inside it and 힌트 · 시작 · 넘어가기 are always on screen, however many words the Day has. */
body[data-focus="on"] [data-focus~="sheet"]:has(.say-challenge){height:100dvh;max-height:100dvh}
body[data-focus="on"] [data-focus~="host"] .game-kit-view:has(>.say-challenge){grid-template-rows:auto minmax(0,1fr);flex:1 1 auto}
body[data-focus="on"] [data-focus~="host"] .game-kit-view>.say-challenge{height:100%}
body[data-focus="on"] [data-focus~="host"] .say-card>.say-list{overflow-y:auto;overscroll-behavior:contain;grid-auto-rows:max-content}
/* 문장 속 단어 (2026-11-22, owner: “엑티비티 흰 박스 중간으로 다 옮겨”): its start screen and its question sit in the middle
   of the white box, like the 연습 | 기록 도전 tiles (docs/activity-plugin.md ‘활동 화면 디자인 규칙’). */
body[data-focus="on"] [data-focus~="host"] .game-kit-card>.wc-body{margin-block:auto!important}
