.wg-shell {
  overflow: hidden;
  margin-bottom: 16px;
}
.wg-header,
.wg-footer {
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.wg-header {
  border-bottom: 1px solid #dce6df;
  align-items: center;
}
.wg-header strong {
  font-size: 17px;
}
.wg-header span,
.wg-help,
.wg-footer {
  font-size: 13px;
  color: #688478;
}
.wg-header span {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wg-header i {
  display: inline-block;
  width: 22px;
  border-top: 3px solid #3584bd;
}
.wg-header .wg-key-power {
  border-color: #dc9750;
}
.wg-header .wg-key-inject {
  border-color: #bc6c4f;
  border-top-style: dashed;
}
.wg-help {
  line-height: 1.6;
  margin: 0;
  padding: 14px 20px;
  background: #f4f8f5;
}
.wg-scroll {
  overflow: auto;
  background-color: #f7faf8;
  background-image: radial-gradient(#cfded6 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  max-height: 750px;
}
.wg-stage {
  position: relative;
  min-width: 910px;
  min-height: 360px;
}
.wg-columns {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 205px);
  gap: 18px;
  padding: 24px 18px 70px;
}
.wg-column {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.wg-column h4 {
  font-size: 12px;
  letter-spacing: 0.9px;
  color: #708a79;
  margin: 0 0 2px;
}
.wg-card {
  position: relative;
  z-index: 2;
  border: 2px solid var(--node-color);
  box-shadow: 0 5px 14px #0b3f2c15;
  padding: 10px;
  border-radius: 13px;
  background: #fff;
  min-height: 85px;
}
.wg-card-head {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
.wg-card-head strong {
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.wg-card-head small {
  font-size: 12px;
  opacity: 0.7;
}
.wg-component-visual {
  position: relative;
  height: 54px;
  margin: 0 0 10px;
  border: 1px solid #bfcfc5;
  border-radius: 5px;
  overflow: hidden;
  background: #dce9df;
  box-shadow: inset 0 1px 5px #173f3424;
}
.wg-visual-board {
  position: absolute;
  inset: 7px 12px;
  display: block;
  border: 2px solid #39765d;
  border-radius: 4px;
  background:
    radial-gradient(circle at 9px 9px, #d8c772 0 2px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 9px) calc(100% - 9px), #d8c772 0 2px, transparent 2.5px), #31765b;
  box-shadow: inset 0 0 0 2px #ffffff20;
}
.wg-visual-board b {
  position: absolute;
  top: 12px;
  width: 18px;
  height: 10px;
  border: 1px solid #171e1b;
  background: #29322e;
  box-shadow:
    -3px 0 #c4b977,
    3px 0 #c4b977;
}
.wg-visual-board b:nth-child(1) {
  left: 25px;
}
.wg-visual-board b:nth-child(2) {
  right: 25px;
}
.wg-visual-board b:nth-child(3) {
  left: 4px;
  width: 10px;
  background: #316982;
}
.wg-visual-board b:nth-child(4) {
  right: 4px;
  width: 10px;
  background: #d5a954;
}
.wg-component-visual.psu {
  background: #bcc5c2;
}
.wg-component-visual.psu .wg-visual-board {
  inset: 6px 9px;
  border-color: #788580;
  background: repeating-linear-gradient(90deg, #919d99 0 4px, #c7cfcc 4px 8px);
}
.wg-component-visual.psu span {
  position: absolute;
  right: 18px;
  top: 12px;
  width: 27px;
  height: 27px;
  border: 5px double #596762;
  border-radius: 50%;
  background: radial-gradient(circle, #48544f 0 4px, transparent 5px);
}
.wg-component-visual.psu .wg-visual-board b {
  top: 11px;
  left: 7px;
  width: 8px;
  height: 12px;
  border-color: #b78c43;
  background: #e6cf75;
  box-shadow:
    13px 0 #e6cf75,
    26px 0 #e6cf75;
}
.wg-component-visual.psu .wg-visual-board b:not(:first-child) {
  display: none;
}
.wg-component-visual.distro .wg-visual-board b {
  top: 7px;
  width: 8px;
  height: 20px;
  border-radius: 2px;
  background: #e9dfb8;
  box-shadow:
    15px 0 #e9dfb8,
    30px 0 #e9dfb8,
    45px 0 #e9dfb8;
}
.wg-component-visual.distro .wg-visual-board b:nth-child(n + 2) {
  display: none;
}
.wg-controller .wg-component-visual {
  border-color: #4f826a;
  background: #24533f;
}
.wg-component-visual.flood .wg-visual-board {
  inset: 6px 50px;
  border: 5px solid #636b68;
  border-radius: 3px;
  background: radial-gradient(circle, #fff5b4 0 8px, #d7b34b 9px 12px, #6d7571 13px);
  transform: perspective(40px) rotateX(-4deg);
}
.wg-component-visual.flood .wg-visual-board b,
.wg-component-visual.pixels .wg-visual-board b {
  display: none;
}
.wg-component-visual.pixels .wg-visual-board {
  inset: 17px 7px;
  border: 0;
  background:
    radial-gradient(circle, #f7e477 0 5px, #52a787 6px 9px, transparent 10px) 0 0 / 38px 20px repeat-x,
    #eff5f0;
  box-shadow: none;
}
.wg-psu {
  border-radius: 8px;
  background: #e7f0e8;
  color: #243f35;
  border-left-width: 9px;
}
.wg-distro {
  border-radius: 4px;
  background: #f0f4f5;
  color: #314852;
  border-top-width: 9px;
}
.wg-controller {
  border-radius: 20px 6px 6px 20px;
  background: #173f34;
  color: #e3f4e9;
  border-right-width: 7px;
}
.wg-segment {
  background: #fff;
  border-left-width: 6px;
}
.wg-flood {
  border-radius: 3px;
  background: #fff8ed;
  border-color: #d18c43;
}
.wg-port-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.wg-port {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 5px 7px;
  min-height: 30px;
  border: 1px solid #d7e3da;
  background: #f9fbf9;
  border-radius: 5px;
  color: #375548;
  font-size: 12px;
  text-align: left;
  cursor: crosshair;
  touch-action: none;
}
.wg-port + .wg-port {
  margin-top: 4px;
}
.wg-port-grid .wg-port {
  margin: 0;
}
.wg-controller .wg-port {
  background: #285a45;
  color: #e4f6e7;
  border-color: #54856d;
}
.wg-port i {
  display: block;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #d38b47;
}
.wg-port.out i {
  margin-left: auto;
  order: 2;
}
.wg-port[data-wport^='data:'] i,
.wg-port[data-wport^='data-in:'] i,
.wg-port[data-wport^='data-out:'] i {
  border-color: #3890c1;
}
.wg-port:hover,
.wg-port.connecting {
  outline: 2px solid #d0a54a;
  background: #fff4d9;
  color: #254b3a;
}
.wg-port.used i {
  background: #e4a05e;
}
.wg-port[data-wport^='data:'].used i {
  background: #6bc3ef;
}
.wg-bank-list {
  margin-bottom: 13px;
}
.wg-data-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.wg-data-list .wg-port {
  margin: 0;
}
.wg-edit {
  background: transparent;
  border: 0;
  color: #427c60;
  text-decoration: underline;
  font-size: 12px;
  margin: 8px 8px 0 0;
  padding: 3px;
}
.wg-wires {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}
.wg-wire {
  fill: none;
  stroke-width: 3;
  stroke: #d28a3f;
  pointer-events: stroke;
  stroke-linecap: round;
  transition:
    filter 180ms,
    opacity 180ms,
    stroke-width 180ms;
}
.wg-wire.data {
  stroke: #328bc2;
}
.wg-wire.inject {
  stroke: #bb6748;
  stroke-width: 3.5;
  stroke-dasharray: 10 5;
}
.wg-wire.through {
  stroke: #aabbb0;
  stroke-width: 2;
  stroke-dasharray: 4 5;
}
.wg-wire.pending {
  stroke: #e2b64a;
  stroke-width: 4;
  stroke-dasharray: 7 5;
  filter: drop-shadow(0 0 4px #e2b64a);
  pointer-events: none;
}
.wg-wire.connection-highlight {
  stroke-width: 6;
  filter: drop-shadow(0 0 6px #61c795);
}
.wg-wire[data-wire-remove] {
  pointer-events: stroke;
  cursor: pointer;
}
.wg-port.connection-highlight {
  outline: 2px solid #61c795;
  background: #e8fff2;
  color: #254b3a;
  box-shadow: 0 0 9px #61c795aa;
}
.wg-footer {
  border-top: 1px solid #dce6df;
}
.wg-empty {
  font-size: 13px;
  color: #859b8b;
  padding: 16px;
  background: #ffffffa8;
  border: 1px dashed #c8d8ce;
}
.wg-shell .wg-port:focus-visible,
.wg-shell .wg-edit:focus-visible {
  outline: 3px solid #dea84d;
}
@media (max-width: 700px) {
  .wg-header {
    display: block;
  }
  .wg-header span {
    margin-top: 8px;
  }
  .wg-help,
  .wg-footer {
    font-size: 12px;
  }
}
