/* Shared workspace geometry and controls; tool-specific content keeps its own layout. */
html:has(body.tool-workspace),body.tool-workspace { height:100dvh; overflow:hidden!important; }
body.tool-workspace { display:block; }
.tool-shell { height:calc(100dvh - var(--tool-ad-space,0px)); min-height:0; display:flex; flex-direction:column; }
.tool-shell>#header,.tool-shell>#footer-wrapper { flex:0 0 auto; }
.tool-shell>.tool-page-content,.tool-shell>#jsonviewer,.tool-shell>#scsstocss,.tool-shell>#whiteboard { flex:1 1 0; min-height:0; margin:0!important; }
.tool-shell>.tool-page-content { overflow:hidden; }
body.tool-workspace #editor-split-layout { height:100%; min-height:0; }
body.tool-workspace #whiteboard { height:auto; }
body.tool-workspace:has(#whiteboard) #footer-wrapper { display:none!important; }
body.tool-workspace #editor-split-layout:fullscreen,
body.tool-workspace #editor-split-layout.viewport-fullscreen,
body.tool-workspace #whiteboard:fullscreen { height:100dvh!important; }

/* One size for editor toolbar controls, including menu triggers. */
.tool-editor-toolbar .btn,.problem-code-toolbar .btn,
#jsonviewer .jv-panel-heading .btn,#scsstocss .sc-heading .btn {
 min-height:36px; height:36px; font-size:14px; display:inline-flex; align-items:center; justify-content:center; gap:4px; flex-shrink:0;
}
.tool-editor-toolbar .btn[hidden],.problem-code-toolbar .btn[hidden] { display:none!important; }
.tool-editor-toolbar>div:last-child { margin-bottom:0!important; }
.tool-shell .dropdown-menu .dropdown-item { font-size:13px; line-height:1.45; }
.tool-shell #language-selector .dropdown-item:not(.active):is(:hover,:focus-visible) { background:var(--bs-gray-200,#e9ecef); color:var(--bs-dropdown-link-color,#253545); }
.tool-shell .dropdown-menu .svg-icon { width:18px; height:18px; }
.tool-shell #compiler-workspace-toggle { gap:4px; }
@media(max-width:767.98px) {
 .tool-editor-toolbar .btn,.problem-code-toolbar .btn,
 #jsonviewer .jv-panel-heading .btn,#scsstocss .sc-heading .btn,
 .tool-shell #navbar-sub .btn { height:44px; min-height:44px; min-width:44px; }
 body.tool-compiler #editor-split-layout { grid-template-columns:1fr!important; grid-template-rows:1fr!important; }
 body.tool-compiler #editor-split-layout>.separator,
 body.tool-compiler #right-panel,body.tool-compiler .compiler-desktop-control { display:none; }
 body.tool-compiler.compiler-show-output #left-panel { display:none; }
 body.tool-compiler.compiler-show-output #right-panel { display:flex; }
 body.tool-workspace .full-width-right-panel>.right-panel { grid-template-rows:minmax(0,1.2fr) 8px minmax(0,.8fr)!important; }
 #whiteboard .wb-controlbar .btn { min-height:44px; min-width:44px; }
 #whiteboard .wb-right-tools .btn { width:40px; height:40px; }
 #whiteboard .wb-tools>.btn { width:40px; height:40px; min-height:40px; }
 #whiteboard .wb-history .btn,#whiteboard .wb-zoom .btn { min-height:40px; min-width:36px; }
}
