/* One document shell for every state. Footer belongs after content; only
   visible navigation/actions reserve space, rather than page-specific pads. */
#app{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
#app>.site-header{flex-shrink:0;width:100%;margin:0 auto;align-self:center}
#app>.main{flex:1 0 auto;width:100%;min-height:0;padding-bottom:28px}
#app>.site-footer{flex-shrink:0;width:calc(100% - 48px);margin:0 auto;padding:12px 0 max(12px,env(safe-area-inset-bottom));box-sizing:border-box}
#app>.mobile-nav{flex-shrink:0}
@media(max-width:700px){
 #app>.site-header{width:calc(100% - 48px)}
 /* Sticky navigation remains reachable while its actual height participates
    in document flow. There is no hidden 100px footer spacer. */
 #app>.mobile-nav{position:sticky;bottom:0;left:auto;right:auto;width:100%;margin:0}
 #app .main>.mobile-selection,#app .fare-selection{position:sticky;bottom:0;left:auto;right:auto;width:auto;margin:20px -24px 0;max-width:none}
}
@media(max-width:359px){
 #app>.site-header{width:calc(100% - 34px)}
 #app>.site-footer{width:calc(100% - 34px)}
 #app .main>.mobile-selection,#app .fare-selection{margin-inline:-17px}
}
