:root {
  --electro-plum: #2b1633;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #140a18;
}

body {
  color: white;
  font-family: Arial, Helvetica, sans-serif;
}

.tool-shell {
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgb(74 38 84 / 52%), transparent 68%),
    #140a18;
}

.tool-frame {
  position: relative;
  width: min(100vw, calc(100svh * 1.8148148));
  aspect-ratio: 2450 / 1350;
  overflow: hidden;
  background: var(--electro-plum);
  box-shadow: 0 1.5rem 5rem rgb(0 0 0 / 45%);
  isolation: isolate;
}

.screen-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  object-fit: fill;
  transition: opacity 120ms ease-out;
}

.hotspot {
  position: absolute;
  z-index: 2;
  display: block;
  cursor: pointer;
  border: 0;
  border-radius: 0.35rem;
  /* A hover crop may overhang its button by a pixel; never clip it. */
  overflow: visible;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.hotspot:focus-visible {
  outline: max(2px, 0.16vw) solid #ff8a8a;
  outline-offset: max(1px, 0.08vw);
  background: rgb(224 36 36 / 10%);
}

.hotspot > .hover-crop {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.hotspot:hover > .hover-crop,
.hotspot:focus-visible > .hover-crop {
  opacity: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .screen-image {
    transition: none;
  }
}
