/* css/detail-editor-options.css — css/detail.css 가족의 한 조각(옮기기만 · 순서의 정본 = js/script-families.json · 코드 구조 4계단④ · 2026-10-10) · 보기 카드 정답 지정 */

/* [2026-06-24 재설계] 도형 가운데 편집 — 단계탭 상단(전폭) / 캔버스 좌 · 도구(도형카드·추가·삭제·배경추가) 우측 세로.
   다른 유형과 동일 폭(758). 캔버스는 좌측 컬럼을 채우되 뷰포트 높이(52vh)로 상한 → 과대 방지. */
html.v2 .qm-shape-edit-card .form-label { text-align: center; }
html.v2 .qm-shape-edit-card .shape-mode-tabs { justify-content: center; }
html.v2 .qm-shape-edit-card .shape-mode-tabdesc { text-align: center; }
html.v2 .qm-shape-edit-card .form-group > * + * { margin-top: 9px; }
/* 2단 — 캔버스(좌, 가변) / 도구(우, 220 고정 세로) */
html.v2 .shape-stage { display: flex; gap: 14px; align-items: flex-start; }
html.v2 .shape-stage-canvas { flex: 1 1 auto; min-width: 0; }
/* 도형 캔버스 상한 — 창 높이의 52%. ★카드 높이로 잴 수 없다★: 위에서 이 카드를 16:9
   무대에서 뺐기 때문에 크기 컨테이너가 아니고(`cqh` 를 쓰면 규칙째 버려진다), 뺐으므로
   더 잘리지도 않는다 — 내용이 길면 바깥(.qm-center-scroll)이 구른다. */
