.upload-tabs{display:flex;gap:8px;overflow-x:auto;padding:8px 0 14px}.upload-tabs button{flex:none;white-space:nowrap}.upload-guide{border-top:3px solid #2174bb}[hidden]{display:none!important}.mobile-nav{display:none}.grid>*{min-width:0}.tblwrap{overflow-x:auto}input[type=month],input[type=file]{max-width:100%;width:100%}
@media(max-width:600px){
body.in .mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:24;background:#132539;padding:8px 6px calc(8px + env(safe-area-inset-bottom));box-shadow:0 -2px 14px #13253920}
.mobile-nav button{flex:1;min-height:44px;border:0;background:none;color:white;font:600 12px inherit}
.page{padding:16px 12px calc(98px + env(safe-area-inset-bottom))}.card{padding:16px}.g4{grid-template-columns:1fr 1fr}.kpi .v{font-size:25px}input,select{font-size:16px!important;min-height:44px}button{min-height:44px}.upload-tabs button{padding:8px 12px}.crumb{min-width:0}.scope{display:none}#btabs{overflow-x:auto;flex-wrap:nowrap}#detail .dcard{width:100%;max-height:none;margin:0;border-radius:16px 16px 0 0}#detail{padding:0;align-items:flex-end}.dtabs{overflow-x:auto;flex-wrap:nowrap}.dtabs button{white-space:nowrap}.crow{gap:12px}.crow b{text-align:right;overflow-wrap:anywhere}.chartbox{overflow-x:auto}.chartbox svg{min-width:300px}#main{min-width:0}.upload-guide .sub{line-height:1.7}
}
@media print{.mobile-nav,.upload-guide{display:none!important}}

/* v6.1: keep the drawer and backdrop in the same stacking context. */
@media screen and (max-width:860px){
  #app{height:100%;height:100dvh}
  #side{height:100%;box-sizing:border-box;max-width:calc(100vw - 48px)}
  #side .sbrand,#side .sfoot{flex-shrink:0}
  #side .smenu{min-height:0;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
  .burger{flex-shrink:0;min-width:44px;min-height:44px}
  #stage{overscroll-behavior-y:contain}
  #detail{height:100%;height:100dvh;box-sizing:border-box;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  #detail .dcard{max-height:none}
  #detail .dtabs{touch-action:pan-x}
  #detail .tblwrap{ -webkit-overflow-scrolling:touch }
}
