/* Carousel 1-5 and 11-13 (Opus, Nov 9, NEW): hero social-card carousel variants. Scoped to .cn9 / .carousel-v1..v5 and .carousel-v11..v13.
   Only active with ?v-carousel=1..5 or 11..13 (html.cn9-on); ?v-carousel=0 and no param leave Carousel 0 (lane-c) untouched.
   The spring engine in carousel-nov9-opus.js writes each card's transform; everything here moves by transform/opacity. */

html.cn9-on #r2cHero > .r2c-stage, html.cn9-on #r2cHero > .r2c-ctl { display: none !important; }
/* the fan reaches past the hero column on desktop; phones keep the sideways clip so the page never scrolls sideways */
@media (min-width: 960px) { html.cn9-on #r2cHero { overflow: visible !important; } }
@media (max-width: 959.98px) { html.cn9-on #r2cHero { overflow-x: clip !important; overflow-y: visible !important; } }
.cn9 { display: contents; --plum: #4a1942; --cream: #fdf8f0; --gold: #d4a843; --ink: #1d0f1a; --px: 0; --py: 0; }

/* same box as Carousel 0's stage, so swapping in never moves the hero */
.cn9-stage {
  grid-area: stage; position: relative; aspect-ratio: 6 / 5; max-height: min(calc(100svh - 250px), 560px); width: 100%; margin-inline: auto;
  perspective: 1300px; perspective-origin: 50% 40%; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.cn9-card { position: absolute; top: 5%; left: 50%; width: 52%; margin-left: -26%; transform-style: preserve-3d; will-change: transform, opacity; }
.cn9-in { position: relative; transition: transform .45s cubic-bezier(.2, .9, .25, 1); transform-style: preserve-3d; }
.cn9-face {
  display: block; position: relative; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 26px; overflow: hidden; cursor: pointer;
  background: #e8ddd0; color: #fff; font: inherit; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 28px 60px -18px rgba(74, 25, 66, .45), 0 4px 10px rgba(74, 25, 66, .12);
  transition: box-shadow .4s ease-out, opacity .25s ease-out;
}
.cn9-face img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cn9-face video.cn9-vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.cn9-face:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.cn9-card.is-lifted .cn9-face { opacity: 0; }
.cn9.is-drag .cn9-stage { cursor: grabbing; }

.cn9-pills { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; font: 600 .74rem/1.2 'DM Sans', sans-serif; }
.cn9-pill { position: relative; overflow: hidden; padding: 6px 10px; border-radius: 999px; background: rgba(22, 10, 19, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); white-space: nowrap; max-width: 100%; text-overflow: ellipsis; }
.cn9-pill-plat { background: rgba(253, 248, 240, .95); color: var(--plum); }
.cn9-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.cn9-tap {
  position: absolute; left: 50%; bottom: 12px; translate: -50% 6px; padding: 6px 12px; border-radius: 999px; background: rgba(253, 248, 240, .92); color: var(--plum);
  font: 700 .72rem/1 'DM Sans', sans-serif; opacity: 0; transition: opacity .3s ease-out, translate .4s cubic-bezier(.2, .9, .25, 1);
}
@media (hover: hover) { .cn9-card.is-front .cn9-face:hover .cn9-tap { opacity: 1; translate: -50% 0; } }

/* caption bubble and real comments: only the front card shows them */
.cn9-bub, .cn9-coms { opacity: 0; translate: 0 10px; transition: opacity .3s ease-out, translate .5s cubic-bezier(.2, .9, .25, 1); pointer-events: none; }
.cn9-card.is-front .cn9-bub { opacity: 1; translate: 0 0; transition-delay: .12s; }
.cn9-bub {
  position: absolute; left: -15%; top: 62%; max-width: 64%; margin: 0; padding: 11px 14px; border-radius: 18px 18px 18px 5px;
  background: var(--plum); color: var(--cream); font: 500 .84rem/1.38 'DM Sans', sans-serif; box-shadow: 0 16px 34px -8px rgba(74, 25, 66, .45);
  transform: translateZ(40px);
}
.cn9-bub-size { visibility: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.cn9-bub-typed { position: absolute; inset: 11px 14px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.cn9-coms { display: none; list-style: none; margin: 0; padding: 0; position: absolute; right: -17%; bottom: -8%; max-width: 66%; gap: 6px; transform: translateZ(50px); }
.cn9-coms li { padding: 8px 12px; border-radius: 16px 16px 5px 16px; background: #fff; color: #2d1928; font: 500 .8rem/1.35 'DM Sans', sans-serif; box-shadow: 0 12px 26px rgba(74, 25, 66, .18); border: 1px solid #f0e6da; }
.cn9-coms b { display: block; font-size: .68rem; color: #8a6b1e; font-weight: 700; margin-bottom: 1px; }

/* controls capsule: prev, progress dots, next, pause (44px targets) */
.cn9-ctl {
  grid-area: ctl; display: inline-flex; align-items: center; gap: 2px; margin-top: 24px; padding: 4px; border-radius: 999px;
  background: rgba(255, 255, 255, .86); border: 1px solid #eadfd1; box-shadow: 0 10px 26px -10px rgba(74, 25, 66, .28), 0 1px 0 rgba(255, 255, 255, .9) inset;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); position: relative; z-index: 2;
}
.cn9-btn { width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--plum); cursor: pointer; display: grid; place-items: center; padding: 0; transition: background-color .25s, color .2s, scale .16s ease-out; }
.cn9-btn[hidden] { display: none; }
.cn9-btn > span { display: grid; place-items: center; transition: transform .3s cubic-bezier(.2, .9, .25, 1); }
.cn9-btn svg { width: 18px; height: 18px; display: block; }
@media (hover: hover) { .cn9-btn:hover { background: var(--plum); color: var(--cream); } }
.cn9-btn:active { scale: .9; }
.cn9-btn:focus-visible, .cn9-dots button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.cn9-dots { display: inline-flex; align-items: center; gap: 0; }
.cn9-dots button { width: 14px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; transition: width .4s cubic-bezier(.2, .9, .25, 1); }
.cn9-dots button::before, .cn9-dots button::after { content: ''; position: absolute; left: 4px; right: 4px; top: 19px; height: 6px; border-radius: 999px; background: #e3d6c6; }
.cn9-dots button::after { background: var(--plum); transform: scaleX(0); transform-origin: left; }
.cn9-dots button[aria-current="true"] { width: 34px; }
.cn9-dots button[aria-current="true"]::after { transform: scaleX(1); }
@keyframes cn9Fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cn9.is-auto .cn9-dots button[aria-current="true"]::after, .cn9.is-auto .cn9-bars span.is-on i { animation: cn9Fill var(--cn9-dwell, 5.6s) linear both; }
.cn9.is-held .cn9-dots button::after, .cn9.is-paused .cn9-dots button::after, .cn9.is-held .cn9-bars i, .cn9.is-paused .cn9-bars i { animation-play-state: paused; }

/* preview picker */
.cn9-pick { display: inline-flex; align-items: center; gap: 8px; margin: 10px auto 0; font: 600 .72rem/1.2 'DM Sans', sans-serif; color: #7a6a5e; position: relative; z-index: 8; }
.cn9-pick select { font: 600 .78rem/1.2 'DM Sans', sans-serif; color: var(--plum, #4a1942); background: #fff; border: 1px solid #eadfd1; border-radius: 999px; padding: 8px 12px; min-height: 36px; max-width: calc(100vw - 24px); text-overflow: ellipsis; }
/* Preview UI only: hide the old "Hero carousel: A · Floating deck" switcher and the leftover dotted pill when the new dropdown is present. */
#r2cHero:has(.cn9-pick) > .glzv,
#r2cHero:has(.cn9-pick) .glzv,
#r2cHero .glzv[data-cn9-legacy-hidden] { display: none !important; }

/* ===== Carousel 1: Spring fan (the ref stack, glowing) ===== */
.carousel-v1 .cn9-in::before {
  content: ''; position: absolute; inset: -9% -10%; z-index: -1; border-radius: 40%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(212, 168, 67, .55), rgba(232, 137, 170, .28) 55%, transparent 75%);
  filter: blur(18px); opacity: 0; transition: opacity .6s ease-out;
}
.carousel-v1 .cn9-card.is-front .cn9-in::before { opacity: .9; animation: cn9Halo 3.6s ease-in-out infinite alternate; }
@keyframes cn9Halo { from { opacity: .55; } to { opacity: 1; } }
.carousel-v1 .cn9-card.is-front .cn9-face { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .75) inset, 0 0 0 6px rgba(212, 168, 67, .2), 0 36px 70px -18px rgba(74, 25, 66, .5); }
.carousel-v1 .cn9-card:not(.is-front) .cn9-face { filter: saturate(.85) brightness(.95); }
.carousel-v1 .cn9-stage::after { content: ''; position: absolute; left: 24%; right: 24%; bottom: -1%; height: 8%; background: radial-gradient(closest-side, rgba(74, 25, 66, .22), transparent); filter: blur(6px); pointer-events: none; }

/* ===== Carousel 2: Orbit ring (gold ring light, shimmer pills, magnetic arrows) ===== */
.carousel-v2 .cn9-card { width: 46%; margin-left: -23%; top: 7%; }
.carousel-v2 .cn9-stage::before {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: 2%; height: 16%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(212, 168, 67, .38), transparent 70%);
  transform: translateX(calc(var(--px) * 14px)) rotateX(0deg); transition: transform .5s cubic-bezier(.2, .9, .25, 1);
}
.carousel-v2 .cn9-in::before {
  content: ''; position: absolute; inset: -4px; z-index: -1; border-radius: 30px; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: conic-gradient(from 0deg, #d4a843, #f6dca0, #e889aa, #4a1942, #d4a843); filter: blur(10px);
}
.carousel-v2 .cn9-card.is-front .cn9-in::before { opacity: .85; }
.carousel-v2 .cn9-card:not(.is-front) .cn9-face { filter: brightness(.9) saturate(.85); }

/* shimmer on pills (2 and 3) */
.carousel-v2 .cn9-card.is-front .cn9-pill::after, .carousel-v3 .cn9-card.is-front .cn9-pill::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
  transform: translateX(-120%); animation: cn9Shim 3.2s ease-in-out 0.4s infinite;
}
.carousel-v2 .cn9-card.is-front .cn9-pill:nth-child(2)::after, .carousel-v3 .cn9-card.is-front .cn9-pill:nth-child(2)::after { animation-delay: .55s; }
.carousel-v2 .cn9-card.is-front .cn9-pill:nth-child(3)::after, .carousel-v3 .cn9-card.is-front .cn9-pill:nth-child(3)::after { animation-delay: .7s; }
@keyframes cn9Shim { 0% { transform: translateX(-120%); } 40%, 100% { transform: translateX(120%); } }

/* ===== Carousel 3: Toss pile (chat bubbles with real comments) ===== */
.carousel-v3 .cn9-card { width: 50%; margin-left: -27%; top: 9%; }
.carousel-v3 .cn9-face { border-radius: 18px; box-shadow: 0 0 0 7px #fff, 0 22px 50px -14px rgba(74, 25, 66, .45); }
.carousel-v3 .cn9-coms { display: grid; }
.carousel-v3 .cn9-card.is-front .cn9-coms { opacity: 1; translate: 0 0; transition-delay: .45s; }
.carousel-v3 .cn9-card.is-front .cn9-coms li:nth-child(2) { margin-left: 18px; }
.carousel-v3 .cn9-bub { top: 55%; left: -18%; }

/* ===== Carousel 4: Coverflow (reflections, sheen sweep, magnetic arrows) ===== */
.carousel-v4 .cn9-stage { perspective: 1000px; }
.carousel-v4 .cn9-card { width: 44%; margin-left: -22%; top: 4%; }
.carousel-v4 .cn9-face { border-radius: 18px; -webkit-box-reflect: below 6px linear-gradient(transparent 72%, rgba(255, 255, 255, .22)); }
.carousel-v4 .cn9-face::after {
  content: ''; position: absolute; inset: -20% -60%; pointer-events: none; transform: translateX(-100%) skewX(-12deg);
  background: linear-gradient(90deg, transparent 35%, rgba(255, 255, 255, .42) 50%, transparent 65%);
}
.carousel-v4 .cn9-card.is-sheen .cn9-face::after { animation: cn9Sheen 1.1s cubic-bezier(.3, .6, .3, 1) .15s both; }
@keyframes cn9Sheen { from { transform: translateX(-70%) skewX(-12deg); } to { transform: translateX(70%) skewX(-12deg); } }
.carousel-v4 .cn9-card.is-front .cn9-face { box-shadow: 0 0 0 1.5px rgba(212, 168, 67, .6), 0 30px 60px -16px rgba(29, 15, 26, .55); }
.carousel-v4 .cn9-card:not(.is-front) .cn9-face { filter: brightness(.82) saturate(.8); }
.carousel-v4 .cn9-bub { left: -10%; top: 66%; }

/* ===== Carousel 5: Ambient feed (photo light, story bars, floating hearts) ===== */
.carousel-v5 .cn9-card { width: 50%; margin-left: -25%; top: 12%; }
.carousel-v5 .cn9-face { aspect-ratio: 3 / 4; border-radius: 22px; }
.carousel-v5 .cn9-amb { position: absolute; inset: 4% 8%; pointer-events: none; transform: translateZ(-200px); }
.carousel-v5 .cn9-amb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 40%; filter: blur(44px) saturate(1.4); opacity: 0; transition: opacity 1s ease-out; }
.carousel-v5 .cn9-amb img.is-on { opacity: .62; }
.carousel-v5 .cn9-bars { position: absolute; left: 25%; right: 25%; top: 4%; display: flex; gap: 4px; z-index: 200; pointer-events: none; }
.carousel-v5 .cn9-bars span { flex: 1; height: 4px; border-radius: 999px; background: rgba(74, 25, 66, .16); overflow: hidden; position: relative; }
.carousel-v5 .cn9-bars i { position: absolute; inset: 0; background: var(--plum); transform: scaleX(0); transform-origin: left; }
.carousel-v5 .cn9-bars span.is-past i, .carousel-v5 .cn9-bars span.is-on i { transform: scaleX(1); }
.carousel-v5 .cn9-hearts { position: absolute; right: 22%; bottom: 14%; width: 30px; height: 30px; z-index: 200; pointer-events: none; }
.cn9-heart { position: absolute; left: 0; bottom: 0; width: 26px; height: 26px; color: #e8577e; opacity: 0; animation: cn9Heart 1.6s cubic-bezier(.2, .7, .3, 1) var(--hd, 0s) forwards; }
.cn9-heart svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 8px rgba(232, 87, 126, .4)); }
@keyframes cn9Heart { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--hx, 0), -150px) scale(var(--hs, 1)); } }
.carousel-v5 .cn9-bub { top: 70%; left: -12%; }
.carousel-v5 .cn9-card.is-front .cn9-face { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7) inset, 0 34px 70px -20px rgba(74, 25, 66, .55); }

/* phones and narrow columns */
@media (max-width: 959.98px) {
  .cn9-stage { aspect-ratio: 1 / 1.04; max-height: none; max-width: 440px; }
  .cn9-card { width: 60%; margin-left: -30%; top: 3%; }
  .carousel-v2 .cn9-card { width: 52%; margin-left: -26%; }
  .carousel-v3 .cn9-card { width: 58%; margin-left: -31%; top: 9%; }
  .carousel-v4 .cn9-card, .carousel-v11 .cn9-card, .carousel-v13 .cn9-card, .carousel-v15 .cn9-card { width: 52%; margin-left: -26%; }
  .carousel-v14 .cn9-card { width: 54%; margin-left: -27%; }
  .carousel-v12 .cn9-card, .carousel-v17 .cn9-card { width: 72%; margin-left: -36%; top: 1%; }
  .carousel-v16 .cn9-card { width: 52%; margin-left: -26%; }
  .carousel-v5 .cn9-card { width: 56%; margin-left: -28%; top: 10%; }
  .carousel-v5 .cn9-bars { left: 22%; right: 22%; }
  .cn9-ctl { display: flex; width: 100%; box-sizing: border-box; justify-content: space-between; margin-top: 30px; }
  .cn9-dots { flex: 1; justify-content: center; }
  .cn9-bub { left: -10%; font-size: .74rem; max-width: 72%; padding: 8px 11px; }
  .cn9-bub-typed { inset: 8px 11px; }
  .cn9-coms { right: -12%; max-width: 78%; }
  .cn9-coms li { font-size: .72rem; padding: 7px 10px; }
  .cn9-pills { left: 7px; right: 7px; top: 7px; gap: 4px; font-size: .62rem; }
  .cn9-pill { padding: 4px 7px; }
}
@media (max-width: 600px) { .carousel-v3 .cn9-card:has(.cn9-coms li) .cn9-bub { display: none; } .cn9-coms li:nth-child(2) { display: none; } }
@media (max-width: 374.98px) { .cn9-dots button { width: 11px; } .cn9-dots button[aria-current="true"] { width: 24px; } .cn9-dots button::before, .cn9-dots button::after { left: 3px; right: 3px; } }

/* ===== expand: custom Glaze frames that echo TikTok and Instagram ===== */
html.cn9-lock, html.cn9-lock body { overflow: hidden; }
.cn9-x { text-align: left; position: fixed; inset: 0; z-index: 2147482000; display: grid; place-items: center; --plum: #4a1942; --cream: #fdf8f0; --gold: #d4a843; --ink: #1d0f1a; }
.cn9-x-back { position: absolute; inset: 0; background: rgba(22, 10, 19, .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .38s ease-out; }
.cn9-x.is-open .cn9-x-back { opacity: 1; }
.cn9-x.is-closing .cn9-x-back { opacity: 0; transition-duration: .3s; }
.cn9-x-wrap { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 16px; max-height: 100svh; box-sizing: border-box; }
.cn9-x-close {
  position: fixed; top: 14px; right: 14px; width: 46px; height: 46px; border-radius: 999px; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(253, 248, 240, .95); color: var(--plum); box-shadow: 0 8px 22px rgba(0, 0, 0, .3); opacity: 0; transition: opacity .3s ease-out .15s, scale .16s;
}
.cn9-x-close svg { width: 20px; height: 20px; }
.cn9-x-close:active { scale: .9; }
.cn9-x-close:focus-visible, .cn9-x-acts a:focus-visible, .cn9-f-media:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.cn9-x-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; opacity: 0; translate: 0 10px; transition: opacity .35s ease-out .22s, translate .5s cubic-bezier(.2, .9, .25, 1) .22s; }
.cn9-x.is-open .cn9-x-close, .cn9-x.is-open .cn9-x-acts { opacity: 1; translate: 0 0; }
.cn9-x.is-closing .cn9-x-close, .cn9-x.is-closing .cn9-x-acts { opacity: 0; transition-delay: 0s; transition-duration: .18s; }
.cn9-x-acts a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; font: 700 .92rem/1 'DM Sans', sans-serif; text-decoration: none; transition: translate .25s cubic-bezier(.2, .9, .25, 1), background-color .25s; }
.cn9-x-core { background: var(--cream); color: var(--plum); box-shadow: 0 10px 26px -8px rgba(212, 168, 67, .7); }
.cn9-x-out { color: var(--cream); border: 1.5px solid rgba(253, 248, 240, .5); }
@media (hover: hover) { .cn9-x-acts a:hover { translate: 0 -2px; } .cn9-x-out:hover { background: rgba(253, 248, 240, .1); } }

.cn9-f { position: relative; overflow: hidden; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .6); will-change: transform; }
.cn9-f-media { position: relative; overflow: hidden; cursor: pointer; background: #2a1726; }
.cn9-f-media img, .cn9-f-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cn9-f-media video { opacity: 0; transition: opacity .5s ease-out; }
.cn9-f-media.is-video video { opacity: 1; }
.cn9-f-sk { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, #2a1726 30%, #3d2338 50%, #2a1726 70%); background-size: 300% 100%; opacity: 0; transition: opacity .35s ease-out; }
.cn9-f.is-loading .cn9-f-sk { opacity: 1; animation: cn9Sk 1.2s linear infinite; }
@keyframes cn9Sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.cn9-sk-line { display: none; }
.cn9-f.is-loading .cn9-sk-line { display: block; position: absolute; height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .18); width: 70%; }
.cn9-f-cap, .cn9-f-coms, .cn9-tt-rail, .cn9-handle, .cn9-ig-body > p { transition: opacity .35s ease-out; }
.cn9-f.is-loading .cn9-f-cap, .cn9-f.is-loading .cn9-f-coms, .cn9-f.is-loading .cn9-tt-rail, .cn9-f.is-loading .cn9-ig-body > p { opacity: 0; }
.cn9-av { display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--gold), #e889aa); color: var(--plum); font: 800 1rem/1 'DM Sans', sans-serif; flex: none; }
.cn9-f-coms { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }

/* TikTok-style: 9:16 full-bleed, right action rail, handle + caption bottom-left, progress bar */
.cn9-tt { height: min(76svh, 740px); aspect-ratio: 9 / 16; max-width: 92vw; border-radius: 22px; background: #120a10; color: #fff; }
.cn9-tt .cn9-f-media { position: absolute; inset: 0; }
.cn9-tt .cn9-f-media::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 18%, transparent 52%, rgba(10, 4, 9, .82)); }
.cn9-tt-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .22); z-index: 2; }
.cn9-tt-prog i { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: left; }
.cn9-f.is-still-prog .cn9-tt-prog i { animation: cn9Prog 12s linear infinite; }
@keyframes cn9Prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.cn9-tt-rail { position: absolute; right: 10px; bottom: 96px; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; pointer-events: none; }
.cn9-tt-rail .cn9-av { width: 44px; height: 44px; box-shadow: 0 0 0 2px #fff; margin-bottom: 4px; }
.cn9-tt-act { display: flex; flex-direction: column; align-items: center; gap: 3px; font: 700 .72rem/1 'DM Sans', sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.cn9-tt-act svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.cn9-tt-act:first-of-type svg { color: #ff5a7e; }
.cn9-tt-meta { position: absolute; left: 14px; right: 74px; bottom: 20px; z-index: 2; font: 500 .88rem/1.38 'DM Sans', sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .55); pointer-events: none; }
.cn9-tt-meta .cn9-handle { font-weight: 800; font-size: .98rem; }
.cn9-tt-meta .cn9-f-cap { margin: 4px 0 0; }
.cn9-tt-meta .cn9-f-coms li { font-size: .78rem; opacity: .9; }
.cn9-tt-meta .cn9-f-coms b { font-weight: 700; }
.cn9-tt .cn9-sk-line { bottom: 28px; left: 0; } .cn9-tt .cn9-sk-line.short { bottom: 46px; width: 40%; }

/* Instagram-style: header with avatar + handle, 4:5 media, action row, likes, caption, comments */
.cn9-ig { --w: min(460px, 92vw, calc((100svh - 300px) * .8)); width: var(--w); border-radius: 18px; background: #fff; color: var(--ink); font: 500 .88rem/1.4 'DM Sans', sans-serif; }
.cn9-ig-hd { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 12px; }
.cn9-ig-hd .cn9-av { width: 34px; height: 34px; box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--gold); font-size: .85rem; }
.cn9-ig-hd .cn9-handle { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cn9-ig-more svg { width: 22px; height: 22px; display: block; }
.cn9-ig .cn9-f-media { aspect-ratio: 4 / 5; width: 100%; }
.cn9-ig-acts { display: flex; align-items: center; gap: 14px; padding: 10px 12px 4px; }
.cn9-ig-acts svg { width: 25px; height: 25px; display: block; }
.cn9-ig-heart { color: #e8577e; } .cn9-ig-heart svg { fill: currentColor; }
.cn9-ig-save { margin-left: auto; }
.cn9-ig-body { position: relative; padding: 2px 14px 14px; max-height: 150px; overflow: auto; }
.cn9-ig-body p { margin: 4px 0 0; }
.cn9-ig-likes { font-weight: 700; }
.cn9-ig-all, .cn9-ig-when { color: #8a7a85; font-size: .8rem; }
.cn9-ig .cn9-f-coms b, .cn9-ig .cn9-f-cap b { font-weight: 700; }
.cn9-ig .cn9-sk-line { background: #eee3e8; top: 8px; left: 14px; } .cn9-ig .cn9-sk-line.short { top: 26px; width: 40%; }

/* frame accents per carousel */
.cn9-x.carousel-v1 .cn9-f { box-shadow: 0 0 0 1.5px rgba(212, 168, 67, .5), 0 0 80px -10px rgba(212, 168, 67, .45), 0 40px 90px -20px rgba(0, 0, 0, .6); }
.cn9-x.carousel-v2 .cn9-f { box-shadow: 0 0 0 2px rgba(246, 220, 160, .7), 0 0 90px -10px rgba(232, 137, 170, .45), 0 40px 90px -20px rgba(0, 0, 0, .6); }
.cn9-x.carousel-v3 .cn9-f { box-shadow: 0 0 0 8px #fff, 0 40px 90px -20px rgba(0, 0, 0, .6); }
.cn9-x.carousel-v4 .cn9-x-back { background: rgba(12, 14, 34, .8); }
.cn9-x.carousel-v5 .cn9-f { box-shadow: 0 0 120px -10px rgba(232, 87, 126, .5), 0 40px 90px -20px rgba(0, 0, 0, .6); }
@media (max-width: 600px) {
  .cn9-tt { height: min(72svh, 680px); }
  .cn9-x-wrap { padding: 12px; gap: 12px; }
  .cn9-x-acts a { min-height: 44px; padding: 0 16px; font-size: .86rem; }
}

/* still: reduced motion and Save-Data static mode */
@media (prefers-reduced-motion: reduce) {
  .cn9 *, .cn9 *::before, .cn9 *::after, .cn9-x *, .cn9-x *::before, .cn9-x *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
}
html.glz-static .cn9 *, html.glz-static .cn9 *::before, html.glz-static .cn9 *::after, html.glz-static .cn9-x *, html.glz-static .cn9-x *::after { animation: none !important; transition-duration: .01s !important; transition-delay: 0s !important; }
@media (max-width: 600px) { .cn9-x-wrap { padding-top: 66px; } .cn9-ig { --w: min(460px, 92vw, calc((100svh - 340px) * .8)); } }
.cn9-ig-body { scrollbar-width: thin; }


/* ===== Carousel 11: Silk coverflow (refine of 4) — softer spring, longer sheen, deeper glass reflection ===== */
.carousel-v11 .cn9-stage { perspective: 1200px; }
.carousel-v11 .cn9-card { width: 44%; margin-left: -22%; top: 4%; }
.carousel-v11 .cn9-face { border-radius: 20px; -webkit-box-reflect: below 8px linear-gradient(transparent 68%, rgba(255, 255, 255, .28)); }
.carousel-v11 .cn9-face::after {
  content: ''; position: absolute; inset: -20% -70%; pointer-events: none; transform: translateX(-100%) skewX(-16deg);
  background: linear-gradient(90deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
}
.carousel-v11 .cn9-card.is-sheen .cn9-face::after { animation: cn9SheenSilk 1.55s cubic-bezier(.22, .7, .25, 1) .1s both; }
@keyframes cn9SheenSilk { from { transform: translateX(-80%) skewX(-16deg); } to { transform: translateX(80%) skewX(-16deg); } }
.carousel-v11 .cn9-card.is-front .cn9-face { box-shadow: 0 0 0 1px rgba(255, 255, 255, .7) inset, 0 0 0 1.5px rgba(212, 168, 67, .45), 0 28px 64px -18px rgba(29, 15, 26, .48); }
.carousel-v11 .cn9-card:not(.is-front) .cn9-face { filter: brightness(.88) saturate(.86); }
.carousel-v11 .cn9-bub { left: -10%; top: 66%; }
.carousel-v11 .cn9-card.is-front .cn9-bub { transition-delay: .18s; }
.carousel-v11 .cn9-ctl { box-shadow: 0 12px 32px -12px rgba(74, 25, 66, .3), 0 1px 0 rgba(255, 255, 255, .95) inset; }
.carousel-v11 .cn9-in { transition-duration: .6s; }

/* ===== Carousel 12: Halo coverflow (refine of 4) — gold bloom behind the front card ===== */
.carousel-v12 .cn9-stage { perspective: 1100px; }
.carousel-v12 .cn9-card { width: 54%; margin-left: -27%; top: 2%; }
.carousel-v12 .cn9-face { border-radius: 18px; -webkit-box-reflect: below 6px linear-gradient(transparent 72%, rgba(255, 255, 255, .2)); }
.carousel-v12 .cn9-in::before {
  content: ''; position: absolute; inset: -16% -18%; z-index: -1; border-radius: 46%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(212, 168, 67, .62), rgba(232, 137, 170, .22) 58%, transparent 78%);
  filter: blur(22px); opacity: 0; transition: opacity .7s ease-out;
}
.carousel-v12 .cn9-card.is-front .cn9-in::before { opacity: .95; animation: cn9Halo 4.2s ease-in-out infinite alternate; }
.carousel-v12 .cn9-face::after {
  content: ''; position: absolute; inset: -20% -60%; pointer-events: none; transform: translateX(-100%) skewX(-12deg);
  background: linear-gradient(90deg, transparent 35%, rgba(255, 245, 220, .5) 50%, transparent 65%);
}
.carousel-v12 .cn9-card.is-sheen .cn9-face::after { animation: cn9Sheen 1.2s cubic-bezier(.3, .6, .3, 1) .12s both; }
.carousel-v12 .cn9-card.is-front .cn9-face { box-shadow: 0 0 0 2px rgba(212, 168, 67, .72), 0 0 36px rgba(212, 168, 67, .28), 0 32px 70px -16px rgba(29, 15, 26, .55); }
.carousel-v12 .cn9-card:not(.is-front) .cn9-face { filter: brightness(.8) saturate(.78); }
.carousel-v12 .cn9-bub { left: -6%; top: auto; bottom: 72px; max-width: 58%; }
.carousel-v12 .cn9-dots button[aria-current="true"]::after { background: var(--gold); }
@media (hover: hover) {
  .carousel-v12 .cn9-card.is-front .cn9-pill { box-shadow: 0 0 0 1px rgba(212, 168, 67, .35); }
}

/* Phone / 375-430: bigger cards, no sideways overflow, 48px controls, bubble stays readable */
@media (max-width: 430px) {
  html.cn9-on.carousel-v12 #r2cHero,
  html.cn9-on.carousel-v17 #r2cHero { overflow-x: clip !important; overflow-y: visible !important; }
  .carousel-v12 .cn9-stage, .carousel-v17 .cn9-stage { aspect-ratio: 4 / 5.15; max-height: none; max-width: 100%; }
  .carousel-v12 .cn9-card, .carousel-v17 .cn9-card { width: 78%; margin-left: -39%; top: 1%; }
  .carousel-v12 .cn9-bub, .carousel-v17 .cn9-bub {
    left: 6%; right: 10%; top: auto; bottom: 72px; max-width: 86%; font-size: .78rem; padding: 8px 11px;
    transform: translateZ(48px);
  }
  .carousel-v12 .cn9-bub-typed, .carousel-v17 .cn9-bub-typed { inset: 8px 11px; }
  .carousel-v12 .cn9-ctl, .carousel-v17 .cn9-ctl { margin-top: 22px; width: 100%; box-sizing: border-box; justify-content: space-between; }
  .carousel-v12 .cn9-btn, .carousel-v17 .cn9-btn { width: 48px; height: 48px; }
  .carousel-v12 .cn9-dots button, .carousel-v17 .cn9-dots button { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-v12 .cn9-vid, .carousel-v17 .cn9-vid { display: none; }
}

/* ===== Carousel 13: Studio coverflow (refine of 4) — stronger fold, chip shimmer, slower bubble ===== */
.carousel-v13 .cn9-stage { perspective: 1050px; }
.carousel-v13 .cn9-card { width: 43%; margin-left: -21.5%; top: 4%; }
.carousel-v13 .cn9-face { border-radius: 16px; -webkit-box-reflect: below 7px linear-gradient(transparent 66%, rgba(253, 248, 240, .3)); }
.carousel-v13 .cn9-face::after {
  content: ''; position: absolute; inset: -20% -60%; pointer-events: none; transform: translateX(-100%) skewX(-12deg);
  background: linear-gradient(90deg, transparent 35%, rgba(255, 255, 255, .48) 50%, transparent 65%);
}
.carousel-v13 .cn9-card.is-sheen .cn9-face::after { animation: cn9Sheen 1s cubic-bezier(.3, .6, .3, 1) .1s both; }
.carousel-v13 .cn9-card.is-front .cn9-face { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55) inset, 0 0 0 1.5px rgba(74, 25, 66, .35), 0 34px 72px -14px rgba(29, 15, 26, .6); }
.carousel-v13 .cn9-card:not(.is-front) .cn9-face { filter: brightness(.78) saturate(.75); }
.carousel-v13 .cn9-bub { left: -10%; top: 66%; }
.carousel-v13 .cn9-card.is-front .cn9-bub { transition-duration: .7s; transition-delay: .22s; }
.carousel-v13 .cn9-card.is-front .cn9-pill::after {
  content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-120%); animation: cn9PillShine 1.4s ease-out .3s both; pointer-events: none;
}
@keyframes cn9PillShine { to { transform: translateX(120%); } }
.carousel-v13 .cn9-x-back { background: rgba(10, 8, 20, .84); }


/* ===== Carousel 17 (Sol, Nov 9, NEW, Halo 12 + fixes): same halo, bigger front, card video ===== */
.carousel-v17 .cn9-stage { perspective: 1100px; }
.carousel-v17 .cn9-card { width: 54%; margin-left: -27%; top: 2%; }
.carousel-v17 .cn9-face { border-radius: 18px; -webkit-box-reflect: below 6px linear-gradient(transparent 72%, rgba(255, 255, 255, .2)); }
.carousel-v17 .cn9-in::before {
  content: ''; position: absolute; inset: -16% -18%; z-index: -1; border-radius: 46%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(212, 168, 67, .62), rgba(232, 137, 170, .22) 58%, transparent 78%);
  filter: blur(22px); opacity: 0; transition: opacity .7s ease-out;
}
.carousel-v17 .cn9-card.is-front .cn9-in::before { opacity: .95; animation: cn9Halo 4.2s ease-in-out infinite alternate; }
.carousel-v17 .cn9-face::after {
  content: ''; position: absolute; inset: -20% -60%; pointer-events: none; transform: translateX(-100%) skewX(-12deg);
  background: linear-gradient(90deg, transparent 35%, rgba(255, 245, 220, .5) 50%, transparent 65%);
}
.carousel-v17 .cn9-card.is-sheen .cn9-face::after { animation: cn9Sheen 1.2s cubic-bezier(.3, .6, .3, 1) .12s both; }
.carousel-v17 .cn9-card.is-front .cn9-face { box-shadow: 0 0 0 2px rgba(212, 168, 67, .72), 0 0 36px rgba(212, 168, 67, .28), 0 32px 70px -16px rgba(29, 15, 26, .55); }
.carousel-v17 .cn9-card:not(.is-front) .cn9-face { filter: brightness(.8) saturate(.78); }
.carousel-v17 .cn9-bub { left: -6%; top: auto; bottom: 72px; max-width: 58%; }
.carousel-v17 .cn9-dots button[aria-current="true"]::after { background: var(--gold); }
@media (hover: hover) {
  .carousel-v17 .cn9-card.is-front .cn9-pill { box-shadow: 0 0 0 1px rgba(212, 168, 67, .35); }
}
@media (max-width: 959.98px) and (min-width: 431px) {
  .carousel-v17 .cn9-card { width: 72%; margin-left: -36%; top: 1%; }
}
/* Must come AFTER the desktop .carousel-v17 rules or phones keep the small card / desktop bubble */
@media (max-width: 430px) {
  .carousel-v17 .cn9-card { width: 78%; margin-left: -39%; top: 1%; }
  .carousel-v17 .cn9-bub {
    left: 6%; right: 10%; top: auto; bottom: 72px; max-width: 86%; font-size: .78rem; padding: 8px 11px;
    transform: translateZ(48px);
  }
  .carousel-v17 .cn9-bub-typed { inset: 8px 11px; }
  .carousel-v17 .cn9-ctl { margin-top: 22px; width: 100%; box-sizing: border-box; justify-content: space-between; }
  .carousel-v17 .cn9-btn { width: 48px; height: 48px; }
  .carousel-v17 .cn9-dots button { height: 48px; }
}
