/* Product theater motion proof: one editorial creator, with the cast in depth. */
#product-theater .wpanel--fan {
  min-height: 548px;
  padding: 8px 24px 18px;
  grid-template-columns: minmax(210px, .78fr) minmax(440px, 1.7fr) minmax(220px, .82fr);
  grid-template-rows: 1fr auto;
  column-gap: clamp(18px, 2.6vw, 38px);
  row-gap: 8px;
  perspective: 1100px;
}

#product-theater .wpanel--fan .wcol {
  min-height: 0;
}

#product-theater .creator-profile {
  align-self: center;
  padding-left: clamp(0px, 1.2vw, 16px);
}

#product-theater .creator-profile .wname {
  margin-top: 10px;
  font-size: clamp(34px, 3vw, 46px);
}

#product-theater .creator-profile .body {
  max-width: 28ch;
}

#product-theater .fanstack {
  --w: clamp(300px, 66cqw, 320px);
  height: min(540px, calc(var(--w) * 1.667));
  width: 100%;
  align-self: center;
  perspective: 1050px;
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  isolation: isolate;
}

#product-theater .fanstack.is-dragging { cursor: grabbing; }

#product-theater .fs__it {
  top: 50%;
  aspect-ratio: 3 / 5;
  background: #dedbd5;
  transform:
    translate(-50%, -50%)
    translate3d(calc(var(--x) + var(--drag-x, 0px) + var(--parallax-x, 0px)), calc(var(--y, 0px) + var(--parallax-y, 0px)), var(--z, 0px))
    rotateY(calc(var(--ry, 0deg) + var(--parallax-ry, 0deg)))
    rotate(var(--rot))
    scale(var(--sc));
  transform-style: preserve-3d;
  transform-origin: 50% 78%;
  transition:
    transform 600ms cubic-bezier(.2,.78,.18,1),
    opacity 600ms cubic-bezier(.2,.78,.18,1),
    filter 600ms cubic-bezier(.2,.78,.18,1),
    box-shadow 600ms cubic-bezier(.2,.78,.18,1);
  will-change: transform;
}

#product-theater .fanstack.is-dragging .fs__it {
  transition-duration: 90ms;
  transition-timing-function: linear;
}

#product-theater .creator-video,
#product-theater .creator-poster {
  object-fit: cover;
  object-position: 50% 20%;
  transform: none;
  transition: opacity 180ms ease, filter 600ms cubic-bezier(.2,.78,.18,1);
}

#product-theater .fs__it[data-position="center"] {
  --sc: 1;
  --y: 0px;
  --z: 24px;
  opacity: 1;
  z-index: 5;
  box-shadow: 0 26px 62px -28px rgba(20, 17, 14, .38);
}

#product-theater .fs__it[data-position="left-1"],
#product-theater .fs__it[data-position="right-1"] {
  --sc: .75;
  --y: 10px;
  --z: -72px;
  opacity: .76;
  z-index: 3;
  filter: saturate(.78) contrast(.96);
  box-shadow: 0 20px 42px -26px rgba(20, 17, 14, .38);
}

#product-theater .fs__it[data-position="left-1"] { --ry: 5deg; }
#product-theater .fs__it[data-position="right-1"] { --ry: -5deg; }

#product-theater .fs__it[data-position="left-2"],
#product-theater .fs__it[data-position="right-2"] {
  --sc: .62;
  --y: 18px;
  --z: -150px;
  opacity: .12;
  z-index: 1;
  filter: saturate(.55);
  pointer-events: none;
}

#product-theater .fs__it[data-position="left-1"] .creator-video,
#product-theater .fs__it[data-position="right-1"] .creator-video,
#product-theater .fs__it[data-position="left-1"] .creator-poster,
#product-theater .fs__it[data-position="right-1"] .creator-poster,
#product-theater .fs__it[data-position="left-2"] .creator-video,
#product-theater .fs__it[data-position="right-2"] .creator-video,
#product-theater .fs__it[data-position="left-2"] .creator-poster,
#product-theater .fs__it[data-position="right-2"] .creator-poster {
  opacity: 1;
  transform: none;
  filter: none;
}

