/* Inset controls, not the whole page: avoid double padding in existing app shells. */
:root{--sc-safe-top:env(safe-area-inset-top,0px);--sc-safe-right:env(safe-area-inset-right,0px);--sc-safe-bottom:env(safe-area-inset-bottom,0px);--sc-safe-left:env(safe-area-inset-left,0px)}
@media(max-width:1000px),(display-mode:standalone){
 html:root body #publicLanding .sc-v126-header{
  box-sizing:border-box;height:auto!important;
  padding-top:calc(12px + var(--sc-safe-top))!important;
  padding-right:max(12px,var(--sc-safe-right))!important;
  padding-bottom:12px!important;
  padding-left:max(12px,var(--sc-safe-left))!important;
  top:0;
 }
 html:root body #publicLanding{padding-bottom:var(--sc-safe-bottom)}
 html:root body .c59-header,html:root body #portal .top,html:root body #appView>.topbar{
  box-sizing:border-box;height:auto!important;
  padding-top:calc(12px + var(--sc-safe-top))!important;
  padding-right:max(12px,var(--sc-safe-right))!important;
  padding-left:max(12px,var(--sc-safe-left))!important;
 }
 html:root body.sc-install-page{
  padding-top:calc(12px + var(--sc-safe-top))!important;
  padding-right:max(12px,var(--sc-safe-right))!important;
  padding-bottom:calc(24px + var(--sc-safe-bottom))!important;
  padding-left:max(12px,var(--sc-safe-left))!important;
 }
 html:root body .sc-install-dialog{
  top:var(--sc-safe-top);bottom:var(--sc-safe-bottom);
  max-height:calc(100dvh - var(--sc-safe-top) - var(--sc-safe-bottom) - 24px);
  max-width:calc(100vw - var(--sc-safe-left) - var(--sc-safe-right) - 24px);
 }
}
@media(max-width:820px){
 html:root body{--sc-mobile-bottom:calc(80px + var(--sc-safe-bottom))}
 html:root body.role-admin.sc-admin-archive{--sc-mobile-bottom:calc(126px + var(--sc-safe-bottom))}
 html:root body .c59-bottom,html:root body #portal .mnav.partner-nav,html:root body #bottomNav{
  box-sizing:border-box;height:var(--sc-mobile-bottom)!important;
  padding-bottom:calc(6px + var(--sc-safe-bottom))!important;
  padding-left:max(8px,var(--sc-safe-left))!important;
  padding-right:max(8px,var(--sc-safe-right))!important;
 }
}

/* All native app dialogs stay inside the usable display, including news and details. */
@media(max-width:1000px),(display-mode:standalone){
 html:root body dialog:modal{
  top:var(--sc-safe-top)!important;right:var(--sc-safe-right)!important;
  bottom:var(--sc-safe-bottom)!important;left:var(--sc-safe-left)!important;
  max-height:calc(100dvh - var(--sc-safe-top) - var(--sc-safe-bottom) - 24px)!important;
  max-width:calc(100vw - var(--sc-safe-left) - var(--sc-safe-right) - 24px)!important;
 }
}
@media(max-width:820px){
 html:root body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=button]):not([type=submit]):not([type=reset]),
 html:root body textarea,html:root body select{font-size:16px!important}
}
.sc-connection-status{position:sticky;top:var(--sc-safe-top,0px);z-index:10000;display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;padding:10px max(12px,var(--sc-safe-right,0px)) 10px max(12px,var(--sc-safe-left,0px));background:#362718;color:#fff0dc;border-bottom:1px solid #c39665;font:14px/1.45 system-ui,sans-serif;text-align:left}
.sc-connection-status[hidden]{display:none!important}
.sc-connection-status p{flex:1;min-width:0;margin:0;overflow-wrap:anywhere}
.sc-connection-status strong{display:block;color:#ffd6a3}
.sc-connection-status button{flex:0 0 44px;width:44px;min-height:44px;border:1px solid #a98053;border-radius:9px;background:#211a12;color:#ffe5c2;font:24px/1 system-ui,sans-serif;cursor:pointer}
.sc-connection-status button:focus-visible{outline:2px solid #ffe5c2;outline-offset:3px}
