/* ═══════════════════════════════════════════════════════════════
   css/b/screens.css — 화면별(설계서 §6)
   소유: 쪽 머리(.screen-intro = B .page-head) · 쪽 바탕의 구역 머리 · 전체 화면 상세 · 작성 폼 · 투표·댓글 ·
        캘린더 · 시간표 · 급식 · 학사일정 · 자습 출석 · 자료실 · 갤러리 · 학생 명부 · 자리 바꾸기 · 접수함 · 설정 · 개발자.
   부품의 모양은 components.css 가 맡고, 여기는 화면 고유의 배치와 그 화면에만 있는 부품이다.
   ⚠️ 미디어 블록은 파일 맨 끝, B 순서(≥700 → 가로 ≥760 → 가로 ≥1180 → ≤460).
   ═══════════════════════════════════════════════════════════════ */

/* ── 쪽 머리 — B .page-head ── */
.screen-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 18px 2px 24px; }
.screen-intro > div:first-child { min-width: 0; }
.screen-title { margin: 0; font-size: 28px; font-weight: 650; line-height: 1.25; color: var(--ink); }
.screen-sub { margin: 7px 0 0; color: var(--t-page-sub); font-size: 13px; }
/* 쪽 바탕 위의 구역 머리 — B .album-head 결 */
.content-section .section-head { margin: 20px 2px 12px; }
.content-section .screen-intro + .section-head { margin-top: 0; }
.card .section-head, .panel .section-head, .list-panel .section-head { margin: 0 0 18px; }
/* 상세가 열리면 화면 머리를 통째로 감춘다 — 나갈 길은 상세 안의 .detail-back 하나(js/detail.js 가 body.detail-open 을 맞춘다). */
body.detail-open .content-section:not(.hidden) > .screen-intro,
body.detail-open .content-section:not(.hidden) > .section-head { display: none; }

