.charter-gallery{padding:clamp(42px,7vw,95px) max(6vw,20px) 72px;background:radial-gradient(ellipse at 90% 12%,#adebe7 0%,transparent 37%),linear-gradient(155deg,#f8fcf9 0%,#e4f3f0 52%,#c2e4eb 100%);color:#102b3c;min-height:75vh}
.charter-gallery header{max-width:800px;margin-bottom:32px}
.charter-gallery h1{margin:0;color:#002e57;font:400 clamp(46px,8vw,96px)/1 "Bodoni Moda",serif}
.charter-gallery-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));gap:18px;margin:22px 0 32px}
.charter-gallery-grid img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;background:#e0edf0}
.gallery-editor form{display:grid;gap:12px;align-content:start;background:#fff;border:1px solid #d1c4a6;padding:16px}
.gallery-editor>form{max-width:650px}
.gallery-editor label{display:block;min-width:0}
.gallery-editor input:not([type=checkbox]){display:block;width:100%;max-width:100%;margin-top:4px;padding:9px;border:1px solid #8d887c;font:inherit}
.gallery-editor button{justify-self:start;min-height:44px;background:#002e57;color:white;border:1px solid #002e57;padding:8px 14px;cursor:pointer}
.gallery-editor button:disabled{opacity:.6;cursor:wait}
.charter-gallery-grid video{display:block;width:100%;aspect-ratio:4/3;background:#002e57}


.gallery-viewer{max-width:1120px;margin:0 0 30px}
.gallery-viewer figure{margin:0}
.gallery-stage{position:relative;display:grid;place-items:center;overflow:hidden;isolation:isolate;background:linear-gradient(150deg,#0c535f,#002e57 68%,#071d36);border-radius:16px;aspect-ratio:16/10;max-height:68vh}
.gallery-stage a,.gallery-stage video{width:100%;height:100%;min-width:0;min-height:0}
.gallery-stage a{display:grid;place-items:center}
.gallery-stage img,.gallery-stage video{display:block;max-width:100%;max-height:100%;object-fit:contain}
.gallery-stage img{width:100%;height:100%;position:absolute;inset:0}
.gallery-stage button{position:absolute;top:50%;transform:translateY(-50%);background:#fff;color:#002e57;box-shadow:0 2px 12px #001f3d55;border:0;border-radius:50%;width:44px;height:44px;display:grid;place-items:center;padding:0;font:32px/1 Arial,sans-serif;cursor:pointer}
.gallery-previous{left:12px}.gallery-next{right:12px}
.gallery-stage a:focus-visible{outline:0;box-shadow:inset 0 0 0 3px #fff;z-index:1}
.gallery-stage a:focus-visible img{outline:3px solid #fff;outline-offset:-3px}
.gallery-stage button:focus-visible,.gallery-thumbnails button:focus-visible{outline:3px solid #b07824;outline-offset:2px}
.gallery-viewer figcaption{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:12px 2px 0;overflow-wrap:anywhere}
.gallery-viewer figcaption small{flex-shrink:0;color:#174b5c}
.gallery-thumbnails{position:relative;display:flex;gap:8px;overflow-x:auto;padding:10px 4px 8px}
.gallery-thumbnails button{display:grid;place-items:center;min-width:0;flex:0 0 clamp(56px,12vw,90px);aspect-ratio:4/3;border:2px solid transparent;border-radius:7px;background:#002e57;color:#fff;padding:0;overflow:hidden;cursor:pointer}
.gallery-thumbnails button[aria-current=true]{border-color:#006c76;box-shadow:0 0 0 2px #e9f9f8}
.gallery-thumbnails img{width:100%;height:100%;object-fit:cover}
@media(max-width:600px){.gallery-stage{aspect-ratio:4/3;border-radius:10px}.gallery-previous{left:5px}.gallery-next{right:5px}}
