/* ============================================================
   CKB-WEB-MOBILE-RESPONSIVE-R1-R1A
   Single-Poster Gallery Frame Reclosure
   Parent: CKB-WEB-MOBILE-RESPONSIVE-R1-R1

   Scope authority:
   - Phone <= 640px: one complete 16:9 featured visual per viewport,
     no deliberate next-card peek; still/manual swipe + pagination dots.
   - Tablet 641-1240px: one full-width featured card is the visual unit,
     while the Gallery keeps the approved slow 30px/s kinetic motion.
   - Desktop >1240px: protected existing kinetic composition unchanged.
   - Final production featured visuals are expected to be 16:9; current
     prototype images remain object-fit: contain so interim source files
     are not silently cropped.
   ============================================================ */

/* ------------------------------------------------------------
   Tablet: full single-card visual unit, still kinetically moving.
   No fixed "peek" is designed into the resting geometry; any partial
   adjacent card is only the natural result of continuous movement.
   ------------------------------------------------------------ */
@media (min-width: 641px) and (max-width: 1240px) {
  .gallery-viewport {
    height: auto !important;
  }

  .gallery-track {
    align-items: flex-start !important;
  }

  .poster-link {
    flex: 0 0 min(var(--content-width), calc(100vw - 40px)) !important;
    width: min(var(--content-width), calc(100vw - 40px)) !important;
    max-width: none !important;
  }

  .poster-mount {
    aspect-ratio: 16 / 9 !important;
  }
}

/* ------------------------------------------------------------
   Phone: one complete card fills the Gallery content column.
   Dots now carry the discovery/progress cue, so no adjacent card needs
   to remain deliberately visible in the resting state.
   ------------------------------------------------------------ */
@media (max-width: 640px) {
  .gallery-heading,
  .gallery-viewport {
    width: calc(100vw - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .gallery-viewport {
    padding: 0 0 10px !important;
    scroll-padding-inline: 0 !important;
  }

  .gallery-track {
    gap: 18px !important;
  }

  .poster-link {
    flex: 0 0 calc(100vw - 24px) !important;
    width: calc(100vw - 24px) !important;
    max-width: none !important;
    scroll-snap-align: start !important;
  }

  .poster-mount {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
  }

  /* The dots become the primary "more items exist" cue. */
  .poster-pagination {
    padding-top: 11px !important;
  }

  .poster-pagination-dot {
    width: 6px !important;
    height: 6px !important;
  }

  .poster-pagination-dot.is-active {
    width: 7px !important;
    height: 7px !important;
  }
}
