#worldviewer { position:relative; overflow:hidden; height:80vh; touch-action: pan-y; cursor: grab; }
#worldviewer.grabbing { cursor: grabbing; }
#scene { position: relative; height: 60vh; overflow: hidden; background: transparent; }
#sceneInner { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; z-index: 2; will-change: transform; }
#locImage { display: block; height: 100%; width: auto !important; max-width: none !important; pointer-events: none; -webkit-user-drag: none; user-select: none; }
.scene-content { position: relative; z-index: 3; pointer-events: none; }
.scene-bg { z-index: 1; } /* if you use background layers */



@media (max-width: 782px) {
   #worldviewer { height:80vh; }
}
@media (max-width: 500px) {
   #worldviewer { height:80vh; }
}




/* tooltip under nav points */
.nav-point { position: absolute; }
.nav-tip {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px); /* below the button */
  transform: translateX(-50%);
  background: rgba(0,0,0,0.65);
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
  z-index: 20;
}
.nav-tip.visible { opacity: 1; }
/* small arrow */
.nav-tip::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: rgba(0,0,0,0.65) transparent transparent transparent;
}





/* History panel */
#history {
   margin-top: 10vh;
   text-align: left;
   padding: 10px;
   background-color: rgb(237, 247, 243);
}
#history-entries a { font-size: small !important; font-weight: normal;}









/* ------------------------------ old delete */
#viewer {
    /*width:100vw;*/
    height:60vh;
    overflow:hidden;
    position:relative;
    cursor:grab;
    
  }

@media (max-width: 781px) {
  #viewer { height:56vh; }
}
@media (max-width: 500px) {
  #viewer { height:52vh; }
}

  #viewer:active { cursor:grabbing; }
  #scene {
    /*position:absolute;
    top:0;
    left:0;*/
    touch-action: pan-y; /* erlaubt horizontales Pointer-Handling, behält vertikales Scrollen */
  -ms-touch-action: pan-y;
    height:100%;
    background-repeat:no-repeat;
    background-size: auto 100%; 
    background-position: center;
    position: relative;
    
  }
  .scene-bg {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: center;
    opacity: 0;
    transition: opacity 800ms ease;
    z-index: 1;
    pointer-events: none;
    
  }
  @media (max-width: 500px) {
   .scene-bg { background-size: 95% auto; }
  }
  .scene-bg.visible { opacity: 1; }

  /* content (nav points, overlay) sits above bg */
  .scene-content { position: relative; z-index: 2; height:100%; }

  #ui { text-align:center; padding:1rem; }
  
  
  .nav-point {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
     transition: opacity 240ms ease, transform 240ms ease;
    will-change: transform, opacity;
  }
  .nav-point button {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:16px;
    background-color: rgba(255,255,255,0.6);
    color: rgba(255,255,255,0.8);
    touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0.12);
  }
  @media (max-width: 500px) {
  .nav-point button { width: 20px; height: 20px; font-size: 12px; }
}

  .nav-point button:focus, .nav-point button:hover { background-color: rgba(255,255,255,.9); color: black }
  /* bottom-center overlay label */
  .nav-label-overlay { position:absolute; left:50%; bottom:10px; transform:translateX(-50%); background:rgba(0,0,0,0.6); color:#fff; padding:6px 10px; border-radius:6px; font-size:13px; pointer-events:none; opacity:0; transition:opacity .12s; z-index:12; white-space:nowrap; }
  .nav-label-overlay.visible { opacity:1; }
  .nav-point { opacity: 0; transform: translate(-50%, -45%) scale(.95); }
  .nav-point.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (max-width: 500px) {
  .scene-bg { transition: opacity 420ms ease; }
  .nav-point button { background-color: rgba(255,255,255,0.6); color: #222; }
}