html.v2 .shape-stage-canvas .shape-canvas-wrap {
  max-width: min(100%, 52vh) !important;
  margin: 0 auto; box-shadow: var(--shadow-sm, 0 1px 3px rgba(15,23,42,.06));
}
html.v2 .shape-stage-tools {
  flex: 0 0 222px; align-self: stretch; display: flex; flex-direction: column; gap: 8px;
  background: var(--surface-2, #f8fafc); border: 1px solid var(--border); border-radius: 12px; padding: 12px;
}
html.v2 .st-group-label { font-size: 11px; font-weight: 800; color: var(--text-muted); letter-spacing: .02em; }
html.v2 .st-shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
html.v2 .st-shapes .shape-pal-btn { width: 100%; height: 34px; margin: 0; font-size: 16px; display: grid; place-items: center; }
html.v2 .st-style { display: flex; gap: 8px; }
html.v2 .st-style-item { display: flex; flex-direction: column; gap: 3px; flex: 1; font-size: 10.5px; font-weight: 700; color: var(--text-muted); }
html.v2 .st-style-item input[type="color"] { width: 100%; height: 30px; border: 1.5px solid var(--border-input); border-radius: 7px; padding: 2px; cursor: pointer; }
html.v2 .st-style-item select { width: 100%; height: 30px; border: 1.5px solid var(--border-input); border-radius: 7px; font-size: 12px; padding: 0 6px; }
html.v2 .shape-stage-tools .btn { width: 100%; justify-content: center; }
html.v2 .st-bg { border-top: 1px dashed var(--border); padding-top: 9px; margin-top: 1px; display: flex; flex-direction: column; gap: 6px; }
html.v2 .st-bg-extra { display: flex; gap: 5px; }
html.v2 .st-bg-extra .btn { flex: 1; }
html.v2 .st-bg-status { font-size: 10.5px; color: var(--success); text-align: center; min-height: 13px; }
html.v2 .st-msg { font-size: 11px; color: var(--text-muted); text-align: center; min-height: 14px; }
/* 후보패널 — 캔버스 아래 전폭(중앙 정렬) */
html.v2 .qm-shape-edit-card #shapeCandidatePanel { max-width: 620px; margin: 12px auto 0; }
/* 좁은 화면: 캔버스 위·도구 아래 세로 스택 */
@media (max-width: 1180px) {
  html.v2 .shape-stage { flex-direction: column; }
  html.v2 .shape-stage-tools { flex-basis: auto; width: 100%; }
  html.v2 .st-shapes { grid-template-columns: repeat(8, 1fr); }
}
html.v2 .qm-shape-righthint {
  font-size: 12.5px; color: var(--text-muted); line-height: 1.6; word-break: keep-all;
  padding: 11px 13px; background: var(--surface-2, #f8fafc); border: 1px dashed var(--border); border-radius: 10px;
}
html.v2 .qm-shape-righthint b { color: var(--primary-dark); }
/* [match 가운데 이식] 연결쌍 편집 카드 — 넓은 가운데에서 큰 입력란 */
html.v2 .qm-match-edit-card { padding: 16px 18px; }
html.v2 .qm-match-edit-card .form-group { margin: 0; }

/* [order 가운데 이식 2026-06-25 · D-ED] 순서맞추기 정답순서 가운데 편집 카드 — match/shape 와 동일 톤 */
html.v2 .qm-order-edit-card { padding: 16px 18px; }
html.v2 .qm-order-edit-card .form-group { margin: 0; }
html.v2 .qm-order-edit-card .pv-question { margin-bottom: 12px; }
html.v2 .qm-order-edit-card .pv-comment { margin-top: 12px; }

/* [draw 가운데 이식 2026-06-25 · D-ED] 그리기 샘플 가이드 가운데 편집 카드 — match/shape/order 와 동일 톤 */
html.v2 .qm-draw-edit-card { padding: 16px 18px; }
html.v2 .qm-draw-edit-card .form-group { margin: 0; }
html.v2 .qm-draw-edit-card .pv-question { margin-bottom: 12px; }
html.v2 .qm-draw-edit-card .pv-comment { margin-top: 12px; }

/* [2026-06-24] 유형 설명 장표 — 워드클라우드·토론·표형처럼 정적 미리보기에 보여줄 게 없는 활동형. (일반 선택자) */
.pv-type-explainer {
  margin-top: 12px; padding: 18px 20px; border-radius: 14px;
  background: var(--surface-2, #f8fafc); border: 1px dashed var(--border); text-align: center;
}
.pv-type-explainer .pv-tx-head { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.pv-type-explainer .pv-tx-ico { font-size: 22px; line-height: 1; }
.pv-type-explainer .pv-tx-title { font-size: 15px; font-weight: 800; color: var(--text); }
.pv-type-explainer .pv-tx-desc { font-size: 13px; line-height: 1.65; color: var(--text-muted); margin: 0 auto 12px; max-width: 460px; word-break: keep-all; }
.pv-type-explainer .pv-tx-desc b { color: var(--primary-dark); font-weight: 700; }
.pv-type-explainer .pv-tx-mock {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 6px 14px;
  padding: 14px 12px; margin: 0 auto 12px; max-width: 420px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; color: var(--text);
}
.pv-type-explainer .pv-tx-mock b { color: var(--primary); }
.pv-type-explainer .pv-tx-note { font-size: 11.5px; color: var(--text-muted); margin: 0; line-height: 1.55; }
.pv-type-explainer .pv-tx-note b { color: var(--warning-dark); font-weight: 700; }   /* 없는 이름(--accent-dark)의 대신 값 주황이 옅은 판 위 3.4 — 주의 짝 글자로(④-10) */

/* ★★[2026-09-15] 설명 장표가 «슬라이드를 채운다»★★
   *"워드 클라우드 추가할 때 크기 이상하고"*
   ⛔실측(1600×950 · 편집 무대 873×491): 「단어 모으기」를 넣으면 답지가 **809×179** 짜리 띠로
     위쪽에 붙고 그 아래 **250px 가 텅 비었다.** 다른 유형은 답지가 무대 아래쪽을 채우므로
     교사 눈에는 이 유형만 «덜 그려진» 것으로 보인다.
   ★내용을 키우지 않는다 — «칸»을 채운다★ 글·목업 크기는 그대로 두고 남는 자리를 답지가
     가져가 가운데 정렬한다. 학생 화면에서 단어 구름이 그 자리를 채우는 것과 같은 모양이 된다.
   ⚠자유 배치에서는 아무 일도 안 한다 — 그때 `.qm-el` 은 `position:absolute` 라 flex 가 안 먹는다
     (교사가 잡아 둔 자리가 이긴다).
   ⚠토론도 같은 장표를 쓴다(`pv-type-explainer` 한 벌) — 두 벌로 갈라 쓰지 않는다. */
html.v2 #qmCenterPreview .pv-player > .qm-el:has(> .pv-type-explainer),
html.v2 #qmCenterPreview .pv-player > .pv-type-explainer { flex: 1 1 auto; min-height: 0; }
/* 감싼 덩어리(`.qm-el`)만 커지면 «보이는 상자»는 그대로다 — 장표 자신도 그 높이를 받아야 한다. */
html.v2 #qmCenterPreview .pv-player > .qm-el:has(> .pv-type-explainer) {
  display: flex; flex-direction: column;
}
html.v2 #qmCenterPreview .qm-el > .pv-type-explainer { flex: 1 1 auto; min-height: 0; }
/* [2026-11-12 F-20261111-16-3] 답 칸이 설명판보다 작으면 가운데 정렬이 위아래로 똑같이 넘쳐, 답 칸(.qm-el · overflow:hidden)이
   첫 줄 «💬 워드클라우드»를 잘랐다(무대 안으로 맞춘 넘침 슬라이드 · 답 칸 25.7% · 1600 창에서 26px 줄 중 15.5px 잘림).
   `safe` 는 넘칠 때만 위 정렬로 바꾼다 — 자리가 남으면 종전처럼 가운데다. 잘림은 덜 중요한 맨 아래(«설명용» 안내)로 간다.
   ★넘침이 아래로 가야 무대 맞추기가 모자란 높이를 다 잰다★ — 맞추기는 scrollHeight 로 재는데(js/editor-element-box-tidy.js squeezedPct)
   위로 넘친 몫은 거기 안 잡힌다. 가운데일 때는 절반만 재, 답 칸을 설명판보다 작게(25.7%) 저장했다. */
html.v2 #qmCenterPreview .pv-type-explainer {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; justify-content: safe center;   /* 넘치면 위부터(첫 줄이 잘리지 않게) */
}
/* ⚠세로 가운데로 만들면서 «가로»가 내용 폭으로 줄어든다 — 목업 상자만 원래 폭을 되찾아 준다
   (`max-width:420px` 는 위 기본 규칙이 이미 갖고 있다). 글줄은 자기 `max-width` 로 충분하다. */
html.v2 #qmCenterPreview .pv-type-explainer .pv-tx-mock { width: 100%; }

/* [04 개선 gap1] 객관식 미리보기 보기행 — 레퍼런스 .pv-opt + 좌측 picker 배지(.pk).
   보기행을 flex 로 만들고 좌측에 사각 배지(A·B·C·D)를 둠. 정답이면 배지가 초록으로 채워짐(.pv-opt-correct).
   v2-editor 스코프 한정 — 운영/alcquiz·gaze 오버레이의 기존 .pv-opt-btn(번호접두 텍스트형) 무영향. */
html.v2 .qm-center-preview .pv-opt-btn {
  display: flex; align-items: center; gap: 12px;
  border-radius: 13px;
}
html.v2 .qm-center-preview .pv-opt-pk {
  width: 30px; height: 30px; border-radius: 8px;
  border: 2px solid var(--border-strong);
  background: #fff; color: var(--text-muted);
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px; line-height: 1;
  flex-shrink: 0; transition: background .12s, color .12s, border-color .12s;
}
html.v2 .qm-center-preview .pv-opt-btn.pv-opt-correct .pv-opt-pk {
  background: var(--success); border-color: var(--success); color: #fff;
}

/* ── [편집기 3단계 2026-08-28 · 확정 4·5] 보기 카드의 ✓ 정답 지정 · ✕ 삭제 ──────────
   ★✕ 는 «마우스를 올리면» 나타난다(확정 5). 그런데 키보드에는 hover 가 없다★ —
   :focus-within 을 함께 걸어, Tab 으로 카드에 들어와도 똑같이 보이게 한다.
   안 걸면 키보드만 쓰는 교사에게는 삭제 버튼이 «없는 것»이 된다(접근성 헌장).
   ✓ 는 «지금 정답이 어디인가»를 말하는 표시라 늘 보인다 — 흐린 ✓ = 누르면 정답. */
html.v2 .qm-center-preview .qm-opt-tools {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
}
/* O/X 는 카드가 세로형(⭕ 위 · 글자 아래)이라 ✓ 를 가운데 아래에 둔다 — 객관식처럼 오른쪽 끝에
   붙이면 카드 밖으로 나간다(2026-08-29). 카드 아무 곳을 눌러도 정답이 되므로 ✓ 는 표시에 가깝다. */
html.v2 .qm-center-preview .pv-ox-btn { position: relative; cursor: pointer; }
html.v2 .qm-center-preview .pv-ox-btn .qm-opt-tools { margin: 6px auto 0; display: flex; justify-content: center; }
/* [2026-10-20] O/X 의 ✓ 는 «단추 글자(⭕ 크기)»에 비례한다 — 사용자 «저 정답 체크 표시 너무 작아» · «여백도 주면 좋겠어».
   고정 26px 상자·14px 글자였을 때 ⭕ 80 아래에서 ✓ 가 화면 14px(배율 0.557)로 보였다.
   ⭕ 80 기준: ✓ 글자 24 · 상자 42 · 이름표와 사이 20. 칸이 줄면 함께 준다(하한 = 작은 칸의 종전 값 18 — ✓ 가 ⭕ 보다 커지지 않게 · 단추 아무 곳이나 눌러도 정답이 된다).
   ★`.pv-ox-wrap` 을 붙인 것은 특이도 때문★ — css/detail-editor.css 의 «무대 비례 ✓·✕»(.qm-center-prev-card:not(:has(...)))보다 앞서야 한다. */
html.v2 .qm-center-preview .pv-ox-wrap .pv-ox-btn .qm-opt-tools { margin-top: max(6px, .25em); }
html.v2 .qm-center-preview .pv-ox-wrap .pv-ox-btn .qm-opt-mark {
  font-size: max(11px, .3em); width: max(18px, 1.75em); height: max(18px, 1.75em); border-radius: .45em;
}
/* 납작한 답지에서 ⭕ 와 글씨가 옆으로 나란히 설 때(css/detail-settings-preview.css «min-aspect-ratio: 4/1») ✓ 도 글씨 오른쪽에 */
@container (min-aspect-ratio: 4/1) {
  html.v2 .qm-center-preview .alc-slide-stage.qm-el-free .qm-el[data-el="answer"] .pv-ox-wrap .pv-ox-btn .qm-opt-tools { margin: 0 0 0 .2em; }
}

/* 단답형 — 슬라이드 위 정답 칩 + 입력칸 (2026-08-29) */
html.v2 .qm-center-preview .qm-ans-chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
html.v2 .qm-center-preview .qm-ans-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 10px; border-radius: 999px;
  background: var(--success-light); color: var(--success-dark);
  border: 1px solid var(--success); font-size: 13px; font-weight: 700;
}
html.v2 .qm-center-preview .qm-ans-x {
  cursor: pointer; font-size: 11px; line-height: 1;   /* 흐림(.65) 걷음 — 초록 칩 위 2.61(④-10) */
  width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%;
}
html.v2 .qm-center-preview .qm-ans-x:hover { opacity: 1; background: rgba(0,0,0,.06); }
html.v2 .qm-center-preview .qm-ans-x:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
html.v2 .qm-center-preview .qm-ans-empty { font-size: 12.5px; color: var(--text-muted); }
html.v2 .qm-center-preview .qm-ans-input {
  width: 100%; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; background: var(--surface); color: var(--text);
}
html.v2 .qm-center-preview .qm-ans-input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-tint);
}
html.v2 .qm-center-preview .qm-opt-mark,
html.v2 .qm-center-preview .qm-opt-del {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  font-size: 14px; line-height: 1; cursor: pointer;
  transition: background .12s, color .12s, opacity .12s;
}
html.v2 .qm-center-preview .qm-opt-mark { color: var(--text-muted); }
html.v2 .qm-center-preview .qm-opt-mark:hover { background: var(--success-soft, #f0fdf4); color: var(--success); }
html.v2 .qm-center-preview .qm-opt-mark.on { background: var(--success-fill); color: var(--text-on-primary); }   /* 흰 ✓ 3.3 → 채움 이름(④-10 · 맞춤 학습 ✓ 칸과 같다) */
html.v2 .qm-center-preview .qm-opt-del {
  color: var(--danger); opacity: 0; pointer-events: none;
}
html.v2 .qm-center-preview .pv-opt-btn:hover .qm-opt-del,
html.v2 .qm-center-preview .pv-opt-btn:focus-within .qm-opt-del {
  opacity: 1; pointer-events: auto;
}
html.v2 .qm-center-preview .qm-opt-del:hover { background: var(--danger-light); }
html.v2 .qm-center-preview .qm-opt-mark:focus-visible,
html.v2 .qm-center-preview .qm-opt-del:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 1px;
}

/* Phase 7 — 유형별 우측 편집 패널 공통 필드 v2 정제(비주얼만·전 13유형 공통 컴포넌트, 기능/마크업 무변경).
   입력은 더 둥글게·라벨 굵게·포커스 v2 링. */
html.v2 .qm-editor-panel .form-label { font-weight: 700; color: var(--text-body); }
html.v2 .qm-editor-panel .form-control { border-radius: 11px; border-color: var(--border-input); }   /* 값을 넣거나 고르는 칸 = R223 ①(--border-strong 은 흰 면 1.48 · 다크 2.03 · ④-10) */
html.v2 .qm-editor-panel .form-control:hover { border-color: var(--border-input-hover); }
html.v2 .qm-editor-panel .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
html.v2 .qm-editor-panel textarea.form-control { border-radius: 11px; }
/* 단답 정답 칩 — v2 둥근 알약 톤(있을 때만, 마크업 무변경) */
html.v2 .qm-editor-panel .short-chips .chip,
html.v2 .qm-editor-panel .short-chip { border-radius: 999px; }

/* ═══ [v2-editor · devquiz 단독·승격가능] 좌측 슬라이드 목록 카드 ═══
   체크박스·▲▼ 이동 버튼 제거(마크업 미출력) + 우하단 복제/삭제 아이콘 유지 + 높이 통일
   (제목 1줄 ellipsis + 유형/부가 1줄 ellipsis, title= hover). 레거시·alcquiz·운영은 기존 quizn 카드 그대로(회귀 0). */
/* 카드 높이 통일 — 제목 1줄 + 유형 1줄 기준 최소 높이 */
html.v2 .quizn-editor .qm-item,
html.v2 .qm-item { min-height: 58px; }
/* 본문: 제목(위) → 유형(아래) 정방향 세로 스택 (quizn base 의 column-reverse 복원) */
html.v2 .quizn-editor .qm-item-body,
html.v2 .qm-item-body { flex-direction: column; gap: 3px; }
/* 제목: ★1줄 말줄임 → 최대 3줄★ (2026-08-28 · 사장님: *"말줄임으로 잘리는 걸 최대한 막자"*)
   ⚠ 종전 주석은 «2줄 clamp 해제 → 1줄 말줄임»이었다 — 그때는 폭이 240px 이라 2줄로도 대부분
     잘려서, 줄만 늘리면 행만 높아지고 얻는 게 없었다. **폭을 330px 로 벌면서 조건이 바뀌었다.**
   실측(슬라이드 11장): 지금 **0/11** 이 온전히 보였고, 330px+3줄이면 **11/11** 이다.
   그리고 폭 덕분에 «글자를 키우고도» 전부 보인다 — 12.5 → 14.5px(수업 목록 20260828-58 과 같은
   방향: 주인공과 부속의 무게를 벌린다). 4줄까지 늘려도 결과가 같아 3줄에서 멈춘다.
   맞바꿈: 한 화면에 보이는 행이 7.1 → 5.4. 회차당 슬라이드는 평균 6.9장(운영 실측)이라
   살짝 스크롤이 생긴다 — 「제목이 다 보이는 것」을 택한 결과다. */
html.v2 .quizn-editor .qm-item-preview,
html.v2 .qm-item-preview {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  white-space: normal; overflow: hidden; text-overflow: ellipsis;
  font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.42; margin-bottom: 0;
}
/* 제목이 여러 줄이 되면 행은 «내용만큼» 자란다 — 짧은 제목 줄은 지금처럼 낮게 그대로 있다.
   (min-height 58px 는 위에 그대로 두고 위쪽 정렬로 바꾼다) */
html.v2 .qm-item { height: auto; align-items: flex-start; }
/* 유형/부가: 1줄 말줄임 + 우하단 복제/삭제 아이콘 자리(52px) 확보 */
html.v2 .quizn-editor .qm-item-type,
html.v2 .qm-item-type {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding-right: 52px; line-height: 1.4;
}
/* 우하단 복제/삭제 — 평소에도 또렷하게(옅은 회색 아이콘) · 마우스를 올리면 진하게(결정 S3 A · 2026-11-04 · F-20261023-29-5).
   옛 «평소 흐림 .5»는 아이콘이 밝게 1.97 · 다크 2.93 으로 그림 부품 기준 3 에 못 미쳤다. */
html.v2 .qm-card-acts { right: 7px; bottom: 6px; opacity: 1; }

/* Left: List Panel */
/* [회차 86 E7] 폭 270 → 300 — 슬라이드 제목 잘림 완화 + import 카드 안정 */
.qm-list-panel {
  width: 300px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  min-height: 0;                  /* flex child가 부모 높이를 넘지 않도록 — 안 그러면 내부 overflow 무력화 */
}
/* 중간 폭에서는 살짝 줄임 — 우측 에디터에도 여유 */
@media (max-width: 1100px) {
  .qm-list-panel { width: 270px; }
}
/* 좌측 패널 폭(270px) 안에서 "슬라이드 목록 N개" + 이전·뱅킹 버튼.
   - 한 줄에 충분히 들어가면 row, 좁아지면 자동 wrap → 타이틀 위 / 버튼 아래로 자연스럽게 분리.
   - 버튼 라벨이 길어도 깨지지 않도록 white-space: nowrap + 폰트/패딩 작게. */
.qm-panel-header {
  display: flex; flex-flow: row wrap; align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; background: var(--bg-subtle);
}
.qm-panel-title {
  font-size: var(--text-base); font-weight: 700;
  white-space: nowrap; flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; color: var(--text);
}
.qm-panel-title em { font-style: normal; color: var(--primary); }
/* [2026-08-31] 회차 «만든 날» 한 줄 — 브레드크럼 칩에서 내려온 자리.
   ★이름표를 값보다 앞에 둔다★ — 날짜만 있으면 «무슨 날짜인지»를 아무도 모른다(그게 옮긴 이유다). */
.qm-panel-sub {
  padding: 7px 14px; border-bottom: 1px solid var(--border);
  background: var(--bg-subtle); flex-shrink: 0;
  font-size: 12px; color: var(--text-muted); letter-spacing: -0.01em;
}
.qm-panel-sub b { font-weight: 700; color: var(--text-body); }
.qm-panel-sub[hidden] { display: none; }

/* 항목이 적을 때(스크롤 불필요)는 목록이 빈 패널을 채우지 않게 flex: 0 1 auto.
   많을 때는 자체 overflow:auto 가 작동하면서 푸터가 자연스럽게 패널 하단에 위치. */
.qm-list { flex: 0 1 auto; overflow-y: auto; padding: 6px 0; list-style: none; min-height: 0; }

/* 좌측 패널의 슬라이드 추가 버튼 — 항목 수에 따라 위치 자동 변경.
   기본(.pinned 없음): 목록이 짧으면 항목 바로 아래 (붙어 보임).
   .pinned 추가 시 (목록 overflow): 패널 하단 고정 + 분리선 표시.
   .qm-list 가 flex:0 1 auto 라 항목이 적을 땐 자기 크기만큼만 차지 → 푸터가 자연스럽게 항목 바로 아래에 옴. */
.qm-list-footer {
  flex-shrink: 0;
  padding: 8px 12px 10px;
  background: transparent;
}
.qm-list-footer.pinned {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  margin-top: auto;
}
.qm-add-btn {
  width: 100%;
  height: 42px;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s var(--ease), transform .12s var(--ease);
}
.qm-add-btn:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.qm-add-btn:active { transform: translateY(0); }

/* [QuizN 에디터 P1 2026-06-18 · DEVQUIZ 전용] 좌측 슬라이드 레일 — PPT 카드 스타일 + 카드별 복제/삭제.
   html.quizn-editor 일 때만 적용(alcquiz/운영 무영향). */
.quizn-editor .qm-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 0 8px 8px;
  padding: 10px 10px 10px 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color .12s, box-shadow .12s;
}
.quizn-editor .qm-item:hover { border-color: #c7d2e0; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08); }
.quizn-editor .qm-item.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25); }
/* 유형 배지를 위로(컬러), 내용은 아래 2줄 말줄임 = PPT 썸네일 느낌 */
.quizn-editor .qm-item-body { display: flex; flex-direction: column-reverse; gap: 3px; }
/* [편집기 2단계 2026-08-28] :not(.qm-item-collect) — 이 규칙은 수집 배지가 생기기 «전»에
   쓰였는데, .qm-item-type 안의 모든 span 을 잡으면서 배지의 색·크기까지 !important 로 덮었다.
   그래서 켜짐(초록)·꺼짐(회색)이 «둘 다 파랑»으로 나와 배지가 아무것도 알려주지 못했다(실측). */
