/* V140: photo-first gallery, no decorative hero */
.photos-page #photo-memories{max-width:none!important;width:100%!important;margin:0!important;padding:4px 8px!important;background:#f5f3ee!important;border:0!important;box-shadow:none!important}
.photos-page .memories-hero,.photos-page #memories-trip-list,.photos-page .memories-trips>h2,.photos-page .memories-plan-link{display:none!important}
.photos-page .gallery-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:4px 0!important;margin:0!important}
.photos-page #trip-select{max-width:100%;min-width:180px;padding:6px;border:1px solid #b9a16d;border-radius:5px;background:white;color:#17384c}
.photos-page .memories-workspace{display:grid!important;grid-template-columns:220px minmax(0,1fr) 180px!important;gap:6px!important;padding:0!important;background:none!important;border:0!important}
.photos-page .memories-workspace.hide-trips{grid-template-columns:0 minmax(0,1fr) 180px!important}
.photos-page .memories-workspace.hide-thumbs{grid-template-columns:220px minmax(0,1fr) 0!important}
.photos-page .memories-workspace.hide-trips.hide-thumbs{grid-template-columns:0 minmax(0,1fr) 0!important;gap:0!important}
.photos-page .hide-trips .memories-trips,.photos-page .hide-thumbs .memories-pictures{display:none!important}
.photos-page .memories-album{min-width:0!important;padding:0!important;margin:0!important;background:#f5f3ee!important;border:0!important;box-shadow:none!important;border-radius:0!important}
.photos-page .memories-album::before,.photos-page .memories-album::after{display:none!important}
.photos-page .memories-album-heading{display:flex!important;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 8px!important;padding:3px!important;margin:0!important;background:var(--album-accent,#17384c)!important;color:white!important;border:0!important;min-height:0!important}
.photos-page .memories-album-heading>*{margin:0!important;color:inherit!important;font-size:13px!important;line-height:1.2!important}
.photos-page #memories-resort-badges{display:none!important}
.photos-page .media-tabs{margin:3px 0!important;padding:0!important;gap:4px!important}
.photos-page #memories-photo-stage{display:flex!important;flex-direction:column;align-items:center;justify-content:center;width:100%!important;height:max(260px,calc(100dvh - 220px))!important;min-height:0!important;margin:0!important;padding:0!important;background:#161b20!important;border:0!important;border-radius:4px!important;box-shadow:none!important;overflow:hidden}
.photos-page #memories-photo,.photos-page #memories-video{width:100%!important;flex:1 1 0;min-height:0!important;height:0!important;max-height:none!important;object-fit:contain!important}
.photos-page #memories-photo[hidden],.photos-page #memories-video[hidden],.photos-page #memories-empty[hidden]{display:none!important}
.photos-page #memories-caption{color:white!important;margin:0!important;padding:2px!important;font-size:11px!important}
.photos-page .memories-photo-controls{margin:3px 0!important;padding:0!important}
@media(max-width:760px){.photos-page .memories-workspace{display:flex!important;flex-direction:column}.photos-page .memories-album{order:0}.photos-page .memories-trips,.photos-page .memories-pictures{order:1}.photos-page #memories-photo-stage{height:65dvh!important}}

/* Explicit grid placement: hidden sidebars must not move the viewer into a zero-width track. */
.photos-page .memories-album{grid-column:2!important;grid-row:1!important}
.photos-page .memories-trips{grid-column:1!important;grid-row:1!important}
.photos-page .memories-pictures{grid-column:3!important;grid-row:1!important}
.photos-page #memories-photo-error:not([hidden]){display:block!important;color:#922;padding:8px}
.photos-page #memories-empty:not([hidden]){color:white!important}
