/* Fixed-height chrome; tool panels overlay the board instead of shrinking it. */
.compact-workspace{--workspace-hit:44px;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
.compact-workspace .workspace-top{flex:0 0 54px;min-height:54px;max-height:54px;padding:5px 8px;gap:6px;flex-wrap:nowrap;overflow:hidden}
.workspace-top>strong{font-size:15px;white-space:nowrap;flex:none}.workspace-top>strong span{font-weight:400}
.workspace-button,.compact-workspace .workspace-top .tool-control{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;display:inline-flex;align-items:center;justify-content:center;flex:none}
.workspace-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.workspace-top .tool-control .tool-icon{display:block;width:23px;height:23px}
.workspace-top .tool-control .tool-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.workspace-summary{flex:1;min-width:0;max-width:none;color:#fff;background:transparent;border:0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:6px;min-height:44px;font-size:13px}
.workspace-summary:hover{background:#ffffff16}.workspace-summary.workspace-unsaved:before{content:'● ';color:#ffd46f}
.compact-workspace .workspace-primary{display:flex;flex:0 0 56px;min-height:56px;max-height:56px;flex-wrap:nowrap;gap:6px;padding:5px 8px;overflow:hidden;background:#f7f9fc;border-bottom:1px solid #c3d0df}
.workspace-scroll{display:flex;align-items:center;gap:4px;flex:1;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain;touch-action:pan-x;white-space:nowrap}
.workspace-scroll>*{flex:none}.workspace-utility{display:flex;align-items:center;gap:4px;flex:none;padding-left:4px;border-left:1px solid #d1dcea}
.compact-workspace .workspace-primary .tool-control{min-height:44px;min-width:44px;padding:9px}.compact-workspace .workspace-primary .tool-icon{width:23px;height:23px}
.compact-workspace .workspace-footer{flex:0 0 52px;min-height:52px;max-height:52px;display:flex;flex-wrap:nowrap;padding:3px 8px;gap:8px;overflow:hidden}
.workspace-pages .tool-control .tool-icon{display:block;width:23px;height:23px}.workspace-pages .tool-control .tool-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.workspace-pages{display:flex;align-items:center;gap:4px;flex:none}.workspace-pages #page{font-size:12px;white-space:nowrap}.workspace-pages button{min-height:44px;padding:8px}.workspace-pages #prevpage,.workspace-pages #nextpage{min-width:44px;width:44px;padding:10px}.workspace-hint{font-size:12px;color:#52647c;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-left:auto}
.compact-workspace main{flex:1;min-height:0}
.workspace-dialog{width:min(620px,calc(100vw - 24px));max-width:620px;max-height:calc(100dvh - 24px);margin:auto;padding:16px;border:1px solid #d2ddea;border-radius:16px;overflow:auto;overscroll-behavior:contain}
.workspace-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:-16px;background:#fff;padding:8px 0;z-index:2;border-bottom:1px solid #dde5ef}.workspace-dialog-head h2{font-size:19px;margin:0}.workspace-dialog button{min-height:44px}
.workspace-section{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:14px 0;margin:0;border:0}.workspace-section>h3{width:100%;margin:0 0 3px;font-size:13px;color:#52647c;text-transform:uppercase;letter-spacing:.05em}
.workspace-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px}.workspace-actions>h3{grid-column:1/-1}
.workspace-actions>button,.workspace-actions>label.button{min-height:50px;min-width:0;width:100%;display:flex;gap:10px;align-items:center;justify-content:flex-start;padding:10px;text-align:left;white-space:normal}
.workspace-dialog .tool-control .tool-icon{display:block;flex:none;width:23px;height:23px}
.workspace-dialog .tool-control .tool-label{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal;line-height:1.35;font-size:14px}
.workspace-dialog #classroombar,.workspace-dialog #projectbar{width:100%;padding:0;background:none;border:0;display:flex;flex-wrap:wrap;gap:8px}
.workspace-dialog #classroomidentity{width:100%}.workspace-dialog #classroomstatus{display:block;width:100%;flex:auto}.workspace-dialog #projectbar label{flex:1;min-width:0}.workspace-dialog #projectname{width:100%;min-width:0;margin:0}.workspace-dialog #savestatus{flex:none;width:100%;font-size:13px}
.workspace-dialog>label{display:flex;gap:12px;margin:18px 0}.workspace-dialog input[type=range]{width:min(240px,50vw);min-height:44px}.workspace-dialog input[type=color]{width:52px;height:44px}
.workspace-dialog #objects{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:12px 0;border:0;background:none;max-width:100%;width:100%}.workspace-dialog #objects>strong{display:none}.workspace-dialog #objects label{display:flex;justify-content:space-between;margin:0}.workspace-dialog #objects button{width:100%;text-align:left;min-height:44px;margin:0}
.workspace-restore{position:absolute;top:8px;left:8px;z-index:12;min-height:44px;background:#fff;border:1px solid #bdcbdf;box-shadow:0 2px 10px #10284722;padding:8px 12px;border-radius:10px}
.board-focus .workspace-top,.board-focus .workspace-primary,.board-focus .workspace-footer{display:none!important}.board-focus #mathpanel{display:none!important}
.compact-workspace #livebar{position:absolute;top:8px;right:8px;z-index:9;padding:4px 6px;gap:6px;max-width:calc(100% - 16px);border:1px solid #b8d8bf;border-radius:10px;box-shadow:0 2px 10px #10284715;font-size:12px;flex-wrap:wrap}.compact-workspace #livebar button{min-height:44px;padding:8px}.compact-workspace #livebarstatus{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board-focus #livebar{max-width:calc(100% - 130px)}
.workspace-steps{position:absolute;left:50%;bottom:8px;transform:translateX(-50%);z-index:7;display:grid;grid-template-columns:56px minmax(0,1fr) minmax(0,1fr);width:380px;align-items:center;gap:6px;background:#fffffff5;border:1px solid #bccde1;border-radius:12px;padding:5px;box-shadow:0 3px 16px #10284720;max-width:calc(100% - 16px)}.workspace-steps button{width:100%;min-height:44px;min-width:0;white-space:nowrap;padding:8px 12px}.workspace-steps>span{font-size:12px;white-space:nowrap;padding:0 4px}
.workspace-math-head{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:-16px;z-index:6;background:#f6f9ff;padding:6px 0}.workspace-math-head button{width:auto!important;margin:0!important;min-height:44px}
.compact-workspace #mathpanel{max-height:calc(100% - var(--workspace-live-top,8px) - 82px);top:var(--workspace-live-top,8px);right:8px}.compact-workspace .math-step-buttons{top:40px}
.compact-workspace #toast{bottom:76px}.compact-workspace #timerview{top:60px}
.workspace-student-help{position:absolute;right:8px;top:8px;z-index:9;max-width:160px;min-height:44px;box-shadow:0 2px 10px #10284722}.compact-workspace.joining .workspace-student-help,.compact-workspace.waiting .workspace-student-help{display:none!important}
.compact-workspace #studentstatus{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;flex:1}.compact-workspace #studentlessonlabel{padding:3px 8px;font-size:12px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-height:24px}.compact-workspace #studentfeedback:empty{display:none}.compact-workspace #studentfeedback{font-size:12px;max-height:38px;overflow:auto;padding:2px 8px;line-height:1.3}
.board-focus #studentlessonlabel,.board-focus #studentfeedback{display:none!important}
.compact-workspace.joining .workspace-top{background:transparent;flex:0 0 48px}.compact-workspace.joining .workspace-restore,.compact-workspace.waiting .workspace-restore{display:none!important}
.present .workspace-restore,.present #livebar{display:none!important}
@media(max-width:700px){.workspace-summary{font-size:12px}.workspace-top>strong{font-size:14px}.workspace-hint{display:none}.compact-workspace #livebarstatus{display:none}.compact-workspace #helpbadge{max-width:140px;white-space:normal;font-size:12px}}
@media(max-width:450px){.workspace-summary{display:none}.workspace-top>strong{flex:1}.workspace-actions{grid-template-columns:minmax(0,1fr)}.workspace-steps{gap:3px}.workspace-steps button{padding:8px;font-size:12px}.workspace-steps>span{font-size:11px}.compact-workspace #mathpanel{width:calc(100% - 16px)}}

.workspace-student-state{position:absolute;bottom:8px;left:8px;max-width:calc(100% - 16px);z-index:8;border:1px solid #c3d0df;background:#fffffff0;border-radius:8px;padding:6px 10px;font-size:12px;color:#173866;pointer-events:none}
