*{box-sizing:border-box}body{margin:0;background:#17131d;color:#fff;font-family:system-ui,-apple-system,sans-serif;overscroll-behavior:none}.screen{display:none;min-height:100vh;padding:18px;position:relative}.screen.active{display:flex;flex-direction:column;align-items:center;justify-content:center}.logo{text-align:center;font-weight:1000;font-size:42px;line-height:.9;color:#ffd23f;text-shadow:5px 5px #c62f37}.logo strong{font-size:58px;color:#fff}.blink{margin-top:45px;animation:blink 1s steps(2) infinite;font-weight:900}.panel{background:#292130;border:4px solid #fff;padding:18px;display:grid;gap:14px;min-width:min(92vw,420px);box-shadow:8px 8px #000}select,button{font:inherit;font-size:18px;padding:12px;border:3px solid #111}button{font-weight:900;background:#ffd23f}.help{text-align:center;line-height:1.8}.storybox{height:min(72vh,620px);width:min(92vw,620px);overflow:hidden;position:relative;border-block:2px solid #ffd23f}.storyroll{text-align:center;font-size:21px;line-height:2;font-weight:800;position:absolute;width:100%;top:100%;animation:roll 23s linear forwards}.storyroll b{font-size:30px;color:#ffd23f}#skip{position:absolute;right:14px;top:14px;z-index:3;background:#fff;padding:8px 12px}#game{justify-content:flex-start;padding:8px}header{width:min(100%,960px);display:flex;gap:10px;align-items:center;margin:auto auto 5px}#timer{font-size:28px}#scores{display:flex;flex:1}.score{flex:1;text-align:center;font-weight:900;font-size:13px}canvas{width:min(100%,960px);height:auto;background:#e8d39c;border:5px solid #111;image-rendering:pixelated;outline:none}#message{min-height:28px;font-weight:900;text-align:center}#joystick{display:none;width:150px;height:150px;border:4px solid #fff8;border-radius:50%;background:#2228;position:relative;touch-action:none;margin:5px auto}#stick{width:62px;height:62px;border-radius:50%;background:#ffd23f;border:4px solid #111;position:absolute;left:40px;top:40px}.mobile{display:none}#winlose{font-size:58px;font-weight:1000;text-shadow:5px 5px #000}.winner{font-size:27px;color:#ffd23f}#ranking{text-align:center;line-height:1.7}#statueScene{height:250px;width:min(90vw,420px);position:relative;margin:12px;background:linear-gradient(#75c8ee 0 60%,#d9c393 60%);overflow:hidden;border:5px solid #111}.station{text-align:center;background:#eee;color:#333;font-weight:900;padding:9px}.pedestal{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);background:#777;border:4px solid #444;padding:7px 28px;font-weight:900;white-space:nowrap}#statue{position:absolute;left:50%;bottom:48px;transform:translate(-50%,240px);text-align:center;font-size:50px;filter:grayscale(1)}#statue b{display:block;background:#777;border:4px solid #444;color:#ddd;font-size:16px;padding:14px}.rise{animation:rise 2s cubic-bezier(.2,.8,.2,1) forwards}#resultButtons{opacity:0;pointer-events:none;text-align:center}.show{animation:fade .4s 2.1s forwards;pointer-events:auto!important}#result button{margin:5px;min-width:230px}@keyframes roll{to{top:-135%}}@keyframes blink{50%{opacity:.25}}@keyframes rise{to{transform:translate(-50%,0)}}@keyframes fade{to{opacity:1}}@media(max-width:700px),(pointer:coarse){#joystick,.mobile{display:block}canvas{max-height:57vh;object-fit:contain}.score{font-size:10px}.storyroll{font-size:18px}}.modes .mode{display:flex;justify-content:space-between;align-items:center;gap:14px;text-align:left}.modes .mode small{font-size:12px;font-weight:700}.modes .mode:nth-child(3){background:#eee;color:#555}#eventInfo{text-align:center;max-width:420px}.recruit{font-size:24px;font-weight:900;text-shadow:2px 2px #fff}.baseLabel{font-size:12px;font-weight:900}.fix-logo{display:block;width:min(80vw,460px);max-width:460px;height:auto;object-fit:contain;image-rendering:pixelated}.logo-fallback{display:none}.visual-logo{background:none;text-shadow:none}
.story-bg{background-image:linear-gradient(rgba(8,12,25,.28),rgba(8,12,25,.42)),url('assets_v02/backgrounds/festival_story.jpg');background-size:cover;background-position:center}.story-bg .storybox{background:rgba(15,12,20,.55);border-radius:14px;padding-inline:12px;text-shadow:0 2px 4px #000}.story-bg>small{background:#111a;padding:5px 10px;border-radius:10px}
#statue img{width:120px;height:120px;object-fit:contain;display:block;margin:auto}#statue{filter:none}
#opening{background-image:linear-gradient(rgba(8,12,25,.18),rgba(8,12,25,.38)),url('assets_v02/backgrounds/festival_story.jpg');background-size:cover;background-position:center;text-align:center;overflow:hidden}.opening-title{font-size:clamp(30px,6vw,64px);font-weight:1000;color:#ffd23f;text-shadow:4px 4px #b6252d,0 3px 8px #000}.opening-cast{display:flex;align-items:end;justify-content:center;gap:clamp(0px,2vw,18px);margin-top:10px}.opening-cast img{width:min(20vw,150px);height:min(20vw,150px);object-fit:contain;filter:drop-shadow(0 6px 3px #0008);animation:castBounce .65s ease-in-out infinite alternate}.opening-cast img:nth-child(2){animation-delay:.12s}.opening-cast img:nth-child(3){animation-delay:.24s}.opening-cast img:nth-child(4){animation-delay:.36s}.opening-mikoshi img{width:min(38vw,270px);filter:drop-shadow(0 8px 5px #0008);animation:mikoshiBob .5s ease-in-out infinite alternate}#opening p{font-size:clamp(17px,3vw,28px);font-weight:900;text-shadow:0 3px 5px #000}#opening small{background:#111b;border:2px solid #fff;border-radius:999px;padding:8px 18px;font-weight:900}.mode,#result button{border-radius:18px;border:4px solid #fff;box-shadow:0 5px 0 #7b241c,0 8px 12px #0007;background:linear-gradient(#ff745f,#df322d);color:#fff;text-shadow:0 2px #7a1717}.modes .mode:nth-child(2){background:linear-gradient(#5ba8ff,#2373d8);box-shadow:0 5px 0 #164c9a,0 8px 12px #0007}.modes .mode:nth-child(3){background:linear-gradient(#75d477,#2e9e45);color:#fff;box-shadow:0 5px 0 #176b2a,0 8px 12px #0007}#countdown{display:none;position:absolute;z-index:30;inset:0;align-items:center;justify-content:center;background:#07101c88;pointer-events:none}#countdown.show{display:flex}#countdown b{font-size:min(34vw,230px);font-weight:1000;color:#fff;text-shadow:8px 8px #d72f2f,0 0 30px #ffd23f;animation:countPop .72s ease both}@keyframes countPop{0%{transform:scale(1.8);opacity:0}30%{transform:scale(1);opacity:1}100%{transform:scale(.8);opacity:.25}}@keyframes castBounce{to{transform:translateY(-10px) rotate(2deg)}}@keyframes mikoshiBob{to{transform:translateY(-7px)}}
#splash{display:none!important}.title-loop{overflow:hidden;background-image:linear-gradient(rgba(7,11,22,.18),rgba(7,11,22,.34)),url('assets_v02/backgrounds/festival_story.jpg');background-size:cover;background-position:center}.title-logo{position:absolute;z-index:20;top:3vh;width:min(72vw,520px);max-height:30vh;object-fit:contain;filter:drop-shadow(0 7px 2px #0008)}.title-stage{position:absolute;inset:0;overflow:hidden}.tl{position:absolute;object-fit:contain;filter:drop-shadow(0 5px 3px #0008);pointer-events:none}.tl.mikoshi{width:min(35vw,270px);left:50%;top:42%;transform:translate(-50%,-50%);animation:titleMikoshi .55s ease-in-out infinite alternate}.tl.east,.tl.west,.tl.south,.tl.north{width:min(17vw,125px);animation:heroHop .7s ease-in-out infinite alternate}.tl.east{left:17%;top:42%}.tl.west{right:17%;top:42%;animation-delay:.18s}.tl.south{left:28%;top:61%;animation-delay:.34s}.tl.north{right:28%;top:61%;animation-delay:.5s}.tl.carrier{width:82px;bottom:11%;animation:crossRight 8s linear infinite}.tl.c1{left:-12%;animation-delay:-1s}.tl.c2{left:-12%;bottom:21%;animation-delay:-5s}.tl.cat{width:68px;bottom:5%;left:-12%;animation:crossRight 7s linear infinite -3s}.tl.delivery{width:78px;bottom:30%;right:-12%;animation:crossLeft 6s linear infinite -1s}.tl.drunk{width:76px;left:7%;bottom:31%;animation:drunkWobble 2.4s ease-in-out infinite}.tl.police{width:82px;right:5%;bottom:26%;animation:popGuest 9s ease-in-out infinite}.tl.madam{width:82px;left:4%;top:27%;animation:popGuest 11s ease-in-out infinite -5s}.tl.dango,.tl.kakigori,.tl.dorayaki{width:55px;animation:itemPop 5s ease-in-out infinite}.tl.dango{left:13%;top:24%}.tl.kakigori{right:12%;top:25%;animation-delay:-2s}.tl.dorayaki{right:7%;bottom:10%;animation-delay:-3.5s}.title-touch{position:absolute;z-index:30;bottom:3.5vh;margin:0;background:#111b;border:3px solid #fff;border-radius:999px;padding:10px 25px;font-size:clamp(18px,3vw,28px);font-weight:1000;text-shadow:0 2px #000;animation:blink 1s steps(2) infinite}@keyframes titleMikoshi{to{transform:translate(-50%,-56%) rotate(1deg)}}@keyframes heroHop{to{transform:translateY(-12px) rotate(3deg)}}@keyframes crossRight{from{transform:translateX(0)}to{transform:translateX(125vw)}}@keyframes crossLeft{from{transform:translateX(0) scaleX(-1)}to{transform:translateX(-125vw) scaleX(-1)}}@keyframes drunkWobble{0%,100%{transform:rotate(-8deg) translateX(-8px)}50%{transform:rotate(9deg) translateX(18px)}}@keyframes popGuest{0%,68%,100%{opacity:0;transform:translateY(25px) scale(.8)}74%,92%{opacity:1;transform:translateY(0) scale(1)}}@keyframes itemPop{0%,55%,100%{opacity:0;transform:scale(.5) rotate(-10deg)}65%,88%{opacity:1;transform:scale(1.1) rotate(5deg)}}
/* v0.7.2 visual scale +20% */
.tl.mikoshi{width:min(42vw,324px)}.tl.east,.tl.west,.tl.south,.tl.north{width:min(20.4vw,150px)}.tl.carrier{width:98px}.tl.cat{width:82px}.tl.delivery{width:94px}.tl.drunk{width:91px}.tl.police,.tl.madam{width:98px}.tl.dango,.tl.kakigori,.tl.dorayaki{width:66px}.title-logo{width:min(78vw,570px)}

/* v0.7.5 title: mikoshi procession + heroes running */
.title-mikoshi-group{position:absolute;z-index:8;left:50%;top:47%;width:min(44vw,350px);height:min(35vw,280px);transform:translate(-50%,-50%);animation:processionBob .48s ease-in-out infinite alternate}.tmg{position:absolute;object-fit:contain;filter:drop-shadow(0 5px 3px #0008)}.mikoshi-main{z-index:1;width:78%;left:11%;top:0}.bearer{z-index:3;width:25%;bottom:2%}.b1{left:8%}.b2{left:23%;bottom:-1%}.b3{left:38%;bottom:2%}.b4{right:38%;bottom:-1%}.b5{right:23%;bottom:2%}.b6{right:8%;bottom:-1%}.bearer{animation:bearerStep .34s ease-in-out infinite alternate}.b2,.b4,.b6{animation-delay:-.17s}.tl.east,.tl.west,.tl.south,.tl.north{top:auto;right:auto;animation:none}.tl.east{left:-18%;bottom:39%;animation:heroRunRight 7.2s linear infinite}.tl.west{right:-18%;bottom:47%;animation:heroRunLeft 8.1s linear infinite -2.4s}.tl.south{left:-18%;bottom:18%;animation:heroRunRight 9s linear infinite -5s}.tl.north{right:-18%;bottom:25%;animation:heroRunLeft 7.6s linear infinite -4s}@keyframes processionBob{to{transform:translate(-50%,-55%) rotate(.8deg)}}@keyframes bearerStep{to{transform:translateY(-5px)}}@keyframes heroRunRight{0%{transform:translateX(0)}100%{transform:translateX(140vw)}}@keyframes heroRunLeft{0%{transform:translateX(0) scaleX(-1)}100%{transform:translateX(-140vw) scaleX(-1)}}
/* v0.7.6 festival ending */
.result-festival{background-image:linear-gradient(rgba(8,10,24,.16),rgba(8,10,24,.32)),url('assets_v02/backgrounds/result_bg_v01.jpg');background-size:cover;background-position:center;overflow:hidden}.result-festival #winlose{margin-top:12vh;color:#ffd23f;font-size:clamp(44px,8vw,78px);text-shadow:5px 5px #b62328,0 4px 8px #000}.result-festival #ranking{background:#101522d9;border:4px solid #fff;border-radius:18px;padding:10px 24px;min-width:min(88vw,420px);box-shadow:0 7px 0 #6b1d20}.result-festival #statueScene{background:transparent;border:0;overflow:visible;height:270px;margin:0}.result-festival .station{display:none}.result-festival .pedestal{background:#8b673e;border-color:#4b3420;color:#fff;bottom:8px}.result-festival #statue{bottom:45px}.result-festival #statue img{width:150px;height:150px}.result-festival #winnerHero{position:absolute;left:7%;bottom:14%;z-index:8;animation:winnerEnter .8s cubic-bezier(.2,.9,.2,1) both}.result-festival #winnerHero img{width:min(22vw,145px);height:min(22vw,145px);object-fit:contain;filter:drop-shadow(0 6px 4px #0008)}#resultSparkles{position:absolute;left:50%;top:18%;transform:translateX(-50%);font-size:44px;color:#ffe45c;opacity:0;pointer-events:none}.sparkleOn{animation:sparkle 1s ease-in-out infinite!important}.result-festival #resultButtons button{border-radius:18px;border:4px solid #fff;color:#fff}.result-festival #resultButtons{position:relative;z-index:20}@keyframes winnerEnter{from{transform:translateX(-180px) rotate(-12deg);opacity:0}to{transform:translateX(0);opacity:1}}@keyframes sparkle{0%,100%{opacity:.2;transform:translateX(-50%) scale(.8) rotate(-8deg)}50%{opacity:1;transform:translateX(-50%) scale(1.2) rotate(8deg)}}
#dailyRank{width:min(90vw,520px);max-height:260px;overflow:auto;background:#101522e8;border:4px solid #fff;border-radius:18px;padding:8px 16px;margin:6px 0;box-shadow:0 6px 0 #6b1d20;z-index:15}#dailyRank h2{font-size:18px;margin:2px 0 6px;color:#ffd23f}#dailyRank ol{margin:0;padding-left:34px;columns:2;column-gap:28px;text-align:left;font-weight:900}#dailyRank li{break-inside:avoid;padding:2px 0}#yourDailyRank{margin-top:6px;color:#ffd23f;font-weight:1000}.maxTag{font-size:10px;background:#d62f2f;color:#fff;border-radius:8px;padding:1px 5px;margin-left:4px}@media(max-width:700px){#dailyRank{max-height:210px}#dailyRank ol{columns:1}}
/* v0.7.9 title police dash */
.tl.police{right:auto;left:-14%;bottom:26%;animation:policeDash 3.4s linear infinite -1.2s}@keyframes policeDash{0%{transform:translateX(0);opacity:0}4%{opacity:1}92%{opacity:1}100%{transform:translateX(135vw);opacity:0}}

/* v0.7.11 fit daily TOP10 without scrolling */
.result-festival{justify-content:flex-start;padding:8px 12px}.result-festival #winlose{margin-top:8.5vh;font-size:clamp(34px,6vw,58px);line-height:1}.result-festival #ranking{padding:5px 16px;line-height:1.25;min-width:min(82vw,390px);font-size:14px}.result-festival .winner{font-size:20px}.result-festival #statueScene{height:190px}.result-festival #statue{bottom:32px}.result-festival #statue img{width:112px;height:112px}.result-festival .pedestal{bottom:2px;padding:4px 20px;font-size:13px}.result-festival #winnerHero{bottom:10%}.result-festival #winnerHero img{width:min(17vw,110px);height:min(17vw,110px)}#dailyRank{width:min(92vw,600px);max-height:none;height:auto;overflow:visible;padding:5px 12px;margin:3px 0;border-width:3px}#dailyRank h2{font-size:15px;margin:0 0 3px}#dailyRank ol{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(5,auto);grid-auto-flow:column;columns:auto;gap:0 24px;padding-left:27px;font-size:13px;line-height:1.15}#dailyRank li{padding:1px 0;white-space:nowrap}#yourDailyRank{margin-top:3px;font-size:12px}.maxTag{font-size:8px;padding:1px 4px}#resultButtons{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}.result-festival #resultButtons button{min-width:0;margin:2px;padding:7px 12px;font-size:13px}@media(max-width:700px){#dailyRank{max-height:none;overflow:visible}#dailyRank ol{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(5,auto);grid-auto-flow:column;font-size:11px;gap:0 10px;padding-left:23px}.result-festival #statueScene{height:165px}.result-festival #winlose{margin-top:7vh}.result-festival #ranking{font-size:12px}.result-festival .winner{font-size:17px}}

#audioControls{position:fixed;z-index:100;right:8px;top:8px;display:flex;gap:5px}#audioControls button{font-size:11px;padding:6px 9px;min-width:0;border:2px solid #fff;border-radius:999px;background:#17131dcc;color:#fff;box-shadow:none;text-shadow:none}#audioControls button.off{opacity:.55;text-decoration:line-through}

/* v0.8.3 title start button */
.title-touch{cursor:pointer;min-width:min(76vw,360px);background:linear-gradient(#ffdf4e,#f39a21);color:#4a1b0b;border:5px solid #fff;border-radius:999px;box-shadow:0 7px 0 #a53b22,0 10px 18px #0009;padding:13px 30px;font-size:clamp(20px,4vw,32px);font-weight:1000;text-shadow:0 2px #fff8;animation:titleStartPulse 1s ease-in-out infinite!important}.title-touch:active{transform:translateY(5px);box-shadow:0 2px 0 #a53b22}@keyframes titleStartPulse{0%,100%{scale:1}50%{scale:1.045}}

/* v0.8.4 global title asset scale +20% */
.title-mikoshi-group{width:min(52.8vw,420px);height:min(42vw,336px)}.tl.east,.tl.west,.tl.south,.tl.north{width:min(24.5vw,180px)}.tl.carrier{width:118px}.tl.cat{width:98px}.tl.delivery{width:113px}.tl.drunk{width:109px}.tl.police,.tl.madam{width:118px}.tl.dango,.tl.kakigori,.tl.dorayaki{width:79px}

/* v0.8.5 raise title start button */
.title-touch{bottom:9vh}

#eventInfo{width:min(94vw,680px);text-align:center}.modes .mode:nth-child(3){opacity:1}#eventSeats{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:10px}#eventSeats span{background:#181523;border:2px solid #fff;border-radius:10px;padding:8px}#eventQR{width:150px;height:150px;margin:10px auto;background:#fff;color:#111;display:grid;place-items:center;font-size:28px;font-weight:1000;border:8px solid #111}#eventDaily{background:#111b;border-radius:14px;padding:8px;margin:8px}#eventDaily h3{margin:5px;color:#ffd23f}#eventTop10{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(5,auto);grid-auto-flow:column;text-align:left;margin:5px auto;max-width:480px}#eventStart{background:linear-gradient(#ff745f,#df322d);color:#fff;border-color:#fff;border-radius:16px}

#eventQR img{width:150px;height:150px;display:block}#eventRoomCode{font-size:22px;font-weight:1000;color:#ffd23f;letter-spacing:3px}

/* v0.9.12 event seat status */
#eventSeats .joined{background:#176b2a;border-color:#8dff9d}#eventSeats .cpu{opacity:.7}

/* v0.9.13 title composition tuning */
#skip{display:none!important}.title-logo{top:7vh;width:min(90vw,690px);max-height:36vh}.title-mikoshi-group{top:58%;width:min(61vw,480px);height:min(48vw,380px)}.title-touch{bottom:13vh;min-width:min(78vw,380px)}@media(max-width:700px),(pointer:coarse){.title-logo{top:8vh;width:min(94vw,680px);max-height:31vh}.title-mikoshi-group{top:59%;width:min(78vw,480px);height:min(62vw,390px)}.title-touch{bottom:14vh}}

/* v0.9.14 compact story panel */
.story-bg{justify-content:flex-start!important;padding-top:10vh}.story-bg .storybox{height:min(32vh,290px);width:min(92vw,620px);margin-top:0}.story-bg .storyroll{top:82%;line-height:1.65;font-size:18px;animation-duration:23s}.story-bg>small{margin-top:8px}@media(max-width:700px),(pointer:coarse){.story-bg{padding-top:8vh}.story-bg .storybox{height:30vh;max-height:270px}.story-bg .storyroll{font-size:16px;line-height:1.55}}

/* v0.9.15 center compact story panel */
.story-bg{justify-content:center!important;padding-top:18px}.story-bg .storybox{margin-top:0}@media(max-width:700px),(pointer:coarse){.story-bg{justify-content:center!important;padding-top:18px}}

/* v0.9.16 story panel height */
.story-bg .storybox{height:60vh;max-height:600px}@media(max-width:700px),(pointer:coarse){.story-bg .storybox{height:60vh;max-height:600px}}

/* v0.9.17 title depth staging */
.title-mikoshi-group{top:53%;z-index:10}.tl.east,.tl.south,.tl.carrier.c1,.tl.cat,.tl.drunk,.tl.dango{z-index:14}.tl.west,.tl.north,.tl.carrier.c2,.tl.delivery,.tl.police,.tl.madam,.tl.kakigori,.tl.dorayaki{z-index:6}@media(max-width:700px),(pointer:coarse){.title-mikoshi-group{top:54%}}

/* v0.9.18 all moving title characters in front of mikoshi */
.tl.east,.tl.west,.tl.south,.tl.north,.tl.carrier.c1,.tl.carrier.c2,.tl.cat,.tl.delivery,.tl.drunk,.tl.police,.tl.madam,.tl.dango,.tl.kakigori,.tl.dorayaki{z-index:14}

/* v0.9.21 audio controls removed */
#audioControls{display:none!important}

/* v0.9.23 title-only audio controls */
#titleAudioControls{position:absolute;z-index:50;right:10px;top:10px;display:flex;gap:6px}#titleAudioControls button{font-size:11px;padding:6px 9px;min-width:0;border:2px solid #fff;border-radius:999px;background:#17131dcc;color:#fff;box-shadow:none;text-shadow:none}#titleAudioControls button.off{opacity:.5;text-decoration:line-through}

/* v0.9.26 raise game canvas and joystick */
#game{justify-content:flex-start!important;padding-top:2px}#game header{margin:0 auto 2px}#game canvas{margin-top:0}#message{min-height:22px;line-height:22px}#joystick{margin:-2px auto 0}@media(max-width:700px),(pointer:coarse){#game{padding-top:0}#game header{margin:0 auto 1px}#joystick{margin:-6px auto 0}.mobile{margin-top:2px}}

/* v0.9.27 raise title mikoshi closer to logo */
.title-mikoshi-group{top:49%}@media(max-width:700px),(pointer:coarse){.title-mikoshi-group{top:50%}}

/* v0.9.28 rebalance mobile game vertical spacing */
#game{padding-top:7px}#game header{margin:2px auto 5px}#message{min-height:30px;line-height:30px;font-size:15px;color:#fff;text-shadow:0 2px 3px #000,0 0 4px #000;font-weight:1000}#joystick{margin:10px auto 3px}.mobile{margin-top:5px;color:#fff;font-size:13px;font-weight:900;text-shadow:0 2px 3px #000}@media(max-width:700px),(pointer:coarse){#game{padding-top:5px}#game header{margin:2px auto 4px}#message{min-height:28px;line-height:28px;font-size:14px;background:rgba(0,0,0,.38);border-radius:8px;padding:0 8px;margin-top:3px}#joystick{margin:10px auto 3px}.mobile{margin-top:4px}}

/* v0.9.29 force title mikoshi position above legacy overrides */
#opening .title-stage .title-mikoshi-group{top:43%!important}@media(max-width:700px),(pointer:coarse){#opening .title-stage .title-mikoshi-group{top:44%!important}}

/* v0.9.30 event lobby participant cards */
#eventSeats span{display:flex;flex-direction:column;gap:2px;text-align:left}#eventSeats span small{font-size:12px}.resting{background:#665b22!important;border-color:#ffe36b!important}.joined b{color:#9dffab}.resting b{color:#ffe36b}

/* v0.9.31 restore preferred title mikoshi height */
#opening .title-stage .title-mikoshi-group{top:49%!important}@media(max-width:700px),(pointer:coarse){#opening .title-stage .title-mikoshi-group{top:50%!important}}

/* v0.9.35 desktop title logo clearance */
@media(min-width:701px) and (pointer:fine){#opening .title-logo{top:4.5vh}}

/* v0.9.36 slightly reduce title mikoshi */
#opening .title-stage .title-mikoshi-group{width:min(56vw,440px);height:min(44vw,350px)}@media(max-width:700px),(pointer:coarse){#opening .title-stage .title-mikoshi-group{width:min(72vw,440px);height:min(57vw,360px)}}

/* v0.9.37 desktop title: keep logo and mikoshi visually separate */
@media(min-width:701px) and (pointer:fine){#opening .title-logo{top:1.5vh;width:min(76vw,620px);max-height:32vh}#opening .title-stage .title-mikoshi-group{top:53%!important;width:min(47vw,390px);height:min(37vw,310px)}.title-touch{bottom:9vh}}

/* v0.9.42 programmatic result celebration */
#result{--team:#ffd23f}#statueScene{filter:drop-shadow(0 0 16px var(--team)) drop-shadow(0 0 30px var(--team))}#winnerDance{position:absolute;z-index:16;left:58%;bottom:15%;animation:victoryDance .42s ease-in-out infinite alternate}#winnerDance img{width:min(20vw,125px);height:125px;object-fit:contain;filter:drop-shadow(0 5px 3px #0008)}#loserReactions{position:absolute;z-index:12;inset:auto 2% 11% 2%;display:flex;justify-content:space-between;pointer-events:none}.loserUnit{text-align:center;opacity:.9}.loserUnit img{width:min(12vw,80px);height:80px;object-fit:contain;filter:grayscale(.25) drop-shadow(0 4px 2px #0008);animation:loserBob .8s ease-in-out infinite alternate}.loserUnit small{display:block;background:#111c;border-radius:999px;padding:2px 6px;font-weight:900}.celebrateNpc{position:absolute;z-index:13;width:min(9vw,62px);height:62px;object-fit:contain;animation:cheerHop .5s ease-in-out infinite alternate;filter:drop-shadow(0 4px 2px #0008)}#confettiLayer{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:30}.confetti{position:absolute;top:-8%;width:10px;height:18px;background:var(--c);animation:confettiFall var(--d) linear infinite;animation-delay:var(--delay);transform:rotate(var(--r))}@keyframes victoryDance{to{transform:translateY(-13px) rotate(7deg) scale(1.06)}}@keyframes loserBob{to{transform:translateY(7px) rotate(-4deg)}}@keyframes cheerHop{to{transform:translateY(-12px) rotate(5deg)}}@keyframes confettiFall{to{top:108%;transform:translateX(var(--drift)) rotate(720deg)}}

/* v0.9.44 result character composition */
.result-festival #winnerHero{display:none!important}#winnerDance{left:18%;bottom:20%;z-index:18;animation:victoryDance .42s ease-in-out infinite alternate}#winnerDance img{width:min(27vw,180px);height:min(27vw,180px);object-fit:contain;filter:drop-shadow(0 7px 4px #0009)}#loserReactions{left:auto;right:3%;bottom:7%;width:42%;display:flex;justify-content:flex-end;align-items:flex-end;gap:4px;z-index:17}.loserUnit{position:relative;flex:0 1 33%;min-width:0}.loserUnit img{width:min(9vw,58px);height:min(9vw,58px);filter:grayscale(.3) saturate(.75) drop-shadow(0 3px 2px #0009);animation:loserTremble .38s ease-in-out infinite alternate}.loserUnit small{font-size:9px;padding:1px 4px;white-space:nowrap}.loserUnit:before{content:'💢';position:absolute;right:-2px;top:-14px;font-size:18px;animation:angerPop .55s ease-in-out infinite alternate}.loserUnit:nth-child(2):before{content:'💧'}.loserUnit:nth-child(3):before{content:'😣'}@keyframes loserTremble{0%{transform:translateX(-2px) rotate(-3deg)}100%{transform:translateX(2px) translateY(3px) rotate(3deg)}}@keyframes angerPop{to{transform:scale(1.28) rotate(8deg)}}@media(max-width:700px),(pointer:coarse){#winnerDance{left:8%;bottom:21%}#winnerDance img{width:min(32vw,150px);height:min(32vw,150px)}#loserReactions{right:2%;bottom:8%;width:46%;gap:1px}.loserUnit img{width:min(12vw,52px);height:min(12vw,52px)}.loserUnit small{display:none}}

/* v0.9.45 winner statue always visible + team-color tint */
#result #statueScene{display:block}#result #statueImg{filter:grayscale(1) sepia(1) saturate(3.2) drop-shadow(0 0 12px var(--team)) drop-shadow(0 0 24px var(--team));transition:filter .3s}#result[data-winner-team="0"] #statueImg{filter:grayscale(.35) sepia(1) saturate(6) hue-rotate(325deg) brightness(1.02) drop-shadow(0 0 14px #e33b3b) drop-shadow(0 0 30px #e33b3b)}#result[data-winner-team="1"] #statueImg{filter:grayscale(.25) sepia(1) saturate(6) hue-rotate(165deg) brightness(1.05) drop-shadow(0 0 14px #317bd6) drop-shadow(0 0 30px #317bd6)}#result[data-winner-team="2"] #statueImg{filter:grayscale(.25) sepia(1) saturate(5) hue-rotate(70deg) brightness(1.02) drop-shadow(0 0 14px #35a853) drop-shadow(0 0 30px #35a853)}#result[data-winner-team="3"] #statueImg{filter:grayscale(.15) sepia(1) saturate(5.5) hue-rotate(350deg) brightness(1.12) drop-shadow(0 0 14px #e3b52b) drop-shadow(0 0 30px #e3b52b)}

/* v0.9.46 bring winner and loser reactions closer to statue */
#winnerDance{left:29%;bottom:22%}#winnerDance img{width:min(25vw,170px);height:min(25vw,170px)}#loserReactions{right:17%;bottom:12%;width:31%;gap:2px}.loserUnit img{width:min(8vw,54px);height:min(8vw,54px)}@media(max-width:700px),(pointer:coarse){#winnerDance{left:18%;bottom:22%}#winnerDance img{width:min(29vw,145px);height:min(29vw,145px)}#loserReactions{right:10%;bottom:11%;width:35%}.loserUnit img{width:min(10vw,48px);height:min(10vw,48px)}}

/* v0.9.47 result characters just above ranking panel */
#winnerDance{left:27%;bottom:auto;top:20%}#loserReactions{right:19%;bottom:auto;top:29%;width:30%}@media(max-width:700px),(pointer:coarse){#winnerDance{left:15%;bottom:auto;top:22%}#loserReactions{right:8%;bottom:auto;top:31%;width:38%}}

/* v0.9.48 all result players in one row above ranking */
#winnerDance{left:18%;top:19%;bottom:auto}#winnerDance img{width:min(23vw,160px);height:min(23vw,160px)}#loserReactions{left:43%;right:auto;top:23%;bottom:auto;width:48%;display:flex;justify-content:flex-start;align-items:flex-end;gap:10px}.loserUnit{flex:0 0 auto}.loserUnit img{width:min(10vw,64px);height:min(10vw,64px)}@media(max-width:700px),(pointer:coarse){#winnerDance{left:7%;top:21%;bottom:auto}#winnerDance img{width:min(28vw,140px);height:min(28vw,140px)}#loserReactions{left:38%;right:auto;top:27%;bottom:auto;width:58%;gap:3px}.loserUnit img{width:min(13vw,54px);height:min(13vw,54px)}}

/* v0.9.49 countdown over game MAP */
#game{position:relative}#countdown{position:absolute;z-index:30;left:50%;top:0;right:auto;bottom:auto;width:min(100%,960px);aspect-ratio:960/640;transform:translateX(-50%);align-items:center;justify-content:center;background:rgba(7,16,28,.34);pointer-events:none}#countdown b{white-space:nowrap;word-break:keep-all;line-height:1;font-size:clamp(64px,18vw,190px)}@media(max-width:700px),(pointer:coarse){#countdown{top:38px;width:calc(100% - 16px);max-width:960px}#countdown b{white-space:nowrap;font-size:clamp(54px,20vw,120px);letter-spacing:-.03em}}

/* v0.9.50 smartphone landscape play mode */
#landscapeToggle{display:none;position:absolute;z-index:45;right:10px;bottom:8px;font-size:12px;padding:6px 10px;border:2px solid #fff;border-radius:999px;background:#111b;color:#fff;box-shadow:none}@media(max-width:900px),(pointer:coarse){#game.active #landscapeToggle{display:block}}body.landscape-play{overflow:hidden}body.landscape-play #game{position:fixed;inset:0;padding:0!important;background:#111;display:block!important}body.landscape-play #game header{position:absolute;z-index:42;left:8px;right:8px;top:4px;width:auto;margin:0;background:#1118;border-radius:10px;padding:3px 8px;pointer-events:none}body.landscape-play #timer{font-size:20px}body.landscape-play #scores .score{font-size:10px}body.landscape-play #cv{position:absolute;inset:0;width:100vw;height:100vh;max-height:none;object-fit:contain;border:0;margin:0;background:#111}body.landscape-play #message{position:absolute;z-index:42;left:18%;right:4%;bottom:7px;min-height:24px;line-height:24px;margin:0;background:#1119;border-radius:9px;font-size:12px;pointer-events:none}body.landscape-play #joystick{display:block!important;position:absolute;z-index:46;left:16px;bottom:14px;margin:0;width:132px;height:132px;opacity:.56;background:#1118;border-color:#fff9}body.landscape-play #joystick:active{opacity:.82}body.landscape-play #stick{width:56px;height:56px;left:34px;top:34px;opacity:.78}body.landscape-play .mobile{display:none!important}body.landscape-play #landscapeToggle{display:block;top:42px;right:8px;bottom:auto}body.landscape-play #countdown{position:absolute;z-index:44;inset:0;width:100%;height:100%;aspect-ratio:auto;transform:none;left:0;top:0}body.landscape-play #countdown b{font-size:min(24vh,180px);white-space:nowrap}

/* v0.9.51 reliable iPhone landscape + simulated landscape fallback */
@media (orientation:landscape) and (pointer:coarse){body:not(.landscape-play) #game.active{position:fixed;inset:0;padding:0!important;background:#111;display:block!important}body:not(.landscape-play) #game.active header{position:absolute;z-index:42;left:8px;right:8px;top:4px;width:auto;margin:0;background:#1118;border-radius:10px;padding:3px 8px}body:not(.landscape-play) #game.active #cv{position:absolute;inset:0;width:100vw;height:100vh;max-height:none;object-fit:contain;border:0}body:not(.landscape-play) #game.active #joystick{display:block!important;position:absolute;z-index:46;left:16px;bottom:14px;margin:0;width:132px;height:132px;opacity:.58}body:not(.landscape-play) #game.active #message{position:absolute;z-index:42;left:18%;right:4%;bottom:7px;background:#1119;border-radius:9px}body:not(.landscape-play) #game.active .mobile{display:none!important}}
@media (orientation:portrait) and (pointer:coarse){body.landscape-play #game{width:100vh;height:100vw;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%) rotate(90deg);transform-origin:center center}body.landscape-play #cv{width:100%;height:100%;object-fit:contain}body.landscape-play #landscapeToggle{transform:rotate(-90deg);transform-origin:center}}

/* v0.9.52 landscape controls + compact title */
body.landscape-play #joystick{left:auto!important;right:18px!important;bottom:14px!important}@media (orientation:landscape) and (pointer:coarse){body:not(.landscape-play) #game.active #joystick{left:auto!important;right:18px!important;bottom:14px!important}#opening .title-logo{top:3vh!important;width:min(58vw,470px)!important;max-height:25vh!important}#opening .title-stage .title-mikoshi-group{top:52%!important;width:min(38vw,330px)!important;height:min(30vw,260px)!important}.title-touch{bottom:5vh!important;min-width:min(48vw,300px)!important;font-size:clamp(15px,2vw,21px)!important;padding:7px 18px!important}}

/* v0.9.53 landscape title: logo upper-left, compact start button */
@media (orientation:landscape) and (pointer:coarse){#opening .title-logo{left:4%!important;right:auto!important;top:5%!important;transform:none!important;width:min(34vw,330px)!important;max-height:27vh!important}#opening .title-stage .title-mikoshi-group{top:50%!important;width:min(34vw,300px)!important;height:min(27vw,235px)!important}.title-touch{left:50%!important;bottom:5vh!important;transform:translateX(-50%)!important;min-width:0!important;width:min(28vw,230px)!important;font-size:clamp(11px,1.45vw,15px)!important;padding:5px 10px!important;border-width:3px!important;box-shadow:0 5px 0 #9c341f!important}}

/* v0.9.54 landscape joystick right-middle */
body.landscape-play #joystick{left:auto!important;right:18px!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}@media (orientation:landscape) and (pointer:coarse){body:not(.landscape-play) #game.active #joystick{left:auto!important;right:18px!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important}}

/* v0.9.55 result layout polish */
#result #winnerDance{left:calc(50% - 155px);top:18.5%;bottom:auto;z-index:21}#result #winnerDance img{width:120px;height:120px}#result #loserReactions{left:calc(50% + 58px);right:auto;top:22.5%;bottom:auto;width:205px;gap:2px;justify-content:flex-start;z-index:21}#result .loserUnit img{width:54px;height:54px}#result #statueScene{z-index:15}#result #statue{position:relative}#result #statue b{display:block;margin:-2px auto 0;width:max-content;min-width:128px;padding:7px 18px;border-radius:999px;background:linear-gradient(180deg,#fff4c5,#d8a83d);border:3px solid #fff2a4;box-shadow:0 4px 0 #6b431d,0 0 14px var(--team);color:#4a2a08;font-size:16px;font-weight:1000;text-shadow:0 1px 0 #fff9;letter-spacing:.08em}#result .pedestal{margin:7px auto 0;width:max-content;min-width:150px;padding:8px 20px;border-radius:10px;background:linear-gradient(180deg,var(--team),#29212c);border:3px solid #ffe9a6;box-shadow:0 5px 0 #3a2519,0 0 16px var(--team);color:#fff;font-size:17px;font-weight:1000;text-shadow:0 2px 2px #000;letter-spacing:.06em}@media(max-width:700px),(pointer:coarse){#result #winnerDance{left:calc(50% - 128px);top:28.5%}#result #winnerDance img{width:88px;height:88px}#result #loserReactions{left:calc(50% + 30px);top:31%;width:150px;gap:0}#result .loserUnit img{width:42px;height:42px}#result #statue b{min-width:105px;padding:5px 12px;font-size:13px}#result .pedestal{min-width:125px;padding:6px 12px;font-size:14px;margin-top:5px}}

/* v0.9.57 fit complete MAP inside Safari visible viewport */
@media (orientation:landscape) and (pointer:coarse){body:not(.landscape-play) #game.active{height:100dvh!important;min-height:0!important;overflow:hidden}body:not(.landscape-play) #game.active #cv{left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;width:min(100vw,calc(100dvh * 1.5))!important;height:min(100dvh,calc(100vw / 1.5))!important;transform:translate(-50%,-50%)!important;object-fit:contain!important}body:not(.landscape-play) #game.active header{left:50%!important;transform:translateX(-50%)!important;width:min(96vw,calc(100dvh * 1.5 - 12px))!important;right:auto!important}body:not(.landscape-play) #game.active #joystick{right:max(12px,calc((100vw - min(100vw,100dvh * 1.5))/2 + 12px))!important}body:not(.landscape-play) #game.active #countdown{left:50%!important;top:50%!important;width:min(100vw,calc(100dvh * 1.5))!important;height:min(100dvh,calc(100vw / 1.5))!important;transform:translate(-50%,-50%)!important}}

/* v0.9.58 landscape start button readability */
@media (orientation:landscape) and (pointer:coarse){#opening .title-touch{width:min(38vw,330px)!important;min-width:250px!important;font-size:clamp(15px,2.1vw,21px)!important;padding:9px 18px!important;border-width:4px!important;bottom:4vh!important}}

/* v0.9.59 place landscape joystick in spare area outside fitted MAP */
@media (orientation:landscape) and (pointer:coarse){body:not(.landscape-play) #game.active #joystick{left:auto!important;right:max(14px,calc((100vw - min(100vw,100dvh * 1.5))/4 - 66px))!important;top:50%!important;bottom:auto!important;transform:translateY(-50%)!important;width:118px!important;height:118px!important;opacity:.68!important;background:#1119!important;border-color:#fff9!important}body:not(.landscape-play) #game.active #stick{width:50px!important;height:50px!important;left:30px!important;top:30px!important}body:not(.landscape-play) #game.active #message{left:calc((100vw - min(100vw,100dvh * 1.5))/2 + 8px)!important;right:calc((100vw - min(100vw,100dvh * 1.5))/2 + 8px)!important}}

/* v0.9.60 result character scale/position refinement */
#result #winnerDance{left:calc(50% - 205px);top:25%;z-index:22}#result #winnerDance img{width:145px;height:145px}#result #loserReactions{left:calc(50% + 82px);top:29%;width:190px;gap:4px;z-index:22}#result .loserUnit img{width:58px;height:58px}#result .loserUnit:before{font-size:20px;top:-18px}@media(max-width:700px),(pointer:coarse){#result #winnerDance{left:calc(50% - 145px);top:30%}#result #winnerDance img{width:105px;height:105px}#result #loserReactions{left:calc(50% + 42px);top:34%;width:145px;gap:1px}#result .loserUnit img{width:44px;height:44px}}

/* v0.9.61 interactive title parade */
#opening .title-stage .tl{pointer-events:auto;cursor:pointer;z-index:16;min-width:58px;min-height:58px;object-fit:contain}#opening .title-stage .komakame{position:absolute;width:76px;height:76px;left:-12%;top:66%;animation:titlePassR 9.5s linear infinite;z-index:16}#titleInfo{position:absolute;z-index:70;left:50%;top:67%;transform:translate(-50%,-50%) scale(.94);min-width:220px;max-width:min(84vw,430px);padding:10px 16px;border:3px solid #fff;border-radius:14px;background:#17131ee8;color:#fff;font-weight:1000;text-align:center;opacity:0;pointer-events:none;transition:.16s;box-shadow:0 6px 0 #0007}#titleInfo.show{opacity:1;transform:translate(-50%,-50%) scale(1)}#opening .title-logo{pointer-events:none}.title-touch{z-index:60}@media(max-width:700px),(pointer:coarse){#opening .title-stage .tl{min-width:66px;min-height:66px}#opening .title-stage .komakame{width:82px;height:82px;top:68%}#titleInfo{top:70%;font-size:14px}}

/* v0.9.62 portrait title: keep madam and komakame visible */
@media (orientation:portrait) and (pointer:coarse){#opening .title-stage .madam{width:78px!important;height:78px!important;top:62%!important;z-index:18!important;animation-duration:10.8s!important}#opening .title-stage .komakame{width:84px!important;height:84px!important;top:72%!important;z-index:18!important;animation-duration:9.2s!important;animation-delay:-4.2s!important}#opening .title-stage .madam,#opening .title-stage .komakame{filter:drop-shadow(0 4px 3px #0009)} }


/* v0.9.63 desktop title animation reliability */
@media (min-width:701px) and (pointer:fine){
  #opening.active .title-mikoshi-group{animation:processionBob .48s ease-in-out infinite alternate!important;animation-play-state:running!important}
  #opening.active .title-mikoshi-group .bearer{animation:bearerStep .34s ease-in-out infinite alternate!important;animation-play-state:running!important}
  #opening.active .title-mikoshi-group .b2,#opening.active .title-mikoshi-group .b4,#opening.active .title-mikoshi-group .b6{animation-delay:-.17s!important}
  #opening.active .tl.east{animation:heroRunRight 7.2s linear infinite!important;animation-play-state:running!important}
  #opening.active .tl.west{animation:heroRunLeft 8.1s linear infinite -2.4s!important;animation-play-state:running!important}
  #opening.active .tl.south{animation:heroRunRight 9s linear infinite -5s!important;animation-play-state:running!important}
  #opening.active .tl.north{animation:heroRunLeft 7.6s linear infinite -4s!important;animation-play-state:running!important}
  #opening.active .tl.carrier{animation:crossRight 8s linear infinite!important;animation-play-state:running!important}
  #opening.active .tl.c1{animation-delay:-1s!important}
  #opening.active .tl.c2{animation-delay:-5s!important}
  #opening.active .tl.cat{animation:crossRight 7s linear infinite -3s!important;animation-play-state:running!important}
  #opening.active .tl.delivery{animation:crossLeft 6s linear infinite -1s!important;animation-play-state:running!important}
  #opening.active .tl.drunk{animation:drunkWobble 2.4s ease-in-out infinite!important;animation-play-state:running!important}
  #opening.active .tl.police{animation:policeDash 3.4s linear infinite -1.2s!important;animation-play-state:running!important}
  #opening.active .tl.madam{animation:popGuest 11s ease-in-out infinite -5s!important;animation-play-state:running!important}
  #opening.active .tl.dango,#opening.active .tl.kakigori,#opening.active .tl.dorayaki{animation-play-state:running!important}
  #opening.active .title-touch{animation:titleStartPulse 1s ease-in-out infinite!important;animation-play-state:running!important}
}
