.cs-gallery{position:relative;margin:0 0 40px;width:100%}
.cs-gallery-grid{display:grid;grid-template-columns:2fr 1fr 1fr;grid-template-rows:1fr 1fr;gap:8px;aspect-ratio:2.55;overflow:hidden;border-radius:22px;background:#eef0ed}
.cs-gallery .cs-gallery-tile{display:block;min-width:0;min-height:0;overflow:hidden;background:#eef0ed}
.cs-gallery .cs-gallery-tile[hidden],.cs-gallery [hidden]{display:none!important}
.cs-gallery-tile:first-child{grid-row:1 / 3}
.cs-gallery-tile img{display:block;width:100%;height:100%;object-fit:cover;transition:filter .18s ease}
.cs-gallery-tile:hover img{filter:brightness(.9)}
.cs-gallery-tile:focus-visible{outline:3px solid #fff;outline-offset:-6px}
.cs-gallery-grid--1{grid-template-columns:1fr}
.cs-gallery-grid--2{grid-template-columns:1fr 1fr}
.cs-gallery-grid--2 .cs-gallery-tile{grid-row:1 / 3}
.cs-gallery-grid--3{grid-template-columns:1fr 1fr}
.cs-gallery-grid--4 .cs-gallery-tile:nth-child(2){grid-row:1 / 3}
.cs-gallery .cs-gallery-all{position:absolute;right:20px;bottom:20px;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:1px solid #172b3a;border-radius:9px;background:#fff;color:#172b3a;font-family:inherit;font-size:.85rem;font-weight:600;line-height:1.3;cursor:pointer;box-shadow:0 2px 8px #00000014}
.cs-gallery-all:hover{background:#f5f5f2}
.cs-gallery-all:focus-visible,.cs-gallery-dialog button:focus-visible{outline:3px solid #cb476f;outline-offset:4px}
.cs-gallery-dialog{box-sizing:border-box;position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;padding:24px;border:0;background:#111518;color:#fff;z-index:100000;overflow:auto}
.cs-gallery-dialog::backdrop{background:#111518}
.cs-gallery-dialog:not([open]){display:none}
.cs-gallery-dialog[open]{display:flex;flex-direction:column}
.cs-gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-shrink:0;min-height:48px;padding-bottom:12px;font-size:.9rem}
.cs-gallery-dialog button{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:48px;height:48px;border:1px solid #ffffff60;border-radius:50%;background:#ffffff0c;color:#fff;font-family:inherit;font-size:30px;line-height:1;cursor:pointer}
.cs-gallery-dialog button:hover{background:#ffffff25}
.cs-gallery-stage{display:flex;align-items:center;justify-content:space-between;gap:24px;flex:1;min-height:0}
.cs-gallery-stage figure{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-width:0;margin:0;height:100%;gap:14px}
.cs-gallery-stage img{display:block;width:100%;min-height:0;max-height:calc(100dvh - 180px);object-fit:contain}
.cs-gallery-stage figcaption{max-width:900px;max-height:72px;overflow:auto;font-size:.8rem;text-align:center;line-height:1.5;color:#ddd;overflow-wrap:anywhere}
@media(max-width:900px){.cs-gallery-grid{aspect-ratio:2.1;border-radius:16px}.cs-gallery-all{right:14px;bottom:14px}}
@media(max-width:640px){.cs-gallery{margin-bottom:28px}.cs-gallery-grid{display:block;aspect-ratio:1.4;border-radius:16px}.cs-gallery-grid .cs-gallery-tile{display:none}.cs-gallery-grid .cs-gallery-tile:first-child{display:block;width:100%;height:100%}.cs-gallery .cs-gallery-all{right:12px;bottom:12px;padding:9px 12px;font-size:.75rem}.cs-gallery-dialog{padding:16px}.cs-gallery-stage{position:relative;gap:0}.cs-gallery-stage>button{position:absolute;z-index:1;bottom:8px;width:44px;height:44px;background:#111c}.cs-gallery-stage>[data-gallery-prev]{left:0}.cs-gallery-stage>[data-gallery-next]{right:0}.cs-gallery-stage img{max-height:calc(100dvh - 210px)}.cs-gallery-stage figure{padding-bottom:64px}.cs-gallery-stage figcaption{max-height:90px}}
@media(prefers-reduced-motion:reduce){.cs-gallery-tile img{transition:none}}

/* Stable image box: switching photos never changes the dialog geometry. */
.cs-gallery-dialog{overflow:hidden}
.cs-gallery-stage figure{position:relative;overflow:hidden}
.cs-gallery-stage img{flex:1;height:0;width:100%;max-height:none;object-fit:contain;contain:layout style}
.cs-gallery-stage figcaption{flex:none;padding-top:2px}
.cs-gallery-stage figcaption a{color:#fff;text-underline-offset:4px}
.cs-gallery-dialog[aria-busy=true] .cs-gallery-toolbar::after{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:#d9ae72}
@media(max-width:640px){.cs-gallery-stage figure{box-sizing:border-box}.cs-gallery-stage img{max-height:none}}

