/* Big Top Carnival: the invite, the Ringside seat pass, the bulb-studded photo oval and Party TV.
   Ambient motion: the ferris wheel turns (gondolas stay upright), the string lights chase, the pennants
   flutter and the crew sways. The opening film lives in film.css; the "bigtop" classic opening below is
   its short fallback. */
[data-theme="carnival"] .title, [data-theme="carnival"] .card h2, [data-theme="carnival"] .age-badge b { font-family: "Rye", Georgia, serif; font-weight: 400; font-synthesis: none; }
[data-theme="carnival"] .title { color: #d62839; letter-spacing: .01em; text-shadow: 2px 2px 0 #1d2d50, 0 0 0 transparent; }
[data-theme="carnival"] .eyebrow { color: #1d2d50; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; }
[data-theme="carnival"] .card { border-radius: 16px; box-shadow: var(--shadow), inset 0 0 0 2px #f0dcc0, inset 0 4px 0 #d62839; }
[data-theme="carnival"] .btn { border-radius: 999px; font-weight: 800; box-shadow: inset 0 0 0 2px rgba(29, 45, 80, .18); }
[data-theme="carnival"] .btn, [data-theme="carnival"] .card h2, [data-theme="carnival"] .title, [data-theme="carnival"] .eyebrow { overflow-wrap: anywhere; }

/* the hero's ambient life */
[data-theme="carnival"] .hero-art .cv-whl { transform-box: view-box; animation: cv-spin 36s linear infinite; }
[data-theme="carnival"] .hero-art .cv-car { transform-box: fill-box; transform-origin: 50% 0; animation: cv-spin 36s linear infinite reverse; }
[data-theme="carnival"] .hero-art .cv-bulb { animation: cv-chase 1.8s steps(2, jump-none) infinite; animation-delay: calc(var(--i) * -.3s); }
[data-theme="carnival"] .hero-art .cv-fl { transform-box: fill-box; transform-origin: 50% 0; animation: cv-flutter 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * -.6s); }
[data-theme="carnival"] .hero-art .cv-pen { transform-box: fill-box; transform-origin: 0 50%; animation: cv-wave 1.6s ease-in-out infinite; }
[data-theme="carnival"] .hero-art .cv-sway { transform-box: fill-box; transform-origin: 50% 100%; animation: cv-bob 2.8s ease-in-out infinite; }
[data-theme="carnival"] .hero-art .cv-sway2 { animation-delay: -1.4s; }
[data-theme="carnival"] .hero-art .cv-flap { transform-box: fill-box; }
[data-theme="carnival"] .critter .cr-eye { transform-box: fill-box; transform-origin: center; animation: cv-blink 5.2s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.2s - .5s); }

/* the kid's photo: the oval becomes a dressing-room mirror ringed with bulbs */
[data-theme="carnival"] .kp-oval .kp-win { box-shadow: 0 0 0 3px #1d2d50, 0 0 0 calc(var(--kp-w) * .07) #f2b134, 0 0 0 calc(var(--kp-w) * .08) #1d2d50, 0 10px 24px rgba(29, 45, 80, .25); }
[data-theme="carnival"] .kp-oval::after { content: ""; position: absolute; inset: calc(var(--kp-w) * -.06); border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff6d8 0 2.5px, transparent 3px) 0 0 / calc(var(--kp-w) * .16) calc(var(--kp-w) * .16); -webkit-mask: radial-gradient(closest-side, transparent 88%, #000 89%); mask: radial-gradient(closest-side, transparent 88%, #000 89%); }

/* the Ringside seat: a vintage admit-one ticket */
[data-theme="carnival"] .ticket { background: #fff3dc; color: #1d2d50; border-radius: 10px; box-shadow: 0 12px 26px rgba(29, 45, 80, .22), inset 0 0 0 3px #d62839, inset 0 0 0 6px #fff3dc, inset 0 0 0 7.5px #1d2d50; }
[data-theme="carnival"] .ticket .t-main { border-right: 2px dashed rgba(214, 40, 57, .5); }
[data-theme="carnival"] .ticket small { color: #b01f2f; letter-spacing: .22em; font-weight: 800; }
[data-theme="carnival"] .ticket b { font-family: "Rye", Georgia, serif; font-weight: 400; color: #d62839; }
[data-theme="carnival"] .ticket .t-stub { background: repeating-linear-gradient(90deg, #d62839 0 10px, #fff3dc 10px 20px); }

/* the classic opening (only if the film can't load): the lights chase on, the flaps open, the bunting drops */
[data-theme="carnival"] .op-bigtop.op-run .cv-bulb { animation: cv-on .4s calc(.3s + var(--i) * .14s) ease-out both, cv-chase 1.8s 1.6s steps(2, jump-none) infinite; }
[data-theme="carnival"] .op-bigtop.op-run .cv-tent { animation: cv-rise .9s .2s cubic-bezier(.2, .8, .2, 1) both; }
[data-theme="carnival"] .op-bigtop.op-run .cv-flap-l { transform-origin: 0 100%; animation: cv-open 1s 1.4s cubic-bezier(.65, 0, .25, 1) both; }
[data-theme="carnival"] .op-bigtop.op-run .cv-flap-r { transform-origin: 100% 100%; animation: cv-open 1s 1.4s cubic-bezier(.65, 0, .25, 1) both; }
[data-theme="carnival"] .op-bigtop.op-run .cv-bunt { animation: cv-drop 1s 2s cubic-bezier(.3, 1.4, .5, 1) both; }
[data-theme="carnival"] .op-card { background: rgba(255, 250, 240, .94); color: var(--cardInk); box-shadow: 0 18px 50px rgba(29, 45, 80, .25), inset 0 0 0 2px #d62839; }
[data-theme="carnival"] .op-eyebrow { color: #b01f2f; }
[data-theme="carnival"] .op-bigtop .op-line { color: #1d2d50; text-shadow: 0 2px 0 rgba(255, 243, 220, .8); }
[data-theme="carnival"].tv-slide h1, [data-theme="carnival"].tv-slide h2 { font-family: "Rye", Georgia, serif; font-weight: 400; color: #d62839; text-shadow: 3px 3px 0 #1d2d50; }
[data-theme="carnival"].tv-bd { opacity: .92; }

@keyframes cv-spin { to { transform: rotate(360deg); } }
@keyframes cv-chase { 0% { opacity: 1; } 100% { opacity: .45; } }
@keyframes cv-flutter { 50% { transform: rotate(7deg); } }
@keyframes cv-wave { 50% { transform: scaleX(.75) skewY(4deg); } }
@keyframes cv-bob { 50% { transform: translateY(-2px) rotate(2deg); } }
@keyframes cv-blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
@keyframes cv-on { from { opacity: 0; } }
@keyframes cv-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes cv-open { from { transform: scaleX(1.6); } }
@keyframes cv-drop { from { opacity: 0; transform: translateY(-20px); } }
@media (prefers-reduced-motion: reduce) {
  [data-theme="carnival"] .hero-art *, [data-theme="carnival"] .critter .cr-eye { animation: none !important; }
}
