#source-image-zoom {
  width: min(1800px,calc(100vw - 24px));
  height: min(1200px,calc(100dvh - 24px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  background: #fff;
  color: #071d35;
  overflow: hidden;
  font-family: var(--font-primary);
}
#source-image-zoom[open] { display: grid; grid-template-rows: auto minmax(0,1fr); }
#source-image-zoom::backdrop { background: rgba(2,17,32,.86); }
#source-image-zoom .source-zoom-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #d8e2ea; }
#source-image-zoom h2 { color: #071d35; font: 600 18px/1.4 var(--font-primary); margin: 0; letter-spacing: 0; }
#source-image-zoom .source-zoom-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
#source-image-zoom button { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; padding: 0; border: 1px solid #d8e2ea; border-radius: 6px; background: #f2f7fb; color: #003d73; font: 600 14px/1 var(--font-primary); }
#source-image-zoom button:hover { border-color: #0078c8; background: #e3f1fa; }
#source-image-zoom button:disabled { opacity: .4; }
#source-image-zoom button img { display: block; width: 22px; height: 22px; }
#source-image-zoom output { width: 54px; text-align: center; color: #24415f; font: 500 14px/1.4 var(--font-primary); }
#source-image-zoom :focus-visible { outline: 3px solid #0078c8; outline-offset: -3px; }
#source-image-zoom .source-zoom-stage { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 24px; background: #eaf0f5; touch-action: pan-x pan-y pinch-zoom; cursor: grab; }
#source-image-zoom .source-zoom-stage.is-dragging { cursor: grabbing; }
#source-image-zoom .source-zoom-canvas { display: grid; place-items: center; width: max-content; min-width: 100%; min-height: 100%; }
#source-image-zoom .source-zoom-image { display: block; width: auto; max-width: none; height: auto; background: #fff; user-select: none; -webkit-user-drag: none; }
#source-image-zoom[aria-busy="true"] .source-zoom-image { visibility: hidden; }
@media (max-width: 600px) {
  #source-image-zoom { width: calc(100vw - 16px); height: calc(100dvh - 16px); }
  #source-image-zoom .source-zoom-toolbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
  #source-image-zoom h2 { font-size: 16px; }
  #source-image-zoom .source-zoom-controls { justify-content: space-between; }
  #source-image-zoom button { width: 38px; height: 38px; flex-basis: 38px; }
  #source-image-zoom output { width: 48px; }
  #source-image-zoom .source-zoom-stage { padding: 12px; }
}
