/* Keep the native screen as the scroll source so route memory and rubber
   banding stay intact. Only the home document grid grows vertically. */
.store-screen:has([data-home-layout='vertical']) { touch-action: pan-y; }
.store-screen:has([data-home-layout='vertical']) > .section-screen__content {
  padding-bottom: calc(62px + var(--app-bottom-safe-area) + 16px);
}
.home-app-pages[data-home-layout='vertical'] {
  --home-page-icon-size: 64px;
  --home-page-row-gap: 18px;
  display: block;
  flex: 1 0 auto;
  /* The header adds 8px below its controls; match the 22px between rows. */
  margin: 14px 0 0;
}
.home-app-pages[data-home-layout='vertical'] > .home-app-pages__track {
  display: block;
  height: auto;
  overflow: visible;
  scroll-snap-type: none;
  overscroll-behavior: auto;
  touch-action: pan-y;
}
.home-app-pages[data-home-layout='vertical'] .home-app-page {
  --home-app-icon-size: var(--home-page-icon-size);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: none;
  grid-auto-rows: calc(var(--home-page-icon-size) + 26px);
  gap: var(--home-page-row-gap) 0;
  height: auto;
  margin: 0 auto;
  scroll-snap-align: none;
  scroll-snap-stop: normal;
}
.home-app-pages[data-home-layout='vertical'] > .home-app-pages__navigation {
  display: none;
}
.screen-loading__shell[data-home-layout='vertical'] {
  padding-bottom: calc(62px + var(--app-bottom-safe-area) + 16px);
}
.screen-loading__shell[data-home-layout='vertical'] .screen-loading__home-pages > .screen-loading__section-grid {
  height: auto;
  grid-template-rows: none;
}
@media (max-width: 350px) {
  .home-app-pages[data-home-layout='vertical'] { --home-page-icon-size: 60px; }
}

/* Keep the profile compact while retaining the shared scrollable minimum
   height that enables native rubber banding. */
#screen-profile:has(.site-information) > .section-screen__content {
  display: flex;
  flex-direction: column;
  padding-bottom: calc(62px + var(--app-bottom-safe-area) + 4px);
}
#screen-profile:has(.site-information) > .section-screen__content > * { flex-shrink: 0; }
#screen-profile:has(.site-information) .profile-card {
  height: 150px;
  gap: 10px;
  padding-block: 14px;
}
#screen-profile:has(.site-information) .profile-history {
  flex: 1 0 auto;
  margin-top: 20px;
  margin-bottom: 16px;
  gap: 12px;
}
#screen-profile:has(.site-information) .profile-history__card {
  flex: 1 0 160px;
  min-height: 160px;
  height: auto;
  gap: 10px;
  padding-block: 12px;
}
#screen-profile:has(.site-information) .empty-sticker {
  width: 104px;
  height: 104px;
}
#screen-profile > .section-screen__content > .site-information {
  margin-top: auto;
}
.screen-loading__profile .screen-loading__balance-panel { height: 150px; padding-block: 14px; }
.screen-loading__profile .screen-loading__balance-button { margin-top: 10px; }
.screen-loading__profile .screen-loading__history { margin-top: 20px; }
.screen-loading__profile .screen-loading__history-panel { height: 160px; }
.screen-loading__profile .screen-loading__empty-artwork { width: 104px; height: 104px; }
.screen-loading__profile .screen-loading__line--empty-description { display: none; }
