.vg3d {
  --vg3d-height: 650px;
  --vg3d-title-color: #f7f5f0;
  --vg3d-title-size: 96px;
  position: relative;
  isolation: isolate;
  width: 100vw;
  height: clamp(460px, 44vw, 700px);
  min-height: 0;
  margin-left: 50%;
  overflow: hidden;
  background: transparent;
  color: #fff;
  transform: translateX(-50%);
}

.vg3d__title {
  display: none;
  z-index: 0;
  top: 6%;
  left: 50%;
  width: min(94%, 1500px);
  margin: 0;
  color: var(--vg3d-title-color);
  font: inherit;
  font-size: clamp(42px, var(--vg3d-title-size), 180px);
  font-weight: 700;
  line-height: .82;
  letter-spacing: -.065em;
  text-align: center;
  text-wrap: balance;
  opacity: .96;
  pointer-events: none;
  transform: translateX(-50%);
}

.vg3d__stage,
.vg3d__viewport,
.vg3d__ring {
  width: 100%;
  height: 100%;
}

.vg3d__stage {
  position: relative;
  z-index: 1;
}

.vg3d__wordmark {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 0;
  bottom: auto;
  left: 0;
  margin: 0;
  color: #fff;
  font-family: 'Bebas Neue', Bebas, Impact, sans-serif;
  font-size: clamp(90px, 20vw, 420px);
  font-weight: 700;
  line-height: .72;
  letter-spacing: .045em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}

.vg3d__wordmark span { display: inline-block; }

.vg3d__viewport {
  position: relative;
  overflow: visible !important;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.vg3d__viewport.is-dragging {
  cursor: grabbing;
}

.vg3d__ring {
  position: relative;
  transform-style: flat;
}

.vg3d__card {
  position: absolute !important;
  top: 54% !important;
  left: 50% !important;
  width: clamp(260px, 42vw, 720px) !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 18px;
  background: #111 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  backface-visibility: visible;
  transform-style: preserve-3d;
  transform-origin: center center;
  -webkit-tap-highlight-color: transparent;
  transition: filter 160ms linear, opacity 160ms linear, box-shadow 160ms linear;
  will-change: transform, filter, opacity;
}

.vg3d__card:hover,
.vg3d__card:focus-visible {
  filter: brightness(1.12) !important;
  outline: 2px solid rgba(255, 255, 255, .9);
  outline-offset: 4px;
}

.vg3d__card img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: scale(1.01);
  pointer-events: none;
}

.vg3d__card::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(180deg, rgba(0, 0, 0, .02), rgba(0, 0, 0, .28));
  pointer-events: none;
}

.vg3d__play {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  display: grid;
  width: clamp(40px, 4.2vw, 60px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: rgba(10, 10, 10, .2);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

.vg3d__play span {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #fff;
}

.vg3d__arrow {
  position: absolute !important;
  z-index: 5;
  top: 55%;
  display: grid;
  width: 46px;
  height: 46px;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .4) !important;
  border-radius: 50% !important;
  background: rgba(10, 10, 12, .28) !important;
  box-shadow: none !important;
  color: #fff;
  cursor: pointer;
  opacity: .85;
  transform: translateY(-50%);
  transition: background .18s ease, opacity .18s ease, transform .18s ease;
  backdrop-filter: blur(4px);
}

.vg3d__arrow:hover,
.vg3d__arrow:focus-visible {
  background: rgba(0, 0, 0, .22) !important;
  opacity: 1;
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.vg3d__arrow--prev { left: clamp(12px, 3vw, 48px); }
.vg3d__arrow--next { right: clamp(12px, 3vw, 48px); }

.vg3d__modal {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(0, 0, 0, .88);
}

.vg3d__modal[hidden] { display: none; }

.vg3d__modal-content {
  position: relative;
  width: min(1100px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 24px 90px rgba(0, 0, 0, .55);
}

.vg3d__player,
.vg3d__player iframe {
  width: 100%;
  height: 100%;
}

.vg3d__player iframe {
  display: block;
  border: 0;
}

.vg3d__close {
  position: absolute;
  z-index: 1;
  top: -14px;
  right: -14px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0 0 3px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 50%;
  background: #161616;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.vg3d__notice {
  padding: 12px 16px;
  border-left: 4px solid #d63638;
  background: #fff8f8;
  color: #1d2327;
}

@media (max-width: 700px) {
  .vg3d {
    min-height: 0;
    height: clamp(430px, 110vw, 560px);
  }

  .vg3d__title {
    top: 15%;
    width: 94%;
    font-size: clamp(38px, 14vw, 70px);
    line-height: .9;
  }

  .vg3d__card {
    top: 55%;
    width: clamp(190px, 72vw, 340px) !important;
  }

  .vg3d__arrow {
    top: 58%;
    width: 38px;
    height: 38px;
  }

  .vg3d__wordmark {
    top: 50%;
    bottom: auto;
    font-size: clamp(76px, 22vw, 150px);
  }

  .vg3d__modal { padding: 16px; }
  .vg3d__close { top: -12px; right: -7px; }
}

@media (prefers-reduced-motion: reduce) {
  .vg3d__card,
  .vg3d__arrow { transition: none; }
}
