* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; background: #0d100f; color: #fff; font-family: system-ui, sans-serif; }
.ui-viewer { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: center; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; touch-action: pan-y pinch-zoom; }
.ui-viewer img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.ui-viewer-arrow { position: fixed; z-index: 1; top: 50%; display: grid; place-items: center; width: 48px; height: 56px; border: 1px solid #ffffff40; border-radius: 50px; background: #0b1712c9; color: #fff; font-size: 40px; font-weight: 300; line-height: 1; text-decoration: none; transform: translateY(-50%); transition: background-color .2s; }
.ui-viewer-arrow:hover { background: #0c5e50ed; }
.ui-viewer-arrow:focus-visible { outline: 3px solid #f5b544; outline-offset: 4px; }
.ui-viewer-prev { left: max(12px, env(safe-area-inset-left)); }
.ui-viewer-next { right: max(12px, env(safe-area-inset-right)); }
.ui-viewer-caption { position: fixed; bottom: max(12px, env(safe-area-inset-bottom)); left: 50%; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 9px 15px; border: 1px solid #ffffff26; border-radius: 50px; background: #0b1712dc; font-size: 12px; line-height: 1.5; transform: translateX(-50%); pointer-events: none; }
.ui-viewer-caption > span:first-child { white-space: nowrap; color: #b8d1c5; font-variant-numeric: tabular-nums; }
.ui-viewer-caption > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-viewer-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 575px) { .ui-viewer-arrow { width: 40px; height: 48px; font-size: 34px; } .ui-viewer-prev { left: 8px; } .ui-viewer-next { right: 8px; } .ui-viewer-caption { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .ui-viewer-arrow { transition: none; } }
