/* Единый виртуальный класс: лобби + Daily Prebuilt + доска WBO + материалы */

:root {
  --vr-accent: #6366F1;
  --vr-soft: #EEF2FF;
  --vr-muted: #9CA3AF;
  --vr-border: #E5E7EB;
  --vr-green: #10B981;
  --vr-red: #EF4444;
  --vr-chrome: #111827;
  --vr-chrome-h: 48px;
  --vr-frame-bg: #f5f3ed;
  --vr-frame-shell: #fff;
  --vr-frame-pad: 8px;
  --vr-frame-footer-h: 8px;
  --vr-frame-radius: 16px;
  --vr-toolbar-slot: 76px;
  --vr-shadow-card: 0 1px 2px rgba(20, 16, 10, 0.04), 0 4px 10px rgba(20, 16, 10, 0.03);
  /* Daily Prebuilt: панель камеры/микрофона ~400px; 300px её обрезает */
  --vr-daily-w: 420px;
  --vr-rail-w: 36px;
  --vr-daily-compact-w: 168px;
  --vr-daily-compact-h: 140px;
  --vr-video-col-w: calc(var(--vr-rail-w) + var(--vr-daily-w));
  --vr-dock-space: 92px;
}

.vr-shell,
.vr-shell *,
.vr-classroom,
.vr-classroom * {
  box-sizing: border-box;
}

/* ——— Лобби ——— */
.vr-shell {
  min-height: 100vh;
  background: #F5F3EE;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
}

.vr-shell.is-hidden {
  display: none;
}

.vr-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

.vr-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.vr-subtitle { color: var(--vr-muted); font-size: 14px; margin: 0 0 24px; }

.vr-section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--vr-muted);
  letter-spacing: .05em;
  margin: 0 0 8px;
}

.vr-device-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--vr-border);
  font-size: 14px;
}
.vr-device-row:last-child { border-bottom: none; }

.vr-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--vr-muted);
}
.vr-status-dot.ok  { background: var(--vr-green); }
.vr-status-dot.err { background: var(--vr-red); }

.vr-device-name { flex: 1; }
.vr-device-hint { font-size: 12px; color: var(--vr-muted); }

.vr-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
}
.vr-check-row input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--vr-accent);
}

.vr-materials {
  padding: 10px 14px;
  background: var(--vr-soft);
  border-radius: 8px;
  font-size: 14px;
}
.vr-materials a { color: var(--vr-accent); font-weight: 600; }

.vr-enter-btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  background: var(--vr-accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity .15s;
}
.vr-enter-btn:disabled { opacity: .5; cursor: not-allowed; }
.vr-enter-btn:not(:disabled):hover { opacity: .87; }

.vr-no-room {
  padding: 14px;
  background: #FEF3C7;
  border-radius: 8px;
  font-size: 14px;
  color: #92400E;
  text-align: center;
  margin-top: 24px;
}

.vr-divider {
  margin: 20px 0;
  border: none;
  border-top: 1px solid var(--vr-border);
}

.vr-hint {
  font-size: 12px;
  color: var(--vr-muted);
  text-align: center;
  margin-top: 8px;
}

.vr-copy-join {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #C7D2FE;
  background: var(--vr-soft);
  color: #3730A3;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
}
.vr-copy-join:hover { background: #E0E7FF; }
.vr-enter-btn + .vr-hint + .vr-copy-join,
.vr-enter-btn + .vr-copy-join,
.vr-no-room + .vr-copy-join,
form + .vr-copy-join { margin-top: 10px; }

.vr-join-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #1A1A1A;
  color: #fff;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
}
.vr-join-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.vr-rec-btn {
  margin-top: 12px;
  width: 100%;
  background: var(--vr-red);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.vr-rec-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
}

/* ——— Classroom shell ——— */
.vr-classroom {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: var(--vr-frame-bg);
  flex-direction: column;
  color: #111827;
  
}

.vr-classroom.is-live {
  display: flex;
}

.vr-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--vr-frame-shell);
  box-shadow: var(--vr-shadow-card);
  overflow: hidden;
}

.vr-frame-footer {
  flex: 0 0 var(--vr-frame-footer-h);
  height: var(--vr-frame-footer-h);
  background: var(--vr-frame-shell);
}

/* display:flex/block на панелях перебивает UA-правило [hidden] { display:none } */
.vr-classroom [hidden] {
  display: none !important;
}

