.portrait{position:relative;display:block;width:48px;height:48px;flex:none}.portrait img{display:block}.portrait em{position:absolute;z-index:2;right:-7px;top:-8px;font-size:23px;font-style:normal;filter:drop-shadow(0 2px 2px #173b7a)}.shop-chip{cursor:pointer}.sound-test{width:100%;margin-top:14px}
.foe{position:absolute;right:10%;top:28%;z-index:3;width:145px;display:flex;flex-direction:column;align-items:center;filter:drop-shadow(0 10px 8px #0a3574b0)}.foe-name{padding:4px 9px;border-radius:9px;background:#203b83d9;color:#fff4bc;font-size:14px;font-weight:1000;white-space:nowrap}.foe-health{width:110px;height:12px;margin:4px 0 7px;border:2px solid #fff0b1;border-radius:99px;background:#234477;overflow:hidden}.foe-health b{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#70e385,#d7ff75);transition:width .25s}.foe-body{position:relative;display:flex;align-items:center;justify-content:center;gap:18px;width:126px;height:104px;border:5px solid #bee6ff;border-radius:48% 53% 44% 46%;background:radial-gradient(circle at 30% 20%,#f7fcff,#b3d8f5 46%,#677fcb 85%);box-shadow:inset -8px -9px 12px #4a64ab88,0 0 25px #b3eaffaa;animation:foeFloat 2s ease-in-out infinite}.foe-body:before,.foe-body:after{content:'';position:absolute;width:36px;height:35px;top:-11px;border:4px solid #bdeaff;border-radius:45% 55%;background:#a2c7ef}.foe-body:before{left:4px;transform:rotate(-20deg)}.foe-body:after{right:4px;transform:rotate(20deg)}.foe .eye{position:relative;z-index:2;width:13px;height:21px;border-radius:50%;background:#203775;box-shadow:2px 2px 0 #fff inset}.foe .mouth{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);width:24px;height:12px;border-bottom:4px solid #38508d;border-radius:50%}.foe.hurt .foe-body{animation:foeHit .55s both}.foe.defeated .foe-body{opacity:.25;transform:scale(.65)}.damage{position:absolute;z-index:5;top:22%;right:-40px;color:#fff4a5;font-size:24px;font-weight:1000;text-shadow:0 2px 5px #974b28;animation:damageRise .8s ease-out both}
@keyframes foeFloat{50%{transform:translateY(-7px)}}@keyframes foeHit{15%{transform:translateX(20px) rotate(10deg);filter:brightness(2)}40%{transform:translateX(-15px) rotate(-8deg)}70%{transform:translateX(10px)}100%{transform:translateX(0)}}@keyframes damageRise{to{transform:translateY(-45px);opacity:0}}
.stage-result .result-card{border-color:#f4ca64;box-shadow:0 0 35px #fff8af99,0 18px 45px #092b70a0;animation:clearPop .55s ease-out both}.victory-spark{font-size:34px;color:#ffba38;letter-spacing:10px;animation:twinkle 1s ease-in-out infinite alternate}.cleared-foe{font-size:80px;filter:drop-shadow(0 8px 6px #5774a8);animation:clearFloat 1.3s ease-in-out infinite alternate}.stage-result h1{color:#8b4b2a;text-shadow:0 2px #fff}.stage-result p{font-size:20px}@keyframes clearPop{from{transform:scale(.82);opacity:0}to{transform:scale(1);opacity:1}}@keyframes twinkle{to{opacity:.45;transform:scale(1.05)}}@keyframes clearFloat{to{transform:translateY(-12px) rotate(8deg)}}
.shop-card{max-width:820px;max-height:calc(var(--toby-view-height) - 95px);overflow-y:auto}.shop-card h1{margin:14px 0 5px}.coin-balance{display:inline-block;padding:9px 16px;border:2px solid #e6b24a;border-radius:99px;background:#fff3be;color:#936026}.shop-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:22px}.gear-card{display:flex;flex-direction:column;align-items:center;gap:9px;min-width:0;padding:15px 9px;border:2px solid #deb981;border-radius:18px;background:#fff9e9;text-align:center}.gear-icon{width:82px;height:82px;display:grid;place-items:center;border:3px solid #b4dcf9;border-radius:50%;background:linear-gradient(#e5f8ff,#a7d9ee);font-size:44px}.gear-card small{color:#8d6944}.gear-card button{margin-top:auto;font-size:14px;padding:8px 12px}
@media(max-width:820px){.portrait{width:39px;height:39px}.portrait em{font-size:17px;right:-5px;top:-5px}.shop-chip{padding:7px;font-size:12px}.foe{right:3%;top:7%;width:100px}.foe-name{font-size:10px;padding:3px 5px}.foe-health{width:72px;height:8px;margin:3px 0}.foe-body{width:77px;height:64px;border-width:3px;gap:10px}.foe-body:before,.foe-body:after{width:21px;height:19px;border-width:2px;top:-6px}.foe .eye{width:8px;height:13px}.foe .mouth{width:17px;height:8px;bottom:13px;border-width:2px}.damage{font-size:15px;right:-17px}.quest-scene .speech-bubble{right:105px}.shop-grid{grid-template-columns:repeat(2,1fr)}.shop-card{padding:20px;max-height:calc(var(--toby-view-height) - 85px)}}
@media(max-width:820px) and (max-height:700px){.foe{right:2%;top:5%;width:80px}.foe-name{font-size:9px}.foe-health{width:58px}.foe-body{width:57px;height:45px;gap:6px}.foe-body:before,.foe-body:after{width:15px;height:14px}.foe .eye{width:5px;height:9px}.foe .mouth{bottom:8px}.quest-scene .speech-bubble{right:82px}.stage-result .result-card{padding:20px}.stage-result h1{font-size:26px}.stage-result p{font-size:16px}}
@media(max-width:820px){.topbar{gap:5px;padding:6px 8px}.identity{gap:5px}.identity strong{font-size:13px}.identity small{display:none}.hud{gap:4px}.hud .shop-chip{display:inline-flex;align-items:center}.hud-chip{padding:5px 6px;font-size:11px}.icon-btn{min-width:34px;padding:4px;font-size:18px}}
@media(prefers-reduced-motion:reduce){.foe-body,.foe.hurt .foe-body,.damage,.stage-result .result-card,.victory-spark,.cleared-foe{animation:none!important}}
/* The seven landmarks belong to one continuous panoramic image. */
.map-scroll{scroll-snap-type:none}
.map-world{position:relative;flex:none;height:100%;width:calc((var(--toby-view-height) - 76px)*3);background:linear-gradient(180deg,#103d7840,transparent 32%,#0e357044),url('./assets/map-panorama.png') center/100% 100% no-repeat}
.map-world .map-node{top:55%;min-width:155px;z-index:3;transform:translate(-50%,-50%)}
.map-world .map-day-0{left:7%;top:65%}.map-world .map-day-1{left:23%;top:55%}.map-world .map-day-2{left:35%;top:49%}.map-world .map-day-3{left:50%;top:54%}.map-world .map-day-4{left:65%;top:54%}.map-world .map-day-5{left:79%;top:51%}.map-world .map-day-6{left:94%;top:48%}
.map-world .map-toby{position:absolute;z-index:2;top:auto;bottom:1%;width:clamp(110px,14vw,165px);filter:drop-shadow(0 8px 9px #183066)}
@media(max-width:820px){.map-world{width:calc((var(--toby-view-height) - 65px)*3)}.map-world .map-node{min-width:135px;min-height:60px}.map-world .map-toby{width:115px}.map-controls{width:min(315px,calc(100vw - 28px))}}
