:root{font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;color:#f2f5e9;background:#132929;font-synthesis:none;--lime:#d1ee7a;--muted:#c3cfbd;--line:rgba(228,243,217,.18)}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;border:0}button:focus-visible,a:focus-visible{outline:3px solid var(--lime);outline-offset:4px}button:disabled{opacity:.4;cursor:not-allowed}[hidden]{display:none!important}#app{position:relative;min-height:650px;height:100dvh;overflow:hidden}#world{position:absolute;width:100%;height:100%;touch-action:none;display:block;inset:0}.vignette{pointer-events:none;position:absolute;inset:0;background:linear-gradient(90deg,rgba(12,32,33,.88),rgba(17,37,34,.1) 65%,rgba(9,24,28,.25)),linear-gradient(0deg,rgba(8,25,28,.7),transparent 40%)}body.battle .vignette{background:linear-gradient(0deg,rgba(8,23,25,.54),transparent 23%,transparent 75%,rgba(8,23,25,.6))}.topbar{position:absolute;z-index:12;top:0;left:0;width:100%;display:flex;justify-content:space-between;align-items:center;padding:25px 4vw}.brand{display:flex;gap:12px;align-items:center;color:inherit;text-decoration:none;font-weight:800;letter-spacing:3px;font-size:23px}.brand-icon{display:grid;place-items:center;border:1px solid #cfe77b;width:38px;height:38px;color:var(--lime);font-size:26px;transform:rotate(-10deg)}.brand-small{display:block;font-size:8px;letter-spacing:2px;margin-top:2px;color:#d0d7c3}.top-right{display:flex;align-items:center;gap:22px}.build{font-size:11px;letter-spacing:2px;color:var(--muted)}.icon-btn{border:1px solid var(--line);background:#17323288;padding:10px 13px;font-size:11px}.screen{position:absolute;inset:100px 5vw 75px;display:flex;justify-content:space-between;gap:50px;align-items:center}.hero-copy{align-self:center;padding-bottom:50px;max-width:600px}.eyebrow{font-size:11px;letter-spacing:3px;color:var(--lime);display:flex;align-items:center;gap:10px}.dot{width:6px;height:6px;background:var(--lime);display:inline-block;border-radius:50%;box-shadow:0 0 16px var(--lime)}h1{font-weight:800;font-size:clamp(46px,5.4vw,80px);line-height:1.2;letter-spacing:2px;margin:26px 0}h1 span{color:var(--lime)}.hero-copy p{font-size:15px;line-height:2;color:#c3d0c5}.hero-tags{display:flex;gap:8px;margin-top:30px}.hero-tags span{font-size:10px;padding:7px 11px;border:1px solid var(--line);color:#d2dbcf}.mission-panel{width:350px;flex-shrink:0;padding:22px;background:rgba(15,35,37,.88);border:1px solid #d1e7c12b;backdrop-filter:blur(15px);box-shadow:0 24px 70px #07161544}.panel-heading{display:flex;justify-content:space-between;font-size:11px;letter-spacing:2px;color:#c8d5c6;margin-bottom:15px}#missions{display:flex;gap:6px}.mission-tab{flex:1;height:43px;background:#ffffff08;border:1px solid var(--line);font-family:monospace;position:relative}.mission-tab.selected{background:var(--lime);color:#192e28;border-color:var(--lime)}.mission-tab.completed:after{content:'•';position:absolute;bottom:0;right:5px;color:#91ad65}.brief{padding:24px 0 20px;min-height:185px}.brief>span{font:10px monospace;letter-spacing:2px;color:var(--lime)}.brief h2{font-size:24px;margin:12px 0}.brief p{font-size:12px;line-height:1.8;color:#bdcbbc;min-height:43px;margin:0}.brief-meta{display:flex;gap:20px;margin-top:15px;font-size:10px;color:#94aa9b}.primary{background:var(--lime);color:#163028;width:100%;padding:16px 20px;display:flex;justify-content:space-between;font-weight:700;font-size:15px}.primary:hover{background:#e0ff90}.secondary{width:100%;padding:15px 0 7px;background:transparent;display:flex;justify-content:space-between;font-size:12px;color:#c9d4c6}.menu-note{font-size:9px;letter-spacing:1px;color:#91a498;margin:15px 0 0}.menu-footer{position:fixed;bottom:25px;left:5vw;right:5vw;display:flex;justify-content:space-between;font-size:10px;color:#c0cbb9;letter-spacing:2px}#hud{position:absolute;inset:0;pointer-events:none}.mission-hud{position:absolute;top:110px;left:4vw;max-width:310px}.mission-hud h2{font-size:22px;margin:10px 0}.mission-hud p{font-size:12px;color:#e1e5d8;margin:0;line-height:1.6;text-shadow:0 1px 4px #000}.health{display:flex;gap:9px;align-items:center;margin-top:17px;font-size:10px}.health>div{height:4px;width:135px;background:#ffffff30}.health i{height:100%;display:block;background:var(--lime);transition:width .3s}.health b{font:11px monospace}.battle-count{position:absolute;top:115px;right:4vw;display:flex;align-items:flex-end;flex-direction:column;gap:10px}.battle-count strong{font:30px monospace}.battle-count span{font:12px monospace;letter-spacing:2px;color:var(--muted)}#crosshair{position:absolute;left:50%;top:50%;width:28px;height:28px;transform:translate(-50%,-50%)}#crosshair i,#crosshair b{position:absolute;background:#ebf8db;box-shadow:0 0 3px #000}#crosshair i{left:13px;top:0;width:1px;height:28px}#crosshair b{top:13px;left:0;height:1px;width:28px}#crosshair:after{content:'';position:absolute;width:3px;height:3px;border-radius:50%;background:var(--lime);left:12px;top:12px}#scope{position:absolute;inset:0;opacity:0;transition:opacity .15s;overflow:hidden}.scope-ring{position:absolute;left:50%;top:50%;width:min(72vh,80vw);height:min(72vh,80vw);border:3px solid #112326;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 200vmax #061215b8,inset 0 0 30px #0008}.scope-h,.scope-v{position:absolute;background:#182823b3}.scope-h{height:1px;left:0;right:0;top:50%}.scope-v{width:1px;top:0;bottom:0;left:50%}.scope-ticks{position:absolute;top:51%;left:50%;transform:translateX(-50%);font-size:22px;color:#152522}.scope-text{position:absolute;bottom:12%;left:50%;transform:translateX(-50%);font:9px monospace;letter-spacing:2px;color:#c7e4b2}body.aiming #scope{opacity:1}body.aiming #crosshair{width:8px;height:8px}body.aiming #crosshair i,body.aiming #crosshair b{display:none}body.aiming #crosshair:after{left:2px;top:2px}#hitmarker{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font:54px monospace;color:var(--lime);opacity:0}#targetLabel{position:absolute;top:calc(50% + 36px);left:50%;transform:translateX(-50%);font-size:11px;letter-spacing:2px;color:#dcedbd;text-shadow:0 2px 3px #000;white-space:nowrap}#feedback{position:absolute;top:34%;left:50%;transform:translateX(-50%);text-align:center;color:var(--lime);font-size:26px;font-weight:bold;opacity:0;text-shadow:0 2px 10px #000;white-space:nowrap}.battle-bottom{position:absolute;bottom:48px;left:4vw;right:4vw;display:flex;justify-content:space-between;align-items:flex-end}.ammo>span{font-size:10px;letter-spacing:2px;color:#d0dac5}.ammo strong{font:48px monospace}.ammo small{font:17px monospace;color:#b7c6ae}.battle-buttons{display:flex;gap:10px;pointer-events:auto}.battle-buttons button{padding:14px 16px;background:#12282ae8;border:1px solid var(--line);font-size:12px}.battle-buttons small{margin-left:8px;font:10px monospace;color:var(--lime)}#hint{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);font-size:11px;color:#d0ddbd;text-align:center;white-space:nowrap}#cancelAim{pointer-events:auto;position:absolute;right:4vw;bottom:115px;padding:13px;background:#263731;border:1px solid var(--line)}#damageFlash{position:absolute;inset:0;box-shadow:inset 0 0 120px #e9513277;opacity:0;transition:opacity .2s}.modal{position:absolute;inset:0;z-index:20;background:#071d22ba;backdrop-filter:blur(9px);display:grid;place-items:center;padding:24px}.modal-card{background:#183333;border:1px solid #abc49644;width:100%;max-width:460px;padding:32px;max-height:90vh;overflow:auto}.modal-card h2{font-size:32px;margin:12px 0 10px}.modal-card p{font-size:13px;line-height:1.8;color:#c0cfba}.result-stars{font-size:30px;letter-spacing:9px;color:var(--lime);margin:20px 0}.stats{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:20px 0;padding:18px 0;text-align:center}.stats strong{display:block;font:24px monospace;margin-bottom:8px}.stats span{font-size:10px;color:var(--muted)}.modal-card .secondary{padding:15px 0;justify-content:center}.upgrade-row{display:flex;align-items:center;justify-content:space-between;padding:16px 0;border-bottom:1px solid var(--line);gap:10px}.upgrade-row strong{display:block;font-size:13px;margin-bottom:5px}.upgrade-row small{font-size:10px;color:#b5c7b4}.upgrade-row button{padding:10px 14px;background:var(--lime);color:#18322b;white-space:nowrap;font-size:12px}.armory-title{display:flex;justify-content:space-between;align-items:center}.armory-title span{color:var(--lime);font:15px monospace}#toast{position:absolute;bottom:85px;left:50%;transform:translateX(-50%);background:#142f2fef;border:1px solid #c5df8244;color:var(--lime);padding:12px 22px;z-index:30;font-size:12px;opacity:0;pointer-events:none;white-space:nowrap}#loadError{position:absolute;inset:30%;background:#213832;padding:30px;z-index:100;line-height:2}body.battle .build{display:none}
@media(max-width:700px){#app{min-height:550px}.topbar{padding:18px 6vw}.brand{font-size:19px}.brand-icon{width:31px;height:31px}.build{display:none}.screen{inset:85px 6vw 40px;display:block;overflow:auto}.hero-copy{padding:0}.hero-copy .eyebrow{font-size:9px;letter-spacing:2px}h1{font-size:39px;line-height:1.12;margin:16px 0 12px}h1 br{display:none}.hero-copy p{font-size:12px;margin:0;line-height:1.7}.hero-copy p br{display:none}.hero-tags{display:none}.mission-panel{width:100%;margin-top:22px;padding:18px;background:#122b2ded}.brief{padding:18px 0 16px;min-height:155px}.brief h2{font-size:22px;margin:8px 0}.brief-meta{margin-top:10px}.menu-note{margin-top:10px}.menu-footer{display:none}.mission-hud{top:88px;left:6vw;max-width:240px}.mission-hud h2{font-size:20px}.mission-hud .eyebrow{font-size:9px}.mission-hud p{max-width:220px;font-size:10px}.battle-count{top:92px;right:6vw}.battle-count strong{font-size:23px}.battle-count span{font-size:10px}.health>div{width:90px}.battle-bottom{bottom:50px;left:6vw;right:6vw}.battle-buttons{gap:6px}.battle-buttons button{padding:13px 12px}.battle-buttons small{display:none}.scope-ring{width:91vw;height:91vw}.modal-card{padding:25px}.modal-card h2{font-size:26px}#feedback{font-size:21px}#hint{font-size:10px}#cancelAim{right:6vw}}@media(max-height:740px) and (max-width:700px){.hero-copy p{display:none}h1{font-size:30px;margin:12px 0}.mission-panel{margin-top:13px;padding:14px}.brief{min-height:130px;padding:12px 0}.brief h2{font-size:20px}.brief p{min-height:30px;font-size:11px}.panel-heading{margin-bottom:10px}.mission-tab{height:36px}.primary{padding:13px 18px}.menu-note{font-size:8px}}

@media(max-width:700px){h1 br{display:block}h1{font-size:35px}}
@media(max-height:740px) and (max-width:700px){h1{font-size:28px}}

.chapter-nav{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px;font-size:12px;color:var(--lime)}.chapter-nav button{width:44px;height:44px;background:#ffffff08;border:1px solid var(--line)}
/* Portrait entry artwork is independent from the playable 3D scene. */
#welcome{position:fixed;inset:0;z-index:200;background:#101f22;overflow:auto;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:space-between;min-height:0;padding:calc(40px + env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left))}
.welcome-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 48%;z-index:-2}
.welcome-shade{position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#071519aa,transparent 37%,#09191d33 60%,#071519ed 100%)}
.welcome-heading{text-align:center;text-shadow:0 2px 20px #0008}.welcome-heading>span{font:10px/1.5 monospace;letter-spacing:4px;color:#d8e6cf}.welcome-heading h1{font-size:clamp(52px,12vw,76px);letter-spacing:14px;margin:16px 0 8px;padding-left:14px;line-height:1.2}.welcome-heading p{font-size:12px;letter-spacing:2px;color:#e2e8df}
.welcome-actions{width:min(100%,360px);text-align:center;margin-top:180px}.welcome-tag{display:block;font-size:10px;letter-spacing:3px;color:#c8d9bb;margin-bottom:14px}.welcome-actions button{min-height:52px;justify-content:center}.welcome-actions p{font-size:11px;line-height:1.6;color:#c8d5c4;margin:12px 0}.welcome-actions a{color:#d7e4cd;text-decoration:none;font-size:12px;display:inline-flex;align-items:center;min-height:44px}.art-unavailable .welcome-art{display:none}
@media(min-aspect-ratio:3/4){.welcome-art{width:auto;min-width:420px;max-width:100%;left:50%;transform:translateX(-50%);object-fit:contain}.welcome-shade{background:linear-gradient(180deg,#071519aa,transparent 40%,#071519ee)}#welcome{padding-top:24px}.welcome-heading h1{font-size:52px}}
@media(max-height:500px){#welcome{flex-direction:row;justify-content:center;gap:32px;padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}.welcome-actions{width:280px;margin-top:0}.welcome-heading{max-width:40%}.welcome-heading h1{font-size:42px}.welcome-heading>span{letter-spacing:2px}}
/* Fit the actual viewport, including browser chrome and device safe areas. */
html,body{height:100%;overscroll-behavior:none}
#app{height:100vh;height:100dvh;min-height:0}
.topbar{padding-top:max(18px,env(safe-area-inset-top))}
.modal{padding-top:max(16px,env(safe-area-inset-top));padding-bottom:max(16px,env(safe-area-inset-bottom))}
.modal-card{max-height:100%;overscroll-behavior:contain}
.screen{overscroll-behavior:contain}
@media(max-width:700px){
 .topbar{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}
 .screen{inset:calc(78px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));padding-bottom:8px}
 .mission-panel{margin-top:14px}
 .icon-btn,.mission-tab,.secondary,.battle-buttons button,.upgrade-row button,#cancelAim{min-height:44px}
 .upgrade-row>div{min-width:0}
 .upgrade-row button{flex-shrink:0}
 .mission-hud{top:calc(78px + env(safe-area-inset-top));left:16px;max-width:calc(100% - 110px)}
 .mission-hud h2{font-size:18px}.mission-hud p{max-width:100%;font-size:12px;line-height:1.65}
 .battle-count{top:calc(82px + env(safe-area-inset-top));right:16px}
 .battle-count strong{max-width:94px;overflow-wrap:anywhere;text-align:right;font-size:20px;line-height:1.35}
 .battle-bottom{bottom:calc(46px + env(safe-area-inset-bottom));left:16px;right:16px}
 #hint{bottom:calc(14px + env(safe-area-inset-bottom));width:calc(100% - 24px);white-space:normal;line-height:1.5}
 #cancelAim{bottom:calc(126px + env(safe-area-inset-bottom));right:16px}
 .scope-ring{width:min(60vw,60dvh);height:min(60vw,60dvh)}
 #loadError{inset:20% 16px;font-size:14px}
 .modal{padding-left:16px;padding-right:16px}
 .modal-card{padding:20px}
}
@media(max-height:500px) and (orientation:landscape){
 .topbar{padding:8px max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left))}.brand{font-size:16px}.brand-icon{width:28px;height:28px}.build{display:none}
 .screen{inset:60px max(16px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));display:flex;align-items:flex-start;overflow:auto;gap:20px}
 .hero-copy{width:36%;flex-shrink:0;padding:0;align-self:flex-start}.hero-copy h1{font-size:28px;margin:12px 0}.hero-copy p,.hero-tags,.menu-footer{display:none}
 .mission-panel{width:auto;flex:1;min-width:0;margin:0;padding:12px}.brief{min-height:0;padding:10px 0}.brief h2{font-size:18px;margin:5px 0}.brief p{min-height:0}.brief-meta{margin-top:5px}.panel-heading{margin-bottom:8px}.mission-tab{height:36px;min-height:36px}.menu-note{display:none}
 .mission-hud{top:62px;left:max(16px,env(safe-area-inset-left));max-width:220px}.mission-hud h2{font-size:16px;margin:4px 0}.mission-hud p{display:none}.health{margin-top:6px}
 .battle-count{top:62px;right:max(16px,env(safe-area-inset-right));gap:3px}.battle-count strong{font-size:22px}
 .battle-bottom{bottom:calc(27px + env(safe-area-inset-bottom))}.ammo strong{font-size:30px}.ammo>span{font-size:9px}#hint{bottom:calc(6px + env(safe-area-inset-bottom));font-size:9px}#cancelAim{bottom:calc(94px + env(safe-area-inset-bottom))}
 .scope-ring{width:60dvh;height:60dvh}
}
.setting-field{display:block;margin:20px 0;font-size:13px;color:var(--muted)}.setting-field input,.setting-field select{display:block;width:100%;margin-top:12px;min-height:36px;accent-color:var(--lime)}.setting-field select{background:#10292a;color:var(--muted);padding:10px;border:1px solid var(--line)}.setting-field output{float:right;color:var(--lime)}@media(max-width:700px){.top-right{gap:6px}.icon-btn{padding:8px}.brand{letter-spacing:1px}}

.account-actions{display:flex;gap:20px}.account-actions .secondary{width:auto;flex:1}.setting-field input[type=checkbox]{display:inline-block;width:20px;min-height:20px;margin:0 8px 0 0;vertical-align:middle}.recovery-code,.setting-field input[type=password]{width:100%;padding:12px;background:#10292a;border:1px solid var(--line);color:#e3eddb;min-height:44px}

/* Treat a hold as a game gesture throughout the HUD. Editable fields keep native selection. */
#app,#app *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
#app input,#app textarea,#app select,#app [contenteditable="true"],#app [data-allow-selection]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
#priorityCue{position:absolute;z-index:3;transform:translate(-50%,-100%);padding:4px 8px;background:#14221edd;border:1px solid #eccb8b99;border-radius:3px;color:#ffe1a4;font-size:11px;font-weight:700;white-space:nowrap;text-shadow:0 1px 2px #000;pointer-events:none;box-shadow:0 2px 8px #0008}
#priorityCue::after{content:"";position:absolute;left:50%;bottom:-7px;width:8px;height:8px;background:#e5bd77;border:1px solid #18211d;transform:translateX(-50%) rotate(45deg)}
#priorityCue.warning{width:23px;height:23px;padding:0;border:0;border-radius:0;background:#491a14;clip-path:polygon(50% 0,100% 88%,94% 100%,6% 100%,0 88%);font-size:0;box-shadow:none}
#priorityCue.warning::before{content:"!";position:absolute;inset:3px 3px 2px;background:#ee4030;clip-path:polygon(50% 0,100% 90%,94% 100%,6% 100%,0 90%);color:#fff5dc;font-size:13px;line-height:20px;text-align:center;font-weight:900;text-shadow:0 1px 1px #511b18}
#priorityCue.warning::after{display:none}
.battle-count{gap:3px}
.battle-count small{font-size:11px;font-weight:600;letter-spacing:.08em;color:#d9e5d4;white-space:nowrap;text-shadow:0 1px 2px #0008}
.battle-count strong{white-space:nowrap;overflow-wrap:normal}

/* A second thumb can fire while the aiming finger stays on the view. */
#fireButton{display:none;pointer-events:auto;position:absolute;right:max(16px,4vw);top:max(190px,22%);width:62px;height:62px;border:5px solid #172625;border-radius:50%;background:#eef0e8;color:#1c302d;font-size:12px;font-weight:800;box-shadow:0 0 0 4px #e9eddf88,0 3px 14px #0008;touch-action:none;z-index:3}
body.battle.aiming #fireButton{display:block}
#fireButton:active{transform:scale(.94);background:#d6ecac}
#gyroToggle{pointer-events:auto;position:absolute;left:max(16px,4vw);bottom:calc(155px + env(safe-area-inset-bottom));z-index:3;min-width:92px;min-height:42px;padding:9px 12px;border:1px solid #d1ee7a77;background:#102b2cdb;color:#d9efaa;font-size:12px;touch-action:manipulation}
#gyroToggle[data-state="waiting"],#gyroToggle[data-state="unavailable"]{border-color:#d6c89188;color:#e5d8aa}
#gyroToggle[data-state="off"]{border-color:#ffffff44;color:#c7cfcb}
@media(max-width:700px){#fireButton{right:16px;top:max(178px,21%);width:58px;height:58px}}
@media(max-width:700px){#gyroToggle{left:16px;bottom:calc(146px + env(safe-area-inset-bottom));min-width:84px;min-height:40px}}
@media(max-height:500px) and (orientation:landscape){#fireButton{top:calc(50% - 29px);right:16px}}

/* The optic is a physical part of the rifle, not a thin HUD circle. Keep the
   aperture and magnification unchanged; these layers only shape its housing. */
.scope-ring{
 border:6px solid #151717;
 box-shadow:0 0 0 3px #090a0a,0 0 0 12px #30302e,0 0 0 19px #121414,0 0 0 22px #5b5750,0 0 0 200vmax #0612153d,inset 0 0 0 2px #716b61,inset 0 0 28px #000a;
}
.scope-ring::before{
 content:"";position:absolute;left:50%;top:-22px;transform:translateX(-50%);
 width:44px;height:18px;border:2px solid #101312;border-radius:5px 5px 2px 2px;
 background:linear-gradient(90deg,#1d201e,#57564f 25%,#343631 58%,#1a1c1b);
 box-shadow:inset 0 2px 0 #797269,0 -2px 3px #0008;
}
.scope-ring::after{
 content:"";position:absolute;left:-18px;top:43%;width:16px;height:32px;
 border:2px solid #101312;border-radius:5px 2px 2px 5px;
 background:linear-gradient(180deg,#55534d,#30322f 55%,#191c1b);
 box-shadow:inset 2px 0 0 #777067;
}
@media(max-width:700px) and (orientation:portrait){
 body.battle[data-battle-mission="22"] .scope-ring{
  width:min(76vw,60dvh);height:min(76vw,60dvh);
  box-shadow:0 0 0 3px #090a0a,0 0 0 12px #30302e,0 0 0 19px #121414,0 0 0 22px #5b5750,0 0 0 200vmax #06121533,inset 0 0 0 2px #716b61,inset 0 0 28px #000a;
 }
}

/* Four clear scope bars keep small heads visible on a phone. The aim point
   remains in the centre; the old range ladder crowded the target. */
.scope-ring .scope-ticks{display:none}
.scope-ring .scope-h,.scope-ring .scope-v{background:none;box-shadow:none}
.scope-ring .scope-h{height:2px;left:8%;right:8%;top:calc(50% - 1px);background:linear-gradient(90deg,#101615 0 47%,transparent 47% 53%,#101615 53% 100%)}
.scope-ring .scope-v{width:2px;top:8%;bottom:8%;left:calc(50% - 1px);background:linear-gradient(#101615 0 47%,transparent 47% 53%,#101615 53% 100%)}

#preparingDialog{width:min(360px,calc(100vw - 48px));border:1px solid #587366;background:#142f2e;color:#e6eddf;padding:24px}#preparingDialog h2{font-size:24px}#preparingDialog p{line-height:1.8}#preparingDialog::backdrop{background:#071a1cbb}

#graphicsNotice{position:fixed;z-index:150;top:env(safe-area-inset-top,0px);left:0;right:0;padding:16px 20px;background:#233c32;color:#f2f0ce;text-align:center;font-size:14px;line-height:1.6;border-bottom:1px solid #a5ad74}
.candidate-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.candidate-stats strong{font-size:22px}
.candidate-stats span{font-size:9px}
#briefStars{font-size:12px;line-height:1.65;color:#c9dba8}
.star-details{list-style:none;padding:0;margin:18px 0;text-align:left}
.star-details li{padding:10px 0;border-bottom:1px solid #d1ee7a25;line-height:1.6}
.star-details small{color:#aebdad}

/* Result hierarchy: keep the outcome, tactical numbers and next action visible on a phone. */
#modal:has(.result-screen){background:#06181baa;backdrop-filter:blur(3px)}
.modal-card:has(.result-screen){max-width:420px;padding:0;background:#122929f2;border-color:#bda66d;box-shadow:0 24px 80px #071518b3}
.result-screen{padding:0 22px 17px}
.result-banner{margin:0 -22px 12px;padding:25px 22px 15px;background:linear-gradient(120deg,#806633 0%,#473c2a 20%,#1d3735 70%,#112c2d 100%);border-bottom:2px solid #d7bd73}
.result-screen.lost .result-banner{background:linear-gradient(120deg,#623f36,#193234 70%);border-bottom-color:#bb8a7a}
.result-banner .eyebrow{color:#f4d68f;font-weight:700}
.result-banner h2{margin:8px 0 4px;font-size:30px;letter-spacing:2px;text-shadow:0 2px 8px #071615}
.result-banner p{margin:0;color:#e3e7d9;font-size:12px}
.result-banner .result-stars{margin:8px 0 0;color:#ffe28b;font-size:29px;line-height:1}
.result-section-label{font-size:11px;letter-spacing:2px;color:#e5d9ac}
.result-screen .stats{margin:8px 0;padding:11px 0;border-color:#d7bd7345}
.result-screen .stats strong{font-size:22px;margin-bottom:3px}
.result-screen .candidate-stats{border-top:0;margin-top:-9px}
.result-goals{border-top:1px solid #d7bd7345;border-bottom:1px solid #d7bd7345;margin:10px 0}
.result-goals summary{list-style:none;cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#e9ebdd}
.result-goals summary::-webkit-details-marker{display:none}
.result-goals summary:after{content:'⌄';font-size:19px;color:#e4d38d;margin-left:8px}
.result-goals[open] summary:after{transform:rotate(180deg)}
.result-goals summary span{margin-left:auto;color:#e4d38d;font:13px monospace}
.result-goals .star-details{margin:0 0 10px;font-size:12px}
.result-goals .star-details li{padding:6px 0}
.result-reward{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:12px 0 14px;padding:12px 14px;background:#856a3350;border:1px solid #e1c67883}
.result-reward>span{white-space:nowrap;color:#e9d9a2;font-size:11px;letter-spacing:1px}
.result-reward #rewardStatus{margin:0;text-align:right;color:#fff0b8;font-size:13px;font-weight:700;line-height:1.35}
.result-screen .primary{min-height:47px}
.result-screen .secondary{min-height:42px;align-items:center}
@media(max-width:700px){.result-banner{padding-top:19px}.result-screen{padding-bottom:10px}.result-screen .candidate-stats span{font-size:9px}}

#challenges{margin:24px 0;padding-top:16px;border-top:1px solid var(--line)}
.longrange-jump{display:block;width:100%;min-height:44px;margin-top:8px;padding:8px 10px;background:#193b37;color:#e0eba7;border:1px solid #b3c87566;text-align:center;font-size:12px;}
#challenges .challenge-description{font-size:12px;line-height:1.7;color:var(--muted);margin:8px 0 20px}
.mission-tab.completed:after{content:attr(data-stars);left:0;right:0;bottom:2px;text-align:center;font-size:9px;letter-spacing:0;color:var(--lime)}
.mission-tab.completed.selected:after{color:#31402b}
@media(min-width:701px){.mission-panel{max-height:100%;overflow-y:auto;overscroll-behavior:contain}}

@media (pointer:coarse),(max-width:700px){.keyboard-help{display:none}}

/* Keep mission text readable over bright sky without covering the aiming area. */
body.battle .mission-hud,body.battle .battle-count{
 background:#0b2528;
 box-shadow:0 0 0 8px #0b2528;
 border-radius:2px;
 isolation:isolate;
 transform:translateZ(0);
 backface-visibility:hidden;
}
body.battle .battle-count span{color:#e1e5d8}

/* Compact tactical hit confirmation for portrait combat. */
#hitmarker{width:24px;height:24px;font-size:0;pointer-events:none;transition:opacity .06s;}
#hitmarker::before{content:"";position:absolute;left:5px;top:5px;width:14px;height:14px;border:1.5px solid #e8e7d9;transform:rotate(45deg);box-shadow:0 0 5px #111b1acc;}
#hitmarker::after{content:"";position:absolute;left:10px;top:10px;width:4px;height:4px;border-radius:50%;background:#e8e7d9;}
#hitmarker.headshot::before{border-color:#f1c987;box-shadow:0 0 7px #e1a75d99;}
#hitmarker.headshot::after{background:#f1c987;}
#hitmarker.body-hit::before{left:8px;top:8px;width:8px;height:8px;border-color:#d6ded0aa;box-shadow:none;}
#hitmarker.body-hit::after{left:11px;top:11px;width:2px;height:2px;background:#d6ded0bb;}
#hitmarker.object-hit::before{border-color:#b8c5bb;}
#hitmarker.object-hit::after{background:#b8c5bb;}
#feedback{width:max-content;font-size:14px;font-weight:600;line-height:1.35;letter-spacing:.07em;padding:7px 12px;background:#102b2bd9;border:1px solid #bad0b344;max-width:calc(100vw - 32px);white-space:normal;text-shadow:0 1px 3px #000;pointer-events:none;}
#feedback[data-tone="head"]{top:22%;min-width:150px;color:#ffe3a6;background:transparent;border:0;padding:0 10px;display:flex;flex-direction:column;align-items:center;gap:1px;text-shadow:0 2px 4px #000,0 0 12px #db9b46a6;box-shadow:none;}
#feedback[data-tone="head"] .headshot-range{font-size:clamp(19px,5.3vw,25px);font-weight:800;line-height:1;letter-spacing:.06em;color:#ffdb76;}
#feedback[data-tone="head"] .headshot-title{font-size:clamp(37px,10vw,53px);font-weight:900;line-height:1.12;letter-spacing:.12em;color:#fff0ca;-webkit-text-stroke:.5px #623411;}
#feedback[data-tone="head"] .headshot-detail{font-size:12px;line-height:1.5;letter-spacing:.3em;color:#fff0ca;border-top:1px solid #fff0ca99;min-width:134px;}
#feedback[data-tone="body"]{color:#e7e9dc;border-color:#d2d8c066;}
/* Keep follow-up shot feedback clear of the optic while the player is aiming. */
body.aiming #feedback:not([data-tone="head"]){top:calc(50% - min(38vw, 30vh) - 46px);}
/* Keep the shot confirmation clear of the right-side fire control on narrow phones. */
@media(max-width:380px){
 body.aiming #feedback:not([data-tone="head"]){left:calc((100% - 84px)/2);max-width:calc(100% - 104px);}
}
.m24-study-credit{position:absolute;z-index:14;left:16px;bottom:9px;max-width:calc(100% - 32px);font-size:10px;line-height:1.4;color:#d9e8c8;text-shadow:0 1px 4px #071715;text-decoration:underline;text-underline-offset:2px}
body.battle .m24-study-credit{display:none}

/* In portrait combat, the persistent logo consumes the same strip as the
   mission brief. Keep settings accessible while giving the scene more room. */
@media(max-width:700px){
 body.battle .topbar{display:none}
 body.battle .mission-hud{top:calc(20px + env(safe-area-inset-top))}
 body.battle .battle-count{top:calc(74px + env(safe-area-inset-top))}
}

/* Let the portrait battlefield begin near the top of the screen. Keep the
   objective fully readable rather than truncating the changing mission hint. */
@media(max-width:700px) and (min-height:501px){
 body.battle .mission-hud{top:calc(16px + env(safe-area-inset-top));left:max(16px,env(safe-area-inset-left));right:94px;max-width:none}
 body.battle .mission-hud h2{font-size:17px;margin:3px 0 4px}
 body.battle .mission-hud p{max-width:none;font-size:11px;line-height:1.4}
 body.battle .mission-hud .health{margin-top:5px;gap:6px}
 body.battle .mission-hud .health>div{width:70px}
 body.battle .battle-count{top:calc(16px + env(safe-area-inset-top));right:max(16px,env(safe-area-inset-right));gap:3px}
 body.battle .battle-count strong{font-size:22px}
}
@media(max-width:700px) and (min-height:501px){
 body.battle[data-battle-mission="22"] .mission-hud .eyebrow{display:none}
 body.battle[data-battle-mission="22"] .mission-hud h2{margin-top:0}
 body.battle[data-battle-mission="22"] .mission-hud{background:transparent;box-shadow:none;text-shadow:0 1px 5px #071b1c,0 2px 9px #071b1c}
}

/* Show the full brief at deployment, then clear the sky during long-range
   play. The objective remains in the DOM and reappears on retry. */
@media(max-width:700px){
 body.battle.longrange-hud-compact .mission-hud{
  top:calc(12px + env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));right:auto;
  max-width:calc(100vw - 112px);padding:0;background:transparent;box-shadow:none;
  text-shadow:0 1px 5px #071b1c,0 2px 9px #071b1c;
 }
 body.battle.longrange-hud-compact .mission-hud .eyebrow,
 body.battle.longrange-hud-compact .mission-hud p{display:none}
 body.battle.longrange-hud-compact .mission-hud h2{font-size:12px;line-height:1.2;margin:0 0 3px}
 body.battle.longrange-hud-compact .mission-hud .health{font-size:9px;margin-top:0;gap:5px}
 body.battle.longrange-hud-compact .mission-hud .health>div{width:52px}
 body.battle.longrange-hud-compact .battle-count{
  top:calc(12px + env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));
  gap:0;background:transparent;box-shadow:none;text-shadow:0 1px 5px #071b1c,0 2px 9px #071b1c;
 }
 body.battle.longrange-hud-compact .battle-count strong{font-size:18px}
 body.battle.longrange-hud-compact .battle-count span{font-size:10px}
}

