/* Compact HUD feedback keeps the track readable. */
#hud .hud-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
#hud .hud-overview{
  padding:calc(12px + env(safe-area-inset-top,0px)) max(3vw,env(safe-area-inset-right,0px)) 0 max(3vw,env(safe-area-inset-left,0px));
  background:linear-gradient(180deg,#02150eeb 0%,#02150e9e 58%,transparent 100%);
  text-shadow:0 1px 4px #00150e;
}
#hud .hud-top{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;padding:0;background:none;min-height:44px}
#hud .runner-badge{min-width:0;gap:9px}
#hud .runner-badge img{width:34px;height:41px;flex:none}
#hud .runner-badge>div{min-width:0}
#hud #hud-name{font-size:12px;line-height:1.2;letter-spacing:1px}
#hud #hud-difficulty{display:block;width:max-content;max-width:100%;margin:4px 0 0;padding:0;border:0;font:7px/1.3 var(--mono);letter-spacing:.5px;white-space:nowrap}
#hud #sector{font-size:7px;line-height:1.2;margin-top:4px}
#hud .score-box strong{margin-top:3px;font-size:24px;line-height:1.1;font-variant-numeric:tabular-nums}
#hud .hud-actions{justify-self:end;gap:6px}
#hud .hud-strip{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:8px 0}
#hud .hud-left,#hud .hud-right{position:static;display:flex;align-items:center;gap:12px;min-width:0}
#hud #health-group{display:flex;align-items:center;gap:8px}
#hud #health-group .eyebrow{font-size:8px;letter-spacing:.5px;color:#b7d9c6}
#hud #health{margin:0;gap:4px}
#hud #health i{width:22px;height:5px;transition:background .15s}
#hud #health-change{display:inline-block;width:20px;font:700 11px/1 var(--mono);font-variant-numeric:tabular-nums;color:#b8ffe1}
#hud #integrity{font-size:8px;color:#a2c4b0}
#hud .hud-right>b{display:inline;margin:0;font-size:13px;line-height:1;font-variant-numeric:tabular-nums}
#hud #combo{font-size:8px;white-space:nowrap}
#hud #combo:empty{display:none}
#hud .kills-counter{display:inline-flex;align-items:center;gap:5px;margin:0;font-size:8px;line-height:1;white-space:nowrap}
#hud .kills-counter b{margin:0;font-size:12px;font-variant-numeric:tabular-nums}
#hud .kills-icon{font-size:15px;color:#91eceb}
#hud .mission-bar{width:100%;margin:0}
#hud .mission-bar>div:first-child{margin-bottom:5px;font-size:7px;line-height:1.2;letter-spacing:.5px}
#hud .route-track{height:2px;background:#28463999}
#hud .route-track span{height:5px}
#hud .run-alert-slot{height:32px;display:flex;justify-content:center;align-items:center;margin-top:3px}
#hud #run-alert{
  position:relative;display:flex;align-items:center;gap:8px;max-width:100%;height:27px;padding:0 10px;
  color:#d5ffe7;background:#03251de8;border-radius:3px;overflow:hidden;white-space:nowrap;
}
#hud #run-alert-icon{font-size:22px;line-height:1;color:var(--green);flex:none}
#hud #run-alert-title{font:700 10px/1.2 var(--mono);letter-spacing:.25px}
#hud #run-alert-detail{font:9px/1.2 var(--mono);color:#b7d9c6}
#hud #run-alert-progress{position:absolute;bottom:0;left:0;right:0;height:2px;background:var(--green);transform-origin:left;transform:scaleX(0)}
#hud #run-alert[data-kind="aim"],#hud #run-alert[data-kind="fire"]{background:#27160fed;color:#ffe1c8}
#hud #run-alert[data-kind="aim"] #run-alert-icon,#hud #run-alert[data-kind="fire"] #run-alert-icon{color:#ffa575}
#hud #run-alert[data-kind="aim"] #run-alert-progress,#hud #run-alert[data-kind="fire"] #run-alert-progress{background:#ffae7e}
#hud #run-alert[data-kind="fire"] #run-alert-detail{color:#ffe1c8}
#hud #run-alert[data-kind="turn-now"]{background:#0a3b2eef}
#hud .power-status[data-feedback="gain"]{box-shadow:0 0 12px #82ffd666,inset 0 0 12px #82ffd62b}
#hud .power-status[data-feedback="gain"] .dial-track{stroke:#dcfff0;stroke-opacity:1}
#hud .power-status[data-feedback="locked"] .control-badge{color:#ffd0ad;border-color:#c58664}
#hud #health-group[data-feedback="gain"] #health i:not(.lost){background:#d7ffec;box-shadow:0 0 8px #82ffd655}
#hud #health-group[data-feedback="loss"] #health-change{color:#ffb396}

