.msmpano {
  --msmpano-height: 650px;
  --msmpano-mobile-height: 500px;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: var(--msmpano-height);
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(35, 28, 32, .14);
  border-radius: 18px;
  background: #0d0b0c;
  box-shadow: 0 22px 55px rgba(23, 12, 18, .2);
  color: #fff;
  font-family: inherit;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.msmpano.is-dragging { cursor: grabbing; }
.msmpano:focus-visible { outline: 3px solid #d31266; outline-offset: 3px; }
.msmpano:fullscreen,
.msmpano:-webkit-full-screen,
.msmpano.is-faux-fullscreen {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
}

.msmpano.is-faux-fullscreen {
  position: fixed !important;
  z-index: 2147483646 !important;
  inset: 0 !important;
  max-width: none !important;
  margin: 0 !important;
}

body.msmpano-body-lock {
  position: fixed !important;
  left: 0;
  right: 0;
  width: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}

.msmpano.is-faux-fullscreen .msmpano-heading {
  top: calc(18px + env(safe-area-inset-top));
  left: calc(18px + env(safe-area-inset-left));
}

.msmpano.is-faux-fullscreen .msmpano-controls {
  top: calc(16px + env(safe-area-inset-top));
  right: calc(16px + env(safe-area-inset-right));
}

.msmpano-stage,
.msmpano-canvas,
.msmpano-fallback,
.msmpano-vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.msmpano-stage { overflow: hidden; touch-action: none; background: #100d0f; }
.msmpano-canvas { z-index: 1; display: block; }

.msmpano-fallback {
  z-index: 0;
  background-position: center;
  background-size: cover;
}

.msmpano.has-webgl .msmpano-fallback { display: none; }

.msmpano-vignette {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 5, 6, .5), transparent 22%, transparent 72%, rgba(7, 5, 6, .48)),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, .22));
}

.msmpano-heading {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 270px);
  text-shadow: 0 2px 14px rgba(0, 0, 0, .88);
}

.msmpano-heading span {
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 8px;
  background: rgba(211, 18, 102, .86);
  font: 800 10px/1 system-ui, sans-serif;
  letter-spacing: .08em;
}

.msmpano-heading strong {
  overflow: hidden;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msmpano-controls {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 7px;
}

.msmpano-controls button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 10px;
  background: rgba(12, 9, 11, .62);
  color: #fff;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .22);
  backdrop-filter: blur(11px);
  -webkit-backdrop-filter: blur(11px);
  font: 700 19px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background .2s, transform .2s;
}

.msmpano-controls button:hover,
.msmpano-controls button:focus-visible,
.msmpano-controls button.is-active {
  background: #d31266;
  transform: translateY(-1px);
  outline: none;
}

.msmpano-help {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(9, 7, 8, .62);
  color: rgba(255, 255, 255, .9);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .2);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .35s;
}

.msmpano.is-interacted .msmpano-help { opacity: 0; }

.msmpano-loader,
.msmpano-error {
  position: absolute;
  z-index: 9;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  background: #100d0f;
  color: rgba(255, 255, 255, .84);
  font-size: 12px;
  transition: opacity .3s, visibility .3s;
}

.msmpano-loader span {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, .15);
  border-top-color: #d31266;
  border-radius: 50%;
  animation: msmpano-spin .8s linear infinite;
}

.msmpano.is-ready .msmpano-loader { opacity: 0; visibility: hidden; }
.msmpano-error { display: none; padding: 20px; text-align: center; }
.msmpano.has-error .msmpano-loader { display: none; }
.msmpano.has-error .msmpano-error { display: flex; }

@keyframes msmpano-spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  .msmpano { height: var(--msmpano-mobile-height); min-height: 320px; border-radius: 13px; }
  .msmpano-heading { top: 13px; left: 13px; max-width: calc(100% - 26px); }
  .msmpano-heading strong { font-size: 15px; }
  .msmpano-controls { top: auto; right: 12px; bottom: 12px; gap: 5px; }
  .msmpano.is-faux-fullscreen .msmpano-controls {
    top: auto;
    right: calc(12px + env(safe-area-inset-right));
    bottom: calc(12px + env(safe-area-inset-bottom));
  }
  .msmpano-controls button { width: 36px; height: 36px; }
  .msmpano-help { top: 64px; bottom: auto; font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .msmpano-loader span { animation-duration: 1.8s; }
  .msmpano-controls button,
  .msmpano-help { transition: none; }
}
