* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #15120f; color: #eee6d6; }
#machine-view {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  background: #15120f;
  touch-action: pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: contain;
}
#machine-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 3600px;
  height: 2400px;
  contain: layout style;
  transform-origin: 0 0;
  background: #211c17 url("chassis-v3.webp") 0 0 / 100% 100% no-repeat;
  will-change: transform;
  isolation: isolate;
}
#machine-world [data-station] {
  position: absolute;
  margin: 0;
  z-index: 2;
  width: 900px;
  height: 600px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
#machine-world [data-station="home"] { width: 1080px; height: 720px; z-index: 3; }
#machine-world [data-station].is-current { pointer-events: auto; }
#machine-world img { -webkit-user-drag: none; }
#machine-world [data-index-rotor] {
  transform-origin: var(--rotor-pivot, 50.1% 46.6%);
  transform: rotate(var(--selector-angle, 0deg));
}
#machine-world .shaft-bearing {
  display: block;
  position: absolute;
  pointer-events: none;
  z-index: 1;
  border-radius: 50%;
  overflow: hidden;
  mask-image: radial-gradient(circle closest-side, transparent 17%, #000 22%, #000 91%, transparent 100%);
}
#machine-world .shaft-pinion {
  position: absolute;
  display: block;
  inset: 0;
  background-image: url("chassis-v3.webp");
  background-repeat: no-repeat;
}
#machine-view :where(a, button):focus-visible {
  outline: 3px solid #fff2bc;
  outline-offset: 2px;
}
#machine-view [data-station]:focus, #machine-view [tabindex="-1"]:focus { outline: none; }
.sr, .sr-only, .visually-hidden {
  position: absolute;
  height: 1px; width: 1px;
  margin: -1px; padding: 0;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}
