/* ══════════════════════════════════════════════════════════════════════════════
   method-wizard.css — «큰 그림 카드로 방식 고르기» 공용 틀 + AI 문제 만들기 창(#aigDlg)
   ★두 화면이 같이 읽는다★ main.html(시간표 4방식 · 수업자료 «AI 문제 만들기») · detail.html(편집기 «AI 생성»).
   ★카드(.tt-method*)는 css/main.css 에서 «옮겨 왔다»(2026-10-08)★ — detail.html 은 main.css 를 안 읽어
     편집기 창이 같은 카드를 쓰려면 사본이 생겼다. 사본 대신 정본을 여기 하나로 옮겼다. 이름(tt-)은 시간표가
     먼저 쓴 것이라 그대로 둔다(main.js·timetable-neis.js·시험 여럿이 그 이름을 읽는다).
   그림 SVG 의 정본 = main.html 시간표 4방식 카드의 인라인 SVG · AI 창은 «문제뱅킹 개선 3안건 구현계획(2026-10-08)» 그림 1·2.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── 방식 카드(시간표 4방식에서 옮김 · 줄 그대로) ───────────────────────────── */
.tt-method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.tt-method {
  /* ★높이를 못박는다★ — 설명 줄 수가 달라도 카드 바닥선이 맞아야 한다(min-height 는 안 된다). */
  height: 252px; text-align: left; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: var(--space-4); border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  transition: border-color .12s, box-shadow .12s;
}
.tt-method:hover { border-color: var(--border-strong); }
.tt-method:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.tt-method.is-on { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint), var(--shadow-md); } /* [design-ok] main.css 에서 옮긴 줄 그대로 — 고른 카드의 둘레 고리 */
.tt-method-art {
  height: 150px; margin-bottom: var(--space-3); border-radius: var(--radius-sm);
  background: var(--bg-subtle); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
/* 좁은 화면에서 그림이 카드를 넘지 않게 — viewBox 가 있어 비율 그대로 줄어든다. */
.tt-method-art > svg { max-width: 100%; height: auto; }
.tt-method.is-on .tt-method-art { background: var(--primary-light); border-color: var(--primary-tint); }
.tt-method-t { font-size: var(--text-md); font-weight: 800; }
.tt-method-d { font-size: var(--text-sm); color: var(--text-muted); margin-top: var(--space-1); word-break: keep-all; }
.tt-method-badge {
  position: absolute; top: var(--space-3); right: var(--space-4); z-index: 2;
  font-size: var(--text-xs); font-weight: 800; padding: 3px 10px;
  border-radius: var(--radius-pill); background: var(--primary-fill); color: var(--text-on-primary);
}
/* 좁은 화면 — 두 칸이 안 들어가면 한 줄에 하나씩(카드 높이는 그대로 못 박는다). */
@media (max-width: 899px) {
  .tt-method-grid { grid-template-columns: 1fr; }
}

/* ── AI 문제 만들기 창 — js/ai-generate-wizard.js 가 그린다 ───────────────────
   ★고정 크기(폭·높이 둘 다)★ — 걸음이 바뀌어도 창은 그대로, 넘치는 것은 본문 안에서만 스크롤한다
   (fixed-size-modals · 버튼이 발밑에서 움직이지 않게). 화면보다 크면 화면에 맞춘다. */
#aigDlg .dialog-modal {
  width: min(960px, calc(100vw - 32px)); max-width: min(960px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 32px)); max-height: none;
  display: flex; flex-direction: column; overflow: hidden;
  word-break: keep-all; overflow-wrap: anywhere;
}
#aigDlg .dialog-header, #aigDlg .dialog-footer { flex: 0 0 auto; }
#aigDlg .dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
#aigDlg .dialog-footer { justify-content: space-between; align-items: center; gap: var(--space-3); }
#aigDlg .aig-x { width: 36px; height: 36px; }

/* 걸음 표시 — 「1 방식 › 2 내용 › 3 만들기 › 4 확인」 */
.aig-steps { display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0; list-style: none;
  font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap; }
