:root {
  color-scheme: dark;
  --panel: rgba(15, 21, 29, .92);
  --panel-soft: rgba(15, 21, 29, .72);
  --line: rgba(255,255,255,.16);
  --text: #fff;
  --muted: #b9c4d0;
  --accent: #2c8fe8;
}
* { box-sizing: border-box; }
html, body, #app { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #111; color: var(--text); }
#app { position: relative; background: #111; touch-action: none; }
#panorama { width: 100%; height: 100%; display: block; cursor: grab; }
#panorama.dragging { cursor: grabbing; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; background: #111; z-index: 20; transition: opacity .25s; }
.loading.hidden { opacity: 0; pointer-events: none; }
.topbar { position: absolute; top: 0; left: 0; right: 0; z-index: 9; display: grid; grid-template-columns: 48px 1fr 48px; gap: 12px; align-items: center; padding: max(12px, env(safe-area-inset-top)) 14px 12px; background: linear-gradient(to bottom, rgba(0,0,0,.7), transparent); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 2px 0 0; font-size: clamp(18px, 3vw, 28px); line-height: 1.1; text-shadow: 0 1px 8px #000; }
.icon-button, .control-button { border: 1px solid var(--line); color: #fff; background: var(--panel-soft); backdrop-filter: blur(12px); border-radius: 999px; cursor: pointer; display: grid; place-items: center; }
.icon-button { width: 44px; height: 44px; font-size: 22px; }
.controls { position: absolute; right: 16px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 9; display: grid; gap: 8px; }
.control-button { width: 46px; height: 46px; font-size: 24px; }
.icon-button:hover, .control-button:hover { background: rgba(44,143,232,.9); }
.sidebar { position: absolute; inset: 0 auto 0 0; z-index: 15; width: min(330px, 88vw); padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); background: var(--panel); backdrop-filter: blur(18px); transform: translateX(-102%); transition: transform .25s ease; border-right: 1px solid var(--line); overflow-y: auto; }
.sidebar.open { transform: translateX(0); }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 20px; }
#sceneMenu { display: grid; gap: 8px; }
.scene-link { appearance: none; border: 1px solid var(--line); border-radius: 12px; color: #fff; background: rgba(255,255,255,.055); padding: 13px 14px; font: inherit; text-align: left; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.scene-link:hover, .scene-link.active { border-color: rgba(44,143,232,.9); background: rgba(44,143,232,.22); }
.scene-link small { color: var(--muted); }
.help { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.help strong { color: #fff; margin-bottom: 4px; }
.hotspots { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.hotspot { position: absolute; transform: translate(-50%, -50%); pointer-events: auto; border: 0; color: #fff; cursor: pointer; background: transparent; text-align: center; filter: drop-shadow(0 3px 7px rgba(0,0,0,.7)); }
.hotspot-dot { width: 42px; height: 42px; margin: 0 auto 5px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); border: 3px solid #fff; font-size: 22px; animation: pulse 2s infinite; }
.hotspot-label { display: inline-block; max-width: 170px; padding: 6px 9px; border-radius: 7px; background: rgba(0,0,0,.72); font-size: 13px; white-space: nowrap; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(44,143,232,.18); } }
.hint { position: absolute; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); z-index: 5; transform: translateX(-50%); padding: 8px 12px; border-radius: 999px; background: rgba(0,0,0,.54); color: #fff; font-size: 12px; pointer-events: none; transition: opacity .5s; }
@media (max-width: 680px) {
  .hint { display: none; }
  .topbar { grid-template-columns: 44px 1fr 44px; }
  .hotspot-label { font-size: 12px; max-width: 130px; }
  .hotspot-dot { width: 38px; height: 38px; }
}

/* Version 2.0: Rechtlicher Start-Hinweis, Impressum und Datenschutz */
body.dialog-open #app { filter: blur(4px); }
body.dialog-open { overflow: hidden; }
.legal-footer {
  position: absolute;
  left: 50%;
  bottom: max(6px, env(safe-area-inset-bottom));
  z-index: 10;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(8, 12, 17, .66);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,.72);
  font-size: 11px;
  white-space: nowrap;
}
.legal-footer button,
.sidebar-legal button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-footer button:hover,
.sidebar-legal button:hover { color: #fff; }
.sidebar-legal {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 12px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: rgba(5, 8, 12, .84);
  backdrop-filter: blur(12px);
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  position: relative;
  width: min(680px, 100%);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px;
  background: #151d27;
  color: #eef4fa;
  box-shadow: 0 28px 90px rgba(0,0,0,.55);
}
.modal-card-large { width: min(880px, 100%); }
.modal-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(24px, 4vw, 44px);
  line-height: 1.62;
}
.modal-scroll h2 {
  margin: 0 44px 22px 0;
  font-size: clamp(23px, 4vw, 34px);
  line-height: 1.15;
}
.modal-scroll h3 { margin: 28px 0 8px; font-size: 17px; }
.modal-scroll p { margin: 0 0 16px; color: #d3dde7; }
.modal-scroll strong { color: #fff; }
.modal-scroll a { color: #75baff; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}
.modal-close:hover { background: var(--accent); }
.notice-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 clamp(24px, 4vw, 44px) 18px;
  color: #eaf1f7;
  line-height: 1.4;
  cursor: pointer;
}
.notice-confirmation input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent);
}
.primary-button {
  margin: 0 clamp(24px, 4vw, 44px) clamp(24px, 4vw, 38px);
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.primary-button:disabled { opacity: .42; cursor: not-allowed; }
.primary-button:not(:disabled):hover { filter: brightness(1.12); }
.legal-copy { font-size: 15px; }
.legal-note { margin-top: 28px !important; color: #9eacba !important; font-size: 13px; }
@media (max-width: 680px) {
  .legal-footer { display: none; }
  .modal-backdrop { padding: 8px; }
  .modal-card { max-height: 94vh; border-radius: 15px; }
  .modal-scroll { padding: 24px 20px; }
  .modal-scroll h2 { margin-right: 38px; }
  .notice-confirmation { margin-left: 20px; margin-right: 20px; }
  .primary-button { margin-left: 20px; margin-right: 20px; }
}


/* Version 2.1: austauschbarer Immobilienflyer */
.sidebar-flyer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.sidebar-flyer button {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(117,186,255,.52);
  border-radius: 12px;
  background: rgba(44,143,232,.16);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sidebar-flyer button:hover { background: rgba(44,143,232,.34); }
.flyer-card {
  width: min(1100px, 98vw);
  height: min(97vh, 1500px);
  background: #0c1118;
}
.flyer-scroll {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.flyer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0,0,0,.42);
}
.flyer-scroll-hint {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 680px) {
  .flyer-card { width: 100%; height: 97vh; }
  .flyer-scroll { padding: 8px; }
  .flyer-scroll-hint { display: block; }
}
