/* Battle + Endless: the selected single-row HUD (art/battle-hud-2026-10-22/simple-square/E).
   Keep the existing live card instruments; only the presentation is compact. */
.cd-number { display: none; }
:root #hud.battle-hud .cards {
  left: calc(16px + var(--safe-l)); right: auto; top: auto; bottom: calc(16px + var(--safe-b));
  width: min(calc(var(--players, 1) * 124px), calc(100% - 32px - var(--safe-l) - var(--safe-r)));
  display: flex; flex-wrap: nowrap; justify-content: start; gap: 0; align-items: stretch;
  border: 1px solid #60dcff70; border-radius: 5px; background: #081c30df;
}
:root #hud.battle-hud .cards .card {
  flex: 1 1 0; display: block; min-width: 0; max-width: none; width: 0; height: 118px;
  padding: 0; --c: var(--player-color); --cut: 4px;
}
:root #hud.battle-hud .card + .card { border-left: 1px solid #60dcff40; }
:root #hud.battle-hud .card::before { display: none; }
:root #hud.battle-hud .card :is(.card-pilot, .card-mech, .card-code, .card-hp-n, .frame, .card-skills, .mv-name, .mv > .key, .cells, .mv-guard, .g-ammo, .g-value, .g-name) { display: none; }
:root #hud.battle-hud .card-head {
  position: absolute; left: 8px; right: 8px; top: 9px; width: auto;
  display: flex; gap: 4px; height: 22px; align-items: center;
}
:root #hud.battle-hud .card-p { font: 700 11px/18px 'Chakra Petch', sans-serif; padding: 0 3px; }
:root #hud.battle-hud .card-portrait {
  display: block; position: absolute; left: 35px; right: auto; top: 5px; bottom: auto;
  width: 26px; height: 28px; object-fit: cover; object-position: center top;
  border-radius: 3px; filter: none;
}
:root #hud.battle-hud .card-face { display: none; }
:root #hud.battle-hud .card.talking .card-portrait { opacity: 1; }
:root #hud.battle-hud .card .stock { display: flex; gap: 3px; max-width: calc(100% - 55px); flex-wrap: wrap; }
:root #hud.battle-hud .card .stock i { width: 4px; height: 4px; box-shadow: none; }
:root #hud.battle-hud .card-hp {
  position: absolute; left: 25px; right: 9px; top: 41px; width: auto; height: 7px;
  margin: 0; transform: none; overflow: visible; background: #233c50; box-shadow: none;
}
:root #hud.battle-hud .card-hp .fill { background: #7cf5a1; box-shadow: none; }
:root #hud.battle-hud .card-hp::before {
  content: '♥'; position: absolute; left: -17px; top: -4px; color: #7cf5a1;
  font: 700 13px/16px sans-serif; text-shadow: none;
}
:root #hud.battle-hud .card-body, :root #hud.battle-hud .card-gauges { display: contents; }
:root #hud.battle-hud .g-boost {
  position: absolute; left: 25px; right: 9px; top: 56px; width: auto; height: 7px;
  min-height: 0; display: block; margin: 0;
}
:root #hud.battle-hud .g-boost::before {
  content: 'ϟ'; position: absolute; left: -17px; top: -5px; font: 900 18px/16px sans-serif; color: #49dfff;
}
:root #hud.battle-hud .g-boost .g-bar { height: 7px; transform: none; box-shadow: none; background: #233c50; }
:root #hud.battle-hud .g-boost .g-bar i { background: #49dfff; box-shadow: none; }
:root #hud.battle-hud .g-boost.low .g-bar i { background: var(--red); }
:root #hud.battle-hud .mv-walk { position: absolute; top: -24px; right: 0; font-size: 0; }
:root #hud.battle-hud .mv-walk .key { display: none; }
:root #hud.battle-hud .mv-walk::after { content: '↟'; font: 700 11px/1 sans-serif; color: var(--amber); }
:root #hud.battle-hud .card-moves {
  position: absolute; left: 8px; right: 8px; bottom: 9px; top: auto; width: auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px;
  min-height: 0; padding: 0; border: 0;
}
:root #hud.battle-hud .mv {
  position: relative; display: grid; grid-template: 1fr / 1fr; place-items: center;
  min-width: 0; min-height: 0; height: 32px; padding: 2px; gap: 0;
  border: 1px solid color-mix(in srgb, var(--c) 50%, #173246); border-radius: 4px;
  background: #102738; clip-path: none;
}
:root #hud.battle-hud .mv::before { display: none; }
:root #hud.battle-hud .ability-art {
  display: block; grid-area: 1 / 1; width: 100%; height: 100%;
  background-size: contain; background-repeat: no-repeat; background-position: center;
}
:root #hud.battle-hud .mv .cd {
  --a: calc((1 - var(--cool, 0)) * 360deg);
  display: none; visibility: visible; position: absolute; inset: 0; width: auto; height: auto;
  border-radius: inherit; background: conic-gradient(transparent 0 var(--a), #02080fd9 var(--a));
}
:root #hud.battle-hud .mv.cooling .cd, :root #hud.battle-hud .mv.ult:not(.ready) .cd { display: block; }
:root #hud.battle-hud .mv .cd::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: conic-gradient(var(--c) 0 var(--a), #ffffff20 var(--a));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); mask-composite: exclude; padding: 2px;
}
:root #hud.battle-hud .mv .cd::after { display: none; }
:root #hud.battle-hud .cd-number {
  display: block; position: absolute; inset: 0; align-content: center; text-align: center;
  z-index: 3; color: #fff; font: 700 13px/1 'Chakra Petch', sans-serif; text-shadow: 0 1px 3px #000;
}
:root #hud.battle-hud .cd-number:empty { display: none; }
:root #hud.battle-hud .mv.ult.ready { border-color: var(--amber); background: #302c1c; }
:root #hud.battle-hud .mv.gone { opacity: .35; filter: grayscale(1); }
:root #hud.battle-hud .mv.gone::after { content: '×'; position: absolute; inset: 0; text-align: center; font: 700 28px/30px sans-serif; color: #ff7567; }
:root #hud.battle-hud .mv.gone :is(.cd, .cd-number) { display: none; }
:root #hud.battle-hud .card-down { border-radius: 4px; clip-path: none; }
:root #hud.battle-hud .card-down small { font-size: 10px; letter-spacing: 0; }
:root #hud.battle-hud .card-down b { font-size: 32px; }
:root #hud.battle-hud .card-combo { top: auto; left: auto; right: 4px; bottom: calc(100% + 5px); }
:root #hud.battle-hud .card-combo b { font-size: 24px; }
:root #hud.battle-hud .card-combo small { font-size: 9px; }
:root #hud.battle-hud .card-note { top: auto; bottom: calc(100% + 6px); font-size: 11px; max-width: 180px; }
:root #hud.battle-hud .card > .chat { width: 210px; max-width: calc(100vw - 32px); top: auto; bottom: calc(100% + 8px); }

