/* Compact manual controls; original skill nodes retain handlers/cooldowns/keys. */
.arun-manual-hud .launch-guide{width:210px;left:max(8px,env(safe-area-inset-left));font-size:11px}
.arun-manual-hud .launch-guide-header{padding:3px 8px}.arun-manual-hud .launch-guide-content{padding:6px 8px}.arun-manual-hud .launch-guide-title{font-size:12px}.arun-manual-hud .launch-guide-body{font-size:10px;margin:4px 0 6px}.arun-manual-hud .launch-guide-progress-row{margin:4px 0}.arun-manual-hud .launch-guide-reward{margin:4px 0}.arun-manual-hud .launch-guide-primary{min-height:32px;padding:5px}.arun-manual-hud .launch-guide-secondary{padding:4px;font-size:9px!important}.arun-manual-hud .launch-guide-card{max-height:var(--launch-guide-available-height,218px)}
.arun-manual-hud .launch-guide[data-compact=true] .launch-guide-phase,.arun-manual-hud .launch-guide[data-compact=true] .launch-guide-reward,.arun-manual-hud .launch-guide[data-compact=true] .launch-guide-body{display:none}

/* All15attack skills remain visible: filled5x3 desktop and3x5 portrait grids. */
.arun-manual-hud .combat-dock{display:flex;align-items:flex-end;gap:8px;padding:5px;border-radius:12px}
.manual-skill-bank{--skill-size:32px;--skill-gap:3px;--bank-width:172px;display:flex;flex-direction:column;gap:3px;min-width:0;padding:3px;border:1px solid #b4cfb42b;border-radius:10px;background:linear-gradient(160deg,#142f34e6,#0c1f2bd9)}
.arun-manual-hud .skill-row{display:flex;flex-wrap:wrap;justify-content:center;align-content:flex-start;width:var(--bank-width);gap:var(--skill-gap);margin:0;padding:0}
.arun-manual-hud .skill-row .skill{width:var(--skill-size);height:var(--skill-size);flex:0 0 var(--skill-size);border-radius:8px}
.arun-manual-hud .skill-row .manual-advanced-skill{border-color:#c7a45e;box-shadow:inset 0 0 0 1px #e4c47b33}
.arun-manual-hud [data-skill][hidden]{display:none!important}
.manual-support-skills{display:flex;justify-content:center;align-items:center;gap:5px;border-top:1px solid #bdd2c122;padding-top:4px}
.arun-manual-hud .manual-support-skills .skill{width:28px;height:28px;border-radius:7px}
.arun-manual-hud .utility-row{display:grid;grid-template-columns:34px 34px;grid-template-rows:34px 72px 22px;align-items:center;justify-items:center;gap:4px}
.arun-manual-hud #basicAttack{grid-column:1 / span 2;grid-row:2}
.arun-manual-hud #auto{grid-column:1;grid-row:1;width:34px;min-width:34px;height:34px;font-size:8px;padding:2px}
.arun-manual-hud #potionButton{grid-column:2;grid-row:1;width:34px;height:34px}
.arun-manual-hud #basicAttack{position:relative;display:grid;place-items:center;padding:6px 10px 20px;background:radial-gradient(circle at 45% 30%,#385760,#11222e 70%);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;width:72px;height:72px;min-width:72px;border-radius:50%;border:2px solid #ffe1a3;box-shadow:0 0 0 2px #735b2b,inset 0 0 12px #ffd46b4d,0 4px 12px #0008;overflow:hidden}.arun-manual-hud #basicAttack .manual-attack-icon{width:38px;height:38px;filter:drop-shadow(0 2px 3px #0008);pointer-events:none}.arun-manual-hud #basicAttack:active{transform:scale(.96)}.arun-manual-hud #basicAttack:focus-visible{outline:2px solid #fff;outline-offset:4px}.arun-manual-hud #basicAttack:after{content:'โจมตี';position:absolute;bottom:6px;left:0;right:0;text-align:center;font:bold 12px Tahoma;color:#fff3c9;text-shadow:0 2px 3px #000}.arun-manual-hud #basicAttack small{display:none}.arun-manual-hud #basicAttack[data-assist=active]{border-color:#83ffd5;box-shadow:0 0 0 2px #258c72,inset 0 0 18px #61ffd44d}.arun-manual-hud #basicAttack[data-assist=active]:after{content:'เข้าตี';color:#baffeb}.arun-manual-hud #basicAttack kbd{top:4px;bottom:auto;right:9px}
.arun-manual-hud #bottom{left:auto;right:max(8px,env(safe-area-inset-right));transform:none;max-width:calc(100vw - 108px)}
#topActions #economyMenu .menu-icon{display:grid;place-items:center;font-size:22px;color:#ffe395}#topActions #economyMenu span:not(.menu-icon){font-size:8px}
@media(orientation:portrait){
 .arun-manual-hud .launch-guide{width:176px}.arun-manual-hud .launch-guide-preview{max-height:calc(100dvh - 220px)}
 .arun-manual-hud .combat-dock{gap:5px;padding:4px}
 .manual-skill-bank{--skill-size:28px;--skill-gap:3px;--bank-width:90px;padding:3px;gap:3px}
  .arun-manual-hud .manual-support-skills .skill{width:28px;height:28px}.manual-support-skills{gap:5px;padding-top:3px}
 .arun-manual-hud .utility-row{grid-template-columns:32px 32px;grid-template-rows:32px 68px 22px;gap:4px}
 .arun-manual-hud #basicAttack{grid-column:1 / span 2;grid-row:2;width:68px;height:68px;min-width:68px}
 .arun-manual-hud #auto{grid-column:1;grid-row:1;width:32px;min-width:32px;height:32px}
 .arun-manual-hud #potionButton{grid-column:2;grid-row:1;width:32px;height:32px}
}
@media(orientation:portrait) and (max-width:350px){
 .manual-skill-bank{--skill-size:28px;--bank-width:90px}.arun-manual-hud .launch-guide{width:164px}
 .arun-manual-hud .manual-support-skills .skill{width:28px;height:28px}
 .arun-manual-hud .utility-row{grid-template-columns:29px 29px;grid-template-rows:30px 62px 22px}
 .arun-manual-hud #basicAttack{width:62px;height:62px;min-width:62px}.arun-manual-hud #auto{width:29px;min-width:29px;height:30px}.arun-manual-hud #potionButton{width:29px;height:30px}
}
@media(orientation:landscape) and (max-height:540px){
 .manual-skill-bank{--skill-size:32px;--skill-gap:3px;--bank-width:172px;padding:3px;gap:3px}
  .arun-manual-hud .combat-dock{padding:3px;gap:6px}.arun-manual-hud .utility-row{grid-template-columns:28px 28px;grid-template-rows:28px 60px 20px}
 .arun-manual-hud #basicAttack{width:60px;height:60px;min-width:60px}.arun-manual-hud #auto{width:28px;min-width:28px;height:28px}.arun-manual-hud #potionButton{width:28px;height:28px}
 .arun-manual-hud .launch-guide{width:180px}.arun-manual-hud .launch-guide-header{padding:0 6px}.arun-manual-hud .launch-guide-content{padding:4px 6px}.arun-manual-hud .launch-guide-feedback,.arun-manual-hud .launch-guide-city{display:none}
}

/* Device choice is independent of orientation and desktop window width. */
.arun-manual-hud #basicAttack[hidden],.arun-manual-hud #attackKeyboardHint[hidden]{display:none!important}
#attackKeyboardHint{position:absolute;top:4px;right:7px;padding:1px 4px;border:1px solid #b7c9bf66;border-radius:3px;background:#0d2335e6;font:8px Tahoma;color:#fff0c2;pointer-events:none}

#attackApproachToggle{grid-column:1 / span 2;grid-row:3;width:100%;height:22px;min-height:20px;padding:2px;border:1px solid #8ea69b70;border-radius:6px;background:#173733e8;color:#d9ebdf;font:9px Tahoma;cursor:pointer;touch-action:manipulation}#attackApproachToggle[aria-pressed=false]{color:#ffe0a0;border-color:#c3a26e;background:#332f24e8}#attackApproachToggle:focus-visible{outline:2px solid #f7d793;outline-offset:2px}

/* Latest owner order: potion, AUTO, attack in one full-width column. */
.arun-manual-hud .utility-row{grid-template-columns:72px;grid-template-rows:30px 30px 72px 22px}
.arun-manual-hud #potionButton{grid-column:1;grid-row:1;width:100%;height:30px;border-radius:8px;display:grid;place-items:center}
.arun-manual-hud #potionButton .ability-art{width:26px;height:26px;margin:0;border-radius:5px}
.arun-manual-hud #auto{grid-column:1;grid-row:2;width:100%;min-width:0;height:30px;border-radius:8px}
.arun-manual-hud #basicAttack{grid-column:1;grid-row:3}
.arun-manual-hud #attackApproachToggle{grid-column:1;grid-row:4}
@media(orientation:portrait){.arun-manual-hud .utility-row{grid-template-columns:68px;grid-template-rows:28px 28px 68px 22px}.arun-manual-hud #potionButton,.arun-manual-hud #auto{width:100%;height:28px}}
@media(orientation:portrait) and (max-width:350px){.arun-manual-hud .utility-row{grid-template-columns:62px;grid-template-rows:28px 28px 62px 22px}}
@media(orientation:landscape) and (max-height:540px){.arun-manual-hud .utility-row{grid-template-columns:60px;grid-template-rows:26px 26px 60px 20px}.arun-manual-hud #potionButton,.arun-manual-hud #auto{width:100%;height:26px}.arun-manual-hud #potionButton .ability-art{width:24px;height:24px}}

.arun-manual-hud #potionButton .ability-art{position:absolute;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%)}

/* Keep movement available on identified mobile devices, including landscape with a fine pointer. */
.arun-manual-hud[data-combat-device=mobile] #joystick{display:block}
