.drawer-panel {
  background: var(--panel-bg, #050505);
  color: var(--ink, #f5f2e9);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.4);
}

.drawer-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1px solid rgba(245, 242, 233, 0.2);
  background: rgba(8, 8, 10, 0.7);
  color: #f5f2e9;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 9;
  transition: transform 200ms ease, border-color 200ms ease;
}

.drawer-close:hover {
  transform: scale(1.05);
  border-color: rgba(245, 242, 233, 0.5);
}

.drawer-scroll {
  position: relative;
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer-stage {
  position: sticky;
  top: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.drawer-spacer {
  height: 100vh;
}

.drawer-stage .video-section {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  display: block;
}

.drawer-stage .section-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.drawer-stage .video-poster {
  height: 100%;
}

.drawer-stage .poster-spacer,
.drawer-stage .poster-foreground,
.drawer-stage .poster-slice {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.drawer-stage .zoom-lens {
  z-index: 8;
}

.drawer-stage .video-ui {
  z-index: 9;
}

.drawer-stage .cutout-overlay,
.drawer-stage .cutout-controls {
  inset: 0;
}

.drawer-stage .cutout-overlay {
  width: auto;
  height: auto;
}

.cutout-root {
  position: relative;
  --ui-gap: 1.6rem;
}

.cutout-root .cutout-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: none;
}

.cutout-root.show-cutout-overlay .cutout-overlay {
  opacity: 1;
  visibility: visible;
}

.cutout-root .cutout-overlay--bg {
  z-index: 4;
}

.cutout-root .cutout-overlay--slices {
  z-index: 6;
}

.cutout-root .cutout-controls {
  position: absolute;
  inset: 0;
  padding: 0 2rem;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 7;
}

.cutout-root.show-cutout-overlay .cutout-controls {
  opacity: 1;
  visibility: visible;
}

.cutout-replay {
  z-index: 12;
  pointer-events: auto;
}

.video-section.cutout-overlay-active .video-controls-wrap,
.video-section.cutout-overlay-active .video-progress {
  opacity: 1;
  pointer-events: auto;
}

.video-section.cutout-overlay-active .video-progress {
  opacity: 0;
  pointer-events: none;
}

.video-section.is-finished .zoom-lens.is-active {
  opacity: 1;
  pointer-events: auto;
}

.cutout-root .cutout-controls .video-controls-wrap {
  position: absolute;
  right: var(--ui-gap);
  bottom: var(--ui-gap);
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.cutout-root .cutout-controls .video-controls-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.cutout-root .cutout-controls .speed-readout {
  width: 100%;
  text-align: center;
  color: #E6FD53;
  font-size: 0.65rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.cutout-root .cutout-controls .video-controls {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: 999px;
  background: #1f3ff7;
  overflow: hidden;
}

@media (max-width: 900px) {
  .drawer-close {
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
  }

  .cutout-root .cutout-controls {
    padding: 0 1rem;
  }
}

.cutout-root .cutout-controls .video-controls::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0.25rem;
  width: calc(50% - 0.25rem);
  border-radius: 999px;
  background: #E6FD53;
  transition: transform 0.25s ease;
  pointer-events: none;
}

.cutout-root .cutout-controls .video-controls.is-pause::before {
  transform: translateX(100%);
}

.cutout-root .cutout-controls .video-control {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.9rem;
  background: transparent;
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.cutout-root .cutout-controls .video-controls:not(.is-pause) .video-control:first-child,
.cutout-root .cutout-controls .video-controls:not(.is-pause) .video-control:first-child:hover {
  color: #1B263F;
}

.cutout-root .cutout-controls .video-controls.is-pause .video-control:last-child,
.cutout-root .cutout-controls .video-controls.is-pause .video-control:last-child:hover {
  color: #1B263F;
}

.cutout-root .cutout-controls .speed-control {
  border: 2px solid #E6FD53;
  background: #1f3ff7;
  color: #fff;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

.cutout-root .cutout-controls .speed-up-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cutout-root .cutout-controls .zoom-toggle {
  position: absolute;
  bottom: calc(100% + 0.2rem);
  left: 50%;
  transform: translateX(-50%);
  width: 2.9rem;
  height: 2.9rem;
  border: none;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
}

.cutout-root .cutout-controls .zoom-icon {
  width: 100%;
  height: 100%;
}

.cutout-root .cutout-controls .zoom-icon circle,
.cutout-root .cutout-controls .zoom-icon line {
  stroke: #ee4703;
  stroke-width: 3.1;
  stroke-linecap: round;
  fill: none;
}

.cutout-root .cutout-controls .zoom-check {
  stroke: #000;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cutout-root .cutout-controls .speed-up-wrap.is-checked .zoom-check {
  opacity: 1;
}

.cutout-root .cutout-controls .video-progress {
  position: absolute;
  top: var(--ui-gap);
  right: var(--ui-gap);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: #f5f5f5;
}

.cutout-root .cutout-controls .progress-circle {
  position: relative;
  width: 4.4rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
}

.cutout-root .cutout-controls .progress-svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.cutout-root .cutout-controls .progress-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 8;
}

.cutout-root .cutout-controls .progress-bar {
  fill: none;
  stroke: #1f3ff7;
  stroke-width: 8;
  stroke-linecap: round;
  transition: none;
}

.cutout-root .cutout-controls .progress-value {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

.cutout-root .cutout-controls .progress-step {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cutout-root .cutout-bg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.cutout-root .cutout-bg-image {
  position: relative;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.cutout-root .cutout-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cutout-root .cutout-bg-whitebox {
  position: absolute;
  inset: 0;
  background: #fff;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.2s linear;
}

.cutout-root .cutout-bg-vid2 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  opacity: 0;
  z-index: 3;
  transition: opacity 0.2s linear;
}

.cutout-root.show-cutout-video .cutout-overlay--bg .cutout-bg-image {
  opacity: 0;
}

.cutout-root.show-cutout-video .cutout-overlay--bg .cutout-bg-video {
  opacity: 1;
}

.cutout-root.show-cutout-video .cutout-overlay--slices {
  opacity: 0;
  visibility: hidden;
}

.cutout-root.show-cutout-overlay .cutout-bg-whitebox {
  opacity: calc(var(--cutout-scroll, 0) * 0.4);
}

.cutout-root.show-cutout-overlay .cutout-bg-vid2 {
  opacity: calc(var(--cutout-scroll, 0) * 0.4);
}

.cutout-root.show-cutout-video .cutout-bg-whitebox,
.cutout-root.show-cutout-video .cutout-bg-vid2 {
  opacity: 0;
}

.cutout-root .cutout-overlay-spacer {
  opacity: 0;
}

.cutout-root .cutout-slice {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: translate3d(0, 0, 0);
}

.cutout-root.show-cutout-overlay .cutout-slice {
  transition: transform 0.2s linear;
}

.cutout-root .cutout-slice-top {
  clip-path: inset(0 0 80% 0);
}

.cutout-root .cutout-slice-bottom {
  clip-path: polygon(0 40%, 30% 50%, 30% 100%, 0 100%);
}

.cutout-root .cutout-slice-house {
  clip-path: inset(42% 30% 15% 40%);
}

.cutout-root .cutout-slice-bill {
  clip-path: inset(50% 0% 0% 75%);
}

.cutout-root.show-cutout-overlay .cutout-slice-bottom {
  transform: translate3d(
    var(--cutout-left-x, 0%),
    var(--cutout-left-y, 0%),
    0
  );
}

.cutout-root.show-cutout-overlay .cutout-slice-house {
  transform: translate3d(
    var(--cutout-house-x, 0%),
    var(--cutout-house-y, 0%),
    0
  );
}

.cutout-root.show-cutout-overlay .cutout-slice-bill {
  transform: translate3d(
    var(--cutout-right-x, 0%),
    var(--cutout-right-y, 0%),
    0
  );
}


.drawer-panel .video-section{
  height: 100%;
  width: 100%;
}

.drawer-panel .section-video{
  width: 100%;
  height: 100%;
  object-fit: contain; /* never crop */
  display: block;
}

/* Put the remainder between background and slices */
.cutout-root .cutout-overlay--remainder {
  z-index: 5; /* bg = 4, remainder = 5, slices = 6 */
}

/* Ensure it fills the frame */
.cutout-root .cutout-remainder{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
}

/* Blur + fade the remainder as we scroll (driven by --cutout-scroll from wrapper.js) */
.cutout-root.show-cutout-overlay .cutout-remainder{
  opacity: calc(1 - var(--cutout-scroll, 0));
  filter: blur(calc(var(--cutout-scroll, 0) * 32px));
  will-change: opacity, filter;
}
