body.sg-rv-open { overflow: hidden; }

.sg-rv {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
}
.sg-rv[hidden] { display: none; }
.sg-rv__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 8, 0.82);
}
.sg-rv__dialog {
  position: relative;
  z-index: 1;
  width: min(1200px, 100vw);
  height: min(100vh, 100dvh);
  display: grid;
  grid-template-rows: auto 1fr;
}
.sg-rv__title {
  position: absolute;
  left: 20px;
  bottom: 20px;
  color: #fff;
  font-size: 14px;
  pointer-events: none;
}
.sg-rv__float {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(20, 20, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}
.sg-rv__float button,
.sg-rv__float a {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.sg-rv__float button:hover,
.sg-rv__float a:hover { background: rgba(255, 255, 255, 0.08); }
.sg-rv__stage {
  overflow: hidden;
  display: grid;
  place-items: center;
  touch-action: none;
  cursor: grab;
}
.sg-rv__stage.is-panning { cursor: grabbing; }
.sg-rv__stage img,
.sg-rv__stage video {
  max-width: min(92vw, 1100px);
  max-height: calc(100vh - 120px);
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}
.sg-rv__stage video { width: min(960px, 92vw); }

@media (max-width: 640px) {
  .sg-rv__float {
    left: 12px;
    right: 12px;
    transform: none;
    justify-content: center;
    flex-wrap: wrap;
  }
}
