/* Optional compact seat workspace. Original markup retained for one-click rollback. */
.seat-compact-tools { flex-wrap:wrap; }
#seatWorkspace .seat-adjust-dialog .adjust-control-heading { display:none; }
#seatWorkspace .seat-adjust-dialog .adjust-control-card { width:100%; height:auto; padding:0; border:0; }
#seatWorkspace .seat-adjust-dialog .name-size-actions,#seatWorkspace .seat-adjust-dialog .seat-rotation-actions,#seatWorkspace .seat-adjust-dialog .seat-color-options { display:grid; position:static; transform:none; width:100%; box-sizing:border-box; box-shadow:none; margin:0; }
#seatWorkspace .seat-adjust-dialog .seat-rotation-actions { grid-template-columns:repeat(4,minmax(0,1fr)); }
#seatWorkspace.seat-compact > .function-bar,#seatWorkspace.seat-compact .workbench > .controls { display:none; }
#seatWorkspace.seat-compact .workbench { display:block; }
.seat-compact-tools { display:flex; justify-content:flex-end; align-items:center; gap:6px; margin-bottom:8px; }
#seatWorkspace .seat-compact-tools .seat-tool-icon { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; flex:0 0 36px; width:36px; height:36px; min-width:36px; min-height:36px; padding:7px; font-size:0; gap:0; border-radius:50%; }
.seat-compact-tools .seat-tool-icon .ui-icon { width:18px; height:18px; margin:0; flex:none; }
.seat-tool-dialog { width:min(650px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); padding:0; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); overflow:auto; }
.seat-tool-dialog::backdrop { background:#18243380; }
.seat-tool-dialog > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; position:sticky; top:0; z-index:3; background:var(--surface); border-bottom:1px solid var(--line); }
.seat-tool-dialog h2 { margin:0; font-size:18px; }
.seat-tool-dialog > header button { width:34px; min-height:34px; padding:7px; }
.seat-tool-body { padding:14px; }
.seat-tool-body > .function-block,.seat-tool-body > .panel { box-shadow:none; border:0; padding:0; }
.seat-tool-body .function-title,.seat-tool-body .rule-panel-head { display:none; }
.seat-tool-body .adjust-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.seat-detail-dialog #studentDetailsPanel { border:0; box-shadow:none; margin:0; }
.seat-detail-dialog .panel-head { position:sticky; top:0; background:var(--surface); z-index:4; }
#seatWorkspace.seat-compact #redoBtn,#seatWorkspace.seat-compact #individualLockBtn { display:none !important; }
#detailSeatLockBtn.is-active { color:var(--accent,#ed0033); background:#ed003312; border-color:currentColor; }
@media(max-width:760px) {
 #seatWorkspace.seat-compact .seat-compact-tools { gap:2px; }
 #seatWorkspace.seat-compact .seat-compact-tools .seat-tool-icon { flex-basis:34px; width:34px; min-width:34px; height:34px; min-height:34px; padding:6px; }
 #seatWorkspace.seat-compact .board-panel { min-width:0; width:100%; box-sizing:border-box; padding:8px 5px; overflow:visible; }
 #seatWorkspace.seat-compact .board-panel::before { display:none; }
 #seatWorkspace.seat-compact .seat-board { min-width:0; width:100%; gap:5px; }
 #seatWorkspace.seat-compact .seat-row { min-width:0; gap:clamp(10px,3.3vw,16px); }
 #seatWorkspace.seat-compact .seat-board[data-layout-type="single"] .seat-row { gap:6px; }
 #seatWorkspace.seat-compact .seat-group { min-width:0; gap:2px; }
 #seatWorkspace.seat-compact .seat { min-width:0; padding:5px 1px; min-height:45px; gap:2px; }
 #seatWorkspace.seat-compact .seat-name { font-size:clamp(10px,2.8vw,13px); line-height:1.3; white-space:normal; overflow-wrap:anywhere; }
 #seatWorkspace.seat-compact .seat-meta { font-size:9px; }
 #seatWorkspace.seat-compact .class-title { font-size:18px; margin:5px 0; }
 #seatWorkspace.seat-compact .desk-line { min-height:24px; padding:4px; margin-block:6px; font-size:12px; }
 .seat-tool-dialog .adjust-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .seat-tool-dialog .layout-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:760px) {
 #seatWorkspace.seat-compact .seat-name { font-size:clamp(9px,2.5vw,11px) !important; }
}

