/* Tales of the Elfin Oak · The Oak's Advent Calendar (v135) */
body.yule-page { min-height: 100vh; background: #0b0a10; }
body.yule-page::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background:
  radial-gradient(ellipse at 50% 0%, rgba(255,200,90,0.16), transparent 55%),
  linear-gradient(180deg, rgba(6,9,22,0.55) 0%, rgba(10,6,8,0.35) 50%, rgba(5,8,18,0.8) 100%),
  url("../img/advent-bg.jpg") center / cover no-repeat; }
.yule-page .doc-nav { background: rgba(8,6,10,0.72); }
.yule-page .doc-foot { background: rgba(6,6,12,0.72); }
#yuleFx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 140; }

/* ---------- the painted winter scene behind the title ---------- */
.yule-hero { position: relative; overflow: hidden; padding: 2.6rem 1.2rem 3.4rem; isolation: isolate; -webkit-mask-image: linear-gradient(180deg, #000 0, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 0, #000 78%, transparent 100%); }
.yule-hero-bg { position: absolute; inset: -4%; z-index: -2; background: #0b1424 url("../img/book/t12-s3.jpg") 62% 38% / cover no-repeat; animation: yuleBurns 26s ease-in-out infinite alternate; }
@keyframes yuleBurns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.12) translate(-2%, 1.5%); } }
.yule-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse at 50% 46%, rgba(6,8,20,0.78) 0%, rgba(6,8,20,0.5) 48%, rgba(6,8,20,0.2) 100%),
  linear-gradient(180deg, rgba(6,8,20,0.75) 0%, rgba(6,8,20,0.15) 40%, rgba(6,8,20,0.55) 100%); }
