#workspace .teachingWorkspace { flex:1 1 0; min-height:0; min-width:0; display:flex; overflow:hidden; }
#workspace .teachingWorkspace #viewer { min-width:0; min-height:0; flex:1 1 0; }
#workspace #teachingMediaPanel { flex:0 0 clamp(360px,32%,420px); min-width:0; box-sizing:border-box; padding:12px; background:#fffdf7; border-left:1px solid #d5dfcf; overflow:auto; }
#workspace #teachingMediaPanel[hidden] { display:none; }
#workspace .teachingMediaHeader { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
#workspace .teachingMediaHeader button { padding:6px 10px; min-height:40px; border:1px solid #bdcbbc; border-radius:8px; color:#31553b; background:white; cursor:pointer; }
#workspace #teachingMediaPanel select { width:100%; min-width:0; min-height:40px; box-sizing:border-box; font:inherit; font-size:14px; padding:6px; margin-bottom:10px; border-radius:8px; border:1px solid #bdcbbc; }
#workspace .teachingMediaPlayer audio,#workspace .teachingMediaPlayer video { display:block; width:100%; max-height:48vh; }
#workspace .teachingMediaPlayer video { background:#192a22; border-radius:8px; }
/* Drive's embedded player uses at least 320 × 300 CSS pixels internally.
   Keep the whole control bar inside the iframe, including at browser zoom. */
#workspace .teachingDrivePreview { display:block; width:100%; min-width:320px; height:320px; min-height:320px; border:0; background:#202124; border-radius:8px; }
#workspace .teachingMediaFallback { display:block; margin-top:10px; min-height:36px; padding:6px 10px; border:1px solid #bdcbbc; border-radius:8px; color:#31553b; background:white; font:inherit; font-size:13px; cursor:pointer; }
#workspace .teachingMediaFallback[hidden] { display:none; }
#workspace .teachingMediaStatus { font-size:13px; line-height:1.4; }
#workspace .teachingMediaStatus:empty { display:none; }
#workspace #teachingMediaPanel > a { display:inline-block; margin-top:10px; font-size:13px; color:#31553b; }
#workspace .teachingWorkspace.onlyTeaching #viewer { display:none; }
#workspace .teachingWorkspace.onlyTeaching #teachingMediaPanel { flex:1 1 auto; border-left:0; }
#workspace .onlyTeaching .teachingMediaPlayer { max-width:780px; margin:auto; }
@container task-workspace (max-width:739px) {
  #workspace .teachingWorkspace { flex-direction:column; }
  #workspace #teachingMediaPanel { flex:0 1 auto; max-height:60%; border-left:0; border-top:1px solid #d5dfcf; padding:8px; }
  #workspace .teachingMediaPlayer video { max-height:min(18vh,120px); }
  #workspace .teachingMediaHeader { margin-bottom:5px; }
  #workspace #teachingMediaPanel > a { margin-top:5px; }
  #workspace .teachingWorkspace.onlyTeaching #teachingMediaPanel { max-height:100%; }
  #workspace .onlyTeaching .teachingMediaPlayer video { max-height:48vh; }
}
