/* Scout Adventure: phone-first layout. The farm's own side panels are hidden; the game has a mission bar and one card. */
.scout-mode #bar,.scout-mode #edit,.scout-mode #walkbar,.scout-mode #sndhint{display:none!important}
#sccard{position:fixed;z-index:30;left:max(10px,env(safe-area-inset-left,0px));top:calc(10px + env(safe-area-inset-top,0px));width:min(400px,calc(100vw - 20px));max-height:46vh;overflow:auto;background:rgba(22,30,24,.92);color:#f4f1e6;border:1px solid rgba(242,194,48,.55);border-radius:14px;padding:12px 14px;font:15px/1.4 Inter,system-ui,sans-serif;box-shadow:0 8px 28px rgba(0,0,0,.35);-webkit-overflow-scrolling:touch}
#sccard h2{margin:0 0 4px;font:600 18px/1.2 "Space Grotesk",Inter,system-ui,sans-serif;color:#f2c230;text-wrap:balance}
#sccard p{margin:6px 0}
#sccard .scsmall{font-size:13px;opacity:.85}
#sccard .scrow{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
#sccard ul{margin:6px 0;padding-left:20px}
#sccard li{margin:3px 0}
#sccard input{font:inherit;min-height:44px;padding:6px 10px;border-radius:10px;border:1px solid #6c7a5f;background:#0f1611;color:#f4f1e6;width:100%;box-sizing:border-box}
.scbtn{min-height:44px;padding:8px 14px;border-radius:12px;border:1px solid #6c7a5f;background:#27362b;color:#f4f1e6;font:600 15px Inter,system-ui,sans-serif;cursor:pointer;touch-action:manipulation}
.scbtn.go{background:#f2c230;border-color:#f2c230;color:#1c1a0c}
.scbtn.big{min-height:64px;font-size:20px;flex:1 1 100%}
.scbtn:active{transform:scale(.97)}
#scbar{position:fixed;z-index:30;left:0;right:0;bottom:0;display:flex;gap:8px;overflow-x:auto;padding:8px max(10px,env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));background:linear-gradient(to top,rgba(10,14,11,.85),rgba(10,14,11,0));-webkit-overflow-scrolling:touch;scrollbar-width:none}
#scbar::-webkit-scrollbar{display:none}
#scbar{display:grid;grid-template-columns:repeat(6,max-content);justify-content:safe center;gap:6px 8px}
#scbar .scbtn{white-space:nowrap}
#scbar .scbtn.done{border-color:#f2c230}
#scbar .scbtn.cur{background:#f2c230;color:#1c1a0c;border-color:#f2c230}
#sctop{position:fixed;z-index:30;right:max(10px,env(safe-area-inset-right,0px));top:calc(10px + env(safe-area-inset-top,0px));display:flex;flex-direction:column;gap:8px}
#sctop .scbtn{min-width:44px;padding:6px 10px;background:rgba(22,30,24,.9);font-size:13px}
.scout-mode #north{top:auto;bottom:calc(118px + env(safe-area-inset-bottom,0px));left:max(10px,env(safe-area-inset-left,0px));right:auto}
.scout-mode #toast{bottom:calc(118px + env(safe-area-inset-bottom,0px));top:auto}
@media (max-width:760px){#sccard{font-size:14px;max-height:40vh}#sccard h2{font-size:16px}#sctop{top:auto;bottom:calc(74px + env(safe-area-inset-bottom,0px))}}
@media (orientation:landscape) and (max-height:480px){#sccard{max-height:62vh;width:min(340px,46vw)}}
/* badges: one per mission, grey until earned. Five across so all ten fit the card without scrolling. */
.scbadges{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-top:10px}
.scbadge{display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px;padding:6px 2px;border-radius:10px;border:1px solid #4a5646;background:#1b251e;opacity:.5;filter:grayscale(1)}
.scbadge.got{opacity:1;filter:none;border-color:#f2c230;background:#27362b}
.scbadgeicon{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;border:3px solid #6c7a5f;background:#0f1611;font-size:19px;line-height:1}
.scbadge.got .scbadgeicon{border-color:#f2c230;box-shadow:0 0 0 2px rgba(242,194,48,.25)}
.scbadgename{font:600 11px/1.15 Inter,system-ui,sans-serif;overflow-wrap:anywhere}
/* tokens and energy: the pill above the top buttons, and the shop shelves */
#schud{border-color:#f2c230;color:#f2c230;white-space:nowrap}
#schud.low{border-color:#e2573b;color:#ffb4a2}
#schud.flash{animation:schudflash .7s ease-out}
@keyframes schudflash{0%{background:#f2c230;color:#1c1a0c;transform:scale(1.08)}100%{transform:scale(1)}}
#sccard .scitem{flex:1 1 100%;display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:2px}
#sccard .scitemnote{font-weight:400;font-size:12px;opacity:.8}
#sccard .scitem.cant{opacity:.55}
/* walking: the Scout chooser, the touch stick, and the Use button */
.scavatars{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px}
.scavatar{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 2px;font-size:12px}
.scavatar.cur{border-color:#f2c230;background:#3a4a2c}
.scavataricon{font-size:26px;line-height:1.1}
#scwstick{display:none;position:fixed;z-index:28;left:max(16px,env(safe-area-inset-left,0px));bottom:calc(172px + env(safe-area-inset-bottom,0px));width:112px;height:112px;border-radius:50%;background:rgba(22,30,24,.45);border:2px solid rgba(242,194,48,.6);touch-action:none}
#scwnub{position:absolute;left:50%;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:rgba(242,194,48,.85);pointer-events:none}
@media (pointer:coarse){.scw-on #scwstick{display:block;left:calc(50% - 80px)}.scw-on #scwuse{bottom:calc(296px + env(safe-area-inset-bottom,0px))}}
#scwuse{position:fixed;z-index:29;left:50%;transform:translateX(-50%);bottom:calc(168px + env(safe-area-inset-bottom,0px));white-space:nowrap}
/* the bear: how far away it is, and the Bear Spray button */
#scbear{position:fixed;z-index:40;left:50%;transform:translateX(-50%);top:22vh;max-width:calc(100vw - 24px);min-height:64px;padding:14px 26px;border:3px solid #ff5a36;border-radius:16px;background:#b3261e;color:#fff;font:700 22px/1.2 Inter,system-ui,sans-serif;text-align:center;box-shadow:0 0 0 6px rgba(255,90,54,.35),0 10px 30px rgba(0,0,0,.5);animation:scbearpulse .8s ease-in-out infinite alternate}
#scbear[hidden]{display:none}
@keyframes scbearpulse{from{box-shadow:0 0 0 4px rgba(255,90,54,.3),0 10px 30px rgba(0,0,0,.5)}to{box-shadow:0 0 0 14px rgba(255,90,54,.55),0 10px 30px rgba(0,0,0,.5)}}
#scbear.go{background:#f2c230;border-color:#fff;color:#1c1a0c}
/* fishing: what is happening, the tension bar with its safe zone, and the one big button */
#scfish,#scrange{position:fixed;z-index:29;left:50%;transform:translateX(-50%);bottom:calc(114px + env(safe-area-inset-bottom,0px));width:min(420px,calc(100vw - 24px));display:flex;flex-direction:column;gap:6px;align-items:stretch}
#scfish[hidden],#scrange[hidden]{display:none}
.scfsay{background:rgba(22,30,24,.9);color:#f4f1e6;border-radius:10px;padding:6px 10px;font:600 14px/1.3 Inter,system-ui,sans-serif;text-align:center}
.scfbar{position:relative;height:16px;border-radius:8px;background:rgba(10,14,11,.85);border:1px solid #6c7a5f;overflow:hidden}
.scfsafe{position:absolute;left:0;top:0;bottom:0;width:80%;border-right:2px solid #e2573b}
.scffill{position:absolute;left:0;top:0;bottom:0;width:0;background:#5fb35f}
.scffill.warn{background:#f2c230}.scffill.bad{background:#e2573b}.scffill.pow{background:#6fb7e8}
#scfishbtn,#scrangebtn{touch-action:none;user-select:none;-webkit-user-select:none;min-height:58px}
/* the small close button on the Welcome card */
#sccard .scclose,#sccard .schide{float:right;margin:-4px -6px 0 8px;width:36px;height:36px;border-radius:50%;border:1px solid #6c7a5f;background:#27362b;color:#f4f1e6;font:600 22px/1 Inter,system-ui,sans-serif;cursor:pointer}
/* the ranges: a cross at the centre of the screen marks the aim */
#scrcross{position:fixed;z-index:27;left:50%;top:50%;width:26px;height:26px;margin:-13px 0 0 -13px;pointer-events:none;background:linear-gradient(#f2c230,#f2c230) 50% 50%/2px 100% no-repeat,linear-gradient(#f2c230,#f2c230) 50% 50%/100% 2px no-repeat;filter:drop-shadow(0 0 2px #000)}
#scrcross[hidden]{display:none}
/* a card never reaches down over the mission bar, however short the screen */
#sccard{max-height:min(46vh,calc(100vh - 96px));max-height:min(46vh,calc(100dvh - 140px))}
@media (max-width:760px){#sccard{max-height:min(40vh,calc(100dvh - 140px))}}
@media (orientation:landscape) and (max-height:480px){#sccard{max-height:min(62vh,calc(100dvh - 140px))}}
/* the Menu button that stands where a put-away card was */
#scmenu{position:fixed;z-index:30;left:max(10px,env(safe-area-inset-left,0px));top:calc(10px + env(safe-area-inset-top,0px))}
#scmenu[hidden]{display:none}

#scgames{display:none}
@media (max-width:980px){
#scgames{display:block;position:fixed;z-index:33;left:max(10px,env(safe-area-inset-left,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px));background:#f2c230;color:#1c1a0c;border-color:#f2c230;font-weight:700}
#scbar{display:none}
.scgames-open #scbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));justify-content:stretch;gap:8px;bottom:calc(54px + env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 190px);overflow-y:auto;background:rgba(10,14,11,.94);padding:10px;z-index:32}
.scgames-open #scbar .scbtn{white-space:normal}
#sctop{top:auto;left:auto;right:max(10px,env(safe-area-inset-right,0px));bottom:calc(8px + env(safe-area-inset-bottom,0px));flex-direction:row}
#sctop>*:not(#schud){display:none}
.scgames-open #sctop{top:calc(8px + env(safe-area-inset-top,0px));bottom:auto;left:0;right:0;flex-wrap:wrap;justify-content:center;gap:8px;padding:10px;background:rgba(10,14,11,.94);z-index:32}
.scgames-open #sctop>*:not(#schud){display:block}
#sccard{max-height:34vh}
#scfish,#scrange{bottom:calc(60px + env(safe-area-inset-bottom,0px))}
#scwstick{bottom:calc(70px + env(safe-area-inset-bottom,0px))}
body:has(#scfish:not([hidden])) #scwstick,body:has(#scrange:not([hidden])) #scwstick{bottom:calc(196px + env(safe-area-inset-bottom,0px))}
.scw-on #scwuse,#scwuse{bottom:calc(196px + env(safe-area-inset-bottom,0px))}
body:has(#scfish:not([hidden])) #scwuse{bottom:calc(322px + env(safe-area-inset-bottom,0px))}
.scout-mode #north{bottom:calc(60px + env(safe-area-inset-bottom,0px))}
.scout-mode #toast{top:auto;bottom:calc(330px + env(safe-area-inset-bottom,0px))}
#sccard{max-height:28vh;width:auto;right:auto;max-width:min(330px,calc(100vw - 20px));padding:8px 10px;font-size:12.5px;line-height:1.3;border-radius:12px}
#sccard h2{font-size:14px;margin-bottom:2px}
#sccard p{margin:4px 0}
.scbtn{min-height:36px;padding:5px 10px;font-size:13px;border-radius:10px}
#sccard .scclose,#sccard .schide{width:30px;height:30px;font-size:18px;margin:-2px -4px 0 6px}
.scavatars{gap:4px;margin-top:6px}
.scavatar{padding:3px 2px;font-size:11px;min-height:0}
.scavataricon{font-size:20px}
#scfish,#scrange{width:min(300px,calc(100vw - 24px));gap:4px}
.scfsay{font-size:12px;padding:4px 8px}
.scfbar{height:12px}
#scfishbtn,#scrangebtn{min-height:46px}
#scwstick{width:96px;height:96px;left:calc(50% - 48px)!important}
body:has(#scfish:not([hidden])) #scwstick,body:has(#scrange:not([hidden])) #scwstick{bottom:calc(176px + env(safe-area-inset-bottom,0px))}
.scw-on #scwuse,#scwuse{bottom:calc(176px + env(safe-area-inset-bottom,0px))}
body:has(#scfish:not([hidden])) #scwuse{bottom:calc(282px + env(safe-area-inset-bottom,0px))}
.scgames-open #scbar{grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:6px;bottom:calc(48px + env(safe-area-inset-bottom,0px))}
#scmenu{min-height:34px}
.scout-mode #toast{font-size:12px;bottom:calc(290px + env(safe-area-inset-bottom,0px))}
body:has(#scfish:not([hidden])) #north,body:has(#scrange:not([hidden])) #north{display:none}
}
.scfhand{display:flex;gap:8px}.scfhand[hidden]{display:none}.scfhand .scbtn{flex:1;min-height:46px}
