.media-secondary-stack { align-items: start; align-content: start; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
.media-secondary-stack.aftermovie-carousel { display: block; min-width: 0; }
.aftermovie-carousel-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 16px) / 2); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.aftermovie-carousel-track::-webkit-scrollbar { display: none; }
.aftermovie-carousel-track > article { min-width: 0; scroll-snap-align: start; }
.media-stage:has(.is-rotating) { display: block; }
.media-secondary-stack.aftermovie-carousel.is-rotating { width: min(100%, 840px); margin-inline: auto; }
.aftermovie-carousel.is-rotating .aftermovie-carousel-track { display: block; position: relative; overflow: hidden; touch-action: pan-y pinch-zoom; scroll-snap-type: none; }
.aftermovie-carousel.is-rotating .media-video { position: absolute; top: 0; left: 50%; width: min(64%, 320px); transform: translateX(calc(-50% + var(--slide-offset) * 95%)) scale(.78); transform-origin: center; opacity: 0; visibility: hidden; transition: transform .28s ease, opacity .28s ease; }
.aftermovie-carousel.is-rotating .media-video:is(.is-current,.is-neighbor) { visibility: visible; }
.aftermovie-carousel.is-rotating .media-video.is-current { transform: translateX(-50%) scale(1); opacity: 1; z-index: 2; }
.aftermovie-carousel.is-rotating .media-video.is-neighbor { opacity: .55; z-index: 1; }
.aftermovie-select { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.aftermovie-carousel .is-neighbor .aftermovie-start, .aftermovie-carousel .is-neighbor .aftermovie-controls { visibility: hidden; }
.aftermovie-carousel-nav { display: grid; grid-template-columns: 44px 72px 44px; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.aftermovie-carousel-nav[hidden] { display: none; }
.aftermovie-carousel-nav button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; padding: 10px; background: transparent; color: var(--text); cursor: pointer; }
.aftermovie-carousel-nav button svg { width: 24px; height: 24px; }
.aftermovie-carousel-nav button[aria-disabled="true"] { opacity: .3; cursor: default; }
.aftermovie-carousel-count { display: block; width: 72px; margin: 0; text-align: center; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.aftermovie-carousel button:focus-visible, .aftermovie-carousel-track:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.media-secondary-stack > .media-video--secondary { height: auto; overflow: visible; background: var(--bg); }
.media-secondary-stack .aftermovie-embed--shorts { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; }
.media-secondary-stack .media-video-meta { position: static; padding: 10px 0 0; grid-template-columns: 1fr; gap: 0; background: none; text-align: center; }
.media-secondary-stack .media-video-meta strong, .aftermovie-caption strong { font-family: var(--font-display); font-size: 18px; font-weight: 400; line-height: 1.2; }
.media-secondary-stack .media-video-meta a { justify-self: center; }
.media-video.aftermovie-native { height: auto; overflow: visible; background: var(--bg); container-type: inline-size; }
.aftermovie-screen { position: relative; width: 100%; aspect-ratio: var(--video-ratio, 9 / 16); background: #000; }
.aftermovie-screen video { display: block; width: 100%; height: 100%; aspect-ratio: var(--video-ratio, 9 / 16); object-fit: contain; }
.aftermovie-screen::after { content: ''; position: absolute; inset: 0; background: rgb(0 0 0 / .42); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.aftermovie-native.is-preview .aftermovie-screen::after { opacity: 1; }
.aftermovie-start, .aftermovie-controls { z-index: 1; }
.aftermovie-start { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border: 0; background: transparent; color: var(--text); cursor: pointer; filter: drop-shadow(0 1px 4px #000); }
.aftermovie-start svg { width: 32px; height: 32px; fill: currentColor; }
.aftermovie-caption { padding-top: 10px; text-align: center; }
.aftermovie-controls { position: absolute; inset: 0; color: var(--text); pointer-events: none; }
.aftermovie-tools { position: absolute; top: 4px; right: 4px; display: flex; align-items: start; }
.aftermovie-bottom { position: absolute; bottom: 0; left: 0; right: 0; padding: 12px 4px 0; background: linear-gradient(transparent, rgb(0 0 0 / .8)); }
.aftermovie-actions { display: flex; flex-wrap: wrap; align-items: center; }
.aftermovie-time { margin-left: auto; padding-right: 4px; font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aftermovie-controls button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; color: inherit; cursor: pointer; pointer-events: auto; }
.aftermovie-controls button svg { width: 20px; height: 20px; filter: drop-shadow(0 1px 3px #000); }
.aftermovie-controls button:hover, .aftermovie-controls button:active { background: rgb(0 0 0 / .45); }
.aftermovie-timeline { display: flex; }
.aftermovie-controls input { accent-color: var(--text); height: 44px; cursor: pointer; pointer-events: auto; }
.aftermovie-controls input[type="range"] { appearance: none; -webkit-appearance: none; background: transparent; width: 100%; min-width: 0; margin: 0; padding: 0 6px; }
.aftermovie-controls input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: rgb(241 238 229 / .65); }
.aftermovie-controls input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 10px; height: 10px; margin-top: -4px; border: 0; border-radius: 50%; background: var(--text); }
.aftermovie-controls input[type="range"]::-moz-range-track { height: 2px; background: rgb(241 238 229 / .65); }
.aftermovie-controls input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--text); }
.aftermovie-audio { position: relative; }
.aftermovie-volume-panel { position: absolute; right: 0; top: 44px; width: 120px; padding: 0 4px; background: rgb(0 0 0 / .85); opacity: 0; pointer-events: none; }
.aftermovie-volume-panel input { pointer-events: none; }
.aftermovie-audio:is(:hover,:focus-within,.is-volume-open) .aftermovie-volume-panel { opacity: 1; pointer-events: auto; }
.aftermovie-audio:is(:hover,:focus-within,.is-volume-open) .aftermovie-volume-panel input { pointer-events: auto; }
.aftermovie-system-volume { display: block; padding: 14px 4px; font-size: 11px; }
.aftermovie-status { position: absolute; top: 100px; left: 8px; right: 8px; margin: 0; padding: 8px; background: rgb(0 0 0 / .85); font-size: 12px; pointer-events: none; }
.aftermovie-native button:focus-visible, .aftermovie-native input:focus { outline: 2px solid var(--text); outline-offset: -2px; }
.aftermovie-native [hidden] { display: none; }
.aftermovie-carousel.is-rotating .aftermovie-native:fullscreen, .aftermovie-native:fullscreen { position: fixed; inset: 0; width: 100%; transform: none; opacity: 1; visibility: visible; display: flex; flex-direction: column; align-items: center; padding: 12px; background: var(--bg); height: 100%; }
.aftermovie-native:fullscreen .aftermovie-screen { flex: 1; min-height: 0; width: min(100%, 760px); }
.aftermovie-native:fullscreen video { height: 100%; }
.aftermovie-native:fullscreen .aftermovie-controls { opacity: 1; }
.aftermovie-fallback video { width: min(100%,240px); height: auto; object-fit: contain; aspect-ratio: 9/16; }
@media (hover: hover) and (pointer: fine) {
  .aftermovie-controls { opacity: 0; transition: opacity .15s ease; }
  .aftermovie-native:is(:hover,:focus-within,.has-message) .aftermovie-controls { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .aftermovie-controls, .aftermovie-screen::after, .aftermovie-carousel.is-rotating .media-video { transition: none; } }
@media(min-width:1024px) {
  .media-secondary-stack.aftermovie-carousel.is-rotating { width: min(100%, 1320px); }
  .aftermovie-carousel.is-rotating .media-video { width: min(25%, 320px); }
  .aftermovie-carousel.is-rotating .media-video.is-neighbor--outer { transform: translateX(calc(-50% + var(--slide-offset) * 84.5%)) scale(.58); opacity: .38; z-index: 0; }
  .aftermovie-carousel.is-rotating .is-neighbor--outer .aftermovie-caption { visibility: hidden; }
}
@media(max-width:960px) {
  .media-stage { grid-template-columns: 1fr; }
  .media-secondary-stack { width: min(100%, 560px); justify-self: center; }
}
@media(max-width:640px) {
  .media-secondary-stack.aftermovie-carousel { width: 100%; }
  .aftermovie-carousel-track { grid-auto-columns: 100%; }
  .aftermovie-carousel.is-rotating .media-video { width: 60%; }
  .aftermovie-carousel.is-rotating .is-neighbor .aftermovie-caption { visibility: hidden; }
}
@container(min-width:180px) { .aftermovie-time { font-size: 12px; } }
@container(max-width:179px) { .aftermovie-time { flex-basis: 100%; text-align: right; } }
