:root {
  --ink: #f8f0d2;
  --edge: rgba(248, 240, 210, 0.48);
  --hot: #f0b84f;
  --deep: #101008;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--deep);
}

body {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 55%, rgba(240, 184, 79, 0.16), transparent 38%),
    linear-gradient(180deg, #1b170e 0%, #070706 100%);
}

.scene-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transform: scale(1.01);
  transition: opacity 180ms ease, transform 800ms ease;
  z-index: 1;
}

.scene-video.is-active {
  opacity: 1;
  transform: scale(1);
}

.atmosphere {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.42)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 58%, rgba(0, 0, 0, 0.46));
}

.choice-layer,
.scene-choice,
.back-control {
  position: absolute;
  z-index: 3;
}

.choice-layer {
  inset: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.scene-choice {
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  font: inherit;
  text-transform: uppercase;
}

.choice-dot {
  position: absolute;
  left: -8px;
  top: -8px;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(248, 240, 210, 0.68);
  border-radius: 50%;
  background: rgba(240, 184, 79, 0.12);
  box-shadow: 0 0 20px rgba(240, 184, 79, 0.55);
  animation: targetBreath 2.4s ease-in-out infinite;
}

.choice-line {
  position: absolute;
  left: 10px;
  top: 0;
  width: clamp(34px, 8vw, 72px);
  height: 1px;
  background: linear-gradient(90deg, rgba(248, 240, 210, 0.78), rgba(248, 240, 210, 0.1));
  transform-origin: left center;
}

.choice-label {
  position: absolute;
  left: clamp(46px, 10vw, 84px);
  top: -14px;
  padding: 6px 9px;
  border: 1px solid rgba(248, 240, 210, 0.3);
  border-radius: 999px;
  background: rgba(14, 12, 8, 0.46);
  box-shadow: 0 0 18px rgba(240, 184, 79, 0.16);
  backdrop-filter: blur(6px);
  font-size: clamp(0.72rem, 2.3vw, 0.86rem);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 10px rgba(240, 184, 79, 0.55);
  transition: transform 150ms ease, background 150ms ease;
}

.scene-choice:hover .choice-label,
.scene-choice:focus-visible .choice-label {
  background: rgba(42, 32, 15, 0.68);
  transform: translateY(-1px);
}

.pick-choice {
  left: 51%;
  top: 31%;
}

.dance-choice {
  left: 35%;
  top: 72%;
}

.dance-choice .choice-line,
.wipe-choice .choice-line {
  transform: rotate(180deg);
}

.dance-choice .choice-label,
.wipe-choice .choice-label {
  left: auto;
  right: clamp(46px, 10vw, 84px);
}

.eat-choice {
  left: 50%;
  top: 39%;
}

.wipe-choice {
  left: 44%;
  top: 66%;
}

.is-queued .choice-dot {
  background: rgba(248, 240, 210, 0.08);
}

.is-queued.is-pending .choice-label {
  background: rgba(79, 61, 30, 0.72);
}

.back-control {
  top: max(18px, env(safe-area-inset-top));
  left: max(18px, env(safe-area-inset-left));
  border: 1px solid rgba(248, 240, 210, 0.34);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--ink);
  background: rgba(12, 10, 7, 0.48);
  box-shadow: 0 0 18px rgba(240, 184, 79, 0.14);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
  transition: opacity 180ms ease, transform 150ms ease, background 150ms ease;
}

.back-control span {
  font-size: 0.78rem;
  letter-spacing: 0;
  line-height: 1;
}

.back-control:hover {
  background: rgba(42, 32, 15, 0.68);
  transform: translateY(-1px);
}

.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes targetBreath {
  0%,
  100% {
    transform: scale(0.92);
  }

  50% {
    transform: scale(1.12);
  }
}

@media (max-aspect-ratio: 10 / 13) {
  .scene-video {
    object-fit: cover;
  }

  .pick-choice {
    left: 51%;
    top: 30%;
  }

  .dance-choice {
    left: 28%;
    top: 74%;
  }

  .eat-choice {
    left: 50%;
    top: 38%;
  }

  .wipe-choice {
    left: 40%;
    top: 68%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-video,
  .scene-choice,
  .back-control {
    transition: none;
  }

  .choice-dot {
    animation: none;
  }
}
