/* v9.16: an adjustable HUD with a clear middle and minimal battle navigation. */
#game{--control-opacity:.55;--control-scale:.9}
#game #joystick,#game #fire,#game #nuke,#game #dodge,#game #auto,#game #weapon-hud{opacity:var(--control-opacity);scale:var(--control-scale);transition:opacity .16s}
#game #joystick:active,#game #fire:active,#game #nuke:active,#game #dodge:active,#game #auto:active,#game #weapon-hud:focus-within,#game #weapon-hud:active,#game button:focus-visible{opacity:1}
@media(hover:hover){#game #joystick:hover,#game #fire:hover,#game #nuke:hover,#game #dodge:hover,#game #auto:hover,#game #weapon-hud:hover{opacity:1}}
#game.editing-layout #joystick,#game.editing-layout #fire,#game.editing-layout #nuke,#game.editing-layout #dodge,#game.editing-layout #auto,#game.editing-layout #weapon-hud{opacity:1}
#game.custom-controls #joystick,#game.custom-controls #fire,#game.custom-controls #nuke,#game.custom-controls #dodge,#game.custom-controls #auto,#game.custom-controls #weapon-hud{scale:1;transform:translate(-50%,-50%) scale(var(--control-scale))!important}
#game.hud-no-map #minimap{display:none}
#game.in-combat header{background:none;box-shadow:none;padding-top:calc(8px + var(--safe-t));gap:6px}
#game.in-combat .brand{font-size:16px;opacity:.65}
#game.in-combat .brand small{display:none}
#game.in-combat header .square{background:#10231b55;border:1px solid #c4d1ba33;box-shadow:none;opacity:.65;min-width:36px;width:36px;height:36px}
#game.in-combat header .square:active,#game.in-combat header .square:focus-visible{opacity:1}
#game.in-combat .mission{top:calc(57px + var(--safe-t));padding:4px 0;background:none;border:0;box-shadow:none;backdrop-filter:none;width:180px;max-width:calc(100% - 186px);visibility:visible}
#game.in-combat .mission h1{font-size:12px;letter-spacing:0;margin:0 0 4px;color:#d1d7be;text-shadow:0 1px 3px #000}
#game.in-combat .mission>small,#game.in-combat .mission #mode-label,#game.in-combat .mission #batch-label,#game.in-combat .mission .wave span,#game.in-combat .mission .wave i{display:none}
#game.in-combat .mission .wave strong{font-size:23px;line-height:1.2;text-shadow:0 1px 3px #000}
#game.in-combat:not(.hud-details) .mission .base,#game.in-combat:not(.hud-details) .mission .xp-run,#game.in-combat:not(.hud-details) .fragment-resource{display:none}
#game.in-combat.hud-details .mission .xp-run{display:block}
#game.in-combat.hud-details .resources small{display:block;font-size:7px}
#game.in-combat .resources{top:calc(58px + var(--safe-t));left:auto;right:calc(14px + var(--safe-r));width:150px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:4px 6px;height:auto;min-height:35px;background:#10231b44;border:0;box-shadow:none;backdrop-filter:none;opacity:.76}
#game.in-combat .resources>span{text-align:center;font-size:9px;white-space:nowrap}
#game.in-combat .resources b{font-size:12px}
#game.in-combat .resources small{display:none}
#game.in-combat #minimap{top:calc(105px + var(--safe-t));right:calc(14px + var(--safe-r));width:58px;height:58px;opacity:.56}
#game.in-combat.hud-details #minimap{top:calc(148px + var(--safe-t))}
#game.in-combat #boss-bar{top:calc(115px + var(--safe-t));left:calc(14px + var(--safe-l));transform:none;width:min(330px,calc(100% - 100px - var(--safe-l) - var(--safe-r)));max-width:none;opacity:.86}
#game.in-combat.hud-details #boss-bar{top:calc(170px + var(--safe-t))}
#game.in-combat footer{display:flex;align-items:flex-end;gap:8px;pointer-events:none;background:none;height:auto}
#game.in-combat footer button{pointer-events:auto}
#game.in-combat #start,#game.in-combat #heroes,#game.in-combat #shop{display:none}
#game.in-combat #hero-status{min-width:0;width:150px;min-height:38px;padding:5px 7px;border:0;background:#10231b44;box-shadow:none;opacity:.85}
#game.in-combat #portrait,#game.in-combat #hero-name,#game.in-combat #hero-level,#game.in-combat #hero-status>span>small:first-child{display:none}
#game.in-combat #hero-status>span{width:100%}
#game.in-combat #hero-status .health{width:100%;height:4px;margin:2px 0 4px}
#game.in-combat #hero-hp{font-size:10px}
#game.in-combat .bottom-actions{display:block;margin-left:auto;width:auto;grid-column:auto;grid-row:auto}
#game.in-combat #build{min-width:48px;min-height:44px;width:48px;padding:6px;background:#10231b66;border:1px solid #aabc9a44;box-shadow:none;opacity:.68;font-size:20px}
#game.in-combat #build>span:last-child,#game.in-combat #fire small,#game.in-combat #keyboard,#game.in-combat #saved,#game.in-combat #aimhint{display:none}
#game.in-combat #fire,#game.in-combat #nuke,#game.in-combat #dodge,#game.in-combat #auto,#game.in-combat #weapon-hud button{background:#1833295e;border:1px solid #c3d5b35c;box-shadow:none;backdrop-filter:none}
#game.in-combat #fire small,#game.in-combat #nuke small,#game.in-combat #dodge small{font-size:8px}
#game.in-combat #auto{font-size:9px;padding:6px 9px}
#game.in-combat #joystick{background:#a3b28c12;border:1px solid #c5d7b445;box-shadow:none}
#game.in-combat #stick{background:#b8c7a740;box-shadow:none;border:1px solid #c5d7b466}
#game.in-combat #weapon-hud button{font-size:10px;padding:6px}
#game.in-combat #weapon-hud small{font-size:9px;margin-top:3px}
#game.in-combat #hero-speech{font-size:10px;padding:6px 10px;background:#10231b80}
.hud-settings{border:1px solid #c4bd8d44;background:#10251ee6;border-radius:10px;padding:14px;margin:12px 0 18px}
.hud-settings h3{margin:0 0 15px;font-size:15px}
.hud-range{display:grid;grid-template-columns:1fr auto;gap:4px;font-size:12px;margin:10px 0;color:#dfdfca}
.hud-range output{color:#e7c184;font:12px monospace}
.hud-range input{grid-column:1/3;width:100%;height:34px;margin:0;accent-color:#d7b375}
.hud-options{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;font-size:12px;margin:12px 0}
.hud-options label{display:flex;gap:7px;align-items:center;min-height:36px}
.hud-options select{padding:6px;background:#1b3429;color:#e9ead6;border:1px solid #8c9c7580;border-radius:5px}
.hud-note{font-size:11px!important;line-height:1.6;color:#bccab2!important}
.hud-settings .setting-row{display:flex;flex-wrap:wrap;gap:8px}.hud-settings button{min-height:40px;font-size:11px}
.settings-help{margin:14px 0;color:#c5cfb8;font-size:12px}.settings-help summary{cursor:pointer;padding:10px 0;color:#dfc393}
.skin-thumbnail{display:block;width:100%;height:112px;object-fit:contain;filter:drop-shadow(0 4px 5px #0008)}
@media(min-width:1000px){.wardrobe-layout{grid-template-columns:minmax(240px,.68fr) minmax(0,1.8fr)}.wardrobe-layout .skin-row{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px) and (orientation:portrait){
 #game.in-combat .mission{left:calc(14px + var(--safe-l))}
 #game.in-combat:not(.custom-controls) #joystick{bottom:calc(86px + var(--safe-b))}
 #game.in-combat:not(.custom-controls) #fire{bottom:calc(86px + var(--safe-b))}
 #game.in-combat:not(.custom-controls) #dodge{bottom:calc(94px + var(--safe-b))}
 #game.in-combat:not(.custom-controls) #nuke{bottom:calc(156px + var(--safe-b))}
 #game.in-combat:not(.custom-controls) #auto{bottom:calc(176px + var(--safe-b))}
 #game.in-combat:not(.custom-controls) #weapon-hud{top:auto;bottom:calc(232px + var(--safe-b));left:calc(20px + var(--safe-l));width:138px;max-width:138px;flex-direction:column;gap:4px}
 #game.in-combat #weapon-hud>div{flex-direction:row}
 #game.in-combat #weapon-hud button{min-height:32px}
 #game.in-combat #weapon-hud>button{min-height:44px}
 #game.in-combat #hero-speech{bottom:calc(300px + var(--safe-b))}
}
@media(max-height:500px) and (orientation:landscape){
 #game.in-combat:not(.custom-controls) #weapon-hud{right:calc(140px + var(--safe-r))}
 #game.in-combat .mission{top:calc(48px + var(--safe-t));width:150px}
 #game.in-combat .resources{top:calc(48px + var(--safe-t));width:155px}
 #game.in-combat #minimap{top:calc(90px + var(--safe-t));width:48px;height:48px}
 #game.in-combat #boss-bar{top:calc(102px + var(--safe-t));max-width:210px}
 #game.in-combat.hud-details #boss-bar{top:calc(150px + var(--safe-t))}
 #game.in-combat #hero-status{width:135px}
}