.quizn-editor .qm-item-type span:not(.qm-item-collect) { font-weight: 700; color: var(--primary) !important; font-size: 11px !important; }
.quizn-editor .qm-item-preview {
  font-size: 12.5px; color: #334155; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 카드별 복제·삭제 — 평소 흐리게, hover/선택 시 또렷 */
.qm-card-acts { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.quizn-editor .qm-item:hover .qm-card-acts,
.quizn-editor .qm-item.selected .qm-card-acts,
.quizn-editor .qm-item:focus-within .qm-card-acts { opacity: 1; }
.qm-card-act { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-muted); cursor: pointer; padding: 0; }
.qm-card-act:hover { background: #eef2f9; color: var(--text); }
.qm-card-del:hover { background: #fee2e2; color: var(--danger); border-color: #fca5a5; }   /* [design-ok] 기존 값 그대로 — 이 줄은 «옛 빨강 → 토큰»만 옮겼다(2026-10-04) */
.qm-card-act .ui-ico-sm { width: 13px; height: 13px; }

/* 임시 저장 (clientside drafts) — 좌측 목록 아이템에 표시 */
/* [디자인감사 E-5 2026-07-21] 노란 그라데이션 워시 → 좌측 스트라이프(§0-B 정제규칙 3). */
.qm-item.draft { background: var(--surface); box-shadow: inset 3px 0 0 var(--warning); }
.qm-item.draft.selected { background: var(--primary-light); box-shadow: inset 3px 0 0 var(--warning); }
.qm-item-dirty { display: inline-block; margin-right: 4px; font-size: 9px; line-height: 1; }


/* [30선 #24] 뱅킹 결과 미니 chip — 태그 필터 chip(.bank-tag-chips·.bank-tag-chip)은 2026-06-16
   가져오기 창에서 없앴고, 남은 규칙은 2026-10-03(F-20260926-14-4) 걷었다. */
.bank-tag-mini-row { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.bank-tag-mini {
  font-size: 10.5px; padding: 1px 6px; border-radius: 4px;
  background: rgba(74,108,247,0.10); color: var(--primary-dark); font-weight: 600;   /* 특수 청록 글자가 파란 면 위 4.48 — 한 단계 짙은 학교 색(④-10) */
}
.bank-diff-mini {
  display: inline-block; font-size: 11px; margin-left: 6px;
  letter-spacing: -0.5px;
}
/* [BANK-C01] 난이도칩 색대비 AA — diff-2(#65a30d)·diff-3(#ca8a04) 은 흰 배경에서 대비 부족(4.5:1 미달).
   더 어두운 톤(#4d7c0f / #92400e)으로 교체해 본문 대비 기준 충족. ★(채움) 자체로도 난이도 식별되므로 색은 보조. */
.bank-diff-mini.diff-1 { color: var(--success-dark); }   /* 흰 면 위 3.3 → 초록 짝 글자(④-10) */
.bank-diff-mini.diff-2 { color: #4d7c0f; }
.bank-diff-mini.diff-3 { color: #92400e; }
.bank-diff-mini.diff-4 { color: var(--warning-dark); }   /* 흰 면 위 3.56 → 주의 짝 글자(④-10) */
.bank-diff-mini.diff-5 { color: var(--danger); }

/* [30선 #19] Undo 토스트 — 우하단 검정 캡슐, 5초 유예 동안 노출 */
.undo-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px 10px 18px; border-radius: 999px;
  background: #1e293b; color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.36);
  animation: undo-toast-in .18s ease-out;
}
@keyframes undo-toast-in {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.undo-toast-label::before { content: '🗑 '; }
.undo-toast-btn {
  background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.24);
  padding: 4px 12px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 700;
  transition: background .12s;
}
.undo-toast-btn:hover { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.4); }

/* 일괄 저장 진행 토스트 */
.commit-progress {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999; padding: 12px 22px; border-radius: 999px;
  background: #1f2937; color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.32);
}

/* 슬라이드 검색·필터 row (30선 항목 16) — [회차 57] 돋보기 아이콘 inline + 폰트/패딩 정돈 */
.qm-search-row {
  display: flex; gap: 6px; padding: 8px 10px;
  border-bottom: 1px solid var(--border); background: var(--bg-subtle);
  flex-shrink: 0;
}
.qm-search-wrap {
  position: relative; flex: 1 1 auto; min-width: 0;
}
.qm-search-ico {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  color: #6b7280; pointer-events: none; /* WCAG 1.4.11: search icon #94a3b8 2.56:1<3:1 → #6b7280 4.83:1 on surface */
}
.qm-search-input {
  width: 100%; padding: 6px 8px 6px 30px; font-size: var(--text-sm);
  border: 1px solid var(--border-input); border-radius: var(--radius-sm); background: var(--surface);
  font-family: inherit; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.qm-search-input:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.qm-search-input:focus + .qm-search-ico, .qm-search-wrap:focus-within .qm-search-ico { color: var(--primary); }
.qm-type-filter {
  flex: 0 0 auto; max-width: 110px;
  padding: 6px 6px; font-size: var(--text-sm);
  border: 1px solid var(--border-input); border-radius: var(--radius-sm); background: var(--surface);
  font-family: inherit;
}
.qm-list-empty-hint {
  padding: 14px; text-align: center; font-size: 12px; color: var(--text-muted);
}
/* [UX P2] 검색결과 없음 → 초기화 버튼 */
.qm-search-reset {
  margin-top: 10px; padding: 6px 14px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--primary); cursor: pointer;
}
.qm-search-reset:hover { background: var(--primary-soft); border-color: var(--primary); }
.qm-search-reset:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* [UX P1] 신규/개편 컴포넌트 focus-visible — 키보드 포커스 위치 가시화(유형 카드·그리기 모드/소스 탭) */
.draw-mode-radio:focus-visible,
.draw-source-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* 클라이언트 에러 표시 (30선 항목 15) */
.client-err-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9998;
  padding: 10px 16px; border-radius: 10px;
  background: #fef3c7; color: #92400e; border: 1px solid #f59e0b;
  font-size: 12.5px; font-weight: 600; max-width: 360px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.25);
  cursor: pointer;
}

/* 키보드 단축키 안내 패널 (30선 항목 5) — Shift+? 로 토글 */
.kbd-help-overlay {
  position: fixed; inset: 0; z-index: 10001;
  background: rgba(15,23,42,0.5);
  display: flex; align-items: center; justify-content: center;
}
/* ★크기 고정 — 내용이 늘어도 상자와 「닫기」는 제자리다★ (docs/UI_GUIDELINES.md §0 고정크기모달)
   2026-08-31 에 단축키가 8줄에서 20줄 넘게 늘면서, 늘어나는 상자로는 「닫기」가 화면 밖으로
   밀려났다. 넘치는 것은 아래 .kbd-help-body 안에서 구른다. */
.kbd-help-card {
  background: var(--surface); border-radius: 14px; padding: 22px 28px;
  width: 92%; max-width: 520px; height: 76vh; max-height: 640px;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(15,23,42,0.4);
}
.kbd-help-card h3 { margin: 0 0 14px; font-size: 16px; flex: 0 0 auto; }
.kbd-help-body { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.kbd-help-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kbd-help-card td { padding: 6px 4px; border-bottom: 1px solid var(--bg-subtle); }
.kbd-help-card td:first-child { white-space: nowrap; width: 1%; padding-right: 12px; vertical-align: top; }
/* 묶음 머리 — 「슬라이드 / 요소 / 저장」 세 갈래를 눈으로 먼저 가른다. 위에 붙어 따라온다. */
.kbd-help-card th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--text-muted); background: var(--surface);
  padding: 14px 4px 5px; border-bottom: 1px solid #e2e8f0;
  word-break: keep-all;
}
.kbd-help-card tr:first-child th { padding-top: 2px; }
.kbd-help-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-muted); word-break: keep-all; }
.kbd-help-note { margin: 12px 0 0; font-size: 12px; color: var(--text-muted); word-break: keep-all; }
/* 「닫기」는 구르지 않는다 — 표가 아무리 길어도 늘 같은 자리에 있다. */
.kbd-help-foot { flex: 0 0 auto; text-align: right; margin-top: 14px; }
.kbd-help-card kbd {
  display: inline-block; padding: 2px 7px; font-size: 11.5px; font-family: monospace;
  background: var(--bg-subtle); border: 1px solid #cbd5e1; border-radius: 4px;
  box-shadow: 0 1px 0 #cbd5e1; color: #334155;
}

