body{
    margin: 0px;
}
#pared1{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url("parets/fondo_cuadro2.jpg");
    background-size: cover;
    position: relative;
    overflow: hidden;
}
#pared2{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url("parets/cara_bliblioteca.jpg");
    background-size: cover;
    position: relative;
    display: none;
}
#pared3{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url("parets/fondo_espejo_sinmesa.jpg");
    background-size: cover;
    position: relative;
    display: none;
}
#pared4{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url("parets/fondo_espalda.jpg");
    background-size: cover;
    position: relative;
    display: none;
}
#pared5{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url("parets/fondo_techo.jpg");
    background-size: cover;
    position: relative;
    display: none;
}
#pared6{
    width: min(100vw, 100vh);
    aspect-ratio: 1 / 1;
    margin: auto;
    background-image: url("parets/fondo_suelo.jpg");
    background-size: cover;
    position: relative;
    display: none;
}
.btn-left{
    background-image: url("parets/izquierda.svg");
    background-size: cover;
    position: absolute;
    top: 45%;
    left: 3%;
    width: 3%;
    height: 8%;
    background-repeat: no-repeat;
    z-index: 9999;
}
.btn-right{
    background-image: url("parets/derehca.svg");
    background-size: cover;
    position: absolute;
    top: 45%;
    right: 3%;
    width: 3%;
    height: 6%;
    background-repeat: no-repeat;
    z-index: 9999;
}
.btn-up{
    background-image: url("parets/arriba.svg");
    background-size: cover;
    position: absolute;
    top: 4%;
    left: 45%;
    width: 8%;
    height: 3%;
    background-repeat: no-repeat;
    z-index: 9999;
}
.btn-down{
    background-image: url("parets/abajo.svg");
    background-size: cover;
    position: absolute;
    bottom: 3%;
    right: 45%;
    width: 6%;
    height: 3%;
    background-repeat: no-repeat;
    z-index: 9999;
}
.btn-left:hover, .btn-down:hover, .btn-up:hover, .btn-right:hover{
    opacity: 0.5;
}
.cajafuerte1{
    background-image: url("objectes/puerta_caja_fuerte_off.jpg");
    background-size: cover;
    position: absolute;
    bottom: 7%;
    left: 22%;
    width: 18%;
    height: 30%;
    background-repeat: no-repeat;
    pointer-events: none;
}
.cajafuerte2{
    background-image: url("objectes/puerta_caja_fuerte_on.png");
    background-size: cover;
    position: absolute;
    bottom: 5%;
    left: 21%;
    width: 4%;
    height: 37%;
    background-repeat: no-repeat;
    display: none;
}
.rueda1{
    background-image: url("objectes/rueda_caja_fuerte.png");
    background-size: cover;
    position: absolute;
    bottom: 19%;
    left: 25.9%;
    padding: 20px;
    width: 4%;
    height: 2%;
    background-repeat: no-repeat;
    box-sizing: content-box;
    background-origin: content-box;
    cursor: grab;
}
.rueda1:active {
    cursor: grabbing; /* cambia el cursor mientras arrastras */
}
.espejo1{
    background-image: url("objectes/espejo_off.jpg");
    background-size: cover;
    position: absolute;
    bottom: 6%;
    left: 20%;
    width: 21%;
    height: 33%;
    background-repeat: no-repeat;
}
.espejo2{
    background-image: url("objectes/espejo_on.png");
    background-size: cover;
    position: absolute;
    bottom: 3%;
    left: 18%;
    width: 5%;
    height: 39%;
    background-repeat: no-repeat;
    display: none;
    pointer-events: none;
}
.mesa{
    background-image: url("objectes/mesa.png");
    background-size: cover;
    position: absolute;
    bottom: 0.9%;
    left: 25%;
    width: 28%;
    height: 34%;
    background-repeat: no-repeat;
}
.escritorio0{
    background-image: url("objectes/escritorio_espalda.png");
    background-size: cover;
    position: absolute;
    bottom: -1%;
    left: 40%;
    width: 45%;
    height: 22%;
    background-repeat: no-repeat;
}
.escritorio{
    background-image: url("objectes/escritorio.png");
    background-size: cover;
    position: absolute;
    bottom: -1%;
    left: 8%;
    width: 45%;
    height: 25%;
    background-repeat: no-repeat;
}
.cajon1{
    background-image: url("objectes/cajon_frente.png");
    background-size: cover;
    position: absolute;
    bottom: -1%;
    left: 37.2%;
    width: 11.7%;
    height: 7.5%;
    background-repeat: no-repeat;
}
.llave1-3{
    background-image: url("objectes/llave1_1.png");
    background-size: cover;
    position: absolute;
    bottom: 16%;
    left: 15%;
    width: 5%;
    height: 5%;
    background-repeat: no-repeat;
}
.llave2{
    background-image: url("objectes/llave2.1.png");
    background-size: cover;
    position: absolute;
    bottom: 24.2%;
    left: 32%;
    width: 5%;
    height: 3%;
    background-repeat: no-repeat;
}
.expediente{
    background-image: url("objectes/expediente_tumbado.png");
    background-size: cover;
    position: absolute;
    bottom: 21.3%;
    left: 24%;
    width: 8%;
    height: 8%;
    background-repeat: no-repeat;
}
.expediente1{
    background-image: url("objectes/expediente_pie.png");
    background-size: cover;
    position: absolute;
    bottom: 18.3%;
    left: 24%;
    width: 8%;
    height: 10%;
    background-repeat: no-repeat;
    display: none;
    cursor: pointer;
}
.lampara3 {
    position: absolute;
    width: 20%;
    height: 20%;
    top: 63%;
    left: 2%;
    background-image: url("objectes/lampara.png");
    background-size: cover;
    background-repeat: no-repeat;
    cursor: grab;
    z-index: 10000; /* superior a todos los <a> */
    pointer-events: auto; /* asegura que reciba clics */
}
.lampara3:active { cursor: grabbing; }
.intro0{
    background-image: url("objectes/intro2.png");
    background-size: cover;
    position: absolute;
    bottom: 15.5%;
    left: 21%;
    width: 15%;
    height: 10%;
    background-repeat: no-repeat;
    z-index: 99;
}
.intro1{
    background-image: url("objectes/intro.png");
    background-size: cover;
    position: absolute;
    bottom: 20%;
    left: 30%;
    width: 12%;
    height: 9%;
    background-repeat: no-repeat;
}
#intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 99999;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.intro1-grande {
    background-image: url("objectes/intro.jpg");
    background-size: contain;      /* contain para que se vea completa */
    background-position: center;
    background-repeat: no-repeat;
    width: 90%;
    height: 90%;
    display: block;
}
.pista1{
    background-image: url("objectes/pista0.png");
    background-size: cover;
    position: absolute;
    bottom: 0%;
    left: 34.5%;
    width: 15%;
    height: 10%;
    background-repeat: no-repeat;
}
#pista {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 99999;
    background-color: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.pista1-grande {
    background-image: url("objectes/pista.jpg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 90%;
    height: 90%;
    display: block;
}
.llave1{
    background-image: url("objectes/llave1_1.png");
    background-size: cover;
    position: absolute;
    bottom: 13%;
    left: 22%;
    width: 5%;
    height: 5%;
    background-repeat: no-repeat;
}
.lampara{
    background-image: url("objectes/lampara.png");
    background-size: cover;
    position: absolute;
    bottom: 14%;
    left: 9%;
    width: 20%;
    height: 20%;
    background-repeat: no-repeat;
}

.llave1-2{
    background-image: url("objectes/llave1_1.png");
    background-size: cover;
    position: absolute;
    bottom: 14%;
    right: 24%;
    width: 8%;
    height: 4%;
    background-repeat: no-repeat;
}
.lampara2{
    background-image: url("objectes/lampara.png");
    background-size: cover;
    position: absolute;
    bottom: 14%;
    right: 24%;
    width: 20%;
    height: 20%;
    background-repeat: no-repeat;
}
.cuadro{
    background-image: url("objectes/cuadro.jpg");
    background-size: cover;
    position: absolute;
    bottom: 8%;
    left: 10%;
    width: 26%;
    height: 42%;
    background-repeat: no-repeat;
}
@keyframes moverCuadro {
    0%   { left: 10%; }  /* posición inicial */
    100% { left: 50%; }   /* posición final, ajusta según tu layout */
}