/* Controls from the reviewed sheet; source pixels remain intact in the shared atlas. */
#hud{--stick-size:clamp(112px,31vw,170px)}
#hud .top{top:max(8px,env(safe-area-inset-top));height:clamp(74px,12vh,110px)}
.hudLogo{left:26%;top:-5%;width:43%;height:115%;object-fit:contain}
#hud .top button{width:clamp(36px,10vw,52px);height:clamp(36px,10vw,52px);top:18%;background-image:none;background-color:#08090ddd;border:2px solid white;border-radius:50%;color:white;display:grid;place-items:center;box-shadow:0 0 0 2px #101018,2px 3px 0 #00d9ee}
#hud .top button svg{width:68%;height:68%;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#back{left:3%}#sound{left:15%}#record{left:68%;box-shadow:2px 3px 0 #ff00a8!important}#hideHUD{left:79%}#mic{left:90%}
#record svg circle{fill:#f91542;stroke:white}#record.active{animation:recordPulse 1s infinite alternate}
@keyframes recordPulse{to{box-shadow:0 0 12px #ff174d}}
#adSlot{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 8px);left:8%;right:8%;height:40px;border:1px solid #999;background:#eeeeeed9;color:#444;font-size:9px;letter-spacing:2px}
#tags{position:absolute;top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 64px);left:3%;right:3%;display:flex;justify-content:space-between;gap:8%}
#hud .tag{position:relative;top:auto!important;left:auto!important;transform:none;width:46%;padding:0 0 0 23px;border:0;background:transparent;min-height:55px;overflow:visible;text-align:left;color:white;font-size:clamp(11px,3.1vw,17px);isolation:isolate}
.tag:before{content:'';position:absolute;left:0;top:12px;width:30px;height:30px;background:#fff;border:3px solid #111;border-radius:50%;box-shadow:-2px 0 0 #00e9ff;z-index:2}
.tag:after{content:'☺';position:absolute;left:6px;top:10px;color:#111;font-size:24px;font-style:normal;z-index:3}
.tag.enemy:before{box-shadow:2px 0 0 #ff00a8}
.tag .fighter-name{display:block;width:max-content;max-width:100%;padding:1px 8px;background:#101018;transform:rotate(-4deg);border-bottom:3px solid #00e9ff;text-overflow:ellipsis;overflow:hidden}
.tag.enemy .fighter-name{border-color:#ff00a8;transform:rotate(3deg)}
#hud .tag i{height:17px;margin:3px 0 0;border:2px solid white;border-radius:0;background:#18181b;clip-path:polygon(3% 0,96% 0,100% 50%,96% 100%,3% 100%,0 50%);box-shadow:0 0 0 2px #08080b}
#hud .tag b{height:100%;background:linear-gradient(90deg,#48ef00,#e7ff00);border:1px solid #111;border-radius:0}
#round{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 118px);font-size:10px}
#status{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 137px);font-size:11px}
#attack,#defend,#taunt{background-position:center;opacity:var(--opacity);filter:drop-shadow(0 2px 2px #0008)}
#attack{background-image:url('menu-preview/assets/combat-controls.png');left:auto;right:1%;top:auto;bottom:calc(12px + env(safe-area-inset-bottom));width:35vw;height:32vw;max-width:185px;max-height:169px}
#defend{background-image:url('menu-preview/assets/combat-controls.png');left:auto;right:31%;top:auto;bottom:calc(13px + env(safe-area-inset-bottom));width:25vw;height:23vw;max-width:132px;max-height:122px}
#taunt{background-image:url('menu-preview/assets/combat-controls.png');left:auto;right:3%;top:auto;bottom:calc(33vw + 12px + env(safe-area-inset-bottom));width:21vw;height:21vw;max-width:111px;max-height:111px}
#stick{display:block;left:21%;top:auto;bottom:calc(15px + env(safe-area-inset-bottom));width:var(--stick-size);height:var(--stick-size);background-image:url('menu-preview/assets/combat-controls.png');transform:translateX(-50%)}
#stick.dragging{bottom:auto;transform:translate(-50%,-50%)}
#stick div{width:32%;height:32%;left:34%;top:34%;border:1px solid #fff8;background:#eee2;opacity:.6;box-shadow:0 0 8px #fff2}
#attack:active,#defend:active,#taunt:active{filter:brightness(1.25) drop-shadow(0 0 5px #fff);transform:scale(.97)}
@media(min-width:600px){#attack{right:3%}#defend{right:calc(3% + 180px)}#taunt{right:4%;bottom:190px}#stick{left:15%}}
@media(max-height:620px){#adSlot{height:30px}#tags{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 44px)}#round{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 99px)}#status{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 115px)}#attack{max-height:125px}#taunt{bottom:142px;max-height:85px}#stick{--stick-size:115px}}
@media(prefers-reduced-motion:reduce){#record.active{animation:none}}/* Read each region directly from the single atlas, including in image-resource contexts. */
#attack{background-image:url('menu-preview/assets/combat-controls.png');background-size:240% 179.96485%;background-position:87.05357% 100%;height:31.1171875vw;max-height:164.4765625px}
#defend{background-image:url('menu-preview/assets/combat-controls.png');background-size:289.81132% 233.2574%;background-position:23.35984% 100%;height:20.707547vw;max-height:109.33585px}
#taunt{background-image:url('menu-preview/assets/combat-controls.png');background-size:341.33333% 232.72727%;background-position:84.71455% 5.99315%;height:20.53333vw;max-height:108.53333px}
#stick{background-image:url('menu-preview/assets/combat-controls.png');background-size:207.56757% 162.53968%;background-position:11.30653% 0%;height:calc(var(--stick-size)*.85135135)}
#stick div{top:37%}
@media(max-height:620px){#attack{max-height:125px}#taunt{max-height:85px}}
#adSlot{display:none}
#tags{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 18px)}
#round{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 75px)}
#status{top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 94px)}
#postBattle{width:min(90vw,420px);border:2px solid #00e9ff;box-shadow:5px 5px 0 #ff00a8;background:#141726}
#postBattle h2{margin-top:0;font-size:26px;color:#edff00}#postBattle button{display:block;width:100%;margin:12px 0;min-height:48px;touch-action:manipulation}#continueBattle{background:#00d9ee;color:#101018;font-weight:800}#rewardHealth{border-color:#ff00a8;font-weight:700}#rewardHealth:disabled{opacity:.55;cursor:default}#rewardStatus{font-size:13px;line-height:1.5}#battleHealth{font-size:22px;font-weight:800;color:#b9ff00}
#resync{position:absolute;left:50%;transform:translateX(-50%);top:calc(max(8px,env(safe-area-inset-top)) + clamp(74px,12vh,110px) + 130px);min-height:44px;padding:8px 14px;font-size:12px;font-weight:800;background:#101827e8;border:2px solid #00d9ee;box-shadow:2px 2px 0 #ff00a8;color:white;white-space:nowrap}
#loading button{min-height:44px;margin:5px}#retryResync{background:#00d9ee;color:#101018;font-weight:800}
/* Review 22: live-world HUD and compact utilities. */
#hud .top{inset:max(8px,env(safe-area-inset-top)) 8px auto;height:90px;display:block}
#hud .top>button{position:absolute;top:2px;width:40px;height:40px;min-height:40px}
#hud .top #back{left:0}#hud .top #resync{left:48px;right:auto;transform:none;padding:7px;font-size:0;box-shadow:2px 3px 0 #00d9ee}
#hud .top #utilityToggle{right:0;left:auto;padding:8px}
#hud .hudLogo{left:27%;top:0;width:46%;height:88px;object-fit:contain}
#utilityMenu{position:absolute;top:52px;right:0;display:grid;grid-template-columns:repeat(2,44px);gap:12px;padding:14px;background:#080b14f2;border:2px solid white;border-radius:16px;box-shadow:3px 3px 0 #ff00a8;z-index:8}
#hud #utilityMenu button{position:static;width:44px;height:44px;min-height:44px;padding:6px;margin:0}
#tags{position:absolute;inset:0;display:block;pointer-events:none}
#hud .tag{position:absolute;top:0!important;left:0!important;width:clamp(92px,26vw,142px);padding:0;min-height:0;transform:translate(var(--head-x),var(--head-y)) translate(-50%,-100%);font-size:12px}
#hud .tag:before,#hud .tag:after{display:none}
#hud .tag .fighter-name{max-width:100%;margin:auto;text-align:center;padding:2px 7px;transform:none}
#hud .tag i{height:12px;margin-top:2px}
#round,#status,#mode{display:none!important}
#hud{--stick-size:clamp(148px,40vw,210px)}
#stick{left:22%;bottom:calc(16px + env(safe-area-inset-bottom))}
.offscreen-arrow{position:absolute;width:40px;height:40px;pointer-events:none;z-index:4;filter:drop-shadow(0 2px 3px #000)}
.offscreen-arrow svg{width:100%;height:100%}.offscreen-arrow circle{fill:#111d;stroke:white;stroke-width:1.5}.offscreen-arrow path{stroke:#fff;stroke-width:1.5}
#playerArrow path{fill:#41ed61}#enemyArrow path{fill:#ff334f}
#loading #cancelLoad{position:absolute;left:8px;top:max(10px,env(safe-area-inset-top));width:40px;height:40px;min-height:40px;padding:0;margin:0;font-size:0;border:2px solid white;border-radius:50%;background:#080b14;box-shadow:2px 3px 0 #00d9ee}
#loading #cancelLoad:before{content:'←';font:26px system-ui;color:white}
body:has(#loading:not([hidden])) #back{visibility:hidden}
#loading.scanning #loadingText{position:absolute;top:25%;margin:0;padding:0;background:none;color:white;font-size:13px;text-shadow:0 2px 4px #000}
#loading.scanning #loadingProgress{position:absolute;top:31%;height:12px;width:min(66vw,270px)}
#calibrationGuide{display:none;position:absolute;left:50%;top:52%;transform:translate(-50%,-50%);width:min(65vw,300px);height:160px;pointer-events:none;color:#00e9ff}
#loading.scanning #calibrationGuide{display:block}.scan-reticle{position:absolute;inset:0;border:2px dashed currentColor;border-radius:25px;opacity:.7}.scan-reticle:after{content:'+';position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font:32px system-ui}
.scan-grid{position:absolute;inset:15px;background:repeating-linear-gradient(0deg,transparent 0 23px,#00e9ff44 24px 25px),repeating-linear-gradient(90deg,transparent 0 23px,#00e9ff44 24px 25px);transform:perspective(170px) rotateX(45deg);opacity:.45}
#calibrationGuide[data-state=stable]{color:#b9ff00}#calibrationGuide[data-state=searching]{color:#ffcf37}
#nameDialog{background:#141726;color:white;border:2px solid #00e9ff;width:min(90vw,390px);box-shadow:4px 4px 0 #ff00a8}#nameDialog h2{color:#edff00}#nameDialog label{display:block;margin-bottom:8px}#playerName{width:100%;padding:12px;font:18px system-ui;background:#fff;color:#111;border:2px solid #00e9ff;border-radius:8px;user-select:text;-webkit-user-select:text;touch-action:auto}#nameDialog button{width:100%;margin-top:12px;min-height:48px}#nameDialog button[type=submit]{background:#00d9ee;color:#111;font-weight:800}
@media(max-width:360px){#hud .top>button{width:36px;height:36px;min-height:36px}#hud .top #resync{left:42px}#hud .hudLogo{left:27%;width:44%}}
#loadingAd{display:grid;place-items:center;width:min(300px,calc(100vw - 40px));aspect-ratio:300/250;flex:none;margin:16px 0;background:#191d2a;border:1px dashed #67718a;border-radius:8px;color:#939bb0;font-size:10px;letter-spacing:3px}
#loading.scanning #loadingAd{display:none}
#rewardAdSlot{position:fixed;inset:0;width:100vw;height:100dvh;background:#111;z-index:30}
@media(max-height:600px){#loadingAd{width:min(220px,calc(100vw - 40px));margin:8px 0}#loading:not(.scanning) .spinner{display:none}}

/* Supported display sizes, never shrink a served creative. */
#loadingAd{box-sizing:content-box;width:300px;height:250px;aspect-ratio:auto}
@media(max-height:600px),(max-width:339px){#loadingAd{width:200px;height:200px;aspect-ratio:auto}}

#hud.hide-ui .top>*{visibility:hidden}
#hud.hide-ui #utilityToggle{visibility:visible;opacity:.3;transition:opacity .15s}
#hud.hide-ui #utilityToggle:hover,#hud.hide-ui #utilityToggle:focus-visible,#hud.hide-ui #utilityToggle[aria-expanded=true]{opacity:1}
#hud.hide-ui #utilityMenu,#hud.hide-ui #utilityMenu *{visibility:visible}
#showHUD{display:none!important}

#hud .top #resync{left:auto;right:48px}
@media(max-width:360px){#hud .top #resync{left:auto;right:42px}}

/* Only the world-space observed-floor guide indicates placement; no fake screen-space grid. */
#loading.scanning #calibrationGuide{display:none}

/* Same saved opacity/default in solo, duel and 3D/AR; utility icons stay legible. */
#hud{--opacity:.65}#stick{opacity:var(--opacity,.65)}

