/* Keep the building playable beneath status overlays. Dialogs retain their full layout. */
#game{min-height:0;--hud-edge:12px;--hud-top:max(12px,env(safe-area-inset-top));--dock-bottom:calc(34px + env(safe-area-inset-bottom))}
.intro{top:var(--hud-top);left:var(--hud-edge);width:250px;max-width:none;padding:10px 12px;border-width:2px;border-radius:15px;transform:none;box-shadow:2px 3px 0 #20384d55}
.intro h1{font-size:26px;letter-spacing:-1px;margin:0 0 4px;text-shadow:1px 1px 0 #20384d;-webkit-text-stroke:.6px #20384d}
.intro h2{font-size:15px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0 0 4px}
.intro .address{display:none}
.intro #company-change,.intro .support-entry{min-height:32px;font-size:11px;margin:0;padding:5px 7px;vertical-align:middle}
.intro .support-entry{margin-left:4px;padding-inline:9px}
.utilities{top:var(--hud-top);right:var(--hud-edge);grid-template-columns:repeat(2,44px);gap:6px}
.utilities .icon-button{width:44px;height:44px;border-radius:12px}
.utilities svg{width:22px;height:22px}
.rank-hud{top:var(--hud-top);width:350px;padding:10px 14px 8px;border-width:2px;border-radius:14px;box-shadow:2px 3px 0 #20384d55;pointer-events:none}
.hud-main{gap:12px;align-items:center}
.hud-main>div{flex-direction:row;align-items:baseline;gap:5px;white-space:nowrap}
.hud-main>div:nth-child(2){justify-content:center}
.hud-main span{font-size:10px}
.hud-main strong{font-size:25px;line-height:1.15}
.combo-track{height:3px;margin-top:6px}
#combo-caption{display:none}
.damage,.ranked .damage{left:var(--hud-edge);bottom:calc(var(--dock-bottom) + 88px);width:auto;padding:5px 10px;display:flex;align-items:center;gap:7px;border-width:2px;border-radius:12px;box-shadow:2px 2px 0 #20384d55;pointer-events:none}
.damage-label{font-size:10px}.damage-number{margin:0;line-height:1;gap:1px}
.damage-number strong,.ranked .damage-number strong{font-size:22px;line-height:1}.damage-number span{font-size:12px}
.damage .track{width:44px;height:4px}
.tools-area,.ranked .tools-area{bottom:var(--dock-bottom);width:max-content;max-width:calc(100% - 24px);left:50%;right:auto;transform:translateX(-50%);pointer-events:none}
.tools{padding:4px;gap:3px;border-width:2px;border-radius:16px;box-shadow:0 3px 0 #20384d66;pointer-events:auto}
.tool,.ranked .tool{width:78px;height:72px;padding:3px 4px 5px;gap:1px;border-radius:11px}
.tool .weapon-art{width:46px;height:44px}
.tool>span:not(.ammo){font-size:11px}
.tool .ammo{font-size:9px;top:1px;right:1px}
.weapon-info,.tools-area .hint{display:none}
.attribution{pointer-events:none}.attribution a{pointer-events:auto}
@media(min-width:701px) and (max-width:1050px) and (min-height:501px){.intro{width:210px}.rank-hud{left:240px;right:120px;transform:none;width:auto}.hud-main{gap:8px}.hud-main strong{font-size:23px}}
@media(max-width:700px),(max-height:500px) and (orientation:landscape){
  #game{--hud-edge:8px;--hud-top:max(8px,env(safe-area-inset-top))}
  .intro{width:calc(100% - 164px);padding:6px 7px;border-radius:12px}
  .ranked .intro{width:calc(100% - 116px)}
  .intro h1{display:none}.intro h2{font-size:13px;line-height:18px;margin-bottom:2px;letter-spacing:-.3px}
  .intro #company-change,.intro .support-entry{font-size:10px;padding:4px 5px;min-height:32px;letter-spacing:-.3px}
  .intro .support-entry{margin-left:2px}
  .utilities{display:flex;flex-direction:row;gap:4px}
  /* Company change opens the same ranking lobby; reset is unavailable during a round. */
  .utilities #rank-button,.ranked .utilities #reset{display:none}
  .utilities .icon-button{width:44px;height:44px;border-radius:11px}
  .rank-hud{top:calc(var(--hud-top) + 76px);left:8px;right:8px;transform:none;width:auto;padding:7px 10px 6px;border-radius:12px}
  .hud-main{gap:8px}.hud-main span{font-size:10px}.hud-main strong{font-size:23px}.combo-track{margin-top:4px}
  .tools-area,.ranked .tools-area{left:8px;right:8px;transform:none;width:auto;max-width:none}
  .tools{gap:2px;padding:4px;border-radius:14px}
  .tool,.ranked .tool{width:auto;min-width:44px;flex:1;height:60px;padding:2px 1px 4px;gap:1px;border-radius:9px}
  .tool .weapon-art{width:38px;height:35px}.tool>span:not(.ammo){font-size:10px;letter-spacing:-.4px}
  .tool.selected .weapon-art{transform:none}.tool .ammo,.ranked .ammo{font-size:9px;padding:1px 3px;top:0;right:0}
  .damage,.ranked .damage{bottom:calc(var(--dock-bottom) + 78px);padding:4px 8px;gap:5px}
  .damage-number strong,.ranked .damage-number strong{font-size:19px}.damage .track{width:32px}
  .attribution{bottom:calc(4px + env(safe-area-inset-bottom));right:8px}
}
@media(max-height:500px) and (orientation:landscape){
  .intro,.ranked .intro{width:182px}
  .rank-hud{top:var(--hud-top);left:50%;right:auto;transform:translateX(-50%);width:calc(100% - 400px);max-width:320px}
  .hud-main{gap:5px}.hud-main>div{gap:3px}.hud-main strong{font-size:20px}.hud-main span{font-size:9px}
  .tools-area,.ranked .tools-area{left:50%;right:auto;transform:translateX(-50%);width:min(420px,calc(100% - 180px))}
  .damage,.ranked .damage{bottom:var(--dock-bottom)}
}
