:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #606060;
  --bar-track: #d7d7d7;
  --bar-fill-a: #000000;
  --bar-fill-b: #2a2a2a;
  --hotspot-size: 2.8%;
  --screen-left: 33.56%;
  --screen-top: 9.75%;
  --screen-width: 45.83%;
  --screen-height: 89.5%;
  --screen-scale: 1;
  --screen-offset-y: -20px;
  --screen-width-adjust: 15px;
  --screen-height-adjust: -10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.app {
  width: 100vw;
  height: 100vh;
}

.scene-viewport {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 15%, #f8f8f8 0%, rgba(248, 248, 248, 0) 30%),
    radial-gradient(circle at 80% 80%, #f1f1f1 0%, rgba(241, 241, 241, 0) 34%),
    #ffffff;
}

.scene-wrapper {
  position: relative;
  width: min(100vw, calc(100vh * (1883 / 1200)));
  aspect-ratio: 1883 / 1200;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
}

.background-image,
.person-video,
.person-freeze,
.screen-video {
  user-select: none;
  -webkit-user-drag: none;
}

.background-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 0;
}

.hint-box {
  position: absolute;
  left: 1.4%;
  bottom: 2.2%;
  z-index: 4;
  max-width: min(44%, 620px);
  padding: 0.55rem 0.72rem;
  font-size: clamp(0.58rem, 0.88vw, 0.88rem);
  line-height: 1.35;
  color: #f7f7f7;
  background: rgba(12, 12, 12, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  backdrop-filter: blur(2px);
  display: grid;
  gap: 0.45rem;
}

.hint-text {
  margin: 0;
}

.hint-skip-button {
  justify-self: start;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  color: #f7f7f7;
  border-radius: 6px;
  font-size: clamp(0.54rem, 0.78vw, 0.78rem);
  line-height: 1;
  padding: 0.42rem 0.58rem;
  cursor: pointer;
}

.hint-skip-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hint-skip-button:not(:disabled):hover,
.hint-skip-button:not(:disabled):focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.screen-container {
  position: absolute;
  left: calc(var(--screen-left) - ((var(--screen-width) * (var(--screen-scale) - 1)) / 2) - (var(--screen-width-adjust) / 2));
  top: calc(var(--screen-top) - ((var(--screen-height) * (var(--screen-scale) - 1)) / 2) + var(--screen-offset-y));
  width: calc((var(--screen-width) * var(--screen-scale)) + var(--screen-width-adjust));
  height: calc((var(--screen-height) * var(--screen-scale)) + var(--screen-height-adjust));
  z-index: 1;
  overflow: hidden;
}

.screen-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  background: #000000;
}

.person-video {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 2;
  object-fit: contain;
  pointer-events: none;
}

.person-freeze {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 110ms ease;
}

.person-freeze.is-visible {
  opacity: 1;
}

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.hotspot {
  position: absolute;
  width: var(--hotspot-size);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 0;
  box-shadow: none;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
}

.hotspot:hover:enabled,
.hotspot:focus-visible:enabled {
  transform: translate(-50%, -50%) scale(1.1);
  filter: brightness(1.08);
}

.hotspot:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.hotspot-red {
  left: 48.4%;
  top: 97.1%;
}

.hotspot-yellow {
  left: 56.1%;
  top: 97.1%;
}

.hotspot-blue {
  left: 65.2%;
  top: 97.1%;
}

.mobile-overlay {
  display: none;
  position: absolute;
  inset: auto 0 0 0;
  z-index: 4;
  text-align: center;
  font-size: 0.8rem;
  padding: 0.5rem;
  color: #222222;
  background: rgba(255, 255, 255, 0.72);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.7rem;
  background: #ffffff;
  padding-top: 7vh;
  opacity: 1;
  transition: opacity 450ms ease;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-logo {
  width: min(32vw, 250px);
  max-width: 80%;
  height: auto;
}

.loading-text {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: var(--muted);
}

.loading-bar {
  width: min(36vw, 280px);
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bar-track);
}

.loading-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(110deg, var(--bar-fill-a) 0%, var(--bar-fill-b) 45%, var(--bar-fill-a) 100%);
  background-size: 220% 100%;
  animation: loading-fill-slide 1.2s linear infinite;
  transition: width 180ms ease;
}

@keyframes loading-fill-slide {
  from {
    background-position: 0% 0;
  }

  to {
    background-position: 220% 0;
  }
}

.loading-percent {
  margin: 0;
  font-size: 0.74rem;
  color: #747474;
}

.loading-error {
  margin: 0.5rem 0 0;
  color: #c01f1f;
  font-size: 0.8rem;
}

@media (max-width: 960px) {
  .mobile-overlay {
    display: block;
  }

  .hotspot {
    --hotspot-size: 4.2%;
  }
}