.aig-steps li + li::before { content: "›"; margin-right: var(--space-2); color: var(--text-muted); }
.aig-steps li[aria-current="step"] { color: var(--primary); font-weight: 800; }
.aig-foot-r { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.aig-why { font-size: var(--text-sm); color: var(--text-muted); text-align: right; }
.aig-why:empty { display: none; }

.aig-lead { margin: 0 0 var(--space-4); font-size: var(--text-md); color: var(--text-body); }
.aig-method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.aig-method-grid .tt-method-badge.is-soon { background: var(--warning-fill); }   /* 주황 채움(흰 글자 5.02) — 다크의 --warning-dark 는 옅은 면 위 글자라 1.39 였다(다크 ④) */
@media (max-width: 760px) {
  .aig-method-grid { grid-template-columns: 1fr; }
}

/* 확인 대기 안내(회차) — 「AI로 만든 문제가 N개 있어요 · 확인하기」 */
.aig-pending { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap;
  margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4);
  background: var(--primary-light); border: 1px solid var(--primary-tint); border-radius: var(--radius-sm);
  font-size: var(--text-sm); color: var(--text); }

/* 입력 칸 */
.aig-field { margin-bottom: var(--space-4); }
.aig-field:last-child { margin-bottom: 0; }
.aig-label { display: block; margin-bottom: var(--space-2); font-size: var(--text-sm); font-weight: 800; color: var(--text); }
.aig-topic { width: 100%; height: 120px; resize: none; padding: var(--space-3); font: inherit; font-size: var(--text-base);
  border: 1px solid var(--border-input); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }   /* 값을 넣는 칸 = R223 ①(④-10) */
.aig-topic:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.aig-count { margin-top: var(--space-1); font-size: var(--text-xs); color: var(--text-muted); text-align: right; }

.aig-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1);
  width: 100%; height: 104px; padding: var(--space-3); cursor: pointer; text-align: center;
  border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-subtle);
  font: inherit; font-size: var(--text-sm); color: var(--text-muted); }
.aig-drop b { font-size: var(--text-base); color: var(--text); }
.aig-drop:hover, .aig-drop.is-drag { border-color: var(--primary); background: var(--primary-light); }
.aig-drop:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.aig-file { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-2);
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--text-sm); }
.aig-file[hidden] { display: none; }
.aig-file-nm { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aig-file-sz { color: var(--text-muted); }
.aig-range { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--text-body); }
.aig-range input { width: 72px; height: 32px; padding: 0 var(--space-2); font: inherit; font-size: var(--text-sm);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }

/* 수업자료 고르기(여러 개 · 쪽 범위) */
.aig-mats { display: flex; flex-direction: column; gap: var(--space-2); }
.aig-mat { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2) var(--space-3); align-items: center;
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.aig-mat.is-on { border-color: var(--primary-tint); background: var(--primary-light); }
.aig-mat input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.aig-mat-nm { font-size: var(--text-sm); font-weight: 700; }
.aig-mat-pc { margin-left: var(--space-1); font-size: var(--text-xs); font-weight: 600; color: var(--text-muted); }
.aig-mat-row { grid-column: 2; display: flex; gap: var(--space-2); align-items: center; }
.aig-mat-row input { flex: 1; min-width: 0; height: 32px; padding: 0 var(--space-2); font: inherit; font-size: var(--text-sm);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.aig-mat-row input:disabled { opacity: .5; }

/* 유형별 개수 — 칸 높이를 못박는다(숫자가 바뀌어도 줄이 안 흔들린다) */
.aig-types { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-2); }
.aig-types.has-open { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .aig-types, .aig-types.has-open { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.aig-tcount { height: 76px; display: flex; flex-direction: column; justify-content: space-between;
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.aig-tcount.is-on { border-color: var(--primary); background: var(--primary-light); }
.aig-tname { font-size: var(--text-sm); font-weight: 700; color: var(--text); }
.aig-stepper { display: flex; align-items: center; justify-content: space-between; }
.aig-stepper button { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  font: inherit; font-size: var(--text-md); font-weight: 800; color: var(--text); cursor: pointer; }
.aig-stepper button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.aig-stepper button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.aig-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.aig-stepper output { min-width: 2ch; text-align: center; font-size: var(--text-lg); font-weight: 800; color: var(--text); }
.aig-total { margin-top: var(--space-2); text-align: right; font-size: var(--text-sm); color: var(--text-muted); }
.aig-total b { color: var(--primary); font-size: var(--text-base); }

/* 준비 중(문제지 그대로) */
.aig-soon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3);
  height: 100%; min-height: 240px; text-align: center; color: var(--text-muted); font-size: var(--text-base); }
.aig-soon b { font-size: var(--text-lg); color: var(--text); }

/* 진행 */
.aig-prog { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3);
  height: 100%; min-height: 240px; text-align: center; }
