/* [회차 165 W1] 전자칠판 — 편집 UI / 도구 팔레트 / 캔버스 컨테이너 */

.wb-container {
  display: flex; flex-direction: column; gap: 10px;
  background: #fafbfc;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

/* 도구 바 */
.wb-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-wrap: wrap;
}
.wb-tool-group {
  display: flex; align-items: center; gap: 4px;
  padding: 0 6px;
  border-right: 1px solid var(--border);
}
.wb-tool-group:last-child { border-right: none; }
.wb-tool-group-label {
  font-size: 11px; color: var(--text-muted);
  margin-right: 4px;
}

.wb-tool-btn {
  width: 40px; height: 40px; padding: 0;
  border: 1.5px solid transparent;
  border-radius: 6px;
  background: white; cursor: pointer;
  font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s, color .12s;
}
.wb-tool-btn:hover { background: #f3f4f6; border-color: var(--border); }
.wb-tool-btn.active {
  background: #eef2ff; border-color: #6366f1; color: #4338ca;
}
/* [판서 도구줄 2026-10-16] 도구 단추 그림 = 선 아이콘(css/icons.svg) — 이모지·글자 기호를 쓰지 않는다(UI_GUIDELINES §0-D D4).
   ★학생 펜 도구 막대(.wb-student-toolbar)는 예외★ — 학생 화면은 스프라이트를 싣지 않는다(js/icons.js 머리말). */
.wb-tool-btn > .ui-ico { width: 20px; height: 20px; }

/* 색 팔레트 */
.wb-color-swatch {
  width: 30px; height: 30px; padding: 0;
  border-radius: 50%; cursor: pointer;
  border: 2px solid white;
  outline: 1.5px solid var(--border);
  transition: transform .12s, outline-color .12s;
}
.wb-color-swatch:hover { transform: scale(1.1); }
.wb-color-swatch.active {
  outline-color: #6366f1; outline-width: 2.5px;
}

/* 두께 선택 */
.wb-width-btn {
  width: 32px; height: 32px;
  border: 1.5px solid transparent;
  border-radius: 6px;
  background: white; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, border-color .12s;
}
.wb-width-btn:hover { background: #f3f4f6; border-color: var(--border); }
.wb-width-btn.active { background: #eef2ff; border-color: #6366f1; }
.wb-width-btn .dot {
  background: #374151; border-radius: 50%;
}

/* [#1] 색 드롭다운 — 8색 스와치를 인라인 노출 대신 클릭 펼침(도구 우측 1줄에 배치) */
.wb-color-dropdown { position: relative; display: inline-flex; }
.wb-color-toggle {
  display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 9px;
  border: 1.5px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer;
  transition: background .12s, border-color .12s;
}
.wb-color-toggle:hover { background: #f3f4f6; }
.wb-color-toggle[aria-expanded="true"] { border-color: #6366f1; background: #eef2ff; }
.wb-color-current {
  width: 22px; height: 22px; border-radius: 50%; display: inline-block;
  border: 2px solid #fff; outline: 1.5px solid var(--border);
}
.wb-color-caret { font-size: 10px; color: var(--text-muted); line-height: 1; }
.wb-color-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 70;
  display: flex; flex-wrap: wrap; gap: 7px; width: 182px; padding: 11px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}
.wb-color-menu[hidden] { display: none; }

/* 캔버스 컨테이너 */
/* ★[세로 찌그러짐 근본 fix 2026-09-05]★ `align-items: center` 가 이 규칙의 핵심이다.
   ★증상(운영 신고): 교수 라이브 화면에서만 전자칠판이 «세로로 눌려» 보였다. 학생 화면은 멀쩡.
   ★기전: 이 wrap 은 가로 flex 라 `align-items` 의 교차축이 «세로»이고, 기본값 `stretch` 는
     자식 `.canvas-container`(`height:auto`)의 높이를 **wrap 높이에 맞춰 늘려/줄여** 버린다.
     그런데 교수 무대(`#rthStageQuiz`)는 `aspect-ratio:16/9` + `max-height:100%` 로 높이가
     «정해진» 칸이라, 위쪽 `.wb-container`(세로 flex)가 네비바·툴바에 높이를 내주고 나면
     이 wrap 이 **제 비율보다 낮게 눌린다** → 그 눌린 높이가 그대로 캔버스 상자 높이가 되고,
     캔버스 «버퍼»는 원래 비율 그대로라 그 차이만큼 그림이 세로로 찌그러졌다.
     학생 화면엔 높이를 강제하는 칸이 없어 wrap 이 자연 높이로 서고, 그래서 멀쩡했다.
   ★고치는 법: 늘리지 않는다(`center`). 상자는 언제나 `aspect-ratio` 가 정한 제 비율을 지키고,
     칸이 모자라면 «비율을 깨는» 대신 아래 realtime.css 의 교수 무대 규칙이 **줄여서 담는다**.
   ⚠`stretch` 로 두면 안 된다 — 비율을 16:9 로 맞춰도 이 한 줄이 없으면 증상이 그대로 남는다
     (네비바·툴바가 높이를 먹는 한 wrap 은 계속 눌리기 때문). 실제로 둘 다 필요했다. */
.wb-canvas-wrap {
  background: white;
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex; justify-content: center; align-items: center;
  position: relative;
}
.wb-canvas-wrap canvas {
  display: block;
  touch-action: none;
}

/* [pptpdf/전자칠판 소실 fix] 칠판 구석 상시 새로고침 버튼 —
   host_state/state broadcast 로 stage 가 재렌더되며 canvas DOM 이 파괴돼 판서·장표가 백지가 됐을 때
   교사·학생이 즉시 눌러 복구. 칠판이 살아있어도 항상 떠 있다(사라져도 그 자리에 있어 바로 누름).
   .wb-canvas-wrap{overflow:hidden} 안이라 inset(8px) 여유를 둬 잘리지 않게 배치. z-index 는 배지(::after,5) 위.
   ★쉬는 상태도 둘레와 3:1 이상★ (2026-10-27 · F-20261026-05-2) — 흰 판에는 바탕(남색 .6 = 4.7)이, 어두운 장표에는
   흰 테두리(.7)가 맡는다. 종전 흐림(opacity .55)은 흰 판 2.1 · 어두운 장표 1.6 이었다(마우스를 올려야 진해짐). */
.wb-board-reload {
  position: absolute;
  z-index: 6;
  top: 8px; right: 8px;   /* 기본 = 캔버스 우상단(교사 화면은 '보기 전용' 배지가 없어 우상단이 비어있음) */
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  background: rgba(15, 23, 42, .60); color: #fff;
  font-size: 15px; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  transition: background-color .15s ease, transform .2s ease;
}
.wb-board-reload:hover { background: rgba(15, 23, 42, .78); transform: rotate(-40deg); }
.wb-board-reload:active { transform: rotate(-180deg); }
/* 학생: 좌하단 — 우상단 '👁 보기 전용' 배지(.wb-readonly ::after)와 겹치지 않게.
   read-only 라도 이 복구 버튼만은 노출 유지(학생 유일한 복구 수단). 우상단 기본값을 무효화. */
.wb-readonly .wb-board-reload-student { top: auto; right: auto; left: 8px; bottom: 8px; }
/* 교사 진행 화면 PPT 판(보기 전용 아님) — 무대가 판을 줄여(1440 폭 0.54배) 30px 단추가 화면 16px 이었다(F-20261027-02-2).
   배율을 거꾸로 곱해 화면에서 교사 컨트롤 크기(§0-B R152: 마우스 32 · 손가락 기기 44)로 둔다. 학생 판은 slide-stage.css 의 48 판 픽셀. */
.alc-slide-stage .wb-container:not(.wb-readonly) .wb-board-reload {
  top: calc(8px / var(--alc-slide-scale, 1)); right: calc(8px / var(--alc-slide-scale, 1));
  width: max(30px, calc(32px / var(--alc-slide-scale, 1))); height: max(30px, calc(32px / var(--alc-slide-scale, 1)));
  font-size: max(15px, calc(16px / var(--alc-slide-scale, 1)));   /* [design-ok] 이모지 글리프 — 판 배율 역보정 */
}
@media (pointer: coarse) {
  .alc-slide-stage .wb-container:not(.wb-readonly) .wb-board-reload {
    width: max(30px, calc(44px / var(--alc-slide-scale, 1))); height: max(30px, calc(44px / var(--alc-slide-scale, 1)));
    font-size: max(15px, calc(22px / var(--alc-slide-scale, 1)));   /* [design-ok] 이모지 글리프 — 판 배율 역보정 */
  }
}
/* [UI수정] 칠판 반응형 — fabric 캔버스가 wrap 너비를 칠판 비율로 꽉 채움.
   기존: 고정 크기 캔버스가 가운데 정렬돼 wrap 좌우에 '흰 여백'(보드처럼 보이나 못 그림)이 생기고
   좁은 화면선 잘렸음. 학생/교사 동일 적용 → 크기 통일 + 죽은 여백 제거.
   좌표공간(버퍼)은 그대로 두고 '표시'만 스케일 → 호스트↔학생 board_op 좌표 동기화 유지.
   포인터 매핑은 fabric 6 이 캔버스 boundingRect 비율로 처리(클릭 정합 유지).

   ★[16:9 2026-09-05]★ 이 비율은 `js/whiteboard.js` 의 `Whiteboard.SIZE`(1600×900)의 짝이다.
   여기와 저기가 갈리면 **캔버스 상자 비율 ≠ 버퍼 비율** 이 되어 판서가 그 차이만큼 찌그러진다
   — 5:3 이던 시절 교수 화면에서 난 사고가 정확히 그것이다. 바꾸려면 **같은 커밋에서 둘 다.** */
.wb-canvas-wrap > .canvas-container {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
}
/* ★★[F-20260905-11-1 · 2026-09-16] 학생 화면에서 판이 «늘어나» 그려지던 것★★
   위 규칙은 `width:100%` + `height:auto` + `aspect-ratio` 다. 폭이 정해지면 높이가 따라오므로
   보통은 비율이 지켜진다 — 그런데 학생 답 칸은 **높이가 정해진 칸**이고 `.canvas-container` 에
   `max-height:100%` 가 걸려 있다. 높이가 그 상한에 막히면 **폭은 그대로인 채 높이만 깎여**
   `aspect-ratio` 가 무력해진다(막는 값이 이긴다).
   ★실측(1512×900 · 고치기 전)★ 상자 1000×521 = **1.918** · 버퍼 1600×900 = **1.778**
   → 교사가 그린 동그라미가 학생에게는 가로로 8% 퍼진 타원으로 갔다.

   ⇒ **폭을 «칸 높이»로도 제한한다** — 둘 중 작은 쪽을 쓰면 어느 축이 모자라도 비율이 깨지지 않는다.
     이 관용구는 이 저장소가 이미 쓰는 것이다(`css/detail.css` `.pptnote-stage > .canvas-container`).
   ★상자를 «진짜 16:9 사각형»으로 두는 것이 핵심★ — `object-fit:contain` 으로 그림만 줄이면
     상자 안에 빈 띠가 생겨 **fabric 의 포인터 매핑(boundingRect 기준)이 그만큼 어긋난다.**
   ★카드·칸 크기는 한 픽셀도 안 건드린다★ — 2026-09-03 에 확정된 「학생 화면 = 편집기 배치」
     (`caps.aoi`)가 정한 칸은 그대로고, 그 «안에서» 판이 제 비율로 앉을 뿐이다.
     실측 후: 칸 1003×525 그대로 · 상자 927×521(=1.778). 판 배경이 흰색이라 남는 여백은 안 보인다.
   ⚠교사 화면(`.wb-host-board`)에는 걸지 않는다 — 그쪽은 칸이 «내용 높이»라 `container-type:size`
     를 주면 높이 기준이 사라져 판이 접힌다. 그래서 학생 답 칸(`.rtq-aoi-rbody`)으로만 좁힌다.
   회귀 고정 = tests/qa-e2e/student_board_ratio_20260916.spec.js */
.rtq-aoi-rbody .wb-canvas-wrap { container-type: size; }
.rtq-aoi-rbody .wb-canvas-wrap > .canvas-container {
  width: min(100cqw, calc(100cqh * 16 / 9)) !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
}

.wb-canvas-wrap > .canvas-container > canvas {
  width: 100% !important;
  height: 100% !important;
}

.wb-status {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text-muted);
  padding: 0 4px;
}
.wb-status-tip { font-style: italic; }
/* [#6] 학생 전자칠판 확대/축소 안내 — Ctrl+휠 줌 발견 가능하게 상시 노출 + 호버 툴팁 */
.wb-zoom-hint { font-style: normal; white-space: nowrap; cursor: help; }   /* 흐림(.85)은 걷었다 — 판 위 글자가 3.9 로 미달이었다(④-16 · 밝은 화면도 같음) */

/* Read-only 학생 화면용 (W2 에서 활용) */
.wb-readonly .wb-toolbar { display: none; }
.wb-readonly .wb-canvas-wrap {
  border-color: #cbd5e1;
  position: relative;   /* ::after 배지 좌표계 */
}
/* [회차 167 §1] 학생에게 "보기 전용" 명시 — 우상단 작은 칩 */
.wb-readonly .wb-canvas-wrap::after {
  content: "👁 보기 전용";
  position: absolute;
  top: 8px; right: 8px;
  font-size: 11px; font-weight: 600;
  background: rgba(15, 23, 42, 0.65); color: white;
  padding: 3px 9px; border-radius: 999px;
  pointer-events: none;
  z-index: 5;
}
.wb-readonly canvas {
  cursor: default !important;
  user-select: none; -webkit-user-select: none;
}

/* ── [회차 167 §2] 우클릭 컨텍스트 메뉴 ────────────────────── */










/* 색 변경 서브 — flex row 8색 */






/* ── [회차 167 §3] 단축키 도움말 모달 ──────────────────────── */
/* 층은 «모달 위 팝오버» — 장표 판서 창(--z-modal) 위에서도 보인다(F-20261027-02-1 · 종전 9999 는 판서 창 뒤에 열렸다). */
.wb-help-modal {
  position: fixed; inset: 0; z-index: var(--z-popover);
  display: flex; align-items: center; justify-content: center;
}
.wb-help-modal[hidden] { display: none !important; }
/* 칠판 창 · 판서 창 위에 뜨는 «칠판 전체 지우기» 확인 창(js/ui-confirm.js · z 10060)은 그 둘보다 위로 — 종전엔 판서 창 뒤에 숨었다.
   확인 창은 뜰 때마다 body 끝에 붙어 둘의 «뒤 형제»다. */
:is(#wbHelpModal:not([hidden]), #pptNoteModal) ~ .ui-confirm-overlay { z-index: calc(var(--z-popover) + 1); }
.wb-help-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.wb-help-panel {
  position: relative;
  background: #1a1a1a; color: #f3f4f6;
  width: min(880px, 94vw); max-height: 90vh; overflow: auto;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.wb-help-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #2d2d2d;
}
.wb-help-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.wb-help-close {
  background: transparent; color: #f3f4f6;
  border: 0; padding: 4px 8px; cursor: pointer;
  font-size: 20px; line-height: 1; border-radius: 6px;
}
.wb-help-close:hover { background: #2d2d2d; }
.wb-help-body { padding: 20px 22px; }

/* 키보드 다이어그램 (CSS grid 기반) */
.wb-help-kbd-wrap {
  background: #0f0f0f; border-radius: 10px;
  padding: 14px; margin-bottom: 20px;
}
.wb-help-kbd {
  display: flex; flex-direction: column; gap: 6px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.kbd-row { display: flex; gap: 4px; justify-content: center; }
.key {
  position: relative;
  min-width: 30px; height: 30px;
  padding: 0 6px;
  background: #2d2d2d; color: #e5e7eb;
  border: 1px solid #444; border-bottom-width: 2px;
  border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  cursor: default;
}
.key.sm  { min-width: 24px; padding: 0 4px; font-size: 10px; }
.key.md  { min-width: 48px; }
.key.lg  { min-width: 64px; }
.key.xl  { min-width: 80px; }
.key.xxl { min-width: 240px; }
/* 색상 분류 */
.key.tool   { background: #fbbf24; color: #1a1a1a; border-color: #f59e0b; }
.key.edit   { background: #dc2626; color: white;   border-color: #991b1b; }   /* [design-ok] «늘 어두운 창» 글쇠 갈래 색 — 흰 글자 3.76 → 4.83(화면 모양과 상관없이 같은 값 · F-20261023-29-2) */
.key.view   { background: #22c55e; color: white;   border-color: #15803d; }
.key.danger { background: #db2777; color: white;   border-color: #9d174d; }   /* [design-ok] 위와 같음 — 3.53 → 4.60 */
.key.modif  { background: #4f46e5; color: white;   border-color: #3730a3; }   /* [design-ok] 위와 같음 — 4.47 → 6.29 */
/* hover 시 라벨 (data-lbl) 툴팁 */
.key[data-lbl]::after {
  content: attr(data-lbl);
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-4px);
  background: #0f0f0f; color: #fbbf24;
  padding: 3px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 500;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .12s;
  border: 1px solid #444;
}
.key[data-lbl]:hover::after { opacity: 1; }

/* 단축키 그리드 (도구·편집·뷰·전체) */
.wb-help-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.wb-help-grid section h3 {
  font-size: 13px; margin: 0 0 8px;
  color: #fbbf24; font-weight: 700;
}
.wb-help-grid ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px;
  font-size: 12.5px; color: #d1d5db;
}
.wb-help-grid li { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.wb-help-grid kbd {
  display: inline-block;
  background: #2d2d2d; color: #fbbf24;
  border: 1px solid #444; border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px;
}
.wb-help-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; border-top: 1px solid #2d2d2d;
}
.wb-help-ok {
  background: #4f46e5; color: white;   /* [design-ok] «늘 어두운 창»의 «확인» — 4.47 → 6.29(글쇠 «Ctrl · Shift» 와 같은 남색) */
  border: 0; padding: 8px 18px; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.wb-help-ok:hover { background: #4338ca; }   /* [design-ok] 눌림 = 한 단계 짙게 */

@media (max-width: 700px) {
  .wb-help-grid { grid-template-columns: 1fr; }
  .wb-help-grid ul { grid-template-columns: 1fr; }
  .key.xxl { min-width: 120px; }
  .wb-help-kbd { transform: scale(0.78); transform-origin: top center; }
}

/* ★`.wb-btn-help--header` 삭제★ — 30×30 아이콘 버튼 전용 규칙이라
   글자 있는 버튼(「⌨ 단축키」)을 찌그러뜨렸다. 이제 옆의 「정답 공개」·「제출 보기」와
   **같은 `.btn.btn-outline.btn-sm`** 을 쓴다 — 나란히 선 버튼이 서로 다른 모양일 이유가 없고,
   전용 규칙이 없으면 다음에 어긋날 일도 없다. */

/* ── [회차 168 §4] 캔버스 + 마우스 패널 옆나란히 배치 ─── */
.wb-stage-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.wb-stage-row .wb-canvas-wrap { flex: 1; min-width: 0; }

.wb-mouse-panel {
  flex-shrink: 0;
  width: 180px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 12px;
}
.wb-mouse-panel-head {
  font-weight: 700; color: #374151;
  margin-bottom: 6px; padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}
.wb-mouse-list { margin: 0; }
.wb-mouse-list dt {
  font-weight: 600; color: #6b7280;
  font-size: 11.5px; margin-top: 8px;
}
.wb-mouse-list dt:first-child { margin-top: 0; }
.wb-mouse-list dd {
  margin: 2px 0 0; color: #111827; cursor: help;
}
@media (max-width: 880px) {
  .wb-stage-row { flex-direction: column; }
  .wb-mouse-panel { width: 100%; }
}

/* ═══ [교사 라이브 칠판 2026-09-05] 판에 가로 폭을 돌려준다 ═══════════════════
   실측(고치기 전 · 1512×900): 칠판 상자 안쪽 587px 중 **마우스 안내가 180px(31%)** 을
     옆에서 가져가 캔버스가 397px 밖에 못 썼고, 도구모음은 **3줄 164px** 로 칸 높이의 절반을
     먹었다. 그래서 판이 393×236 까지 쪼그라들고도 칸 밖으로 넘쳐 잘렸다.
   → ① 마우스 안내를 판 «아래 한 줄»로 내리고 ② 도구모음을 조금 조여 줄 수를 줄인다.
     둘 다 없애지 않는다 — 자리만 옮긴다.
   ★교사 화면 전용★(`.wb-host-board`) — 학생 칠판·편집기 미리보기는 종전 그대로다.
   회귀 고정 = tests/qa-e2e/live_host_board_not_clipped_20260905.spec.js */
/* ★`align-items` 를 함께 바꿔야 한다★ — 세로로 세우면 교차축이 «가로»가 되어, 위
   `.wb-stage-row{align-items:flex-start}` 아래에서는 캔버스 상자의 폭이 내용 기준이 된다.
   그 안의 `.canvas-container{width:100%!important}` 는 기준이 없어 **0px 으로 접힌다**(실측). */
/* ★★[2026-09-16] 무대 «감싸개»도 함께 푼다 — 안 풀면 판이 다시 잘린다★★
   2026-09-05 에는 자르는 자리가 `#rthStageQuiz` 하나였다. 그 뒤 슬라이드 무대 정본층
   (`css/slide-stage.css`)이 들어오면서 그 «바깥»에 감싸개가 하나 더 생겼다:
     .alc-slide-stage-host { height: var(--alc-slide-h); overflow: hidden }
   그 높이는 `js/slide-stage.js` 가 «줄어든 무대 높이»로 넣는 값이라 16:9 를 전제한다.
   판은 16:9 가 아니므로(도구모음+캔버스+상태줄) 그만큼 넘치고, 감싸개가 그것을 잘라낸다.
   ★실측(1512×900): 아래로 36px 이 잘렸다★ — 스크롤로도 못 본다(자른 것이지 넘긴 것이 아니다).

   ⛔감싸개의 규칙 자체를 고치지 않는다 — 그 값은 «자리를 안 줄이는 transform» 을 메우려고
     있는 것이라(그 파일 주석), 무대 전체에서 걷으면 통계·재생바가 밀린다.
   ✅판이 들어 있을 때만 푼다 — 09-05 가 쓴 «표식으로만 푼다»와 같은 방식이다.
     `:has()` 를 쓰는 이유: 표식은 «안쪽»(.wb-host-board)에 있고 풀 대상은 «바깥»이다.
   회귀 고정 = tests/qa-e2e/live_host_board_not_clipped_20260905.spec.js (그 스펙이 이 회귀를
   실제로 잡아냈다 — 조상을 «전부» 훑게 짜 둔 덕이다). */
/* ★[2026-09-30] 교사 전자칠판 = 내용 높이 캔버스★ (F-20260930-01-1)
   규칙: 판은 가로를 다 쓰되(09-05 처럼 트이게), 노트북 화면 높이에 맞춰 아래로 삐져나가지 않는다.
   판은 16:9 인데 그 위아래에 도구모음·마우스 안내·상태줄이 붙으므로, «판+띠»는 16:9 가 아니다.
   설계 캔버스를 1280×720 에 묶으면 둘 중 하나가 된다 — 판을 줄이거나(09-29 · 폭 80%) 캔버스 밖으로
   넘치거나(09-16 이 감싸개를 `height:auto;overflow:visible` 로 풀어 넘친 채 보이게 했다).
   ⇒ 이 유형만 설계 캔버스 높이를 «내용 높이»로 둔다(폭은 1280 그대로 — 판이 가로를 다 쓴다).
     `--alc-slide-fit: content` 를 켜 두면 `js/slide-stage.js` 가 무대의 실제 설계 높이(offsetHeight)로 배율을 잡으므로, 캔버스 «전체»가
     «감싸개 폭»과 «카드에 남은 높이» 중 모자란 쪽에 맞춰 줄어든다 — 넘침도 스크롤도 없다.
   ⇒ 감싸개는 카드(`.rth-stage` · 세로 flex)에 남은 높이를 다 받는다(`flex:1 1 0`). 그래야 배율을 잴 때
     «쓸 수 있는 높이»가 보이고, 아래 통계 줄이 화면 밖으로 밀리지 않는다(종전: 감싸개 720 → 통계 y888).
   ⚠`!important` 는 `css/slide-stage.css` 의 `#rthStageQuiz.alc-slide-stage { height:720px !important }` 를
     «이 유형에서만» 이기려는 것이다. 회귀 고정 = tests/qa-e2e/live_host_board_not_clipped_20260905.spec.js */
#rthStageQuiz.alc-slide-stage:has(> .wb-host-board) { height: auto !important; --alc-slide-fit: content; }
/* ★넓은 배치(>1000px)에서만★ — 1000px 이하는 무대 카드가 «내용 높이»로 서고 배치 전체가 세로로 스크롤한다
   (css/realtime.css 「1단 배치」). 높이가 안 정해진 세로 flex 에서 `flex:1 1 0` 은 0 이 되어 판이 통째로 가려진다.
   그 폭에서는 이 규칙 없이도 감싸개가 `--alc-slide-h`(= 실제 설계 높이 × 폭 배율)만큼 자리를 잡는다. */
@media (min-width: 1001px) {
.alc-slide-stage-host:has(.wb-host-board) { flex: 1 1 0; min-height: 0; }
/* 통계 줄은 판의 높이 예산에서 뺀다 — 자리는 0 으로 두고 내용은 그 아래(카드 스크롤)로 그린다.
   종전에도 전자칠판에선 감싸개가 720 을 먹어 통계 줄이 화면 밖(1512×900: y888)이었다 — 같은 자리다.
   이것을 빼지 않으면 83px 을 판이 양보해 1366×768 에서 판이 오히려 작아진다(실측 490→444px). */
/* `top` — 자리가 0 이어도 내용은 카드 아래 여백(패딩) 안에서 «윗부분이 얇게» 보였다(1512×900: 12px 띠).
   보이는 영역 밖으로 내린다. relative 는 스크롤 범위에 들어가 스크롤하면 그대로 보인다.
   ⛔전사 창을 펼친 동안은 건드리지 않는다 — 그때 통계는 «알약 한 줄»로 스크롤 없이 보이게 한다는 결정이 있고
     (css/realtime.css 결정 0928 E-B), 그 한 줄 몫은 js/live/stt-board.js `_measureStageFit` 이 슬라이드 상한에서 뺀다. */
.rth-center:not(.rth-center--stt-open) > .rth-stage:has(> .alc-slide-stage-host .wb-host-board) > .rth-stage-stats { flex: 0 0 0; min-height: 0; position: relative; top: 32px; }
}

.wb-host-board .wb-stage-row { flex-direction: column; align-items: stretch; }
.wb-host-board .wb-stage-row .wb-canvas-wrap { flex: 0 0 auto; width: 100%; }
.wb-host-board .wb-mouse-panel {
  width: 100%;
  padding: 5px 10px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px;
}
.wb-host-board .wb-mouse-panel-head {
  margin: 0; padding: 0; border-bottom: 0;
}
.wb-host-board .wb-mouse-list {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px;
}
.wb-host-board .wb-mouse-list dt { margin: 0; }
.wb-host-board .wb-mouse-list dt::after { content: " →"; }
.wb-host-board .wb-mouse-list dd { margin: 0 8px 0 0; }
/* 도구모음 — 버튼을 40→36px 로만 조인다(WCAG 2.2 최소 24px 여유 있게 통과). */
.wb-host-board .wb-toolbar { padding: 6px 8px; gap: 6px; }
.wb-host-board .wb-tool-group { padding: 0 4px; gap: 3px; }
.wb-host-board .wb-tool-btn { width: 36px; height: 36px; }
.wb-host-board .wb-color-swatch { width: 26px; height: 26px; }
.wb-host-board .wb-width-btn { width: 28px; height: 28px; }

/* ── [회차 168 §2] 단축키 발동 시 도구바 펄스 ─── */
.wb-tool-btn.is-flash {
  animation: wb-tool-flash 0.55s ease-out;
}
@keyframes wb-tool-flash {
  0%   { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.85); transform: scale(1); }
  35%  { box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); transform: scale(1.10); }
  100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); transform: scale(1); }
}

/* 도움말 모달의 키 강조 (data-key 매칭) */
#wbHelpModal .key.key-flash {
  animation: wb-kbd-flash 0.7s ease-out;
}
@keyframes wb-kbd-flash {
  0%   { background: #fef08a; color: #1a1a1a; box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.9); }
  30%  { background: #fde047; color: #1a1a1a; box-shadow: 0 0 14px 4px rgba(251, 191, 36, 0.55); }
  100% { /* 원래 색 */ }
}

/* ── [회차 168 §7] 공용 hover 툴팁 (data-tip) ─── */
.wb-tip {
  position: fixed; pointer-events: none; z-index: var(--z-toast);   /* 도움말 창(--z-popover) 위 */
  background: #111827; color: #f3f4f6;
  font-size: 12px; line-height: 1.45;
  padding: 6px 10px; border-radius: 6px;
  max-width: 260px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .15s, transform .15s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  white-space: normal; word-break: keep-all;
}
.wb-tip.show { opacity: 0.96; transform: translateY(0); }
.wb-tip::after {
  content: ''; position: absolute; left: 50%; bottom: -4px;
  margin-left: -4px;
  border: 4px solid transparent;
  border-top-color: #111827;
}

/* 도움말 모달 항목 — data-tip 항목이면 cursor: help */
.wb-help-grid li[data-tip] { cursor: help; }

/* ── [회차 179 W3] 학생 그리기 권한 배지(«✏️ 그리기 가능» · 남은 시간은 2026-11-30 시간 제한과 함께 없앴다) ── */
.rtq-wb-grant-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: #4f46e5; color: white;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  pointer-events: none;
  z-index: 10;
  animation: rtq-wb-grant-pulse 2s ease-in-out infinite;
}
@keyframes rtq-wb-grant-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4); }
  50%      { box-shadow: 0 4px 18px rgba(79, 70, 229, 0.65); }
}
/* 권한 받은 학생 · 개인 칠판(내 칠판에 그린다 · js/realtime-quiz-board.js «개인 칠판» · 2026-11-26) = read-only 표시 안 보이게 */
.wb-readonly:has(.rtq-wb-grant-badge) .wb-canvas-wrap::after,
.wb-readonly.wb-own-board .wb-canvas-wrap::after {
  display: none;
}

/* ───────────────────────────────────────────────────────────
   [#1] PPT/PDF 문제유형 — 편집기 장표 그리드 + 라이브 네비
   ─────────────────────────────────────────────────────────── */
.ppt-upload-box { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ppt-status { white-space: nowrap; }
.ppt-empty,
.ppt-empty-live {
  padding: 18px; border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text-muted); font-size: 13px; text-align: center;
}
.ppt-empty-live {
  position: absolute; inset: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.82);
}
.ppt-thumb {
  position: relative; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #f8fafc;
}
.ppt-thumb img { display: block; width: 100%; height: 96px; object-fit: contain; background: #fff; }
.ppt-thumb-no {
  position: absolute; top: 4px; left: 4px; z-index: 2;
  background: rgba(15,23,42,.78); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 4px; padding: 1px 6px;
}
.ppt-thumb-actions {
  display: flex; gap: 2px; justify-content: center; padding: 4px; background: #fff;
  border-top: 1px solid var(--border);
}
.ppt-thumb-actions button {
  border: 1px solid var(--border); background: #fff; border-radius: 4px;
  width: 26px; height: 24px; cursor: pointer; font-size: 12px; line-height: 1;
}
.ppt-thumb-actions button:disabled { opacity: .35; cursor: default; }
.ppt-thumb-actions button:hover:not(:disabled) { background: #f1f5f9; }

/* 라이브 — 좌/우 네비 바 */
.ppt-live .ppt-nav-bar {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  border-bottom: 1px solid var(--border);
}
.ppt-live .ppt-nav-count { font-weight: 700; font-size: 14px; min-width: 64px; text-align: center; }
.ppt-live .wb-canvas-wrap { position: relative; }
/* [PPT 소리 2026-11-15] 장표 안 재생 자리 + 위 줄 소리 칸 — js/realtime-host-ppt-audio.js · 설계 §6-5
   쉬는 동안 장표 안에는 아무것도 더 그리지 않는다(구워진 「▶ PLAY」 포스터가 이미 단추처럼 보인다) — 올리면 손가락 커서·옅은 테두리만. */
.ppt-live .rth-ppt-snd-hit {
  position: absolute; z-index: 5;   /* 판 캔버스 위 · 새로고침 단추(6) 아래 */
  margin: 0; padding: 0; border: 0; border-radius: var(--radius-xs);
  background: transparent; cursor: pointer; touch-action: manipulation;
}
.ppt-live .rth-ppt-snd-hit[hidden] { display: none; }
.ppt-live .rth-ppt-snd-hit:hover { outline: 2px solid var(--primary-tint); outline-offset: 3px; }
.ppt-live .rth-ppt-snd-hit:focus-visible,
.ppt-live .rth-ppt-snd-hit.is-playing { outline: 3px solid var(--primary); outline-offset: 3px; }
.ppt-live .rth-ppt-snd-hit.is-playing { background: color-mix(in srgb, var(--primary) 12%, transparent); }
.ppt-live .rth-ppt-snd-bar,
.ppt-live .rth-ppt-snd-pill { display: none; position: absolute; }
.ppt-live .rth-ppt-snd-hit.is-playing .rth-ppt-snd-bar {
  display: block; left: 0; right: 0; top: calc(100% + 8px); height: 6px;
  border-radius: var(--radius-pill); background: var(--primary-soft); overflow: hidden;
}
.ppt-live .rth-ppt-snd-bar > i { display: block; width: 0; height: 100%; background: var(--primary); }
.ppt-live .rth-ppt-snd-hit.is-playing .rth-ppt-snd-pill {
  display: inline-flex; align-items: center; gap: 6px; left: 50%; top: calc(100% + 20px); transform: translateX(-50%);
  padding: 4px 12px; border-radius: var(--radius-pill); white-space: nowrap; box-shadow: var(--shadow-sm);
  background: var(--primary-fill); color: var(--text-on-primary);
  font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums;
}
.ppt-live .rth-ppt-snd-pill .ui-ico { width: 14px; height: 14px; stroke-width: 2.25; }
/* 아래에 자리가 없으면(장표 아래쪽 소리) 막대·알약을 위로 */
.ppt-live .rth-ppt-snd-hit.is-flip .rth-ppt-snd-bar { top: auto; bottom: calc(100% + 8px); }
.ppt-live .rth-ppt-snd-hit.is-flip .rth-ppt-snd-pill { top: auto; bottom: calc(100% + 20px); }
/* 위 줄 — 「◀ 이전 · 3 / 15 · 소리 0:40 ▶ · 다음 ▶」 · 높이는 옆 단추(.btn-sm 34)와 같다 */
.ppt-live .rth-ppt-snds { display: inline-flex; align-items: center; gap: 6px; }
.ppt-live .rth-ppt-snd {
  position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 10px;
  border: 1px solid var(--primary-tint); border-radius: var(--radius-pill);
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: var(--text-sm); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ppt-live .rth-ppt-snd > .ui-ico { width: 16px; height: 16px; }
.ppt-live .rth-ppt-snd-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0;
  border: 0; border-radius: var(--radius-pill); background: var(--primary-fill); color: var(--text-on-primary); cursor: pointer;
}
.ppt-live .rth-ppt-snd-btn .ui-ico { width: 14px; height: 14px; stroke-width: 2.25; }
/* 칸 전체(34)가 누름 자리 — 안의 동그라미는 그림이다(무대가 판을 줄여 그려 동그라미만으로는 화면에서 너무 작다) */
.ppt-live .rth-ppt-snd-btn::before { content: ""; position: absolute; inset: 0; border-radius: var(--radius-pill); }
.ppt-live .rth-ppt-snd-btn:focus-visible { outline: none; }
.ppt-live .rth-ppt-snd-btn:focus-visible::before { box-shadow: var(--shadow-focus); }
/* [PPT 영상 2026-11-15] 장표 안 영상 — js/realtime-host-ppt-video.js · 설계 §6-6 · §7-6
   쌓임(PPT 라이브 판에서만 · 전자칠판 판은 그대로) = 영상 0 < 판(.canvas-container) 1 < ▶·조작 줄 5 < 새로고침 단추 6.
   영상이 판 «아래»라 펜 선이 영상 위에 보인다(화면 판만 그 자리 장표를 비운다 — js/ppt-media-layout.js hole).
   ▶·조작 줄은 무대 배율(--alc-slide-scale)로 나눠 화면에서 제 크기(▶ 56 · 누름 44 · §0-B R152)로 둔다 — 새로고침 단추와 같은 방식. */
.ppt-live .wb-canvas-wrap > .canvas-container { position: relative; z-index: 1; }
.ppt-live .ppt-empty-live { z-index: 2; }   /* 장표 없는 슬라이드 안내 — 판(1)에 가리지 않게(종전 그대로 판 위) */
.ppt-live .rth-ppt-vid { position: absolute; z-index: 0; object-fit: fill; }
.ppt-live .rth-ppt-vid.is-full {
  z-index: 4; inset: 0; width: 100%; height: 100%; object-fit: contain;
  background: #000;   /* [design-ok] 영상 바탕 — 극장 검은 테(테마와 무관 · 판 mat 과 같은 뜻) */
}
.ppt-live .rth-ppt-vid-play {
  position: absolute; z-index: 5; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: calc(56px / var(--alc-slide-scale, 1)); height: calc(56px / var(--alc-slide-scale, 1));
  margin: 0; padding: 0; border: 0; border-radius: var(--radius-pill);
  background: var(--primary-fill); color: var(--text-on-primary); box-shadow: var(--shadow-md);
  cursor: pointer; touch-action: manipulation;
}
.ppt-live .rth-ppt-vid-play[hidden] { display: none; }
.ppt-live .rth-ppt-vid-play .ui-ico { width: 45%; height: 45%; stroke-width: 2.25; }
.ppt-live .rth-ppt-vid-play:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.ppt-live .rth-ppt-vid-ctl {
  position: absolute; z-index: 5; box-sizing: border-box;
  display: flex; align-items: center; gap: calc(8px / var(--alc-slide-scale, 1));
  min-width: calc(240px / var(--alc-slide-scale, 1)); height: calc(44px / var(--alc-slide-scale, 1));
  padding-right: calc(12px / var(--alc-slide-scale, 1));
  border-radius: var(--radius-pill); background: var(--surface); color: var(--text); box-shadow: var(--shadow-md);
  font-size: calc(var(--text-sm) / var(--alc-slide-scale, 1)); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ppt-live .rth-ppt-vid-ctl[hidden] { display: none; }
.ppt-live .rth-ppt-vid-ctl.is-full {
  left: calc(12px / var(--alc-slide-scale, 1)); right: calc(12px / var(--alc-slide-scale, 1)); bottom: calc(12px / var(--alc-slide-scale, 1));
}
.ppt-live .rth-ppt-vid-pp,
.ppt-live .rth-ppt-vid-close {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: calc(44px / var(--alc-slide-scale, 1)); height: calc(44px / var(--alc-slide-scale, 1));
  margin: 0; padding: 0; border: 0; border-radius: var(--radius-pill); cursor: pointer;
  background: var(--primary-fill); color: var(--text-on-primary);
}
.ppt-live .rth-ppt-vid-close { background: transparent; color: var(--text); }
.ppt-live .rth-ppt-vid-pp .ui-ico,
.ppt-live .rth-ppt-vid-close .ui-ico { width: 45%; height: 45%; stroke-width: 2.25; }
.ppt-live .rth-ppt-vid-pp:focus-visible,
.ppt-live .rth-ppt-vid-close:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* 끌어 옮기는 막대 — 누름 자리는 줄 높이(44) 전체 · 보이는 막대는 가운데 6 */
.ppt-live .rth-ppt-vid-track { position: relative; flex: 1 1 auto; align-self: stretch; cursor: pointer; touch-action: none; }
.ppt-live .rth-ppt-vid-track::before,
.ppt-live .rth-ppt-vid-track > i {
  content: ""; position: absolute; left: 0; top: 50%; height: calc(6px / var(--alc-slide-scale, 1)); transform: translateY(-50%);
  border-radius: var(--radius-pill);
}
.ppt-live .rth-ppt-vid-track::before { right: 0; background: var(--primary-soft); }
.ppt-live .rth-ppt-vid-track > i { display: block; width: 0; background: var(--primary); }
.ppt-live .rth-ppt-vids { display: inline-flex; align-items: center; gap: 6px; }

/* [학생 판서 2026-09-30] 학생 도구 막대(Whiteboard.mountStudentToolbar) — 교사 막대와 같은 부품을 쓰되
   손가락으로 누르는 화면(태블릿·특수학교)이라 누를 자리를 키운다. */
.wb-student-toolbar .wb-tool-btn { width: 44px; height: 44px; font-size: var(--text-xl); }
.wb-student-toolbar [data-st-act] { font-size: var(--text-2xl); line-height: 1; }   /* ↶ ↷ 는 글자라 같은 크기에선 이모지보다 작아 보인다 */
.wb-student-toolbar .wb-color-swatch { width: 36px; height: 36px; }
.wb-student-toolbar .wb-width-btn { width: 40px; height: 40px; }
/* [2026-10-15] 「원래 크기」 — 두 손가락으로 판을 키웠을 때만 보인다(학생 펜 막대 · 교사 PPT 판 · 문제 편집기). 글자 단추라 폭은 글자대로. */
.wb-tool-btn.wb-view-reset { width: auto; padding: 0 12px; font-size: var(--text-base); white-space: nowrap; border-color: var(--border); }
.wb-tool-btn.wb-view-reset[hidden] { display: none; }
/* [2026-11-03 사용자 결정 2안] 학생 라이브는 「원래 크기」를 판 오른쪽 위에 띄운다 — js/realtime-quiz-board.js 가 막대에서
   무대 감싸개로 옮긴다(막대 안이면 1024 태블릿에서 단추가 나타나는 순간 막대가 두 줄로 접혀 슬라이드가 줄었다).
   감싸개는 슬라이드보다 넓을 수 있어(가운데 정렬) 오른쪽 여백 = (감싸개 폭 − 슬라이드 폭) / 2 + 10. 슬라이드 폭 = --alc-slide-h × 16/9. */
.alc-slide-stage-host:has(> .wb-view-reset) { position: relative; }
.alc-slide-stage-host > .wb-tool-btn.wb-view-reset {
  position: absolute; z-index: 6; top: 10px; height: 44px;
  right: calc((100% - var(--alc-slide-h, 0px) * 16 / 9) / 2 + 10px);
  box-shadow: var(--shadow-md);
}
.wb-student-toolbar .wb-color-swatch:focus-visible,
.wb-student-toolbar .wb-width-btn:focus-visible,
.wb-student-toolbar .wb-tool-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* ★학생 칠판 틀은 권한을 받아도 `.wb-readonly` 그대로다★ — 위 `.wb-readonly .wb-toolbar { display:none }` 이
   학생 막대까지 숨긴다(2026-09-30 실화면에서 잡았다 — 막대는 생기는데 안 보였다). 학생 막대만 되살린다. */
.wb-readonly .wb-student-toolbar { display: flex; flex: 0 0 auto; margin-bottom: 6px; }
/* 학생 라이브에서는 무대 밖(무대 감싸개 바로 위)에 놓인다 — 줄어들지 않는 실제 크기다. */
.wb-student-toolbar { margin-bottom: 8px; }
/* 묶음 안에서도 줄을 바꾼다 — 폰 폭에서 색 8개가 한 줄에 안 들어가 마지막 색이 잘렸다(2026-09-30 실화면). */
.wb-student-toolbar .wb-tool-group { flex-wrap: wrap; row-gap: 4px; }
/* [2026-11-24] 두께 펼침 — 두께 다섯 단추 대신 「두께」 한 단추(js/wb-width-menu.js · 학생 라이브 판 · 설명형 슬라이드 위 판 · 슬라이드 쇼 창).
   모양은 위 색 펼침(.wb-color-toggle)과 같은 꼴이고, 목록은 body 에 붙는 떠 있는 상자다(막대 위·아래 중 빈자리가 큰 쪽).
   막대처럼 테마와 상관없이 흰 바탕이다. */
.wb-student-toolbar .wb-width-src { display: none; }
.wb-width-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: 8px; background: white; color: var(--text); font-size: var(--text-sm);
}
.wb-width-toggle[aria-expanded="true"] { border-color: var(--primary); background: var(--primary-soft); }
.wb-width-caret { font-size: var(--text-xs); color: var(--text-muted); }
.wb-width-menu {
  position: fixed; z-index: var(--z-popover); display: flex; flex-direction: column; gap: 4px; padding: 6px;
  background: white; border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-md);
}
.wb-width-menu .wb-width-item { width: 44px; height: 40px; }
.wb-width-toggle .dot { display: inline-block; border-radius: 50%; background: #374151; }   /* [design-ok] 바로 위 .wb-width-btn .dot 과 같은 점 색(두께 단추와 같은 점) */
.wb-width-toggle:focus-visible, .wb-width-item:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
/* 가로 화면: 무대 예산에서 막대 높이를 뺀다 — 조건·310 은 css/realtime.css 의 그 규칙과 «같은 값»이다
   (`.rts-body .alc-slide-stage-host { max-height: calc(100dvh - 310px) }`). 막대 높이는 js/realtime-quiz.js 가 넣는다. */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .rts-body :has(> .wb-student-toolbar) > .alc-slide-stage-host {
    max-height: calc(100dvh - 310px - var(--st-bar-h, 76px));
  }
}

/* ── [2026-11-20] 설명형 슬라이드(자료·웹페이지) 위 학생 판서 층 — js/realtime-quiz-board.js «설명형 슬라이드 위 판서» ──
   무대(.alc-slide-stage) «밖», 감싸개 안에 얹는다 — 위치·크기·배율은 JS(_ovFit)가 무대 상자에 맞춘다.
   평소는 터치가 아래 슬라이드로 통과한다. 판서 권한을 받은 동안(.is-draw)만 입력을 받는다. */
.alc-slide-stage-host > .lso { position: absolute; z-index: 5; overflow: hidden; pointer-events: none; }
.lso .lso-board { width: 1280px; height: 720px; transform-origin: 0 0; }
.lso .canvas-container { pointer-events: none; }
.lso.is-draw .canvas-container { pointer-events: auto; touch-action: none; }
.lso .lso-badge {
  position: absolute; top: 8px; left: 8px; pointer-events: none;
  padding: 4px 10px; border-radius: 999px; font-size: var(--text-sm); font-weight: 600;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.lso .lso-note {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); pointer-events: none;
  padding: 4px 12px; border-radius: 8px; font-size: var(--text-base);
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.lso .lso-note:empty { display: none; }
.wb-student-toolbar .lso-mode { margin-left: 6px; padding: 4px 12px; border-radius: 8px; font-size: var(--text-sm); font-weight: 600; cursor: pointer; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.lso-mode[aria-pressed="true"] { background: var(--text); color: var(--surface); }

/* ── [2026-11-22] 학생 슬라이드 편집 «고치기» — js/realtime-student-slide-edit.js ──
   고칠 수 있는 글 칸 · 바꿀 수 있는 그림에 점선 테두리(색만으로 알리지 않는다 — 모양이 함께 바뀐다). 고치는 중이면 실선. */
/* ★테두리는 «안쪽»에 그린다(음수 간격)★ — 글상자 · 그림 칸이 넘침을 자르는 칸이라 바깥 테두리는 잘려 안 보였다(2026-11-22 화면 확인). */
#rtsPlay .rse-text { outline: 2px dashed var(--primary); outline-offset: -2px; cursor: text; }
#rtsPlay .rse-text:focus { outline-style: solid; }
#rtsPlay .rse-img { outline: 2px dashed var(--primary); outline-offset: -2px; cursor: pointer; }
#rtsPlay .rsc-on .rse-img { outline: none; cursor: inherit; }   /* «함께 편집» 중 — 그림 칸 테두리가 이미 있다 · 누르면 고르기(2026-11-26) */
#rtsPlay .rse-img:focus-visible { outline-style: solid; outline-width: 3px; }

/* ── [2026-11-25] 가져온 PPT 장 «함께 편집» — js/realtime-student-coedit.js · 설계 = docs/superpowers/specs/2026-11-22-pptx-editable-import-design.md §11 ──
   칸은 무대(1280×720) 안에서 배율(--alc-slide-scale)을 받으므로, 테두리 · 손잡이 · 단추는 배율로 나눠 «화면에서» 같은 크기로 보이게 한다.
   점선 = 고칠 수 있다 · 실선 + 귀퉁이 손잡이 = 골랐다(색만으로 알리지 않는다 — 모양이 함께 바뀐다). 손잡이는 14px 로 보이고 잡는 자리는 44px. */
#rtsPlay .rsc-on .rsc-el {
  --rsc-s: var(--alc-slide-scale, 1);
  outline: calc(2px / var(--rsc-s)) dashed var(--primary); outline-offset: calc(-2px / var(--rsc-s));
  cursor: pointer; touch-action: none; user-select: none;
}
#rtsPlay .rsc-on .rsc-el.rsc-sel { outline-style: solid; cursor: move; }
#rtsPlay .rsc-on .rsc-el:focus-visible { outline-style: solid; outline-width: calc(3px / var(--rsc-s)); }
#rtsPlay .rsc-on .rsc-el .rse-text { user-select: text; cursor: text; }
#rtsPlay .alc-shape-tx.rse-text { min-width: 2em; min-height: 1.4em; }   /* 빈 도형에 글을 쓸 때 커서 자리(2026-11-25 · 자료 슬라이드 «고치기»도) */
#rtsPlay .rsc-on .rsc-el .alc-shape-tx.rse-text { outline: none; }   /* «함께 편집»은 칸 테두리가 이미 실선이다 */
#rtsPlay .rsc-frame { --rsc-s: var(--alc-slide-scale, 1); position: absolute; z-index: 300; pointer-events: none; }
#rtsPlay .rsc-hs { position: absolute; inset: 0; pointer-events: none; }   /* 손잡이 판 — 칸과 함께 돈다(js/realtime-student-coedit.js _frame · 2026-11-26) */
/* 돌리기 손잡이 — Canva 처럼 칸 아래 가운데 흰 동그라미 · 누르는 자리 44px */
#rtsPlay .rsc-rot {
  position: absolute; left: calc(50% - 12px / var(--rsc-s)); top: calc(100% + 14px / var(--rsc-s));
  width: calc(24px / var(--rsc-s)); height: calc(24px / var(--rsc-s)); box-sizing: border-box; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; color: var(--text); cursor: grab; pointer-events: auto; touch-action: none;
  background: var(--surface); border: calc(1px / var(--rsc-s)) solid var(--border-strong);
}
#rtsPlay .rsc-rot svg { width: calc(14px / var(--rsc-s)); height: calc(14px / var(--rsc-s)); }
#rtsPlay .rsc-rot::after { content: ""; position: absolute; inset: calc(-10px / var(--rsc-s)); }
#rtsPlay .rsc-deg {
  position: absolute; left: 50%; top: calc(100% + 46px / var(--rsc-s)); transform: translateX(-50%) scale(calc(1 / var(--rsc-s))); transform-origin: top center;
  padding: 2px 8px; border-radius: 999px; background: var(--text); color: var(--surface); font-size: var(--text-sm); font-weight: 700; white-space: nowrap;
}
/* 손잡이 — Canva 처럼 귀퉁이는 흰 동그라미 · 변은 흰 막대(2026-11-26 결정 4 · 변은 한 쪽으로만 크기를 바꾼다) */
#rtsPlay .rsc-h {
  position: absolute; box-sizing: border-box; width: calc(14px / var(--rsc-s)); height: calc(14px / var(--rsc-s));
  background: var(--surface); border: calc(1px / var(--rsc-s)) solid var(--border-strong); border-radius: 999px;
  box-shadow: 0 calc(1px / var(--rsc-s)) calc(3px / var(--rsc-s)) color-mix(in srgb, var(--text) 35%, transparent);
  pointer-events: auto; touch-action: none;
}
#rtsPlay .rsc-h-ml, #rtsPlay .rsc-h-mr { width: calc(8px / var(--rsc-s)); height: calc(22px / var(--rsc-s)); top: calc(50% - 11px / var(--rsc-s)); cursor: ew-resize; }
#rtsPlay .rsc-h-mt, #rtsPlay .rsc-h-mb { width: calc(22px / var(--rsc-s)); height: calc(8px / var(--rsc-s)); left: calc(50% - 11px / var(--rsc-s)); cursor: ns-resize; }
#rtsPlay .rsc-h-ml { left: calc(-4px / var(--rsc-s)); }
#rtsPlay .rsc-h-mr { right: calc(-4px / var(--rsc-s)); }
#rtsPlay .rsc-h-mt { top: calc(-4px / var(--rsc-s)); }
#rtsPlay .rsc-h-mb { bottom: calc(-4px / var(--rsc-s)); }
#rtsPlay .rsc-frame.rsc-no-x :is(.rsc-h-ml, .rsc-h-mr), #rtsPlay .rsc-frame.rsc-no-y :is(.rsc-h-mt, .rsc-h-mb) { display: none; }   /* 화면에서 작은 칸 — 누르는 자리가 가운데를 덮지 않게(js/realtime-student-coedit.js _frame) */
#rtsPlay .rsc-h::after { content: ""; position: absolute; inset: calc(-15px / var(--rsc-s)); }   /* 잡는 자리 44px */
#rtsPlay .rsc-h-tl { left: calc(-7px / var(--rsc-s)); top: calc(-7px / var(--rsc-s)); cursor: nwse-resize; }
#rtsPlay .rsc-h-tr { right: calc(-7px / var(--rsc-s)); top: calc(-7px / var(--rsc-s)); cursor: nesw-resize; }
#rtsPlay .rsc-h-bl { left: calc(-7px / var(--rsc-s)); bottom: calc(-7px / var(--rsc-s)); cursor: nesw-resize; }
#rtsPlay .rsc-h-br { right: calc(-7px / var(--rsc-s)); bottom: calc(-7px / var(--rsc-s)); cursor: nwse-resize; }
/* 고른 칸 위 도구줄 — Canva 의 칸 옆 작은 줄: 흰 말풍선에 누가 넣었나 · 복제 · 삭제 아이콘(2026-11-26 결정 2 · 4 · 꾸미기는 맨 위 줄 css/realtime-coedit-panel.css) */
#rtsPlay .rsc-tb {
  position: absolute; left: 50%; bottom: calc(100% + var(--rsc-lift, 0px));   /* lift = 돌린 칸을 감싸는 상자 위로(js _frame) */ transform: translate(-50%, calc(-10px / var(--rsc-s))) scale(calc(1 / var(--rsc-s)));
  transform-origin: bottom center; pointer-events: auto;
  display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 8px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
}
#rtsPlay .rsc-frame.is-rot { --rsc-rot-room: calc(44px / var(--rsc-s)); }   /* 아래 줄은 돌리기 손잡이 밑으로 */
#rtsPlay .rsc-frame.is-below .rsc-tb { bottom: auto; top: calc(100% + var(--rsc-lift, 0px) + var(--rsc-rot-room, 0px)); transform: translate(-50%, calc(10px / var(--rsc-s))) scale(calc(1 / var(--rsc-s))); transform-origin: top center; }
#rtsPlay .rsc-tb > button {
  min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; background: transparent; color: var(--text);
}
#rtsPlay .rsc-tb > button:hover { background: var(--surface-hover); }
#rtsPlay .rsc-tb > button:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
#rtsPlay .rsc-tb .rsc-who {
  align-self: stretch; display: inline-flex; align-items: center; padding: 0 10px 0 8px; margin-right: 2px;
  border-right: 1px solid var(--border); font-size: var(--text-sm); font-weight: 600; color: var(--text);
}
.rsc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* 아이콘 단추의 이름(화면 읽기) */
/* 켜져 있는 동안 «👁 보기 전용»(.wb-readonly ::after)을 숨긴다 — 고칠 수 있는데 «보기 전용»이라 하지 않게 · 그 자리에 배지가 온다 */
#rtsPlay .rsc-on .wb-readonly .wb-canvas-wrap::after { display: none; }
/* 배지 · 알림 줄 — 무대 감싸개 안 · 누름은 아래로 지나간다. 알림은 판서 층(.lso)과 같은 자리 · 같은 모양.
   배지는 «보기 전용»이 있던 오른쪽 위 — 왼쪽 위는 장표 제목이 흔히 오고 판서 권한 배지(.rtq-wb-grant-badge)도 그 자리다(2026-11-25 «위 두 가지 고쳐줘») */
