/* v14 touch-first landscape geometry. Components live in ui-game.css. */
:root{--safe-left:max(12px,env(safe-area-inset-left));--safe-right:max(12px,env(safe-area-inset-right));--safe-top:max(8px,env(safe-area-inset-top));--safe-bottom:max(8px,env(safe-area-inset-bottom))}
html,body,#game{height:100%;height:100dvh;width:100%;overflow:hidden;overscroll-behavior:none;touch-action:none;-webkit-user-select:none;user-select:none}input{user-select:text}
/* The squad is real information, not decoration: guard count, deputy cooldown
   and formation pulse were being written every frame into a display:none box.
   It is a compact strip now; only the truly redundant helpers stay hidden. */
/* The combo caption is live combat feedback: it names the stage of the
   three-hit chain on every attack. Only the genuinely redundant helpers go. */
kbd,.mini-help,.corner-brand,.scene-label,.map-legend,.map-heading,#connection-status{display:none}
#hud{position:fixed;inset:var(--safe-top) var(--safe-right) auto var(--safe-left);height:84px;pointer-events:none}#hud button{pointer-events:auto}.hero-panel{position:absolute;left:0;top:0;width:204px;min-height:72px}#hud .timer{position:absolute;left:50%;top:57px;transform:translateX(-50%);width:166px}.hud-right .kills{position:absolute;top:78px;left:4px;width:190px}
#pause-btn{position:fixed;right:var(--safe-right);top:var(--safe-top);width:44px;height:44px}#chapter-hud{position:fixed;top:var(--safe-top);left:50%;transform:translateX(-50%);min-width:190px;pointer-events:none}#map-panel{position:fixed;right:calc(var(--safe-right) + 54px);top:var(--safe-top);width:94px;height:94px}#mobile-toolbar{position:fixed;right:var(--safe-right);top:calc(var(--safe-top) + 51px);display:grid;gap:7px}#mobile-toolbar button{width:44px;height:44px}
#bottom-hud{position:fixed;inset:0;pointer-events:none}.actions{position:absolute;right:calc(var(--safe-right) + 5px);bottom:calc(var(--safe-bottom) + 5px);pointer-events:auto}.ability{width:76px;height:76px;min-height:0}.ability.ultimate{width:100px;height:100px}.objective{position:fixed;left:50%;bottom:calc(var(--safe-bottom) + 74px);transform:translateX(-50%);max-width:calc(100vw - 430px)}#skill-bar{position:fixed;left:50%;bottom:calc(var(--safe-bottom) + 8px);transform:translateX(-50%);display:flex;gap:8px;pointer-events:auto}
#touch-pad{position:fixed;left:calc(var(--safe-left) + 14px);bottom:calc(var(--safe-bottom) + 4px);width:142px;height:142px;z-index:12;display:none;touch-action:none;border-radius:50%;background:#1d485c26;border:2px solid #f3fbff99;box-shadow:0 0 0 1px #24475944;cursor:grab}#touch-base{position:absolute;inset:32px;border:1px solid #d0ecf9a1;background:#bce3f356;border-radius:50%;box-shadow:inset 0 3px 7px #173b4c20}#touch-knob{position:absolute;inset:5px;border:2px solid #fff9;border-radius:50%;background:#f1fbffb8;box-shadow:0 3px 7px #0f314d33;pointer-events:none}#touch-pad>span{position:absolute;bottom:9px;width:100%;text-align:center;font-size:var(--fs-nano);color:#fff;text-shadow:0 1px 3px #1c394c}#touch-pad.held{background:#bde5ee4d}body[data-mode=playing] #touch-pad{display:block}
body:not([data-mode=playing]) #bottom-hud,body:not([data-mode=playing]) #mobile-toolbar{pointer-events:none}
.overlay{padding:var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);overflow:hidden}.overlay button{touch-action:manipulation}.dialog,.event-dialog,.book-wrap,.upgrade-wrap,.intro-card{max-height:calc(100dvh - var(--safe-top) - var(--safe-bottom));overscroll-behavior:contain;touch-action:pan-y;overflow:auto}.selected-hero,.prebattle-roster,#build-list,#result-build,#event-options,#ranking-body{touch-action:pan-y;overscroll-behavior:contain}
#loadout{padding:0}.loadout-wrap>.loadout-top{padding-left:var(--safe-left);padding-right:var(--safe-right);padding-top:var(--safe-top)}.prebattle-layout{padding-left:var(--safe-left);padding-right:var(--safe-right)}#launch-row{padding-left:var(--safe-left);padding-right:var(--safe-right);padding-bottom:max(10px,env(safe-area-inset-bottom))}
#interact-prompt{position:fixed;right:calc(var(--safe-right) + 118px);bottom:calc(var(--safe-bottom) + 99px);width:152px;min-height:52px}#elite-health{position:fixed;top:107px;left:50%;transform:translateX(-50%);width:220px;max-width:32vw}#boundary-warning{bottom:calc(var(--safe-bottom) + 145px)}#extraction-panel{position:fixed;top:121px;left:calc(var(--safe-left) + 4px);width:204px}#guide-bar{left:50%;bottom:calc(var(--safe-bottom) + 78px);top:auto;transform:translateX(-50%);max-width:min(46vw,220px)}#notice-feed{left:calc(var(--safe-left) + 8px);top:calc(var(--safe-top) + 116px);bottom:calc(var(--safe-bottom) + 150px);justify-content:flex-start;overflow:visible}.elite-intro{padding:calc(var(--safe-top) + 4px) var(--safe-right) calc(var(--safe-bottom) + 4px) var(--safe-left)}
#rotate-gate{display:none;position:fixed;inset:0;z-index:1000;background:#eef5fb;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:32px;color:var(--ui-ink)}#rotate-gate img{width:110px;height:110px;animation:rotate-hint 2s ease-in-out infinite}#rotate-gate h2{font-size:26px;margin:22px 0 10px}#rotate-gate p{font-size:var(--fs-lead);line-height:1.7}#rotate-gate small{font-size:var(--fs-body);line-height:1.9;color:var(--ui-muted);margin-top:22px}@keyframes rotate-hint{0%,20%{transform:rotate(-8deg)}65%,100%{transform:rotate(8deg)}}
@media(orientation:portrait){#rotate-gate{display:flex}#touch-pad{display:none!important}}
@media(max-height:420px){.intro-card{padding:17px 24px;gap:5px 24px}.intro-card h1{font-size:78px}.intro-card h2{font-size:var(--fs-title)}.intro-card .intro-copy{font-size:var(--fs-cap)}.hero-story{display:none}.chosen-heading canvas{width:60px;height:60px}.chosen-heading h3{font-size:25px}.selected-hero,.prebattle-roster{padding:10px}.hero-card{padding-top:17px}.hero-card canvas{width:50px;height:50px}.hero-card small{display:none}.prebattle-layout{padding-top:8px;padding-bottom:8px}.solo-note{display:none}.card{min-height:204px;padding:12px}.card h3{font-size:var(--fs-display)}.card-icon{width:49px;height:49px}.card-icon .game-icon{width:44px;height:44px}.upgrade-wrap h2{font-size:25px}}
@media(max-width:740px){.prebattle-layout{grid-template-columns:43% minmax(0,1fr);gap:9px}.hero-grid{gap:6px}.hero-card{padding-left:2px;padding-right:2px}.hero-card b{font-size:var(--fs-lead)}.hero-card canvas{width:44px;height:44px}.hero-card em{font-size:var(--fs-nano)}.roster-tier{font-size:var(--fs-nano)!important}.hero-skills b{font-size:var(--fs-cap)}.hero-skills small{font-size:var(--fs-nano)}.hero-skills article{padding:6px 4px;gap:5px}.hero-skills em{font-size:var(--fs-nano)}.roster-heading h3{font-size:var(--fs-title)}#roster-count{font-size:var(--fs-nano)}.hero-panel{width:184px}.avatar{width:44px;height:44px}.hero-line b{font-size:var(--fs-title)}.hud-right .kills{width:174px}.objective{max-width:calc(100vw - 380px)}#touch-pad{width:124px;height:124px}#touch-base{inset:27px}.ability{width:68px;height:68px}.ability.ultimate{width:88px;height:88px}.ability-mark{width:32px;height:32px}.ultimate .ability-mark{width:43px;height:43px}.ability b{font-size:var(--fs-nano)}.actions{gap:10px}.skill-slot{width:51px;height:51px}.skill-slot>span,.skill-slot .game-icon{width:38px;height:38px}#skill-bar{gap:7px}.card p{font-size:var(--fs-cap)}.card-tag{font-size:var(--fs-nano)}.card-value{font-size:var(--fs-nano)}.card-icon{width:44px;height:44px}.card-icon .game-icon{width:40px;height:40px}.card-tag{max-width:calc(100% - 65px)}.intro-card{gap:5px 16px;padding:16px 21px}.lobby-actions button{font-size:var(--fs-cap)}}
@media(max-height:365px){.intro-copy{display:none}.intro-card h1{font-size:66px}.intro-card #start{min-height:49px}.intro-card h2{font-size:var(--fs-title)}.title-en{font-size:var(--fs-nano)}.loadout-wrap>.loadout-top{min-height:48px}.loadout-wrap>.loadout-top h2{font-size:var(--fs-title)}.prebattle-layout{padding-top:6px;padding-bottom:6px}#launch-row{padding-top:5px;min-height:56px}.chosen-heading canvas{width:52px;height:52px}.card{min-height:176px;padding:9px}.card p{margin-bottom:5px;font-size:var(--fs-cap)}.card h3{font-size:var(--fs-title)}.card-icon{width:39px;height:39px;margin-bottom:4px}.card-icon .game-icon{width:37px;height:37px}.card-value{padding-top:5px}.card-choose{margin-top:3px}.upgrade-wrap h2{font-size:23px}.upgrade-wrap>p{margin-bottom:8px}.hero-panel{min-height:66px}.hud-right .kills{top:72px}#chapter-hud{padding:4px 12px}#chapter-name{font-size:var(--fs-title)}#hud .timer{top:52px}#elite-health{top:99px}}

/* Two complete roster rows at the primary phone size. */
@media(max-height:420px){#hero-options .hero-card{padding:14px 4px 5px}#hero-options .hero-card.selected{padding:13px 3px 4px}#hero-options canvas{width:44px;height:44px;margin:0 auto}#hero-options .hero-card b{line-height:18px;font-size:var(--fs-lead)}#hero-options .hero-card em{font-size:var(--fs-nano);line-height:11px;margin-top:3px}.roster-heading{margin-bottom:7px}}

/* Compact notices occupy the gap below score and above the movement stick. */
#notice-feed .notice.important{max-width:min(42vw,240px)}

/* Camera action stays separate from skill and movement touch areas. */
#world{touch-action:none}#camera-reset{position:fixed;right:calc(var(--safe-right) + 78px);top:calc(var(--safe-top) + 101px);width:44px;height:44px;min-height:44px;padding:3px;border:1px solid #fff9;border-radius:13px;background:#203d50d9;box-shadow:0 3px 8px #173e5533;pointer-events:auto;z-index:13;display:flex;align-items:center;justify-content:center;flex-direction:column}#camera-reset .game-icon{width:23px;height:23px}#camera-reset small{font-size:var(--fs-nano);line-height:11px;color:#fff}body:not([data-mode=playing]) #camera-reset{visibility:hidden}

@media(max-width:740px){
 /* 667 wide leaves 150..406 free between the stick and the buttons. The bar is
    centred in that band instead of the viewport, or a fourth slot slides under
    闪避 and becomes untappable. */
 #skill-bar{left:calc(var(--safe-left) + 156px);right:calc(var(--safe-right) + 264px);
  transform:none;justify-content:center}
 #skill-bar{gap:6px}
 .skill-slot{width:48px;height:48px}
}