/* RTE 자주 쓰는 미디어 — 큰 라벨 버튼 (작은 툴바 아이콘만으론 발견성 낮음) */
.rte-quick-media {
  display: flex; gap: 6px; padding: 6px 8px;
  border: 1px solid var(--border); border-top: none;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  flex-wrap: wrap;
}
.rte-quick-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 700;
  background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
  color: #1e293b; cursor: pointer;
  transition: border-color .12s, box-shadow .12s, transform .08s;
}
.rte-quick-btn:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(79,110,247,.18); }
.rte-quick-btn:active { transform: translateY(1px); }

/* RTE 도구 안내 모달 */
.rte-help-overlay { position: fixed; inset: 0; z-index: 10001; background: rgba(15,23,42,0.5); display: flex; align-items: center; justify-content: center; }
.rte-help-card { background: #fff; border-radius: 14px; padding: 22px 26px; max-width: 520px; width: 92%; max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(15,23,42,0.4); }
.rte-help-card h3 { margin: 0 0 4px; font-size: 16px; }
.rte-help-sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.rte-help-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rte-help-card td { padding: 7px 4px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.rte-help-card td.ic { width: 110px; font-weight: 700; color: #1e293b; }
.rte-help-card td.nm { font-weight: 600; color: var(--text); }
.rte-help-card td.sc { color: var(--text-muted); font-size: 12px; }

/* 이모지 picker popover */
.rte-emoji-pop {
  position: fixed; z-index: 10001;
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
  padding: 8px; width: 272px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15,23,42,0.18);
}
.rte-emoji-cell {
  width: 30px; height: 30px;
  border: none; background: transparent; border-radius: 6px;
  font-size: 18px; cursor: pointer; line-height: 1;
  padding: 0; transition: background .1s;
}
.rte-emoji-cell:hover { background: var(--primary-light); }

/* 저장 실패 창의 틀 (30선 항목 3 · js/detail-save-preview.js showCommitPartialFailureModal · 옛 «변경 내역 확인» 창은 2026-11-10 2단계에서 없앴다) */
.commit-diff-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(15,23,42,0.5);
  display: flex; align-items: center; justify-content: center;
}
.commit-diff-card {
  background: var(--surface); border-radius: 14px; padding: 22px 24px;
  max-width: 560px; width: 92%; max-height: 80vh;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(15,23,42,0.4);
}
.commit-diff-card h3 { margin: 0 0 6px; font-size: 16px; }
.commit-diff-card .sub { font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
/* 저장 실패 창의 «왜» 상자 · 숫자 — js/detail-save-preview.js 의 인라인 색을 옮겼다(값 그대로 · 다크 값은 이 파일 끝 · ④-10) */
.commit-diff-why { margin: 12px 0 0; padding: 10px 12px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; font-size: 13px; line-height: 1.7; color: #78350f; }   /* [design-ok] 인라인에서 옮김 · 값 그대로 */
.commit-diff-card .sub .is-done { color: #166534; }   /* [design-ok] 인라인에서 옮김 · 값 그대로 */
.commit-diff-card .sub .is-left { color: #991b1b; }   /* [design-ok] 인라인에서 옮김 · 값 그대로 */
.commit-diff-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* [회차 86 E3] 슬라이드 카드 — 분리된 카드형 + 드래그 핸들/번호 원/유형 아이콘 강조 */
/* [SV-10] 슬라이드 목록의 섹션 헤더 — 섹션 시작 슬라이드 위에 구분 표시(설문 전용). */
.qm-section-header {
  display: flex; align-items: center; gap: 6px;
  margin: 12px 10px 2px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  word-break: keep-all;
}
.qm-section-header .qm-section-icon { flex: 0 0 auto; }
.qm-section-header .qm-section-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.qm-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  margin: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .12s var(--ease), border-color .12s var(--ease), box-shadow .12s var(--ease), transform .08s var(--ease);
  user-select: none;
}
.qm-item:hover   { background: var(--bg-subtle); border-color: var(--border); box-shadow: var(--shadow-xs); }
.qm-item.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  border-left-color: var(--primary);
}
.qm-item.selected:hover { background: var(--primary-light); }
/* [2026-10-26 사용자] 끄는 카드 = «놓으면 들어갈 자리»의 점선 빈 칸 — 마우스를 따라 목록 안에서 옮겨 다닌다(js/list-reorder.js _onListDndOver).
   크기는 그 카드 그대로(내용만 감춘다) — 빈 칸이 열리는 만큼 다른 카드가 비켜 준다.
   모양은 순서 행 끌기(.order-item-row.dragging · css/detail-editor.css)와 같다 — 편집기 안의 «끌어서 순서 바꾸기»는 한 모양.
   ⚠고른 카드(.selected)의 파란 배경·테두리도 덮는다 — 빈 칸이 «고른 슬라이드»로 보이면 안 된다. */
.qm-item.dragging,
.qm-item.dragging.selected,
.qm-item.dragging:hover {
  border: 2px dashed var(--border-strong);
  background: var(--bg-subtle);
  box-shadow: none;
  cursor: grabbing;
}
.qm-item.dragging > * { visibility: hidden; }

/* 6점 드래그 핸들 — 시안의 ⠿ 더 명확히 (글자 크기 + opacity hover 시 강조) */
.drag-handle {
  cursor: grab; font-size: 14px;   /* [design-ok] 기존 14px 그대로 — 이 줄에서는 옛 색 리터럴만 걷었다(S3) */
  flex-shrink: 0; line-height: 1; color: var(--text-muted);   /* 평소 흐림 .55 걷음(S3 · 밝게 2.14 였다) — 옅은 회색 그대로 또렷하게 · 마우스를 올리면 --text */
  transition: opacity .12s, color .12s;
  padding: 2px;
}
.qm-item:hover .drag-handle { color: var(--text); }
.qm-item.selected .drag-handle { color: var(--primary); }
.drag-handle:active { cursor: grabbing; }
.order-item-row .drag-handle { opacity: 1; color: var(--text-muted); }   /* 무대 위 순서 줄에는 마우스 올림으로 드러나는 자리가 없다 — 늘 보이게(흐림 .55 = 2.14 · ④-10) */

/* 번호 원 — 가이드 시안의 회색 동그라미 (강조 시 primary) */
.qm-item-num {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  background: var(--bg-subtle); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  transition: background .12s, border-color .12s, color .12s;
}
.qm-item.selected .qm-item-num { background: var(--primary); border-color: var(--primary); color: #fff; }

/* [2026-10-14 설계 §3-A · §0-B R194] 편집기 슬라이드 목록의 번호 동그라미 = 상태 표지.
   ★채운 양과 선 종류로만 가른다 — 새 색을 더하지 않는다★(색칠이 많으면 눈이 피곤하다 · R192)
     다 채웠어요 = 회색 가득 · 덜 채웠어요 = 아래 절반 · 정답이 없어요 = 테두리만 · 비었어요 = 점선 테두리
   ★고른 카드도 번호 모양을 바꾸지 않는다★ — 카드 강조가 이미 «골랐다»를 알린다(위 .selected 파랑을 덮는다).
   범위 = 슬라이드 목록(#quizList)의 data-st 가 붙은 동그라미만(js/slide-list-status.js) — 순서 항목·미디어 고르기의
   같은 이름 동그라미는 그대로다. 접힌 목록(번호만 남는 띠)에서도 같은 동그라미라 그대로 보인다. */
#quizList .qm-item-num[data-st] {
  --qm-st-ink: var(--text-muted);
  --qm-st-fill: color-mix(in srgb, var(--text-muted) 32%, var(--surface));
  background: var(--surface); border: 1.5px solid var(--qm-st-ink); color: var(--text); /* [design-ok] 설계 §3-A 테두리 굵기 — 점선이 보이는 최소 */
}
#quizList .qm-item-num[data-st="done"] { background: var(--qm-st-fill); }
#quizList .qm-item-num[data-st="fill"] { background: linear-gradient(to top, var(--qm-st-fill) 50%, var(--surface) 50%); }
#quizList .qm-item-num[data-st="empty"] { border-style: dashed; }

.qm-item-body { flex: 1; min-width: 0; }
.qm-item-preview {
  font-size: var(--text-sm); font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 3px; letter-spacing: -0.01em;
}
/* [2026-09-29] 자료 슬라이드 이름 바꾸기 칸(js/editor-rail-rename.js) — 목록 줄 폭 그대로, 글자 크기·굵기는 이름과 같게 */
.qm-item-rename {
  width: 100%; box-sizing: border-box; font: inherit; color: var(--text);
  padding: 2px 6px; border: 1px solid var(--primary); border-radius: 8px; background: var(--surface);
}
.qm-item-type { font-size: 10.5px; display: flex; align-items: center; gap: 4px; min-width: 0; }
/* ★배지는 안 밀린다★ — 유형 라벨이 길면 라벨만 줄인다(2026-08-27: 「안내 슬라이드⏺」가 잘렸다) */
.qm-item-type > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.qm-item-type .qm-item-collect { flex: 0 0 auto; margin-left: auto; }
/* [회차 86 E3] 유형 라벨 — 유형별 컬러 강조. data-type 속성으로 식별 */
.qm-item[data-type="multi"]  .qm-item-type { color: var(--success); }
.qm-item[data-type="ox"]     .qm-item-type { color: var(--danger); }
.qm-item[data-type="short"]  .qm-item-type { color: var(--warning); }
.qm-item[data-type="order"]  .qm-item-type { color: var(--primary); }
.qm-item[data-type="match"]  .qm-item-type { color: #8b5cf6; }
.qm-item[data-type="video"]  .qm-item-type { color: #db2777; }
.qm-item[data-type="shape"]  .qm-item-type { color: #0891b2; }
.qm-item[data-type="draw"]   .qm-item-type { color: var(--warning); }
.qm-item[data-type="notice"] .qm-item-type { color: #6b7280; }

/* Right: Editor Panel */
.qm-editor-panel {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
}
.editor-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: var(--text-muted); text-align: center; padding: var(--space-9) var(--space-6);
  gap: 6px;
}
.editor-empty .ei { font-size: 52px; margin-bottom: 14px; opacity: 0.85; }
.editor-empty h3  { font-size: var(--text-lg); font-weight: 700; color: var(--text); margin-bottom: 4px; letter-spacing: -0.01em; }
.editor-empty p   { font-size: var(--text-base); line-height: 1.6; max-width: 360px; }

/* [회차 58] 편집기 영역 정돈 — padding 토큰화, 헤더 폰트 스케일 */
.quiz-editor { padding: var(--space-6) var(--space-7); }
.editor-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-5); padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
  gap: 12px; flex-wrap: wrap;
}
.editor-header-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.editor-header-right { display: flex; gap: 8px; flex-wrap: wrap; }
.editor-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

/* Type selector in new-quiz mode */
.new-quiz-type-selector { padding: 20px 24px; }
.new-quiz-type-selector h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; }

/* [D-SLIDE-1 DET-P1-02] 유형 그리드·가져오기 섹션 공통 폭 컨테이너 — 비대칭 해소.
   인라인 max-width:480px(type-grid) 를 이 클래스로 이전, 두 영역이 같은 폭 기준 공유. */
.nq-pane { max-width: 480px; }

/* ══ [편집기 2단계 2026-08-26] 「템플릿 | 요소」 두 탭 + 요소 팔레트 ══════════
   ★한 줄에 몇 칸인지는 토큰으로 못박는다★ — 눈으로 맞추면 항목이 하나 늘 때 리듬이 깨진다. */
/* [편집기 개편 A 2026-08-27] ★알약 → 밑줄 탭★ (사장님 지시 «토글처럼 넣지 말고 탭처럼»)
   ⚠ 종전 모양(회색 홈 + 알약 2개)은 이 앱에서 «켜고/끄기»·«둘 중 하나 고르기»에 쓰는 문법이라
     「화면이 바뀐다」로 안 읽혔다. 화면 위쪽의 「슬라이드 편집 / 학생활동 슬라이드 / 환경설정」이
     이미 밑줄 탭이므로 같은 문법을 쓴다 — 교사가 새로 배울 것이 없다. */
.nq-tabs { display: flex; gap: 2px; max-width: 480px; margin: 0 0 14px;
           border-bottom: 1px solid var(--border); }
.nq-tab  { padding: 9px 14px 8px; border: 0; background: none; cursor: pointer; font-family: inherit;
           font-size: 13px; font-weight: 700; color: var(--text-muted);
           border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nq-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 800; }
.nq-tab:hover:not(.active) { color: var(--text); }

.nq-el-group + .nq-el-group { margin-top: 14px; }
.nq-el-group-h { font-size: 11px; font-weight: 800; color: var(--text-muted);   /* [design-ok] 글자 크기는 그대로 — 이 줄은 색만 고쳤다(④-10). faint 는 흰 면 2.49 · 다크 4.08 로 글자 기준 미달이라(④-10) muted 로 올렸다. */
                 letter-spacing: .3px; margin-bottom: 7px; }
.nq-el-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 480px; }
.nq-el { height: 62px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface);
         padding: 8px 2px 0; text-align: center; cursor: pointer; overflow: hidden;
         font-family: inherit; transition: border-color .12s, background .12s; }
.nq-el:hover { border-color: var(--primary); background: var(--primary-soft); }
.nq-el[draggable="true"] { cursor: grab; }
.nq-el[draggable="true"]:active { cursor: grabbing; }
/* 이 슬라이드에 «못 넣는» 요소 — 흐리게. ★disabled 를 쓰지 않는다★ 그러면 title(이유)이
   안 뜨고 탭 순서에서도 빠진다. 눌러도 add() 가 막고 이유를 알려 준다. */
.nq-el.is-off { opacity: .4; cursor: not-allowed; }
.nq-el.is-off:hover { border-color: var(--border); background: var(--surface); }
/* 끄는 동안 «놓을 곳»은 슬라이드 «안»에 그린다 → css/editor-element-box.css 의 `.alc-drop-ghost`.
   슬라이드 칸 전체를 물들이지 않는다: «여기 어딘가»만 말하고 어디에 들어가는지는 말해 주지 못한다. */
.nq-el-ico { display: block; font-size: 17px; line-height: 21px; font-weight: 800; }
/* [2026-10-27 · 10-26 수업 테스트 기능 2] 스프라이트 아이콘(도형)도 글자 아이콘과 같은 높이에 선다. */
.nq-el-ico > .ui-ico { width: 20px; height: 20px; vertical-align: top; }
/* 「도형 ▾」 펼치기 — 펼치면 ▾ 가 뒤집힌다(색이 아니라 모양으로 말한다) · 다섯 모양은 한 줄(고아 칸 없음 · R042). */
.nq-el-chev { vertical-align: -2px; margin-left: 2px; transition: transform .15s; }
.nq-el-toggle[aria-expanded="true"] .nq-el-chev { transform: rotate(180deg); }
.nq-el-sub { margin-top: 6px; }
.nq-el-grid5 { grid-template-columns: repeat(5, 1fr); }
.nq-el-lb  { display: block; font-size: 10.5px; font-weight: 700; color: var(--text-muted);
             line-height: 1.25; margin-top: 3px; word-break: keep-all; }
.nq-el-note { margin: 12px 0 0; font-size: 11.5px; color: var(--text-muted);
              max-width: 480px; word-break: keep-all; }

/* ══ 슬라이드 목록 ⏺ 배지 — 속성을 열지 않아도 보이게 ════════════════════ */
/* [2026-08-28] ⏺ 점 → 「데이터수집 OFF」 글자. ★수집을 «끈» 슬라이드에만 나온다★
   왜 — 운영 1,022장 중 꺼짐은 2장(0.2%)이라, 모든 줄에 찍히던 점은 «달라지는 것»을 보여준 적이
   없어 뜻을 배울 수가 없었다. 드문 예외만, 기호가 아니라 말로 적는다(사장님 확정).
   색은 «경고»가 아니라 «눈에 띄는 예외» 톤 — 이 슬라이드는 시선/음성·영상이 안 남는다. */
.qm-item-collect {
  flex: 0 0 auto; margin-left: auto;
  font-size: 10.5px; font-weight: 700; line-height: 1.55; white-space: nowrap;
  /* ★--warning 이 아니라 --warning-dark★ — common.css 머리말이 못박아 둔 규칙이다:
     기본색(--warning)을 그 옅은 배경(--warning-light)에 얹으면 작은 글자 4.5:1 을 못 넘는다.
     이 글자는 10.5px 이라 정확히 그 경우다. (없는 토큰을 지어 쓰지 않는다 — 있는 것을 쓴다) */
  color: var(--warning-dark);
  background: var(--warning-light);
  border: 1px solid var(--warning);
  border-radius: 6px; padding: 1px 6px;
}
/* 수집이 «켜진» 슬라이드 = 대다수 = 아무 말도 하지 않는다(목록이 조용해진다). */
.qm-item-collect.is-collecting { display: none; }

/* [DET-P1-05] CSV·엑셀 양식 링크 가독성 — 12px↑·본문색·min-height 32px·밑줄 어포던스 */


/* Options editor (multi-choice) — [회차 58] hover bg-subtle 토큰 */
/* [회차 86 E5] 옵션 카드 — 라디오/입력/미디어/삭제 한 줄 카드 (분리감 + 정답 강조) */
.edit-options-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.edit-option-row {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s var(--ease), background .12s var(--ease), box-shadow .15s, transform .08s;
}
.edit-option-row:hover      { background: var(--bg-subtle); border-color: var(--border); box-shadow: var(--shadow-xs); }
.edit-option-row.drag-over  { border-color: var(--primary); background: var(--primary-light); }
.edit-option-row.dragging   { opacity: 0.4; transform: scale(0.99); box-shadow: 0 4px 12px rgba(37,99,235,0.18); cursor: grabbing; }
/* 정답 옵션 (라디오 checked) — 카드 자체에 success 톤 강조. :has selector 모던 브라우저 지원. */
.edit-option-row:has(input[type="radio"]:checked) {
  border-color: var(--success);
  background: #f0fdf4;
}
.edit-option-row:has(input[type="radio"]:checked):hover {
  background: #ecfdf5;
}
.opt-drag-handle {
  color: #6b7280; cursor: grab; font-size: 14px; flex-shrink: 0; /* WCAG 1.4.11: drag handle #94a3b8 2.56:1<3:1 → #6b7280 4.83:1 (opacity 0.55 reveal-on-hover by design) */
  opacity: 0.55; transition: opacity .12s, color .12s; padding: 2px;
}
.edit-option-row:hover .opt-drag-handle { opacity: 1; color: var(--text-muted); }
.opt-drag-handle:active { cursor: grabbing; }
/* 라디오 — 크기 + accent 강조 */
.edit-option-row input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--success);
  cursor: pointer;
  margin: 0;
}

