.ksr-gallery{padding:42px 0 55px;border-bottom:1px solid var(--line)}
.ksr-gallery h2{font-size:clamp(30px,3.6vw,42px);margin:10px 0 18px}
.ksr-gallery-note{max-width:82ch;font-size:14px;line-height:1.8;color:var(--muted);margin:0 0 26px}
.ksr-gallery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 18px}
.ksr-gallery-item{margin:0;min-width:0}
.ksr-gallery-link{display:block;position:relative;overflow:hidden;background:#e2e5de;aspect-ratio:4/3;border-radius:4px}
.ksr-gallery-link img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .2s}
.ksr-gallery-link:hover img{transform:scale(1.035)}
.ksr-gallery-link:focus-visible{outline:3px solid var(--gold);outline-offset:4px}
.ksr-photo-badge{position:absolute;left:8px;bottom:8px;max-width:calc(100% - 16px);padding:5px 8px;border-radius:3px;background:#183e3cf0;color:white;font-size:11px;line-height:1.4;font-weight:600}
.ksr-photo-badge.unstaged{background:#f8f6f1f5;color:#183e3c}
.ksr-gallery-item figcaption{font-size:12px;line-height:1.6;color:var(--muted);margin-top:9px}
html.ksr-gallery-open{overflow:hidden}
dialog.ksr-photo-dialog{width:min(1440px,96vw);max-width:96vw;max-height:96dvh;padding:18px 22px 20px;border:0;border-radius:8px;background:var(--paper);color:var(--ink);overflow:auto}
.ksr-photo-dialog::backdrop{background:#081c21e8;backdrop-filter:blur(4px)}
.ksr-dialog-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:12px}
.ksr-dialog-toolbar h2{font:18px/1.4 Arial,sans-serif;letter-spacing:0;margin:0}
.ksr-photo-dialog button{min-height:44px;padding:10px 14px;border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:4px;font:14px/1.4 Arial,sans-serif}
.ksr-photo-dialog button:hover{background:#e4e8df}
.ksr-full-image-wrap{display:flex;justify-content:center;align-items:center;min-height:160px;background:#e7e9e1}
.ksr-full-image-wrap img{display:block;width:auto;height:auto;max-width:100%;max-height:calc(96dvh - 210px);object-fit:contain}
.ksr-dialog-bottom{text-align:center;padding-top:12px}
.ksr-dialog-navigation{display:flex;justify-content:center;align-items:center;gap:18px}
#ksr-photo-counter{font-size:13px;min-width:70px}
#ksr-full-caption{font-size:14px;line-height:1.5;margin:10px 0 8px}
#ksr-open-original{font-size:12px;text-decoration:underline;text-underline-offset:3px}
@media(max-width:950px){.ksr-gallery-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.ksr-gallery{padding:30px 0 40px}.ksr-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}.ksr-photo-badge{font-size:10px;left:5px;bottom:5px;padding:4px 6px}.ksr-gallery-item figcaption{font-size:11px}dialog.ksr-photo-dialog{padding:12px;max-width:98vw;width:98vw}.ksr-dialog-toolbar h2{font-size:14px}.ksr-dialog-navigation{gap:8px}.ksr-photo-dialog button{font-size:12px;padding:10px}.ksr-full-image-wrap img{max-height:calc(96dvh - 230px)}}
@media(prefers-reduced-motion:reduce){.ksr-gallery-link img{transition:none}}