body.vr-class-live {
  overflow: hidden;
  padding-bottom: 0 !important;
}

body.vr-class-live .lms-tabbar {
  display: none !important;
}

.vr-chrome {
  flex: 0 0 var(--vr-chrome-h);
  height: var(--vr-chrome-h);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 36px;
  background: var(--vr-frame-shell);
  color: #111827;
}

.vr-chrome__title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
  margin-right: auto;
  color: #1a1a1a;
}

.vr-chrome__rec {
  appearance: none;
  border: none;
  background: var(--vr-red);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.vr-chrome__rec:disabled {
  opacity: .75;
  cursor: not-allowed;
}

.vr-chrome__leave {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  margin-left: 12px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.vr-chrome__leave:hover {
  background: rgba(0, 0, 0, 0.04);
}

.vr-chrome__tool {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: transparent;
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.2;
}
.vr-chrome__tool:hover {
  background: rgba(0, 0, 0, 0.04);
}
.vr-chrome__tool.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}
.vr-chrome__tool--glyph {
  min-width: 34px;
  padding: 7px 10px;
  font-size: 16px;
  font-weight: 700;
}
.vr-chrome__tool--presence {
  position: relative;
  overflow: visible;
}
.vr-chrome__tool-icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  opacity: 0.92;
}
.vr-chrome__tool-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.14);
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

/* Stage: content (board/materials) left + Daily right */
.vr-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr var(--vr-video-col-w);
  grid-template-rows: 1fr;
}

.vr-content {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--vr-frame-shell);
}

.vr-board-surface {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.vr-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  background: #000;
  overflow: hidden;
}

.vr-panel--board,
.vr-panel--materials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* WBO SVG canvas is transparent — panel bg becomes the board surface */
  background: #fff;
  display: none;
}

.vr-panel--video {
  background: var(--vr-frame-shell);

  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.vr-video-rail {
  display: none;
  flex: 0 0 var(--vr-rail-w);
  width: var(--vr-rail-w);
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  padding: 8px 0;
  background: var(--vr-frame-shell);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 26;
}

.vr-video-rail__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 36px;
  padding: 0;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.vr-video-rail__btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #111827;
}
.vr-video-rail__btn.is-active {
  background: #eef2ff;
  color: #111827;
}
.vr-video-rail__btn:focus-visible {
  outline: 2px solid var(--vr-accent);
  outline-offset: -2px;
}

.vr-video-col {
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.vr-video-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  position: relative;
  height: 100%;
  overflow: hidden;
}

