.nc {
  --ink: #1b1e1a;
  --wall: #dfdad0;
  --slot: #cbc5b8;
  --on: #12402f;
  position: relative;
  width: 540px;
  height: 540px;
  overflow: hidden;
  background: radial-gradient(125% 100% at 26% 8%, #ece8e0 0%, var(--wall) 46%, #cdc7ba 100%);
  color: var(--ink);
  font-family: "Newsreader Variable", serif;
  font-optical-sizing: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.nc * { box-sizing: border-box; }

/* the cradle is laid out at the simulation's own scale and shown a tenth larger */
.nc-rig {
  position: absolute;
  inset: 0;
  transform-origin: 270px 320px;
  transform: translateY(-4px) scale(1.1);
}

/* the rod the wires hang from */

.nc-bar {
  position: absolute;
  left: 110px;
  top: 82px;
  width: 320px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, #a9acb0 0%, #6d7074 30%, #2b2d30 66%, #5d6064 100%);
  box-shadow: 4px 8px 7px -2px #3d362a59;
}

.nc-bar i {
  position: absolute;
  top: -1.5px;
  width: 5px;
  height: 7px;
  margin-left: -112.5px;
  border-radius: 1px;
  background: linear-gradient(180deg, #7c7f84, #3b3d41 55%, #1d1e20);
}

.nc-wires {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.nc-wires line {
  stroke: #25272a;
  stroke-opacity: 0.78;
  stroke-width: 0.7;
}

.nc-ball,
.nc-thumb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #8f908f url("./ball.jpg") center / 103% 103%;
}

.nc-ball {
  position: absolute;
  left: 0;
  top: 0;
  cursor: grab;
  box-shadow: 2px 3px 3px #3d362a33, 7px 12px 12px -3px #3d362a61;
}

.nc-ball[data-held] { cursor: grabbing; }

/* the setting */

.nc-field { display: contents; }

.nc-label,
.nc-state {
  position: absolute;
  top: 409px;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.018em;
}

.nc-label { left: 81px; }

.nc-state {
  right: 83px;
  font-style: italic;
}

/* a slot let into the wall */
.nc-switch {
  --p: 0;
  position: absolute;
  left: 214px;
  top: 292px;
  width: 112px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--slot);
  box-shadow: inset 0 2px 5px #3c322373, inset 0 0 0 1px #3c32231f, 0 1px 0 #ffffffb3;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

/* fills with ink as the thumb crosses */
.nc-switch::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--on);
  box-shadow: inset 0 2px 5px #00000080;
  opacity: var(--p);
}

.nc-switch:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 5px;
}

.nc-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  display: block;
  box-shadow: 0 2px 3px #28221880, 0 5px 8px -2px #28221873;
}
