:root{
  --bg-main:#37093F;
  --panel:#FFFDEB;
  --purple:#7c3aff;
  --ink:#111827;
  --grad:linear-gradient(120deg,#ec4899,#8b5cf6,#3b82f6);
  --card-shell-start:#3DA6FF;
  --card-shell-end:#487EE7;
  --lav:#CCA7D9;
  --peach:#F5B896;
  --cream:#FFFDEB;
}

*{box-sizing:border-box;margin:0;padding:0;}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);}
.sak-body{min-height:100vh;background:var(--bg-main);color:var(--ink);}
.sak-page{
  max-width:1400px;
  margin:0 auto;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:100vh;
}
.sak-header{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;

  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  color:#e5e7ff;
}
.sak-logo-pill{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  margin:16px 0;
  gap:0;
  border-radius:0;
  border:none;
  background:transparent;
  box-shadow:none;
}
.sak-logo-img{
  height:120px;
  width:auto;
  border-radius:24px;
  display:block;
}
.sak-head-text .sak-brand{font-size:16px;font-weight:700;}
.sak-head-text .sak-brand-sub{font-size:11px;opacity:.8;}
.sak-header-right{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.sak-chip{
  border-radius:999px;
  border:2px solid var(--purple);
  padding:6px 10px;
  font-size:11px;
  font-weight:700;
  background:#fff;
  cursor:pointer;
}
.sak-main{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:6px;
  flex:1;
}
.sak-hero{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
  gap:16px;
  align-items:center;
}
.sak-hero-head{
  color:var(--text-main);
}
.sak-hero-title{
  font-size:28px;
  font-weight:800;
  margin-bottom:6px;
}
.sak-hero-text{
  font-size:13px;
  color:var(--text-soft);
  margin-bottom:10px;
}
.sak-hero-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.sak-btn{
  border-radius:999px;
  border:2px solid var(--purple);
  padding:8px 16px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  background:#fff;
}

.sak-btn.small{
  padding:6px 10px;
  font-size:12px;
}

.sak-input-row{
  display:grid;
  grid-template-columns:1.4fr auto;
  gap:8px;
  align-items:center;
}

.sak-breakout-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.sak-breakout-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:6px 8px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.7);
  background:#f9fafb;
}
.sak-breakout-item-title{
  font-size:13px;
}
.sak-breakout-item-actions button{
  margin-left:4px;
}
.sak-btn.primary{
  background-image:var(--grad);
  color:#fff;
}
.sak-btn.ghost{
  background:#fff;
}
.sak-pill{
  border-radius:999px;
  border:1px solid rgba(148,163,184,.7);
  padding:4px 9px;
  font-size:11px;
  display:inline-flex;
  gap:4px;
  align-items:center;
  color:var(--text-soft);
  background:#f9fafb;
  box-shadow:0 12px 30px rgba(148,163,184,0.6);
}
.sak-hero-card{
  background:var(--panel);
  border-radius:18px;
  border:2px solid var(--purple);
  padding:10px;
  box-shadow:0 18px 44px rgba(148,163,184,.65);
  font-size:13px;
}
.card{
  background:
    linear-gradient(var(--cream),var(--cream)) padding-box,
    linear-gradient(135deg,var(--card-shell-start),var(--card-shell-end)) border-box;
  border-radius:18px;
  border:1px solid transparent;
  padding:12px;
  box-shadow:
    0 22px 60px rgba(0,0,0,0.7),
    0 0 0 1px rgba(196,181,253,0.9);
  color:var(--ink);
}
.card h2{
  font-size:15px;
  font-weight:800;
  margin-bottom:4px;
}
.hint{
  font-size:11px;
  color:#6b7280;
  margin-bottom:6px;
}
.info-row{
  display:flex;
  justify-content:space-between;
  font-size:13px;
  margin-bottom:4px;
}
.sak-input{
  border-radius:999px;
  border:2px solid var(--purple);
  padding:7px 10px;
  font-size:13px;
  width:100%;
}
.sak-input.area{
  border-radius:14px;
  min-height:90px;
  resize:vertical;
}
.btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:4px;
}
.status-text{
  font-size:11px;
  margin-top:4px;
}
/* Classroom layout */
.sak-layout{
  display:grid;
  grid-template-columns:minmax(260px,0.8fr) minmax(0,1.6fr) minmax(260px,0.8fr);
  gap:10px;
}
.sak-panel{
  background:
    linear-gradient(var(--cream),var(--cream)) padding-box,
    linear-gradient(135deg,var(--card-shell-start),var(--card-shell-end)) border-box;
  border-radius:18px;
  border:1px solid transparent;
  padding:8px;
  box-shadow:
    0 22px 60px rgba(0,0,0,0.7),
    0 0 0 1px rgba(196,181,253,0.9);
  display:flex;
  flex-direction:column;
  min-height:200px;
  color:var(--ink);
}
.chat-panel,.side-panel{}
.sak-panel-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:4px;
}
.sak-panel-title{font-size:14px;font-weight:800;}
.sak-panel-sub{font-size:11px;color:#6b7280;}
.sak-chat-tabs,.sak-tab-group{
  display:flex;
  border-radius:999px;
  border:1px solid rgba(155,77,255,.6);
  overflow:hidden;
}
.sak-tab{
  flex:1;
  padding:5px 10px;
  border:0;
  background:transparent;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}
.sak-tab.active{
  background:#050b26;
  color:#fff;
}
.sak-chat-log{
  flex:1;
  background:#fdfdff;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.6);
  padding:6px;
  font-size:13px;
  overflow:auto;
  margin-bottom:6px;
}
.bubble{
  display:inline-block;
  margin:3px 0;
  padding:6px 9px;
  border-radius:12px 12px 12px 4px;
  max-width:90%;
}
.bubble.teacher{
  background:linear-gradient(135deg,#fb7185,#f472b6);
  border:2px solid #db2777;
  box-shadow:0 10px 26px rgba(248,113,113,.55);
}
.bubble.me{
  background:linear-gradient(135deg,#e0c3ff,#c4b5fd);
  border:2px solid #a855f7;
  margin-left:auto;
  border-radius:12px 12px 4px 12px;
  display:block;
  box-shadow:0 10px 26px rgba(129,140,248,.55);
}
.sak-chat-input-row{
  display:grid;
  grid-template-columns:auto auto 1fr auto;
  gap:6px;
  align-items:center;
}
.sak-icon-btn{
  width:32px;height:32px;
  border-radius:999px;
  border:2px solid var(--purple);
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:16px;
}
.video-panel{min-height:320px;}
.video-main{
  flex:1;
  border-radius:14px;
  border:2px solid var(--purple);
  background:radial-gradient(circle at top,rgba(156,163,255,.26),transparent 55%),#050718;
  position:relative;
  margin-bottom:8px;
  overflow:hidden;
}
.video-placeholder{
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-50%);
  color:#e5e7eb;
  font-weight:700;
  font-size:14px;
  letter-spacing:.04em;
}
.video-teacher-label{
  position:absolute;
  left:10px;bottom:10px;
  background:rgba(255,255,255,.9);
  border-radius:999px;
  padding:3px 10px;
  font-size:12px;
  font-weight:800;
}
.video-watermark{
  position:absolute;
  right:10px;bottom:8px;
  opacity:.2;
}
.video-watermark img{height:100px;}
.video-strip{
  display:flex;
  gap:6px;
  overflow-x:auto;
}
.video-strip::-webkit-scrollbar{display:none;}
.video-thumb{
  flex:0 0 80px;
  height:54px;
  border-radius:12px;
  border:2px solid var(--purple);
  background:#050718;
  color:#f1f5f9;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  font-size:11px;
  padding-bottom:4px;
}
.sak-side-body{
  flex:1;
  background:#fdfdff;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.7);
  padding:8px;
  font-size:13px;
  overflow:auto;
}
.sak-meter{font-size:11px;color:#6b7280;margin-bottom:4px;}
.sak-field-block{margin-bottom:6px;}
.sak-field-block label{
  display:block;
  font-size:12px;
  margin-bottom:2px;
}
.sak-side-footer{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-top:6px;
}
.sak-side-actions{display:flex;gap:6px;}
/* Toolbar */
.sak-toolbar-wrap{margin-top:4px;}
.sak-toolbar-scroll{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:6px 0 8px;
}
.sak-toolbar-scroll::-webkit-scrollbar{display:none;}
.sak-pill-tool{
  flex:0 0 auto;
  border-radius:999px;
  border:2px solid var(--purple);
  background:#ffffff;
  color:var(--ink);
  padding:6px 14px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  box-shadow:0 6px 16px rgba(0,0,0,.4);
}
.sak-pill-tool.danger{
  border-color:#fecaca;
  background:#7f1d1d;
  color:#fee2e2;
}
/* Dashboard cards reuse .card */
/* CEO metrics */
.metric-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:8px;
}
.metric{
  padding:8px;
  border-radius:12px;
  border:1px solid rgba(148,163,184,.6);
  background:#f9fafb;
  font-size:12px;
}
.metric-label{color:#6b7280;margin-bottom:3px;}
.metric-value{font-size:16px;font-weight:800;margin-bottom:2px;}
.metric-note{font-size:11px;color:#6b7280;}
.pin-row{
  display:flex;
  gap:6px;
  margin-bottom:4px;
}
.error-text{font-size:11px;color:#dc2626;}
.hidden{display:none;}
/* Login */
.login-form{
  max-width:360px;
  margin:0 auto;
}
.login-form .field-block{margin-bottom:8px;font-size:13px;}
.login-form label{display:block;margin-bottom:2px;}
.role-row{
  display:flex;
  gap:10px;
  margin:4px 0 6px;
  font-size:12px;
}
@media(max-width:980px){
  .sak-layout{
    display:flex;
    flex-direction:column;
  }
  .video-panel{order:1;}
  .chat-panel{order:2;}
  .side-panel{order:3;}
}
@media(max-width:720px){
  .sak-hero{grid-template-columns:1fr;}
  .sak-header{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;flex-direction:column;align-items:flex-start;}
}

/* Layout tweaks for classroom full height */
.sak-page{
  max-width:1400px;
  margin:0 auto;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:100vh;
}
.sak-main{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:6px;
  flex:1;
}
.sak-layout{
  flex:1;
  min-height:0;
}
.chat-panel,.side-panel,.video-panel{
  max-height:none;
}

/* SK-AI strip in classroom */
.sak-ai-strip{
  margin-top:4px;
  padding:6px 8px;
  border-radius:16px;
  border:2px solid var(--purple);
  background:linear-gradient(120deg,#fef3c7,#fee2e2,#e0f2fe);
  color:#111827;
  box-shadow:0 18px 44px rgba(148,163,184,.65);
}
.sak-ai-chips{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:4px;
}
.sak-ai-chip{
  border-radius:999px;
  border:0;
  padding:5px 10px;
  font-size:11px;
  font-weight:700;
  background:#050b26;
  color:#fff;
  cursor:pointer;
}
.sak-ai-row{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:6px;
  align-items:center;
  padding:6px 8px;
  border-radius:999px;
  background:linear-gradient(120deg,#fef3c7,#fee2e2,#e0f2fe);
  box-shadow:0 14px 32px rgba(148,163,184,.6);
}
.sak-ai-face{
  width:30px;
  height:30px;
  border-radius:999px;
  background:linear-gradient(135deg,#0ea5e9,#fb7185);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  box-shadow:0 6px 20px rgba(0,0,0,.6);
}
.sak-ai-input{
  border-radius:999px;
  border:2px solid var(--purple);
  padding:6px 10px;
  font-size:12px;
  width:100%;
  background:#ffffff;
  color:var(--ink);
}
.sak-ai-note{
  font-size:10px;
  color:#a5b4fc;
  margin-top:2px;
}
@media(max-width:720px){
  .sak-layout{
    grid-template-columns:1fr;
  }
}

/* Settings modal */
.sak-modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:50;
}
.sak-modal.hidden{
  display:none;
}
.sak-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(5,11,38,.85);
}
.sak-modal-card{
  position:relative;
  width:min(480px,92vw);
  background:var(--panel);
  border-radius:18px;
  border:2px solid var(--purple);
  box-shadow:0 30px 70px rgba(0,0,0,.7);
  padding:10px 12px;
  z-index:1;
}
.sak-modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  margin-bottom:6px;
}
.sak-modal-title{
  font-size:15px;
  font-weight:800;
}
.sak-modal-sub{
  font-size:11px;
  color:#6b7280;
}
.sak-modal-body{
  font-size:13px;
  max-height:260px;
  overflow:auto;
}
.sak-modal-section{
  border-radius:12px;
  border:1px solid rgba(148,163,184,.6);
  padding:6px 8px;
  margin-bottom:6px;
  background:#f9fafb;
}
.sak-modal-section-title{
  font-size:12px;
  font-weight:700;
  margin-bottom:4px;
}
.sak-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:3px 0;
  font-size:12px;
}
.sak-toggle input{
  width:18px;
  height:18px;
}
.sak-privacy-text{
  font-size:11px;
  color:#4b5563;
}
.sak-modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:6px;
}


.sak-modal-body iframe.sak-modal-iframe{
  width:100%;
  height:60vh;
  border:none;
  border-radius:12px;
  background:#f9fafb;
}


/* Broadcast overlay on main video */
.sak-broadcast-overlay{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:min(380px,90%);
  background:#020617;
  color:#f9fafb;
  border-radius:16px;
  border:2px solid var(--purple);
  box-shadow:0 24px 60px rgba(0,0,0,.8);
  padding:10px;
  z-index:20;
}
.sak-broadcast-overlay.hidden{display:none;}
.sak-broadcast-inner{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.sak-broadcast-title{
  font-size:14px;
  font-weight:800;
}
.sak-broadcast-body{
  font-size:12px;
  max-height:220px;
  overflow:auto;
  background:#020617;
  border-radius:10px;
  border:1px solid rgba(148,163,184,.6);
  padding:6px;
}
.sak-broadcast-foot{
  display:flex;
  justify-content:flex-end;
  gap:6px;
  margin-top:4px;
}


/* Live quiz full overlay */
.sak-quiz-overlay{
  position:absolute;
  inset:0;
  background:rgba(3,7,18,.90);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:30;
}
.sak-quiz-overlay.hidden{display:none;}
.sak-quiz-box{
  width:min(720px,96vw);
  background:#020617;
  border-radius:18px;
  border:2px solid var(--purple);
  box-shadow:0 30px 80px rgba(0,0,0,.9);
  padding:12px 14px;
  color:#e5e7eb;
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:12px;
}
@media(max-width:900px){
  .sak-quiz-box{
    grid-template-columns:1fr;
  }
}
.sak-quiz-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px;
}
.sak-quiz-title{
  font-size:15px;
  font-weight:800;
}
.sak-quiz-progress{
  font-size:12px;
  color:#a5b4fc;
}
.sak-quiz-question{
  font-size:14px;
  font-weight:700;
  margin-bottom:6px;
}
.sak-quiz-options{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.sak-quiz-opt{
  border-radius:10px;
  border:2px solid var(--purple);
  background:#020617;
  color:#e5e7ff;
  padding:8px 10px;
  text-align:left;
  font-size:13px;
  cursor:pointer;
}
.sak-quiz-opt.correct{
  border-color:#22c55e;
  background:#052e16;
}
.sak-quiz-opt.wrong{
  border-color:#ef4444;
  background:#450a0a;
}
.sak-quiz-controls{
  margin-top:8px;
  display:flex;
  gap:6px;
}
.sak-quiz-controls button{
  flex:0 0 auto;
}
.sak-quiz-side{
  border-radius:12px;
  border:1px solid rgba(148,163,184,.5);
  padding:8px;
  font-size:12px;
  background:#020617;
}
.sak-quiz-side h4{
  margin:0 0 4px;
  font-size:13px;
  font-weight:800;
}
.sak-leader-add{
  display:flex;
  gap:6px;
  margin-bottom:6px;
}
#leaderNameInput{
  flex:1;
  border-radius:999px;
  border:2px solid var(--purple);
  padding:4px 8px;
  font-size:12px;
  background:#020617;
  color:#e5e7ff;
}
#leaderList{
  list-style:none;
  padding:0;
  margin:0;
  max-height:160px;
  overflow:auto;
}
#leaderList li{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:4px 6px;
  border-radius:8px;
  background:#020617;
  border:1px solid rgba(148,163,184,.4);
  margin-bottom:4px;
}
#leaderList button{
  font-size:11px;
  padding:2px 6px;
}

