/* A separate touch layout. Desktop and the studio keep their own navigation. */
.mobile-navigation { display: none; }

@media (max-width: 760px) {
  html:has(body.store-body) { scrollbar-gutter: auto; }
  .store-body {
    --mobile-dock: calc(66px + env(safe-area-inset-bottom, 0px));
    -webkit-tap-highlight-color: transparent;
    scroll-padding-bottom: calc(var(--mobile-dock) + 16px);
  }
  .store-body .store-shell {
    width: 100%; max-width: none;
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
    padding-bottom: var(--mobile-dock);
  }
  .store-body .owner-bar { height: 30px; padding-inline: 16px; gap: 8px; }
  .store-body .owner-bar > span, .store-body .owner-tools a:last-child { display: none; }
  .store-body .owner-bar a { min-height: 30px; font-size: 10px; }
  .store-body .store-header {
    display: grid; grid-template-columns: minmax(0,1fr) 44px 44px;
    gap: 10px 6px; align-items: center; padding: 12px 0 14px;
  }
  .store-body .store-header > .store-brand { grid-area: 1 / 1; gap: 8px; }
  .store-body .store-header .store-brand strong { font-size: 20px; letter-spacing: -.5px; max-width: 100%; }
  .store-body .store-header .brand-mark { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; }
  .store-body .store-header > .store-cart {
    grid-area: 1 / 2; justify-self: stretch; position: relative;
    width: 44px; height: 44px; display: grid; place-items: center;
    background: var(--s-surface); border: 1px solid var(--s-line); border-radius: 13px;
  }
  .store-body .store-cart > .ico { width: 21px; height: 21px; }
  .store-body .store-cart > span {
    position: absolute; top: -3px; inset-inline-end: -3px; min-width: 17px; height: 17px;
    background: var(--accent); color: #fff; border-radius: 6px; font-size: 9px;
  }
  .store-body .store-header > .member-header-actions {
    grid-area: 1 / 3; margin: 0; display: flex; align-items: center; justify-content: center;
  }
  .store-body .store-header .header-balance,
  .store-body .store-header .header-sell,
  .store-body .store-header .header-icon,
  .store-body .store-header .support-top,
  .store-body .store-nav { display: none; }
  .store-body .store-header .member-link {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid var(--s-line); border-radius: 13px; background: var(--s-surface);
  }
  .store-body .store-header .member-link > span { display: none; }
  .store-body .store-header .member-link > img { width: 30px; height: 30px; border-radius: 10px; }
  .store-body .store-header .member-link > .ico { width: 21px; height: 21px; }
  .store-body .store-header > .store-search {
    grid-area: 2 / 1 / 3 / -1; display: flex; gap: 10px;
    width: 100%; min-height: 48px; padding: 0 5px 0 14px; margin: 0;
    border-radius: 14px; border-color: var(--s-line); background: var(--s-surface);
  }
  .store-body[dir=rtl] .store-search, html[dir=rtl] .store-body .store-search { padding: 0 14px 0 5px; }
  .store-body .store-search > .ico { flex: 0 0 20px; width: 20px; height: 20px; color: var(--s-muted); }
  .store-body .store-search input { flex: 1; width: 0; min-width: 0; font-size: 16px; padding: 12px 0; }
  .store-body .store-search button { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; }
  .store-body .search-suggestions { min-width: 0; max-height: 55dvh; overflow-y: auto; }
  .store-body .search-suggestions button { width: 100%; min-height: 48px; height: auto; }
  .store-body .store-main { padding-top: 8px; padding-bottom: 20px; }
  .store-body .store-main[data-section=home] { display: flex; flex-direction: column; }
  .store-body .store-section-heading { gap: 12px; align-items: center; margin-bottom: 14px; }
  .store-body .store-section-heading h2 { font-size: 19px; line-height: 1.35; letter-spacing: -.4px; }
  .store-body .store-section-heading p { font-size: 12px; line-height: 1.5; }
  .store-body .store-section-heading > a, .store-body .store-section-heading > button { font-size: 12px; min-height: 44px; }

  /* Consistent icon and text tracks, including long translations. */
  .store-body .catalog-categories { margin: 0 0 18px; }
  .store-body .catalog-categories .store-section-heading { margin-bottom: 8px; }
  .store-body .category-tiles { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px 2px; margin: 0; }
  .store-body .category-tiles > button {
    padding: 8px 2px 6px; min-height: 88px; gap: 7px; border-radius: 12px;
    grid-template-rows: 36px minmax(30px,auto); justify-items: center;
  }
  .store-body .category-tiles > button > span,
  .store-body .category-tiles .category-illustration { width: 36px; height: 36px; flex-basis: 36px; }
  .store-body .category-tiles strong { font-size: 11px; line-height: 1.35; text-align: center; width: 100%; }

  /* Compact campaign cards put browsing in the first screenful. */
  .store-body .home-campaigns { border-radius: 18px; margin: 0 0 6px; touch-action: pan-y pinch-zoom; }
  .store-body .home-campaigns .store-hero.campaign {
    height: 100%; min-height: 248px; padding: 22px 20px 60px; border-radius: 18px;
    background: linear-gradient(115deg, #1e263a, #202b43 65%, #25304a);
  }
  .store-body.store-light .home-campaigns .store-hero.campaign { background: linear-gradient(115deg,#eef1f9,#e0e7f5); }
  .store-body .home-campaigns .campaign-copy { width: 66%; max-width: 66%; position: relative; z-index: 2; }
  .store-body .home-campaigns .catalog-kicker { font-size: 9px; line-height: 1.5; letter-spacing: .25px; }
  .store-body .home-campaigns .flat-campaign h1, .store-body .home-campaigns .flat-campaign h2 { font-size: clamp(22px,5.7vw,30px); line-height: 1.13; margin: 9px 0; letter-spacing: -.65px; }
  .store-body .home-campaigns .campaign-copy > p { font-size: 11px; line-height: 1.5; margin: 8px 0 10px; }
  .store-body .home-campaigns .store-btn { min-height: 40px; padding: 8px 12px; font-size: 11px; border-radius: 9px; }
  .store-body .home-campaigns .campaign-art {
    top: 30px; bottom: auto; right: -8%; left: auto; width: 51%; height: 156px; object-fit: contain; opacity: .9;
  }
  html[dir=rtl] .store-body .home-campaigns .campaign-art { left: -8%; right: auto; }
  .store-body .home-campaigns .campaign-controls { bottom: 0; left: 14px; right: 14px; gap: 0; justify-content: flex-start; }
  .store-body .home-campaigns .campaign-controls > button { width: 40px; height: 44px; border: 0; background: none; }
  .store-body .home-campaigns .campaign-dots { gap: 0; }
  .store-body .home-campaigns .campaign-dots button { width: 27px; height: 44px; }
  .store-body .catalog-section { margin-block: 24px 6px; }
  .store-body .promoted-rail {
    grid-auto-columns: minmax(158px,46%); gap: 12px; padding: 2px 1px 12px;
    scroll-padding-inline: 1px; scrollbar-width: none;
  }
  .store-body .promoted-rail::-webkit-scrollbar { display: none; }
  .store-body .product-grid, .store-body .catalog-layout .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .store-body .product-card { border-radius: 14px; }
  .store-body .product-card .product-image, .store-body .product-card > .game-art {
    width: 100%; height: auto; aspect-ratio: 1.28; object-fit: cover;
  }
  .store-body .product-info { padding: 12px 10px; }
  .store-body .product-tag { display: block; font-size: 10px; line-height: 1.4; }
  .store-body .product-tag > span { display: none; }
  .store-body .product-info h3 { font-size: 13px; line-height: 1.45; min-height: 2.9em; margin-block: 7px 10px; }
  .store-body .product-seller { gap: 6px; margin-block: 10px; }
  .store-body .product-seller > img, .store-body .product-seller > .ico { width: 23px; height: 23px; flex: 0 0 23px; }
  .store-body .product-seller strong { font-size: 10px; line-height: 1.5; }
  .store-body .product-seller small { font-size: 9px; line-height: 1.5; }
  .store-body .product-bottom { gap: 4px; align-items: end; }
  .store-body .product-bottom strong { font-size: 18px; letter-spacing: -.4px; }
  .store-body .product-arrow { width: 26px; height: 26px; flex: 0 0 26px; }
  .store-body .catalog-game-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px 10px; }
  .store-body .catalog-game > .catalog-visual { border-radius: 15px; }
  .store-body .catalog-game > strong { font-size: 11px; line-height: 1.4; min-height: 2.8em; margin-top: 8px; text-align: center; }
  .store-body .gift-grid { gap: 14px 10px; }
  .store-body .directory-search { width: 100%; max-width: none; min-height: 48px; border-radius: 12px; }
  .store-body .directory-search input { font-size: 16px; }
  .store-body #game-directory > .store-section-heading { align-items: stretch; flex-direction: column; }
  .store-body .campaign-pair { gap: 12px; margin-block: 24px 0; }
  .store-body .campaign-pair .campaign { min-height: 170px; border-radius: 16px; padding: 22px; }
  .store-body .campaign-pair .campaign h2 { font-size: 23px; }
  .store-body .campaign-pair .campaign-art { width: 43%; }
  .store-body #catalog-banner .campaign { min-height: 170px; padding: 22px 20px; border-radius: 18px; }
  .store-body #catalog-banner .campaign-copy { width: 67%; max-width: 67%; }
  .store-body #catalog-banner .campaign h2 { font-size: 24px; line-height: 1.15; margin-block: 8px; }
  .store-body #catalog-banner .campaign-copy > p { font-size: 12px; line-height: 1.5; }
  .store-body #catalog-banner .campaign-art { width: 45%; height: 150px; top: 10px; bottom: auto; right: -5%; left: auto; object-fit: contain; }
  html[dir=rtl] .store-body #catalog-banner .campaign-art { right: auto; left: -5%; }
  .store-body .listing-detail { gap: 18px; }
  .store-body .listing-detail > div:first-child { display: contents; }
  .store-body .listing-detail :is(.listing-gallery,.detail-art) { order: 0; }
  .store-body .listing-detail > .purchase-card { order: 1; padding: 20px; }
  .store-body .listing-detail .product-description { order: 2; }

  .store-body .mobile-navigation {
    position: fixed; z-index: 900; inset: auto 0 0;
    display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: stretch;
    min-height: var(--mobile-dock); padding: 5px max(8px,env(safe-area-inset-right)) env(safe-area-inset-bottom,0px) max(8px,env(safe-area-inset-left));
    background: var(--s-surface); border-top: 1px solid var(--s-line); box-shadow: 0 -8px 30px #0000000c;
  }
  .store-body .mobile-navigation > a {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; padding: 6px 2px; min-height: 60px; min-width: 0;
    color: var(--s-muted); text-decoration: none; border-radius: 12px;
  }
  .store-body .mobile-navigation .ico { width: 22px; height: 22px; flex: 0 0 22px; }
  .store-body .mobile-navigation span { width: 100%; text-align: center; font-size: 10px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
  .store-body .mobile-navigation [aria-current=page] { color: var(--s-text); background: color-mix(in srgb,var(--accent) 14%,transparent); }
  .store-body .mobile-navigation [aria-current=page] .ico { color: var(--accent); }
  .store-body .mobile-navigation a:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
  .store-body .support-widget { bottom: calc(var(--mobile-dock) + 12px); right: max(14px,env(safe-area-inset-right)); }
  .store-body .chat-launcher { width: 48px; height: 48px; border-radius: 17px; }
  .store-body .chat-panel { bottom: 60px; max-height: calc(100dvh - var(--mobile-dock) - 90px); }
  .store-body .guide-support-tip { bottom: calc(var(--mobile-dock) + 78px); }
  .store-body #toast { bottom: calc(var(--mobile-dock) + 16px); max-width: calc(100vw - 32px); }
  .store-body :is(input,textarea,select) { scroll-margin-bottom: calc(var(--mobile-dock) + 24px); }
  .store-body :is(input,textarea,select):not([type=checkbox]):not([type=radio]):not([type=range]) { font-size: 16px; }
  .store-body .member-layout { display: block; margin: 6px 0 24px; }
  .store-body .member-sidebar { position: static; background: none; border: 0; padding: 0; margin-bottom: 20px; }
  .store-body .sidebar-identity { display: none; }
  .store-body .sidebar-logout { display: flex; justify-content: flex-end; margin: 0; }
  .store-body .sidebar-logout .btn { min-height: 44px; }
  .store-body .store-main:not([data-section=account]) .sidebar-logout { display: none; }
  .store-body .store-main:is([data-section=wallet],[data-section=deposit],[data-section=messages]) .member-sidebar { display: none; }
  .store-body .member-nav { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin: 0; padding: 0 0 10px; scrollbar-width: none; }
  .store-body .member-nav a { flex: 0 0 auto; white-space: nowrap; padding: 11px 13px; min-height: 44px; border-radius: 10px; background: var(--s-surface); }
  .store-body .member-nav a.selected { background: color-mix(in srgb,var(--accent) 14%,var(--s-surface)); }
  .store-body .store-page-heading h1 { font-size: 26px; line-height: 1.2; }
  .store-body .store-footer { margin-top: 24px; padding-top: 26px; gap: 24px; }
  .store-body .member-chat.messages-workspace { height: calc(100dvh - var(--mobile-dock) - 180px); min-height: 480px; }
}

@media (max-width: 360px) {
  .store-body .store-shell { padding-inline: 12px; }
  .store-body .category-tiles strong { font-size: 10px; }
  .store-body .catalog-game-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .store-body .home-campaigns .store-hero.campaign { padding-inline: 16px; }
  .store-body .home-campaigns .campaign-copy { width: 69%; max-width: 69%; }
  .store-body .product-info { padding: 10px 8px; }
  .store-body .product-bottom strong { font-size: 16px; }
}

@media (max-width: 760px) and (hover: none) {
  .store-body .product-card:hover, .store-body .category-tiles button:hover, .store-body .catalog-game:hover { transform: none; }
}