/* Compact, anchored controls; rules and layout retain their full dialogs. */
#toggleAllLocksBtn { display:none!important; }
#seatWorkspace .seat-tool-dropdown { position:fixed; z-index:10000; width:240px; max-width:calc(100vw - 16px); box-sizing:border-box; padding:12px; border:var(--control-stroke) solid var(--control-outline); border-radius:12px; background:var(--surface); color:var(--ink); box-shadow:0 8px 28px #0002; }
#seatWorkspace .seat-tool-dropdown[hidden] { display:none; }
#seatWorkspace .seat-dropdown-title { display:block; margin-bottom:10px; font-size:14px; }
#seatWorkspace .seat-tool-dropdown .adjust-control-heading { display:none; }
#seatWorkspace .seat-tool-dropdown .adjust-control-card { width:100%; height:auto; padding:0; border:0; background:none; }
#seatWorkspace .seat-tool-dropdown :is(.name-size-actions,.seat-rotation-actions,.seat-color-options) { display:grid; position:static; transform:none; width:100%; min-width:0; padding:0; margin:0; box-shadow:none; border:0; background:transparent; }
#seatWorkspace .seat-tool-dropdown .name-size-actions { grid-template-columns:40px 1fr 40px; align-items:center; }
#seatWorkspace .seat-tool-dropdown .seat-rotation-actions { grid-template-columns:repeat(4,1fr); grid-template-rows:40px; gap:6px; }
#seatWorkspace .seat-tool-dropdown .rotation-direction { position:static; grid-area:auto; width:100%; height:40px; }
#seatWorkspace .seat-tool-dropdown .seat-color-options { gap:10px; }

#seatWorkspace .seat-tool-dropdown .adjust-control-card { display:block; }
#seatWorkspace .seat-tool-dropdown .adjust-control-heading { display:none!important; }
#seatWorkspace .seat-tool-dropdown :is(.name-size-actions,.seat-rotation-actions,.seat-color-options) { width:100%!important; flex:none; }
#seatWorkspace .seat-tool-dropdown .name-size-actions .icon-button { width:40px; height:40px; min-height:40px; }
#seatWorkspace .seat-tool-dropdown .name-size-actions output { width:auto; text-align:center; font-size:16px; }

#seatWorkspace .seat-tool-dropdown .seat-color-options { grid-template-columns:1fr; }
#seatWorkspace .seat-tool-dropdown .seat-color-option { display:grid; grid-template-columns:24px 28px 1fr; align-items:center; gap:8px; }
#seatWorkspace .seat-tool-dropdown .seat-color-option input[type=color] { width:100%; height:36px; min-height:36px; padding:3px; }
#seatWorkspace .seat-tool-dropdown .seat-color-option input[type=checkbox] { width:20px; height:20px; margin:0; }
/* Native modal centering avoids applying physical viewport coordinates twice under desktop CSS zoom. */
#seatWorkspace dialog.seat-tool-dropdown { inset:0; margin:auto; width:300px; max-width:calc(100vw - 24px); max-height:calc(100dvh - 24px); overflow:auto; }
#seatWorkspace dialog.seat-tool-dropdown::backdrop { background:rgb(20 30 45 / 22%); }
#seatWorkspace .seat-tool-dropdown > header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
#seatWorkspace .seat-tool-dropdown .seat-dropdown-title { margin:0; }
#seatWorkspace .seat-tool-dropdown .seat-dropdown-close { display:grid; place-items:center; width:30px; height:30px; min-height:30px; flex:none; padding:6px; border-radius:50%; }
#seatWorkspace .seat-dropdown-close svg { width:16px; height:16px; }
@media(max-width:760px) {
 #seatWorkspace dialog.seat-tool-dropdown { inset:auto; margin:0; width:240px; max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
 #seatWorkspace dialog.seat-tool-dropdown::backdrop { background:transparent; }
}
