body { background:#10100f; color:#fff5df; font-family:system-ui,sans-serif; }
.gallery-shell { width:min(1120px, calc(100% - 36px)); margin:auto; }
.gallery-nav { border-bottom:1px solid #37342c; }
.gallery-nav .gallery-shell { display:flex; justify-content:space-between; align-items:center; min-height:74px; }
.gallery-brand { color:#ffcb76; font-size:1.25rem; font-weight:800; text-decoration:none; }
.gallery-nav a:last-child { color:#e0d4bd; }
.gallery-intro { padding:clamp(32px,7vw,82px) 0 25px; }
.gallery-intro h1 { font-size:clamp(2.4rem,8vw,5rem); font-weight:800; letter-spacing:-.06em; }
.gallery-intro p,.gallery-card p { color:#d6cbb6; }
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr)); gap:20px; padding-bottom:55px; }
.gallery-card { min-width:0; background:#1e1c18; border:1px solid #393429; border-radius:20px; overflow:hidden; }
.gallery-card:first-child { grid-column:1/-1; display:grid; grid-template-columns:1.6fr 1fr; }
.gallery-media { position:relative; display:grid; place-items:center; aspect-ratio:16/9; background:radial-gradient(ellipse at top,#604424,#181411 75%); overflow:hidden; }
.gallery-media video { width:100%; height:100%; position:absolute; inset:0; object-fit:contain; }
.gallery-overlay { position:relative; display:grid; place-items:center; width:54px; height:54px; border-radius:50%; color:#181411; background:#ffcb76; font-size:1.25rem; pointer-events:none; box-shadow:0 4px 24px #0008; }
.gallery-card.is-playing .gallery-overlay { opacity:0; }
.gallery-info { padding:clamp(18px,3vw,34px); align-self:center; }
.gallery-info h2 { font-size:clamp(1.25rem,3vw,2.25rem); }
.gallery-buy,.pay-action-btn { border:0; border-radius:10px; background:#ffcb76; color:#20170d; padding:.75rem 1rem; font-weight:800; }
.pay-action-btn { width:100%; }
.gallery-empty { grid-column:1/-1; border:1px solid #393429; border-radius:20px; padding:40px; background:#1e1c18; }
.modal-content { color:#20170d; }
.payment-instructions[hidden],.spinner-border[hidden] { display:none; }
.gallery-admin { color:#e0d4bd; }
@media(max-width:720px){ .gallery-card:first-child { display:block; } }


body { background:#101319; color:#f2f5fc; }
.gallery-nav { background:#171c26; border-color:#2a3445; }
.gallery-brand { color:#a1c5ff; }
.gallery-shell { width:min(1020px,calc(100% - 28px)); }
.gallery-intro { padding:24px 0 14px; }
.gallery-intro h1 { font-size:clamp(1.6rem,4vw,2.5rem); }
.gallery-intro p,.gallery-card p { color:#bac5d8; }
.gallery-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(230px,320px); align-items:start; }
.gallery-grid .gallery-card,.gallery-grid .gallery-card:first-child { display:block; grid-column:1; grid-row:1; background:#171c26; border-color:#2a3445; }
.gallery-grid .gallery-card[hidden] { display:none; }
.gallery-media { background:#090d15; }
.gallery-overlay { pointer-events:auto; border:0; width:auto; height:auto; padding:.65rem 1rem; border-radius:999px; font-size:.9rem; background:#fff; }
.gallery-card.is-playing .gallery-overlay:not(:focus-visible) { opacity:0; pointer-events:none; }
.gallery-info { padding:18px; }
.gallery-buy { background:#a1c5ff; color:#102144; }
.playlist { grid-column:2; grid-row:1; background:#171c26; border:1px solid #2a3445; border-radius:16px; padding:12px; }
.playlist h2 { font-size:1.1rem; margin:4px 4px 12px; }
.playlist-item { display:flex; align-items:center; gap:9px; padding:10px; width:100%; color:inherit; text-align:left; background:none; border:0; border-radius:8px; }
.playlist-item img { width:60px; aspect-ratio:16/9; object-fit:cover; border-radius:4px; }
.playlist-item[aria-current="true"] { background:#174b9a; }
.playlist-item:focus-visible,.gallery-overlay:focus-visible { outline:3px solid #a1c5ff; }
#downloadModal .modal-dialog { width:auto; max-width:460px; margin:.75rem auto; }
#downloadModal .modal-content { color:#19222e; border:0; box-shadow:0 14px 48px #0005; }
#downloadModal .checkout-payment-row { flex-direction:column; gap:8px; }
#downloadModal #modalAmount { order:-1; white-space:nowrap; color:#14553f !important; }
#downloadModal .payment-methods-image { max-width:100%; height:auto; }
#downloadModal #payButton { color:white; background:linear-gradient(110deg,#17603b,#12745a); }
@media(max-width:720px){ .gallery-grid { grid-template-columns:minmax(0,1fr); } .playlist { grid-column:1; grid-row:2; } }
@media(max-width:490px){ #downloadModal .modal-dialog { margin:.5rem; } }

/* Keep player and checkout within their columns. */
.gallery-grid { gap:16px; }
.gallery-info { min-width:0; overflow-wrap:anywhere; }
.playlist { min-width:0; max-height:520px; overflow-y:auto; }
.playlist-item strong { min-width:0; overflow-wrap:anywhere; }
.gallery-overlay { z-index:1; color:#142036; }
#downloadModal .checkout-payment-row { align-items:center; }
#downloadModal .payment-methods-image { display:block; }
@media(max-width:720px){ .gallery-grid { gap:12px; } .playlist { max-height:none; } }

main.gallery-shell{width:min(1220px,calc(100% - 24px));padding-top:12px}
#videoFeed{grid-template-columns:minmax(0,1fr) minmax(210px,280px)}
#videoFeed:not(:has(.playlist)){grid-template-columns:minmax(0,1fr)}
#videoFeed .playlist-item[aria-current="true"]{display:none}
.playlist-thumb{position:relative;display:grid;place-items:center;flex:0 0 76px;aspect-ratio:16/9;background:#090d15;border-radius:6px;overflow:hidden}
.playlist-item .playlist-thumb img{position:absolute;inset:0;width:100%;height:100%}
.playlist-play{position:relative;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#101319d9;color:#fff;font-size:12px}
@media(max-width:760px){#videoFeed{grid-template-columns:minmax(0,1fr)}}
