/* css/main.css — 이 가족의 첫 조각 · 나머지 조각과 싣는 순서의 정본 = js/script-families.json(코드 구조 4계단④ · 2026-10-10) · 대시보드 기본(머리·수업 묶음·회차 카드) · 만들기 대화상자 · 시간표 · 수업 등록 · 학교 찾기 */

.page-title    { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; color: var(--text); word-break: keep-all; overflow-wrap: anywhere; }

/* ── Dialog (통합 생성 + 카테고리 추가) ── [회차 55] radius/shadow 토큰화 + backdrop 약하게 */
/* [2026-10-04] 아래 .dialog-* 공용 규칙은 수업 분석의 시선·토론 탭 자리(.lecd-gaze-direct) «안»에는 걸지 않는다 — 그 자리 안의 창(토론 리포트의
   「상세」·「변경 근거」 등)은 css/detail.css 의 같은 이름 규칙(임베드와 같은 모양)이 정한다. 걸면 이 파일에만 있는 선언(제목의 글자 간격·gap 등)이
   그 창에 새어 들어가 임베드와 달라진다(실측 · 시험 D11). `:not(:where())` 라 무게(특이성)는 그대로 · 밖의 화면은 그대로. */
.dialog-overlay:not(:where(.lecd-gaze-direct *)) {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(6px);
  z-index: 400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.dialog-overlay.open:not(:where(.lecd-gaze-direct *)) { display: flex; }

.dialog-modal:not(:where(.lecd-gaze-direct *)) {
  width: 100%; max-width: 520px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  max-height: 92vh;
}
.dialog-header:not(:where(.lecd-gaze-direct *)) {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
}
.dialog-header h2:not(:where(.lecd-gaze-direct *)) { font-size: var(--text-lg); font-weight: 700; display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text); letter-spacing: -0.01em; }
/* [D-14] 모달 헤더 아이콘 — 이모지 → SVG. primary 색·정렬. */
.dialog-header h2 .dlg-title-ico { color: var(--primary); display: inline-flex; align-items: center; }
.dialog-header h2 .dlg-title-ico .ui-ico { width: 20px; height: 20px; }
/* 모달 우측 상단 닫기(×) — 이 클래스가 어느 CSS 에도 정의돼 있지 않아
   '오늘 라이브 수업'·빠른 등록 등 .dialog-close 를 쓰는 모달의 닫기 버튼이 스타일 없이 떴다.
   (.dialog-overlay/.dialog-modal/.dialog-header 는 있는데 .dialog-close 만 누락.) */
.dialog-close {
  flex: none; border: 0; background: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; color: var(--text-muted);
  transition: background .12s, color .12s;
}
.dialog-close:hover { background: var(--surface-hover); color: var(--text); }
.dialog-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.dialog-body:not(:where(.lecd-gaze-direct *)) {
  padding: var(--space-5) var(--space-6);
  overflow-y: auto;
}
.dialog-footer:not(:where(.lecd-gaze-direct *)) {
  display: flex; gap: var(--space-2); justify-content: flex-end;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.form-control.error { border-color: var(--danger); }
.field-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.req { color: var(--danger); }

@media (max-width: 640px) {
  /* [DASH-N14] 비8배수 18px → 16px 교정. */
  .page-title     { font-size: 21px; }
  .dash-welcome-h { font-size: 21px; }
  /* 다이얼로그: 모바일에서는 거의 전체 화면 */
  .dialog-overlay:not(:where(.lecd-gaze-direct *)) { padding: 0; align-items: flex-end; }
  .dialog-modal:not(:where(.lecd-gaze-direct *)) { max-width: 100%; border-radius: var(--radius) var(--radius) 0 0; max-height: 94vh; }
}

/* 대시보드 검색 */

.prog-mode-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }

/* ═══════════════ 시간표 (재설계 Step 2) ═══════════════ */
/* [회차 88 — 시간표 재설계 Step 2 / Manus 가이드 톤 적용]
   - 그라데이션 → 평면 단색
   - hex 코드 → 디자인 토큰
   - shadow 토큰 사용
   - 폰트 weight 800 → 700 (가이드 톤)
   - 빈 셀 dashed border → 부드러운 톤
*/
/* [회차 63] height 88px 고정 → 100% + min-height 88px. rowspan 으로 td 가 늘어나면 .tt-cell 도 같이 늘어남.
   [회차 88] dashed border → 1px solid border-faint, 평면 톤.
   [회차 138 #3] rowspan + height:100% 가 table cell 에서 안 늘어나는 브라우저 이슈 — 명시 calc 로
     "min-height = 88 × 연강 수 + 8 × 사이갭" 강제. JS 에서 td 에 style="--span:N" 주입. */
.tt-cell {
  min-height: calc(88px * var(--span, 1) + 8px * (var(--span, 1) - 1));
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .12s, background .12s, box-shadow .12s, transform .08s;
  position: relative;
  padding: 8px;
  box-sizing: border-box;
}
.tt-cell:hover { border-color: var(--primary); background: var(--primary-light); }
.tt-cell:active { transform: scale(.99); }
/* [TT-21] 키보드 포커스 링 — role=button + tabindex=0 셀에 가시 포커스 제공 */
.tt-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 12px; }
/* [회차 88] tt-filled — 평면 primary-light + primary 외곽선 (그라데이션 제거) */
.tt-cell.tt-filled {
  border: 1px solid var(--primary-tint, rgba(37,99,235,0.30));
  background: var(--primary-light);
  box-shadow: var(--shadow-xs);
  padding: var(--space-2); /* [R04] 10px 8px→8px 8px그리드 복원 */
}
.tt-cell.tt-filled:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  background: var(--primary-light);
}
.tt-cell-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; }
.tt-cell-name {
  font-size: 14px; font-weight: 700; color: var(--text);
  text-align: center; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.35;
}
/* [회차 88 T2] 시간표 셀별 고유 색 6 팔레트 — 강의명 hash 로 안정 매핑. 값 = 과목 색 이름 --course-N-bg · -bd(정본 = css/common.css «과목 색»).
   tt-filled 의 기본 톤(primary-light) 을 덮어쓰며, hover 강조는 border 만으로 표현. */
.tt-cell.tt-filled[data-color="0"] { background: var(--course-0-bg); border-color: var(--course-0-bd); }
.tt-cell.tt-filled[data-color="1"] { background: var(--course-1-bg); border-color: var(--course-1-bd); }
.tt-cell.tt-filled[data-color="2"] { background: var(--course-2-bg); border-color: var(--course-2-bd); }
.tt-cell.tt-filled[data-color="3"] { background: var(--course-3-bg); border-color: var(--course-3-bd); }
.tt-cell.tt-filled[data-color="4"] { background: var(--course-4-bg); border-color: var(--course-4-bd); }
.tt-cell.tt-filled[data-color="5"] { background: var(--course-5-bg); border-color: var(--course-5-bd); }
.tt-cell.tt-filled[data-color]:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); }

