.gallery-item .album-file-count{position:absolute;top:18px;left:18px;padding:6px 12px;border:1px solid #ffffff60;border-radius:24px;background:#29282cb8;color:white;font-size:11px;backdrop-filter:blur(8px)}
.album-video-cover{display:grid;place-items:center;width:100%;height:100%;background:linear-gradient(135deg,#e8e2ef,#b3a0cd);font-size:60px;color:#74619f}
.album-open{overflow:hidden}
.album-dialog{width:min(1100px,calc(100% - 40px));max-width:none;max-height:calc(100dvh - 40px);padding:24px;border:0;border-radius:12px;background:#fdfcfb;color:#29282c;overflow:auto;box-shadow:0 24px 100px #0005}
.album-dialog::backdrop{background:#18151fd9;backdrop-filter:blur(5px)}
.album-dialog-header{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:18px}
.album-dialog h2{font-size:24px;letter-spacing:-.5px;line-height:1.3;padding-right:10px;overflow-wrap:anywhere}
.album-description{font-size:13px;color:var(--muted);line-height:1.7;margin-top:6px;white-space:pre-line}
.album-description:empty{display:none}
.album-close,.album-navigation button{flex-shrink:0;display:grid;place-items:center;width:42px;height:42px;border:1px solid #dad3e2;border-radius:50%;background:#fff;color:#574668;font-size:25px}
.album-stage{position:relative;display:flex;align-items:center;justify-content:center;background:#eeeaf2;border-radius:6px;height:min(57dvh,600px);min-height:160px;overflow:hidden;touch-action:pan-y}
.album-stage img,.album-stage video{display:block;width:100%;height:100%;object-fit:contain}
.album-media-error{position:absolute;bottom:12px;left:12px;right:12px;background:#fff;padding:12px;font-size:13px;text-align:center}
.album-dialog-footer{display:flex;justify-content:space-between;gap:15px;align-items:center;margin:15px 0}
#album-caption{font-size:14px;line-height:1.6;white-space:pre-line;overflow-wrap:anywhere}
.album-navigation{display:flex;align-items:center;gap:12px;flex-shrink:0}
.album-counter{font-size:12px;min-width:46px;text-align:center;color:var(--muted);font-variant-numeric:tabular-nums}
.album-thumbnails{display:flex;gap:8px;overflow-x:auto;padding:5px 3px 8px;scrollbar-width:thin}
.album-thumbnails button{flex:0 0 68px;width:68px;height:52px;padding:0;border:2px solid transparent;border-radius:5px;overflow:hidden;background:#ece6f4;color:#74619f}
.album-thumbnails img{width:100%;height:100%;object-fit:cover}
.album-thumbnails button[aria-current=true]{border-color:#74619f;box-shadow:0 0 0 2px #dcd1ee}
.video-thumbnail{font-size:22px}
.album-dialog [hidden]{display:none!important}
@media(max-width:600px){.album-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:16px;border-radius:8px}.album-dialog h2{font-size:20px}.album-stage{height:50dvh}.album-dialog-footer{flex-direction:column;align-items:stretch}.album-navigation{justify-content:center}.album-thumbnails button{flex-basis:58px;width:58px;height:46px}.album-description{font-size:12px}.album-close{width:36px;height:36px}}
@media(prefers-reduced-motion:reduce){.gallery-item img{transition:none}}

/* Video poster images share the photo geometry; the play marker remains visible. */
.album-video-cover{position:relative;overflow:hidden}
.album-video-cover>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.video-preview-play{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:52px;height:52px;border:1px solid #ffffff90;border-radius:50%;background:#29282c88;color:#fff;font:normal 24px/1 sans-serif;text-shadow:0 1px 4px #0005;pointer-events:none;z-index:1}
.video-thumbnail{position:relative}
.video-thumbnail .video-preview-play{width:26px;height:26px;font-size:12px}
img[data-video-preview]:not([src]){visibility:hidden}
