/* SEDNIVO Board: single tool rail plus controls anchored to four corners. */
body.canvas-first .ta-lesson-top-right{
 position:absolute;z-index:135;top:10px;right:12px;
 display:flex;align-items:center;gap:6px;padding:4px 7px;
 border:1px solid #d3ddeb;border-radius:14px;
 background:#fffffff8;box-shadow:0 3px 15px #071f4f1e;
 font:600 12px system-ui,sans-serif;
}
.ta-lesson-top-right #taDockTalk,.ta-lesson-top-right #recordVideo{
 display:flex;align-items:center;justify-content:center;
 min-width:43px;min-height:36px;height:36px;padding:5px 9px;
 border:1px solid #d4dfed;border-radius:9px;
 background:#f9fbff;color:#183854;
 font:700 19px/1 system-ui,sans-serif;
}
/* The Talk popover belongs to the top-right menu, never the bottom dock.
   Closing it only hides the controls; WebRTC media keeps running. */
body.canvas-first .ta-lesson-top-right #taTalkPanel{
 position:absolute;top:calc(100% + 8px);right:0;bottom:auto;left:auto;
 transform:none;width:min(390px,calc(100vw - 18px));
 max-height:calc(100dvh - 200px);overflow-y:auto;
 z-index:1;
}
.ta-lesson-top-right #taDockTalk.active{
 background:#e7c96e;color:#071f4f;border-color:#cfaf52;
}
.ta-lesson-top-right #recordVideo{
 font-size:12px;color:#982834;
}
.ta-lesson-top-right #recordVideo.is-recording{
 background:#b72c35;border-color:#b72c35;color:#fff;
}
.ta-lesson-top-right #recordClock{min-width:45px}
.ta-lesson-top-right #recordState{display:none!important}
.ta-lesson-presence{display:flex;align-items:center;gap:4px;margin-right:5px}
.ta-lesson-presence[hidden]{display:none!important}
.ta-presence-avatar{
 width:32px;height:32px;border-radius:50%;
 display:grid;place-items:center;
 border:2px solid #d3dce7;background:#e5eaf0;
 color:#8795a5;font:700 13px system-ui,sans-serif;
 position:relative;
}
.ta-presence-avatar.online{
 background:#dceeff;border-color:#82b7ea;color:#124679;
}
.ta-presence-avatar.online:after{
 content:"";position:absolute;right:-2px;bottom:0;
 width:9px;height:9px;border:2px solid #fff;
 border-radius:50%;background:#27a76d;
}
body.canvas-first .ta-lesson-history{
 position:fixed;z-index:130;bottom:12px;left:11px;
 display:flex;flex-direction:column;gap:4px;
 padding:5px;border-radius:13px;
 border:1px solid #d6e0ec;background:#fffffff9;
 box-shadow:0 4px 18px #071f4f1e;
}
.ta-lesson-history button{
 width:41px;min-width:41px;height:39px;min-height:39px;
 font:700 23px/1 system-ui,sans-serif;
 border:0;border-radius:9px;padding:0;
 color:#1c3c5f;background:transparent;
}
.ta-lesson-history button:hover{background:#eaf1fb}
.ta-lesson-history button:disabled{opacity:.35}
body.canvas-first #viewControls{display:flex!important}
body.canvas-first #viewControls #taJumpTeacher{
 display:inline-flex!important;
 align-items:center;justify-content:center;
 min-width:35px;min-height:34px;font-size:18px;
 color:#155a9c;background:#e9f2fc;border-color:#bdd1e8
}
body.canvas-first #viewControls #taJumpTeacher:disabled{opacity:.3}
body.canvas-first #taRecordCameraPreview{
 position:absolute;right:13px;bottom:66px;z-index:12;
 width:clamp(150px,22vw,230px);aspect-ratio:16/9;
 border-radius:10px;object-fit:cover;
 border:2px solid white;background:#0d2236;
 box-shadow:0 4px 18px #071f4f40;
 pointer-events:none;
}
body.canvas-first #taRecordCameraPreview[hidden]{display:none!important}
@media(min-width:1160px){
 body.canvas-first #liveBar{
  left:50%!important;right:auto!important;
  transform:translateX(-50%)!important;
  top:7px!important;max-width:min(450px,38vw)!important;
 }
}
@media(max-width:790px){
 body.canvas-first .ta-lesson-top-right{top:8px;right:7px;padding:3px 4px;gap:3px}
 .ta-lesson-top-right #taDockTalk,.ta-lesson-top-right #recordVideo{
  min-width:34px;min-height:32px;height:32px;padding:4px 6px
 }
 .ta-lesson-top-right #recordVideo{font-size:10px}
 .ta-presence-avatar{width:25px;height:25px;font-size:11px}
 body.canvas-first .ta-lesson-history{
  bottom:calc(72px + env(safe-area-inset-bottom,0px));left:7px;
 }
 body.canvas-first #taRecordCameraPreview{right:8px;bottom:112px;width:140px}
 body.canvas-first #viewControls{
  bottom:calc(72px + env(safe-area-inset-bottom,0px))!important;right:7px!important;
 }
}

/* On a phone the brand emblem, not a clipped wordmark, sits beside Talk. */
@media(max-width:510px){
 /* On narrow screens page navigation fills the first row of the board. */
 body.canvas-first .ta-lesson-top-right{top:58px}
 body.canvas-first header .ta-brand-wordmark{display:none}
 body.canvas-first header .brand{width:40px;min-width:40px}
}