/* ───────────────────────────────────────────────────────────────
   [TT] 시각 타임라인 시간표(09:00~18:00 고정) — 교시 격자 폐지.
   좌측 시간 눈금 + 요일 컬럼, 슬롯은 (start_min,end_min) 절대좌표 블록.
   ─────────────────────────────────────────────────────────────── */
/* [TT] 타임라인 높이 — 09:00~18:00(9시간)을 여유있게(시간당 ~111px). 촘촘함 개선. */
.tt-tl { display: flex; gap: 6px; min-width: 580px; --tl-h: 1320px; --tl-head-h: 30px; overflow: hidden; }  /* [#13b] 시각 눈금선(::after right:-1000px) 오버슈트를 시간표 폭 안으로 클립 — 고대비서 우측 밖 튐 방지 */
/* 학생 대시보드 시간표 — 1320px는 너무 길어 압축(교사 강의관리 .tt-tl은 그대로).
   이제 --tl-h 는 main.js 가 **표시 시간 × 72px** 로 인라인 지정한다(빈 시간대를 잘라내
   길이를 줄임 · 상한 760px). 여기 값은 인라인이 없을 때의 폴백.
   padding-bottom: 마지막 시각 눈금(창 끝, top:100%)이 translateY(-50%) 라 절반이 overflow:hidden 에
   잘리던 것을 살린다 — 창을 좁히면서 마지막 눈금이 곧 '수업이 끝나는 시각'이라 더 중요해졌다. */
.alc-cal-tl { --tl-h: 760px; padding-bottom: 9px; }
/* [#13c] 학생 대시보드 시간표 래퍼 — .tt-tl(min-width:580px)이 좁은 셀에서 카드 밖으로 삐져나가
   격자선(고대비서 짙어짐)이 시간표 영역 밖으로 나가던 문제. 가로 스크롤로 가둠. */
.alc-sched-view-calendar { overflow-x: auto; }
.tt-tl-axis { flex: 0 0 56px; }
.tt-tl-axishead { height: var(--tl-head-h); }
.tt-tl-axisbody { position: relative; height: var(--tl-h); }
.tt-tl-tick { position: absolute; left: 0; right: 0; transform: translateY(-50%); }
.tt-tl-tick span { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.tt-tl-tick::after { content: ''; position: absolute; left: 44px; right: -1000px; top: 50%; border-top: 1px dashed var(--border); opacity: .5; pointer-events: none; }
.tt-tl-now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); transform: translateY(-1px); z-index: 5; pointer-events: none; }
.tt-tl-now-line span { position: absolute; left: 0; top: -8px; font-size: 10px; font-weight: 700; color: var(--text-on-primary); background: var(--danger-fill); padding: 1px 5px; border-radius: 999px; }   /* [다크 ④] 채운 면 = 채움 이름(다크의 --danger 는 글자용 밝은 값) */
.tt-tl-cols { display: flex; flex: 1 1 auto; gap: 6px; }
.tt-tl-col { flex: 1 1 0; min-width: 0; }
.tt-tl-colhead { height: var(--tl-head-h); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--text); }
.tt-tl-colhead.tt-day-focus { color: var(--primary); }
.tt-tl-track {
  position: relative; height: var(--tl-h);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: copy;
}
.tt-tl-track.dt-over { outline: 2px dashed var(--primary); outline-offset: -2px; background: var(--primary-light); }
/* 타임라인 안의 슬롯 블록 — 절대좌표(top/height/left/width 인라인) */
.tt-tl-track .tt-cell.tt-filled {
  position: absolute;
  min-height: 0;
  height: auto;
  margin: 0;
  overflow: hidden;
  align-items: stretch;
}
.tt-tl-track .tt-cell-inner { justify-content: center; gap: 2px; }

/* 일괄 등록 모달 */
/* [2026-09-06] `.tt-bulk-meta`·`.tt-bulk-meta-row`·`.tt-bulk-common`·`.tt-bulk-common-body`·
   `.tt-bulk-common-hint` 규칙은 여기 있었다 — 그 칸(공통 정보 5칸)이 강의 설정 「수업 정보」
   카드로 옮겨가며 main.html 의 `#ttStepPane3` 가 없어져 참조가 0이 됐다(내 변경이 만든 고아). */
.tt-bulk-method { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--space-4); margin-bottom: var(--space-4); } /* [R08] 14px → 16px 8px그리드 */
.tt-bulk-method-h { font-size: 14px; font-weight: 800; margin-bottom: 10px; color: var(--text); }
.tt-bulk-method-sub { font-weight: 400; color: var(--text-muted); font-size: 12.5px; margin-left: 6px; }

/* ★「+ 수업 추가」를 머리말 오른쪽 끝으로★ (2026-09-07 확정)
   ★flex 는 «이 버튼이 있는 머리말»에만 건다★ — 무자격 `.tt-bulk-method-h { display:flex }` 는
   「시간표 넣기」 등 다른 머리말까지 바꿔 부제의 margin-left(6px)가 gap 만큼 벌어진다
   (2026-08 에 실제로 그 지적을 받았다 — 같은 실수를 되풀이하지 않는다). */
.tt-bulk-method-h:has(.tt-bulk-addrow) { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tt-bulk-addrow { margin-left: auto; flex-shrink: 0; }

/* ── 엑셀 작성요령 — 파일을 읽기 «전»의 ②화면(js/main.js `_paintEditArea`) ───────────── */
.tt-xlsx-guide { margin-bottom: var(--space-4); }
.tt-xlsx-guide[hidden] { display: none; }
.tt-xlsx-guide h3 { font-size: var(--text-md); font-weight: 800; color: var(--text); margin: 0 0 var(--space-2); }
.tt-xg-lead { font-size: var(--text-sm); color: var(--text-body); margin: 0 0 var(--space-3); word-break: keep-all; }
/* 표는 좁은 폭에서 «자기 안에서» 구른다 — 본문이 가로로 밀리지 않게. */
.tt-xg-tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tt-xg-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.tt-xg-table th, .tt-xg-table td { padding: 8px 12px; text-align: left; white-space: nowrap; }
.tt-xg-table thead th { background: var(--bg-subtle); font-weight: 700; color: var(--text-body); border-bottom: 1px solid var(--border); }
.tt-xg-table tbody tr + tr td { border-top: 1px solid var(--border); }
.tt-xg-tips { margin: var(--space-3) 0 0; padding-left: 1.2em; font-size: var(--text-sm); color: var(--text-muted); }
.tt-xg-tips li { margin-bottom: 4px; word-break: keep-all; line-height: 1.5; }
.tt-xg-tips b { color: var(--text-body); font-weight: 700; }
.tt-xg-foot { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--text-muted); word-break: keep-all; }
/* ★진입로 통합★ — 종전 「＋ 수업 등록」(수업 목록 화면)이 하던 «이름만 만들기»가
   이 체크박스로 들어왔다. 머리말 오른쪽 끝에 붙여 «이 영역의 모드»임을 드러낸다(별도 줄 X — 모달
   세로를 늘리지 않는다 · UI_GUIDELINES §0-A 5 고정 크기 모달). */