#aiAskBtn,
#broadcastBtn,
#timerBtn,
#chatSend{
  background-image:var(--grad) !important;
  color:#fff;
  border:2px solid var(--purple);
  box-shadow:0 18px 40px rgba(148,163,184,.7);
}


.chat-row{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.bubble-actions{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-left:2px;
}
.bubble-actions button{
  border:none;
  background:transparent;
  font-size:10px;
  padding:2px 4px;
  border-radius:999px;
  cursor:pointer;
  color:#6b7280;
}
.bubble-actions button:hover{
  background:rgba(148,163,184,.18);
  color:#374151;
}
.chat-row.translated .bubble{
  opacity:.9;
  font-size:11px;
}


/* Small icon inside pill buttons (Session Members, Digital Board) */
.sak-pill-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.sak-pill-icon img{
  width:22px;
  height:22px;
  display:block;
}


/* v34 classroom header: logo stacked with LIVE underneath */
.sak-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 16px;
}

.sak-header-center{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}


/* Glow animation for header logo */
.sak-header-logo{
  height:70px;
  width:auto;
  display:block;
  animation: glowPulse 2.5s ease-in-out infinite;
}

@keyframes glowPulse{
  0%{ filter: drop-shadow(0 0 0px rgba(255, 0, 0, 0.0)); }
  50%{ filter: drop-shadow(0 0 8px rgba(255, 0, 120, 0.9)); }
  100%{ filter: drop-shadow(0 0 0px rgba(255, 0, 0, 0.0)); }
}