.aig-prog-t { font-size: var(--text-lg); font-weight: 700; color: var(--text); }
.aig-bar { width: min(480px, 100%); height: 8px; border-radius: var(--radius-pill); background: var(--bg-subtle); overflow: hidden; }
.aig-bar i { display: block; height: 100%; width: 0; background: var(--primary); border-radius: var(--radius-pill); transition: width .4s; }
.aig-prog-m { font-size: var(--text-base); color: var(--text-body); }
.aig-prog-tip { font-size: var(--text-sm); color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .aig-bar i { transition: none; } }

/* 오류 */
.aig-err { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3);
  height: 100%; min-height: 240px; text-align: center; }
.aig-err img { width: 92px; height: auto; }
.aig-err-t { font-size: var(--text-lg); font-weight: 700; color: var(--text); }
.aig-err-m { max-width: 520px; font-size: var(--text-sm); line-height: 1.5; color: var(--text-muted); }

/* 확인(검토) — 옛 편집기 창(#aiGenModal)의 검토 화면을 옮겨 토큰으로 다시 칠했다 */
.aig-rv-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.aig-rv-nav { display: flex; align-items: center; gap: var(--space-2); }
.aig-rv-count { min-width: 64px; text-align: center; font-size: var(--text-lg); font-weight: 800; color: var(--primary-dark); }
.aig-rv-meta { font-size: var(--text-sm); color: var(--text-muted); text-align: right; }
.aig-rv-card { padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.aig-rv-field { margin-bottom: var(--space-3); }
.aig-rv-field:last-child { margin-bottom: 0; }
.aig-rv-field > label, .aig-rv-field > .aig-rv-lb { display: block; margin-bottom: var(--space-1); font-size: var(--text-sm); font-weight: 700; color: var(--text-muted); }
.aig-rv-field textarea, .aig-rv-field input[type="text"] { width: 100%; padding: var(--space-2) var(--space-3);
  font: inherit; font-size: var(--text-sm); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.aig-rv-field textarea { resize: vertical; }
.aig-rv-field textarea:focus-visible, .aig-rv-field input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.aig-rv-opt, .aig-rv-order { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-1); }
.aig-rv-opt input[type="radio"], .aig-rv-ox input { width: 18px; height: 18px; accent-color: var(--primary); }
.aig-rv-num { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); background: var(--primary-fill); color: var(--text-on-primary); font-size: var(--text-xs); font-weight: 700; }
.aig-rv-ox { display: flex; gap: var(--space-4); font-size: var(--text-base); }
.aig-rv-ox label { display: inline-flex; align-items: center; gap: var(--space-1); cursor: pointer; }
.aig-rv-match { display: grid; grid-template-columns: 1fr 24px 1fr; gap: var(--space-2); align-items: center; margin-bottom: var(--space-1); }
.aig-rv-match span { text-align: center; color: var(--primary); font-weight: 700; }
.aig-reject { color: var(--danger); }

/* 다 만들었어요(수업자료 보관함) — 만든 문제 미리 보기 */
.aig-done-lead { margin: 0 0 var(--space-3); font-size: var(--text-base); color: var(--text-body); }
.aig-done-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-2); }
.aig-done-list li { display: flex; gap: var(--space-2); align-items: baseline; padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--text-sm); }
.aig-chip { flex: none; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--bg-subtle);
  border: 1px solid var(--border); font-size: var(--text-xs); font-weight: 700; color: var(--text-body); }

/* 쪽 골라담기(수업자료 PDF 썸네일) — #aigPagePicker · 창 위의 창 */
#aigPagePicker.dialog-overlay { z-index: 450; }
#aigPagePicker .dialog-modal { width: min(880px, calc(100vw - 32px)); max-width: min(880px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 32px)); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
#aigPagePicker .dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
#aigPagePicker .dialog-header, #aigPagePicker .dialog-footer { flex: 0 0 auto; }
.aig-pp-tools { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); font-size: var(--text-sm); color: var(--text-muted); }
.aig-pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-3); }
.aig-pp-cell { position: relative; padding: 0; aspect-ratio: 3 / 4; overflow: hidden; cursor: pointer;
  border: 2px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-subtle); }
