/* Wizard School: runes drift up off the spellbook, the cauldron bubbles, the stars glint and the moth
   flutters. The classic opening ("spellbook") is the fallback if the film can't load: the book glows,
   the runes rise and the familiars hop in. Only transform and opacity animate; reduced motion is still. */
[data-theme="wizard"] { --wz-gilt: linear-gradient(100deg, #b8892f 0%, #f7d684 35%, #fff3c8 50%, #f2c96b 65%, #b8892f 100%); }
[data-theme="wizard"] .hero-art .wz-rune { animation: wz-float 4.8s ease-in-out infinite; animation-delay: calc(var(--i) * -1s); }
[data-theme="wizard"] .hero-art .wz-bub { animation: wz-bub 2.2s ease-in infinite; animation-delay: calc(var(--i) * -.45s); }
[data-theme="wizard"] .hero-art .wz-tw { animation: wz-glint 3.4s ease-in-out infinite; }
[data-theme="wizard"] .hero-art .wz-flut { animation: wz-flut 5s ease-in-out infinite alternate; }
[data-theme="wizard"] .card { border-radius: 18px; box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(242, 201, 107, .45); }
[data-theme="wizard"] .btn { border-radius: 14px; }
[data-theme="wizard"] .title { letter-spacing: .02em; text-shadow: 0 2px 0 rgba(13, 11, 46, .6), 0 0 22px rgba(242, 201, 107, .45); }
[data-theme="wizard"] .eyebrow { letter-spacing: .14em; }
[data-theme="wizard"] .divider::before, [data-theme="wizard"] .divider::after { background: var(--wz-gilt); height: 2px; border-radius: 2px; }
[data-theme="wizard"] .btn, [data-theme="wizard"] .card h2, [data-theme="wizard"] .title, [data-theme="wizard"] .eyebrow { overflow-wrap: anywhere; }

/* the kid's photo: a gilded portrait oval */
[data-theme="wizard"] .kp-oval .kp-win, [data-theme="wizard"] .kp-circle .kp-win { box-shadow: 0 0 0 3px #fff3c8, 0 0 0 calc(var(--kp-w) * .05) #c79a3c, 0 0 calc(var(--kp-w) * .26) calc(var(--kp-w) * .05) rgba(242, 201, 107, .45); }

/* the Acceptance letter: cream parchment, a gilt rule and a wax-seal stub */
[data-theme="wizard"] .ticket { background: linear-gradient(170deg, #fbf3dc 0%, #f4e6c4 100%); color: #1d1a44; border-radius: 10px;
  box-shadow: 0 14px 30px rgba(13, 11, 46, .45), inset 0 0 0 1.5px #c79a3c, inset 0 0 0 5px #fbf3dc, inset 0 0 0 6px rgba(199, 154, 60, .6); }
[data-theme="wizard"] .ticket .t-main { border-right: 2px dashed rgba(199, 154, 60, .6); }
[data-theme="wizard"] .ticket small { color: #6b2f3a; letter-spacing: .22em; font-weight: 800; }
[data-theme="wizard"] .ticket b { font-family: "Cinzel Decorative", Georgia, serif; font-weight: 700; color: #1d1a44; }
[data-theme="wizard"] .ticket .t-stub { background: radial-gradient(circle at 50% 50%, #8e2f3f 0 30%, #6b2f3a 31% 36%, transparent 37%), linear-gradient(180deg, #f4e6c4, #ead7ab); }

/* the classic opening (only if the film can't load) */
[data-theme="wizard"] .op-art svg { overflow: visible; }
[data-theme="wizard"] .op-card { background: rgba(255, 250, 240, .94); color: var(--cardInk); box-shadow: 0 18px 50px rgba(13, 11, 46, .5); }
[data-theme="wizard"] .op-spellbook .op-line { color: #fff3c8; text-shadow: 0 2px 12px rgba(13, 11, 46, .9); }
[data-theme="wizard"] .op-spellbook.op-run .wz-rune { animation: wz-rise 1.4s calc(1.2s + var(--i) * .2s) cubic-bezier(.22, 1, .36, 1) both, wz-float 4.8s 3s ease-in-out infinite; }
[data-theme="wizard"] .op-spellbook.op-run .wz-tw { animation: wz-in 1s .4s ease-out both, wz-glint 3.4s 1.4s ease-in-out infinite; }
[data-theme="wizard"] .op-spellbook.op-run .wz-pal { transform-box: fill-box; transform-origin: 50% 100%; animation: wz-pop .7s 2.8s cubic-bezier(.34, 1.4, .64, 1) both; }
[data-theme="wizard"] .op-art { transform: scale(1.35); transform-origin: 50% 80%; transition: opacity 1.2s ease, transform 5s cubic-bezier(.33, .05, .2, 1); }
[data-theme="wizard"] .op-pal { transform: translateY(40vh) scale(.6); opacity: 0; transition-property: transform, opacity; transition-timing-function: cubic-bezier(.34, 1.4, .64, 1); }
[data-theme="wizard"] .op-run .op-art, [data-theme="wizard"] .op-run .op-pal { opacity: 1; transform: none; }
[data-theme="wizard"] .op-final .op-art, [data-theme="wizard"] .op-final .op-pal { opacity: 1; transform: none; transition: none; }
[data-theme="wizard"] .critter .cr-eye { transform-box: fill-box; transform-origin: center; animation: wz-blink 5.6s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.3s - .9s); }
@media (max-aspect-ratio: 4/5) { [data-theme="wizard"] .op-art svg { transform: scale(1.3); transform-origin: 50% 100%; } }

/* Party TV */
[data-theme="wizard"].tv-bd { opacity: .95; }
[data-theme="wizard"].tv-bd .wz-rune { animation: wz-float 6s ease-in-out infinite; animation-delay: calc(var(--i) * -1.2s); }

@keyframes wz-float { 0%, 100% { opacity: 1; transform: translateY(0); } 50% { opacity: .55; transform: translateY(-5px); } }
@keyframes wz-bub { 0% { opacity: 0; transform: translateY(4px); } 30% { opacity: .9; } 100% { opacity: 0; transform: translateY(-14px); } }
@keyframes wz-glint { 50% { opacity: .35; } }
@keyframes wz-flut { from { transform: translate(0, 0) rotate(-3deg); } to { transform: translate(-10px, 6px) rotate(4deg); } }
@keyframes wz-rise { from { opacity: 0; transform: translateY(40px) scale(.4); } }
@keyframes wz-in { from { opacity: 0; } }
@keyframes wz-pop { from { opacity: 0; transform: scale(.2); } }
@keyframes wz-blink { 0%, 93%, 100% { transform: scaleY(1); } 95.5% { transform: scaleY(.08); } }
@media (prefers-reduced-motion: reduce) {
  [data-theme="wizard"] .hero-art *, [data-theme="wizard"] .critter .cr-eye, [data-theme="wizard"] .op-art *, [data-theme="wizard"].tv-bd * { animation: none !important; }
}
