body {
    background:#000;
    color:#fff;
    font-family: sans-serif;
    margin:0;
    overflow:hidden;
}

/* cajita info arriba izq */
#ui {
    position:fixed;
    top:10px;
    left:10px;
    background:rgba(0,0,0,0.5);
    padding:8px 12px;
    border:1px solid #555;
    border-radius:4px;
    font-size:14px;
    z-index:10;
    color:#fff;
}

#gridCanvas {
    background:#000;
    display:block;
    cursor:grab;
}
#gridCanvas:active {
    cursor:grabbing;
}

/* ===== POPUP ===== */

/* overlay oscuro pantalla completa */
#popupOverlay {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.6);
    z-index:9999;
    display:none;               /* oculto por defecto */
    align-items:center;
    justify-content:center;
}

/* cuando mostramos el popup, le quitamos 'hidden' al overlay */
#popupOverlay.show {
    display:flex;
}

/* tarjeta modal */
#popupCard {
    background:#111;
    color:#fff;
    border:1px solid #444;
    border-radius:6px;
    box-shadow:0 20px 50px rgba(0,0,0,0.8);
    width:320px;
    max-width:90vw;
    padding:16px;
    font-size:14px;
    line-height:1.4;
    font-family:sans-serif;
}

/* header del popup */
.popup-header {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    margin-bottom:12px;
}
.popup-title {
    font-weight:600;
    font-size:15px;
    line-height:1.3;
    color:#fff;
}
#closeBtn {
    background:#444;
    color:#fff;
    border:0;
    border-radius:4px;
    padding:4px 8px;
    font-size:12px;
    line-height:1;
    cursor:pointer;
}

/* caja info celda */
#popup-info {
    background:#000;
    border:1px solid #333;
    border-radius:4px;
    padding:8px;
    white-space:pre-wrap;
    word-break:break-word;
    font-size:12px;
    line-height:1.4;
    max-height:80px;
    overflow-y:auto;
    margin-bottom:14px;
    color:#fff;
}

/* grupos de campos */
.form-group {
    margin-bottom:12px;
}
.form-label {
    display:block;
    color:#aaa;
    font-size:12px;
    margin-bottom:4px;
}

/* inputs básicos */
.form-input,
.form-textarea,
.form-file,
.form-email {
    width:100%;
    box-sizing:border-box;
    background:#000;
    color:#fff;
    border:1px solid #555;
    border-radius:4px;
    padding:6px 8px;
    font-size:13px;
    font-family:sans-serif;
}
.form-textarea {
    resize:vertical;
    min-height:48px;
}

/* texto ayuda pequeño */
.help-text {
    font-size:11px;
    color:#777;
    line-height:1.4;
    margin-top:6px;
}

/* bloque redes */
.social-grid {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-bottom:12px;
}
.social-col-half {
    flex:1 1 120px;
    min-width:0;
}
.social-col-full {
    flex:1 1 100%;
    min-width:0;
}
.social-prefix-wrap {
    display:flex;
    align-items:center;
}
.social-prefix {
    background:#222;
    border:1px solid #555;
    border-right:0;
    border-radius:4px 0 0 4px;
    color:#999;
    font-size:12px;
    padding:6px 6px;
    line-height:1.2;
    white-space:nowrap;
}
.social-input {
    flex:1;
    min-width:0;
    background:#000;
    color:#fff;
    border:1px solid #555;
    border-left:0;
    border-radius:0 4px 4px 0;
    padding:6px 8px;
    font-size:13px;
    font-family:sans-serif;
}

/* footer botones */
.popup-footer {
    display:flex;
    justify-content:flex-end;
    gap:8px;
}
#reserveBtn {
    background:#fff;
    color:#000;
    border:0;
    border-radius:4px;
    padding:10px 12px;
    font-size:13px;
    font-weight:bold;
    cursor:pointer;
}
#reserveBtn:disabled {
    opacity:0.4;
    cursor:not-allowed;
}
#cancelBtn {
    background:#333;
    color:#fff;
    border:0;
    border-radius:4px;
    padding:10px 12px;
    font-size:13px;
    cursor:pointer;
}
#progressBarWrapper {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28px;
    background: rgba(20,20,20,0.9);
    border-top: 1px solid rgba(255,255,255,0.15);
    font-family: sans-serif;
    font-size: 12px;
    color: #fff;
    line-height: 28px;
    padding: 0 8px;
    box-sizing: border-box;
}

#progressBarInner {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;

    /* barra de progreso */
    background: linear-gradient(
        to right,
        #ff2d55 0%,
        #ffcc00 100%
    );

    width: 0%; /* se actualiza por JS */
    opacity: 0.3;
    pointer-events: none;
}

#progressBarLabel {
    position: relative;
    z-index: 2;
    font-weight: bold;
    text-shadow: 0 0 4px #000;
}
#gridCanvas {
    touch-action: none; /* MUY IMPORTANTE: dejamos que JS gestione gestos */
}
body {
    margin:0;
    background:#000;
    color:#fff;
    overflow:hidden;
}

#gridCanvas {
    display:block;
    width:100vw;
    height:100vh;
    touch-action:none; /* el canvas captura pan/pinch */
}
html, body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    height: 100%;
    overflow: hidden;
}

#gridCanvas {
    display: block;
    width: 100vw;
    height: 100vh;

    /* CLAVE: esto dice al navegador
       "no interpretes gestos táctiles estándar,
        déjalos pasar al JS" */
    touch-action: none;
}
