* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #fff;
}

.scene {
  position: absolute;
  left: 50%;
  top: 50%;
  width: max(100vw, 150vh);
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -50%);
}

.scene-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.artwork,
.control {
  position: absolute;
  transform: translate(-50%, -50%);
}

.artwork {
  width: 16.9%;
  height: 27.6%;
  overflow: hidden;
  border: 0.18vw solid #111;
  background:
    linear-gradient(135deg, #ffffff 0%, #f5f5f3 48%, #e9e9e6 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 0 34px rgba(0, 0, 0, 0.08);
}

.artwork img,
.artwork iframe {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.artwork iframe {
  background: #fff;
  pointer-events: none;
}

.artwork img[hidden],
.artwork iframe[hidden] {
  display: none;
}

.artwork-left {
  left: 22.6%;
  top: 35.5%;
}

.artwork-center {
  left: 49.8%;
  top: 35.5%;
}

.artwork-right {
  left: 77.1%;
  top: 35.5%;
}

.control {
  width: 14.6%;
  height: 6.4%;
  border: 0;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}

.control:hover,
.control:focus-visible {
  outline: 1px solid rgba(204, 236, 255, 0.95);
  outline-offset: 2px;
}

.control-left {
  left: 22.8%;
  top: 55.2%;
}

.control-center {
  left: 49.8%;
  top: 55.2%;
}

.control-right {
  left: 77.1%;
  top: 55.2%;
}

@media (max-aspect-ratio: 3 / 2) {
  .scene {
    width: auto;
    height: 100vh;
  }
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.94);
}

.viewer[hidden] {
  display: none;
}

.viewer-frame {
  width: min(1120px, 94vw);
  height: min(760px, 84vh);
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid #d9d9d6;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
}

.viewer-frame img,
.viewer-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.viewer-close {
  position: fixed;
  right: 24px;
  top: 24px;
  width: 46px;
  height: 46px;
  border: 1px solid #cfcfca;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font: 400 28px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}
