/* Image navigation: source pixels stay untouched; only the preview is transformed. */
.detail-dialog{width:1280px}
.detail-layout{grid-template-columns:minmax(0,1.6fr) minmax(320px,1fr)}
.detail-preview{padding:18px;gap:10px}
.image-stage{position:relative;display:block;height:clamp(360px,60vh,680px);overflow:hidden;touch-action:none;user-select:none;overscroll-behavior:contain;isolation:isolate}
.image-stage:focus-visible{outline:2px solid var(--green);outline-offset:3px}
.image-stage img{position:absolute;left:0;top:0;max-width:none;max-height:none;padding:0;object-fit:fill;transform-origin:0 0;pointer-events:none;will-change:transform}
.image-stage img[hidden]{display:none}
.image-stage.can-pan{cursor:grab}
.image-stage.can-pan.dragging{cursor:grabbing}
.viewer-status{position:absolute;inset:0;display:grid;place-items:center;padding:20px;color:#52665c;font-size:13px;text-align:center}
.viewer-status[hidden]{display:none}
.image-controls{margin:0;gap:6px;flex-wrap:wrap;color:var(--ink);font-size:12px}
.image-controls .text-button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;min-width:36px;padding:6px 10px;border:1px solid transparent;border-radius:6px;color:#365b4b;font-size:12px;white-space:nowrap}
.image-controls .text-button:hover{background:#e2eade}
.image-controls .text-button:focus-visible{outline:2px solid var(--green);outline-offset:2px}
.image-controls .text-button[aria-pressed="true"]{background:#fff;border-color:#b7cab9}
.image-controls button:disabled{cursor:default;opacity:.4}
#zoom-in,#zoom-out{font-size:21px;line-height:1}
#zoom-label{min-width:45px;text-align:center;font-variant-numeric:tabular-nums}
.viewer-hint{margin:0;text-align:center;color:#52665c;font-size:11px;line-height:1.5}
.viewer-hint .touch-hint{display:none}
.detail-preview:fullscreen{box-sizing:border-box;background:#eff2ec;width:100%;height:100%;padding:16px;gap:10px}
.detail-preview:fullscreen .image-stage{height:auto;flex:1;min-height:0}
.detail-preview:fullscreen .image-controls{flex:none}
.detail-preview:fullscreen .viewer-hint{flex:none}
.viewer-expanded{width:calc(100vw - 16px);max-width:none;height:calc(100dvh - 16px);max-height:none}
.viewer-expanded .detail-layout{display:block;height:calc(100% - 62px)}
.viewer-expanded .detail-info{display:none}
.viewer-expanded .detail-preview{height:100%;box-sizing:border-box}
.viewer-expanded .image-stage{flex:1;height:auto;min-height:0}
@media(max-width:900px){.detail-layout{grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr)}.detail-preview{padding:12px}}
@media(max-width:640px){.detail-layout{grid-template-columns:1fr}.image-stage{height:48dvh;min-height:260px}.image-controls{gap:4px}.image-controls .text-button{min-height:44px;padding:6px 8px}.detail-preview:fullscreen{padding:8px}.detail-dialog{max-height:94dvh}}
@media(pointer:coarse){.viewer-hint .mouse-hint{display:none}.viewer-hint .touch-hint{display:inline}}