.vr-video-dock {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}
.vr-video-dock[hidden] {
  display: none !important;
}
.vr-video-dock__join {
  appearance: none;
  border: 0;
  background: #fff;
  color: #111827;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
}
.vr-video-dock__join:hover {
  background: #F3F4F6;
}
.vr-video-dock__join:disabled {
  cursor: wait;
}
.vr-video-dock__media {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.vr-video-dock__media[hidden] {
  display: none !important;
}
.vr-video-dock__ctrl {
  appearance: none;
  border: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.vr-video-dock__ctrl:hover {
  background: #1F2937;
}
.vr-video-dock__ctrl.is-off {
  background: #EF4444;
}
.vr-video-dock__ctrl.is-off:hover {
  background: #DC2626;
}
.vr-video-dock__icon--off {
  display: none;
}
.vr-video-dock__ctrl.is-off .vr-video-dock__icon--on {
  display: none;
}
.vr-video-dock__ctrl.is-off .vr-video-dock__icon--off {
  display: block;
}

.vr-classroom.video-layout-hidden {
  --vr-video-col-w: var(--vr-rail-w);
}
.vr-classroom.video-layout-compact {
  --vr-video-col-w: 0px;
}
.vr-classroom.video-layout-full {
  --vr-video-col-w: calc(var(--vr-rail-w) + var(--vr-daily-w));
}

.vr-classroom.video-layout-hidden .vr-video-col {
  display: none;
}

@media (min-width: 900px) {
  .vr-classroom.video-layout-compact.is-live:not(.content-video):not(.is-board-fs) .vr-panel--video {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 30;
    width: auto;
    height: auto;
    gap: 10px;
    overflow: visible;
    background: transparent;
    border-left: none;
    align-items: flex-start;
  }

  .vr-classroom.video-layout-compact.is-live:not(.content-video):not(.is-board-fs) .vr-video-rail {
    flex: 0 0 var(--vr-rail-w);
    height: var(--vr-daily-compact-h);
    border-right: none;
    border-radius: 12px;
    overflow: hidden;
  }

  .vr-classroom.video-layout-compact.is-live:not(.content-video):not(.is-board-fs) .vr-video-col {
    flex: none;
    width: var(--vr-daily-compact-w);
    height: auto;
  }

  .vr-classroom.video-layout-compact.is-live:not(.content-video):not(.is-board-fs) .vr-video-body {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 0;
    width: 100%;
    height: var(--vr-daily-compact-h);
    flex: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    background: #000;
  }

  .vr-classroom.video-layout-compact.is-live:not(.content-video):not(.is-board-fs) .vr-video-dock:not([hidden]) {
    display: flex;
  }

  .vr-classroom.video-layout-compact.is-live:not(.content-video):not(.is-board-fs) .vr-video-idle {
    padding: 12px;
    gap: 8px;
  }

  .vr-classroom.video-layout-compact.is-live:not(.content-video):not(.is-board-fs) .vr-video-idle__btn {
    display: none;
  }
}

@media (min-width: 900px) {
  .vr-classroom.is-live:not(.content-video):not(.is-board-fs) .vr-video-rail:not([hidden]) {
    display: flex;
  }
}

/* Десктоп: линия между доской и видео — можно тянуть */
.vr-split {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 12px;
  margin-left: -6px;
  z-index: 25;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}
.vr-split::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 1px;
  transition: background .15s, width .15s, margin-left .15s, box-shadow .15s;
}
.vr-split::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 36px;
  margin: -18px 0 0 -2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.vr-split:hover::before,
.vr-split:focus-visible::before,
.vr-classroom.is-splitting .vr-split::before {
  width: 3px;
  margin-left: -1.5px;
  background: var(--vr-accent);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.35);
}
.vr-split:hover::after,
.vr-split:focus-visible::after,
.vr-classroom.is-splitting .vr-split::after {
  background: var(--vr-accent);
}
.vr-split:focus-visible {
  outline: none;
}
.vr-classroom.is-splitting {
  cursor: col-resize;
}
.vr-classroom.is-splitting iframe,
.vr-classroom.is-splitting #vr-video,
.vr-classroom.is-compact-resizing iframe,
.vr-classroom.is-compact-resizing #vr-video {
  pointer-events: none !important;
}

.vr-compact-resize {
  display: none;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  z-index: 40;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: nesw-resize;
  touch-action: none;
}
.vr-compact-resize::before,
.vr-compact-resize::after {
  content: '';
  position: absolute;
  left: 4px;
  bottom: 4px;
  border-left: 2px solid rgba(255, 255, 255, 0.72);
  border-bottom: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 0 0 0 1px;
  pointer-events: none;
}
.vr-compact-resize::before {
  width: 11px;
  height: 11px;
}
.vr-compact-resize::after {
  width: 6px;
  height: 6px;
  opacity: 0.7;
}
.vr-compact-resize:hover::before,
.vr-compact-resize:hover::after,
.vr-compact-resize:focus-visible::before,
.vr-compact-resize:focus-visible::after,
.vr-classroom.is-compact-resizing .vr-compact-resize::before,
.vr-classroom.is-compact-resizing .vr-compact-resize::after {
  border-color: var(--vr-accent);
}
.vr-compact-resize:focus-visible {
  outline: none;
}
.vr-classroom.is-compact-resizing {
  cursor: nesw-resize;
  user-select: none;
}

@media (min-width: 900px) {
  .vr-classroom.video-layout-compact.is-live:not(.content-video):not(.is-board-fs) .vr-compact-resize {
    display: block;
  }
}

@media (min-width: 900px) {
  .vr-classroom.is-live.video-layout-full:not(.content-video):not(.is-board-fs) .vr-split {
    display: block;
  }
  .vr-classroom.is-live:not(.content-video):not(.is-board-fs) .vr-panel--video {
    overflow: visible;
  }
}

.vr-video-idle {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: #0B0F19;
  text-align: center;
}
.vr-video-idle[hidden] {
  display: none !important;
}
.vr-video-idle__text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
  max-width: 220px;
}
.vr-video-idle__btn {
  appearance: none;
  border: none;
  background: #fff;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
}
.vr-video-idle__btn:hover {
  background: #f3f4f6;
}

