/* Portrait phones and short, touch-first landscape viewports. */
@media (hover: none) and (pointer: coarse) and (max-width: 600px),
       (hover: none) and (pointer: coarse) and (max-height: 500px) and (max-width: 950px) {
  html body.storefront-page main #catalog #products.product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: stretch !important;
  }

  html body.storefront-page main #catalog #products > .product-card.cg-fixed,
  html body.storefront-page main #catalog #products > .cg-fixed > .cg-title,
  html body.storefront-page main #catalog #products > .cg-fixed > .cg-button {
    height: auto !important;
    max-height: none !important;
  }

  html body.storefront-page main #catalog #products > .product-card.cg-fixed {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto 1fr auto auto !important;
    gap: 4px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 7px !important;
    contain-intrinsic-block-size: auto 285px;
  }

  html body.storefront-page main #catalog #products > .cg-fixed > .cg-photo {
    position: relative;
    grid-area: 1 / 1;
    height: auto;
    min-width: 0;
  }

  html body.storefront-page main #catalog #products > .cg-fixed .cg-photo .product-image {
    display: grid !important;
    place-items: center;
    box-sizing: border-box;
    width: 100% !important;
    height: clamp(88px, 27vw, 120px) !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html body.storefront-page main #catalog #products > .cg-fixed .cg-photo .csm-picture,
  html body.storefront-page main #catalog #products > .cg-fixed .cg-photo .product-image :is(img, svg) {
    width: 100% !important;
    height: 100% !important;
  }

  html body.storefront-page main #catalog #products > .cg-fixed .cg-photo .csm-picture {
    position: absolute !important;
    inset: 0 !important;
    display: block;
  }

  html body.storefront-page main #catalog #products > .cg-fixed .cg-photo .product-image :is(img, svg) {
    position: static !important;
    box-sizing: border-box;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    padding: 3px !important;
    transform: none !important;
  }

  html body.storefront-page main #catalog #products > .cg-fixed .cg-photo .photo-unavailable {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 0;
    font-size: 12px;
    text-align: center;
    overflow-wrap: anywhere;
  }

  /* The existing catalogue provides accessible artwork when a photo is absent. */
  html body.storefront-page main #catalog #products > .cg-fixed .product-image:has(> svg)::after {
    content: "Photo unavailable";
    position: absolute;
    inset: auto 0 0;
    padding: 2px;
    background: #141920e8;
    color: #fff;
    font-size: 11px;
    text-align: center;
    pointer-events: none;
  }

  /* Keep the fallback Pokémon art within the viewport while its hero initializes. */
  html body.storefront-page[data-world="pokemon"] main > :is(.full-world-hero, .eh-hero) {
    max-width: 100% !important;
    min-width: 0;
    overflow: hidden;
  }

  html body.storefront-page main #catalog #products > .cg-fixed > .cg-label {
    position: static !important;
    grid-area: 2 / 1;
    height: auto;
    justify-content: flex-start;
    pointer-events: none;
  }

  html body.storefront-page main #catalog #products > .cg-fixed > .cg-label:empty,
  html body.storefront-page main #catalog #products > .cg-fixed > .cg-details,
  html body.storefront-page main #catalog #products > .cg-fixed > .growth-facts,
  html body.storefront-page main #catalog #products > .cg-fixed .quick-view {
    display: none !important;
  }

  html body.storefront-page main #catalog #products > .cg-fixed > .cg-title {
    grid-area: 3 / 1;
    display: block !important;
    min-height: 0 !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  html body.storefront-page main #catalog #products > .cg-fixed > .cg-price {
    grid-area: 4 / 1;
    grid-template-rows: none;
    align-self: end;
    gap: 0;
    height: auto;
  }

  html body.storefront-page main #catalog #products > .cg-fixed :is(.cg-stock, .cg-saving, .cg-amount) {
    height: auto;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
  }

  html body.storefront-page main #catalog #products > .cg-fixed .cg-saving:empty {
    display: none;
  }

  html body.storefront-page main #catalog #products > .cg-fixed .cg-amount {
    font-size: 16px;
  }

  html body.storefront-page main #catalog #products > .cg-fixed > .cg-button {
    grid-area: 5 / 1;
    min-height: 44px !important;
    padding: 5px 4px !important;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  html body.storefront-page main #catalog #products > .cg-fixed > .shortlist-actions {
    grid-area: 6 / 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    padding: 0;
    margin: 0;
    border: 0;
  }

  html body.storefront-page main #catalog #products > .cg-fixed .shortlist-actions button {
    margin: 0;
    min-width: 0;
    min-height: 44px;
    padding: 4px 2px;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 11px;
  }

  /* The legacy phone skin painted opaque copy over successfully loaded art. */
  html body.storefront-page.world-page.full-world[data-world="onepiece"] main section.full-world-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    aspect-ratio: auto !important;
    height: auto !important;
    max-height: none !important;
  }

  html body.storefront-page.world-page.full-world[data-world="onepiece"] main section.full-world-hero .world-hero-art {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-height: min(34vh, 170px) !important;
    display: block !important;
    object-fit: contain !important;
    background: #092e44;
  }

  html body.storefront-page.world-page.full-world[data-world="onepiece"] main section.full-world-hero .world-hero-copy {
    position: relative !important;
    inset: auto !important;
    height: auto !important;
    padding: 14px 16px !important;
  }
}
