/* Public album browser: named covers, a consistent photo grid and a viewport-sized viewer. */
body.template-collection .album-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}
body.template-collection .album-card{display:block;min-height:0;padding:0;overflow:hidden;border:1px solid var(--kokonte-frame-color,#b99a52);border-radius:6px!important;text-decoration:none;color:#241e17;background:#f3e7d6!important;transition:box-shadow .2s}
body.template-collection .album-card:hover{box-shadow:0 5px 20px #0003}
body.template-collection .album-card__covers{display:block;height:auto;aspect-ratio:4/3;background:#080808;border-radius:0}
body.template-collection .album-card__covers img{display:block;width:100%;height:100%;object-fit:cover;border-radius:0}
body.template-collection .album-card__body{display:grid;gap:8px;padding:16px;min-height:130px}
body.template-collection .album-card__body strong{color:#b80f15;font:600 21px/1.3 Georgia,serif;overflow-wrap:anywhere}
body.template-collection .album-card__body>span{font:16px/1.4 Arial,sans-serif;color:#42372a}
body.template-collection .album-card__body .album-card__action{color:#b80f15;font-weight:600;margin-top:4px}
body.template-collection .album-card:focus-visible,body.template-collection #photo-grid button:focus-visible{outline:3px solid #b80f15;outline-offset:3px}
body.template-collection .gallery-hero{scroll-margin-top:110px}
body.template-collection .gallery-hero{padding:40px 0 30px}
body.template-collection .gallery-hero h1{max-width:none;font:clamp(32px,4vw,56px)/1.12 Georgia,serif}
body.template-collection .album-section{padding:36px 0}
body.template-collection.is-album-open .gallery-hero{padding:32px 0 24px;grid-template-columns:1fr;gap:0}
body.template-collection.is-album-open .gallery-hero h1{max-width:none;font:clamp(28px,4vw,46px)/1.2 Georgia,serif;overflow-wrap:anywhere}
body.template-collection.is-album-open .gallery-hero__mark{display:none}
body.template-collection.is-album-open #active-album-label{display:none}
body.template-collection.is-album-open .photo-section{padding-top:28px;border-top:0}
body.template-collection #photo-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;align-items:stretch;columns:auto}
body.template-collection #photo-grid .gallery-layout__item{margin:0;min-width:0;grid-column:auto;grid-row:auto;border-radius:6px!important;background:#080808!important}
body.template-collection #photo-grid .gallery-layout__image{display:block;width:100%;height:auto;aspect-ratio:1;padding:0!important;border:0!important;border-radius:0!important;overflow:hidden;background:#080808!important}
body.template-collection #photo-grid .gallery-layout__image img{display:block;width:100%;height:100%;aspect-ratio:1;object-fit:cover;object-position:center;border-radius:0}
body.template-collection #photo-grid figcaption{display:none}
body.template-collection #album-notice{padding:16px;border:1px solid #b99a52;color:inherit;line-height:1.6}
body.template-collection .photo-viewer{position:fixed!important;inset:0!important;margin:0!important;width:100vw!important;max-width:none!important;height:100vh!important;height:100dvh!important;max-height:none!important;padding:0!important;overflow:hidden!important;background:#080808!important;color:#f3e7d6;box-sizing:border-box}
body.template-collection .photo-viewer[open]{display:flex;flex-direction:column}
html.gallery-viewer-open,html.gallery-viewer-open body{overflow:hidden!important;overscroll-behavior:none}
body.template-collection .photo-viewer__toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:0 0 auto;padding:10px max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left));padding-top:max(10px,env(safe-area-inset-top));min-height:62px;z-index:2;background:#080808}
body.template-collection .photo-viewer__toolbar p{margin:0!important;color:#f3e7d6!important;font:16px/1.35 Arial,sans-serif;overflow-wrap:anywhere}
body.template-collection .photo-viewer__toolbar #viewer-count{font-size:14px;color:#d8bd78!important;margin-top:3px!important}
body.template-collection .photo-viewer .photo-viewer__close{position:static;display:flex;align-items:center;gap:8px;width:auto;height:auto;min-height:44px;padding:8px 14px;border:1px solid #b99a52;border-radius:6px;font:16px/1.3 Arial,sans-serif;background:#080808;color:#d8bd78;cursor:pointer;flex-shrink:0}
body.template-collection .photo-viewer figure{display:block;flex:1 1 auto;min-height:0;width:100%;margin:0;padding:0 0 env(safe-area-inset-bottom)}
body.template-collection .photo-viewer__stage{position:relative;width:100%;height:100%;min-height:0;overflow:hidden}
body.template-collection #viewer-image{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;background:#080808;border-radius:0}
body.template-collection .photo-viewer__previous,body.template-collection .photo-viewer__next{position:absolute;top:50%;transform:translateY(-50%);z-index:1;width:44px;height:48px;padding:0;border:1px solid #b99a52;border-radius:6px;background:#080808bf;color:#f3e7d6;font:32px/1 Arial,sans-serif;cursor:pointer}
body.template-collection .photo-viewer__previous{left:max(8px,env(safe-area-inset-left))}body.template-collection .photo-viewer__next{right:max(8px,env(safe-area-inset-right))}
body.template-collection .gallery-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap;border:0!important}
body.template-collection [hidden]{display:none!important}
@media(max-width:1000px){body.template-collection .album-grid{grid-template-columns:repeat(3,minmax(0,1fr))}body.template-collection #photo-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){body.template-collection .album-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}body.template-collection #photo-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}body.template-collection .album-card__body{padding:12px;min-height:140px}body.template-collection .album-card__body strong{font-size:19px}body.template-collection .gallery-section-head{align-items:start;flex-wrap:wrap}body.template-collection .photo-viewer__toolbar{min-height:58px}body.template-collection .photo-viewer__toolbar p{font-size:15px}}
@media(max-width:350px){body.template-collection #photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body.template-collection .album-card__body strong{font-size:18px}}
@media(max-height:480px) and (orientation:landscape){body.template-collection .photo-viewer__toolbar{min-height:48px;padding-block:5px}body.template-collection .photo-viewer__toolbar>div{display:flex;align-items:center;gap:16px}body.template-collection .photo-viewer__toolbar #viewer-count{margin-top:0!important}}