@media(max-width:650px){
  #hud .hud-overview{padding:calc(8px + env(safe-area-inset-top,0px)) max(12px,env(safe-area-inset-right,0px)) 0 max(12px,env(safe-area-inset-left,0px))}
  #hud .hud-top{grid-template-columns:minmax(0,1fr) auto auto;gap:6px}
  #hud .runner-badge{gap:6px}
  #hud .runner-badge img{width:27px;height:34px}
  #hud #hud-name{font-size:10px}
  #hud #hud-difficulty{font-size:6px;letter-spacing:0;overflow:hidden;text-overflow:ellipsis}
  #hud #sector{display:none}
  #hud .score-box strong{font-size:19px;letter-spacing:1px}
  #hud .score-box .eyebrow{font-size:6px;letter-spacing:.5px}
  #hud .hud-actions{gap:3px}
  #hud .hud-strip{margin:6px 0 8px;gap:8px;min-height:15px}
  #hud .hud-left,#hud .hud-right{gap:9px}
  #hud #health-group{gap:6px}
  #hud #health-group .eyebrow{font-size:7px}
  #hud #health i{width:14px}
  #hud #health-change{width:17px;font-size:10px}
  #hud #integrity{display:none}
  #hud .hud-right>b{font-size:12px}
  #hud #combo{font-size:7px}
  #hud .kills-counter{gap:4px}
  #hud .kills-counter b{font-size:11px}
  #hud .kills-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  #hud .mission-bar>div:first-child{font-size:7px;letter-spacing:0;gap:8px}
  #hud .run-alert-slot{height:29px;margin-top:3px}
  #hud #run-alert{height:25px;gap:6px;padding:0 8px}
  #hud #run-alert-title{font-size:9px;letter-spacing:0}
  #hud #run-alert-detail{font-size:8px}
}
@media(max-width:650px) and (orientation:portrait){
  /* A narrow column on the left keeps the character and all three lanes visible. */
  #hud{--power-size:46px;--fire-size:68px}
  #hud .game-bottom{left:max(16px,env(safe-area-inset-left,0px));right:max(22px,env(safe-area-inset-right,0px))}
  #hud .combat-actions{width:100%;justify-content:space-between;align-items:flex-end;padding:0 0 27px;gap:12px}
  #hud .power-statuses{flex-direction:column;align-items:center;gap:22px}
  #hud .power-hint{display:none}
  #hud .control-label{top:calc(100% + 4px)}
  #hud .control-label b{font-size:7px;letter-spacing:.2px}
  #hud .control-badge{width:23px;height:23px;font-size:9px}
  #hud #shoot-button .laser-icon{font-size:33px}
  #hud #shoot-button small{font-size:6px}
}
@media(max-height:550px) and (orientation:landscape){
  #hud .hud-overview{padding-top:calc(6px + env(safe-area-inset-top,0px))}
  #hud .hud-top{min-height:44px}
  #hud #sector{display:none}
  #hud .hud-strip{margin:3px 0 5px;min-height:13px}
  #hud .mission-bar>div:first-child{margin-bottom:3px;font-size:7px}
  #hud .run-alert-slot{height:27px;margin-top:2px}
  #hud #run-alert{height:24px}
}
@media(prefers-reduced-motion:reduce){#hud #health i{transition:none}}

/* A legible, single-line badge in the score HUD; never over the runway. */
#hud .score-feedback-slot{height:24px;max-width:164px;margin:3px auto 0;display:flex;align-items:center;justify-content:center;pointer-events:none}
#hud #bonus-toast{position:static;display:inline-block;max-width:100%;margin:0;padding:3px 6px;border:0;border-left:2px solid #83ffd0;border-radius:0;background:#03251de8;box-shadow:none;transform:none;color:#dcfff0;font:600 12px/1.2 Oxanium,'Trebuchet MS',sans-serif;letter-spacing:.015em;text-align:center;text-shadow:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none}
@media(max-width:650px){#hud .score-feedback-slot{height:22px;max-width:126px;margin-top:2px}#hud #bonus-toast{font-size:11px;letter-spacing:0;padding:3px 4px}}
@media(max-height:550px) and (orientation:landscape){#hud .score-feedback-slot{height:21px}#hud #bonus-toast{font-size:11px}}

/* Instrument multipliers appear in the screen center; power labels stay in the HUD. */
#hud #bonus-toast[data-kind="instrument"]{position:fixed;left:50%;top:50%;z-index:5;transform:translate(-50%,-50%);width:max-content;max-width:calc(100vw - 32px);padding:8px 14px;border:1px solid #83ffd066;border-left:2px solid #83ffd0;background:#03251de8;font-size:clamp(16px,2.8vw,22px);line-height:1.3;letter-spacing:.04em;pointer-events:none}
