/* A clear first-run path and readable, touch-friendly game controls. */
.at-start #app header,.at-start #app footer,.at-start #app .rail,.at-start #app aside,.at-start .world>:not(#scene){display:none!important}
.at-start #app{min-height:100dvh}.at-start .world{width:100%}
#welcome{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;padding:0;background:linear-gradient(90deg,#081b28f5 0%,#081b28ed 37%,#081b2870 72%),linear-gradient(0deg,#081b28 0%,transparent 65%);box-shadow:none;overflow:auto}
#welcome::backdrop{background:#0b22332a;backdrop-filter:none}
.welcome-wrap{max-width:1450px;margin:auto;padding:30px 52px 23px;min-height:100%;display:flex;flex-direction:column;justify-content:space-between;gap:25px}
.welcome-brand{font-family:'Space Grotesk',sans-serif;letter-spacing:2px;font-weight:600;display:flex;align-items:center;font-size:18px;gap:3px}.welcome-brand>span:first-child{font-size:31px;margin-right:9px;color:#8aebc1}.welcome-brand>span{color:#8aebc1}.welcome-brand small{font:10px 'DM Sans',sans-serif;letter-spacing:2px;border-left:1px solid #ffffff35;padding-left:20px;margin-left:20px;color:#b3c9d5}
.welcome-hero{display:flex;align-items:center;justify-content:space-between;gap:30px;flex:1;padding:6px 0}.welcome-copy{max-width:540px}.welcome-kicker{color:#92e7cb;font-size:10px;font-weight:700;letter-spacing:2px;display:flex;align-items:center;gap:10px}.welcome-kicker i{width:6px;height:6px;background:#92e7cb;border-radius:50%}
#welcome h1{font:600 clamp(44px,5.2vw,76px)/1.04 'Space Grotesk',sans-serif;letter-spacing:-3px;margin:18px 0 17px}#welcome h1 em{font-style:normal;color:#a2efcc}#welcome .welcome-lead{font-size:18px;line-height:1.45;color:#e7f4f8;margin:0 0 12px;max-width:410px}#welcome .welcome-mission{font-size:14px;color:#b6ccd7;line-height:1.6;max-width:420px;margin:0}
.pip-intro{display:flex;align-items:center;gap:12px;margin:20px 0}.pip-avatar{width:49px;height:49px;flex-shrink:0;display:block}.pip-avatar svg{width:100%;height:100%}#welcome .pip-intro p{font-size:13px;line-height:1.6;margin:0;color:#b3cdd8}.pip-intro b{color:#e7f6f5}
.welcome-actions{display:flex;align-items:flex-start;flex-direction:column;gap:5px}.start-primary{background:#a0edc4;color:#12392d;font-size:17px;font-weight:700;border-radius:9px;padding:15px 23px;min-width:265px;min-height:52px;text-align:left;box-shadow:0 6px 30px #7bf5bf1a}.start-primary span{float:right;margin-left:30px}.start-primary:hover{background:#b8ffda;color:#092f24}.start-secondary{font-size:12px;padding:12px 0;color:#c2d3dc;text-decoration:underline;text-underline-offset:4px;min-height:40px}#welcome .welcome-small{font-size:11px;margin:3px 0 0;color:#90aebb}
.welcome-world-label{align-self:flex-end;margin:0 25px 30px 0;letter-spacing:2px;font-size:12px;padding:17px 21px;background:#123245bd;border:1px solid #b2e8ed30;border-radius:9px;backdrop-filter:blur(10px)}.welcome-world-label .live-dot{margin-right:8px}.welcome-world-label small{display:block;font-size:11px;color:#bfd0d8;letter-spacing:0;margin-top:7px}
.welcome-goals-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:13px}#welcome .welcome-goals h2{font:500 18px 'Space Grotesk',sans-serif;margin:0}.welcome-goals-heading>span{font-size:11px;color:#97b3c2}.welcome-goal-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.welcome-goal-grid article{border:1px solid #bddbeb26;background:#152c39dc;backdrop-filter:blur(12px);border-radius:11px;padding:20px 18px;display:flex;gap:13px}.goal-symbol{font-size:29px;color:#a5ecca;line-height:1}.welcome-goal-grid small{font-size:9px;letter-spacing:1.1px;color:#9bc5c7}#welcome .welcome-goal-grid h3{font-size:16px;letter-spacing:-.2px;margin:7px 0}#welcome .welcome-goal-grid p{font-size:12px;line-height:1.6;color:#a9c0cc;margin:0}.welcome-foot{display:flex;justify-content:space-between;gap:20px;font-size:10px;color:#90abba}.welcome-foot>span:first-child{letter-spacing:1.3px;color:#acd8ce}
.coach{margin-bottom:22px;border:1px solid #88e8bc55;border-radius:12px;background:linear-gradient(145deg,#234737,#193540);padding:16px}.coach-head{display:flex;gap:10px;align-items:center;margin-bottom:12px}.coach-head .pip-avatar{width:39px;height:39px}.coach-head b{font-size:14px;display:block}.coach-head small{color:#a6d6c4;font-size:11px;display:block;margin-top:4px}.coach h3{font-size:18px;line-height:1.25;margin:0 0 8px}.coach p{font-size:13px;line-height:1.55;color:#c4dacf;margin:7px 0 12px}.coach .coach-progress{display:flex;gap:5px;margin:12px 0}.coach-progress i{height:4px;background:#ffffff20;flex:1;border-radius:4px}.coach-progress .done{background:#9fe9bd}.coach-action,.easy-place{display:block;background:#a0edc4;color:#10352a;min-height:44px;padding:11px 12px;border-radius:7px;font-size:13px;line-height:1.4;font-weight:700;text-align:center;width:100%;margin-top:10px}.coach-action:hover,.easy-place:hover{background:#c1ffdc;color:#143a2b}.coach-skip{font-size:11px;color:#bbd4cb;padding:10px 0 0;text-decoration:underline}.coach .coach-note{font-size:11px;margin-bottom:0;color:#aecdbf}
.objective-list{list-style:none;padding:0;margin:12px 0}.objective-list li{display:flex;gap:9px;align-items:flex-start;margin:11px 0;font-size:13px;line-height:1.45}.objective-list .check{font-size:12px;display:grid;place-items:center;width:19px;height:19px;border-radius:50%;border:1px solid #8faab657;flex-shrink:0;color:#a9c2cd}.objective-list .met .check{background:#8adeb723;color:#97e6bd;border-color:#97e6bd77}.objective-list small{display:block;color:#9bb4c2;font-size:11px;margin-top:2px}.hold-dots{display:flex;gap:6px;margin:11px 0}.hold-dots i{display:block;width:26px;height:8px;background:#ffffff1c;border-radius:4px}.hold-dots i.done{background:#98e5b9}.goal .hold-help{font-size:11px;color:#adbfca}.goal.active{border:1px solid #8ce6ba44;background:#80e0b808;border-radius:10px;padding:15px}.goal h3{font-size:17px}.goal-summary{font-size:12px;padding:10px 0;color:#9eb9c9}.goal-summary summary{cursor:pointer;min-height:38px;line-height:1.6}.goal-summary p{margin:7px 0;line-height:1.6}
.simple-advice{border-left:3px solid #89dcb8;padding:0 0 0 12px;margin:15px 0 22px}.simple-advice h3{font-size:15px;margin:0 0 7px}.simple-advice p{font-size:13px;line-height:1.6;color:#adc5d1;margin:0}.simple-advice button{padding-top:10px;min-height:40px}.monthly-report{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin:10px 0 17px}.monthly-report>div{background:#ffffff06;border-radius:7px;padding:9px 6px;font-size:10px;text-align:center;color:#a9c2cf}.monthly-report b{display:block;font-size:13px;color:#e2f5ee;margin-top:4px}.monthly-title{font-size:10px;color:#9cbdcc;letter-spacing:1px;margin-top:18px}
.build-item b{font-size:12px}.build-item small{font-size:11px;color:#a4becb}.build-item{min-height:80px}.build-item.recommended{border-color:#a4edc378;box-shadow:0 0 0 2px #a4edc324}.metric-head{font-size:14px}.metric-foot{font-size:12px;color:#9cb6c4}.selected-info p,.insight p,.loop-box p{font-size:13px;color:#b1c8d2}.panel-heading>p{font-size:13px;color:#a6bdc9}.text-button{font-size:13px;min-height:40px}.rail-btn small{font-size:12px}.icon-button{width:36px;height:36px}#next-month{background:#9ce8c0;color:#173c30;font-weight:700;min-height:40px;padding:9px 16px;border-radius:7px;font-size:14px}#next-month:hover{color:#173c30;background:#b5ffda}#pause{min-width:36px;min-height:36px}.map-actions button{width:42px;height:42px}.mission-card{pointer-events:auto}.mission-card button{font-size:12px;color:#a6efd0;padding:9px 0 0}.mission-card p{font-size:13px}.mission-card h3{font-size:16px}.guide-active .mission-card{display:none}.guide-active aside{border-left-color:#8fe5b343}#mobile-coach{display:none}.panel-close{display:none}.safety-choice{display:flex;flex-wrap:wrap;gap:8px}.safety-choice button{min-height:44px}
@media(max-width:1050px){.welcome-wrap{padding:26px 32px 22px}.welcome-copy{max-width:460px}#welcome h1{font-size:58px}.welcome-goal-grid article{padding:16px 13px}.welcome-goal-grid article .goal-symbol{display:none}.welcome-world-label{margin-right:0}.welcome-goal-grid{gap:10px}.welcome-brand small{font-size:9px}.welcome-hero{min-height:440px}}
@media(max-width:800px){.welcome-wrap{padding:24px 23px;gap:24px}#welcome{background:linear-gradient(90deg,#081b28f3,#081b28b8),linear-gradient(0deg,#081b28,transparent)}.welcome-brand small,.welcome-world-label{display:none}.welcome-hero{min-height:0}.welcome-copy{max-width:540px}#welcome h1{font-size:54px;margin-top:15px}.welcome-goal-grid{grid-template-columns:1fr}.welcome-goal-grid article{padding:14px;gap:14px}.welcome-goal-grid article .goal-symbol{display:block}.welcome-goals-heading{align-items:flex-start;flex-direction:column;gap:6px}.welcome-foot{flex-direction:column;gap:8px}.welcome-actions{width:100%}.start-primary{width:100%}#welcome .welcome-mission{font-size:14px}.welcome-kicker{font-size:9px}.pip-intro{margin:17px 0}
 #app{height:100dvh;min-height:640px}header{padding:0 10px;gap:8px}.brand small{display:none}.headline-stats{gap:10px}.headline-stats strong{font-size:16px}.headline-stats span{font-size:10px}.brand{font-size:11px}.brand-mark{font-size:23px}.icon-button{width:30px;height:34px}.rail{width:50px;gap:9px}.rail-btn{width:46px;height:54px}.rail-btn small{font-size:10px}.build-items{grid-template-columns:repeat(5,1fr);gap:3px}.build-item{min-height:55px;padding:4px 1px}.build-item b{font-size:10px}.build-item small{font-size:9px}.build-item .build-icon{height:18px;width:18px}.build-tray{padding:9px 6px;left:7px;right:7px;bottom:8px}.tray-heading{font-size:10px}.map-actions{right:9px;bottom:193px}.map-actions button{width:37px;height:37px}.map-caption{bottom:180px}.future-controls{top:85px;left:12px;gap:0;padding:4px}.future-controls button{font-size:10px;padding:7px}.location h1{font-size:23px}.location p{font-size:10px}.world-top{left:12px;top:19px}.view-switch button{font-size:9px}.mission-card{top:140px;left:12px;width:200px;padding:11px}.mission-card p{font-size:11px}.mission-card h3{font-size:14px}.mission-card .progress{margin-top:7px}.mission-card button{font-size:11px}.mission-card .mission-number{display:none}#focus-caption{top:140px;left:12px;width:200px;padding:11px}
 #mobile-coach:not([hidden]){display:flex;position:absolute;top:134px;left:10px;right:10px;z-index:3;align-items:center;gap:9px;padding:10px 12px;background:#193e35ed;border:1px solid #a0edc477;border-radius:9px;color:#ebfff4;text-align:left}#mobile-coach .pip-avatar{width:31px;height:31px}#mobile-coach b{font-size:12px;display:block}#mobile-coach small{font-size:10px;display:block;margin-top:4px;color:#b5dcc9}#mobile-coach>span:last-child{margin-left:auto;font-size:19px}aside{top:72px;bottom:58px;width:min(330px,calc(100vw - 20px));padding:20px;z-index:9}.panel-close{display:block;float:right;font-size:14px;min-height:40px;color:#a6e9c5;padding:0 0 5px 10px}.coach{padding:14px}.coach h3{font-size:17px}.panel-heading>p{margin-bottom:15px}footer{height:58px;padding:0 8px;gap:5px}#time-label{font-size:10px;max-width:79px;line-height:1.3;margin-left:2px}.speed{padding:6px 3px;font-size:10px}#next-month{font-size:12px;padding:8px 10px;white-space:nowrap}#next-month span{margin-left:4px}.toast{bottom:186px;padding:10px 12px;font-size:12px;max-width:95%}dialog{padding:24px}dialog h2{font-size:25px}
}

@media(min-width:801px) and (max-height:850px){
.welcome-wrap{padding:22px 42px 18px;gap:17px}.welcome-hero{padding:0;min-height:0}.welcome-copy{max-width:520px}#welcome h1{font-size:54px;margin:13px 0 12px}.welcome-kicker{font-size:9px}#welcome .welcome-lead{font-size:16px;max-width:500px;margin-bottom:9px}#welcome .welcome-mission{font-size:13px;max-width:405px}.pip-intro{margin:12px 0;gap:10px}.pip-avatar{width:41px;height:41px}#welcome .pip-intro p{font-size:12px}.start-primary{font-size:15px;min-height:46px;padding:12px 20px}.start-secondary{min-height:31px;padding:8px 0;font-size:11px}.welcome-actions{gap:1px}#welcome .welcome-small{font-size:10px}.welcome-goal-grid article{padding:14px}.welcome-goals-heading{margin-bottom:10px}.welcome-world-label{margin-bottom:12px}.welcome-foot{font-size:9px}
}

@media(max-width:800px) and (max-height:700px){.map-actions{bottom:170px}}
button:disabled{cursor:default;opacity:.45}

.rail-btn.save-failed{color:#ffd29c;background:#a54c3529;border:1px solid #ffd29c77}
