/* 所有增强样式均在轮播成功挂载后生效。 */
.jyd-carousel .hero-stage {
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
  row-gap: clamp(24px, 4vh, 44px);
  padding-block: clamp(56px, 6vw, 85px) 24px;
  touch-action: pan-y pinch-zoom;
}

.jyd-carousel-photos {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -2;
}

.jyd-carousel-film {
  position: absolute;
  inset: -13% 0 0;
}

.jyd-carousel-film .hero-backdrop {
  z-index: auto;
  transform-origin: 69% 55%;
}

.jyd-film-curtain {
  position: absolute;
  inset: 0 -1px 0 0;
  pointer-events: none;
  background: linear-gradient(104deg, transparent 23%, rgb(11 37 55 / .93) 38%, rgb(11 37 55 / .88) 100%);
}

.jyd-carousel-panels {
  display: grid;
  align-items: center;
  width: min(100%, 700px);
}

.jyd-carousel-panels > .hero-copy {
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
}

.jyd-carousel-panels > .jyd-panel-current {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
}

.jyd-carousel .hero-copy .jyd-film-heading {
  white-space: normal;
}

.jyd-film-line, .jyd-film-type {
  display: block;
}

.jyd-film-line {
  overflow: hidden;
}

.jyd-slide-title {
  color: white;
  font-size: clamp(32px, 4vw, 53px);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.4;
}

.jyd-carousel-controls {
  justify-self:center; position:relative; display:flex; justify-content:center;
  align-items:center; color:white; z-index:2;
}
.jyd-carousel-wings {
  position:absolute; inset:0; pointer-events:none;
  display:flex; justify-content:space-between; align-items:center;
  margin-inline:clamp(-84px,calc((1200px - 100vw) / 2 + 12px),-14px);
  z-index:2; color:white;
}
.jyd-carousel-wings .jyd-carousel-button {
  pointer-events:auto; background:rgb(7 29 45 / .55);
  border:1px solid rgb(255 255 255 / .48);
}
.jyd-carousel-controls .jyd-slide-dot { width:32px; height:44px; cursor:pointer; }
.jyd-slide-dot::after {
  content:''; display:block; width:9px; height:9px; margin:auto;
  border:1.5px solid white; border-radius:50%; background:rgb(8 25 42 / .30);
}
.jyd-slide-dot[aria-current="true"]::after {
  background:#ffe3a8; border-color:#ffe3a8; box-shadow:0 0 0 3px rgb(255 227 168 / .23);
}
.jyd-carousel-controls .jyd-carousel-toggle { position:absolute; left:calc(100% + 6px); }
.jyd-carousel-button {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  color: inherit;
  transition: transform 130ms cubic-bezier(.23, 1, .32, 1), background-color 140ms ease;
}

/* 箭头与播放图形使用控件前景色，高对比度模式中同样可见。 */
.jyd-carousel-prev::before,
.jyd-carousel-next::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 18px;
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
}

.jyd-carousel-prev::before {
  left: 20px;
  transform: rotate(-135deg);
}

.jyd-carousel-toggle::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 18px;
  height: 12px;
  width: 7px;
  box-sizing: border-box;
  border-inline: 2px solid currentColor;
}

.jyd-carousel-toggle[data-playing="false"]::before {
  left: 19px;
  width: 0;
  border: solid transparent;
  border-width: 6px 0 6px 9px;
  border-left-color: currentColor;
}

.jyd-carousel-button:active {
  transform: scale(.96);
}

.jyd-carousel button:focus-visible {
  outline: 2px solid #ffe2a8;
  outline-offset: 1px;
}

.jyd-carousel .hero-caption {
  bottom: 33px;
}

@media (hover: hover) and (pointer: fine) {
  .jyd-carousel-button:hover {
    background: rgb(255 255 255 / .14);
  }
  .jyd-carousel-wings button:hover { background: rgb(7 29 45 / .84); }
}

@media (max-width: 640px) {
  .jyd-carousel .hero-stage {
    padding-block: 55px 16px;
    row-gap: 23px;
  }
  .jyd-carousel .hero-shade {
    background: linear-gradient(90deg, rgb(6 26 46 / .91), rgb(10 35 58 / .58));
  }
  .jyd-carousel .hero-caption {
    inset: 11px 0 auto auto;
  }
  .jyd-carousel-wings { inset:auto 0 16px; margin:0; }
  .jyd-carousel-controls .jyd-slide-dot { width:28px; min-height:44px; }
  .jyd-carousel-controls .jyd-carousel-toggle { left:100%; }

}

@media (prefers-reduced-motion: reduce) {
  .jyd-carousel-film { inset: 0; }
  .jyd-carousel-button { transform: none; transition: none; }
}

@media (min-width:641px) and (max-width:1350px) {
  .jyd-carousel-panels { margin-left:42px; max-width:calc(100% - 98px); }
}
