/* Diese Klasse wird nur aktiv, wenn der Schutz eingeschaltet ist */
                  body.no-copy {
                    -webkit-user-select: none;
                    -moz-user-select: none;
                    -ms-user-select: none;
                    user-select: none;
                  }

                  /* Wichtig: Eingabefelder bleiben immer editierbar, egal ob Schutz an oder aus */
                  body.no-copy input,
                  body.no-copy textarea {
                    -webkit-user-select: text !important;
                    -moz-user-select: text !important;
                    -ms-user-select: text !important;
                    user-select: text !important;
                  }
                  /* Das Panorama füllt das Fenster optimal aus und bildet die Basis für die Buttons */
                  #panorama {
                    width: 100%;
                    height: 100vh; /* 100vh bedeutet: Exakt 100% der sichtbaren Bildschirmhöhe */
                    margin: 0;
                    padding: 0;
                    position: relative;
                    overflow: hidden;
                  }

                  /* Container für die Buttons oben links auf dem Desktop */
                  .button-container {
                    position: absolute;
                    top: 20px;
                    left: 20px;
                    z-index: 1000;
                    display: flex;
                    gap: 10px;
                  }

                  /* Einheitlicher Style für die Aktions-Buttons links */
                  .back-button,
                  .rotate-button {
                    background-color: rgba(255, 255, 255, 0.9);
                    color: #111;
                    padding: 12px 24px;
                    font-family: sans-serif;
                    font-size: 14px;
                    font-weight: bold;
                    text-decoration: none;
                    border-radius: 4px;
                    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
                    transition: all 0.2s ease;
                    display: flex;
                    align-items: center;
                    gap: 8px;
                    border: none;
                    cursor: pointer;
                    white-space: nowrap;
                  }
                  .back-button:hover,
                  .rotate-button:hover {
                    background-color: #ffffff;
                    transform: translateY(-2px);
                    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
                  }

                  /* Macht das Pfeil-Symbol NUR auf dem Computer deutlich kräftiger */
                  .back-button span:first-child {
                    font-size: 18px;
                    font-weight: 900;
                    display: inline-block;
                    transform: translateY(-1px);
                  }

                  /* =========================================================
               1. REINE DESKTOP-STILE (Für Computer & Laptops)
               ========================================================= */

                  /* Musik-Player oben rechts auf dem PC */
                  .audio-control {
                    position: absolute;
                    top: 20px;
                    right: 20px;
                    z-index: 1000;
                    background-color: rgba(255, 255, 255, 0.9);
                    padding: 8px 16px;
                    border-radius: 4px;
                    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
                    display: flex;
                    align-items: center;
                    gap: 10px;
                    font-family: sans-serif;
                    font-size: 12px;
                    font-weight: bold;
                  }

                  .audio-control audio {
                    height: 30px;
                    width: 200px;
                    display: block;
                  }

                  /* Texte in der Navigation für Desktop */
                  .desktop-text {
                    display: inline;
                  }
                  .mobile-text {
                    display: none;
                  }

                  /* Das Modal zentrieren */
                  /* Das Modal als Zentrierungs-Overlay */
                  .gallery-modal {
                    display: none;
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background: rgba(0, 0, 0, 0.85);
                    z-index: 9999;
                    padding: 20px;
                    box-sizing: border-box;

                    /* Zentriert den Inhalt vertikal & horizontal */
                    justify-content: center;
                    align-items: center;
                    overflow-y: auto;
                  }

                  /* =========================================================
               1. DESKTOP & COMPUTER-STILE (Gilt für große Bildschirme)
               ========================================================= */

                  /* Der innere Container, der Video -> Text strikt untereinander anordnet */
                  .gallery-modal-content {
                    width: 100%;
                    max-width: 900px;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 15px;
                  }

            <!-- Füge onclick="event.stopPropagation()" beim inneren Container ein -->
            <div id="myModal" class="modal">
              <span class="gallery-close" onclick="closeImg()">&times;</span>

              <div class="gallery-modal-content" onclick="event.stopPropagation()">
                <img id="imgTarget" src="" alt="Kunstwerk">
                <div id="videoContainer"></div>
                <div id="captionTarget" class="gallery-caption"></div>
              </div>
            </div>


                  /* Bild auf dem Computer */
                  #imgTarget {
                    max-width: 90vw;
                    max-height: 65vh;
                    width: auto;
                    height: auto;
                    object-fit: contain;
                    border-radius: 4px;
                    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
                  }

                  /* Video-Container auf dem Computer */
                  #videoContainer {
                    width: 100%;
                    max-width: 900px; /* Größere Darstellung auf dem Computer */
                    aspect-ratio: 16 / 9; /* Flexibles 16:9 Format */
                    height: auto;
                    max-height: 65vh; /* Platz für Text/Buttons lassen */
                    margin: 0 auto;
                  }

                  /* iframe (YouTube) und video-Tags füllen den Container komplett aus */
                  #videoContainer iframe,
                  #videoContainer video {
                    width: 100%;
                    height: 100%;
                    border: none;
                    border-radius: 6px;
                    object-fit: contain;
                  }

                  /* Textbereich unter dem Video/Bild */
                  .gallery-caption {
                    width: 100%;
                    text-align: center;
                    padding: 10px 0;
                    font-family: sans-serif;
                    color: #fff;
                  }


                  .gallery-close {
                    position: absolute;
                    top: 20px;
                    right: 35px;
                    color: #fff;
                    font-size: 50px;
                    font-weight: bold;
                    cursor: pointer;
                    user-select: none;
                  }

                  /* =========================================================
               REINE SMARTPHONE-STILE (NUR FÜR BILDSCHIRME <= 600px)
               ========================================================= */
                  @media screen and (max-width: 600px) {
                    /* 1. BUTTON-CONTAINER: Positioniert Zurück- & Drehen-Button starr rechts oben */
                    .button-container {
                      position: fixed !important;
                      top: 12px !important;
                      right: 12px !important;
                      left: auto !important;
                      display: flex !important;
                      flex-direction: column !important;
                      gap: 8px !important;
                      z-index: 1001 !important;
                    }

                    /* Macht Zurück und Drehung auf dem Handy perfekt kreisrund (40x40px) */
                    .back-button,
                    .rotate-button {
                      padding: 0 !important;
                      width: 40px !important;
                      height: 40px !important;
                      justify-content: center !important;
                      align-items: center !important;
                      border-radius: 50% !important;
                      font-size: 18px !important;
                      margin: 0 !important;
                    }

                    .back-button span:first-child {
                      font-size: 16px !important;
                      font-weight: normal !important;
                      line-height: 1 !important;
                      display: inline-flex !important;
                      align-items: center;
                      justify-content: center;
                    }

                    /* Blendet die langen Schrifttexte auf Handys aus */
                    .back-button span:not(:first-child),
                    .rotate-button span:not(:first-child) {
                      display: none !important;
                    }

                    /* 2. AUDIO-CONTROL: Platziert den Mute-Button exakt als 3. Element unter den anderen beiden */
                    .audio-control {
                      position: fixed !important;
                      /* 12px Start-Top + 40px Button1 + 8px Gap + 40px Button2 + 8px Gap = 108px */
                      top: 108px !important;
                      right: 12px !important;
                      left: auto !important;
                      width: 40px !important;
                      height: 40px !important;
                      padding: 0 !important;
                      border-radius: 50% !important;
                      justify-content: center !important;
                      align-items: center !important;
                      display: flex !important;
                      box-sizing: border-box !important;
                      z-index: 1000 !important;
                    }

                    .audio-control span,
                    .audio-control audio {
                      display: none !important;
                    }

                    .audio-control::after {
                      content: "🔊";
                      font-size: 16px;
                    }

                    .audio-control.is-muted::after {
                      content: "🔇";
                    }

                    .gallery-close {
                      top: 12px;
                      right: 20px;
                      font-size: 40px;
                    }

                    /* Schaltet Langtexte stumm und Kurztexte für die untere Leiste ein */
                    .desktop-text {
                      display: none !important;
                    }

                    .mobile-text {
                      display: inline !important;
                    }

                    /* Macht die untere Leiste ultraschmal & zentriert */
                    .gallery-navigator {
                      bottom: 10px !important;
                      padding: 4px 6px !important;
                      width: 94% !important;
                      max-width: 420px !important;
                      left: 50% !important;
                      transform: translateX(-50%) !important;
                      gap: 3px !important;
                      justify-content: center !important;
                      flex-wrap: wrap !important;
                    }

                    .nav-room-btn {
                      padding: 5px 6px !important;
                      font-size: 10.5px !important;
                      letter-spacing: 0px !important;
                    }

                    .nav-room-btn.gaestebuch-btn,
                    .nav-room-btn.teilen-btn {
                      padding: 5px 6px !important;
                    }
                  } /* Ende Mobile Query */

                  /* =========================================================
               3. TOUCHSCREEN-SPECIALS
               ========================================================= */
                  @media (hover: none) {
                    .pnm-tooltip {
                      display: none !important;
                    }
                  }

      .gallery-load-error {
        max-width: 42rem;
        margin: auto;
        padding: 2rem;
        color: #fff;
        font: 1rem/1.6 Arial, sans-serif;
        text-align: center;
        background: rgba(20, 20, 20, 0.88);
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 0.75rem;
      }

                  /* NEU: Styling für das Museums-Guide Willkommensfenster */
                  /* Das abgedunkelte Hintergrund-Overlay mit elegantem Blur-Effekt */
                  .welcome-overlay {
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background-color: rgba(10, 10, 10, 0.88);
                    z-index: 999999;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-family: "Helvetica Neue", sans-serif;
                    color: #fff;
                    text-align: center;
                    padding: 20px;
                    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
                    backdrop-filter: blur(
                      12px
                    ); /* Macht die Galerie im Hintergrund edel unscharf */
                    -webkit-backdrop-filter: blur(12px);
                  }

                  /* Die edle Willkommens-Box (Kombination aus mattem Schwarz und feinen Linien) */
                  .welcome-box {
                    background: #111111;
                    padding: 40px 45px;
                    border-radius: 12px;
                    max-width: 480px;
                    border: 1px solid rgba(255, 255, 255, 0.1);
                    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
                    position: relative;
                  }

                  /* Platzhalter für Ihr Logo oder edlen Künstlernamen */
                  .welcome-logo {
                    font-size: 13px;
                    text-transform: uppercase;
                    letter-spacing: 4px;
                    color: rgba(255, 255, 255, 0.6);
                    margin-bottom: 8px;
                  }
                  .welcome-box h2 {
                    font-size: 26px;
                    font-weight: 300;
                    margin-bottom: 25px;
                    letter-spacing: 2px;
                    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
                    padding-bottom: 15px;
                  }

                  /* Das visuelle Anleitungs-Raster für die Icons */
                  .guide-grid {
                    display: flex;
                    justify-content: space-around;
                    gap: 20px;
                    margin-bottom: 30px;
                    background: rgba(255, 255, 255, 0.03);
                    padding: 15px;
                    border-radius: 8px;
                    border: 1px solid rgba(255, 255, 255, 0.02);
                  }
                  .guide-item {
                    flex: 1;
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 8px;
                  }
                  .guide-icon {
                    font-size: 24px;
                    background: rgba(255, 255, 255, 0.07);
                    width: 45px;
                    height: 45px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    border-radius: 50%;
                    border: 1px solid rgba(255, 255, 255, 0.1);
                  }
                  .guide-text {
                    font-size: 12px;
                    line-height: 1.4;
                    color: rgba(255, 255, 255, 0.7);
                  }

                  /* Der zeitlose, edle Ausstellungs-Button */
                  .welcome-btn {
                    background: #ffffff;
                    color: #111111;
                    border: none;
                    padding: 14px 40px;
                    font-size: 13px;
                    font-weight: bold;
                    text-transform: uppercase;
                    letter-spacing: 2px;
                    border-radius: 4px;
                    cursor: pointer;
                    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
                    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
                  }
                  .welcome-btn:hover {
                    background: #111111;
                    color: #ffffff;
                    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
                    outline: 1px solid rgba(255, 255, 255, 0.4);
                  }

                  /* Optimierung für Smartphone-Bildschirme, damit nichts gequetscht wird */
                  @media (max-width: 600px) {
                    .welcome-box {
                      padding: 30px 25px;
                      border-radius: 8px;
                    }
                    .welcome-box h2 {
                      font-size: 22px;
                    }
                    .guide-grid {
                      gap: 10px;
                      padding: 10px;
                    }
                    .guide-text {
                      font-size: 11px;
                    }
                  }

                  /* NEU: Styling für die edlen, integrierten Pannellum-Raumtitel */
                  .pnm-title-box {
                    position: absolute !important;
                    top: 80px !important; /* Sitzt sauber unter Ihren oberen Buttons */
                    left: 20px !important;
                    background: rgba(0, 0, 0, 0.6) !important;
                    padding: 6px 14px !important;
                    border-radius: 4px !important;
                    border-left: 3px solid #fff !important;
                    font-family: sans-serif !important;
                    font-size: 13px !important;
                    letter-spacing: 1px !important;
                    text-transform: uppercase !important;
                    animation: fade-title 4s forwards !important; /* Blendet sich nach 4 Sek. dezent aus */
                  }
                  @keyframes fade-title {
                    0% {
                      opacity: 0;
                      transform: translateY(-5px);
                    }
                    15% {
                      opacity: 1;
                      transform: translateY(0);
                    }
                    80% {
                      opacity: 1;
                    }
                    100% {
                      opacity: 0.3;
                    } /* Bleibt ganz dezent im Hintergrund lesbar */
                  }

                  /* NEU: Die minimalistische Raum-Schnellwahl-Leiste am unteren Bildschirmrand */
                  .gallery-navigator {
                    position: absolute;
                    bottom: 20px;
                    left: 50%;
                    transform: translateX(-50%);
                    z-index: 1000;
                    background: rgba(255, 255, 255, 0.9);
                    padding: 6px 12px;
                    border-radius: 20px;
                    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
                    display: flex;
                    gap: 5px;
                  }
                  .nav-room-btn {
                    background: transparent;
                    border: none;
                    color: #111;
                    padding: 6px 14px;
                    font-family: sans-serif;
                    font-size: 12px;
                    font-weight: bold;
                    cursor: pointer;
                    border-radius: 15px;
                    transition: all 0.2s;
                    white-space: nowrap;
                  }
                  /* Sorgt dafür, dass die Handy-Kurztexte auf dem PC standardmäßig ausgeblendet sind */
                  .mobile-text {
                    display: none !important;
                  }
                  .desktop-text {
                    display: inline !important;
                  }
                  .nav-room-btn:hover {
                    background: #111;
                    color: #fff;
                  }
                  /* === REINE SMARTPHONE-MEDIA-QUERY (MAX-WIDTH: 600px) === */
                  @media (max-width: 600px) {
                    /* ... Falls hier noch Ihre alten Handy-Styles für .button-container oder den Player stehen, bleiben diese einfach oben stehen ... */

                    /* Dreht die Sichtbarkeit auf Handys um: Blendet Langtext aus, Kurztext ein */
                    .desktop-text {
                      display: none !important;
                    }
                    .mobile-text {
                      display: inline !important;
                    }

                    /* Macht die Leiste auf dem Handy maximal kompakt, zentriert und daumenfreundlich */
                    .gallery-navigator {
                      bottom: 12px;
                      padding: 4px 6px;
                      width: auto !important;
                      max-width: 95%;
                      gap: 4px;
                      justify-content: center;
                    }

                    /* Die optimale Größe für die vier Knöpfe auf Touchscreens */
                    .nav-room-btn {
                      padding: 6px 10px !important;
                      font-size: 11px !important;
                    }
                  } /* Diese Klammer beendet die Smartphone-Anpassung sauber */

                  /* NEU: Ein optisches Highlight für den Gästebuch-Button in der Leiste */
                  .nav-room-btn.gaestebuch-btn {
                    background: rgba(212, 175, 55, 0.15) !important;
                    color: #aa8439 !important; /* Goldene Schrift */
                    border: 1px solid rgba(212, 175, 55, 0.4) !important;
                  }
                  .nav-room-btn.gaestebuch-btn:hover {
                    background: #aa8439 !important;
                    color: #ffffff !important;
                  }

                  /* NEU: Styling für den eleganten Social-Media Teilen-Button */
                  .nav-room-btn.teilen-btn {
                    background: rgba(
                      255,
                      255,
                      255,
                      0.9
                    ) !important; /* Passt sich perfekt den anderen weißen Buttons an */
                    color: #111111 !important; /* Macht den Text sofort sichtbar */
                    border: 1px solid rgba(0, 0, 0, 0.1) !important;
                    display: inline-flex;
                    align-items: center;
                    gap: 6px;
                  }

                  /* Der edle Hover-Effekt: Beim Drüberfahren färbt sich der Button elegant schwarz mit weißer Schrift */
                  .nav-room-btn.teilen-btn:hover {
                    background: #111111 !important;
                    color: #ffffff !important;
                    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
                  }

                  /* Der neue, höher platzierte Copyright-Hinweis ohne Browser-Kopfzeile */
                  .copyright-toast {
                    position: fixed;
                    top: 50%;
                    transform: translateX(-50%) translateY(-50%);
                    left: 50%;
                    transform: translateX(-50%) translateY(30px); /* Startet tiefer für einen schöneren Effekt */
                    background: rgba(17, 11, 11, 0.95);
                    color: #ffffff;
                    border: 1px solid rgba(212, 175, 55, 0.4); /* Dezent goldener Rand */
                    padding: 14px 28px; /* Leicht vergrößert für noch edlere Wirkung */
                    font-family: sans-serif;
                    font-size: 13px;
                    letter-spacing: 1px;
                    border-radius: 4px;
                    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
                    z-index: 999999;
                    opacity: 0;
                    visibility: hidden;
                    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
                  }
                  /* Schaltet den Hinweis sichtbar und lässt ihn sanft hochgleiten */
                  .copyright-toast.is-visible {
                    opacity: 1;
                    visibility: visible;
                    transform: translateX(-50%) translateY(0);
                  }

      .ar-btn {
        background-color: #222;
        color: #fff;
        border: 1px solid #444;
        padding: 10px 18px;
        border-radius: 25px;
        font-size: 13px;
        font-weight: bold;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        transition: transform 0.2s, background-color 0.2s;
      }

      .ar-btn:active {
        transform: scale(0.96);
        background-color: #333;
      }



           /* Das Modal-Fenster zentrieren und Abstände auf Handys einhalten */
            #myModal {
              display: none;
              position: fixed;
              z-index: 10000;
              left: 0;
              top: 0;
              width: 100%;
              height: 100%;
              background-color: rgba(0, 0, 0, 0.9);

              /* Zentriert den Inhalt perfekt flexibel */
              align-items: center;
              justify-content: center;
              flex-direction: column;
              padding: 15px;
              box-sizing: border-box;

              /* Zeigt den Klick-Zeiger auf dem dunklen Hintergrund an */
              cursor: pointer;
            }

            /* Stellt sicher, dass über dem eigentlichen Inhalt wieder der normale Zeiger erscheint */
            .gallery-modal-content {
              cursor: default;
            }

                  /* Das Bild dynamisch an die Bildschirmgröße anpassen */
                  #imgTarget {
                    max-width: 90vw; /* Maximal 90% der Bildschirmbreite */
                    max-height: 65vh; /* Maximal 65% der Bildschirmhöhe (lässt Platz für Buttons) */
                    width: auto; /* Verhindert Verzerrung */
                    height: auto; /* Verhindert Verzerrung */
                    object-fit: contain; /* Behält das Seitenverhältnis bei */
                    border-radius: 4px;
                    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
                  }

                  /* Speziell für kleine Smartphone-Bildschirme im Hochformat */
                  @media screen and (max-width: 600px) {
                    #imgTarget {
                      max-width: 95vw; /* Auf Handys etwas mehr Breite erlauben */
                      max-height: 50vh; /* Mehr Platz unten für die Buttons (Audio, Video, Kauf) lassen */
                    }
                  }

.gallery-vr-entry {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  right: max(10px, env(safe-area-inset-right));
  z-index: 1200;
  display: grid;
  justify-items: end;
  gap: .4rem;
  max-width: min(80vw, 26rem);
  pointer-events: none;
}

.gallery-vr-entry button,
.gallery-vr-entry span:not(:empty) {
  background: #201c19;
  color: #fff4e6;
  border: 1px solid #d5af80;
  border-radius: .5rem;
  padding: .65rem .85rem;
  font: 600 .9rem system-ui, sans-serif;
}

.gallery-vr-entry button { pointer-events: auto; cursor: pointer; }

#welcomeGalleryVR .gallery-vr-entry {
  position: static;
  max-width: 100%;
  justify-items: center;
}

#welcomeGalleryVR button:not([hidden]) { margin-top: .8rem; }

.welcome-vr-hint {
  max-width: 34ch;
  margin: 1rem auto 0;
  color: #d9cfc3;
  font-size: .875rem;
  line-height: 1.5;
}

#welcomeGalleryVR:has(#enterGalleryVR:not([hidden])) + #welcomeVRHint {
  display: none;
}
