/* 숙제 관리 (2026-11-14): the teacher's homework tab (dist/homework-admin.js). Phone first (360–412 px), 44 px targets,
   theme colours only (--t-*), nothing moves while it loads (the list keeps a skeleton's height, the status line its own). */
.hw-admin{position:relative;display:flow-root}
.hw-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.hw-top{position:absolute;top:8px;right:0;z-index:1;display:flex;margin:0}
/* ＋ 새 숙제 (2026-11-15, owner: "새 숙제 버튼은 좀 더 줄이고 위치를 내려서 빈공간 최소화", then "줄에 붙으면 안돼 … 화색줄과 파란줄 중앙에"): a small pill midway between the class strip and the first date line (top 8px: 16px clear of both); on the first date
   line's right end; the tap area stays 44 px (::after). The first line (or the empty note) keeps room for it. */
.hw-new{position:relative;min-height:34px;padding:0 14px;border-radius:999px;font-size:14px}
.hw-new::after{content:'';position:absolute;inset:-5px -2px}
.hw-list>.hw-group:first-child .hw-group-head{padding-right:108px;min-height:34px}
.hw-list>.hw-empty:first-child,.hw-list>:first-child:not(.hw-group){padding-right:108px;min-height:34px}
.hw-status{min-height:18px;margin:0 0 6px;color:var(--t-success);font-size:14px;font-weight:700;line-height:20px}
.hw-status.is-error{color:var(--t-error)}
.hw-text-button{min-height:44px;margin:0;padding:0 6px;border:0;background:none;color:var(--t-primary);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.hw-text-button.is-danger{color:var(--t-error)}
.hw-text-button:focus-visible,.hw-admin button:focus-visible,.hw-admin input:focus-visible,.hw-admin select:focus-visible{outline:3px solid var(--t-focus);outline-offset:2px}
/* the composer: one inline card */
.hw-composer{box-sizing:border-box;margin:0 0 4px;padding:12px;border:1px solid var(--t-line);border-radius:14px;background:var(--t-card);color:var(--t-ink)}
.hw-composer-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hw-composer-head h3{margin:0;font-size:17px}
.hw-type-chips{display:flex;flex-wrap:nowrap;gap:6px;margin:6px -2px 10px;padding:0 2px 4px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.hw-type-chips::-webkit-scrollbar{display:none}
.hw-type-chip{flex:0 0 auto;scroll-snap-align:start;white-space:nowrap;display:inline-flex;align-items:center;gap:4px;min-height:44px;margin:0;padding:0 12px;border:1px solid var(--t-line);border-radius:999px;background:var(--t-surface);color:var(--t-ink);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.hw-type-chip:disabled{opacity:.5;cursor:default}
.hw-missions{margin:0 0 6px;padding:0;list-style:none}
.hw-mission{margin:0 0 6px;padding:6px 8px 8px;border:1px solid var(--t-line);border-radius:12px;background:var(--t-surface)}
.hw-mission-head{display:flex;align-items:center;gap:6px;min-height:44px}
.hw-mission-number{display:inline-flex;flex:0 0 22px;align-items:center;justify-content:center;height:22px;border-radius:50%;background:var(--t-accent-soft);color:var(--t-primary);font-size:12px;font-weight:800}
.hw-mission-icon{flex:0 0 auto;font-size:16px}
.hw-mission-label{flex:1 1 auto;min-width:0;overflow:hidden;font-size:14px;line-height:1.3;text-overflow:ellipsis;white-space:nowrap}
.hw-x,.hw-grip{flex:0 0 44px;width:44px;height:44px;margin:0;padding:0;border:0;background:none;color:var(--t-muted);font-size:16px;cursor:pointer}
.hw-grip{touch-action:none;font-size:20px}
.hw-mission-params{display:flex;flex-wrap:wrap;gap:6px}
.hw-field{display:block;flex:1 1 30%;min-width:0}
.hw-field.is-wide{flex-basis:100%}
.hw-field select,.hw-field input,.hw-note,.hw-title-input,.hw-due input[type="date"],.hw-due input[type="time"]{box-sizing:border-box;width:100%;min-height:40px;margin:0;padding:6px 8px;border:1px solid var(--t-line);border-radius:10px;background:var(--t-bg);color:var(--t-ink);font:inherit;font-size:14px}
/* 기록 도전 · 연습 (2026-11-16: always 모든 활동, no activity chips): 교재 · 회차 (· 횟수) on one line, nothing else (the row is one
   height whatever is picked). 회차 and 횟수 take their widest option (a third of the line at most); the book the room left. */
.hw-field.is-book{flex:1 1 0}
.hw-field.is-book~.hw-field{flex:0 1 auto;max-width:34%}
.hw-field.is-book~.hw-field select{width:auto;max-width:100%}
.hw-note{margin-top:6px}
.hw-param-note{margin:4px 0;color:var(--t-muted);font-size:13px}
/* 불규칙 동사 mission: the 3차 hint under 단계 · 세트, a full row of its own at one line's height (12 px; 2026-11-16). */
.hw-verbs-hint{flex:1 1 100%;min-height:18px;margin:0;font-size:12px;line-height:18px;word-break:keep-all}
.hw-empty-missions{margin:0 0 8px;color:var(--t-muted);font-size:13px}
.hw-form-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0}
.hw-form-label{flex:0 0 40px;color:var(--t-muted);font-size:13px;font-weight:700}
.hw-form-row>.hw-title-input,.hw-form-row>.hw-segment,.hw-form-row>.hw-due{flex:1 1 0;min-width:0}
.hw-segment{display:flex;border:1px solid var(--t-line);border-radius:12px;overflow:hidden}
.hw-segment button{flex:1 1 0;min-height:44px;margin:0;border:0;background:var(--t-bg);color:var(--t-muted);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.hw-segment button[aria-checked="true"]{background:var(--t-accent-soft);color:var(--t-primary)}
/* 학생 고르기 (2026-11-19): 두 줄까지, 길면 옆으로 밀어요. */
.hw-students{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,auto);grid-auto-columns:max-content;gap:6px;margin:0 0 6px 48px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-bottom:2px}
.hw-students::-webkit-scrollbar{display:none}
.hw-student-chip.is-all{font-weight:800}
.hw-student-chip{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 10px;border:1px solid var(--t-line);border-radius:999px;background:var(--t-bg);font-size:14px;cursor:pointer}
.hw-student-chip input{width:18px;height:18px;margin:0;accent-color:var(--t-primary)}
.hw-due{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.hw-due input[type="date"]{flex:1 1 130px;width:auto}
.hw-due input[type="time"]{flex:0 1 100px;width:auto}
.hw-check{display:inline-flex;align-items:center;gap:4px;min-height:44px;font-size:14px;cursor:pointer}
.hw-check input{width:18px;height:18px;margin:0;accent-color:var(--t-primary)}
.hw-give{width:100%;min-height:48px;margin-top:4px;border-radius:12px;font-size:16px}
/* the list */
.hw-list{min-height:120px}
.hw-empty{margin:12px 0;color:var(--t-muted);font-size:14px}
.hw-skeleton{display:flow-root}
.hw-skeleton-row{display:block;height:96px;margin:0 0 8px;border:1px solid var(--t-line);border-radius:14px;background:var(--t-surface)}
.hw-skeleton.is-grid .hw-skeleton-row{height:120px}
/* 같은 마감 묶기 (2026-11-14): one heading line per deadline (or creation day), its homeworks below by name. */
.hw-group{margin:0 0 10px}
.hw-group-head{display:flex;align-items:center;gap:6px;min-height:28px;margin:0 0 6px;padding:0 2px 4px;border-bottom:2px solid var(--t-primary);color:var(--t-ink);font-size:14px;font-weight:800;line-height:20px}
.hw-group-head .hw-overdue{margin-left:0;font-size:12px;line-height:18px}
.hw-card{margin:0 0 6px;border:1px solid var(--t-line);border-radius:14px;background:var(--t-card);color:var(--t-ink)}
.hw-card>summary{display:flex;align-items:center;gap:8px;min-height:48px;padding:4px 10px;list-style:none;cursor:pointer}
.hw-card>summary::-webkit-details-marker{display:none}
.hw-card>summary:focus-visible{outline:3px solid var(--t-focus);outline-offset:-3px;border-radius:14px}
.hw-card-title{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}
.hw-card-title strong{overflow:hidden;font-size:15px;text-overflow:ellipsis;white-space:nowrap}
.hw-overdue{display:inline-block;margin-left:4px;padding:0 6px;border-radius:999px;background:var(--t-error-soft);color:var(--t-error);font-weight:700}
.hw-card-all{display:flex;flex:0 0 auto;flex-direction:column;align-items:flex-end;font-size:15px;font-weight:800}
.hw-card-all small{color:var(--t-muted);font-size:11px;font-weight:600}
.hw-chevron{flex:0 0 auto;transition:transform .2s ease}
.hw-card[open] .hw-chevron{transform:rotate(180deg)}
@media (prefers-reduced-motion:reduce){.hw-chevron{transition:none}}
.hw-lines{margin:0;padding:0 10px 8px;list-style:none}
.hw-line{margin:0 0 6px}
.hw-line-text{display:flex;gap:8px;justify-content:space-between;font-size:13px}
.hw-line-label{overflow:hidden;min-width:0;text-overflow:ellipsis;white-space:nowrap}
.hw-line-count{flex:0 0 auto;color:var(--t-muted);font-weight:700}
.hw-bar{display:block;height:4px;margin-top:3px;border-radius:2px;background:var(--t-line);overflow:hidden}
.hw-bar>span{display:block;height:100%;border-radius:2px;background:var(--t-success)}
.hw-detail{padding:0 10px 4px;border-top:1px solid var(--t-line)}
.hw-detail-actions{display:flex;justify-content:flex-end}
.hw-list-actions{display:flex;justify-content:flex-end;margin-top:4px}
/* the photo, full size */
.hw-photo-layer{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:16px;background:color-mix(in srgb,var(--t-ink) 82%,transparent)}
.hw-photo-box{display:flex;flex-direction:column;max-width:min(100%,720px);max-height:100%;padding:8px;border-radius:14px;background:var(--t-card);color:var(--t-ink)}
.hw-photo-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-left:6px}
.hw-photo-close{width:44px;height:44px;margin:0;border:0;background:none;color:var(--t-ink);font-size:18px;cursor:pointer}
.hw-photo-full{display:block;max-width:100%;max-height:calc(100vh - 160px);object-fit:contain;border-radius:8px}
.hw-photo-head span{margin-left:6px;color:var(--t-muted);font-size:13px;font-variant-numeric:tabular-nums}
.hw-photo-nav{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.hw-photo-nav button{min-height:44px;margin:0}
/* A homework's students (2026-11-15): 학습 관리's tiles, lower; the names four to a row, coloured by their state. */
.hw-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:10px 0 0}
/* Number above, label below (owner: "윗줄 숙자, 아래줄 글씨"), lower than 학습 관리's 64 px. */
.hw-tile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;height:50px;border:1px solid var(--teacher-line,var(--t-line));border-radius:10px;background:var(--n-fffdf8,#fffdf8)}
.hw-tile b{font-size:18px;line-height:1.15;font-variant-numeric:tabular-nums}
.hw-tile span{font-size:11px;line-height:1.3;white-space:nowrap}
.hw-tile.is-done{background:var(--i-e9f3e5,#e9f3e5);border-color:var(--i-c7dbbd,#c7dbbd);color:var(--i-46733b,#46733b)}
.hw-tile.is-doing{background:var(--n-fff1d5,#fff1d5);border-color:var(--n-e6cfa4,#e6cfa4);color:var(--n-744c25,#744c25)}
.hw-tile.is-todo{background:var(--n-fff0e7,#fff0e7);color:var(--n-a13e36,#a13e36)}
.hw-left-filter{display:flex;align-items:center;justify-content:center;width:100%;height:44px;min-height:44px;margin:8px 0;padding:6px 14px;font-size:13px;box-sizing:border-box}
p.hw-all-done{color:var(--i-46733b,#46733b);font-weight:750}
/* Names without boxes (2026-11-15, owner: "네모칸 말고 세로 선으로만 깔끔하게 분리"): four a row, a thin line between
   columns, the state in the text colour only. */
.hw-names{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px 0;margin:0;padding:0;list-style:none;container:hw-names/inline-size}
/* The name sits dead centre in its column; ✓ / 1/3 hang on its right without moving it
   (2026-11-15, owner: "학생 이름이 가운데 위치 숙제 했을 경우 오른쪽에 체크 표시 생성. 학생 이름 위치는 바뀌지 않음").
   The mark column always holds the widest mark shown (.hw-name-room, invisible) and never gets less: on a narrow phone
   the name moves left only as far as the mark needs (only on a phone, most with a long mark such as 9/10) instead of the
   mark running into the next cell; a name is never cut for a mark. */
.hw-name{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,auto) minmax(min-content,1fr);align-items:center;min-width:0;height:30px;padding:0 4px;border-left:1px solid var(--t-line);font-size:13px;font-weight:700}
.hw-name::before{content:''}
.hw-name-side{display:grid;justify-items:start;align-items:center;padding-left:3px}
.hw-name-side>*{grid-area:1/1}
.hw-name:nth-child(4n+1){border-left:0}
.hw-name.is-done{color:var(--i-46733b,#46733b)}
.hw-name.is-doing{color:var(--n-744c25,#744c25)}
.hw-name.is-todo{color:var(--n-a13e36,#a13e36)}
.hw-name-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hw-name-mark,.hw-name-room{font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
.hw-name-room{visibility:hidden}
/* A narrow phone (the list under 320px: 360px phones and smaller) gives the name the room the padding and a smaller mark free,
   so a three-syllable name stays whole beside '9/10' at 320px and sits closer to the centre at 360px. */
@container hw-names (max-width:320px){.hw-name{padding:0 2px}.hw-name-side{padding-left:2px}.hw-name-mark,.hw-name-room{font-size:10px;letter-spacing:-.02em}}
/* The photos the shown children sent: a strip under the names, one small picture with the child's name under it; a tap
   opens it full size (2026-11-15: kept out of the name cells, where a picture did not fit beside a name on a phone). */
.hw-thumbs{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0 0;padding:6px 0 0;border-top:1px solid var(--t-line);list-style:none}
.hw-thumbs>li{display:block;min-width:0}
.hw-thumb{display:flex;flex-direction:column;align-items:center;gap:2px;width:56px;min-height:44px;margin:0;padding:2px 0;border:0;border-radius:8px;background:none;color:var(--t-ink);font:inherit;cursor:pointer}
.hw-thumb img{display:block;width:36px;height:36px;border-radius:6px;object-fit:cover;background:var(--t-surface)}
.hw-thumb span{display:block;max-width:100%;overflow:hidden;font-size:11px;font-weight:700;line-height:14px;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:340px){.hw-tile span{font-size:10px}.hw-name{font-size:12px}}
/* 복습 미션: 게임 · 책 여러 개 고르기 (2026-11-19). A row of chips per choice that scrolls sideways; a chosen chip is filled. */
.hw-chip-group{display:flex;align-items:center;gap:6px;flex:1 1 100%;min-width:0;margin:2px 0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.hw-chip-group::-webkit-scrollbar{display:none}
.hw-chip-name{flex:none;min-width:2.2em;color:var(--t-muted);font-size:12.5px;font-weight:800}
.hw-chip{flex:none;min-height:40px;margin:0;padding:0 12px;border:1px solid var(--t-line);border-radius:999px;background:var(--t-bg);color:var(--t-ink);font:inherit;font-size:13.5px;font-weight:700;white-space:nowrap;box-shadow:none}
.hw-chip.is-on{border-color:var(--t-primary);background:var(--t-accent-soft);color:var(--t-ink)}
/* 복습 미션의 책 고르기 (2026-11-19): 학생 복습 탭 책 줄처럼 한 줄 요약 → 누르면 번호 붙은 책 목록이 펼쳐지고 그 안에서 위아래로 밀어 고름. */
.hw-review-books{flex:1 1 100%;min-width:0;margin:4px 0 2px;border:1px solid var(--t-line);border-radius:14px;background:var(--t-bg);overflow:hidden}
.hw-rb-summary{display:flex;align-items:center;gap:8px;width:100%;min-height:48px;margin:0;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--t-ink);font:inherit;text-align:left;box-shadow:none}
.hw-rb-value{flex:1 1 auto;min-width:0;overflow:hidden;font-size:14px;font-weight:800;white-space:nowrap;text-overflow:ellipsis}
.hw-rb-action{flex:none;color:var(--t-muted);font-size:12px;font-weight:700}
.hw-rb-chevron{flex:none;width:16px;height:16px;color:var(--t-muted);transition:transform .2s ease}
.hw-review-books.is-open .hw-rb-chevron{transform:rotate(90deg)}
.hw-rb-list{max-height:220px;margin:0;padding:0 0 4px;border-top:1px solid var(--t-line);list-style:none;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.hw-rb-list[hidden]{display:none}
.hw-rb-list li{margin:0}
.hw-rb-row{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;margin:0;padding:0 12px;border:0;border-radius:0;background:transparent;color:var(--t-ink);font:inherit;font-size:14px;font-weight:700;text-align:left;box-shadow:none}
.hw-rb-row.is-on{background:var(--t-accent-soft)}
.hw-rb-num{flex:none;display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:999px;background:var(--t-line);color:var(--t-ink);font-size:12px;font-weight:800}
.hw-rb-num.is-any{background:transparent;color:var(--t-muted)}
.hw-rb-title{flex:1 1 auto;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.hw-rb-check{flex:none;display:inline-grid;place-items:center;width:22px;height:22px;border:1.5px solid var(--t-line);border-radius:999px;color:var(--t-on-primary);font-size:12px;font-weight:900}
.hw-rb-check.is-on{border-color:var(--t-primary);background:var(--t-primary)}
@media (prefers-reduced-motion:reduce){.hw-rb-chevron{transition:none}}
