/* Park albums: use the site's calm surfaces, teal text and orange primary action. */
.park-albums-page { --album-ink:#103d43; --album-muted:#55736f; --album-border:#d2e2dd; --album-accent:#167869; max-width:1180px; margin:24px auto; padding:0 16px 40px; color:var(--album-ink); }
.album-page-head,.album-section-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:24px; }
.album-page-head h1 { margin:0 0 8px; font-size:clamp(1.7rem,3.3vw,2.25rem); letter-spacing:-.035em; }
.album-page-head p,.album-section-head p { margin:4px 0; color:#55736f; font-size:.92rem; }
.album-page-head nav { display:flex; align-items:center; gap:18px; flex-wrap:wrap; }
.album-text-link,.album-breadcrumb a { color:#226a5e; font-size:.9rem; font-weight:600; text-decoration:none; }
.album-breadcrumb { display:flex; justify-content:space-between; gap:20px; margin:8px 0 24px; }
.album-editor { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:24px; align-items:start; }
.album-editor-context { grid-column:1/-1; padding:22px 24px 16px; background:#fff; border:1px solid var(--album-border); border-radius:14px; }
.album-editor-context h2,.album-editor-sharing h2,.album-section-head h2 { margin:0 0 12px; font-size:1.08rem; }
.album-editor-context h2>i { margin-right:7px; color:var(--album-accent); }
.album-fields { display:grid; grid-template-columns:minmax(0,2fr) minmax(170px,1fr); gap:18px; }
.album-fields>label,.album-fields>.album-editor-park-field,.album-full-label { display:block; font-size:.87rem; font-weight:600; min-width:0; }
.album-editor-park-field > label { display:block; }
.album-fields input,.album-fields select,.album-full-label textarea,.album-full-label select { margin-top:7px; }
.album-full-label { margin:16px 0; }
.album-full-label>span { font-weight:400; color:var(--album-muted); }
.album-field-hint { margin:12px 0 0; font-size:.79rem; line-height:1.6; color:#607a75; }
.album-editor-photos { min-width:0; padding:4px 0; }
.album-editor-photos .album-section-head { gap:14px; margin-bottom:16px; align-items:flex-start; }
.album-editor-photos .album-section-head h2 { margin-bottom:5px; }
.album-editor-photos .album-section-head p { font-size:.8rem; }
[data-album-count] { display:inline-block; font-size:.77rem; font-weight:400; color:#607a75; margin-left:6px; }
.album-file-label { position:relative; overflow:hidden; flex-shrink:0; white-space:nowrap; font-size:.82rem; }
.album-file-label input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }
.album-file-label:focus-within { outline:3px solid #147a70; outline-offset:3px; }
.album-dropzone { min-height:210px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:24px; text-align:center; border:1.5px dashed #afcfc4; border-radius:14px; background:#f6fbf8; }
.album-dropzone[hidden] { display:none; }
.album-dropzone>i { font-size:2rem; color:#3b927d; margin-bottom:12px; }
.album-dropzone strong { font-size:1rem; }
.album-dropzone p { color:var(--album-muted); margin:8px 0 0; font-size:.84rem; }
.album-editor-photos.is-dragging .album-dropzone,.album-editor-photos.is-dragging .album-edit-grid { outline:3px solid #268876; outline-offset:5px; }
.album-edit-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(178px,1fr)); gap:16px; }
.album-edit-photo { position:relative; min-width:0; overflow:hidden; border:1px solid #d4e4de; border-radius:12px; background:#fff; }
.album-edit-photo>img { display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; }
.album-edit-photo:first-child:before { content:'Titelbild'; position:absolute; top:9px; left:9px; border-radius:20px; padding:4px 9px; font-size:.7rem; font-weight:700; color:#fff; background:#0b3936ed; pointer-events:none; }
.album-edit-photo small { display:block; padding:8px 10px 0; font-size:.73rem; color:#53766c; line-height:1.4; min-height:28px; overflow-wrap:anywhere; }
.album-photo-tools { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px; padding:3px 5px 5px; }
.album-photo-tools button { min-width:0; min-height:40px; padding:4px 0; border:0; border-radius:6px; background:transparent; color:#246a5b; font-size:1rem; line-height:1; white-space:nowrap; cursor:pointer; }
.album-photo-tools button:hover { background:#e9f4ee; }
.album-photo-tools button:disabled { opacity:.3; cursor:default; }
.album-photo-tools button[data-photo-remove]:hover { color:#a23627; background:#fcefeb; }
.album-edit-photo.is-failed { border-color:#b34936; }
.album-edit-photo.is-failed small { color:#a23523; }
.album-edit-photo [data-photo-retry] { margin:4px 8px 10px; }
.album-editor-sharing { position:sticky; top:100px; padding:22px; background:#fff; border:1px solid var(--album-border); border-radius:14px; }
.album-check { display:flex!important; align-items:center; gap:10px; min-height:42px; font-size:.87rem; font-weight:400!important; }
.album-check input,.album-preference-row>input { width:18px; height:18px; margin:0; flex:none; accent-color:var(--album-accent,#167869); }
.album-privacy-note { padding:11px 12px; border-radius:8px; background:#edf6f1; color:#365e51; font-size:.8rem; line-height:1.6; margin:10px 0; }
.album-save-bar { border-top:1px solid #e0ebe5; margin-top:16px; padding-top:18px; }
.album-save-bar>button { width:100%; }
.album-save-bar p { margin:10px 0 0; font-size:.77rem; line-height:1.6; color:#607a75; }
.album-editor [role=status].is-error { color:#a23523; }
.album-editor progress { width:100%; height:8px; accent-color:var(--album-accent); margin-top:14px; }
.album-upload-notes { margin-top:18px; font-size:.75rem; color:#607a75; }
.album-upload-notes summary { cursor:pointer; font-weight:600; }
.album-upload-notes p { line-height:1.65; margin:10px 0 0; }
.album-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px; margin:20px 0 30px; }
.album-tile { position:relative; display:block; text-decoration:none!important; color:inherit!important; background:#fff; border:1px solid #d5e5df; border-radius:14px; overflow:hidden; transition:box-shadow .15s; }
.album-tile:hover { box-shadow:0 5px 18px #123b4315; }
.album-tile>img { display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; }
.album-tile>div { padding:18px; }
.album-tile span,.album-tile small { font-size:.78rem; color:#55716e; }
.album-tile h3 { font-size:1.13rem; margin:7px 0 12px; overflow-wrap:anywhere; }
.album-tile .album-tile-photos { position:absolute; top:12px; right:12px; color:#fff; background:#14372dcc; border-radius:20px; padding:5px 9px; font-size:.73rem; }
.album-empty { text-align:center; padding:54px 20px; background:#fff; border:1px solid #d5e5df; border-radius:16px; margin:20px 0; }
.album-empty>i { display:inline-grid; place-items:center; width:64px; height:64px; font-size:1.7rem; color:#378f7e; background:#edf7f0; border-radius:20px; }
.album-empty h2 { font-size:1.2rem; margin:20px 0 8px; }
.album-empty p { color:#597773; max-width:400px; margin:0 auto; font-size:.9rem; line-height:1.7; }
.album-preferences { background:#fff; border:1px solid #d5e5df; border-radius:12px; margin-top:32px; }
.album-preferences>summary { display:flex; align-items:center; justify-content:space-between; list-style:none; cursor:pointer; padding:18px 22px; font-size:.94rem; font-weight:600; }
.album-preferences>summary::-webkit-details-marker { display:none; }
.album-preferences>summary>span>i { margin-right:8px; color:#287660; }
.album-preferences[open]>summary>i { transform:rotate(180deg); }
.album-preferences form { padding:0 22px 20px; }
.album-preference-row { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 0; border-bottom:1px solid #e8efeb; }
.album-preference-row>span { min-width:0; }
.album-preference-row strong { display:block; font-size:.88rem; }
.album-preference-row small { display:block; color:#607a75; font-size:.79rem; margin-top:4px; }
.album-preference-row select { max-width:200px; }
.album-preference-row>input { appearance:none; position:relative; width:40px; height:24px; border:1px solid #93aaa1; border-radius:999px; background:#e4ece8; cursor:pointer; }
.album-preference-row>input:before { content:''; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #143a4330; }
.album-preference-row>input:checked { background:#167869; border-color:#167869; }
.album-preference-row>input:checked:before { left:19px; }
.album-preference-row>input:focus-visible { outline:3px solid #218978; outline-offset:3px; }
@media(forced-colors:active) { .album-preference-row>input { appearance:auto; } .album-preference-row>input:before { display:none; } }
.album-preferences form>.btn { margin-top:18px; }
.album-detail { max-width:980px; margin:auto; }
.album-detail .community-post-card { padding:0; overflow:hidden; border-radius:16px; box-shadow:none; }
.album-detail .community-post-head { padding:20px 24px 0; }
.album-story-head { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:0 18px 12px; }
.album-story-head h2 { font-size:1.35rem; margin:5px 0; }
.album-story-head small { color:#53716b; font-size:.75rem; }
.album-story-head a { text-decoration:none; color:inherit; }
.album-detail .album-story-head { padding:22px 24px 12px; }
.album-detail .album-story-head h1 { font-size:clamp(1.65rem,3vw,2.3rem); margin:8px 0 10px; letter-spacing:-.025em; }
.album-detail .album-park-link { font-size:.79rem; color:#2b7c65; }
.album-detail .album-story-head>.btn { flex-shrink:0; font-size:.82rem; }
.album-detail .community-post-body { margin:0; padding:0 24px 20px; font-size:.93rem; }
.album-gallery { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:0 24px 24px; }
.album-detail .album-gallery .community-media-item { position:relative; aspect-ratio:4/3; border-radius:10px; overflow:hidden; min-height:0; }
.album-detail .album-gallery .community-media-item:first-child { grid-column:1/-1; aspect-ratio:16/7; max-height:420px; }
.album-detail .album-gallery .community-media-item>a { display:block; width:100%; height:100%; }
.album-detail .album-gallery .community-media-item img { display:block; width:100%; height:100%; max-height:none; object-fit:cover; }
.album-detail .album-gallery .community-media-item>button { position:absolute; top:8px; right:8px; border:0; border-radius:50%; background:#ffffffed; color:#184939; width:32px; height:32px; }
.album-detail .community-post-actions { border-top:1px solid #e0ebe5; padding:10px 16px; }
.album-detail .community-comments { padding:12px 24px 24px; }
.album-open-link { display:block; margin:12px 16px 18px; text-align:center; font-weight:600; }
.album-login { text-align:center; padding:18px; }
.profile-albums { padding:20px 0; }
.album-preview-head { display:flex; justify-content:space-between; align-items:center; margin-top:8px; }
.album-preview-head h2 { font-size:1.1rem; }
.album-composer-link { display:flex; align-items:center; gap:8px; padding:10px 16px; color:#176b60; font-size:.9rem; font-weight:600; text-decoration:none; }
.park-albums-page button:focus-visible,.park-albums-page a:focus-visible { outline:3px solid #218978; outline-offset:3px; }
.park-albums-page .btn:disabled { opacity:.55; cursor:default; }
@media(max-width:1150px) {
 .album-editor { grid-template-columns:minmax(0,1fr) 280px; gap:20px; }
 .album-editor-sharing { padding:18px; }
 .album-editor-photos .album-section-head { flex-wrap:wrap; gap:8px; }
}
@media(max-width:800px) {
 .park-albums-page { margin:20px auto; padding:0 8px 30px; }
 .album-page-head { align-items:flex-start; flex-direction:column; gap:12px; margin-bottom:20px; }
 .album-page-head h1 { font-size:1.7rem; }
 .album-page-head nav { gap:16px; }
 .album-editor { grid-template-columns:1fr; gap:22px; }
 .album-editor-context { padding:18px; }
 .album-editor-sharing { position:static; padding:20px; }
 .album-editor-photos .album-section-head { justify-content:space-between; }
 .album-fields { grid-template-columns:minmax(0,1fr) 145px; gap:12px; }
 .album-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
 .album-edit-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
 .album-photo-tools button { min-height:42px; }
 .album-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:0 16px 16px; }
 .album-detail .album-gallery .community-media-item:first-child { aspect-ratio:4/3; }
 .album-detail .album-story-head { padding:18px 16px 14px; flex-wrap:wrap; gap:12px; }
 .album-detail .community-post-head { padding:18px 16px 0; }
 .album-detail .community-post-body { padding:0 16px 16px; }
 .album-detail .community-comments { padding:12px 16px 16px; }
 .album-breadcrumb { font-size:.8rem; margin:0 0 18px; flex-wrap:wrap; gap:10px; }
 .album-preference-row { gap:14px; }
 .album-preference-row:first-of-type { flex-wrap:wrap; }
 .album-preference-row:first-of-type select { max-width:none; }
 .album-tile>div { padding:13px; }
 .album-tile h3 { font-size:1rem; }
}
@media(max-width:480px) {
 .album-fields { grid-template-columns:1fr; }
 .album-list { grid-template-columns:1fr; }
 .profile-album-preview .album-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .profile-album-preview .album-tile:last-child:nth-child(odd) { display:none; }
 .album-section-head { flex-wrap:wrap; gap:12px; }
 .album-dropzone { min-height:175px; padding:20px; }
 .album-tile>img { aspect-ratio:16/10; }
 .album-editor-photos .album-field-hint { font-size:.73rem; }
 .album-photo-tools button { min-height:40px; }
 .album-edit-photo small { font-size:.7rem; }
}
@media(prefers-reduced-motion:reduce) { .album-tile { transition:none; } }

/* Album overview refresh: one clear visual hierarchy, photo-first cards. */
.album-secondary-action { display:inline-flex; align-items:center; gap:7px; min-height:42px; padding:8px 12px; border:1px solid var(--album-border); border-radius:8px; background:transparent; color:var(--album-ink); font:inherit; font-size:.84rem; font-weight:700; cursor:pointer; }
.album-secondary-action:hover { background:#edf7f2; border-color:#a9cdbd; }
.album-overview-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1px; margin:8px 0 18px; border:1px solid var(--album-border); border-radius:12px; overflow:hidden; background:var(--album-border); }
.album-overview-summary>div { display:flex; align-items:baseline; justify-content:space-between; gap:10px; padding:15px 18px; background:#fff; }
.album-overview-summary span { color:var(--album-muted); font-size:.78rem; font-weight:600; }
.album-overview-summary strong { color:var(--album-ink); font-size:1.35rem; letter-spacing:-.03em; }
.album-filters { display:grid; grid-template-columns:minmax(220px,1.4fr) minmax(130px,1fr) minmax(175px,1fr) auto; align-items:end; gap:9px; margin:0 0 22px; }
.album-filters label { display:block; min-width:0; }
.album-filter-field { position:relative; min-width:0; }
.album-filter-field > label { margin:0 0 .3rem; color:#244842; font-size:.75rem; font-weight:800; }
.album-filter-field .leaderboard-select-trigger { font:inherit; }
.album-park-picker { position:relative; min-width:0; margin-top:7px; }
.album-park-picker > .form-select { margin-top:0; }
[data-album-park-picker] .form-select.is-enhanced { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); clip-path:inset(50%); white-space:nowrap; }
.album-filters select,.album-filter-search input { width:100%; min-height:42px; padding:8px 11px; border:1px solid var(--album-border); border-radius:8px; background:#fff; color:var(--album-ink); font:inherit; font-size:.82rem; }
.album-filter-search { position:relative; display:flex; align-items:center; }
.album-filter-search i { position:absolute; left:12px; color:#5c7b74; pointer-events:none; }
.album-filter-search input { padding-left:34px; }
.album-filter-reset { color:#287660; font-size:.8rem; font-weight:700; white-space:nowrap; }
.album-list { grid-template-columns:repeat(auto-fill,minmax(270px,1fr)); gap:16px; margin:0 0 24px; }
.album-tile { border-radius:12px; box-shadow:0 1px 2px #123b4310; }
.album-tile-media { position:relative; aspect-ratio:4/3; overflow:hidden; background:#e7f0ec; }
.album-tile> .album-tile-media>img { width:100%; height:100%; aspect-ratio:auto; transition:transform .25s ease; }
.album-tile:hover .album-tile-media>img { transform:scale(1.025); }
.album-tile-placeholder { display:grid; width:100%; height:100%; place-items:center; color:#3a8a77; font-size:2.2rem; background:linear-gradient(140deg,#e3f2ea,#c4e5d8); }
.album-tile-count { position:absolute; top:10px; right:10px; display:inline-flex; align-items:center; gap:5px; padding:5px 8px; color:#fff; border-radius:999px; background:#103b3bd9; font-size:.72rem; font-weight:700; }
.album-tile .album-tile-count { color:#fff; background:#103d43; font-weight:800; text-shadow:0 1px 1px #082f3155; }
.album-tile .album-tile-count i { color:inherit; }
.album-tile-overlay { position:absolute; right:0; bottom:0; left:0; padding:38px 13px 12px; color:#fff; background:linear-gradient(transparent,#082f31d9); }
.album-tile-overlay small { color:#d7ebe3; font-size:.71rem; }
.album-tile-overlay h3 { margin:3px 0 0; color:#fff; font-size:1rem; line-height:1.2; }
.album-tile-meta { display:grid; gap:6px; padding:12px 13px 14px; }
.album-tile-meta strong { overflow:hidden; color:var(--album-ink); font-size:.84rem; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.album-tile-meta span { overflow:hidden; color:var(--album-muted); font-size:.72rem; text-overflow:ellipsis; white-space:nowrap; }
.album-tile > .album-tile-media { padding:0; }
.album-load-more { display:block; width:max-content; margin:0 auto 24px; }
.album-generated-title { display:grid; gap:3px; margin:17px 0 0; padding:11px 13px; border-left:3px solid var(--album-accent); border-radius:0 7px 7px 0; background:#edf7f2; }
.album-generated-title span { color:var(--album-muted); font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.album-generated-title strong { color:var(--album-ink); font-size:1rem; }
.album-settings-dialog { width:min(580px,calc(100% - 24px)); max-height:min(720px,calc(100dvh - 32px)); padding:0; border:0; border-radius:16px; color:var(--album-ink); box-shadow:0 24px 80px #082f3145; }
.album-settings-dialog::backdrop { background:#082f3159; backdrop-filter:blur(3px); }
.album-settings-dialog[open] { animation:album-dialog-in .16s ease-out; }
@keyframes album-dialog-in { from { opacity:0; transform:translateY(8px) scale(.98); } to { opacity:1; transform:none; } }
.album-settings-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:22px 24px 16px; border-bottom:1px solid #e0ebe5; }
.album-settings-head h2 { margin:2px 0 0; font-size:1.35rem; letter-spacing:-.02em; }
.album-dialog-close { display:grid; width:38px; height:38px; place-items:center; border:1px solid var(--album-border); border-radius:50%; background:#fff; color:var(--album-ink); cursor:pointer; }
.album-settings-dialog form { padding:0 24px 24px; }
.album-settings-dialog .album-preference-row:first-of-type { padding-top:16px; }
.album-settings-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:18px; }
.album-settings-actions .btn { min-height:42px; }
.album-settings-dialog [data-preferences-status] { min-height:1.25em; margin:10px 0 0; color:var(--album-accent); font-size:.78rem; }
@media(max-width:1100px) { .album-list { grid-template-columns:repeat(3,minmax(0,1fr)); } .album-filters { grid-template-columns:1.4fr 1fr 1fr; } }
@media(max-width:700px) {
 .album-overview-summary { margin-top:0; }
 .album-overview-summary>div { display:grid; gap:3px; padding:12px 14px; }
 .album-overview-summary strong { font-size:1.15rem; }
 .album-filters { grid-template-columns:1fr 1fr; gap:8px; padding:10px; border:1px solid var(--album-border); border-radius:10px; background:#fff; }
 .album-filter-field { grid-column:1/-1; }
 .album-filter-field .leaderboard-select-trigger { min-height:42px; }
 .album-filter-reset { grid-column:1/-1; padding:5px 2px; }
 .album-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .album-tile-meta { padding:10px; }
 .album-tile-meta strong { font-size:.76rem; }
 .album-tile-meta span { font-size:.68rem; }
 .album-tile-overlay { padding:28px 10px 9px; }
 .album-tile-overlay h3 { font-size:.86rem; }
 .album-tile-count { top:7px; right:7px; padding:4px 7px; }
 .album-settings-head { padding:18px 18px 14px; }
 .album-settings-dialog form { padding:0 18px 20px; }
 .album-settings-dialog { border-radius:14px; }
}
@media(max-width:480px) { .album-list { grid-template-columns:1fr; } .profile-album-preview .album-list { grid-template-columns:repeat(2,minmax(0,1fr)); } .album-page-head nav { width:100%; gap:7px; } .album-page-head nav>* { flex:1 1 auto; justify-content:center; } .album-secondary-action { min-height:40px; } }

/* Profile album cards: clean photography without an overlay competing with the title. */
.profile-albums .album-tile-overlay,
.profile-album-preview .album-tile-overlay { display:none; }
.profile-albums .album-tile-count,
.profile-album-preview .album-tile-count { top:12px; right:12px; padding:7px 10px; color:#fff; background:#103d43; box-shadow:0 2px 8px #082f3140; font-size:.78rem; line-height:1; }
.profile-albums .album-tile-meta,
.profile-album-preview .album-tile-meta { padding:14px 16px 16px; background:#fff; }
.profile-albums .album-tile-meta strong,
.profile-album-preview .album-tile-meta strong { font-size:.88rem; }
.profile-albums .album-tile,
.profile-album-preview .album-tile { box-shadow:0 1px 2px #123b4310; }

/* Responsive photography: use the stored image ratio so cover images are never
   stretched. The media edge stays flush with the card (no artificial frame). */
.album-tile-media { aspect-ratio:4/3; }
.album-tile-media.is-cover-portrait { aspect-ratio:4/5; }
.album-tile-media.is-cover-landscape { aspect-ratio:16/10; }
.album-tile-media > img { display:block; width:100%; height:100%; aspect-ratio:auto; object-fit:cover; }

/* Album detail: a responsive gallery keeps each photo's composition visible
   instead of forcing every image into a fixed 4:3 crop. */
.album-detail .album-gallery {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(170px,1fr));
    grid-auto-rows:auto;
    align-items:start;
    gap:8px;
}
.album-detail .album-gallery .community-media-item {
    aspect-ratio:auto;
    min-height:0;
    border-radius:10px;
    overflow:hidden;
    background:#edf4f1;
}
.album-detail .album-gallery .community-media-item:first-child {
    grid-column:auto;
    aspect-ratio:auto;
    max-height:none;
}
.album-detail .album-gallery .community-media-item > a {
    display:block;
    width:100%;
    height:auto;
    line-height:0;
    background:#edf4f1;
}
.album-detail .album-gallery .community-media-item img {
    display:block;
    width:100%;
    height:auto;
    aspect-ratio:var(--media-ratio,4/3);
    object-fit:cover;
    background:#edf4f1;
}
.album-edit-photo > img {
    aspect-ratio:auto;
    height:auto;
    max-height:260px;
    object-fit:contain;
}

@media(max-width:700px) {
    .album-detail .album-gallery {
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:7px;
    }
    .album-detail .album-gallery .community-media-item {
        display:block;
        width:auto;
        margin:0;
    }
}
@media(max-width:420px) {
    .album-detail .album-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; padding-left:12px; padding-right:12px; }
}

/* Public album wall: keep the photo surface clean. Counters belong in the
   lightbox/header, not on top of every thumbnail. */
.album-detail .album-gallery .community-media-item,
.album-detail .album-gallery .community-media-item > a,
.album-detail .album-gallery .community-media-item img {
    border-radius:0;
}
.album-detail .album-gallery .community-media-counter { display:none !important; }

/* Justified album wall: row height is calculated from each photo's real
   aspect ratio.  The row fills the available width while the original image
   remains visible; extreme portrait/landscape ratios get an ambient blurred
   backdrop instead of hard white bars. */
.album-detail .album-gallery {
    display:flex;
    flex-direction:column;
    gap:6px;
    padding:0 24px 24px;
}
.album-detail .album-gallery-row {
    display:flex;
    width:100%;
    min-width:0;
    min-height:0;
    gap:6px;
}
.album-detail .album-gallery .community-media-item {
    position:relative;
    flex:var(--album-photo-ratio, 1) 1 0;
    width:auto;
    height:var(--album-row-height, 220px);
    min-width:0;
    min-height:0;
    overflow:hidden;
    border-radius:0;
    background:#e7f0ed;
}
.album-detail .album-gallery .community-media-item > a {
    position:relative;
    display:block;
    width:100%;
    height:100%;
    overflow:hidden;
    isolation:isolate;
    background:#e7f0ed;
}
.album-detail .album-gallery .community-media-item .album-photo-backdrop {
    position:absolute;
    z-index:0;
    inset:-12px;
    display:block;
    width:calc(100% + 24px);
    height:calc(100% + 24px);
    background-position:center;
    background-size:cover;
    object-fit:cover;
    filter:blur(22px) saturate(1.15) brightness(.78);
    opacity:.82;
    transform:scale(1.04);
    pointer-events:none;
}
.album-detail .album-gallery .community-media-item > a > img:not(.album-photo-backdrop) {
    position:relative;
    z-index:1;
    display:block;
    width:100%;
    height:100%;
    aspect-ratio:auto;
    object-fit:contain;
    object-position:center;
    border-radius:0;
    transition:transform .2s ease, filter .2s ease;
}
.album-detail .album-gallery .community-media-item > a:hover img:not(.album-photo-backdrop),
.album-detail .album-gallery .community-media-item > a:focus-visible img:not(.album-photo-backdrop) {
    transform:scale(1.02);
    filter:brightness(.97);
}
.album-detail .album-gallery .community-media-item > button { z-index:2; }

@media(max-width:700px) {
    .album-detail .album-gallery { gap:5px; padding:0 16px 16px; }
    .album-detail .album-gallery-row { gap:5px; }
    .album-detail .album-gallery .community-media-item { height:var(--album-row-height, 145px); }
}
@media(max-width:420px) {
    .album-detail .album-gallery { gap:4px; padding-left:12px; padding-right:12px; }
    .album-detail .album-gallery-row { gap:4px; }
    .album-detail .album-gallery .community-media-item { height:var(--album-row-height, 128px); }
}
