#weapon-reticle{--spread:4px;position:fixed;left:50%;top:50%;width:0;height:0;pointer-events:none;z-index:11;color:#ecffe9;filter:drop-shadow(0 1px 1px #071d1d);font-family:system-ui}
#weapon-reticle[hidden]{display:none}
#weapon-reticle i{position:absolute;display:block;width:7px;height:2px;background:currentColor;border-radius:1px}
#weapon-reticle i:nth-child(1){left:calc(-9px - var(--spread));top:-1px}
#weapon-reticle i:nth-child(2){left:calc(2px + var(--spread));top:-1px}
#weapon-reticle i:nth-child(3){width:2px;height:7px;left:-1px;top:calc(-9px - var(--spread))}
#weapon-reticle i:nth-child(4){width:2px;height:7px;left:-1px;top:calc(2px + var(--spread))}
#weapon-reticle b{position:absolute;left:-1px;top:-1px;width:2px;height:2px;background:currentColor;border-radius:50%}
#weapon-reticle .weapon-hit{position:absolute;left:0;top:0;transform:translate(-50%,-50%);font-size:34px;font-weight:300;line-height:1;opacity:0;color:#f0d795}
#weapon-reticle.is-hit .weapon-hit{opacity:1}
#weapon-reticle[data-hit=head] .weapon-hit{color:#ffb18b}
#weapon-reticle.is-reloading{color:#e4c789}
#weapon-reticle.is-reloading i{opacity:.3}
#weapon-reticle small{position:absolute;top:max(38px,calc(var(--spread) + 13px));left:0;transform:translateX(-50%);white-space:nowrap;font-size:11px;color:#e4c789}
#weapon-reticle[data-kind=grenade] i{opacity:.6}
body.weapon-drawn #sandbox-crosshair,body.weapon-drawn #shift-lock-reticle{display:none!important}
#hud #weapon-status{overflow:hidden}
#weapon-reload-progress{position:absolute;bottom:0;left:0;right:0;height:2px;background:#e4c78926;pointer-events:none}
#weapon-reload-progress[hidden]{display:none}
#weapon-reload-progress i{display:block;width:100%;height:100%;background:#e4c789;transform-origin:left center}
#hud #weapon-reload{width:44px;height:36px;min-width:44px}
@media(max-height:540px){#weapon-reticle small{top:max(29px,calc(var(--spread) + 13px));font-size:10px}}
#sniper-aim{position:fixed;right:calc(18px + env(safe-area-inset-right));bottom:calc(212px + env(safe-area-inset-bottom));z-index:14;min-height:44px;min-width:96px;padding:10px 14px;background:#163236df;color:#efe5c7;border:1px solid #c5c8a6;border-radius:12px;font:600 13px system-ui;touch-action:manipulation}
#sniper-aim[hidden],#sniper-scope[hidden]{display:none}
#sniper-aim[aria-pressed=true]{background:#536f58}
#sniper-scope{position:fixed;inset:0;pointer-events:none;z-index:10;display:grid;place-items:center;overflow:hidden}
.scope-lens{width:82vmin;height:82vmin;border:3px solid #101713;border-radius:50%;box-shadow:0 0 0 150vmax #061011e8,inset 0 0 25px #091512a8;position:relative;overflow:hidden}
.scope-lens i,.scope-lens b{position:absolute;background:#102321;left:50%;top:50%;transform:translate(-50%,-50%)}
.scope-lens i{width:100%;height:1px}.scope-lens b{height:100%;width:1px}
.scope-lens b::after{content:"";position:absolute;top:50%;left:-5px;width:11px;height:25%;background:repeating-linear-gradient(to bottom,transparent 0,transparent 22px,#172f2c 22px,#172f2c 23px)}
.scope-lens span{position:absolute;bottom:12%;left:53%;color:#162b24;font:600 11px system-ui}
body.sniper-scoped #weapon-reticle i,body.sniper-scoped #weapon-reticle b{display:none}
@media(max-height:540px){#sniper-aim{right:calc(80px + env(safe-area-inset-right));bottom:calc(180px + env(safe-area-inset-bottom));min-width:86px;padding:8px}}
#hud #sniper-aim{pointer-events:auto}
#sniper-scope{z-index:-1}
/* Shared aiming controls: same position for every compatible weapon. */
#hud #sniper-aim,#hud #player-crouch{pointer-events:auto;position:fixed;z-index:14;right:var(--hud-right,18px);bottom:108px;min-height:44px;min-width:96px;padding:9px 12px;border:1px solid #bccbb366;border-radius:12px;background:#142b30dd;color:#eef2df;font:600 12px system-ui;touch-action:manipulation}
#hud #player-crouch{bottom:160px}
#hud #sniper-aim[aria-pressed=true],#hud #player-crouch[aria-pressed=true]{background:#49654ee8;border-color:#dbcd9a}
#hud #sniper-aim[hidden],#hud #player-crouch[hidden]{display:none}
.mobile-layout #hud #sniper-aim{right:calc(var(--hud-right) + 75px);bottom:calc(var(--safe-bottom) + 154px);width:94px;min-width:94px}
.mobile-layout #hud #player-crouch{right:var(--hud-right);bottom:calc(var(--safe-bottom) + 91px);width:66px;min-width:66px;padding:8px 3px;font-size:11px}
body.drone-fpv #player-crouch,body.drone-fpv #sniper-aim{display:none!important}
#sniper-scope{z-index:10}
#sniper-scope .scope-lens{width:78vmin;height:78vmin}
#sniper-scope .scope-lens em{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:3px;height:3px;background:#e55244;border-radius:50%}
#sniper-scope[data-optic=iron] .scope-lens,#sniper-scope[data-optic=dot] .scope-lens,#sniper-scope[data-optic=holo] .scope-lens{width:136px;height:110px;box-shadow:none;border:0;border-radius:0;overflow:visible}
#sniper-scope[data-optic=iron] .scope-lens i,#sniper-scope[data-optic=iron] .scope-lens b{width:6px;height:26px;background:#142726;top:calc(50% + 17px);left:calc(50% - 32px);border:1px solid #8eaea2;transform:none}
#sniper-scope[data-optic=iron] .scope-lens b{left:calc(50% + 26px)}
#sniper-scope[data-optic=iron] .scope-lens em{border-radius:0;width:3px;height:24px;transform:translateX(-50%);background:linear-gradient(#efe1a5 0 4px,#1e3430 4px);box-shadow:0 0 0 1px #193b2a}
#sniper-scope[data-optic=iron] .scope-lens b::after,#sniper-scope[data-optic=iron] .scope-lens span{display:none}
#sniper-scope[data-optic=dot] .scope-lens{border:3px solid #142824;border-radius:40% 40% 30% 30%;box-shadow:0 0 0 1px #bac4b566}
#sniper-scope[data-optic=dot] .scope-lens i,#sniper-scope[data-optic=dot] .scope-lens b,#sniper-scope[data-optic=dot] .scope-lens span{display:none}
#sniper-scope[data-optic=dot] .scope-lens em{width:4px;height:4px;background:#ff594c;box-shadow:0 0 5px #ff7258}
#sniper-scope[data-optic=holo] .scope-lens{border:4px solid #162b29;border-radius:18px 18px 5px 5px;box-shadow:0 0 0 1px #b2c8b855}
#sniper-scope[data-optic=holo] .scope-lens i{width:29px;height:29px;border:1px solid #ec644d;border-radius:50%;background:transparent}
#sniper-scope[data-optic=holo] .scope-lens b,#sniper-scope[data-optic=holo] .scope-lens span{display:none}
#arsenal-optics{margin:14px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#arsenal-optics[hidden]{display:none}
#arsenal-optics h4,#arsenal-optics p{grid-column:1/-1;margin:0}
#arsenal-optics p,.optic-help{font-size:12px;color:#acc7c0;line-height:1.5}
#arsenal-optics button{display:grid;grid-template-columns:25px 1fr;text-align:left;align-items:center;gap:4px 8px;background:#17343a;border:1px solid #79978c55;color:#edf3df;padding:10px;border-radius:10px;min-height:64px}
#arsenal-optics button[hidden]{display:none}
#arsenal-optics button[aria-pressed=true]{border-color:#d9c894;background:#364a3c}
#arsenal-optics button small{grid-column:2;font-size:10px;font-weight:400;line-height:1.4;color:#abc6bd}
.optic-symbol{width:22px;height:22px;grid-row:span 2;position:relative;border:1px solid #c9d6bb;border-radius:50%}
.optic-symbol::before{content:'';position:absolute;inset:8px;background:#ed9e7b;border-radius:50%}
[data-optic=iron]>.optic-symbol{border-width:0 2px 2px;border-radius:0}
[data-optic=holo]>.optic-symbol{outline:1px solid #abc9b4;outline-offset:3px;border-radius:4px}
[data-optic=scope4]>.optic-symbol::after,[data-optic=scope8]>.optic-symbol::after{content:'+';position:absolute;inset:-4px;text-align:center;font:26px system-ui}
@media(max-width:600px){#arsenal-optics{grid-template-columns:1fr}}

#sniper-scope[data-optic=dot] .scope-lens,#sniper-scope[data-optic=holo] .scope-lens{border:0;box-shadow:none}
/* Scope mask stays behind the HUD so fire, jump and movement remain legible. */
#sniper-scope{z-index:-1}

/* One centred optic layer; controls above it keep their own touch targets. */
#sniper-scope{z-index:19}#sniper-scope .scope-lens{box-sizing:border-box;flex-shrink:0}
#arsenal-skins{display:grid;gap:8px;margin:16px 0}#arsenal-skins[hidden]{display:none}
#arsenal-skins h4,#arsenal-skins p{margin:0}#arsenal-skins p{font-size:12px;color:#b8c8c4}
#arsenal-skins button{min-height:52px;text-align:left;padding:10px 12px 10px 54px;position:relative;border:1px solid #78988b66;border-radius:10px;background:#163138;color:#edf3df}
#arsenal-skins button::before{content:'';position:absolute;left:12px;top:50%;transform:translateY(-50%);width:30px;height:30px;border-radius:7px;background:var(--skin-colors)}
#arsenal-skins button[aria-pressed=true]{border-color:#e0ce96}
.mobile-layout #hud #sandbox-fire:not(.control-layout-custom){width:96px;height:96px;min-height:96px;z-index:15}
.mobile-layout #hud #sniper-aim:not(.control-layout-custom){min-width:78px;width:96px;min-height:56px;height:56px;touch-action:none}
#hud #sandbox-fire>*{pointer-events:none}#hud #sniper-aim{touch-action:none}
/* Leave a finger-width gap after enlarging the default fire target. */
.mobile-layout #hud #sniper-aim:not(.control-layout-custom){bottom:calc(var(--safe-bottom) + 180px)}
.mobile-layout #hud #weapon-status{right:calc(var(--hud-right) + 185px)}
