/* Album pages use the gallery's navy, gold and white cards. */
body.gallery-album-page { height: auto; background: #f4f6f7; }
.gallery-album-page footer { box-sizing: border-box; }
.gallery-back { display: inline-block; margin: 0 0 24px; color: #24516b; font: 600 16px/1.5 "Segoe UI", Arial, sans-serif; text-decoration: none; }
.gallery-back:hover { color: #a47825; text-decoration: underline; }
.gallery-back-bottom { margin: 28px 0 0; }
.gallery-album-content { display: flow-root; min-width: 0; color: #163b52; font: 16px/1.6 "Segoe UI", Arial, sans-serif; }
.gallery-album-content :is(#full, #header) { width: auto; float: none; margin: 0; padding: 0; background: transparent; }
.gallery-album-content :is(h1, .albumTitle) { display: block; margin: 0 0 26px; padding: 0 0 20px; border-bottom: 3px solid #e4b51e; color: #082b43; font: 700 clamp(23px,3vw,32px)/1.4 "Segoe UI", Arial, sans-serif; overflow-wrap: anywhere; }
.gallery-album-content :is(#contentBox, #thumbs) { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 18px; width: auto; margin: 0; padding: 0; }
.gallery-album-content :is(.thumbsBox, #thumbs > div) { min-width: 0; float: none; width: auto; height: auto; margin: 0; padding: 9px; border: 1px solid #e1e6e8; border-radius: 12px; background: #fff; box-shadow: 0 6px 20px rgba(8,43,67,.06); box-sizing: border-box; text-align: center; }
.gallery-album-content :is(.thumbsBox, #thumbs) a { display: block; color: #163b52; font: 600 14px/1.5 "Segoe UI", Arial, sans-serif; text-decoration: none; overflow-wrap: anywhere; }
.gallery-album-content :is(.thumbsBox, #thumbs) img { display: block; width: 100%; height: 150px; margin-bottom: 7px; object-fit: cover; border-radius: 8px; }
.gallery-album-content :is(.thumbsBox, #thumbs > div):hover { border-color: #dcb43c; }
.gallery-album-content table { width: 100%; max-width: 100%; margin: 16px 0 24px; color: #163b52; font: 600 15px/1.5 "Segoe UI", Arial, sans-serif; }
.gallery-album-content #contentBox > table { grid-column: 1 / -1; }
.gallery-album-content #contentBox > div[style*="CLEAR"] { display: none; }
.gallery-album-content img { max-width: 100%; }
.archived-viewer { max-width: 100%; overflow: auto; }
.archived-viewer :is(object,embed) { max-width: 100%; }
.gallery-viewer { width: min(1100px,calc(100% - 32px)); max-width: calc(100% - 32px); max-height: calc(100dvh - 32px); padding: 16px; border: 0; border-radius: 14px; background: #082b43; color: #fff; box-sizing: border-box; }
.gallery-viewer::backdrop { background: rgba(0,12,23,.88); }
.gallery-viewer-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.gallery-viewer button { min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid #c0ccd3; border-radius: 8px; background: #fff; color: #082b43; font: 700 16px "Segoe UI", Arial, sans-serif; cursor: pointer; }
.gallery-viewer button:focus-visible, .gallery-back:focus-visible { outline: 3px solid #e4b51e; outline-offset: 3px; }
.gallery-viewer img { display: block; width: 100%; height: min(70dvh,740px); object-fit: contain; }
.gallery-viewer-caption { margin: 12px 0 0; text-align: center; color: #fff; font: 16px/1.5 "Segoe UI", Arial, sans-serif; overflow-wrap: anywhere; }
@media(max-width:760px) {
 .gallery-album-content :is(#contentBox,#thumbs) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 .gallery-album-content :is(.thumbsBox,#thumbs) img { height: 120px; }
 .gallery-viewer { padding: 12px; }
}
