.rz-lb, .rz-lb * { box-sizing: border-box; }
.rz-lb { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; direction: ltr; background: rgba(8,10,16,.88); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); -webkit-tap-highlight-color: transparent; }
.rz-lb.rz-open { display: flex; animation: rzFade .2s ease-out; }
html.rz-lb-lock, html.rz-lb-lock body { overflow: hidden !important; }

.rz-lb-box { position: relative; display: flex; flex-direction: column; width: 90%; max-width: 1400px; height: calc(100vh - 20px); height: calc(100dvh - 20px); background: #0f1117; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.55); animation: rzPop .22s ease-out; }
.rz-lb-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.rz-lb-stage.rz-zoomed { cursor: grab; }
.rz-lb-stage.rz-zoomed:active { cursor: grabbing; }
.rz-lb-content { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform-origin: 50% 50%; will-change: transform; }
.rz-lb-content.rz-anim { transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.rz-lb .rz-lb-img { display: block; max-width: none !important; max-height: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; pointer-events: none; user-select: none; -webkit-user-drag: none; opacity: 0; transition: opacity .2s; }
.rz-lb .rz-lb-img.rz-ready { opacity: 1; }

.rz-lb .rz-lb-btn { appearance: none; -webkit-appearance: none; display: flex !important; align-items: center; justify-content: center; width: 44px !important; height: 44px !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important; background: rgba(20,24,34,.72) !important; color: #fff !important; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.35) !important; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); outline: 0; touch-action: manipulation; transition: background .15s, transform .15s, opacity .15s; }
.rz-lb .rz-lb-btn:active { transform: scale(.92); }
.rz-lb .rz-lb-btn[disabled] { opacity: .35; cursor: default; }
@media (hover: hover) { .rz-lb .rz-lb-btn:not([disabled]):hover { background: rgba(255,255,255,.22) !important; } }

.rz-lb-close { position: absolute; top: 10px; right: 10px; z-index: 5; }
.rz-lb-nav { position: absolute; top: 50%; margin-top: -22px !important; z-index: 4; }
.rz-lb-prev { left: 10px; }
.rz-lb-next { right: 10px; }
.rz-lb.rz-single .rz-lb-nav, .rz-lb.rz-single .rz-lb-count { display: none !important; }

.rz-lb-bar { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #0b0d12; }
.rz-lb .rz-lb-tool { width: 40px !important; height: 40px !important; }
.rz-lb-count { min-width: 64px; text-align: center; color: #fff; font: 600 13px/1 sans-serif; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.08); }

.rz-lb-loader { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: rzSpin .8s linear infinite; display: none; pointer-events: none; }
.rz-lb-err { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: #fca5a5; font: 600 14px/1.6 sans-serif; direction: rtl; }
.rz-lb-err[style*="block"] { display: flex !important; }

@media (max-width: 480px) {
    .rz-lb-box { height: calc(100dvh - 12px); border-radius: 12px; }
    .rz-lb .rz-lb-nav { width: 38px !important; height: 38px !important; margin-top: -19px !important; }
}
@keyframes rzFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rzPop { from { opacity: 0; transform: scale(.97) } to { opacity: 1; transform: none } }
@keyframes rzSpin { to { transform: rotate(360deg) } }