.add-opt-btn {
  font-size: 13px; color: var(--primary); background: none;
  border: none; cursor: pointer; padding: 2px 0;
  font-family: inherit; font-weight: 600;
}
.add-opt-btn:hover { text-decoration: underline; }

/* O/X options */
.ox-options { display: flex; gap: 20px; margin-top: 6px; }
.ox-options label { display: flex; align-items: center; gap: 7px; font-size: 15px; cursor: pointer; }


/* ── [다크 테마] 회차 편집기(§0-B R222 · ④-10 · 2026-10-23) — 밝은 판 · 고대비는 위 값 그대로 ──
   밝은 판 전용 고정 색이 남은 자리만 색 이름으로 옮긴다. 슬라이드 판 안은 밝은 섬(css/common.css)이 맡는다. */
@media screen {
html.theme-dark.quizn-editor:not(:has(body[data-contrast="high"])) .qm-item:hover { border-color: var(--border-strong); }   /* quizn-editor 는 html 자신에 붙는다 */
html.theme-dark:not(:has(body[data-contrast="high"])) .qm-card-act { color: var(--text-muted); }
html.theme-dark:not(:has(body[data-contrast="high"])) .qm-card-act:hover { background: var(--bg-subtle); }
html.theme-dark:not(:has(body[data-contrast="high"])) .qm-card-del:hover { background: var(--danger-light); color: var(--danger); border-color: var(--danger); }
html.theme-dark:not(:has(body[data-contrast="high"])) .commit-diff-why { background: var(--warning-light); color: var(--warning-dark); border-color: color-mix(in srgb, var(--warning) 45%, transparent); }
html.theme-dark:not(:has(body[data-contrast="high"])) .commit-diff-card .sub .is-done { color: var(--success-dark); }
html.theme-dark:not(:has(body[data-contrast="high"])) .commit-diff-card .sub .is-left { color: var(--danger-dark); }
html.theme-dark:not(:has(body[data-contrast="high"])) .kbd-help-card th { border-bottom-color: var(--border); }
html.theme-dark:not(:has(body[data-contrast="high"])) .kbd-help-card kbd { border-color: var(--border-strong); box-shadow: 0 1px 0 var(--border-strong); color: var(--text-body); }
html.theme-dark:not(:has(body[data-contrast="high"])) .qm-search-input::placeholder { color: var(--text-muted); }   /* 브라우저 기본 안내 글자(회색)는 어두운 칸에서 3.51 */
html.theme-dark:not(:has(body[data-contrast="high"])) .bank-diff-mini.diff-2 { color: var(--success); }   /* 어두운 면 위 3.24 — 별 개수가 난이도를 말하고 색은 보조다(BANK-C01) */
html.theme-dark:not(:has(body[data-contrast="high"])) .bank-diff-mini.diff-3, html.theme-dark:not(:has(body[data-contrast="high"])) .bank-diff-mini.diff-4 { color: var(--warning); }
}