#vr-board,
#vr-materials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

#vr-video {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#vr-video iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  overflow: hidden;
}

#vrLocalPreview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  transform: scaleX(-1);
}

/* В режиме «Звонок» док перекрывает трей Daily.
   iframe — replaced element: height:auto даёт intrinsic ~150px
   и чёрный фон панели на весь экран. Считаем высоту явно. */
.vr-classroom.content-video #vr-video {
  height: calc(100% - var(--vr-dock-space));
}
.vr-classroom.content-video #vr-video iframe {
  bottom: auto;
  height: 100% !important;
}

.vr-board-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

/* Board surface theme (toggle in dock) */
.vr-classroom.board-theme-dark .vr-board-surface,
.vr-classroom.board-theme-dark .vr-panel--board,
.vr-classroom.board-theme-dark .vr-panel--materials,
.vr-classroom.board-theme-dark #vr-board,
.vr-classroom.board-theme-dark #vr-materials {
  background: #0B0F19;
}
.vr-classroom.board-theme-dark .vr-board-empty {
  color: rgba(255, 255, 255, 0.7);
}

/* Content modes — desktop */
.vr-classroom.content-board .vr-panel--board {
  display: block;
}
.vr-classroom.content-materials .vr-panel--materials {
  display: block;
}

/* Без доски/материалов: Daily на весь экран, dock поверх */
.vr-classroom.content-video .vr-stage {
  grid-template-columns: 1fr;
}
.vr-classroom.content-video .vr-content {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 10;
}
.vr-classroom.content-video .vr-panel--board,
.vr-classroom.content-video .vr-panel--materials {
  display: none;
}
.vr-classroom.content-video .vr-dock {
  pointer-events: auto;
}
.vr-classroom.content-video .vr-panel--video {
  border-left: none;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
}

/* Dock: floating mini-block bottom-center */
.vr-dock {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 6px;
  padding: 8px;
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  backdrop-filter: blur(8px);
}

.vr-dock__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 12px;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
/* ПК: видео всегда справа, «Звонок» только когда правая колонка не влезает */
@media (min-width: 900px) {
  .vr-dock__btn--video {
    display: none;
  }
}
.vr-dock__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.vr-dock__btn.is-active {
  background: #fff;
  color: #111827;
}
.vr-dock__new {
  background: #fff;
  color: #111827;
}
.vr-dock__new:hover:not(:disabled) {
  background: #f3f4f6;
  color: #111827;
}
.vr-dock__btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.vr-dock .vr-copy-join {
  width: auto;
}

.vr-dock__now {
  color: #111827;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.vr-dock__sep {
  width: 1px;
  align-self: stretch;
  margin: 4px 2px;
  background: rgba(255, 255, 255, 0.16);
  flex: none;
}

.vr-dock__tools {
  position: relative;
  display: flex;
  flex: none;
}
.vr-dock__gear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding-left: 0;
  padding-right: 0;
}
.vr-dock__gear svg {
  width: 20px;
  height: 20px;
  display: block;
}
.vr-dock__menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  min-width: 268px;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  z-index: 22;
}
.vr-dock__tools.is-open .vr-dock__menu {
  display: flex;
}
.vr-dock__menu .vr-dock__btn {
  width: 100%;
  text-align: left;
  white-space: normal;
}
.vr-dock__close {
  display: none;
}
.vr-dock-scrim {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 19;
  background: rgba(11, 15, 25, 0.45);
}
.vr-content:has(.vr-dock__tools.is-open) .vr-dock-scrim,
.vr-classroom.is-pop-open .vr-dock-scrim {
  display: block;
}

/* ——— Confirm modal ——— */
.vr-confirm {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.vr-confirm[hidden] {
  display: none !important;
}
.vr-confirm__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.58);
}
.vr-confirm__box {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #fff;
  color: #111827;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
  padding: 22px 22px 18px;
}
.vr-confirm__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}
.vr-confirm__text {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: #6B7280;
}
.vr-confirm__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}
.vr-confirm__btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.vr-confirm__btn--ghost {
  background: #F3F4F6;
  color: #374151;
}
.vr-confirm__btn--ghost:hover {
  background: #E5E7EB;
}
.vr-confirm__btn--primary {
  background: var(--vr-accent);
  color: #fff;
}
.vr-confirm__btn--primary:hover {
  opacity: 0.9;
}
.vr-confirm__btn--danger {
  background: var(--vr-red);
  color: #fff;
}
.vr-confirm__btn--danger:hover {
  opacity: 0.9;
}

