/* Keep browsing native; only the explicit crop canvas captures gestures. */
.report-attachment-preview{
  position:fixed;inset:0;z-index:2000;width:100%;height:100dvh;overflow:hidden;
  grid-template-areas:"heading" "versions" "image" "tools" "crop" "paging";
  grid-template-rows:auto auto minmax(0,1fr) auto auto auto;background:#edf2f0;
}
.report-attachment-preview>header{grid-area:heading;min-height:calc(52px + env(safe-area-inset-top));box-shadow:none;border-bottom:1px solid #edf2ef}
.report-attachment-preview>header button{width:40px;height:40px}
.report-attachment-preview>header strong{font-size:14px}
.report-attachment-preview-mode{grid-area:versions;display:grid;grid-template-columns:72px 72px 1fr;align-items:center;padding:8px 12px;gap:6px}
.report-attachment-preview-mode button{min-height:36px;font-size:12px;border-radius:10px}
.report-attachment-preview-mode small{text-align:right;font-size:11px;color:#80938a}
.report-attachment-preview-stage{grid-area:image;display:block;overflow:auto;min-width:0;touch-action:pan-x pan-y pinch-zoom;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:12px;scrollbar-gutter:stable;background:#e7eeeb}
.report-attachment-preview-stage:not(.is-cropping) img{position:static;width:100%;height:auto;max-height:none;max-width:100%;margin:0 auto;border-radius:4px;box-shadow:0 3px 16px #143e3020;object-fit:contain;touch-action:pan-x pan-y pinch-zoom}
.report-attachment-preview-stage.is-cropping{padding:0;overflow:hidden;touch-action:none}
.report-attachment-preview-loading{padding:32px 0}
.report-attachment-preview .report-page-edit-tools{grid-area:tools;display:grid;grid-template-columns:minmax(100px,1.3fr) repeat(3,minmax(0,1fr));gap:6px;padding:12px 10px 8px;border-top:1px solid #d9e6df;background:white}
.report-attachment-preview .report-page-edit-tools label{display:block;font-size:0;min-width:0}
.report-attachment-preview #report-page-edit-status{grid-column:1/-1;margin:0 0 4px;font-size:12px;color:#087e5f}
.report-attachment-preview .report-page-edit-tools select{width:100%;height:44px;font-size:12px;padding:6px;border-radius:10px}
.report-attachment-preview .report-page-edit-tools button{font-size:12px;white-space:nowrap;padding:6px 3px;border-radius:10px}
.report-attachment-preview .report-page-edit-tools button:disabled{opacity:.4}
.report-attachment-preview>.report-attachment-crop-toolbar{grid-area:crop}
.report-attachment-preview>footer{grid-area:paging;min-height:calc(52px + env(safe-area-inset-bottom));padding:4px 12px calc(8px + env(safe-area-inset-bottom));box-shadow:none;grid-template-columns:76px 1fr 76px}
.report-attachment-preview>footer button{min-height:40px;background:#f1f7f4;font-size:12px}
.report-attachment-preview>footer span{font-size:12px}
body:has(#report-attachment-preview:not([hidden])) .cx-quick-nav-root{visibility:hidden;pointer-events:none}
@media(min-width:768px){
  .report-attachment-preview-stage:not(.is-cropping) img{max-width:860px}
  .report-attachment-preview .report-page-edit-tools{padding:12px max(16px,calc((100vw - 680px)/2));grid-template-columns:1.3fr repeat(3,1fr)}
}
