* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #050b14;
  color: #f8fafc;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

a,
button {
  font: inherit;
}

.tour-root {
  position: relative;
  width: 100%;
  height: 100%;
}

.tour-pano {
  position: absolute;
  inset: 0;
}

.tour-topbar {
  position: absolute;
  inset: 18px 18px auto 18px;
  z-index: 20;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.tour-title,
.tour-back {
  pointer-events: auto;
}

.tour-title {
  max-width: min(78vw, 460px);
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.48);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px -32px rgba(15, 23, 42, 0.95);
}

.tour-title span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #a5b4fc;
}

.tour-title strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
}

.tour-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.48);
  color: #ffffff;
  text-decoration: none;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px -32px rgba(15, 23, 42, 0.95);
}

.tour-back:hover {
  background: rgba(79, 70, 229, 0.74);
}

.tour-hotspot {
  width: 38px;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 18%, rgba(255, 255, 255, 0) 19%),
    rgba(79, 70, 229, 0.84);
  box-shadow:
    0 0 0 8px rgba(79, 70, 229, 0.18),
    0 18px 40px rgba(5, 11, 20, 0.45);
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tour-hotspot::after {
  content: "";
  position: absolute;
  inset: 11px 9px 11px 13px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: #ffffff;
}

.tour-hotspot:hover {
  transform: scale(1.08) translateZ(0);
  box-shadow:
    0 0 0 12px rgba(79, 70, 229, 0.22),
    0 22px 50px rgba(5, 11, 20, 0.5);
}

.is-editing .tour-pano {
  cursor: crosshair;
}

.is-editing::after {
  content: "Editor: click to place transition point";
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 20;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(5, 11, 20, 0.48);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px -32px rgba(15, 23, 42, 0.95);
}

@media (max-width: 700px) {
  .tour-topbar {
    inset: 12px 12px auto 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .tour-title,
  .tour-back {
    max-width: none;
  }

  .is-editing::after {
    left: 12px;
    right: 12px;
    bottom: 12px;
    text-align: center;
  }
}
