/* The event lives beside Sales, CDKEY and Hinata, on their existing icon/label rows. */
#game-container .village-shell>.lower-shortcuts:has(.seasonal-event-entry){grid-template-columns:repeat(4,minmax(0,1fr));width:24cqw}
#game-container .lower-shortcuts [data-seasonal-event-entry]{display:contents}
#game-container .lower-shortcuts .seasonal-event-entry{border:0;background:none;padding:0;cursor:pointer;touch-action:manipulation}
#game-container .lower-shortcuts .seasonal-event-entry img{width:100%;height:100%;object-fit:contain;display:block}
#game-container .lower-shortcuts .seasonal-event-entry:focus-visible{outline:2px solid #ffe0a0;outline-offset:3px;border-radius:6px}
#game-container[data-phone-layout="true"] .village-shell>.lower-shortcuts:has(.seasonal-event-entry){width:min(180px,calc(100% - var(--phone-profile-width) - var(--phone-book-width) - 24px));gap:4px}
/* Separate festival village. Buildings share a flat side-scrolling baseline. */
#game-container .seasonal-world{position:absolute;inset:0;z-index:70;isolation:isolate;overflow:hidden;background:#201736;color:#fff1ce;font:14px/1.35 Arial,sans-serif;container-type:size}
#game-container .seasonal-world *{box-sizing:border-box}
#game-container .seasonal-world button{font:inherit;cursor:pointer;touch-action:manipulation}
#game-container .seasonal-world button:focus-visible{outline:3px solid #fff2b4;outline-offset:4px}
#game-container .seasonal-world-viewport{position:absolute;inset:0;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;touch-action:pan-x;scrollbar-width:thin;scrollbar-color:#d5a15e #2a1a3b}
#game-container .seasonal-world-stage{position:relative;width:max(100%,900px);height:100%;background:#312048 var(--world-art) center bottom/cover no-repeat;isolation:isolate;container-type:size;--world-ground-bottom:max(22.5cqh,12.65625cqw)}
#game-container .seasonal-world-building{position:absolute;bottom:var(--world-ground-bottom);width:27%;height:calc(53cqh + 45px);padding:0;border:0;background:none;color:#fff1ce;display:flex;align-items:center;justify-content:flex-end;flex-direction:column;z-index:2;filter:drop-shadow(0 6px 3px #160c2e66)}
#game-container .seasonal-world-building-name{position:absolute;left:50%;top:auto;bottom:96%;transform:translateX(-50%);pointer-events:none;display:block;min-height:0;padding:0;border:0;background:none;box-shadow:none;white-space:nowrap;text-align:center;text-shadow:-1px -1px 2px #180e28,1px 1px 2px #180e28,0 2px 3px #180e28;opacity:0;visibility:hidden;transition:opacity .12s ease}
#game-container .seasonal-world-building-name small{display:none}
#game-container .seasonal-world-building:is(:hover,:focus-visible) .seasonal-world-building-name{opacity:1;visibility:visible}
#game-container .seasonal-world-building-art{position:absolute;left:50%;bottom:0;display:block;width:min(100%,53cqh);aspect-ratio:1;transform:translateX(-50%);pointer-events:none}
#game-container .seasonal-world-building-art>img{display:block;width:100%;height:100%;object-fit:contain;transform:translateY(var(--building-foot-inset));pointer-events:none}
#game-container .seasonal-world-building::before{content:'';position:absolute;left:17%;right:17%;bottom:-4px;height:max(8px,1.2cqh);border-radius:50%;background:radial-gradient(ellipse,#20132688,transparent 72%);pointer-events:none}
#game-container .seasonal-world-building b{font-size:clamp(15px,1.65cqw,22px);color:#ffe1a5}
#game-container .seasonal-world-building small{font-size:clamp(10px,1cqw,13px);color:#ddc6e9}
#game-container .seasonal-world-building em{position:absolute;right:12%;top:auto;bottom:calc(min(27cqw,53cqh) - 22px);display:grid;place-items:center;min-width:25px;height:25px;border:2px solid #ffe1a5;border-radius:50%;background:#b64b33;color:white;font-weight:bold;font-style:normal}
#game-container .seasonal-world-building em:empty,#game-container .seasonal-world-building em[data-empty]{display:none}
#game-container .building-missions{left:6%}
#game-container .building-summon{left:36.5%}
#game-container .building-exchange{left:67%}
#game-container .seasonal-world-ninjas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4}
#game-container .seasonal-world-actor{--actor-body-height:110px;position:absolute;left:0;top:0;width:calc(var(--actor-body-height) * 240 / 290);min-width:64px;height:calc(var(--actor-body-height) * 320 / 290 + 36px);transform:translate(-50%,calc(var(--actor-body-height) * -300 / 290));border:0;padding:0;margin:0;background:none;color:#fff0d2;pointer-events:auto;touch-action:pan-x pinch-zoom;isolation:isolate}
#game-container .seasonal-world-actor::before{content:'';position:absolute;top:calc(var(--actor-body-height) * 300 / 290 - 1px);left:17%;width:66%;height:8px;border-radius:50%;background:#1a112e66;z-index:-1;pointer-events:none}
#game-container .seasonal-world-actor-body{position:absolute;left:50%;top:0;width:calc(var(--actor-body-height) * 240 / 290);height:calc(var(--actor-body-height) * 320 / 290);transform-origin:center;pointer-events:none}
#game-container .seasonal-world .seasonal-world-actor-body>svg{display:block;width:100%!important;height:100%!important;max-width:none;max-height:none;overflow:visible}
#game-container .seasonal-world-actor>[data-world-actor-label]{position:absolute;left:50%;top:calc(var(--actor-body-height) * 300 / 290 + 8px);transform:translateX(-50%);white-space:nowrap;font:bold clamp(11px,1.2cqh,15px)/1.1 Arial,sans-serif;color:#ead9ff;text-shadow:-1px -1px 2px #261131,1px 1px 2px #261131,0 2px 3px #261131;pointer-events:none}
#game-container .seasonal-world-actor>[data-world-actor-badge]{position:absolute;left:50%;top:calc(var(--actor-body-height) * 300 / 290 + 25px);transform:translateX(-50%);white-space:nowrap;font:10px/1 Arial,sans-serif;color:#eed8b8;text-shadow:0 1px 3px #21112c;pointer-events:none}
#game-container .seasonal-world-actor[data-preview="false"]>[data-world-actor-label]{color:#ffe096}
#game-container .seasonal-world-actor:is(:hover,:focus-visible,[aria-expanded="true"]) .seasonal-world-actor-body{filter:drop-shadow(0 0 5px #ffce7688)}
#game-container .seasonal-world-talk{position:absolute;z-index:7;bottom:112px;left:50%;transform:translateX(-50%);width:min(450px,calc(100% - 24px));padding:17px 18px 14px;border:2px solid #c59b59;border-radius:13px;background:#fff4dced;color:#65452f;box-shadow:0 7px 20px #160e3577;font-size:13px}
#game-container .seasonal-world-talk[hidden]{display:none}
#game-container .seasonal-world-talk>small{display:block;margin-right:32px;color:#a77639;font-size:9px;letter-spacing:.06em;font-weight:bold}
#game-container .seasonal-world-talk h2{margin:4px 32px 8px 0;color:#6d3c48;font-size:20px;line-height:1.2}
#game-container .seasonal-world-talk p{margin:0 0 12px;line-height:1.5;min-height:39px}
#game-container .seasonal-world-talk>div{display:flex;gap:6px;flex-wrap:wrap}
#game-container .seasonal-world-talk>div button{flex:1;min-height:44px;padding:7px 10px;border:1px solid #b38a52;border-radius:7px;background:linear-gradient(#f4d58a,#dcb36b);color:#65452f;font-size:11px;font-weight:bold;white-space:nowrap}
#game-container .seasonal-world-talk>div button[data-world-talk-go="summon"]{background:linear-gradient(#765485,#503559);color:#ffe9b8;border-color:#69476e}
#game-container .seasonal-world-talk-close{position:absolute;top:6px;right:6px;width:40px;height:40px;padding:0;border:0;border-radius:6px;background:#f0d4a3;color:#855037;font-size:25px!important}
#game-container .seasonal-world-header{position:absolute;top:0;left:0;right:0;z-index:5;display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 24px;background:linear-gradient(#1f143ae8,#1f143a00);pointer-events:none}
#game-container .seasonal-world-header>div{padding:10px 16px;background:#231932ce;border-left:3px solid #e3a956;border-radius:0 8px 8px 0;text-shadow:0 2px #1c112c}
#game-container .seasonal-world-header small{color:#e3bb7d;font-size:10px;font-weight:700;letter-spacing:.2em}
#game-container .seasonal-world-header h1{font-size:clamp(20px,2.4cqw,32px);line-height:1.1;margin:5px 0}
#game-container .seasonal-world-header p{font-size:12px;margin:6px 0 0;color:#f2d0a5}
#game-container .seasonal-world-back{pointer-events:auto;min-height:44px;padding:8px 15px;border:1px solid #e3bc78;border-radius:7px;background:#332040ed;color:#ffe2a8;font-weight:700!important}
#game-container .seasonal-world-dock{position:absolute;z-index:5;bottom:16px;left:50%;transform:translateX(-50%);display:flex;gap:6px;max-width:calc(100% - 24px);padding:6px;border:1px solid #ba844e;border-radius:10px;background:#261635eb}
#game-container .seasonal-world-dock button{flex:1;min-height:44px;padding:8px 16px;border:1px solid #b58854;border-radius:6px;background:#4b315f;color:#ffe7b2;font-size:13px;font-weight:bold;white-space:nowrap}
#game-container .seasonal-world-dock button:nth-child(3){background:#a04c2d;border-color:#e8a24e}
#game-container .seasonal-world-swipe{position:absolute;z-index:4;bottom:80px;left:50%;transform:translateX(-50%);margin:0;font-size:11px;color:#ffedca;background:#201331c9;padding:4px 12px;border-radius:20px;white-space:nowrap;pointer-events:none}
#game-container .seasonal-world-atmosphere{position:absolute;inset:0;z-index:1;pointer-events:none;overflow:hidden}
#game-container .world-mist{position:absolute;bottom:12%;left:-20%;width:140%;height:20%;background:radial-gradient(ellipse,#d9c4f01a,transparent 65%);animation:halloween-mist 14s ease-in-out infinite alternate}
#game-container .world-moon-glow{position:absolute;left:66%;top:9%;width:20%;height:28%;border-radius:50%;background:#ffbf4b14;animation:halloween-lantern 4s ease-in-out infinite}
#game-container .world-ember{position:absolute;left:calc(5% + var(--i)*9%);bottom:15%;width:4px;height:4px;border-radius:50%;background:#ffd59a;box-shadow:0 0 7px #ff9c36;animation:halloween-ember 6s linear infinite;animation-delay:calc(var(--i)*-.7s)}
#game-container .world-bat{position:absolute;top:24%;left:53%;width:34px;height:20px;animation:halloween-bat 9s ease-in-out infinite alternate}
#game-container .world-bat svg{width:100%;height:100%;fill:#211331}
#game-container .world-bat.bat-two{left:63%;top:34%;width:22px;animation-delay:-4s}
#game-container .world-ghost{position:absolute;left:30%;top:46%;width:30px;height:36px;filter:drop-shadow(0 0 8px #bf86ff);animation:halloween-ghost 5s ease-in-out infinite}
#game-container .world-ghost svg{width:100%;height:100%}
@keyframes halloween-lantern{50%{filter:brightness(1.15) drop-shadow(0 0 6px #db894766)}}
@keyframes halloween-mist{to{transform:translateX(12%)}}
@keyframes halloween-ember{0%{opacity:0;transform:translate(0,0)}20%{opacity:.8}100%{opacity:0;transform:translate(25px,-180px)}}
@keyframes halloween-bat{to{transform:translate(75px,-20px) rotate(8deg)}}
@keyframes halloween-ghost{50%{transform:translate(14px,-14px);opacity:.65}}
@media(orientation:portrait) and (max-width:760px){
 #game-container .seasonal-world-talk{bottom:91px;padding:14px}
 #game-container .seasonal-world-actor>[data-world-actor-label]{font-size:12px}
 #game-container[data-viewport-fit="ready"]:has(.seasonal-world){left:env(safe-area-inset-left,0px);top:env(safe-area-inset-top,0px);width:calc(100vw - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px));height:calc(100dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}
 #game-container .seasonal-world-stage{width:900px}
 #game-container .seasonal-world-header{padding:12px}
 #game-container .seasonal-world-header>div{padding:8px 10px;max-width:72%}
 #game-container .seasonal-world-header h1{font-size:20px}
 #game-container .seasonal-world-header p{font-size:11px}
 #game-container .seasonal-world-back{padding:7px 12px;font-size:22px}
 #game-container .seasonal-world-back span{display:none}
 #game-container .seasonal-world-building{height:calc(42cqh + 45px)}
 #game-container .seasonal-world-dock{width:calc(100% - 20px);gap:4px;padding:5px;bottom:12px}
 #game-container .seasonal-world-dock button{padding:6px 4px;font-size:11px;white-space:normal;line-height:1.2}
 #game-container .seasonal-world-swipe{bottom:80px;font-size:10px}
}
@media(max-height:500px) and (orientation:landscape){
 #game-container .seasonal-world-talk{bottom:64px;padding:10px 14px;max-width:470px}
 #game-container .seasonal-world-talk h2{font-size:17px;margin-top:2px;margin-bottom:5px}
 #game-container .seasonal-world-talk p{margin-bottom:7px;min-height:0;font-size:12px}
 #game-container .seasonal-world-header{padding:8px 14px}
 #game-container .seasonal-world-header>div{padding:4px 10px}
 #game-container .seasonal-world-header h1{font-size:18px;margin:0}
 #game-container .seasonal-world-header small{display:none}
 #game-container .seasonal-world-header p{font-size:10px;margin-top:2px}
 #game-container .seasonal-world-stage{width:max(100%,760px)}
 #game-container .seasonal-world-building{height:calc(53cqh + 36px)}
 #game-container .seasonal-world-building b{font-size:14px}
 #game-container .seasonal-world-building small{font-size:9px}
 #game-container .seasonal-world-dock{bottom:6px;padding:3px}
 #game-container .seasonal-world-dock button{min-height:38px;padding:5px 13px;font-size:11px}
 #game-container .seasonal-world-swipe{display:none}
}
@media(prefers-reduced-motion:reduce){#game-container .seasonal-world *,#game-container .seasonal-world *::before{animation:none!important;transition:none!important}}
#game-container[data-motion="reduced"] .seasonal-world *{animation:none!important;transition:none!important}
@media(max-width:640px){
 #game-container[data-phone-layout="true"] .village-shell>.lower-shortcuts:has(.seasonal-event-entry){left:50%;width:min(208px,calc(100% - 24px));height:54px;bottom:calc(max(calc(var(--phone-book-width,170px) * var(--book-dock-height-per-width,.475)),var(--shortcut-profile-height)) + 6px);transform:translateX(-50%);grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
}
#game-container .seasonal-world[inert] .seasonal-world-atmosphere *{animation-play-state:paused}
/* A service popup owns its header; the covered village chrome must not leak through. */
#game-container .seasonal-world[inert] :is(.seasonal-world-header,.seasonal-world-dock,.seasonal-world-swipe,.seasonal-world-building-name,.seasonal-world-building em){visibility:hidden}
#game-container:has(.seasonal-world[inert]) .network-ping{visibility:hidden!important}
@media(hover:none),(pointer:coarse),(max-width:760px){
 #game-container .seasonal-world:not([inert]) .seasonal-world-building-name{opacity:1;visibility:visible}
}
