/**
 * UX móvil: solo scroll vertical, sin tablas anchas, inputs legibles.
 */
@media (max-width: 640px) {
    /* Evita zoom automático en iOS */
    body.page-shell #bookingForm input,
    body.page-shell #bookingForm textarea,
    body.page-shell #bookingForm select {
        font-size: 16px !important;
    }

    body.page-shell .reserva-title-row h1 {
        font-size: 1.5rem;
    }

    /* Barra fija al enviar (solo botón) */
    body.page-shell #bookingForm {
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
    }

    body.page-shell #bookingForm .correo-nota {
        margin: 0.85rem 0 0;
        padding: 0;
        border: none;
        background: transparent;
        text-align: center;
        font-size: 0.7rem;
        line-height: 1.45;
        color: var(--brand-hint, #8b9bb4);
    }

    body.page-shell .form-submit-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        padding: 0.7rem 0.85rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
        background: rgba(8, 12, 20, 0.96);
        border-top: 1px solid #232f48;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
    }

    body.page-shell .form-submit-bar button[type="submit"] {
        margin-top: 0;
        padding: 0.9rem 1rem !important;
        font-size: 0.95rem !important;
        width: 100% !important;
    }

    body.page-shell .integrante-item {
        flex-direction: row;
        align-items: flex-start;
    }

    body.page-shell .btn-remove-int {
        align-self: flex-start;
        margin-top: 0;
        flex-shrink: 0;
    }

    /* Landing */
    .landing-intro p,
    body.page-landing .reserva-title-row p {
        font-size: 0.95rem;
    }

    .landing-card h2,
    body.page-landing .shell-choice-body h2 {
        font-size: 1.1rem;
    }

    .landing-card p,
    body.page-landing .shell-choice-body p {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    /* Admin: tablas → tarjetas */
    .admin-desktop-table {
        display: none !important;
    }

    .admin-mobile-cards {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-mobile-card {
        background: #111827;
        border: 1px solid #1e293b;
        border-radius: 12px;
        padding: 0.85rem 1rem;
    }

    .admin-mobile-card-head {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 0.65rem;
        padding-bottom: 0.55rem;
        border-bottom: 1px solid #1e293b;
    }

    .admin-mobile-card-head .badge {
        font-size: 0.72rem;
        font-weight: 600;
        padding: 0.2rem 0.55rem;
        border-radius: 999px;
        border: 1px solid transparent;
    }

    .admin-mobile-card-head .when {
        font-size: 0.78rem;
        color: #94a3b8;
    }

    .admin-mobile-kv {
        display: grid;
        grid-template-columns: minmax(4.5rem, 34%) 1fr;
        gap: 0.35rem 0.65rem;
        font-size: 0.82rem;
        line-height: 1.4;
    }

    .admin-mobile-kv dt {
        color: #64748b;
        font-weight: 500;
    }

    .admin-mobile-kv dd {
        color: #e2e8f0;
        margin: 0;
        word-break: break-word;
    }

    .admin-mobile-card-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.75rem;
        padding-top: 0.65rem;
        border-top: 1px solid #1e293b;
    }

    .admin-mobile-card-actions button,
    .admin-mobile-card-actions .admin-mobile-link {
        flex: 1 1 auto;
        min-height: 40px;
        padding: 0.45rem 0.75rem;
        border-radius: 8px;
        font-size: 0.8rem;
        font-weight: 500;
        text-align: center;
        cursor: pointer;
        border: 1px solid #334155;
        background: #1e293b;
        color: #e2e8f0;
        text-decoration: none;
        font-family: inherit;
    }

    .admin-mobile-card-actions .btn-danger-mobile {
        border-color: rgba(127, 29, 29, 0.8);
        background: rgba(76, 5, 25, 0.35);
        color: #fda4af;
    }

    .admin-mobile-card-actions .btn-accent-mobile {
        border-color: rgba(109, 40, 217, 0.6);
        background: rgba(109, 40, 217, 0.2);
        color: #c4b5fd;
    }

    .admin-mobile-check-row {
        display: flex;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .admin-mobile-check-row input[type="checkbox"] {
        margin-top: 0.2rem;
        width: 1.1rem;
        height: 1.1rem;
        flex-shrink: 0;
    }

    #manualForm {
        grid-template-columns: 1fr !important;
    }

    #manualForm .field-manual {
        font-size: 16px;
    }

    .modal-integrantes-table-wrap {
        overflow-x: visible;
    }

    .modal-integrantes-table-wrap table,
    .modal-integrantes-table-wrap thead,
    .modal-integrantes-table-wrap tbody,
    .modal-integrantes-table-wrap tr,
    .modal-integrantes-table-wrap th,
    .modal-integrantes-table-wrap td {
        display: block;
        width: 100%;
    }

    .modal-integrantes-table-wrap thead {
        display: none;
    }

    .modal-integrantes-table-wrap tr {
        margin-bottom: 0.75rem;
        padding: 0.65rem;
        border: 1px solid #334155;
        border-radius: 8px;
        background: rgba(15, 23, 42, 0.5);
    }

    .modal-integrantes-table-wrap td {
        padding: 0.15rem 0;
        border: none;
    }

    .modal-integrantes-table-wrap td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.68rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #64748b;
        margin-bottom: 0.1rem;
    }

    body.page-shell button.btn-verificar,
    body.page-shell button.btn-verificar-link,
    body.page-shell button.btn-add-integrante {
        width: 100% !important;
    }

    body.page-shell button.btn-remove-int {
        width: auto !important;
    }

    .cal-container {
        max-width: 100%;
    }

    html, body {
        overflow-x: hidden;
    }
}

@media (min-width: 641px) {
    .admin-mobile-cards {
        display: none !important;
    }
}
