/* live.almasoxin.com — DarkStack glass skin.
   Loaded last; only restyles (no layout logic, no JS). Dark is the default; [data-theme=light] gets a light glass variant. */

html:not([data-theme="light"]){
  --bg:#020306;--bg2:#070a12;
  --panel:rgba(255,255,255,.045);--panel2:rgba(255,255,255,.07);
  --border:rgba(255,255,255,.12);
  --text:#f4f7fb;--muted:#9aa6b8;
  --accent:#3d8bff;--accent-dim:#2f74ff;--accent2:#34d399;
  --grad:linear-gradient(180deg,#5aa2ff 0%,#2f74ff 55%,#1f56e0 100%);
  --ds-glass:linear-gradient(145deg,rgba(255,255,255,.11) 0%,rgba(255,255,255,.04) 45%,rgba(255,255,255,.02) 100%);
  --ds-glass-solid:linear-gradient(145deg,rgba(22,30,48,.92),rgba(9,13,22,.94));
  --ds-line:rgba(255,255,255,.16);
  --ds-shadow:0 1px 0 rgba(255,255,255,.22) inset,0 -1px 0 rgba(111,178,255,.08) inset,0 30px 60px -24px rgba(0,0,0,.8);
  --ds-chip:rgba(61,139,255,.12);--ds-chip-line:rgba(61,139,255,.32);--ds-chip-ink:#8cc2ff;
  --ds-page:radial-gradient(1100px 650px at 50% -12%,#0d1a33 0%,transparent 62%),radial-gradient(520px 520px at 100% 0%,rgba(31,95,255,.28),transparent 70%),radial-gradient(560px 560px at 0% 100%,rgba(90,169,255,.16),transparent 70%),#020306;
  --ds-video:#000;
}
html[data-theme="light"]{
  --bg:#eef3fb;--bg2:#e6edf8;
  --panel:rgba(255,255,255,.62);--panel2:rgba(255,255,255,.8);
  --border:rgba(30,60,120,.14);
  --text:#0f1b33;--muted:#5d6b85;
  --accent:#2f74ff;--accent-dim:#2f74ff;--accent2:#10b981;
  --grad:linear-gradient(180deg,#5aa2ff 0%,#2f74ff 55%,#1f56e0 100%);
  --ds-glass:linear-gradient(145deg,rgba(255,255,255,.85),rgba(255,255,255,.55));
  --ds-glass-solid:linear-gradient(145deg,#ffffff,#f3f7fd);
  --ds-line:rgba(30,60,120,.14);
  --ds-shadow:0 1px 0 #fff inset,0 24px 50px -28px rgba(20,40,90,.35);
  --ds-chip:rgba(47,116,255,.08);--ds-chip-line:rgba(47,116,255,.25);--ds-chip-ink:#2459c8;
  --ds-page:radial-gradient(1100px 650px at 50% -12%,#dbe8ff 0%,transparent 62%),radial-gradient(520px 520px at 100% 0%,rgba(61,139,255,.18),transparent 70%),#eef3fb;
  --ds-video:#0b1220;
}

/* Page */
html body{background:var(--ds-page) fixed;color:var(--text);font-family:Vazirmatn,Tahoma,Arial,sans-serif;-webkit-font-smoothing:antialiased}
html body::selection{background:rgba(61,139,255,.35)}
html body ::-webkit-scrollbar-thumb{background:var(--ds-line);border-radius:99px}

/* Shared glass surface */
html body .intro-hero,html body .join-card,html body #topbar,html body #sidePanel,html body #controlBar,
html body #supportPanel,html body #betaModal,html body .diag-window,html body #teachingTray{
  background:var(--ds-glass);border:1px solid var(--ds-line);
  -webkit-backdrop-filter:blur(18px) saturate(160%);backdrop-filter:blur(18px) saturate(160%);
  box-shadow:var(--ds-shadow)}
/* Dialogs and the teaching tray sit above video: keep them readable */
html body #supportPanel,html body #betaModal,html body .diag-window,html body #teachingTray{background:var(--ds-glass-solid)}

/* Buttons: primary = blue gradient pill */
html body #joinBtn,html body .intro-entry button,html body #chatSend,html body #supportInputRow button,html body #betaCloseBtn,
html body #supportBubble,html body #audioUnlockBtn{
  background:var(--grad);color:#fff;border:0;border-radius:999px;
  box-shadow:0 1px 0 rgba(255,255,255,.5) inset,0 -2px 8px rgba(0,0,0,.22) inset,0 10px 28px -8px rgba(61,139,255,.6)}
html body #joinBtn:hover:not(:disabled),html body .intro-entry button:hover,html body #chatSend:hover{filter:brightness(1.08);transform:translateY(-1px)}
html body #joinBtn:disabled{opacity:.45;box-shadow:none;filter:saturate(.6)}
/* Inputs: glass pills */
html body .join-card input[type=text],html body .intro-entry input,html body #chatInput,html body #supportInputRow input{
  background:rgba(255,255,255,.05);border:1px solid var(--ds-line);color:var(--text);border-radius:14px}
html[data-theme="light"] body .join-card input[type=text],html[data-theme="light"] body .intro-entry input,html[data-theme="light"] body #chatInput,html[data-theme="light"] body #supportInputRow input{background:#fff}
html body .join-card input[type=text]:focus,html body .intro-entry input:focus,html body #chatInput:focus,html body #supportInputRow input:focus{
  outline:none;border-color:rgba(111,178,255,.7);box-shadow:0 0 0 4px rgba(61,139,255,.16)}

/* ---------- Intro ---------- */
html body #introScreen{background:transparent}
html body .intro-brand{color:var(--muted);text-align:center;letter-spacing:.02em}
html body .intro-hero{border-radius:34px;padding:44px;border-top:1px solid var(--ds-line)}
html body .intro-tag{display:inline-flex;padding:4px 14px;border-radius:999px;background:var(--ds-chip);border:1px solid var(--ds-chip-line);color:var(--ds-chip-ink);font-size:12.5px}
html body .intro-hero h1{width:fit-content;max-width:100%;font-weight:900;background:linear-gradient(270deg,var(--text) 0%,var(--text) 50%,#6fb2ff 85%,#3d8bff 100%);-webkit-background-clip:text;background-clip:text;color:transparent}
html body .intro-feature{background:rgba(255,255,255,.04);border:1px solid var(--ds-line);border-radius:20px;transition:transform .25s,border-color .25s}
html[data-theme="light"] body .intro-feature{background:rgba(255,255,255,.7)}
html body .intro-feature:hover{transform:translateY(-3px);border-color:rgba(111,178,255,.45)}
html body .intro-entry{border-top-color:var(--ds-line)}
html body .intro-entry input{padding:13px 16px}
html body .intro-entry button{padding:13px 24px;font-weight:700}

/* ---------- Join ---------- */
html body #joinScreen{background:transparent}
html body #joinScreen::before{background-image:linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);background-size:56px 56px}
html body .join-card{border-radius:30px;border-top:1px solid var(--ds-line);padding:34px 30px}
html body .join-card .sub{color:var(--muted);text-transform:none;letter-spacing:0}
html body .official-version{display:table;margin:0 auto 22px;padding:2px 12px;border-radius:999px;background:var(--ds-chip);border:1px solid var(--ds-chip-line);color:var(--ds-chip-ink)}
html body .role-toggle{background:rgba(255,255,255,.04);border:1px solid var(--ds-line);border-radius:999px;padding:4px}
html[data-theme="light"] body .role-toggle{background:rgba(255,255,255,.7)}
html body .role-toggle button{border-radius:999px;color:var(--muted)}
html body .role-toggle button.active{background:var(--grad);color:#fff;box-shadow:0 1px 0 rgba(255,255,255,.45) inset,0 8px 20px -8px rgba(61,139,255,.6)}
html body #joinBtn{padding:14px;font-weight:800}
html body .class-test-button,html body #classDiagnosticsButton,html body #themeToggle{
  background:rgba(255,255,255,.06);border:1px solid var(--ds-line);color:var(--text);border-radius:999px}
html[data-theme="light"] body .class-test-button,html[data-theme="light"] body #classDiagnosticsButton,html[data-theme="light"] body #themeToggle{background:#fff;color:#24406e}
html body .class-test-button:hover,html body #classDiagnosticsButton:hover,html body #themeToggle:hover{border-color:rgba(111,178,255,.55)}
html body #classTestEntry{border-top-color:var(--ds-line)}

/* ---------- Classroom ---------- */
html body #app{background:transparent;padding:10px;gap:10px}
html body #topbar{border-radius:20px;padding:10px 16px;border-bottom:1px solid var(--ds-line)}
html body #topbar .brand .mark{border-radius:50%;background:var(--grad);box-shadow:0 1px 0 rgba(255,255,255,.5) inset,0 8px 20px -6px rgba(61,139,255,.65)}
html body #themeToggle,html body #classDiagnosticsButton{padding:7px 14px}
html body .status-dot.live,html body #liveStatus.on .dot{background:#34d399;box-shadow:0 0 0 4px rgba(52,211,153,.18)}
html body #main{gap:10px;background:transparent}
html body #videoArea{background:transparent;padding:0}
html body #liveWrap{border-radius:24px;background:var(--ds-video);box-shadow:0 30px 60px -28px rgba(0,0,0,.9),0 0 0 1px var(--ds-line)}
html body #liveOffline{background:radial-gradient(420px 260px at 50% 45%,rgba(61,139,255,.16),transparent 70%),var(--ds-video)}
html body #liveStatus{border-radius:999px;background:rgba(8,12,22,.6);border:1px solid rgba(255,255,255,.14);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
html body #muteBtn,html body #teacherImageCloseBtn{border-radius:50%;background:rgba(8,12,22,.55);border:1px solid rgba(255,255,255,.16);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
html body #videoPlayBtn .circle{border-radius:50%;background:var(--grad);box-shadow:0 14px 40px -10px rgba(61,139,255,.7)}
html body #sharingPlaceholder{border-radius:24px;background:var(--ds-glass);border:1px solid var(--ds-line);margin:0}

html body #sidePanel{border-radius:24px;overflow:hidden;border-inline-start:1px solid var(--ds-line)}
html body .tabs{border-bottom:1px solid var(--ds-line);padding:8px;gap:6px}
html body .tabs button{border-radius:999px;padding:9px}
html body .tabs button.active{background:var(--ds-chip);color:var(--ds-chip-ink);box-shadow:0 0 0 1px var(--ds-chip-line) inset}
html body .tabs button.active::after{display:none}
html body .msg .bubble{background:rgba(255,255,255,.06);border:1px solid var(--ds-line);border-radius:18px 18px 18px 6px;box-shadow:none;backdrop-filter:blur(6px)}
html[data-theme="light"] body .msg .bubble{background:#fff}
html body .msg.mine .bubble{background:var(--grad);border-color:transparent;color:#fff;border-radius:18px 18px 6px 18px}
html body #chatInputRow{border-top:1px solid var(--ds-line);padding:10px}
html body #chatInput{border-radius:999px;padding:10px 16px}
html body #chatSend{padding:10px 18px}
html body .p-row{background:rgba(255,255,255,.04);border:1px solid var(--ds-line);border-radius:14px}
html[data-theme="light"] body .p-row{background:#fff}
html body .p-row:hover{border-color:rgba(111,178,255,.45)}
html body .approve-btn{border-radius:999px}
html body .hand-badge{border-radius:999px}
html body .speaking-queue-panel{background:var(--ds-chip);border-color:var(--ds-chip-line);border-radius:16px}

/* Floating dock */
html body #controlBar{align-self:center;width:auto;max-width:100%;border-radius:999px;padding:8px 10px;gap:8px;border-top:1px solid var(--ds-line)}
html body #controlBar .ctrl-btn{border-radius:18px;background:rgba(255,255,255,.06);border:1px solid var(--ds-line);color:var(--text);box-shadow:none;min-width:74px}
html[data-theme="light"] body #controlBar .ctrl-btn{background:#fff}
html body #controlBar .ctrl-btn:hover{transform:translateY(-2px);border-color:rgba(111,178,255,.55);background:rgba(61,139,255,.12)}
html body #controlBar .ctrl-btn.on{background:var(--grad);color:#fff;border-color:transparent;box-shadow:0 10px 26px -10px rgba(61,139,255,.7)}
html body #controlBar .ctrl-btn.leave{background:rgba(239,68,68,.14);border-color:rgba(239,68,68,.4);color:#ffb4b4}
html body #controlBar .ctrl-btn.leave:hover{background:rgba(239,68,68,.26)}
html body #controlBar .ctrl-btn.raise{background:rgba(245,158,11,.13);border-color:rgba(245,158,11,.4);color:#fcd38a}
html body #controlBar .ctrl-btn.raise.active{background:linear-gradient(180deg,#f7b955,#d98a12);color:#2a1700;border-color:transparent}
html[data-theme="light"] body #controlBar .ctrl-btn.leave{color:#b42318}
html[data-theme="light"] body #controlBar .ctrl-btn.raise{color:#8a5a00}
html body #teachToolsBtn{background:rgba(61,139,255,.16)!important;border-color:var(--ds-chip-line)!important;color:var(--text)!important}

html body #supportBar{background:transparent;border-top:0;color:var(--muted);padding:2px 8px 4px}
html body #supportBar a{color:var(--ds-chip-ink)}
html body #speakNowBtn{border-radius:999px;box-shadow:0 12px 30px -10px rgba(52,211,153,.6)}
html body #audioUnlockBtn,html body #teachToast,html body #speakingQueueNotice{border-radius:999px}

/* Support chat */
html body #supportBubble,html body.class-in-session #supportBubble{border-radius:50%!important}
html body #supportPanel{border-radius:24px}
html body #supportHead{background:transparent;color:var(--text);border-bottom:1px solid var(--ds-line)}
html body #supportHead button{background:rgba(255,255,255,.08);color:var(--text);border-radius:50%}
html body #supportMsgs{background:transparent}
html body .smsg2{border-radius:16px}
html body .smsg2.visitor{background:var(--grad)}
html body .smsg2.admin{background:rgba(255,255,255,.07);border:1px solid var(--ds-line)}
html body #supportInputRow{background:transparent;border-top:1px solid var(--ds-line)}
html body #supportInputRow input{border-radius:999px}

/* Dialogs */
html body #betaModal,html body .diag-window{border-radius:26px;border-top:1px solid var(--ds-line)}
html body #betaModal .phone{border-radius:999px}
html body .diag-overlay,html body #betaOverlay{background:rgba(2,3,6,.72);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
html body #teachingTray{border-radius:24px!important;color:var(--text)}
html body #teachingTray button{border-radius:999px;background:rgba(255,255,255,.06);border-color:var(--ds-line)}
html body #teachingTray button:hover{background:rgba(61,139,255,.18)}
html body #teachingTray .teach-selected{background:var(--grad)!important;border-color:transparent!important}
html body .teach-floating{border-radius:999px;background:rgba(8,12,22,.7);border-color:rgba(255,255,255,.14);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}

/* ---------- Responsive ---------- */
@media (max-width:1100px) and (min-width:761px){
  html body #controlBar .ctrl-btn{min-width:66px}
}
@media (max-width:760px){
  html body #app{padding:8px;gap:8px}
  /* one-row top bar */
  html body #topbar{flex-wrap:nowrap!important;padding:8px 10px;gap:8px;border-radius:18px}
  html body #topbar .brand{flex:1 1 auto!important;flex-basis:auto!important;min-width:0;font-size:13px}
  html body #topClassTitle{max-width:none!important}
  html body #topbar .right{width:auto!important;flex:0 0 auto;flex-wrap:nowrap;gap:6px}
  html body #meLabel{display:none}
  html body #themeToggle{font-size:0!important;width:34px;height:34px;padding:0!important;display:grid;place-items:center}
  html body #themeToggle::before{content:"◐";font-size:16px;line-height:1}
  html body #classDiagnosticsButton{padding:7px 10px!important}
  /* video keeps 16:9 instead of a short strip */
  html body #main{gap:8px}
  html body #videoArea{flex:0 0 auto!important;height:auto!important;padding:0!important}
  html body #liveWrap{height:auto!important;aspect-ratio:16/9;max-height:42dvh;border-radius:18px}
  html body #liveVideo{object-fit:contain}
  html body #sidePanel{border-radius:20px;border-top:1px solid var(--ds-line)!important}
  html body #chatInput{font-size:16px}
  /* dock: always ONE row; buttons share the width, labels may take two short lines; with many buttons it scrolls sideways */
  html body #controlBar{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;align-items:stretch;align-self:stretch;width:100%;border-radius:22px;padding:5px!important;gap:5px!important;overflow-x:auto!important;overflow-y:hidden!important;min-height:0;scrollbar-width:none}
  html body #controlBar::-webkit-scrollbar{display:none}
  html body #controlBar>.ctrl-btn,html body #controlBar>#teachToolsBtn,html body #controlBar>#classDiagnosticsControl{flex:1 0 50px!important;width:auto!important;min-width:50px!important;max-width:none!important;min-height:54px!important;padding:6px 2px!important;border-radius:15px;gap:3px!important;margin:0!important}
  html body #controlBar .ctrl-label{display:block!important;font-size:9px!important;line-height:1.3;white-space:normal!important;text-align:center;overflow:hidden;max-height:2.6em;max-width:100%;word-break:keep-all}
  html body #controlBar .ctrl-btn svg{width:19px;height:19px}
  /* footer: credit on its own line, quieter */
  html body #supportBar{flex-wrap:wrap;justify-content:center;gap:4px 8px;font-size:10px;padding:0 6px max(4px,env(safe-area-inset-bottom))}
  html body #supportBar .live-ghost-credit{flex-basis:100%;order:2;padding:2px 0!important;margin:0!important;font-size:9.5px!important}
  html body .intro-hero{padding:26px 20px;border-radius:26px}
  html body .join-card{padding:26px 20px;border-radius:24px}
  html body .intro-entry button{width:100%}
}
@media (max-height:520px) and (orientation:landscape){
  html body #app{padding:6px;gap:6px}
  html body #liveWrap{aspect-ratio:auto;max-height:none;height:100%!important}
  html body #videoArea{flex:1 1 0!important;height:auto!important}
  html body #controlBar{border-radius:18px;padding:4px 8px!important}
}
@media (prefers-reduced-motion:reduce){
  html body *{transition:none!important}
}
/* Teacher's expanded board / fullscreen stays edge-to-edge */
html body #liveWrap.teach-expanded,html body #liveWrap:fullscreen{border-radius:0!important;box-shadow:none!important}

/* ---------- Teaching tools tray (classroom v1.3.0) ---------- */
html body #teachingTray{padding:0 16px 18px!important;border-radius:26px!important;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent}
html body #teachingTray>.teach-row:first-child{display:flex!important;position:sticky;top:0;z-index:6;align-items:center;justify-content:space-between;margin:0 -16px 4px!important;padding:14px 16px!important;
  background:linear-gradient(180deg,rgba(16,23,38,.98),rgba(12,17,29,.9))!important;border-bottom:1px solid var(--ds-line)!important;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
html[data-theme="light"] body #teachingTray>.teach-row:first-child{background:linear-gradient(180deg,rgba(255,255,255,.98),rgba(255,255,255,.9))!important}
html body #teachingTray h3{display:flex;align-items:center;gap:10px;margin:0!important;font-size:16px!important;font-weight:800;color:var(--text)}
html body #teachingTray h3::before{content:"";width:34px;height:34px;flex:0 0 34px;border-radius:12px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Cpath d='M17.5 14v7M14 17.5h7'/%3E%3C/svg%3E") center/18px no-repeat,var(--grad);box-shadow:0 1px 0 rgba(255,255,255,.45) inset,0 8px 20px -8px rgba(61,139,255,.7)}
html body #teachingTray #teachClose{width:36px;height:36px;min-height:0;padding:0!important;border-radius:50%!important;font-size:0!important;display:grid!important;place-items:center;background:rgba(255,255,255,.07)!important;border:1px solid var(--ds-line)!important}
html body #teachingTray #teachClose::before{margin:0}
html body #teachingTray #teachClose:hover{background:rgba(239,68,68,.18)!important;border-color:rgba(239,68,68,.45)!important}
html body #teachStatus:not(:empty){margin:10px 0 2px;padding:8px 12px;border-radius:12px;background:var(--ds-chip);border:1px solid var(--ds-chip-line);color:var(--ds-chip-ink)!important}

/* The app hides tools with the hidden attribute: never override that */
html body #teachingTray [hidden],html body .teach-floating [hidden]{display:none!important}

/* Section titles with a divider */
html body #teachingTray h4{display:flex;align-items:center;gap:8px;margin:18px 0 10px!important;padding-top:16px;border-top:1px solid var(--ds-line);color:var(--ds-chip-ink)!important;font-size:13px!important;font-weight:800;letter-spacing:.01em}
html body #teachingTray h4::before{content:"";width:4px;height:15px;border-radius:4px;background:var(--grad)}
html body #teachTeacher>h4:first-child{border-top:0;padding-top:4px;margin-top:10px!important}
html body #teachingTray p{font-size:12px!important;color:var(--muted)!important;line-height:1.9;margin:8px 2px 0}

/* Button grid */
html body #teachingTray .teach-row:not(:first-child){display:grid!important;grid-template-columns:repeat(auto-fill,minmax(128px,1fr));gap:8px;align-items:stretch}
html body #teachingTray button:not(#teachClose){display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:8px 12px!important;border-radius:14px!important;
  background:rgba(255,255,255,.06)!important;border:1px solid var(--ds-line)!important;color:var(--text)!important;font-size:12.5px!important;font-weight:600;line-height:1.5;text-align:center;
  transition:transform .2s,border-color .2s,background .2s}
html[data-theme="light"] body #teachingTray button:not(#teachClose){background:#fff!important}
html body #teachingTray button:not(#teachClose):hover{transform:translateY(-1px);border-color:rgba(111,178,255,.55)!important;background:rgba(61,139,255,.14)!important}
html body #teachingTray button:disabled{opacity:.45;transform:none}
html body #teachingTray button.teach-selected:not(#teachClose),html body #teachingTray button[aria-pressed="true"]:not(#teachClose){background:var(--grad)!important;border-color:transparent!important;color:#fff!important;box-shadow:0 10px 24px -12px rgba(61,139,255,.8)}
html body #teachingTray button#teachTakeControl:not(#teachClose),html body #teachingTray button#teachTakeScreen:not(#teachClose),html body #teachingTray button#teachClear:not(#teachClose){color:#ffb4b4!important;background:rgba(239,68,68,.08)!important;border-color:rgba(239,68,68,.32)!important}
html[data-theme="light"] body #teachingTray button#teachTakeControl:not(#teachClose),html[data-theme="light"] body #teachingTray button#teachTakeScreen:not(#teachClose),html[data-theme="light"] body #teachingTray button#teachClear:not(#teachClose){color:#b42318!important}
html body #teachingTray button#teachUpload:not(#teachClose){width:100%;min-height:46px;background:var(--grad)!important;border-color:transparent!important;color:#fff!important;font-weight:800;box-shadow:0 1px 0 rgba(255,255,255,.45) inset,0 12px 28px -12px rgba(61,139,255,.8)}

/* Icons (currentColor via mask) */
html body #teachBoard::before,html body #teachLive::before,html body #teachCameraBtn::before,html body #teachUpload::before,html body #teachClear::before,html body #teachSave::before,html body #teachStudentScreen::before,html body #teachGiveControl::before,html body #teachTakeControl::before,html body #teachGiveScreen::before,html body #teachTakeScreen::before,html body #teachPlay::before,html body #teachPause::before,html body #teachClose::before,html body #teachPrev::before,html body #teachNext::before,html body #teachZoom::before,html body #teachFull::before{content:"";width:16px;height:16px;flex:0 0 16px;background:currentColor;-webkit-mask:var(--ds-ico) center/contain no-repeat;mask:var(--ds-ico) center/contain no-repeat}
html body #teachBoard{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2'/%3E%3Cpath d='M8 20l4-4 4 4'/%3E%3C/svg%3E")}
html body #teachLive{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 14 4 9l5-5'/%3E%3Cpath d='M4 9h10.5a5.5 5.5 0 0 1 0 11H11'/%3E%3C/svg%3E")}
html body #teachCameraBtn{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 8l-6 4 6 4V8z'/%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3C/svg%3E")}
html body #teachUpload{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M17 8l-5-5-5 5'/%3E%3Cpath d='M12 3v12'/%3E%3C/svg%3E")}
html body #teachClear{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 20H8l-4-4 10-10 7 7-6 6'/%3E%3Cpath d='M7 11l6 6'/%3E%3C/svg%3E")}
html body #teachSave{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E")}
html body #teachStudentScreen{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E")}
html body #teachGiveControl{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6-6 6'/%3E%3C/svg%3E")}
html body #teachTakeControl{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E")}
html body #teachGiveScreen{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3Cpath d='M9 10l3-3 3 3M12 7v6'/%3E%3C/svg%3E")}
html body #teachTakeScreen{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3Cpath d='M3 2l18 18'/%3E%3C/svg%3E")}
html body #teachPlay{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 4l13 8-13 8z'/%3E%3C/svg%3E")}
html body #teachPause{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5v14M16 5v14'/%3E%3C/svg%3E")}
html body #teachClose{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E")}
html body #teachPrev{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E")}
html body #teachNext{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E")}
html body #teachZoom{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E")}
html body #teachFull{--ds-ico:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E")}

/* Fields */
html body #teachingTray select,html body #teachingTray input#teachText{min-height:42px;border-radius:14px!important;background:rgba(255,255,255,.05)!important;border:1px solid var(--ds-line)!important;color:var(--text)!important;padding:8px 12px!important;font-size:13px}
html[data-theme="light"] body #teachingTray select,html[data-theme="light"] body #teachingTray input#teachText{background:#fff!important}
html body #teachingTray select option{background:#0e1524;color:#f4f7fb}
html body #teachPerson{width:100%}
html body #teachDrawControls .teach-row{grid-template-columns:minmax(0,1fr) 46px minmax(0,1.2fr)!important}
html body #teachTeacher>.teach-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}
html body #teachTeacher>.teach-row button:not(#teachClose){flex-direction:column;gap:4px;padding:9px 4px!important}
html body #teachingTray #teachColor{width:46px;height:42px;padding:5px!important;border-radius:14px!important;background:rgba(255,255,255,.05)!important;border:1px solid var(--ds-line)!important;cursor:pointer}
html body #teachColor::-webkit-color-swatch-wrapper{padding:0}
html body #teachColor::-webkit-color-swatch{border:0;border-radius:9px}
html body #teachColor::-moz-color-swatch{border:0;border-radius:9px}
html body #teachMediaControls .teach-row{grid-template-columns:auto auto minmax(0,1fr)!important}
html body #teachingTray input[type=range]{accent-color:#3d8bff;width:100%}

/* Class files */
html body #teachFiles{display:flex;flex-direction:column;gap:8px}
html body #teachingTray .teach-file{margin:0;padding:12px;border-radius:16px;background:rgba(255,255,255,.04);border:1px solid var(--ds-line)}
html body #teachingTray .teach-file strong{font-size:13px;color:var(--text)}
html body #teachingTray .teach-file div{display:flex;flex-wrap:wrap;gap:6px}
html body #teachingTray .teach-file button:not(#teachClose){min-height:34px;padding:6px 10px!important;font-size:11.5px!important}

/* Slide controls floating on the video */
html body .teach-floating{gap:6px;padding:6px!important}
html body .teach-floating button{display:inline-flex;align-items:center;gap:6px;border-radius:999px!important;background:rgba(255,255,255,.09)!important;border:1px solid rgba(255,255,255,.16)!important;color:#fff!important;padding:7px 12px!important}
html body .teach-floating button:hover{background:rgba(61,139,255,.3)!important}
html body #teachPage{padding:0 6px;font-size:12px;color:#cfe0ff}

@media (max-width:760px){
  html body #teachingTray{padding:0 12px 14px!important;border-radius:22px!important}
  html body #teachingTray>.teach-row:first-child{margin:0 -12px 4px!important;padding:12px!important}
  html body #teachingTray .teach-row:not(:first-child){grid-template-columns:repeat(2,minmax(0,1fr))}
  html body #teachTeacher>.teach-row{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html body #teachTeacher>.teach-row button{flex-direction:column;gap:4px;padding:8px 4px!important;font-size:11.5px!important}
  html body #teachingTray button:not(#teachClose){font-size:12px!important}
}

/* Floating slide controls: hide/show toggle (teach-floating-toggle.js) */
html body .teach-floating .tf-toggle{width:32px;height:32px;min-height:0;flex:0 0 32px;padding:0!important;display:grid!important;place-items:center;border-radius:50%!important;
  background:rgba(255,255,255,.1)!important;border:1px solid rgba(255,255,255,.18)!important;color:#fff!important;cursor:pointer}
html body .teach-floating .tf-toggle::before{content:"";width:16px;height:16px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center/contain no-repeat}
html body .teach-floating .tf-toggle:hover{background:rgba(61,139,255,.35)!important}
html body .teach-floating.tf-collapsed{padding:4px!important;gap:0!important;background:rgba(8,12,22,.5)!important;opacity:.8;transition:opacity .2s}
html body .teach-floating.tf-collapsed:hover{opacity:1}
html body .teach-floating.tf-collapsed>*:not(.tf-toggle){display:none!important}
html body .teach-floating.tf-collapsed .tf-toggle{width:36px;height:36px;flex-basis:36px;background:var(--grad)!important;border-color:transparent!important;box-shadow:0 8px 20px -8px rgba(61,139,255,.8)}
html body .teach-floating.tf-collapsed .tf-toggle::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h2M10 17h10'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='8' cy='17' r='2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h10M18 7h2M4 17h2M10 17h10'/%3E%3Ccircle cx='16' cy='7' r='2'/%3E%3Ccircle cx='8' cy='17' r='2'/%3E%3C/svg%3E")}

/* ---------- Chat tools: reply / react / pin / delete (chat-actions.js) ---------- */
html body .stored-chat{position:relative}
html body.cc-teacher #chatMessages .stored-chat{max-width:calc(100% - 40px)!important}
html body .msg-tools{position:absolute;top:20px;inset-inline-end:-34px;width:28px;height:28px;padding:0;border-radius:50%;display:grid;place-items:center;
  background:rgba(255,255,255,.06);border:1px solid var(--ds-line);color:var(--muted);font-size:16px;line-height:1;opacity:.55;cursor:pointer;transition:opacity .2s,background .2s,color .2s}
html body .msg.mine .msg-tools{inset-inline-end:auto;inset-inline-start:-34px}
html body .stored-chat:hover .msg-tools,html body .msg-tools:focus-visible{opacity:1}
html body .msg-tools:hover{background:rgba(61,139,255,.2);color:var(--text)}
@media (hover:none){html body .msg-tools{opacity:.9}}
html body .msg-reply{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin:0 0 6px;padding:5px 10px;border:0;border-inline-start:3px solid #6fb2ff;border-radius:10px;
  background:rgba(255,255,255,.08);color:inherit;font:inherit;font-size:11.5px;line-height:1.6;text-align:start;cursor:pointer;white-space:normal}
html body .msg-reply b{font-size:11px;color:#9cc9ff}
html body .msg.mine .msg-reply{background:rgba(255,255,255,.18);border-inline-start-color:#fff}
html body .msg.mine .msg-reply b{color:#fff}
html body .msg-reply span{opacity:.85;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
html body .msg-reply:disabled{cursor:default;opacity:.7}
html[data-theme="light"] body .msg-reply{background:rgba(47,116,255,.07)}
html[data-theme="light"] body .msg-reply b{color:#2459c8}
html body .msg-reacts{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}
html body .msg.mine .msg-reacts{justify-content:flex-end}
html body .react-chip{display:inline-flex;align-items:center;gap:3px;padding:1px 8px;border-radius:999px;font-size:12px;line-height:1.7;background:rgba(255,255,255,.07);border:1px solid var(--ds-line)}
html body .react-chip.mine{background:var(--ds-chip);border-color:var(--ds-chip-line)}
html body .stored-chat.is-pinned .bubble{box-shadow:0 0 0 1px rgba(111,178,255,.55),0 6px 18px -10px rgba(61,139,255,.7)}
html body .stored-chat.flash .bubble{animation:ccFlash 1.4s ease}
@keyframes ccFlash{0%,100%{outline:0 solid transparent}25%{outline:3px solid rgba(111,178,255,.75);outline-offset:2px}}

html body .chat-pinned{display:flex;align-items:center;gap:6px;margin:8px 10px 0;padding:5px 6px 5px 10px;border-radius:14px;background:var(--ds-chip);border:1px solid var(--ds-chip-line);flex-shrink:0}
html body .cp-body{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:1px;padding:0;background:none;border:0;color:var(--text);font:inherit;text-align:start;cursor:pointer}
html body .cp-label{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:800;color:var(--ds-chip-ink)}
html body .cp-label::before{content:"";width:11px;height:11px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17v5'/%3E%3Cpath d='M9 10.8V4h6v6.8l3 3.2v3H6v-3z'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17v5'/%3E%3Cpath d='M9 10.8V4h6v6.8l3 3.2v3H6v-3z'/%3E%3C/svg%3E") center/contain no-repeat}
html body .cp-text{max-width:100%;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body .cp-unpin,html body .crb-close{flex:0 0 26px;width:26px;height:26px;padding:0;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.08);border:1px solid var(--ds-line);color:var(--text);font-size:12px;cursor:pointer}
html body .cp-unpin:hover,html body .crb-close:hover{background:rgba(239,68,68,.2)}

html body .chat-reply-bar{display:flex;align-items:center;gap:8px;margin:0 10px -2px;padding:7px 10px;border-radius:14px 14px 6px 6px;background:var(--ds-chip);border:1px solid var(--ds-chip-line);border-bottom:0;flex-shrink:0}
html body .chat-reply-bar[hidden]{display:none}
html body .crb-text{flex:1;min-width:0;display:flex;flex-direction:column;font-size:12px;line-height:1.6}
html body .crb-text b{color:var(--ds-chip-ink);font-size:11.5px}
html body .crb-text span{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

html body .msg-menu{position:fixed;z-index:30000;min-width:200px;padding:8px;border-radius:18px;background:var(--ds-glass-solid);border:1px solid var(--ds-line);
  box-shadow:var(--ds-shadow);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);animation:ccMenu .14s ease}
@keyframes ccMenu{from{opacity:0;transform:translateY(4px) scale(.98)}to{opacity:1;transform:none}}
html body .mm-reacts{display:flex;justify-content:space-between;gap:4px;padding:0 0 8px;margin-bottom:6px;border-bottom:1px solid var(--ds-line)}
html body .mm-emoji{width:30px;height:30px;padding:0;border-radius:50%;display:grid;place-items:center;font-size:16px;line-height:1;background:rgba(255,255,255,.06);border:1px solid transparent;cursor:pointer;transition:transform .15s}
html body .mm-emoji:hover{transform:scale(1.15)}
html body .mm-emoji.on{background:var(--ds-chip);border-color:var(--ds-chip-line)}
html body .mm-item{display:block;width:100%;padding:9px 12px;border-radius:12px;background:none;border:0;color:var(--text);font:inherit;font-size:13px;text-align:start;cursor:pointer}
html body .mm-item:hover,html body .mm-item:focus-visible{background:rgba(61,139,255,.14)}
html body .mm-delete{color:#ff9b9b}
html[data-theme="light"] body .mm-delete{color:#b42318}
html body .mm-delete:hover{background:rgba(239,68,68,.14)}

/* Live attendance pill in the top bar (presence-count.js) */
html body .presence-pill{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto;margin-inline-start:4px;padding:4px 11px 4px 9px;border-radius:999px;
  background:rgba(52,211,153,.12);border:1px solid rgba(52,211,153,.35);color:#9ff0cf;font:inherit;font-size:12px;font-weight:600;line-height:1.6;cursor:pointer;white-space:nowrap;transition:background .2s,border-color .2s}
html body .presence-pill[hidden]{display:none}
html body .presence-pill:hover{background:rgba(52,211,153,.2);border-color:rgba(52,211,153,.6)}
html body .presence-pill .pp-icon{width:15px;height:15px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E") center/contain no-repeat}
html body .presence-pill .pp-num{font-size:13px;font-weight:800;color:#d6ffef}
html[data-theme="light"] body .presence-pill{background:rgba(16,185,129,.1);border-color:rgba(16,185,129,.35);color:#047857}
html[data-theme="light"] body .presence-pill .pp-num{color:#065f46}
@media (max-width:760px){html body .presence-pill{padding:3px 9px 3px 7px;font-size:11px}html body .presence-pill .pp-label{display:none}}

/* Slide controls on the video: never squeezed to half the frame (it is centred with left:50%); icons only on phones */
html body .teach-floating{width:max-content;max-width:calc(100% - 18px)}
@media (max-width:760px){
  html body .teach-floating{gap:4px!important;padding:4px!important;bottom:8px}
  html body .teach-floating button:not(.tf-toggle):not(#teachUnlock){font-size:0!important;gap:0!important;width:34px;height:34px;padding:0!important;justify-content:center}
  html body .teach-floating button:not(.tf-toggle):not(#teachUnlock)::before{width:17px;height:17px;flex-basis:17px}
  html body .teach-floating .tf-toggle{width:30px;height:30px;flex-basis:30px}
  html body #teachPage{font-size:11px;padding:0 4px}
}
