/* Reference layout: portrait rails, wooden timer, one continuous parchment dock.
   The live canvas remains unmasked; no tiles or rendered world are cropped. */
#battle-hud-v1{position:fixed;inset:0;z-index:24;pointer-events:none;color:#075576;font-family:'Baloo 2','Nunito Sans',sans-serif;--hud-dock-height:clamp(100px,10.0113vw,145px);--hud-rail-width:clamp(90px,8.6vw,148px)}
#battle-hud-v1[hidden]{display:none!important}
#battle-hud-v1 button,#battle-hud-v1 a{pointer-events:auto}
body.has-battle-hud-v1{overflow:hidden}
body.has-battle-hud-v1 .app-shell{max-width:none!important;padding:0!important}
body.has-battle-hud-v1 .app-shell>.topbar,body.has-battle-hud-v1 .match-bar,body.has-battle-hud-v1 .terrain-strip,body.has-battle-hud-v1 #player-strip,body.has-battle-hud-v1 .control-bar,body.has-battle-hud-v1 #touch-controls,body.has-battle-hud-v1 #skill-loadout,body.has-battle-hud-v1 #compact-loadout,body.has-battle-hud-v1 #arena-status,body.has-battle-hud-v1 .arena-caption{display:none!important}
body.has-battle-hud-v1:not(.is-core-conflict) #game-layout{position:fixed!important;inset:0!important;width:100%!important;height:100%!important;max-width:none!important;margin:0!important;display:block!important;z-index:1}
body.has-battle-hud-v1:not(.is-core-conflict) .arena-wrap{width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;aspect-ratio:auto!important}
body.has-battle-hud-v1 #core-ui #game-layout{position:fixed!important;inset:0!important;left:0!important;top:0!important;right:0!important;bottom:0!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;display:block!important}
body.has-battle-hud-v1 #core-ui #game-layout .arena-wrap{width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;aspect-ratio:auto!important}
body.has-battle-hud-v1 #core-ui .core-header,body.has-battle-hud-v1 #core-ui .core-loadout,body.has-battle-hud-v1 #core-ui .core-left,body.has-battle-hud-v1 #core-ui .core-right,body.has-battle-hud-v1 #core-ui>.core-brand,body.has-battle-hud-v1 #core-ui .core-window-tools,body.has-battle-hud-v1 #core-ui .core-footer{visibility:hidden!important;pointer-events:none!important}
body.has-battle-hud-v1 .core-frame{display:none}
.battle-hud-brand{position:absolute;left:2.7%;top:1.2%;width:clamp(140px,15vw,248px);height:clamp(60px,10.5vh,104px);background:url('../assets/home-art-v1/logo.webp') center/contain no-repeat;filter:drop-shadow(0 3px 2px #05344688)}
.battle-hud-clock{position:absolute;left:50%;top:0;transform:translateX(-50%);width:clamp(300px,29vw,490px);height:clamp(85px,12vh,118px);padding:15px 65px 18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;background:url('../assets/room-art-v1/title-plaque.webp') center/100% 100% no-repeat;color:#fff7d8;line-height:1;text-shadow:0 2px 1px #4d260e,1px 0 #4d260e,-1px 0 #4d260e}
.battle-hud-clock small{font-size:clamp(14px,1.45vw,24px);font-weight:900;white-space:nowrap;text-transform:uppercase;letter-spacing:.3px}
.battle-hud-clock strong{font-size:clamp(30px,3.2vw,53px);font-weight:900;font-variant-numeric:tabular-nums;letter-spacing:1px;margin-top:2px}
.battle-hud-tools{position:absolute;top:2%;right:3.6%;display:flex;gap:12px;align-items:center}
.battle-hud-tools button,.battle-hud-music{width:clamp(44px,4.2vw,70px);height:clamp(44px,4.2vw,70px);border:3px solid #ffda72;border-radius:50%;background:radial-gradient(ellipse at 40% 22%,#45dbe6,#0086ab 57%,#004964);color:#fffce6;box-shadow:inset 0 0 0 2px #fff8c9,0 4px 0 #825022,0 5px 8px #003b4766;display:grid;place-items:center;padding:10px}
.battle-hud-tools svg,.battle-hud-music svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}
.battle-hud-music{position:absolute;top:2%;right:calc(3.6% + clamp(44px,4.2vw,70px)*3 + 36px)}
#battle-hud-v1:has(.battle-hud-tools>.team-voice:not([hidden])) .battle-hud-music{right:calc(3.6% + clamp(44px,4.2vw,70px)*4 + 48px)}
.battle-hud-players{position:absolute;top:15.5%;bottom:calc(var(--hud-dock-height) + 12%);width:var(--hud-rail-width);display:flex;flex-direction:column;justify-content:space-between;gap:10px}
.battle-hud-left{left:3%}.battle-hud-right{right:3%}
.battle-hud-portrait{position:relative;flex:0 1 auto;min-height:0;width:100%;height:clamp(108px,18vh,174px);border:3px solid #ffe185;border-radius:22px 22px 15px 15px;background:linear-gradient(#1acfea,#007aaf);box-shadow:0 0 0 2px #06c7e3,inset 0 0 0 2px #fff3ae,0 5px 0 #745026;overflow:visible;color:#075576}
.battle-hud-portrait[data-side=red]{background:linear-gradient(#ff6252,#c91729);box-shadow:0 0 0 2px #f74c3d,inset 0 0 0 2px #fff3ae,0 5px 0 #745026}
.battle-hud-portrait>img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 35%;border-radius:18px 18px 12px 12px}
.battle-hud-name{position:absolute;bottom:-3px;left:-6px;right:-6px;min-height:34px;padding:4px 8px 3px;border:2px solid #e9aa35;border-radius:13px;background:linear-gradient(#fffce8,#ffe8a7);box-shadow:inset 0 0 0 2px #fff7cf,0 2px 1px #775021;text-align:center;line-height:1.1}
.battle-hud-name strong{display:block;font-size:clamp(12px,1.25vw,20px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle-hud-name small{display:block;min-height:8px;font:900 9px/10px 'Nunito Sans';color:#318fa7;letter-spacing:.4px}
.battle-hud-seat{position:absolute;left:-14px;bottom:31px;width:35px;height:35px;display:grid;place-items:center;border:2px solid #fff5bb;border-radius:50%;background:linear-gradient(#13c8f1,#0670af);box-shadow:0 0 0 2px #0e7fad,0 2px 2px #00405b;color:#fff;font:900 24px/1 'Baloo 2';text-shadow:0 2px #034f7b}
[data-side=red] .battle-hud-seat{background:linear-gradient(#ff6551,#cd1323);box-shadow:0 0 0 2px #cc3424,0 2px 2px #651e0a;text-shadow:0 2px #962618}
.battle-hud-portrait .battle-hud-seat{background:linear-gradient(#ffffff44,#00000012),var(--seat-color,#009bd2);box-shadow:0 0 0 2px var(--seat-color,#009bd2),0 2px 2px #00334b;color:#fff;text-shadow:0 1px 2px #00334b}
.battle-hud-portrait.is-out>img{filter:saturate(.25) brightness(.65)}
.battle-hud-portrait.is-out .battle-hud-name small{color:#a14b32}
.battle-hud-players[data-count="3"] .battle-hud-portrait{height:clamp(104px,16vh,148px)}
.battle-hud-players[data-count="4"] .battle-hud-portrait{height:clamp(86px,12vh,120px)}
.battle-hud-players[data-count="4"] .battle-hud-name{min-height:29px;padding:2px 7px}
.battle-hud-players[data-count="4"] .battle-hud-name strong{font-size:clamp(11px,1.05vw,17px)}
.battle-hud-objective{position:absolute;bottom:calc(var(--hud-dock-height) + 14px);left:24%;right:24%;text-align:center;color:#fff5cd;text-shadow:0 1px 3px #002e43;font:900 13px/1.3 'Nunito Sans';pointer-events:none}
.battle-hud-objective:empty{display:none}
.battle-hud-dock{position:absolute;bottom:1.6%;left:1.5%;right:1.5%;height:var(--hud-dock-height);display:grid;grid-template-columns:32% 23% 27% 18%;align-items:center;padding:12px 32px;isolation:isolate;pointer-events:none}
.battle-hud-dock::before{content:'';position:absolute;inset:0;z-index:-1;background:url('../assets/battle-hud-v1/control-bar.webp') center/100% 100% no-repeat;pointer-events:none}
.battle-hud-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;height:70%;align-items:stretch;padding-right:14px}
.battle-hud-stat{min-width:0;display:grid;grid-template-columns:48% 52%;grid-template-rows:1fr 20px;align-items:center;justify-items:center;border:1px solid #d6a85366;border-radius:13px;background:#fff8dc70;padding:3px 4px;color:#075576}
.battle-hud-stat i{width:100%;height:100%;min-height:32px;background:center/contain no-repeat}
.battle-stat-balloon{background-image:url('../assets/pickups-v17/blue-bubble-5b52b8f8b56f.webp')!important}
.battle-stat-range{background:none!important}
.battle-stat-speed{background-image:url('../assets/pickups-v17/blue-shoe-4cd219820b35.webp')!important}
.battle-hud-stat b{font-size:clamp(22px,2.5vw,41px);line-height:1}
.battle-hud-stat small{grid-column:1/-1;font:900 clamp(9px,.85vw,14px)/1 'Nunito Sans';align-self:start}
.battle-hud-action{height:85%;min-width:0;padding:0 5px;display:flex;align-items:center}
body.has-battle-hud-v1 #battle-hud-v1 [data-control]{position:relative;inset:auto;width:100%;height:100%;min-height:64px;border:3px solid #edb845;border-radius:25px;background:radial-gradient(ellipse at 35% 15%,#6af8ff,#0eb9d4 45%,#007197 75%,#004965);box-shadow:inset 0 0 0 2px #fff3ae,0 3px #74471d;color:#fffce4;padding:0;overflow:hidden;text-shadow:0 2px #002b44;pointer-events:auto;transform:none;font:900 0px/1 'Baloo 2';isolation:isolate}
body.has-battle-hud-v1 #battle-hud-v1 [data-control]::before{display:none!important}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="bomb"]::after{content:'';position:absolute;left:14%;right:20%;top:-6%;height:80%;background:url('../assets/pickups-v17/blue-bubble-5b52b8f8b56f.webp') center/contain no-repeat;pointer-events:none;z-index:-1;transform:rotate(14deg)}
.battle-hud-action-label,body.has-battle-hud-v1 #battle-hud-v1 #touch-skill-name{position:absolute!important;left:6%;right:22%;bottom:8%!important;top:auto!important;padding:0!important;font:900 clamp(14px,1.5vw,25px)/1.1 'Baloo 2'!important;text-align:center;color:#fffbe5!important;background:none!important;text-transform:uppercase;z-index:3;text-shadow:0 2px 2px #002a40,1px 0 #002a40,-1px 0 #002a40}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"]>.skill-art{display:block!important;position:absolute!important;left:0!important;top:0!important;width:100%!important;height:100%!important;border:0!important;border-radius:inherit!important;box-shadow:none!important;mask-image:linear-gradient(#000 55%,#000a 75%,transparent);z-index:-1}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"]::after{content:'';position:absolute;inset:40% 0 0;background:linear-gradient(transparent,#00415ee8);z-index:0;pointer-events:none}
body.has-battle-hud-v1 #battle-hud-v1 #skill-charges{position:absolute;top:5px;right:7px;bottom:auto;left:auto;border:1px solid #ffdd80;border-radius:7px;background:#044e69d9;font:900 12px/18px 'Nunito Sans';padding:0 5px;z-index:4;min-width:20px;text-align:center}
body.has-battle-hud-v1 #battle-hud-v1 [data-control]:disabled{opacity:1}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"]:disabled>.skill-art{filter:saturate(.4) brightness(.65)}
.battle-hud-key{position:absolute;bottom:6%;right:5%;padding:5px 7px;border:2px solid #9ba6a8;border-bottom-width:4px;border-radius:6px;background:linear-gradient(#fff,#dce6e4);box-shadow:0 1px 2px #002e43;color:#14465c;font:900 clamp(10px,.92vw,15px)/1 'Nunito Sans';text-shadow:none;z-index:4}
.battle-hud-movement{display:grid;grid-template-columns:repeat(3,clamp(27px,2.7vw,45px));grid-template-rows:repeat(2,clamp(27px,2.7vw,45px));justify-content:center;gap:3px;padding-left:8px}
.battle-hud-movement kbd{display:grid;place-items:center;margin:0;padding:0;border:2px solid #bb7d3d;border-bottom-width:4px;border-radius:7px;background:linear-gradient(#9d5529,#4d2315);box-shadow:inset 0 0 0 1px #f8bb6c,0 2px 1px #775025;color:#fff2d7;font:900 clamp(13px,1.4vw,23px)/1 'Nunito Sans';text-shadow:0 2px #42200e}
.battle-hud-movement kbd:first-child{grid-column:2}.battle-hud-movement kbd:nth-child(2){grid-column:1}
body.highlight-presenting #battle-hud-v1{visibility:hidden}
/* PC battle notices occupy a measured free side lane. They do not cover the
   action captions or change the map fit; phone notices retain existing CSS. */
body.has-battle-hud-v1 #toast[data-battle-side-notice]{position:fixed;left:var(--battle-notice-left,12px);top:var(--battle-notice-top,110px);right:auto;bottom:auto;transform:none;width:var(--battle-notice-width,220px);max-width:none;max-height:var(--battle-notice-max-height,none);box-sizing:border-box;overflow:auto;font-size:12px;line-height:16px;padding:8px 10px;text-align:left}
/* Align live values and hit targets to the authored transparent control bar. */
.battle-hud-dock{display:block;padding:0;height:var(--hud-dock-height);aspect-ratio:1153/119;min-height:100px;max-height:145px}
.battle-hud-stats{position:absolute;left:3.8%;top:26%;width:28.4%;height:53%;padding:0;gap:0}
.battle-hud-stat{border:0;border-radius:0;background:none;display:flex;align-items:center;justify-content:flex-end;position:relative;padding:0 7%;}
.battle-hud-stat i{display:none}.battle-hud-stat b{font-size:clamp(23px,2.4vw,42px);margin-top:-3px}
.battle-hud-stat small{position:absolute;bottom:1px;right:7%;font-size:clamp(9px,.8vw,13px)}
.battle-hud-stat:last-child b{position:absolute;right:8%;bottom:-1px;font-size:clamp(13px,1.35vw,23px);line-height:1.1;margin:0}
.battle-hud-stat:last-child small{left:12%;right:auto;bottom:2px}
.battle-hud-action{position:absolute;top:21%;height:63%;padding:0}
.battle-hud-balloon-slot{left:33%;width:20.4%}.battle-hud-skill-slot{left:54%;width:22.6%}
body.has-battle-hud-v1 #battle-hud-v1 [data-control]{border:0;border-radius:20px;background:transparent!important;box-shadow:none;min-height:0;overflow:visible}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="bomb"]::after{display:none}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"]>.skill-art{left:2%!important;top:-20%!important;width:auto!important;height:90%!important;aspect-ratio:1;border-radius:20px!important;mask-image:linear-gradient(#000 70%,transparent)!important;z-index:1}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"]::after{display:none}
.battle-hud-action-label,body.has-battle-hud-v1 #battle-hud-v1 #touch-skill-name{bottom:7%!important}
.battle-hud-key{bottom:4%;padding:5px 8px}
body.has-battle-hud-v1 #battle-hud-v1 #skill-charges{top:-10%;right:5%}
#battle-hud-v1[data-skill-ready=true] #skill-charges{display:none}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"]:disabled>.skill-art{filter:none!important;opacity:1!important}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"]:disabled #touch-skill-name{color:#cfe8e9!important}
.battle-hud-movement{position:absolute;left:79%;right:5%;top:20%;padding:0;height:62%;grid-template-columns:repeat(3,clamp(27px,2.5vw,42px));grid-template-rows:repeat(2,minmax(0,1fr))}
body.has-battle-hud-v1 #battle-hud-v1 [data-control].hud-custom-position{border:2px solid #efbf59;background:linear-gradient(#1fcce5,#005f83)!important;box-shadow:inset 0 0 0 2px #fff0bc,0 3px #6d481c;overflow:hidden}
@media(max-width:1100px){.battle-hud-players{bottom:calc(var(--hud-dock-height) + 8%)}.battle-hud-clock{padding:17px 50px}.battle-hud-tools{gap:8px}.battle-hud-name strong{font-size:12px}.battle-hud-seat{width:28px;height:28px;font-size:20px;left:-10px}.battle-hud-stats{padding-right:8px}.battle-hud-key{padding:4px}.battle-hud-action{padding:0 3px}}
#battle-hud-v1[data-compact=true]{--hud-dock-height:70px;--hud-rail-width:48px}
#battle-hud-v1[data-compact=true] .battle-hud-brand{left:8px;top:3px;width:94px;height:48px}
#battle-hud-v1[data-compact=true] .battle-hud-clock{width:220px;height:55px;padding:8px 35px 10px;top:0}
#battle-hud-v1[data-compact=true] .battle-hud-clock small{font-size:10px;letter-spacing:0}
#battle-hud-v1[data-compact=true] .battle-hud-clock strong{font-size:23px;margin:0}
#battle-hud-v1[data-compact=true] .battle-hud-tools{top:4px;right:8px;gap:5px}
#battle-hud-v1[data-compact=true] .battle-hud-tools button{width:44px;height:44px;padding:8px;border-width:2px;box-shadow:inset 0 0 0 1px #fff8c9,0 2px #825022}
#battle-hud-v1[data-compact=true] .battle-hud-music{top:4px;right:155px;width:44px;height:44px;padding:8px;border-width:2px;box-shadow:inset 0 0 0 1px #fff8c9,0 2px #825022}
#battle-hud-v1[data-compact=true]:has(.battle-hud-tools>.team-voice:not([hidden])) .battle-hud-music{left:112px;right:auto}
#battle-hud-v1[data-compact=true] .battle-hud-players{top:65px;bottom:90px;gap:5px}
#battle-hud-v1[data-compact=true] .battle-hud-left{left:12px}#battle-hud-v1[data-compact=true] .battle-hud-right{right:12px}
#battle-hud-v1[data-compact=true] .battle-hud-portrait{height:62px;min-height:30px;border-width:2px;border-radius:10px 10px 7px 7px;box-shadow:0 0 0 1px #0fc5dc,0 2px #775021}
#battle-hud-v1[data-compact=true] .battle-hud-portrait>img{border-radius:8px}
#battle-hud-v1[data-compact=true] .battle-hud-name{left:-4px;right:-4px;bottom:-2px;min-height:14px;padding:2px;border-width:1px;border-radius:5px;box-shadow:inset 0 0 0 1px #fff7cf}
#battle-hud-v1[data-compact=true] .battle-hud-name strong{font-size:8px;line-height:1}
#battle-hud-v1[data-compact=true] .battle-hud-name small{display:none}
#battle-hud-v1[data-compact=true] .battle-hud-seat{width:19px;height:19px;font-size:12px;border-width:1px;left:-7px;bottom:12px;box-shadow:0 0 0 1px var(--seat-color),0 1px 1px #00334b}
#battle-hud-v1[data-compact=true] .battle-hud-players[data-count="4"] .battle-hud-portrait{height:calc((100% - 15px)/4)}
#battle-hud-v1[data-compact=true] .battle-hud-dock{left:3%;right:3%;height:70px;min-height:70px;max-height:70px;bottom:5px;padding:0;aspect-ratio:auto}
#battle-hud-v1[data-compact=true] .battle-hud-stats{top:25%;height:55%;padding:0}
#battle-hud-v1[data-compact=true] .battle-hud-stat{padding-right:9%}
#battle-hud-v1[data-compact=true] .battle-hud-stat b{font-size:20px}
#battle-hud-v1[data-compact=true] .battle-hud-stat small{font-size:7px;bottom:0}
#battle-hud-v1[data-compact=true] .battle-hud-stat:last-child b{font-size:13px;bottom:-1px;right:4%}
#battle-hud-v1[data-compact=true] .battle-hud-stat:last-child small{font-size:7px;left:2%;bottom:1px}
#battle-hud-v1[data-compact=true] .battle-hud-action{padding:0;top:19%;height:65%}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] [data-control]{height:100%;min-height:44px!important;width:100%;min-width:44px;border-radius:12px}
#battle-hud-v1[data-compact=true] .battle-hud-key{display:none}
#battle-hud-v1[data-compact=true] .battle-hud-action-label,body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] #touch-skill-name{font-size:12px!important;left:3%;right:3%;bottom:8%!important;line-height:1.05!important}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] [data-control="skill"]>.skill-art{height:85%!important;top:-20%!important;border-radius:10px!important}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] #skill-charges{font-size:9px;line-height:13px;min-width:16px;padding:0 3px;top:-5%;right:5%}
#battle-hud-v1[data-compact=true] .battle-hud-movement{left:79%;right:5%;top:3%;height:94%;display:flex;align-items:center;justify-content:center;padding:0;pointer-events:auto}
#battle-hud-v1[data-compact=true] .battle-hud-movement>kbd{display:none}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] .battle-hud-movement>:is(#touch-stick,.core-stick){display:block!important;position:relative!important;inset:auto!important;transform:none;flex:none;width:64px;height:64px;min-width:44px;min-height:44px;max-width:none;max-height:none;border:3px solid #ffd26b;border-radius:50%;background:radial-gradient(circle,#19cce9,#006d9b 65%,#03465f);box-shadow:inset 0 0 0 2px #aaf8fa,0 2px #764c20;pointer-events:auto;touch-action:none;margin:0;padding:0}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] .battle-hud-movement>:is(#touch-stick,.core-stick)>i{width:26px;height:26px;border-radius:50%;background:linear-gradient(#72eeff,#009fca);border:2px solid #bcffff;box-shadow:0 2px #035173}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] .touch-stick .tick{opacity:.9;color:#e1ffff}
#battle-hud-v1[data-compact=true] .battle-hud-objective{bottom:78px;left:15%;right:15%;font-size:9px}
body.hud-editing #battle-hud-v1{pointer-events:none}
body.hud-editing #battle-hud-v1 button,body.hud-editing #battle-hud-v1 #touch-stick{pointer-events:none!important}
.battle-hud-tools [data-sound-enabled=true] .battle-hud-sound-slash{display:none}
.battle-hud-stats.hud-custom-position{border:2px solid #e7b84f;border-radius:14px;background:linear-gradient(#fff9e3,#ffecbb);box-shadow:inset 0 0 0 1px #fff,0 3px #82551d;padding:4px!important}
.battle-hud-stats.hud-custom-position .battle-hud-stat{display:grid;grid-template-columns:45% 55%;grid-template-rows:minmax(0,1fr) 14px;padding:0 5px!important;gap:0}
.battle-hud-stats.hud-custom-position .battle-hud-stat i{display:block;grid-column:1;grid-row:1;width:100%;height:100%;min-height:0}
.battle-hud-stats.hud-custom-position .battle-hud-stat b{position:static!important;grid-column:2;grid-row:1;font-size:clamp(16px,1.8vw,30px)!important;margin:0;align-self:center}
.battle-hud-stats.hud-custom-position .battle-hud-stat small{position:static!important;grid-column:1/-1;grid-row:2;justify-self:center;font-size:9px!important;line-height:1}
.battle-hud-stats.hud-custom-position .battle-stat-range:before{content:'✣';display:grid;place-items:center;width:100%;height:100%;color:#00b7dc;font:900 32px/1 'Nunito Sans';text-shadow:0 1px #e3ffff,0 2px #027ea1}
.battle-hud-stats.hud-custom-position .battle-hud-stat .battle-stat-range{width:32px;height:32px;align-self:center;justify-self:center;background:url('../assets/battle-hud-v1/control-bar.webp') -91px -23px/640px 75.2px no-repeat!important}
.battle-hud-stats.hud-custom-position .battle-stat-range:before{display:none}
/* Story keeps its authoritative boss/guard meter in unused scenery beside the board. */
body.has-battle-hud-v1 .story-hud{position:fixed;left:auto;right:3%;top:40%;width:clamp(110px,9vw,148px);max-width:none;gap:5px}
body.has-battle-hud-v1 .story-hud-boss{display:grid;grid-template-columns:34px minmax(0,1fr);gap:4px;width:100%;padding:5px;border:2px solid #e4b851;border-radius:12px;background:linear-gradient(#fff5d7,#ffe8ac);color:#135571;box-shadow:inset 0 0 0 1px #fff8d6,0 3px #795421}
body.has-battle-hud-v1 .story-hud-meter{width:100%;min-width:0}
body.has-battle-hud-v1 .story-hud-meter strong{font-size:11px;line-height:1.1}
body.has-battle-hud-v1 .story-hud-hp{grid-column:1/-1;text-align:center;font-size:12px;line-height:1}
body.has-battle-hud-v1 .story-hud .story-boss-portrait.size-s{width:32px;height:32px}
body.has-battle-hud-v1 .story-hud-side{width:100%}
body.has-battle-hud-v1 .story-hud-guards,body.has-battle-hud-v1 .story-hud-callout{max-width:100%;font-size:10px;line-height:1.2;white-space:normal;padding:4px 6px}
@media(orientation:landscape) and (max-height:600px),(orientation:landscape) and (pointer:coarse) and (hover:none){body.has-battle-hud-v1 .story-hud{right:8px;top:130px;width:100px;gap:3px}body.has-battle-hud-v1 .story-hud-boss{grid-template-columns:24px minmax(0,1fr);padding:3px;gap:3px}body.has-battle-hud-v1 .story-hud .story-boss-portrait.size-s{width:24px;height:24px}body.has-battle-hud-v1 .story-hud-meter strong{font-size:9px}body.has-battle-hud-v1 .story-hud-guards,body.has-battle-hud-v1 .story-hud-callout{font-size:9px}}
/* A complete authored skill button replaces the former square picture overlay. */
.battle-hud-skill-slot{left:53%;width:24%;top:9%;height:84%}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"].has-skill-button-art,
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"].has-skill-button-art.hud-custom-position{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0;overflow:visible}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"]>.skill-button-art{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;mask:none;object-fit:fill;z-index:0}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"].has-skill-button-art #touch-skill-name{inset:auto 16% 8% 7%!important;font-size:clamp(14px,1.5vw,25px)!important;line-height:1.05!important;white-space:nowrap}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"].has-skill-button-art #skill-charges{inset:7% 5% auto auto!important}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"].has-skill-button-art .battle-hud-key{bottom:8%;right:5%;padding:3px 6px;font-size:12px}
.battle-hud-settings-group{display:contents}.battle-hud-tools-toggle{display:none!important}
/* Phone contract: side wings reserve 80px left / 132px right, with 42px above
   and 8px below the board. The desktop parchment dock is unchanged. */
#battle-hud-v1[data-compact=true]{--hud-dock-height:0px;--hud-rail-width:40px}
#battle-hud-v1[data-compact=true] .battle-hud-dock{position:absolute;inset:0;width:100%;height:100%;min-height:0;max-height:none;aspect-ratio:auto;pointer-events:none;isolation:auto}
#battle-hud-v1[data-compact=true] .battle-hud-dock::before{display:none}
#battle-hud-v1[data-compact=true] .battle-hud-brand{left:4px;top:2px;width:74px;height:34px}
#battle-hud-v1[data-compact=true] .battle-hud-clock{width:180px;height:38px;top:1px;padding:4px 29px 6px}
#battle-hud-v1[data-compact=true] .battle-hud-clock small{font-size:8px;line-height:1}
#battle-hud-v1[data-compact=true] .battle-hud-clock strong{font-size:17px;line-height:1;margin-top:1px}
#battle-hud-v1[data-compact=true] .battle-hud-players{top:48px;bottom:auto;height:172px;justify-content:flex-start;gap:4px;width:40px}
#battle-hud-v1[data-compact=true] .battle-hud-left{left:20px}
#battle-hud-v1[data-compact=true] .battle-hud-right{right:16px}
#battle-hud-v1[data-compact=true] .battle-hud-players .battle-hud-portrait,
#battle-hud-v1[data-compact=true] .battle-hud-players[data-count="4"] .battle-hud-portrait{height:40px;min-height:40px;flex:none}
#battle-hud-v1[data-compact=true] .battle-hud-name{min-height:12px;padding:1px 2px}
#battle-hud-v1[data-compact=true] .battle-hud-name strong{font-size:7px}
#battle-hud-v1[data-compact=true] .battle-hud-seat{width:17px;height:17px;font-size:11px;bottom:10px}
#battle-hud-v1[data-compact=true] .battle-hud-action{left:auto;right:6px;top:auto;width:122px;height:46px;padding:0}
#battle-hud-v1[data-compact=true] .battle-hud-balloon-slot{bottom:64px}
#battle-hud-v1[data-compact=true] .battle-hud-skill-slot{bottom:12px}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] [data-control="bomb"]{border:2px solid #efc365;border-radius:14px;background:radial-gradient(ellipse at 35% 20%,#79f5ff,#04b3ce 45%,#005378)!important;box-shadow:inset 0 0 0 1px #fff0b2,0 2px #775023;overflow:hidden}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] [data-control="bomb"]::after{display:block;left:8%;right:auto;top:0;width:40%;height:90%;z-index:0}
#battle-hud-v1[data-compact=true] .battle-hud-balloon-slot .battle-hud-action-label{left:35%;right:3%;bottom:20%!important;font-size:11px!important}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] [data-control="skill"].has-skill-button-art #touch-skill-name{inset:auto 6% 8% 6%!important;font-size:9.5px!important;line-height:1.05!important}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] [data-control="skill"].has-skill-button-art #skill-charges{font-size:8px;line-height:12px;min-width:14px;padding:0 2px;inset:6% 5% auto auto!important}
#battle-hud-v1[data-compact=true] .battle-hud-movement{left:10px;right:auto;top:auto;bottom:10px;width:64px;height:64px}
#battle-hud-v1[data-compact=true] .battle-hud-stats{left:5px;top:auto;bottom:86px;width:74px;height:42px;padding:3px;border:1px solid #edc66a;border-radius:10px;background:linear-gradient(#fff9df,#f6df9f);box-shadow:inset 0 0 0 1px #fff5d4,0 2px #896027;gap:1px;display:grid;grid-template-columns:repeat(3,1fr)}
#battle-hud-v1[data-compact=true] .battle-hud-stat{display:flex;flex-direction:column;justify-content:flex-end;padding:0;gap:0}
#battle-hud-v1[data-compact=true] .battle-hud-stat i{display:block;width:20px;height:20px;min-height:0}
#battle-hud-v1[data-compact=true] .battle-hud-stat .battle-stat-range::before{content:'✣';display:block;font:900 24px/20px 'Nunito Sans';color:#00a7d4;text-shadow:0 1px #006a8b}
#battle-hud-v1[data-compact=true] .battle-hud-stat b,
#battle-hud-v1[data-compact=true] .battle-hud-stat:last-child b{position:static;margin:0;font-size:11px;line-height:12px}
#battle-hud-v1[data-compact=true] .battle-hud-stat small{display:none}
#battle-hud-v1[data-compact=true] .battle-hud-objective{left:4px;right:auto;bottom:139px;width:72px;font-size:8px;line-height:1.2;color:#fff5ce;text-shadow:0 1px 2px #00364c;max-height:32px;overflow:hidden}
#battle-hud-v1[data-compact=true] .battle-hud-settings-group{display:block;position:absolute;right:6px;top:2px;width:44px;height:44px;pointer-events:auto;z-index:5}
#battle-hud-v1[data-compact=true] .battle-hud-tools-toggle{display:grid!important;place-items:center;width:44px;height:44px;padding:8px;border:2px solid #ffda72;border-radius:50%;background:radial-gradient(ellipse at 40% 22%,#45dbe6,#0086ab 57%,#004964);color:#fffce6;box-shadow:inset 0 0 0 1px #fff8c9,0 2px #825022}
.battle-hud-tools-toggle svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2.3}
#battle-hud-v1[data-compact=true] .battle-hud-tools{display:none;position:absolute;top:49px;right:0;left:auto;width:112px;height:auto;padding:8px;grid-template-columns:repeat(2,44px);gap:8px;border:2px solid #eac269;border-radius:14px;background:linear-gradient(#fff8d8,#efdc9d);box-shadow:0 4px 12px #002d4777}
#battle-hud-v1[data-compact=true] .battle-hud-settings-group.is-open .battle-hud-tools{display:grid}
#battle-hud-v1[data-compact=true] .battle-hud-tools button{position:relative;margin-bottom:10px}
#battle-hud-v1[data-compact=true] .battle-hud-tools button::after{position:absolute;left:-4px;right:-4px;bottom:-12px;font:900 8px/10px 'Nunito Sans';text-shadow:none;color:#07516b}
#battle-hud-v1[data-compact=true] .battle-hud-tools [data-battle-hud=sound]::after{content:var(--copy-sound,'Sound')}
#battle-hud-v1[data-compact=true] .battle-hud-tools [data-battle-hud=settings]::after{content:var(--copy-hud-layout,'HUD layout')}
#battle-hud-v1[data-compact=true] .battle-hud-tools [data-battle-hud=fullscreen]::after{content:var(--copy-screen,'Screen')}
#battle-hud-v1[data-compact=true] .battle-hud-tools .voice-toggle::after{content:var(--copy-voice,'Voice')}
#battle-hud-v1[data-compact=true] .battle-hud-music,
#battle-hud-v1[data-compact=true]:has(.battle-hud-tools>.team-voice:not([hidden])) .battle-hud-music{left:auto;right:56px;top:2px;width:44px;height:44px}
/* The authored dock stops growing at its existing height cap. Center that
   narrower desktop bar without transforming saved fixed-position controls. */
#battle-hud-v1[data-compact=false] .battle-hud-dock{left:0;right:0;width:min(97%,calc(var(--hud-dock-height) * 1153 / 119));margin-inline:auto}
/* Cover the complete action while it cools down. This reuses the existing
   button/seconds attribute: no extra texture, timer or per-frame DOM nodes. */
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"][data-skill-cooldown]::after{display:grid;place-items:center;position:absolute;inset:0;width:100%;height:100%;content:attr(data-skill-cooldown);background:rgba(38,43,48,.76);border-radius:14px;color:#fff;font:900 clamp(28px,3vw,48px)/1 'Baloo 2','Nunito Sans',sans-serif;font-variant-numeric:tabular-nums;text-shadow:0 2px 3px #000,0 0 8px #000;z-index:8;pointer-events:none}
body.has-battle-hud-v1 #battle-hud-v1 [data-control="skill"][data-skill-cooldown] #skill-charges{display:none}
body.has-battle-hud-v1 #battle-hud-v1[data-compact=true] [data-control="skill"][data-skill-cooldown]::after{font-size:28px;border-radius:10px}
