/* Save/undo controls share the command header, leaving the chip board intact. */
body[data-route="ai"] .command-back-row {
  padding-right: 152px;
  gap: 16px;
}

.tactics-tools {
  --tactics-accent: #67dce3;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  pointer-events: auto;
}

.tactics-tools button {
  min-height: 34px;
  height: 34px;
  padding: 3px 10px;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
}

.tactics-tools .tactics-undo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 125px;
  color: #bceef0;
  border-color: rgba(103, 220, 227, .5);
}

.tactics-undo-count {
  min-width: 20px;
  padding: 2px 4px;
  border-radius: 3px;
  color: #99dce1;
  background: #112f39;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tactics-tools button:disabled { opacity: .4; cursor: default; }
.tactics-tools button:focus-visible { outline: 2px solid var(--tactics-accent); outline-offset: 3px; }

.tactics-bank {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 3px 4px;
  border: 1px solid #3a515c;
  border-radius: 4px;
  background: rgba(4, 17, 23, .8);
}

.tactics-bank-label {
  position: relative;
  min-width: 25px;
  padding: 0 5px 0 3px;
  color: #8ca5b1;
  font-size: 17px;
  font-weight: 900;
  text-align: center;
}

.tactics-bank.is-saved .tactics-bank-label { color: #d4e5eb; }
.tactics-bank.is-saved .tactics-bank-label::after {
  content: "";
  position: absolute;
  right: 1px;
  top: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--tactics-accent);
}
.tactics-bank.is-current { border-color: #68bdc6; background: #14313b; }
.tactics-bank.is-current .tactics-bank-label { color: var(--tactics-accent); }
.tactics-bank button { min-width: 52px; height: 28px; min-height: 28px; padding: 2px 7px; font-size: 14px; }
.tactics-bank .tactics-preset-load { color: #a8e9ed; }

.tactics-tools-notice {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 280px;
  color: #a4c6d1;
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.tactics-overwrite {
  position: absolute;
  z-index: 90;
  top: calc(100% + 9px);
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid #bc9b60;
  background: #18272d;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
}
.tactics-overwrite > span { min-width: 0; color: #f3dfb6; font-size: 15px; line-height: 1.4; }
.tactics-overwrite button { flex: 0 0 auto; }
.tactics-overwrite .tactics-overwrite-confirm { color: #f5dfb2; border-color: #bda16d; }
