/* Shared image viewer: fit, inspect the approved original, and pan without upscaling. */
html.ldd-image-viewer-root-open,
body.ldd-image-viewer-open { overflow: hidden; }
body.ldd-image-viewer-open { overscroll-behavior: none; }
img[data-image-zoom-auto] { cursor: zoom-in; }
img[data-image-zoom-auto]:focus-visible { outline: 3px solid #b27a18; outline-offset: 4px; }
.ldd-image-viewer {
  width: min(1440px, calc(100vw - 28px));
  height: min(94dvh, 1040px);
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px);
  padding: 0;
  margin: auto;
  border: 1px solid #bba471;
  border-radius: 14px;
  background: #fbf7ef;
  color: #0b3539;
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 24px 90px #031e2870;
}
.ldd-image-viewer[open] { display: flex; flex-direction: column; }
.ldd-image-viewer::backdrop { background: #052d34da; backdrop-filter: blur(5px); }
.ldd-image-viewer *, .ldd-image-viewer *::before, .ldd-image-viewer *::after { box-sizing: border-box; }
.ldd-image-viewer [hidden] { display: none !important; }
.ldd-iv-header {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 18px;
  padding: 16px 20px 12px;
  background: #fbf7ef;
}
.ldd-iv-header > div { min-width: 0; }
.ldd-image-viewer .ldd-iv-eyebrow { margin: 0 0 4px; font-size: 9px; line-height: 1.5; text-transform: uppercase; letter-spacing: .12em; color: #55716c; }
.ldd-image-viewer #ldd-iv-title { margin: 0; font-family: "Dream Serif", Georgia, serif; font-size: 25px; font-weight: 400; line-height: 1.15; letter-spacing: -.025em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ldd-iv-toolbar { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 10px; padding: 10px 20px 13px; border-top: 1px solid #d7decf; background: #f2f4e9; }
.ldd-image-viewer button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0; border: 1px solid #a5bbb3; background: #fffdf8; color: #0b3539; font-family: Arial, Helvetica, sans-serif; line-height: 1.4; cursor: pointer; transition: background .15s, border-color .15s; }
.ldd-image-viewer button:hover:not(:disabled) { background: #dfefea; border-color: #006d70; }
.ldd-image-viewer button:disabled { opacity: .42; cursor: not-allowed; }
.ldd-image-viewer button:focus-visible, .ldd-iv-range:focus-visible, .ldd-iv-stage:focus-visible { outline: 3px solid #b27a18; outline-offset: 3px; }
.ldd-iv-icon-button { flex: 0 0 44px; width: 44px; height: 44px; padding: 10px; border-radius: 50%; }
.ldd-image-viewer .ldd-iv-close { margin-left: auto; border-color: transparent; background: transparent; }
.ldd-iv-icon-button svg { display: block; width: 22px; height: 22px; }
.ldd-iv-size-buttons { display: flex; align-items: center; gap: 8px; }
.ldd-iv-text-button { padding: 10px 16px; border-radius: 24px; font-size: 12px; white-space: nowrap; }
.ldd-image-viewer .ldd-iv-text-button[aria-pressed="true"] { background: #0b3539; border-color: #0b3539; color: #fffdf1; }
.ldd-image-viewer .ldd-iv-text-button[aria-pressed="true"]:hover:not(:disabled) { background: #006d70; }
.ldd-iv-range-label { display: flex; align-items: center; gap: 10px; width: min(360px, 34vw); min-width: 160px; font-size: 11px; line-height: 1.5; }
.ldd-iv-range { display: block; flex: 1; min-width: 0; min-height: 36px; padding: 0; accent-color: #006d70; cursor: pointer; }
.ldd-iv-range:disabled { opacity: .45; cursor: not-allowed; }
.ldd-iv-amount { width: 42px; flex: 0 0 42px; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; color: #0b3539; }
.ldd-iv-stage {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 140px;
  width: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #164b4b, #082e35 78%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: auto;
  overscroll-behavior: contain;
}
.ldd-iv-stage.ldd-iv-can-pan { cursor: grab; touch-action: pinch-zoom; }
.ldd-iv-stage.ldd-iv-panning { cursor: grabbing; }
.ldd-image-viewer .ldd-iv-image { position: absolute; left: 50%; top: 50%; display: block; width: auto; height: auto; max-width: none; max-height: none; margin: 0; object-fit: contain; transform-origin: center; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
.ldd-image-viewer .ldd-iv-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 25px; margin: 0; text-align: center; color: #fff8e8; font-size: 14px; line-height: 1.7; }
.ldd-iv-footer { flex: 0 0 auto; padding: 12px 20px 14px; border-top: 1px solid #d7decf; background: #fbf7ef; }
.ldd-image-viewer .ldd-iv-help, .ldd-image-viewer .ldd-iv-resolution, .ldd-image-viewer .ldd-iv-status { padding: 0; margin: 0; font-size: 11px; line-height: 1.6; color: #42605b; }
.ldd-image-viewer .ldd-iv-resolution { margin-top: 4px; color: #0b3539; }
.ldd-image-viewer .ldd-iv-status { margin-top: 3px; min-height: 17px; color: #46635e; }

@media (max-width: 700px) {
  .ldd-image-viewer { width: calc(100vw - 16px); height: 95dvh; border-radius: 10px; }
  .ldd-iv-header { padding: 12px 14px 10px; gap: 12px; }
  .ldd-image-viewer #ldd-iv-title { font-size: 22px; }
  .ldd-iv-toolbar { gap: 8px; flex-wrap: wrap; padding: 8px 12px 10px; }
  .ldd-iv-range-label { width: auto; min-width: 125px; flex: 1 1 125px; gap: 7px; }
  .ldd-iv-range-label > span { font-size: 10px; }
  .ldd-iv-amount { flex-basis: 35px; width: 35px; font-size: 11px; }
  .ldd-iv-size-buttons { flex: 0 0 100%; justify-content: center; gap: 10px; }
  .ldd-iv-text-button { min-width: 100px; padding: 10px 16px; }
  .ldd-iv-footer { padding: 10px 14px 12px; }
  .ldd-image-viewer .ldd-iv-help, .ldd-image-viewer .ldd-iv-resolution, .ldd-image-viewer .ldd-iv-status { font-size: 10px; }
}
@media (max-height: 500px) {
  .ldd-image-viewer { height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); overflow-y: auto; }
  .ldd-iv-header { position: sticky; top: 0; padding-top: 8px; padding-bottom: 8px; }
  .ldd-image-viewer #ldd-iv-title { font-size: 18px; -webkit-line-clamp: 1; }
  .ldd-iv-eyebrow { display: none; }
  .ldd-iv-toolbar { padding-top: 7px; padding-bottom: 7px; }
  .ldd-iv-stage { flex: 1 0 120px; min-height: 120px; }
  .ldd-iv-footer { padding-top: 7px; padding-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .ldd-image-viewer *, .ldd-image-viewer *::before, .ldd-image-viewer *::after { animation: none !important; transition: none !important; }
}
