:root{font-family:"Yu Gothic UI","Meiryo",system-ui,sans-serif;color:#fff;background:#070b12;--accent:#ffd45a;--danger:#ff445d}
*{box-sizing:border-box}html,body,#gameRoot{margin:0;width:100%;height:100%;overflow:hidden;background:#070b12}button{font:inherit;color:#fff;background:#1e2633;border:1px solid #647186;border-radius:10px;padding:.8rem 1.2rem;cursor:pointer;box-shadow:0 6px 20px #0005}button:hover{filter:brightness(1.15)}button.primary{background:linear-gradient(#ffcb46,#d88a00);color:#201600;border-color:#ffe6a0;font-weight:900}#gameCanvas{position:absolute;inset:0;width:100%;height:100%;display:block}.screen,.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:20}.screen{opacity:0;pointer-events:none;transition:.35s}.screen.show{opacity:1;pointer-events:auto}.overlay{background:#02050bd8;backdrop-filter:blur(4px)}.hidden{display:none!important}
#titleScreen{background:linear-gradient(#06080cb0,#06080cb0), url('assets/title_bg.png?v=1.0.0') center/cover no-repeat}.title-card{width:min(1080px,94vw);padding:clamp(22px,4vw,42px);border:1px solid #f5d98b66;border-radius:24px;background:linear-gradient(145deg,#111824d8,#090c12e8);box-shadow:0 30px 100px #000b, inset 0 0 80px #8d6e2b18;text-align:center;backdrop-filter:blur(4px)}.eyebrow,.result-kicker,.go-kicker{letter-spacing:.28em;font-size:.78rem;color:#f9cf6c;font-weight:800}.title-hero-wrap{display:flex;align-items:center;justify-content:center;gap:18px;margin:.8rem auto .5rem;flex-wrap:nowrap;transform:translateX(18px)}.title-face{display:block;width:clamp(190px,21vw,270px);aspect-ratio:1/1;object-fit:cover;object-position:52% 42%;border-radius:26px;border:4px solid #fff7dc;box-shadow:0 12px 34px rgba(0,0,0,.45),0 0 0 3px rgba(255,214,141,.26) inset;filter:drop-shadow(0 10px 22px #0008)}.title-logo{display:block;width:min(76%,760px);max-width:760px;margin:0;filter:drop-shadow(0 10px 26px #000)}.version{display:inline-block;padding:.25rem .7rem;border-radius:99px;background:#ffffff18;color:#d8e0eb}.story{max-width:760px;margin:1rem auto 0;color:#edf3ff;line-height:1.8;text-shadow:0 2px 6px #000}.story .quote{color:#fff1b9;font-weight:700}.title-actions{display:flex;gap:12px;justify-content:center;margin-top:1.25rem}.tiny{margin-top:1.1rem;font-size:.78rem;color:#c1cedf;text-shadow:0 2px 5px #000}.panel{background:linear-gradient(#18202c,#0b1018);border:1px solid #596577;border-radius:20px;box-shadow:0 30px 100px #000b;padding:28px}.help-panel{width:min(820px,92vw)}.help-panel h2,.map-head h2{margin-top:0}.help-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:18px 0}.help-grid div{display:flex;justify-content:space-between;gap:20px;background:#ffffff0a;border:1px solid #ffffff10;padding:10px 12px;border-radius:10px}.help-grid span{color:#aeb8c8}
.hud{position:absolute;z-index:10;left:0;right:0;top:0;display:flex;align-items:flex-start;justify-content:space-between;padding:12px;gap:12px;pointer-events:none;text-shadow:0 2px 5px #000}.hud-left,.hud-right{display:flex;gap:8px}.hud-chip{min-width:104px;background:linear-gradient(180deg,#0f1826f0,#08101ae8);border:1px solid #ffffff2e;border-radius:14px;padding:8px 12px;box-shadow:0 8px 20px #0007,inset 0 0 0 1px #ffffff10}.hud-chip span{font-size:.71rem;color:#c8d7ea;display:block;font-weight:900;letter-spacing:.03em}.hud-chip strong{font-size:1.08rem}.stage-chip{background:linear-gradient(180deg,#1a2640f0,#0d1526ee);border-color:#9ec6ff66}.score-chip{background:linear-gradient(180deg,#223619f0,#0c1910ee);border-color:#b6ef6d66}.key-chip{background:linear-gradient(180deg,#3c2b10f0,#17120aee);border-color:#ffdb7766}.shield-chip{background:linear-gradient(180deg,#102e3cf0,#07141cee);border-color:#79e0ff66}.pick-chip{background:linear-gradient(180deg,#33242ff0,#140d13ee);border-color:#f5a6e766}.time-wrap{width:min(560px,48vw);background:#07101cde;border:2px solid #ffffff30;border-radius:12px;padding:9px 14px}.time-label{display:flex;justify-content:center;align-items:baseline;gap:12px;font-size:1.18rem;font-weight:900;letter-spacing:.03em}.time-label strong{font-size:1.34rem}.time-bar{height:15px;background:#1c2533;border-radius:99px;overflow:hidden;margin-top:7px;box-shadow:inset 0 0 0 1px #ffffff12}.time-bar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#49dc6e,#f6d64d);transition:width .2s,background .2s}.message{position:absolute;z-index:12;top:96px;left:50%;transform:translateX(-50%);width:max-content;max-width:min(1100px,92vw);padding:18px 28px;border-radius:16px;background:#07101cef;border:2px solid #ffffff45;box-shadow:0 14px 42px #000b;font-size:clamp(1.65rem,3vw,2.65rem);line-height:1.35;font-weight:900;text-align:center;text-shadow:0 3px 8px #000}.hint{position:absolute;z-index:12;bottom:150px;left:50%;transform:translateX(-50%);max-width:90vw;padding:13px 20px;background:#0a111bef;border:2px solid #ffd45aaa;border-radius:12px;color:#ffe6a0;font-size:clamp(1.2rem,2.1vw,1.8rem);line-height:1.35;font-weight:900;text-align:center;text-shadow:0 2px 5px #000}.whiteout{position:absolute;inset:0;background:#fff;z-index:13;opacity:0;pointer-events:none;transition:opacity .15s}.danger-vignette{position:absolute;inset:0;z-index:9;pointer-events:none;box-shadow:inset 0 0 180px 40px #ff001100;transition:.3s}.danger-vignette.on{box-shadow:inset 0 0 180px 40px #ff001188;animation:pulse 1s infinite alternate}@keyframes pulse{to{box-shadow:inset 0 0 240px 80px #ff0011bb}}
.character-portrait{position:absolute;z-index:11;right:18px;top:96px;width:270px;height:360px;border-radius:18px;overflow:hidden;background:linear-gradient(180deg,#111a27e8,#060a10e8);border:2px solid #ffffff36;box-shadow:0 14px 38px #0009;pointer-events:none;backdrop-filter:blur(5px)}
.character-portrait .portrait-head{position:absolute;left:0;right:0;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;background:#050a11de;border-bottom:1px solid #ffffff20;text-shadow:0 2px 4px #000}
.character-portrait .portrait-head span{font-size:.78rem;font-weight:800;color:#dce7f6}.character-portrait .portrait-head strong{font-size:.9rem;color:#ffe079}
#portraitCanvas{position:absolute;inset:34px 0 0;width:100%;height:326px;display:block;background:radial-gradient(circle at 50% 36%,#45566a88 0,#17223077 42%,#060a10dd 100%)}
.inventory-panel{position:absolute;z-index:11;right:18px;top:470px;width:270px;min-height:108px;border-radius:18px;overflow:hidden;background:linear-gradient(180deg,#111a27e8,#060a10e8);border:2px solid #ffffff30;box-shadow:0 14px 38px #0009;pointer-events:none;backdrop-filter:blur(5px)}.inventory-head{padding:9px 12px;background:#050a11de;border-bottom:1px solid #ffffff20;font-size:.9rem;font-weight:900;color:#fff3b2;text-shadow:0 2px 4px #000}.inventory-list{display:flex;flex-wrap:wrap;gap:8px;padding:12px}.inventory-chip,.inventory-empty{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:6px 10px;border-radius:999px;font-size:.84rem;font-weight:900;color:#fff;border:1px solid #ffffff22;background:#263447}.inventory-chip.key{background:#7b5e1d}.inventory-chip.shield{background:#114d67}.inventory-chip.reveal{background:#693783}.inventory-chip.map{background:#206742}.inventory-chip.pick{background:#59616e}.inventory-chip.hourglass{background:#7a4e23}.inventory-empty{background:#1a2230;color:#c8d2e0}.inventory-chip img{display:block;width:22px;height:22px;min-width:22px;min-height:22px;max-width:22px;max-height:22px;flex:0 0 22px;object-fit:contain;object-position:center;margin-right:6px;border-radius:3px}.inventory-chip.traveler img{width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;max-width:22px!important;max-height:22px!important;object-fit:contain!important}
.map-panel{width:min(780px,94vw);max-height:94vh;background:#0b121d;border:1px solid #58667a;border-radius:18px;padding:14px;box-shadow:0 30px 100px #000}.map-head{display:flex;align-items:center;justify-content:space-between}.map-head h2{margin:0 0 8px}.map-head button{padding:.25rem .7rem;font-size:1.4rem}.map-panel canvas{display:block;width:min(720px,88vw);height:auto;aspect-ratio:1;background:#03070b;border-radius:8px;border:1px solid #ffffff18;margin:auto}.map-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 16px;text-align:center;color:#FFFFFF;font-size:1.18rem;font-weight:900;margin-top:12px;letter-spacing:.02em;line-height:1.45}.map-legend span{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:#14202ea8;border:1px solid #ffffff18;box-shadow:inset 0 0 0 1px #0005}.map-legend .legend-now{color:#77e9ff}.map-legend .legend-goal{color:#ffd761}.map-legend .legend-item{color:#89f0a9}.map-legend .legend-trap{color:#ff7886}.map-legend .legend-patrol{color:#ff425b}.result-panel{width:min(860px,94vw);text-align:center}.clear-layout{display:grid;grid-template-columns:300px 1fr;gap:26px;align-items:center}.clear-figure{min-height:420px;border-radius:18px;background:radial-gradient(circle at 50% 32%,#4c5a6c88 0,#182231cc 40%,#070b12 100%);border:1px solid #ffffff18;overflow:hidden;box-shadow:inset 0 0 60px #0008}#clearCharacterCanvas{display:block;width:100%;height:420px}.clear-copy{text-align:center}.result-panel h2{font-size:2.7rem;margin:.4rem 0 .8rem}.score-lines p{display:flex;justify-content:space-between;padding:12px 0;margin:0;border-bottom:1px solid #ffffff10;font-size:1.26rem}.score-lines .total{font-size:1.7rem;color:#ffe48d;border-bottom:none;margin-top:10px}.score-lines strong{font-variant-numeric:tabular-nums}.result-panel button{margin-top:20px;width:100%;font-size:1.22rem;padding:1rem 1.2rem}
.gameover-card{display:flex;gap:28px;align-items:center;width:min(880px,94vw);background:linear-gradient(120deg,#2d0710,#090b10);border:1px solid #ff4e6d55;border-radius:24px;padding:30px;box-shadow:0 30px 120px #000}.advisor-face{position:relative;flex:0 0 min(330px,36vw);aspect-ratio:1;border-radius:50%;background:#351420;overflow:hidden;border:8px solid #721b32;box-shadow:inset 0 0 80px #0008,0 0 40px #ff1f4a22}.advisor-face img{display:block;width:100%;height:100%;object-fit:cover;filter:brightness(.52) saturate(.9) contrast(1.05)}.go-copy{flex:1}.go-copy h2{font-size:clamp(2rem,6vw,4.5rem);margin:.2rem 0;color:#ff4969;text-shadow:0 0 30px #ff002f55}.go-copy p{font-size:1.08rem;line-height:1.8;color:#ffd9df}.go-actions{display:flex;gap:10px;margin-top:16px}.go-actions button{flex:1}
.mobile-controls{position:absolute;z-index:11;left:12px;right:12px;bottom:12px;display:grid;grid-template-columns:70px 70px 70px 1fr 88px 88px 88px;grid-template-rows:58px 58px;gap:7px;pointer-events:none}.mobile-controls button{pointer-events:auto;padding:0;background:#0b1422cc;backdrop-filter:blur(6px);border-color:#ffffff36;font-weight:900;touch-action:manipulation}.mobile-controls .up{grid-column:2;grid-row:1}.mobile-controls .left{grid-column:1;grid-row:2}.mobile-controls .down{grid-column:2;grid-row:2}.mobile-controls .right{grid-column:3;grid-row:2}.mobile-controls .giveup{grid-column:4;grid-row:2}.mobile-controls .open{grid-column:5;grid-row:1/3}.mobile-controls .travel{grid-column:6;grid-row:1/3}.mobile-controls .pick{grid-column:7;grid-row:1}.mobile-controls .map{grid-column:7;grid-row:2}.ending-screen{background:#eff8ff;overflow:hidden}.ending-sky{position:absolute;inset:0;background:radial-gradient(circle at 50% 16%,#fffef5 0 16%,#ffffff70 17%,transparent 26%),linear-gradient(#f4fbff 0%,#fef7ff 18%,#f7ffea 46%,#c3f2b6 72%,#8ad26a 100%)}.ending-hill{position:absolute;left:-8%;right:-8%;bottom:-18%;height:48%;background:radial-gradient(circle at 50% 20%,#98ea74 0%,#62be48 55%,#499835 100%);border-radius:50% 50% 0 0;box-shadow:inset 0 14px 0 #c8ffb7}.ending-illustration{position:absolute;left:50%;bottom:10%;width:min(1100px,94vw);height:430px;transform:translateX(-50%);z-index:2}.illustration-card{position:absolute;inset:0;background:linear-gradient(180deg,#fffef8 0%,#fffaf0 100%);border:8px solid #ffffff;border-radius:28px;box-shadow:0 18px 42px rgba(78,119,60,.25), inset 0 0 0 3px #e7f2de;overflow:hidden}.illustration-card:before{content:'';position:absolute;left:-5%;right:-5%;top:-2%;height:78%;background:radial-gradient(circle at 50% 12%,#ffffff 0,#fffef4 12%,transparent 13%),linear-gradient(180deg,#eef7ed 0%,#f7faf5 28%,#eff8df 60%,#e8f1dc 100%)}.illustration-card:after{content:'';position:absolute;left:-10%;right:-10%;bottom:-15%;height:46%;background:radial-gradient(circle at 50% 14%,#8dd76e 0,#65b247 58%,#4b8c34 100%);border-radius:50% 50% 0 0}.sheet{position:absolute;left:17%;right:16%;bottom:14%;height:32%;background:linear-gradient(180deg,#ffc3da,#ffd7e7 48%,#ffe4ef);border:5px solid #fff;border-radius:18px;box-shadow:0 8px 0 #f7aac5;transform:rotate(-1.5deg)}.rock{position:absolute;width:28px;height:18px;background:#8e8e8e;border-radius:16px 14px 12px 18px;box-shadow:inset 4px -3px 0 #bdbdbd}.r1{left:6%;bottom:10%;transform:rotate(-18deg)}.r2{left:12%;bottom:18%;transform:rotate(14deg)}.r3{right:8%;bottom:14%;transform:rotate(15deg)}.r4{right:17%;bottom:8%;transform:rotate(-12deg)}.bag{position:absolute;right:24%;bottom:28%;width:118px;height:94px;background:linear-gradient(180deg,#82e36b,#63bd4d);border:4px solid #4a953c;border-radius:20px 20px 26px 22px;box-shadow:inset 0 -8px 0 #72d059}.bag:before{content:'';position:absolute;left:28px;top:-12px;width:48px;height:28px;border:4px solid #4a953c;border-bottom:none;border-radius:24px 24px 0 0}.bag:after{content:'';position:absolute;left:18px;top:26px;width:76px;height:24px;border:4px solid #59a046;border-radius:9px}.cup{position:absolute;right:18%;bottom:19%;width:42px;height:52px;background:linear-gradient(180deg,#fff,#ddd);border:4px solid #979797;border-radius:0 0 14px 14px}.wetbox{position:absolute;left:10%;bottom:18%;width:76px;height:50px;background:#e7fbff;border:4px solid #8ac7d3;border-radius:12px}.wetbox:before{content:'';position:absolute;left:24px;top:-18px;width:26px;height:30px;background:#fff;border-radius:50% 50% 0 0;box-shadow:0 4px 0 #e9ecef}.snack{position:absolute;width:84px;height:40px;background:linear-gradient(180deg,#fff2dc,#ffd8c3);border:4px solid #dca584;border-radius:10px}.snack:before{content:'';position:absolute;left:10px;top:9px;width:14px;height:14px;background:#ff7d84;border-radius:4px;box-shadow:18px 0 0 #ffb85c,36px 0 0 #ff7d84,54px 0 0 #ffb85c}.snack-a{left:11%;bottom:11%}.snack-b{left:25%;bottom:11%;width:92px}.bowl{position:absolute;left:25%;bottom:8%;width:92px;height:44px;background:#fff8ff;border:4px solid #d49fca;border-radius:0 0 24px 24px}.bowl:before{content:'';position:absolute;inset:7px 8px 16px;background:radial-gradient(circle,#ff8ab3 15%,transparent 16%) 0 0/18px 18px,#dcf6ff;border-radius:0 0 20px 20px}.onigiri-box{position:absolute;left:22%;bottom:23%;width:132px;height:74px;background:linear-gradient(180deg,#bb8748,#8f5b2a);border:4px solid #6e441b;border-radius:10px;box-shadow:inset 0 0 0 3px #d7a56e}.onigiri-box i{position:absolute;bottom:14px;width:20px;height:20px;background:#191919;border-radius:50%;box-shadow:0 7px 0 #fff inset}.onigiri-box i:nth-child(1){left:12px}.onigiri-box i:nth-child(2){left:34px}.onigiri-box i:nth-child(3){left:56px}.onigiri-box i:nth-child(4){left:78px}.onigiri-box i:nth-child(5){left:22px;bottom:37px}.onigiri-box i:nth-child(6){left:54px;bottom:39px}.thermos{position:absolute;left:47%;bottom:22%;width:74px;height:142px;background:linear-gradient(180deg,#f0f0f0,#bbb 40%,#e6e6e6 70%,#c9c9c9);border:4px solid #888;border-radius:24px;box-shadow:inset -12px 0 0 #ffffff66}.thermos:before{content:'';position:absolute;left:12px;top:-16px;width:46px;height:28px;background:#d5d5d5;border:4px solid #7e7e7e;border-radius:10px}.thermos:after{content:'';position:absolute;right:-12px;top:42px;width:15px;height:54px;border:5px solid #222;border-left:none;border-radius:0 18px 18px 0}.hero-seated{position:absolute;left:43%;bottom:16%;width:180px;height:244px;z-index:4}.hero-face{position:absolute;left:55px;top:30px;width:72px;height:72px;background:#f8e4d5;border:4px solid #6b5050;border-radius:50%;z-index:3}.hero-face:before{content:'';position:absolute;left:17px;top:29px;width:10px;height:4px;border-bottom:3px solid #444;border-radius:0 0 10px 10px;box-shadow:24px 0 0 #444}.hero-face:after{content:'';position:absolute;left:22px;top:42px;width:26px;height:12px;border-bottom:4px solid #ee8aa3;border-radius:0 0 20px 20px}.hero-hair{position:absolute;left:42px;top:10px;width:96px;height:88px;background:#d7b197;border:4px solid #8e766d;border-bottom:none;border-radius:52px 52px 34px 34px;z-index:4}.hero-hair:before,.hero-hair:after{content:'';position:absolute;top:42px;width:18px;height:56px;background:#d7b197;border:4px solid #8e766d;border-top:none;border-radius:0 0 18px 18px}.hero-hair:before{left:-6px;transform:rotate(8deg)}.hero-hair:after{right:-6px;transform:rotate(-8deg)}.hero-body{position:absolute;left:50px;top:90px;width:82px;height:92px;background:#d4ef9f;border:4px solid #5c6a62;border-radius:24px 24px 28px 28px;z-index:2}.hero-body:before{content:'';position:absolute;left:24px;top:0;width:34px;height:20px;background:#fff;border:4px solid #5c6a62;border-top:none;border-radius:0 0 16px 16px}.hero-body:after{content:'';position:absolute;left:36px;top:24px;width:10px;height:44px;background:linear-gradient(#fff,#e8dfbf);border-radius:5px;box-shadow:0 9px 0 0 #d2b567,0 18px 0 0 #d2b567,0 27px 0 0 #d2b567}.hero-arm,.hero-leg{position:absolute;background:#f7ddcd;border:4px solid #6b5050;border-radius:16px}.hero-arm.left{left:42px;top:110px;width:18px;height:78px;transform:rotate(18deg);z-index:1}.hero-arm.right{right:42px;top:110px;width:18px;height:78px;transform:rotate(-16deg);z-index:1}.hero-leg.left{left:45px;bottom:6px;width:28px;height:88px;transform:rotate(12deg);z-index:0}.hero-leg.right{right:45px;bottom:6px;width:28px;height:88px;transform:rotate(-12deg);z-index:0}.friend{position:absolute;width:84px;height:136px;z-index:3}.friend:before{content:'';position:absolute;left:17px;top:0;width:44px;height:44px;background:#f8e4d5;border:4px solid #5a4747;border-radius:50%}.friend:after{content:'';position:absolute;left:11px;top:40px;width:56px;height:70px;border:4px solid #5a4767;border-radius:20px 20px 18px 18px}.friend-l{left:4%;bottom:23%}.friend-l:before{background:#f8e4d5;box-shadow:0 -10px 0 8px #9b745e}.friend-l:after{background:#ffd7e5}.friend-r{right:5%;bottom:22%}.friend-r:before{background:#f8e4d5;box-shadow:0 -10px 0 8px #8d6d56}.friend-r:after{background:#bce7ff}.friend-b{right:32%;bottom:27%;transform:scale(.95)}.friend-b:before{background:#f8e4d5;box-shadow:0 -10px 0 8px #6d5148}.friend-b:after{background:#f6e28d}.ending-copy{position:absolute;left:50%;top:3.2%;transform:translateX(-50%);width:min(840px,90vw);text-align:center;z-index:6;color:#183822;text-shadow:0 2px #fff8}.ending-line{font-size:clamp(1.2rem,2vw,1.8rem);font-weight:900;background:#ffffffbc;border:3px solid #ffd1e6;border-radius:999px;padding:10px 22px;display:inline-block;box-shadow:0 6px 18px #8b4b6122}.ending-logo{display:block;width:min(700px,84vw);margin:14px auto 8px;filter:drop-shadow(0 8px 18px rgba(255,90,150,.22))}.ending-copy p{margin:0 auto;max-width:720px;font-size:clamp(1rem,1.6vw,1.28rem);font-weight:900;background:#ffffffd8;padding:12px 18px;border-radius:20px;box-shadow:0 4px 20px #5a833522}.ending-copy button{margin-top:14px}.ending-screen.show{opacity:1;pointer-events:auto}.ending-screen .primary{box-shadow:0 8px 0 #1c5f44,0 16px 24px #1f483133}@media(max-width:900px){.ending-illustration{height:360px;bottom:7%}.hero-seated{transform:scale(.9);transform-origin:50% 100%}.friend{transform:scale(.88)}.bag{transform:scale(.9)}.thermos{transform:scale(.9)}}
@media(max-width:640px){.ending-illustration{width:98vw;height:310px}.illustration-card{border-width:6px;border-radius:20px}.sheet{left:8%;right:8%;bottom:8%;height:35%}.hero-seated{left:36%;bottom:10%;transform:scale(.68)}.friend-l{left:0;bottom:18%;transform:scale(.72)}.friend-r{right:0;bottom:17%;transform:scale(.72)}.friend-b{right:27%;bottom:22%;transform:scale(.7)}.wetbox{left:4%;bottom:14%;transform:scale(.8)}.snack-a{left:8%;bottom:7%;transform:scale(.8)}.snack-b{left:20%;bottom:7%;transform:scale(.8)}.bowl{left:22%;bottom:4%;transform:scale(.8)}.onigiri-box{left:18%;bottom:18%;transform:scale(.8)}.thermos{left:44%;bottom:16%;transform:scale(.72)}.bag{right:16%;bottom:22%;transform:scale(.8)}.cup{right:9%;bottom:14%;transform:scale(.8)}.rock{transform:scale(.8)}.ending-logo{width:min(560px,88vw)}}



/* v0.1.23: compass / goal-detector display restoration */
.direction-chip{min-width:188px;background:linear-gradient(150deg,#49326fdd,#143653e8);border:2px solid #ffccf0aa;border-radius:20px;box-shadow:0 8px 24px #0008,inset 0 0 26px #9bdcff22;padding:8px 10px 10px}.direction-top{display:flex;flex-direction:column;gap:2px;align-items:center}.direction-chip span{color:#ffe9fb;font-weight:900}.direction-chip strong{font-size:1.65rem;color:#fff88b;letter-spacing:.04em;text-shadow:0 0 12px #ffbf44,0 2px 5px #000}.compass-cute{position:relative;width:138px;height:138px;margin:8px auto 0;border-radius:50%;background:linear-gradient(145deg,#ff91c6,#7ddcff);border:5px solid #fff7fc;box-shadow:inset 0 0 0 5px #ffffff77,inset 0 0 28px #6c228455,0 8px 24px #0008}.compass-face{position:absolute;inset:16px;border-radius:50%;background:radial-gradient(circle at 42% 35%,#fff7fd 0 12%,#c8efff 34%,#a7c6ff 64%,#7957bb 100%);box-shadow:inset 0 0 20px #6a3f9e55}.compass-ring{position:absolute;left:50%;top:50%;width:66px;height:66px;transform:translate(-50%,-50%);border:6px solid #fff;border-color:#fff #fff0b8 #fff #fff0b8;border-radius:50%;box-shadow:0 0 13px #fff9}.compass-needle{position:absolute;left:50%;top:50%;width:0;height:0;transform:translate(-50%,-82%) rotate(0deg);transform-origin:50% 85%;border-left:15px solid transparent;border-right:15px solid transparent;border-bottom:45px solid #ff416a;filter:drop-shadow(0 0 8px #ff5370)}.compass-needle::before{content:"";position:absolute;left:-12px;top:35px;border-left:12px solid transparent;border-right:12px solid transparent;border-top:32px solid #43aaff}.compass-needle::after{content:"";position:absolute;left:-6px;top:35px;width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 0 8px #fff8}.compass-cute b{position:absolute;width:31px;height:31px;display:flex;align-items:center;justify-content:center;border-radius:50%;font-size:1.42rem;font-weight:1000;line-height:1;background:#fff;border:3px solid #ffffffcc;box-shadow:0 3px 8px #0005;text-shadow:none;z-index:2}.compass-cute .north{top:3px;left:50%;transform:translateX(-50%);color:#fff;background:#ff5577}.compass-cute .east{right:4px;top:50%;transform:translateY(-50%);color:#fff;background:#6bc8f6}.compass-cute .south{bottom:3px;left:50%;transform:translateX(-50%);color:#fff;background:#7acb6c}.compass-cute .west{left:4px;top:50%;transform:translateY(-50%);color:#fff;background:#b889e9}.goal-detector{position:absolute;z-index:12;left:50%;top:50%;transform:translate(-50%,-46%);display:flex;align-items:center;gap:16px;padding:14px 22px;border-radius:22px;background:linear-gradient(135deg,#0d2840ee,#0a1424ee);border:3px solid #70e7ffcc;box-shadow:0 0 34px #49dcff55,0 16px 45px #000b;pointer-events:none;min-width:330px;justify-content:center}.goal-detector.hidden{display:none!important}.goal-detector-arrow{font-size:5.4rem;line-height:.8;color:#fff35d;text-shadow:0 0 16px #ffc400,0 4px 0 #a76500;transform-origin:50% 50%;transition:transform .16s ease-out}.goal-detector-copy{display:flex;flex-direction:column;gap:3px;text-align:left}.goal-detector-copy b{font-size:.98rem;letter-spacing:.12em;color:#7eeaff}.goal-detector-copy span{font-size:1.45rem;font-weight:1000;color:#fff}.inventory-chip.detector{background:#116274;color:#effcff;border-color:#71e6ff66}
@media(max-width:760px){.direction-chip{min-width:126px}.direction-chip strong{font-size:1.12rem}.compass-cute{width:90px;height:90px;border-width:4px}.compass-face{inset:11px}.compass-ring{width:43px;height:43px;border-width:4px}.compass-needle{border-left-width:10px;border-right-width:10px;border-bottom-width:29px}.compass-needle::before{left:-8px;top:22px;border-left-width:8px;border-right-width:8px;border-top-width:20px}.compass-needle::after{left:-5px;top:22px;width:10px;height:10px}.compass-cute b{width:22px;height:22px;font-size:.92rem;border-width:2px}.goal-detector{top:54%;min-width:260px;padding:10px 14px;gap:10px}.goal-detector-arrow{font-size:4rem}.goal-detector-copy b{font-size:.75rem}.goal-detector-copy span{font-size:1.05rem}}

/* v0.1.21 mobile landscape optimization */
.orientation-notice{z-index:40;background:rgba(2,6,12,.82);backdrop-filter:blur(8px)}
.orientation-panel{width:min(92vw,540px);text-align:center;border:2px solid #ffffff30;background:linear-gradient(180deg,#172131,#0b1018);box-shadow:0 24px 60px rgba(0,0,0,.55)}
.orientation-panel h2{margin:.2rem 0 1rem;font-size:clamp(1.4rem,4vw,2.2rem);color:#ffe08c}.orientation-panel p{margin:0 auto 1rem;line-height:1.8;font-size:clamp(1rem,2.7vw,1.2rem)}.orientation-icon{font-size:clamp(2rem,8vw,3.6rem);margin:.3rem 0 1rem}.orientation-panel button{min-width:150px}
button:disabled{opacity:.58;cursor:not-allowed;filter:none}
@media (pointer:coarse) and (orientation:landscape){
  .title-card{width:min(98vw,1040px);padding:16px 18px 14px;border-radius:18px}
  .title-hero-wrap{gap:12px;margin:.45rem auto .25rem;transform:translateX(10px)}.title-face{width:120px;border-width:3px;border-radius:16px}.title-logo{width:min(82%,700px);margin:0}.story{max-width:86vw;line-height:1.55;font-size:.92rem}.story p{margin:.45rem 0}.title-actions{margin-top:.85rem}.tiny{margin-top:.8rem;font-size:.66rem;line-height:1.45}
  .hud{padding:8px;gap:6px;align-items:flex-start}.hud-left,.hud-right{gap:6px}.hud-chip{min-width:66px;padding:5px 7px;border-radius:12px}.hud-chip span{font-size:.52rem}.hud-chip strong{font-size:.82rem}.direction-chip{min-width:112px}.time-wrap{width:min(38vw,330px);padding:6px 10px;border-radius:12px}.time-label{gap:8px;font-size:1rem}.time-label strong{font-size:1.14rem}.time-bar{height:12px;margin-top:6px}
  .compass-cute{transform:scale(.76);transform-origin:left top;margin-top:-2px;margin-bottom:-18px}
  .character-portrait{top:72px;right:8px;width:138px;height:176px;border-radius:12px}.character-portrait .portrait-head{padding:4px 6px}.character-portrait .portrait-head span{font-size:.56rem}.character-portrait .portrait-head strong{font-size:.68rem}#portraitCanvas{width:100%!important;height:calc(100% - 28px)!important;display:block}
  .inventory-panel{top:254px;right:8px;width:176px;min-height:82px;max-height:132px;border-radius:12px}.inventory-head{padding:6px 8px;font-size:.72rem}.inventory-list{gap:4px;padding:6px;max-height:92px;overflow:auto}.inventory-chip,.inventory-empty{min-height:22px;padding:4px 6px;font-size:.62rem;line-height:1.1}.inventory-chip img{width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;max-width:16px!important;max-height:16px!important;flex-basis:16px!important;object-fit:contain!important;margin-right:4px}
  .message{top:74px;left:44%;max-width:66vw;padding:10px 16px;font-size:clamp(.95rem,2.1vw,1.3rem);border-radius:12px}.hint{bottom:72px;max-width:70vw;padding:8px 12px;font-size:clamp(.8rem,1.7vw,1.05rem)}
  .goal-detector{transform:scale(.82);transform-origin:center bottom;bottom:70px!important}
  .mobile-controls{left:8px;right:192px;bottom:8px;grid-template-columns:56px 56px 56px minmax(84px,1fr) 74px 74px 68px;grid-template-rows:44px 44px;gap:6px}.mobile-controls button{font-size:.82rem;border-radius:14px}.mobile-controls .open,.mobile-controls .travel{font-size:.74rem}.mobile-controls .giveup{font-size:.62rem;line-height:1.05}
  .map-panel{width:min(96vw,780px);max-height:96vh;padding:18px}.map-legend{font-size:.88rem}.gameover-card{width:min(92vw,900px)}
}
@media (pointer:coarse) and (orientation:portrait){
  .title-card{width:min(94vw,760px)}
}


/* v0.1.24 ending illustration refresh */
.ending-image-mode{bottom:12%;width:min(1180px,95vw);height:min(66vh,720px)}
.scenic-card{background:rgba(255,255,255,.18);border:8px solid rgba(255,255,255,.95);box-shadow:0 20px 48px rgba(41,71,29,.26), inset 0 0 0 2px rgba(255,255,255,.7)}
.ending-hero-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.ending-copy-image{top:3%;width:min(900px,92vw)}
.ending-copy-image p{display:none!important}
.ending-copy-image .ending-line{margin-bottom:12px}
.ending-copy-image .ending-logo{width:min(760px,88vw);margin:0 auto}
.ending-title-bottom{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);z-index:9;min-width:220px;padding:16px 28px;font-size:clamp(1rem,2vw,1.2rem);box-shadow:0 10px 0 #1c5f44,0 18px 28px rgba(31,72,49,.2)!important}
@media(max-width:900px){.ending-image-mode{height:min(58vh,500px);bottom:14%}.ending-copy-image{top:2%}.ending-copy-image .ending-logo{width:min(640px,90vw)}.ending-title-bottom{bottom:16px;min-width:190px;padding:14px 22px}}
@media(max-width:640px){.ending-image-mode{height:min(50vh,320px);bottom:16%}.scenic-card{border-width:6px;border-radius:18px}.ending-copy-image .ending-line{font-size:clamp(1rem,4vw,1.15rem);padding:8px 14px}.ending-title-bottom{bottom:12px;padding:12px 18px;font-size:1rem}}


/* v0.1.28 ending/front/trap visual tuning */
.ending-copy-front{position:absolute;left:50%;top:2%;transform:translateX(-50%);width:min(1220px,95vw);z-index:10;display:flex;flex-direction:column;align-items:center;gap:10px}.ending-copy-front .ending-logo{width:min(760px,88vw);margin:0 auto}.ending-image-inline{position:relative;left:auto;bottom:auto;transform:none;width:min(1180px,95vw);height:min(60vh,680px);z-index:11}.scenic-card-front{overflow:hidden;border:8px solid rgba(255,255,255,.96);border-radius:28px;box-shadow:0 18px 48px rgba(36,58,28,.28),inset 0 0 0 2px rgba(255,255,255,.72)}.ending-title-bottom{bottom:18px;z-index:12}.inventory-chip img{width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;max-width:22px!important;max-height:22px!important;object-fit:contain;flex:0 0 22px}.inventory-chip.traveler img{width:22px!important;height:22px!important;max-width:22px!important;max-height:22px!important}.trap-disabled-x{pointer-events:none}
@media(max-width:900px){.ending-copy-front{top:1.4%;gap:8px}.ending-image-inline{height:min(54vh,470px)}.ending-copy-front .ending-logo{width:min(640px,90vw)}}
@media(max-width:640px){.ending-copy-front{width:96vw}.ending-image-inline{width:96vw;height:min(42vh,290px)}.scenic-card-front{border-width:6px;border-radius:18px}.ending-title-bottom{bottom:10px}}

@media(max-width:900px){.title-hero-wrap{gap:14px;transform:translateX(10px)}.title-face{width:clamp(130px,24vw,180px);border-radius:20px}.title-logo{width:min(72%,600px)}}
@media(max-width:640px){.title-hero-wrap{flex-direction:column;gap:10px;transform:none}.title-face{width:min(52vw,220px)}.title-logo{width:min(94%,560px)}}

.intro-panel{width:min(1120px,94vw);padding:clamp(18px,3.8vw,34px)}
.intro-layout{display:grid;grid-template-columns:minmax(280px,420px) 1fr;gap:24px;align-items:center}
.intro-art-wrap{display:flex;justify-content:center;align-items:center}
.intro-art{display:block;width:min(100%,420px);max-height:72vh;object-fit:cover;border-radius:22px;border:3px solid #fff7dc;box-shadow:0 18px 50px #000a,0 0 0 3px rgba(255,214,141,.16) inset}
.intro-copy{text-align:left;color:#eef5ff}
.intro-copy h2{margin:.2rem 0 .8rem;font-size:clamp(1.5rem,2.8vw,2.4rem);color:#fff5ca;text-shadow:0 2px 10px #000}
.intro-copy p{line-height:1.9;font-size:clamp(1rem,1.45vw,1.16rem);margin:.68rem 0}
.intro-copy .quote{color:#fff1b9;font-weight:800}
.intro-actions{justify-content:flex-start;margin-top:1.1rem}
@media(max-width:900px){.intro-layout{grid-template-columns:1fr;gap:18px}.intro-copy{text-align:center}.intro-actions{justify-content:center}.intro-art{max-height:44vh}}


/* v1.0.0 release hotfix: intro -> game transition */
#startButton.starting,#introStartButton.starting{
  animation:introStartBlink .34s steps(2,end) infinite;
  box-shadow:0 0 0 4px rgba(255,232,128,.25),0 0 34px rgba(255,196,45,.95),0 8px 24px rgba(0,0,0,.45);
}
@keyframes introStartBlink{
  0%,100%{opacity:1;filter:brightness(1.35) saturate(1.25);transform:scale(1.03)}
  50%{opacity:.28;filter:brightness(.75);transform:scale(.98)}
}


/* v1.0.0 mobilefix2: landscape-first / Switch-inspired mobile UI */
.mobile-device{--safe-l:max(8px,env(safe-area-inset-left));--safe-r:max(8px,env(safe-area-inset-right));--safe-t:max(6px,env(safe-area-inset-top));--safe-b:max(6px,env(safe-area-inset-bottom))}
.mobile-device .mobile-controls{display:none}
.mobile-landscape .mobile-controls:not(.hidden){display:block!important}
.mobile-landscape .switch-controls{position:absolute;inset:0;z-index:15;pointer-events:none;background:transparent}
.mobile-landscape .switch-grip{position:absolute;top:50%;transform:translateY(-50%);width:106px;height:min(76vh,430px);min-height:260px;border:2px solid #ffffff80;box-shadow:0 14px 32px #0009,inset 0 0 0 2px #ffffff24,inset 0 0 34px #0004;pointer-events:none}
.mobile-landscape .switch-left{left:var(--safe-l);border-radius:42px 20px 20px 42px;background:linear-gradient(160deg,#2fc8ee,#168bbd 58%,#0c5c85)}
.mobile-landscape .switch-right{right:var(--safe-r);border-radius:20px 42px 42px 20px;background:linear-gradient(160deg,#ff5a68,#df3045 58%,#8c1729)}
.mobile-landscape .switch-minus,.mobile-landscape .switch-plus{position:absolute;top:16px;color:#eafaff;font-size:26px;font-weight:1000;text-shadow:0 2px 4px #0008}
.mobile-landscape .switch-minus{right:12px}.mobile-landscape .switch-plus{left:12px}
.mobile-landscape .switch-stick{position:absolute;width:52px;height:52px;border-radius:50%;background:radial-gradient(circle at 38% 32%,#58616c 0 18%,#303843 20% 56%,#171c23 58% 100%);border:4px solid #151a21;box-shadow:0 5px 10px #0008,inset 0 0 0 3px #77818d55}
.mobile-landscape .switch-stick i{position:absolute;inset:12px;border-radius:50%;border:2px solid #89939e55}
.mobile-landscape .left-stick{top:50px;left:25px}.mobile-landscape .right-stick{bottom:46px;right:25px}
.mobile-landscape .switch-dpad{position:absolute;left:13px;bottom:48px;width:80px;height:80px;pointer-events:auto}
.mobile-landscape .switch-dpad button,.mobile-landscape .switch-actions button{position:absolute;margin:0;padding:0;width:31px;height:31px;min-width:0;border-radius:50%;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:0;background:linear-gradient(#343d48,#171d25);border:2px solid #87919d;box-shadow:0 3px 0 #0b0e12,0 4px 8px #0007;font-size:13px;line-height:1;color:#fff;pointer-events:auto;touch-action:none;-webkit-user-select:none;user-select:none}
.mobile-landscape .switch-dpad button:active,.mobile-landscape .switch-actions button:active,.mobile-landscape .switch-small:active{transform:translateY(2px);box-shadow:0 1px 0 #0b0e12,inset 0 0 10px #fff3}
.mobile-landscape .switch-dpad small,.mobile-landscape .switch-actions small,.mobile-landscape .switch-small small{font-size:7px;line-height:1;opacity:.68;font-weight:800}
.mobile-landscape .switch-dpad .up{left:24px;top:0}.mobile-landscape .switch-dpad .down{left:24px;bottom:0}.mobile-landscape .switch-dpad .left{left:0;top:24px}.mobile-landscape .switch-dpad .right{right:0;top:24px}
.mobile-landscape .switch-small{position:absolute;left:16px;bottom:12px;width:74px;height:27px;min-width:0;padding:0 5px;border-radius:14px;background:#24313b;border:1px solid #bfd5e4;font-size:9px;line-height:1;pointer-events:auto;touch-action:none}
.mobile-landscape .switch-actions{position:absolute;right:12px;top:46px;width:82px;height:82px;pointer-events:auto}
.mobile-landscape .switch-actions button{width:36px;height:36px;font-size:7px;border-color:#d7dce1;background:linear-gradient(#3c444e,#191e25)}
.mobile-landscape .switch-actions button b{font-size:7px;line-height:1;letter-spacing:-.02em}.mobile-landscape .switch-actions .action-top{left:23px;top:0}.mobile-landscape .switch-actions .action-bottom{left:23px;bottom:0}.mobile-landscape .switch-actions .action-left{left:0;top:23px}.mobile-landscape .switch-actions .action-right{right:0;top:23px}
.mobile-landscape .switch-center-label{position:absolute;left:50%;bottom:calc(var(--safe-b) + 4px);transform:translateX(-50%);padding:3px 13px;border-radius:99px;background:#050a11aa;border:1px solid #ffffff32;color:#ffffff8a;font-size:8px;letter-spacing:.16em;font-weight:900;pointer-events:none}
/* Keep the playable center clear of the controller grips. */
.mobile-landscape #gameCanvas{left:0;right:0;width:100%;height:100%}
.mobile-landscape .hud{left:112px;right:112px;top:var(--safe-t);padding:5px 6px;gap:5px}.mobile-landscape .hud-left,.mobile-landscape .hud-right{gap:4px}.mobile-landscape .hud-chip{min-width:58px;padding:4px 6px;border-radius:9px}.mobile-landscape .hud-chip span{font-size:8px;letter-spacing:0}.mobile-landscape .hud-chip strong{font-size:11px}.mobile-landscape .direction-chip{min-width:102px;padding:4px 5px}.mobile-landscape .direction-chip strong{font-size:15px}.mobile-landscape .compass-cute{width:62px;height:62px;margin:3px auto -2px;border-width:3px}.mobile-landscape .compass-face{inset:8px}.mobile-landscape .compass-ring{width:31px;height:31px;border-width:3px}.mobile-landscape .compass-needle{border-left-width:7px;border-right-width:7px;border-bottom-width:22px}.mobile-landscape .compass-needle::before{left:-6px;top:17px;border-left-width:6px;border-right-width:6px;border-top-width:16px}.mobile-landscape .compass-needle::after{left:-4px;top:17px;width:8px;height:8px}.mobile-landscape .compass-cute b{width:16px;height:16px;font-size:8px;border-width:1px}.mobile-landscape .time-wrap{width:min(34vw,300px);padding:4px 7px;border-radius:9px}.mobile-landscape .time-label{font-size:12px;gap:6px}.mobile-landscape .time-label strong{font-size:14px}.mobile-landscape .time-bar{height:9px;margin-top:3px}
.mobile-landscape .character-portrait{top:58px;right:116px;width:116px;height:148px;border-radius:10px}.mobile-landscape .character-portrait .portrait-head{padding:3px 5px}.mobile-landscape .character-portrait .portrait-head span{font-size:7px}.mobile-landscape .character-portrait .portrait-head strong{font-size:9px}.mobile-landscape #portraitCanvas{inset:24px 0 0;height:124px}
.mobile-landscape .inventory-panel{top:212px;right:116px;width:150px;min-height:64px;max-height:112px;border-radius:10px}.mobile-landscape .inventory-head{padding:4px 6px;font-size:9px}.mobile-landscape .inventory-list{gap:3px;padding:4px;max-height:84px;overflow:auto}.mobile-landscape .inventory-chip,.mobile-landscape .inventory-empty{min-height:18px;padding:2px 4px;font-size:8px;line-height:1}.mobile-landscape .inventory-chip img{width:14px!important;height:14px!important;min-width:14px!important;min-height:14px!important;max-width:14px!important;max-height:14px!important;flex-basis:14px!important;margin-right:3px}
.mobile-landscape .message{top:57px;left:50%;max-width:calc(100vw - 250px);padding:8px 12px;font-size:clamp(13px,2.2vw,20px);border-radius:10px}.mobile-landscape .hint{bottom:calc(var(--safe-b) + 8px);max-width:calc(100vw - 250px);padding:6px 10px;font-size:clamp(11px,1.8vw,16px)}.mobile-landscape .goal-detector{top:53%;transform:translate(-50%,-50%) scale(.72);transform-origin:center;min-width:250px}.mobile-landscape .map-panel{width:min(calc(100vw - 230px),760px);max-height:94vh;padding:12px}.mobile-landscape .map-legend{font-size:11px}.mobile-landscape .gameover-card{width:min(calc(100vw - 230px),820px)}
/* Title/intro/help are also landscape-first on mobile. */
.mobile-landscape .title-card,.mobile-landscape .intro-panel,.mobile-landscape .help-panel{max-height:94vh;overflow:auto}.mobile-landscape .title-card{width:min(calc(100vw - 28px),1040px);padding:10px 14px}.mobile-landscape .title-face{width:104px}.mobile-landscape .title-logo{max-height:100px;object-fit:contain}.mobile-landscape .title-hero-wrap{margin:2px auto;gap:10px}.mobile-landscape .intro-panel{width:min(calc(100vw - 24px),1000px);padding:12px}.mobile-landscape .intro-layout{grid-template-columns:minmax(220px,34vw) 1fr;gap:16px}.mobile-landscape .intro-art{max-height:68vh}.mobile-landscape .intro-copy p{font-size:13px;line-height:1.55;margin:.35rem 0}.mobile-landscape .intro-copy h2{font-size:20px;margin:.15rem 0 .4rem}.mobile-landscape .help-panel{width:min(calc(100vw - 24px),900px);padding:14px}.mobile-landscape .help-grid{gap:5px;margin:8px 0}.mobile-landscape .help-grid div{padding:6px 8px;font-size:11px}
/* Portrait is only used when the orientation detector is confident. */
.mobile-portrait .mobile-controls{display:none!important}


/* v1.0.0 mobilefix3: custom landscape gamepad (less console-specific) */
.mobile-landscape .switch-controls{position:absolute;inset:0;z-index:15;pointer-events:none;background:transparent}
.mobile-landscape .switch-grip{top:auto;bottom:calc(var(--safe-b) + 10px);transform:none;width:118px;height:168px;min-height:0;border:1px solid rgba(170,220,235,.45);border-radius:28px;background:linear-gradient(155deg,rgba(31,44,58,.92),rgba(9,16,26,.92));box-shadow:0 12px 28px #0008,inset 0 0 0 1px #ffffff12,inset 0 0 26px rgba(80,190,220,.07);backdrop-filter:blur(8px)}
.mobile-landscape .switch-left{left:var(--safe-l);right:auto;border-radius:28px;background:linear-gradient(160deg,rgba(29,51,62,.95),rgba(10,21,29,.95))}
.mobile-landscape .switch-right{right:var(--safe-r);left:auto;border-radius:28px;background:linear-gradient(160deg,rgba(49,39,63,.95),rgba(20,14,30,.95))}
.mobile-landscape .switch-minus,.mobile-landscape .switch-plus{top:9px;left:0;right:0;text-align:center;font-size:9px;letter-spacing:.18em;font-weight:900;color:#bfe9f5;text-shadow:none;opacity:.85}
.mobile-landscape .switch-plus{color:#e0c9ff}
.mobile-landscape .switch-stick{width:38px;height:38px;border-width:2px;background:radial-gradient(circle at 38% 32%,#60717c 0 15%,#2a3842 18% 58%,#111a21 60% 100%);box-shadow:0 3px 8px #0008,inset 0 0 0 2px #9bcbd544}
.mobile-landscape .switch-stick i{inset:9px;border-color:#b5dce544}
.mobile-landscape .left-stick{top:29px;left:40px}.mobile-landscape .right-stick{bottom:auto;top:29px;right:40px}
.mobile-landscape .switch-dpad{left:18px;bottom:22px;width:82px;height:82px}
.mobile-landscape .switch-dpad button,.mobile-landscape .switch-actions button{background:linear-gradient(#33424c,#151f27);border:1px solid #90afbb;box-shadow:0 3px 0 #070c10,0 5px 10px #0007;border-radius:11px}
.mobile-landscape .switch-dpad button{width:32px;height:32px;font-size:13px}
.mobile-landscape .switch-dpad .up{left:25px;top:0}.mobile-landscape .switch-dpad .down{left:25px;bottom:0}.mobile-landscape .switch-dpad .left{left:0;top:25px}.mobile-landscape .switch-dpad .right{right:0;top:25px}
.mobile-landscape .switch-actions{right:18px;top:auto;bottom:22px;width:82px;height:82px}
.mobile-landscape .switch-actions button{width:34px;height:34px;border-radius:50%;border-color:#b6a6cf;background:linear-gradient(#443b52,#1d1726)}
.mobile-landscape .switch-actions .action-top{left:24px;top:0}.mobile-landscape .switch-actions .action-bottom{left:24px;bottom:0}.mobile-landscape .switch-actions .action-left{left:0;top:24px}.mobile-landscape .switch-actions .action-right{right:0;top:24px}
.mobile-landscape .switch-small{left:18px;bottom:auto;top:73px;width:82px;height:24px;border-radius:8px;background:#1a2730;border:1px solid #7c9aa8;font-size:8px;box-shadow:0 2px 0 #091015}
.mobile-landscape .switch-center-label{bottom:calc(var(--safe-b) + 5px);background:rgba(8,14,22,.72);border-color:#7ec3d633;color:#b7dbe4;font-size:7px;letter-spacing:.13em}
.mobile-landscape .hud{left:126px;right:126px}
.mobile-landscape .character-portrait{right:128px}.mobile-landscape .inventory-panel{right:128px}
.mobile-landscape .message,.mobile-landscape .hint{max-width:calc(100vw - 276px)}
.mobile-landscape .map-panel,.mobile-landscape .gameover-card{max-width:calc(100vw - 260px)}
@media(max-height:430px){
  .mobile-landscape .switch-grip{width:104px;height:148px;border-radius:24px}
  .mobile-landscape .left-stick{left:33px;top:27px}.mobile-landscape .right-stick{right:33px;top:27px}
  .mobile-landscape .switch-dpad{left:11px;bottom:14px;transform:scale(.88)}
  .mobile-landscape .switch-actions{right:11px;bottom:14px;transform:scale(.88)}
  .mobile-landscape .switch-small{left:11px;top:65px;width:82px}
  .mobile-landscape .hud{left:112px;right:112px}.mobile-landscape .character-portrait{right:114px}.mobile-landscape .inventory-panel{right:114px}
}


/* v1.0.0 mobilefix4: real-device landscape layout */
:root{--app-vh:100dvh}
@supports(height:100dvh){html,body,#gameRoot{height:100dvh;min-height:100dvh}}
body.mobile-device,#gameRoot{overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.orientation-help{display:inline-block;margin-top:8px;color:#ffe7a0;font-weight:900;line-height:1.55}

/* Compact briefing that fits inside Safari/Chrome's reduced landscape viewport. */
.mobile-landscape #introScreen{align-items:stretch;justify-content:stretch;padding:max(4px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))}
.mobile-landscape .intro-panel{width:100%;height:100%;max-height:none!important;overflow:hidden!important;padding:6px 9px;border-radius:12px}
.mobile-landscape .intro-layout{display:grid;grid-template-columns:minmax(150px,29vw) 1fr;gap:10px;height:100%;min-height:0;align-items:stretch}
.mobile-landscape .intro-art-wrap{height:100%;min-height:0;overflow:hidden;border-radius:9px}
.mobile-landscape .intro-art{width:100%;height:100%;max-height:none!important;object-fit:cover;object-position:center 44%;border-radius:9px;border-width:2px}
.mobile-landscape .intro-copy{min-height:0;display:flex;flex-direction:column;justify-content:center;padding:1px 4px;text-align:left;overflow:hidden}
.mobile-landscape .intro-copy .eyebrow{font-size:7px;letter-spacing:.2em;line-height:1.1}
.mobile-landscape .intro-copy h2{font-size:clamp(14px,4.3vh,20px);line-height:1.05;margin:2px 0 3px}
.mobile-landscape .intro-copy p{font-size:clamp(9px,2.8vh,13px);line-height:1.32;margin:2px 0}
.mobile-landscape .intro-copy .quote{line-height:1.3}
.mobile-landscape .intro-actions{justify-content:flex-start;gap:6px;margin-top:5px;flex:0 0 auto}
.mobile-landscape .intro-actions button{padding:5px 11px;font-size:clamp(9px,2.6vh,12px);border-radius:7px;box-shadow:0 3px 8px #0005}

/* A custom transparent mobile control layout: no Switch-like grip panels. */
.mobile-landscape .switch-controls{position:absolute;inset:0;z-index:15;pointer-events:none;background:transparent}
.mobile-landscape .switch-grip{display:contents!important;background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}
.mobile-landscape .switch-minus,.mobile-landscape .switch-plus,.mobile-landscape .switch-stick,.mobile-landscape .switch-center-label{display:none!important}
.mobile-landscape .switch-dpad{position:absolute;left:max(8px,env(safe-area-inset-left));bottom:max(8px,env(safe-area-inset-bottom));width:104px;height:104px;pointer-events:auto}
.mobile-landscape .switch-dpad button{position:absolute;width:38px;height:38px;min-width:0;padding:0;border-radius:12px;background:linear-gradient(180deg,rgba(38,54,68,.96),rgba(15,25,34,.96));border:1px solid rgba(156,213,231,.62);box-shadow:0 3px 8px #0008,inset 0 0 0 1px #ffffff12;color:#f3fbff;font-size:15px;line-height:1;touch-action:none}
.mobile-landscape .switch-dpad button small{display:block;font-size:7px;line-height:7px;opacity:.65;margin-top:1px}
.mobile-landscape .switch-dpad .up{left:33px;top:0}.mobile-landscape .switch-dpad .down{left:33px;bottom:0}.mobile-landscape .switch-dpad .left{left:0;top:33px}.mobile-landscape .switch-dpad .right{right:0;top:33px}
.mobile-landscape .switch-actions{position:absolute;right:max(8px,env(safe-area-inset-right));bottom:max(8px,env(safe-area-inset-bottom));width:110px;height:94px;display:grid!important;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:7px;pointer-events:auto}
.mobile-landscape .switch-actions button{position:static!important;width:auto!important;height:auto!important;min-width:0;padding:2px;border-radius:13px;background:linear-gradient(180deg,rgba(65,47,78,.96),rgba(27,20,37,.96));border:1px solid rgba(212,183,235,.64);box-shadow:0 3px 8px #0008,inset 0 0 0 1px #ffffff12;touch-action:none}
.mobile-landscape .switch-actions button b{display:block;font-size:8px;line-height:1.05;letter-spacing:0}.mobile-landscape .switch-actions button small{display:block;font-size:7px;line-height:1;opacity:.65;margin-top:2px}
.mobile-landscape .switch-small{position:absolute!important;left:50%!important;right:auto!important;top:auto!important;bottom:max(8px,env(safe-area-inset-bottom))!important;transform:translateX(-50%)!important;width:82px!important;height:27px!important;min-width:0!important;padding:0 6px!important;border-radius:14px!important;background:rgba(64,22,29,.93)!important;border:1px solid rgba(255,130,145,.68)!important;box-shadow:0 3px 8px #0008!important;font-size:9px!important;line-height:1!important;pointer-events:auto!important;touch-action:none!important}
.mobile-landscape .switch-small small{font-size:7px;opacity:.7;margin-left:3px}
.mobile-landscape .switch-dpad button:active,.mobile-landscape .switch-actions button:active,.mobile-landscape .switch-small:active{filter:brightness(1.25);transform:translateY(1px);box-shadow:0 1px 4px #0007!important}
.mobile-landscape .switch-small:active{transform:translateX(-50%) translateY(1px)!important}

/* Keep HUD and auxiliary panels away from touch controls. */
.mobile-landscape .hud{left:max(4px,env(safe-area-inset-left));right:max(4px,env(safe-area-inset-right));top:max(2px,env(safe-area-inset-top));padding:3px 4px;gap:3px}
.mobile-landscape .hud-left,.mobile-landscape .hud-right{gap:3px}.mobile-landscape .hud-chip{min-width:52px;padding:3px 5px;border-radius:8px}.mobile-landscape .hud-chip span{font-size:7px}.mobile-landscape .hud-chip strong{font-size:10px}.mobile-landscape .stage-chip,.mobile-landscape .score-chip,.mobile-landscape .key-chip,.mobile-landscape .shield-chip,.mobile-landscape .pick-chip{min-width:54px}
.mobile-landscape .direction-chip{min-width:82px;padding:3px}.mobile-landscape .direction-top span{font-size:6px}.mobile-landscape .direction-chip strong{font-size:12px}.mobile-landscape .compass-cute{width:48px;height:48px;margin:2px auto 0;border-width:2px}.mobile-landscape .compass-face{inset:6px}.mobile-landscape .compass-ring{width:24px;height:24px;border-width:2px}.mobile-landscape .compass-needle{border-left-width:5px;border-right-width:5px;border-bottom-width:17px}.mobile-landscape .compass-needle::before{left:-4px;top:13px;border-left-width:4px;border-right-width:4px;border-top-width:12px}.mobile-landscape .compass-needle::after{left:-3px;top:13px;width:6px;height:6px}.mobile-landscape .compass-cute b{width:13px;height:13px;font-size:6px}
.mobile-landscape .time-wrap{width:min(32vw,260px);padding:3px 6px;border-radius:8px}.mobile-landscape .time-label{font-size:10px;gap:4px}.mobile-landscape .time-label strong{font-size:12px}.mobile-landscape .time-bar{height:7px;margin-top:2px}
.mobile-landscape .character-portrait{top:54px;right:max(8px,env(safe-area-inset-right));width:88px;height:112px;border-radius:9px}.mobile-landscape .character-portrait .portrait-head{padding:2px 4px}.mobile-landscape .character-portrait .portrait-head span{font-size:6px}.mobile-landscape .character-portrait .portrait-head strong{font-size:7px}.mobile-landscape #portraitCanvas{inset:19px 0 0;height:93px}
.mobile-landscape .inventory-panel{top:170px;right:max(8px,env(safe-area-inset-right));width:120px;min-height:52px;max-height:76px;border-radius:9px}.mobile-landscape .inventory-head{padding:3px 5px;font-size:7px}.mobile-landscape .inventory-list{gap:2px;padding:3px;max-height:56px;overflow:auto}.mobile-landscape .inventory-chip,.mobile-landscape .inventory-empty{min-height:15px;padding:2px 3px;font-size:7px}.mobile-landscape .inventory-chip img{width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important;max-width:12px!important;max-height:12px!important;flex-basis:12px!important;margin-right:2px}
.mobile-landscape .message{top:50px;max-width:calc(100vw - 230px);padding:6px 10px;font-size:clamp(12px,4vh,18px);border-radius:9px}.mobile-landscape .hint{bottom:42px;max-width:calc(100vw - 230px);padding:5px 9px;font-size:clamp(10px,3vh,14px)}
.mobile-landscape .goal-detector{top:53%;transform:translate(-50%,-50%) scale(.66);transform-origin:center;min-width:230px}

/* Very short landscape viewport: iPhone Safari with browser chrome visible. */
@media(max-height:430px){
  .mobile-landscape .intro-panel{padding:4px 7px}.mobile-landscape .intro-layout{grid-template-columns:minmax(130px,26vw) 1fr;gap:7px}.mobile-landscape .intro-copy h2{font-size:14px}.mobile-landscape .intro-copy p{font-size:9px;line-height:1.22;margin:1px 0}.mobile-landscape .intro-copy .eyebrow{font-size:6px}.mobile-landscape .intro-actions{margin-top:3px}.mobile-landscape .intro-actions button{font-size:8px;padding:4px 8px}
  .mobile-landscape .switch-dpad{width:88px;height:88px}.mobile-landscape .switch-dpad button{width:32px;height:32px;font-size:12px;border-radius:10px}.mobile-landscape .switch-dpad .up{left:28px}.mobile-landscape .switch-dpad .down{left:28px}.mobile-landscape .switch-dpad .left{top:28px}.mobile-landscape .switch-dpad .right{top:28px}
  .mobile-landscape .switch-actions{width:94px;height:78px;gap:5px}.mobile-landscape .switch-actions button{border-radius:11px}.mobile-landscape .switch-actions button b{font-size:7px}.mobile-landscape .switch-actions button small{font-size:6px}
  .mobile-landscape .switch-small{width:72px!important;height:23px!important;font-size:8px!important}
  .mobile-landscape .character-portrait{top:48px;width:78px;height:96px}.mobile-landscape #portraitCanvas{inset:17px 0 0;height:79px}.mobile-landscape .inventory-panel{top:148px;width:105px;max-height:60px}
}

/* Ultra-short landscape (browser chrome visible): preserve controls over decoration. */
@media(max-height:360px){
  .mobile-landscape .character-portrait{display:none!important}
  .mobile-landscape .inventory-panel{top:45px!important;right:max(7px,env(safe-area-inset-right))!important;width:148px!important;min-height:0!important;max-height:54px!important}
  .mobile-landscape .inventory-head{padding:2px 5px!important;font-size:7px!important}
  .mobile-landscape .inventory-list{display:flex!important;flex-wrap:wrap!important;gap:2px!important;padding:2px 3px!important;max-height:37px!important;overflow:auto!important}
  .mobile-landscape .inventory-chip,.mobile-landscape .inventory-empty{font-size:6px!important;min-height:14px!important;padding:1px 3px!important}
  .mobile-landscape .message{top:46px!important;max-width:calc(100vw - 340px)!important}
  .mobile-landscape .hint{bottom:36px!important;max-width:calc(100vw - 240px)!important}
}


/* v1.0.0 mobilefix5: larger touch targets + zoom suppression */
html,body{touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body.mobile-device,body.mobile-device #gameRoot{touch-action:none;overflow:hidden}body.mobile-device #gameRoot{position:fixed;inset:0;width:100%;height:var(--app-vh,100dvh);max-width:100vw;max-height:100dvh}
body.mobile-device button,body.mobile-device [role="button"]{touch-action:none;-webkit-tap-highlight-color:transparent}
body.mobile-device input,body.mobile-device select,body.mobile-device textarea{font-size:16px!important}
body.mobile-device .screen,body.mobile-device .overlay{touch-action:none}
body.mobile-device #howScreen .help-panel,body.mobile-device #titleScreen .title-card,body.mobile-device #introScreen .intro-panel{overscroll-behavior:contain}

.mobile-landscape .switch-dpad{width:126px!important;height:126px!important;left:max(10px,env(safe-area-inset-left))!important;bottom:max(10px,env(safe-area-inset-bottom))!important}
.mobile-landscape .switch-dpad button{width:48px!important;height:48px!important;border-radius:15px!important;font-size:19px!important;font-weight:900!important;border-width:2px!important;box-shadow:0 4px 10px #0009,inset 0 0 0 1px #ffffff18!important}
.mobile-landscape .switch-dpad button small{font-size:9px!important;line-height:9px!important;margin-top:2px!important}
.mobile-landscape .switch-dpad .up{left:39px!important;top:0!important}.mobile-landscape .switch-dpad .down{left:39px!important;bottom:0!important}.mobile-landscape .switch-dpad .left{left:0!important;top:39px!important}.mobile-landscape .switch-dpad .right{right:0!important;top:39px!important}

.mobile-landscape .switch-actions{width:144px!important;height:116px!important;right:max(10px,env(safe-area-inset-right))!important;bottom:max(10px,env(safe-area-inset-bottom))!important;gap:8px!important}
.mobile-landscape .switch-actions button{min-width:0!important;min-height:50px!important;padding:5px 4px!important;border-radius:15px!important;border-width:2px!important;box-shadow:0 4px 10px #0009,inset 0 0 0 1px #ffffff18!important}
.mobile-landscape .switch-actions button b{font-size:11px!important;line-height:1.05!important}.mobile-landscape .switch-actions button small{font-size:9px!important;line-height:1!important;margin-top:3px!important}
.mobile-landscape .switch-small{width:92px!important;height:31px!important;font-size:10px!important}
.mobile-landscape .switch-small small{font-size:8px!important}

/* Keep center notifications clear of the enlarged controls. */
.mobile-landscape .hint{bottom:55px!important;max-width:calc(100vw - 310px)!important}
.mobile-landscape .message{max-width:calc(100vw - 290px)!important}

@media(max-height:430px){
  .mobile-landscape .switch-dpad{width:116px!important;height:116px!important}
  .mobile-landscape .switch-dpad button{width:44px!important;height:44px!important;font-size:17px!important;border-radius:14px!important}
  .mobile-landscape .switch-dpad .up{left:36px!important}.mobile-landscape .switch-dpad .down{left:36px!important}.mobile-landscape .switch-dpad .left{top:36px!important}.mobile-landscape .switch-dpad .right{top:36px!important}
  .mobile-landscape .switch-actions{width:132px!important;height:104px!important;gap:7px!important}
  .mobile-landscape .switch-actions button{min-height:44px!important;padding:4px 3px!important}.mobile-landscape .switch-actions button b{font-size:10px!important}.mobile-landscape .switch-actions button small{font-size:8px!important}
  .mobile-landscape .switch-small{width:86px!important;height:28px!important;font-size:9px!important}
}
@media(max-height:340px){
  .mobile-landscape .switch-dpad{width:108px!important;height:108px!important}
  .mobile-landscape .switch-dpad button{width:42px!important;height:42px!important;font-size:16px!important}
  .mobile-landscape .switch-dpad .up{left:33px!important}.mobile-landscape .switch-dpad .down{left:33px!important}.mobile-landscape .switch-dpad .left{top:33px!important}.mobile-landscape .switch-dpad .right{top:33px!important}
  .mobile-landscape .switch-actions{width:126px!important;height:98px!important;gap:6px!important}
  .mobile-landscape .switch-actions button{min-height:42px!important}
}


/* v1.0.0 mobilefix6: larger, separated D-pad */
.mobile-landscape .switch-dpad{
  width:196px!important;
  height:196px!important;
  left:max(8px,env(safe-area-inset-left))!important;
  bottom:max(8px,env(safe-area-inset-bottom))!important;
}
.mobile-landscape .switch-dpad button{
  width:60px!important;
  height:60px!important;
  border-radius:18px!important;
  font-size:23px!important;
  border-width:2px!important;
  box-shadow:0 5px 12px #0009,inset 0 0 0 1px #ffffff1c!important;
}
.mobile-landscape .switch-dpad button small{
  font-size:10px!important;
  line-height:10px!important;
  margin-top:3px!important;
}
.mobile-landscape .switch-dpad .up{left:68px!important;top:0!important}
.mobile-landscape .switch-dpad .down{left:68px!important;bottom:0!important}
.mobile-landscape .switch-dpad .left{left:0!important;top:68px!important}
.mobile-landscape .switch-dpad .right{right:0!important;top:68px!important}

/* Keep messages clear of the larger movement pad. */
.mobile-landscape .hint{max-width:calc(100vw - 390px)!important}
.mobile-landscape .message{max-width:calc(100vw - 370px)!important}

@media(max-height:430px){
  .mobile-landscape .switch-dpad{width:182px!important;height:182px!important}
  .mobile-landscape .switch-dpad button{width:56px!important;height:56px!important;font-size:21px!important;border-radius:17px!important}
  .mobile-landscape .switch-dpad .up{left:63px!important;top:0!important}
  .mobile-landscape .switch-dpad .down{left:63px!important;bottom:0!important}
  .mobile-landscape .switch-dpad .left{left:0!important;top:63px!important}
  .mobile-landscape .switch-dpad .right{right:0!important;top:63px!important}
}
@media(max-height:340px){
  .mobile-landscape .switch-dpad{width:168px!important;height:168px!important}
  .mobile-landscape .switch-dpad button{width:52px!important;height:52px!important;font-size:19px!important;border-radius:16px!important}
  .mobile-landscape .switch-dpad .up{left:58px!important;top:0!important}
  .mobile-landscape .switch-dpad .down{left:58px!important;bottom:0!important}
  .mobile-landscape .switch-dpad .left{left:0!important;top:58px!important}
  .mobile-landscape .switch-dpad .right{right:0!important;top:58px!important}
}

#interactionHint{white-space:pre-line;text-align:center}


/* v1.0.0 mobilefix7: rebalance landscape UI after real-device testing */
.mobile-landscape .switch-dpad{
  width:152px!important;height:152px!important;
  left:max(7px,env(safe-area-inset-left))!important;
  bottom:max(7px,env(safe-area-inset-bottom))!important;
}
.mobile-landscape .switch-dpad button{
  width:50px!important;height:50px!important;
  border-radius:15px!important;font-size:19px!important;
}
.mobile-landscape .switch-dpad button small{font-size:8px!important;line-height:8px!important;margin-top:2px!important}
.mobile-landscape .switch-dpad .up{left:51px!important;top:0!important}
.mobile-landscape .switch-dpad .down{left:51px!important;bottom:0!important}
.mobile-landscape .switch-dpad .left{left:0!important;top:51px!important}
.mobile-landscape .switch-dpad .right{right:0!important;top:51px!important}

/* Make top HUD intentionally smaller on phones to preserve the maze view. */
.mobile-landscape .hud{padding:2px 3px!important;gap:2px!important}
.mobile-landscape .hud-left,.mobile-landscape .hud-right{gap:2px!important}
.mobile-landscape .hud-chip{min-width:44px!important;padding:2px 4px!important;border-radius:7px!important}
.mobile-landscape .hud-chip span{font-size:6px!important;line-height:1.05!important}
.mobile-landscape .hud-chip strong{font-size:9px!important;line-height:1.05!important}
.mobile-landscape .stage-chip,.mobile-landscape .score-chip,.mobile-landscape .key-chip,.mobile-landscape .shield-chip,.mobile-landscape .pick-chip{min-width:46px!important}
.mobile-landscape .direction-chip{min-width:68px!important;padding:2px 3px!important}
.mobile-landscape .direction-top span{font-size:5px!important}
.mobile-landscape .direction-chip strong{font-size:10px!important}
.mobile-landscape .compass-cute{width:39px!important;height:39px!important;margin:1px auto 0!important;border-width:2px!important}
.mobile-landscape .compass-face{inset:5px!important}
.mobile-landscape .compass-ring{width:20px!important;height:20px!important;border-width:2px!important}
.mobile-landscape .compass-needle{border-left-width:4px!important;border-right-width:4px!important;border-bottom-width:14px!important}
.mobile-landscape .compass-needle::before{left:-3px!important;top:11px!important;border-left-width:3px!important;border-right-width:3px!important;border-top-width:10px!important}
.mobile-landscape .compass-needle::after{left:-2.5px!important;top:11px!important;width:5px!important;height:5px!important}
.mobile-landscape .compass-cute b{width:11px!important;height:11px!important;font-size:5px!important}
.mobile-landscape .time-wrap{width:min(27vw,220px)!important;padding:2px 5px!important;border-radius:7px!important}
.mobile-landscape .time-label{font-size:9px!important;gap:3px!important}
.mobile-landscape .time-label strong{font-size:11px!important}
.mobile-landscape .time-bar{height:6px!important;margin-top:2px!important}

/* More central room for hints/messages after shrinking the left pad. */
.mobile-landscape .hint{bottom:45px!important;max-width:calc(100vw - 300px)!important}
.mobile-landscape .message{max-width:calc(100vw - 270px)!important}

@media(max-height:430px){
  .mobile-landscape .switch-dpad{width:140px!important;height:140px!important}
  .mobile-landscape .switch-dpad button{width:46px!important;height:46px!important;font-size:17px!important;border-radius:14px!important}
  .mobile-landscape .switch-dpad .up{left:47px!important}.mobile-landscape .switch-dpad .down{left:47px!important}.mobile-landscape .switch-dpad .left{top:47px!important}.mobile-landscape .switch-dpad .right{top:47px!important}
  .mobile-landscape .time-wrap{width:min(25vw,195px)!important}
}
@media(max-height:340px){
  .mobile-landscape .switch-dpad{width:128px!important;height:128px!important}
  .mobile-landscape .switch-dpad button{width:42px!important;height:42px!important;font-size:16px!important;border-radius:13px!important}
  .mobile-landscape .switch-dpad .up{left:43px!important}.mobile-landscape .switch-dpad .down{left:43px!important}.mobile-landscape .switch-dpad .left{top:43px!important}.mobile-landscape .switch-dpad .right{top:43px!important}
  .mobile-landscape .hud-chip{min-width:40px!important;padding:2px 3px!important}
  .mobile-landscape .stage-chip,.mobile-landscape .score-chip,.mobile-landscape .key-chip,.mobile-landscape .shield-chip,.mobile-landscape .pick-chip{min-width:42px!important}
  .mobile-landscape .direction-chip{min-width:62px!important}.mobile-landscape .compass-cute{width:35px!important;height:35px!important}
  .mobile-landscape .time-wrap{width:min(24vw,180px)!important}
}

/* v1.0.0 mobilefix8: stage-clear screen fitted to short landscape viewports */
.mobile-landscape #stageClear{
  align-items:stretch!important;
  justify-content:stretch!important;
  padding:max(4px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;
  overflow:hidden!important;
}
.mobile-landscape #stageClear .result-panel{
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  padding:6px!important;
  border-radius:12px!important;
  overflow:hidden!important;
}
.mobile-landscape #stageClear .clear-layout{
  display:grid!important;
  grid-template-columns:minmax(128px,30vw) minmax(0,1fr)!important;
  gap:8px!important;
  align-items:stretch!important;
}
.mobile-landscape #stageClear .clear-figure{
  min-height:0!important;
  height:100%!important;
  max-height:none!important;
  border-radius:9px!important;
}
.mobile-landscape #clearCharacterCanvas{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-height:100%!important;
}
.mobile-landscape #stageClear .clear-copy{
  min-width:0!important;
  min-height:0!important;
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  overflow:hidden!important;
  padding:0 3px!important;
}
.mobile-landscape #stageClear .result-kicker{
  font-size:7px!important;
  line-height:1!important;
  letter-spacing:.2em!important;
  margin:0!important;
}
.mobile-landscape #stageClear .result-panel h2{
  font-size:clamp(15px,5.2vh,22px)!important;
  line-height:1.05!important;
  margin:2px 0 4px!important;
}
.mobile-landscape #stageClear .score-lines{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:4px!important;
  margin:0!important;
}
.mobile-landscape #stageClear .score-lines p{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:0!important;
  padding:4px 3px!important;
  margin:0!important;
  border:1px solid #ffffff16!important;
  border-radius:7px!important;
  background:#ffffff08!important;
  font-size:clamp(8px,2.7vh,11px)!important;
  line-height:1.05!important;
}
.mobile-landscape #stageClear .score-lines p span{
  white-space:nowrap!important;
  font-size:.82em!important;
  opacity:.86!important;
}
.mobile-landscape #stageClear .score-lines p strong{
  margin-top:2px!important;
  font-size:1.15em!important;
}
.mobile-landscape #stageClear .score-lines .total{
  grid-column:1/-1!important;
  display:flex!important;
  flex-direction:row!important;
  gap:10px!important;
  padding:4px 8px!important;
  font-size:clamp(11px,3.5vh,15px)!important;
  border:1px solid #ffe48d55!important;
  background:#3e321566!important;
}
.mobile-landscape #stageClear .score-lines .total strong{margin-top:0!important}
.mobile-landscape #stageClear #nextStage{
  flex:0 0 auto!important;
  width:100%!important;
  min-height:34px!important;
  margin-top:5px!important;
  padding:5px 10px!important;
  border-radius:9px!important;
  font-size:clamp(10px,3.2vh,14px)!important;
  line-height:1.05!important;
}

@media(max-height:430px){
  .mobile-landscape #stageClear .result-panel{padding:4px!important}
  .mobile-landscape #stageClear .clear-layout{grid-template-columns:minmax(112px,27vw) minmax(0,1fr)!important;gap:5px!important}
  .mobile-landscape #stageClear .result-panel h2{font-size:14px!important;margin:1px 0 3px!important}
  .mobile-landscape #stageClear .result-kicker{font-size:6px!important}
  .mobile-landscape #stageClear .score-lines{gap:3px!important}
  .mobile-landscape #stageClear .score-lines p{padding:3px 2px!important;font-size:8px!important;border-radius:6px!important}
  .mobile-landscape #stageClear .score-lines .total{padding:3px 6px!important;font-size:10px!important}
  .mobile-landscape #stageClear #nextStage{min-height:30px!important;margin-top:3px!important;padding:4px 8px!important;font-size:9px!important}
}

@media(max-height:330px){
  .mobile-landscape #stageClear .clear-layout{grid-template-columns:minmax(96px,24vw) minmax(0,1fr)!important;gap:4px!important}
  .mobile-landscape #stageClear .result-panel h2{font-size:12px!important}
  .mobile-landscape #stageClear .score-lines p{padding:2px!important;font-size:7px!important}
  .mobile-landscape #stageClear .score-lines .total{font-size:9px!important;padding:2px 5px!important}
  .mobile-landscape #stageClear #nextStage{min-height:27px!important;font-size:8px!important;margin-top:2px!important}
}


/* v1.0.0 mobilefix9: compact clear CTA, clearer movement pad, fitted map */
.mobile-landscape #stageClear #nextStage{
  width:52%!important;
  min-width:150px!important;
  max-width:240px!important;
  min-height:48px!important;
  align-self:center!important;
  margin:6px auto 0!important;
  padding:8px 12px!important;
  border-radius:12px!important;
  font-size:clamp(10px,3vh,14px)!important;
  line-height:1.1!important;
}
@media(max-height:430px){
  .mobile-landscape #stageClear #nextStage{width:50%!important;min-width:142px!important;max-width:220px!important;min-height:44px!important;margin-top:4px!important;padding:7px 10px!important}
}
@media(max-height:330px){
  .mobile-landscape #stageClear #nextStage{width:48%!important;min-width:132px!important;max-width:200px!important;min-height:40px!important;margin-top:3px!important;padding:6px 8px!important}
}

/* Movement pad: readable labels while keeping the left side compact. */
.mobile-landscape .switch-dpad{
  width:142px!important;
  height:142px!important;
  left:max(6px,env(safe-area-inset-left))!important;
  bottom:max(6px,env(safe-area-inset-bottom))!important;
}
.mobile-landscape .switch-dpad button{
  width:50px!important;
  height:50px!important;
  border-radius:13px!important;
  padding:2px 1px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:0!important;
  font-size:inherit!important;
  background:linear-gradient(180deg,rgba(42,58,72,.97),rgba(13,22,31,.97))!important;
  border:1px solid rgba(164,218,235,.72)!important;
  box-shadow:0 3px 9px #0009,inset 0 0 0 1px #ffffff12!important;
}
.mobile-landscape .switch-dpad button b{
  display:block!important;
  font-size:17px!important;
  line-height:15px!important;
  color:#f5fbff!important;
  margin:0!important;
}
.mobile-landscape .switch-dpad button span{
  display:block!important;
  font-size:8px!important;
  line-height:9px!important;
  font-weight:900!important;
  color:#c9f2ff!important;
  white-space:nowrap!important;
}
.mobile-landscape .switch-dpad button small{
  display:block!important;
  font-size:6px!important;
  line-height:7px!important;
  opacity:.62!important;
  margin:0!important;
}
.mobile-landscape .switch-dpad .up{left:46px!important;top:0!important}
.mobile-landscape .switch-dpad .down{left:46px!important;bottom:0!important}
.mobile-landscape .switch-dpad .left{left:0!important;top:46px!important}
.mobile-landscape .switch-dpad .right{right:0!important;top:46px!important}

@media(max-height:340px){
  .mobile-landscape .switch-dpad{width:130px!important;height:130px!important}
  .mobile-landscape .switch-dpad button{width:46px!important;height:46px!important;border-radius:12px!important}
  .mobile-landscape .switch-dpad button b{font-size:15px!important;line-height:14px!important}
  .mobile-landscape .switch-dpad button span{font-size:7px!important;line-height:8px!important}
  .mobile-landscape .switch-dpad button small{font-size:6px!important;line-height:6px!important}
  .mobile-landscape .switch-dpad .up{left:42px!important}.mobile-landscape .switch-dpad .down{left:42px!important}.mobile-landscape .switch-dpad .left{top:42px!important}.mobile-landscape .switch-dpad .right{top:42px!important}
}

/* Smartphone map: fit the actual visible viewport, not the full desktop-sized square. */
.mobile-landscape #mapScreen{
  padding:max(4px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left))!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
.mobile-landscape #mapScreen .map-panel{
  width:min(92vw,720px)!important;
  height:min(94dvh,94vh)!important;
  max-height:min(94dvh,94vh)!important;
  display:grid!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
  gap:5px!important;
  padding:7px!important;
  border-radius:12px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
.mobile-landscape #mapScreen .map-head{
  min-height:34px!important;
  margin:0!important;
  gap:8px!important;
}
.mobile-landscape #mapScreen .map-head h2{
  margin:0!important;
  font-size:14px!important;
  line-height:1!important;
  letter-spacing:.08em!important;
}
.mobile-landscape #mapScreen #mapClose{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  min-width:86px!important;
  min-height:36px!important;
  padding:5px 10px!important;
  margin:0!important;
  border-radius:10px!important;
  background:linear-gradient(180deg,#d9505d,#922c39)!important;
  border:1px solid #ff9da6!important;
  box-shadow:0 3px 8px #0007!important;
  color:#fff!important;
  font-weight:900!important;
  touch-action:manipulation!important;
}
.mobile-landscape #mapScreen #mapClose b{font-size:20px!important;line-height:1!important}
.mobile-landscape #mapScreen #mapClose span{font-size:11px!important;line-height:1!important}
.mobile-landscape #mapScreen #mapCanvas{
  width:auto!important;
  height:100%!important;
  max-width:100%!important;
  max-height:100%!important;
  min-height:0!important;
  aspect-ratio:1!important;
  justify-self:center!important;
  align-self:center!important;
  object-fit:contain!important;
}
.mobile-landscape #mapScreen .map-legend{
  display:flex!important;
  flex-wrap:wrap!important;
  justify-content:center!important;
  align-items:center!important;
  gap:3px 5px!important;
  margin:0!important;
  padding:0!important;
  font-size:8px!important;
  line-height:1.1!important;
}
.mobile-landscape #mapScreen .map-legend span{
  padding:2px 5px!important;
  gap:2px!important;
  border-radius:999px!important;
  white-space:nowrap!important;
}
@media(max-height:360px){
  .mobile-landscape #mapScreen .map-panel{height:min(96dvh,96vh)!important;max-height:min(96dvh,96vh)!important;padding:5px!important;gap:3px!important}
  .mobile-landscape #mapScreen .map-head{min-height:30px!important}
  .mobile-landscape #mapScreen .map-head h2{font-size:12px!important}
  .mobile-landscape #mapScreen #mapClose{min-width:76px!important;min-height:32px!important;padding:3px 8px!important}
  .mobile-landscape #mapScreen #mapClose b{font-size:18px!important}
  .mobile-landscape #mapScreen #mapClose span{font-size:10px!important}
  .mobile-landscape #mapScreen .map-legend{font-size:7px!important;gap:2px 4px!important}
  .mobile-landscape #mapScreen .map-legend span{padding:1px 4px!important}
}


/* v1.0.0 mobilefix10: unified one-screen landscape fitting for every major screen */
:root{--vvw:100vw;--vvh:100dvh}
body.mobile-landscape #gameRoot{
  width:var(--vvw)!important;
  height:var(--vvh)!important;
  min-height:0!important;
  max-height:var(--vvh)!important;
  overflow:hidden!important;
}
.mobile-landscape .screen,.mobile-landscape .overlay{
  width:var(--vvw)!important;
  height:var(--vvh)!important;
  min-height:0!important;
  max-height:var(--vvh)!important;
  padding:max(3px,env(safe-area-inset-top)) max(5px,env(safe-area-inset-right)) max(3px,env(safe-area-inset-bottom)) max(5px,env(safe-area-inset-left))!important;
  overflow:hidden!important;
  align-items:center!important;
  justify-content:center!important;
}
.mobile-landscape #titleScreen .title-card,
.mobile-landscape #introScreen .intro-panel,
.mobile-landscape #howScreen .help-panel,
.mobile-landscape #orientationNotice .orientation-panel,
.mobile-landscape #stageClear .result-panel,
.mobile-landscape #gameOver .gameover-card{
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  margin:0!important;
  flex:0 0 auto!important;
  will-change:transform;
}

/* Title: compact enough to fit even with Safari browser chrome visible. */
.mobile-landscape #titleScreen .title-card{
  width:min(980px,96vw)!important;
  padding:7px 12px 8px!important;
  border-radius:14px!important;
}
.mobile-landscape #titleScreen .eyebrow{font-size:7px!important;line-height:1!important;letter-spacing:.22em!important}
.mobile-landscape #titleScreen .title-hero-wrap{margin:2px auto 1px!important;gap:8px!important;transform:translateX(5px)!important}
.mobile-landscape #titleScreen .title-face{width:86px!important;border-width:2px!important;border-radius:13px!important}
.mobile-landscape #titleScreen .title-logo{width:min(68vw,560px)!important;max-height:84px!important;object-fit:contain!important}
.mobile-landscape #titleScreen .version{font-size:8px!important;padding:2px 6px!important}
.mobile-landscape #titleScreen .debug-badge{font-size:7px!important;margin-top:2px!important;padding:2px 6px!important}
.mobile-landscape #titleScreen .debug-options{margin:4px auto 0!important;padding:4px 7px!important;gap:6px!important;font-size:9px!important}
.mobile-landscape #titleScreen .debug-options label{font-size:9px!important;gap:4px!important}
.mobile-landscape #titleScreen .debug-options input[type="number"]{width:58px!important;padding:2px 4px!important;height:24px!important}
.mobile-landscape #titleScreen .title-actions{margin-top:5px!important;gap:7px!important}
.mobile-landscape #titleScreen .title-actions button{padding:5px 13px!important;font-size:10px!important;border-radius:8px!important;min-height:30px!important}

/* Briefing: no internal scrolling, balanced image/text fit. */
.mobile-landscape #introScreen .intro-panel{
  width:min(1000px,96vw)!important;
  padding:6px 8px!important;
  border-radius:12px!important;
}
.mobile-landscape #introScreen .intro-layout{
  height:auto!important;
  min-height:0!important;
  grid-template-columns:minmax(125px,25vw) minmax(0,1fr)!important;
  gap:8px!important;
  align-items:center!important;
}
.mobile-landscape #introScreen .intro-art-wrap{height:auto!important;min-height:0!important;overflow:hidden!important}
.mobile-landscape #introScreen .intro-art{height:auto!important;max-height:48vh!important;width:100%!important;object-fit:cover!important}
.mobile-landscape #introScreen .intro-copy{overflow:visible!important;min-height:0!important;padding:0 2px!important}
.mobile-landscape #introScreen .intro-copy .eyebrow{font-size:6px!important}
.mobile-landscape #introScreen .intro-copy h2{font-size:15px!important;line-height:1.05!important;margin:1px 0 3px!important}
.mobile-landscape #introScreen .intro-copy p{font-size:9px!important;line-height:1.24!important;margin:2px 0!important}
.mobile-landscape #introScreen .intro-actions{margin-top:4px!important;gap:6px!important}
.mobile-landscape #introScreen .intro-actions button{font-size:9px!important;padding:5px 10px!important;min-height:30px!important}

/* Help: convert the long vertical list into a dense landscape grid. */
.mobile-landscape #howScreen .help-panel{
  width:min(1000px,96vw)!important;
  padding:7px 10px!important;
  border-radius:12px!important;
}
.mobile-landscape #howScreen .help-panel h2{font-size:16px!important;line-height:1!important;margin:0 0 3px!important}
.mobile-landscape #howScreen .help-panel>p{font-size:8px!important;line-height:1.25!important;margin:3px 0!important}
.mobile-landscape #howScreen .help-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:4px!important;
  margin:5px 0!important;
}
.mobile-landscape #howScreen .help-grid div{padding:4px 6px!important;font-size:8px!important;gap:5px!important;border-radius:7px!important}
.mobile-landscape #howScreen #howBack{font-size:9px!important;padding:5px 12px!important;min-height:30px!important}

/* Stage clear: keep the entire result and button inside the visible landscape viewport. */
.mobile-landscape #stageClear .result-panel{
  width:min(900px,96vw)!important;
  height:auto!important;
  padding:6px!important;
  grid-template-columns:minmax(120px,26vw) minmax(0,1fr)!important;
  gap:7px!important;
  border-radius:12px!important;
}
.mobile-landscape #stageClear .clear-figure{height:min(60vh,220px)!important;min-height:120px!important}
.mobile-landscape #stageClear #clearCharacterCanvas{height:100%!important;width:100%!important}
.mobile-landscape #stageClear .clear-copy{height:auto!important;overflow:visible!important;justify-content:center!important}
.mobile-landscape #stageClear .result-kicker{font-size:6px!important}
.mobile-landscape #stageClear .result-panel h2{font-size:16px!important;margin:1px 0 3px!important}
.mobile-landscape #stageClear .score-lines{gap:3px!important}
.mobile-landscape #stageClear .score-lines p{font-size:8px!important;line-height:1.05!important;padding:3px 2px!important}
.mobile-landscape #stageClear .score-lines p span{font-size:6px!important}
.mobile-landscape #stageClear .score-lines p strong{font-size:10px!important}
.mobile-landscape #stageClear .score-lines .total{font-size:11px!important;grid-column:1/-1!important;padding:3px!important;margin:0!important}
.mobile-landscape #stageClear #nextStage{
  width:min(190px,52%)!important;
  min-width:140px!important;
  height:38px!important;
  min-height:38px!important;
  padding:5px 10px!important;
  margin:5px auto 0!important;
  font-size:10px!important;
}

/* Game over and orientation notice. */
.mobile-landscape #gameOver .gameover-card{width:min(900px,96vw)!important;max-height:none!important}
.mobile-landscape #orientationNotice .orientation-panel{width:min(620px,92vw)!important;padding:9px 12px!important}
.mobile-landscape #orientationNotice .orientation-panel h2{font-size:15px!important;margin:0 0 4px!important}
.mobile-landscape #orientationNotice .orientation-panel p{font-size:9px!important;line-height:1.35!important;margin:2px 0!important}
.mobile-landscape #orientationNotice .orientation-icon{font-size:22px!important;margin:2px 0!important}
.mobile-landscape #orientationNotice .orientation-panel button{font-size:9px!important;padding:5px 14px!important}

/* Map already has dedicated fitting; keep its close button usable while preventing overflow. */
.mobile-landscape #mapScreen .map-panel{height:auto!important;max-height:calc(var(--vvh) - 8px)!important;overflow:hidden!important}

/* Ending: image and logo scale together; title button remains inside safe area. */
.mobile-landscape #endingScreen{padding-bottom:max(42px,calc(env(safe-area-inset-bottom) + 36px))!important}
.mobile-landscape #endingScreen .ending-copy-front{top:2px!important;margin:0!important;will-change:transform}
.mobile-landscape #endingScreen .ending-title-bottom{bottom:max(5px,env(safe-area-inset-bottom))!important;min-height:30px!important;padding:5px 14px!important;font-size:9px!important}

@media(max-height:390px){
  .mobile-landscape #titleScreen .title-face{width:72px!important}
  .mobile-landscape #titleScreen .title-logo{max-height:66px!important}
  .mobile-landscape #titleScreen .title-actions button{min-height:27px!important;padding:4px 11px!important}
  .mobile-landscape #introScreen .intro-art{max-height:42vh!important}
  .mobile-landscape #introScreen .intro-copy p{font-size:8px!important;line-height:1.18!important;margin:1px 0!important}
  .mobile-landscape #introScreen .intro-copy h2{font-size:13px!important;margin:1px 0 2px!important}
  .mobile-landscape #howScreen .help-grid div{font-size:7px!important;padding:3px 5px!important}
  .mobile-landscape #stageClear .clear-figure{height:min(54vh,185px)!important}
}


/* v1.0.0 mobilefix11: centered mobile title/briefing + horizontal ending */
@media (pointer:coarse) and (orientation:landscape), (max-height:520px) and (min-width:600px){
  /* Title: center the face+logo group as a whole. */
  .mobile-landscape #titleScreen{
    align-items:center!important;
    justify-content:center!important;
    padding:4px 10px!important;
  }
  .mobile-landscape #titleScreen .title-card{
    width:min(92vw,820px)!important;
    max-width:92vw!important;
    margin:0 auto!important;
    padding:8px 14px!important;
    text-align:center!important;
    overflow:hidden!important;
  }
  .mobile-landscape #titleScreen .title-hero-wrap{
    width:100%!important;
    margin:2px auto 3px!important;
    transform:none!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    gap:10px!important;
  }
  .mobile-landscape #titleScreen .title-face{
    flex:0 0 auto!important;
    width:clamp(66px,12vw,104px)!important;
    max-width:104px!important;
    height:auto!important;
  }
  .mobile-landscape #titleScreen .title-logo{
    flex:0 1 540px!important;
    width:min(58vw,540px)!important;
    max-width:540px!important;
    max-height:82px!important;
    margin:0!important;
    object-fit:contain!important;
  }
  .mobile-landscape #titleScreen .title-actions{
    justify-content:center!important;
    margin:4px auto 0!important;
  }

  /* Briefing: centered composition and a narrower text column. */
  .mobile-landscape #introScreen{
    align-items:center!important;
    justify-content:center!important;
    padding:4px 10px!important;
  }
  .mobile-landscape #introScreen .intro-panel{
    width:min(92vw,850px)!important;
    max-width:92vw!important;
    height:auto!important;
    max-height:calc(var(--vvh) - 8px)!important;
    margin:0 auto!important;
    padding:7px 10px!important;
    overflow:hidden!important;
  }
  .mobile-landscape #introScreen .intro-layout{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(150px,28vw) minmax(280px,420px)!important;
    justify-content:center!important;
    align-items:center!important;
    gap:12px!important;
  }
  .mobile-landscape #introScreen .intro-art-wrap{
    justify-self:center!important;
    width:100%!important;
  }
  .mobile-landscape #introScreen .intro-art{
    width:100%!important;
    max-width:280px!important;
    max-height:min(58vh,220px)!important;
    object-fit:cover!important;
    object-position:center 44%!important;
  }
  .mobile-landscape #introScreen .intro-copy{
    width:100%!important;
    max-width:420px!important;
    justify-self:center!important;
    text-align:center!important;
    padding:0 4px!important;
  }
  .mobile-landscape #introScreen .intro-copy .eyebrow{
    font-size:7px!important;
  }
  .mobile-landscape #introScreen .intro-copy h2{
    font-size:clamp(13px,2.4vw,18px)!important;
    margin:1px 0 4px!important;
  }
  .mobile-landscape #introScreen .intro-copy p{
    max-width:390px!important;
    margin:2px auto!important;
    font-size:clamp(8px,1.55vw,11px)!important;
    line-height:1.28!important;
    text-wrap:pretty;
  }
  .mobile-landscape #introScreen .intro-actions{
    justify-content:center!important;
    margin-top:5px!important;
    gap:7px!important;
  }
  .mobile-landscape #introScreen .intro-actions button{
    min-height:28px!important;
    padding:5px 11px!important;
    font-size:9px!important;
  }

  /* Ending: line on top, logo and picture side-by-side, title button below. */
  .mobile-landscape #endingScreen{
    display:block!important;
    overflow:hidden!important;
    padding:0!important;
  }
  .mobile-landscape #endingScreen .ending-copy-front{
    position:absolute!important;
    inset:3px 8px max(38px,calc(env(safe-area-inset-bottom) + 34px)) 8px!important;
    width:auto!important;
    height:auto!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    transform:none!important;
    display:grid!important;
    grid-template-columns:minmax(160px,.72fr) minmax(300px,1.45fr)!important;
    grid-template-rows:auto minmax(0,1fr)!important;
    align-items:center!important;
    justify-content:center!important;
    column-gap:10px!important;
    row-gap:3px!important;
    z-index:10!important;
  }
  .mobile-landscape #endingScreen .ending-line{
    grid-column:1 / -1!important;
    grid-row:1!important;
    justify-self:center!important;
    margin:0!important;
    padding:3px 10px!important;
    max-width:88vw!important;
    font-size:clamp(8px,1.55vw,11px)!important;
    line-height:1.15!important;
    white-space:nowrap!important;
  }
  .mobile-landscape #endingScreen .ending-logo{
    grid-column:1!important;
    grid-row:2!important;
    align-self:center!important;
    justify-self:center!important;
    display:block!important;
    width:min(31vw,270px)!important;
    max-width:100%!important;
    max-height:calc(var(--vvh) - 56px)!important;
    margin:0!important;
    object-fit:contain!important;
  }
  .mobile-landscape #endingScreen .ending-image-inline{
    grid-column:2!important;
    grid-row:2!important;
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    bottom:auto!important;
    transform:none!important;
    align-self:stretch!important;
    justify-self:stretch!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
  }
  .mobile-landscape #endingScreen .scenic-card-front{
    position:absolute!important;
    inset:0!important;
    border-width:4px!important;
    border-radius:12px!important;
  }
  .mobile-landscape #endingScreen .ending-hero-art{
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center center!important;
    background:#fff!important;
  }
  .mobile-landscape #endingScreen .ending-title-bottom{
    position:absolute!important;
    left:50%!important;
    bottom:max(3px,env(safe-area-inset-bottom))!important;
    transform:translateX(-50%)!important;
    width:min(160px,34vw)!important;
    min-width:120px!important;
    min-height:30px!important;
    padding:5px 12px!important;
    margin:0!important;
    font-size:9px!important;
    z-index:20!important;
  }
}

