/* Topic slide library and stable teaching previews. */
.presentation-library-layout { display:grid; grid-template-columns:minmax(280px,.8fr) minmax(0,1.6fr); align-items:start; gap:20px; }
.presentation-upload,.presentation-library { min-width:0; padding:22px; }
.presentation-upload h2 { margin:0 0 18px; font-size:21px; }
.presentation-field { display:flex; flex-direction:column; gap:7px; margin-bottom:14px; color:var(--text,#202734); font-size:13px; font-weight:650; }
.presentation-field input,.presentation-field select { width:100%; min-width:0; min-height:42px; padding:10px 12px; border:1px solid #d6dce4; border-radius:9px; background:#fff; color:#202734; font:inherit; }
.presentation-file-picker { display:flex; flex-direction:column; gap:12px; padding:18px; background:#f5f7fa; border:1px dashed #bcc8d6; border-radius:12px; font-size:14px; font-weight:650; }
.presentation-file-picker input { max-width:100%; font:inherit; font-size:12px; }
.presentation-file-picker small,.presentation-hint { color:#687586; font-size:12px; line-height:1.5; font-weight:400; }
.presentation-upload-order { max-height:280px; overflow:auto; overscroll-behavior:contain; margin:14px 0; padding:0; list-style:none; }
.presentation-upload-order li { display:grid; grid-template-columns:44px minmax(0,1fr) 30px 30px; align-items:center; gap:7px; min-height:50px; padding:4px; border-bottom:1px solid #e4e8ee; }
.presentation-upload-order img { width:44px; height:36px; object-fit:contain; background:#fff; }
.presentation-upload-order span { overflow-wrap:anywhere; font-size:12px; }
.presentation-upload-order button { height:30px; border:1px solid #ccd4de; border-radius:6px; background:white; }
.presentation-upload > .button { width:100%; }
.presentation-status { min-height:36px; margin:10px 0 0; color:#647184; font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.presentation-status.is-error { color:#b42332; }
.presentation-deck-list { display:grid; gap:12px; }
.presentation-deck-card { display:grid; grid-template-columns:128px minmax(0,1fr); gap:14px; padding:15px; border:1px solid #e1e6ed; border-radius:12px; background:#fff; }
.presentation-deck-card > img { width:128px; height:100px; object-fit:contain; background:#f6f7f9; border-radius:6px; }
.presentation-deck-card h3 { margin:0 0 6px; font-size:16px; overflow-wrap:anywhere; }
.presentation-deck-card p { margin:0 0 13px; color:#718094; font-size:12px; }
.presentation-card-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.presentation-delete { border:0; background:none; color:#b33d48; font:inherit; font-size:12px; }
.presentation-empty { padding:24px 12px; color:#718094; text-align:center; font-size:13px; line-height:1.6; }
.presentation-pane:not([hidden]) { display:flex; flex-direction:column; min-height:0; padding:12px; gap:8px; }
.live-layout.quiz-stage-visible .communication-panel { height:620px; }
.presentation-pane:not([hidden]) { height:100%; overflow:hidden; }
.presentation-pane .presentation-field { margin:0; font-size:11px; }
.presentation-pane .presentation-field select { min-height:38px; padding:8px; font-size:12px; }
.presentation-slide-list { display:grid; align-content:start; min-height:0; overflow:auto; overscroll-behavior:contain; overflow-anchor:none; gap:7px; flex:1; padding:3px; }
.presentation-slide-card { display:grid; grid-template-columns:96px minmax(0,1fr); min-width:0; align-items:center; gap:12px; height:78px; padding:7px; text-align:left; color:#273244; background:#fff; border:1px solid #dbe1e9; border-radius:10px; font:inherit; font-size:13px; font-weight:650; }
.presentation-slide-card img { width:96px; height:60px; object-fit:contain; background:#f7f8fa; }
.presentation-slide-card.active { border-color:var(--brand,#df2929); box-shadow:inset 0 0 0 1px var(--brand,#df2929); background:var(--brand-soft,#fff6f6); }
.presentation-slide-card:focus-visible { outline:3px solid #75b9f2; outline-offset:0; }
.presentation-teacher-stage:not([hidden]) { display:grid; height:100%; min-height:0; grid-template-rows:44px minmax(0,1fr) 50px 44px; gap:8px; overflow:hidden; }
.presentation-teacher-stage > header { display:flex; align-items:center; justify-content:space-between; gap:10px; min-width:0; }
.presentation-teacher-stage > header > div { min-width:0; }
.presentation-teacher-stage strong { display:block; font-size:15px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.presentation-teacher-stage small { display:block; color:#728095; font-size:11px; margin-top:3px; }
.presentation-teacher-stage > header .button { min-height:34px; padding:8px 12px; font-size:11px; }
.presentation-canvas { min-height:0; display:grid; place-items:center; overflow:hidden; border-radius:12px; background:#fff; border:1px solid #e1e6ed; }
.presentation-canvas img { display:block; width:100%; height:100%; min-height:0; object-fit:contain; }
.presentation-canvas p { padding:24px; text-align:center; color:#7e8b9d; font-size:15px; }
.presentation-teacher-stage > footer { display:grid; grid-template-columns:48px minmax(0,1fr) 48px; gap:10px; }
.presentation-teacher-stage > footer .button { min-width:0; }
.presentation-teacher-stage #showPresentationSlide.is-presenting { color:#647184; background:#e9edf2; border-color:#d6dde5; box-shadow:none; opacity:1; }
.presentation-teacher-stage #stopPresentation.is-presenting { color:#fff; background:var(--brand,#df2929); border-color:var(--brand,#df2929); }
.presentation-teacher-stage > .presentation-status { margin:0; overflow:auto; }
.teaching-empty-preview { grid-column:1/-1; grid-row:2; display:grid; place-items:center; min-height:0; padding:25px; background:#f5f7fa; border:1px dashed #d4dce7; border-radius:12px; color:#77869a; text-align:center; font-size:15px; }
.teaching-empty-preview[hidden] { display:none; }
.quiz-question-list { overflow-anchor:none; }
.quiz-question-card { transition:background-color .15s,border-color .15s; }
.communication-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); }
.communication-tabs button { min-width:0; padding-inline:5px; }
.communication-tabs button > .icon { flex-shrink:0; }
.main-nav { min-width:0; overflow-x:auto; }
.recording-control.is-recording { color:#526174; background:#fff; }
.recording-control.is-recording > span { color:#526174; background:#eef1f5; box-shadow:none; animation:none; }
#recordingTimer { display:none !important; }

/* All preview selections reuse the same sized slot, including no-image questions. */
.live-layout.quiz-stage-visible .live-stage-column { overflow-anchor:none; }
.live-layout.quiz-stage-visible .quiz-stage-visual:not(.has-image) { display:block; }
.live-layout.quiz-stage-visible .quiz-presentation-stage:not([hidden]) { overflow:hidden; }
@media (max-width:900px) {
  .presentation-library-layout { grid-template-columns:minmax(0,1fr); }
  .presentation-upload,.presentation-library { padding:16px; }
  .presentation-deck-card { grid-template-columns:92px minmax(0,1fr); padding:12px; }
  .presentation-deck-card > img { width:92px; height:85px; }
  .live-layout.quiz-stage-visible .live-stage-column { position:relative; display:block; height:410px; min-height:410px; }
  .live-layout.quiz-stage-visible .quiz-presentation-stage:not([hidden]) { display:grid; height:100%; grid-template-rows:40px minmax(0,1fr); gap:8px; }
  .live-layout.quiz-stage-visible .quiz-presentation-toolbar { grid-column:auto; grid-row:auto; }
  .live-layout.quiz-stage-visible .quiz-preview:not([hidden]),.live-layout.quiz-stage-visible .quiz-round:not([hidden]) { display:grid; height:100%; min-height:0; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr); gap:8px; }
  .live-layout.quiz-stage-visible .quiz-stage-visual { grid-column:1; grid-row:1; width:100%; height:100%; max-height:none; aspect-ratio:auto; }
  .live-layout.quiz-stage-visible .quiz-stage-copy { grid-column:2; grid-row:1; width:100%; height:100%; min-height:0; overflow:auto; }
  .live-layout.quiz-stage-visible .video-stage { position:absolute; top:56px; left:10px; width:90px; height:55px; z-index:15; }
  .live-layout.quiz-stage-visible .communication-panel { min-height:420px; height:420px; }
  .presentation-pane { height:100%; }
}

/* Student slides share the question panel's position on desktop and phones. */
.live-slides { grid-template-rows:auto minmax(0,1fr) !important; }
.live-slides .quiz-header > div { flex:1; min-width:0; width:auto; }
.live-slides .quiz-kicker { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.live-slides .quiz-image-expand { position:static; margin:0; flex-shrink:0; box-shadow:none; }
.live-quiz.live-slides .quiz-header .quiz-image-expand { display:block; }
.student-slide-scroll { min-height:0; min-width:0; overflow:auto; overscroll-behavior:contain; overflow-anchor:none; background:#fff; }
.student-slide-scroll > img { display:block; width:100%; height:auto; max-height:none; object-fit:contain; }
.student-slide-scroll > p { margin:20px; color:#724a41; font-size:14px; }
.desktop-slide-switch { flex-shrink:0; min-height:30px; border:1px solid #cad0d9; border-radius:8px; padding:5px 8px; background:#fff; color:#283545; font:inherit; font-size:12px; }
.desktop-slide-switch[hidden] { display:none; }
.live-view.is-compact-layout .live-slides { grid-row:2; }
.is-compact-layout .workspace-tabs button { font-size:12px; }
.is-compact-layout .workspace-tabs { gap:2px; padding-inline:3px; }
.is-compact-layout .live-slides .quiz-header { padding:2px 8px; }
.is-compact-layout .live-slides .quiz-header > div { align-items:flex-start; flex-direction:column; gap:0; }
.is-compact-layout .live-slides .quiz-image-expand { margin:0; min-height:30px; }
.live-slides[hidden],.live-slides.is-hidden,.presentation-teacher-stage[hidden],.presentation-canvas img[hidden],.presentation-canvas p[hidden] { display:none !important; }
