html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background: transparent;
}

.a-enter-vr,
.a-enter-ar {
  display: none !important;
}

a-scene,
.a-canvas {
  position: fixed !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
}

#estado {
  position: fixed;
  z-index: 2000;
  top: max(14px, env(safe-area-inset-top));
  left: 68px;
  max-width: calc(100% - 300px);
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .76);
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

#silencio {
  position: fixed;
  z-index: 2200;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .97);
  font-size: 23px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}

#selector-modelo {
  position: fixed;
  z-index: 2200;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  width: min(205px, 46vw);
  border: 2px solid #111;
  border-radius: 12px;
  padding: 12px 36px 12px 14px;
  background: rgba(255, 255, 255, .97);
  color: #111;
  font-size: 16px;
  font-weight: 700;
  box-sizing: border-box;
}

#activar-sonido {
  position: fixed;
  z-index: 2400;
  left: 50%;
  bottom: 122px;
  transform: translateX(-50%);
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 14px 20px;
  background: #fff;
  color: #111;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .3);
}

#menu-contenidos {
  position: fixed;
  z-index: 2300;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 28px));
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 14px;
  max-width: calc(100% - 24px);
  border-radius: 999px;
  background: rgba(0, 0, 0, .48);
  box-shadow: 0 5px 20px rgba(0, 0, 0, .28);
  backdrop-filter: blur(6px);
}

.boton-contenido {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: rgba(24, 24, 24, .94);
  color: #fff;
  font-size: 27px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}

.boton-contenido:active {
  transform: scale(.92);
}

#ventana {
  position: fixed;
  z-index: 2350;
  top: 82px;
  left: 12px;
  width: min(390px, 58vw);
  max-height: calc(100% - 190px);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  color: #111;
  box-shadow: 0 10px 35px rgba(0, 0, 0, .38);
}

#ventana header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: #151515;
  color: #fff;
}

#ventana h2 {
  margin: 0;
  font-size: 18px;
}

#cerrar-ventana {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 18px;
}

#contenido-ventana {
  max-height: calc(100vh - 255px);
  overflow: auto;
  padding: 16px;
  line-height: 1.45;
}

#contenido-ventana img,
#contenido-ventana video {
  display: block;
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 12px;
  background: #111;
}

#contenido-ventana audio {
  width: 100%;
}

.acciones-musica {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acciones-musica button {
  border: 0;
  border-radius: 10px;
  padding: 11px 13px;
  font-weight: 700;
}

.error {
  padding: 12px;
  border-radius: 10px;
  background: #ffe1e1;
  color: #7a0000;
}

@media (max-width: 700px) {
  #ventana {
    top: 78px;
    left: 8px;
    width: 62vw;
    max-height: calc(100% - 185px);
  }

  #menu-contenidos {
    gap: 9px;
  }

  .boton-contenido {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    font-size: 24px;
  }
}
