.machine-actor {
  position: absolute;
  z-index: 4;
  left: var(--machine-x, 77.8%);
  top: var(--machine-y, 86.5%);
  width: calc(7.7% * var(--machine-scale, .88));
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  transform: translate(-50%, -100%);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.machine-actor::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 6%;
  bottom: -1%;
  height: 7%;
  background: radial-gradient(ellipse, #221d168f, transparent 70%);
  pointer-events: none;
}
.machine-actor::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: max(100%, 44px);
  transform: translateX(-50%);
}
.machine-art {
  --art: url("assets/screwface-street-machine.webp");
  display: grid;
  position: relative;
  aspect-ratio: 400 / 1048;
  grid-template-rows: 760fr 225fr 63fr;
  pointer-events: none;
  filter: saturate(.91) brightness(.96) drop-shadow(1px 2px 2px #1c171d55);
}
.machine-cabinet, .machine-base, .machine-shaft::before {
  background: var(--art) center top / 100% auto no-repeat;
}
.machine-base { background-position: center bottom; }
.machine-shaft {
  position: relative;
  overflow: hidden;
}
.machine-shaft::before {
  content: "";
  position: absolute;
  inset: calc(-760 / 165 * 100%) 0 auto;
  height: calc(988 / 165 * 100%);
  background-size: 100% 100%;
}
.machine-actor:focus-visible {
  outline: 2px dashed var(--yellow);
  outline-offset: 4px;
}
.experience:has(.capsule-dialog[open]) .machine-actor { visibility: hidden; }
.capsule-dialog {
  position: fixed;
  inset: 0;
  width: min(100%, 44rem);
  height: var(--viewport-height);
  margin: auto;
  padding: max(.6rem, env(safe-area-inset-top)) max(.65rem, env(safe-area-inset-right))
    max(.4rem, env(safe-area-inset-bottom)) max(.65rem, env(safe-area-inset-left));
  max-width: none;
  max-height: none;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: hidden;
}
.capsule-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.capsule-dialog::backdrop {
  background: #1c181333;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.capsule-dialog-bar { justify-self: end; }
.capsule-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
