.social-section{border:1px solid #bacaad40;padding:12px;margin:14px 0;border-radius:10px}.social-section p{font-size:13px;line-height:1.6}.social-input,.friend-row{display:flex;gap:8px;align-items:center;margin:8px 0}.social-input input{flex:1;min-width:0;padding:10px;border:1px solid #bacaad50;background:#172c21;color:#f0efd7;border-radius:5px;font:inherit}.friend-row span,.friend-row strong{flex:1;overflow-wrap:anywhere}.social-section button{padding:9px 12px;border:1px solid #bacaad60;border-radius:6px;background:#2d4b36;color:#f2efd4;font:inherit;cursor:pointer}.social-section button:disabled{opacity:.45;cursor:default}.friend-row button,.social-input button{flex-shrink:0;min-height:42px}.social-section .friend-join{font-size:26px;min-width:44px}.player-identity{color:#dce7c9;font-size:14px;margin:8px 0}#social-message{min-height:20px;color:#e3d394}#maintenance-panel{flex-wrap:wrap;gap:8px}#maintenance-item{min-width:0;max-width:100%;flex:1;padding:10px;background:#183023;color:#f2ecd4}
/* Touch controls are always available, including in desktop preview windows. */
#settings-button{display:flex;align-items:center;gap:6px;white-space:nowrap}
.top-actions #settings-button .settings-label{display:inline}
#settings .settings-card{width:min(640px,100%);max-height:calc(100dvh - 32px);padding:0;display:flex;flex-direction:column;overflow:hidden}
.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 26px 16px;border-bottom:1px solid #b5c7973b;flex-shrink:0}
.settings-heading h2{margin:4px 0 0;font-size:26px}.settings-heading .quiet{min-width:80px;white-space:nowrap}
.settings-body{overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:0 26px 24px;scrollbar-color:#748e65 #12271f}
.settings-body .settings-note{font-size:12px;line-height:1.8;color:#b9c9b3;margin:16px 0 4px}
.settings-body .setting{gap:14px;min-height:58px}.settings-body .setting select{min-height:44px}.settings-body .setting input{min-height:44px;max-width:48%}
.settings-body h3{font-size:19px;font-weight:500;letter-spacing:2px;margin:26px 0 12px}
.game-help details{border-top:1px solid #b5c79730;padding:0 2px}.game-help summary{min-height:48px;padding:14px 0;cursor:pointer;font-size:14px;color:#e1e9cc;touch-action:manipulation}
.game-help p{font-size:13px;line-height:1.9;color:#b9c9b3;margin:0 0 14px}.game-help strong{color:#e6e8c8}.game-help .winter-rule{padding:12px;background:#bddce90b;border-left:2px solid #bddce9;color:#c6dce1}
@media(max-width:600px){
 .touch-mode .top-actions{gap:4px}.touch-mode .top-actions .quiet{min-height:44px;padding:8px 10px;font-size:11px;letter-spacing:0}
 .touch-mode #settings{padding:12px}.settings-heading{padding:16px 18px 12px}.settings-body{padding:0 18px 20px}.settings-heading .eyebrow{font-size:9px}
}
body.touch-mode{overscroll-behavior:none;user-select:none;-webkit-user-select:none}
.touch-mode button{touch-action:manipulation;min-height:44px}
.touch-mode #hud kbd,.touch-mode .controls{display:none}
.game-active #hud .glass,.game-active .masthead .quiet{backdrop-filter:none;-webkit-backdrop-filter:none}
#look-zone{position:absolute;inset:0;pointer-events:auto;touch-action:none;cursor:grab}
#look-zone:active{cursor:grabbing}
#look-zone>span{position:absolute;left:50%;bottom:160px;transform:translateX(-50%);font-size:10px;letter-spacing:1px;color:#e1e6ca9c;text-shadow:0 1px 5px #000;white-space:nowrap;pointer-events:none}
.touch-mode .touch-controls{display:flex;flex-direction:column;align-items:center;position:absolute;left:max(28px,env(safe-area-inset-left));bottom:max(35px,env(safe-area-inset-bottom));right:auto;pointer-events:none;width:120px;gap:10px}
.touch-mode #joystick{width:120px;height:120px;border-radius:50%;border:1px solid #d7e8b96b;background:radial-gradient(circle,#1d3b2b70,#10271b9e);display:flex;align-items:center;justify-content:center;pointer-events:auto;touch-action:none;box-shadow:inset 0 0 25px #0002;cursor:move}
.touch-mode #stick{width:48px;height:48px;border-radius:50%;border:1px solid #f1f2d5ab;background:#d5e3b985;pointer-events:none;box-shadow:0 2px 15px #0003}
.touch-mode .touch-controls>span{position:static;display:block;color:#d5e3bdbe;text-align:center;font-size:10px;letter-spacing:3px}
.movement-actions{position:absolute;bottom:190px;left:max(26px,env(safe-area-inset-left));display:flex;gap:8px;pointer-events:auto}
.movement-actions button{border-radius:24px;padding:11px 18px;font-size:11px}
.movement-actions button[aria-pressed=true]{color:#183426;background:#d9e6b4;border-color:#e8efcb}
.touch-mode .health-panel{left:26px;bottom:252px;width:220px;padding:14px 16px}
.touch-mode .quickbar{bottom:32px}
.touch-mode .combat-actions{right:max(28px,env(safe-area-inset-right));bottom:max(42px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:12px;pointer-events:auto}
.touch-mode #attack-button{width:88px;height:88px;min-width:0;padding:12px;border-radius:50%;text-align:center;display:block;font-size:12px;border-color:#d9d6a77d;background:#203c2ee6}
.touch-mode #quick-heal{width:76px;min-width:0;min-height:60px;text-align:center;padding:12px 8px;border-radius:28px;display:block;font-size:11px}
.touch-mode #interact{left:auto;top:auto;right:28px;bottom:184px;transform:none;padding:13px 17px;min-width:168px;max-width:260px;min-height:48px;font-size:11px;text-align:center;white-space:normal}
.touch-mode .survival-actions{top:190px;right:28px;display:flex;gap:8px}
.touch-mode .survival-actions button{font-size:11px;min-height:44px;padding:12px;border-radius:5px;justify-content:center}
.touch-mode .map-toggle{right:28px;top:246px;bottom:auto;padding:12px 16px;min-width:130px;justify-content:center}
.touch-mode #map-panel{top:92px;bottom:auto;right:26px;max-height:calc(100vh - 130px);overflow:auto}
#placement-actions{position:absolute;bottom:244px;right:28px;display:flex;gap:8px;pointer-events:auto}
#placement-actions button{font-size:11px;border-radius:4px;min-width:80px;padding:11px 16px}
.touch-mode #placement-hint{top:auto;bottom:300px;left:50%;max-width:350px;width:max-content;white-space:normal;text-align:center;font-size:11px}
.touch-mode #toast{bottom:190px;max-width:360px;width:auto;z-index:5;pointer-events:none}
.touch-mode .craft-tabs button{min-height:44px}.touch-mode .recipe-actions button{min-height:44px}
@media(max-width:760px){
  .touch-mode .mission{top:90px;left:18px;width:220px;padding:13px 16px}.touch-mode .mission h2{font-size:15px;margin:8px 0}.touch-mode .mission small{display:none}.touch-mode #progress-dots{margin-top:10px}
  .touch-mode .location{top:130px;right:20px}.touch-mode .survival-actions{top:205px;right:20px;display:grid}.touch-mode .survival-actions button{min-width:105px}.touch-mode .map-toggle{top:315px;right:20px;min-width:105px;padding:10px}
  .touch-mode .health-panel{bottom:242px;left:20px;width:178px;padding:12px}.touch-mode .movement-actions{bottom:186px;left:20px;gap:6px}.touch-mode .movement-actions button{padding:10px 14px;font-size:10px}
  .touch-mode .touch-controls{left:24px;bottom:50px;width:110px}.touch-mode #joystick{width:110px;height:110px}.touch-mode #stick{width:43px;height:43px}
  .touch-mode .quickbar{left:50%;bottom:12px;transform:translateX(-50%)}.touch-mode .quickbar button{min-width:74px;font-size:10px;padding:8px}.touch-mode .quickbar small{margin-top:4px}
  .touch-mode .combat-actions{right:20px;bottom:67px;gap:10px}.touch-mode #attack-button{width:80px;height:80px}.touch-mode #quick-heal{width:68px;font-size:10px}
  .touch-mode #interact{right:20px;bottom:174px;min-width:158px;max-width:220px}.touch-mode #placement-actions{right:20px;bottom:234px}.touch-mode #placement-hint{bottom:294px;max-width:260px;width:70%}
  #look-zone>span{bottom:162px;left:46%;font-size:9px}.touch-mode #toast{bottom:355px;max-width:85%;width:320px;font-size:10px}.touch-mode #map-panel{top:85px;right:20px;max-height:calc(100vh - 110px)}
}
@media(max-width:460px){
  .touch-mode .masthead{padding:18px 14px}.touch-mode .brand{font-size:17px}.touch-mode .mission{top:80px;left:14px;width:195px;padding:12px}.touch-mode .mission h2{font-size:14px}.touch-mode .compass{top:88px;right:16px;gap:10px}.touch-mode .location{top:126px;right:14px;font-size:8px}.touch-mode .location small{font-size:7px}
  .touch-mode .survival-actions{top:200px;right:14px}.touch-mode .survival-actions button{min-width:92px;font-size:10px;padding:10px}.touch-mode .map-toggle{top:306px;right:14px;min-width:92px}.touch-mode .map-toggle span{font-size:10px}
  .touch-mode .health-panel{left:14px;bottom:252px;width:160px;padding:11px}.touch-mode .health-panel p{font-size:8px}.touch-mode .health-panel small{font-size:7px}.touch-mode .movement-actions{left:14px;bottom:196px}.touch-mode .movement-actions button{padding:10px 12px}
  .touch-mode .touch-controls{left:22px;bottom:61px}.touch-mode .combat-actions{right:14px;bottom:75px;flex-direction:column-reverse;gap:12px}.touch-mode #attack-button{width:78px;height:78px;font-size:11px}.touch-mode #quick-heal{min-height:46px;width:82px;padding:10px}
  .touch-mode #interact{right:14px;bottom:238px;min-width:128px;max-width:165px;font-size:10px;padding:10px}.touch-mode #placement-actions{right:14px;bottom:295px;gap:5px}.touch-mode #placement-actions button{min-width:62px;padding:10px}.touch-mode #placement-hint{bottom:354px;width:85%;font-size:10px}
  #look-zone>span{bottom:358px;left:50%;font-size:8px}.touch-mode #toast{bottom:395px;font-size:10px}.touch-mode .quickbar{gap:5px}.touch-mode .quickbar button{min-width:72px}
}
@media(max-height:550px) and (min-width:600px){
  .touch-mode .masthead{padding:12px 20px}.touch-mode .brand{font-size:16px}.touch-mode .brand small{font-size:6px}.touch-mode .quiet{min-height:40px;padding:8px 12px}.touch-mode .compass{top:20px;left:50%;right:auto;transform:translateX(-50%)}
  .touch-mode .mission{top:66px;left:20px;width:215px;padding:10px 13px}.touch-mode .mission h2,.touch-mode .mission small,.touch-mode #progress-dots{display:none}.touch-mode .mission p{font-size:9px;margin-top:6px}.touch-mode .location{display:none}
  .touch-mode .health-panel{left:20px;top:146px;bottom:auto;width:180px;padding:10px}.touch-mode .health-panel p,.touch-mode .health-panel small{display:none}.touch-mode .health-track{margin-top:7px}.touch-mode .health-title strong{font-size:14px}
  .touch-mode .touch-controls{left:25px;bottom:15px;width:100px;gap:4px}.touch-mode #joystick{width:100px;height:100px}.touch-mode #stick{width:40px;height:40px}.touch-mode .movement-actions{left:145px;bottom:30px;flex-direction:column;gap:6px}.touch-mode .movement-actions button{padding:9px 13px;font-size:10px}
  .touch-mode .survival-actions{top:66px;right:20px;display:flex;gap:8px}.touch-mode .survival-actions button{min-width:82px;padding:9px;font-size:10px}.touch-mode .map-toggle{top:120px;right:20px;min-width:172px}.touch-mode .quickbar{display:none}
  .touch-mode .combat-actions{right:20px;bottom:20px;flex-direction:row;gap:10px}.touch-mode #attack-button{width:74px;height:74px}.touch-mode #quick-heal{min-height:52px;width:76px}.touch-mode #interact{bottom:110px;right:20px;min-width:164px;max-width:210px;font-size:10px;padding:10px}
  .touch-mode #placement-actions{bottom:167px;right:20px}.touch-mode #placement-hint{bottom:222px;width:240px;max-width:32vw;font-size:9px}.touch-mode #toast{bottom:60px;width:30vw;font-size:10px;padding:9px}.touch-mode #map-panel{top:20px;right:210px;width:260px;max-height:calc(100vh - 40px)}.touch-mode #map{width:234px}
  #look-zone>span{bottom:24px;left:27%;font-size:9px}.touch-mode #threat{top:60px;max-width:30vw;font-size:10px}
}
/* Workshop progression and survival controls */
.hunger-title{margin-top:12px}.health-title.hunger-title strong{font-size:13px;color:#e0c28d}#hunger-fill{height:100%;width:100%;background:#c6a66c;transition:width .2s}#hunger-fill.low{background:#dc8865}.health-panel small{display:block;line-height:1.7}
.utility-actions{position:absolute;left:50%;bottom:110px;transform:translateX(-50%);display:flex;gap:8px;pointer-events:auto}.utility-actions button{padding:12px 16px;font-size:11px;border-radius:22px;min-width:80px}.utility-actions button[aria-pressed=true]{background:#d3dfae;color:#23362a}.utility-actions button:disabled{opacity:.45}
#fishing-panel{position:absolute;top:58%;left:50%;transform:translate(-50%,-50%);padding:16px 20px;width:290px;border-radius:6px;text-align:center;pointer-events:none}#fishing-panel strong{font-size:14px;color:#e1d7b7}#fishing-panel p{font-size:10px;line-height:1.6;color:#b6c6a8;margin:10px 0}.fishing-track{height:5px;background:#ffffff15;border-radius:4px;overflow:hidden}#fishing-fill{height:100%;background:#b3c698}#fishing-panel.bite{border-color:#d6bc79;background:#263c2af5}#fishing-panel.bite strong{color:#f5d38b}#fishing-panel.bite #fishing-fill{background:#e1bf74}
.workshop-upgrade{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(110deg,#344632,#213b2e);border:1px solid #acbd7e48;border-radius:5px;padding:14px 16px;margin-top:12px;flex-shrink:0}.workshop-upgrade strong{font-size:16px;color:#ebe5be;letter-spacing:1px}.workshop-upgrade p{font-size:11px;line-height:1.5;color:#c0c9aa;margin:7px 0}.workshop-upgrade small{font-size:10px;color:#d7bd88}.workshop-upgrade button{border:1px solid #d5cc9b70;background:#dbe3b4;color:#243829;border-radius:4px;min-width:110px;padding:12px;font-size:12px}.workshop-upgrade button:disabled{opacity:.45}.recipe-card.locked{background:#172c23;border-style:dashed}.berry-snack{grid-column:1/-1;border:1px solid #b6c59740;background:#344934;color:#e2e2b8;border-radius:4px;padding:12px;font-size:12px}.storage-actions{display:flex;gap:10px}.storage-actions .primary{font-size:12px;padding:12px}.craft-card #inventory-summary{font-size:11px;padding:10px 12px}.craft-card .craft-tabs{gap:6px;margin:12px 0}.craft-tabs button{padding:9px 6px;font-size:11px}.craft-tip{flex-shrink:0}
@media(max-width:760px){.utility-actions{bottom:90px;left:49%;flex-direction:column;gap:6px}.utility-actions button{padding:8px 10px;font-size:10px;min-width:76px}.workshop-upgrade{padding:12px;gap:10px}.workshop-upgrade strong{font-size:14px}.workshop-upgrade p{font-size:10px}.workshop-upgrade button{min-width:96px;font-size:11px;padding:8px}.craft-card{max-height:96dvh}.craft-card #recipe-list{min-height:100px}.craft-card #inventory-summary{max-height:64px;overflow-y:auto;font-size:10px}.craft-card #bench-status{font-size:10px;margin-bottom:8px}}
@media(max-width:460px){.utility-actions{left:52%;bottom:78px}.utility-actions button{min-width:75px}.workshop-upgrade{margin-top:8px}.workshop-upgrade strong{font-size:12px}.workshop-upgrade p{max-width:180px;font-size:9px}.workshop-upgrade small{font-size:9px}.workshop-upgrade button{min-width:87px}.craft-card .craft-tabs button{font-size:10px}.touch-mode .health-panel{width:160px}.touch-mode #fishing-panel{top:47%;width:265px}.craft-card .craft-tip{font-size:9px;margin-bottom:0}}
@media(max-height:550px) and (min-width:600px){.utility-actions{left:50%;bottom:18px;flex-direction:row;gap:5px}.utility-actions button{min-width:61px;padding:8px;font-size:10px}.touch-mode .health-panel{top:140px;width:180px}.hunger-title{margin-top:8px}.touch-mode #fishing-panel{top:50%;width:230px;padding:12px}.craft-card{max-height:96dvh;padding:14px 20px}.craft-card .craft-heading h2{font-size:18px;margin:3px 0}.craft-card .craft-heading .eyebrow{display:none}.craft-card #inventory-summary{max-height:37px;padding:5px 10px;font-size:9px}.workshop-upgrade{padding:8px 12px;margin-top:6px}.workshop-upgrade strong{font-size:13px}.workshop-upgrade p{margin:3px 0;font-size:9px}.workshop-upgrade small{font-size:9px}.craft-card .craft-tabs{margin:7px 0}.craft-card .craft-tabs button{padding:5px;min-height:36px}.craft-card #recipe-list{min-height:75px}.craft-card .craft-tip{display:none}}
.craft-card #inventory-summary{flex-shrink:0;scrollbar-width:thin;scrollbar-color:#748e65 #12271f}
@media(max-height:550px) and (min-width:600px){#look-zone>span{bottom:78px;left:31%}}
/* Day/night status and shelter interactions reuse the existing lightweight HUD. */
#day-cycle{position:absolute;top:74px;left:50%;transform:translateX(-50%);padding:10px 16px;min-width:230px;border-radius:6px;text-align:center;pointer-events:none}
#day-cycle strong{display:block;font-size:12px;font-weight:500;letter-spacing:1px;color:#ecdfb8}#day-cycle small{display:block;margin-top:6px;font-size:9px;color:#b7c4a9}#day-cycle.night{background:#142838e8;border-color:#809ec26b}#day-cycle.night strong{color:#c4d9f5}#day-cycle.night small{color:#e1bb9a}
.touch-mode #threat{top:146px}
#rest-house{position:absolute;left:50%;bottom:250px;transform:translateX(-50%);padding:12px 18px;font-size:11px;border-radius:24px;pointer-events:auto;min-width:172px}
#rest-house[aria-pressed=true]{background:#d3dfae;color:#23362a}#rest-house:disabled{opacity:.6}
.bed-card .primary{width:100%}.bed-card .primary:disabled{opacity:.4;cursor:default}.bed-secondary{display:block;width:100%;padding:15px;margin-top:12px;border:1px solid #b8cba34d;border-radius:4px;background:#233e30;color:#dce5cb}.bed-card #bed-status{color:#d8cb9f}.bed-card #bed-detail{font-size:13px;line-height:1.8}
@media(max-width:760px){#day-cycle{left:18px;top:220px;transform:none;min-width:0;width:190px;padding:10px 8px}#day-cycle strong{font-size:11px;letter-spacing:0}#day-cycle small{font-size:8px;line-height:1.6}.touch-mode #threat{top:290px;max-width:180px;font-size:10px}#rest-house{left:auto;right:20px;bottom:294px;transform:none;min-width:0;width:165px;padding:10px;font-size:10px}}
@media(max-width:460px){#day-cycle{left:14px;top:210px;width:190px}#rest-house{right:14px;width:165px}}
@media(max-height:550px) and (min-width:600px){#day-cycle{left:50%;top:65px;transform:translateX(-50%);width:235px;padding:8px;min-width:0}.touch-mode #threat{top:127px}#rest-house{left:50%;right:auto;bottom:78px;transform:translateX(-50%);width:160px;font-size:10px}.touch-mode #toast{top:180px;bottom:auto}#look-zone>span{bottom:132px}}

/* Timed workshop and ranged equipment */
.craft-job-panel{display:flex;align-items:center;gap:12px;margin:4px 0 10px;padding:10px 12px;background:#182e27;border:1px solid #a4be7c40;border-radius:4px;flex-shrink:0}.craft-job-panel #craft-progress{font-size:10px;line-height:1.7;margin:0;flex:1;color:#dbd6aa}.craft-job-panel button{font-size:10px;padding:8px;border:1px solid #9aaa7b60;border-radius:4px;background:#294234}.craft-job-panel button:disabled{opacity:.35}#craft-timer{position:absolute;left:50%;top:132px;transform:translateX(-50%);padding:7px 14px;border-radius:4px;font-size:10px;color:#e6d6a9;pointer-events:none}.touch-mode #threat{top:172px}@media(max-width:760px){#craft-timer{left:18px;top:275px;transform:none;width:190px;text-align:center}.touch-mode #threat{top:315px}.craft-job-panel{padding:6px;gap:6px}.craft-job-panel button{font-size:9px;max-width:96px}}@media(max-width:460px){.utility-actions{left:55%}#craft-timer{left:14px}.craft-job-panel #craft-progress{font-size:9px}}@media(max-height:550px) and (min-width:600px){#craft-timer{top:123px;left:50%;transform:translateX(-50%);width:235px}.touch-mode #threat{top:159px}.craft-job-panel{margin:0 0 5px;padding:5px 9px}.craft-job-panel button{min-height:32px}.craft-job-panel #craft-progress{font-size:9px}}

.weapon-tools{position:absolute;top:302px;right:28px;display:grid;gap:8px;pointer-events:auto}.weapon-tools button{padding:11px 14px;min-width:130px;font-size:11px;border-radius:5px}.weapon-tools button[aria-pressed=true]{background:#dce5b8;color:#223626}.weapon-tools button:disabled{opacity:.4}#crosshair.aiming{width:24px;height:24px;border:1px solid #f1e6b5;background:transparent;border-radius:50%;box-shadow:0 0 4px #0008}#crosshair.aiming:before,#crosshair.aiming:after{content:"";position:absolute;background:#f1e6b5;left:50%;top:50%;transform:translate(-50%,-50%)}#crosshair.aiming:before{width:8px;height:1px}#crosshair.aiming:after{width:1px;height:8px}@media(max-width:760px){.weapon-tools{top:370px;right:20px}.weapon-tools button{min-width:105px;font-size:10px;padding:10px}}@media(max-width:460px){.weapon-tools{top:360px;right:14px}.weapon-tools button{min-width:92px;padding:10px 5px}.utility-actions{left:52%}}@media(max-height:550px) and (min-width:600px){.weapon-tools{top:174px;right:20px;display:flex;gap:8px}.weapon-tools button{min-width:82px;max-width:90px;padding:8px;font-size:10px;min-height:40px}.utility-actions{left:50%}}
#hit-marker{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font:32px/1 sans-serif;color:#fff5d8;text-shadow:0 1px 4px #000;opacity:0;pointer-events:none;transition:opacity .08s}#hit-marker.active{opacity:1}#combat-inspector{position:absolute;top:136px;left:50%;transform:translateX(-50%);width:285px;padding:12px;background:#102019ef;border:1px solid #a6b18e66;border-radius:8px;pointer-events:auto;display:grid;gap:7px;font:12px sans-serif}#combat-inspector label{display:flex;align-items:center;gap:10px}#combat-inspector select{padding:5px;background:#2e4838;color:white}#combat-inspector output{color:#dce5b8}#combat-inspector button{padding:6px;background:#50684d;color:white;border:0;border-radius:3px}

/* Edge-only game controls: the centre remains available for looking and aiming. */
.touch-mode #hud{--edge:12px;--rail:164px;--rail-top:82px;--dock-space:202px}
.touch-mode.game-active .masthead{padding:16px max(12px,env(safe-area-inset-right)) 12px max(12px,env(safe-area-inset-left))}
.touch-mode #hud .hud-rail{position:absolute;top:var(--rail-top);bottom:var(--dock-space);width:var(--rail);display:flex;flex-direction:column;gap:6px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;pointer-events:auto;scrollbar-width:thin;scrollbar-color:#a6b98480 transparent;padding:0 2px 2px;z-index:2}
.touch-mode #hud #left-controls{left:max(var(--edge),env(safe-area-inset-left))}
.touch-mode #hud #right-controls{right:max(var(--edge),env(safe-area-inset-right))}
.touch-mode #hud .hud-rail>*{flex-shrink:0}
.touch-mode #hud .hud-rail .health-panel{position:static;width:100%;padding:10px;transform:none}
.touch-mode #hud .hud-rail .health-title{font-size:10px;letter-spacing:0;gap:4px}
.touch-mode #hud .hud-rail .health-title strong{font-size:12px;white-space:nowrap}
.touch-mode #hud .hud-rail .health-track{margin-top:6px;height:5px}
.touch-mode #hud .hud-rail .health-panel p{font-size:8px;margin:7px 0}
.touch-mode #hud .hud-rail .health-panel small{font-size:8px;line-height:1.5}
.touch-mode #hud .hud-rail .quickbar,.touch-mode #hud .hud-rail .survival-actions,.touch-mode #hud .hud-rail .weapon-tools,.touch-mode #hud .hud-rail .utility-actions,.touch-mode #hud .hud-rail #placement-actions{position:static;inset:auto;transform:none;display:grid;grid-template-columns:1fr;gap:6px;width:100%;margin:0}
.touch-mode #hud .hud-rail button{position:static;inset:auto;transform:none;display:block;min-width:0;max-width:none;width:100%;min-height:44px;height:auto;padding:10px 6px;border-radius:6px;text-align:center;font-size:11px;line-height:1.4;letter-spacing:0;white-space:normal;touch-action:pan-y}
.touch-mode #hud .hud-rail .quickbar small{display:inline;font-size:9px;margin-left:5px}
.touch-mode #hud .hud-rail .quickbar b{margin-left:3px}
.touch-mode #hud .hud-rail .survival-actions,.touch-mode #hud .hud-rail .weapon-tools,.touch-mode #hud .hud-rail #placement-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
.touch-mode #hud #left-dock{position:absolute;left:max(var(--edge),env(safe-area-inset-left));bottom:max(12px,env(safe-area-inset-bottom));width:var(--rail);display:flex;flex-direction:column;gap:10px;pointer-events:none}
.touch-mode #hud #left-dock .movement-actions{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.touch-mode #hud #left-dock .movement-actions button{padding:8px 3px;min-height:44px;font-size:10px;border-radius:6px}
.touch-mode #hud #left-dock .touch-controls{position:static;inset:auto;width:100%;align-items:flex-start;gap:5px}
.touch-mode #hud #joystick{width:106px;height:106px;max-width:100%}
.touch-mode #hud #left-dock .touch-controls>span{width:106px;max-width:100%;font-size:9px}
.touch-mode #hud .combat-actions{right:max(var(--edge),env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));width:var(--rail);display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.touch-mode #hud .combat-actions #attack-button{width:86px;height:86px;min-width:0;min-height:86px;padding:10px;font-size:11px}
.touch-mode #hud .combat-actions #block-button{width:86px;min-width:0;min-height:44px;padding:9px;text-align:center;display:block;border-radius:6px;font-size:11px}
.touch-mode #hud .mission{left:50%;right:auto;top:130px;transform:translateX(-50%);width:calc(100% - 2 * (var(--rail) + var(--edge) + 8px));max-width:300px;padding:6px 10px;background:#10251c77;pointer-events:none}
.touch-mode #hud .mission .eyebrow,.touch-mode #hud .mission h2,.touch-mode #hud .mission small,.touch-mode #hud .mission #progress-dots{display:none}
.touch-mode #hud .mission p{font-size:9px;text-align:center;line-height:1.5}
.touch-mode #hud #day-cycle{left:50%;right:auto;top:66px;transform:translateX(-50%);width:calc(100% - 2 * (var(--rail) + var(--edge) + 8px));max-width:270px;min-width:0;padding:8px 6px}
.touch-mode #hud #day-cycle strong{font-size:11px;letter-spacing:0}
.touch-mode #hud #day-cycle small{font-size:9px;line-height:1.5;margin-top:4px}
.touch-mode #hud #craft-timer{left:50%;top:166px;transform:translateX(-50%);width:calc(100% - 2 * (var(--rail) + var(--edge) + 8px));max-width:270px;font-size:9px;padding:6px}
.touch-mode #hud #threat{left:50%;top:202px;transform:translateX(-50%);max-width:calc(100% - 2 * (var(--rail) + var(--edge) + 8px));padding:8px 10px}
.touch-mode #hud .location{left:50%;right:auto;top:auto;bottom:12px;transform:translateX(-50%);text-align:center;font-size:9px}
.touch-mode #hud .location small{display:inline-block;margin:4px;font-size:8px}
.touch-mode #hud #map-panel{right:max(var(--edge),env(safe-area-inset-right));top:var(--rail-top);bottom:auto;max-height:calc(100dvh - var(--rail-top) - 12px);z-index:4}
.touch-mode #hud #toast{top:auto;bottom:62px;width:calc(100% - 2 * (var(--rail) + var(--edge) + 8px));max-width:360px;font-size:10px;padding:10px}
.touch-mode #hud #look-zone{inset:0}
.touch-mode #hud #look-zone>span{display:none}
@media(max-width:600px){
 .touch-mode #hud{--edge:6px;--rail:96px;--rail-top:72px;--dock-space:212px}
 .touch-mode.game-active .masthead{padding:12px 8px}.touch-mode.game-active .brand{font-size:16px;letter-spacing:2px}.touch-mode.game-active .brand svg{width:21px}.touch-mode.game-active .brand small{font-size:5px;letter-spacing:1px}
 .touch-mode #hud .hud-rail .survival-actions,.touch-mode #hud .hud-rail .weapon-tools,.touch-mode #hud .hud-rail #placement-actions{grid-template-columns:1fr}
 .touch-mode #hud .hud-rail .health-panel{padding:8px 5px}.touch-mode #hud .hud-rail .health-title{flex-direction:column;align-items:flex-start;gap:3px}.touch-mode #hud .hud-rail .health-panel small{display:none}
 .touch-mode #hud .hud-rail .quickbar small{display:none}.touch-mode #hud .hud-rail button{font-size:10px}
 .touch-mode #hud #left-dock .movement-actions{grid-template-columns:1fr;gap:4px}.touch-mode #hud #left-dock{gap:6px}
 .touch-mode #hud #joystick{width:94px;height:94px}.touch-mode #hud #stick{width:38px;height:38px}
 .touch-mode #hud .compass{left:50%;right:auto;top:31px;transform:translateX(-50%);gap:12px;font-size:8px}
 .touch-mode #hud #day-cycle{top:74px}.touch-mode #hud #day-cycle strong{font-size:10px}.touch-mode #hud #day-cycle small{font-size:8px}
 .touch-mode #hud .mission{top:142px;padding:5px}.touch-mode #hud .mission p{font-size:8px}.touch-mode #hud #craft-timer{top:186px}.touch-mode #hud #threat{top:226px}.touch-mode #hud #threat strong{font-size:9px}
 .touch-mode #hud .location{display:none}.touch-mode #hud #toast{bottom:40px;padding:7px;font-size:9px}
}
@media(max-height:550px) and (min-width:600px){
 .touch-mode #hud{--edge:8px;--rail:172px;--rail-top:60px;--dock-space:124px}
 .touch-mode.game-active .masthead{padding:8px}.touch-mode #hud #left-dock{flex-direction:row;align-items:flex-end;gap:6px}.touch-mode #hud #left-dock .touch-controls{order:-1;width:94px;flex-shrink:0}.touch-mode #hud #left-dock .movement-actions{grid-template-columns:1fr;flex:1}.touch-mode #hud #left-dock .movement-actions button{min-height:44px;padding:5px 2px;font-size:9px}
 .touch-mode #hud #joystick{width:92px;height:92px}.touch-mode #hud .combat-actions{flex-direction:row;align-items:flex-end;justify-content:flex-end}.touch-mode #hud .combat-actions #attack-button{width:80px;height:80px;min-height:80px}.touch-mode #hud .combat-actions #block-button{width:76px;min-height:44px}
 .touch-mode #hud .hud-rail .health-panel{padding:7px}.touch-mode #hud .hud-rail .health-panel p,.touch-mode #hud .hud-rail .health-panel small{display:none}.touch-mode #hud .hud-rail .hunger-title{margin-top:5px}
 .touch-mode #hud .hud-rail .quickbar{grid-template-columns:repeat(2,minmax(0,1fr))}.touch-mode #hud .hud-rail .quickbar small{display:none}.touch-mode #hud .hud-rail button{padding:8px 4px;font-size:10px}
 .touch-mode #hud #day-cycle{top:55px}.touch-mode #hud .mission{top:113px}.touch-mode #hud #craft-timer{top:145px}.touch-mode #hud #threat{top:178px}.touch-mode #hud .location{display:none}
}
.touch-mode #hud .care-actions{display:grid;grid-template-columns:1fr;gap:6px;width:100%}
.hydration-title{margin-top:12px}.health-title.hydration-title strong{color:#9bd8e8}
#season-status{margin-top:7px;padding-top:6px;border-top:1px solid #c1d8a52e}#season-status[data-season="1"]{color:#eed28d}#season-status[data-season="2"]{color:#eab776}#season-status[data-season="3"]{color:#bddce9}
.touch-mode #hud #season-time{font-size:10px;color:inherit}.touch-mode #hud #season-tip{font-size:9px;color:inherit}
.touch-mode #hud .mission{top:186px}.touch-mode #hud #craft-timer{top:222px}.touch-mode #hud #threat{top:258px}
.touch-mode #hud #farm-panel{padding:8px;width:100%}#farm-detail{font-size:10px;line-height:1.7;margin:0 0 8px}.farm-buttons{display:grid;grid-template-columns:1fr 1fr;gap:5px}#farm-panel #farm-craft{margin-top:5px}#farm-panel button:disabled{opacity:.4}
#farm-panel button{background:#2b4336;color:#e1e9cc;border:1px solid #aec49b55;font-family:inherit}
#farm-panel label{display:block;font-size:10px;margin-bottom:4px}#farm-crop{width:100%;min-height:44px;margin-bottom:8px;background:#223e31;color:#e1e9cc;border:1px solid #aec49b55;border-radius:4px;font:11px inherit;padding:6px}
#exploration-targets{display:grid;gap:5px;margin-top:8px}#exploration-targets button{color:#e1e9cc;background:#243e32;border:1px solid #abc39055;border-radius:4px;padding:8px;text-align:left;font:11px inherit;min-height:44px}#exploration-targets button[aria-pressed=true]{border-color:#efd09c;background:#42533d}
@media(max-width:600px){.touch-mode #hud .mission{top:212px}.touch-mode #hud #craft-timer{top:260px}.touch-mode #hud #threat{top:300px}.farm-buttons{grid-template-columns:1fr}.touch-mode #hud #season-time{font-size:9px}.touch-mode #hud #season-tip{font-size:8px}.craft-tabs{flex-wrap:wrap}}
@media(max-height:550px) and (min-width:600px){.touch-mode #hud #day-cycle{padding:5px}.touch-mode #hud .mission{top:165px}.touch-mode #hud #craft-timer{top:198px}.touch-mode #hud #threat{top:230px}.touch-mode #hud #season-status{margin-top:4px;padding-top:4px}}
#hydration-fill{height:100%;width:100%;background:#72bbd3;transition:width .2s}#hydration-fill.low{background:#e9a260}
.touch-mode #hud #drink-water.needs-water{border-color:#e9a260;color:#ffe0b1;background:#483c28}
.touch-mode #hud #left-controls{bottom:auto;overflow:visible;pointer-events:none}
.touch-mode #hud #left-controls #quick-heal{pointer-events:auto}
.care-spacer{display:block;min-height:44px;pointer-events:none}
.touch-mode #hud #left-bottom-controls{left:max(var(--edge),env(safe-area-inset-left));top:auto;bottom:var(--dock-space);max-height:100px;height:auto}
.touch-mode #hud #left-bottom-controls .corner-supplies{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
.touch-mode #hud #right-controls{top:auto;bottom:154px;height:auto;max-height:min(250px,calc(100dvh - 230px))}
.touch-mode #hud #right-controls>.survival-actions{position:sticky;top:0;z-index:3;background:#142c23;flex-shrink:0;border-radius:5px}
.touch-mode #hud #right-controls #backpack{min-height:44px}
.touch-mode #hud #right-controls #market-menu{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:50px;background:#e7c678;color:#302612;border:1px solid #ffe5a0;text-align:center}
.touch-mode #hud #market-menu strong{font-size:16px;letter-spacing:2px}.touch-mode #hud #market-menu small{font-size:9px;letter-spacing:0}
@media(max-width:600px){.touch-mode #hud #left-bottom-controls{bottom:calc(var(--dock-space) + 16px)}.touch-mode #hud #left-bottom-controls .quickbar{grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}}
@media(max-height:550px) and (min-width:600px){
 .touch-mode #hud #left-bottom-controls{left:calc(var(--edge) + var(--rail) + 8px);bottom:12px;width:96px;max-height:100px}
 .touch-mode #hud #left-bottom-controls .quickbar{grid-template-columns:repeat(2,minmax(0,1fr))}
 .touch-mode #hud #right-controls{bottom:104px;max-height:156px}
}
@media(min-width:601px){
 .touch-mode #hud .hud-rail .quickbar{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .touch-mode #hud .hud-rail .quickbar button{font-size:9px;padding:6px 2px}.touch-mode #hud .hud-rail .quickbar small{display:none}
}
@media(max-height:550px) and (min-width:600px){
 .touch-mode #hud .hud-rail{gap:5px;padding-bottom:0}
 .touch-mode #hud .hud-rail .quickbar{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .touch-mode #hud .hud-rail .quickbar button{font-size:9px;padding:6px 2px}
 .touch-mode #hud .care-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .touch-mode #hud .care-actions button{padding:6px 2px;font-size:9px}
 .touch-mode #hud .hud-rail .health-title{line-height:1.2}.touch-mode #hud .hud-rail .hunger-title,.touch-mode #hud .hud-rail .hydration-title{margin-top:4px}
 .touch-mode #hud .hud-rail .health-track{margin-top:3px;height:4px}
}

#mining-panel{padding:10px;color:#e1dfc3;font-size:12px;line-height:1.5}#mining-panel p{margin:0 0 6px}#mining-panel button{display:block;width:100%;margin-top:5px;padding:8px;border:1px solid #b8c79c55;border-radius:8px;background:#233b2d;color:inherit;min-height:36px}#mining-panel button:disabled{opacity:.4}
.touch-mode #hud #animal-sounds{position:absolute;left:50%;bottom:110px;transform:translateX(-50%);width:min(300px,calc(100% - 2 * (var(--rail) + var(--edge) + 8px)));display:flex;justify-content:center;gap:8px;pointer-events:none;color:#f0e9cf;text-shadow:0 1px 4px #000;z-index:1}
.animal-sound-cue{flex:1;min-width:0;max-width:94px;text-align:center;background:#10201970;border-radius:12px;padding:5px 2px 6px;box-shadow:0 0 12px #1116}
.animal-sound-cue[hidden]{display:none}.animal-sound-icon{height:29px;display:flex;align-items:center;justify-content:center;animation:animal-sound-pulse 1.8s ease-in-out infinite}.animal-sound-icon svg{width:56px;max-width:100%;height:28px}.animal-sound-icon b{font:38px/28px system-ui,sans-serif;font-weight:500}.animal-sound-cue small{display:block;font:10px/1.5 system-ui,sans-serif;white-space:nowrap}.animal-sound-direction{display:block;font:9px/1.3 system-ui,sans-serif;color:#d0d9c4}
@keyframes animal-sound-pulse{0%,100%{opacity:.65}50%{opacity:1}}
@media(max-height:550px){.touch-mode #hud #animal-sounds{bottom:56px}.animal-sound-cue{padding:2px}.animal-sound-direction{display:none}}
@media(prefers-reduced-motion:reduce){.animal-sound-icon{animation:none}}

/* Orange boss warning stays in the free middle area; corner controls remain usable. */
.touch-mode #hud #boss-panel{position:absolute;top:78px;left:50%;transform:translateX(-50%);width:min(440px,calc(100% - 2 * (var(--rail) + var(--edge) + 8px)));padding:14px 18px;background:#302315eb;border:1px solid #f49b49;border-radius:10px;color:#ffddb2;pointer-events:none;z-index:3;box-shadow:0 6px 26px #0006}
#boss-panel .boss-label{display:block;font:10px/1.4 system-ui,sans-serif;letter-spacing:2px;color:#ffac55}#boss-name{display:block;margin-top:6px;font-size:17px;line-height:1.4}
.boss-health-row{display:flex;justify-content:space-between;gap:8px;font-size:11px;margin:9px 0 5px}#boss-health{font-variant-numeric:tabular-nums}
#boss-health-track{height:9px;border-radius:5px;overflow:hidden;background:#140e08;border:1px solid #8b5b2d}#boss-health-fill{height:100%;width:100%;background:linear-gradient(90deg,#dc622b,#ffc36b);transition:width .15s}
#boss-warning{font-size:12px;font-weight:bold;line-height:1.5;color:#ffb65f;margin:9px 0 5px}#boss-distance{font-size:10px;line-height:1.5;color:#dcc4a6;display:block}
.near-guardian #hud #day-cycle,.near-guardian #hud .mission,.near-guardian #hud #threat{visibility:hidden}
#boss-panel.boss-windup{background:#542912f5;border-color:#ffd191}#boss-panel.boss-defeated #boss-warning{color:#d2e6aa}
@media(max-width:600px){.touch-mode #hud #boss-panel{top:70px;padding:9px 10px}#boss-name{font-size:13px}#boss-warning{font-size:11px}#boss-panel .boss-label{font-size:8px;letter-spacing:1px}}
@media(max-height:550px) and (min-width:600px){.touch-mode #hud #boss-panel{top:50px;padding:8px 12px}#boss-name{font-size:14px;margin-top:3px}.boss-health-row{margin-top:5px}#boss-warning{margin-top:5px}}

/* Background suspension must never intercept the movement gesture. */
.touch-mode #hud #background-pause{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);max-width:calc(100% - 32px);padding:16px 22px;border:1px solid #cadcb27a;border-radius:10px;background:#142b24ed;text-align:center;pointer-events:none;z-index:4}
#background-pause strong,#background-pause span{display:block}#background-pause strong{font-size:17px;margin-bottom:7px}#background-pause span{font-size:12px;line-height:1.6;color:#c5d6b2}
#background-resume{pointer-events:auto;background:#dce8bc;color:#213523;border:0;border-radius:6px;padding:10px 20px;margin-top:12px;min-height:44px}
.touch-mode #hud #left-dock{z-index:3}.touch-mode #hud #joystick.moving{border-color:#edf9ba;background:radial-gradient(circle,#4b714a9e,#193d2bbd);box-shadow:0 0 13px #c6e69a40}
.touch-mode #hud #move-hint{line-height:1.5;min-height:27px;letter-spacing:0;font-size:10px}
#map-panel>.eyebrow{position:sticky;top:-12px;z-index:1;background:#10251e;padding-top:5px;padding-bottom:5px}
#house-records{border-top:1px solid #8edcf355;margin-top:10px;padding-top:10px;scroll-margin-top:40px}
#house-record-title{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:#b8e8f1;margin:0 0 6px}
#house-record-count{font:11px Arial;padding:3px 7px;border-radius:10px;background:#315765;color:#e5f9ff}
#map-panel #house-record-note{text-align:left;line-height:1.5;color:#b8cac7}
#house-record-list{display:grid;gap:6px}
#house-record-list button{display:grid;gap:5px;min-height:66px;padding:10px;text-align:left;border:1px solid #7ab4c578;border-radius:5px;background:#183d40;color:#e2f0dc;touch-action:pan-y}
#house-record-list strong{font-size:12px}#house-record-list small{font:11px Arial;color:#b8d8dd}#house-record-list span{font-size:11px;color:#dae9b7}
#house-record-list button[aria-pressed=true]{border-color:#ffe4a1;background:#3d4d38}
.map-scales #house-records-open{border-color:#8edcf3aa;color:#bdefff}
