/* Android 1.0.4 already reserves the system bars outside the WebView. */
.native-viewport-insets{--fm-safe-top:0px;--fm-safe-bottom:0px;--fm-safe-left:0px;--fm-safe-right:0px}
.topbar{height:auto;min-height:68px;padding:calc(8px + var(--fm-safe-top,env(safe-area-inset-top))) 18px 8px}
.topbar .brand{min-width:0;gap:12px}
.topbar .logo-shell{display:flex;align-items:center;justify-content:center;flex:0 0 48px;width:48px;height:48px;padding:3px;overflow:hidden;border-radius:10px}
.topbar .logo-shell img{width:100%;height:100%;min-width:0;min-height:0;object-fit:contain}
.topbar .brand strong{font-size:16px;line-height:1.25}
.topbar .brand small{font-size:12px;line-height:1.3}
.photo-viewer .viewer-stage{position:relative;display:block;overflow:hidden;min-height:0;height:48dvh}
.photo-viewer .viewer-stage img,.photo-viewer .viewer-stage video{position:absolute;inset:0;display:block;width:100%;height:100%;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain}
#viewerImage{cursor:zoom-in}
#imageFullscreen{position:fixed;inset:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;background:#000;overflow:hidden;cursor:zoom-out}
#imageFullscreen::backdrop{background:#000}
#fullscreenImage{position:absolute;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain}
@media(min-width:800px){.photo-viewer .viewer-stage{height:60dvh}}
@media(orientation:landscape) and (max-height:600px){.photo-viewer .viewer-stage{height:55dvh}}

#viewerImage,#imageFullscreen{touch-action:pan-y pinch-zoom;user-select:none;-webkit-user-select:none}
