/* css/detail-rte.css — css/detail.css 가족의 한 조각(옮기기만 · 순서의 정본 = js/script-families.json · 코드 구조 4계단④ · 2026-10-10) · 서식 편집기 · 시선 오버레이·재생 · 데이터 수집 · 활동 편집 · 분석 임베드 · 척도 */
/* ── Rich Text Editor (문항 본문) — 한컴 한글 워드프로세서 스타일 ── */
.rte-wrap {
  border: 1px solid #b6bcc7;
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.rte-wrap:focus-within {
  border-color: #2e6bd1;
  box-shadow: 0 0 0 2px rgba(46, 107, 209, 0.18);
}
/* [회차 86 E6] RTE 툴바 — 클래식 그라데이션 → 평면 모던 톤 (Manus 가이드). */
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.rte-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  position: relative;
}
.rte-group + .rte-group::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
  opacity: 0.6;
}
.rte-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  transition: background-color .1s, border-color .1s, color .1s;
}
.rte-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.rte-btn:active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
/* [DET-P1-04] 서식 적용 중인 버튼 표시 (aria-pressed=true 와 동기화) */
.rte-btn-active,
.rte-btn[aria-pressed="true"] {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.rte-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.rte-btn svg { display: block; }
.rte-sel {
  height: 28px;
  padding: 0 22px 0 10px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><polygon points='0,0 10,0 5,6' fill='%23606878'/></svg>") no-repeat right 6px center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  color: var(--text);
  transition: border-color .12s;
}
.rte-sel:hover { border-color: var(--primary); }
/* 다크 화살표(R271 · 결정 6A) — 위 그림은 밝은 화면 색이라 어두운 칸 위 2.9. :where 로 감싸 원래 규칙보다 세지지 않게 한다 */
@media screen { :where(html.theme-dark:not(:has(body[data-contrast="high"]))) .rte-sel { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><polygon points='0,0 10,0 5,6' fill='%23a3aab5'/></svg>"); } }

/* [회차 86 E6] 고급 도구 토글 — 기본 숨김 + 우측 끝 토글 버튼으로 펼침 */
.rte-toolbar:not(.rte-toolbar-expanded) .rte-group-advanced { display: none; }
.rte-toolbar:not(.rte-toolbar-expanded) .rte-group-advanced + .rte-group::before { display: none; }
.rte-btn-toggle {
  margin-left: auto;
  height: 28px; padding: 0 10px;
  font-size: 12px; font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.rte-btn-toggle:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.rte-toolbar-expanded .rte-btn-toggle { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.rte-sel-style    { width: 92px; }
.rte-sel-font     { width: 130px; }
.rte-sel-fontsize { width: 56px; padding-right: 18px; text-align: center; }
.rte-sel-lh       { width: 78px; }
.rte-fontsize-wrap {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  margin-left: 3px;
}
.rte-fs-btn { min-width: 22px; padding: 0; font-size: 14px; font-weight: 700; color: #4a5263; }

.rte-color {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}
.rte-color:hover { background: #fff; border-color: #b6bcc7; }
.rte-color-icon {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 12px;
  font-weight: 700;
  color: #2c3140;
  gap: 1px;
  pointer-events: none;
}
.rte-color-bar {
  display: block;
  width: 14px;
  height: 3px;
  border-radius: 1px;
}
.rte-color > input[type=color] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; padding: 0; border: 0;
}
.rte-editor {
  min-height: 160px;
  max-height: 520px;
  overflow-y: auto;
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.75;
  outline: none;
  border: none;
  border-radius: 0;
  background: #fff;
  color: #1f2533;
  font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Nanum Gothic', sans-serif;
}
.rte-editor:focus { box-shadow: none; }
.rte-editor img,
.rte-editor video,
.rte-editor iframe { max-width: 100%; border-radius: 6px; }
.rte-editor audio { display: block; margin: 6px 0; max-width: 100%; }
.rte-editor p { margin: 0 0 8px; }
.rte-editor p:last-child { margin-bottom: 0; }
.rte-editor h2 { font-size: 22px; margin: 12px 0 8px; }
.rte-editor h3 { font-size: 17px; margin: 10px 0 6px; }
.rte-editor blockquote {
  margin: 8px 0;
  padding: 6px 14px;
  border-left: 4px solid var(--primary);
  background: var(--bg);
  color: var(--text);
}
.rte-editor.rte-empty::before {
  content: attr(data-placeholder);
  color: #9aa3b2;
  pointer-events: none;
  display: block;
}
.rte-media-panel {
  border-top: 1px solid var(--border);
  background: #fbfcff;
  padding: 10px 12px;
}
.rte-mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.rte-mp-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.rte-mp-close:hover { background: #fde2e2; color: var(--danger); border-color: var(--danger); }
.rte-mp-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
}
/* [DET-P0-01] 링크 삽입 패널 라벨/오류 메시지 */
.rte-mp-label {
  min-width: 56px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  word-break: keep-all;
}
.rte-mp-err {
  font-size: 12px;
  color: var(--danger);
  word-break: keep-all;
}
.rte-audio-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rte-audio-preset {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.rte-audio-preset-btn {
  padding: 6px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text);
}
.rte-audio-preset-btn:hover { background: var(--bg); }
.rte-audio-preview {
  width: 30px;
  height: 30px;
  border: none;
  border-left: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 11px;
  color: var(--primary);
}
.rte-audio-preview:hover { background: #d6e0ff; }
.rte-wiki-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}
.rte-wiki-btn {
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  padding: 0;
  height: 80px;
  overflow: hidden;
  border-radius: 6px;
  transition: border-color .15s, transform .12s;
}
.rte-wiki-btn:hover { border-color: var(--primary); transform: scale(1.04); }
.rte-wiki-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 학생 화면 — RTE에서 만들어진 본문이 들어가는 컨테이너 공통 */
.pv-question img,
.pv-question video,
.pv-question iframe,
.tq-question img,
.tq-question video,
.tq-question iframe,
.rtq-question img,
.rtq-question video,
.rtq-question iframe { max-width: 100%; border-radius: 6px; }
.pv-question audio,
.tq-question audio,
.rtq-question audio { display: block; margin: 6px auto; max-width: 100%; }

/* ━━━ [회차 136] 6차 §1 — 8 quiz 타입 슬라이드 오버레이 CSS 누락분 통합 ━━━
   기존 회차 130~131 의 multi/short/draw/notice 등 외에 OX 타입과 draw 의 숫자
   버튼이 누락되어 사용자가 본 ox 슬라이드 ("피아노에는 검은 건반이...")의 보기·
   배경이 안 보임. 베이지 배경 위에 흰 버튼이 정상 표시되도록 추가. */
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-ox {
  display: flex; gap: 16px; margin-top: 8px;
  max-width: 60%;
}
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-ox-btn {
  flex: 1; padding: 28px 16px;
  border: 1.5px solid #d1d5db; border-radius: 14px;
  background: #fff; color: #1f2937;
  font-size: 18px; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
}
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-ox-btn small {
  font-size: 12px; font-weight: 500; color: #6b7280;
}
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-ox-btn.correct,
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-ox-btn.is-correct {
  border: 2px solid #f472b6;
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.18);
  background: #fff5f9;
}
/* Draw — 인식 결과 + 숫자 버튼 0~9 */
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-draw-recog {
  font-size: 14px; color: #1f2937; padding: 8px 12px;
  background: #fff; border-radius: 8px; border: 1px solid #e5e7eb;
}
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-draw-digits {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-digit {
  width: 36px; height: 36px;
  background: #fff; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 16px; font-weight: 700; color: #1f2937;
  pointer-events: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-digit.correct {
  border: 2px solid #f472b6; background: #fff5f9; color: #be185d;
}
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-digit.wrong {
  border: 2px solid var(--danger); background: #fef2f2; color: #991b1b;   /* [design-ok] 기존 값 그대로 — 이 줄은 «옛 빨강 → 토큰»만 옮겼다(2026-10-04) */
}
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-digit.selected {
  border: 2px solid #a78bfa; background: #f5f3ff;
}
/* Notice — 안내 박스 */
.rt-gaze-panel--light .rt-gaze-slide-overlay .rtq-notice {
  margin-top: 12px; padding: 14px 18px;
  background: #fef9c3; border-left: 4px solid #f59e0b; border-radius: 10px;
  font-size: 15px; color: #78350f; line-height: 1.6;
  max-width: 80%;
}

/* ━━━ [회차 136] 6차 §3 — AOI 단일 카드 통합 (도넛+리스트+skeleton) ━━━ */
.rt-gaze-panel--light .rt-gaze-aoi-unified { padding: 16px 18px; }
/* [회차 144 §2·§3] AOI 카드 4 케이스 fallback (notice / no-attempt / no-track / no-data).
   카드 통째 컴팩트 모드 — 도넛/리스트/skeleton 제거 후 단일 안내 박스만 표시. 빈 여백 해소. */
.rt-gaze-panel--light .rt-gaze-aoi-unified.rt-gaze-aoi-fallback {
  padding: 16px 18px;
}
.rt-gaze-panel--light .rt-gaze-fb {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--gz-bg-elev-2);
  border-left: 3px solid var(--gz-text-muted); /* WCAG 1.4.11: gz-text-faint 2.56:1 < 3:1 → gz-text-muted #475569 7:1 */
  border-radius: 8px;
  margin-top: 10px;
}
.rt-gaze-panel--light .rt-gaze-fb-icon { font-size: 24px; flex-shrink: 0; line-height: 1; }
.rt-gaze-panel--light .rt-gaze-fb-text b {
  display: block; font-size: 13px; color: var(--gz-text); margin-bottom: 4px; font-weight: 700;
}
.rt-gaze-panel--light .rt-gaze-fb-text span {
  font-size: 11.5px; color: var(--gz-text-muted); line-height: 1.55;
  word-break: keep-all; overflow-wrap: anywhere;
}
.rt-gaze-panel--light .rt-gaze-fb.rt-gaze-fb-no-attempt  { border-left-color: #94a3b8; background: rgba(148, 163, 184, 0.10); }
.rt-gaze-panel--light .rt-gaze-fb.rt-gaze-fb-no-track    { border-left-color: #f97316; background: rgba(249, 115, 22, 0.08); }
.rt-gaze-panel--light .rt-gaze-fb.rt-gaze-fb-no-data     { border-left-color: #ef4444; background: rgba(239, 68, 68, 0.08); }

/* [회차 144 §4] 토스트 — AOI 토글 박스 없을 때 안내 (3.5초 자동 사라짐) */
.rt-gaze-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94); color: #f1f5f9;
  padding: 12px 22px; border-radius: 8px;
  font-size: 13px; font-weight: 500;
  z-index: 99999;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(8px);
  max-width: 92vw; word-break: keep-all;
  animation: rtGazeToastIn .25s ease, rtGazeToastOut .3s ease 3.2s forwards;
}
.rt-gaze-toast--warn { border-left: 4px solid #f97316; padding-left: 16px; }
.rt-gaze-toast--info { border-left: 4px solid #38bdf8; padding-left: 16px; }
/* [임베드 토스트 자리 2026-09-03] 수업 분석 탭에 «끼워 넣어졌을 때»는 위쪽에 띄운다.
   ★두 가지를 동시에 고친다★
     ① 안 보인다 — 임베드된 문서는 브라우저보다 아래로 넘치므로 `bottom:24px`(문서 기준)이
        화면 밖으로 나간다(실측: 토스트 bottom 1012px vs 브라우저 높이 1000px → 잘림).
     ② 멀다 — 이 패널에서 토스트를 부르는 것은 «맨 위 줄»의 슬라이드 버튼·AOI 토글이다.
        눌러 놓고 화면 맨 아래를 봐야 하면 못 보고 지나친다.
   독립 결과분석 화면에는 이 두 표시가 없어 종전대로 아래에 뜬다(회귀 0). */
html.rt-only-panel .rt-gaze-toast,
html.rt-group-panel .rt-gaze-toast {
  bottom: auto;
  /* 슬라이드 번호 줄(실측 y 22~57)을 «덮지 않는» 자리. 무대는 77 부터라 살짝만 겹친다 —
     안내가 그 줄의 버튼을 가리면, 왜 안 되는지 읽는 3.5초 동안 다른 슬라이드를 못 고른다. */
  top: 64px;
  animation: rtGazeToastInTop .25s ease, rtGazeToastOut .3s ease 3.2s forwards;
}
@keyframes rtGazeToastInTop { from { opacity: 0; transform: translate(-50%, -18px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes rtGazeToastIn  { from { opacity: 0; transform: translate(-50%, 18px); } to { opacity: 1; transform: translateX(-50%); } }
@keyframes rtGazeToastOut { to { opacity: 0; pointer-events: none; } }
.rt-gaze-panel--light .rt-gaze-donut-mini {
  display: flex; justify-content: center;
  margin: 12px 0 8px;
}
.rt-gaze-panel--light .rt-gaze-donut-mini svg { width: 90px; height: 90px; }
.rt-gaze-panel--light .rt-gaze-donut-mini[data-empty="true"] svg {
  width: 60px; height: 60px; opacity: 0.4;
}
.rt-gaze-panel--light .rt-gaze-aoi-unified .rt-gaze-aoi-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.rt-gaze-panel--light .rt-gaze-aoi-unified .rt-gaze-aoi-item {
  display: grid; grid-template-columns: 4px 1fr auto;
  gap: 10px; align-items: center;
  padding: 8px 10px;
  background: var(--gz-bg-elev-2);
  border-radius: 6px;
}
.rt-gaze-panel--light .rt-gaze-aoi-unified .rt-gaze-aoi-swatch {
  width: 4px; height: 28px;
  background: var(--swatch-color, #94a3b8);
  border-radius: 2px;
}
.rt-gaze-panel--light .rt-gaze-aoi-unified .rt-gaze-aoi-text { display: flex; flex-direction: column; }
.rt-gaze-panel--light .rt-gaze-aoi-unified .rt-gaze-aoi-name { font-size: 12.5px; font-weight: 700; color: var(--gz-text); }
.rt-gaze-panel--light .rt-gaze-aoi-unified .rt-gaze-aoi-desc { font-size: 10.5px; color: var(--gz-text-muted); margin-top: 2px; }
.rt-gaze-panel--light .rt-gaze-aoi-unified .rt-gaze-aoi-pct {
  font-size: 15px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--swatch-color, var(--gz-text));
}
.rt-gaze-panel--light .rt-gaze-aoi-unified .rt-gaze-aoi-item[data-empty="true"] .rt-gaze-aoi-pct {
  color: var(--gz-text-muted); /* WCAG: gz-text-faint→gz-text-muted #475569 7:1, empty pct on light */
}

/* ━━━ [회차 136] 6차 §2 — Playback 단순화 (슬라이더 제거, 마커 균등) ━━━ */
.rt-gaze-panel--light .rt-gaze-pb-markers-simple {
  flex: 1;
  display: flex; justify-content: space-around;
  gap: 8px;
}
.rt-gaze-panel--light .rt-gaze-pb-marker-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: transparent; border: none; cursor: pointer;
  padding: 4px 12px; border-radius: 10px;
  transition: background .15s;
}
.rt-gaze-panel--light .rt-gaze-pb-marker-btn:hover { background: var(--gz-bg-elev-2); }
.rt-gaze-panel--light .rt-gaze-pb-marker-btn.active { background: rgba(167, 139, 250, 0.12); }
.rt-gaze-panel--light .rt-gaze-pb-marker-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--m-color, var(--gz-accent));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  border: 2px solid var(--gz-bg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform .15s;
}
.rt-gaze-panel--light .rt-gaze-pb-marker-btn.active .rt-gaze-pb-marker-num { transform: scale(1.15); }
.rt-gaze-panel--light .rt-gaze-pb-marker-btn .rt-gaze-pb-marker-text {
  font-size: 11px; color: var(--gz-text-muted); white-space: nowrap;
}
.rt-gaze-panel--light .rt-gaze-pb-marker-btn.active .rt-gaze-pb-marker-text {
  color: var(--gz-text); font-weight: 700;
}

/* [회차 139 §5] 현재 문항 안에서 시간 cutoff slider (hybrid 복구) */
.rt-gaze-panel--light .rt-gaze-pb-time-slider {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  /* [접근성 마감 2026-08-04] 종전엔 저장소 어디에도 정의가 없는 미정의 변수를 참조해(소비 1곳·
     정의 0곳) 선언이 무효가 되고 이 행 배경이 사실상 투명이었다 — 5103행에 정의된 토큰으로 정정. */
  background: var(--gz-bg-elev);
  border-top: 1px solid var(--gz-border);
  /* [버그1] '현재 문항 시간' 타임라인 바가 스테이지의 절대배치 캔버스(z-index 2~5)에
     30~70% 중앙 구간이 가려지던 문제 → 자체 스태킹 컨텍스트로 스테이지 위에 올림 */
  position: relative;
  z-index: 6;
}
/* [재생바 게이팅 2026-09-06] display:flex 가 UA 기본 [hidden]{display:none} 을 이기므로
   명시적으로 되돌린다(이 파일의 반복 패턴 — 6179·7806 과 동일 케이스). 없으면 el.hidden=true
   를 줘도 하나도 안 숨는다. */
.rt-gaze-panel--light .rt-gaze-pb-time-slider[hidden] { display: none; }
.rt-gaze-panel--light .rt-gaze-pb-within-label {
  font-size: 11.5px; color: var(--gz-text-muted); font-weight: 600;
  white-space: nowrap;
}
/* ★[재생바↔집중도 축 정합 2026-07-31] 사장님: "모든 슬라이드에서 재생바와 시점별 집중도는 동기화되어야해".
   종전엔 슬라이더가 ▶재생·라벨·%·속도와 **같은 줄**을 나눠 써서 폭 546px(x=422)이었는데 바로 아래
   집중도 곡선은 카드 전체 폭 988px(x=271)이라, 같은 50% 가 화면에서 70px 떨어진 자리에 찍혔다.
   → 슬라이더만 제 줄로 내려 곡선과 같은 폭을 갖게 한다. 나머지 컨트롤은 윗줄에 그대로.
   (남은 몇 px 오차는 JS `_rtGazeEngPad` 가 슬라이더를 실측해 정확히 맞춘다.) */
.rt-gaze-panel--light .rt-gaze-pb-time-slider { flex-wrap: wrap; row-gap: 8px; }

/* ★[집중도 통합 2026-07-31] 사장님: "시선분석 재생바에다가 시점별 집중도를 같이 표시… 따로 표시하지 말구".
   슬라이더와 집중도 캔버스를 **한 트랙 래퍼** 안에 겹쳐 둔다 — 곡선이 배경, 슬라이더가 그 위.
   ★래퍼가 제 줄을 통째로 갖는다(종전엔 슬라이더가 직접 `flex:1 0 100%`). 좌우 끝이 곧 시간축의
     0%/100% 라, 둘이 다른 부모에 있으면 몇 px 씩 어긋나 "이 봉우리가 이 시각"이 깨진다. */
/* ★[80px 2026-08-04] 58 → 80. y축은 0~100% 고정을 유지하고(학생 간 비교) 세로 해상도만 키운다 —
   집중도가 낮은 학생은 58px 중 25px 만 써서 곡선이 거의 평평하게 보였다.
   ★아래 두 값과 js/detail-report.js 의 <canvas height="80"> 속성은 **항상 같아야 한다.**
     어긋나면 캔버스 내부 좌표계가 CSS 박스에 맞춰 세로로 늘어나 곡선이 왜곡된다. */
.rt-gaze-panel--light .rt-gz-trackwrap {
  flex: 1 0 100%; order: 5; position: relative; display: block; height: 80px;
}
.rt-gaze-panel--light .rt-gz-trackwrap .rt-gaze-eng-canvas {
  position: absolute; inset: 0; width: 100%; height: 80px;
  background: transparent; border: 0; border-radius: 0; pointer-events: auto;
}
/* [선 끝 DOM 라벨 2026-09-17] "이 선이 누구 것인지"를 캔버스 fillText 가
   아니라 진짜 DOM 요소로 낸다 — 어떤 화면 배율에서도 브라우저가 선명하게 그리고, 고대비
   모드가 자동 적용되고, 스크린리더가 직접 읽는다. 위치(top/right)는 js/detail-report.js 의
   _rtGazeDrawEngagementCurve 가 매 그리기마다 계산해 얹는다(그 좌표 계산 자체는 CSS 가
   정하지 않는다). 긴 이름은 max-width+ellipsis 로 자른다 — measureText 기반 자르기를 다시
   만들지 않는다. 글자색은 그 선의 실제 stroke 색과 같은 토큰이라 범례 없이도 색-이름이
   짝지어진다(js 의 NEUTRAL=--text-body, 반 평균 점선=--text-muted 와 각각 맞춘다). */
.rt-gaze-panel--light .rt-gz-eng-linelabel {
  position: absolute; z-index: 2; max-width: 90px;
  font-size: var(--text-xs); font-weight: 700; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 1px 4px; border-radius: var(--radius-pill);
  /* [반투명 2026-09-17] 배경을 꽉 채우면 곡선의 «끝»을 가린다 — 이 라벨이 가리키는 바로 그
     자리다. 82% 로 깔면 글자는 그대로 읽히면서 아래 곡선이 비쳐 보인다.
     ★첫 줄은 폴백이다★ — color-mix 를 못 읽는 엔진에서는 종전대로 꽉 찬 배경이 된다
     (가려도 읽히는 쪽으로 저하시킨다). */
  background: var(--gz-bg);
  background: color-mix(in srgb, var(--gz-bg) 82%, transparent);
  pointer-events: none; transform: translateY(-50%);
}
.rt-gaze-panel--light .rt-gz-eng-linelabel[hidden] { display: none; }
.rt-gaze-panel--light .rt-gz-eng-linelabel--stu { color: var(--text-body); }
/* [재방문 경계 2026-10-16] 같은 슬라이드를 다시 띄운 자리 — 곡선과 재생 막대를 함께 가로지르는 세로 점선 + «다시 띄운 뒤».
   마우스·키보드 초점이면 한 줄 풀이. 글·말풍선은 트랙 «안»에서 선의 넓은 쪽으로 편다(js _rtGazeDrawVisitMarks) —
   트랙 위 줄(범례 «짧게 응시»)·아래 줄(칩)을 가리지 않는다. */
.rt-gaze-panel--light .rt-gz-visit-mark {
  position: absolute; top: 0; bottom: 0; width: 0; z-index: 3;
  border-left: 2px dashed var(--text-muted); outline: none;
}
.rt-gaze-panel--light .rt-gz-visit-mark::before { content: ''; position: absolute; top: 0; bottom: 0; left: -8px; width: 16px; }
.rt-gaze-panel--light .rt-gz-visit-lbl {
  position: absolute; top: 18px; left: 4px; padding: 1px 6px; border-radius: var(--radius-pill);
  font-size: var(--text-xs); font-weight: 700; line-height: 1.3; color: var(--text-muted);
  white-space: nowrap; word-break: keep-all;
  background: var(--gz-bg); background: color-mix(in srgb, var(--gz-bg) 82%, transparent);
}
.rt-gaze-panel--light .rt-gz-visit-tip {
  display: none; position: absolute; top: 2px; left: 4px; z-index: 4;
  width: max-content; padding: 6px 10px; border-radius: var(--radius-sm);
  font-size: var(--text-xs); line-height: 1.45; word-break: keep-all; color: var(--surface); background: var(--text-body);
  box-shadow: var(--shadow-md);
}
.rt-gaze-panel--light .rt-gz-visit-mark--flip .rt-gz-visit-lbl,
.rt-gaze-panel--light .rt-gz-visit-mark--flip .rt-gz-visit-tip { left: auto; right: 4px; }
.rt-gaze-panel--light .rt-gz-visit-mark:hover .rt-gz-visit-tip,
.rt-gaze-panel--light .rt-gz-visit-mark:focus-visible .rt-gz-visit-tip { display: block; }
.rt-gaze-panel--light .rt-gz-visit-mark:focus-visible { border-left-color: var(--primary); }

/* 슬라이더는 트랙 **아랫변**에 앉는다 — 곡선(위)과 조작(아래)이 세로로 겹치지 않아 둘 다 읽힌다.
   [세로 해상도 2026-09-28] bottom 5px → 0. 비어 있던 5px 를 곡선 몫으로 돌린다 — 아래 줄과의
   간격은 부모의 row-gap 이 이미 준다. ★js/detail-report.js 의 padB(14)와 짝이다★ — 슬라이더를
   다시 올리면 padB 도 같이 올릴 것(안 그러면 0% 부근 곡선이 레일 밑으로 들어간다). */
.rt-gaze-panel--light .rt-gz-trackwrap #rtGazeTimeWithin {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; z-index: 1;
}

/* ━━━ [집중도 칩 2026-08-04] 재생 위치의 집중도 %·반 평균·차이 + 곡선 범례 ━━━
   사장님: "집중도가 그냥 차트만 나와있고 구체적으로 몇 %인지 안 나온다."
   ★컨트롤 행(▶재생·라벨·%·배속)이 아니라 **트랙 아래 전용 행**이다 — 목업 실측으로 그 행의
     기존 자식이 546px 중 313px 을 쓰고 칩이 약 225px 라, 같이 넣으면 배속(1x/1.5x/2x)이 밀려난다.
   ★등급 색은 새로 만들지 않고 `_grade4` 밴드(이 파일 4605-4617 .rt-gz-eng-badge)와 같은 의미
     토큰을 쓴다 — 고대비 모드(body[data-contrast="high"])가 토큰을 재정의하면 자동으로 따라온다. */
.rt-gaze-panel--light .rt-gz-eng-footrow {
  flex: 1 0 100%; order: 6; display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; row-gap: 6px; margin-top: 2px;
}
.rt-gaze-panel--light .rt-gz-eng-chip {
  display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  border-radius: 8px; border: 1px solid; white-space: nowrap;
  /* 테두리는 글자색(=등급 토큰)의 옅은 농도 — 목업의 파스텔 hex 를 그대로 박으면 고대비에서
     배경·글자만 바뀌고 테두리가 옛 색으로 남는다. 같은 관용구가 이 파일 9473-9475 에 있다. */
  border-color: color-mix(in srgb, currentColor 32%, transparent);
}
@supports not (color: color-mix(in srgb, red 10%, blue)) {
  .rt-gaze-panel--light .rt-gz-eng-chip { border-color: var(--border); }
}
/* display:flex 가 UA 의 [hidden]{display:none} 을 이기므로 명시적으로 되돌린다. */
.rt-gaze-panel--light .rt-gz-eng-chip[hidden],
.rt-gaze-panel--light .rt-gz-eng-legend[hidden],
.rt-gaze-panel--light .rt-gz-eng-legend .lg-note[hidden],
.rt-gaze-panel--light .rt-gz-eng-legend .lgi[hidden] { display: none; }
.rt-gaze-panel--light .rt-gz-eng-chip .ico { font-size: 12px; line-height: 14px; }
/* ★opacity 를 걸지 않는다 — .85 를 곱하면 아래 등급색의 실효 대비가 그만큼 깎여
   caution 이 약 2.7:1 까지 떨어진다(특수학생 대상 제품에서 그 자체로 결함). */
.rt-gaze-panel--light .rt-gz-eng-chip .cap { font-size: 11px; font-weight: 600; }
.rt-gaze-panel--light .rt-gz-eng-chip .big { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
/* [AA 2026-08-04] --text-muted(#64748b) 는 --danger-light 배경 위에서 4.35:1 로 AA(4.5) 미달이었다.
   나머지 3개 틴트에서도 4.55~4.59 로 경계선이라 한 단계 진한 --text-body 로 올린다(9.45:1).
   위계는 색이 아니라 글자 크기(11px vs 15px)와 굵기가 유지한다. */
.rt-gaze-panel--light .rt-gz-eng-chip .vs  { font-size: 11px; color: var(--text-body); font-variant-numeric: tabular-nums; }
.rt-gaze-panel--light .rt-gz-eng-chip .dlt { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* [색만으로 알리지 않는다 2026-08-04 · UI_GUIDELINES 0-B] 곡선의 네 색이 무슨 뜻인지를
   재생 위치에서 **글자로** 같이 읽는다(문구 정본 = GazeEngagement.relGrade().txt). */
.rt-gaze-panel--light .rt-gz-eng-chip .txt { font-size: 12px; font-weight: 700; }
/* 글자색은 `-dark` 토큰 — 기본색(--success 등)을 옅은 배경에 얹으면 작은 글자 AA(4.5:1)에
   못 미친다(실측 3.07~4.41). -dark 로 바꾸면 4.79~5.91 로 통과한다. 배경 틴트와 등급 색상은
   그대로다. ★hex 를 여기 박지 말 것 — 토큰이라야 body[data-contrast="high"] 가 따라온다. */
.rt-gaze-panel--light .rt-gz-eng-chip.excellent { background: var(--success-light); color: var(--success-dark); }
.rt-gaze-panel--light .rt-gz-eng-chip.good      { background: var(--info-light);    color: var(--info-dark); }
.rt-gaze-panel--light .rt-gz-eng-chip.caution   { background: var(--warning-light); color: var(--warning-dark); }
.rt-gaze-panel--light .rt-gz-eng-chip.risk      { background: var(--danger-light);  color: var(--danger-dark); }
/* 비교 대상이 없을 때(「전체(평균)」 보기 · 반 평균 로딩 전) — 등급을 단정하지 않는 중립.
   같은 뜻의 `.none` 이 학생 목록 배지에도 이미 있다(이 파일 4614). */
.rt-gaze-panel--light .rt-gz-eng-chip.none { background: var(--bg-subtle); color: var(--text-body); }

/* [빈칸도 말한다 2026-09-17] 못 잰 구간에서는 값 자리에 숫자가 아니라 「미인식」이 들어간다.
   .big 은 숫자용(15px/800 + tabular-nums)이라 그대로 두면 낱말이 수치처럼 읽힌다 —
   그 자리에서만 낱말 크기로 낮춘다. 배경·글자색은 위 `.none` 중립을 그대로 쓴다. */
.rt-gaze-panel--light .rt-gz-eng-chip.nodata .big { font-size: var(--text-sm); font-weight: 700; font-variant-numeric: normal; }

/* 범례 — 수업분석 집중도 범례(css/main.css .anm-eng-glegend)와 같은 관용구: <i> 선 스와치 + 라벨. */
.rt-gaze-panel--light .rt-gz-eng-legend {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; row-gap: 4px;
  font-size: 11px; color: var(--gz-text-muted);
}
.rt-gaze-panel--light .rt-gz-eng-legend .lgi { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rt-gaze-panel--light .rt-gz-eng-legend i { display: inline-block; width: 16px; height: 0; vertical-align: middle; }
/* [반 평균 범례 2026-09-21] 반 평균 끝 라벨을 대신한다 — 캔버스가 그리는 점선과 같은
   토큰(--text-muted)을 쓴다. 위 i.lg-ref 와 헷갈리지 말 것 — 그것은 --text-faint 를 쓰는
   다른(미사용) 스와치다. --text-faint 는 이 패널에서 가장 흐려(2026-09-17 실측) 비교
   기준선을 그리기엔 너무 옅다는 이유로 --text-muted 로 이미 한 번 바뀌었다 — 여기서
   그 결정을 다시 베끼지 않고 그대로 반영한다. */
.rt-gaze-panel--light .rt-gz-eng-legend i.lg-cls { border-top: 2px dashed var(--text-muted); }
/* 저조 구간 음영 — 캔버스의 rgba(100,116,139,.10) 은 16px 스와치에선 사실상 안 보인다.
   같은 색을 스와치에서만 진하게 쓴다(면 자체를 보여야 하므로 높이를 준다). */
.rt-gaze-panel--light .rt-gz-eng-legend i.lg-band { height: 10px; border-radius: 2px; background: rgba(100, 116, 139, .28); }
/* [못 잰 구간 2026-09-17] 같은 slate 회색이되 **빗금**이다 — 캔버스 음영과 같은 결이라
   범례와 그림이 눈으로 이어진다. 색을 새로 만들지 않는다(두 음영을 색으로 가르면 회색이
   둘이 되어 어느 쪽이 무슨 뜻인지 다시 설명해야 한다). */
.rt-gaze-panel--light .rt-gz-eng-legend i.lg-gap {
  height: 10px; border-radius: 2px;   /* [design-ok] 바로 위 .lg-band 스와치와 «똑같이» 보여야 한다 — 둘은 결(빗금)로만 갈린다 */
  background: repeating-linear-gradient(45deg,
    rgba(100, 116, 139, .38) 0 1px, transparent 1px 4px);
}

/* [범례 2026-09-13] 무엇이 곡선을 내렸는지 — 탭 이탈(화면 글자 「다른 화면」)뿐이다.
   호스트(rtGazeCurveLegendHost)는 display:contents 로 레이아웃에서 사라지고, JS 가 그 안에
   꽂는 .rt-gz-curve-legend 가 .rt-gz-eng-footrow 의 직속 자식처럼 다음 줄에 배치된다.
   ★감산이 없으면 호스트가 비어 있어(innerHTML='') 아무 것도 그려지지 않는다 — hidden 토글이
   따로 필요 없다. 등급 색 토큰은 위 .rt-gz-eng-chip 과 같은 것(caution·risk)을 그대로 쓴다.
   ★[답안 미제출 칩 삭제 2026-09-15]★ 곡선은 미제출로 안 내려간다 — 그 칩(.rt-gz-lg--nosub)은
   없는 효과를 광고해 뗐다(js/detail-report.js `_rtGazeCurveLegend`). 미제출은 「집중도 산정」
   카드에서만 보여준다. */
.rt-gaze-panel--light .rt-gz-curve-legend-host { display: contents; }
.rt-gaze-panel--light .rt-gz-curve-legend {
  /* ★[자리 정정 2026-09-21]★ 종전엔 `flex: 1 0 100%` 로 «자기 혼자 한 줄»을
     차지해, 범례(반 평균·못 재 구간)과 오른쪽 요약(집중 최고/최저) «사이»에 끼어 들어
     주황 알약만 덩그러니 뜨는 줄이 생겼다. 이 행의 설계는 «왼쪽 범례 · 오른쪽 요약 한 줄»이고
     (요약은 order:6 + margin-left:auto 로 이미 맨 뒤·오른쪽이 보장된다), 「다른 화면」도
     곱선을 설명하는 **범례 항목**이라 같은 줄의 범례 옆이 제자리다. 폭 강제만 뻐다 —
     좁아지면 flex-wrap 이 알아서 다음 줄로 넘긴다. */
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
/* [스와치 2026-09-21] 「다른 화면」은 이제 «곡선에 깔린 음영의 열쇠»다 — 경고 알약이 아니라
   옆의 반 평균·못 잰 구간과 같은 문법(스와치 + 회색 글자)으로 둔다. 스와치는 캔버스가 그리는
   그 음영과 «같은 모양»이어야 한다: 옅은 --danger 바탕 + 좌우 세로 경계.
   ★경계선이 핵심이다★ — 곡선의 «반 평균보다 아래» 면적도 같은 --danger 라, 색만으로는
   이탈 구간의 끝을 못 짚는다(이탈 구간이 그 칠의 부분집합이라서다). 지우지 말 것. */
.rt-gaze-panel--light .rt-gz-lg-away {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); color: var(--gz-text-muted); white-space: nowrap;
}
.rt-gaze-panel--light .rt-gz-lg-away i {
  display: inline-block; width: 15px; height: 10px; border-radius: 2px;   /* [design-ok] 바로 위 .lg-band·.lg-gap 스와치와 «똑같이» 보여야 한다 — 10px 높이에 4px 는 알약처럼 둥글어진다 */
  /* 캔버스의 globalAlpha 0.16 과 «같은 농도·같은 토큰». ★리터럴 rgba 를 쓰지 않는다★
     [2026-09-21 리뷰] 고대비 모드는 `--danger` 자체를 더 진한 빨강으로 재정의한다(css/common.css)
     캔버스 칠과 아래 테두리는 토큰을 따라가고 바탕만 옛 빨강으로 남으면, 범례와 그것이
     설명하는 음영이 «서로 다른 빨강»이 된다. `.lg-band` 는 캔버스 쪽도 리터럴이라 사정이 다르다. */
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  border-left: 1.5px solid var(--danger);
  border-right: 1.5px solid var(--danger);
}
@supports not (color: color-mix(in srgb, red 10%, blue)) {
  /* 같은 관용구가 이 파일 .rt-gz-eng-chip 에 있다 — 폴백에서는 «테두리만»으로 읽히게 둔다. */
  .rt-gaze-panel--light .rt-gz-lg-away i { background: transparent; }
}

/* [유튜브식 재생바 2026-08-04] 이모지 탭 재생바(css/video-reaction-timeline.css:166-179)와 같은 언어로.
   ★보이는 두께 6px + 누르는 영역 16px — 종전 4px 는 특수학생 대상 제품에서 그 자체로 결함이다
   (같은 판단이 이모지 탭 주석에 이미 적혀 있다). 트랙은 브라우저별 pseudo-element 로 그리고
   요소 자신(height:16px)은 히트 영역. 색은 --danger 토큰 — 고대비 모드가 자동으로 따라온다. */
.rt-gaze-pb-time-slider #rtGazeTimeWithin {
  -webkit-appearance: none; appearance: none;
  background: transparent;               /* 실제 트랙은 ::-webkit-slider-runnable-track / ::-moz-range-track */
  height: 16px;                          /* 누르는 영역 */
  cursor: pointer;
  outline: none;                         /* 포커스 표시는 아래 :focus-visible 하나로만 — 브라우저 기본 링과 중복 방지 */
}
.rt-gaze-pb-time-slider #rtGazeTimeWithin::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(to right,
    var(--danger) 0%, var(--danger) var(--val, 0%),
    rgba(15, 23, 42, .18) var(--val, 0%), rgba(15, 23, 42, .18) 100%);
}
.rt-gaze-pb-time-slider #rtGazeTimeWithin::-moz-range-track {
  height: 6px; border-radius: 999px; background: rgba(15, 23, 42, .18);
}
.rt-gaze-pb-time-slider #rtGazeTimeWithin::-moz-range-progress {
  height: 6px; border-radius: 999px; background: var(--danger);
}
.rt-gaze-pb-time-slider #rtGazeTimeWithin::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--danger); border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
  margin-top: -3px;                      /* (12 - 6) / 2 — 6px 트랙 중앙에 물린다 */
}
.rt-gaze-pb-time-slider #rtGazeTimeWithin::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--danger); border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .28);
}
.rt-gaze-pb-time-slider #rtGazeTimeWithin:focus-visible {
  /* [리뷰 반영 2026-08-04·I2] 리터럴 #1d4ed8 → 토큰. 같은 값이 `--primary-dark`(common.css:18)로
     이미 있고, 그 토큰은 body[data-contrast="high"] 에서 #0c2a6e 로 **재정의**된다(common.css:233).
     리터럴로 박아두면 고대비 모드가 이 재생바 포커스 링만 못 강화한다 — 이번 작업으로 이 슬라이더가
     주 조작 대상이 됐으니 더더욱 안 된다. 평상시 색은 완전히 동일하다(같은 hex). */
  outline: 2px solid var(--primary-dark); outline-offset: 2px;
}

/* ━━━ [영상 시선 데모 2026-07-23] ▶ 재생 버튼 · 재생 시각 · 시점별 시선비율 곡선 ━━━ */
/* [유튜브식 재생바 2026-08-04] ▶ 재생 버튼 — 조작계는 빨강으로 통일(곡선·마커·진행선은 데이터 색이라 그대로 둔다) */
/* [아이콘 전용 2026-08-05] 「▶ 재생」 글자를 빼고 세모만 남긴다(사용자 지시).
   ★크기를 함께 키우는 이유 — 글자를 빼면 padding 5px/12px 로는 약 22px 짜리 표적이 되어
     WCAG 2.5.8 최소 24×24 아래로 떨어진다. 특수학생 대상 제품이라 그대로 두면 안 된다.
     같은 판단이 이 재생바 트랙에도 이미 적용돼 있다(보이는 6px / 누르는 16px).
   → 32×32 원형으로 고정하고 글리프는 flex 로 정중앙에. 이름은 aria-label 이 진다(글자가 없으므로). */
.rt-gaze-play-btn {
  flex: 0 0 auto;
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; line-height: 1;
  background: var(--danger); border: none; border-radius: 50%;
  cursor: pointer; white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18); transition: filter .12s, background .12s;
}
/* ▶ 는 글리프 자체가 왼쪽으로 치우쳐 보인다 — 광학 중심을 맞춘다(⏸ 는 대칭이라 보정 없음). */
.rt-gaze-play-btn:not(.playing) { text-indent: 1px; }
.rt-gaze-play-btn:hover { filter: brightness(1.06); }
.rt-gaze-play-btn.playing { background: var(--danger-dark); }
.rt-gaze-pb-within-clock {
  flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--gz-text-muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ━━━ [회차 134] 5차 피드백 — 우측 패널 압축 (hasData=false 일 때) + 헤더 status dot ━━━ */
.rt-gaze-panel--light .rt-gaze-side[data-empty="true"] { gap: 10px; }


.rt-gaze-panel--light .rt-gaze-aoi-skeleton-note { padding: 8px 10px; font-size: 11px; }
.rt-gaze-panel--light .rt-gaze-status-dot {
  display: inline-block; width: 8px; height: 8px;
  background: #10b981; border-radius: 50%;
  margin-right: 4px; vertical-align: middle;
}

/* ── [회차 160] 회의 #7 — 슬라이드별 시선 모니터링 룰 라디오 ──
   3택 pill: monitor_on(기본·시선 측정) / monitor_off(분산도) / ignore(제외).
   체크된 항목만 컬러 강조, 나머지는 라이트 보더. label 자체가 클릭 영역. */
.gaze-rule-group { margin-bottom: 12px; }
.gaze-rule-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fafbfc; cursor: pointer;
  font-size: 13px; color: var(--text-muted);
  transition: background .14s, border-color .14s, color .14s;
  user-select: none;
}
.gaze-rule-pill input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.gaze-rule-pill:hover { border-color: #c7d2fe; background: #f5f7ff; }
.gaze-rule-pill.on {
  background: #eef2ff; border-color: #6366f1; color: #4338ca;
  font-weight: 600;
}

/* ── [E-1 · 통합 2026-07-31] 데이터 수집 — 단일 on/off pill(옛 모니터/대화/영상 3토글 대체). ── */
.collect-group { margin-bottom: 12px; }
.collect-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fafbfc; cursor: pointer;
  font-size: 13px; color: var(--text-muted);
  transition: background .14s, border-color .14s, color .14s;
  user-select: none;
}
.collect-toggle input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.collect-toggle:hover { border-color: #c7d2fe; background: #f5f7ff; }
.collect-toggle.on { background: #eef2ff; border-color: #6366f1; color: #4338ca; font-weight: 600; }

/* ── [회차 162] 회의 #3 — 패널 편집 탭 (활동 단위) ─────────────── */
.panels-content { padding: 16px 18px 60px; max-width: 920px; margin: 0 auto; }

.panels-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* ===== [활동 편집 모달 2026-07-08] 패널 요약 + 3-column 모달 ===== */
.panels-sum { display: flex; flex-direction: column; gap: 8px; }
/* [2026-09-15] 행이 <div> 에서 <button> 이 됐다 — 눌러서 그 활동을 편집한다.
   button 기본값(가운데 정렬·글꼴 상속 안 함·전체 폭 아님)을 지워 «보이는 모습»은 그대로 둔다. */
.panels-sum-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: #fff;
  width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.panels-sum-row:hover { border-color: var(--primary); box-shadow: 0 1px 6px rgba(37,99,235,.14); }
.panels-sum-row:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.panels-sum-no { font-weight: 700; color: var(--primary); font-size: 13px; flex: 0 0 auto; }
.panels-sum-t { flex: 1; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panels-sum-rg { font-size: 12px; color: var(--text-muted); flex: 0 0 auto; }
.panels-sum-empty { padding: 22px; text-align: center; color: var(--text-muted); }

/* ★테두리와 그 빛이 «같은 토큰»을 따라간다★ (2026-10-03 · F-20260927-18-1 리뷰 F10)
   종전엔 테두리는 var(--danger) 인데 빛은 rgba(220,38,38,.12) = 옛 빨강 리터럴이라,
   토큰이 한 단계 진해진 뒤 둘이 갈라졌고 **고대비에서는 빛만 옅은 옛 빨강으로 남았다** —
   이 묶음이 걷어내려던 바로 그 결함이다. 알파는 `color-mix` 로 토큰에서 만든다
   (같은 파일 2016·7884·7917 줄이 이미 쓰는 방식 — 새 패턴을 짓지 않았다). */
.am-f .form-control.is-error { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 12%, transparent); }

.am-overlay { display: flex; align-items: center; justify-content: center; z-index: 10000; }
.am-modal { background: #fff; width: min(1100px, 95vw); height: 82vh; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.am-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.am-head h2 { font-size: 17px; font-weight: 800; margin: 0; }
.am-close { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--text-muted); }
.am-body { flex: 1; display: flex; min-height: 0; }
.am-col { overflow-y: auto; padding: 12px; }
.am-col-list { flex: 0 0 20%; border-right: 1px solid var(--border); }
.am-col-editor { flex: 0 0 60%; }
.am-col-rail { flex: 0 0 20%; border-left: 1px solid var(--border); }
.am-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--border); }
.am-foot-msg { flex: 1; font-size: 12px; color: var(--text-muted); }

.am-actcard { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; margin-bottom: 8px; background: #fff; cursor: pointer; }
.am-actcard.on { border-color: var(--primary); background: #eff6ff; }
.am-actno { font-size: 11.5px; font-weight: 700; color: var(--primary); }
.am-acttitle { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-actrg { font-size: 11px; color: var(--text-muted); }
.am-addact { width: 100%; padding: 9px; border: 1px dashed #94a3b8; border-radius: 9px; background: #f8fafc; color: #475569; font-weight: 600; cursor: pointer; }

.am-empty { color: var(--text-muted); padding: 30px 8px; text-align: center; }
.am-f { display: block; margin-bottom: 14px; }
.am-flab { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.am-note { font-size: 12px; color: var(--text-muted); line-height: 1.6; word-break: keep-all;
           margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.am-note b { color: var(--text); font-weight: 600; }
.btn-xs { padding: 3px 10px; font-size: 12px; }

.am-rail-h { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; display: flex; justify-content: space-between; }
.am-slide { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 6px; padding: 6px 7px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; }
.am-slide.in { background: #eff6ff; border-color: #bfdbfe; }
.am-slide-no { font-weight: 700; color: var(--text-muted); }
.am-slide-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-slide-media { font-size: 12px; white-space: nowrap; }
.am-slide-set { grid-column: 1 / -1; display: flex; gap: 5px; margin-top: 3px; }
.am-slide-set button { flex: 1; font-size: 11px; padding: 2px 0; border: 1px solid var(--border); border-radius: 6px; background: #fff; cursor: pointer; }
.am-rail-empty { color: var(--text-muted); font-size: 12px; padding: 16px 4px; }
@media (max-width: 820px) { .am-body { flex-direction: column; } .am-col-list, .am-col-editor, .am-col-rail { flex: none; width: 100%; border: 0; border-bottom: 1px solid var(--border); } }
.panels-head-title { font-size: 17px; font-weight: 700; color: var(--text); }
.panels-head-sub   { font-weight: 400; color: var(--text-muted); font-size: 13px; }
.panels-head-meta  { font-size: 12px; color: var(--text-muted); }

/* [F169] 학생활동 저장 바 — 미저장 배지 + 저장 버튼 */
.panels-head-actions { display: flex; align-items: center; gap: 10px; }
.panels-save-btn {
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  background: #f3f4f6; border: 1.5px solid var(--border);
  padding: 6px 16px; border-radius: 999px; cursor: pointer;
  transition: background .14s, border-color .14s, color .14s; white-space: nowrap;
}
.panels-save-btn:disabled { opacity: .55; cursor: default; }

.panels-loading,
.panels-error {
  padding: 36px 20px; text-align: center; font-size: 13px;
  color: var(--text-muted);
}
.panels-error { color: var(--danger-dark); }

.panels-locked {
  text-align: center; padding: 60px 24px; color: var(--text-muted);
}
.panels-locked-ico   { font-size: 36px; margin-bottom: 10px; }
.panels-locked-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.panels-locked-desc  { font-size: 13px; }

/* [DECISIONS D-20260707-3=B · 2026-07-11] 라이브 중 활동만 편집 허용 안내 배너.
   슬라이드 본문(문제관리 탭)은 계속 잠금, 이 탭에서 활동 CRUD 만 열어줌을 명시. */
.panels-live-note {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 10px;
  font-size: 13px; line-height: 1.55; color: var(--text);
  background: var(--warn-bg, #fff7ed);
  border: 1px solid var(--warn-border, #fed7aa);
}

/* ── [U-AN1] 수업 분석 임베드 모드 ──────────────────────────────
   강의 상세 "수업 분석" 탭이 detail.html?analyticsOnly=1 을 iframe 으로 임베드.
   편집 UI(헤더/탐색/Hero/탭바/사이드바)는 숨기고 결과분석 패널만 노출. */
body.analytics-only #detailBootOverlay,
body.analytics-only .header,
body.analytics-only .nav-row,
body.analytics-only .detail-hero,
body.analytics-only #lockedBanner,
body.analytics-only .tab-nav,
body.analytics-only .quiz-sidebar,
body.analytics-only .detail-sidebar {
  display: none !important;
}
body.analytics-only .detail-container {
  display: block;
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 12px 14px 24px;
  box-sizing: border-box;
}
/* [F85-1] 시선 인식 분석 레이아웃 정상화 — iframe 임베드 모드에서 내부 고정폭(side-nav 240px /
   analytics-body 220px)·max-width 컨테이너가 좁은 iframe 폭을 넘겨 가로로 깨지던 문제.
   임베드 컨테이너 폭을 콘텐츠(iframe 폭)에 묶고, flex/grid 자식의 min-width:0 으로 유동 축소 허용. */
body.analytics-only .an-main,
body.analytics-only .analytics-body { max-width: 100%; min-width: 0; }
body.analytics-only .an-main { box-sizing: border-box; }
/* [F74] 편집 탭 패널 전부 숨김 — #tab-questions 는 정적 HTML 에 active 가 박혀 있어
   analyticsOnly 모드에서도 살아남아 '슬라이드 목록/＋슬라이드 추가/에디터'가 결과분석 위에
   노출되던 회귀(사용자 5회 지적). 분석 패널만 남기고 나머지 tab-panel 은 강제 숨김. */
body.analytics-only .tab-panel {
  display: none !important;
}
body.analytics-only #tab-analytics {
  display: block !important;
}
/* 임베드라 본문이 곧 분석 패널 — 가로 스크롤 방지 [F85-1] overflow-x 클램프 실제 적용 */
html.analytics-only, body.analytics-only {
  background: var(--bg);
  max-width: 100%;
  overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════
   [SV-2] 설문(Survey) — 모드 토글·배지 + 척도(scale) 위젯
   ═══════════════════════════════════════════════════ */

/* 편집기 상단 설문 배너 */
