/* Álex Quest v3.11.34: restore full-height scene grid in iPhone PWA.
 * Regression 3.11.33: 'position:fixed; inset:0' constrained both the scene
 * and bottom dock to WebKit's smaller viewport; this stylesheet deliberately
 * returns the dock to the LAST ROW of the main grid.
 * Large viewport units are a fallback for iOS startup under-measurement.
 */
@media (display-mode:standalone) and (orientation:portrait) {
  html:has(body:is([data-view="home"],[data-view="games"],[data-view="progress"])) {
    height:auto;
    min-height:100vh;
    overflow-x:hidden;
    overflow-y:hidden;
  }
  body:is([data-view="home"],[data-view="games"],[data-view="progress"]) {
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    height:max(100vh,100dvh)!important;
    min-height:max(100vh,100dvh)!important;
    max-height:none!important;
    display:grid!important;
    grid-template:minmax(0,1fr) var(--home-dock-height) / minmax(0,760px)!important;
    justify-content:center;
    overflow:hidden!important;
  }
  @supports(height:100lvh) {
    body:is([data-view="home"],[data-view="games"],[data-view="progress"]) {
      height:max(100vh,100dvh,100lvh)!important;
      min-height:max(100vh,100dvh,100lvh)!important;
    }
  }
  body:is([data-view="home"],[data-view="games"],[data-view="progress"]) .app-shell {
    grid-area:1 / 1 / 3 / 2;
    min-height:0;
    overflow:auto;
  }
  body:is([data-view="home"],[data-view="games"],[data-view="progress"]) #bottomNav {
    grid-area:2 / 1;
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    bottom:auto!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    transform:none!important;
  }
}
