/* Game adapter for the shared Asgard design tokens. Combat simulation/ranges are unchanged; HUD layout is explicitly adapted. */
body,button,input,select{font-family:var(--ag-font-sans);font-synthesis:none}
#hub,.modal,.result-card{font:var(--ag-type-body1)}
#modal #modal-title,.result-card h2{font:var(--ag-type-h2)}
#modal-content,#modal-footer,.option-card,.option-card p,.reason,.product-guide,.hub-story{font:var(--ag-type-body1)}
#modal-content label,.control-binding-grid label,.control-mode,.signature-description span,.loadout-grid label,.tool-permissions,.inline-feedback,.hero-summary p{font:var(--ag-type-body2)}
#modal-content button,#modal-footer button,.hub-launch button,.planning-tabs button,.hub-panel #hero-roster button{font:500 var(--ag-body2-size)/var(--ag-body2-line) var(--ag-font-sans);min-height:var(--ag-touch-target);border-radius:var(--ag-control-radius)}
#modal-content select,.loadout-grid select,.control-binding-grid select,.control-mode select{font-family:var(--ag-font-sans);font-size:var(--ag-body1-size);line-height:var(--ag-body1-line);min-height:var(--ag-touch-target);border-radius:var(--ag-control-radius)}
#modal,.result-card{border-radius:var(--ag-dialog-radius)}
.option-card,.job-preview,.guided-loadout,.hero-hud,.battle-top,#tutorial-card{border-radius:var(--ag-card-radius)}
.hub-panel{border-radius:var(--ag-dialog-radius)}
.fiction-note,.small-label,.eyebrow,.product-guide small,.job-preview figcaption,.equipped-summary,.lesson-checklist,.swap-preview,.guided-loadout small{font:var(--ag-type-caption)}
#hub-skills .skill-chip{font:var(--ag-type-body2);min-height:var(--ag-touch-target)}
#hero-name{font:var(--ag-type-h2)}
.hero-summary>div>span{font:var(--ag-type-caption)}
button:focus-visible,select:focus-visible,input:focus-visible,a:focus-visible{outline:var(--ag-focus-width) solid var(--ag-ui-accent);outline-offset:2px;box-shadow:0 0 0 var(--ag-focus-halo) color-mix(in srgb,var(--ag-ui-accent) 50%,transparent)}
/* Status labels have a real caption floor, not a locale-specific shrinking escape hatch. */
.core-side b,.core-side span,.battle-score,.battle-score small,.hero-hud b,.hero-hud span,.hero-hud small,#hero-energy-value{font:var(--ag-type-caption)}
#modal-close,.hero-hud .icon-button{min-width:48px;min-height:48px}
.platform-home,#practice-target-label{min-height:48px}
.hero-hud b{font-weight:600}.battle-score{gap:2px}
#attack-status,#event-caption,#aim-message,#objective-toast,#practice-target-label,#recenter.detached{font:var(--ag-type-caption);line-height:var(--ag-caption-line)}
#game-shell.tutorial-active #tutorial-card>b{font:500 var(--ag-body2-size)/var(--ag-body2-line) var(--ag-font-sans)}
#game-shell.tutorial-active #tutorial-card>span{font:var(--ag-type-caption)}
#game-shell.tutorial-active #tutorial-card p,html[lang="en"] #game-shell.tutorial-active #tutorial-card p{font:var(--ag-type-caption);max-height:32px;overflow:auto}
#game-shell.tutorial-active #tutorial-help{font:var(--ag-type-caption)!important;min-height:48px;width:48px}
.tactical-tools button{min-width:60px;min-height:56px}
.tactical-tools button>span,.tactical-tools button>small,html[lang="en"] .tactical-tools button>span{font:var(--ag-type-caption);line-height:16px;max-width:100%}
#signature-button>span,#tool-aegis>span,#tool-rally>span,#ultimate-button>span{font:500 13px/16px var(--ag-font-sans);white-space:normal;max-width:100%;display:block;overflow:visible;overflow-wrap:normal}
#signature-button>small,#tool-aegis>small,#tool-rally>small,#ultimate-button>small,#attack-button>small{font:var(--ag-type-caption);line-height:16px;min-height:16px;white-space:nowrap;margin:0}
#ultimate-button em{font:500 12px/16px var(--ag-font-sans);letter-spacing:.5px}
#attack-button>span{font:500 15px/20px var(--ag-font-sans)}
.combat-tools{width:276px;height:178px}
.combat-tools #signature-button{width:72px;height:72px;right:84px;top:24px}
.combat-tools #tool-aegis{width:68px;height:68px;left:auto;right:164px;top:42px}
.combat-tools #tool-rally{width:64px;height:64px;left:0;top:auto;bottom:0}
.combat-tools #ultimate-button{width:78px;height:78px;right:0;top:0}
.combat-tools #attack-button,.combat-tools #aim-cancel{width:76px;height:76px;right:43px;bottom:0}
.combat-tools #tool-aegis .skill-picture{width:24px;height:24px}
.combat-tools #signature-button .skill-picture{width:28px;height:28px}
.combat-tools #ultimate-button .skill-picture{width:30px;height:30px}
.skill-keycap{font:500 12px/16px var(--ag-font-sans);min-width:22px}
@media(hover:hover) and (pointer:fine){#joystick:after{font:500 12px/16px var(--ag-font-sans)}}
.game-language{font:500 13px/20px var(--ag-font-sans);min-height:40px}
@media(pointer:coarse),(max-width:767px){
 .game-language,#modal-content select,.loadout-grid select,.control-binding-grid select,.control-mode select{font-size:16px;min-height:48px}
 .battle-top>.game-language{min-width:60px;max-width:66px;padding:4px}
 .battle-top .icon-button{min-height:48px;min-width:48px}
}
@media(max-height:600px) and (orientation:landscape){
 .battle-top{height:52px;min-height:52px;gap:6px}
 .hero-hud{top:65px;min-height:68px;max-width:232px}.hero-hud>div,html[lang="en"] .hero-hud>div{width:118px}
 #minimap{top:65px}
 #game-shell.tutorial-active #tutorial-card{top:65px;min-height:76px;padding-right:54px}
 #attack-status{top:145px;max-width:38%}
 #objective-toast{top:65px}
 #aim-message{bottom:190px;max-width:44%}
 .tactical-tools{left:132px!important;gap:6px}.tactical-tools button{width:64px;height:56px}
 #event-caption{left:14px;top:145px;bottom:auto;transform:none;width:232px;max-width:36%;text-align:left;padding:4px 6px}
}
@media(max-width:460px){
 .battle-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 62px;height:auto;min-height:86px;gap:3px 6px;padding:6px}
 .battle-top>.core-side:first-child{grid-column:1;grid-row:1}
 .battle-top>.core-side.enemy{grid-column:2;grid-row:1}
 .battle-top>#pause-button{grid-column:3;grid-row:1;width:48px;height:48px;min-height:48px;justify-self:end}
 .battle-top>.battle-score{grid-column:1 / 3;grid-row:2;display:flex;flex-wrap:wrap;justify-content:center;gap:3px 8px}
 .battle-top>.game-language{grid-column:3;grid-row:2;min-height:48px}
 .hero-hud{top:106px}.hero-hud>div,html[lang="en"] .hero-hud>div{width:112px}
 #minimap{top:106px}
 #game-shell.tutorial-active #tutorial-card{top:178px;left:10px;right:10px;width:auto;max-width:none;min-height:76px;padding-right:54px}
 #attack-status{bottom:295px;font:var(--ag-type-caption)}
 #aim-message{bottom:295px;max-width:calc(100% - 24px)}
 #objective-toast{top:178px;max-width:calc(100% - 24px)}
 .combat-tools{width:276px}
 #joystick{left:10px;width:88px;height:88px}#stick-knob{left:19px;top:19px}
 .tactical-tools{left:132px;bottom:200px;gap:6px}
 #event-caption{bottom:350px}
}
/* Compact captions stay inside their hit target; full reason remains in title/ARIA. */
.combat-tools button>small{display:block;width:calc(100% + 14px);max-width:calc(100% + 14px);overflow:hidden;text-overflow:ellipsis}
@media(max-width:460px){
 .battle-top{min-height:110px}
 .battle-top .core-side{flex-wrap:wrap;gap:2px 5px}
 .battle-top .core-side b{display:block;flex-basis:100%;font:var(--ag-type-caption)}
 .battle-top .core-side meter{min-width:35px}
 .battle-top .core-side.enemy b{order:-1}
 .hero-hud,#minimap{top:134px}
 #game-shell.tutorial-active #tutorial-card,#objective-toast{top:210px}
 .battle-score small{white-space:normal;max-width:100%}
}
/* Device-independent operation icons; no unsupported Unicode glyph fallback. */
#recenter:before{content:"";display:inline-block;width:20px;height:20px;flex:none;background:linear-gradient(currentColor,currentColor) center/1px 100% no-repeat,linear-gradient(currentColor,currentColor) center/100% 1px no-repeat,radial-gradient(circle,transparent 5px,currentColor 5px,currentColor 6px,transparent 6px)}
#recenter.detached{display:flex;align-items:center;justify-content:center;gap:4px;flex-direction:column}
#aim-cancel{display:flex;align-items:center;justify-content:center;gap:4px;flex-direction:column;font:var(--ag-type-caption)}
#aim-cancel:before{content:"";display:block;width:18px;height:18px;background:linear-gradient(45deg,transparent 45%,currentColor 46%,currentColor 54%,transparent 55%),linear-gradient(-45deg,transparent 45%,currentColor 46%,currentColor 54%,transparent 55%)}
/* Transient receipts have their own row; they never cover the fixed clock/core HUD. */
#toast{top:66px;bottom:auto;max-width:min(320px,46%);padding:6px 10px;font:var(--ag-type-caption);line-height:16px;border-radius:var(--ag-control-radius);text-align:center}
@media(max-height:600px) and (orientation:landscape){
 #objective-toast{top:104px;max-width:40%;min-height:40px}
 #game-shell.tutorial-active #toast{top:auto;bottom:190px;max-width:44%}
 #attack-status{width:220px;max-width:34%;line-height:16px}
}
@media(max-width:460px){
 #toast{top:206px;max-width:calc(100% - 24px);width:max-content}
 #objective-toast{top:248px}
 #game-shell.tutorial-active #toast{top:auto;bottom:390px}
}
@media(hover:hover) and (pointer:fine){#joystick:after{letter-spacing:0;word-spacing:0;padding:2px 5px;border-radius:4px;background:#0b2936b8}}
/* Idle instructions remain on the attack button's accessible help, not a permanent battlefield placard. */
#game-shell:not(.tutorial-active) #battle-ui:has(#attack-button[data-state="idle"]) #attack-status{display:none}
@media(max-height:600px) and (orientation:landscape){.hero-hud>div,html[lang="en"] .hero-hud>div{width:96px}}
@media(min-width:461px) and (max-height:600px) and (orientation:landscape){
 /* The center notification rail sits between champion and minimap, never on either card. */
 #toast{top:104px;left:calc(50% + 24px);max-width:42%}
 #objective-toast{top:65px;left:calc(50% + 24px);max-width:42%;min-height:32px;padding:4px 8px}
 #game-shell.tutorial-active #toast{top:auto;bottom:190px;left:50%}
}

/* Same language component as the hall and guide; compact combat trigger keeps its full accessible label. */
.game-language-host{display:inline-flex;flex:none}.experience-status{font:var(--ag-type-caption);color:var(--ag-ui-secondary)}
.battle-top #battle-locale .ag-language,.battle-top #battle-locale .ag-language__trigger{inline-size:48px;min-inline-size:48px;min-block-size:48px;padding:8px}
.battle-top #battle-locale .ag-language__label,.battle-top #battle-locale .ag-language__chevron{display:none}
.game-language-host .ag-language__menu{z-index:200}

.frontline-status{position:absolute;top:84px;right:12px;max-width:min(320px,80vw);max-height:45vh;overflow:auto;padding:10px;background:var(--color-surface,#171b27);color:var(--color-text,#fff);border:1px solid currentColor;border-radius:8px;pointer-events:auto;font-size:12px;z-index:5}
.frontline-status[hidden]{display:none}.frontline-status summary{cursor:pointer;min-height:32px}.frontline-status p{margin:8px 0}.frontline-status small{display:block}
@media(max-height:500px){.frontline-status{top:64px;max-height:35vh;max-width:260px}}

/* Keep a real language menu above expanded frontline details. */
.battle-top:has(.ag-language[data-open="true"]){z-index:8}

#frontline-support-mode{position:absolute;left:12px;bottom:130px;z-index:4;display:flex;gap:4px;max-width:260px}#frontline-support-mode[hidden]{display:none}#frontline-support-mode button{font-size:12px;min-height:44px;padding:6px}#frontline-support-mode [aria-pressed="true"]{outline:2px solid var(--ag-ui-focus,#e9cf8e)}

.ruleset-choice{display:grid;gap:6px;margin:10px 0}.ruleset-choice select{width:100%;min-height:44px}.ruleset-choice small{line-height:1.5;font-size:12px}#battle-ruleset-label{font:var(--ag-type-caption);max-width:220px}#tutorial-card[data-stage^="frontline-"]{max-height:35vh;overflow:auto}

/* Team shapes match actual HP-bar cues; color alone is insufficient. */
.core-side b:before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;background:#b7eef3;border-radius:50%;border:1px solid #102a2c}.core-side.enemy b:before{background:#f3b4bd;border-radius:0;transform:rotate(45deg)}

/* Explicit material preview never advertises a nonexistent pickup/economy action. */
#renderer-note.scene-preview{opacity:1;color:#e7edda;font:var(--ag-type-caption);left:50%;bottom:auto;top:100px;transform:translateX(-50%);max-width:40%;padding:4px 8px;background:#0b2936d9;border-radius:6px;text-align:center}
@media(max-height:600px) and (orientation:landscape){#renderer-note.scene-preview{top:65px}}

/* Presentation groups only; circular skill/joystick geometry is unchanged. */
.hub-launch,.result-actions{gap:var(--ag-space-3)}
#modal-footer{gap:var(--ag-space-3);flex-wrap:wrap}
#modal-footer>button{min-width:0;padding:10px 16px;white-space:normal;overflow-wrap:anywhere}
.loadout-grid label,.control-binding-grid label{gap:var(--ag-space-2)}
.control-mode{display:flex;align-items:center;gap:var(--ag-space-3);flex-wrap:wrap}
.control-mode select{flex:1 1 180px;min-width:0;max-width:100%}
.ruleset-choice{display:grid;gap:var(--ag-space-2)}
@media(max-width:460px){#modal-footer>button{flex:1 1 130px}}

@media(max-width:460px){#renderer-note.map-art{top:264px;max-width:calc(100% - 24px);width:max-content}}
