/* Trường Nguyễn Music V241 BETA – Playlist Catalog album-geometry parity.
 * Scope: ONLY /kho-playlist, no homepage, Album, Angular Player or Admin styles.
 * Geometry: matching existing tn-music-v1.css expanded ALBUM catalogue:
 * 5 columns, 18px gaps, square artwork, 11px radius, 13px title, same content gutter.
 * Slider above uses the existing V146 multi-zone renderer and Admin playlist setting.
 */
html.tn239-catalog-page web-player .space-wrapper > [data-tn239-background="1"],
html.tn239-catalog-page web-player .page-wrapper > [data-tn239-background="1"] { display:none!important; }
/* Never hide the existing Admin-managed Slider, even if it was marked before the V241 patch. */
html.tn239-catalog-page web-player .space-wrapper > #tn-v146-slider,
html.tn239-catalog-page web-player .page-wrapper > #tn-v146-slider {
 display:block!important;visibility:visible!important;
}
html.tn239-catalog-page web-player .space-wrapper > .tn239-catalog {
 box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:0 0 80px;
 min-width:0;min-height:500px;position:relative;z-index:2;
 color:#f3f9ff;background:transparent;
}
/* Fallback without .space-wrapper: same gutter as the managed V146 Slider. */
html.tn239-catalog-page web-player .page-wrapper > .tn239-catalog {
 box-sizing:border-box;width:calc(100% - 48px);max-width:calc(100% - 48px);
 margin:0 auto;padding:0 0 80px;min-height:500px;
 min-width:0;position:relative;z-index:2;background:transparent;color:#f3f9ff;
}
.tn239-catalog *{box-sizing:border-box}
.tn239-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;
 gap:10px;margin:0 0 18px;min-height:44px;max-width:100%;}
.tn239-heading h1{display:inline-flex;align-items:center;gap:9px;width:max-content;
 max-width:100%;font-size:16px;font-weight:700;line-height:1.4;
 border-radius:10px;padding:7px 11px;margin:0;color:#fff;
 background:linear-gradient(125deg,#0d4b71,#064067);border:1px solid #167cae;
 box-shadow:inset 0 1px 0 rgba(175,239,255,.10);}
.tn239-heading h1 span{display:grid;place-items:center;min-width:24px;height:24px;
 border-radius:8px;background:#0b5a86;border:1px solid #168bb8;color:#d5faff;}
/* Album-inspired gallery. No independent max-width or double page padding. */
.tn239-grid{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
 grid-auto-flow:row!important;width:100%;max-width:100%;min-width:0;
 column-gap:18px;row-gap:22px;margin:0;padding:2px 0 12px;
 overflow:visible;align-items:start;align-content:start;}
.tn239-card{min-width:0;min-height:0;display:flex;flex-direction:column;align-items:stretch;
 width:100%;margin:0;padding:0;border:0;color:#f3f8ff;background:none;}
.tn239-art{position:relative;display:block;aspect-ratio:1/1;width:100%;height:auto;
 border-radius:11px;overflow:hidden;border:1px solid #2da8e446;
 background:#083452;box-shadow:0 0 12px #009fff18;isolation:isolate;}
.tn239-art a{display:block;width:100%;height:100%}
.tn239-art img{display:block;width:100%;height:100%;object-fit:cover;
 transition:transform .22s ease;}
@media(hover:hover){.tn239-art:hover img{transform:scale(1.04)}}
.tn239-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);
 width:42px;height:42px;display:grid;place-items:center;border-radius:50%;
 border:1px solid #56d4ff;background:rgba(4,112,177,.86);
 color:#fff;box-shadow:0 0 15px #0ea5e955;cursor:pointer;
 opacity:0;transition:opacity .2s ease;}
.tn239-art:hover .tn239-play,.tn239-play:focus-visible{opacity:1}
.tn239-play:focus-visible{outline:2px solid #fff;outline-offset:3px}
.tn239-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;
 overflow:hidden;white-space:normal;overflow-wrap:anywhere;min-width:0;
 margin:9px 0 0;line-height:1.35;font-size:13px;font-weight:600;color:#f5f8ff;text-decoration:none;}
.tn239-title:hover{color:#38bdf8;text-decoration:underline}
.tn239-meta{display:block;margin-top:4px;color:#b7cce6;font-size:12px;line-height:1.4;}
.tn239-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.tn239-actions button,.tn239-error button{padding:9px 14px;border-radius:10px;
 border:1px solid #188bb8;background:linear-gradient(115deg,#087bb1,#075184);
 color:#fff;font:inherit;font-size:13px;font-weight:600;line-height:1.4;cursor:pointer;}
.tn239-actions button:disabled{opacity:.55;cursor:wait}
.tn239-error{margin-top:16px;padding:14px;border-radius:10px;border:1px solid #f59e0b66;
 color:#ffe0a6;background:#38221c;}
.tn239-error button{margin-left:10px}
.tn239-loading,.tn239-empty{padding:24px 0;color:#a5cce0;font-size:14px}
/* Album catalogue adapts from 5 to 3 on tablet, and to 2 on narrow phones. */
@media(max-width:900px){.tn239-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:17px 12px}}
@media(max-width:550px){
 .tn239-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px 11px}
 .tn239-title{font-size:12px;margin-top:7px}
 .tn239-meta{font-size:10px}
 .tn239-play{opacity:1;width:34px;height:34px}
 .tn239-heading{margin-bottom:15px}
 html.tn239-catalog-page web-player .page-wrapper > .tn239-catalog{
  width:calc(100% - 28px);max-width:calc(100% - 28px);}
}
@media(prefers-reduced-motion:reduce){.tn239-art img,.tn239-play{transition:none}}
