body.viewer,
body.viewer .app-shell {
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

#renderCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.viewer-bar {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  background: rgba(6, 12, 20, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 10;
}

.viewer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.viewer-brand-logo {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.scene-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.scene-tabs button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.scene-tabs button.active {
  background: var(--accent);
  color: #021016;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(145, 156, 141, 0.25);
}

.scene-tabs .empty-tab {
  opacity: 0.6;
  cursor: default;
}

.viewer-actions .ghost {
  border-radius: 999px;
}

.hotspot-overlay,
.help-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 12, 0.08);
  backdrop-filter: blur(9px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 15;
}

.hotspot-overlay.is-open,
.help-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hotspot-card,
.help-card {
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.46);
  padding: 24px;
  width: min(560px, 90vw);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(30px) saturate(190%);
  -webkit-backdrop-filter: blur(30px) saturate(190%);
  color: #111315;
}

.hotspot-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.hotspot-content img,
.hotspot-content iframe,
.hotspot-content video {
  display: block;
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 12px;
  background: rgba(7, 10, 16, 0.7);
}

.hotspot-content img,
.hotspot-content video {
  max-height: min(68vh, 520px);
  object-fit: contain;
}

.hotspot-content iframe {
  aspect-ratio: 16 / 9;
  min-height: 240px;
}

.hotspot-content p {
  color: var(--muted);
  line-height: 1.6;
}

.help-card ul {
  margin: 16px 0;
}

@media (max-width: 900px) {
  .viewer-bar {
    flex-direction: column;
    border-radius: 24px;
  }
}


.scene-menu-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 5, 9, 0.68);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 16;
}

.scene-menu-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.scene-menu-card {
  background: var(--panel-strong);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  width: min(420px, 90vw);
  box-shadow: var(--shadow);
}

.scene-menu-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.scene-menu-list {
  display: grid;
  gap: 10px;
}

.scene-menu-list button {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(14, 20, 30, 0.75);
  color: var(--text);
  cursor: pointer;
}

.scene-menu-list button.active {
  border-color: var(--accent);
  color: #021016;
  background: var(--accent);
}

.mobile-joysticks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: none;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
  z-index: 12;
}

.joystick {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  border: 2px solid rgba(0, 0, 0, 0.65);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: auto;
  touch-action: none;
}

.joystick span {
  position: absolute;
  bottom: -22px;
  font-size: 0.75rem;
  color: rgba(230, 240, 255, 0.7);
}

.joystick-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  border: 2px solid rgba(0, 0, 0, 0.6);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  transform: translate(0, 0);
}

#sceneMenuBtn {
  display: inline-flex;
}

@media (max-width: 900px) {
  .scene-tabs {
    display: none;
  }

  #sceneMenuBtn {
    display: inline-flex;
  }

  #viewsBtn {
    display: inline-flex;
  }

  .mobile-joysticks {
    display: flex;
  }
}

@media (min-width: 901px) {
  #viewsBtn {
    display: none;
  }
}

.scene-menu-list .empty {
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}


.video-fallback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.9rem;
  background: rgba(10, 14, 22, 0.75);
}

.video-fallback-link:hover {
  border-color: var(--accent);
}


.video-fallback-note {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.video-fallback-link.video-fallback-secondary {
  margin-left: 8px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

