* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background: #0e0e11;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#viewer {
  position: fixed;
  inset: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: #0e0e11;
  color: #e6e6e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.overlay.hidden { display: none; }

.overlay p {
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.85;
  max-width: 300px;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.gyro-btn {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 11;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 20, 24, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 22px;
  line-height: 48px;
  text-align: center;
  cursor: pointer;
}

.gyro-btn.hidden { display: none; }
.gyro-btn.active { background: rgba(80, 120, 255, 0.85); }

/* Single gyro owner: use our 🧭 button; hide Pannellum's built-in orientation control. */
.pnlm-orientation-button { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 12;
  background: rgba(20, 20, 24, 0.92);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