.aig-pp-cell[aria-pressed="true"] { border-color: var(--primary); box-shadow: var(--shadow-focus); }
.aig-pp-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.aig-pp-cell img { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.aig-pp-no { position: absolute; left: var(--space-1); bottom: var(--space-1); padding: 1px 6px; border-radius: var(--radius-xs);
  background: var(--text); color: var(--surface); font-size: var(--text-xs); font-weight: 800; }
.aig-pp-cell[aria-pressed="true"] .aig-pp-no { background: var(--primary-fill); color: var(--text-on-primary); }

/* ── [A2 · 2026-10-08] 사진·스캔 · 「문제지 그대로 가져오기」 ───────────────────────────────── */
#aigDlg .dialog-header { gap: var(--space-3); }
.aig-sub { flex: 1; min-width: 0; font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aig-sub:empty { display: none; }

/* 파일 칸 — 문서 하나 또는 사진 여러 장 */
.aig-drop.is-compact { height: 56px; flex-direction: row; gap: var(--space-3); }
.aig-files { margin: var(--space-2) 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-1);
  max-height: 176px; overflow-y: auto; }
.aig-files .aig-file { margin-top: 0; }
.aig-field > .aig-range { margin-top: var(--space-2); }

/* 확인 걸음은 «원본 옆에 놓고» 보느라 더 크다 — 그래도 폭·높이 둘 다 고정(걸음 안에서는 크기가 안 바뀐다 · 화면보다 크면 화면에 맞춘다) */
#aigDlg.is-wide .dialog-modal {
  width: min(1120px, calc(100vw - 32px)); max-width: min(1120px, calc(100vw - 32px));
  height: min(640px, calc(100vh - 32px));
}
#aigDlg.is-wide .dialog-body { overflow: hidden; display: flex; }
.aig-paper { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-4); }
@media (max-width: 760px) {
  #aigDlg.is-wide .dialog-body { overflow-y: auto; display: block; }
  .aig-paper { grid-template-columns: 1fr; grid-template-rows: 280px auto; }
}

/* 왼쪽 — 원본(쪽 글자 · 고른 문항 자리를 칠한다 / 올린 사진·PDF 쪽) */
.aig-src { display: flex; flex-direction: column; min-height: 0; gap: var(--space-2); }
.aig-src-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex: 0 0 auto; }
.aig-src-pages, .aig-src-view { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.aig-src-pg { height: 28px; padding: 0 var(--space-2); border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-body); font: inherit; font-size: var(--text-xs); font-weight: 700; cursor: pointer; }
.aig-src-pg[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.aig-src-pg:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.aig-src-body { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.aig-src-body:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.aig-src-text { margin: 0; padding: var(--space-3) var(--space-4); white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere;
  font: inherit; font-size: var(--text-sm); line-height: 1.7; color: var(--text); }
.aig-src-text mark { background: var(--primary-tint); color: var(--text); border-radius: var(--radius-xs); }
.aig-src-img { display: block; width: 100%; height: auto; }
.aig-src-empty { margin: 0; padding: var(--space-4); font-size: var(--text-sm); color: var(--text-muted); }

/* 오른쪽 — 찾은 문항(유형 칩 · 상태 칩 · 고르기) + 고친 칸 */
.aig-pl { display: flex; flex-direction: column; min-height: 0; gap: var(--space-3); }
.aig-pl-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: var(--space-2); }
.aig-pi { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-2); align-items: center;
  padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.aig-pi.is-on { border-color: var(--primary); background: var(--primary-light); }
.aig-pi-check { width: 18px; height: 18px; accent-color: var(--primary); }
.aig-pi-main { display: flex; align-items: flex-start; gap: var(--space-2); min-width: 0; padding: var(--space-1) 0;
  border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.aig-pi-main:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-xs); }
