/* Approved homepage grid; all published stylesheets remain immutable. */
/* Home sections follow the compact app grid, independently of product cards. */
.home-app-group,
.screen-loading__home-group {
  width: 100%;
  margin-top: 18px;
}
.home-app-group + .home-app-group,
.screen-loading__home-group + .screen-loading__home-group { margin-top: 20px; }
.home-app-group__title {
  width: calc(100% - 2 * var(--app-inline-gutter));
  max-width: var(--app-max-width);
  margin: 0 auto;
  color: var(--color-secondary, #A4ABB7);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.home-app-group .section-cards--apps,
.screen-loading__home-group .screen-loading__section-grid { margin-top: 12px; }
.section-cards--apps {
  --home-app-icon-size: 64px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 0;
  width: calc(100% - 2 * var(--app-inline-gutter) - 10px);
  height: auto;
  margin-top: 18px;
}
.section-cards--apps > .section-card {
  align-items: center;
  gap: 4px;
  grid-column: auto;
  width: 100%;
  max-width: none;
  min-height: 90px;
  height: auto;
  margin: 0;
  border-radius: 8px;
  overflow: visible;
  background: transparent;
  text-align: center;
}
.section-cards--apps > .section-card:focus-visible {
  outline-color: var(--color-accent);
  outline-offset: 3px;
}
.home-app-pages {
  --home-page-icon-size: 64px;
  --home-page-row-gap: 10px;
  flex: 0 0 auto;
  width: 100%;
  margin: 18px 0 24px;
}
.home-app-pages__track {
  display: flex;
  width: calc(100% - 2 * var(--app-inline-gutter) - 10px);
  max-width: 420px;
  height: calc(4 * (var(--home-page-icon-size) + 26px) + 3 * var(--home-page-row-gap));
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.home-app-pages__track::-webkit-scrollbar { display: none; }
.home-app-pages__track > .home-app-page {
  --home-app-icon-size: var(--home-page-icon-size);
  flex: 0 0 100%;
  grid-template-rows: repeat(4, calc(var(--home-page-icon-size) + 26px));
  gap: var(--home-page-row-gap) 0;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.home-app-pages .home-app-page > .section-card { min-height: 0; height: calc(var(--home-page-icon-size) + 26px); }
.home-app-pages .section-card:focus-visible { outline-offset: -2px; }
.home-app-pages__navigation { display: flex; justify-content: center; align-items: center; height: 20px; gap: 4px; }
.home-app-pages__navigation[hidden] { display: none; }
.home-app-pages__navigation button { display: grid; place-items: center; width: 24px; height: 20px; border: 0; padding: 0; background: none; cursor: pointer; }
.home-app-pages__navigation button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #626970; }
.home-app-pages__navigation button[aria-current='page']::before { background: #E4E8ED; }
.home-app-pages__navigation button:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; border-radius: 7px; }
.section-cards--apps > .section-card > .section-card__artwork {
  position: relative;
  inset: auto;
  flex: 0 0 var(--home-app-icon-size);
  width: var(--home-app-icon-size);
  height: var(--home-app-icon-size);
  border-radius: 22.5%;
  overflow: hidden;
  background: none;
}
.section-cards--apps > .section-card > .section-card__artwork::after { content: none; }
.section-cards--apps > .section-card .section-card__logo {
  position: static;
  width: 100%;
  max-width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  filter: none;
}
.section-cards--apps .section-card__footer {
  justify-content: center;
  flex: 0 0 auto;
  width: calc(100% - 4px);
  height: 18px;
  margin: 0;
  padding: 0;
}
.section-cards--apps .section-card__title {
  --home-app-label-size: 12px;
  height: 18px;
  overflow: visible;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--home-app-label-size);
  font-weight: 400;
  line-height: 18px;
  letter-spacing: normal;
  text-overflow: clip;
}
.section-cards--apps .section-card__updated[data-unavailable='true'] {
  position: static;
  align-self: center;
  gap: 3px;
  max-width: 100%;
  height: 13px;
  margin-top: -2px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  color: var(--color-secondary, #A4ABB7);
  font-size: 9px;
  font-weight: 400;
  line-height: 13px;
  transform: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.section-cards--apps .section-card__updated svg { flex: 0 0 9px; width: 9px; height: 9px; }
@media (max-width: 350px) {
  .section-cards--apps { --home-app-icon-size: 60px; }
  .section-cards--apps > .section-card { min-height: 86px; }
}


.screen-loading__section-grid { --home-app-icon-size: 64px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px 0; width: calc(100% - 2 * var(--app-inline-gutter) - 10px); max-width: 420px; margin: 18px auto 0; }
.screen-loading__section-card { position: relative; height: 90px; }
.screen-loading__section-card::before { content: ''; display: block; width: var(--home-app-icon-size); height: var(--home-app-icon-size); margin-inline: auto; border-radius: 22.5%; background: #30343a; }
.screen-loading__section-card::after { content: ''; display: block; width: 74%; max-width: 70px; height: 10px; margin: 8px auto 0; border-radius: 4px; background: #30343a; }
.screen-loading__home-pages .screen-loading__section-grid {
  --home-app-icon-size: var(--home-page-icon-size);
  grid-template-rows: repeat(4, calc(var(--home-page-icon-size) + 26px));
  gap: var(--home-page-row-gap) 0;
  height: calc(4 * (var(--home-page-icon-size) + 26px) + 3 * var(--home-page-row-gap));
  margin: 0 auto;
}
.screen-loading__home-pages .screen-loading__section-card { height: calc(var(--home-page-icon-size) + 26px); }
@media (max-width: 350px) {
  .screen-loading__section-grid { --home-app-icon-size: 60px; }
  .screen-loading__section-card { height: 86px; }
}

.store-screen { touch-action: pan-x pan-y; }
.store-screen > .section-screen__content {
  display: flex;
  flex-direction: column;
  /* The visible dock is 60px high with a 2px bottom inset. The footer already
     supplies its own breathing room; reserving the transparent dock top too
     creates scrolling even when every home block fits above the buttons. */
  padding-bottom: calc(62px + var(--app-bottom-safe-area));
}
.store-screen > .section-screen__content > .section-header,
.store-screen > .section-screen__content > .section-cards--apps,
.store-screen > .section-screen__content > .home-app-group,
.store-screen > .section-screen__content > .site-information { flex-shrink: 0; }
.store-screen > .section-screen__content > .section-cards--apps { margin-bottom: 24px; }
.store-screen > .section-screen__content > .home-app-group:last-of-type { margin-bottom: 24px; }
.store-screen > .section-screen__content > .site-information { margin-top: auto; }
.store-screen > .section-screen__content:has([data-home-app-pages]) { min-height: 100%; }