/* ★체크박스가 있는 머리말에만 건다★ — 무자격 `.tt-bulk-method-h { display:flex }` 는 「수업 공통 정보」·
   「시간표 넣기」 머리말까지 바꿔 부제(margin-left:6px)가 gap 만큼 벌어졌다(리뷰 지적⑤). */
/* 「시간표는 나중에」에서 시간을 «흐리게»가 아니라 «감춘다» — 카드가 되면서 시간은
   카드 «안»으로 들어갔고, 흐린 채로 남기면 접힌 카드 높이만 먹으면서 아무것도 알려주지 않는다.
   값은 모델에 그대로 남아 체크를 풀면 돌아온다(js/timetable-bulk-cards.js setNoTimeMode). */
/* 일괄 등록 «어느 수업으로 나뉘는지» 미리보기 — .hint-box 위에 얹는 목록 스타일.
   (제목 옆 «등록 대상 수업 이름» 표시 .tt-bulk-target 은 폐지 — 등록 대상이 수업 이름 칸으로 갈리면서
    «수업 하나»를 제목에 적을 수 없게 됐다.) */
/* 미리보기가 «등록되지 않는 줄»까지 말하면서 길어질 수 있다 — 모달을 키우지 않고
   이 영역 안에서만 스크롤한다(고정 크기 모달 · UI_GUIDELINES §0-A 5). 키보드로도 훑을 수 있게
   js/main.js 가 내용이 있을 때만 tabindex=0 을 준다. */
#ttBulkNotice { margin-bottom: 10px; max-height: 208px; overflow-y: auto; overscroll-behavior: contain; }
#ttBulkNotice:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
#ttBulkNotice .hint-box { margin: 0 0 6px; }
#ttBulkNotice .hint-box:last-child { margin-bottom: 0; }
#ttBulkNotice .tt-bulk-grp { display: inline-block; margin-right: 8px; white-space: nowrap; font-weight: 700; }
/* 시간이 한 줄도 안 들어가 «만들어지지 않는» 수업 — 색만으로 구분하지 않도록
   문구(「이 수업은 만들어지지 않아요」)를 함께 쓴다(UI_GUIDELINES §0 접근성). */
#ttBulkNotice .tt-bulk-grp.is-skipped { font-weight: 600; text-decoration: line-through; opacity: .72; }
#ttBulkNotice .muted { color: var(--text-muted); font-weight: 400; }
/* 등록되지 않는 줄 목록 — 「몇 번째 줄이 왜」. 한글은 어절 단위로 끊는다. */
.tt-bulk-issues { margin: 6px 0 0; padding-left: 18px; }
.tt-bulk-issues li { margin-bottom: 3px; word-break: keep-all; overflow-wrap: anywhere; }
.tt-bulk-issues li:last-child { margin-bottom: 0; }
.tt-bulk-issue-tag {
  display: inline-block; font-size: 11px; font-weight: 700; white-space: nowrap;
  padding: 1px 7px; border-radius: 999px; background: #fee2e2; color: var(--danger-dark);   /* [design-ok] 기존 값 그대로 — 이 줄은 «옛 빨강 → 토큰»만 옮겼다(2026-10-04) */
}

/* ── 「수업 등록」 ②탭(2026-08-28~ 「수정」) — 수업 이름별 카드 ─────────
   종전의 9칸 스프레드시트(.tt-bulk-row / .tt-bulk-row-cols / .tt-bulk-row-head)는 **폐지**했다.
   왜: 줄 하나가 요일·교시·시작·~·끝·이름·교실번호·교실명·✕ 9칸이라, 모달 폭 880px 에서
   761~899px 구간이 조용히 뭉개졌고(옛 주석의 실측), 같은 수업의 시간이 여러 개면 이름을
   줄마다 반복 입력해야 했다. 그리는 주체는 이제 js/timetable-bulk-cards.js 하나뿐이다. */
/* ★모달 크기를 못 박는다★ (.claude/skills/fixed-size-modals — 사용자의 강한 요구)
   단계마다 내용 길이가 다르다: 높이를 고정하고 **본문 안에서만** 스크롤한다.
   ★[2026-09-06] 680 → 760★ 방법 카드 4장(각 252px)이 그림·이름·설명을 다 담으려면 이만큼이 든다.
   ★폭은 여기서 정하지 않는다★ — main.html 의 `data-size="xl"`(=1080px, css/common.css 공용 토큰)이
   정한다. 760px 는 css/detail.css 의 data-size="xl" 과 같은 값이다(같은 종류는 같은 크기). */
#ttBulkDialog .dialog-modal { height: min(760px, 92vh); }
#ttBulkDialog .dialog-header, #ttBulkDialog .dialog-footer { flex-shrink: 0; }
#ttBulkDialog .dialog-body { flex: 1; min-height: 0; overflow-y: auto; }

/* 「등록하기」가 꺼져 있는 이유 — 버튼 «옆»에 둔다. 회색 버튼만 있으면 고장으로 읽힌다.
   `margin-right:auto` 로 왼쪽에 붙어 버튼 두 개는 제자리를 지킨다(모달 크기 고정 — UI_GUIDELINES §0-A 5). */
#ttBulkDialog .tt-bulk-why {
  margin-right: auto; align-self: center;
  font-size: 12.5px; color: var(--text-muted); word-break: keep-all; line-height: 1.4;
}
#ttBulkDialog .tt-bulk-why:empty { display: none; }

.tt-bc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.tt-bc-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 18px 8px;
  border: 1px dashed var(--border); border-radius: 8px; word-break: keep-all; }

