/* Keep the live mana value, shop control and readiness pips in one bounded group. */
.command-bar .spells-panel>.energy-panel{
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;
  align-content:center;align-items:center;justify-items:stretch;gap:2px;
  width:clamp(152px,15vw,176px);flex:0 0 clamp(152px,15vw,176px);min-width:0;
  padding:0 10px 0 0;border-right:1px solid var(--line);text-align:left;
}
.command-bar .energy-panel>.energy-label{
  display:flex;grid-row:1;align-items:center;gap:6px;min-width:0;margin:0;
  color:#dbe6ed;font:400 var(--type-caption)/1.3 var(--sans);
  letter-spacing:0;white-space:normal;overflow-wrap:anywhere;
}
.command-bar .energy-label:before{display:block;flex:0 0 24px;width:24px;height:24px;margin:0}
.command-bar .energy-label>.resource-plus{
  display:inline-flex;align-items:center;justify-content:center;flex:0 0 48px;
  width:48px;min-width:48px;height:48px;min-height:48px;margin:0 0 0 auto;
  line-height:1;flex-shrink:0;
}
.command-bar .energy-panel>.energy-value{
  grid-row:2;min-width:0;color:#c8def4;
  font:600 var(--type-body)/1.2 var(--sans);font-variant-numeric:tabular-nums;
  white-space:normal;overflow-wrap:anywhere;
}
.command-bar .energy-value>b{font:inherit}
.command-bar .energy-value>span{color:#bdcbd7;font:400 var(--type-body)/1.2 var(--sans)}
.command-bar .energy-panel>.energy-pips{
  display:flex;grid-row:3;gap:2px;justify-content:stretch;min-width:0;width:100%;margin:2px 0 0;
}
.command-bar .energy-pips>i{flex:1 1 0;min-width:0;width:auto;height:7px;background:#43576b}
.command-bar .energy-pips>i.filled{background:var(--blue)}
.command-bar .energy-label>.resource-plus:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
@media(max-width:999px){
  .command-bar .spells-panel>.energy-panel{
    grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;
    width:100%;padding:0 0 8px;margin-bottom:8px;border-right:0;border-bottom:1px solid var(--line);
    column-gap:12px;row-gap:4px;
  }
  .command-bar .energy-panel>.energy-label{grid-column:1;grid-row:1;flex-wrap:wrap}
  .command-bar .energy-panel>.energy-value{grid-column:2;grid-row:1;text-align:right}
  .command-bar .energy-panel>.energy-pips{grid-column:1/-1;grid-row:2}
}