.vr-attach-box {
  width: min(420px, calc(100vw - 32px));
  text-align: left;
}
.vr-attach-form {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.vr-attach-label {
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  margin-top: 4px;
}
.vr-attach-select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #E5E7EB;
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 14px;
  background: #F9FAFB;
  color: #111827;
}
.vr-attach-select:disabled {
  opacity: .55;
  cursor: not-allowed;
}

@media (max-width: 899px) {
  .vr-classroom {
  
  }

  .vr-chrome__title {
    max-width: 50vw;
  }

  .vr-chrome__tool:not(.vr-chrome__tool--glyph) {
    padding: 7px 8px;
    font-size: 11px;
  }

  .vr-stage {
    grid-template-columns: 1fr !important;
  }

  .vr-split {
    display: none !important;
  }

  .vr-panel--video {
    border-left: none;
    position: absolute;
    inset: 0;
    display: none;
    z-index: 5;
    min-width: 0;
  }

  .vr-dock {
    left: 12px;
    right: 12px;
    bottom: 12px;
    transform: none;
    justify-content: stretch;
    max-width: 68%;
    margin: 0 auto;
  }

  .vr-dock__btn {
    flex: 1;
    padding: 14px 10px;
    font-size: 13px;
  }

  .vr-dock__btn--theme {
    flex: 0.85;
  }

  .vr-dock__now {
    flex: 1;
    text-align: center;
  }

  .vr-dock__sep {
    margin: 6px 0;
  }

  /* Mobile: one panel at a time */
  .vr-classroom.content-board .vr-panel--board {
    display: block;
  }
  .vr-classroom.content-board .vr-panel--materials,
  .vr-classroom.content-board .vr-panel--video {
    display: none;
  }

  .vr-classroom.content-materials .vr-panel--materials {
    display: block;
  }
  .vr-classroom.content-materials .vr-panel--board,
  .vr-classroom.content-materials .vr-panel--video {
    display: none;
  }

  .vr-classroom.content-video .vr-panel--video {
    display: block;
    position: absolute;
    inset: 0;
  }
  .vr-classroom.content-video .vr-panel--board,
  .vr-classroom.content-video .vr-panel--materials {
    display: none;
  }

  /* Не перекрывать Daily непрозрачным фоном */
  .vr-classroom.content-video .vr-content {
    background: transparent;
  }
}

@media (max-width: 899px) {
  .vr-dock__tools {
    position: relative;
    flex: none;
    display: flex;
  }
  .vr-dock__gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 48px;
    padding: 14px 0;
  }
  .vr-dock__tools.is-open .vr-dock__gear {
    background: #fff;
    color: #111827;
  }
  .vr-dock-scrim {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 19;
    background: rgba(11, 15, 25, 0.45);
  }
  .vr-dock__menu {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(100% + 8px);
    top: auto;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    min-width: 0;
    width: 100%;
    max-height: min(70vh, calc(100dvh - var(--vr-chrome-h) - var(--vr-dock-space) - 16px));
    overflow: auto;
    background: rgba(17, 24, 39, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    z-index: 40;
  }
  .vr-dock__tools.is-open .vr-dock__menu {
    display: flex;
  }
  .vr-dock__menu .vr-dock__btn {
    flex: none;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    white-space: normal;
  }
  .vr-dock__menu .vr-copy-join {
    width: 100%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
  }
  .vr-dock__menu .vr-copy-join:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }
  .vr-dock__close {
    display: block;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 0 12px 12px;
    color: rgba(255, 255, 255, 0.55);
  }
}

