#lbvOverlay{
  position:fixed!important; inset:0;
  background:rgba(0,0,0,.92);
  display:flex; align-items:center; justify-content:center;
  z-index:2147483647; isolation:isolate;
  pointer-events:none; opacity:0; visibility:hidden;
  transition:opacity .22s ease, visibility .22s ease;
}
#lbvOverlay.lbv-open{opacity:1; visibility:visible; pointer-events:auto}

#lbvOverlay .lbv-modal{
  position:relative; width:100vw; height:100vh; background:#000;
  border-radius:0; overflow:hidden; box-shadow:none;
  transform-origin:center center;
  opacity:1;
  will-change:transform,opacity;
  z-index:1;
}

#lbvOverlay.tv-in .lbv-modal{animation:tvOn .42s cubic-bezier(.2,.9,.2,1) both}
#lbvOverlay.tv-out .lbv-modal{animation:tvOff .38s cubic-bezier(.4,0,.6,1) both}

@keyframes tvOn{
  0%{transform:scaleY(.02) scaleX(1.05);opacity:0}
  35%{transform:scaleY(.02) scaleX(1.02);opacity:1}
  70%{transform:scaleY(1.02) scaleX(1.01);opacity:1}
  100%{transform:scaleY(1) scaleX(1);opacity:1}
}
@keyframes tvOff{
  0%{transform:scaleY(1) scaleX(1);opacity:1}
  40%{transform:scaleY(.06) scaleX(1.02);opacity:1}
  100%{transform:scaleY(.01) scaleX(.2);opacity:0}
}

#lbvOverlay .lbv-modal video{
  width:100%; height:100%; display:block; background:#000; object-fit:contain;
}

/* Botão fora do modal (fix iPhone/Safari) */
#lbvOverlay .lbv-close{
  position:fixed;
  top:calc(env(safe-area-inset-top, 0px) + 14px);
  right:calc(env(safe-area-inset-right, 0px) + 12px);
  width:48px; height:48px;
  background:transparent; border:0;
  color:#fff; font-size:44px; line-height:44px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  z-index:2147483648;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  opacity:.96;
  text-shadow:0 6px 22px rgba(0,0,0,.75);
  padding:0;
  margin:0;
  appearance:none;
  -webkit-appearance:none;
}
#lbvOverlay .lbv-close:hover{opacity:1}

@media (max-width:480px){
  #lbvOverlay .lbv-close{
    top:calc(env(safe-area-inset-top, 0px) + 10px);
    right:calc(env(safe-area-inset-right, 0px) + 8px);
    width:50px; height:50px;
    font-size:46px; line-height:46px;
  }
}

@media (max-width:768px){
  #lbvOverlay.tv-in .lbv-modal{animation:fadeIn .20s ease both}
  #lbvOverlay.tv-out .lbv-modal{animation:fadeOut .18s ease both}
  @keyframes fadeIn{from{opacity:0;transform:scale(.99)}to{opacity:1;transform:scale(1)}}
  @keyframes fadeOut{from{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.99)}}
}

body.lbv-lock{overflow:hidden}