/* Mission details stay available without covering the playing field. */
.quest-heading{display:flex;align-items:center;gap:8px}
.quest-heading h2{flex:1;min-width:0}
#game-mission-details{flex-shrink:0;width:44px;height:44px;min-height:44px;border:1px solid #c8d4b6;border-radius:50%;background:#edf0dc;color:#47664f;font:700 17px Arial}
.mobile-label,#feedback-details{display:none}
.guide-option{display:block;min-height:48px;width:100%;margin:14px 0;border:1px solid #c8d4b6;border-radius:6px;padding:10px 14px;text-align:left;font-size:13px;background:#e8edd8}
.mission-details>.game-button{width:100%}
.mission-explanation{padding:14px 16px;margin:18px 0;background:#e9edda;border-left:3px solid #8caa76;border-radius:4px}
.mission-explanation>strong{font-size:12px;color:#496249}
.mission-explanation>p{margin:8px 0 0;color:#496249}

@media(max-width:720px),(pointer:coarse),(max-height:520px){
 .has-3d{overflow:hidden;overscroll-behavior:none}
 .has-3d .site-header{display:none}
 .has-3d main{width:100%;margin:0;padding:0}
 .game-shell{height:100dvh;min-height:0;touch-action:auto}
 .game-shell *{backdrop-filter:none!important}
 .game-topbar{padding:calc(8px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 4px max(12px,env(safe-area-inset-left));gap:8px}
 .game-home{display:flex;align-items:center;min-height:44px;font-size:11px;max-width:145px;line-height:1.4}
 .game-brand{display:none}
 .game-tools{gap:6px}
 .game-tools button{width:44px;height:44px;min-width:44px;min-height:44px;font-size:20px;box-shadow:none;background:#f6f3e6d9}
 .game-hud{top:calc(58px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto}
 .mission-pill{height:20px;padding:0 4px;border:0;background:none;box-shadow:none;border-radius:0;gap:6px}
 #chapter-number,.mission-pill small{display:none}
 .mission-pill strong{font:600 11px Arial;color:#30584b;letter-spacing:0;white-space:nowrap;max-width:250px;overflow:hidden;text-overflow:ellipsis}
 #chapter-progress{font:11px Arial;color:#30584b}
 .quest-card{display:flex;align-items:center;gap:6px;height:54px;margin:4px 0 0;padding:4px 6px 4px 12px;border-radius:10px;background:#f6f2e7ee;border:1px solid #fff8e8;box-shadow:0 3px 12px #30584612}
 .quest-overline,.quest-card>p{display:none}
 .quest-heading{flex:1;gap:6px;min-width:0}
 .quest-card h2{font:600 13px/1.25 Arial;letter-spacing:0;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 #game-mission-details{border:0;border-radius:7px;background:#e7ecd8;font-size:16px}
 .quest-footer{display:contents;border:0;padding:0}
 #game-guide,.desktop-label{display:none}
 .mobile-label{display:inline}
 .quest-footer #game-nav{display:block;min-width:60px;min-height:44px;height:44px;padding:0 7px;border:0;border-radius:7px;background:#345f4d;color:#fff6e0;font:600 12px Arial;text-decoration:none}
 .keyboard-help{display:none}
 .game-controls{bottom:calc(14px + env(safe-area-inset-bottom));left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));align-items:end}
 .touch-joystick{display:block;width:96px;height:106px}
 .stick-base{width:94px;height:94px;background:#e6ecdbb5;box-shadow:none}
 #stick-knob{width:42px;height:42px;left:24px;top:24px}
 .touch-joystick>span:last-child{font:10px Arial;margin-top:5px}
 .action-controls{flex-direction:column;align-items:end;gap:8px}
 .action-controls #game-jump{width:48px;height:48px;min-width:48px;min-height:48px;font-size:20px;border-radius:50%;box-shadow:none}
 .action-controls #game-jump small{font-size:9px}
 .action-controls #game-interact{width:164px;min-width:0;max-width:164px;min-height:56px;padding:8px 12px;gap:0;border-radius:12px;box-shadow:none;text-align:center;justify-content:center}
 .action-key{display:none}
 .action-controls #game-interact strong{font:600 12px/1.3 Arial}
 .game-cargo{right:max(14px,env(safe-area-inset-right));bottom:calc(138px + env(safe-area-inset-bottom));max-width:200px;padding:7px 10px;gap:7px;box-shadow:none;border-radius:8px;pointer-events:none}
 .game-cargo>span{font-size:17px}
 .game-cargo small{display:none}
 .game-cargo strong{font:600 11px/1.3 Arial;margin:0}
 .game-feedback{top:calc(144px + env(safe-area-inset-top));bottom:auto;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto;max-width:none;max-height:68px;overflow:hidden;transform:none;padding:5px 6px 5px 10px;gap:7px;align-items:center;border-radius:9px;box-shadow:none;background:#f8f2e6f5}
 .game-feedback>span{font-size:18px}
 .game-feedback p{flex:1;min-width:0;font:12px/1.35 Arial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#405d48}
 .game-feedback button{flex-shrink:0;min-width:44px;height:44px;min-height:44px;padding:0;margin:0;border-radius:7px}
 #feedback-details{display:block;font:600 12px Arial;background:#e4ebd5;color:#3d634b}
 #feedback-close{font-size:24px}
 .world-tag{height:28px;max-width:144px;padding:6px 8px;font:600 11px/14px Arial;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:14px;box-shadow:none;background:#faf4d9eb}
 .world-tag small,.world-tag:after{display:none}
 .game-destinations{top:auto;bottom:0;left:0;right:0;width:auto;max-height:min(76dvh,580px);padding:18px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-radius:18px 18px 0 0;background:#f8f3e7;box-shadow:0 -8px 40px #254b4630;overscroll-behavior:contain;touch-action:pan-y}
 .game-destinations h3{font-size:24px;margin:0 0 6px}
 .game-destinations>p{font-size:12px;line-height:1.45;margin-bottom:12px}
 #destination-list{gap:7px}
 #destination-list button{min-height:58px;padding:9px 12px}
 #destination-list button>span{font-size:13px}
 #destination-list button small{font-size:12px;line-height:1.3;margin-top:3px;color:#576d51}
 .panel-close{position:sticky;bottom:0;min-height:48px;background:#345f4d;color:#fff6e0;font-size:13px;border:0;border-radius:8px;margin-top:12px}
 .game-panel{padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#24453b80;touch-action:pan-y;overscroll-behavior:contain}
 .game-panel>article{max-height:100%;overflow-y:auto;overscroll-behavior:contain;padding:22px 20px;border-radius:14px}
 .game-panel h2{font-size:30px;margin:12px 0 16px}
 .game-panel p{font-size:14px;line-height:1.55;color:#496249}
 .game-panel .game-overline{font-size:9px}
 .recipe-buttons button{min-height:68px;padding:12px 14px}
 .recipe-buttons button span{font-size:20px}
 .recipe-buttons button small{font-size:12px;color:#576d51;line-height:1.4}
 .game-button{min-height:48px;font-size:13px}
 .game-quiet-button{font-size:12px;min-height:48px}
 .game-recall summary{font-size:13px;line-height:1.45}
 .game-recall p{font-size:13px}
 .game-note{display:none}
 .game-intro{padding:calc(100px + env(safe-area-inset-top)) 24px 100px;background:linear-gradient(90deg,#d5e3cd85,transparent)}
 .game-intro h1{font-size:42px;max-width:280px;margin:14px 0 18px}
 .game-intro>p{font-size:14px;line-height:1.6;max-width:280px}
 .game-intro .game-overline{font-size:9px;max-width:280px}
 .game-intro p.game-intro-small{font-size:10px;max-width:260px}
 .game-chapter-cards{bottom:calc(20px + env(safe-area-inset-bottom));left:16px;right:16px;gap:6px;width:auto;grid-template-columns:repeat(3,1fr)}
 .game-chapter-cards button{min-height:68px;padding:9px 8px;gap:5px;background:#f4f2e4e0}
 .game-chapter-cards button>span{font-size:11px;line-height:1.25}
 .game-chapter-cards b{font-size:12px}
 .game-chapter-cards small{display:none}
}

@media(max-height:520px) and (orientation:landscape){
 .game-topbar{padding-top:max(8px,env(safe-area-inset-top))}
 .game-home{max-width:88px;font-size:10px}
 .game-hud{top:max(8px,env(safe-area-inset-top));left:110px;right:170px;max-width:420px}
 .mission-pill{display:none}
 .quest-card{margin:0;height:48px;padding-top:2px;padding-bottom:2px}
 .quest-card h2{font-size:12px}
 .game-controls{bottom:max(12px,env(safe-area-inset-bottom))}
 .touch-joystick{width:86px;height:86px}
 .stick-base{width:84px;height:84px}
 #stick-knob{left:20px;top:20px}
 .touch-joystick>span:last-child{display:none}
 .action-controls{flex-direction:row;gap:8px}
 .action-controls #game-interact{width:154px;max-width:154px}
 .game-cargo{bottom:calc(84px + env(safe-area-inset-bottom))}
 .game-feedback{top:calc(66px + env(safe-area-inset-top));right:auto;width:min(360px,calc(100% - 24px))}
 .game-destinations{left:20%;right:20%;max-height:90dvh}
 .game-intro{padding:70px 4% 78px;background:linear-gradient(90deg,#d5e3cd80,transparent 65%)}
 .game-intro h1{font-size:30px;max-width:320px;margin:6px 0 10px}
 .game-intro>p{font-size:12px;line-height:1.4;margin-bottom:12px}
 .game-intro .game-overline{font-size:8px}
 .game-intro p.game-intro-small{display:none}
 .game-intro .game-button{min-height:46px;padding:10px 18px}
 .game-chapter-cards{bottom:max(10px,env(safe-area-inset-bottom));left:4%;right:4%;gap:8px}
 .game-chapter-cards button{min-height:52px;flex-wrap:nowrap}
 .game-panel>article{padding:20px 24px}
}

@media(max-height:620px) and (max-width:720px) and (orientation:portrait){
 .game-intro{padding-top:80px}
 .game-intro h1{font-size:34px}
 .game-intro>p{font-size:12px;margin-bottom:12px}
 .game-intro p.game-intro-small{display:none}
}