/* 2026-10-18 — One coherent navigation layout:
   pages top center; history + zoom bottom center; communication on right. */
body.canvas-first #pageControls{
 position:absolute!important;top:9px!important;left:50%!important;right:auto!important;
 transform:translateX(-50%)!important;max-width:calc(100vw - 24px)!important;
}
body.canvas-first #viewControls,
body.canvas-first.ta-view-open #viewControls{
 display:flex!important;position:fixed!important;
 left:50%!important;right:auto!important;top:auto!important;
 transform:translateX(-50%)!important;
 bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
 z-index:134!important;width:max-content!important;
 max-width:calc(100vw - 14px)!important;
 align-items:center;justify-content:center;gap:4px!important;
}
body.canvas-first #viewControls .ta-history-inline{
 width:39px;min-width:39px;height:36px;min-height:36px;
 font:700 23px/1 system-ui,sans-serif;color:#173957;
 padding:0 2px;border-color:transparent;
}
body.canvas-first #viewControls .ta-history-inline:first-child{
 margin-right:5px;border-right:1px solid #dae2ec;border-radius:0;
}
body.canvas-first #viewControls .ta-history-inline:last-child{
 margin-left:5px;border-left:1px solid #dae2ec;border-radius:0;
}
body.canvas-first .ta-lesson-top-right{
 /* Both vertical rails start at exactly the same viewport height. */
 position:fixed;top:104px;right:12px;left:auto;
 flex-direction:column;align-items:center;justify-content:center;
 width:60px;padding:7px 5px;gap:6px;
}
body.canvas-first .ta-lesson-presence{
 flex-direction:column;align-items:center;gap:4px;margin:0;
}
body.canvas-first .ta-lesson-top-right #taDockTalk,
body.canvas-first .ta-lesson-top-right #recordVideo{
 width:48px;min-width:48px;min-height:41px;height:41px;
}
body.canvas-first .ta-lesson-top-right #recordVideo{
 font-size:11px;padding:3px 2px;
}
body.canvas-first .ta-lesson-top-right #recordClock{
 font:700 10px/1 ui-monospace,monospace;min-width:0;
}
body.canvas-first .ta-lesson-top-right #taTalkPanel{
 position:absolute;top:calc(100% + 8px);right:0;left:auto;bottom:auto;
 transform:none;max-height:calc(100dvh - 260px);z-index:4;
}
@media(max-height:620px) and (min-width:791px){
 body.canvas-first .ta-lesson-top-right{top:80px}
}
/* Prevent the target glyph from resembling another Redo arrow. */
body.canvas-first #viewControls #taJumpTeacher{
 min-width:37px;letter-spacing:-.02em;
 font:700 14px/1 system-ui,sans-serif;
}
/* Movable local camera, drag strip avoids swallowing stylus events. */
body.canvas-first #taRecordCameraTile{
 position:absolute;z-index:16;
 width:clamp(150px,22vw,230px);height:auto;
 border:2px solid white;border-radius:11px;overflow:hidden;
 background:#0d2236;box-shadow:0 4px 18px #071f4f50;
 user-select:none;touch-action:none;
}
body.canvas-first #taRecordCameraTile[hidden]{display:none!important}
body.canvas-first #taRecordCameraDrag{
 height:26px;padding:5px 9px;
 display:flex;align-items:center;justify-content:center;
 background:#071f4f;color:#fff;
 font:650 11px/1 system-ui,sans-serif;
 cursor:grab;touch-action:none;user-select:none;
}
body.canvas-first #taRecordCameraTile.is-dragging #taRecordCameraDrag{cursor:grabbing}
body.canvas-first #taRecordCameraPreview{
 position:static!important;display:block!important;
 width:100%!important;height:auto!important;
 aspect-ratio:16/9;object-fit:cover;
 border:0!important;border-radius:0!important;
 background:#0d2236;box-shadow:none!important;
 pointer-events:none;
}
@media(max-width:790px){
 body.canvas-first #pageControls{
  top:8px!important;max-width:calc(100vw - 14px)!important;
 }
 body.canvas-first #viewControls,
 body.canvas-first.ta-view-open #viewControls{
  bottom:calc(72px + env(safe-area-inset-bottom,0px))!important;
  gap:1px!important;padding:3px 4px;
 }
 body.canvas-first #viewControls .ta-history-inline{
  min-width:32px;width:32px;min-height:32px;height:32px;font-size:21px;
 }
 body.canvas-first #viewControls .ta-history-inline:first-child{margin-right:2px}
 body.canvas-first #viewControls .ta-history-inline:last-child{margin-left:2px}
 body.canvas-first .ta-lesson-top-right{
  /* On narrow touch screens the tool rail is horizontal at the bottom. */
  position:absolute;top:57px;right:7px;width:45px;padding:5px 3px;gap:4px;
 }
 body.canvas-first .ta-lesson-top-right #taDockTalk,
 body.canvas-first .ta-lesson-top-right #recordVideo{
  min-width:36px;width:36px;height:35px;min-height:35px;
 }
 body.canvas-first .ta-lesson-top-right #recordVideo{font-size:9px}
 body.canvas-first .ta-lesson-top-right #taTalkPanel{
  width:min(372px,calc(100vw - 18px));max-height:calc(100dvh - 300px);
 }
 body.canvas-first #taRecordCameraTile{width:150px}
}
