*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

#viewer {
  position: relative;
  width: calc(100% - 32px);
  height: 300px;
  overflow: hidden;
  background-color: white;
  cursor: pointer;
  border-radius: 16px;
  margin: 16px 16px 0 16px;
}

#viewer:fullscreen,
#viewer:-webkit-full-screen {
  width: 100%;
  height: 100%;
  cursor: default;
}

#close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 16px 24px;
  border-radius: 16px;
  white-space: nowrap;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  z-index: 10;
}

.slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.slide .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--bg-scale, 2));
  filter: blur(var(--bg-blur, 20px));
}

.slide .fg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--fit, contain);
  display: block;
  z-index: 1;
}

#slide-title {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 16px 32px;
  border-radius: 16px;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 10;
}
