/* Shared screen surface. Scale the completed layout, never the iframe viewport.
   Logical viewport = browser viewport / scale; its painted bounds fill the browser.
   No CSS zoom on any ancestor of embedded documents. */
:root{--crm-ui-scale:.85}
@media screen{
 /* 06.11 (Dawid: „góra za duża, strona nachodzi mi na karty… przeskakuje”): skalowana powierzchnia to <body> przyklejone do okna (position:fixed),
    a <html> ma dokładnie rozmiar okna. Wcześniej <html> miał 117,6 % okna (100 % / .85), więc dokument dawał się przewinąć o ~139 px w dół
    i ~259 px w bok (focus / scrollIntoView w Safari) — górna belka chowała się pod paskiem kart. Wygląd bez zmian (porównanie zrzutów). */
 html:root{
  zoom:1!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  margin:0!important;
  transform:none;
  overflow:hidden!important;
  background:var(--premium-canvas,var(--bg,#101113));
 }
 html:root>body{width:100%!important;max-width:none!important;height:100%;min-width:0;margin:0}
}
@media screen and (min-width:1025px){
 html:root>body{position:fixed;inset:0 auto auto 0;width:calc(100vw / var(--crm-ui-scale))!important;height:calc(100vh / var(--crm-ui-scale));transform:scale(var(--crm-ui-scale));transform-origin:0 0;overflow:hidden}
 /* The top layer is outside the root's transformed surface (CSS Position 4).
    Centered native dialogs receive the same visual size independently. */
 html:root dialog:modal{scale:var(--crm-ui-scale);transform-origin:center center}
 html:root [popover]:popover-open{scale:var(--crm-ui-scale);transform-origin:0 0}
 html:root dialog::backdrop,html:root [popover]::backdrop{scale:1}
 #knowledgeWorkspace>iframe,
 #academyWorkspace .academy-frame-wrap>iframe,
 #academyWorkspace .academy-original-panel>iframe,
 #administrationWorkspace [data-adm-library]>iframe,
 .ac-knowledge-frame{zoom:1;transform:none;scale:1}
}
@media print{
 :root{--crm-ui-scale:1}
 html:root{zoom:1!important;transform:none!important;width:auto!important;height:auto!important;overflow:visible!important}
 html:root>body{height:auto!important;overflow:visible!important}
 html:root dialog:modal,html:root [popover]:popover-open{scale:1}
}
