.card-gallery-previews{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:9px}
.card-gallery-previews button{border:1px solid var(--line);border-radius:5px;overflow:hidden;padding:0;aspect-ratio:1.45;background:var(--ivory)}
.card-gallery-previews img{width:100%;height:100%;object-fit:cover;transition:transform .25s}
.card-gallery-previews button:hover img{transform:scale(1.07)}
.photo-growth{display:flex;align-items:center;gap:8px}
.photo-count{font-size:10px;line-height:1.6;border:1px solid #ffffff75;border-radius:20px;padding:3px 9px;background:#0a211b66}
html.photo-gallery-open{overflow:hidden}
.photo-dialog{width:min(1000px,calc(100vw - 40px));max-height:94dvh;border-radius:16px;overscroll-behavior:contain}
.photo-dialog[open]{display:flex;flex-direction:column}
.gallery-header{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:16px 24px;flex-shrink:0}
.gallery-header .eyebrow{font-size:10px;letter-spacing:0;margin:0}
.gallery-header h2{font-size:25px;line-height:1.5;font-weight:500;margin:1px 0 0}
.gallery-header .photo-close{position:static;flex-shrink:0;width:40px;height:40px;box-shadow:none;background:transparent;border:1px solid var(--line);color:var(--ink)}
.gallery-stage{position:relative;min-height:0;flex-shrink:0;background:#e8eddf}
.gallery-stage .dialog-photo{display:block;width:100%;height:clamp(210px,48dvh,540px);max-height:none;object-fit:contain;background:none;padding:10px 58px}
[data-theme=dark] .gallery-stage{background:#0a1710}
.gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);width:42px;height:42px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--ivory);color:var(--ink);font:22px/1 Arial,sans-serif;box-shadow:0 3px 16px #0001}
.gallery-arrow:hover{background:var(--ink);color:var(--ivory)}
.gallery-prev{right:10px}.gallery-next{left:10px}
.gallery-counter{position:absolute;left:50%;bottom:15px;transform:translateX(-50%);direction:rtl;background:#092217d9;color:#fff;backdrop-filter:blur(8px);border:1px solid #ffffff40;border-radius:30px;padding:3px 14px;font-size:12px;font-variant-numeric:tabular-nums}
.gallery-thumbnails{display:flex;justify-content:center;gap:10px;padding:14px 20px 0;flex-shrink:0}
.gallery-thumbnails button{padding:3px;width:94px;aspect-ratio:1.4;border:2px solid transparent;border-radius:9px;background:transparent;opacity:.6;transition:opacity .2s,border-color .2s}
.gallery-thumbnails button[aria-pressed=true]{border-color:var(--ink);opacity:1}.gallery-thumbnails button:hover{opacity:1}
.gallery-thumbnails img{width:100%;height:100%;object-fit:cover;border-radius:4px}
.photo-dialog-caption{padding:14px 24px 21px;flex-shrink:0}
.photo-dialog-caption .gallery-image-caption{font-size:16px;font-weight:500;color:var(--ink);margin-bottom:5px}
.photo-dialog-caption .gallery-note{font-size:11px;max-width:760px}





@media(max-width:640px){
  .card-gallery-previews{gap:4px;margin-top:6px}.photo-growth{gap:5px}.photo-count{font-size:8px;padding:2px 6px}
  .photo-dialog{width:calc(100vw - 16px);max-height:96dvh;border-radius:12px}
  .gallery-header{padding:11px 14px}.gallery-header h2{font-size:22px}.gallery-header .eyebrow{font-size:9px}
  .gallery-stage .dialog-photo{height:40dvh;min-height:200px;padding:8px 0}
  .gallery-arrow{width:38px;height:38px;background:var(--ivory);opacity:.94}.gallery-prev{right:6px}.gallery-next{left:6px}
  .gallery-counter{bottom:10px;font-size:11px;padding:2px 12px}
  .gallery-thumbnails{gap:6px;padding:11px 12px 0}.gallery-thumbnails button{width:76px}
  .photo-dialog-caption{padding:11px 15px 16px}.photo-dialog-caption .gallery-image-caption{font-size:14px}.photo-dialog-caption .gallery-note{font-size:10px}
  
  
}
@media(prefers-reduced-motion:reduce){.card-gallery-previews img,.gallery-thumbnails button{transition:none}}
@media print{.photo-dialog{display:none!important}}
