@media screen {
 .pwa-install{font-size:13px;text-align:left;margin-top:12px}
 .pwa-status{position:fixed;inset:auto auto calc(12px + env(safe-area-inset-bottom)) 50%;margin:0;transform:translateX(-50%);width:min(560px,calc(100% - 24px));padding:14px 18px;background:#eaf0f7;color:#20334d;border:1px solid #aebfd4;border-radius:12px;box-shadow:0 6px 24px #17232f33;z-index:1000;box-sizing:border-box}
 .pwa-status[hidden],.pwa-status button[hidden]{display:none}
 .pwa-status::backdrop{background:transparent}
 html.has-pwa-status body{padding-bottom:calc(var(--pwa-panel-space,0px) + env(safe-area-inset-bottom));}
 html.has-pwa-status #modal[open]{max-height:calc(100dvh - var(--pwa-panel-space,0px) - 24px);margin-top:12px;margin-bottom:calc(var(--pwa-panel-space,0px) + 12px);}
 .pwa-status p{margin:0 0 8px}.pwa-status p:last-child{margin:0}
 .pwa-help{max-width:520px;line-height:1.5}
 @media(max-width:800px){
  html{scroll-padding-bottom:90px}body{padding-bottom:env(safe-area-inset-bottom)}
  .sidebar{padding-top:max(15px,env(safe-area-inset-top))}
  .navigation{flex-wrap:nowrap;overflow-x:auto;max-width:100%;padding-bottom:6px}
  .navigation .nav-button{flex:0 0 auto;min-height:44px}
  .pwa-install{margin:0;min-height:44px}
  .auth-screen{min-height:100dvh;box-sizing:border-box}.auth-intro{min-width:0}.auth-panel{min-width:0;width:100%;box-sizing:border-box}
  #modal,.pwa-help{box-sizing:border-box;max-width:calc(100vw - 16px);width:calc(100vw - 16px);max-height:calc(100dvh - 24px);overscroll-behavior:contain}
  #modal input:not([type=checkbox]):not([type=radio]),#modal select,#modal textarea,.auth-panel input{font-size:16px;min-height:44px;min-width:0;max-width:100%;box-sizing:border-box}
  #modal .grid{grid-template-columns:minmax(0,1fr)}#modal .grid>*{min-width:0}
  .toolbar{flex-wrap:wrap}.toolbar>input,.toolbar>label{min-width:0;max-width:100%}
  .toolbar>select{flex:1 1 160px;min-width:160px;max-width:100%}
  #modal button{min-height:44px}.photos .pending-attachments{width:100%}
  .photos figure{margin:0;max-width:100%}.photos figcaption{height:auto;min-height:36px;overflow-wrap:anywhere}
  #content>.card:has(>table),#modal .card:has(>table){overflow-x:auto}
 }
}
@media print{.pwa-install,.pwa-status,.pwa-help{display:none!important}}
.mobile-tools{display:grid;gap:8px;padding:12px;min-width:0}
.mobile-tools button{white-space:normal;font-size:13px}
#mobileRecords .card{margin:12px 0}
#mobileRecords button{margin:4px}
.mobile-draft-status{font-size:13px}
.mobile-welcome button{margin:4px;min-height:44px}.mobile-welcome{border:1px solid #aebfd4;border-radius:14px;background:#eaf0f7;color:#20334d;padding:24px;max-height:85dvh;overflow:auto}.mobile-welcome::backdrop{background:#17232f88}
