/* v26: independent thumb controls and one compact resource strip. */
#hud[data-control]{--stick:104px;--action:54px;--edge:14px;--floor:calc(24px + env(safe-area-inset-bottom));--craft-left:132px;--craft-width:230px}
#hud[data-control] .vitals{position:fixed;inset:calc(4px + env(safe-area-inset-top)) 10px auto;height:5px;width:auto;margin:0;padding:0;background:none;border:0;border-radius:0;box-shadow:none;pointer-events:none}
#hud[data-control] .vitals .hpTrack{height:5px;margin:0;background:#522e2c;box-shadow:0 1px 3px #071a12}
#hud[data-control] .vitals>span,#hud[data-control] .vitals>b{display:none}
#hud[data-control] .vitals small{position:fixed;left:12px;top:49px;font-size:9px;text-shadow:0 1px 3px #000;color:#e3dfc6}
#resourceStrip{position:fixed;top:calc(15px + env(safe-area-inset-top));left:10px;right:10px;display:flex;align-items:center;gap:9px;white-space:nowrap;overflow-x:auto;scrollbar-width:none;pointer-events:auto;touch-action:pan-x;background:#14271bbd;border-radius:4px;padding:2px 5px;min-height:24px}
#resourceStrip::-webkit-scrollbar{display:none}
#hud[data-control] #woodCounters,#hud #materialCounters{position:static;inset:auto;display:flex;flex-wrap:nowrap;align-items:center;gap:9px;width:auto;max-width:none;transform:none;border:0;border-radius:0;padding:0;margin:0;background:none;pointer-events:none;font:10px Arial}
#hud .woodCount,#hud .materialCount{display:flex;align-items:center;gap:2px;flex:0 0 auto;background:none;padding:0;border:0;min-width:23px}
#hud .woodCount canvas,#hud .materialCount canvas{width:19px;height:19px;image-rendering:auto}
#hud .woodCount b,#hud .materialCount b{font:11px Arial;color:#efe4be;margin:0}
#hud .woodCount span{display:none}
#hud[data-control] .miniMap{top:calc(52px + env(safe-area-inset-top));right:10px;width:84px;height:84px;--map-size:84px;border-width:1px}
#hud[data-control] .miniMap canvas{height:100%;width:100%}#hud[data-control] .miniMap span{bottom:18px}#hud #miniTimer{font-size:12px}
#hud #inventoryBtn{right:104px;top:calc(55px + env(safe-area-inset-top));width:35px;height:35px}
body[data-playing="true"] header{right:148px;top:calc(49px + env(safe-area-inset-top));padding:0}
body[data-playing="true"] header #helpBtn{width:32px;height:32px}
#hud #zoneNotice{top:70px;left:12px;max-width:210px}#hud #target{top:93px;left:12px;right:auto;text-align:left;max-width:260px}
#hud #lockStatus{top:115px;bottom:auto;left:12px;right:auto;text-align:left;font-size:9px;max-width:260px}
#hud[data-control] .bottomHud{position:fixed;inset:0;display:block;pointer-events:none;transform:none}
#hud[data-control] .steering{position:static}
#hud[data-control] #moveStick{position:absolute;left:max(var(--edge),env(safe-area-inset-left));bottom:var(--floor);width:var(--stick);height:var(--stick);pointer-events:auto}
#hud[data-control] .combat{position:static;width:auto;height:auto;pointer-events:none}
#hud[data-control] .combat .actions{position:static;display:block;pointer-events:none}
#hud #lookPad{position:absolute;right:max(var(--edge),env(safe-area-inset-right));bottom:var(--floor);width:var(--stick);height:var(--stick);pointer-events:none}
#hud[data-control] .combat #dial{position:absolute;inset:0;display:block;width:100%;height:100%;border:1px solid #c8bc84a0;border-radius:50%;background:radial-gradient(circle,#445c393d,#172f246f 68%,#d7c69928 70%,#172f2066 73%);box-shadow:inset 0 0 0 7px #bbaa7320;touch-action:none;pointer-events:auto}
#hud #dial:before{content:"";position:absolute;inset:22px;border:1px dashed #d5c58e50;border-radius:50%}
#hud #dial span{position:absolute;bottom:-17px;left:0;right:0;text-align:center;font:8px Arial;letter-spacing:.15em;color:#eadfbf}
#hud #dialDot{position:absolute;width:25px;height:25px;left:calc(50% - 12.5px);top:calc(50% - 12.5px);border-radius:50%;background:radial-gradient(circle at 35% 25%,#e6d6a5,#9b8e5b);box-shadow:0 2px 4px #071d16;pointer-events:none}
#directionTargets{position:absolute;inset:0;pointer-events:none}
#directionTargets .directionTarget{position:absolute;transform:translate(-50%,-50%);width:36px;height:36px;min-width:0;margin:0;padding:0;border:0;border-radius:50%;background:radial-gradient(circle,#eed09d 0 5px,#152e21c0 6px 9px,transparent 10px);color:#543b1c;font:bold 11px Arial;box-shadow:none;pointer-events:auto;touch-action:none}
#directionTargets .directionTarget.selected{background:radial-gradient(circle,#ff9e45 0 6px,#482d188c 7px 10px,transparent 11px);color:#231f15;filter:drop-shadow(0 0 3px #ffb64c)}
#hud[data-control] #shootBtn{position:absolute;right:calc(var(--edge) + var(--stick) + 7px);bottom:calc(var(--floor) + 71px);width:149px;height:166px;margin:0;pointer-events:auto}
#shootBtn #bowDraw{left:-5px;top:18px;width:160px;height:125px}
#hud[data-control] #chopBtn,#hud #bolaBtn,#hud #healBtn{position:absolute;bottom:calc(var(--floor) + 2px);width:var(--action);height:var(--action);min-height:0;padding:4px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;margin:0;border:1px solid #c4b68491;border-radius:50%;background:radial-gradient(circle at 40% 20%,#566746dc,#263e2feb);box-shadow:inset 0 0 0 3px #c3b48316,0 3px 9px #0d1f1555;pointer-events:auto;touch-action:none;transform:none}
#hud[data-control] #chopBtn{right:calc(var(--edge) + var(--stick) + 12px)}
#hud #bolaBtn{right:calc(var(--edge) + var(--stick) + var(--action) + 19px)}
#hud #healBtn{right:calc(var(--edge) + var(--stick) + var(--action) * 2 + 26px)}
#hud #bolaBtn[data-selected="true"]{border-color:#ffb568;background:#69522fe8;box-shadow:0 0 0 2px #d0a76355}
#hud #chopBtn canvas,#hud #bolaBtn canvas,#hud #healBtn canvas{width:24px;height:24px;margin:0}
#hud #chopBtn span,#hud #bolaBtn span,#hud #healBtn span{font-size:6px;letter-spacing:0;line-height:1.15;max-width:100%;color:#f1e3bd}
#hud #chopBtn small{display:none}
#hud[data-control] #quickCraftPanel{position:absolute;left:var(--craft-left);right:auto;bottom:var(--floor);top:auto;width:var(--craft-width);padding:0;transform:none;background:none;border:0;pointer-events:none}
#hud[data-control] .craftCircles{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;align-items:start;pointer-events:none}
#hud[data-control] .craftSlot{width:auto;min-width:0;pointer-events:auto;position:relative}
#hud[data-control] .craftSlot button{width:40px;height:40px;padding:4px;pointer-events:auto}
#hud[data-control] .craftSlot>span{font-size:6px;line-height:1.25;margin:4px 0 0;max-width:none;min-height:17px;white-space:normal}
#hud[data-control] .craftSlot canvas{width:28px;height:28px}
#hud[data-control] .craftFooter{margin-top:3px;pointer-events:auto;display:flex}#hud .craftFooter>span{display:none}#hud .craftFooter button{padding:4px 6px;font-size:8px}
#craftChoices{position:absolute;left:0;bottom:calc(100% + 9px);width:288px;max-height:calc(100dvh - 145px);overflow-y:auto;overscroll-behavior:contain;pointer-events:auto;touch-action:pan-y;background:#1a3025f5;border:1px solid #bdac7a;border-radius:8px;padding:10px;box-shadow:0 6px 24px #071910aa}
#craftChoices{scrollbar-width:thin;scrollbar-color:#9b9d6d #263e2c}#craftChoices[hidden]{display:none}#craftChoices>strong{font:15px Georgia;color:#f0ddb1}#craftChoices>small{display:block;color:#bac9a8;font-size:8px;margin:4px 0 8px}
.craftOption{display:flex;align-items:center;gap:5px;padding:6px 0;border-top:1px solid #6d785b55}.craftOption>canvas{width:30px;height:30px;flex-shrink:0}.craftOption>div{flex:1;min-width:0}.craftOption span{font-size:10px;display:block;color:#f0ddae}.craftOption small{font-size:8px;line-height:1.3;color:#bccaac;display:block}.craftOption button{width:36px;min-width:36px;height:38px;padding:0;font-size:14px;touch-action:none;border-color:#a49e73}.craftOption button:disabled{opacity:.4}
@media(orientation:portrait){
 #hud[data-control]{--stick:84px;--action:46px;--edge:10px;--floor:calc(23px + env(safe-area-inset-bottom));--craft-left:12px;--craft-width:166px}
 #hud[data-control] #quickCraftPanel{bottom:calc(var(--floor) + 128px)}
 #hud[data-control] .craftCircles{grid-template-columns:repeat(3,1fr);gap:6px}
 #hud[data-control] .craftSlot button{width:44px;height:42px}
 #hud[data-control] #shootBtn{right:12px;bottom:calc(var(--floor) + 134px);width:139px;height:166px}
 #shootBtn #bowDraw{left:-9px}
 #craftChoices{left:0;width:min(288px,calc(100vw - 24px));max-height:calc(100dvh - 330px)}
 #hud[data-control] .vitals small{font-size:8px}
 #hud #resourceStrip{gap:4px;padding:2px 4px}
 #hud[data-control] #woodCounters,#hud #materialCounters{gap:2px}
 #hud .woodCount,#hud .materialCount{gap:1px;min-width:19px}
 #hud .woodCount canvas,#hud .materialCount canvas{width:13px;height:13px}
 #hud .woodCount b,#hud .materialCount b{font-size:9px}
}
@media(orientation:landscape) and (max-width:740px){
 #hud[data-control]{--stick:88px;--action:46px;--edge:10px;--craft-left:111px;--craft-width:160px}
 #hud[data-control] .craftCircles{grid-template-columns:repeat(3,1fr)}
 #hud[data-control] #shootBtn{height:153px}
 #craftChoices{width:264px;max-height:calc(100dvh - 193px)}
}
@media(orientation:portrait) and (max-width:370px){#hud[data-control]{--stick:78px;--edge:7px;--craft-width:148px}#hud #target{max-width:185px}#hud #lookPad{right:12px}}

/* v27: edge-aligned equipment, two small recipe bubbles and short health line. */
#hud[data-control]{--edge:6px;--floor:calc(17px + env(safe-area-inset-bottom));--craft-left:calc(var(--stick) + 16px);--craft-width:284px}
#hud[data-control] .vitals{inset:calc(8px + env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) auto auto;width:132px;height:5px}
#hud[data-control] .vitals .hpTrack{border-radius:2px;overflow:hidden}
#hud[data-control] .vitals small{left:max(6px,env(safe-area-inset-left));top:calc(31px + env(safe-area-inset-top));font-size:8px}
#hud #resourceStrip{top:calc(2px + env(safe-area-inset-top));left:max(4px,env(safe-area-inset-left));right:148px;min-height:22px;width:max-content;max-width:calc(100% - 156px);gap:6px;padding:1px 3px;background:#152c216b}
#hud[data-control] #woodCounters,#hud #materialCounters{gap:5px}
#hud[data-control] .miniMap{right:max(5px,env(safe-area-inset-right));top:calc(23px + env(safe-area-inset-top));width:76px;height:76px;--map-size:76px}
#hud #inventoryBtn{right:86px;top:calc(23px + env(safe-area-inset-top));width:31px;height:31px}
body[data-playing="true"] header{right:120px;top:calc(20px + env(safe-area-inset-top))}
#hud #zoneNotice{top:51px;left:6px}#hud #target{top:71px;left:6px}#hud #lockStatus{top:92px;left:6px}
#hud[data-control] #quickCraftPanel{bottom:calc(3px + env(safe-area-inset-bottom));width:var(--craft-width)}
#hud[data-control] .craftCircles{grid-template-columns:repeat(6,44px);gap:4px}
#hud[data-control] .craftSlot button{width:44px;height:44px;padding:5px;margin:0}
#hud[data-control] .craftSlot canvas{width:30px;height:30px}
#hud[data-control] .craftSlot>span{display:block;width:44px;font-size:6px;margin:2px 0 0;min-height:8px;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 3px #000}
#hud[data-control] .craftFooter{display:none}
#hud #craftChoices{left:0;bottom:calc(100% + 7px);width:144px;max-height:none;overflow:visible;display:flex;gap:5px;align-items:start;padding:0;border:0;border-radius:0;background:none;box-shadow:none;touch-action:none;pointer-events:none}
#hud #craftChoices[hidden]{display:none}
#hud #craftChoices[data-family="hammer"]{left:20px}
#hud #craftChoices[data-family="cord"]{left:56px}
#hud #craftChoices[data-family="bow"]{left:94px}
#hud #craftChoices[data-family="bola"],#hud #craftChoices[data-family="barricade"]{left:140px}
.craftBubble{width:57px;flex:0 0 57px;text-align:center;pointer-events:none}
#hud .craftBubble button{position:relative;width:50px;height:50px;margin:0;padding:6px;border:1px solid #bdb783;border-radius:50%;background:radial-gradient(circle at 35% 20%,#6f7850ee,#1f3c2cf5);box-shadow:0 2px 7px #0b201b80;pointer-events:auto;touch-action:none}
#hud .craftBubble button[data-ready="false"]{border-color:#778066;background:#213a2beb}
#hud .craftBubble button[data-ready="false"] canvas{opacity:.5}
.craftBubble canvas{width:34px;height:34px}
.craftBubble b{position:absolute;right:-2px;bottom:-1px;border-radius:50%;background:#364632;color:#eedda6;width:16px;height:16px;font:14px Georgia}
.craftBubble span{display:block;font-size:8px;line-height:1.25;margin-top:4px;color:#f3e6c0;text-shadow:0 1px 2px #000,0 0 4px #000}
.craftBubble small{display:block;color:#c9d3ac;font-size:6px;line-height:1.3;text-shadow:0 1px 2px #000}
#hud .craftNext{position:relative;align-self:center;flex:0 0 30px;width:30px;min-width:30px;height:46px;padding:0;border:0;border-radius:15px;background:#20382cb8;color:#efdcac;font:25px Georgia;pointer-events:auto;touch-action:none;box-shadow:none}
.craftNext small{display:block;font:8px Arial}
.craftDone{font-size:9px;color:#e2d5ad;text-shadow:0 1px 3px #000}
@media(orientation:landscape) and (max-width:740px){
 #hud[data-control]{--stick:88px;--action:46px;--craft-left:102px;--craft-width:272px}
 #hud[data-control] .craftCircles{grid-template-columns:repeat(6,42px);gap:4px}
 #hud[data-control] .craftSlot button{width:42px;height:42px}
 #hud .woodCount canvas,#hud .materialCount canvas{width:15px;height:15px}
 #hud .woodCount b,#hud .materialCount b{font-size:9px}
 #hud[data-control] #woodCounters,#hud #materialCounters{gap:3px}
}
@media(orientation:portrait), (orientation:landscape) and (max-width:650px){
 #hud[data-control]{--stick:84px;--action:46px;--edge:5px;--floor:calc(74px + env(safe-area-inset-bottom));--craft-left:max(4px,env(safe-area-inset-left));--craft-width:284px}
 #hud[data-control] #quickCraftPanel{bottom:calc(3px + env(safe-area-inset-bottom))}
 #hud[data-control] .craftCircles{grid-template-columns:repeat(6,44px);gap:4px}
 #hud[data-control] .craftSlot button{width:44px;height:44px}
 #hud #lookPad{right:max(var(--edge),env(safe-area-inset-right))}
 #hud[data-control] #shootBtn{right:5px;bottom:calc(var(--floor) + 122px);width:139px;height:166px}
 #hud[data-control] .vitals{width:108px;top:calc(33px + env(safe-area-inset-top))}
 #hud #resourceStrip{right:4px;max-width:calc(100% - 8px);gap:3px;padding:1px 2px}
 #hud[data-control] #woodCounters,#hud #materialCounters{gap:2px}
 #hud .woodCount,#hud .materialCount{min-width:19px;gap:1px}
 #hud .woodCount canvas,#hud .materialCount canvas{width:13px;height:13px}
 #hud .woodCount b,#hud .materialCount b{font-size:9px}
 #hud[data-control] .miniMap{top:calc(45px + env(safe-area-inset-top));width:72px;height:72px;--map-size:72px}
 #hud #inventoryBtn{right:82px;top:calc(46px + env(safe-area-inset-top))}
 body[data-playing="true"] header{right:116px;top:calc(42px + env(safe-area-inset-top))}
 #hud #zoneNotice{top:53px;max-width:150px}#hud #target{top:76px;max-width:205px}#hud #lockStatus{top:96px;max-width:205px}
 #hud #craftChoices{bottom:calc(100% + var(--stick) + 43px)}
}
@media(orientation:landscape) and (max-width:650px){
 #hud[data-control] #shootBtn{right:calc(var(--stick) + 13px);bottom:calc(var(--floor) + 58px);height:145px}
}

/* v28: next-bow recipe pinned above the left thumb, with no blocking panel. */
#hud #nextBowPreview{position:fixed;left:max(5px,env(safe-area-inset-left));top:calc(48px + env(safe-area-inset-top));display:flex;align-items:center;gap:5px;width:218px;min-height:47px;padding:3px 5px 3px 0;margin:0;border:0;border-left:2px solid #a3926460;border-radius:0;background:linear-gradient(90deg,#172d24aa,#172d2460 85%,transparent);box-shadow:none;color:#eee2bc;text-align:left;pointer-events:auto;touch-action:none}
#hud #nextBowPreview[hidden]{display:none}
#nextBowPreview .nextBowIcon{width:42px;height:42px;flex:0 0 42px}
#nextBowPreview>div{min-width:0;flex:1}#nextBowPreview b{display:block;font:8px Arial;letter-spacing:.03em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;margin-bottom:3px}
.nextBowNeeds{display:flex;gap:3px;align-items:center}.bowNeed{display:flex;flex-direction:column;align-items:center;min-width:29px}.bowNeed canvas{width:21px;height:21px}.bowNeed small{font:bold 9px Arial;color:#f0ac7b}.bowNeed.ready small{color:#c3d79c}
#hud #nextBowPreview[data-ready="true"]{border-left-color:#d6d390}
#hud #bowString{position:absolute;top:30px;left:3px;right:3px;text-align:center;font:8px Arial;letter-spacing:.05em;color:#cbd3a7;pointer-events:none}
#hud #bowString[data-empty="true"]{color:#ffb47b}
#hud #bolaBtn[data-cooling="true"]{opacity:.65}
#hud #zoneNotice{top:114px}#hud #target{top:134px}#hud #lockStatus{top:155px}
#hud #craftChoices[data-family="thread"]{left:56px}
@media(orientation:portrait){
 #hud #nextBowPreview{width:197px;top:calc(50px + env(safe-area-inset-top))}
 #nextBowPreview .nextBowIcon{width:36px;height:36px;flex-basis:36px}
 #nextBowPreview b{font-size:7px}.bowNeed{min-width:29px}
}

/* v29: recipes belong to the left hand; weapons and instant cover to the right. */
#hud[data-control]{--craft-width:144px}
#hud[data-control] .craftCircles{grid-template-columns:repeat(3,44px)}
#hud #craftChoices{bottom:calc(100% + 8px);width:max-content;max-width:190px;gap:4px}
#hud .craftBubble{width:50px;flex:0 0 50px}
#hud .craftBubble span{font-size:7px}
#hud #quickAxe[data-state="ready"]{border-color:#f4d88a;box-shadow:0 0 9px #dfc47790,inset 0 0 6px #dfc47770}
#hud #quickAxe b{display:none}
#hud #coverBtn{position:absolute;right:calc(var(--edge) + (var(--stick) - 58px)/2);bottom:calc(var(--floor) + var(--stick) + 12px);width:58px;height:58px;margin:0;padding:4px;border:1px solid #a49c76;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;background:radial-gradient(circle at 40% 25%,#586e4b,#263c2dec);pointer-events:auto;touch-action:none}
#coverBtn canvas{width:29px;height:29px}#coverBtn span{font:6px Arial;color:#eee0b7}#coverBtn small{font:6px Arial;color:#c7cfa3}
#hud #coverBtn[data-ready="true"]{border-color:#efce7e;box-shadow:0 0 8px #dbbf624a}#hud #coverBtn[data-ready="false"]{opacity:.65}
#hud #bowSlots{position:absolute;right:calc(var(--edge) + var(--stick) + 12px);bottom:calc(var(--floor) + 245px);display:flex;gap:4px;pointer-events:none}
#hud #bowSlots button{width:40px;height:44px;padding:2px;border-radius:8px;border:1px solid #7d8b69;background:#1c352bbd;pointer-events:auto;touch-action:none;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:1px;margin:0}
#bowSlots canvas{width:29px;height:29px}#bowSlots span{font:6px Arial;max-width:38px;overflow:hidden;text-overflow:ellipsis;text-transform:uppercase;color:#e4d6b1}
#hud #bowSlots button[data-selected="true"]{border-color:#e4bd74;background:#4d5738db;box-shadow:0 0 4px #dbbf624a}
#hud #skillStatus{position:absolute;top:43px;left:0;right:0;font:7px Arial;text-align:center;color:#dec3f4;pointer-events:none}
#hud #craftProgress{position:fixed;left:50%;top:22%;transform:translateX(-50%);font:bold 10px Arial;color:#f7d995;text-shadow:0 2px 4px #000;pointer-events:none}
#hud #craftProgress[hidden]{display:none}
@media(orientation:portrait),(orientation:landscape) and (max-width:650px){
 #hud[data-control]{--craft-width:144px}
 #hud[data-control] .craftCircles{grid-template-columns:repeat(3,44px)}
 #hud #craftChoices{bottom:calc(100% + 8px)}
 #hud[data-control] #shootBtn{right:calc(var(--edge) + var(--stick) + 8px);bottom:calc(var(--floor) + 122px)}
 #hud #bowSlots{right:calc(var(--edge) + var(--stick) + 12px);bottom:calc(var(--floor) + 295px)}
 #hud #coverBtn{right:calc(var(--edge) + (var(--stick) - 58px)/2)}
}
@media(orientation:landscape) and (max-width:650px){
 #hud[data-control] #shootBtn{bottom:calc(var(--floor) + 58px)}
 #hud #bowSlots{bottom:calc(var(--floor) + 208px)}
}

@media(orientation:portrait){
 #hud[data-control] #shootBtn{right:5px;bottom:calc(var(--floor) + 156px)}
 #hud #bowSlots{right:10px;bottom:calc(var(--floor) + 328px)}
 #hud #craftChoices{bottom:calc(100% + var(--stick) + 32px)}
}

/* v30: two craft groups, one-tap consumables, and cycling beside the bow. */
#hud[data-control]{--craft-width:224px;--bow-right:calc(var(--edge) + var(--stick) + 17px);--bow-width:149px;--bow-bottom:calc(var(--floor) + 71px)}
#hud[data-control] .craftCircles{display:flex;align-items:flex-end;gap:18px;grid-template-columns:none}
#hud .craftGroup{display:flex;align-items:flex-end;gap:5px}
#hud .craftSlot{width:44px;flex:0 0 44px}
#hud .craftSlot.bowCraft{width:58px;flex-basis:58px}
#hud #quickBow{width:58px;height:58px}#hud #quickBow canvas{width:43px;height:43px}
#hud #quickAxe b,#hud #quickBola b,#hud #quickCampfire b{display:none}
#hud #craftChoices{bottom:calc(100% + 8px)}
#hud[data-control] #shootBtn{right:var(--bow-right);width:var(--bow-width);bottom:var(--bow-bottom)}
#hud .bowCycle{position:absolute;bottom:calc(var(--bow-bottom) + 65px);width:32px;height:48px;padding:0;margin:0;pointer-events:auto;touch-action:none;border:1px solid #bbbe8870;border-radius:18px;background:#183629a6;color:#f4dd9b;font:34px Georgia;line-height:40px;box-shadow:0 1px 4px #081c16}
#hud #bowPrev{right:calc(var(--bow-right) + var(--bow-width) + 3px)}
#hud #bowNext{right:calc(var(--bow-right) - 35px)}
#hud .bowCycle:disabled{opacity:.3}
@keyframes availablePulse{0%,100%{box-shadow:0 0 0 0 #f5d58920,inset 0 0 3px #efcc6740}50%{box-shadow:0 0 0 3px #f5d58935,0 0 10px #edc77065,inset 0 0 6px #efcc6750}}
#hud .craftSlot button[data-state="ready"],#hud #coverBtn[data-ready="true"],#hud #bolaBtn[data-ready="true"],#hud #healBtn[data-ready="true"],#hud #chopBtn[data-ready="true"],#hud #shootBtn[data-ready="true"]{animation:availablePulse 2.1s ease-in-out infinite;border-color:#edcf88}
#hud[data-reduced-motion="true"] button{animation:none!important}
@media(prefers-reduced-motion:reduce){#hud button{animation:none!important}}
@media(orientation:portrait){
 #hud[data-control]{--craft-width:224px;--bow-width:139px;--bow-right:40px;--bow-bottom:calc(var(--floor) + 156px)}
 #hud #craftChoices{bottom:calc(100% + var(--stick) + 32px)}
}
@media(orientation:landscape) and (max-width:650px){
 #hud[data-control]{--bow-width:139px;--bow-bottom:calc(var(--floor) + 58px);--craft-width:224px}
}

/* v31: shot feedback and optional, compact target-range controls. */
#hud #shotReadout{position:absolute;top:55px;left:0;right:0;font:bold 8px Arial;text-align:center;color:#f4d99c;pointer-events:none}
#hud #rangePanel{position:absolute;left:50%;top:47px;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 190px);padding:5px 8px;border:1px solid #aa9b6b77;border-radius:8px;background:#18382be8;color:#ede0b8;pointer-events:auto;text-align:center}
#hud #rangePanel[hidden]{display:none}#rangePanel b{font:9px Georgia;letter-spacing:.15em}#rangePanel span{display:block;font:9px Arial;margin:3px 0}#rangePanel>div{display:flex;gap:5px;justify-content:center}#rangePanel button{font:9px Arial;min-height:27px;padding:4px 7px;border-radius:7px;touch-action:manipulation}
#hud[data-range="true"] #mapBtn{display:none}
@media(orientation:portrait){#hud #rangePanel{top:84px;max-width:calc(100vw - 18px)}}

/* Keep the forest visible through the bow control, including ready pulses. */
#hud[data-control] #shootBtn{background:#15342624;border-color:#d6c29438;box-shadow:none;animation:none;text-shadow:0 1px 3px #071c12}
#hud[data-control] #shootBtn[data-drawing="true"]{background:#30452e36;border-color:#f0d28a70;box-shadow:inset 0 0 8px #e2c57312}
#hud[data-control] #shootBtn[data-ready="true"]{animation:bowReadyPulse 2.1s ease-in-out infinite}
@keyframes bowReadyPulse{50%{border-color:#e8cd7f80;box-shadow:0 0 8px #e9c85d1a}}
#hud #chargeMeter[data-over="true"]{height:5px;background:#45251d88}
#hud #chargeMeter[data-over="true"] #chargeFill{background:#ff8057}
#hud[data-control] #shootBtn[data-over="true"]{border-color:#ff916ca0;background:#723f2229}
