.voltage-bays {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.35rem, 1.2vw, .8rem);
  padding: 0;
  margin: .85rem 0;
  list-style: none;
}
.voltage-bay {
  display: grid;
  align-content: center;
  width: 100%;
  min-height: 64px;
  padding: .36rem .28rem;
  border: 1px dashed #7f9ba7;
  background: #142d3e;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.voltage-bay small {
  margin-top: .25rem;
  color: var(--muted);
  font-size: clamp(.7rem, 2.25vw, .88rem);
}
.voltage-bay[data-ready] { border: 1px solid var(--live); }
.voltage-bay[data-connected] { border-style: solid; background: #16413f; }
.voltage-bay[data-hover] { background: #336275; outline: 2px solid var(--focus); }
.voltage-bay[data-wrong] { border: 1px solid #efac89; }
.bay-name { font-size: clamp(.77rem, 2.5vw, .98rem); }
.power-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: .22rem 1.15rem;
  color: var(--muted);
  margin: .75rem 0 .25rem;
  font-variant-numeric: tabular-nums;
}
.power-metrics output { color: var(--gold); font-weight: 700; }
.transformer-bank {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  gap: .4rem;
  margin: .48rem 0 .9rem;
}
.transformer-piece {
  display: grid;
  padding: .45rem .55rem;
  text-align: left;
  min-width: 0;
  background: linear-gradient(142deg, #274957, #142e3e);
  border-left: 3px solid var(--part-color, #83cdef);
  line-height: 1.32;
  touch-action: none;
  cursor: grab;
}
.transformer-piece span { font-size: .76rem; color: var(--muted); }
.transformer-piece strong { font-size: .9rem; }
.transformer-piece[data-installed] span { color: var(--live); }
.transformer-piece[aria-pressed=true] { border-color: var(--focus); background: #365365; }
.drag-tag {
  position: fixed;
  z-index: 4;
  inset: 0 auto auto 0;
  border: 1px solid #ffde9b;
  border-radius: 8px;
  padding: .28rem .5rem;
  color: #f9f4de;
  background: #142b3c;
  font-size: .85rem;
  font-weight: 680;
  pointer-events: none;
}
.shift-chart { aspect-ratio: 3.6 / 1; }
.shift-axis {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  padding: 0;
  margin: .75rem 0 .14rem;
  list-style: none;
  text-align: center;
  line-height: 1.3;
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.shift-job { margin: .45rem 0 .65rem; }
.shift-job [data-job-detail] { margin: 0 0 .15rem; font-size: .86rem; color: var(--muted); }
.shift-job [data-job-detail] strong { color: var(--text); }
.shift-track {
  position: relative;
  height: 48px;
  border: 1px solid #648694;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(12.5% - 1px), #7395a05c calc(12.5% - 1px) 12.5%),
    linear-gradient(90deg, #122837 var(--window-start), #233f4f var(--window-start) var(--window-end), #122837 var(--window-end));
}
.shift-handle {
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: var(--start);
  width: var(--duration);
  min-width: 24px;
  min-height: 44px;
  padding: 0;
  border-radius: 7px;
  border: 1px solid #0b2538;
  color: #142938;
  background: var(--job);
  font-size: clamp(.74rem, 2.4vw, .88rem);
  cursor: grab;
  touch-action: none;
}
.shift-handle:active { cursor: grabbing; }
.shift-handle:hover:not(:disabled) { background: var(--job); filter: brightness(1.08); }
.shift-handle[aria-pressed=true] { outline: 2px solid var(--focus); outline-offset: -3px; }
.shift-handle:focus-visible { outline: 3px solid white; outline-offset: -3px; }
.shift-handle:disabled, .voltage-bay:disabled, .transformer-piece:disabled { opacity: .9; }
.shift-tools { display: flex; gap: .35rem .55rem; align-items: center; flex-wrap: wrap; margin: .55rem 0 .8rem; }
.shift-tools span { color: var(--muted); font-size: .83rem; }
@media (max-width: 570px) {
  .shift-chart { aspect-ratio: 2.15 / 1; }
  .transformer-bank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transformer-piece { padding: .38rem; }
}
