@font-face{font-family:ForestFredoka;src:url('assets/fredoka-600.woff2') format('woff2');font-weight:600;font-display:swap}
body{font-family:ForestFredoka,'Segoe UI',sans-serif;font-weight:600}
#game{min-height:0;--piece:82px;--choice:104px}
#game .world{filter:none;transform:none}
#game .world-wash{background:linear-gradient(180deg,rgba(65,53,25,.08),transparent 25%,transparent 80%,rgba(42,40,18,.12))}
#game .guide{left:24px;top:112px;width:365px;height:156px;transform:none}
#game .ori{left:0;top:15px;width:128px;height:128px;min-width:0;min-height:0;animation:none}
#game .ori img{filter:drop-shadow(0 4px 3px #39270d38)}
#game .speech{left:112px;top:0;width:252px;height:151px;min-height:0;padding:35px 40px 22px 47px;border:0;border-radius:0;background:none;box-shadow:none;isolation:isolate;font:600 23px/1.18 ForestFredoka,'Segoe UI',sans-serif;color:#553722;text-wrap:balance}
#game .speech::before{content:'';position:absolute;inset:0;z-index:-1;background:url('../assets/ui/ori-speech-normal.webp') center/contain no-repeat;transform:scaleX(-1)}
#game .speech::after{content:none}
#game .speech.glow{animation:none}
#game .stage{left:170px;right:145px;top:255px;bottom:108px;padding:0;display:flex;align-items:center;justify-content:center}
#game .board,#game .board:has(#trail[data-count="8"]){width:100%;max-width:960px;height:auto;min-height:0;max-height:100%;padding:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:visible;display:flex;flex-direction:column;align-items:center;gap:24px}
#game .trail-area{width:100%;min-height:0;flex:none}
#game .trail,#game #trail[data-count="8"]{display:flex;position:relative;width:max-content;max-width:100%;padding:34px 56px 30px;gap:10px;border:0;border-radius:0;background:url('../assets/ui/ui-panel-pause.webp') center/100% 100% no-repeat;box-shadow:none;filter:drop-shadow(0 9px 6px #39270d45);flex-wrap:wrap;align-items:center;justify-content:center}
#game .trail::before{content:none}
#game .trail-item,#game .empty-slot,#game .board:has(.model-wrap:not(.hidden)) #trail .trail-item,#game .board:has(.model-wrap:not(.hidden)) #trail .empty-slot{width:var(--piece);height:var(--piece);flex:0 0 var(--piece);border:1px solid #bf945b;box-shadow:inset 0 2px 0 #fffaf0,0 3px 3px #50351538;background:linear-gradient(145deg,#fffdf1,#f4dfb4)}
#game .trail-item img,#game .board:has(.model-wrap:not(.hidden)) #trail .trail-item img{width:calc(var(--piece) - 6px);height:calc(var(--piece) - 6px);filter:none}
#game .empty-slot{border:3px dashed #b27b28;background:#fff1bf;color:#8c5b1b;font:600 36px ForestFredoka,sans-serif;animation:emptyBreathe 2s ease-in-out infinite}
@keyframes emptyBreathe{50%{background:#fffbdc;border-color:#eab545}}
#game #trail[data-count="8"]{display:grid;grid-template-columns:repeat(4,var(--piece))}
#game .choices,#game .board:has(.check-wrap:not(.hidden)) .choices{width:auto;min-height:0;flex:none;gap:20px;padding:0;border:0;border-radius:0;background:none;box-shadow:none;justify-content:center}
#game .choice{width:var(--choice);height:var(--choice);min-width:var(--choice);min-height:var(--choice);flex:0 0 var(--choice);padding:11px;border:2px solid #ab7945;border-radius:25px;background:linear-gradient(145deg,#fffcef 5%,#f6e5bf 90%);box-shadow:0 5px 0 #a8753c,0 9px 12px #39270d38,inset 0 0 0 3px #fffbeb;transition:transform .12s,box-shadow .12s}
#game .choice img{filter:none}
#game .choice:active{transform:translateY(3px);box-shadow:0 2px 0 #a8753c}
#game .choice.selected{outline:4px solid #f3c54c;outline-offset:4px;filter:none;box-shadow:0 5px 0 #a8753c,0 0 0 7px #fff6d780}
#game .choice:disabled:not(.demo){opacity:1}
#game .model-wrap{width:100%;min-height:0;flex:none}
#game .model-trail{flex-wrap:nowrap;padding:9px 14px;gap:6px;border:2px solid #bea074;border-radius:22px;background:#fff5df;box-shadow:0 4px 8px #3d2d1833}
#game .model-trail .trail-item{width:44px;height:44px;flex:0 0 44px;border:0;background:none;box-shadow:none}
#game .model-trail .trail-item img{width:44px;height:44px}
#game .muno-head{width:var(--piece);height:var(--piece);flex:0 0 var(--piece);filter:none}
#game .muno-segment{width:var(--piece);height:var(--piece);flex:0 0 var(--piece);border:3px solid #fff3d1;font:600 32px ForestFredoka,sans-serif;box-shadow:inset 0 2px 4px #fff8,0 3px 3px #50351538}
#game .choice .muno-segment{width:100%;height:100%;font-size:36px}
#game .hero-zone{right:18px;bottom:14px;width:160px;height:190px}
#game .hero{max-width:100%;max-height:100%;filter:drop-shadow(0 5px 4px #39270d38)}
#game .helper{width:94px;height:94px;left:-20px;bottom:145px}
#game .check-wrap,#game .choices.ready~.check-wrap{position:fixed;left:50%;right:auto;bottom:max(20px,env(safe-area-inset-bottom));transform:translateX(-50%)}
#game .check-btn{width:78px;height:78px;min-width:78px;min-height:78px}
#game .level-node{font:600 20px ForestFredoka,sans-serif;animation:none}
#game .round-dot{font-family:ForestFredoka,sans-serif}
#game .demo-hand{position:fixed;filter:drop-shadow(0 3px 2px #39270d45);background:url('assets/guide-hand.svg') center/contain no-repeat}
#game .demo-hand::before{content:none}
@media(orientation:landscape) and (max-width:1150px){#game{--piece:72px;--choice:96px}#game .stage{left:145px;right:120px}#game .trail,#game #trail[data-count="8"]{padding:30px 48px;gap:8px}#game .hero-zone{width:140px;height:170px}}
@media(orientation:portrait){
 #game{--piece:78px;--choice:106px}
 #game .progress-wrap{position:fixed;top:84px;left:50%;transform:translateX(-50%);gap:5px}
 #game .guide{left:50%;top:161px;transform:translateX(-50%);width:390px;height:151px}
 #game .ori{width:136px;height:136px;top:10px}
 #game .speech{left:128px;top:0;width:260px;height:156px;font-size:24px}
 #game .stage{left:20px;right:20px;top:320px;bottom:143px;align-items:center}
 #game .board{gap:24px}
 #game .trail,#game #trail[data-count="8"]{padding:36px 48px 32px;gap:8px}
 #game .trail[data-count="6"]{--piece:clamp(44px,calc((100vw - 190px)/6),72px)}
 #game .trail[data-count="7"]{display:grid;grid-template-columns:repeat(4,var(--piece))}
 #game .hero-zone{width:128px;height:140px;right:18px;bottom:8px}
 #game .helper{width:76px;height:76px;left:-20px;bottom:108px}
 #game .level-node{font-size:17px}
}
@media(orientation:portrait) and (max-width:500px){
 #game{--piece:57px;--choice:88px}
 #game .guide{width:336px;height:132px;top:156px}
 #game .ori{width:112px;height:112px;top:12px}
 #game .speech{left:104px;width:232px;height:139px;padding:31px 35px 20px 42px;font-size:21px}
 #game .stage{left:12px;right:12px;top:295px;bottom:117px}
 #game .board{gap:22px}
 #game .trail,#game #trail[data-count="8"]{padding:27px 36px 25px;gap:7px}
 #game .trail[data-count="6"]{--piece:57px;display:grid;grid-template-columns:repeat(3,var(--piece))}
 #game .trail[data-count="7"]{display:grid;grid-template-columns:repeat(4,var(--piece))}
 #game .model-trail{padding:6px 9px;gap:4px}
 #game .model-trail .trail-item,#game .model-trail .trail-item img{width:38px;height:38px;flex-basis:38px}
 #game .hero-zone{width:100px;height:106px;right:12px}
 #game .choices{gap:16px}
 #game .check-btn{width:72px;height:72px;min-width:72px;min-height:72px}
}
@media(orientation:portrait) and (max-height:720px){
 #game{--piece:49px;--choice:80px}
 #game .progress-wrap{top:77px;gap:2px}
 #game .guide{top:142px;width:312px;height:105px}
 #game .ori{width:96px;height:96px;top:0}
 #game .speech{left:86px;width:216px;height:117px;font-size:19px;padding:25px 32px 16px 40px}
 #game .stage{top:260px;bottom:98px;left:12px;right:12px}
 #game .board{gap:13px}
 #game .trail,#game #trail[data-count="8"]{padding:18px 36px;gap:6px}
 #game .trail[data-count="6"]{--piece:46px}
 #game .board:has(.model-wrap:not(.hidden)){gap:8px}
 #game .model-trail .trail-item,#game .model-trail .trail-item img{width:30px;height:30px;flex-basis:30px}
 #game .model-trail{padding:4px 8px;gap:4px}
 #game .choice{border-radius:21px;padding:8px}
 #game .hero-zone{width:80px;height:86px}
 #game .check-wrap,#game .choices.ready~.check-wrap{bottom:12px}
 #game .check-btn{width:68px;height:68px;min-width:68px;min-height:68px}
}
@media(prefers-reduced-motion:reduce){#game .empty-slot{animation:none}}

/* Character lighting: warm rim light over a soft, local forest shadow. */
#game .ori img,#game .hero,#game .helper,#game .panel-characters img{
 filter:brightness(1.12) contrast(1.07) saturate(1.05) drop-shadow(0 -2px 2px #fff0bfcc) drop-shadow(2px 1px 1px #fff3cb99) drop-shadow(0 9px 6px #34230ec4);
}
#game .hero-zone::before,#game .ori::before{content:'';position:absolute;inset:-10%;border-radius:50%;background:radial-gradient(ellipse,#35271355 12%,#35271330 42%,transparent 70%);pointer-events:none;z-index:-1}
#game .hero-zone{width:230px;height:245px;right:12px;bottom:8px}
#game .hero{position:relative;width:100%;height:100%;object-fit:contain}
#game .helper{width:120px;height:120px;bottom:185px;left:-12px}
#game .guide{width:430px;height:178px}
#game .ori{width:174px;height:174px;left:-10px;top:0}
#game .speech{left:148px}
@media(orientation:landscape) and (max-width:1150px){
 #game .hero-zone{width:205px;height:220px}
 #game .ori{width:162px;height:162px}
 #game .speech{left:140px}
}
@media(orientation:portrait){
 #game .guide{width:448px;height:178px}
 #game .ori{width:180px;height:180px;left:0;top:0}
 #game .speech{left:170px}
 #game .hero-zone{width:192px;height:200px;right:8px;bottom:4px}
 #game .helper{width:100px;height:100px;bottom:155px;left:-10px}
}
@media(orientation:portrait) and (max-width:500px){
 #game .guide{width:calc(100% - 16px);max-width:392px;height:144px}
 #game .ori{width:146px;height:146px;left:0;top:0}
 #game .speech{left:130px;width:calc(100% - 130px);font-size:20px;padding-left:46px;padding-right:40px}
 #game .hero-zone{width:144px;height:150px;right:5px;bottom:4px}
 #game .helper{width:88px;height:88px;bottom:110px;left:-8px}
}
@media(orientation:portrait) and (max-height:720px){
 #game .ori{width:122px;height:122px;top:0}
 #game .speech{left:110px;width:calc(100% - 110px);font-size:19px}
 #game .hero-zone{width:110px;height:110px;right:4px;bottom:2px}
 #game .helper{width:72px;height:72px;bottom:90px;left:-8px}
}
#game .hero-zone:has(.helper:not(.hidden)) .hero{opacity:0}
#game .hero-zone .helper{left:0;bottom:0;width:100%;height:100%;object-fit:contain}
#game .level-highfive{max-width:100%}
@media(orientation:portrait) and (max-width:400px){
 #game #rewardOverlay .panel-actions{gap:10px;flex-wrap:nowrap}
 #game #rewardOverlay .round-action{flex:0 0 76px;width:76px;height:76px}
}
