.photo-viewer{box-sizing:border-box;width:min(1200px,calc(100vw - 24px));height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);padding:12px;overflow:auto}
.photo-tools{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.photo-tools button,.photo-original{border:1px solid #ffffff50;background:#ffffff18;color:#fff;border-radius:8px;min-width:40px;min-height:40px;padding:7px 12px;font:inherit;cursor:pointer;text-decoration:none}
.photo-tools button:disabled{opacity:.4;cursor:default}.photo-tools .photo-viewer-close{position:static;margin-left:auto;font-size:26px;line-height:1}
.photo-tools button:hover:not(:disabled),.photo-original:hover{background:#ffffff30}.zoom-level{min-width:42px;font-size:14px}
.photo-stage{position:relative;height:calc(100dvh - 200px);min-height:100px;overflow:hidden;background:#0b241d;border-radius:8px;touch-action:none;user-select:none;cursor:zoom-in;outline-offset:-3px}
.photo-viewer .photo-stage img{position:absolute;left:50%;top:50%;display:block;margin:0;max-width:none;max-height:none;object-fit:fill;transform-origin:center;pointer-events:none;border-radius:0}
.photo-stage.is-zoomed{cursor:grab}.photo-stage.is-dragging{cursor:grabbing}.photo-zoom-help{font-size:12px;line-height:1.5;margin:8px 0 0;color:#e0ece6}.photo-viewer figcaption{margin-top:8px;overflow-wrap:anywhere}
@media(max-width:520px){.photo-viewer{padding:8px;width:calc(100vw - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px)}.photo-tools{gap:5px}.photo-tools button,.photo-original{font-size:12px;padding:6px 8px;min-width:34px;min-height:36px}.photo-stage{height:calc(100dvh - 220px)}}
.photo-viewer,.photo-tools button{font-family:"Noto Sans",sans-serif}
.photo-viewer .photo-stage img{visibility:hidden}
.photo-load-error{position:absolute;inset:0;display:grid;place-items:center;margin:0;padding:12px}.photo-load-error[hidden]{display:none}
