/* Public photo inspection uses the same watermarked image as the detail page. */
.detail-photo > .mw-image-open { position: relative; display: block; width: 100%; height: 100%; color: #fff; cursor: zoom-in; }
.mw-image-open > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mw-image-open:focus-visible { outline: 3px solid #2563eb; outline-offset: -4px; }
.mw-image-open-label { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 24px); padding: 9px 13px; border: 1px solid #ffffff50; border-radius: 99px; background: #10213ce8; box-shadow: 0 2px 9px #07162d30; color: #fff; font-size: 12px; font-weight: 650; line-height: 1.35; }
.mw-image-open-label .icon { width: 20px; height: 20px; flex: 0 0 auto; }
.mw-image-open:hover .mw-image-open-label { background: #1c57b2; }

body.mw-image-viewer-open { overflow: hidden; }
.mw-image-viewer { position: fixed; inset: 0; width: min(1280px, calc(100vw - 24px)); height: min(960px, calc(100vh - 24px)); height: min(960px, calc(100dvh - 24px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: hidden; color: #f8fafc; background: #0e192a; border: 1px solid #42516a; border-radius: 18px; box-shadow: 0 26px 100px #02091680; z-index: 10020; }
.mw-image-viewer:not([open]) { display: none; }
.mw-image-viewer::backdrop { background: #06101fe6; backdrop-filter: blur(4px); }
.mw-viewer-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100%; min-width: 0; }
.mw-viewer-header { grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px 10px; }
.mw-viewer-header > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 13px; min-width: 0; }
.mw-viewer-header h2 { margin: 0; color: #fff; font-size: 21px; line-height: 1.3; letter-spacing: -.025em; }
.mw-viewer-count { color: #b6c7df; font-size: 13px; white-space: nowrap; }
.mw-image-viewer .mw-viewer-button { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; min-width: 44px; min-height: 44px; margin: 0; padding: 9px 12px; border: 1px solid #455770; border-radius: 10px; color: #f8fafc; background: #1c2c43; font: inherit; font-size: 13px; font-weight: 650; line-height: 1.3; text-decoration: none; cursor: pointer; }
.mw-image-viewer .mw-viewer-button:hover:not(:disabled) { border-color: #829abe; background: #2d4566; color: #fff; }
.mw-image-viewer .mw-viewer-button:focus-visible, .mw-viewer-file-link:focus-visible { outline: 3px solid #8ec5ff; outline-offset: 3px; }
.mw-image-viewer .mw-viewer-button:disabled { opacity: .4; cursor: default; }
.mw-image-viewer .mw-viewer-button .icon { flex: 0 0 auto; width: 22px; height: 22px; }
.mw-image-viewer .mw-viewer-close { background: #243a57; }
.mw-viewer-toolbar { grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 0 16px 12px; }
.mw-viewer-zoom { display: flex; align-items: center; gap: 2px; }
.mw-viewer-percent { display: block; min-width: 62px; color: #e8f0fe; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.mw-viewer-frame { grid-row: 3; position: relative; min-width: 0; min-height: 0; overflow: hidden; border-block: 1px solid #31425a; background: #07101d; }
.mw-viewer-stage { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; overscroll-behavior: contain; outline: 0; }
.mw-viewer-stage:focus-visible { outline: 3px solid #8ec5ff; outline-offset: -5px; }
.mw-viewer-stage[data-can-pan="true"] { cursor: grab; }
.mw-viewer-stage[data-dragging="true"] { cursor: grabbing; }
.mw-viewer-image { position: absolute; top: 0; left: 0; display: block; max-width: none; max-height: none; margin: 0; padding: 0; object-fit: contain; transform-origin: 0 0; pointer-events: none; -webkit-user-drag: none; }
.mw-viewer-feedback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; color: #e8f0fe; text-align: center; pointer-events: none; }
.mw-viewer-feedback p { max-width: 32em; margin: 0; font-size: 15px; line-height: 1.6; }
.mw-viewer-feedback button { pointer-events: auto; }
.mw-viewer-footer { grid-row: 4; padding: 10px 20px 13px; text-align: center; }
.mw-viewer-paging { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 13px; }
.mw-viewer-previous .icon { transform: rotate(180deg); }
.mw-viewer-caption { min-width: 0; margin: 0; overflow: hidden; color: #eef4fe; font-size: 14px; font-weight: 550; line-height: 1.45; white-space: nowrap; text-overflow: ellipsis; }
.mw-viewer-instructions { margin: 8px 0 0; color: #afc2df; font-size: 12px; line-height: 1.5; }
.mw-viewer-file-link { display: inline-block; margin-top: 6px; color: #a8cdfd; font-size: 12px; line-height: 1.4; text-underline-offset: 3px; }
.mw-viewer-file-link:hover { color: #fff; }
.mw-viewer-keyboard-help, .mw-viewer-announcement { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.mw-image-viewer [hidden] { display: none !important; }

@media (max-width: 600px) {
    .mw-image-viewer { width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
    .mw-viewer-header { padding: max(10px, env(safe-area-inset-top)) 12px 9px; }
    .mw-viewer-header h2 { font-size: 19px; }
    .mw-viewer-header > div { gap: 2px 10px; }
    .mw-viewer-count { font-size: 12px; }
    .mw-viewer-toolbar { gap: 6px; padding: 0 9px 10px; }
    .mw-image-viewer .mw-viewer-button { padding-inline: 10px; font-size: 12px; }
    .mw-viewer-percent { min-width: 51px; }
    .mw-viewer-fit { gap: 6px !important; }
    .mw-image-viewer .mw-viewer-fit .icon { width: 18px; height: 18px; }
    .mw-viewer-footer { padding: 8px 12px max(10px, env(safe-area-inset-bottom)); }
    .mw-viewer-paging { gap: 9px; }
    .mw-viewer-caption { font-size: 13px; }
    .mw-viewer-instructions { margin-top: 6px; font-size: 11px; }
}
@media (max-height: 520px) and (orientation: landscape) {
    .mw-image-viewer { width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
    .mw-viewer-header { padding: 6px 12px; }
    .mw-viewer-header h2 { font-size: 16px; }
    .mw-viewer-header > div { display: block; }
    .mw-viewer-footer { padding: 5px 12px; }
    .mw-viewer-instructions, .mw-viewer-file-link { display: none; }
}
@media (max-height: 520px) and (orientation: landscape) and (min-width: 760px) {
    .mw-viewer-toolbar { position: absolute; inset: 6px 65px auto auto; z-index: 2; max-width: calc(100% - 300px); padding: 0; }
}
@media print {
    .mw-image-viewer, .mw-image-open-label { display: none !important; }
}