/* Узкие смартфоны: док по контенту, короткие подписи, выше safe-area */
@media (max-width: 510px) {
  .vr-dock {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(100vw - 16px);
    bottom: calc(28px + env(safe-area-inset-bottom, 0px));
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    justify-content: center;
  }

  .vr-dock__btn {
    flex: none;
    padding: 6px 5px;
    font-size: 10px;
    border-radius: 8px;
  }

  /* Длинные слова не влезают на ~330px — короткие подписи */
  .vr-dock__btn[data-content="video"],
  .vr-dock__btn[data-content="materials"] {
    font-size: 0;
    line-height: 0;
  }
  .vr-dock__btn[data-content="video"]::after,
  .vr-dock__btn[data-content="materials"]::after {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
  }
  .vr-dock__btn[data-content="video"]::after {
    content: 'Звонок';
  }
  .vr-dock__btn[data-content="materials"]::after {
    content: 'Мат.';
  }

  .vr-dock__now {
    flex: none;
    padding: 6px 8px;
    font-size: 10px;
    border-radius: 8px;
  }

  .vr-dock__sep {
    margin: 2px 0;
  }

  .vr-dock__gear {
    width: 30px;
    padding: 6px 0;
  }

  .vr-dock__gear svg {
    width: 14px;
    height: 14px;
  }

  .vr-dock__menu .vr-dock__btn {
    padding: 10px 12px;
    font-size: 12px;
  }
}