.tt-bc-card { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
.tt-bc-card.has-bad { border-color: #fca5a5; }
/* ★방금 더해진 카드★ — ①로 돌아가 다른 방법으로 또 넣었을 때 «무엇이 새로 왔나»를 보여준다.
   색만으로 말하지 않는다 — 카드 머리의 「방금 더해짐」 글자가 같은 말을 한다(§0-A 1). */
.tt-bc-card.is-fresh { border-color: var(--success); box-shadow: 0 0 0 2px var(--success-light); }
.tt-bc-card.is-fresh > .tt-bc-head { background: var(--success-light); }
/* ★특이도 보정★(2026-09-06 리뷰 지적) — 갓 더해진 카드는 fold 예외라 항상 is-open 도 같이 붙는데,
   .tt-bc-card.is-open .tt-bc-head 와 특이도가 같아(클래스 3개) 파일 뒤에 있는 그쪽이 캐스케이드에서
   이겨 위 줄이 실제로는 한 번도 안 보였다. 클래스 4개로 올려 이긴다 — 순서에 기대지 않는다. */
.tt-bc-card.is-fresh.is-open > .tt-bc-head { background: var(--success-light); }

/* 카드 머리 — «수업 이름 한 번». 이름칸이 가로를 최대한 쓰고 꼬리표가 그 뒤를 채운다. */
.tt-bc-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.tt-bc-card.is-open .tt-bc-head { border-bottom: 1px solid var(--border); background: var(--bg); }
/* 펼침 표시는 «누를 수 있는 것»으로 보여야 한다 — 실측(3x 확대)에서 ▾ 가 12px·muted 라
   점 하나로 보였다. 터치 영역(≥28px)도 함께 확보한다(UI_GUIDELINES §0 접근성). */
.tt-bc-toggle { flex: none; width: 28px; height: 28px; padding: 0; border: none; background: none;
  cursor: pointer; color: var(--text); font-size: 15px; line-height: 1; border-radius: 6px; }
.tt-bc-toggle:hover { background: var(--surface-hover); }
.tt-bc-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.tt-bc-name { flex: 1 1 auto; min-width: 120px; max-width: 300px; height: 34px; font-size: 14px; font-weight: 700; }
.tt-bc-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.tt-bc-tag { font-size: 11px; font-weight: 700; white-space: nowrap; padding: 2px 8px;
  border-radius: 999px; background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.tt-bc-tag.is-new { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.tt-bc-tag.is-fresh-tag { background: var(--success-light); color: var(--success-dark); border-color: transparent; }   /* [감사 B 2026-09-25] 3.15 → 4.79 */
.tt-bc-tag.is-bad { background: #fee2e2; color: var(--danger-dark); border-color: transparent; }   /* [design-ok] 기존 값 그대로 — 이 줄은 «옛 빨강 → 토큰»만 옮겼다(2026-10-04) */
.tt-bc-del { flex: none; background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 14px; padding: 6px 8px; border-radius: 6px; }
.tt-bc-del:hover { color: var(--danger); background: #fef2f2; }

.tt-bc-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.tt-bc-body[hidden] { display: none; }

/* 시간 한 줄 — 요일·교시·시각만. 교실은 「자세히」 뒤로 뺐다(2026-08-19
   "교실은 공통으로만"). 종전엔 빈 교실칸 2개가 모든 줄에 늘 나와 있었다. */
.tt-bc-time { border-radius: 8px; padding: 3px 4px; }
.tt-bc-time.is-bad { background: #fef2f2; }
.tt-bc-time-main { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tt-bc-time select, .tt-bc-time input { height: 34px; font-size: 13px; min-width: 0; }
.tt-bc-day { flex: none; width: 84px; }
.tt-bc-period { flex: none; width: 92px; }
/* 한국어 로캘의 input[type=time] 은 「오전 09:00」+시계 아이콘이라 124px 아래에서 잘린다(실측). */
.tt-bc-start, .tt-bc-end { flex: none; width: 124px; }
.tt-bc-tilde { font-size: 13px; color: var(--text-muted); }
.tt-bc-room-tag { font-size: 11.5px; color: var(--text-muted); background: var(--bg);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.tt-bc-more { margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer; color: var(--text-muted); font-size: 11.5px; font-weight: 600; padding: 3px 10px; white-space: nowrap; }
.tt-bc-more:hover { color: var(--text); background: var(--bg); }
.tt-bc-more[aria-expanded="true"] { background: var(--primary-light); color: var(--primary); border-color: transparent; }
.tt-bc-time-del { flex: none; background: none; border: none; cursor: pointer; color: var(--text-muted);
  font-size: 13px; padding: 6px; border-radius: 6px; }
.tt-bc-time-del:hover { color: var(--danger); }
/* 사유를 «그 시간 바로 아래»에 붙인다 — 종전엔 위쪽 상자만 읽고 아래에서 그 줄을 눈으로 찾아야 했다. */
.tt-bc-err { margin: 3px 0 0 4px; font-size: 12px; color: var(--danger-dark); word-break: keep-all; overflow-wrap: anywhere; }   /* [design-ok] 기존 값 그대로 — 이 줄은 «옛 빨강 → 토큰»만 옮겼다(2026-10-04) */
.tt-bc-err b { font-weight: 800; }
.tt-bc-detail { display: flex; gap: 8px; flex-wrap: wrap; margin: 5px 0 2px 4px; }
.tt-bc-detail[hidden] { display: none; }
.tt-bc-detail label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.tt-bc-detail input { height: 32px; font-size: 12.5px; width: 150px; }
.tt-bc-add-time { align-self: flex-start; font-size: 12.5px; }

/* 좁은 화면 — 시각 두 칸이 한 줄을 넘치므로 물결표를 숨기고 자연스럽게 접히게 둔다. */
@media (max-width: 899px) {
  .tt-bc-tilde { display: none; }
  .tt-bc-name { max-width: none; }
  .tt-bc-more { margin-left: 0; }
}

/* ── 모달 «2단계 마법사» — ① 방법 고르기 / ② 확인하고 수정 ─────────
   [2026-09-06] 탭 줄을 없앴다 — 그때 남겨 뒀던 `.tt-step-*`·`.tt-import-*`(옛 ③ 공통 정보
   #ttStepPane3 용)는 그 칸을 강의 설정 「수업 정보」로 옮기며 함께 지웠다(Task 9). */
.tt-wiz-pane[hidden] { display: none; }
/* ★[hidden] 을 «되살리는» 규칙★ — `.btn{display:inline-flex}` 가 브라우저 기본
   `[hidden]{display:none}` 을 덮어, 속성은 붙었는데 버튼은 그대로 보였다(2026-09-06 실측:
   ①단계에 [← 이전][취소][다음 →][등록하기] 넷이 다 떴다). 단계마다 버튼 짝이 달라지는 이
   모달에서는 그게 곧 «무엇을 눌러야 하는지 모르겠다»라, 여기서 특이도를 올려 다시 이긴다.
   ★같은 함정을 같은 날 두 번 밟았다★ — 「학교 찾기」 창에서도 걸음 1 에 [← 이전]·[넣기]가
   그대로 떴다(실측). **단계가 있는 모달을 새로 만들면 여기에 그 id 를 반드시 더한다.** */
#ttBulkDialog .dialog-footer .btn[hidden],
#ttSchoolDialog .dialog-footer .btn[hidden] { display: none; }
.tt-wiz-lead { font-size: var(--text-md); color: var(--text-body); margin-bottom: var(--space-4); word-break: keep-all; }
/* 제목 옆 걸음 표시 — 학교 찾기 모달의 `.tt-sch-step` 과 «같은 모양»이어야 한다.
   두 창이 나란히 뜨는데 걸음 표시가 서로 다르게 생기면 교사가 두 번 배운다. */
.tt-wiz-step { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); margin-left: var(--space-2); }
/* 도구 줄(엑셀·사진·나이스)은 «고른 방법»의 것만 보인다 — `.tt-bulk-xlsx-actions{display:flex}` 가
   [hidden] 의 기본 display:none 을 덮으므로 특이도를 올려 다시 이긴다(js/main.js _paintMethodTools). */
.tt-wiz-tools[hidden] { display: none; }
.tt-wiz-carry {
  margin-top: var(--space-4); padding: var(--space-3) var(--space-4);
  background: var(--warning-light); border-left: 3px solid var(--warning);
  border-radius: var(--radius-xs); font-size: var(--text-sm); color: var(--warning-dark);
  word-break: keep-all;
}
.tt-wiz-carry[hidden] { display: none; }
/* [2026-10-08] 방식 고르기 카드(.tt-method*)는 css/method-wizard.css 로 옮겼다 — 편집기(detail.html)의 «AI 문제 만들기» 창도
   같은 카드를 쓰는데 그 화면은 이 파일을 안 읽는다. 사본을 두지 않으려고 두 화면이 같이 읽는 파일 한 곳에 둔다. */

/* 교시표를 접는다 — 값이 바뀌는 일이 드문데 6칸+전교시 미리보기가 늘 펼쳐져 있어
   정작 할 일을 밀어냈다. 접힌 상태에서도 «지금 무엇으로 채워지는지»는 한 줄로 보인다. */
.tt-period-fold { margin-top: var(--space-3); border: 1px dashed var(--border); border-radius: 8px; background: var(--bg); }
.tt-period-fold > summary { cursor: pointer; list-style: none; padding: 7px 10px;
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-wrap: wrap; }
.tt-period-fold > summary::-webkit-details-marker { display: none; }
.tt-period-fold > summary:hover { background: var(--surface); border-radius: 8px; }
.tt-period-fold > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
.tt-period-sum { color: var(--text-muted); }
.tt-period-fold-cta { margin-left: auto; font-weight: 700; color: var(--primary); white-space: nowrap; }
.tt-period-fold[open] > summary { border-bottom: 1px dashed var(--border); }
.tt-period-fold[open] .tt-period-fold-cta { visibility: hidden; }
/* 접힘 상자 안에서는 바깥 테두리·배경을 한 번 더 그리지 않는다(이중 테두리 방지). */
.tt-period-fold .tt-period-bar { margin: 0; border: none; background: none; }

/* ── 교시표 줄 — 교시 프리셋의 «입력 보조» 영역 ──────────────────
   값의 정본은 「설정 → 일반 설정 → ⏰ 시간표 구조」다(같은 globalDefaultSettings 를 읽고 쓴다).
   전 교시 시각을 칩으로 펼쳐 두는 이유: 점심시간을 넣지 않으므로, 점심이 있는 학교의 교사가
   교시를 «고르기 전에» 오후 시각이 자기 학교와 다름을 알아채야 한다. */
.tt-period-bar {
  padding: 8px 10px; margin-bottom: 10px;
  background: var(--primary-light); border: 1px dashed var(--border); border-radius: 8px;
}
.tt-period-bar-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.tt-period-bar-row label { color: var(--text-muted); font-weight: 600; }
/* [결정 2A 2026-11-16] 교시표 = 시각 셋(1교시 시작 ~ 끝 · 2교시 시작) + 저절로 센 한 교시 · 쉬는시간 */
.tt-period-time { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); }
.tt-period-time input { width: 124px; height: 30px; font-size: var(--text-sm); }   /* «오전 08:50» 이 들어가는 폭 */
.tt-period-calc { color: var(--text-body); font-size: var(--text-sm); }
.tt-period-calc.is-err { color: var(--danger); font-weight: 600; }
.tt-period-presets { display: flex; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.tt-period-presets .btn { font-size: 12px; }
.tt-period-preview {
  margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 10px;
  font-size: 11.5px; color: var(--text-muted); line-height: 1.6;
}
.tt-period-chip { white-space: nowrap; }
.tt-period-chip b { color: var(--text); font-weight: 700; }
@media (max-width: 760px) {
  .tt-period-presets { margin-left: 0; }
}
/* [Step 2 Part 3] 엑셀 업로드 섹션 — 직접 입력과 시각적으로 분리
   ★「시간표를 넣는 방법」은 **같은 바탕**을 쓴다★ — 엑셀 `#f8fafc` · 사진 `#fffbeb`(크림) ·
   NEIS 흰색으로 셋이 다 달라, 같은 일을 하는 형제가 서로 다른 종류처럼 보였다(
   "기능이 너무 많아서 복잡한 관리자콘솔 같다"). 특히 크림색은 경고로 읽힌다.
   색은 **상태**에만 쓴다 — 여기 남는 유일한 색 변화가 드래그 중(`is-dragover` 파랑)이다.
   셋을 한 컨테이너의 탭으로 접으면서 바탕 규칙도 그 하나로 모였다. */
.tt-bulk-xlsx { background: #f8fafc; }
/* [2026-09-06] `.tt-import-tabs`·`.tt-import-pane`(옛 «방법 탭» 접기 UI) 규칙은 여기 있었다 —
   2026-08-19 의 탭 접기가 2026-09-06 방법 카드 4장(#ttMethodGrid)으로 바뀌며 참조가 0이 됐다. */
.tt-bulk-xlsx-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tt-bulk-xlsx-hint { font-size: 12px; color: var(--text-muted); flex: 1; min-width: 200px; line-height: 1.5; }
/* 붙여넣기 안내 한 줄 — 파일이 없어도 되는 두 번째 길을 여기서 알린다. */
.tt-bulk-paste-hint {
  margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-muted);
  word-break: keep-all; overflow-wrap: anywhere;
}
/* 드롭존 — 파일을 끌어오면 이 영역이 목적지임을 알린다.
   모션 없음(드래그 중엔 초당 여러 번 갱신되는 상태다 · UI_GUIDELINES §0-F L3).
   덮개는 absolute 라 나타나도 «레이아웃이 밀리지 않는다»(모달 크기 고정). */
.tt-bulk-xlsx { position: relative; }
.tt-bulk-xlsx.is-dragover { border-color: var(--primary); background: var(--primary-light); }
.tt-bulk-drop-cue {
  display: none; position: absolute; inset: 0; z-index: 1;
  align-items: center; justify-content: center; text-align: center;
  padding: var(--space-3); pointer-events: none;
  background: rgba(239, 246, 255, 0.94);
  border: 2px dashed var(--primary); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; color: var(--primary);
  word-break: keep-all;
}
.tt-bulk-xlsx.is-dragover .tt-bulk-drop-cue { display: flex; }
/* 사진·PDF 로 올리기(3단계) — ~~배경색으로 구분~~ 폐지, 위에서 세 방법을 같은
   바탕으로 통일했다(형제 블록끼리 색이 갈리면 «다른 종류»로 읽힌다). 길의 차이는 제목이 말한다. */
/* AI 가 읽은 결과 확인 — 원본 그림과 과목 칩을 «나란히» 둔다.
   실측에서 모델이 빈칸에 과목을 지어냈다 → 사진과 대조할 수 있어야 잡아낸다.
   ★모달은 고정 크기다(UI_GUIDELINES §0-A 5) — 그림 높이를 묶고 칩 목록만 안에서 스크롤한다.
   [2026-09-06 정정] 이 블록은 이제 «등록 창 위에 뜨는 별도 모달» #ttPhotoDialog 의 본문이다
     (main.html #ttSchoolDialog 뒤). 종전엔 `id="ttPhotoResult"` 를 직접 hidden 토글해 여닫아
     `[hidden]{display:none}` 되살리기 규칙이 따로 필요했지만, 지금은 이 div 가 «항상 그려진
     채»로 있고 바깥 `#ttPhotoDialog`(.dialog-overlay)가 open 클래스로만 여닫는다 — 그 규칙은
     .dialog-overlay 가 이미 올바르게 갖고 있어(위 188번째 줄) 여기서 되풀이할 필요가 없다. */
.tt-photo-result {
  display: flex; gap: var(--space-4); align-items: flex-start;
  border: 1px solid var(--primary); border-radius: var(--radius-sm);
  background: var(--primary-light); padding: var(--space-3); margin-bottom: var(--space-3);
}
/* ★그림 크기는 «대조 가능한가»가 기준이다 — 이 패널의 존재 이유가 사진과 맞춰 보는 것이다.
   실측: 240px 폭에서 가로로 긴 시간표는 높이 100px 로 눌려 글자를 읽을 수 없었다.
   그래서 ①기본을 키우고 ②누르면 패널 폭 전체로 펼친다(키보드로도 — button 이다). */
.tt-photo-shot {
  flex: 0 0 300px; padding: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: var(--radius-sm);
}
.tt-photo-shot:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tt-photo-shot img {
  display: block; width: 100%; max-height: 230px; object-fit: contain;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
}
/* 펼친 상태 — 세로로 쌓고 그림을 크게. 모달은 고정 크기라 높이는 묶어 둔다(안에서 스크롤). */
.tt-photo-result.is-zoomed { flex-direction: column; }
.tt-photo-result.is-zoomed .tt-photo-shot { flex: none; width: 100%; cursor: zoom-out; }
.tt-photo-result.is-zoomed .tt-photo-shot img { max-height: 420px; }
.tt-photo-body { flex: 1 1 auto; min-width: 0; }
.tt-photo-status { margin: 0 0 8px; font-size: 12.5px; line-height: 1.6; color: var(--text); word-break: keep-all; }
/* ★읽은 결과를 «사진과 같은 모양»으로 — 칸별 대조가 이 화면의 목적이다.
   모달은 고정 크기라(UI_GUIDELINES §0-A 5) 격자는 자기 영역 «안에서» 스크롤한다. */
.tt-photo-gridwrap { max-height: 232px; overflow: auto; margin-bottom: 8px; }
.tt-photo-grid { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 12px; }
.tt-photo-grid th { font-weight: 700; color: var(--text-muted); padding: 2px 4px; white-space: nowrap; }
.tt-photo-grid th[scope="row"] { text-align: right; font-size: 11.5px; }
.tt-photo-grid td { padding: 0; vertical-align: top; }
.tt-photo-grid .tt-pg-empty { background: #f1f5f9; border-radius: 6px; }
/* 칸 = 수업 시간 하나. 켜짐은 «색+테두리+글자굵기» 로 — 색만으로 구분하지 않는다(WCAG 1.4.1). */
.tt-pg-cell {
  display: block; width: 100%; min-height: 34px; padding: 4px 6px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
  font-size: 12px; line-height: 1.25; cursor: pointer; color: var(--text-muted);
  word-break: keep-all; text-decoration: line-through;
}
.tt-pg-cell.is-on {
  border-color: var(--primary); background: var(--primary-tint); color: var(--text);
  font-weight: 700; text-decoration: none;
}
.tt-pg-cell i { display: block; font-style: normal; font-size: 10.5px; opacity: .75; }
.tt-pg-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.tt-photo-chips { display: flex; flex-wrap: wrap; gap: 6px; max-height: 84px; overflow-y: auto; }
.tt-photo-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 5px 12px;
  border: 1px solid var(--border); border-radius: 999px; background: #fff;
  font-size: 12.5px; cursor: pointer; user-select: none; word-break: keep-all;
  color: var(--text-muted);
}
.tt-photo-chip.is-on   { border-color: var(--primary); background: var(--primary-tint); color: var(--text); font-weight: 700; }
.tt-photo-chip.is-some { border-color: var(--primary); background: var(--primary-light); color: var(--text); }
.tt-photo-chip.is-off  { text-decoration: line-through; }
.tt-photo-chip b { font-weight: 700; }
.tt-photo-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 760px) {
  .tt-photo-result { flex-direction: column; }
  .tt-photo-shot { flex: none; width: 100%; }
}
/* ── 「읽은 것 확인」 모달(사진·PDF) ────────────────────────────────
   [2026-09-06] ①단계 인라인 패널에서 «등록 창 위에 뜨는 별도 모달」로 나왔다 — 나이스 학교
     찾기와 같은 이유(지어낸 칸은 교사가 봐야 한다)·같은 모양이다.
   ★등록 창(z 400) «위»★ — .tt-sch-overlay 와 같은 층(z 1300, 아래 「학교 찾기」 절에서 정의 —
     새 겹침 모달을 만들 때마다 새로 정의하지 않고 이 클래스를 그대로 붙여 쓴다).
   ★크기 고정★ 확대 여부로 내용 길이가 달라져도 창은 안 커지고 본문만 스크롤한다(§0-A 5).
   버튼 줄(.tt-photo-actions)은 없앴다 — 넣기·취소가 이제 다른 모달과 같은 `.dialog-footer` 다. */
#ttPhotoDialog .dialog-modal { height: min(680px, 90vh); }
#ttPhotoDialog .dialog-header, #ttPhotoDialog .dialog-footer { flex-shrink: 0; }
#ttPhotoDialog .dialog-body { flex: 1; min-height: 0; overflow-y: auto; }
/* ── NEIS 가져오기 ──────────────────────────────────────────────
   ★격자·칩은 사진 갈래(.tt-photo-grid / .tt-pg-cell / .tt-photo-chip)를 그대로 쓴다★ —
     같은 일을 하는 화면이 서로 다르게 보이면 교사는 다른 기능인 줄 안다(전 화면 일관성).
   [2026-09-06] 학교 목록·반 고르기 줄·결과 패널의 규칙(.tt-neis-q·.tt-neis-school·
     .tt-neis-empty·.tt-neis-result·.tt-neis-pick)은 **지웠다** — 그 화면이 통째로
     「학교 찾기」 모달로 옮겨 가면서 아무도 안 쓰는 고아가 됐다(아래 .tt-sch-* 가 그 자리다). */
/* 요일 머리의 학사일정 — 「이 요일이 왜 비었나」를 그 자리에서 말한다(공휴일·휴업일). */
/* 주마다 과목이 바뀌는 칸 — 「가장 자주 든 과목」으로 채웠다는 표시(학기 단위 전환).
   색만으로 말하지 않는다: 물결표 + title 로도 같은 사실을 전한다(디자인 헌장 §0 접근성). */
.tt-neis-wob { font-style: normal; font-weight: 700; opacity: .55; margin-left: 2px; }
.tt-pg-cell.is-wobbly { border-style: dashed; }

/* ── 「학교 찾기」 모달(세 걸음) ─────────────────────────────────────
   [2026-09-06] 나이스 갈래의 «작업»이 등록 창 안 인라인 패널에서 별도 모달로 나왔다.
   ★등록 창(z 400) «위»★ — 이 저장소의 겹침 관용구와 같은 층(.lecd-addstu-overlay 1300).
   ★크기 고정★ 걸음마다 내용 길이가 달라도 창은 안 커지고 본문만 스크롤한다(§0-A 5). */
.tt-sch-overlay { z-index: 1300; }
#ttSchoolDialog .dialog-modal { height: min(680px, 90vh); }
#ttSchoolDialog .dialog-header, #ttSchoolDialog .dialog-footer { flex-shrink: 0; }
#ttSchoolDialog .dialog-body { flex: 1; min-height: 0; overflow-y: auto; }
/* [다음]이 꺼져 있는 이유 — 등록 창과 같은 관용구를 쓴다(.tt-bulk-why 는 그 창에서 정의). */
#ttSchoolDialog .tt-bulk-why {
  margin-right: auto; align-self: center;
  font-size: var(--text-sm); color: var(--text-muted); word-break: keep-all; line-height: 1.4;
}
#ttSchoolDialog .tt-bulk-why:empty { display: none; }
.tt-sch-step { font-size: var(--text-sm); font-weight: 600; color: var(--text-muted); margin-left: var(--space-2); }
.tt-sch-pane[hidden] { display: none; }
.tt-sch-lead { margin: 0 0 var(--space-3); font-size: var(--text-base); color: var(--text); word-break: keep-all; }
.tt-sch-note { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--text); word-break: keep-all; line-height: 1.6; }
.tt-sch-note:empty { display: none; }

/* 대분류 칩 — «화면 필터»가 아니라 나이스에 넘기는 조건이다(js/timetable-neis.js KINDS). */
.tt-sch-kinds { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-3); }
.tt-sch-kinds:empty { display: none; }
.tt-sch-chip {
  font-size: var(--text-sm); padding: 6px 14px; min-height: 34px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-body);
  cursor: pointer; font-family: inherit; word-break: keep-all;
}
.tt-sch-chip.is-on { background: var(--primary); border-color: var(--primary); color: var(--text-on-primary); font-weight: 700; }
.tt-sch-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tt-sch-q { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.tt-sch-q .form-control { flex: 1 1 auto; }

/* 찾은 개수 — 목록이 잘려도 「몇 곳 중 몇 곳을 보고 있는지」가 보인다(2026-09-07). */
.tt-sch-found { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--text-muted); word-break: keep-all; }
.tt-sch-found[hidden] { display: none; }

/* ★「아래에 더 있음」 — 넘칠 때만 켜는 «상태 신호»다(장식이 아니라 다 내려가면 뗀다).
   UI_GUIDELINES §0-B 2026-07-29 · 사이드바(`.app-sidebar.nav-has-more`)와 같은 관용구.
   ★페이드를 본문 «안»(::after)에 그리면 안 된다★ — 스크롤 컨테이너 내부 의사요소는 콘텐츠와
   함께 굴러 가장자리에 고정되지 않는다. 그래서 바닥 버튼줄 «위»(bottom:100%)에 그린다.
   투명 끝을 `transparent` 대신 알파 0 색으로 적는 것도 같은 이유의 관용구다(사이드바와 동일). */
#ttSchoolDialog .dialog-footer { position: relative; }
#ttSchoolDialog.sch-has-more .dialog-footer::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 100%; height: 28px;
  background: linear-gradient(to top, var(--surface), rgba(255, 255, 255, 0));
  pointer-events: none;
}

/* 찾은 학교 — 한 줄에 하나씩(배지가 오른쪽에 붙어야 «있음/없음»이 훑어진다).
   ★스크롤 «영역»은 본문 하나뿐이다★ — 여기에 `max-height + overflow` 를 다시 주면 창 안에
   스크롤 막대가 둘이 되어, 목록 끝에서 «같은 방향 스크롤»이 갑자기 바깥 본문으로 넘어간다.
   창 높이는 위에서 이미 못박혀 있고(`height: min(680px, 90vh)`) 본문이 `overflow-y:auto` 라
   목록이 길어져도 창은 커지지 않는다 — 안쪽 스크롤은 필요 없이 헷갈리기만 했다. */
.tt-sch-row {
  display: block; width: 100%; text-align: left; position: relative;
  padding: var(--space-3) 116px var(--space-3) var(--space-4);   /* 오른쪽 = 배지 자리 */
  margin-bottom: var(--space-2); font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}
.tt-sch-row:hover { background: var(--surface-hover); }
.tt-sch-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* 고른 줄 — 색만으로 말하지 않는다: 왼쪽 굵은 띠 + 굵은 테두리가 같은 사실을 전한다. */
.tt-sch-row.is-on { border-color: var(--primary); background: var(--primary-light); box-shadow: inset 3px 0 0 var(--primary); }
.tt-sch-name { display: block; font-weight: 700; font-size: var(--text-base); color: var(--text); word-break: keep-all; }
.tt-sch-meta { display: block; font-size: var(--text-xs); color: var(--text-muted); word-break: keep-all; }
/* ★배지의 «뜻»은 글자가 말한다★ — 색은 거들 뿐이다(WCAG 1.4.1 · 디자인 헌장 §0). */
.tt-sch-badge {
  position: absolute; right: var(--space-4); top: var(--space-4);
  font-size: var(--text-xs); font-weight: 800; padding: 2px 9px; border-radius: var(--radius-pill);
  white-space: nowrap;
}
.tt-sch-badge.ok  { background: var(--success-light); color: var(--success-dark); border: 1px solid var(--success); }
.tt-sch-badge.no  { background: var(--danger-light);  color: var(--danger-dark);  border: 1px solid var(--danger); }
.tt-sch-badge.unk { background: var(--bg-subtle);     color: var(--text-muted);   border: 1px solid var(--border-strong); }
.tt-sch-empty { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--text-muted); word-break: keep-all; }
/* ★막다른 길을 만들지 않는다★ — 「없어요」로 끝내지 말고 다음 행동(사진·PDF)을 준다. */
.tt-sch-none {
  margin-top: var(--space-4); padding: var(--space-4);
  background: var(--danger-light); border-left: 3px solid var(--danger); border-radius: var(--radius-xs);
  font-size: var(--text-sm); word-break: keep-all;
}
.tt-sch-none[hidden] { display: none; }
.tt-sch-none p { margin: 0 0 var(--space-2); }

/* 걸음 2 — 학교·학기 줄과 학년·반 격자. 고등학교는 분반이 190개까지 나온다(실측). */
.tt-sch-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.tt-sch-head > b { font-size: var(--text-base); font-weight: 800; word-break: keep-all; }
.tt-sch-head label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--text-muted); }
.tt-sch-head .form-control { width: auto; min-width: 150px; font-size: var(--text-sm); }
#ttSchClassQuery { margin-bottom: var(--space-3); }
/* 학년·반 — 위 `.tt-sch-results` 와 같은 이유로 안쪽 스크롤을 두지 않는다(본문 하나만 구른다). */
.tt-sch-classes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.tt-sch-classes .tt-sch-empty { grid-column: 1 / -1; }
.tt-sch-class {
  display: block; width: 100%; text-align: left; font-family: inherit;
  padding: var(--space-3) var(--space-4); min-height: 44px;      /* 44px = 터치 영역 하한 */
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}
.tt-sch-class:hover { background: var(--surface-hover); }
.tt-sch-class:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tt-sch-class.is-on { border-color: var(--primary); background: var(--primary-light); box-shadow: inset 3px 0 0 var(--primary); }
@media (max-width: 760px) {
  .tt-sch-classes { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  /* [R7-N02] 320px 기기 가로 스크롤 완화 — 컨테이너보다 넓어지지 않도록 min(340px,100%),
     교시 헤더·간격 추가 축소로 실수평폭 절감. */
  .tt-cell { min-height: calc(62px * var(--span, 1) + 4px * (var(--span, 1) - 1)); height: 100%; }
}

/* ═══════════════ 앱 셸 (좌측 패널 + 본문) — [회차 53] navy 리디자인 ═══════════════ */
body { margin: 0; }
.app-shell { display: flex; min-height: 100vh; background: var(--bg); }

/* 좌측 패널 — 짙은 navy 그라데이션. 참고 이미지 톤. */
.app-sidebar {
  width: 240px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  transition: width .18s var(--ease), transform .2s var(--ease);
  z-index: 100;
}
.app-sidebar-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  /* [R09] 20px 18px 18px→24px 16px 8px그리드
     [잘린메뉴] 세로 24→16 — 로고 블록 여백을 줄여 nav 에 16px 를 넘긴다(8px 그리드 유지). */
  padding: var(--space-4) var(--space-4);
}
.app-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--sidebar-text);
  min-width: 0; flex: 1;
}
/* 정사각 로고 마크 (흰 박스 + primary 텍스트) — 참고 이미지의 흰 카드 톤 */
.app-logo-mark {
  width: 40px; height: 40px; flex-shrink: 0;
  background: #ffffff; color: var(--primary-fill);   /* [design-ok] 흰 로고 판은 다크에서도 흰 판(학교 로고 그림이 제 색으로) — 이 줄은 글자를 채움 색(9단)으로만 바꿨다(다크 ④) */
  border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; letter-spacing: -0.03em;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}
