/* One control row, one optional hint. Secondary tools live in a paused menu. */
.hud{--controls-bottom:calc(30px + var(--safe-bottom))}
.dock{bottom:var(--controls-bottom);gap:12px;align-items:center}
.dock-button{position:static!important;width:52px;min-width:52px;height:52px;border-radius:16px;font-size:10px}
.dock-button.build,.dock-button.chat{left:auto;right:auto}
.mic{width:76px;height:76px;border-radius:27px}
.mic-caption{top:84px;font-size:10px}
.talk{left:50%;right:auto;transform:translateX(-50%);bottom:calc(142px + var(--safe-bottom));width:min(400px,calc(100% - 32px));max-width:400px;max-height:calc(100dvh - 330px);overflow:auto;touch-action:pan-y;padding:10px 14px;box-shadow:0 3px 0 #a8bc9c}
.talk-head{min-height:28px;margin:0 0 2px}
#replayHint{margin:0 0 0 auto!important;width:44px;height:44px;flex-shrink:0}
#dismissTalk{width:44px;height:44px;flex-shrink:0;background:transparent;color:#6d8e79;font-size:24px;border-radius:12px}
.talk-actions button{min-height:44px}
.talk.compact{visibility:hidden}
.joystick{left:24px;bottom:calc(31px + var(--safe-bottom));width:96px;height:96px}
.stick{width:42px;height:42px;left:25px;top:25px}
.action-wrap{right:24px;bottom:calc(28px + var(--safe-bottom))}
.action{width:80px;height:80px}
.action-note{max-width:140px;font-size:10px}
.brand small{display:none}
.brand strong{font-size:16px}.brand svg{width:32px;height:32px}
.objective{max-width:315px;padding:9px 12px}
.objective b{font-size:14px}.objective small{font-size:11px}
.floating-label{top:44%;font-size:11px;padding:5px 9px}
.tool-menu{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}
.tool-menu>button{position:static!important;transform:none;width:auto;min-height:110px;border:2px solid #d7dfbd;border-radius:18px;background:#eaf0d9;padding:18px 12px;box-shadow:none;font-size:16px;font-weight:850;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:8px;text-align:left}
.tool-menu>button:first-child{background:#ffdc94;border-color:#edc67b}
.tool-menu small{font-size:11px;font-weight:650;line-height:1.6;color:#537361}.tool-menu svg{width:25px;height:25px}
.placing .dock{bottom:calc(22px + var(--safe-bottom))}
@media(max-width:700px) and (min-height:521px){
 .top{left:14px;right:14px;top:calc(12px + var(--safe-top));gap:8px}.brand{margin-right:auto}.brand strong{font-size:13px}.brand svg{width:27px;height:27px}.day-chip{padding:7px 9px;font-size:11px}.day-chip svg{width:21px;height:21px}.round{width:44px;height:44px}
 .resources{left:14px;top:calc(70px + var(--safe-top))}.resource{padding:5px 8px;min-width:50px;font-size:13px}.resource small{display:none}.resource svg{width:19px;height:19px}
 .objective{left:14px;right:14px;top:calc(112px + var(--safe-top));max-width:none;padding:7px 10px}.objective b{font-size:13px}.objective small{font-size:10px}
 .fire-health{right:14px;top:calc(183px + var(--safe-top));width:108px}.hud.night .objective{max-width:245px}
 .dock{bottom:calc(34px + var(--safe-bottom));gap:0}.mic{width:68px;height:68px}.mic-caption{top:77px;font-size:9px}
 .dock-button{position:absolute!important;bottom:94px;width:48px;min-width:48px;height:44px;border-radius:13px;font-size:9px}.dock-button.build{left:-38px}.dock-button.chat{right:-38px}
 .joystick{left:18px;bottom:calc(33px + var(--safe-bottom));width:86px;height:86px}.stick{left:20px;top:20px}.action-wrap{right:18px;bottom:calc(30px + var(--safe-bottom))}.action{width:72px;height:72px;font-size:11px}.action-note{max-width:108px;font-size:9px}
 .talk{bottom:calc(184px + var(--safe-bottom));max-height:calc(100dvh - 385px);width:calc(100% - 28px);padding:7px 11px}.talk p{font-size:12px}.talk-head{font-size:9px}.talk-actions{margin-top:5px}
 .quick-build{bottom:calc(127px + var(--safe-bottom))}
}
@media(max-height:520px){
 .top{top:calc(8px + var(--safe-top));left:16px;right:16px;gap:8px}.brand{margin-right:auto}.brand strong{font-size:13px}.brand svg{width:26px;height:26px}.day-chip{padding:5px 9px;font-size:11px;min-height:44px}.day-chip svg{width:21px;height:21px}.round{width:44px;height:44px;border-radius:14px}
 .resources{top:60px;left:16px;gap:5px}.resource{min-width:44px;padding:4px 7px;font-size:12px}.resource svg{width:18px;height:18px}.resource small{display:none}
 .objective{top:101px;left:16px;right:auto;width:235px;max-width:calc(46% - 16px);padding:6px 9px}.objective b{font-size:12px}.objective small{font-size:10px}.objective>span{display:none}
 .fire-health{right:16px;top:61px;width:108px;padding:5px 8px}.paused-label{top:96px;right:16px;font-size:9px}
 .dock{bottom:calc(24px + var(--safe-bottom));gap:10px}.dock-button{position:static!important;width:48px;min-width:48px;height:48px;font-size:9px}.mic{width:64px;height:64px;border-radius:22px}.mic-caption{top:70px;font-size:9px}
 .joystick{left:18px;bottom:calc(25px + var(--safe-bottom));width:82px;height:82px}.stick{left:18px;top:18px}.action-wrap{right:18px;bottom:calc(23px + var(--safe-bottom))}.action{width:70px;height:70px;border-radius:24px;font-size:11px}.action-note{font-size:9px;max-width:120px;margin-top:5px}
 .talk{left:auto;right:16px;transform:none;bottom:calc(126px + var(--safe-bottom));width:min(310px,43%);max-height:calc(100dvh - 230px);padding:5px 10px;border-radius:15px}.talk-head{font-size:9px}.talk p{font-size:11px;line-height:1.5}.talk-actions{margin-top:4px}.talk-actions button{font-size:10px;padding:5px 9px}
 .floating-label{top:49%;font-size:10px}.tool-menu{margin-top:12px;gap:9px}.tool-menu>button{min-height:86px;padding:12px;font-size:14px}
 .hud.boss-fight .objective{display:none}.hud.boss-fight .incoming{top:108px;left:16px;transform:none;max-width:42%;font-size:10px}.world-health.boss-health{top:100px!important;left:16px!important;transform:none;width:220px}
}
@media(max-height:380px){.objective small{display:none}.talk{bottom:116px;max-height:calc(100dvh - 213px);padding-right:46px}.talk-head{display:contents;font-size:0}.talk-head i,#replayHint{display:none}.talk #dismissTalk{display:block;position:absolute;right:1px;top:1px}.heard{display:none}.tool-menu>button{min-height:75px}.tool-menu svg{display:none}.floating-label{display:none}}

/* The first day keeps one clear action on the objective card. */
.first-steps .fire-health,.guided-day .fire-health{display:none}
.first-steps .objective,.guided-day .objective{background:#285a4bdc;box-shadow:0 4px 0 #173e33,0 10px 24px #183f2a28}
.first-steps .objective>div,.guided-day .objective>div{flex:1;min-width:0}
.first-steps #objectiveAction,.guided-day #objectiveAction{display:block;width:100%;max-width:240px;min-height:48px;margin-top:9px;background:#ffd275;box-shadow:0 3px 0 #c99340;font-size:14px;text-align:center}
.first-steps #objectiveAction[hidden],.guided-day #objectiveAction[hidden]{display:none}
@media(max-width:700px){.first-steps .objective,.guided-day .objective{max-width:none}.first-steps #objectiveAction,.guided-day #objectiveAction{max-width:none}}
@media(max-height:520px){.first-steps .objective,.guided-day .objective{width:250px;max-width:42%;top:101px}.first-steps #objectiveAction,.guided-day #objectiveAction{min-height:44px;font-size:12px}}

.resource-pin{position:absolute;z-index:3;transform:translate(-50%,-125%);padding:7px 12px;border:2px solid #fff9df;border-radius:14px;background:#ffd476;color:#274c3c;font-size:13px;font-weight:950;white-space:nowrap;box-shadow:0 4px 0 #b8893d,0 0 0 6px #ffe6a077;pointer-events:none}
.resource-pin:after{content:'';position:absolute;left:50%;top:100%;width:11px;height:11px;background:#ffd476;border-right:2px solid #fff9df;border-bottom:2px solid #fff9df;transform:translate(-50%,-3px) rotate(45deg)}
.collecting .joystick{border-color:#ffdf8d;box-shadow:0 0 0 5px #ffd47655,inset 0 2px 15px #254a4212}
.collecting .action{box-shadow:0 4px 0 #255342,0 0 0 5px #ffd47666}
@media(max-width:700px){.resource-pin{font-size:12px;padding:6px 10px}}
.task-progress{height:7px;margin-top:7px;border-radius:10px;background:#163e3488;overflow:hidden}
.task-progress i{display:block;height:100%;width:0;background:#ffd476;border-radius:10px;transition:width .12s linear}
.auto-guide .objective{outline:3px solid #ffe199;outline-offset:2px}
.lesson-lead{font-size:16px;font-weight:800;line-height:1.55;color:#275747}
.lesson-info{margin:12px 0;padding:13px 15px;border:2px solid #d9e5bd;border-radius:17px;background:#f1f5e5;color:#315b47}
.lesson-info>b{display:block;margin-bottom:7px;font-size:15px}
.lesson-info p{margin:7px 0;line-height:1.55}
@media(max-width:700px){.lesson-lead{font-size:14px}.lesson-info{padding:10px 12px}.lesson-info>b{font-size:14px}.lesson-info p{font-size:12px}}
@media(max-width:700px) and (min-height:521px){.hud:not(.night):not(.first-steps) .fire-health{top:calc(251px + var(--safe-top))}}
@media(max-height:380px){.guided-day .objective small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:9px;line-height:1.35}}