.yule-head { position: relative; text-align: center; }
.yule-head > * { animation: yuleRise 0.9s cubic-bezier(.2,.9,.3,1) both; }
.yule-head > .kicker { animation-delay: 0.05s; } .yule-head > h1 { animation-delay: 0.2s; } .yule-head > .yule-sub { animation-delay: 0.4s; } .yule-head > .yule-musicline { animation-delay: 0.6s; }
@keyframes yuleRise { from { opacity: 0; transform: translateY(26px); } }
.yule-head .kicker { display: block; margin-bottom: 1.1rem; font-family: var(--caps); font-size: 0.74rem; text-transform: uppercase; }
.yule-head .kicker b { position: relative; display: inline-block; font-weight: 400; color: #fff6dc; padding: 0.5rem 1.6rem; background: linear-gradient(180deg, #c8242f, #8d111c); box-shadow: 0 6px 18px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.3), inset 0 0 0 1px rgba(245,200,66,0.75); letter-spacing: 0.3em; }
.yule-head .kicker b::before, .yule-head .kicker b::after { content: ""; position: absolute; top: 6px; width: 22px; height: 100%; background: #6d0a14; z-index: -1; }
.yule-head .kicker b::before { left: -14px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 45% 50%); }
.yule-head .kicker b::after { right: -14px; clip-path: polygon(0 0, 100% 0, 55% 50%, 100% 100%, 0 100%); }
.yule-head h1 { font-family: var(--serif-display); font-weight: 600; font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1.05; margin: 0;
  background: linear-gradient(100deg, #b8862b 0%, #f8d565 28%, #fff6cf 50%, #f5c842 72%, #b8862b 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 2px rgba(0,0,0,0.9)) drop-shadow(0 8px 30px rgba(0,0,0,0.9)) drop-shadow(0 0 40px rgba(245,200,66,0.4)); animation: yuleRise 0.9s cubic-bezier(.2,.9,.3,1) 0.2s both, giltSlide 7s linear infinite; }
.yule-head .yule-sub { font-family: var(--serif-display); font-style: italic; font-size: clamp(1.15rem, 2.4vw, 1.5rem); color: #fff; text-shadow: 0 2px 10px #000, 0 0 24px rgba(0,0,0,0.9); margin: 0.6rem auto 0; max-width: 700px; }
.yule-preview { display: inline-block; margin: 0.9rem auto 0; padding: 0.4rem 1rem; border: 1px dashed rgba(245,200,66,0.6); border-radius: 999px; font-size: 0.92rem; color: #ffe9a8; background: rgba(20,14,6,0.55); }
.yule-preview[hidden] { display: none; }
.yule-musicline { margin: 1.2rem 0 0; }
.yule-music { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.6rem 1.4rem; border-radius: 999px; cursor: pointer; font: inherit; color: #fff6dc; border: 1px solid rgba(245,200,66,0.85); background: linear-gradient(180deg, rgba(31,110,60,0.95), rgba(12,60,30,0.95)); box-shadow: 0 6px 20px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.25); transition: transform 0.25s, box-shadow 0.25s; }
.yule-music:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(245,200,66,0.5), 0 8px 22px rgba(0,0,0,0.55); }
.yule-music span { font-size: 1.25rem; line-height: 1; color: #ffe08a; display: inline-block; }
.yule-music b { font-family: var(--caps); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; }
.yule-music.on { background: linear-gradient(180deg, #c8242f, #8d111c); }
.yule-music.on span { animation: yuleBell 0.9s ease-in-out infinite; }
@keyframes yuleBell { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
/* a wishing star crosses the sky now and then */
.yule-star { position: absolute; top: -6px; left: 0; width: 150px; height: 2px; border-radius: 2px; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, rgba(255,240,190,0.9) 80%, #fff); transform: rotate(14deg); animation: yuleStar 11s linear infinite 3s !important; }
.yule-star::after { content: ""; position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px 4px rgba(255,236,170,0.95); }
@keyframes yuleStar { 0% { opacity: 0; transform: translate(-10vw, 0) rotate(14deg); } 2% { opacity: 1; } 11% { opacity: 1; } 13%, 100% { opacity: 0; transform: translate(105vw, 26vw) rotate(14deg); } }

/* ---------- status ribbon and countdown ---------- */
.yule-wrap { max-width: 1240px; margin: 0 auto; padding: 0.6rem 1.2rem 4.5rem; position: relative; }
.yule-status { display: table; position: relative; margin: 0 auto; padding: 0.55rem 2.2rem; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.6); font-family: var(--serif-display); font-size: clamp(1.1rem, 2.4vw, 1.5rem); text-align: center; max-width: calc(100% - 1rem);
  background: linear-gradient(180deg, #1f7a40, #0e4a25); box-shadow: 0 8px 22px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.25), inset 0 0 0 1px rgba(245,200,66,0.7); border-radius: 4px; animation: yuleRise 0.9s cubic-bezier(.2,.9,.3,1) 0.7s both; }
.yule-status:empty { display: none; }
.yule-countdown { display: flex; justify-content: center; gap: clamp(0.5rem, 2vw, 1.3rem); margin: 1.5rem auto 0; perspective: 600px; }
.yule-countdown[hidden] { display: none; }
.yule-countdown div { position: relative; width: clamp(74px, 17vw, 118px); aspect-ratio: 1 / 0.92; margin-top: 22px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: repeating-linear-gradient(92deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 11px), linear-gradient(180deg, #8a5a2a, #5c3814 60%, #40260c);
  box-shadow: inset 0 0 0 2px #2a1707, inset 0 0 0 4px rgba(245,200,66,0.75), inset 0 0 0 5px #2a1707, 0 12px 24px rgba(0,0,0,0.6); transform-origin: 50% -24px; animation: yuleSway 5s ease-in-out infinite; }
.yule-countdown div:nth-child(2) { animation-delay: -1.2s; } .yule-countdown div:nth-child(3) { animation-delay: -2.6s; } .yule-countdown div:nth-child(4) { animation-delay: -3.7s; }
@keyframes yuleSway { 0%, 100% { transform: rotate(-2.2deg); } 50% { transform: rotate(2.2deg); } }
.yule-countdown div::before { content: ""; position: absolute; left: 22%; top: -24px; width: 56%; height: 24px; background: linear-gradient(#c9a35a, #8a6a2c) no-repeat 0 0 / 3px 100%, linear-gradient(#c9a35a, #8a6a2c) no-repeat 100% 0 / 3px 100%; }
.yule-countdown div::after { content: ""; position: absolute; left: 0; top: -7px; width: 100%; height: 14px; border-radius: 50% 50% 46% 46% / 70% 70% 30% 30%; background: linear-gradient(180deg, #fff, #dfe9fb); box-shadow: 0 2px 3px rgba(20,40,90,0.45); }
.yule-countdown b { display: block; width: 100%; text-align: center; font-family: var(--caps); font-weight: 600; font-size: clamp(1.6rem, 5vw, 2.7rem); line-height: 1; color: #ffe08a; text-shadow: 0 2px 0 #2a1707, 0 0 14px rgba(245,200,66,0.45); font-variant-numeric: tabular-nums; }
.yule-countdown b.tick { animation: yuleTick 0.45s cubic-bezier(.2,1.4,.4,1); }
@keyframes yuleTick { from { transform: translateY(-45%) rotateX(80deg); opacity: 0; } }
.yule-countdown span { display: block; width: 100%; text-align: center; margin-top: 0.3rem; font-family: var(--caps); font-size: clamp(0.5rem, 1.3vw, 0.66rem); letter-spacing: 0.2em; text-transform: uppercase; color: #f3e6bf; }

/* ---------- the calendar ---------- */
.yule-frame { position: relative; margin: clamp(3.2rem, 7vw, 5.2rem) auto 0; width: 100%; max-width: 1180px; padding: 14px; border-radius: 22px; transition: transform 0.35s ease-out; transform-style: preserve-3d; will-change: transform;
  background: linear-gradient(100deg, #6e4a0c 0%, #f5c842 14%, #fffbe0 24%, #f5c842 34%, #8a5d12 52%, #f5c842 70%, #fffbe0 82%, #c99a2e 92%, #6e4a0c 100%); background-size: 300% 100%; animation: yuleEdge 9s linear infinite, yuleFrameIn 1.1s cubic-bezier(.2,.9,.3,1) 0.15s both;
  box-shadow: 0 0 0 1px #3d2a06, 0 0 80px rgba(245,200,66,0.28), 0 34px 90px rgba(0,0,0,0.7); }
@keyframes yuleEdge { to { background-position: -300% 0; } }
@keyframes yuleFrameIn { from { opacity: 0; transform: translateY(40px) scale(0.96); } }
.yule-frame::before { content: ""; position: absolute; inset: 7px; border-radius: 16px; border: 1px solid rgba(60,38,4,0.75); pointer-events: none; z-index: 3; }
.yule-garland { position: absolute; left: -2.5%; top: 0; width: 105%; max-width: none; height: auto; transform: translateY(-47%); z-index: 6; pointer-events: none; filter: drop-shadow(0 8px 10px rgba(0,0,0,0.55)); animation: yuleGarland 1.2s cubic-bezier(.3,1.5,.5,1) 0.5s both; }
@keyframes yuleGarland { from { opacity: 0; transform: translateY(-120%); } }
.yule-scene { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: radial-gradient(ellipse at 50% 40%, #2a1a10 0%, #150d08 70%, #0c0705 100%); box-shadow: inset 0 0 0 2px #2a1c04; }
.yule-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5; box-shadow: inset 0 0 70px rgba(4,6,16,0.8); border-radius: inherit; }
.yule-scene::before { content: none; }
@keyframes yuleFire { 0%, 100% { opacity: 0.55; } 22% { opacity: 0.95; } 41% { opacity: 0.6; } 63% { opacity: 1; } 80% { opacity: 0.7; } }
.yule-spark { position: absolute; z-index: 6; width: 14px; height: 14px; margin: -7px 0 0 -7px; pointer-events: none; opacity: 0; background: radial-gradient(circle, #fff 0 18%, rgba(255,236,170,0.9) 19% 30%, transparent 62%); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); animation: yuleSpark 3.6s ease-in-out infinite; }
@keyframes yuleSpark { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); } 50% { opacity: 1; transform: scale(1.25) rotate(45deg); } }

/* ---------- each day is its own little door in the bark of the Oak ---------- */
.yule-door { position: absolute; z-index: 2; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; font: inherit; color: inherit; }
.yule-door:focus-visible { outline: 3px solid #fff; outline-offset: -4px; border-radius: 14px; }
.yule-door.enter { animation: yuleDrop 0.8s cubic-bezier(.3,1.45,.5,1) both; }
@keyframes yuleDrop { from { opacity: 0; transform: translateY(-40px) scale(0.6) rotate(-6deg); } }
/* the pictures melt into one another at their edges, so the calendar reads as one great tree */
.yule-tile { position: absolute; inset: -3%; display: block; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%); transition: transform 0.4s; }
.yule-tile-in { position: absolute; inset: 0; display: block; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 93%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 7%, #000 93%, transparent 100%); }
.yule-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: filter 0.4s, opacity 0.9s ease; }
.yule-wide { opacity: 0; }
.yule-door.open .yule-wide { opacity: 1; }
.yule-glowin { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 46% 40% at 50% 54%, rgba(255,214,110,0.8), rgba(255,190,70,0.28) 55%, transparent 75%); mix-blend-mode: screen; }
.yule-door.locked .yule-tile img { filter: brightness(0.72) saturate(0.8); }
.yule-door.ready .yule-glowin { animation: yuleBreathe 4.5s ease-in-out infinite; }
.yule-door.ready:nth-child(3n) .yule-glowin { animation-delay: -1.5s; } .yule-door.ready:nth-child(3n+1) .yule-glowin { animation-delay: -3s; }
@keyframes yuleBreathe { 0%, 100% { opacity: 0; } 50% { opacity: 0.7; } }
/* today's door: brighter, breathing with light, a touch larger */
.yule-door.today { z-index: 4; }
.yule-door.today .yule-tile { animation: yuleTodayTile 1.8s ease-in-out infinite; }
@keyframes yuleTodayTile { 0%, 100% { transform: scale(1.03); } 50% { transform: scale(1.1); } }
.yule-door.today .yule-tile img { filter: brightness(1.18) saturate(1.12); }
.yule-door.today .yule-glowin { animation: yuleTodayLight 1.8s ease-in-out infinite; }
@keyframes yuleTodayLight { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.yule-door.open .yule-glowin { animation: yuleBreathe 5s ease-in-out infinite; }
@media (hover: hover) { .yule-door:not(.locked):hover .yule-tile { transform: scale(1.07); } .yule-door:not(.locked):hover .yule-tile img { filter: brightness(1.2); } .yule-door.locked:hover .yule-tile img { filter: brightness(0.86) saturate(0.85); } }
/* the day's number, on a little gold plaque */
.yule-door b { position: absolute; left: 50%; bottom: 5%; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; justify-content: center; width: calc(var(--num, 22px) * 2.1); height: calc(var(--num, 22px) * 2.1); border-radius: 50%;
  font-family: var(--caps); font-weight: 700; font-size: var(--num, 22px); line-height: 1; letter-spacing: -0.02em; color: #ffe9a8; text-shadow: 0 1px 2px #000;
  background: radial-gradient(circle at 50% 32%, #2b3f7c, #0b1430 78%); box-shadow: 0 0 0 2px #f1c758, 0 0 0 3.5px #5a3a08, 0 4px 10px rgba(0,0,0,0.7); }
.yule-door.locked b { color: #d9cba0; box-shadow: 0 0 0 2px #b9973f, 0 0 0 3.5px #3a2606, 0 4px 10px rgba(0,0,0,0.7); }
.yule-door.today b { color: #fff; box-shadow: 0 0 0 2px #fff3c4, 0 0 0 3.5px #8a5d12, 0 0 18px rgba(255,214,90,0.95), 0 4px 10px rgba(0,0,0,0.7); }
.yule-door.yule-eve b { background: radial-gradient(circle at 50% 32%, #c8303d, #6d0f1a 78%); }
/* once a door is open, its surprise shows in a little medallion */
.yule-medal { position: absolute; right: 8%; top: 7%; z-index: 3; width: 38%; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.3); transition: opacity 0.5s 0.4s, transform 0.6s cubic-bezier(.3,1.6,.5,1) 0.4s;
  background: radial-gradient(circle at 50% 40%, #fff6cf, #f5c842 60%, #b8862b); box-shadow: 0 0 0 2px #fff3c4, 0 0 0 4px #8a5d12, 0 0 16px rgba(255,214,90,0.8), 0 5px 12px rgba(0,0,0,0.6); }
.yule-medal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yule-door.open .yule-medal { opacity: 1; transform: none; }
.yule-glyph { font-family: var(--serif-display); font-weight: 600; font-size: calc(var(--num, 22px) * 1.5); line-height: 1; color: #5a2c04; }
.yule-door.nope { animation: yuleNope 0.5s; }
@keyframes yuleNope { 20% { transform: translateX(-5px) rotate(-2deg); } 40% { transform: translateX(5px) rotate(2deg); } 60% { transform: translateX(-3px) rotate(-1deg); } 80% { transform: translateX(3px); } }

/* ---------- Faith, and the little folk under the calendar ---------- */
.yule-fairy { position: fixed; left: 0; top: 0; z-index: 120; width: clamp(64px, 8vw, 110px); height: auto; pointer-events: none; opacity: 0; transition: opacity 0.5s; filter: drop-shadow(0 0 14px rgba(255,226,140,0.85)) drop-shadow(0 6px 10px rgba(0,0,0,0.5)); will-change: transform; }
.yule-cast { position: relative; z-index: 4; display: flex; justify-content: center; align-items: flex-start; gap: clamp(0.5rem, 2.4vw, 1.9rem); margin: 1.8rem auto 0; padding: 0 0.3rem; max-width: 1040px; }
.yule-win { position: relative; margin: 0; flex: 0 1 clamp(92px, 16.5vw, 178px); min-width: 0; text-align: center; animation: yuleCastIn 0.9s cubic-bezier(.3,1.5,.5,1) both, yuleFloat 5s ease-in-out infinite; }
.yule-win:nth-child(1) { animation-delay: 1.4s, -0.5s; } .yule-win:nth-child(2) { animation-delay: 1.55s, -2.1s; } .yule-win:nth-child(3) { animation-delay: 1.7s, -1.2s; } .yule-win:nth-child(4) { animation-delay: 1.85s, -3.3s; } .yule-win:nth-child(5) { animation-delay: 2s, -4.1s; }
@keyframes yuleCastIn { from { opacity: 0; transform: translateY(60px) scale(0.7); } }
@keyframes yuleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.yule-win-pic { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; border-radius: 50% 50% 8px 8px / 37.5% 37.5% 6px 6px; overflow: hidden; background: #0b1424;
  box-shadow: 0 0 0 3px #f1c758, 0 0 0 6px #3b2410, 0 0 0 8px #170d04, 0 0 30px rgba(255,200,90,0.45), 0 14px 26px rgba(0,0,0,0.65); transform: translateZ(0); }
.yule-win-pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(40,24,6,0.8), inset 0 0 26px rgba(10,8,20,0.65); z-index: 3; }
.yule-win-pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.8s ease; }
.yule-win-pic video.on { opacity: 1; z-index: 1; }
.yule-win::before { content: ""; position: absolute; left: -4%; right: -4%; top: -5px; height: 46%; z-index: 4; pointer-events: none; background: url("../img/advent/snow.webp") top center / 100% auto no-repeat; filter: drop-shadow(0 2px 2px rgba(10,20,50,0.5)); }
.yule-win.turning .yule-win-pic { animation: yuleTurn 0.9s ease; }
@keyframes yuleTurn { 40% { box-shadow: 0 0 0 3px #fff3c4, 0 0 0 6px #3b2410, 0 0 0 8px #170d04, 0 0 60px 14px rgba(255,214,90,0.95), 0 14px 26px rgba(0,0,0,0.65); } }
.yule-win figcaption { display: inline-block; max-width: 100%; margin-top: 0.75rem; padding: 0.22rem 0.7rem; border-radius: 4px; font-family: var(--caps); font-size: clamp(0.56rem, 1.25vw, 0.72rem); letter-spacing: 0.14em; text-transform: uppercase; color: #ffe9a8; line-height: 1.25;
  background: repeating-linear-gradient(92deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 11px), linear-gradient(180deg, #7a4f24, #4a2c10); box-shadow: inset 0 0 0 1px rgba(245,200,66,0.6), 0 5px 12px rgba(0,0,0,0.5); }
.yule-cast.hop .yule-win { animation: yuleHop 0.7s cubic-bezier(.3,1.6,.5,1) 2; }
.yule-cast.hop .yule-win:nth-child(2) { animation-delay: 0.08s; } .yule-cast.hop .yule-win:nth-child(3) { animation-delay: 0.16s; } .yule-cast.hop .yule-win:nth-child(4) { animation-delay: 0.24s; } .yule-cast.hop .yule-win:nth-child(5) { animation-delay: 0.32s; }
@keyframes yuleHop { 0%, 100% { transform: translateY(0) scale(1, 1); } 30% { transform: translateY(-26px) scale(0.97, 1.04) rotate(-2deg); } 60% { transform: translateY(0) scale(1.04, 0.96); } }

/* ---------- the day's door fills the screen and swings open ---------- */
.yule-cine { position: fixed; inset: 0; z-index: 150; background: #0a0703; opacity: 0; transition: opacity 0.3s; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.yule-cine[hidden] { display: none; }
.yule-cine.on { opacity: 1; }
.yule-cine.out { opacity: 0; transition: opacity 0.7s; }
.yule-cine-bg { position: absolute; inset: -8%; background: center / cover no-repeat; filter: blur(26px) brightness(0.45) saturate(1.2); transform: scale(1.1); }
.yule-cine-door { position: relative; height: min(90vh, 138vw); height: min(90dvh, 138vw); aspect-ratio: 2 / 3; border-radius: 18px; overflow: hidden; background: #0b1424 center / cover no-repeat; transition: transform 0.6s cubic-bezier(.3,1.05,.4,1);
  box-shadow: 0 0 0 2px #f1c758, 0 0 0 5px #3b2410, 0 0 90px rgba(255,200,90,0.55), 0 30px 80px rgba(0,0,0,0.8); will-change: transform; }
.yule-cine-door video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: transparent; }
.yule-cine-door::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse 50% 44% at 50% 56%, #fffbe0, rgba(255,214,110,0.85) 45%, rgba(255,190,70,0) 75%); mix-blend-mode: screen; transition: opacity 1.2s ease-in; }
.yule-cine.glow .yule-cine-door::after { opacity: 1; }
.yule-cine-num { position: absolute; left: 0; right: 0; top: 8%; margin: 0; z-index: 2; text-align: center; font-family: var(--serif-display); font-weight: 600; font-size: clamp(2.2rem, 7vw, 4.6rem); line-height: 1; color: #fff6cf; pointer-events: none; text-shadow: 0 4px 2px rgba(0,0,0,0.85), 0 0 30px rgba(0,0,0,0.9), 0 0 60px rgba(245,200,66,0.7); animation: yuleCineNum 2.4s ease-out both; }
.yule-cine-num span { display: block; margin-bottom: 0.5rem; font-family: var(--caps); font-weight: 400; font-size: clamp(0.7rem, 1.8vw, 1rem); letter-spacing: 0.4em; text-transform: uppercase; color: #ffe08a; }
@keyframes yuleCineNum { 0% { opacity: 0; transform: scale(0.7); } 22% { opacity: 1; transform: scale(1); } 72% { opacity: 1; } 100% { opacity: 0; transform: scale(1.2); } }
.yule-cine-skip { position: absolute; left: 0; right: 0; bottom: 7%; margin: 0; z-index: 2; text-align: center; font-family: var(--caps); font-size: 0.68rem; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255,246,207,0.85); text-shadow: 0 2px 6px #000; pointer-events: none; animation: yuleSkip 1.6s ease-in-out 1.2s infinite both; }
@keyframes yuleSkip { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.95; } }
.yule-cine-flash { position: absolute; inset: 0; z-index: 3; opacity: 0; background: radial-gradient(circle at 50% 50%, #fff 0%, #fff3c4 40%, #f5c842 100%); transition: opacity 0.38s ease-in; pointer-events: none; }
.yule-cine.flash .yule-cine-flash { opacity: 1; }

/* ---------- progress, note, toast ---------- */
.yule-progress { text-align: center; margin-top: 1.6rem; }
.yule-stars { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; max-width: 520px; margin: 0 auto 0.5rem; }
.yule-stars i { width: 14px; height: 14px; border-radius: 50%; background: rgba(255,255,255,0.1); box-shadow: inset 0 0 0 1px rgba(245,200,66,0.4); transition: all 0.5s; }
.yule-stars i.on { background: radial-gradient(circle, #fff6cf, #f5c842 60%, #b8862b); box-shadow: 0 0 12px rgba(245,200,66,0.9); animation: yuleBulb 2.4s ease-in-out infinite; }
.yule-stars i.on:nth-child(3n+1) { background: radial-gradient(circle, #ffd0d0, #e02a38 60%, #8f111d); box-shadow: 0 0 12px rgba(230,50,60,0.9); animation-delay: -0.8s; }
.yule-stars i.on:nth-child(3n+2) { background: radial-gradient(circle, #d0ffe0, #2aa858 60%, #0f5a2b); box-shadow: 0 0 12px rgba(50,190,100,0.9); animation-delay: -1.6s; }
@keyframes yuleBulb { 50% { opacity: 0.55; transform: scale(0.86); } }
.yule-count { font-family: var(--caps); letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.78rem; color: #ffe9a8; text-shadow: 0 2px 6px rgba(0,0,0,0.7); }
.yule-note { text-align: center; max-width: 640px; margin: 1rem auto 0; font-size: 0.98rem; color: #e8e2d2; text-shadow: 0 1px 4px rgba(0,0,0,0.7); }
.yule-toast { position: fixed; left: 50%; bottom: 1.6rem; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 160; max-width: calc(100vw - 2rem); padding: 0.75rem 1.4rem; border-radius: 999px;
  font-family: var(--serif-display); font-size: 1.15rem; color: #1a1204; background: linear-gradient(100deg, #f5c842, #fff3c4, #f5c842); box-shadow: 0 10px 40px rgba(0,0,0,0.6); transition: opacity 0.3s, transform 0.3s; text-align: center; }
.yule-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the surprise behind the door ---------- */
.yule-modal { position: fixed; inset: 0; z-index: 130; display: flex; align-items: center; justify-content: center; padding: 1rem; background: rgba(3,6,16,0.84); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); opacity: 0; transition: opacity 0.35s; overflow: hidden; perspective: 1400px; }
.yule-modal[hidden] { display: none; }
.yule-modal.open { opacity: 1; }
.yule-modal::before { content: ""; position: absolute; left: 50%; top: 50%; width: 180vmax; height: 180vmax; margin: -90vmax 0 0 -90vmax; pointer-events: none; opacity: 0.2;
  background: repeating-conic-gradient(from 0deg, rgba(255,226,140,0.9) 0deg 5deg, transparent 5deg 15deg); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 46%); mask-image: radial-gradient(circle, #000 0%, transparent 46%); animation: yuleRays 40s linear infinite; }
@keyframes yuleRays { to { transform: rotate(360deg); } }
.yule-card { position: relative; width: min(100%, 560px); max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem); overflow-y: auto; border-radius: 24px; border: 2px solid transparent; padding: 1.7rem 1.6rem 1.5rem; text-align: center;
  background: linear-gradient(180deg, #17264d 0%, #0a1226 100%) padding-box, linear-gradient(100deg, #8a5d12 0%, #f5c842 18%, #fffbe0 30%, #f5c842 42%, #8a5d12 60%, #f5c842 78%, #fffbe0 90%, #8a5d12 100%) border-box;
  box-shadow: 0 0 90px rgba(245,200,66,0.4), 0 30px 80px rgba(0,0,0,0.75); transform: scale(0.5) rotateY(70deg) translateY(30px); opacity: 0; transition: transform 0.75s cubic-bezier(.2,1.3,.4,1), opacity 0.4s; scrollbar-width: none; }
.yule-modal.open .yule-card { transform: none; opacity: 1; }
.yule-close { position: absolute; top: 0.7rem; right: 0.7rem; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(245,200,66,0.7); background: rgba(6,10,24,0.7); color: #ffe9a8; font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 2; }
.yule-close:hover { background: #f5c842; color: #1a1204; }
.yule-treat > * { animation: yuleRise 0.7s cubic-bezier(.2,.9,.3,1) both; }
.yule-treat > *:nth-child(1) { animation-delay: 0.35s; } .yule-treat > *:nth-child(2) { animation-delay: 0.45s; } .yule-treat > *:nth-child(3) { animation-delay: 0.6s; } .yule-treat > *:nth-child(4) { animation-delay: 0.75s; } .yule-treat > *:nth-child(n+5) { animation-delay: 0.9s; }
.at-date { margin: 0 0 0.5rem; }
.at-date span { display: inline-block; padding: 0.28rem 1.1rem; border-radius: 999px; font-family: var(--caps); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: #fff; background: linear-gradient(180deg, #b52634, #7c121d); box-shadow: 0 0 0 1px #f5c842, 0 4px 14px rgba(0,0,0,0.5); }
.yule-treat h2 { font-family: var(--serif-display); font-weight: 600; font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.1; margin: 0 0 1rem;
  background: linear-gradient(100deg, #b8862b 0%, #f8d565 28%, #fff6cf 50%, #f5c842 72%, #b8862b 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: yuleRise 0.7s cubic-bezier(.2,.9,.3,1) 0.45s both, giltSlide 6s linear infinite; }
.at-film { width: min(100%, 360px); aspect-ratio: 1 / 1; margin: 0 auto 1rem; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 2px #f5c842, 0 0 40px rgba(245,200,66,0.35); background: #0b1424; }
.at-film video { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-pic { margin: 0 auto 1rem; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 2px #f5c842, 0 0 34px rgba(245,200,66,0.3); background: #fff; width: fit-content; max-width: 100%; }
.at-pic img { display: block; max-width: 100%; max-height: 44vh; width: auto; height: auto; margin: 0 auto; }
.at-scene img, .at-fact img { animation: yuleKen 12s ease-in-out infinite alternate; }
.at-text { font-family: var(--serif-display); font-size: clamp(1.2rem, 3vw, 1.42rem); line-height: 1.4; color: #fff6dc; margin: 0 auto; max-width: 30em; }
.at-extra { margin: 0.9rem auto 0; padding: 0.7rem 1rem; border-radius: 12px; border: 1px dashed rgba(245,200,66,0.55); background: rgba(245,200,66,0.07); color: #ffe9a8; font-style: italic; }
.at-verse { margin: 1rem auto 0; font-family: var(--serif-display); font-style: italic; font-size: 1.25rem; color: #ffe9a8; }
.at-verse span { display: block; margin-top: 0.3rem; font-style: normal; font-family: var(--caps); font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--moon); }
.at-riddle { margin: 0 auto 0.4rem; padding: 1.3rem 1.1rem; border-radius: 16px; background: linear-gradient(180deg, #fbf1d3, #ecd9a6); color: #2a1c08; box-shadow: inset 0 0 30px rgba(120,80,20,0.35), 0 10px 30px rgba(0,0,0,0.45); }
.at-q { font-family: var(--serif-display); font-style: italic; font-weight: 600; font-size: clamp(1.3rem, 3.4vw, 1.6rem); line-height: 1.35; margin: 0 0 1rem; }
.at-a { margin: 0; font-family: var(--serif-display); font-weight: 700; font-size: clamp(1.7rem, 5vw, 2.3rem); color: #8a1420; animation: yulePop 0.6s cubic-bezier(.2,1.6,.4,1); }
.at-a[hidden], .at-reveal[hidden] { display: none; }
@keyframes yulePop { from { transform: scale(0.4); opacity: 0; } }
.at-kind { width: 120px; height: 120px; margin: 0 auto 1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 3.6rem; color: #fff6cf; background: radial-gradient(circle at 50% 38%, #f8d565, #c98a1c 62%, #7a4c08); box-shadow: 0 0 0 3px #fff3c4, 0 0 60px rgba(245,200,66,0.75); animation: yuleRise 0.7s both 0.6s, yuleLantern 3s ease-in-out infinite 1.3s; }
@keyframes yuleLantern { 50% { box-shadow: 0 0 0 3px #fff, 0 0 90px rgba(255,214,90,1); transform: translateY(-4px); } }
.at-type-kind .at-text { font-size: clamp(1.4rem, 3.6vw, 1.75rem); font-style: italic; }
.at-audio { display: flex; align-items: center; gap: 0.9rem; margin: 1.1rem auto 0; max-width: 380px; }
.at-play { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 2px solid #fff0b8; cursor: pointer; font-size: 1.25rem; color: #1a1204; background: linear-gradient(100deg, #f5c842, #fff3c4, #f5c842); box-shadow: 0 0 26px rgba(245,200,66,0.65); animation: yulePulse 1.8s ease-in-out infinite; }
@keyframes yulePulse { 50% { box-shadow: 0 0 46px rgba(245,200,66,1); transform: scale(1.06); } }
.at-bar { flex: 1; height: 8px; border-radius: 8px; background: rgba(255,255,255,0.14); overflow: hidden; }
.at-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #b8862b, #f5c842, #fff3c4); border-radius: 8px; }
.at-go { margin: 1.2rem 0 0; }
.at-go .btn { padding: 0.85rem 1.7rem; }
.at-next { margin: 1.1rem 0 0; font-size: 0.92rem; color: var(--moon); font-style: italic; }

@media (max-width: 680px) {
  .yule-hero { padding: 1.8rem 0.8rem 2.8rem; } .yule-hero-bg { background-position: 70% 40%; }
  .yule-head .kicker b { letter-spacing: 0.16em; font-size: 0.6rem; padding: 0.45rem 0.9rem; }
  .yule-wrap { padding: 0.4rem 0.7rem 3.5rem; }
  .yule-status { padding: 0.5rem 1rem; }
  .yule-frame { padding: 9px; border-radius: 16px; }
  .yule-frame::before { inset: 4px; border-radius: 12px; }
  .yule-garland { left: -30%; width: 160%; transform: translateY(-46%); }
  @keyframes yuleGarland { from { opacity: 0; transform: translateY(-120%); } }
  .yule-card { padding: 1.5rem 1.1rem 1.3rem; border-radius: 20px; }
  .yule-stars { gap: 4px; } .yule-stars i { width: 9px; height: 9px; }
  .yule-cast { margin-top: 1.4rem; gap: 0.7rem; } .yule-win { flex-basis: 30%; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .yule-hero { padding: 1rem 1rem 3.2rem; } .yule-head .yule-sub { display: none; } .yule-head h1 { font-size: 2rem; }
  .yule-card { width: min(100%, 720px); padding: 1.1rem 1.2rem; }
  .at-film { width: 170px; float: left; margin: 0 1.1rem 0.4rem 0; }
  .at-pic img { max-height: 46vh; }
  .yule-treat h2 { font-size: 1.6rem; margin-bottom: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .yule-head > *, .yule-head h1, .yule-status, .yule-frame, .yule-garland, .yule-hero-bg, .yule-star, .yule-countdown div, .yule-scene::before, .yule-spark, .yule-door, .yule-door .yule-tile, .yule-door .yule-glowin, .yule-cine-num, .yule-cine-skip, .yule-win, .yule-stars i.on, .yule-modal::before, .yule-treat > *, .yule-treat h2, .at-kind, .at-play, .at-pic img, .yule-music.on span { animation: none !important; }
  .yule-spark { opacity: 0.8; } .yule-star, .yule-fairy { display: none; }
  .yule-card { transition: opacity 0.3s; transform: none; }
}
@media print { #yuleFx, .yule-toast, .yule-fairy, .yule-cine { display: none; } }
.yule-cine { background: #0a0703 url("../img/advent/door-poster.jpg") center / cover no-repeat; }
.yule-door.locked .yule-front { filter: brightness(0.9) saturate(0.9); }

/* ---------- phone and tablet ---------- */
.yule-door { touch-action: manipulation; }
@media (max-width: 900px) {
  .yule-frame { animation: yuleFrameIn 1.1s cubic-bezier(.2,.9,.3,1) 0.15s both; background-size: 100% 100%; transform: none !important; }
  .yule-hero-bg { animation: none; }
  .yule-modal { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(3,6,16,0.92); }
  .yule-modal::before { animation: none; opacity: 0.14; }
  .yule-fairy { width: clamp(58px, 13vw, 96px); }
}
@media (max-width: 680px) {
  .yule-head h1 { font-size: clamp(2.1rem, 10.5vw, 3rem); }
  .yule-head .yule-sub { font-size: 1.08rem; }
  .yule-music { padding: 0.7rem 1.3rem; }
  .yule-countdown div { width: clamp(66px, 20vw, 96px); }
  .yule-toast { font-size: 1.02rem; bottom: 1rem; border-radius: 18px; }
  .yule-close { width: 46px; height: 46px; }
  .yule-note { font-size: 0.94rem; padding: 0 0.4rem; }
  .yule-cine-num { top: 12%; }
}

/* v148 · phones and tablets: readable labels */
@media (max-width: 1200px) { .yule-head .kicker b { font-size: 0.68rem; } .yule-win figcaption { font-size: 0.68rem; } }