.sak-live-row{
  display:flex;
  justify-content:center;
}

.sak-live-pill{
  padding:4px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  letter-spacing:0.06em;
  background:#f97373;
  color:#fff;
  box-shadow:0 0 8px rgba(249,115,115,0.6);
}


#btnCapture.active-recording{
  background:linear-gradient(135deg,#ff4b8a,#4fd1ff);
  box-shadow:0 0 14px rgba(255,75,138,0.7);
}
#btnCapture.active-paused{
  background:linear-gradient(135deg,#ffd37a,#a855f7);
  box-shadow:0 0 10px rgba(255,211,122,0.5);
}

.sak-tool-btn img,
.sak-tool-btn svg{
  width:28px;
  height:28px;
  display:block;
}


.sak-link-btn{
  background:transparent;
  border:none;
  color:#4b5563;
  font-size:12px;
  cursor:pointer;
  padding:4px 8px;
}
.sak-link-btn.right{ margin-left:auto; }

.chat-panel.collapsed{ display:none; }
.side-panel.collapsed{ display:none; }


.sak-toolbar-sep{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 10px;
  color:#9ca3af;
  font-weight:600;
}

.sak-pill-tool .sak-pill-icon img{
  width:28px;
  height:28px;
  display:block;
}


/* Hide any text labels next to the SK logo in headers */
.sak-head-text,
.sak-head-text .sak-brand,
.sak-head-text .sak-brand-sub,
.sak-logo-pill .sak-brand,
.sak-logo-pill h2{
  display:none;
}