/* [브랜드] 이 칸의 내용은 js/brand-mark.js 가 정한다 — 학교 로고 · 학교명
   이니셜 · ALC 마스코트. 흰 네모 판은 위 `.app-logo-mark` 가 이미 깔았다(남색 네비 위에서
   로고가 제 색으로 보이는 이유 · 사유 정본 = css/common.css 의 `.logo-icon:has(> .brand-mark-img)`).
   그림일 때만 안쪽 여백을 준다(글자 이니셜은 꽉 차야 읽힌다). */
.app-logo-mark:has(> .brand-mark-img) { padding: 3px; }
.app-logo-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.app-logo-title { font-weight: 700; font-size: var(--text-md); color: var(--sidebar-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-logo-sub   { font-weight: 500; font-size: 11.5px; color: var(--sidebar-text-muted); margin-top: 2px; white-space: nowrap; }
.app-logo-sub:empty { display: none; }   /* [2026-10-16] 교사 화면은 부제를 두지 않는다(옛 «Instructor Portal») — 빈 줄 높이가 남지 않게 */
/* 접기 토글 — 좁아진 영역에 자연스럽게 어울리는 흰 반투명 */
.app-sidebar-toggle {
  background: rgba(255,255,255,0.06); border: none; cursor: pointer;
  color: var(--sidebar-text-muted);
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-family: inherit;
  transition: background .12s, color .12s;
}
.app-sidebar-toggle:hover { background: rgba(255,255,255,0.12); color: #fff; }

/* [이원화 P1.5] 내 학교 구분 배지 — 로그인 직후 «어느 학교로 들어왔는지» 확인용.
   ★색만으로 구분하지 않는다★ 색각 이상 사용자를 위해 «특수학교/일반학교» 를 글자로도 적는다(WCAG 1.4.1).
   사이드바 위에 얹히므로 색은 사이드바 토큰을 따라간다 — 테마가 바뀌면 함께 바뀐다. */
.app-school-badge {
  display: flex; flex-direction: column; gap: 2px;
  margin: 0 14px 6px; padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.10);
  border-left: 3px solid var(--sidebar-text-muted);
}
.app-school-badge[hidden] { display: none; }
.asb-kind {
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  color: var(--sidebar-text);
}
.asb-name {
  font-size: 11.5px; color: var(--sidebar-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* [잘린메뉴] gap 4→2 · 세로 padding 8→4. 항목 높이(44px 터치타깃)는 그대로 두고
   '여백'만 회수한다 — 짧은 창에서 아래 메뉴가 잘리던 문제(아래 스크롤 신호 주석 참조). */
.app-nav { display: flex; flex-direction: column; gap: 2px; padding: var(--space-1) var(--space-4); flex: 1; overflow-y: auto; }
/* 사이드바 네비 스크롤바 — 화면이 짧아 nav 가 넘칠 때 뜨던 밝은 기본 스크롤바가
   어두운 navy 사이드바에 흉하게 보이던 문제. 얇고 사이드바 톤에 녹는 오버레이형으로 정돈(스크롤 자체는 유지).
   [정정] 톤에 "녹이는" 걸 우선하다 대비가 0.16 까지 내려가, 네이비 위에서 사실상 보이지 않았다.
   → 스크롤 가능하다는 사실 자체가 전달 안 돼 "메뉴가 없다"는 신고로 이어짐(UI_GUIDELINES §0-A 1 접근성).
   가시성 우선으로 0.38(hover 0.55)·폭 6→8px 로 올린다. */
.app-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.38) transparent; }
.app-nav::-webkit-scrollbar { width: 8px; }
.app-nav::-webkit-scrollbar-track { background: transparent; }
.app-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.38); border-radius: 4px; }
.app-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.55); }
/* ★[hidden] 을 «되살리는» 규칙 — 아래 display:flex 가 브라우저 기본 [hidden]{display:none} 을
   이겨서 hidden 을 붙여도 항목이 그대로 보인다. 같은 함정이 이 파일 안에서만 세 번째다
   (.tt-photo-result·`.dialog-footer .btn`·.app-school-badge). 2026-08-14 정밀 읽기 분석 Nav 가
   «활성 교사에게만» 보여야 하는데 모든 교사에게 보이던 것을 실브라우저로 잡았다 — 지우지 말 것. */
.app-nav-item[hidden] { display: none; }
.app-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: var(--space-3) var(--space-4); /* [R11] 11px 14px→12px 16px 8px그리드 */ border-radius: var(--radius-sm);
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: var(--text-base); font-weight: 500;
  color: var(--sidebar-text-muted);
  text-align: left; width: 100%;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.app-nav-item:hover { background: var(--sidebar-item-hover); color: var(--sidebar-text); }
.app-nav-item.active {
  background: var(--sidebar-item-active);
  color: #ffffff;
  font-weight: 700;
}
.app-nav-item .ni-ico { color: currentColor; }   /* SVG 색은 nav-item 색을 상속 */
.ni-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

