@charset "UTF-8";
:root{font-family:"Hiragino Maru Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:#263f53;background:#bdddd5;font-synthesis:none;--ink:#263f53;--safe-t:max(12px,env(safe-area-inset-top));--safe-b:max(14px,env(safe-area-inset-bottom));--safe-l:max(12px,env(safe-area-inset-left));--safe-r:max(12px,env(safe-area-inset-right));--dock-h:156px;--play-top:154px;--play-bottom:226px}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none}body{position:fixed;inset:0}button,a,input{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;border:0;cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;filter:grayscale(.5);opacity:.6}button:focus-visible,a:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #e9a126;outline-offset:3px}button:not(:disabled):active{transform:translateY(3px);box-shadow:0 1px 0 var(--ink),inset 0 2px 3px #0001}svg{display:block;width:28px;height:28px;flex-shrink:0}img{display:block;user-select:none;pointer-events:none}h1,h2,p{margin:0}a{color:inherit}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#game-app{position:relative;width:100%;height:100dvh;overflow:hidden;isolation:isolate;background:#bdddd5}#game-app[data-view="drive"]{--dock-h:98px;--play-top:120px;--play-bottom:168px}#game-app[data-view^="room"]{--dock-h:94px;--play-top:126px;--play-bottom:165px}.world-frame{position:absolute;inset:0;background:#bdddd5}.play-window{position:absolute;left:0;right:0;top:calc(var(--play-top) + var(--safe-t));bottom:calc(var(--play-bottom) + var(--safe-b));overflow:hidden}#world{display:block;width:100%;height:100%;touch-action:none;cursor:pointer}.world-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#719f9c22,transparent 23%,transparent 75%,#3b72703b);box-shadow:inset 0 0 110px #426f6914}
.game-hud{position:absolute;z-index:3;top:var(--safe-t);left:var(--safe-l);right:var(--safe-r);display:flex;align-items:center;justify-content:space-between;gap:8px;pointer-events:none}.game-hud button{pointer-events:auto}.player-badge{height:62px;min-width:154px;display:flex;align-items:center;gap:8px;padding:3px 12px 3px 3px;background:linear-gradient(#fff8dc,#f4e6bb);border:3px solid var(--ink);border-radius:20px;box-shadow:0 4px 0 #284456,inset 0 2px 0 #fff;text-align:left}.badge-avatar{width:52px;height:52px;display:grid;place-items:center;border:2px solid #284456;border-radius:15px;background:radial-gradient(at 40% 30%,#e0f1cd,#85b7a2);overflow:hidden;flex-shrink:0}.badge-avatar img{width:54px;height:58px;object-fit:contain;object-position:center 2px}.player-badge small{display:block;color:#72917b;font-size:8px;font-weight:900;letter-spacing:.8px}.player-badge b{display:block;font-size:16px;font-weight:900;line-height:1.7}.badge-change{margin-left:auto;width:20px;height:20px;border:2px solid #26445a;border-radius:7px;background:#ffcf66;font-size:15px;line-height:15px;text-align:center;font-weight:900}.hud-menu{display:flex;gap:8px;align-items:center}.nav-icon{display:grid;place-items:center;min-width:46px;height:46px;border:3px solid #284456;border-radius:15px;background:linear-gradient(#fffce9,#f1dfb0);box-shadow:0 4px 0 #284456,inset 0 2px 0 #fff;font-size:26px;font-weight:900}.nav-icon svg{width:25px;height:25px}.menu-pause{background:linear-gradient(#74b7c7,#338da3);color:#fff8df}.mission-heading{position:absolute;top:calc(var(--safe-t) + 79px);left:var(--safe-l);right:var(--safe-r);pointer-events:none;text-align:center}.mission-heading h1{font-size:clamp(22px,3.2vw,37px);font-weight:1000;letter-spacing:1px;color:#fff5ce;text-shadow:0 3px 0 #9b624b,2px 0 0 #9b624b,-2px 0 0 #9b624b,0 -2px 0 #9b624b,0 5px 0 #714e3e28;line-height:1.25}.mission-heading h1>span{display:block;font-size:.48em;letter-spacing:4px;margin-bottom:3px}.mission-line{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px}.location-pill{display:flex;align-items:center;gap:7px;border:2px solid #47706a8c;background:#e6f0dbd9;border-radius:10px;min-height:29px;padding:5px 10px;font-size:10px;font-weight:900;white-space:nowrap}.location-pill i{width:7px;height:7px;border-radius:50%;background:#469883}.chapters{display:flex;gap:6px;list-style:none;padding:0;margin:0}.chapters li{width:26px;height:26px;border-radius:9px;display:grid;place-items:center;background:#d7e4c9;border:2px solid #698b7b;color:#698b7b;font-size:11px;font-weight:900}.chapters li.active{background:#ffcd60;color:#584e32;border-color:#5d674e;box-shadow:0 2px 0 #5d674e}.chapters li.done{background:#539f91;border-color:#377b72;color:#fff5d4}#game-app:not([data-view="depot"]):not([data-view="complete"]) .mission-heading{top:calc(var(--safe-t) + 77px)}#game-app:not([data-view="depot"]):not([data-view="complete"]) .mission-heading h1{display:none}#game-app:not([data-view="depot"]):not([data-view="complete"]) .mission-line{margin-top:0}
.world-status{position:absolute;z-index:2;top:calc(var(--safe-t) + 126px);right:var(--safe-r);pointer-events:none}.station-tag{display:none}.destination-tag{display:flex;align-items:center;gap:6px;padding:7px 10px;border:2px solid #5a7668;border-radius:12px;background:#ffedb2;font-size:10px;font-weight:900}.destination-tag svg{width:18px;height:18px;color:#9b713d}.water-card{display:flex;align-items:center;gap:8px;background:linear-gradient(#58b7ce,#2988a2);color:#fffbe6;padding:6px 10px;border:3px solid #274a5a;border-radius:14px;box-shadow:0 3px 0 #274a5a,inset 0 2px 0 #c4f2ef}.water-card>svg{width:24px;height:30px}.water-label{display:flex;align-items:baseline;gap:5px;font-size:9px;font-weight:900}.water-label b{font-size:21px;line-height:1}.water-label small{font-size:10px}.tank{display:flex;gap:3px;margin-top:4px}.tank i{height:7px;width:14px;border-radius:2px;background:linear-gradient(to right,#eefcf0 calc(var(--fill,1)*100%),#2d647f 0);box-shadow:0 1px 0 #23566e}.tank i.empty{opacity:.65}
.guide-bubble{position:absolute;z-index:3;left:var(--safe-l);right:var(--safe-r);bottom:calc(var(--dock-h) + var(--safe-b) + 11px);display:flex;align-items:center;gap:8px;min-height:57px;max-width:640px;margin:auto;padding:6px 12px 6px 4px;background:#fff8dfec;border:2px solid #46675b;border-radius:17px;box-shadow:0 3px 0 #46675b3b;pointer-events:none}.guide-bubble>img{width:43px;height:48px;object-fit:contain;flex-shrink:0}.guide-bubble b{display:block;font-size:11px;font-weight:900;line-height:1.5;color:#3a675f}.guide-bubble p{font-size:10px;line-height:1.65;margin-top:3px;font-weight:700;color:#5b776c}.guide-bubble p.gentle-hint{color:#a0603e}
.controls{position:absolute;z-index:3;left:var(--safe-l);right:var(--safe-r);bottom:var(--safe-b);height:var(--dock-h);max-width:660px;margin:auto;display:flex;align-items:center;justify-content:center;gap:10px;pointer-events:none}.controls button{pointer-events:auto}.station-dock{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:center}.crew-switch,.memory-button{height:54px;display:flex;align-items:center;justify-content:center;gap:8px;padding:5px 12px;background:linear-gradient(#fff7de,#eadbb3);border:3px solid var(--ink);border-radius:16px;box-shadow:0 4px 0 var(--ink),inset 0 2px 0 #fff;font-size:12px;font-weight:900}.crew-switch svg,.memory-button svg{width:29px;height:29px;color:#d79e39}.crew-switch img{width:41px;height:47px;object-fit:contain}.crew-switch>span,.memory-button>span{display:flex;flex-direction:column;text-align:left}.crew-switch small,.memory-button small{font-size:8px;color:#7d8263;margin-bottom:2px}.memory-button b{font-size:12px}.dispatch-row{grid-column:1/-1;display:flex;align-items:center;gap:9px}.primary,.secondary,.danger-button{min-height:50px;display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 18px;border:3px solid var(--ink);border-radius:17px;font-size:14px;font-weight:900;box-shadow:0 4px 0 var(--ink),inset 0 2px 0 #fff9;line-height:1.4}.primary{background:linear-gradient(#ffdc78,#ffba3e);color:#5a4935}.dispatch-row .primary{flex:1;height:70px;font-size:22px;letter-spacing:2px;border-radius:21px;box-shadow:0 5px 0 #79533c,inset 0 3px 0 #fff2ba}.dispatch-row .primary svg{width:41px;height:41px;filter:drop-shadow(0 2px 0 #845a3933)}.dispatch-row .primary .start-arrow{margin-left:auto;width:27px;height:27px}.primary .start-label{flex:1}.secondary{background:linear-gradient(#eaf4e8,#cfe0d3)}.danger-button{background:linear-gradient(#ffe5d3,#e6baa2);color:#7b493b}.text-button{min-width:52px;min-height:52px;background:#f9e9c5;border:3px solid var(--ink);border-radius:15px;box-shadow:0 4px 0 var(--ink);font-size:10px;font-weight:900;line-height:1.5;padding:6px}.room-dock{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px}.tool-row{display:flex;gap:9px;flex:1}.tool-button{position:relative;display:flex;flex:1;min-width:44px;height:78px;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:3px solid #314d5b;border-radius:18px;background:linear-gradient(#fff7de,#e6d8b5);box-shadow:0 4px 0 #314d5b,inset 0 2px 0 #fff;color:#3b5a5c}.tool-button svg{width:35px;height:35px;filter:drop-shadow(0 1px 0 #fff8)}.tool-button span{font-size:10px;font-weight:900}.tool-button.selected{background:linear-gradient(#67bac6,#2c94a7);border-color:#24485b;color:#fff9dc;box-shadow:0 4px 0 #24485b,inset 0 2px 0 #d2f3e4}.tool-button.selected::after{content:"✓";position:absolute;right:4px;top:3px;font-size:10px;background:#ffdc75;color:#485345;border:1px solid #42645d;width:16px;height:16px;border-radius:50%;text-align:center}.rescue-mini{width:61px;flex-shrink:0;height:76px;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#f9f5da;text-align:center;border:2px solid #355a5c;border-radius:18px;background:linear-gradient(#527f79,#3a6965);box-shadow:0 3px 0 #2d5454}.rescue-mini svg{width:20px;height:20px;color:#f5cc75}.rescue-mini b{font-size:19px;line-height:1.3}.rescue-mini small{font-size:9px;color:#d0e0cf}.driving-controls{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;max-width:510px}.steering{display:flex;gap:9px;align-items:center}.steering button{width:58px;height:58px;border:3px solid #284456;border-radius:18px;background:linear-gradient(#fff4d9,#dfcd9f);box-shadow:0 4px 0 #284456,inset 0 2px 0 #fff;font-size:35px;font-weight:900;touch-action:none}.wheel{position:relative;width:66px;height:66px;border:9px solid #345565;border-radius:50%;box-shadow:inset 0 0 0 3px #89b2af,0 3px 0 #19384b;pointer-events:none}.wheel::before,.wheel::after,.wheel>span{content:"";position:absolute;left:calc(50% - 3px);top:calc(50% - 1px);transform-origin:3px 0;width:6px;height:25px;background:#345565;border-radius:3px}.wheel::before{transform:rotate(120deg)}.wheel::after{transform:rotate(240deg)}.wheel>i{position:absolute;inset:calc(50% - 8px) auto auto calc(50% - 8px);width:16px;height:16px;border-radius:50%;background:#7da49a}.accelerator{height:75px;min-width:133px;display:flex;align-items:center;justify-content:center;gap:8px;border:3px solid #294c56;border-radius:23px;background:linear-gradient(#a2d79b,#69ae7a);box-shadow:0 5px 0 #294c56,inset 0 3px 0 #e2f6c2;color:#264e4a;font-size:18px;font-weight:1000;touch-action:none}.accelerator svg{width:30px;height:30px;transform:rotate(-90deg)}
.markers{position:absolute;inset:0;pointer-events:none;overflow:hidden}.marker{position:absolute;transform:translate(-50%,-100%);display:flex;align-items:center;gap:3px;font-size:10px;font-weight:900;white-space:nowrap;background:#fff3cfeb;border:2px solid #6e7b64;padding:4px 7px;border-radius:9px;color:#48665f;box-shadow:0 2px 0 #55756444}.marker svg{width:11px;height:14px;color:#4c9bb1}.pump-marker{background:#c8ede3;border-color:#548a83;font-size:8px}.friend-marker{background:#fff3c6}.door-marker{background:#ffce69;color:#705938}.save-notice{position:absolute;top:calc(var(--safe-t) + 69px);left:var(--safe-l);right:var(--safe-r);z-index:6;border:2px solid #8f6646;border-radius:10px;background:#ffe1a5;padding:7px 11px;font-size:10px;font-weight:800;line-height:1.5}.complete-banner{position:absolute;z-index:2;left:50%;top:calc(var(--safe-t) + 165px);transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);padding:16px 24px;background:linear-gradient(#fff8daee,#fff0c4ee);border:3px solid #395867;border-radius:24px;box-shadow:0 5px 0 #39586766;text-align:center;pointer-events:none}.complete-stars{color:#e9b348;font-size:25px;letter-spacing:9px;text-shadow:0 2px 0 #b37e34}.complete-banner>small{font-size:8px;letter-spacing:2px;font-weight:900;color:#ad8c52}.complete-banner h2{font-size:22px;color:#356a60;line-height:1.7;margin-top:3px}.complete-banner p{font-size:11px;font-weight:800;color:#7f936e}.complete-memory{background:#eddfb0;border-radius:9px;padding:6px 10px;font-size:9px;font-weight:800;margin-top:8px}
.load-veil{position:absolute;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px;background:radial-gradient(at 50% 35%,#e3f0db,#95bdac);padding:30px;text-align:center}.loading-shield{width:82px;height:89px;display:grid;place-items:center;background:linear-gradient(#f49b68,#db6448);border:4px solid #526753;border-radius:25px 25px 36px 36px;box-shadow:0 6px 0 #526753;color:#fff5dc;font-size:54px;font-weight:900;animation:float 2s ease-in-out infinite}.load-veil strong{font-size:20px;font-weight:900}.load-veil>span{font-size:12px;font-weight:800;color:#5f8576}.load-veil small{position:absolute;bottom:calc(var(--safe-b) + 12px);font-size:9px;line-height:1.8;left:20px;right:20px}.loading-track{height:15px;width:200px;background:#74998c;border:3px solid #3e615e;border-radius:10px;overflow:hidden;box-shadow:0 2px 0 #3e615e}#loading-fill{display:block;width:0;height:100%;background:linear-gradient(#ffdf85,#efb848);transition:width .2s}
dialog{width:min(490px,calc(100% - var(--safe-l) - var(--safe-r)));max-height:calc(100dvh - var(--safe-t) - var(--safe-b) - 12px);padding:0;overflow:auto;overscroll-behavior:contain;border:3px solid #263f53;border-radius:25px;background:#fff7de;color:#2d5260;box-shadow:0 7px 0 #17384ccc,0 20px 70px #163e4e55}dialog::backdrop{background:#143a4a90;backdrop-filter:blur(7px)}.panel-body{position:relative;padding:24px 24px 22px}.close-button{position:absolute;right:9px;top:9px;width:44px;height:44px;border:2px solid #304e5c;border-radius:14px;background:linear-gradient(#ffe4bf,#e4bc8e);box-shadow:0 3px 0 #304e5c;font-size:27px;font-weight:900;line-height:1}.panel-body h2{font-size:23px;font-weight:1000;line-height:1.6;margin:2px 40px 14px 0}.panel-kicker{font-size:8px;color:#9d905f;letter-spacing:2px;font-weight:900;margin-bottom:5px}.panel-body p{font-size:12px;line-height:1.85;color:#6b7d6b;margin:9px 0;font-weight:700}.panel-body>.primary,.panel-body>.secondary,.panel-body>.danger-button{width:100%;margin-top:12px}.panel-body .small-copy{font-size:10px}.setting{min-height:50px;display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #dfd9bb;font-size:13px;font-weight:900}.setting input{width:26px;height:26px;accent-color:#348e99}.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:14px}.settings-actions button{min-height:48px;font-size:11px;padding:8px}.storage-label{font-size:10px;line-height:1.6;font-weight:800;color:#7d8c6d;margin-top:12px}.crew-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.crew-button{position:relative;min-width:44px;min-height:92px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:2px solid #8ca28b;border-radius:17px;background:linear-gradient(#e7edd7,#d4e1c7);box-shadow:0 3px 0 #8ca28b;padding:4px}.crew-button img{width:57px;height:59px;object-fit:contain}.crew-button span{font-size:10px;font-weight:900}.crew-button.selected{background:linear-gradient(#ffdf87,#f4c861);border-color:#7e754f;box-shadow:0 3px 0 #7e754f}.crew-button.selected::after{content:"✓";position:absolute;right:3px;top:2px;font-size:11px;color:#5b725a}.crew-note{font-size:10px!important;margin:12px 0 0!important}.help-card{min-height:126px;display:flex;align-items:center;gap:16px;padding:16px;background:#e0e8ce;border:2px solid #9eaf8f;border-radius:20px}.help-card>svg{width:68px;height:68px;flex-shrink:0}.help-card b{font-size:17px;display:block;line-height:1.6}.help-card p{font-size:11px;line-height:1.8;margin-bottom:0}.help-paging{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px}.help-paging .secondary{min-width:82px;font-size:12px;padding:8px 12px;min-height:46px}.help-paging>span{font-size:12px;font-weight:900}.help-shortcuts{display:flex;gap:8px;justify-content:center;margin-top:13px}.help-shortcuts button{min-height:44px;font-size:10px;font-weight:800;text-decoration:underline;background:none;padding:7px}.assist-targets{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.assist-targets button{font-size:10px;min-height:44px;padding:8px 5px;border-radius:12px}.safety-note{background:#ecdfb5;padding:10px 13px;border-radius:12px;color:#876d47!important}.legacy-link{display:inline-flex;align-items:center;min-height:44px;font-size:11px;font-weight:800}.memory-display{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:8px 0}.memory-display svg{width:64px;height:64px;color:#d9a349;filter:drop-shadow(0 3px 0 #ac7c36)}.memory-display strong{font-size:37px;color:#51867a;line-height:1.3}.memory-display strong small{font-size:14px}.memory-display p{font-size:12px;margin:3px 0}.safety-inline{font-size:9px!important;text-align:center}
@keyframes float{50%{transform:translateY(-6px)}}
@media(min-width:900px) and (min-height:560px){:root{--safe-t:max(20px,env(safe-area-inset-top));--safe-b:max(23px,env(safe-area-inset-bottom));--safe-l:max(24px,env(safe-area-inset-left));--safe-r:max(24px,env(safe-area-inset-right));--play-top:128px;--play-bottom:208px}.mission-heading{top:calc(var(--safe-t) + 4px);left:220px;right:220px}.mission-line{max-width:500px;margin:12px auto 0}.world-status{top:calc(var(--safe-t) + 80px)}#game-app:not([data-view="depot"]):not([data-view="complete"]) .mission-heading{top:calc(var(--safe-t) + 14px)}#game-app[data-view^="room"],#game-app[data-view="drive"]{--play-top:90px}.guide-bubble{bottom:calc(var(--dock-h) + var(--safe-b) + 13px)}.complete-banner{top:calc(var(--safe-t) + 130px)}}
@media(max-width:600px){.player-badge{height:56px;min-width:133px;border-radius:17px;padding-right:8px;gap:6px}.badge-avatar{width:46px;height:46px;border-radius:12px}.badge-avatar img{width:49px;height:51px}.player-badge small{font-size:7px;letter-spacing:.3px}.player-badge b{font-size:14px}.badge-change{width:17px;height:17px;font-size:12px;line-height:12px}.hud-menu{gap:7px}.nav-icon{width:44px;min-width:44px;height:44px;border-radius:13px;border-width:2px}.nav-icon svg{width:23px;height:23px}.mission-heading{top:calc(var(--safe-t) + 72px)}.mission-heading h1{font-size:28px}.mission-heading h1>span{font-size:12px}.world-status{top:calc(var(--safe-t) + 116px)}.guide-bubble{gap:6px;padding-right:9px;min-height:56px}.guide-bubble b{font-size:10px}.guide-bubble p{font-size:9px;line-height:1.6}.guide-bubble>img{width:36px;height:44px}.tool-row{gap:6px}.tool-button{height:76px;border-radius:15px;padding:4px;gap:3px}.tool-button svg{width:32px;height:32px}.tool-button span{font-size:9px}.room-dock{gap:7px}.rescue-mini{width:50px;border-radius:14px;height:74px}.rescue-mini b{font-size:17px}.rescue-mini svg{width:18px;height:18px}.rescue-mini small{font-size:8px}.marker{font-size:8px;padding:4px 6px;border-width:1.5px}.pump-marker{font-size:7px}.marker svg{width:10px;height:12px}.crew-switch,.memory-button{height:52px;padding:4px 8px;gap:5px;font-size:11px;border-radius:15px}.memory-button b{font-size:10px}.crew-switch small,.memory-button small{font-size:7px}.crew-switch img{width:35px;height:43px}.memory-button svg{width:24px;height:24px}.dispatch-row .primary{height:66px;font-size:20px;letter-spacing:1px}.dispatch-row .primary svg{width:35px;height:35px}.driving-controls{gap:12px}.steering{gap:7px}.steering button{width:49px;height:54px;border-radius:15px;font-size:31px}.wheel{width:56px;height:56px;border-width:8px}.wheel::before,.wheel::after,.wheel>span{height:21px}.accelerator{min-width:114px;height:70px;font-size:16px}.accelerator svg{width:26px;height:26px}.panel-body{padding:21px 18px 18px}.panel-body h2{font-size:21px}.crew-grid{gap:7px}.crew-button{min-height:86px;border-radius:15px}.crew-button img{width:52px;height:55px}.complete-banner{top:calc(var(--safe-t) + 174px);padding:13px 17px;border-radius:19px}.complete-banner h2{font-size:20px}.complete-stars{font-size:21px}.complete-banner>small{font-size:7px}}
@media(max-width:360px){:root{--safe-l:max(10px,env(safe-area-inset-left));--safe-r:max(10px,env(safe-area-inset-right));--dock-h:143px;--play-top:143px;--play-bottom:209px}.player-badge{min-width:126px;gap:4px}.player-badge b{font-size:13px}.hud-menu{gap:5px}.badge-change{margin-left:0}.mission-heading h1{font-size:25px}.location-pill{font-size:8px;padding:4px 7px}.chapters{gap:4px}.chapters li{width:24px;height:24px;font-size:10px}.water-card{padding:5px 7px;gap:5px;border-width:2px}.water-card>svg{width:20px;height:25px}.water-label b{font-size:18px}.tank i{width:11px}.tool-row{gap:5px}.tool-button{height:71px;border-width:2px}.tool-button svg{width:29px;height:29px}.tool-button span{font-size:8px}.rescue-mini{width:45px;height:70px}.room-dock{gap:5px}.steering{gap:5px}.steering button{width:45px}.wheel{width:48px;height:48px;border-width:7px}.wheel::before,.wheel::after,.wheel>span{height:18px}.accelerator{min-width:103px;font-size:14px}.guide-bubble b{font-size:9px}.guide-bubble p{font-size:8px}.guide-bubble>img{width:30px;height:39px}.station-dock{gap:8px}.dispatch-row .primary{height:60px;font-size:18px}.crew-switch,.memory-button{height:49px}.memory-button b{font-size:9px}.crew-button img{width:47px;height:51px}.crew-button{min-height:80px}.help-card{padding:12px;gap:10px}.help-card>svg{width:48px;height:48px}.help-card b{font-size:15px}.help-card p{font-size:10px}.panel-body h2{font-size:19px}.complete-banner{top:calc(var(--safe-t) + 155px)}.complete-banner h2{font-size:17px}.complete-memory{font-size:8px}}
@media(max-height:600px) and (orientation:portrait){:root{--safe-t:max(8px,env(safe-area-inset-top));--safe-b:max(9px,env(safe-area-inset-bottom));--play-top:132px;--play-bottom:201px;--dock-h:140px}.mission-heading{top:calc(var(--safe-t) + 66px)}.mission-heading h1{font-size:24px}.mission-heading h1>span{font-size:10px}.mission-line{margin-top:9px}.guide-bubble{min-height:49px;bottom:calc(var(--dock-h) + var(--safe-b) + 7px)}.guide-bubble>img{height:36px}.guide-bubble b{display:none}.dispatch-row .primary{height:58px}#game-app[data-view^="room"]{--play-top:116px;--play-bottom:148px;--dock-h:88px}#game-app[data-view="drive"]{--play-top:113px;--play-bottom:153px;--dock-h:93px}.complete-banner{top:calc(var(--safe-t) + 139px);padding:10px 14px}.complete-banner p{display:none}}
@media(max-height:550px) and (orientation:landscape){:root{--safe-t:max(8px,env(safe-area-inset-top));--safe-b:max(11px,env(safe-area-inset-bottom));--safe-l:max(25px,env(safe-area-inset-left));--safe-r:max(25px,env(safe-area-inset-right));--play-top:66px;--play-bottom:87px;--dock-h:70px}#game-app[data-view^="room"],#game-app[data-view="drive"]{--play-top:64px;--play-bottom:88px;--dock-h:70px}.game-hud{align-items:flex-start}.player-badge{height:49px;min-width:129px;border-width:2px;border-radius:14px}.badge-avatar{width:40px;height:40px;border-radius:10px}.badge-avatar img{width:43px;height:46px}.player-badge b{font-size:12px}.player-badge small{font-size:6px}.nav-icon{height:44px;width:44px;min-width:44px;border-width:2px}.hud-menu{gap:7px}.mission-heading,#game-app:not([data-view="depot"]):not([data-view="complete"]) .mission-heading{left:calc(var(--safe-l) + 144px);right:calc(var(--safe-r) + 154px);top:calc(var(--safe-t) + 4px)}.mission-heading h1{font-size:21px;white-space:nowrap;letter-spacing:0}.mission-heading h1>span{display:inline;font-size:11px;margin-right:4px;letter-spacing:0}.mission-line{justify-content:center;margin-top:8px;gap:8px}.location-pill{font-size:8px;min-height:24px;padding:3px 7px;max-width:185px;overflow:hidden}.chapters{gap:4px}.chapters li{width:22px;height:22px;border-radius:7px;font-size:9px}#game-app:not([data-view="depot"]):not([data-view="complete"]) .mission-line{flex-wrap:wrap;row-gap:5px}.world-status{top:calc(var(--safe-t) + 67px);right:var(--safe-r)}.water-card{padding:4px 8px;border-width:2px;gap:5px}.water-card>svg{width:18px;height:23px}.water-label b{font-size:17px}.tank{margin-top:3px;gap:2px}.tank i{width:12px;height:5px}.guide-bubble{left:var(--safe-l);right:auto;bottom:calc(var(--safe-b) + 4px);max-width:calc(100% - 366px - var(--safe-l) - var(--safe-r));min-height:57px;padding:5px 7px 5px 3px;border-radius:13px;gap:5px}.guide-bubble>img{width:30px;height:36px}.guide-bubble b{display:none}.guide-bubble p{font-size:9px;margin:0;line-height:1.6}.controls{left:auto;right:var(--safe-r);width:326px;max-width:none;height:70px;bottom:calc(var(--safe-b) + 3px)}.station-dock{display:flex;gap:8px;width:100%}.crew-switch{width:72px;height:58px;padding:4px;flex-direction:column;gap:0;font-size:9px;border-width:2px;border-radius:14px}.crew-switch img{width:30px;height:32px}.crew-switch>span{display:block;text-align:center}.crew-switch small{display:none}.memory-button{display:flex;width:50px;min-width:50px;height:58px;flex-direction:column;gap:1px;padding:4px;border-width:2px;border-radius:14px}.memory-button svg{width:20px;height:20px}.memory-button small{display:none}.memory-button>span{display:block;text-align:center}.memory-button b{font-size:7px;line-height:1.3}.station-dock .crew-switch{width:60px;min-width:60px}.dispatch-row{display:flex;flex:1;min-width:0}.dispatch-row .primary{height:61px;font-size:18px;border-radius:17px;padding:8px 12px;letter-spacing:0}.dispatch-row .primary svg{width:28px;height:28px}.dispatch-row .primary .start-arrow{display:none}.text-button{min-width:45px;padding:5px;font-size:8px;border-width:2px}.room-dock{gap:8px}.tool-row{gap:7px}.tool-button{height:64px;border-width:2px;border-radius:13px;gap:2px}.tool-button svg{width:27px;height:27px}.tool-button span{font-size:8px}.rescue-mini{width:46px;height:62px;border-radius:13px}.rescue-mini svg{width:16px;height:16px}.rescue-mini b{font-size:16px}.rescue-mini small{font-size:7px}.driving-controls{gap:10px}.steering{gap:6px}.steering button{width:47px;height:50px;font-size:29px;border-width:2px}.wheel{width:49px;height:49px;border-width:7px}.wheel::before,.wheel::after,.wheel>span{height:18px}.accelerator{height:59px;min-width:115px;font-size:15px;border-width:2px;border-radius:17px}.complete-banner{top:calc(var(--safe-t) + 80px);padding:9px 22px;border-radius:18px}.complete-stars{font-size:17px}.complete-banner h2{font-size:19px}.complete-banner p,.complete-memory{display:none}.panel-body{padding:16px 21px 15px}.panel-body h2{font-size:20px;margin-bottom:9px}.panel-kicker{display:none}.crew-grid{grid-template-columns:repeat(7,1fr);gap:6px}.crew-button{min-height:83px;border-radius:12px}.crew-button img{width:46px;height:48px}.crew-button span{font-size:8px}dialog{width:min(600px,calc(100% - var(--safe-l) - var(--safe-r)))}.help-card{min-height:110px;padding:12px}.help-card>svg{width:54px;height:54px}.help-paging{margin-top:10px}.help-shortcuts{margin-top:7px}.setting{min-height:44px}.settings-actions{margin-top:10px}.storage-label{font-size:9px;margin-top:8px}.panel-body p{font-size:11px;margin:6px 0}.memory-display{gap:3px;padding:0}.memory-display svg{width:45px;height:45px}.memory-display strong{font-size:29px}.safety-note{padding:8px 12px}.assist-targets{grid-template-columns:repeat(5,1fr);gap:6px}.assist-targets button{font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}.reduced *,.reduced *::before,.reduced *::after{animation:none!important;transition:none!important}
/* Clear choices, one current goal and immediate feedback; all fit the fixed game screen. */
.mission-card{position:absolute;z-index:2;top:calc(var(--safe-t) + 165px);left:var(--safe-l);right:var(--safe-r);margin:auto;max-width:440px;display:flex;align-items:center;gap:10px;padding:6px 9px;background:#fff9e7ed;border:2px solid #536d65;border-radius:19px;box-shadow:0 4px 0 #536d6533}.mission-card>svg{width:75px;height:61px;flex-shrink:0}.mission-card>div{flex:1;min-width:0}.mission-card small{display:block;font-size:8px;color:#7b896a;font-weight:800}.mission-card b{display:block;font-size:15px;line-height:1.9;white-space:nowrap}.mission-card span{display:block;font-size:8px;color:#788c75;font-weight:700}.mission-change{min-width:48px;min-height:46px;padding:5px;border:2px solid #3e6463;border-radius:13px;background:#d7eacb;box-shadow:0 3px 0 #3e6463;font-size:10px;font-weight:900}.mission-grid{display:grid;gap:10px}.mission-choice{display:flex;align-items:center;gap:10px;text-align:left;padding:8px;border:2px solid #91a38c;border-radius:17px;background:#e5ecd6;box-shadow:0 3px 0 #91a38c;min-height:92px}.mission-choice>svg{width:92px;height:72px}.mission-choice b{display:block;font-size:15px;line-height:1.6}.mission-choice small{display:block;font-size:9px;line-height:1.7;margin-top:3px}.mission-choice em{display:block;font-style:normal;font-size:9px;color:#65856a;margin-top:5px}.mission-choice.selected{background:#ffe6a0;border-color:#9a885d;box-shadow:0 3px 0 #9a885d}.stamp-grid{display:grid;gap:10px}.stamp{display:flex;align-items:center;gap:12px;background:#e8ead7;border:2px dashed #a4af97;border-radius:16px;padding:8px}.stamp>svg{width:80px;height:65px;filter:grayscale(.8);opacity:.7}.stamp.earned{border-style:solid;border-color:#6a9a83;background:#e0efcf}.stamp.earned>svg{filter:none;opacity:1}.stamp b{display:block;font-size:13px}.stamp small{display:block;font-size:9px;margin:4px 0;color:#6e866d}.stamp span{display:flex;flex-wrap:wrap;gap:3px}.stamp i{font-style:normal;font-size:8px;color:#81917c;display:block;background:#dbe1cb;border-radius:6px;padding:3px 5px}.stamp i.found{color:#426b63;background:#f8dfa1}.guide-bubble>div{flex:1;min-width:0}.context-hint{pointer-events:auto;flex-shrink:0;min-width:44px;min-height:44px;padding:5px;font-size:9px;font-weight:900;background:#d6ebd8;border:2px solid #658c76;border-radius:12px;box-shadow:0 2px 0 #658c76}.tool-button.recommended:not(.selected){outline:3px solid #ffe18b;outline-offset:2px}.marker.current-goal{border-color:#8a7144;box-shadow:0 0 0 3px #ffe6a49e,0 3px 0 #7d684933;background:#ffe7a5}.goal-marker{background:#d7eecb}.discovery-marker{font-size:8px;background:#e5ddef;border-color:#9a91a9;color:#75698b}.feedback-toast{position:absolute;z-index:4;top:calc(var(--safe-t) + 145px);left:50%;transform:translateX(-50%);padding:10px 18px;max-width:calc(100% - 35px);background:#fff1aa;color:#496758;font-size:15px;font-weight:1000;border:3px solid #587461;border-radius:17px;box-shadow:0 4px 0 #58746144;white-space:nowrap;pointer-events:none}.complete-stars{letter-spacing:0;display:flex;justify-content:center}.complete-stars>svg{width:70px;height:49px}
@media(min-width:900px) and (min-height:560px){.mission-card{top:calc(var(--safe-t) + 134px);left:var(--safe-l);right:auto;max-width:350px}.feedback-toast{top:calc(var(--safe-t) + 95px)}}
@media(max-width:360px){.mission-card{gap:5px;padding:5px 7px;top:calc(var(--safe-t) + 147px)}.mission-card>svg{width:60px;height:52px}.mission-card b{font-size:12px}.mission-card span{font-size:7px}.mission-choice{gap:7px;min-height:84px;padding:6px}.mission-choice>svg{width:76px;height:63px}.mission-choice b{font-size:12px}.mission-choice small,.mission-choice em{font-size:8px}.stamp{gap:8px;padding:7px}.stamp>svg{width:65px;height:56px}.stamp b{font-size:11px}.stamp i{font-size:7px}.feedback-toast{font-size:12px}}
@media(max-height:600px) and (orientation:portrait){.mission-card{top:calc(var(--safe-t) + 140px);max-height:65px}.mission-card>svg{height:48px}#game-app[data-view^="room"] .guide-bubble b,#game-app[data-view="drive"] .guide-bubble b{display:block;font-size:9px}.guide-bubble>img{width:24px}.guide-bubble{gap:4px}.guide-bubble p{font-size:8px}.complete-stars>svg{width:48px;height:32px}}
@media(max-height:550px) and (orientation:landscape){.mission-card{top:calc(var(--safe-t) + 66px);left:var(--safe-l);right:auto;max-width:260px;padding:5px 8px;gap:6px}.mission-card>svg{width:53px;height:48px}.mission-card b{font-size:11px}.mission-card small,.mission-card span{font-size:7px}.mission-change{min-width:44px;min-height:44px;font-size:8px}.mission-grid,.stamp-grid{grid-template-columns:repeat(3,1fr);gap:8px}.mission-choice{flex-direction:column;gap:3px;min-height:155px;padding:7px;text-align:center}.mission-choice>svg{height:61px;width:85px}.mission-choice b{font-size:11px}.mission-choice small,.mission-choice em{font-size:8px}.stamp{flex-direction:column;gap:4px;text-align:center;padding:7px}.stamp>svg{width:64px;height:45px}.stamp b{font-size:10px}.stamp small,.stamp i{font-size:8px}.stamp span{justify-content:center}.guide-bubble>img{display:none}#game-app[data-view^="room"] .guide-bubble b,#game-app[data-view="drive"] .guide-bubble b{display:block;font-size:9px}.guide-bubble p{font-size:8px;line-height:1.5}.guide-bubble{max-width:calc(100% - 352px - var(--safe-l) - var(--safe-r));max-height:76px;gap:5px}.context-hint{font-size:8px}.feedback-toast{top:calc(var(--safe-t) + 65px);font-size:12px;padding:7px 13px}.complete-stars>svg{width:45px;height:30px}}

.compact-memory-label{display:none}@media(max-height:550px) and (orientation:landscape){.full-memory-label{display:none}.compact-memory-label{display:block}.memory-button b{font-size:9px}}

/* Quality pass: keep feedback away from water, targets apart, and the crew visible. */
.marker-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none}.marker-lines line{stroke:#547e72;stroke-width:1.2;stroke-opacity:.45;stroke-dasharray:2 3}.marker{cursor:pointer;user-select:none}.save-notice{display:flex;align-items:center;gap:10px}.save-notice>span{flex:1}.reload-save{min-width:70px;min-height:44px;flex-shrink:0;padding:6px 8px;border:2px solid #866e4e;border-radius:11px;background:#fff3cc;font-size:10px;font-weight:900}.feedback-toast{left:var(--safe-l);transform:none;max-width:min(240px,calc(100% - 190px));white-space:normal;font-size:12px;line-height:1.5;text-align:center;padding:7px 11px}
@media(max-height:550px) and (orientation:landscape){.complete-banner{top:calc(var(--safe-t) + 65px);padding:6px 16px}.complete-banner .complete-stars>svg{width:28px;height:18px}.complete-banner>small{font-size:6px;letter-spacing:1px}.complete-banner h2{font-size:16px;line-height:1.3;margin-top:0}.feedback-toast{max-width:240px}}

.complete-banner{padding:10px 16px}.complete-banner .complete-stars>svg{width:48px;height:34px}.complete-banner h2{line-height:1.3}.complete-banner p{font-size:10px;line-height:1.4}.complete-banner .complete-memory{padding:4px 8px;margin-top:5px}
@media(max-height:600px) and (orientation:portrait){.complete-banner{padding:6px 12px}.complete-banner .complete-stars>svg{width:28px;height:18px}.complete-banner>small{font-size:6px;letter-spacing:1px}.complete-banner h2{font-size:16px;line-height:1.3;margin:0}.complete-banner .complete-memory{display:none}}
@media(max-height:550px) and (orientation:landscape){.complete-banner{padding:6px 16px}.complete-banner .complete-stars>svg{width:28px;height:18px}.complete-banner h2{font-size:16px}}

[data-hold].is-held{transform:translateY(3px);box-shadow:0 1px 0 #284456,inset 0 2px 3px #0002;filter:brightness(1.08)}

/* Clear next action, with stable hit areas and no screen shake. */
.next-steps{display:flex;align-items:center;gap:4px;min-height:25px;margin-top:3px;font-weight:900;font-size:10px;line-height:1.4;white-space:nowrap}.has-next-steps #guide-message:not(.gentle-hint){display:none}.next-chip{display:inline-flex;align-items:center;gap:3px;padding:3px 5px;border:1px solid #a8b8a5;border-radius:7px;color:#5a7367;background:#e3e8ce}.next-chip i{font-style:normal}.next-chip.active{color:#4b4930;border-color:#a47b32;background:#ffe399;box-shadow:0 2px 0 #987a3e30}.next-chip.done{background:#d5eee2;color:#26735d;border-color:#6ca18b}.next-chip.waiting{opacity:.65}.step-arrow{color:#81927a}.tool-button.recommended:not(.selected){outline:3px solid #ffe293;outline-offset:2px;animation:next-tool-glow 1.7s ease-in-out infinite}.tool-button.recommended:not(.selected)::before{content:'①';position:absolute;left:3px;top:2px;width:22px;height:22px;border-radius:50%;color:#584724;background:#ffe092;border:2px solid #6d673f;font-size:15px;z-index:1;line-height:18px}.marker.current-goal::before{content:attr(data-step);display:inline-block;font-size:13px;margin-right:3px;font-weight:1000}.marker.actionable{background:#ffdf85;border:2px solid #78623e;box-shadow:0 0 0 4px #fff5b98c,0 3px 0 #8a6d3e44;animation:next-target-glow 1.9s ease-in-out infinite}.marker-lines line.next-link{stroke:#b18a3c;stroke-width:2.5;stroke-opacity:.85;stroke-dasharray:none}
.feedback-toast{display:flex;align-items:center;gap:8px;text-align:left;padding:9px 10px;background:linear-gradient(135deg,#fff9df,#ffe7a1);border-color:#4c7769;box-shadow:0 4px 0 #406c6044,0 0 20px #ffe49c55}.achievement-medal{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:50%;border:2px solid #b1883e;color:#8c651d;background:#ffe08c;font-size:22px;box-shadow:inset 0 2px 0 #fff3cb}.achievement-copy{min-width:0}.achievement-copy strong{display:block;font-size:13px;line-height:1.5;color:#356b5a}.achievement-copy small{display:block;font-size:9px;line-height:1.5;color:#7c7049}.achievement-enter{animation:achievement-pop .4s cubic-bezier(.16,.9,.3,1.2) both}.celebration-confetti{position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:2}.celebration-confetti i{position:absolute;top:0;left:var(--x);width:8px;height:13px;border-radius:2px;opacity:0}.celebration-confetti.playing i{animation:confetti-fall 1.6s var(--delay) ease-out both}
@keyframes next-tool-glow{50%{outline-color:#e8ba50;box-shadow:0 4px 0 #314d5b,0 0 16px #ffda73aa}}@keyframes next-target-glow{50%{box-shadow:0 0 0 6px #fff2ba66,0 3px 0 #8a6d3e44}}@keyframes achievement-pop{from{opacity:0;translate:0 10px;scale:.88}to{opacity:1;translate:0 0;scale:1}}@keyframes confetti-fall{0%{opacity:0;transform:translate3d(0,-18px,0) rotate(0)}12%{opacity:1}100%{opacity:0;transform:translate3d(var(--drift),clamp(130px,35vh,350px),0) rotate(var(--spin))}}
@media(max-width:380px){.next-steps{font-size:8px;gap:2px}.next-chip{padding:3px}.feedback-toast{gap:5px;padding:7px}.achievement-medal{width:25px;height:25px;font-size:18px}.achievement-copy strong{font-size:11px}.achievement-copy small{font-size:8px}}
@media(max-height:550px) and (orientation:landscape){.next-steps{font-size:8px;gap:2px;white-space:normal;flex-wrap:wrap;row-gap:2px;min-height:21px}.next-chip{padding:2px 3px}.guide-bubble.has-next-steps{max-height:82px}.achievement-copy strong{font-size:12px}.achievement-medal{width:27px;height:27px;font-size:19px}.feedback-toast{padding:7px 9px}}
.reduced .tool-button.recommended,.reduced .marker.actionable,.reduced .achievement-enter{animation:none!important}.reduced .celebration-confetti{display:none!important}

.atlas-paging{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px}.atlas-paging>span{text-align:center;font-weight:900;font-size:13px}.atlas-paging small{font-size:9px}.atlas-paging button{min-width:52px}.case-grid{display:grid;gap:9px}.case-choice{display:flex;align-items:center;gap:12px;min-height:76px;padding:10px 14px;background:#f5edcf;border:2px solid #627968;border-radius:16px;text-align:left;box-shadow:0 3px 0 #71836a33}.case-choice>i{display:grid;place-items:center;width:34px;height:34px;flex:none;background:#f5d48a;border:2px solid #8d7a4c;border-radius:50%;font-size:20px;font-style:normal;font-weight:900}.case-choice b{display:block;font-size:15px}.case-choice small{display:block;font-size:10px;line-height:1.5;color:#6a7e64}.case-choice em{display:block;font-style:normal;font-size:9px;color:#a17642;margin-top:3px}.journal-town{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#f5eccd;border:2px solid #8c9d7a;border-radius:16px}.journal-town>svg{width:100px;height:70px}.journal-town b{display:block;font-size:16px}.journal-town small{font-size:10px}.job-medals{display:flex;gap:5px;margin-top:8px;flex-wrap:wrap}.job-medals span{font-size:10px;border:1px solid #a7af8b;border-radius:7px;padding:3px 5px;color:#869076}.job-medals .earned{background:#ffdc88;color:#866222;border-color:#b29254}.journal-discoveries{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.journal-discoveries button{font-size:10px;padding:8px;min-height:48px}.journal-discoveries .found{background:#d8eee1}.journal-navigation{display:grid;grid-template-columns:52px 1fr 52px;gap:8px;margin-top:12px}.journal-navigation button{min-height:46px;font-size:12px;padding:7px}.journal-count{text-align:center;font-size:10px!important;margin:9px 0 0!important}.discovery-picture{display:flex;justify-content:center;background:#e4eedc;border:2px solid #91af91;border-radius:16px;padding:12px}.discovery-picture svg{width:160px;height:110px}.discovery-reading{font-size:14px!important;line-height:1.8!important}.observation-question{margin:12px 0;padding:12px 14px;background:#fff0bf;border:2px solid #b29b63;border-radius:12px;font-size:13px;font-weight:800;line-height:1.7}.town-dock{display:flex;gap:10px;width:100%}.town-dock button{flex:1}
@media(max-width:380px){.case-choice{min-height:70px;padding:8px 10px}.case-choice b{font-size:13px}.case-choice small{font-size:9px}.case-choice em{font-size:8px}.journal-town{padding:8px;gap:6px}.journal-town>svg{width:80px;height:64px}.journal-town b{font-size:13px}.job-medals span{font-size:8px}.journal-discoveries{gap:5px}.journal-discoveries button{font-size:9px}.discovery-picture svg{height:80px}.observation-question{font-size:11px}}
@media(max-height:550px) and (orientation:landscape){.atlas-paging{margin-top:8px}.atlas-paging button{min-height:44px}.case-grid{gap:6px}.case-choice{min-height:58px;padding:6px 10px;gap:8px}.case-choice b{font-size:13px}.case-choice small{font-size:9px}.case-choice em{font-size:8px;margin-top:0}.case-choice>i{width:30px;height:30px;font-size:18px}.case-grid~.crew-note{font-size:9px!important;margin:7px 0!important}.case-grid~button{min-height:44px}.journal-town{padding:5px 9px}.journal-town>svg{height:46px;width:75px}.journal-town b{font-size:13px}.job-medals{margin-top:3px}.job-medals span{padding:2px 4px;font-size:9px}.journal-discoveries{margin-top:7px}.journal-discoveries button{min-height:44px;padding:5px;font-size:9px}.journal-navigation{margin-top:7px;grid-template-columns:48px 1fr 48px}.journal-count{margin-top:5px!important;font-size:9px!important}.discovery-picture{float:left;width:128px;margin-right:14px;padding:6px}.discovery-picture svg{width:110px;height:88px}.discovery-reading{font-size:12px!important}.observation-question{font-size:11px;margin:8px 0;padding:8px 10px}.town-dock button{min-height:56px;font-size:11px;padding:7px}}

.world-success{position:absolute;z-index:3;pointer-events:none;max-width:150px;transform:translate(-50%,-100%);font-size:15px;font-weight:1000;color:#fff9d8;text-shadow:0 2px 0 #3b7c68,2px 0 0 #3b7c68,-2px 0 0 #3b7c68,0 -2px 0 #3b7c68;white-space:nowrap}.world-success.playing{animation:world-success-rise 1.7s ease-out both}@keyframes world-success-rise{0%{opacity:0;translate:0 5px;scale:.7}20%{opacity:1;translate:0 0;scale:1.1}65%{opacity:1}100%{opacity:0;translate:0 -25px;scale:1}}.reduced .world-success{animation:none!important}

@media(max-height:550px) and (orientation:landscape){.case-choice{min-height:50px;padding:4px 8px}.case-choice b{font-size:12px;line-height:1.3}.case-choice small{font-size:8.5px;line-height:1.4}.case-choice em{font-size:8px;line-height:1.3}.case-grid~.crew-note{margin:5px 0!important;line-height:1.3!important}}

/* Town workshop: tactile boards with no timed gate, fixed screen and persistent attempts. */
.station-dock{grid-template-columns:repeat(3,minmax(0,1fr))}.workshop-launch{display:flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:49px;background:#dfc7e4;border:3px solid #526b74;border-radius:16px;box-shadow:0 4px 0 #354d5b;font-size:12px;font-weight:900;line-height:1.3}.workshop-launch svg{width:27px;height:27px}.workshop-links{display:flex;gap:8px;margin-top:10px}.workshop-links button{flex:1;font-size:11px;min-height:44px;padding:7px}.workshop-links svg{width:20px;height:20px;vertical-align:middle;margin-right:5px}
dialog.lab-game,dialog.town-editor{width:min(900px,calc(100% - var(--safe-l) - var(--safe-r)))}.lab-game .panel-body,.town-editor .panel-body{padding:17px 14px 13px}.lab-heading{display:flex;align-items:center;gap:8px;padding-right:44px;min-height:48px}.lab-heading img{width:42px;height:48px;object-fit:contain}.lab-heading small{display:block;font-size:9px;line-height:1.5}.lab-heading h2{font-size:19px;margin:0!important}.lab-heading>b{flex:none;margin-left:auto;font-size:11px;color:#5c826b}.lab-direction{font-size:11px!important;line-height:1.5!important;min-height:33px;margin:7px 0!important}.lab-layout{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:14px;align-items:center}.lab-board{display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;height:230px;background:linear-gradient(145deg,#e1eddc,#f5edcf);border:2px solid #aac1a3;border-radius:20px;padding:8px}.lab-board>svg{height:100%;max-width:100%}.lab-tools{display:flex;flex-direction:column;gap:8px;min-width:0}.lab-tile,.editor-slots button,.decoration-picker button,.editor-colors button{min-width:44px;min-height:44px;border:2px solid #678579;background:#fff4d6;border-radius:12px;box-shadow:0 3px 0 #66817244;touch-action:manipulation;font-weight:900;color:#456d61;padding:5px}.lab-tile:hover{background:#fff0bc}.lab-tile:active{transform:translateY(2px);box-shadow:none}.lab-tile svg{max-width:100%;width:100%;height:42px;display:block}.lab-tile small{font-size:9px;display:block}.lab-options{display:grid;grid-template-columns:1fr 1fr;gap:7px}.lab-options .lab-tile{font-size:11px}.lab-options .lab-tile svg{height:34px}.lab-note{font-size:11px!important;line-height:1.5!important;min-height:34px;margin:8px 0!important;padding:6px 9px;border-radius:9px;background:#fff0bb;color:#77633c}.lab-footer{display:flex;gap:7px}.lab-footer button{flex:1;min-height:44px;font-size:11px;padding:7px}.lab-small{font-size:12px!important;text-align:center;line-height:1.8!important;margin:3px 0!important}.lab-explain-art{font-size:28px;font-weight:900;text-align:center;color:#668a77}.pipe-grid{display:grid;grid-template-columns:repeat(3,56px);grid-template-rows:repeat(3,56px);gap:5px}.pipe-grid .lab-tile{position:relative;padding:0;overflow:hidden}.pipe-grid svg{height:100%}.pipe-grid i{position:absolute;right:1px;bottom:0;font-size:13px;font-style:normal}.lab-highlight,.chosen{outline:3px solid #e0b75a!important;outline-offset:1px;background:#ffe7a7!important}.boat-pair{display:flex;gap:10px;width:100%;max-width:340px}.boat-pair .lab-tile{flex:1;min-width:0;padding:8px 4px}.boat-pair svg{height:105px}.boat-pair b{font-size:14px}.boat-pair small{min-height:16px}.satisfied{background:#d8edce!important;border-color:#558e73!important}.cargo-crate{display:grid;place-items:center;width:35px;height:35px;background:#cda877;border:2px solid #9b7b4d;border-radius:6px;margin:auto;color:#fff9d9;font-size:20px}.cargo-options .lab-tile{min-height:63px}.bread-tray{height:35px;font-size:14px;display:flex;gap:2px;align-items:center;justify-content:center}.bread-tray b{font-size:11px;margin-left:5px;white-space:nowrap}.bread-tray i,.basket-bread i{font-style:normal}.bread-baskets{display:flex;gap:8px;justify-content:center;width:100%;margin-top:6px}.bread-baskets>div{flex:1;max-width:110px;display:flex;flex-direction:column;gap:6px;min-width:0}.bread-baskets .lab-tile{font-size:10px}.basket-bread{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;min-height:42px;max-height:65px;font-size:14px;background:#d7b47c;border-radius:6px;padding:4px;margin-bottom:4px}.lab-turns{display:flex;gap:7px}.lab-turns .lab-tile{flex:1;font-size:23px}.lab-turns .lab-tile.primary{font-size:12px}.lab-tools>.lab-tile{font-size:14px}.shape-compare{display:flex;width:100%;gap:10px}.shape-compare>div{flex:1;min-width:0;text-align:center}.shape-compare svg{width:100%;max-height:155px}.shape-compare small{font-size:10px}.shape-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.shape-choices .lab-tile svg{height:48px}.rhythm-score{display:flex;gap:7px;width:100%;justify-content:center}.rhythm-score span{display:grid;place-items:center;width:38px;height:45px;background:#f7f0d7;border:2px solid #bdc6a7;border-radius:8px;font-size:22px;color:var(--note)}.rhythm-score .next{outline:3px solid #e1b658;outline-offset:1px}.rhythm-score .played{background:#cde7cd;opacity:.65}.rhythm-stage svg{width:115px;height:100px}.rhythm-keys{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.rhythm-keys .lab-tile{height:70px;font-size:30px}.rhythm-keys .lab-tile:nth-child(1){color:#b77d47}.rhythm-keys .lab-tile:nth-child(2){color:#478b8c}.rhythm-keys .lab-tile:nth-child(3){color:#877ca8}.leaf-display svg{height:110px;width:110px}.leaf-trays{display:flex;gap:8px;width:100%;justify-content:center}.leaf-trays .lab-tile{flex:1;max-width:88px;min-width:0}.leaf-trays svg{height:44px}.route-grid{display:grid;grid-template-columns:repeat(5,46px);grid-template-rows:repeat(4,44px);gap:4px}.route-grid .lab-tile{padding:2px;font-size:22px;box-shadow:0 2px 0 #7c927744}.route-grid .blocked{opacity:1;background:#d9d3b6;border-style:dashed}.route-grid .track{background:#dfbc81;border-color:#9c8057}.route-progress{font-size:28px;text-align:center;color:#a58343}.lab-finish{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:8px;text-align:center}.lab-rosette{width:65px;height:65px;display:grid;place-items:center;background:#f2d27a;color:#a6813d;border:5px double #bf994c;border-radius:50%;font-size:39px;animation:achievement-pop .45s ease-out both}.lab-finish>b{font-size:17px}.lab-finish p{font-size:12px!important;margin:0!important;line-height:1.7!important}.lab-finish>span{font-size:10px;color:#6b8b70}.lab-tools>.primary,.lab-tools>.secondary{min-height:44px;font-size:13px;padding:9px}
.editor-layout{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:center}.editor-scene>svg{display:block;width:100%;height:140px}.editor-slots{display:flex;gap:7px}.editor-slots button{flex:1;min-width:0;padding:4px}.editor-slots svg{height:54px;width:100%;display:block}.editor-slots small{font-size:9px}.editor-slots span{display:grid;place-items:center;height:54px;font-size:24px;color:#9aaf90}.decoration-picker{display:grid;grid-template-columns:1fr 1fr;gap:7px}.decoration-picker button{position:relative;padding:3px;font-size:10px}.decoration-picker svg{height:65px;width:100%;display:block}.decoration-picker small{display:block;font-size:9px}.decoration-picker i{position:absolute;inset:auto 0 0;font-style:normal;background:#ece9d8e8;font-size:7px}.decoration-picker button:disabled{opacity:.6;filter:grayscale(.6)}.editor-paging{display:flex;justify-content:space-between;align-items:center;margin-top:8px;font-size:11px}.editor-paging button{min-width:44px;min-height:44px;padding:4px}.editor-colors{display:flex;gap:7px;margin-top:12px}.editor-colors button{flex:1;font-size:10px;display:flex;align-items:center;justify-content:center;gap:4px;padding:4px}.editor-colors i{display:block;width:16px;height:16px;border:1px solid #718779;border-radius:50%}.editor-note{font-size:10px!important;margin:9px 0 0!important;line-height:1.5!important}
@media(max-width:600px){.memory-button .full-memory-label{display:none}.memory-button .compact-memory-label{display:block}.workshop-launch{gap:4px;font-size:11px;border-width:2px}.workshop-launch svg{width:22px;height:22px}.lab-layout{grid-template-columns:1fr;gap:8px}.lab-board{height:208px}.lab-tools{gap:7px}.lab-options{grid-template-columns:repeat(4,1fr);gap:5px}.lab-options .lab-tile{font-size:9px;padding:4px}.lab-options .lab-tile svg{height:25px}.cargo-options{grid-template-columns:repeat(5,1fr)}.cargo-options .lab-tile{min-height:54px;padding:3px}.cargo-options .lab-tile small{font-size:7px}.cargo-crate{width:29px;height:28px;font-size:16px}.lab-heading{gap:5px;padding-right:35px}.lab-heading img{width:32px;height:40px}.lab-heading h2{font-size:16px}.lab-heading small{font-size:7px}.lab-heading>b{font-size:9px}.lab-small,.lab-explain-art,.route-progress{display:none}.lab-note{font-size:10px!important;min-height:33px;margin:6px 0!important}.lab-direction{font-size:10px!important;margin:5px 0!important}.lab-turns .lab-tile{min-height:44px;font-size:22px}.shape-choices .lab-tile svg{height:31px}.shape-choices .lab-tile{min-height:44px}.shape-choices{gap:6px}.lab-tools:has(.shape-choices){display:grid;grid-template-columns:1fr 1fr;gap:7px}.rhythm-keys .lab-tile{height:49px;font-size:26px}.lab-board:has(.route-grid){height:208px;padding:7px 3px}.lab-board:has(.pipe-grid){height:203px}.lab-layout.is-finished .lab-board{height:230px}.lab-finish>b{font-size:14px}.lab-finish p{font-size:11px!important}.lab-finish{gap:5px}.lab-layout.is-finished .lab-tools{display:grid;grid-template-columns:1fr 1fr}.lab-layout.is-finished .lab-tools>.primary{grid-column:1/-1}.editor-layout{grid-template-columns:1fr}.editor-scene>svg{display:none}.editor-slots svg,.editor-slots span{height:46px}.decoration-picker{grid-template-columns:repeat(4,1fr);gap:5px}.decoration-picker svg{height:48px}.decoration-picker small{font-size:8px}.editor-colors{gap:5px;margin-top:9px}.editor-colors button{font-size:9px}.editor-colors i{width:12px;height:12px}.town-editor h2{font-size:18px}}
@media(max-height:550px) and (orientation:landscape){.workshop-launch{width:48px;min-width:48px;height:58px;flex-direction:column;font-size:8px;gap:1px;padding:4px;border-width:2px;border-radius:14px}.workshop-launch svg{width:18px;height:18px}.station-dock .dispatch-row .primary{font-size:12px;padding:6px;min-width:44px}.station-dock .dispatch-row .primary>svg{display:none}.lab-game .panel-body{padding:10px 13px}.lab-heading{min-height:35px}.lab-heading img{width:30px;height:34px}.lab-heading h2{font-size:16px}.lab-heading small{font-size:8px}.lab-heading>b{font-size:10px}.lab-direction{font-size:9px!important;min-height:15px;margin:2px 0 5px!important}.lab-layout{grid-template-columns:minmax(0,1fr) 200px;gap:10px}.lab-board{height:184px;padding:4px}.pipe-grid{grid-template-columns:repeat(3,49px);grid-template-rows:repeat(3,49px);gap:4px}.route-grid{grid-template-columns:repeat(5,44px);grid-template-rows:repeat(4,44px);gap:2px}.lab-board:has(.route-grid){padding:1px}.lab-note{min-height:22px;font-size:9px!important;padding:3px 7px;margin:4px 0!important}.lab-footer button{min-height:44px;padding:4px;font-size:10px}.lab-explain-art{font-size:21px}.lab-small{font-size:10px!important}.lab-options .lab-tile svg{height:22px}.lab-options .lab-tile{font-size:10px;padding:3px;min-height:44px}.cargo-options{grid-template-columns:repeat(3,1fr)}.cargo-options .lab-tile{min-height:53px}.cargo-crate{width:27px;height:27px;font-size:16px}.lab-tools{gap:6px}.lab-tools>.primary,.lab-tools>.secondary{padding:6px;font-size:11px}.shape-choices .lab-tile svg{height:30px}.lab-tile svg{height:36px}.boat-pair svg{height:91px}.boat-pair b{font-size:12px}.leaf-display svg{height:80px}.leaf-trays svg{height:38px}.rhythm-keys .lab-tile{height:60px}.lab-rosette{width:48px;height:48px;font-size:28px}.lab-finish{gap:3px}.lab-finish>b{font-size:14px}.lab-finish p{font-size:10px!important}.lab-finish>span{font-size:9px}.town-editor .panel-body{padding:12px 15px}.town-editor h2{font-size:17px;margin-bottom:6px}.editor-scene>svg{height:74px}.editor-slots svg,.editor-slots span{height:42px}.editor-layout{gap:10px}.decoration-picker{grid-template-columns:repeat(4,1fr);gap:5px}.decoration-picker svg{height:46px}.decoration-picker small{font-size:8px}.editor-paging{margin-top:5px}.editor-colors{margin-top:6px}.editor-colors button{min-height:44px}.editor-note{margin-top:5px!important;font-size:9px!important}.workshop-links{margin-top:6px}.workshop-choices .mission-choice{min-height:142px}}

@media(max-width:600px) and (max-height:750px) and (orientation:portrait){.lab-game .panel-body{padding:12px 12px 10px}.lab-heading{min-height:36px}.lab-heading img{height:33px;width:29px}.lab-heading h2{font-size:15px}.lab-board{height:137px;padding:5px}.lab-board:has(.shape-compare){height:108px}.shape-compare svg{max-height:82px}.lab-board:has(.pipe-grid){height:172px}.pipe-grid{grid-template-columns:repeat(3,48px);grid-template-rows:repeat(3,48px)}.lab-board:has(.route-grid){height:200px}.lab-board:has(.leaf-display){height:188px}.lab-board:has(.rhythm-score){height:157px}.boat-pair svg{height:73px}.lab-tools:has(.shape-choices){display:flex;flex-direction:column}.lab-tools:has(>.lab-turns):not(:has(.shape-choices)){flex-direction:row}.lab-tools:has(>.lab-turns)>.lab-turns,.lab-tools:has(>.lab-turns)>.lab-tile{flex:1}.lab-note{min-height:27px;font-size:9px!important;padding:4px 7px}.lab-layout.is-finished .lab-board{height:191px}.lab-layout.is-finished .lab-tools{grid-template-columns:repeat(3,1fr)}.lab-layout.is-finished .lab-tools>.primary{grid-column:auto}.lab-layout.is-finished .lab-tools>*{font-size:10px;padding:5px}.lab-rosette{width:52px;height:52px;font-size:31px}dialog.lab-game:has(.lab-finish) .lab-direction{display:none}}

.lab-heading>div{flex:1;min-width:0}.lab-heading>div h2{overflow-wrap:anywhere}.lab-heading>b{white-space:nowrap}.workshop-hub .panel-kicker{padding-right:40px;font-size:8px}.workshop-hub h2{padding-right:35px}.workshop-hub .atlas-paging small{font-size:8px}.route-grid .lab-tile{position:relative;overflow:hidden}.route-grid .lab-tile>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.route-grid .lab-tile>b{position:relative;z-index:1;font-size:19px;font-weight:normal}.reduced .lab-rosette{animation:none}




/* Orientation audit: usable controls stay inside the asymmetric safe rectangle. */
#game-app button,#panel button,#panel a,#panel label.setting{min-width:48px;min-height:48px}
.play-window{left:var(--safe-l);right:var(--safe-r)}
dialog{position:fixed;inset:var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);margin:auto}
.close-button{width:48px;height:48px}
.panel-kicker{padding-right:48px;overflow-wrap:anywhere}
.panel-body h2{margin-right:48px}
.lab-heading{padding-right:50px}
.lab-direction{padding-right:52px}
.nav-icon{width:48px;height:48px;flex-shrink:0}
.hud-menu{gap:6px}
.mission-change,.context-hint{min-width:48px;min-height:48px}
.route-grid{grid-template-columns:repeat(5,48px);grid-template-rows:repeat(4,48px);gap:3px}
.lab-board:has(.route-grid){height:220px;padding:5px 3px}
.cargo-options .lab-tile{min-width:48px}
.setting{cursor:pointer}
.setting input{flex-shrink:0}
@media(max-width:360px){.player-badge{min-width:126px}.hud-menu{gap:4px}.lab-heading{gap:4px}.lab-heading>b{font-size:8px}.lab-game .panel-body{padding-left:10px;padding-right:10px}.lab-board:has(.route-grid){height:212px;padding:0}.cargo-options{gap:3px}}
@media(max-height:550px) and (orientation:landscape){
 .lab-game .panel-body{display:grid;grid-template-columns:minmax(0,1fr) 190px;column-gap:10px;row-gap:4px;padding:8px 12px}
 .lab-heading{grid-column:1/-1;min-height:40px;padding-right:50px}
 .lab-direction{grid-column:1/-1;min-height:0;margin:0!important}
 .lab-layout{display:contents}
 .lab-board,.lab-board:has(.pipe-grid),.lab-board:has(.route-grid),.lab-layout.is-finished .lab-board{grid-column:1;grid-row:3/6;height:206px;padding:3px}
 .lab-tools{grid-column:2;grid-row:3;gap:5px}
 .lab-tools:has(.shape-choices){display:flex;flex-direction:column}
 .lab-note{grid-column:2;grid-row:4;align-self:center;min-height:0;margin:0!important;font-size:9px!important;padding:4px 6px}
 .lab-footer{grid-column:2;grid-row:5;align-self:end;gap:4px}
 .lab-footer button{padding:4px 2px;font-size:9px}
 .lab-small,.lab-explain-art,.route-progress{display:none}
 .pipe-grid{grid-template-columns:repeat(3,52px);grid-template-rows:repeat(3,52px);gap:4px}
 .route-grid{grid-template-columns:repeat(5,48px);grid-template-rows:repeat(4,48px);gap:2px}
 .lab-options{grid-template-columns:repeat(2,1fr)}
 .cargo-options{grid-template-columns:repeat(3,1fr)}
 .cargo-options .lab-tile{min-height:48px}
 .shape-choices .lab-tile svg{height:30px}
 .lab-layout.is-finished .lab-tools{display:grid;grid-template-columns:1fr 1fr}
 .lab-layout.is-finished .lab-tools>.primary{grid-column:1/-1}
 .lab-tools>.primary,.lab-tools>.secondary{font-size:10px;padding:5px}
 .town-editor .panel-body{padding:10px 12px}
 .editor-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 .town-editor h2{min-height:48px}
 .editor-scene>svg{height:60px}
 .editor-paging{margin-top:4px}
 .editor-colors{margin-top:5px}
 .editor-note{margin-top:4px!important}
}
@media(max-height:350px) and (orientation:landscape){
 .panel-body{padding:8px 16px}
 .panel-body>h2{min-height:48px}
 .mission-choice,.workshop-choices .mission-choice{min-height:121px;padding:5px;gap:2px}
 .mission-choice>svg{height:42px;width:65px}
 .mission-choice b{font-size:10px;line-height:1.4}
 .mission-choice small,.mission-choice em{font-size:8px;line-height:1.4;margin-top:2px}
 .atlas-paging{margin-top:6px}
 .crew-note{font-size:9px!important;margin:5px 0 0!important;line-height:1.4!important}
 .case-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .case-choice{flex-direction:column;justify-content:center;min-height:116px;text-align:center;padding:6px}
 .case-grid~.crew-note{margin-top:5px!important}
 .case-grid~button{margin-top:7px}
 .help-card{min-height:85px;padding:8px;gap:10px}
 .help-card>svg{width:42px;height:42px}
 .help-card b{font-size:13px;line-height:1.4}
 .help-card p{font-size:10px;line-height:1.5}
 .help-paging{margin-top:7px}
 .help-shortcuts{margin-top:5px}
 .journal-town>svg{height:40px}
 .journal-navigation,.journal-discoveries{margin-top:5px}
 .job-medals{gap:3px;margin-top:2px}
 .job-medals span{font-size:8px;line-height:1.2;padding:1px 3px}
 .journal-count{margin-top:3px!important;line-height:1.3!important}
}
@media(max-height:400px) and (orientation:landscape){
 .town-editor .panel-body{padding:8px 12px}
 .town-editor h2{font-size:16px;line-height:1.4;min-height:44px;margin-top:0;margin-bottom:5px}
 .editor-scene>svg{height:40px}
 .decoration-picker svg{height:24px}
 .decoration-picker small{line-height:1.2}
 .editor-paging{margin-top:2px}
 .editor-colors{margin-top:3px}
 .editor-layout{gap:8px}
 .editor-note{font-size:8px!important;line-height:1.2!important;margin-top:3px!important}
 .town-editor .workshop-links{margin-top:4px}
}

/* Common lessons: separate icon, name and counted objects from text flow. */
.close-button{display:grid;place-items:center;padding:0}
.close-button svg{display:block;width:24px;height:24px;pointer-events:none}
.crew-switch>span{min-width:0;white-space:nowrap}
.crew-switch small{white-space:normal}
.basket-bread{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:16px;align-content:center;justify-items:center;height:56px;min-height:56px;max-height:none;width:100%;line-height:1}
.basket-bread i{line-height:1}
.bread-tray{height:24px;flex-shrink:0}
.bread-baskets .lab-tile{padding:4px 3px}
@media(max-width:600px) and (orientation:portrait){.crew-switch{padding:4px;gap:4px}.lab-board:has(.bread-baskets){height:210px}}

/* Six-note patterns stay inside narrow boards; paging keeps original card size. */
.rhythm-score{gap:clamp(3px,1vw,7px)}.rhythm-score span{min-width:0;flex:0 1 38px}