.aig-pi-n { flex: none; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); background: var(--primary-fill); color: var(--text-on-primary); font-size: var(--text-xs); font-weight: 800; }
.aig-pi-txt { display: flex; flex-direction: column; min-width: 0; }
.aig-pi-q, .aig-pi-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aig-pi-q { font-size: var(--text-sm); font-weight: 700; }
.aig-pi-sub { font-size: var(--text-xs); color: var(--text-muted); }
.aig-pi-side { display: flex; align-items: center; gap: var(--space-1); flex-wrap: nowrap; }
.aig-pi-type { max-width: 112px; height: 28px; padding: 0 var(--space-2); border: 1px solid var(--primary-pale); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--primary-dark); font: inherit; font-size: var(--text-xs); font-weight: 800; cursor: pointer; }
.aig-pi-type:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.aig-chip.is-g { background: var(--success-light); border-color: var(--success); color: var(--success-dark); }
.aig-chip.is-y { background: var(--warning-light); border-color: var(--warning); color: var(--warning-dark); }
.aig-chip.is-r { background: var(--danger-light); border-color: var(--danger); color: var(--danger-dark); }
.aig-chip { white-space: nowrap; }
.aig-pl-edit { flex: 0 0 236px; min-height: 0; overflow-y: auto; }
.aig-pl-edit:empty { display: none; }
.aig-pe-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2);
  font-size: var(--text-sm); color: var(--text); }
.aig-pe-note { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--text-muted); }
/* [2026-10-08] 「문제지 그대로」가 원본에서 잘라 온 그림 — 고치기 칸 안(고정 높이 칸이 스크롤한다 · 창 크기는 그대로) */
.aig-fig { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.aig-fig-img { flex: none; max-width: 55%; max-height: 120px; object-fit: contain; padding: var(--space-1);
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.aig-fig-side { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.aig-fig-note { font-size: var(--text-sm); color: var(--text-muted); word-break: keep-all; }
.aig-fig-acts { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.aig-fig.is-empty { align-items: center; justify-content: space-between; }
.aig-rv-opt-img { flex: none; width: 56px; height: 40px; object-fit: contain; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); }
.aig-chip.has-th { display: inline-flex; align-items: center; gap: var(--space-1); padding-left: 2px; }
.aig-chip-th { width: 18px; height: 18px; object-fit: contain; border-radius: var(--radius-sm); background: var(--surface); }
.aig-rv-confirm { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); font-size: var(--text-sm); font-weight: 700; cursor: pointer; }
.aig-rv-confirm input { width: 18px; height: 18px; accent-color: var(--primary); }
.aig-rv-order input[type="text"] { flex: 1; min-width: 0; }
.aig-ord-mv { flex: none; width: 32px; padding: 0; }
.aig-pl-note { flex: 0 0 auto; margin: 0 0 var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  background: var(--warning-light); border: 1px solid var(--warning); color: var(--warning-dark); font-size: var(--text-sm); }
#aigDlg.is-wide .dialog-body { flex-direction: column; }

/* [2026-10-09 품질 ⑥] 난이도·생각 깊이 다이얼 (확인 걸음의 검사 표시는 결정 ⑤ 2026-10-10 로 걷었다) */
.aig-dial { display: flex; flex-direction: column; gap: var(--space-2); }
.aig-dial-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.aig-dial-row .aig-label { margin: 0; min-width: 72px; }
.aig-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.aig-seg button { min-height: 36px; padding: 0 var(--space-3); border: 0; border-left: 1px solid var(--border); background: none;
  font: inherit; font-size: var(--text-sm); font-weight: 700; color: var(--text-body); cursor: pointer; }
.aig-seg button:first-child { border-left: 0; }
.aig-seg button[aria-pressed="true"] { background: var(--primary-fill); color: var(--text-on-primary); }
.aig-seg button:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ── [다크 테마] AI 문제 만들기 «주제로»(§0-B R222 · ④-10 · 2026-10-23) — 밝은 판 · 고대비는 위 값 그대로 ──
   브라우저 기본 안내 글자(회색)는 어두운 칸에서 3.51. */
@media screen {
html.theme-dark:not(:has(body[data-contrast="high"])) .aig-topic::placeholder { color: var(--text-muted); }
}

/* ── [F04 · 2026-10-28] 장표 그림을 보며 범위 고르기 — #prpDlg (js/page-range-picker.js) ──────────────
   편집기 PPT/PDF 가져오기 · AI 문제 만들기 파일 «쪽» 이 같은 창을 쓴다 · 창 크기 고정(칸이 많으면 창 안에서만 내린다).
   AI 문제 만들기 창(#aigDlg) 위에 뜨므로 그 창의 쪽 골라담기(#aigPagePicker 450)보다 위. */
#prpDlg.dialog-overlay { z-index: 460; }
#prpDlg .dialog-modal { width: min(760px, calc(100vw - 32px)); max-width: min(760px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 32px)); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
#prpDlg .dialog-header, #prpDlg .dialog-footer, #prpDlg .prp-bar { flex: 0 0 auto; }
#prpDlg .dialog-footer { display: flex; align-items: center; gap: var(--space-2); }
.prp-hd { min-width: 0; }
.prp-file { font-size: var(--text-sm); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prp-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-2) var(--space-5);
  background: var(--bg-subtle); border-bottom: 1px solid var(--border); font-size: var(--text-sm); color: var(--text-body); }
.prp-bar input { width: 64px; padding: 2px 6px; border: 1px solid var(--border-input); border-radius: var(--radius-xs);
  font: inherit; background: var(--surface); color: var(--text); }
.prp-cnt { color: var(--primary); font-weight: 700; margin-left: var(--space-1); }
.prp-sp { flex: 1; }
#prpDlg .prp-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: var(--space-4) var(--space-5); }
.prp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: var(--space-3); }
.prp-cell { position: relative; display: block; padding: 4px; border: 2px solid transparent; border-radius: var(--radius-sm);
  background: none; cursor: pointer; font: inherit; color: var(--text-muted); text-align: center; }
