/* The document overview shares the editor workspace's outer edges. */
@media(min-width:768px){
 body:has(.bb-skrivebord) #sk-doc-browser{width:100%!important;max-width:none!important;margin-inline:0!important;padding-inline:32px!important;box-sizing:border-box}
}

/* In the desktop library, the document owns scrolling; the editor keeps its own viewport. */
@media(min-width:768px){
 html:has(.bb-skrivebord.sk-doc-browser-mode){height:auto!important;overflow-x:hidden!important;overflow-y:auto!important}
 body:has(.bb-skrivebord.sk-doc-browser-mode){height:auto!important;overflow:visible!important}
 body:is(#writing-app,#writing-shared):is(#writing-app,#writing-shared):has(.sk-doc-browser-mode) .app.grammar-page.bb-skrivebord{height:auto!important;min-height:100dvh!important;overflow:visible!important;padding-bottom:0!important}
 body:is(#writing-app,#writing-shared):is(#writing-app,#writing-shared):has(.sk-doc-browser-mode) #main-content{height:auto!important;max-height:none!important;overflow:visible!important}
 body:is(#writing-app,#writing-shared):is(#writing-app,#writing-shared):has(.sk-doc-browser-mode) #sk-doc-browser{height:auto!important;min-height:calc(100dvh - 16px)!important;overflow:visible!important;border-radius:19px 19px 0 0!important;border-bottom:0!important}
}

/* Restore the native page scrollbar only while the desktop library is open. */
@media(min-width:768px){
 html:has(.bb-skrivebord.sk-doc-browser-mode){scrollbar-width:auto!important;scrollbar-color:auto!important;-ms-overflow-style:auto!important}
 html:has(.bb-skrivebord.sk-doc-browser-mode)::-webkit-scrollbar{display:block!important;width:8px!important}
 html:has(.bb-skrivebord.sk-doc-browser-mode)::-webkit-scrollbar-thumb{background:rgba(23,43,77,.16);border-radius:8px}
 html[data-theme=dark]:has(.bb-skrivebord.sk-doc-browser-mode)::-webkit-scrollbar-thumb{background:#81978a}
}
