.image-zoom-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:4px 0 8px}
.image-zoom-controls button,.image-zoom-controls a{min-height:44px;padding:9px 13px;border:1px solid #d8c795;border-radius:8px;background:#faf4e6;color:#71551d;font:600 14px/1.4 system-ui;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.image-zoom-controls button:disabled{opacity:.4}.image-zoom-controls output{min-width:48px;text-align:center;font:14px system-ui}
.image-zoom-hint,.gallery-enlarge-hint{font:14px/1.5 system-ui;color:#6a644f;margin:8px 0 12px}
#image-dialog .gallery-stage{overflow:hidden}
.image-zoom-viewport{width:100%;height:min(65dvh,760px);display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none;cursor:grab}
#image-dialog #enlarged-image{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;flex-shrink:0;transform-origin:center;user-select:none;-webkit-user-select:none}
#image-dialog .image-side-arrow{z-index:2}
@media(max-width:900px){
 #image-dialog{box-sizing:border-box;width:100vw;max-width:100vw;max-height:100dvh;padding:12px;margin:auto;border-radius:0}
 #image-dialog .image-viewer-head h2{font-size:20px;margin:0}
 #image-dialog .image-viewer-head{margin-bottom:10px}
 #image-dialog .gallery-stage{padding:0 38px}
 #image-dialog .image-side-arrow{width:34px}
 .image-zoom-viewport{height:58dvh}
}
@media(max-height:500px) and (orientation:landscape){
 #image-dialog{width:100vw;max-width:100vw;max-height:100dvh;padding:8px 12px}
 #image-dialog .image-viewer-head{margin:0}.image-viewer-head h2{font-size:18px}
 #image-dialog .image-zoom-hint{display:none}
 #image-dialog figure{margin-top:4px}
 .image-zoom-viewport{height:calc(100dvh - 112px)}
 #image-dialog .image-zoom-controls{margin:2px 0;gap:6px}
}
