/* 360°-Panorama-Viewer */
.pano-stage {
  position: relative;
  margin-top: 28px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: rgba(11, 15, 22, 0.5);
  aspect-ratio: 16 / 9;
  min-height: 340px;
}
/* ⚠ `min-height` und `aspect-ratio` zusammen erzwingen eine Mindestbreite:
   340px mal 16/9 sind 604px, und damit lief die Bühne auf dem iPhone rechts
   aus dem Bild. Auf schmalen Schirmen steht das Panorama deshalb hochkant. */
@media (max-width: 680px) {
  .pano-stage { aspect-ratio: 3 / 4; min-height: 0; }
}
.pano-stage:fullscreen { border-radius: 0; border: 0; }

/* Eigener Vollbildmodus für Safari auf dem iPhone, das die Vollbild-
   Schnittstelle nur für Videos kennt. `dvh` statt `vh`, sonst schiebt die
   ein- und ausfahrende Adressleiste das Bild an. */
.pano-stage.vollbild {
  position: fixed;
  inset: 0;
  z-index: 2000;
  margin: 0;
  border: 0;
  border-radius: 0;
  aspect-ratio: auto;
  width: 100vw;
  height: 100dvh;
  max-height: none;
}
body.pano-vollbild { overflow: hidden; }
.pano-scene { position: absolute; inset: 0; }
.pano-scene a-scene, .pano-scene canvas { width: 100% !important; height: 100% !important; }

/* Drop-Zone */
.pano-drop {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 30px; cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.pano-drop.hidden { display: none; }
.pano-drop.drag { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pano-drop .pano-ico {
  width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center;
  background: rgba(94, 234, 212, 0.1); border: 1px solid var(--border-strong);
}
.pano-drop .pano-ico svg { width: 32px; height: 32px; stroke: var(--accent); fill: none; stroke-width: 1.8; }
.pano-drop h3 { margin: 0; font-size: 19px; letter-spacing: -0.01em; }
.pano-drop p { margin: 0; color: var(--muted); max-width: 40ch; font-size: 14px; }
.pano-pick {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 8px;
  border-radius: 12px; padding: 12px 22px; font-weight: 700; cursor: pointer;
  background: var(--grad); color: #04191f; border: 0;
  box-shadow: 0 10px 30px -12px rgba(56, 189, 248, 0.55);
}
.pano-pick:hover { transform: translateY(-2px); }
.pano-hintline { font-size: 12.5px; color: var(--faint); }

/* Steuerleiste über der Szene */
.pano-bar {
  position: absolute; z-index: 6; left: 14px; bottom: 14px; display: none; gap: 10px;
}
.pano-bar.show { display: flex; }
.pano-bar button {
  cursor: pointer; border-radius: 10px; padding: 9px 15px; font-weight: 600; font-size: 14px;
  background: rgba(7, 10, 15, 0.7); color: var(--text); border: 1px solid var(--border-strong);
  backdrop-filter: blur(8px);
}
.pano-bar button:hover { border-color: var(--accent); color: var(--accent); }
.pano-loading {
  position: absolute; inset: 0; z-index: 7; display: none;
  align-items: center; justify-content: center; color: var(--muted); font-weight: 600;
  background: rgba(7, 10, 15, 0.6);
}
.pano-loading.show { display: flex; }

/* ---------------------------------------------------------- Rundgang */

.rg-buehne {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  border-radius: 14px;
  overflow: hidden;
  background: #10131a;
}
@media (max-width: 680px) {
  .rg-buehne { aspect-ratio: 3 / 4; min-height: 0; }
}
.rg-buehne a-scene { width: 100%; height: 100%; }

.rg-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.rg-tafel {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(520px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.96);
  color: #10131a;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}
.rg-tafel h3 { margin: 0 0 6px; font-size: 1.05rem; }
.rg-tafel p { margin: 0; font-size: 0.95rem; line-height: 1.5; }
.rg-tafel button {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.rg-position { font-size: 0.9rem; opacity: 0.75; }
.rg-position.gesetzt { opacity: 1; font-weight: 600; }

.rg-liste { list-style: none; padding: 0; margin: 16px 0 0; }
.rg-liste li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

/* Die Szene liegt in einem eigenen Behälter, damit sie die Infotafel der
   Bühne nicht beim Neuaufbau mitlöscht. */
.rg-szene { position: absolute; inset: 0; }
