/* User-approved home and section controls. Published stylesheets stay 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-rows: 4;
  --home-page-icon-size: 64px;
  --home-page-row-gap: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  flex: 1 0 auto;
  width: 100%;
  margin: 18px 0 14px;
}
.home-app-pages__track {
  display: flex;
  flex: 0 0 auto;
  width: calc(100% - 2 * var(--app-inline-gutter) - 10px);
  max-width: 420px;
  height: calc(var(--home-page-rows) * (var(--home-page-icon-size) + 26px) + (var(--home-page-rows) - 1) * 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(var(--home-page-rows), 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;
  flex: 0 0 auto;
  align-self: center;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: max-content;
  min-width: 64px;
  height: 30px;
  margin: 0 auto;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--search-surface-background);
  box-shadow: var(--search-surface-shadow), 0 4px 14px #0000001C;
  -webkit-backdrop-filter: var(--search-surface-backdrop);
  backdrop-filter: var(--search-surface-backdrop);
}
.home-app-pages__navigation[hidden] { display: none; }
.home-app-pages__navigation button { display: grid; place-items: center; flex: 0 0 14px; width: 14px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.home-app-pages__navigation button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .45); }
.home-app-pages__navigation button[aria-current='page']::before { background: #F6F6F6; }
.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(var(--home-page-rows), calc(var(--home-page-icon-size) + 26px));
  gap: var(--home-page-row-gap) 0;
  height: calc(var(--home-page-rows) * (var(--home-page-icon-size) + 26px) + (var(--home-page-rows) - 1) * 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; }
}

/* src/home-section-filter.css */
.home-section-filter__screen-title,
.home-section-filter__status { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.home-section-filter__trigger { display:flex; align-items:center; gap:9px; flex:0 1 218px; min-width:0; height:40px; box-sizing:border-box; padding:0 14px; border:1px solid transparent; border-radius:999px; color:#F7F9FC; background:var(--search-surface-background); box-shadow:var(--search-surface-shadow),0 4px 14px #0000001C; -webkit-backdrop-filter:var(--search-surface-backdrop); backdrop-filter:var(--search-surface-backdrop); font:600 15px/20px Inter,sans-serif; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.home-section-filter__icon { flex:0 0 19px; width:19px; height:19px; }
.home-section-filter__label { white-space:nowrap; }
.home-section-filter__chevron { flex:0 0 16px; width:16px; height:16px; margin-left:auto; color:#BDC5D0; transition:transform 180ms ease-out; }
.home-section-filter__trigger[aria-expanded='true'] .home-section-filter__chevron { transform:rotate(180deg); }
.home-section-filter__trigger:focus { outline:none; }
.home-section-filter__trigger[data-keyboard-navigation='true']:focus-visible { outline:2px solid #48AEF2; outline-offset:3px; }
.home-section-filter-sheet .category-picker-sheet__art > svg { width:28px; height:28px; }
.bottom-sheet.home-section-filter-sheet { padding-bottom:max(22px,env(safe-area-inset-bottom,0px)); }
.section-card[data-home-filter-excluded='true'] { display:none !important; }
@media(max-width:350px) { .home-section-filter__trigger { flex-basis:186px; gap:7px; padding-inline:10px; font-size:14px; } }
@media(prefers-reduced-motion:reduce) { .home-section-filter__chevron { transition:none; } }

/* src/section-header-identity.css */
.section-header-identity {
  display: flex;
  align-items: center;
  flex: 0 1 218px;
  gap: 9px;
  box-sizing: border-box;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--search-surface-background);
  box-shadow: var(--search-surface-shadow), 0 4px 14px #0000001C;
  -webkit-backdrop-filter: var(--search-surface-backdrop);
  backdrop-filter: var(--search-surface-backdrop);
}

.section-header-identity__icon {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 22.5%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
}

.section-header-identity > .section-header__title {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: auto;
  margin: 0;
  overflow: hidden;
  color: var(--color-text, #F7F9FC);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 350px) {
  .section-header-identity { flex-basis: 186px; padding-inline: 10px; gap: 7px; }
  .section-header-identity > .section-header__title { font-size: 13px; }
}

/* src/category-picker.css */
.category-filters[data-picker='true'] {
  width: calc(100% - 2 * var(--app-inline-gutter));
  max-width: var(--app-max-width);
  height: 54px;
  gap: 0;
  padding: 0 0 5px;
  border-bottom-color: #404A5966;
}

.screen-loading__filters[data-picker='true'] {
  width: calc(100% - 2 * var(--app-inline-gutter));
  max-width: var(--app-max-width);
  height: 54px;
  gap: 0;
  padding: 0 0 5px;
  border-bottom-color: #404A5966;
}

.category-filters[data-picker='true'] > .category-filters__button,
.category-filters[data-picker='true'] > .category-filters__bubble,
.category-filters[data-picker='true'] > .category-filters__tint {
  display: none;
}

.category-picker__trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--search-surface-background);
  box-shadow: var(--search-surface-shadow);
  -webkit-backdrop-filter: var(--search-surface-backdrop);
  backdrop-filter: var(--search-surface-backdrop);
  color: var(--color-text, #FFFFFF);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  text-align: left;
  appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.category-picker__filter-icon,
.category-picker__chevron {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  color: #BDC5D0;
  pointer-events: none;
}

.category-picker__filter-icon {
  flex-basis: 26px;
  width: 26px;
  height: 26px;
  color: #FFFFFF;
}

.category-picker__filter-icon svg,
.category-picker__chevron svg {
  display: block;
  width: 100%;
  height: 100%;
}

.category-picker__label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-picker__chevron {
  flex-basis: 20px;
  width: 20px;
  height: 20px;
  transition: transform 180ms ease-out;
}

.category-picker__trigger[aria-expanded='true'] .category-picker__chevron {
  transform: rotate(180deg);
}

.category-picker__trigger:active {
  box-shadow: var(--search-surface-shadow), inset 0 0 0 100px #FFFFFF06;
}

.category-picker__trigger:focus,
.category-picker-sheet__option:focus {
  outline: none;
}

/* Mobile WebViews may retain :focus-visible after programmatic focus.
   Only keyboard navigation should paint a frame around the whole control. */
.category-picker__trigger[data-keyboard-navigation='true']:focus-visible,
.category-picker-sheet[data-keyboard-navigation='true'] .category-picker-sheet__option:focus-visible {
  outline: 2px solid var(--color-accent, #48AEF2);
  outline-offset: 3px;
}

.bottom-sheet.category-picker-sheet {
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top, 0px)));
  padding: 11px 12px max(16px, env(safe-area-inset-bottom, 0px));
  border: 0;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #282B31 0%, #191B1E 100%);
  box-shadow: none;
  touch-action: pan-y;
}

.category-picker-sheet > .bottom-sheet__handle {
  width: 42px;
  margin-bottom: 8px;
  background: #8995A5A6;
  touch-action: none;
}

.category-picker-sheet__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  gap: 16px;
  min-width: 0;
  min-height: 26px;
  margin-bottom: 5px;
  touch-action: none;
}

.category-picker-sheet__title {
  min-width: 0;
  margin: 0;
  color: var(--color-text, #FFFFFF);
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.category-picker-sheet__options {
  display: grid;
  flex: 0 1 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 20px;
  min-height: 0;
  margin-inline: -4px;
  padding: 8px 0 3px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #465261 transparent;
  touch-action: pan-y;
}

.category-picker-sheet__option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-width: 0;
  min-height: 78px;
  padding: 4px 0 7px;
  gap: 5px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #EFF2F6;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  appearance: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.category-picker-sheet__art {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  border: 2px solid transparent;
  border-radius: 50%;
  color: #FFFFFF;
  pointer-events: none;
}

.category-picker-sheet__icon {
  display: block;
  width: 36px;
  height: 36px;
}

.category-picker-sheet__option[data-category-empty='true'] .category-picker-sheet__icon,
.category-picker__trigger[data-category-empty='true'] .category-picker__filter-icon {
  opacity: 0.38;
}

.category-picker-sheet__option[data-category-empty='true'] .category-picker-sheet__label,
.category-picker__trigger[data-category-empty='true'] .category-picker__label {
  color: #A4ABB7;
}

.category-picker-sheet__option[data-category-empty='true'] {
  cursor: default;
}

.category-picker-sheet__icon[data-category-icon='all'],
.category-picker__filter-icon[data-category-icon='all'] {
  transform: scale(0.9);
  transform-origin: center;
}

/* Match the painted silhouettes, not the different padding inside each SVG.
   The same proportional correction also applies to the smaller trigger icon. */
svg[data-icon-game='brawl-stars'][data-category-icon]:not([data-category-icon='all']),
svg[data-icon-game='clash-of-clans'][data-category-icon='skins'] {
  transform: translate(var(--category-icon-x, 0%), var(--category-icon-y, 0%)) scale(var(--category-icon-scale, 1));
  transform-origin: center;
}

svg[data-icon-game='brawl-stars'][data-category-icon='brawl-pass'],
svg[data-icon-game='brawl-stars'][data-category-icon='pass'] {
  --category-icon-scale: 1.04;
}

svg[data-icon-game='brawl-stars'][data-category-icon='gems'] {
  --category-icon-scale: 0.9306;
  --category-icon-x: 1%;
  --category-icon-y: -1%;
}

svg[data-icon-game='brawl-stars'][data-category-icon='hypercharge'],
svg[data-icon-game='brawl-stars'][data-category-icon='hypercharges'] {
  --category-icon-scale: 0.9306;
}

svg[data-icon-game='brawl-stars'][data-category-icon='offers'],
svg[data-icon-game='brawl-stars'][data-category-icon='skins'],
svg[data-icon-game='clash-of-clans'][data-category-icon='skins'] {
  --category-icon-scale: 1.0556;
}

.category-picker-sheet__label {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-wrap: balance;
  pointer-events: none;
}

.category-picker-sheet__check {
  position: absolute;
  top: -10px;
  right: -10px;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: #48AEF2;
  box-shadow: none;
  color: #FFFFFF;
  visibility: hidden;
  pointer-events: none;
}

.category-picker-sheet__check svg {
  display: block;
  width: 10px;
  height: 8px;
}

.category-picker-sheet__check img {
  display: block;
  width: 10px;
  height: 8px;
  object-fit: contain;
}

.category-picker-sheet__option[aria-pressed='true'] {
  color: #FFFFFF;
}

.category-picker-sheet__option[aria-pressed='true'] .category-picker-sheet__art {
  border-color: #48AEF2;
  background: transparent;
  color: #FFFFFF;
}

.category-picker-sheet__option[aria-pressed='true'] .category-picker-sheet__check {
  visibility: visible;
}

@media (max-width: 348px) {
  .category-picker__trigger { padding-inline: 12px; }
  .bottom-sheet.category-picker-sheet { padding-inline: 12px; }
  .category-picker-sheet__options { column-gap: 4px; }
  .category-picker-sheet__option { padding-inline: 0; }
}

@media (max-width: 299px) {
  .category-picker-sheet__options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .category-picker__chevron { transition: none; }
}

/* The storefront opts in; administrative pickers retain their original layout. */
.section-header > .category-filters[data-compact-header='true'] {
  flex: 0 1 218px;
  min-width: 0;
  width: auto;
  height: 40px;
  margin: 0;
  padding: 0;
  border: 0;
}
.category-filters[data-compact-header='true'] .category-picker__trigger {
  height: 40px;
  padding-inline: 12px;
  gap: 9px;
  border-radius: 999px;
  box-shadow: var(--search-surface-shadow), 0 4px 14px #0000001C;
  font-size: 14px;
}
.category-filters[data-compact-header='true'] .category-picker__filter-icon { display: none; }
.category-filters[data-compact-header='true'] .category-picker__chevron { flex-basis: 16px; width: 16px; height: 16px; }
.category-picker__game-logo {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 22.5%;
  object-fit: contain;
  pointer-events: none;
}
.section-header > .category-picker__screen-title {
  position: absolute;
  flex: 0 0 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.category-picker-sheet[data-layout='home'] .category-picker-sheet__options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 0;
  margin-inline: 0;
}
.category-picker-sheet[data-layout='home'] .category-picker-sheet__option {
  padding-inline: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: normal;
}
.category-picker-sheet[data-layout='home'] .category-picker-sheet__label {
  width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  white-space: normal;
  text-wrap: balance;
}
@media (max-width: 350px) {
  .section-header > .category-filters[data-compact-header='true'] { flex-basis: 186px; }
  .category-filters[data-compact-header='true'] .category-picker__trigger { padding-inline: 10px; gap: 7px; font-size: 13px; }
}

/* Approved sticky section controls: begin */
.store-screen > .section-screen__content > .section-header,
.category-screen > .section-screen__content > .section-header,
.screen-loading__shell > .section-header {
  position: sticky;
  top: 0;
  z-index: 4;
  box-sizing: border-box;
  width: 100%;
  margin-inline: 0;
  padding-inline: var(--app-inline-gutter);
  isolation: isolate;
  background: var(--color-bg, #191B1E);
  /* Over this opaque header, use the settled dock tint without live blur.
     Nested backdrop surfaces can leave rectangular repaint tiles on hover. */
  --search-surface-background: linear-gradient(155deg, #FFFFFF09, transparent 50%, #FFFFFF03), #24262A;
  --search-surface-backdrop: none;
  /* Keep the opaque controls on one compositor layer during native scrolling. */
  transform: translateZ(0);
  backface-visibility: hidden;
}
.section-header > .category-filters[data-compact-header='true'] > .category-picker__trigger,
.section-header > .home-section-filter__trigger,
.section-header > .section-header-identity { overflow: hidden; }
.category-screen > .section-screen__content > .product-grid {
  /* Card timers and loading layers must stay below the pinned controls. */
  position: relative;
  z-index: 0;
}
/* Approved sticky section controls: end */
