/* Mobile-only 7-tile arcade mosaics and article author/action alignment.
 * Last stylesheet on the affected pages to override older 4-tile/stacking rules.
 * Desktop and tablet layouts are deliberately unchanged. */
@media (max-width:650px) {
  body [data-homepage-sections] .pl-home-mosaic-track--desktop {
    display:none!important;
  }
  body [data-homepage-sections] .pl-home-mosaic-track--mobile {
    display:grid!important;
    grid-auto-flow:column!important;
    grid-template-columns:none!important;
    grid-template-rows:minmax(0,1fr)!important;
    grid-auto-columns:calc(100% - 14px)!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:12px!important;
    align-items:start!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    overscroll-behavior-x:contain!important;
    scroll-snap-type:x mandatory!important;
    scroll-padding-inline:0!important;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none!important;
    direction:rtl!important;
    padding:4px 0 11px!important;
    box-sizing:border-box!important;
  }
  body [data-homepage-sections] .pl-home-mosaic-track--mobile::-webkit-scrollbar {
    display:none!important;
  }
  body [data-homepage-sections] .pl-home-mosaic--mobile {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-template-rows:auto auto auto!important;
    grid-auto-flow:row!important;
    grid-auto-rows:auto!important;
    align-items:start!important;
    align-content:start!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:auto!important;
    flex:none!important;
    gap:8px!important;
    box-sizing:border-box!important;
    scroll-snap-align:start!important;
    scroll-snap-stop:always!important;
    direction:rtl!important;
  }
  body [data-homepage-sections] .pl-home-mosaic--mobile>.pl-home-arcade-card,
  body [data-homepage-sections] .pl-home-mosaic--mobile>.pl-home-arcade-card:nth-child(n+2) {
    grid-column:auto!important;
    grid-row:auto!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:auto!important;
    align-self:start!important;
  }
  body [data-homepage-sections] .pl-home-mosaic--mobile>.pl-home-arcade-card:first-child {
    grid-column:1/-1!important;
    grid-row:1!important;
    aspect-ratio:auto!important;
  }
  body [data-homepage-sections] .pl-home-mosaic--mobile>.pl-home-arcade-card .pl-home-arcade-media {
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    flex:0 0 auto!important;
    min-height:0!important;
  }
  body [data-homepage-sections] .pl-home-mosaic--mobile>.pl-home-arcade-card:first-child .pl-home-arcade-media {
    aspect-ratio:16/9!important;
  }
  body [data-homepage-sections] .pl-home-mosaic--mobile>.pl-home-arcade-card .pl-home-arcade-title {
    width:100%!important;
    flex:0 0 auto!important;
    margin:0!important;
    box-sizing:border-box!important;
  }

  /* The creator's username and the three engagement controls never stack. */
  body .community-article .pl-article-byline {
    display:flex!important;
    flex-direction:row!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    gap:clamp(4px,1.5vw,9px)!important;
    direction:rtl!important;
  }
  body .community-article .pl-article-byline>img {
    width:clamp(32px,9vw,40px)!important;
    height:clamp(32px,9vw,40px)!important;
    flex:0 0 clamp(32px,9vw,40px)!important;
  }
  body .community-article .pl-author-identity {
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:none!important;
    overflow:hidden!important;
  }
  body .community-article .pl-author-identity>a,
  body .community-article .pl-author-identity>strong,
  body .community-article .pl-author-handle {
    display:block!important;
    max-width:100%!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  body .community-article .pl-article-byline-actions {
    flex:0 0 auto!important;
    width:auto!important;
    min-width:0!important;
    max-width:52%!important;
    margin-inline-start:auto!important;
  }
  body .community-article .pl-article-byline-actions .pl-social {
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:flex-end!important;
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    gap:clamp(2px,0.9vw,6px)!important;
    margin:0!important;
    padding:0!important;
    white-space:nowrap!important;
  }
  body .community-article .pl-article-byline-actions .pl-social-views {
    display:none!important;
  }
  body .community-article .pl-article-byline-actions .pl-social>* {
    flex:0 0 auto!important;
    font-size:clamp(10px,2.6vw,12px)!important;
  }
  body .community-article .pl-article-byline-actions .pl-social :is(button,a) {
    padding:2px!important;
  }
}