/* ═══ 잠근 상자 오른쪽 위 자물쇠 단추 (2026-11-11 · 결정 G1 · R281 · 그리는 곳 = js/editor-element-box.js paintLockBadges) ═══
   잠근 상자는 클릭이 아래로 지나가(R234) 눌러도 골라지지 않았고, 푸는 길은 우클릭뿐이었다. 그래서 잠근 상자마다 오른쪽 위 «안쪽»에 자물쇠 단추를 늘 둔다.
   상자 밖 덧층(.qm-lock-ov)이라 앞에 겹친 상자에 가리지 않는다 — 상자 쌓임은 1~99(js/element-style.js Z_MAX)라 z 100 이다.
   고른 상자 덧층(.qm-sel-ov)도 z 100 — 자물쇠 층을 그 «앞»에 끼워(js/editor-element-box.js paintLockBadges) 문서 순서로 덧층 손잡이가 위에 온다(검토 1회차 · 종전 z 90 은 쌓임 95 상자에 가렸다).
   크기는 «화면 px» — 종이는 배율(--alc-slide-scale)로 줄여 그리므로 배율로 나눠 되돌린다(덧층 손잡이와 같은 방식).
   그림 26px · 누르는 자리 44px(::before 가 사방 9px 넓힌다 · 손가락 기기 누름 44 = R152 · 빽빽한 자리 36 = R242 ② — 마우스·손가락 둘 다 넉넉하게). 색은 토큰 — 어두운 배경·다크 테마에서도 흰(면) 단추가 그대로 보인다.
   잠긴 회차(읽기 전용 · .qm-layout.locked)에서는 감춘다 — 그리는 쪽도 그리지 않는다(이중). */
