html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #101010;
  color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#panorama {
  width: 100%;
  height: 100%;
}

.scene-panel {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 112px));
  background: rgba(18, 18, 18, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
}

.scene-panel.hidden {
  display: none;
}

.scene-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

.scene-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-title span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  flex: 0 0 auto;
}

.scene-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  overflow: auto;
  max-height: calc(min(520px, calc(100vh - 112px)) - 46px);
}

.scene-card {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
}

.scene-card.active {
  border-color: #ffffff;
  box-shadow: inset 0 0 0 1px #ffffff;
}

.scene-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.scene-card span {
  display: block;
  padding: 8px 9px 9px;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  right: 16px;
  display: flex;
  gap: 8px;
}

.topbar button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(18, 18, 18, 0.72);
  color: #fff;
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.pnlm-controls-container {
  left: 16px;
}

@media (max-width: 640px) {
  .scene-panel {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .scene-list {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
  }

  .scene-card {
    width: 152px;
    flex: 0 0 auto;
  }
}