#product-theater .fan-caption {
  bottom: 14px;
  pointer-events: none;
}

#product-theater .creator-choices {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) 74px;
  grid-template-areas: "prev names next" ". progress motion";
  align-items: center;
  gap: 6px 10px;
  width: min(100%, 520px);
  margin-inline: auto;
}

#product-theater .creator-choice-group {
  grid-area: names;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid #cfccc5;
}

#product-theater .creator-choice {
  position: relative;
  min-width: 0;
  min-height: 44px;
  padding: 0 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #77736d;
  font-size: 12px;
  font-weight: 520;
}

#product-theater .creator-choice::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transition: transform 220ms var(--e-settle);
}

#product-theater .creator-choice[aria-pressed="true"] {
  background: transparent;
  color: var(--ink);
}

#product-theater .creator-choice[aria-pressed="true"]::after { transform: scaleX(1); }

#product-theater .creator-step {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #cfccc5;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  cursor: pointer;
}

#product-theater .creator-step--prev { grid-area: prev; justify-self: start; }
#product-theater .creator-step--next { grid-area: next; justify-self: end; }

#product-theater :is(.creator-step, .creator-choice, .creator-motion):focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

#product-theater .creator-progress {
  grid-area: progress;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  color: #77736d;
  font-size: 10px;
  letter-spacing: .09em;
}

#product-theater .creator-progress i {
  display: block;
  height: 1px;
  overflow: hidden;
  background: #cfccc5;
}

#product-theater .creator-progress b {
  display: block;
  width: var(--creator-progress, 60%);
  height: 100%;
  background: var(--orange);
  transition: width 600ms cubic-bezier(.2,.78,.18,1);
}

#product-theater .creator-motion {
  grid-area: motion;
  justify-self: end;
  min-height: 44px;
  padding: 0 2px;
  font-size: 11px;
  color: #77736d;
}

#product-theater .creator-explanation {
  max-width: 28ch;
}

#product-theater .tabs__glide,
#product-theater .wpanel {
  transition-timing-function: cubic-bezier(.2,.78,.18,1);
}

#product-theater .wpanel {
  filter: none;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 600ms cubic-bezier(.2,.78,.18,1);
}

#product-theater .wpanel[data-on="1"] { transform: translateY(0); }
#product-theater .wpanel.morphing { filter: none; transform: translateY(-8px); }

@media (max-width: 1040px) and (min-width: 641px) {
  #product-theater .wpanel--fan {
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto;
    grid-template-areas: "fan fan" "choices choices" "profile explanation";
    column-gap: 28px;
    row-gap: 18px;
  }
  #product-theater .fanstack { max-width: 560px; justify-self: center; }
  #product-theater .creator-profile,
  #product-theater .creator-explanation { align-self: start; }
}

@media (max-width: 640px) {
  #product-theater .wpanel--fan {
    min-height: 0;
    padding-top: 12px;
    grid-template-rows: auto auto auto auto;
    row-gap: 12px;
  }

  #product-theater #wfan {
    --w: clamp(226px, 66vw, 258px);
    height: min(430px, calc(var(--w) * 1.667));
    overflow: hidden;
  }

  #product-theater #wfan .fs__it {
    aspect-ratio: 3 / 5;
    border-radius: 16px;
  }

  #product-theater .fs__it[data-position="left-1"],
  #product-theater .fs__it[data-position="right-1"] {
    --sc: .77;
    --y: 8px;
    opacity: .62;
  }

  #product-theater .fs__it[data-position="left-2"],
  #product-theater .fs__it[data-position="right-2"] { opacity: 0; }

  #product-theater .creator-choices {
    width: 100%;
    padding-inline: 14px;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    grid-template-areas: "prev names next" "progress progress motion";
    gap: 4px 8px;
  }

  #product-theater .creator-choice-group {
    display: flex;
    overflow: hidden;
  }

  #product-theater .creator-choice {
    flex: 1 1 20%;
    font-size: 11px;
    padding-inline: 1px;
  }

  #product-theater .creator-profile,
  #product-theater .creator-explanation { margin-inline: 20px; }

  #product-theater .creator-profile {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 14px;
    padding-left: 0;
  }

  #product-theater .creator-profile > * { grid-column: 1 / -1; }
  #product-theater .creator-profile .micro { grid-column: 1; align-self: end; }
  #product-theater .creator-profile .wname { grid-column: 1; margin-top: 0; font-size: 34px; }
  #product-theater .creator-profile .creator-label { grid-column: 2; grid-row: 1 / span 2; align-self: end; text-align: right; max-width: 14ch; }
  #product-theater .creator-profile .specs { margin-top: 8px; grid-template-columns: 1fr 1fr; column-gap: 14px; }
  #product-theater .creator-profile .spec:last-child { display: none; }
  #product-theater .creator-explanation { padding-top: 14px; border-top: 1px solid #d8d6d0; }
  #product-theater .creator-explanation .cardhead { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  #product-theater .fs__it,
  #product-theater .creator-progress b,
  #product-theater .creator-choice::after,
  #product-theater .wpanel { transition-duration: 0.01ms !important; }
}