.prp-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.prp-pg { display: flex; align-items: center; justify-content: center; height: 92px; border: 1px solid var(--border);
  border-radius: var(--radius-xs); background: var(--surface); overflow: hidden; }
.prp-pg canvas { display: block; max-width: 100%; max-height: 100%; }
.prp-pg.is-fail { background: var(--bg-subtle); }
.prp-no { display: block; margin-top: 2px; font-size: var(--text-xs); }
.prp-cell.is-in { background: var(--primary-light); }
.prp-cell.is-in .prp-pg { border-color: var(--primary-bd); }
.prp-cell.is-in .prp-no { color: var(--primary); font-weight: 700; }
.prp-cell.is-edge { border-color: var(--primary); }
.prp-cell.is-over { background: var(--danger-light); }
.prp-cell.is-over .prp-pg { opacity: .55; }
.prp-cell.is-over .prp-no { color: var(--danger-dark); }
.prp-badge { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); padding: 0 8px; border-radius: var(--radius-pill);
  background: var(--primary-fill); color: var(--text-on-primary); font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.prp-msg { flex: 1; min-width: 0; font-size: var(--text-sm); color: var(--danger-dark); }
.prp-prep { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3);
  color: var(--text-muted); font-size: var(--text-sm); }
.prp-prep p { margin: 0; }
.prp-spin { width: 34px; height: 34px; border: 4px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%;
  animation: prp-spin 1s linear infinite; }
@keyframes prp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .prp-spin { animation: none; } }
/* 파일 «쪽» 칸 옆 「미리 보고 고르기」(AI 문제 만들기) */
.aig-range .aig-range-pick { margin-left: var(--space-2); }

/* ── [2026-11-20] 슬라이드 영역 위에 얹기 — inlineHost 가 있는 화면(편집기)의 방식·내용·만드는 중 걸음 ─────────────
   막은 js 가 «그 영역의 위치·크기»로 줄여 놓는다. 어둡게 덮지 않고 영역만 옅게 가려 슬라이드 목록·도구는 그대로 보인다.
   창은 영역 안에서 고정 크기(영역에서 12px 안쪽) — 걸음이 바뀌어도 변하지 않는다. */
#aigDlg.is-inline { background: color-mix(in srgb, var(--surface, #fff) 72%, transparent); backdrop-filter: none; border-radius: var(--radius-lg, 12px); }
#aigDlg.is-inline .dialog-modal {
  width: min(960px, calc(100% - 24px)); max-width: none;
  height: calc(100% - 24px);
  box-shadow: var(--shadow-lg, 0 12px 32px rgba(15, 23, 42, .18)); border: 1px solid var(--border, #d6dde8);
}
