.chess-controls .bb-number-label {
  display: grid;
  width: var(--bb-control-width);
  min-width: 0;
  gap: 2px;
}
.chess-controls .bb-number-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 18px;
  gap: 4px;
  font: 12px/18px var(--bb-font);
}
.chess-controls .bb-number-header label {
  display: block;
  line-height: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chess-controls .bb-number-header output {
  text-align: right;
  white-space: nowrap;
}
.chess-controls .bb-number-source { display: none; }
.chess-controls .bb-number-editing output { display: none; }
.chess-controls .bb-number-editing .bb-number-source {
  display: block;
  width: 5ch;
  height: 18px;
  padding: 0 2px;
  border: 1px solid var(--cyan);
  border-radius: 0;
  text-align: right;
  appearance: textfield;
}
.chess-controls .bb-number-source::-webkit-inner-spin-button,
.chess-controls .bb-number-source::-webkit-outer-spin-button { appearance: none; margin: 0; }

.bb-number-control {
  --slider-symbol: #e8dc64;
  --slider-track: repeating-linear-gradient(to right, var(--cyan) 0 2px, transparent 2px 4px);
  --slider-thumb: repeating-linear-gradient(to bottom, var(--slider-symbol) 0 2px, transparent 2px 3px)
    center / 2px 20px no-repeat, var(--panel);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  height: 24px;
  user-select: none;
}
.bb-number-bracket {
  width: 100%;
  height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--slider-symbol);
  font: bold 21px/24px var(--bb-font);
  cursor: pointer;
}
.bb-number-bracket:enabled:hover { color: #fff2a0; }
.bb-number-bracket:disabled { cursor: default; }
.chess-controls .bb-number-track input {
  display: block;
  appearance: none;
  width: 100%;
  height: 24px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
}
.chess-controls .bb-number-track input:disabled { cursor: default; }
.chess-controls .bb-number-control :is(button, input):focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: -1px;
}
.bb-number-track input::-webkit-slider-runnable-track { height: 2px; background: var(--slider-track); }
.bb-number-track input::-moz-range-track { height: 2px; background: var(--slider-track); }
.bb-number-track input::-moz-range-progress { background: transparent; }
.bb-number-track input::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 24px;
  margin-top: -11px;
  border: 0;
  border-radius: 0;
  background: var(--slider-thumb);
}
.bb-number-track input::-moz-range-thumb {
  width: 14px;
  height: 24px;
  border: 0;
  border-radius: 0;
  background: var(--slider-thumb);
}
.bb-number-disabled { opacity: .45; }