/* FINAL CAROUSEL REPAIR: keep the theater inside its track at every breakpoint. */
#product-theater .wpanel--fan {
  min-width: 0;
  overflow: hidden;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.7fr) minmax(0, .82fr);
  grid-template-rows: minmax(560px, auto) auto;
  grid-template-areas: "profile fan explanation" "choices choices choices";
  min-height: 628px;
}
#product-theater .fanstack {
  min-width: 0;
  width: 100%;
  height: 560px;
  --w: min(300px, 62%);
  overflow: hidden;
}
#product-theater .fs__it {
  width: var(--w);
  aspect-ratio: 3 / 5;
}
#product-theater .fs__it[data-position="left-1"],
#product-theater .fs__it[data-position="right-1"] { opacity: .75; --sc: .75; }
#product-theater .fs__it[data-position="left-2"],
#product-theater .fs__it[data-position="right-2"] { opacity: .15; --sc: .62; }
#product-theater .creator-profile { grid-area: profile; min-width: 0; }
#product-theater .creator-explanation { grid-area: explanation; min-width: 0; }
#product-theater .creator-choices {
  grid-area: choices;
  width: min(100%, 620px);
  min-width: 0;
  grid-template-columns: 44px minmax(0, 1fr) 90px 44px;
  grid-template-areas: "names names names names" "prev progress motion next";
}
#product-theater .creator-choice-group { grid-area: names; min-width: 0; width: 100%; }
#product-theater .creator-choice { min-width: 0; font-size: 12px; }
#product-theater .creator-step--prev { grid-area: prev; justify-self: start; }
#product-theater .creator-step--next { grid-area: next; justify-self: end; }
#product-theater .creator-progress { grid-area: progress; min-width: 0; }
#product-theater .creator-motion { grid-area: motion; justify-self: stretch; min-width: 90px; padding-inline: 0; }

@media (max-width: 980px) {
  #product-theater .wpanel--fan {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    grid-template-areas: "fan" "choices" "profile" "explanation";
    overflow: hidden;
  }
  #product-theater .fanstack {
    grid-area: fan;
    justify-self: center;
    width: 100%;
    height: min(560px, calc(min(100vw, 560px) * .98));
    --w: min(300px, 62vw);
  }
  #product-theater .creator-profile,
  #product-theater .creator-explanation { margin-inline: 20px; }
}

@media (max-width: 640px) {
  #product-theater .wpanel--fan {
    padding-top: 12px;
    row-gap: 12px;
  }
  #product-theater #wfan {
    width: 100%;
    height: clamp(400px, 102vw, 430px);
    --w: min(230px, 60vw);
  }
  #product-theater #wfan .fs__it { aspect-ratio: 3 / 5; border-radius: 16px; }
  #product-theater .creator-choices {
    width: 100%;
    padding-inline: 14px;
    grid-template-columns: 44px minmax(0, 1fr) 90px 44px;
    grid-template-areas: "names names names names" "prev progress motion next";
    gap: 4px 8px;
  }
  #product-theater .creator-choice-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
    gap: 0;
  }
  #product-theater .creator-choice { font-size: 11px; padding-inline: 1px; }
  #product-theater .creator-motion { min-width: 90px; font-size: 11px; }
}