/* The shared command rail keeps its campaign geometry and live loss attribution. */
:root #hud.battle-hud .match-status .hud-bill { grid-template-columns: minmax(0, 1fr) minmax(88px, .8fr); gap: 10px; }
:root #hud.battle-hud .match-status .boss { grid-column: 2 / -1; width: 100%; min-width: 0; margin-top: 5px; }
:root #hud.battle-hud .minimap {
  left: auto; right: calc(16px + var(--safe-r)); bottom: auto;
  top: calc(var(--cp-status-bottom, 110px) + 12px); width: 190px; height: 190px;
  border: 1px solid var(--mech-accent);
}
:root #hud.battle-hud .news:not(.full) {
  left: auto; top: auto; right: calc(16px + var(--safe-r)); bottom: calc(16px + var(--safe-b));
  width: clamp(220px, min(30.5vw, (100vh - 560px) * 1.7778), 460px);
}
:root #hud.battle-hud .feed { top: calc(var(--cp-status-bottom, 110px) + 10px); right: calc(218px + var(--safe-r)); max-width: 260px; font-size: 11px; }
@media (min-width: 1300px) and (min-height: 600px) {
  :root #hud.battle-hud .minimap { top: calc(72px + var(--safe-t)); }
}
@media (max-width: 1170px) {
  :root #hud.battle-hud .match-status .hud-bill { grid-template-columns: minmax(0, 1fr); gap: 5px; }
}
@media (max-width: 760px) {
  :root #hud.battle-hud .cards { width: min(calc(var(--players, 1) * 106px), calc(100% - 24px - var(--safe-l) - var(--safe-r))); left: calc(12px + var(--safe-l)); }
  :root #hud.battle-hud .minimap { width: 124px; height: 124px; right: calc(10px + var(--safe-r)); }
  :root #hud.battle-hud .news:not(.full) { width: min(220px, 43vw); right: calc(10px + var(--safe-r)); }
  :root #hud.battle-hud .feed { right: calc(144px + var(--safe-r)); max-width: 190px; }
}
@media (max-height: 600px) {
  :root #hud.battle-hud .minimap { width: 124px; height: 124px; }
}
/* The instrument row stays at the foot. Touch actions keep their existing reach and gesture guard. */
:root.touch #hud.battle-hud .news:not(.full) { bottom: calc(246px + var(--safe-b)); width: min(220px, 42vw); }
:root.touch #hud.battle-hud .cards { top: auto; }
:root.touch body:has(#hud.battle-hud:not([hidden])) .stick:not(.on) .stick-ring { top: auto; bottom: 144px; margin-bottom: 0; }
@media (max-height: 540px) and (orientation: landscape) {
  :root.touch #hud.battle-hud .minimap { width: 100px; height: 100px; top: calc(66px + var(--safe-t)); }
  :root.touch #hud.battle-hud .cp-status { width: calc(100% - 160px - var(--safe-l) - var(--safe-r)); }
  :root.touch #hud.battle-hud .cards { width: min(calc(var(--players, 1) * 112px), calc(100% - 280px)); }
  :root.touch #hud.battle-hud .news:not(.full) { width: min(160px, 24vw); right: calc(260px + var(--safe-r)); top: calc(var(--cp-status-bottom, 110px) + 8px); bottom: auto; }
}
@media (prefers-reduced-motion: reduce) {
  :root #hud.battle-hud .mv.ult.ready .ability-art { animation: none; }
}
