/* Atomicamente Tablet 14 — Kekulé, esquema experimental e fluxograma.
   Reutiliza laboratório.css e mobile-lab-v1, sem tocar no motor de edição. */
html.atomic-tablet body:has(#labApp) {overflow:hidden!important;}
html.atomic-tablet #labApp {
  width:100%!important;max-width:100%!important;
  height:calc(100dvh - var(--atomic-tablet-header-height,61px))!important;
  min-height:0!important;overflow:hidden!important;
}
html.atomic-tablet #labApp .lab-topline {min-height:62px;padding:9px 16px;gap:10px;}
html.atomic-tablet #labApp .lab-heading h1 {font-size:clamp(16px,2vw,22px);}
html.atomic-tablet #labApp .lab-document {min-width:0;max-width:min(35vw,260px);}
html.atomic-tablet #labApp .lab-actions {gap:6px;}
html.atomic-tablet #labApp .lab-actions .lab-btn {min-height:43px;}
html.atomic-tablet #labApp .lab-modes {min-height:49px;gap:3px;padding-inline:10px;overflow-x:auto;scrollbar-width:thin;}
html.atomic-tablet #labApp .mode-tab {min-height:45px;padding:0 clamp(8px,1.6vw,15px);font-size:12px;}
html.atomic-tablet #labApp .lab-work {min-height:0;flex:1;}
html.atomic-tablet #labApp .chem-workspace {padding:clamp(8px,1.5vw,18px);gap:clamp(8px,1.5vw,16px);}
html.atomic-tablet #labApp .chem-stage {flex:1;min-width:0;}
html.atomic-tablet #labApp .chem-inner {min-width:0;min-height:0;touch-action:pan-x pan-y;}
html.atomic-tablet #labApp .chem-inner .K-Editor-Composer {width:100%!important;height:100%!important;max-width:100%!important;}
html.atomic-tablet #labApp .canvas-toolbar {padding:0 9px;gap:5px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain;}
html.atomic-tablet #labApp .canvas-toolbar > * {flex-shrink:0;}
html.atomic-tablet #labApp :is(.canvas-tool,.tiny-button,.canvas-text-button,.drawer-toggle) {min-width:42px;min-height:42px;}
html.atomic-tablet #labApp .canvas-viewport {min-width:0;min-height:0;touch-action:none;}
html.atomic-tablet #labApp .canvas-status {height:49px;min-height:49px;}
html.atomic-tablet #labApp .zoom-panel button {min-width:43px;min-height:43px;}
html.atomic-tablet #labApp .library-search input {font-size:16px;}
html.atomic-tablet #labApp .library-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
html.atomic-tablet #labApp .library-item {min-height:85px;}
html.atomic-tablet #labApp .lab-modal-backdrop {padding:12px;}
html.atomic-tablet #labApp .lab-modal {width:min(95vw,850px);max-height:90dvh;overflow-y:auto;}
html.atomic-tablet #labApp #atomicLabMoreMenu {z-index:150;}
/* 7" retrato ou janela estreita: priorizar a bancada com gavetas sobrepostas. */
@media(max-width:760px){
 html.atomic-tablet #labApp .lab-topline {min-height:0!important;}
 html.atomic-tablet #labApp .chem-workspace {padding:7px;}
 html.atomic-tablet #labApp .lab-modes {min-height:44px;}
 html.atomic-tablet #labApp .canvas-viewport {flex:1;}
 html.atomic-tablet #labApp .library-panel,.atomic-tablet #labApp .inspector-panel {max-height:84dvh;}
}
/* 7" paisagem e 10" retrato: painéis laterais de 300 px, como no app desktop,
   mas recolhíveis em vez de esmagar a prancheta. */
@media(min-width:761px) and (max-width:1119px){
 html.atomic-tablet #labApp .library-panel,html.atomic-tablet #labApp .inspector-panel {
   position:absolute!important;top:0;bottom:0;width:min(320px,46vw)!important;
   max-width:46vw;box-shadow:0 12px 38px #2a165533;z-index:32!important;
 }
 html.atomic-tablet #labApp .library-panel {left:0;transform:translateX(-105%);}
 html.atomic-tablet #labApp .inspector-panel {right:0;transform:translateX(105%);}
 html.atomic-tablet #labApp .library-panel.panel-open,html.atomic-tablet #labApp .inspector-panel.panel-open {transform:translateX(0)!important;visibility:visible;}
 html.atomic-tablet #labApp :is(.drawer-toggle,.panel-close) {display:grid;place-items:center;}
 html.atomic-tablet #labApp .lab-work {position:relative;}
 html.atomic-tablet #labApp .chem-guide {width:210px;min-width:210px;padding:17px;}
}
/* 10" na horizontal: estação científica de três painéis simultâneos. */
@media(min-width:1120px){
 html.atomic-tablet #labApp .library-panel {width:clamp(205px,20vw,265px);position:relative;transform:none!important;visibility:visible!important;box-shadow:none;}
 html.atomic-tablet #labApp .inspector-panel {width:clamp(205px,20vw,265px);position:relative;transform:none!important;visibility:visible!important;box-shadow:none;}
 html.atomic-tablet #labApp .diagram-workspace {display:flex;min-width:0;}
 html.atomic-tablet #labApp .canvas-column {flex:1;min-width:0;}
 html.atomic-tablet #labApp .chem-guide {width:clamp(215px,20vw,290px);min-width:0;}
 html.atomic-tablet #labApp :is(.panel-close,.drawer-toggle) {display:none!important;}
}
