.fighter-labels { position:absolute; inset:0 auto auto 0; width:100%; height:80%; pointer-events:none }
#display #native-zh { pointer-events:none }
#display #native-zh[hidden] { display:none }
#native-intro { position:absolute; z-index:1; left:4%; bottom:4%; background:#132720ed; color:#eef6de; border:1px solid #96b795; font-size:clamp(11px,1.7vmin,15px) }
body:not(.running) #native-intro { display:none }
#native-modes { position:absolute; z-index:1; right:4%; bottom:4%; background:#e7fb4c; color:#132720; font-size:clamp(11px,1.7vmin,15px) }
body:not(.running) #native-modes { display:none }
.handheld #native-intro,.handheld #native-modes { bottom:auto; top:max(3px,env(safe-area-inset-top)); min-height:38px }
.handheld #native-intro { left:25% }
.handheld #native-modes { right:18% }
.field-view .fighter-labels { left:var(--fighters-x); width:var(--fighters-w); top:var(--field-top); height:var(--field-height) }
.fc-battle #display { overflow:hidden; aspect-ratio:4/3; width:min(100cqw,133.333cqh) }
.handheld .fc-battle #display { width:min(100vw,133.333dvh) }
.fc-battle #display #screen { height:125%; clip-path:inset(0 0 20% 0) }
.fc-battle .fighter-labels { height:100% }
body:not(.running) .fighter-labels, .fighter-labels[hidden], .fighter-tag[hidden] { display:none }
.fighter-tag { position:absolute; transform:translate(-50%,calc(-100% - 4px)); border-radius:4px; border:1px solid #d8e3d4; padding:1px 5px; background:#182821ed; color:#fff; font:800 clamp(10px,1.25vmin,15px)/1.2 system-ui,sans-serif; box-shadow:0 1px 3px #0008; z-index:1 }
.fighter-tag::after { content:''; position:absolute; top:100%; left:50%; margin-left:-3px; border:3px solid transparent; border-top-color:#d8e3d4 }
.fighter-tag.human { background:#e7fb4c; color:#102418; border-color:#f6ffab; z-index:2 }
.fighter-tag.human::after { border-top-color:#f6ffab }
.fighter-tag[data-team="red"] { --team-bg:#aa303c; --team-edge:#ffc7c5 }
.fighter-tag[data-team="blue"] { --team-bg:#215ca6; --team-edge:#bedfff }
.fighter-tag[data-team] { background:var(--team-bg); color:white; border-color:var(--team-edge); white-space:nowrap }
.fighter-tag[data-team]::after { border-top-color:var(--team-edge) }
#battle-status {
  position:absolute; inset:max(8px,env(safe-area-inset-top)) 0 auto; z-index:4;
  display:grid; justify-items:center; gap:4px; pointer-events:none; container-type:inline-size;
  --hud-side:max(64px,calc(env(safe-area-inset-left) + 54px),calc(env(safe-area-inset-right) + 54px));
}
#battle-status #vitals { display:none }
.running #battle-status #vitals:not([hidden]) {
  position:static; display:grid; grid-template-columns:repeat(4,minmax(0,1fr));
  width:min(66%,calc(100% - 2 * var(--hud-side))); max-width:none; box-sizing:border-box;
  color:#f3f4e8; background:#132720ed; border:1px solid #adc5a875; border-radius:6px;
  font:700 clamp(15px,1.7cqw,44px)/1.12 system-ui,sans-serif;
  gap:.65em; padding:.3em .55em .38em;
}
#vitals > div { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.17em .25em; min-width:0 }
#vitals b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
#vitals span { text-align:right; font-variant-numeric:tabular-nums }
#vitals .human b { color:#e7fb4c }
#vitals meter { grid-column:1/-1; width:100%; height:.44em; font:inherit; appearance:none; background:#40564c; border:0; border-radius:.12em; overflow:hidden }
#vitals meter::-webkit-meter-bar { height:100%; background:#40564c; border:0 }
#battle-status > #net-hud { position:static; justify-self:end; margin-right:var(--hud-side) }
@container (max-width:520px) {
  .running #battle-status #vitals:not([hidden]) { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:.32em }
}
#vitals meter::-webkit-meter-optimum-value { background:#f1a56f }
#vitals .human meter::-webkit-meter-optimum-value { background:#e7fb4c }
#vitals meter::-moz-meter-bar { background:#f1a56f }

.team-timing { display:flex; justify-content:center; gap:6px; max-width:calc(100% - 24px); pointer-events:none }
body:not(.running) .team-timing,.team-timing[hidden],.timing-card[hidden] { display:none }
.timing-card { display:grid; grid-template-columns:auto 1fr; gap:4px 10px; align-items:baseline;
  width:clamp(208px,23cqw,400px); max-width:46vw; box-sizing:border-box; padding:5px 8px 7px;
  background:#102521f5; color:#fff8e8; border:1px solid #7c998c; border-radius:5px;
  font:700 clamp(12px,1.2cqw,20px)/1.15 system-ui,sans-serif }
.timing-card b { color:#ffb2a6 }
.timing-card[data-team="blue"] b { color:#a5d9ff }
.timing-card strong { justify-self:end; white-space:nowrap }
.timing-card.can-punch strong { color:#e7fb80 }
.timing-card.can-punch { border-color:#d7ec7c }
.timing-track { grid-column:1/-1; height:1.18em; position:relative; background:#40534e; border-radius:2px }
.timing-zone { position:absolute; top:0; bottom:0; text-align:center; background:#daf26c; color:#17271b; font-size:.88em; line-height:1.34 }
.timing-pointer { position:absolute; top:-2px; bottom:-2px; width:3px; transform:translateX(-50%);
  background:white; border-radius:2px; box-shadow:0 0 0 1px #18261e }