.qm-center-prev-card > .qm-lock-ov { position: absolute; inset: 0; z-index: 100; pointer-events: none; }
.qm-lock-ov > .qm-lock-badge {
  --qm-lb: calc(26px / var(--alc-slide-scale, 1));
  position: absolute; width: var(--qm-lb); height: var(--qm-lb); box-sizing: border-box;
  margin: calc(4px / var(--alc-slide-scale, 1)) 0 0 calc(var(--qm-lb) * -1 - 4px / var(--alc-slide-scale, 1));
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: calc(1px / var(--alc-slide-scale, 1)) solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text-body); box-shadow: var(--shadow-sm);
  pointer-events: auto; cursor: pointer;
}
.qm-lock-ov > .qm-lock-badge::before { content: ""; position: absolute; inset: calc(-9px / var(--alc-slide-scale, 1)); }
.qm-lock-ov > .qm-lock-badge:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.qm-lock-ov > .qm-lock-badge:focus-visible { outline: calc(3px / var(--alc-slide-scale, 1)) solid var(--primary); outline-offset: calc(2px / var(--alc-slide-scale, 1)); }
.qm-lock-ov > .qm-lock-badge .ui-ico { width: calc(14px / var(--alc-slide-scale, 1)); height: calc(14px / var(--alc-slide-scale, 1)); }
.qm-layout.locked .qm-lock-ov { display: none; }
