/* 2026-11-07 follow-up: one-row PC shelf, three-up editorial grid,
   and a hover outline that scales with the exact artwork boundary.
   Scope strictly to home download/browser/recent and /magazine catalogue. */

/* Download homepage: keep the SAME /pc-games card component and all items
   returned by the admin-controlled home-feed display_limit. Only shelf layout changes. */
body [data-homepage-sections] [data-pl-home-section="download"] .pl-home-download-grid{
  display:grid!important;
  grid-template-columns:none!important;
  grid-template-rows:minmax(0,1fr)!important;
  grid-auto-flow:column!important;
  grid-auto-columns:calc((100% - 5 * 12px)/6)!important;
  gap:12px!important;
  align-items:stretch!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  padding:1px 0 8px!important;
  margin:0!important;
  direction:rtl!important;
  scroll-snap-type:x proximity!important;
  overscroll-behavior-inline:contain!important;
  scrollbar-width:none!important;
  -ms-overflow-style:none!important
}
body [data-homepage-sections] [data-pl-home-section="download"] .pl-home-download-grid::-webkit-scrollbar{
  display:none!important;width:0!important;height:0!important
}
body [data-homepage-sections] [data-pl-home-section="download"] .pl-home-download-grid>.pl-download-col{
  width:100%!important;min-width:0!important;max-width:none!important;
  height:100%!important;min-height:0!important;
  padding:0!important;margin:0!important;
  scroll-snap-align:start!important
}
body [data-homepage-sections] [data-pl-home-section="download"] .pl-home-download-grid>.pl-download-col>.pl-download-card{
  width:100%!important;height:100%!important
}

/* The magazine shelf shows THREE at a time at PC widths, without dropping
   the remaining admin-configured items. Existing tablet/mobile behavior remains. */
@media(min-width:901px){
  body [data-homepage-sections] [data-pl-home-section="magazine"] .pl-home-magazine-grid{
    display:grid!important;
    grid-template-columns:none!important;
    grid-template-rows:minmax(0,1fr)!important;
    grid-auto-flow:column!important;
    grid-auto-columns:calc((100% - 2 * 16px)/3)!important;
    gap:16px!important;
    align-items:start!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    max-width:100%!important;
    scroll-snap-type:x proximity!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
    padding:0 0 9px!important
  }
  body [data-homepage-sections] [data-pl-home-section="magazine"] .pl-home-magazine-grid>.pl-magazine-card{
    width:100%!important;min-width:0!important;max-width:100%!important;
    grid-column:auto!important;grid-row:auto!important;
    scroll-snap-align:start!important
  }
  /* /magazine "view all": exactly three full article tiles per row, not a carousel. */
  body .community-page [data-magazine-list].community-grid{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    gap:23px!important
  }
}
body [data-homepage-sections] [data-pl-home-section="magazine"] .pl-home-magazine-grid::-webkit-scrollbar{
  display:none!important;width:0!important;height:0!important
}

/* The outline must follow the same transformed element as the poster.
   Browser mosaic: border belongs to the complete card (poster + title overlay).
   Recent games: the art surface itself has the rounded border; the link is borderless. */
body [data-homepage-sections] .pl-home-mosaic-track{
  padding:8px 8px 11px!important;
  scroll-padding-inline:8px!important;
  box-sizing:border-box!important
}
body [data-homepage-sections] .pl-home-mosaic>.pl-home-arcade-card,
body [data-homepage-sections] .pl-home-recent-tile>.pl-home-arcade-card{
  position:relative!important;
  transform-origin:center center!important;
  backface-visibility:hidden!important;
  transition:transform .19s ease,box-shadow .19s ease,border-color .19s ease!important;
  will-change:auto!important
}
body [data-homepage-sections] .pl-home-mosaic>.pl-home-arcade-card{
  border:1px solid #ffffff22!important;
  border-radius:15px!important;
  box-shadow:none!important
}
body [data-homepage-sections] .pl-home-mosaic>.pl-home-arcade-card:hover,
body [data-homepage-sections] .pl-home-mosaic>.pl-home-arcade-card:focus-visible{
  border-color:#a68bff!important;
  box-shadow:0 0 0 2px #8052ffda,0 10px 27px #0009!important;
  z-index:8!important
}
body [data-homepage-sections] .pl-home-recent-tile>.pl-home-arcade-card:hover,
body [data-homepage-sections] .pl-home-recent-tile>.pl-home-arcade-card:focus-visible{
  border:0!important;
  box-shadow:none!important;
  z-index:8!important
}
body [data-homepage-sections] .pl-home-recent-tile .pl-home-arcade-media{
  border:1px solid #ffffff28!important;
  box-shadow:none!important;
  transition:border-color .19s ease,box-shadow .19s ease!important
}
body [data-homepage-sections] .pl-home-recent-tile>.pl-home-arcade-card:hover .pl-home-arcade-media,
body [data-homepage-sections] .pl-home-recent-tile>.pl-home-arcade-card:focus-visible .pl-home-arcade-media{
  border-color:#a68bff!important;
  box-shadow:inset 0 0 0 2px #8052ffda,0 8px 23px #0009!important
}
body [data-homepage-sections] [data-pl-home-section="recent"] .pl-home-recent-rail{
  padding:9px 8px 12px!important;
  scroll-padding-inline:8px!important
}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  body [data-homepage-sections] .pl-home-mosaic>.pl-home-arcade-card:hover,
  body [data-homepage-sections] .pl-home-recent-tile>.pl-home-arcade-card:hover{
    transform:scale(1.033)!important;
    z-index:9!important
  }
}
@media(prefers-reduced-motion:reduce){
  body [data-homepage-sections] .pl-home-mosaic>.pl-home-arcade-card,
  body [data-homepage-sections] .pl-home-recent-tile>.pl-home-arcade-card,
  body [data-homepage-sections] .pl-home-recent-tile .pl-home-arcade-media{
    transition:none!important
  }
}
@media(min-width:901px) and (max-width:1439px){
  body [data-homepage-sections] [data-pl-home-section="download"] .pl-home-download-grid{
    grid-auto-columns:calc((100% - 3 * 12px)/4)!important
  }
}
@media(min-width:650px) and (max-width:900px){
  body [data-homepage-sections] [data-pl-home-section="download"] .pl-home-download-grid{
    grid-auto-columns:calc((100% - 2 * 12px)/3)!important
  }
}
@media(max-width:649px){
  body [data-homepage-sections] [data-pl-home-section="download"] .pl-home-download-grid{
    grid-auto-columns:calc((100% - 10px)/2)!important;
    gap:10px!important;
    scroll-snap-type:x mandatory!important
  }
  /* On phones the poster is a separate, non-transformed touch target. */
  body [data-homepage-sections] .pl-home-mosaic-track{
    padding:4px 0 8px!important
  }
  body [data-homepage-sections] [data-pl-home-section="recent"] .pl-home-recent-rail{
    padding:4px 0 8px!important
  }
}
