/* Mobile homepage layout; desktop and other routes keep their own styles. */
.home-mobile-intro, .mobile-home-navigation, .home-header-search, .home-brand-wordmark,
.home-mobile-label, .mobile-catalog-count, .mobile-filter-toggle, .home-card-title-mobile,
.mobile-filter-summary { display: none; }
.mobile-home-filter:not([open]) { display: none; }
.home-hero-title-desktop, .home-hero-suffix, .home-spotlight-cta,
.home-favorite-title-desktop, .home-favorite-suffix, .home-card-name-suffix, .home-filter-label { display: none; }

@media (min-width: 768px) {
  .mobile-home-filter { display: none; }
}

@media (max-width: 767px) {
  body.home-route {
    --mobile-bg: #0c0e10;
    --mobile-surface: #16191c;
    --mobile-text: #f3f3f1;
    --mobile-muted: #a7adb4;
    --mobile-accent: #f45248;
    --mobile-line: #292d31;
    --mobile-gutter: clamp(12px, 3.4vw, 22px);
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--mobile-text);
    background: var(--mobile-bg);
    padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    font-family: "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  .home-route main { display: block; width: 100%; min-width: 0; }
  .home-route [data-game-cover][hidden] { display: none !important; }
  .home-route .screen-red-streaks, .home-route .home-desktop-content,
  .home-route .site-footer, .home-route .main-nav, .home-route .mobile-menu-toggle,
  .home-route .header-account, .home-route .header-tools .search-box { display: none !important; }
  .home-route .site-header {
    position: relative;
    height: auto;
    min-height: 56px;
    border: 0;
    background: var(--mobile-bg);
    box-shadow: none;
    backdrop-filter: none;
  }
  .home-route .header-inner { width: calc(100% - 2 * var(--mobile-gutter)); min-height: 56px; margin-inline: auto; gap: 8px; }
  .home-route .site-header .header-brand { flex: 1 1 0; width: auto; min-width: 0; margin: 0; gap: 7px; align-self: center; justify-content: flex-start; }
  .home-route .brand-logo { position: static; flex: 0 0 42px; width: 42px; height: 42px; object-fit: contain; transform: none; filter: none; }
  .home-route .home-brand-wordmark { display: block; min-width: 0; padding-right: 2px; overflow: hidden; text-overflow: ellipsis; font-size: clamp(16px, 4.5vw, 23px); font-weight: 900; font-style: italic; line-height: 1.2; letter-spacing: -.7px; white-space: nowrap; }
  .home-route .home-brand-wordmark > span { color: #e6382e; }
  .home-route .header-tools { position: static; flex: 0 0 auto; margin: 0 0 0 auto; gap: 4px; transform: none; }
  .home-route .home-header-search, .home-route .cart-button {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 9px;
    background: none; color: var(--mobile-text); border: 0; border-radius: 8px; box-shadow: none; cursor: pointer;
  }
  .home-route .header-tools svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
  .home-route .cart-count { top: 0; right: -2px; min-width: 16px; height: 16px; font-size: 10px; }
  .home-route .cart-count[hidden] { display: none !important; }
  .home-route .home-mobile-intro { display: block; width: calc(100% - 2 * var(--mobile-gutter)); min-width: 0; margin-inline: auto; }
  .home-route .mobile-home-search {
    min-height: 44px; display: flex; align-items: center; gap: 10px; padding-inline: 13px;
    margin: 0 0 8px; background: linear-gradient(110deg, #191d20, #14171a); border: 1px solid var(--mobile-line); border-radius: 10px;
  }
  .home-route .mobile-home-search > svg { flex: 0 0 22px; width: 22px; height: 22px; fill: none; stroke: #f1f1ef; stroke-width: 1.6; stroke-linecap: round; }
  .home-route .mobile-home-search input { flex: 1 1 0; width: 100%; min-width: 0; min-height: 42px; border: 0; padding: 8px 0; background: transparent; color: var(--mobile-text); font-size: 16px; outline: 0; }
  .home-route .mobile-home-search input::placeholder { color: #a3aab1; opacity: 1; font-size: 14px; }
  .home-route .mobile-home-search:focus-within { border-color: #858b91; }
  .home-route .mobile-spotlight { margin: 0; }
  .home-route .mobile-spotlight-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; scrollbar-width: none; border-radius: 10px; }
  .home-route .mobile-spotlight-track::-webkit-scrollbar { display: none; }
  .home-route .mobile-spotlight-slide { position: relative; flex: 0 0 100%; min-width: 0; aspect-ratio: 1.97; overflow: hidden; scroll-snap-align: start; background: #1c2325; border-radius: 10px; }
  .home-route .mobile-spotlight-slide > picture, .home-route .mobile-spotlight-slide img { width: 100%; height: 100%; display: block; object-fit: cover; }
  .home-route .mobile-spotlight-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / 45%), transparent 76%), linear-gradient(0deg, rgb(0 0 0 / 60%), transparent 80%); pointer-events: none; }
  .home-route .mobile-spotlight-copy { position: absolute; z-index: 1; left: 15px; right: 35%; bottom: 24px; }
  .home-route .mobile-spotlight-copy p { margin: 0 0 4px; font-size: 8px; letter-spacing: 1.5px; font-weight: 700; }
  .home-route .mobile-spotlight-copy h2 { margin: 0 0 6px; font-size: clamp(25px, 6.7vw, 46px); font-weight: 750; line-height: 1.03; letter-spacing: -.8px; text-wrap: balance; overflow-wrap: anywhere; }
  .home-route .mobile-spotlight-copy > span { color: #bdc3c8; font-size: 12px; }
  .home-route .mobile-spotlight-pages { display: flex; justify-content: center; align-items: center; height: 14px; gap: 0; }
  .home-route .mobile-spotlight-pages button { display: grid; place-items: center; width: 24px; height: 26px; padding: 0; border: 0; background: transparent; cursor: pointer; }
  .home-route .mobile-spotlight-pages span { display: block; width: 12px; height: 3px; background: #343b41; border-radius: 4px; }
  .home-route .mobile-spotlight-pages button[aria-current="true"] span { background: var(--mobile-accent); }
  .home-route .mobile-home-categories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; margin: 0 0 8px; }
  .home-route .mobile-category { position: relative; min-width: 0; min-height: 48px; padding: 2px 0 6px; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; color: var(--mobile-muted); }
  .home-route .mobile-category svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
  .home-route .mobile-category > span { font-size: 12px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
  .home-route .mobile-category.is-selected { color: var(--mobile-text); }
  .home-route .mobile-category.is-selected::after { content: ""; position: absolute; bottom: 0; width: 36px; height: 2px; border-radius: 3px; background: var(--mobile-accent); }
  .home-route .mobile-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 44px; gap: 0 8px; margin-bottom: 8px; }
  .home-route .mobile-section-heading h2 { margin: 0; font-size: 19px; font-weight: 750; letter-spacing: -.4px; line-height: 1.3; }
  .home-route .mobile-section-heading > a { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding-inline: 4px; font-size: 12px; color: var(--mobile-muted); white-space: nowrap; }
  .home-route .mobile-section-heading > a > span { font-size: 16px; }
  .home-route .mobile-favorites-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-route .mobile-favorite { min-width: 0; }
  .home-route .mobile-favorite > a { display: block; }
  .home-route .mobile-favorite-art { position: relative; aspect-ratio: 1.08; border-radius: 8px; overflow: hidden; background: #191f24; }
  .home-route .mobile-favorite-art img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
  .home-route .mobile-art-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #68727b; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
  .home-route .mobile-favorite h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 4px 2px 0; font-size: 12px; line-height: 1.3; font-weight: 700; overflow-wrap: anywhere; }
  .home-route .mobile-product-platform { margin: 0 2px; color: var(--mobile-muted); font-size: 11px; line-height: 1.2; }
  .home-route .mobile-product-price { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 5px; margin: 0 2px; line-height: 1.3; font-variant-numeric: tabular-nums; }
  .home-route .mobile-product-price strong { color: var(--mobile-text); font-size: 13px; font-weight: 700; }
  .home-route .mobile-product-price del, .home-route .mobile-product-price > span { font-size: 10px; color: var(--mobile-muted); }
  .home-route .mobile-product-price .is-free { color: #79ce9b; }
  .home-route .mobile-home-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 10px; min-height: 48px; padding: 10px 13px; border: 1px solid var(--mobile-line); border-radius: 9px; background: linear-gradient(110deg, #181b1e, #121518); }
  .home-route .mobile-home-offer > svg { flex: 0 0 24px; width: 24px; height: 24px; fill: var(--mobile-accent); stroke: var(--mobile-accent); stroke-width: 1.2; }
  .home-route .mobile-home-offer > svg circle { fill: #171b1e; stroke: none; }
  .home-route .mobile-home-offer > span:not(.mobile-home-offer-action) { display: flex; flex: 1 1 110px; min-width: 0; flex-direction: column; line-height: 1.3; overflow-wrap: anywhere; }
  .home-route .mobile-home-offer strong { font-size: 13px; font-weight: 700; }
  .home-route .mobile-home-offer > span > span { color: var(--mobile-muted); font-size: 11px; }
  .home-route .mobile-home-offer .mobile-home-offer-action { display: flex; align-items: center; gap: 6px; margin-left: auto; padding-left: 12px; border-left: 1px solid var(--mobile-line); font-size: 11px; white-space: nowrap; }
  .home-route .all-games-section.shell { width: calc(100% - 2 * var(--mobile-gutter)); min-width: 0; margin-inline: auto; padding-top: 8px; }
  .home-route .all-games-section .home-section-heading { flex-wrap: wrap; justify-content: flex-start; min-height: 48px; margin: 0; gap: 4px 10px; }
  .home-route .all-games-section .home-section-heading h2 { min-width: 0; font-size: 18px; font-weight: 750; letter-spacing: -.4px; }
  .home-route .all-games-section .home-heading-icon, .home-route .home-desktop-label,
  .home-route .all-games-section .shop-results, .home-route .home-card-title-desktop { display: none; }
  .home-route .home-mobile-label, .home-route .home-card-title-mobile { display: inline; }
  .home-route .mobile-catalog-count { display: inline; font-size: 11px; color: var(--mobile-muted); white-space: nowrap; }
  .home-route .mobile-filter-toggle { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; margin-left: auto; color: #dce0e3; background: #101417; border: 1px solid #353b40; border-radius: 9px; cursor: pointer; }
  .home-route .mobile-filter-toggle svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
  .home-route .mobile-filter-summary { display: flex; align-items: center; gap: 10px; margin: 2px 0 8px; font-size: 12px; color: var(--mobile-muted); }
  .home-route .mobile-filter-summary a { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; font-size: 22px; }
  .home-route .all-games-section .home-game-grid { display: block; border-top: 1px solid var(--mobile-line); }
  .home-route .all-games-section .home-game-card { background: transparent; border: 0; border-bottom: 1px solid var(--mobile-line); border-radius: 0; }
  .home-route .all-games-section .home-game-link { display: grid; grid-template-columns: minmax(78px, 34%) minmax(0, 1fr) 6px; align-items: center; gap: 10px; min-height: 57px; padding: 6px 2px 6px 0; }
  .home-route .all-games-section .home-game-link::after { content: ""; width: 5px; height: 8px; border-right: 1px solid #c8ced1; border-top: 1px solid #c8ced1; transform: rotate(45deg) skew(8deg, 8deg); }
  .home-route .all-games-section .home-game-artwork { width: 100%; aspect-ratio: 16 / 9; border-radius: 5px; }
  .home-route .all-games-section .home-game-artwork img { object-fit: cover; }
  .home-route .all-games-section .home-game-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1px 8px; min-width: 0; padding: 0; }
  .home-route .all-games-section .home-game-info h3 { grid-column: 1; grid-row: 1; font-size: 12px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
  .home-route .all-games-section .home-game-meta { display: contents; }
  .home-route .all-games-section .home-game-platform { grid-column: 1; grid-row: 2; font-size: 11px; }
  .home-route .all-games-section .home-game-price { grid-column: 2; grid-row: 1 / 3; flex-direction: column; align-items: flex-end; margin: 0; gap: 0; }
  .home-route .all-games-section .home-game-price strong { color: var(--mobile-text); font-size: 11px; font-weight: 650; }
  .home-route .all-games-section .home-game-price del, .home-route .all-games-section .home-game-price-label { font-size: 8px; }
  .home-route .all-games-section .home-game-price .is-free { color: #79ce9b; }
  .home-route .all-games-section .home-game-price .is-unavailable { max-width: 65px; font-size: 10px; white-space: normal; text-align: right; }
  .home-route .all-games-section .home-game-discount { display: none; }
  .home-route .all-games-section .home-game-fallback svg { width: 18px; height: 18px; }
  .home-route .all-games-section .home-game-fallback span { display: none; }
  .home-route .all-games-section .shop-feed-footer { min-height: 20px; padding-top: 10px; gap: 6px; }
  .home-route .all-games-section .shop-feed-status { font-size: 11px; color: #8f979f; }
  .home-route .all-games-section .shop-feed-status:not(.is-error) { opacity: .7; }
  .home-route .all-games-section .shop-load-more { background: transparent; border-color: #343b40; color: #dedfdd; font-size: 12px; }
  .home-route .mobile-home-navigation { display: grid; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; width: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 69px; padding: 7px var(--mobile-gutter) calc(9px + env(safe-area-inset-bottom, 0px)); background: #0c0f11; border-top: 1px solid #24292d; }
  .home-route .mobile-home-navigation > a { min-width: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; min-height: 46px; color: #b4bac0; font-size: 11px; text-align: center; overflow-wrap: anywhere; }
  .home-route .mobile-home-navigation svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
  .home-route .mobile-home-navigation > a[aria-current="page"] { color: var(--mobile-accent); }
  .home-route .mobile-home-navigation > a[aria-current="page"] svg { fill: currentColor; stroke-width: 0; }
  .home-route .mobile-home-filter:not(.category-filter-sheet) { width: min(100% - 24px, 460px); max-height: 80dvh; margin: auto auto max(12px, env(safe-area-inset-bottom)); padding: 18px; color: var(--mobile-text); background: #171b1e; border: 1px solid #363d43; border-radius: 16px; box-shadow: 0 20px 80px #0009; }
  .home-route .mobile-home-filter:not(.category-filter-sheet)::backdrop { background: #000a; }
  .home-route .mobile-home-filter:not(.category-filter-sheet) .mobile-filter-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .home-route .mobile-home-filter:not(.category-filter-sheet) .mobile-filter-header h2 { margin: 0; font-size: 20px; }
  .home-route .mobile-home-filter:not(.category-filter-sheet) .mobile-filter-header button { width: 44px; height: 44px; padding: 0; color: #e5e5e1; background: transparent; border: 0; font-size: 30px; cursor: pointer; }
  .home-route .mobile-home-filter:not(.category-filter-sheet) label { display: block; font-size: 13px; margin-bottom: 8px; }
  .home-route .mobile-home-filter:not(.category-filter-sheet) select { width: 100%; min-height: 48px; padding: 8px 12px; color: var(--mobile-text); background: #101417; border: 1px solid #4b535a; border-radius: 8px; font: inherit; }
  .home-route .mobile-home-filter:not(.category-filter-sheet) button[type="submit"] { width: 100%; min-height: 48px; margin-top: 18px; color: #fff; background: #da4139; border: 0; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
  .home-route .mobile-empty { padding: 22px 0; color: var(--mobile-muted); font-size: 13px; }
  .home-route .mobile-empty a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 4px; text-decoration: underline; text-underline-offset: 3px; }
  .home-route .home-games-empty { min-width: 0; min-height: 0; padding: 24px 16px; overflow-wrap: anywhere; }
  .home-route .home-games-empty p { max-width: 100%; }
  .home-route .home-load-failure { width: calc(100% - 2 * var(--mobile-gutter)); min-width: 0; margin: 16px auto 24px; padding: 28px 16px; }
  .home-route .home-load-failure h2 { font-size: 20px; }
  .home-route :is(a, button, select, input, [tabindex]):focus-visible { outline: 2px solid #f3776f; outline-offset: 3px; }
  .home-route #all-games { scroll-margin-top: 12px; }
}

@media (max-width: 350px) {
  .home-route .mobile-home-offer { gap: 8px; padding-inline: 9px; }
  .home-route .mobile-home-offer strong { font-size: 12px; }
  .home-route .mobile-home-offer > span > span { font-size: 10px; }
  .home-route .mobile-home-offer .mobile-home-offer-action { font-size: 10px; padding-left: 8px; }
  .home-route .all-games-section .home-section-heading h2 { font-size: 16px; }
  .home-route .all-games-section .home-game-link { grid-template-columns: 29% minmax(0, 1fr) 5px; gap: 7px; }
  .home-route .all-games-section .home-game-info { gap: 1px 5px; }
  .home-route .all-games-section .home-game-info h3 { font-size: 11px; }
  .home-route .all-games-section .home-game-price strong { font-size: 10px; }
}