/* ── 전체 화면 상세(공지·건의) ── */
.detail-screen { background: var(--panel-bg); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow); }
.detail-back {
  width: 100%; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px;
  border-bottom: 1px solid var(--line); background: transparent; color: var(--t-nav); font-size: 13px; font-weight: 560; text-align: left;
  border-radius: var(--r-panel) var(--r-panel) 0 0; transition: color var(--move);
}
.detail-back:hover { color: var(--green-deep); }
.detail-back .ui-icon { font-size: 16px; }
.detail-screen-body { padding: 22px 20px 28px; max-width: 680px; }
.detail-title { margin: 0; font-size: 22px; font-weight: 650; line-height: 1.35; letter-spacing: -.03em; }
.detail-screen .list-detail { padding: 0; border-bottom: 0; background: transparent; }
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 12px; }
.detail-meta { color: var(--muted); font-size: 11px; }
.detail-body { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.65; color: var(--ink); }
.detail-link { margin: 10px 0 0; font-size: 13px; line-height: 1.5; word-break: break-all; }
.detail-link .ui-icon { font-size: 15px; }
.attach-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-item); background: var(--paper-2); font-size: 13px; }
.poll-opts { display: grid; gap: 8px; margin-top: 6px; }
.poll-opt {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r-item); background: var(--paper);
  font-size: 13px; font-weight: 560; color: var(--ink); text-align: left;
}
.poll-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--pct, 0%); background: var(--green-softer); transition: width .5s ease; }
.poll-label, .poll-count { position: relative; }
.poll-count { flex: none; color: var(--muted); font-size: 11px; }
.poll-opt.is-mine { border-color: var(--green); }
.poll-opt:disabled { opacity: .7; cursor: not-allowed; }
.voters-box { margin-top: 4px; padding: 8px 10px; border-radius: var(--r-cell); background: var(--paper-2); color: var(--muted); font-size: 12px; line-height: 1.5; }
.answer-list { display: grid; gap: 6px; margin-top: 6px; max-height: 220px; overflow-y: auto; }
.answer-row, .comment-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; line-height: 1.55; }
.answer-row { padding: 6px 6px 6px 12px; border-radius: var(--r-cell); background: var(--paper-2); }
.answer-row strong, .comment-row strong { margin-right: 6px; color: var(--ink); font-weight: 560; }
.answer-text, .comment-text { min-width: 0; word-break: break-word; color: var(--text-2); }
.comment-list { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
/* 작성 폼(공지·투표·건의) — 목록 위의 카드 */
.composer-title { margin: 0 0 14px; font-size: 16px; font-weight: 680; color: var(--ink); }
.composer .field-input + .field-input { margin-top: 8px; }
.list-item.is-pinned { background: transparent; }

.notice-date.is-due { color: var(--green-deep); font-weight: 650; }
.list-item.board-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 58px; }
.board-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-date { white-space: nowrap; }
/* ── 캘린더 ── */
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.calendar-layout > * { min-width: 0; }
.cal-card.card { background: var(--panel-bg); border-color: var(--line); border-radius: var(--r-panel); padding: 20px; }
/* B .calendar-head */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.cal-toolbar strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.cal-nav { display: flex; align-items: center; gap: 4px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-week { margin-bottom: 6px; }
.cal-week span { padding: 5px 0; text-align: center; color: var(--t-cal-head); font-size: 11px; }
.cal-cell {
  /* ⚠️ flex 로 둔다 — 버튼은 block 이어도 내용을 세로 가운데에 놓아, 버튼 칸(이번 달)과 div 칸(앞뒤 달)의 숫자 높이가 어긋났다. */
  position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
  aspect-ratio: 1.05; min-width: 0; overflow: hidden; padding: 7px;
  border-radius: var(--r-cell); background: transparent; text-align: left; color: var(--t-cal); font-size: 11px;
}
button.cal-cell { cursor: pointer; transition: background-color var(--move); }
button.cal-cell:hover { background: var(--nav-hover); }
.cal-cell.is-dim { color: var(--t-cal-dim); }
.cal-cell:has(.cal-day.today), .cal-cell.today { background: var(--today-bg); color: var(--t-today); }
.cal-cell.is-selected { box-shadow: inset 0 0 0 1.5px var(--green); }
.cal-day { display: block; font-size: 11px; line-height: 1.2; }
.cal-day.today { font-weight: 700; color: var(--t-today); }
.cal-label { display: block; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t-cal); font-size: 10px; }
.cal-label::before { content: ''; display: inline-block; width: 4px; height: 4px; margin-right: 3px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.cal-more { display: block; margin-top: 2px; color: var(--t-cal-head); font-size: 10px; }
.event-dot { position: absolute; left: 7px; right: 7px; bottom: 7px; height: 6px; border-radius: var(--r-tag); background: var(--event); }
.event-dot.strong { background: var(--event-strong); }
.agenda.card { background: var(--panel-bg); border-color: var(--line); border-radius: var(--r-panel); padding: 20px; overflow: visible; }
.agenda { scroll-margin-top: 16px; scroll-margin-bottom: calc(var(--nav-clear) + 8px); }
.agenda h3 { margin: 0 0 14px; font-size: 16px; font-weight: 680; color: var(--ink); }
.agenda-item { position: relative; display: block; width: 100%; padding: 0 0 14px 18px; background: transparent; text-align: left; color: inherit; }
.agenda-item:last-child { padding-bottom: 0; }
.agenda-item::before { content: ''; position: absolute; left: 2px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.agenda-item::after { content: ''; position: absolute; left: 5px; top: 16px; bottom: 2px; width: 1px; background: var(--line); }
.agenda-item:last-child::after { display: none; }
.agenda-item strong { display: block; font-size: 13px; font-weight: 560; line-height: 1.45; color: var(--ink); }
.agenda-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.week-agenda { display: grid; gap: 10px; }
.week-day { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding-top: 10px; border-top: 1px solid var(--rule-2); }
.week-day:first-child { border-top: 0; padding-top: 0; }
.week-day-head strong { display: block; font-size: 13px; font-weight: 650; color: var(--ink); }
.week-day.is-today .week-day-head strong { color: var(--green-deep); }
.week-day-head span { font-size: 11px; color: var(--muted); }
.week-day-body .agenda-item { padding-bottom: 10px; }
.popup-event { padding: 10px 0; border-top: 1px solid var(--rule-2); }
.popup-event:first-child { border-top: 0; padding-top: 0; }
.popup-event-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.popup-event-head strong { min-width: 0; font-size: 13px; font-weight: 560; color: var(--ink); }
.popup-event-actions { display: flex; gap: 4px; flex: none; }
.popup-event-meta { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.popup-event p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.6; white-space: pre-wrap; }

/* ── 시간표 — 넓은 화면은 주간 표, 좁은 화면은 요일 띠 + 교시 줄(둘 다 그리고 CSS 가 고른다) ── */
.tt-week-head { display: block; margin-top: 0; }
.tt-class-head { margin-top: 0; }
.tt-empty { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.tt-empty p { margin: 0; }
.tt-data-info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.tt-data-info span { flex: 1 1 180px; min-width: 0; }
.tt-data-info .btn { max-width: 100%; }
.week-table { display: none; padding: 6px 12px 10px; background: var(--panel-bg); border-color: var(--line); border-radius: var(--r-panel); }
.tt-phone { display: block; }
.tt-head, .tt-row { display: grid; grid-template-columns: 64px repeat(5, minmax(0, 1fr)); }
.tt-head { min-height: 40px; align-items: center; color: var(--t-cal-head); font-size: 11px; text-align: center; }
.tt-head .today { color: var(--green-deep); font-weight: 650; }
.tt-row { border-top: 1px solid var(--rule); }
.tt-time { display: grid; place-items: center; align-content: center; gap: 2px; padding: 8px 4px; color: var(--t-clock); font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.tt-time strong { display: block; color: var(--t-period); font-size: 13px; font-weight: 400; }
.week-table .subject {
  min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  margin: 3px; padding: 6px 5px; border-radius: var(--r-cell); text-align: center; line-height: 1.3;
  color: var(--ink); font-size: 13px; font-weight: 610; word-break: keep-all;
}
.week-table .subject span { color: var(--t-place); font-size: 11px; font-weight: 400; }
.week-table .subject.today { background: var(--highlight); }
.week-table .subject.is-special { color: var(--muted); font-weight: 500; }
.week-table .subject.now { background: var(--green-soft); color: var(--t-nav-active); }
.week-table .subject.now span { color: var(--t-nav-active); }
.tt-empty-cell { color: var(--t-cal-dim); }
.tt-period.tt-period { min-height: 0; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.tt-period-no.tt-period-no { flex: none; width: 44px; display: flex; flex-direction: column; align-items: center; color: var(--t-clock); font-size: 11px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.tt-period-no strong { color: var(--t-period); font-size: 13px; font-weight: 610; }
.tt-period .list-copy strong { font-size: 13px; font-weight: 610; }
.tt-period.is-special .list-copy strong { color: var(--muted); font-weight: 500; }
.list-item.list-item.tt-period.now { background: var(--highlight); border-radius: var(--r-cell); margin: 0 -8px; padding-left: 8px; padding-right: 8px; width: calc(100% + 16px); }

/* ── 급식 ── */
.meal-source-note, .meal-data-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.meal-source-note { margin: -12px 2px 14px; }
.meal-data-note { margin: 12px 0 0; }
.meal-data-note a { text-decoration: underline; text-underline-offset: 3px; }
.meal-label { margin: 0 0 6px; color: var(--t-more); font-size: 11px; }
.meal-heading { margin: 0 0 12px; font-size: 16px; font-weight: 680; color: var(--ink); }
.meal-day-list { border-top: 1px solid var(--rule-2); }
.meal-open { color: var(--muted); font-size: 14px; flex: none; }
.meal-week-heading { margin: 0 0 12px; font-size: 16px; font-weight: 680; color: var(--ink); }
.meal-week { gap: 0; }
.meal-week-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--rule-2); }
.meal-week-row:first-child { border-top: 0; }
.meal-week-row .tag { min-width: 34px; justify-content: center; margin-top: 1px; }
.meal-week-row .list-copy strong { font-size: 13px; }
.meal-week-row .list-copy p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; white-space: normal; }
.meal-week-row.is-past { opacity: .55; }
#section-meals .list-copy strong, #section-meals .list-copy p { white-space: normal; overflow-wrap: anywhere; }
.meal-dish-content { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 4px; max-width: 100%; min-width: 0; }
.meal-dish-content .dish-name { font-size: 13px; font-weight: 560; }
.meal-dish-content .meal-allergy-numbers { color: var(--t-tag); font-size: 10px; font-weight: 400; overflow-wrap: anywhere; }
.meal-dish-content.has-allergen .dish-name { color: var(--danger); }
.meal-allergy-warning { flex-basis: 100%; color: var(--danger); font-size: 11px; font-weight: 560; line-height: 1.6; overflow-wrap: anywhere; }
.meal-caution { padding: 1px 4px; border-radius: var(--r-tag); background: var(--danger-soft); }
.meal-week-dish { display: block; margin-top: 4px; }
.meal-week-dish:first-child { margin-top: 0; }
.home-dish:has(.has-allergen) { align-self: flex-start; }
.meal-settings-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.meal-settings-form legend { margin-bottom: 10px; font-size: 13px; font-weight: 560; color: var(--ink); }
.meal-allergen-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 4px 12px; }
.meal-allergen-option, .meal-number-option { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13px; color: var(--ink); cursor: pointer; }
.meal-allergen-option input, .meal-number-option input { width: 18px; height: 18px; flex: none; accent-color: var(--green-deep); }
.meal-number-option { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.meal-settings-note { margin: 12px 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.meal-settings-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.meal-settings-actions p { flex: 1 1 180px; margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.meal-settings-form fieldset:disabled { opacity: .65; }
.essential-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-3); text-align: left; color: inherit; text-decoration: none; font-size: 13px; }
.essential-row:last-child { border-bottom: 0; }

/* ── 학사일정 ── */
#sched-next { background: var(--dday-grad); border-color: var(--dday-line); }
.sched-next-label { margin: 0 0 8px; color: var(--t-dday-label); font-size: 13px; }
.sched-next-title { margin: 0; font-size: 20px; font-weight: 650; color: var(--ink); line-height: 1.3; }
.sched-next-date { margin: 8px 0 0; color: var(--t-dday-small); font-size: 13px; }
.sched-bar-track { height: 4px; margin-top: 16px; border-radius: var(--r-bar); background: var(--line); overflow: hidden; }
.sched-bar-fill { height: 100%; background: var(--green); }

/* ── 자습 출석 ── */
.attendance-hero { display: flex; align-items: center; gap: 14px; padding: 20px; }
.attendance-hero.warn { background: var(--cream); border-color: var(--warn-line); }
.attendance-check { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: var(--r-item); background: var(--green-softer); color: var(--green-deep); }
.attendance-check .ui-icon { font-size: 22px; }
.attendance-hero.warn .attendance-check { background: var(--paper); color: var(--warn); }
.attendance-hero strong { display: block; font-size: 16px; font-weight: 680; color: var(--ink); }
.attendance-hero p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.attend-metrics { margin-top: 10px; }
.attend-actions { display: grid; gap: 12px; justify-items: start; }
.attend-actions .attend-code-form, .attend-actions .attend-scan { width: 100%; }
.attend-scan-reader { width: 100%; max-width: 360px; margin: 0 auto; overflow: hidden; border-radius: var(--r-item); background: var(--paper-2); }
.attend-scan-hint { margin: 8px 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.attend-code-form input { text-transform: uppercase; letter-spacing: .06em; }
.attend-board-card .cal-toolbar { margin-bottom: 10px; }
.board-note { margin: 0 0 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.attend-export { width: 100%; margin-top: 12px; }
.attend-weekdays { margin-bottom: 14px; }
.attend-skips { margin-bottom: 4px; }
.attend-skips .tag { padding-right: 3px; }
.attend-board-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.attend-row { text-align: left; }
.attend-board-list.is-select { user-select: none; -webkit-user-select: none; }
.list-item.list-item.attend-row.is-selected { background: var(--green-softer); }
.attend-check { flex: none; font-size: 22px; color: var(--t-cal-dim); }
.attend-check.on { color: var(--green-deep); }
.attend-bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 12px; border-radius: var(--r-item); background: var(--paper-2); }
.attend-bulk-count { font-size: 13px; font-weight: 650; color: var(--ink); }
.attend-bulk-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.attend-bulk-date select { width: auto; }
.attend-bulk-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.attend-student-picker { margin: 0 0 10px; }
.attend-student-trigger, .attend-student-item {
  width: 100%; min-height: 52px; display: flex; align-items: center; gap: 11px; padding: 8px 12px; text-align: left; color: inherit; background: transparent;
}
.attend-student-trigger { border: 1px solid var(--line); border-radius: var(--r-item); background: var(--paper); }
.attend-student-trigger:hover { border-color: var(--line-strong); }
.attend-student-caret { margin-left: auto; color: var(--muted); transition: transform var(--move); }
.attend-student-picker.is-open .attend-student-caret { transform: rotate(180deg); }
.attend-student-list { margin-top: 6px; max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-item); background: var(--paper); }
.attend-student-item { border-bottom: 1px solid var(--rule-3); }
.attend-student-item:last-child { border-bottom: 0; }
/* 테두리 상자 안의 목록이라 줄을 상자 폭에 맞춘다(목록 줄 공통의 좌우 -8px 는 상자 밖으로 넘친다). */
.attend-student-list .list-item.list-item { width: 100%; margin: 0; padding: 8px 12px; border-radius: 0; }
.attend-student-list .list-item.list-item::after { display: none; }
.attend-student-item:hover { background: var(--highlight); }
.attend-student-item.is-selected { background: var(--green-softer); }
.attend-student-check { margin-left: auto; color: var(--green-deep); }
.attend-edit-row .list-copy p { margin-top: 2px; }
.mini-month-title { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.mini-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; max-width: 360px; }
.mini-dow { padding: 4px 0; text-align: center; font-size: 11px; color: var(--t-cal-head); }
.mini-day { height: 30px; display: grid; place-items: center; border-radius: var(--r-cell); font-size: 11px; color: var(--t-cal-dim); }
.mini-day.study { background: var(--paper-2); color: var(--t-cal); }
.mini-day.on { background: var(--green-soft); color: var(--t-nav-active); font-weight: 650; }

/* ── 자료실 ── */
.content-section > .search-box { margin: 0 2px 6px; }
.archive-item-more.icon-btn { width: 32px; height: 32px; color: var(--muted); }

/* ── 갤러리 — B .album-page-grid ── */
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.gl-tile {
  position: relative; margin: 0; aspect-ratio: 1.08; overflow: hidden;
  border: 1px solid var(--photo-line); border-radius: var(--r-item); background: var(--photo-bg);
}
.gl-tile::after { content: ''; position: absolute; inset: 0; z-index: 1; background: var(--photo-shade); pointer-events: none; }
.gl-tile img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
/* 목록에서도 날짜·수정됨을 읽을 수 있게 사진 아래에 표시한다. */
.gl-tile-name { position:absolute; left:0; right:0; bottom:0; z-index:2; min-width:0; margin:0; padding:7px 9px; background:var(--paper); color:var(--ink); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; pointer-events:none; }
.gl-tile-name > span { display:block; font-size:11px; color:var(--muted); line-height:1.5; overflow:hidden; text-overflow:ellipsis; }
/* 사진 위 작은 버튼 — 보이는 원은 28px, 누르는 영역은 ::after 44(사진을 가리지 않는다) */
.gl-tile-more {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: var(--r-cell); background: var(--on-photo); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.gl-tile-more .ui-icon { font-size: 16px; }
.gl-tile-more::after, .gl-album-del::after { content: ''; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }
.gl-album-del { position: relative; }
#album-photo-grid.gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── 학생 명부(아코디언 — 전체 화면으로 바꾸지 않는다) ── */
.roster-search-box { width: min(360px, 100%); }
#section-students > .section-head { flex-wrap: wrap; }
.student-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.roster-item { min-width: 0; display: flex; flex-direction: column; }
.roster-item.open { grid-column: 1 / -1; }
.student {
  display: flex; align-items: center; gap: 11px; width: 100%; min-height: 58px; padding: 10px 14px; text-align: left; color: inherit;
  background: var(--card-bg); border: 1px solid var(--card-line); border-radius: var(--r-phone); box-shadow: var(--shadow);
  transition: border-color var(--move);
}
.student:hover { border-color: var(--line-strong); }
.student .avatar { border-radius: 50%; flex: none; }
.roster-avatar { background-size: cover; background-position: center; }
.roster-item.open .student { border-color: var(--green); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.roster-me { font-style: normal; margin-left: 6px; padding: 1px 6px; border-radius: var(--r-tag); background: var(--green-soft); color: var(--t-nav-active); font-size: 10px; font-weight: 650; vertical-align: 1px; }
.roster-pending .avatar { color: var(--muted); background: var(--paper-2); }
.roster-detail-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--fade); }
.roster-item.open .roster-detail-wrap { grid-template-rows: 1fr; }
.roster-detail-wrap > div { overflow: hidden; min-height: 0; }
.roster-detail { padding: 12px 14px 14px; border: 1px solid var(--green); border-top: 0; border-radius: 0 0 var(--r-phone) var(--r-phone); background: var(--paper); }
.roster-facts { display: grid; gap: 0; margin: 0; }
.roster-fact { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 8px; align-items: center; min-height: 36px; border-top: 1px solid var(--rule-2); }
.roster-fact:first-child { border-top: 0; }
.roster-fact dt { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.roster-fact dt .ui-icon { font-size: 15px; }
.roster-fact dd { margin: 0; min-width: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.roster-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.roster-pending-note { margin: 0 0 10px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* ── 자리 바꾸기 ── */
.seat-card { overflow-x: auto; }
.seat-dl-wrap { position: relative; flex: none; }
.seat-dl-btn:disabled { opacity: .45; }
.board-label { width: fit-content; margin: 0 auto 18px; padding: 4px 12px; border-radius: var(--r-tag); background: var(--nav-hover); color: var(--text-2); text-align: center; font-size: 11px; font-weight: 650; }
.seat-zones { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 18px; align-items: start; }
.seat-zone-wrap { display: flex; flex-direction: column; gap: 8px; }
.seat-zone-label { margin: 0; text-align: center; font-size: 11px; font-weight: 650; color: var(--muted); }
.seat-zone { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.seat {
  min-height: 54px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-cell); background: var(--paper-2);
  text-align: center; font-size: 12px; color: var(--muted); transition: border-color var(--move), background-color var(--move);
}
.seat-no { display: block; font-size: 10px; color: var(--muted); }
.seat-name { display: block; margin-top: 2px; font-size: 12px; font-weight: 560; color: var(--ink); }
.seat-empty { border: 1px dashed var(--line-strong); background: transparent; }
.seat-empty .seat-name { color: var(--t-cal-dim); font-weight: 400; }
.seat-pickable { cursor: pointer; }
.seat-pickable:hover { background: var(--green-softer); border-color: var(--green-soft); }
.seat-deal { animation: fade var(--fade) backwards; }
.seat-meta { margin: 12px 2px 0; color: var(--muted); font-size: 11px; }

/* ── 관리 접수함 ── */
.row-actions { display: flex; gap: 6px; flex: none; }

/* ══ 반응형(B 순서) ══════════════════════════════════════════════════ */
@media (min-width: 700px) {
  .week-table { display: block; }
  .tt-phone, #section-timetable .tt-phone { display: none; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .student-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 699.98px) {
  /* 좁은 화면 시간표는 .tt-phone 안의 요일 띠가 주 이동을 맡는다 — 넓은 화면용 주 이동 줄은 감춘다(두 줄이 되지 않게). */
  #section-timetable .tt-week-head { display: none; }
}
@media (orientation: landscape) and (min-width: 760px) {
  .screen-intro { margin-top: 6px; }
}
@media (orientation: landscape) and (min-width: 1180px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 460px) {
  .screen-title { font-size: 23px; }
  .content-section .section-head { margin: 14px 2px 12px; }
  .content-section .screen-intro + .section-head { margin-top: 0; }
  .card .section-head, .panel .section-head { margin: 0 0 12px; }
  .cal-card.card, .agenda.card, .detail-screen { padding: 14px; border-radius: var(--r-phone); }
  .detail-screen { padding: 0; }
  .detail-back { padding: 0 14px; border-radius: var(--r-phone) var(--r-phone) 0 0; }
  .detail-screen-body { padding: 18px 14px 22px; }
  .cal-cell { padding: 5px; font-size: 9px; }
  .cal-day { font-size: 9px; }
  .cal-label + .cal-label, .cal-more { display: none; }
  .seat-zones { gap: 8px; }
  .seat { min-height: 48px; padding: 4px 2px; }
  .row-actions { flex-direction: column; }
  .attend-bulk-actions { width: 100%; margin-left: 0; }
  .roster-search-box { width: 100%; }
}
/* School management keeps the existing CSC palette and fluid component scale. */
.school-class-controls, .school-admin-list, #school-admin-content { display: flex; flex-wrap: wrap; gap: 16px; min-width: 0; }
.school-class-controls { align-items: end; margin-bottom: 24px; }
.school-class-controls label { display: grid; gap: 8px; flex: 1 1 200px; min-width: 0; max-width: 520px; }
.school-field-label, .onb-class-fields label { display: block; color: var(--text-2); font-size: 12px; font-weight: 560; line-height: 1.5; }
.school-class-controls select { display: block; width: 100%; margin: 0; }
.school-class-controls > .btn { min-height: 46px; margin: 0; }
.onb-class-fields > div { display: grid; gap: 6px; min-width: 0; }
#school-admin-content > *, .school-admin-list > * { flex: 1 1 320px; min-width: 0; }
.school-form, .school-management { display: grid; gap: 16px; margin-bottom: 20px; }
.school-form .form-label { display: grid; gap: 8px; min-width: 0; }
.school-gate, #school-admin, .school-management { overflow-wrap: anywhere; }
.school-common-body { white-space: pre-wrap; }
.school-admin-list .btn, .school-management .btn { margin: 8px 8px 0 0; min-height: 44px; white-space: normal; }
@media (max-width: 600px) { #school-admin-content > *, .school-admin-list > * { flex-basis: 100%; } }
