.gallery-lightbox-navigation { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding-bottom:env(safe-area-inset-bottom); }
.gallery-lightbox-navigation button { min-height:44px;padding:8px 14px;border:1px solid #777;background:#111;color:#eee;font:inherit;cursor:pointer; }
.gallery-lightbox-navigation button:hover,.gallery-lightbox-navigation button:focus-visible { background:#eee;color:#111; }
.gallery-lightbox-navigation button:disabled { opacity:.4;cursor:default; }
.gallery-lightbox-navigation p { margin:0;font-size:.75rem;letter-spacing:normal; }
.gallery-lightbox img { max-height:calc(100dvh - 140px); }
.gallery-lightbox-caption { max-height:4.5em;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5; }
.gallery-lightbox:has(.gallery-lightbox-caption:not([hidden])) img { max-height:calc(100dvh - 230px); }
.gallery-album-filter { display:grid;min-width:0;gap:8px;margin:0 0 24px;font-size:.8rem;color:#aaa; }
.gallery-album-filter select { width:100%;min-width:0;max-width:100%;min-height:44px;padding:8px 12px;border:1px solid #666;background:#111;color:#eee;font:inherit; }
.gallery-album-filter select:focus-visible { outline:2px solid #eee;outline-offset:4px; }
.gallery-album-filter p { margin:0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6; }
.gallery-years { flex-wrap:wrap; }
html:has(.gallery-page) { overflow-anchor:none; }
.gallery-album-filter .gallery-translation-note,.gallery-lightbox .gallery-translation-note { margin:8px 0 0;font-family:'Ubuntu',sans-serif;font-size:.68rem;font-weight:400;font-style:italic;color:#777;line-height:1.4;letter-spacing:normal;overflow-wrap:anywhere; }
.gallery-translation-note[hidden] { display:none; }
.gallery-lightbox:has(.gallery-lightbox-translation:not([hidden])) img { max-height:calc(100dvh - 290px); }
.gallery-selection-state { margin:0 0 28px;color:#aaa;line-height:1.6; }
.gallery-selection-state p { margin:0 0 16px; }
.gallery-selection-actions { display:flex;flex-wrap:wrap;gap:12px; }
.gallery-selection-actions button { box-sizing:border-box;min-height:44px;padding:9px 16px;border:1px solid #666;background:transparent;color:#ddd;font:inherit;cursor:pointer; }
.gallery-selection-actions button:hover { background:#222;border-color:#aaa; }
.gallery-selection-actions button:focus-visible { outline:2px solid #fff;outline-offset:4px; }
.gallery-selection-state[hidden],.gallery-selection-state [hidden] { display:none; }
.gallery-page .gallery-months { flex-wrap:wrap;overflow:visible;padding-bottom:0; }
.gallery-page .gallery-year,.gallery-page .gallery-month { box-sizing:border-box;min-height:32px;min-width:44px;padding-block:4px; }
.gallery-years[hidden],.gallery-months[hidden] { display:none; }