.alc-slide-stage-host > .rsc-bar { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.rsc-bar .rsc-badge {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 10px; border-radius: 999px; font-size: var(--text-sm); font-weight: 600;
  background: var(--surface); color: var(--primary); border: 1px solid var(--primary);
}
.rsc-bar .rsc-note {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 8px; font-size: var(--text-base);
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
}
.rsc-bar .rsc-note:empty { display: none; }
/* 글상자가 나타나기 전에 친 글을 받아 두는 보이지 않는 입력 칸(js/realtime-student-coedit.js _sinkOpen) — 화면 안 한 점에 두어
   초점을 줄 때 화면이 밀리지 않게 한다 */
.rsc-sink { position: fixed; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; white-space: pre-wrap; }
/* 그림 고르기 창 — 라이브 화면에는 공용 창 틀(.dialog-*) 규칙이 실리지 않아 자기 모양을 들고 간다(.trm-* 와 같은 선례 · css/common.css).
   ★고정 크기★(fixed-size-modals) — 찾은 그림이 몇 개든 창은 그대로이고 그림 칸 안에서만 스크롤한다. 학생 화면이라 누름 칸은 44 이상. */
.rse-pick {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(15, 23, 42, 0.5);
}
.rse-pick-box {
  width: min(560px, calc(100vw - 32px)); height: min(520px, calc(100vh - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  word-break: keep-all; overflow-wrap: anywhere;
}
.rse-pick-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.rse-pick-head h2 { margin: 0; font-size: var(--text-md); font-weight: 700; color: var(--text); }
.rse-pick-x { flex: 0 0 auto; min-width: 64px; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: var(--text-base); font-weight: 600; cursor: pointer; }   /* 학생 화면은 아이콘 묶음을 싣지 않는다(js/icons.js) — 글자 «닫기» */
.rse-pick-x:hover { background: var(--surface-hover); color: var(--text); }
.rse-pick-search { flex: 0 0 auto; padding: 12px 16px 0; }
.rse-pick-q { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: var(--text-base); color: var(--text); background: var(--surface); box-sizing: border-box; }
.rse-pick-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; align-content: start; padding: 12px 16px; }
.rse-pick-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: var(--text-sm); cursor: pointer; }
.rse-pick-item:hover, .rse-pick-item:focus-visible { border-color: var(--primary); outline: 2px solid var(--primary); outline-offset: 0; }
.rse-pick-item img { width: 88px; height: 88px; object-fit: contain; }
.rse-pick-note { flex: 0 0 auto; margin: 0; padding: 10px 16px 14px; border-top: 1px solid var(--border); font-size: var(--text-sm); color: var(--text-muted); }