/* Embedded Digital Board inside classroom video panel */
.video-panel{
  position:relative;
}
.sak-digitalboard-embed{
  position:absolute;
  inset:0;
  border-radius:18px;
  overflow:hidden;
  box-shadow:0 0 0 2px var(--purple);
}
.sak-digitalboard-embed.hidden{
  display:none;
}
.sak-digitalboard-frame{
  width:100%;
  height:100%;
  border:none;
}


/* Back to video button inside digital board */
.sak-db-back{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2000;
  background:var(--purple);
  color:white;
  border:none;
  padding:8px 14px;
  border-radius:8px;
  font-size:14px;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,0.3);
}


/* Quick reactions bar (InsightTap) */
.sak-reaction-bar{
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(22,0,40,0.92);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(0,0,0,0.35);
  z-index: 40;
}
.sak-reaction-bar.hidden{
  display: none;
}
.sak-reaction-btn{
  border:none;
  outline:none;
  border-radius:999px;
  padding:4px 10px;
  font-size:18px;
  cursor:pointer;
  background:#FFFDEB;
  box-shadow:0 0 4px rgba(0,0,0,0.25);
}
.sak-reaction-btn:hover{
  transform:translateY(-1px);
}

/* ---------- Mobile bubble layout for classroom ---------- */
@media (max-width: 768px) {
  .sak-layout { display: block; }
  .video-panel { margin-bottom: 110px; }
  .sak-toolbar-wrap {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  }
  .sak-page { padding-bottom: 130px; }
  .sak-mobile-bubble-buttons {
    position: fixed; left: 50%; bottom: 100px;
    transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 35;
  }
  .sak-mobile-bubble-buttons .sak-btn {
    border-radius: 999px;
    padding: 6px 14px; font-size: 14px;
  }
  .chat-panel, .side-panel {
    position: fixed; left: 12px; right: 12px; bottom: 140px;
    max-height: 60vh; z-index: 40; border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.35);
    transform: translateY(120%); opacity: 0; pointer-events: none;
    transition: transform 0.23s ease, opacity 0.23s ease;
  }
  .chat-panel.sak-bubble-open,
  .side-panel.sak-bubble-open {
    transform: translateY(0); opacity: 1; pointer-events: auto;
  }
  .sak-panel-header, .sak-side-footer { padding: 10px 14px; }
  .sak-chat-input-row { padding: 8px 10px 10px; }
  .sak-chat-log, .sak-side-body { padding: 8px 12px; }
}

/* Mobile bubble panels for chat + tools */
@media (max-width: 768px) {
  .chat-panel,
  .side-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 75vh;
    width: 100%;
    background: #020617;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.9);
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.2s ease;
    z-index: 900;
  }

  .chat-panel.sak-bubble-open,
  .side-panel.sak-bubble-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .sak-page {
    padding-bottom: 110px;
  }
}



/* Classroom header layout: LIVE left, logo center, back button right */
.sak-header-left{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.sak-header-right{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.sak-header-left .sak-live-row{
  justify-content:flex-start;
}

@media (max-width: 768px){
  .sak-header{
    padding:8px 10px;
  }
  .sak-header-logo{
    height:56px;
  }
}



.sak-emoji-picker{
  margin-top:4px;
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}
.sak-emoji-picker button{
  border:0;
  background:#f9fafb;
  border-radius:999px;
  padding:4px 8px;
  font-size:18px;
  cursor:pointer;
}
