/* Shared by the build and the incremental deployment. */
#app > .page > .shell {
  height: var(--mobile-app-height, var(--app-height, 100dvh));
  padding-top: var(--app-safe-top, 0px);
}
#app .shell > .nav {
  height: calc(var(--nav-h) + max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px)));
  padding-bottom: max(env(safe-area-inset-bottom, 0px), var(--app-safe-bottom, 0px));
}
@media (max-width: 767px) {
  :root, .dark { --shell-width: 100vw; }
  #app > .page > .shell { width: 100%; max-width: none; }
  #app .sec > .hscroll { padding-left: 0; padding-right: 0; }
  #app .sec .card.poster { width: calc((min(100vw, var(--shell-width)) - 24px) / 4); }
  #app .sec .p:not(.large) { width: calc((min(100vw, var(--shell-width)) - 16px) / 3); }
  #app .sec .p:not(.large) img { width: 100%; height: auto; aspect-ratio: 1; }
  #app .stage-view > .grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    align-content: start;
  }
  #app .stage-view > .grid .card,
  #app .stage-view > .grid .thumb { width: 100%; min-width: 0; }
  #app .stage-view > .grid .thumb { height: auto; aspect-ratio: 1; }
  #app .stage-view > .grid .card.poster .thumb { aspect-ratio: 380 / 506; }
  #app .stage-view > .grid img { width: 100%; height: 100%; }
  #app .stage-view > .grid > .empty { grid-column: 1 / -1; }
  #app .stage-view > .stack { padding: 0; flex: 1; min-height: 0; overflow-y: auto; }
  #app .stage-view > .bar { flex-shrink: 0; }
}
