.kst-page-verbraucher #sicherungskasten {
  align-self: start;
}

.kst-page-verbraucher #sicherungskasten h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kst-page-verbraucher #sicherungskasten h3::after {
  content: "LIVE MAPPING";
  padding: 5px 8px;
  border: 1px solid rgba(99, 230, 255, .28);
  border-radius: 999px;
  color: var(--kst-cyan);
  background: rgba(99, 230, 255, .07);
  font-size: 8px;
  letter-spacing: .14em;
}

.kst-page-verbraucher #grid.kst-cabinet {
  display: grid !important;
  gap: 14px !important;
  padding: 14px !important;
  overflow: visible !important;
  border-color: rgba(99, 230, 255, .18) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(59, 130, 246, .12), transparent 34%),
    linear-gradient(145deg, #0b111b, #070a10) !important;
}

.kst-rail {
  min-width: 0;
}

.kst-rail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #dfe8f6;
}

.kst-rail-meta span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.kst-rail-meta small {
  color: var(--kst-muted);
  font-size: 9px;
}

.kst-rail-track {
  position: relative;
  height: 106px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 11px;
  background:
    linear-gradient(180deg, transparent 43%, rgba(148, 163, 184, .34) 44%, rgba(222, 229, 240, .48) 49%, rgba(74, 85, 104, .5) 54%, transparent 55%),
    repeating-linear-gradient(90deg, transparent 0 calc((100% / var(--module-count)) - 1px), rgba(148,163,184,.14) calc((100% / var(--module-count)) - 1px) calc(100% / var(--module-count))),
    #090d15;
}

.kst-breaker {
  position: absolute;
  z-index: 2;
  top: 7px;
  bottom: 7px;
  left: calc((100% / var(--module-count)) * var(--start) + 2px);
  width: calc((100% / var(--module-count)) * var(--span) - 4px);
  min-width: 0;
  padding: 8px 6px 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.34);
  border-top: 4px solid var(--breaker-accent);
  border-radius: 7px;
  color: #111827;
  background: linear-gradient(145deg, #f8fafc, #cbd5e1 70%, #aeb9c9);
  box-shadow: 0 7px 14px rgba(0,0,0,.3), inset 0 1px #fff;
  cursor: pointer;
  touch-action: manipulation;
}

.kst-breaker::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.34);
}

.kst-breaker:hover,
.kst-breaker:focus-visible,
.kst-breaker.is-active {
  z-index: 3;
  border-color: var(--breaker-accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--breaker-accent) 30%, transparent), 0 10px 24px rgba(0,0,0,.4);
  transform: translateY(-2px);
}

.kst-breaker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 8px;
}

.kst-breaker-top b {
  color: #0f172a;
  font-size: 10px;
}

.kst-breaker-top em {
  color: #475569;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.kst-breaker-toggle {
  display: block;
  width: 23px;
  height: 30px;
  margin: 7px auto 5px;
  padding: 3px;
  border: 1px solid #64748b;
  border-radius: 4px;
  background: #e2e8f0;
  box-shadow: inset 0 2px 4px rgba(15,23,42,.22);
}

.kst-breaker-toggle i {
  display: block;
  width: 100%;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--breaker-accent), color-mix(in srgb, var(--breaker-accent) 68%, #0f172a));
  box-shadow: 0 2px 3px rgba(15,23,42,.3);
}

.kst-breaker-name {
  display: block;
  overflow: hidden;
  color: #1e293b;
  font-size: 9px;
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kst-breaker.is-rcd .kst-breaker-name {
  font-size: 12px;
}

.kst-breaker.is-rcd .kst-breaker-toggle {
  width: 36px;
}

.kst-cabinet-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  padding: 1px 2px;
  color: var(--kst-muted);
  font-size: 9px;
}

.kst-cabinet-footer span:last-child {
  margin-left: auto;
  color: #c8d6e8;
}

.kst-cabinet-footer i {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--kst-green);
  box-shadow: 0 0 8px var(--kst-green);
}

.kst-page-verbraucher #zoomed-container {
  display: none !important;
}

.kst-circuit-status {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin: 10px 0 -5px;
  padding: 8px 11px;
  border: 1px solid rgba(99,230,255,.22);
  border-radius: 11px;
  color: #dbe8f8;
  background: rgba(7, 12, 20, .88);
  font-size: 11px;
}

.kst-circuit-status[hidden] {
  display: none !important;
}

.kst-circuit-status > span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--circuit-color);
  box-shadow: 0 0 12px var(--circuit-color);
}

#grundriss .kst-socket {
  cursor: pointer;
  transition: opacity .18s ease, filter .18s ease;
}

#grundriss .kst-socket-halo {
  fill: rgba(7, 12, 20, .84);
  stroke: var(--circuit-color);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

#grundriss .kst-socket-badge {
  fill: #dbe8f8;
  paint-order: stroke;
  stroke: #07101a;
  stroke-width: 3px;
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 850;
}

#grundriss .icon.kst-circuit-muted {
  opacity: .12;
  filter: grayscale(1);
}

#grundriss .icon.kst-circuit-match {
  opacity: 1;
  filter: drop-shadow(0 0 7px var(--circuit-color, #63e6ff));
}

#grundriss .icon.kst-circuit-match .kst-socket-halo {
  fill: color-mix(in srgb, var(--circuit-color) 26%, #07101a);
  stroke-width: 5;
  animation: kstCircuitPulse 1.45s ease-in-out infinite;
}

@keyframes kstCircuitPulse {
  50% {
    r: 23px;
    stroke-opacity: .55;
  }
}

.kst-circuit-detail {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
}

.kst-circuit-detail__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--circuit-color);
  box-shadow: 0 0 13px var(--circuit-color);
}

.kst-circuit-detail small,
.kst-circuit-detail strong {
  display: block;
}

.kst-circuit-detail small {
  color: var(--kst-muted);
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.kst-circuit-detail b {
  color: var(--kst-cyan);
  font-size: 11px;
}

.kst-circuit-clear {
  width: 100%;
  min-height: 38px;
  margin-top: 7px;
}

@media (pointer: coarse) {
  .kst-rail-track {
    height: 118px;
  }

  .kst-breaker {
    min-height: 44px;
  }

  .kst-breaker-name {
    font-size: 10px;
  }

  .kst-circuit-status {
    position: sticky;
    z-index: 5;
    top: 0;
  }
}

@media (max-width: 560px) {
  .kst-breaker-top em {
    display: none;
  }

  .kst-breaker-name {
    font-size: 8px;
  }

  .kst-cabinet-footer span:last-child {
    width: 100%;
    margin-left: 0;
  }
}
