:root{font-family:system-ui,sans-serif;color:#192b43;background:#eef3f8;--navy:#152c47;--accent:#176858;--line:#ccd9e5;--muted:#4a6078}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}header{display:flex;justify-content:space-between;align-items:center;gap:1rem;background:var(--navy);color:#fff;padding:1rem max(1rem,calc((100vw - 1280px)/2));min-height:62px}a.brand{color:inherit;text-decoration:none;font-weight:800;white-space:nowrap;font-size:1.15rem}.brand span{font-weight:500;color:#a9dbd0}main{max-width:1320px;margin:auto;padding:1.5rem}h1,h2,p{margin:0}h1{font-size:clamp(1.75rem,4vw,3.1rem);line-height:1.08;overflow-wrap:anywhere}h2{font-size:1.13rem}p{line-height:1.45;color:var(--muted)}.eyebrow{font-size:.78rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--accent);margin-bottom:.6rem}#landing{max-width:870px;margin:5vh auto}.entrances{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:2rem 0 1rem}.entrances form,.panel{padding:1.1rem;border:1px solid var(--line);border-radius:14px;background:white;min-width:0}.entrances form{display:grid;gap:.65rem;align-content:start}.entrances label{display:grid;gap:.25rem}button,input,output{font:inherit}button{border:1px solid #aabed0;border-radius:7px;background:white;color:var(--navy);padding:.45rem .7rem;cursor:pointer;font-weight:650}button:disabled{opacity:.46;cursor:default}button[aria-pressed=true],.primary{background:var(--accent);color:white;border-color:var(--accent)}button:not(:disabled):hover{filter:brightness(.92)}input:not([type=color]){max-width:100%;border:1px solid #aabed0;border-radius:6px;padding:.45rem .6rem;color:var(--navy);background:#fff}input[type=color]{vertical-align:middle;width:34px;height:32px;border:1px solid #aabed0;background:#fff}button:focus-visible,input:focus-visible,a:focus-visible{outline:3px solid #3183cb;outline-offset:2px}.heading,.actions,.joinbar{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.heading{justify-content:space-between;margin-bottom:1rem}.heading.compact{margin-bottom:.55rem}.joinbar{background:#dff1ec;border:1px solid #bbddd4;padding:.65rem;border-radius:9px;margin-bottom:1rem}.joinbar input{flex:1;min-width:170px}.joinbar code{font-size:1rem;margin-left:.4rem}.teacher-layout,.student-layout{display:grid;gap:1rem;align-items:start}.teacher-layout{grid-template-columns:minmax(0,1fr) minmax(240px,310px)}.student-layout{grid-template-columns:minmax(145px,205px) minmax(0,1fr)}.sidebar{display:grid;gap:1rem}.panel p{margin:.3rem 0 .6rem}.file-label{display:block;margin:.5rem 0}.preview-frame{margin:1rem auto 0;width:max-content;max-width:100%;border:1px solid var(--line)}canvas{display:block;max-width:100%}#preview{height:auto}.actions output{min-width:6.2rem;text-align:center}ol,ul{padding-left:1.4rem;margin:.65rem 0 0}li{margin:.3rem 0;overflow-wrap:anywhere}li button{text-align:left;max-width:100%}#inbox{list-style:none;padding:0}#board{position:relative;max-width:850px;margin:.8rem auto 0;line-height:0;box-shadow:0 0 0 1px var(--line)}#backdrop{width:100%;height:auto}#ink{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:crosshair}#notice{margin:.9rem 0;color:#8f2424}#connection{font-size:.82rem;color:#d9e7f3;text-align:right}dialog{max-width:min(860px,94vw);border:1px solid var(--line);border-radius:12px}dialog::backdrop{background:#12294199}dialog img{max-width:100%;max-height:76vh;display:block;margin:.5rem auto 0}dialog form{float:right;margin-left:.5rem}@media(max-width:760px){main{padding:.8rem}.teacher-layout,.student-layout,.entrances{grid-template-columns:1fr}.student-layout aside ol{display:flex;flex-wrap:wrap;gap:.6rem;list-style:none;padding:0}.panel{padding:.75rem}}

h3{font-size:1rem;margin:.3rem 0}.view-tabs{margin-bottom:.8rem;border-bottom:1px solid var(--line);padding-bottom:.7rem}.view-controls{margin:.7rem 0}.view-controls output{min-width:3.2rem}.tools input[type=number]{width:65px}
#boardViewport{overflow:auto;height:min(72vh,900px);min-height:320px;background:#dce5ef;padding:16px;overscroll-behavior:contain;border-radius:8px}
#board{max-width:none;margin:0;box-shadow:0 2px 12px #132b4529;width:100%;flex-shrink:0}
#backdrop{max-width:none}#ink{max-width:none}#ink.pan-mode{cursor:grab}#ink.pan-mode:active{cursor:grabbing}
.graph-layout{display:grid;grid-template-columns:minmax(210px,280px) minmax(0,1fr);gap:.7rem;margin:.8rem 0}.graph-controls{background:#f5f8fc;border:1px solid var(--line);border-radius:9px;padding:.7rem}
.graph-help{font-size:.8rem!important}.equation{display:grid;grid-template-columns:18px 30px minmax(0,1fr) 30px;gap:4px;margin:.8rem 0}.equation input[type=text]{width:100%;min-width:0;font-size:.9rem}.equation input[type=color]{width:30px;height:33px}
.equation-error{grid-column:1/-1;color:#a8293c;font-size:.76rem;margin:0!important;line-height:1.25}
.parameter{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin-top:.7rem}.parameter input[type=number]{width:70px}.parameter input[type=range]{width:100%;padding:0;border:0}
.graph-canvas{width:100%;height:auto;touch-action:none;cursor:crosshair;background:white;border:1px solid var(--line);border-radius:8px}.graph-navigation{margin-bottom:.45rem}.graph-readout{font-size:.75rem;color:var(--muted)}
#teacherGraphPanel .graph-layout{grid-template-columns:1fr}#teacherGraphPanel .graph-controls{max-height:330px;overflow:auto}
#studentGraphPanel .graph-layout{grid-template-columns:230px minmax(0,1fr)}
@media(max-width:1000px){#studentGraphPanel .graph-layout{grid-template-columns:1fr}.graph-controls{max-height:310px;overflow:auto}}

.board-tools{display:grid;gap:.5rem;padding:.8rem 0}.board-tools input[type=number]{width:65px}.board-tools select{padding:5px;border-radius:6px;font:inherit}.ink-swatches{display:flex;gap:5px}.ink-swatch{width:22px;height:22px;border-radius:50%;border:1px solid #7d8fa5;padding:0}
.native-viewport{position:relative;overflow:auto;height:65vh;min-height:320px;background:#dbe5f0;padding:16px;overscroll-behavior:contain;touch-action:none;isolation:isolate;border:1px solid #c4d4e2;border-radius:8px}
.native-page{position:relative;background:white;box-shadow:0 2px 13px #152c4728;overflow:hidden}
.native-page canvas{position:absolute;max-width:none;touch-action:none}
.ink-tile{z-index:1}.board-status{font-size:.8rem}.board-timer{background:#152c47;color:white;border-radius:7px;padding:.7rem;margin:.5rem 0}.timer-readout{font:600 26px monospace}.board-timer input{width:65px}.geometry-tools{background:#eaf4fd;padding:.5rem;border-radius:7px}
body.presenting{background:#121c29;overflow:hidden;height:100dvh}body.presenting #presentationBoard{height:100%}body.presenting .native-viewport{height:100dvh;min-height:0;background:#121c29;border:0;padding:16px;border-radius:0}body.presenting .board-status{display:none}body.presenting .native-page{box-shadow:none;margin:auto}body.presenting .ink-tile{pointer-events:none}
.presentation-fullscreen{position:fixed;right:20px;top:16px;z-index:9;opacity:0;transition:opacity .2s}body.presenting:hover .presentation-fullscreen:focus,body.presenting:hover .presentation-fullscreen:hover{opacity:1}.presentation-fullscreen:focus-visible{opacity:1}
.presentation-wait{position:fixed;inset:45% 0 auto;color:#fff;text-align:center;z-index:5;pointer-events:none}
#teacherBoard .native-viewport{height:67vh}.teacher-layout{grid-template-columns:minmax(0,1fr) minmax(220px,265px)}
@media(max-width:900px){.teacher-layout{grid-template-columns:1fr}#teacherBoard .native-viewport{height:65vh}}

.native-clip{position:relative;overflow:hidden}
.native-clip .native-page{margin:0}
body.presenting .native-clip{margin:auto}
.presentation-frame{position:absolute;z-index:3;border:2px solid #136ad0;background:#2076d008;cursor:move;touch-action:none;box-shadow:0 0 0 20000px #10263c35}
.presentation-frame:focus-visible{outline:3px solid #ffbf47;outline-offset:3px}
.frame-caption{position:absolute;top:3px;left:6px;color:#0d4d95;background:#ffffffe8;padding:2px 5px;border-radius:3px;font-size:11px;font-weight:700;pointer-events:none;white-space:nowrap}
.presentation-frame button{position:absolute;width:15px;height:15px;min-width:15px;padding:0;border:2px solid #136ad0;border-radius:2px;background:white;touch-action:none}
.presentation-frame [data-corner=nw]{left:-8px;top:-8px;cursor:nwse-resize}
.presentation-frame [data-corner=ne]{right:-8px;top:-8px;cursor:nesw-resize}
.presentation-frame [data-corner=sw]{left:-8px;bottom:-8px;cursor:nesw-resize}
.presentation-frame [data-corner=se]{right:-8px;bottom:-8px;cursor:nwse-resize}

.input-check{margin-top:.5rem;padding:.6rem;border:1px solid var(--line);border-radius:7px;background:#f7fafc;font-size:.85rem}
.input-check summary{cursor:pointer;font-weight:650}.input-check p{max-width:70ch}.input-report{width:100%;height:180px;margin-top:.5rem;font:12px monospace}

/* Drawing tools sit beside the page while settings remain above it. */
.board-stage{display:grid;grid-template-columns:minmax(0,1fr) 102px;gap:10px;align-items:start}
.board-stage:has(.tool-rail[hidden]){grid-template-columns:minmax(0,1fr)}
.tool-rail{display:flex;flex-direction:column;flex-wrap:nowrap;align-items:stretch;gap:5px;padding:8px;background:#eef4fa;border:1px solid #c4d4e2;border-radius:9px;max-height:67vh;overflow-y:auto;position:sticky;top:10px}
.tool-rail button{width:100%;font-size:.8rem;padding:8px 4px;min-height:36px}
.zoom-selection{position:absolute;z-index:5;border:2px solid #176cc7;background:#176cc71f;pointer-events:none;box-sizing:border-box}
@media(max-width:600px){.board-stage{grid-template-columns:minmax(0,1fr) 76px;gap:5px}.tool-rail{padding:4px}.tool-rail button{font-size:.7rem}}
.eraser-outline{position:absolute;z-index:2;border:1.5px dotted #172f4b;border-radius:50%;pointer-events:none;box-sizing:border-box;box-shadow:0 0 0 1px #ffffffb3}
.presentation-frame{border-style:dashed}

/* Full-window teaching desk with persistent navigation and compact chrome. */
.icon-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:36px;height:36px;min-width:36px;padding:7px;border-radius:8px}
.icon-button svg,.pdf-upload svg,.advanced-ink-settings summary svg{width:21px;height:21px;display:block}
body.workspace-active{height:100dvh;overflow:hidden;background:#e5eaf0}
body.workspace-active>header{height:40px;min-height:40px;padding:0 16px;background:#202934;font-size:12px}
body.workspace-active a.brand{font-size:14px}
body.workspace-active>main{max-width:none;width:100%;height:calc(100dvh - 40px);padding:0;display:flex;flex-direction:column}
#teacher:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0}
.teacher-topbar{display:flex;gap:12px;align-items:center;padding:7px 14px;background:#fff;border-bottom:1px solid #d1dae4;flex-shrink:0}
.lesson-heading{display:flex;align-items:baseline;gap:12px;min-width:0;flex:1}.lesson-heading h1{font-size:16px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lesson-heading .eyebrow{font-size:10px;margin:0;white-space:nowrap}
.class-code{display:flex;gap:9px;align-items:center;font-size:12px;white-space:nowrap}.class-code code{font-size:19px;font-weight:750;letter-spacing:2px;color:#176858}
#end{font-size:12px;background:#fff5f4;color:#8e3630;border-color:#ead0cd;padding:8px}
#teacher .teacher-layout{display:flex;flex:1;gap:0;min-height:0;position:relative}
#teacher .preview{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;border:0;border-radius:0;padding:0;background:#e5eaf0}
#teacher .view-tabs{padding:5px 12px;margin:0;background:#f8fafc;gap:5px;flex-shrink:0;border:0}
.view-tabs button{padding:5px 12px;font-size:12px}
#teacherSlidePanel:not([hidden]){display:flex;flex-direction:column;min-height:0;flex:1}
.pdf-navigation{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 12px;background:white;border-block:1px solid #d5dfe8;flex-shrink:0}
.pdf-upload{position:relative;display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-size:12px;white-space:nowrap;border-radius:7px;padding:6px;background:#f0f5fa}
.pdf-upload input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}
.pdf-upload:focus-within{outline:2px solid #3183cb}
.page-navigation,.pdf-share-actions{display:flex;align-items:center;gap:5px}.page-navigation output{font-size:12px;white-space:nowrap;min-width:95px;text-align:center}
.page-jump-label{font-size:11px;display:flex;align-items:center;gap:5px;white-space:nowrap}#pageJump{width:55px;padding:5px}
.pdf-share-actions{border-left:1px solid #d5dfe8;padding-left:12px}
#teacherBoard,#studentBoard{display:flex;flex-direction:column;min-height:0;position:relative;flex:1}
#teacherBoard .board-tools,#studentBoard .board-tools{padding:6px 12px;gap:5px;background:#f8fafc;flex-shrink:0;border-bottom:1px solid #d5dfe8;font-size:12px}
.board-tools label{display:inline-flex;gap:5px;align-items:center}.board-tools .actions{gap:8px}.board-tools input[type=number]{padding:5px;width:61px}.ink-swatches{gap:6px}
.advanced-ink-settings{position:relative;margin-left:auto}.advanced-ink-settings summary{list-style:none;cursor:pointer;padding:5px;border:1px solid #b9c9d7;border-radius:7px}.advanced-ink-settings summary::-webkit-details-marker{display:none}
.advanced-ink-content{position:absolute;right:0;top:38px;z-index:15;display:grid;gap:12px;min-width:255px;background:white;box-shadow:0 8px 25px #14294133;border:1px solid #c5d2df;border-radius:10px;padding:15px}
.advanced-ink-content label{display:flex;justify-content:space-between;gap:10px}
#teacherBoard .board-stage,#studentBoard .board-stage{grid-template-columns:minmax(0,1fr) 52px;gap:0;flex:1;min-height:0}
#teacherBoard .native-viewport,#studentBoard .native-viewport{height:100%!important;min-height:0;border:0;border-radius:0;background:#dce3eb}
.tool-rail{background:#25303d;border:0;border-radius:0;padding:6px;gap:6px;position:static;max-height:100%;height:100%;overflow-y:auto;align-items:center;flex-wrap:nowrap}
.tool-rail .icon-button{color:#d5dfeb;background:transparent;border:1px solid transparent;width:38px;min-width:38px;height:38px;padding:8px}
.tool-rail .icon-button[aria-pressed=true]{background:#176858;color:#fff;border-color:#5cbb9f}.tool-rail .icon-button:hover{background:#405063}.tool-rail .icon-button:focus-visible{outline-offset:-2px}
.board-footer{padding:5px 12px;background:#202934;gap:7px;flex-shrink:0;color:#d9e5ee;font-size:11px;min-height:44px}.board-footer .icon-button{background:transparent;color:#e2eaf2;border-color:#4b5a6c;width:31px;height:31px;min-width:31px;padding:6px}.board-footer output{min-width:46px}.board-footer label{display:flex;align-items:center;gap:4px}
#teacherBoard .board-status,#studentBoard .board-status{font-size:10px;margin:0;padding:3px 12px;background:#f0f4f8;min-height:20px}
#teacherBoard .board-timer,#studentBoard .board-timer{position:absolute;z-index:12;top:50px;right:65px;max-width:calc(100% - 75px);box-shadow:0 6px 22px #14294133}
#teacherBoard .input-check,#studentBoard .input-check{position:absolute;z-index:14;bottom:68px;right:64px;max-width:min(480px,calc(100% - 80px));margin:0;font-size:11px;background:#ffffffed;box-shadow:0 3px 12px #14294120}.input-check:not([open]){opacity:.7;padding:4px 7px}
#classPanel{width:300px;flex:0 0 300px;overflow-y:auto;padding:12px;background:#f1f5f9;border-left:1px solid #c9d6e3;gap:12px;display:flex;flex-direction:column}#classPanel .panel{padding:12px;border-radius:9px}#classPanel h2{font-size:14px}#classPanel p{font-size:12px}#classPanel input{width:100%;font-size:11px;margin-bottom:10px}#classPanel button{font-size:12px}
#teacherGraphPanel{overflow:auto;padding:14px}#teacherGraphPanel .graph-layout{grid-template-columns:260px minmax(0,1fr)}
body.workspace-active #notice:not(:empty){position:fixed;left:16px;bottom:12px;z-index:30;max-width:calc(100vw - 32px);background:#fff4ed;border:1px solid #dcbba4;box-shadow:0 4px 16px #14294122;padding:10px 14px;border-radius:9px;margin:0}
#student:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0}#student>.heading{margin:0;padding:8px 14px;background:white;flex-shrink:0}#student>.heading h1{font-size:17px}#student>.heading .eyebrow{display:none}
#student .student-layout{flex:1;min-height:0;grid-template-columns:165px minmax(0,1fr);gap:0}#student .student-layout>aside{overflow:auto;border-radius:0;border:0;padding:12px}#student .work{display:flex;flex-direction:column;min-height:0;padding:0;border:0;border-radius:0}#student .heading.compact{padding:7px 12px;margin:0}#workStatus{font-size:10px;padding:0 12px}#student .view-tabs{margin:0;padding:5px 12px;flex-shrink:0}#studentSlidePanel:not([hidden]){display:flex;flex-direction:column;flex:1;min-height:0}#studentGraphPanel{overflow:auto;padding:12px}
@media(max-width:850px){.lesson-heading .eyebrow{display:none}.teacher-topbar{gap:7px}.pdf-navigation{gap:5px;padding:5px}.pdf-share-actions{padding-left:5px}.page-jump-label{display:none}#classPanel{position:absolute;right:0;top:0;bottom:0;z-index:20;box-shadow:-10px 0 30px #14294133}#teacherGraphPanel .graph-layout{grid-template-columns:1fr}}
@media(max-width:600px){.lesson-heading h1{max-width:120px}.teacher-topbar{padding:6px}.class-code{gap:4px}.class-code code{font-size:15px;letter-spacing:1px}.pdf-upload>span:last-of-type{display:none}.page-navigation output{min-width:75px;font-size:10px}.pdf-navigation .icon-button{width:29px;min-width:29px;height:31px;padding:5px}.pdf-share-actions{gap:3px}.board-tools .ink-swatches{display:none}.board-footer{padding:4px;gap:4px}.board-footer .icon-button{width:27px;min-width:27px}#student .student-layout{grid-template-columns:100px minmax(0,1fr)}#student .student-layout>aside{padding:5px;font-size:11px}#teacherBoard .board-stage,#studentBoard .board-stage{grid-template-columns:minmax(0,1fr) 46px}}
#teacherBoard .advanced-ink-content .input-check,#studentBoard .advanced-ink-content .input-check{position:static;max-width:none;width:100%;box-shadow:none;opacity:1;font-size:11px}
#viewer{width:min(1240px,96vw);max-width:96vw;height:92dvh;max-height:96dvh;padding:0;overflow:hidden;border-radius:12px}
#viewer[open]{display:flex;flex-direction:column}.submission-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:#202934;color:#fff}.submission-heading h2{font-size:15px}.submission-heading form{float:none;margin:0}.submission-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:8px 12px;background:#f4f7fb;border-bottom:1px solid #cbd7e3;font-size:12px}#submissionStatus{color:#4a6078;font-size:11px}#submissionBoard{display:flex;flex-direction:column;flex:1;min-height:0}#submissionBoard .board-stage{flex:1;min-height:0;grid-template-columns:minmax(0,1fr)}#submissionBoard .native-viewport{height:100%;min-height:0}#submissionBoard .board-status{padding:5px 12px;font-size:11px}

/* Student access stays visible independently of the lesson-title toolbar. */
.teacher-topbar{flex-wrap:wrap}.lesson-heading{flex-basis:120px}
.student-access-bar{display:flex;align-items:center;gap:12px;flex-shrink:0;flex-wrap:wrap;padding:7px 14px;background:#e3f3ed;border-bottom:1px solid #b7d8cb;min-height:48px}
.student-access-bar .class-code{flex:0 0 auto;gap:10px;color:#254b3e}
.student-access-bar .class-code span{font-size:12px;font-weight:700}
.student-access-bar .class-code code{display:inline-block;background:white;border:1px solid #aacfc0;border-radius:6px;padding:4px 10px;font-size:21px;letter-spacing:2px;min-width:83px;text-align:center;line-height:1.2}
.student-access-bar #joinLink{flex:1;min-width:170px;max-width:520px;font-size:12px;padding:6px 8px}
.student-access-bar #copy{flex:0 0 auto;font-size:12px;padding:7px 10px;background:#176858;color:white;border-color:#176858}
@media(max-width:600px){.student-access-bar{gap:6px;padding:5px 8px}.student-access-bar #joinLink{display:none}.student-access-bar .class-code span{font-size:11px}.student-access-bar .class-code code{font-size:18px}}

/* Constrain every workspace row to the actual window, reserving the footer. */
body.workspace-active>main{position:fixed;top:40px;right:0;bottom:0;left:0;height:auto;min-height:0;overflow:hidden;margin:0}
body.workspace-active #notice:empty{display:none}
#teacher .teacher-layout{align-items:stretch;overflow:hidden}
#teacher .preview{align-self:stretch;overflow:hidden}
#teacherSlidePanel:not([hidden]),#studentSlidePanel:not([hidden]){overflow:hidden}
#teacherBoard,#studentBoard,#submissionBoard{overflow:hidden}
#teacherBoard .board-tools,#studentBoard .board-tools{overflow:visible;z-index:6}
#teacherBoard .board-stage,#studentBoard .board-stage,#submissionBoard .board-stage{grid-template-rows:minmax(0,1fr);align-items:stretch;overflow:hidden;flex:1 1 0;min-width:0;min-height:0}
#teacherBoard .native-viewport,#studentBoard .native-viewport,#submissionBoard .native-viewport{align-self:stretch;min-width:0;min-height:0;height:100%!important;max-height:100%;overflow:auto}
.tool-rail{min-height:0;align-self:stretch;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;padding:4px;gap:3px}
.tool-rail .icon-button{flex:0 0 auto;width:36px;min-width:36px;height:clamp(26px,3.8dvh,36px);min-height:26px;padding:5px}
#teacherBoard .board-footer,#studentBoard .board-footer{display:flex;flex:0 0 auto;position:relative;z-index:5;max-width:100%;min-height:40px;padding:4px 10px;gap:6px;overflow-x:auto;flex-wrap:nowrap}
.board-footer .icon-button{flex:0 0 auto}.board-footer label{white-space:nowrap}.board-footer output{flex:0 0 auto}
#teacherBoard .board-status,#studentBoard .board-status{flex:0 0 auto;line-height:1.3;min-height:17px;padding:2px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#student .student-layout{grid-template-rows:minmax(0,1fr);align-items:stretch;overflow:hidden}
#student .work{overflow:hidden}
@media(max-height:760px){
 body.workspace-active>header{height:32px;min-height:32px}
 body.workspace-active>main{top:32px}
 .teacher-topbar{padding-block:4px}
 .student-access-bar{padding-block:4px;min-height:40px}
 .student-access-bar .class-code code{font-size:18px;padding-block:2px}
 #teacher .view-tabs{padding-block:3px}
 .pdf-navigation{padding-block:3px}
 #teacherBoard .board-tools,#studentBoard .board-tools{padding-block:4px}
}
/* Branding, lesson and student access share one teaching header. */
body[data-workspace=teacher]>header{display:none}
body.workspace-active[data-workspace=teacher]>main{top:0}
.unified-teacher-header{height:48px;min-height:48px;padding:5px 12px;gap:12px;flex-wrap:nowrap;overflow:hidden;background:#202934;color:#f1f5fa;border-bottom:1px solid #344354}
.teacher-brand{color:#fff;text-decoration:none;font-size:15px;font-weight:800;flex:0 0 auto;padding-right:12px;border-right:1px solid #536170}
.unified-teacher-header .lesson-heading{flex:1 1 100px;min-width:0}.unified-teacher-header .lesson-heading h1{font-size:14px;max-width:none}
.unified-teacher-header .class-code{flex:0 0 auto;gap:8px;color:#d2e7dd;font-size:11px}.unified-teacher-header .class-code code{font-size:19px;line-height:1;background:#dff4e9;border-radius:5px;color:#145d46;padding:5px 8px;letter-spacing:2px}
.unified-teacher-header>#copy{font-size:12px;white-space:nowrap;padding:7px 9px;background:#176858;color:#fff;border-color:#408b76;flex:0 0 auto}
.unified-teacher-header>#classPanelToggle{background:transparent;color:#e5edf5;border-color:#647486}.unified-teacher-header>#end{white-space:nowrap;flex:0 0 auto;padding:7px 9px}
#teacherConnectionSlot{min-width:0;flex:0 1 180px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:10px}#teacherConnectionSlot:has(#connection:empty){display:none}#teacherConnectionSlot #connection{font-size:10px}
.student-link-label{display:block;font-size:12px;margin:8px 0}.student-link-label input{display:block;margin-top:5px}
@media(max-width:850px){#teacherConnectionSlot{display:none}.unified-teacher-header{gap:8px;padding-inline:8px}}
@media(max-width:600px){.teacher-brand{font-size:12px;padding-right:6px}.unified-teacher-header{gap:5px}.unified-teacher-header .class-code span{display:none}.unified-teacher-header .class-code code{font-size:16px;letter-spacing:1px;padding:5px}.unified-teacher-header .lesson-heading h1{font-size:12px}.unified-teacher-header>#copy,.unified-teacher-header>#end{font-size:10px;padding:6px}.unified-teacher-header>#classPanelToggle{width:29px;min-width:29px;height:30px;padding:5px}}

.pdf-share-actions .presentation-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:0;height:36px;padding:6px 10px;font-size:12px;white-space:nowrap;flex:0 0 auto}
.presentation-action svg{display:block;width:19px;height:19px;flex:0 0 auto}
.pdf-share-actions .open-screen-action{background:#edf4fd;border-color:#9cb9df;color:#23588e}
.pdf-share-actions .present-page-action{background:#176858;border-color:#176858;color:white}
@media(max-width:850px){.pdf-navigation{flex-wrap:wrap}.pdf-share-actions{margin-left:auto}.pdf-share-actions .presentation-action{font-size:11px;padding:5px 7px}}

.pdf-share-actions .reveal-class-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;height:36px;padding:6px 10px;font-size:12px;flex:0 0 auto;background:#f1ebfb;border-color:#bba4de;color:#694394}
.reveal-class-action svg{display:block;width:22px;height:22px;flex:0 0 auto}
@media(max-width:850px){.pdf-share-actions{flex-wrap:wrap}.pdf-share-actions .reveal-class-action{font-size:11px;padding:5px 7px}}
.class-timer{display:flex;align-items:center;gap:7px;margin-left:auto;padding:3px 8px;background:#e8f3ee;border:1px solid #bdd4c8;border-radius:7px;font-size:11px;flex-wrap:wrap}
.class-timer strong{font-size:11px}.class-timer output{font:700 20px ui-monospace,monospace;min-width:65px;color:#164e3d;font-variant-numeric:tabular-nums}.class-timer label{display:flex;align-items:center;gap:4px}.class-timer input{width:60px;padding:4px!important}.class-timer select{font:inherit;padding:4px;border:1px solid #aabed0;border-radius:5px}.class-timer button{font-size:11px;padding:4px 8px}.class-timer span{font-size:10px;color:#476556}
#teacherBoard .board-timer,#studentBoard .board-timer{position:static;box-shadow:none;max-width:100%;margin:0;border-radius:0}

/* Dedicated teacher and student entry pages. */
#landing .entrances{display:block;max-width:460px;margin-inline:auto}
#landing>h1,#landing>.eyebrow{text-align:center}
#landing .entrances form{width:100%;box-sizing:border-box}
.entry-choices{display:flex;justify-content:center;gap:14px;flex-wrap:wrap;margin:28px auto}
.entry-link{display:inline-flex;align-items:center;justify-content:center;padding:15px 24px;border:1px solid #b5c6d3;border-radius:12px;text-decoration:none;color:inherit;font-weight:650;background:white}
.entry-link.primary{background:#176e60;color:white;border-color:#176e60}
.entry-switch{display:block;width:fit-content;margin:24px auto;color:#47637a;font-size:14px}
#landing>#resume{display:block;margin:18px auto}
#code{letter-spacing:.12em}

/* Keep iPad long presses inside the drawing interaction. */
.whiteboard-workspace,.whiteboard-workspace *{
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
.whiteboard-workspace input,.whiteboard-workspace textarea,
.whiteboard-workspace [contenteditable="true"]{
  -webkit-user-select:text;user-select:text;-webkit-touch-callout:default;
}

/* Tool widgets live above the page and stay out of exported annotations. */
.floating-tools-host{position:relative}
.floating-tool-layer{position:absolute;inset:0;pointer-events:none;z-index:15;overflow:hidden}
.floating-tool{position:absolute;width:min(330px,calc(100% - 12px));max-height:calc(100% - 20px);pointer-events:auto;background:#ffffffed;backdrop-filter:blur(12px);border:1px solid #b6c8d8;border-radius:14px;box-shadow:0 10px 36px #132f4c33;overflow:auto;color:#20374c}
.floating-tool-handle{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#24384e;color:white;cursor:move;touch-action:none;z-index:1}
.floating-tool-handle button{padding:0;width:28px;min-width:28px;height:28px;border:0;background:transparent;color:white;font-size:23px}
.floating-tool-body{padding:12px;display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.floating-tool-body>label{display:flex;flex-direction:column;gap:4px;flex:1 1 110px;font-size:12px}
.floating-tool-body>label:has(input[type=checkbox]){flex-direction:row;align-items:center;flex-basis:100%}
.floating-tool input[type=number],.floating-tool select{width:100%;max-width:100%;box-sizing:border-box}
.floating-tool textarea{width:100%;min-height:75px;box-sizing:border-box;font:inherit;resize:vertical}
.floating-tool .actions{flex-wrap:wrap;gap:8px}.floating-tool .geometry-tools{margin:0;padding:0;border:0}
.floating-tool .ink-swatches{display:flex;flex-wrap:wrap;gap:5px}.floating-tool .advanced-ink-content{position:static;box-shadow:none}
.widget-result{width:100%;font-size:24px;text-align:center;font-weight:700;overflow-wrap:anywhere;padding:8px 0}
.widget-error{font-size:12px;color:#b22e42;margin:0;flex-basis:100%}
.coin-face{width:90px;height:90px;margin:auto;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at 30% 25%,#fff3ae,#e9b844 65%,#ab741b);box-shadow:inset 0 0 0 5px #f7d776,inset 0 0 0 7px #b2832e,0 5px 0 #a67624;color:#6c4818;font-size:20px}
.dice-tray{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}.class-die{display:inline-grid;place-items:center;min-width:50px;min-height:58px;border-radius:10px;box-shadow:inset 0 0 0 1px #ffffff99,3px 5px 0 #273f68;background:linear-gradient(145deg,#6c86da,#344e92);color:white;font-size:32px;padding:4px}
.class-die small{font-size:10px}.poly-die{clip-path:polygon(50% 0,100% 25%,92% 82%,50% 100%,8% 82%,0 25%);font-size:22px;padding:10px}.dice-total{width:100%;font-size:14px}
.wheel-wrap{position:relative;width:190px;height:190px;margin:10px auto}.spinner-wheel{width:100%;height:100%;border-radius:50%;box-shadow:0 0 0 6px #e5eaf2,0 4px 15px #18395c33;transition:transform 2.3s cubic-bezier(.1,.65,.15,1)}.wheel-pointer{position:absolute;top:-14px;left:calc(50% - 10px);color:#233b54;font-size:27px}.wheel-key{display:flex;flex-wrap:wrap;gap:6px;font-size:11px}.wheel-key i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:3px}
.widget-animate{animation:widget-tumble .5s ease-out}@keyframes widget-tumble{0%{transform:rotate(-8deg) scale(.75);opacity:.4}60%{transform:rotate(5deg) scale(1.06)}100%{transform:none;opacity:1}}
.tool-permissions{display:grid;grid-template-columns:1fr 1fr;gap:8px;font-size:12px}.tool-permissions label{display:flex;align-items:center;gap:5px}.tool-master-actions{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.pdf-memory-dialog{max-width:420px;border:1px solid #aabed0;border-radius:16px;padding:24px}.pdf-memory-dialog::backdrop{background:#172c4666}.pdf-memory-dialog .actions{display:flex;gap:10px;flex-wrap:wrap}
@media(prefers-reduced-motion:reduce){.widget-animate{animation:none}.spinner-wheel{transition:none}}

.floating-tool-help{font-size:12px;line-height:1.5;margin:0 0 4px;color:#4c6379;width:100%}.floating-tool-body input,.floating-tool-body textarea{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
/* Parameters stay in the upper toolbar; the floating dice are just objects. */
#teacherBoard .board-tools,#studentBoard .board-tools{min-height:0}
.dice-toolbar,.widget-settings-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:3px 0;font-size:12px}
.dice-toolbar label,.widget-settings-toolbar label{display:inline-flex;align-items:center;gap:5px}
.dice-toolbar output{font-weight:650;color:#1e5b80;max-width:100%;overflow-wrap:anywhere}
.widget-settings-toolbar textarea{height:40px;min-height:36px;max-height:90px;width:150px;resize:vertical;font:inherit}
.widget-settings-toolbar>small{max-width:330px;font-size:10px}.widget-settings-toolbar .widget-error{flex-basis:auto}
.dice-object-stage{position:absolute;inset:0;overflow:auto;pointer-events:none;perspective:850px;scrollbar-width:thin}
.floating-die-object{position:absolute;width:100px;height:100px;pointer-events:auto;touch-action:none;cursor:grab;outline:none;-webkit-user-select:none;user-select:none;filter:drop-shadow(0 16px 8px #16315133)}
.floating-die-object:active{cursor:grabbing}.floating-die-object:focus-visible{outline:2px solid #2179ca;outline-offset:5px;border-radius:16px}
.die-perspective{position:relative;width:100%;height:100%;perspective:650px;pointer-events:none;overflow:visible}
.die-solid{position:absolute;left:50%;top:50%;width:0;height:0;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;will-change:transform}
.die-surface{position:absolute;left:-64px;top:-64px;width:128px;height:128px;transform-origin:64px 64px;backface-visibility:hidden;-webkit-backface-visibility:hidden;pointer-events:none}
.die-surface svg{display:block;width:100%;height:100%;overflow:visible}
@media(max-width:600px){.dice-toolbar,.widget-settings-toolbar{gap:5px;font-size:11px}.dice-toolbar select{max-width:140px}.widget-settings-toolbar>small{display:none}}

/* Draggable 3D coins; all currency, denomination and size controls stay above. */
.coin-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:3px 0;font-size:12px}
.coin-toolbar label{display:inline-flex;align-items:center;gap:5px}.coin-toolbar input[type=range]{width:90px}.coin-toolbar output{font-weight:650;color:#775319;max-width:100%;overflow-wrap:anywhere}
.coin-object-stage{position:absolute;inset:0;overflow:auto;pointer-events:none;scrollbar-width:thin}
.floating-coin-object{position:absolute;pointer-events:auto;touch-action:none;cursor:grab;outline:none;filter:drop-shadow(0 14px 7px #3b2a172e);-webkit-user-select:none;user-select:none}
.floating-coin-object:active{cursor:grabbing}.floating-coin-object:focus-visible{outline:2px solid #b38a35;outline-offset:5px;border-radius:50%}
.coin-perspective{position:relative;width:100%;height:100%;perspective:700px;pointer-events:none}
.coin-solid{position:relative;width:100%;height:100%;transform-style:preserve-3d;-webkit-transform-style:preserve-3d;will-change:transform}
.coin-disc,.coin-thickness{position:absolute;inset:0;border-radius:50%;pointer-events:none}
.coin-disc{backface-visibility:hidden;-webkit-backface-visibility:hidden}.coin-disc svg{width:100%;height:100%;display:block;overflow:visible}
.coin-heads{transform:translateZ(4px)}.coin-tails{transform:rotateX(180deg) translateZ(4px)}
.coin-thickness{box-shadow:inset 0 0 0 1px #59452b66}
@media(max-width:600px){.coin-toolbar{gap:5px;font-size:11px}.coin-toolbar select{max-width:135px}.coin-toolbar input[type=range]{width:65px}}

.coin-disc img{width:100%;height:100%;object-fit:contain;display:block;pointer-events:none}.coin-design-info{max-width:360px;color:#506478;font-size:11px}.coin-source-link{font-size:11px;color:#236e9a}

.presentation-tool-mirror{position:fixed;inset:0;z-index:10;pointer-events:none;overflow:hidden}.tool-mirror-scene{position:absolute;transform-origin:top left;pointer-events:none}.presentation-tool-mirror *{pointer-events:none!important}.presentation-tool-mirror .floating-tool-handle{cursor:default}.presentation-tool-mirror .coin-object-stage,.presentation-tool-mirror .dice-object-stage{scrollbar-width:none}

.clean-class-timer{position:fixed;top:12px;right:12px;z-index:20;pointer-events:none;box-shadow:0 4px 16px #122c4433}

.shared-objects-scene,.shared-objects-scene .die-perspective,.shared-objects-scene .coin-perspective{transform-style:preserve-3d;-webkit-transform-style:preserve-3d}

/* Tree cards use proportional bounds so both windows can share the same layout. */
.tree-diagram-panel{
  width:min(1050px,calc(100% - 12px));height:min(620px,calc(100% - 24px));
  min-width:min(280px,calc(100% - 12px));min-height:140px;max-width:calc(100% - 12px);
  display:flex;flex-direction:column;box-sizing:border-box;resize:both;overflow:hidden;
  background:#f5f8fc
}
.tree-diagram-panel .floating-tool-handle{position:static;flex:none;min-height:44px}
.tree-diagram-panel .floating-tool-body{
  display:flex;flex:1;flex-direction:column;flex-wrap:nowrap;align-items:stretch;
  gap:4px;min-height:0;padding:6px
}
.tree-diagram-stage{position:relative;flex:1;min-height:0}
.tree-diagram-card{
  position:absolute;box-sizing:border-box;display:flex;flex-direction:column;min-width:0;min-height:0;
  padding:5px 7px;border:1px solid #d4dfe9;border-radius:9px;background:#fff;overflow:hidden
}
.tree-card-title{
  display:block;flex:none;min-width:0;margin:0;padding:2px 0;border:0;background:none;
  color:#24384e;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  font:700 13px system-ui
}
button.tree-card-title{cursor:grab;touch-action:none}
.tree-card-resize{
  position:absolute;right:1px;bottom:1px;width:22px;height:22px;min-width:0;
  padding:0;border:1px solid #ccdbe6;border-radius:5px;background:#f5f8fc;
  color:#24536b;cursor:nwse-resize;touch-action:none;font-size:15px
}
.tree-diagram-card svg{display:block;flex:1;width:100%;height:0;min-height:0;font-family:system-ui,sans-serif}
.tree-diagram-card p,.tree-diagram-total{
  flex:none;margin:0;padding:3px 0;color:#1d5f72;font-weight:700;font-size:12px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.presentation-tree-panel{z-index:1;transform-origin:top left;min-width:0;min-height:0;max-width:none;max-height:none;resize:none}

.tree-card-can-focus .tree-card-title{padding-right:54px}
.tree-card-focus{
  position:absolute;top:3px;right:4px;padding:2px 5px;
  border:1px solid #ccdbe6;border-radius:5px;background:#f5f8fc;color:#24536b;
  font:600 11px system-ui
}
.tree-branch-focus{cursor:zoom-in}
.tree-branch-focus:hover rect,.tree-branch-focus:focus-visible rect{stroke:#e4a747;stroke-width:3}
