/* Details gallery stays inside the existing information column. */
#detailsModal .details-gallery-ad{min-width:0;max-width:100%;grid-column:1/-1}
#detailsModal .details-gallery-ad .jf-ad-slot.is-filled,#detailsModal .details-gallery-ad .jf-ad-slot.is-loading{margin:8px auto}
#detailsModal .details-gallery-ad:not(:has(.is-loading,.is-filled)){height:0;margin-block:-6px}
.details-gallery{min-width:0;max-width:100%;grid-column:1/-1;margin:4px 0 8px}
.details-gallery-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:9px;font-size:12px;font-weight:700;color:inherit}
.details-gallery-heading a{font-size:10px;opacity:.7;color:inherit;text-decoration:none}
.details-gallery-track{display:flex;gap:10px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y;cursor:grab;border-radius:12px}
.details-gallery-track::-webkit-scrollbar{display:none}
.details-gallery-track.is-dragging{cursor:grabbing;scroll-snap-type:none;user-select:none}
.details-gallery-item{position:relative;flex:0 0 calc((100% - 20px)/3);min-width:0;aspect-ratio:16/10;padding:0;border:1px solid #ffffff22;border-radius:12px;overflow:hidden;background:#151823;cursor:zoom-in;scroll-snap-align:start}
.details-gallery-item img{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none;user-select:none}
.details-gallery-item:focus-visible{outline:2px solid #ff3046;outline-offset:-3px}
.details-gallery-footer{display:flex;align-items:center;justify-content:center;gap:10px;min-height:25px;margin-top:5px}
.details-gallery-dots{display:flex;align-items:center;gap:6px}
.details-gallery-dots button{width:22px;height:24px;padding:9px 6px;border:0;background:transparent;cursor:pointer}
.details-gallery-dots button::after{content:'';display:block;width:6px;height:6px;border-radius:10px;background:#929aac;opacity:.6}
.details-gallery-dots button[aria-current=true]::after{background:#ef122b;opacity:1}
.details-gallery-pause{height:26px;min-width:26px;padding:2px 6px;background:transparent;border:0;border-radius:6px;color:inherit;cursor:pointer;font-size:13px}
.details-gallery-lightbox{position:fixed;inset:0;z-index:10020;background:#000e;display:grid;place-items:center;padding:60px 50px;box-sizing:border-box;backdrop-filter:blur(9px)}
.details-gallery-lightbox img{display:block;max-width:100%;max-height:calc(100dvh - 120px);object-fit:contain;border-radius:10px;box-shadow:0 12px 70px #0008}
.details-gallery-lightbox button{position:absolute;display:grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid #ffffff44;border-radius:50%;background:#161922dd;color:white;font-size:25px;cursor:pointer}
.details-gallery-lightbox [data-gallery-close]{top:max(16px,env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right))}
.details-gallery-lightbox [data-gallery-prev]{left:8px;top:calc(50% - 20px)}
.details-gallery-lightbox [data-gallery-next]{right:8px;top:calc(50% - 20px)}
.details-gallery-lightbox p{position:absolute;bottom:14px;margin:0;color:#fff;font-size:12px}
.gallery-editor{border:1px solid var(--border,#343746);border-radius:12px;padding:14px;min-width:0;margin:10px 0 18px}
.gallery-editor legend{padding:0 6px;font-weight:700;font-size:14px}
.gallery-editor>small,.gallery-editor [data-gallery-status]{display:block;font-size:12px;color:var(--text-muted,#9da5b5);line-height:1.6}
.gallery-editor-previews{display:flex;gap:8px;overflow-x:auto;margin:10px 0}
.gallery-editor-previews img{width:85px;height:66px;border-radius:8px;object-fit:cover;flex:0 0 auto}
.gallery-editor .gallery-editor-clear{display:flex;gap:8px;align-items:center;font-size:12px}
.gallery-editor-clear input{width:16px!important;height:16px;margin:0}
.details-gallery-lightbox button[hidden],.gallery-editor label[hidden]{display:none!important}
@media(max-width:1000px){.details-gallery-item{flex-basis:calc((100% - 10px)/2)}}
@media(max-width:680px){
 #detailsModal #detailsDescription{grid-row:4}
 #detailsModal #detailsCastBox{grid-row:5}
 #detailsModal .details-gallery-ad-top{grid-row:6}
 #detailsModal #detailsGallery{grid-row:7}
 #detailsModal .details-gallery-ad-middle{grid-row:8}
 #detailsModal .details-actions{grid-row:9}
 #detailsModal #detailsEpisodesWrap{grid-row:10}
 .details-gallery-item{flex-basis:72%;aspect-ratio:1;max-height:240px}
 .details-gallery-lightbox{padding:60px 12px}
 .details-gallery-lightbox button{width:34px;height:34px}
}
@media(prefers-reduced-motion:reduce){.details-gallery-track{scroll-behavior:auto}}
