/* Open storybook composition. Independent ornaments, never a stretched border. */
.halloween-story-art{translate:calc(var(--halloween-depth-x,0px) * -.38) calc(var(--halloween-depth-y,0px) * -.3)}
.halloween-lanterns{translate:calc(var(--halloween-depth-x,0px) * .28) 0}
.halloween-branch{translate:calc(var(--halloween-depth-x,0px) * .12) calc(var(--halloween-depth-y,0px) * .1)}
.halloween-theme{--bg:#faf5eb;--surface:#fffcf6;--ink:#302b36;--muted:#776b78;--line:#dfd6d6;--accent:#865438;--accent-text:#fff;--soft:#f0e9e2;--shelf-gutter:clamp(32px,5.4vw,88px);--halloween-orange:#a94d26;--witch-width:210px;position:relative;isolation:isolate}
html[data-theme=dark] .halloween-theme{--bg:#191b1c;--surface:#222528;--ink:#f0e8d9;--muted:#b8b1b8;--line:#3a3b3e;--accent:#e3ad76;--accent-text:#251d19;--soft:#2c2b2d;--halloween-orange:#edb276}
.halloween-atmosphere,.halloween-lanterns,.halloween-sky,.halloween-motes{pointer-events:none;user-select:none}
.halloween-atmosphere{position:absolute;inset:0 0 auto;height:480px;overflow:hidden;z-index:-1;background:radial-gradient(ellipse at 78% 10%,#98614b14,transparent 60%)}
.halloween-branch{position:absolute;top:-105px;left:-32px;width:310px;aspect-ratio:2.2;background:url('./halloween-branch-v2.webp') center/contain no-repeat;transform-origin:0 0;animation:halloween-branch-breathe 13s cubic-bezier(.45,0,.55,1) infinite alternate}
.halloween-moon{position:absolute;top:12px;right:21%;width:62px;height:62px;border-radius:50%;background:#e7c895;opacity:.55;mask:radial-gradient(circle 30px at 66% 30%,transparent 98%,#000);transform:rotate(-16deg)}
.halloween-lanterns{position:absolute;inset:0 0 auto;height:164px;overflow:hidden;z-index:1}
.halloween-lantern{position:absolute;left:9px;top:-44px;width:56px;aspect-ratio:1/2;background:url('./halloween-lantern-v2.webp') center/contain no-repeat;transform-origin:50% 2%;animation:halloween-lantern-swing 7.4s cubic-bezier(.42,0,.58,1) infinite;animation-delay:-2.1s}
.halloween-lantern::after{content:"";position:absolute;inset:58% 21% 7%;border-radius:50%;background:#ffab2930;opacity:.6;animation:halloween-lantern-warmth 4.8s ease-in-out infinite alternate}
.halloween-lantern--far{left:auto;right:12px;top:-22px;width:42px;animation-duration:9.3s;animation-delay:-5.2s;opacity:.8}
@keyframes halloween-branch-breathe{from{transform:rotate(-.5deg)}to{transform:rotate(.8deg)}}
@keyframes halloween-lantern-swing{0%,100%{transform:rotate(-4deg)}50%{transform:rotate(3.2deg)}}
@keyframes halloween-lantern-warmth{0%,100%{opacity:.36}46%{opacity:.72}70%{opacity:.52}}
.halloween-theme .topbar{height:auto;min-height:172px;padding-top:100px;border-bottom-color:var(--line)}
.halloween-theme .brand-mark{box-shadow:none}.halloween-theme .brand-name{color:var(--ink);background:none;animation:none}
.halloween-theme .nav-link.active{border-bottom-color:var(--halloween-orange)}
.halloween-theme .nav-link{transition:color .2s,border-color .2s}
.halloween-theme .nav-link:hover:not(.active){border-bottom-color:transparent;color:var(--ink)}
.halloween-theme .page,.halloween-theme.is-ranking .page{padding-top:12px}.halloween-theme .translation-hint{margin-top:0}
.halloween-season{position:relative;margin:0 0 12px}
.halloween-welcome{position:relative;isolation:isolate;min-height:64px;padding:12px 0;background:none;border:0;border-radius:0;color:var(--ink)}
.halloween-welcome[open]{min-height:286px;padding:30px 0 26px}
.halloween-welcome[open]::before{content:"";position:absolute;z-index:-1;inset:5% -2% 0 40%;border-radius:50%;background:radial-gradient(ellipse,#a76a4730,transparent 68%);opacity:.6;animation:halloween-story-warmth 11s ease-in-out infinite alternate;pointer-events:none}
.halloween-welcome summary{position:relative;z-index:2;display:flex;align-items:center;gap:24px;width:52%;cursor:pointer;list-style:none}
.halloween-welcome summary::-webkit-details-marker{display:none}.halloween-welcome summary::marker{content:""}
.halloween-welcome__title{display:block;font-family:var(--serif);font-size:clamp(25px,2.7vw,37px);font-weight:400;letter-spacing:-.025em;line-height:1.08;animation:halloween-copy-arrive .8s cubic-bezier(.2,.7,.2,1) both}
.halloween-welcome__title>span{display:block}.halloween-welcome__title em{display:block;font-style:normal;font-size:1.65em;color:var(--halloween-orange);line-height:1.03;margin-top:3px}
.halloween-welcome__toggle{flex:none;font-family:var(--font);font-size:18px;line-height:1;color:var(--muted);transform:rotate(180deg);transition:transform .35s}
.halloween-welcome[open] .halloween-welcome__toggle{transform:none}
.halloween-welcome__subtitle{position:relative;z-index:2;max-width:47%;font-size:16px;line-height:1.5;margin:19px 0 6px;color:var(--ink)}
.halloween-welcome__wish{position:relative;z-index:2;width:43%;max-width:39ch;font-size:13px;line-height:1.65;color:var(--muted);margin:0}
.halloween-story-art{position:absolute;right:-8px;top:0;width:51%;max-width:540px;height:292px;pointer-events:none;user-select:none;background:url('./halloween-books-v2.webp') center/contain no-repeat}
.halloween-story-sparks{position:absolute;inset:0;pointer-events:none;user-select:none}
.halloween-story-sparks i{position:absolute;left:62%;top:53%;font-style:normal;font-size:11px;color:#c48a43;animation:halloween-book-spark 6.6s ease-in-out infinite;animation-delay:-2s}
.halloween-story-sparks i:nth-child(2){left:68%;top:43%;font-size:8px;animation-delay:-4.8s;animation-duration:8s}.halloween-story-sparks i:nth-child(3){left:86%;top:59%;font-size:7px;animation-delay:-6s;animation-duration:9s}
.halloween-motion{position:absolute;left:0;right:auto;bottom:16px;z-index:3;min-height:40px;padding:7px 3px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;color:var(--muted);font-size:12px;line-height:1.5}
.halloween-motion:hover{color:var(--ink);border-bottom-color:var(--accent)}.halloween-motion:disabled{cursor:default;opacity:1}
.halloween-welcome:not([open]) .halloween-welcome__title{font-size:25px;animation:none}.halloween-welcome:not([open]) .halloween-welcome__title>span,.halloween-welcome:not([open]) .halloween-welcome__title em{display:inline;font-size:inherit}.halloween-welcome:not([open]) .halloween-welcome__title em{margin-left:5px}
@keyframes halloween-copy-arrive{from{opacity:0;transform:translateY(9px)}to{opacity:1;transform:none}}
@keyframes halloween-story-warmth{from{opacity:.38;transform:scale(.96)}to{opacity:.72;transform:scale(1.03)}}
@keyframes halloween-book-spark{0%,100%{opacity:0;transform:translate3d(-3px,7px,0) scale(.7)}32%{opacity:.6}72%{opacity:.2;transform:translate3d(6px,-14px,0) scale(1.1)}}
/* Curved pass, separate from small banking and drift of the broom. */
.halloween-sky{position:absolute;inset:0 0 auto;height:96px;overflow:hidden;z-index:2;contain:layout paint}
.halloween-witch{position:absolute;top:0;left:calc(-1 * var(--witch-width));width:var(--witch-width);aspect-ratio:3;animation:halloween-flight 38s linear infinite;animation-delay:-8s}
.halloween-witch__art{display:block;width:100%;height:100%;background:url('./halloween-witch-v1.webp') center/contain no-repeat;animation:halloween-facing 38s steps(1,end) infinite,halloween-broom-drift 5.7s cubic-bezier(.45,0,.55,1) infinite alternate;animation-delay:-8s,-1.7s}
@keyframes halloween-flight{0%{transform:translate3d(0,22px,0) rotate(-3deg)}12%{transform:translate3d(calc(28vw + 70px),4px,0) rotate(-1deg)}27%{transform:translate3d(calc(61vw + 160px),8px,0) rotate(3deg)}43%,50%{transform:translate3d(calc(100vw + var(--witch-width) + 30px),-4px,0) rotate(0)}63%{transform:translate3d(calc(68vw + 130px),7px,0) rotate(-3deg)}78%{transform:translate3d(calc(31vw + 65px),2px,0) rotate(2deg)}94%,100%{transform:translate3d(0,22px,0) rotate(0)}}
@keyframes halloween-facing{0%{scale:1 1}50%{scale:-1 1}100%{scale:1 1}}
@keyframes halloween-broom-drift{from{translate:0 -3px;rotate:-1.5deg}to{translate:0 4px;rotate:1.5deg}}
@keyframes halloween-flight-mobile{0%{transform:translate3d(0,0,0)}12%{transform:translate3d(calc(28vw + 70px),-2px,0) rotate(-1deg)}27%{transform:translate3d(calc(61vw + 160px),0,0) rotate(1deg)}43%,50%{transform:translate3d(calc(100vw + var(--witch-width) + 30px),0,0)}63%{transform:translate3d(calc(68vw + 130px),-1px,0) rotate(-1deg)}78%{transform:translate3d(calc(31vw + 65px),0,0) rotate(1deg)}94%,100%{transform:translate3d(0,0,0)}}
@keyframes halloween-broom-mobile{from{translate:0 -1px;rotate:-.8deg}to{translate:0 1px;rotate:.8deg}}
.halloween-bat{position:absolute;left:-60px;top:21px;width:38px;height:18px;animation:halloween-bat-flight 26s linear infinite;animation-delay:-7s}
.halloween-bat i{display:block;width:100%;height:100%;background:url('./halloween-bat-v1.webp') center/contain no-repeat;transform-origin:50% 58%;animation:halloween-wings 1.2s ease-in-out infinite alternate}
.halloween-bat--two{top:7px;width:29px;height:14px;animation-duration:30s;animation-delay:-8s}.halloween-bat--three{top:27px;width:25px;height:13px;animation-duration:28s;animation-delay:-9.2s}
@keyframes halloween-bat-flight{0%{transform:translate3d(-20px,8px,0) rotate(-7deg)}25%{transform:translate3d(calc(24vw + 35px),-4px,0) rotate(6deg)}56%{transform:translate3d(calc(55vw + 50px),12px,0) rotate(-5deg)}100%{transform:translate3d(calc(100vw + 130px),-3px,0) rotate(5deg)}}
@keyframes halloween-wings{from{transform:scaleY(.8) rotate(-3deg)}to{transform:scaleY(1.02) rotate(3deg)}}
.halloween-banner-ghost{position:absolute;right:2%;top:17%;display:block;width:43px;aspect-ratio:192/221;background:url('./halloween-ghost-v1.webp') center/contain no-repeat;animation:halloween-ghost-peek 12.6s cubic-bezier(.4,0,.3,1) infinite;animation-delay:-4s;pointer-events:none;user-select:none}
@keyframes halloween-ghost-peek{0%,100%{transform:translate3d(0,9px,0) rotate(8deg);opacity:.1}25%{transform:translate3d(-6px,-7px,0) rotate(-6deg);opacity:.9}45%,60%{transform:translate3d(-4px,-3px,0) rotate(1deg);opacity:.9}78%{transform:translate3d(2px,7px,0) rotate(7deg);opacity:.2}}
.halloween-motes{position:fixed;inset:0;overflow:hidden;z-index:1;contain:layout paint}
.halloween-motes i{position:absolute;left:2%;top:18%;font-style:normal;color:#bd8a53;font-size:10px;line-height:1;opacity:0;animation:halloween-mote-drift 19s ease-in-out infinite;animation-delay:-5s}
.halloween-motes i:nth-child(2){left:97%;top:43%;font-size:17px;animation-delay:-11s;animation-duration:23s}.halloween-motes i:nth-child(3){left:4%;top:73%;font-size:14px;animation-delay:-8s;animation-duration:21s}.halloween-motes i:nth-child(4){left:94%;top:78%;animation-delay:-17s;animation-duration:24s}.halloween-motes i:nth-child(5){left:20%;top:3%;font-size:14px;animation-delay:-7s;animation-duration:27s}.halloween-motes i:nth-child(6){left:82%;top:7%;animation-delay:-19s;animation-duration:22s}
@keyframes halloween-mote-drift{0%,100%{opacity:0;transform:translate3d(0,8px,0)}28%{opacity:.38}72%{opacity:.08;transform:translate3d(10px,-30px,0)}}
.halloween-paused :is(.halloween-branch,.halloween-lantern,.halloween-witch,.halloween-witch__art,.halloween-bat,.halloween-bat i,.halloween-banner-ghost,.halloween-motes i,.halloween-story-sparks i,.halloween-welcome__title),.halloween-paused .halloween-lantern::after,.halloween-paused .halloween-welcome::before{animation-play-state:paused}
.halloween-still :is(.halloween-sky,.halloween-motes,.halloween-story-sparks){display:none}.halloween-still :is(.halloween-branch,.halloween-lantern,.halloween-banner-ghost,.halloween-welcome__title),.halloween-still .halloween-lantern::after,.halloween-still .halloween-welcome::before{animation:none}.halloween-still .halloween-banner-ghost{opacity:.8}
@media(min-width:1101px) and (max-width:1450px){.halloween-theme .topbar{flex-wrap:wrap;gap:10px 24px;padding-top:100px}.halloween-theme .topbar nav{order:3;flex-basis:100%;overflow-x:auto}}
@media(max-width:1100px){.halloween-theme{--shelf-gutter:32px;--witch-width:218px}.halloween-theme .topbar{gap:14px;padding-top:100px}.halloween-lantern{left:-14px;width:42px;top:-29px}.halloween-lantern--far{left:auto;right:-9px;width:32px;top:-15px}.halloween-story-art{width:49%;right:-10px}.halloween-welcome[open]{min-height:280px}.halloween-welcome__title{font-size:30px}.halloween-welcome__subtitle{max-width:48%;font-size:15px}}
@media(max-width:767px){
 .halloween-theme{--shelf-gutter:20px;--witch-width:144px}.halloween-theme .topbar{min-height:0;padding-top:54px;padding-bottom:0;gap:6px}
 .halloween-atmosphere{height:390px}.halloween-branch{top:-80px;left:-48px;width:240px}.halloween-moon{right:20%;top:9px;width:35px;height:35px;mask:radial-gradient(circle 18px at 66% 30%,transparent 98%,#000);opacity:.38}
 .halloween-lantern{left:auto;right:10px;top:-74px;width:52px}.halloween-lantern--far{display:none}.halloween-sky{height:54px}.halloween-witch{top:2px;animation-name:halloween-flight-mobile}.halloween-witch__art{animation-name:halloween-facing,halloween-broom-mobile}.halloween-bat--three{display:none}
 .halloween-theme .page,.halloween-theme.is-ranking .page{padding-top:6px}.halloween-season{margin-bottom:14px}.halloween-welcome[open]{min-height:278px;padding:24px 0 44px}
 .halloween-welcome summary{width:66%;gap:14px}.halloween-welcome__title{font-size:26px}.halloween-welcome__title em{font-size:clamp(34px,9vw,43px)}.halloween-welcome__toggle{font-size:15px}
 .halloween-welcome__subtitle{max-width:54%;font-size:14px;line-height:1.55;margin-top:18px}.halloween-welcome__wish{width:51%;font-size:12px;line-height:1.55}
 .halloween-story-art{right:0;top:87px;width:55%;height:175px}.halloween-welcome[open]::before{inset:16% -2% 0 35%}.halloween-story-sparks i{left:67%;top:65%}.halloween-story-sparks i:nth-child(2){left:78%;top:56%}.halloween-story-sparks i:nth-child(3){display:none}
 .halloween-banner-ghost{width:30px;right:1%;top:27%}.halloween-motion{min-height:44px;bottom:0;font-size:11px;padding:6px 0}.halloween-welcome:not([open]) .halloween-welcome__title{font-size:21px}.halloween-welcome:not([open]) + .halloween-motion{display:none}.halloween-motes i:nth-child(n+3){display:none}.cover-age-badge{min-width:26px;max-width:38px}
}
@media(max-width:350px){.halloween-welcome__title{font-size:24px}.halloween-welcome__title em{font-size:32px}.halloween-welcome__subtitle{font-size:13px;max-width:55%}.halloween-welcome__wish{width:53%}.halloween-story-art{right:0;width:53%;top:104px;height:155px}.halloween-welcome[open]{min-height:290px}}
@media(prefers-reduced-motion:reduce){.halloween-sky,.halloween-motes,.halloween-story-sparks{display:none}.halloween-branch,.halloween-lantern,.halloween-lantern::after,.halloween-banner-ghost,.halloween-welcome::before,.halloween-welcome__title{animation:none}.halloween-banner-ghost{opacity:.8}.halloween-welcome__toggle{transition:none}}
@media(forced-colors:active){.halloween-atmosphere,.halloween-lanterns,.halloween-sky,.halloween-motes,.halloween-story-art,.halloween-story-sparks,.halloween-banner-ghost{display:none}.halloween-welcome::before{display:none}}
@media print{.halloween-atmosphere,.halloween-lanterns,.halloween-sky,.halloween-motes,.halloween-season{display:none}.halloween-theme .topbar{padding-top:0;min-height:76px}}
