.sg-section{padding-block:8px 16px;scroll-margin-top:110px;min-width:0}
.sg-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:clamp(150px,18vw,240px);gap:clamp(12px,1.4vw,20px);min-width:0}
.sg-tile{--sg-cols:5;--sg-rows:1;grid-column:span var(--sg-cols);grid-row:span var(--sg-rows);min-width:0;margin:0;overflow:hidden;border-radius:6px;background:var(--cream,#eaf3f7)}
.sg-tile:nth-child(6n+1),.sg-tile:nth-child(6n+5){--sg-cols:7;--sg-rows:2}
.sg-tile:last-child:nth-child(6n+1){--sg-cols:12}
.sg-tile:last-child:nth-child(6n+4){--sg-cols:12}
.sg-tile:last-child:nth-child(6n+5){--sg-rows:1}
.sg-tile:nth-child(6n+1):nth-last-child(2)+.sg-tile{--sg-rows:2}
.sg-image-link{display:block;position:relative;width:100%;height:100%;overflow:hidden;color:#fff}
.sg-image-link[data-gallery-zoom]{cursor:zoom-in}
.sg-image-link:focus-visible{outline:3px solid var(--accent,#176b87);outline-offset:-5px}
.sg-image-link img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.sg-caption{position:absolute;inset:auto 0 0;display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:8px 20px;padding:46px 22px 20px;background:linear-gradient(transparent,rgba(11,31,42,.8));pointer-events:none;color:#fff;line-height:1.5}
.sg-caption-title{font-size:18px;font-weight:400;overflow-wrap:anywhere}
.sg-source-label{display:inline-flex;gap:10px;align-items:center;font-size:14px;font-weight:700}
body.sg-lightbox-open{position:fixed;top:var(--sg-scroll-top,0);left:0;right:0;width:100%;overflow:hidden}
.sg-dialog{width:min(1200px,calc(100% - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line,#d1e0e7);border-radius:10px;background:var(--surface,#fff);color:var(--text,#18374a);box-shadow:0 24px 100px #061e3c40;overflow:auto}
.sg-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.sg-dialog::backdrop{background:rgba(9,29,42,.88)}
.sg-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 20px;border-bottom:1px solid var(--line,#d1e0e7)}
.sg-dialog-title{color:var(--text,#18374a);font-family:var(--font);font-size:16px;line-height:1.5;overflow-wrap:anywhere;max-height:4.5em;overflow:auto}
.sg-close,.sg-nav{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:6px 12px;border:1px solid var(--line,#d1e0e7);border-radius:5px;background:var(--surface,#fff);color:var(--text,#18374a);font-family:var(--font);line-height:1;cursor:pointer;flex-shrink:0}
.sg-close{gap:12px;font-size:16px}
.sg-close>span:last-child{font-size:28px}
.sg-close:hover,.sg-nav:hover{background:var(--cream,#eaf3f7);border-color:var(--accent,#176b87)}
.sg-close:focus-visible,.sg-nav:focus-visible,.sg-image-error a:focus-visible{outline:2px solid var(--accent,#176b87);outline-offset:3px}
.sg-stage{position:relative;display:grid;place-items:center;min-height:180px;height:min(70dvh,820px);overflow:hidden;background:var(--bg,#f7fafc)}
.sg-image-host{width:100%;height:100%;min-width:0;min-height:0}
.sg-image-host img{display:block;width:100%;height:100%;object-fit:contain}
.sg-image-status,.sg-image-error{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:24px;text-align:center;font-size:16px;color:var(--muted,#526b78)}
.sg-image-error{flex-direction:column;gap:18px;line-height:1.6}
.sg-image-error p{color:var(--muted,#526b78)}
.sg-image-error a{color:var(--accent,#176b87);text-decoration:underline;text-underline-offset:4px}
.sg-dialog-footer{display:flex;align-items:center;justify-content:center;gap:24px;padding:12px 20px;border-top:1px solid var(--line,#d1e0e7)}
.sg-nav{font-size:26px}
.sg-position{color:var(--muted,#526b78);font-size:16px;line-height:1.5;min-width:90px;text-align:center}
@media(hover:hover) and (prefers-reduced-motion:no-preference){.sg-image-link:hover img{transform:scale(1.025)}}
@media(max-width:720px){
 .sg-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:clamp(116px,31vw,210px);gap:12px}
 .sg-tile{grid-column:span 1;grid-row:span 1;border-radius:4px}
 .sg-tile:nth-child(5n+1){grid-column:span 2;grid-row:span 2}
 .sg-tile:last-child:nth-child(5n+2),.sg-tile:last-child:nth-child(5n+4){grid-column:span 2}
 .sg-caption{gap:4px;padding:36px 12px 12px}
 .sg-caption-title{font-size:16px}
 .sg-source-label{font-size:14px}
 .sg-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:6px}
 .sg-dialog-header{padding:10px 12px;gap:12px}
 .sg-dialog-title{font-size:14px}
 .sg-close{padding:6px 10px;gap:8px}
 .sg-stage{height:65dvh;min-height:140px}
 .sg-dialog-footer{padding:10px 12px;gap:20px}
}
@media(prefers-reduced-motion:reduce){.sg-image-link img{transition:none}}
