.screen-carousel {
  /* Keep the phone frame proportional while letting each content column set its size. */
  width: min(100%, clamp(264px, 31vw, 430px));
  margin: 0 auto;
}

.carousel-viewport {
  overflow: hidden;
  border-radius: 32px;
  background: transparent;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  display: grid;
  flex: 0 0 100%;
  place-items: center;
  width: 100%;
  aspect-ratio: 1260 / 1900;
  margin: 0;
  scroll-snap-align: center;
  background: transparent;
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 32px;
  box-shadow: 0 18px 42px rgba(38, 42, 35, .13);
  object-fit: cover;
  object-position: center top;
}

.carousel-controls {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  margin: 14px auto 0;
}

.carousel-arrow {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.carousel-arrow:hover {
  border-color: var(--green);
  color: var(--green);
}

.carousel-arrow:focus-visible,
.carousel-dot:focus-visible {
  outline: 3px solid rgba(22, 114, 75, .3);
  outline-offset: 3px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c7cac6;
  cursor: pointer;
}

.carousel-dot[aria-current="true"] {
  width: 24px;
  border-radius: 99px;
  background: var(--green);
}

@media (max-width: 860px) {
  .screen-carousel {
    width: min(100%, clamp(256px, 48vw, 360px));
  }

  .carousel-viewport {
    border-radius: 26px;
  }

  .carousel-slide img {
    border-radius: 26px;
  }

  .carousel-controls {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 10px;
  }

  .carousel-arrow {
    width: 34px;
    height: 34px;
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  .screen-carousel,
  .hero-poster .screen-carousel,
  .poster-media .screen-carousel {
    width: min(86vw, 310px);
    max-width: 86vw;
  }

  .carousel-slide img {
    box-shadow: 0 14px 30px rgba(38, 42, 35, .12);
  }
}