.vr-chrome__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: none;
}
.vr-timer-chip {
  appearance: none;
  border: 0;
  background: #EEF2FF;
  color: #6366F1;
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
}
.vr-chrome__pip {
  appearance: none;
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.vr-guest-name {
  width: 100%;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 15px;
  color: #111;
}
.vr-board-pick {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(245, 243, 238, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
}
.vr-board-pick__title { font-size: 20px; font-weight: 700; color: #111; }
.vr-board-pick__hint { color: #6366F1; font-size: 14px; margin: 0; max-width: 360px; }
.vr-link-btn {
  appearance: none; border: 0; background: none; color: #6366F1; font-weight: 600; cursor: pointer; font-size: 14px;
}
.vr-hud { position: absolute; inset: 0; pointer-events: none; z-index: 12; }
.vr-player, .vr-vote { pointer-events: auto; }
.vr-player--audio {
  position: absolute; left: 12px; right: 12px; top: 8px;
  background: #fff; border-radius: 12px; padding: 8px 12px;
  display: flex; gap: 8px; align-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.vr-player--video {
  position: absolute; left: 12px; bottom: 88px; width: 360px; max-width: calc(100% - 24px);
  background: #111; border-radius: 12px; overflow: hidden;
}
.vr-player--video iframe, .vr-player--video video { width: 100%; height: 200px; border: 0; display: block; background: #000; }
.vr-player__bar { display: flex; gap: 8px; padding: 8px; background: #fff; }
.vr-player__title { color: #111; font-weight: 600; font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-player__btn { appearance: none; border: 0; background: #6366F1; color: #fff; font-weight: 600; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.vr-player__seek, .vr-player__vol { flex: 1; }
.vr-vote {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.vr-hud.has-audio .vr-vote { top: 52px; }
.vr-vote__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.vr-vote__q {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  font-size: 13px;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vr-vote__timer {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 13px;
  color: #6366F1;
  background: #EEF2FF;
  border-radius: 8px;
  padding: 4px 8px;
}
.vr-player__btn--ghost {
  background: #EEF2FF;
  color: #4338CA;
}
.vr-vote__opt.is-done {
  cursor: default;
  opacity: 0.92;
}
.vr-vote__opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.vr-vote__opt-wrap {
  flex: 1 1 120px;
  min-width: 0;
}
.vr-vote__opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: #EEF2FF;
  color: #111;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
.vr-vote__names { color: #6366F1; font-size: 11px; margin: 4px 0 0; line-height: 1.3; }
.vr-act-stats {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: min(320px, calc(100% - 24px));
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  z-index: 5;
  pointer-events: auto;
  max-height: 42vh;
  overflow: auto;
}
.vr-act-stats__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 6px;
}
.vr-act-stats__row {
  border-top: 1px solid #f4f4f5;
  padding: 6px 0;
}
.vr-act-stats__title { font-size: 12px; font-weight: 600; color: #18181b; }
.vr-act-stats__counts { display: flex; gap: 10px; font-size: 12px; margin-top: 2px; }
.vr-act-stats__counts .is-ok { color: #15803d; }
.vr-act-stats__counts .is-bad { color: #b91c1c; }
.vr-act-stats__names { font-size: 11px; color: #6366F1; margin-top: 2px; line-height: 1.3; }

.vr-popover {
  position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%);
  z-index: 24; width: min(360px, calc(100% - 24px)); max-height: 60vh; overflow: auto;
  background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.16);
}
.vr-popover .vr-enter-btn { margin-top: 0; margin-bottom: 10px; }
.vr-popover .vr-enter-btn.vr-pop-action { margin-top: 0; margin-bottom: 0; }
.vr-pop-head { font-weight: 700; color: #111; margin-bottom: 8px; }
.vr-pop-label { color: #6366F1; font-size: 12px; font-weight: 600; margin: 10px 0 6px; }
.vr-pop-hint { color: #6B7280; font-size: 13px; line-height: 1.45; margin: 0 0 12px; }
.vr-pop-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 4px;
}
.vr-pop-form .vr-pop-search { margin-bottom: 0; }
.vr-pop-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin: 0;
}
.vr-pop-empty { color: #6366F1; }
.vr-pop-search {
  width: 100%; border: 1px solid #E5E7EB; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; color: #111;
}
.vr-pop-close { appearance: none; border: 0; background: none; color: #6366F1; font-weight: 600; cursor: pointer; margin-top: 8px; }
.vr-board-row { display: flex; align-items: center; gap: 6px; }
.vr-board-row.is-current b { color: #6366F1; }
.vr-board-row__main {
  flex: 1; appearance: none; border: 0; background: none; text-align: left; padding: 8px 0; cursor: pointer; color: #111; min-width: 0;
}
.vr-board-row.is-renaming .vr-board-row__main { cursor: default; }
.vr-board-row__main b { display: block; }
.vr-board-row__main span { color: #6366F1; font-size: 12px; }
.vr-board-rename-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-weight: 700;
  color: #111;
  border: 0;
  border-bottom: 2px solid #6366F1;
  background: transparent;
  padding: 0 0 2px;
  outline: none;
  border-radius: 0;
}
.vr-board-menu { position: relative; flex: none; }
.vr-board-menu__btn {
  appearance: none; border: 0; background: none; cursor: pointer;
  color: #6366F1; font-size: 18px; line-height: 1; letter-spacing: 1px;
  padding: 8px 6px; border-radius: 8px;
}
.vr-board-menu__btn:hover, .vr-board-menu.is-open .vr-board-menu__btn { background-color: #EEF2FF; }
.vr-board-menu__list {
  display: none;
  position: fixed;
  min-width: 196px;
  background: #fff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, .14);
  /* выше .vr-classroom (9000): список на body, иначе блок есть, но под оверлеем */
  z-index: 9100;
}
.vr-board-menu__list.is-open { display: block; }
.vr-board-menu__list button {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; font-weight: 600;
  color: #111; cursor: pointer; font-family: inherit;
}
.vr-board-menu__list button:hover { background-color: #EEF2FF; }
.vr-board-menu__list button.is-danger { color: #E11D48; }
.vr-board-menu__list button.is-danger:hover { background-color: #FFF1F2; }
.vr-classroom[data-is-employee="0"] .vr-dock__tools { display: none !important; }
.vr-classroom.is-board-fs .vr-panel--video {
  position: absolute; width: 180px; height: 120px; right: 12px; bottom: 12px; z-index: 30; display: block; border-radius: 12px; overflow: hidden;
}
.vr-classroom.is-board-fs .vr-stage { grid-template-columns: 1fr !important; }
.vr-student-pip {
  position: absolute; left: 8px; top: 8px; z-index: 15;
  appearance: none; border: 0; background: #111; color: #fff; font-weight: 600; font-size: 12px;
  border-radius: 10px; padding: 8px 10px; cursor: pointer;
}
.vr-classroom.student-video-local .vr-panel--video {
  display: block !important; position: absolute; inset: 0; z-index: 18;
}

@media (max-width: 899px) {
  .vr-player--video { left: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 55%; }
  .vr-popover { left: 12px; right: 12px; bottom: var(--vr-dock-space); transform: none; width: auto; max-height: 70vh; border-radius: 16px; }
  .vr-classroom[data-is-employee="0"].is-live:not(.content-video):not(.student-video-local) .vr-panel--video {
    display: block !important;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 112px;
    z-index: 6;
    border: 0;
  }
  .vr-classroom[data-is-employee="0"].is-live:not(.content-video):not(.student-video-local) .vr-content {
    padding-top: 112px;
  }
  .vr-student-pip { top: 120px; }
  .vr-classroom.student-video-local .vr-student-pip { top: 8px; z-index: 20; }
}
