.product-tour {
  margin: 0 auto 72px;
  max-width: 980px;
}
.product-tour-copy {
  margin-bottom: 28px;
  text-align: center;
}
.product-tour-copy .kicker {
  margin-bottom: 12px;
  text-transform: uppercase;
}
.product-tour-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 3vw, 44px);
}
.product-tour-copy > p {
  max-width: 520px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.65;
}
.tour-player {
  position: relative;
  overflow: hidden;
  border: 1px solid #fff;
  border-radius: 22px;
  background: #121216;
  box-shadow: 0 18px 50px #17171b14;
  aspect-ratio: 16 / 9;
}
.tour-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #121216;
  cursor: pointer;
}
.tour-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--purple);
  box-shadow: 0 12px 32px #17171b33;
  transform: translate(-50%, -58%);
  transition:
    transform 0.2s,
    background 0.2s,
    opacity 0.2s;
}
.tour-play svg {
  width: 28px;
  height: 28px;
  margin-left: 3px;
  fill: currentColor;
}
.tour-play:hover {
  background: var(--lime);
  color: var(--ink);
  transform: translate(-50%, -58%) scale(1.05);
}
.tour-player.is-playing .tour-play {
  opacity: 0;
  pointer-events: none;
}
.tour-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin: -32px 0 0 -23px;
  border: 3px solid #ffffff55;
  border-top-color: #fff;
  border-radius: 50%;
  animation: tour-spin 0.8s linear infinite;
}
.tour-spinner[hidden] {
  display: none;
}
@keyframes tour-spin {
  to {
    transform: rotate(360deg);
  }
}
.tour-bar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, #121216e6 20%, #12121600);
  color: #fff;
}
.tour-icon,
.tour-chip,
.tour-speed-menu button {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.tour-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.tour-icon:hover,
.tour-chip:hover,
.tour-speed-menu button:hover {
  background: #ffffff1f;
}
.tour-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tour-icon .tour-icon-play,
.tour-icon .tour-icon-pause {
  fill: currentColor;
  stroke: none;
}
.tour-player.is-playing .tour-icon-play,
.tour-player:not(.is-playing) .tour-icon-pause,
.tour-player.is-fullscreen .tour-icon-enter,
.tour-player:not(.is-fullscreen) .tour-icon-exit {
  display: none;
}
.tour-time {
  flex: 0 0 auto;
  min-width: 36px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #f4f4f6;
}
.tour-seek-label {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 28px;
}
.tour-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.tour-seek {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.tour-seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--lime) var(--tour-progress, 0%),
    #ffffff40 var(--tour-progress, 0%)
  );
}
.tour-seek::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--lime) var(--tour-progress, 0%),
    #ffffff40 var(--tour-progress, 0%)
  );
}
.tour-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px #0006;
}
.tour-seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}
.tour-speed {
  position: relative;
  flex: 0 0 auto;
}
.tour-chip {
  min-width: 46px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ffffff18;
  font-size: 13px;
  font-weight: 650;
}
.tour-speed-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  display: grid;
  min-width: 76px;
  padding: 6px;
  border-radius: 12px;
  background: #1c1c22;
  box-shadow: 0 10px 28px #0006;
}
.tour-speed-menu[hidden] {
  display: none;
}
.tour-speed-menu button {
  height: 32px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
}
.tour-speed-menu button[aria-pressed="true"] {
  background: var(--purple);
  color: #fff;
}
.product-tour-ask {
  display: flex;
  width: fit-content;
  margin: 22px auto 0;
  gap: 10px;
  border-radius: 14px;
  padding: 12px 18px;
  min-height: 48px;
}
.tour-player:fullscreen,
.tour-player:-webkit-full-screen {
  border: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
  background: #000;
}
.tour-player:fullscreen .tour-video,
.tour-player:-webkit-full-screen .tour-video {
  object-fit: contain;
}
@media (max-width: 720px) {
  .product-tour {
    margin-bottom: 48px;
  }
  .product-tour-copy {
    margin-bottom: 18px;
    text-align: left;
  }
  .product-tour-copy > p {
    margin: 0;
  }
  .tour-player {
    border-radius: 16px;
  }
  .tour-play {
    width: 64px;
    height: 64px;
  }
  .tour-duration {
    display: none;
  }
  .tour-bar {
    gap: 6px;
    padding: 36px 8px 8px;
  }
  .product-tour-ask {
    width: 100%;
  }
}
/* Chapters: a side list next to the player on desktop, a collapsible list on mobile. */
.product-tour:has(.tour-layout) {
  max-width: 1180px;
}
.tour-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: stretch;
}
.tour-chapters {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 14px;
  border: 1px solid #fff;
  border-radius: 22px;
  background: #ffffffd9;
  box-shadow: 0 18px 50px #17171b0f;
  contain: size;
}
.tour-chapters-toggle {
  display: none;
}
.tour-chapters-title {
  margin: 4px 8px 10px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.tour-chapter-list {
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}
.tour-chapter {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}
.tour-chapter span {
  flex: 0 0 44px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--purple);
}
.tour-chapter:hover {
  background: #f3f0fb;
}
.tour-chapter.is-active {
  background: var(--purple);
  color: #fff;
}
.tour-chapter.is-active span {
  color: var(--lime);
}
.tour-tick {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 8px;
  border-radius: 1px;
  background: #ffffffb3;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
@media (max-width: 900px) {
  .tour-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .tour-chapters {
    padding: 6px;
    border-radius: 16px;
    contain: none;
  }
  .tour-chapters-title {
    margin: 8px 10px 4px;
  }
  .tour-chapters-toggle {
    order: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    margin-top: 4px;
    background: #f3f0fb;
    color: var(--purple);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  .tour-chapter-list {
    flex: none;
    padding: 2px 0;
  }
  .tour-chapters:not(.is-open) .tour-chapter-list li:nth-child(n + 4) {
    display: none;
  }
}