@media (pointer:coarse) and (orientation:landscape) and (max-height:360px), (max-height:360px) and (min-width:600px){
  .mobile-landscape #introScreen .intro-layout{grid-template-columns:minmax(130px,25vw) minmax(260px,390px)!important;gap:8px!important}
  .mobile-landscape #introScreen .intro-art{max-height:50vh!important}
  .mobile-landscape #introScreen .intro-copy p{font-size:8px!important;line-height:1.18!important;margin:1px auto!important}
  .mobile-landscape #introScreen .intro-copy h2{font-size:13px!important;margin:1px 0 2px!important}
  .mobile-landscape #endingScreen .ending-copy-front{grid-template-columns:minmax(140px,.68fr) minmax(280px,1.45fr)!important;column-gap:7px!important}
  .mobile-landscape #endingScreen .ending-logo{width:min(27vw,220px)!important}
}

/* v1.0.0 mobile title centering hotfix */
@media (pointer:coarse) and (orientation:landscape), (max-height:520px) and (min-width:640px){
  .mobile-landscape #titleScreen .title-hero-wrap{
    position:relative!important;
    width:min(88vw,760px)!important;
    min-height:84px!important;
    margin:2px auto 3px!important;
    transform:none!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;
  }
  .mobile-landscape #titleScreen .title-logo{
    position:relative!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    flex:none!important;
    width:min(58vw,520px)!important;
    max-width:520px!important;
    margin:0 auto!important;
    object-position:center center!important;
  }
  .mobile-landscape #titleScreen .title-face{
    position:absolute!important;
    left:clamp(42px,11vw,92px)!important;
    top:50%!important;
    transform:translateY(-50%)!important;
    width:clamp(68px,11vw,96px)!important;
    max-width:96px!important;
    z-index:2!important;
  }
}
