/* Isolated gallery styling; loaded after the site's base stylesheet. */
#photo-dialog{width:min(1060px,calc(100% - 32px));max-width:none;max-height:calc(100dvh - 32px);padding:24px;border:1px solid #d8cebd;background:#f7f4ee;color:#29251f;overflow:auto;overscroll-behavior:contain}
#photo-dialog::backdrop{background:rgb(23 21 18 / .88)}
#photo-dialog .gallery-header{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
#photo-dialog .gallery-heading{font:400 clamp(23px,3vw,35px)/1.15 var(--serif,Georgia,serif);letter-spacing:-.03em}
#photo-dialog .gallery-actions{display:flex;gap:12px;align-items:center;flex-shrink:0}
#photo-dialog button{touch-action:manipulation}
#photo-dialog .dialog-close,#photo-dialog .gallery-language{margin:0;min-width:44px;min-height:44px;display:grid;place-items:center;background:transparent;color:#29251f;border:1px solid #bfb3a2;border-radius:0;line-height:1}
#photo-dialog .dialog-close{font-size:30px}
#photo-dialog .gallery-language{font-size:12px;font-weight:600}
#photo-dialog .gallery-stage{position:relative;height:clamp(180px,52dvh,610px);background:#e9e2d7;display:flex;align-items:center;justify-content:center}
#photo-dialog #expanded-photo{height:100%;width:100%;max-height:none;object-fit:contain}
#photo-dialog .gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:48px;height:48px;border:1px solid #b5aa98;background:#f7f4eef5;color:#29251f;font:34px/1 Georgia,serif;box-shadow:0 2px 10px #211c1720}
#photo-dialog .gallery-prev{left:12px}
#photo-dialog .gallery-next{right:12px}
#photo-dialog .gallery-description{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin:12px 0}
#photo-dialog #photo-caption{font-size:14px;line-height:1.5;margin:0}
#photo-dialog .gallery-counter{font-size:12px;line-height:1.75;white-space:nowrap;color:#514a41;font-variant-numeric:tabular-nums}
#photo-dialog .gallery-status{font-size:13px;line-height:1.4;color:#6d3422}
#photo-dialog .gallery-status:empty{display:none}
#photo-dialog .gallery-status:not(:empty){margin-top:10px}
#photo-dialog .gallery-thumbs{display:flex;gap:10px;overflow-x:auto;padding:7px 5px 12px;scrollbar-width:thin;position:relative;overscroll-behavior-x:contain}
#photo-dialog .gallery-thumb{width:100px;min-width:100px;height:68px;padding:3px;background:#f7f4ee;border:2px solid transparent;opacity:.65}
#photo-dialog .gallery-thumb img{width:100%;height:100%;max-height:none;object-fit:cover}
#photo-dialog .gallery-thumb[aria-pressed=true]{border-color:#8f432b;opacity:1}
#photo-dialog .gallery-thumb:hover{opacity:1}
#photo-dialog .gallery-note{font-size:12px;line-height:1.5;color:#514a41;margin-top:8px}
#photo-dialog button:focus-visible{outline:3px solid #8f432b;outline-offset:3px}
@media(max-width:600px){
  #photo-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);padding:16px;padding-bottom:max(16px,env(safe-area-inset-bottom))}
  #photo-dialog .gallery-header{gap:10px;margin-bottom:14px}
  #photo-dialog .gallery-heading{font-size:25px;max-width:200px}
  #photo-dialog .gallery-actions{gap:8px}
  #photo-dialog .gallery-stage{height:43dvh;min-height:180px}
  #photo-dialog .gallery-arrow{width:44px;height:44px;background:#f7f4eee8}
  #photo-dialog .gallery-prev{left:5px}
  #photo-dialog .gallery-next{right:5px}
  #photo-dialog .gallery-description{gap:10px}
  #photo-dialog #photo-caption{font-size:13px}
  #photo-dialog .gallery-counter{font-size:11px}
  #photo-dialog .gallery-thumb{width:84px;min-width:84px;height:60px}
}
@media(max-height:500px) and (min-width:601px){
  #photo-dialog{padding:14px 20px}
  #photo-dialog .gallery-heading{font-size:24px}
  #photo-dialog .gallery-header{margin-bottom:10px}
  #photo-dialog .gallery-stage{height:45dvh;min-height:120px}
  #photo-dialog .gallery-thumb{width:80px;min-width:80px;height:52px}
}
