/* AhilyanagarDJ's Music · WebView-only catalogue card consistency.
 * Mirrors the desktop Home card rhythm without touching mobile, audio or JS.
 * Add after all Home / WebView stylesheets in index.php.
 */
@media screen and (min-width:901px){
  body.listener-body{
    --adc-web-card-min:172px;
    --adc-web-card-gap:14px;
  }

  /* Same responsive columns in every music catalogue section.  auto-fill
     keeps the card width stable even when a row has just 1–3 releases. */
  body.listener-body .listener-main .music-card-grid,
  body.listener-body .listener-main .adc-discovery-grid,
  body.listener-body .listener-main .artist-card-grid,
  body.listener-body .listener-main .category-card-grid{
    display:grid!important;
    grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--adc-web-card-min)),1fr))!important;
    gap:var(--adc-web-card-gap)!important;
    align-items:stretch;
  }

  /* Release tiles: Latest Releases, Made for you, Trending, Singles,
     Albums, Popular Releases and Public Playlists share dimensions. */
  body.listener-body .listener-main .music-card,
  body.listener-body .listener-main .adc-discovery-card{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:11px!important;
    border:1px solid rgba(255,255,255,.055)!important;
    border-radius:12px!important;
    background:#171513!important;
    text-align:left!important;
    color:#fff;
    overflow:hidden;
  }
  body.listener-body .listener-main .music-card:hover,
  body.listener-body .listener-main .adc-discovery-card:hover{
    background:#24211e!important;
    border-color:rgba(255,255,255,.11)!important;
  }
  body.listener-body .listener-main .music-card-art{
    position:relative;
    display:block;
    width:100%;
    aspect-ratio:1/1;
    flex:0 0 auto;
    overflow:hidden;
    border-radius:9px;
  }
  body.listener-body .listener-main .music-card .music-card-art>img,
  body.listener-body .listener-main .adc-discovery-card>img.adc-public-playlist-desktop-art,
  body.listener-body .listener-main .adc-discovery-card>img:not(.verified-badge-icon){
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:1/1!important;
    object-fit:cover!important;
    border-radius:9px!important;
    flex:0 0 auto;
  }
  body.listener-body .listener-main .music-card .music-card-art>img{
    height:100%!important;
  }
  body.listener-body .listener-main .music-card>strong,
  body.listener-body .listener-main .adc-discovery-card>strong{
    display:block!important;
    width:100%;
    margin:10px 0 0!important;
    color:#fff;
    font-size:14px!important;
    font-weight:700!important;
    line-height:19px!important;
    min-height:19px;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.listener-body .listener-main .music-card>small,
  body.listener-body .listener-main .adc-discovery-card>small{
    display:block!important;
    width:100%;
    margin:4px 0 0!important;
    color:#aea49c!important;
    font-size:12px!important;
    font-weight:400;
    line-height:17px!important;
    min-height:17px;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.listener-body .listener-main .music-card>em{
    display:block!important;
    width:100%;
    margin:5px 0 0!important;
    height:14px;
    font-size:10px!important;
    line-height:14px;
    font-style:normal;
    color:#80776f;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
  }
  body.listener-body .listener-main .adc-discovery-card::after{
    content:"";
    display:block;
    height:14px;
    flex:0 0 14px;
    margin-top:5px;
  }

  /* Genre cards remain colored, horizontal tiles but align to the same grid. */
  body.listener-body .listener-main .category-card{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    min-height:108px!important;
    padding:13px!important;
    border-radius:12px!important;
  }
  body.listener-body .listener-main .category-card strong{
    font-size:15px!important;
    line-height:1.2!important;
    font-weight:700;
  }
  body.listener-body .listener-main .category-card small{
    font-size:11px!important;
    line-height:1.35;
  }
  body.listener-body .listener-main .category-card .cat-icon{
    font-size:52px!important;
  }

  /* Artist cards share song-card width, with a centered round portrait. */
  body.listener-body .listener-main .artist-card{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:11px!important;
    border:1px solid rgba(255,255,255,.045)!important;
    border-radius:12px!important;
    background:#171513!important;
    text-align:center;
  }
  body.listener-body .listener-main .artist-card>img:first-child{
    display:block;
    width:min(100%,142px)!important;
    aspect-ratio:1/1;
    height:auto!important;
    margin:0 auto!important;
    border-radius:50%!important;
    object-fit:cover!important;
  }
  body.listener-body .listener-main .artist-card strong{
    font-size:14px!important;
    line-height:19px!important;
    font-weight:700;
  }
  body.listener-body .listener-main .artist-card small{
    font-size:11px!important;
    line-height:16px!important;
  }

  /* Shared type scale for Home headings and the WebView library. */
  body.listener-body .listener-main .section-heading h2{
    font-size:23px!important;
    line-height:1.2!important;
    font-weight:750;
  }
  body.listener-body .listener-main .adc-section-kicker{
    font-size:10px!important;
    line-height:1.3!important;
    letter-spacing:.08em;
  }
  body.listener-body .library-sidebar .adc-library-title-row strong{
    font-size:17px!important;
    line-height:22px!important;
  }
  body.listener-body .library-sidebar .library-item strong,
  body.listener-body.adc-library-expanded .library-sidebar .library-item strong{
    font-size:14px!important;
    line-height:19px!important;
  }
  body.listener-body .library-sidebar .library-item small,
  body.listener-body.adc-library-expanded .library-sidebar .library-item small{
    font-size:12px!important;
    line-height:17px!important;
  }

  /* Now Playing sidebar: restore the original full-width square artwork.
     Card-size consistency applies to catalogue tiles, not this player. */
  body.listener-body .desktop-now-panel .now-panel-cover-wrap{
    width:100%;
    max-width:none;
    margin:0;
    border-radius:10px;
  }
  body.listener-body .desktop-now-panel .now-panel-cover-wrap>img{
    width:100%!important;
    aspect-ratio:1/1!important;
    object-fit:cover!important;
    display:block;
  }
  body.listener-body .desktop-now-panel .now-panel-heading strong{
    font-size:16px!important;
  }
  body.listener-body .desktop-now-panel .now-panel-meta strong{
    font-size:16px!important;
    line-height:1.25!important;
  }
  body.listener-body .desktop-now-panel .now-panel-meta a{
    font-size:12px!important;
    line-height:1.45;
  }
}
