html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    position: fixed;
    inset: 0;
    background: #000;
    touch-action: none;
    overscroll-behavior: none;
}

#three-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

#three-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
}

#instructions {
    position: absolute;
    color: #666;
    bottom: 0;
    padding-bottom: 6px;
    font-family: sans-serif;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

/* ==========================================
   TRAUMA-XP — INTERACTION GUIDE
========================================== */
#xp-interaction-guide {
    position: fixed;
    left: 40px;
    bottom: 40px;
    z-index: 999;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Poppins', sans-serif;
}

/* TYPOGRAPHY */
#xp-interaction-guide .xp-guide-words {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-family: inherit;
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 900;
    line-height: 0.85;
    letter-spacing: -0.06em;
}

#xp-interaction-guide .xp-guide-words span {
    display: block;
    font-family: inherit;
    font-weight: 900;
    color: #fff;
}

#xp-interaction-guide .xp-guide-words span:first-child {
    color: #0062ff;
}

/* ESTILOS GENERICOS */
html {
    -webkit-text-size-adjust: 100%;

    /* evita que iOS agrande el texto al rotar */
}

body {
    overscroll-behavior: none;

    /* evita pull-to-refresh accidental */
}

* {
    -webkit-tap-highlight-color: transparent;

    /* quita el flash azul al tocar en iOS */
}




/* ============================================================
   XP INTERACTION GUIDE — RESPONSIVE (sin alterar tu diseño)
   ============================================================ */

/* ---------- BASE (tu estilo original, intacto) ---------- */
#xp-interaction-guide {
    position: fixed;              /* cambia a absolute si tu layout lo requiere */
    left: 20px;
    bottom: 24px;
    z-index: 5;
    pointer-events: none;
    max-width: min(90vw, 320px);
    box-sizing: border-box;
}

#xp-interaction-guide p {
    margin: 18px 0 0;
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.5);
}

/* Reserva de espacio en el wrapper de la galería.
   Esto es lo que evita el empalme SIN tocar el guide. */
:root {
    --xp-guide-space: 90px;
}

.xp-gallery-wrapper {
    padding-bottom: var(--xp-guide-space);
    box-sizing: border-box;
}

/* ---------- MÓVIL (hasta 600px) ---------- */
@media (max-width: 600px) {
    :root { --xp-guide-space: 80px; }

    #xp-interaction-guide {
        left: 20px;
        bottom: 24px;             /* se queda abajo, igual que antes */
        max-width: min(90vw, 260px);
    }

    #xp-interaction-guide .xp-guide-words {
        font-size: clamp(32px, 8vw, 38px);  /* tu valor original */
    }

    #xp-interaction-guide p {
        font-size: 8px;           /* tu valor original */
        max-width: 230px;
    }
}

/* ---------- TABLET VERTICAL (iPad retrato) ---------- */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
    :root { --xp-guide-space: 100px; }

    #xp-interaction-guide {
        left: 20px;
        bottom: 24px;
        max-width: 280px;
    }
}

/* ---------- MÓVIL EN HORIZONTAL (poco alto) ---------- */
@media (max-height: 420px) and (orientation: landscape) {
    :root { --xp-guide-space: 60px; }

    #xp-interaction-guide {
        left: 20px;
        bottom: 24px;
    }
}