/* =================================================================
   VIAJE A MEDIDA — V10 · DARK ELEGANTE
   Lujo discreto en oscuro. Carbón profundo (no negro puro),
   contraste suave, acento cálido metálico. Tarjeta compacta,
   pasos mínimos. Léxico táctico conservado. Mobile-first.
   Hereda Core.css cuando existe. WCAG 2.2 AA. Core Web Vitals.
   ================================================================= */

:root {
    /* Carbón cálido, no negro. Contraste deliberadamente suave. */
    --v-bg:        #14161a;
    --v-bg-2:      #181b20;
    --v-card:      #1d2127;
    --v-card-2:    #232830;
    --v-line:      #2b313a;
    --v-line-soft: #242a32;

    /* Acento: naranja de marca VenaViajera. Hereda de Core.css si existe. */
    --v-accent:      var(--color-primary, #FF5E14);
    --v-accent-2:    #ff7a3d;          /* tono más claro para hover/gradiente */
    --v-accent-deep: #d44a08;          /* tono profundo */
    --v-accent-glow: rgba(255,94,20,.18);
    --v-accent-soft: rgba(255,94,20,.10);
    --v-on-accent:   #14161a;          /* tinta sobre naranja (contraste AA) */

    --v-text:       #e9e6e0;   /* no blanco puro — más cálido y suave */
    --v-text-soft:  #a8a8a4;
    --v-text-faint: #6f7178;
    --v-ok:         #8fbf9a;
    --v-ok-soft:    rgba(143,191,154,.12);

    --v-disp: var(--font-heading, "Cormorant Garamond", Georgia, serif);
    --v-sans: var(--font-body, var(--font-subheading, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif));

    --v-r:    16px;
    --v-r-sm: 11px;
    --v-pill: 999px;
    --v-ease: cubic-bezier(.22,1,.36,1);
    --v-shadow:    0 1px 2px rgba(0,0,0,.3), 0 18px 44px rgba(0,0,0,.42);
    --v-shadow-lg: 0 30px 70px rgba(0,0,0,.6);
    --v-header-h: var(--header-height, 0px);
}

#vm-app, #vm-app *, #vm-results, #vm-results * { box-sizing: border-box; }
#vm-app fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
#vm-app legend { padding: 0; }
#vm-app button { font: inherit; color: inherit; }
@media (prefers-reduced-motion: reduce) {
    #vm-app *, #vm-results * {
        animation-duration: .001ms !important; animation-iteration-count: 1 !important;
        transition-duration: .001ms !important; scroll-behavior: auto !important;
    }
}

/* =================================================================
   FASE 1 — ASISTENTE (tarjeta compacta)
   ================================================================= */
#vm-app {
    min-height: calc(100dvh - var(--v-header-h));
    background:
        radial-gradient(120% 80% at 50% -10%, #1a1d23 0%, var(--v-bg) 55%);
    color: var(--v-text);
    font-family: var(--v-sans);
    -webkit-font-smoothing: antialiased;
    display: flex; flex-direction: column;
    position: relative;
}
/* Brillo de acento muy tenue al fondo */
#vm-app::before {
    content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(50% 40% at 50% 100%, var(--v-accent-soft), transparent 70%);
}

.vm-shell {
    position: relative; z-index: 1; flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: clamp(1rem, 4vw, 2.5rem);
}
.vm-card {
    width: 100%; max-width: 560px;
    background: linear-gradient(180deg, var(--v-card) 0%, var(--v-bg-2) 100%);
    border: 1px solid var(--v-line);
    border-radius: var(--v-r);
    box-shadow: var(--v-shadow);
    overflow: hidden;
}

/* Cabecera de la tarjeta: marca + progreso fino */
.vm-card__head {
    display: flex; align-items: center; gap: 1rem;
    padding: 1.3rem clamp(1.3rem, 4vw, 2rem);
    border-bottom: 1px solid var(--v-line-soft);
}
.vm-brand {
    font-family: var(--v-disp); font-size: 1.3rem; font-weight: 600;
    color: var(--v-text); text-decoration: none; letter-spacing: .01em; flex: none;
}
.vm-brand b { color: var(--v-accent); font-weight: 600; }
.vm-prog { flex: 1; display: flex; align-items: center; gap: .85rem; max-width: 280px; margin-left: auto; }
.vm-prog__track { flex: 1; height: 2px; background: var(--v-line); border-radius: var(--v-pill); overflow: hidden; }
.vm-prog__fill {
    height: 100%; width: 25%;
    background: linear-gradient(90deg, var(--v-accent-deep), var(--v-accent-2));
    border-radius: var(--v-pill); transition: width .55s var(--v-ease);
}
.vm-prog__c {
    font-size: .76rem; color: var(--v-text-faint); flex: none;
    letter-spacing: .14em; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.vm-prog__c b { color: var(--v-accent); font-weight: 600; }

/* Cuerpo de la tarjeta */
.vm-card__body { padding: clamp(1.6rem, 5vw, 2.4rem) clamp(1.3rem, 4vw, 2rem); }

.vm-step { display: none; }
.vm-step.is-active { display: block; animation: vIn .5s var(--v-ease) both; }
@keyframes vIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.vm-eyebrow {
    font-size: .72rem; letter-spacing: .26em; text-transform: uppercase;
    color: var(--v-accent); font-weight: 600; margin: 0 0 .85rem;
}
.vm-q {
    font-family: var(--v-disp);
    font-size: clamp(1.9rem, 6vw, 2.6rem);
    line-height: 1.1; font-weight: 600; letter-spacing: -.005em;
    color: var(--v-text); margin: 0 0 .6rem;
}
.vm-q em { font-style: italic; color: var(--v-accent-2); }
.vm-sub {
    font-size: 1rem; line-height: 1.6; color: var(--v-text-soft);
    margin: 0 0 1.9rem; max-width: 44ch;
}

/* Buscador */
.vm-search { position: relative; }
.vm-search__ic {
    position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; stroke: var(--v-accent); pointer-events: none;
}
.vm-input {
    width: 100%;
    padding: 1.15rem 1.2rem 1.15rem 3.1rem;
    background: var(--v-bg);
    border: 1px solid var(--v-line);
    border-radius: var(--v-r-sm);
    color: var(--v-text);
    font-family: var(--v-sans); font-size: 1.05rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.vm-input::placeholder { color: var(--v-text-faint); }
.vm-input:hover { border-color: var(--v-text-faint); }
.vm-input:focus-visible {
    outline: none; border-color: var(--v-accent);
    background: var(--v-bg-2);
    box-shadow: 0 0 0 4px var(--v-accent-glow);
}
.vm-input--plain { padding-left: 1.2rem; }

.vm-dropdown {
    position: absolute; top: calc(100% + .55rem); left: 0; right: 0;
    background: var(--v-card-2);
    border: 1px solid var(--v-line);
    border-radius: var(--v-r-sm);
    box-shadow: var(--v-shadow-lg);
    max-height: 290px; overflow-y: auto;
    z-index: 60; padding: .4rem;
}
.vm-dropdown__item {
    display: flex; align-items: center; gap: .85rem;
    width: 100%; text-align: left; padding: .85rem .9rem;
    border: 0; background: transparent; border-radius: 9px;
    color: var(--v-text-soft); cursor: pointer; transition: background .15s, color .15s;
}
.vm-dropdown__item:hover,
.vm-dropdown__item[aria-selected="true"],
.vm-dropdown__item:focus-visible { background: var(--v-accent-soft); color: var(--v-text); outline: none; }
.vm-dropdown__item svg { width: 18px; height: 18px; flex: none; stroke: var(--v-accent); }
.vm-dropdown__item.is-city svg { stroke: var(--v-text-faint); }
.vm-dropdown__t { display: flex; flex-direction: column; min-width: 0; }
.vm-dropdown__n { font-weight: 600; font-size: .96rem; color: var(--v-text); }
.vm-dropdown__c { font-size: .8rem; color: var(--v-text-faint); }
.vm-dropdown__empty { padding: 1rem; color: var(--v-text-faint); font-size: .9rem; }

/* Sub-grupo */
.vm-subgroup { margin-top: 1.5rem; }
.vm-label {
    font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
    font-weight: 600; color: var(--v-text-soft); margin: 0 0 .85rem;
}
.vm-chips { display: flex; flex-wrap: wrap; gap: .55rem; }
.vm-chip { position: relative; cursor: pointer; }
.vm-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vm-chip span {
    display: inline-flex; align-items: center;
    padding: .7rem 1.25rem;
    border: 1px solid var(--v-line);
    border-radius: var(--v-pill);
    background: var(--v-bg);
    color: var(--v-text-soft);
    font-size: .92rem; font-weight: 500;
    transition: all .2s var(--v-ease);
}
.vm-chip:hover span { border-color: var(--v-text-faint); color: var(--v-text); }
.vm-chip input:checked + span {
    background: var(--v-accent); border-color: var(--v-accent); color: #14161a;
    font-weight: 600;
}
.vm-chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--v-accent-glow); border-color: var(--v-accent); }

/* Tarjetas de opción compactas */
.vm-options { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.vm-opt { position: relative; cursor: pointer; display: block; }
.vm-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vm-opt__c {
    display: flex; align-items: center; gap: .85rem;
    padding: 1.05rem 1.1rem;
    background: var(--v-bg);
    border: 1px solid var(--v-line);
    border-radius: var(--v-r-sm);
    transition: all .2s var(--v-ease);
    height: 100%;
}
.vm-opt__c svg { width: 24px; height: 24px; flex: none; stroke: var(--v-text-faint); transition: stroke .2s; }
.vm-opt__c b { display: block; font-size: 1rem; font-weight: 600; color: var(--v-text); }
.vm-opt__c small { display: block; font-size: .8rem; color: var(--v-text-faint); margin-top: 2px; }
.vm-opt:hover .vm-opt__c { border-color: var(--v-text-faint); background: var(--v-card-2); }
.vm-opt input:checked + .vm-opt__c {
    border-color: var(--v-accent);
    background: linear-gradient(180deg, var(--v-accent-soft), transparent);
    box-shadow: inset 0 0 0 1px var(--v-accent);
}
.vm-opt input:checked + .vm-opt__c svg { stroke: var(--v-accent); }
.vm-opt input:focus-visible + .vm-opt__c { outline: 2px solid var(--v-accent); outline-offset: 2px; }

/* Stepper */
.vm-stepper-wrap { display: flex; align-items: center; gap: 1.1rem; }
.vm-stepper {
    display: inline-flex; align-items: stretch;
    border: 1px solid var(--v-line); border-radius: var(--v-pill);
    background: var(--v-bg); overflow: hidden;
}
.vm-stepper:focus-within { border-color: var(--v-accent); box-shadow: 0 0 0 4px var(--v-accent-glow); }
.vm-stepper button {
    width: 54px; border: 0; background: transparent;
    color: var(--v-accent); font-size: 1.4rem; cursor: pointer; transition: background .15s;
}
.vm-stepper button:hover { background: var(--v-accent-soft); }
.vm-stepper button:focus-visible { outline: 2px solid var(--v-accent); outline-offset: -3px; }
.vm-stepper input {
    width: 78px; border: 0; border-left: 1px solid var(--v-line); border-right: 1px solid var(--v-line);
    text-align: center; background: transparent;
    font-family: var(--v-disp); font-size: 1.5rem; font-weight: 600; color: var(--v-text);
    -moz-appearance: textfield;
}
.vm-stepper input::-webkit-outer-spin-button,
.vm-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vm-stepper-unit { font-size: .9rem; color: var(--v-text-faint); }

/* Legal / banner / OTP */
.vm-legal {
    display: flex; align-items: flex-start; gap: .85rem;
    margin-top: 1.4rem; padding: 1.1rem 1.2rem;
    background: var(--v-bg); border: 1px solid var(--v-line);
    border-radius: var(--v-r-sm);
}
.vm-legal input[type=checkbox] {
    appearance: none; -webkit-appearance: none;
    width: 21px; height: 21px; flex: none; margin-top: 1px;
    border: 1px solid var(--v-line); border-radius: 6px;
    background: var(--v-card); cursor: pointer; position: relative; transition: all .15s;
}
.vm-legal input:checked { background: var(--v-accent); border-color: var(--v-accent); }
.vm-legal input:checked::after {
    content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 9px;
    border: solid #14161a; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.vm-legal input:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
.vm-legal__t { font-size: .85rem; color: var(--v-text-soft); line-height: 1.6; }
.vm-legal__t b { display: block; color: var(--v-text); margin-bottom: 3px; font-size: .89rem; font-weight: 600; }
.vm-legal__t a { color: var(--v-accent-2); font-weight: 600; }
.vm-legal__t a:hover { text-decoration: underline; }

.vm-banner {
    display: flex; align-items: center; gap: .7rem;
    margin-bottom: 1.4rem; padding: .9rem 1.1rem;
    background: var(--v-ok-soft); border: 1px solid rgba(143,191,154,.3);
    border-radius: var(--v-r-sm); color: var(--v-ok); font-size: .9rem; font-weight: 500;
}
.vm-banner svg { width: 17px; height: 17px; flex: none; stroke: var(--v-ok); }

.vm-otp-meta { font-size: .98rem; color: var(--v-text-soft); margin: 0 0 1.3rem; line-height: 1.6; }
.vm-otp-meta b { color: var(--v-text); font-weight: 600; }
.vm-otp-meta .e { display: block; font-size: .82rem; color: var(--v-text-faint); margin-top: 3px; }

/* Cuenta atrás OTP — círculo + tiempo */
.vm-otp-timer {
    display: flex; align-items: center; gap: .85rem;
    margin: 0 0 1.2rem; padding: .85rem 1rem;
    background: var(--v-bg); border: 1px solid var(--v-line);
    border-radius: var(--v-r-sm);
    transition: border-color .3s, background .3s;
}
.vm-otp-timer.is-warn { border-color: var(--v-accent); background: var(--v-accent-soft); }
.vm-otp-timer.is-expired { border-color: #b54a3a; background: rgba(181,74,58,.10); }
.vm-otp-ring {
    width: 42px; height: 42px; flex: none; position: relative;
}
.vm-otp-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.vm-otp-ring__bg { fill: none; stroke: var(--v-line); stroke-width: 3; }
.vm-otp-ring__fg {
    fill: none; stroke: var(--v-accent); stroke-width: 3; stroke-linecap: round;
    transition: stroke-dashoffset 1s linear, stroke .3s;
}
.vm-otp-timer.is-warn .vm-otp-ring__fg { stroke: var(--v-accent); }
.vm-otp-timer.is-expired .vm-otp-ring__fg { stroke: #b54a3a; }
.vm-otp-ring__txt {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-family: var(--v-disp); font-size: .8rem; font-weight: 600;
    color: var(--v-text); font-variant-numeric: tabular-nums;
}
.vm-otp-timer__l { flex: 1; min-width: 0; }
.vm-otp-timer__l b {
    display: block; font-size: .82rem; letter-spacing: .14em;
    text-transform: uppercase; font-weight: 600; color: var(--v-text-soft);
    margin-bottom: 1px;
}
.vm-otp-timer__l span { font-size: .78rem; color: var(--v-text-faint); }
.vm-otp-timer.is-expired .vm-otp-timer__l b { color: #d97565; }

@keyframes vBlink { 50% { opacity: .55; } }
.vm-otp-timer.is-warn .vm-otp-ring__txt { animation: vBlink 1s ease-in-out infinite; }

.vm-otp { display: flex; gap: .5rem; }
.vm-otp input {
    width: 100%; max-width: 56px; aspect-ratio: 3/4;
    text-align: center; background: var(--v-bg);
    border: 1px solid var(--v-line); border-radius: var(--v-r-sm);
    color: var(--v-accent); font-family: var(--v-disp); font-size: 1.6rem; font-weight: 600;
    transition: all .15s;
}
.vm-otp input:focus-visible {
    outline: none; border-color: var(--v-accent);
    box-shadow: 0 0 0 4px var(--v-accent-glow);
}
.vm-otp input.is-filled { border-color: var(--v-accent); }
.vm-link-btn {
    background: none; border: 0; cursor: pointer; margin-top: 1rem;
    color: var(--v-accent-2); font-size: .9rem; font-weight: 600;
    text-decoration: underline; text-underline-offset: 3px;
}
.vm-link-btn:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 3px; border-radius: 3px; }

/* Pie de la tarjeta: acciones */
.vm-card__foot {
    display: flex; align-items: center; gap: .8rem;
    padding: 1.2rem clamp(1.3rem, 4vw, 2rem);
    border-top: 1px solid var(--v-line-soft);
    background: var(--v-bg-2);
}
.vm-foot__sp { flex: 1; }
.vm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .95rem 1.8rem; min-height: 52px;
    border: 1px solid transparent; border-radius: var(--v-pill);
    font-family: var(--v-sans); font-size: .98rem; font-weight: 600;
    cursor: pointer; transition: all .2s var(--v-ease);
}
.vm-btn svg { width: 17px; height: 17px; }
.vm-btn:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 3px; }
.vm-btn--ghost {
    background: transparent; border-color: var(--v-line); color: var(--v-text-soft);
    padding: .95rem 1.2rem;
}
.vm-btn--ghost:hover { border-color: var(--v-text-soft); color: var(--v-text); }
.vm-btn--primary {
    background: linear-gradient(180deg, var(--v-accent-2), var(--v-accent));
    color: #14161a;
    box-shadow: 0 8px 22px var(--v-accent-glow);
}
.vm-btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.vm-btn--wide { flex: 1; }
.vm-btn[disabled], .vm-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; pointer-events: none; }
.vm-spin { animation: vSpin .8s linear infinite; transform-origin: center; }
@keyframes vSpin { to { transform: rotate(360deg); } }

/* A11y */
.vm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.vm-skip {
    position: absolute; left: 1rem; top: -3.5rem; z-index: 200;
    background: var(--v-accent); color: #14161a;
    padding: .7rem 1.1rem; border-radius: 8px; font-weight: 600; transition: top .2s;
}
.vm-skip:focus { top: .8rem; }

/* Modal */
.vm-modal {
    position: fixed; inset: 0; z-index: 100000;
    display: none; align-items: center; justify-content: center;
    background: rgba(8,9,11,.78); backdrop-filter: blur(5px);
    padding: 1.3rem; opacity: 0; transition: opacity .22s;
}
.vm-modal.is-open { display: flex; opacity: 1; }
.vm-modal__box {
    background: var(--v-card); border: 1px solid var(--v-line);
    border-radius: var(--v-r); max-width: 410px; width: 100%; padding: 2.1rem;
    text-align: center; box-shadow: var(--v-shadow-lg);
    transform: translateY(14px) scale(.97); transition: transform .26s var(--v-ease);
}
.vm-modal.is-open .vm-modal__box { transform: none; }
.vm-modal__ic {
    width: 54px; height: 54px; margin: 0 auto 1.1rem;
    border-radius: 50%; display: grid; place-items: center;
    background: var(--v-accent-soft); border: 1px solid var(--v-line);
}
.vm-modal__ic svg { width: 25px; height: 25px; stroke: var(--v-accent); }
.vm-modal.is-info .vm-modal__ic { background: var(--v-ok-soft); }
.vm-modal.is-info .vm-modal__ic svg { stroke: var(--v-ok); }
.vm-modal__title { font-family: var(--v-disp); font-weight: 600; font-size: 1.5rem; color: var(--v-text); margin: 0 0 .55rem; }
.vm-modal__text { color: var(--v-text-soft); font-size: .96rem; line-height: 1.6; margin: 0 0 1.6rem; }
.vm-modal__text small { color: var(--v-text-faint); }

/* =================================================================
   FASE 2 — RESULTADOS (rediseño llamativo, estético, móvil real)
   ================================================================= */
#vm-results { display: none; background: var(--v-bg); }
#vm-results.is-visible { display: grid; height: calc(100dvh - var(--v-header-h)); }
body.vm-results-on #vm-app { display: none !important; }

/* --- Panel de inteligencia (izquierda escritorio / sheet inferior móvil) --- */
.vm-r-panel {
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, var(--v-card) 0%, var(--v-bg) 90%);
    min-height: 0; position: relative;
}
/* Cabecera con "marca" del destino */
.vm-r-head {
    padding: 1.5rem clamp(1.2rem,4vw,1.7rem) 1.2rem;
    border-bottom: 1px solid var(--v-line); flex: none;
    position: relative; overflow: hidden;
}
.vm-r-head::before {
    content: ""; position: absolute; top: -40px; right: -40px;
    width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, var(--v-accent-glow) 0%, transparent 70%);
    pointer-events: none;
}
.vm-r-eyebrow {
    display: inline-flex; align-items: center; gap: .55rem;
    font-size: .68rem; letter-spacing: .24em; text-transform: uppercase;
    color: var(--v-accent); font-weight: 600; margin: 0 0 .55rem;
}
.vm-r-eyebrow::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%;
    background: var(--v-accent); box-shadow: 0 0 8px var(--v-accent);
    animation: vPulse 1.7s ease-in-out infinite;
}
.vm-r-title {
    font-family: var(--v-disp); font-weight: 600;
    font-size: clamp(1.85rem, 4.4vw, 2.4rem); line-height: 1.05;
    letter-spacing: -.01em; color: var(--v-text); margin: 0 0 1.1rem;
    position: relative;
}
.vm-r-stats {
    display: grid; grid-template-columns: repeat(3,1fr); gap: 0;
    margin-bottom: 1.1rem;
    border-top: 1px solid var(--v-line-soft); border-bottom: 1px solid var(--v-line-soft);
    padding: .8rem 0;
}
.vm-r-stat { text-align: left; padding-right: 1rem; border-right: 1px solid var(--v-line-soft); }
.vm-r-stat:last-child { border-right: 0; }
.vm-r-stat b {
    display: block; font-family: var(--v-disp);
    font-size: 1.7rem; font-weight: 600; color: var(--v-accent);
    line-height: 1; font-variant-numeric: tabular-nums;
}
.vm-r-stat span {
    display: block; font-size: .68rem; letter-spacing: .16em;
    text-transform: uppercase; color: var(--v-text-faint); margin-top: 4px;
}
.vm-r-reset {
    display: inline-flex; align-items: center; gap: .5rem;
    background: transparent; border: 1px solid var(--v-line); color: var(--v-text-soft);
    padding: .6rem 1.1rem; border-radius: var(--v-pill);
    font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .2s;
}
.vm-r-reset:hover { border-color: var(--v-accent); color: var(--v-accent); }
.vm-r-reset:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
.vm-r-reset svg { width: 14px; height: 14px; }

/* Lista de misiones — scroll suave */
.vm-r-feed {
    flex: 1; overflow-y: auto; padding: 1.1rem clamp(.85rem,3vw,1.1rem);
    scrollbar-width: thin; scrollbar-color: var(--v-line) transparent;
    overscroll-behavior: contain;
}
.vm-r-feed::-webkit-scrollbar { width: 6px; }
.vm-r-feed::-webkit-scrollbar-thumb { background: var(--v-line); border-radius: 6px; }

/* --- Tarjeta de misión rediseñada --- */
.vm-rc {
    background: var(--v-card); border: 1px solid var(--v-line);
    border-radius: var(--v-r); overflow: hidden; margin-bottom: 1rem;
    transition: border-color .25s, box-shadow .25s, transform .25s var(--v-ease);
}
.vm-rc:hover { transform: translateY(-3px); box-shadow: var(--v-shadow); border-color: var(--v-line-soft); }
.vm-rc.is-open { border-color: var(--v-accent); box-shadow: 0 0 0 1px var(--v-accent-soft), var(--v-shadow); }

.vm-rc-cover {
    position: relative; height: 200px; width: 100%;
    border: 0; padding: 0; cursor: pointer; display: block;
    background: var(--v-card-2); overflow: hidden;
}
.vm-rc-cover img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .8s var(--v-ease), filter .4s;
    filter: saturate(.9);
}
.vm-rc:hover .vm-rc-cover img, .vm-rc.is-open .vm-rc-cover img { transform: scale(1.06); filter: saturate(1.05); }
.vm-rc-cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--v-card) 0%, rgba(20,22,26,.6) 40%, transparent 75%);
}
.vm-rc-tags {
    position: absolute; top: .85rem; left: .85rem; z-index: 2;
    display: flex; gap: .4rem; flex-wrap: wrap;
}
.vm-rc-tag {
    display: inline-flex; align-items: center; gap: .35rem;
    background: rgba(20,22,26,.78); backdrop-filter: blur(8px);
    color: var(--v-text); border: 1px solid rgba(255,255,255,.08);
    font-size: .7rem; font-weight: 600; letter-spacing: .04em;
    padding: .35rem .7rem; border-radius: var(--v-pill);
}
.vm-rc-tag svg { width: 12px; height: 12px; stroke: var(--v-accent); }
.vm-rc-tag.is-accent {
    background: var(--v-accent); color: var(--v-on-accent);
    border-color: var(--v-accent);
}
.vm-rc-tag.is-accent svg { stroke: var(--v-on-accent); }
.vm-rc-cover h3 {
    position: absolute; left: 1rem; right: 1rem; bottom: 1rem; z-index: 2;
    color: var(--v-text); font-family: var(--v-disp); font-weight: 600;
    font-size: 1.4rem; line-height: 1.15; margin: 0;
    text-shadow: 0 2px 18px rgba(0,0,0,.75);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.vm-rc-loc-strip {
    display: flex; align-items: center; gap: .4rem;
    position: absolute; left: 1rem; right: 1rem; bottom: -1.4rem; z-index: 2;
    font-size: .78rem; color: rgba(232,231,228,.85); font-weight: 500;
    text-shadow: 0 1px 6px rgba(0,0,0,.7);
    pointer-events: none;
}
.vm-rc-loc-strip svg { width: 13px; height: 13px; stroke: var(--v-accent); }

/* Barra inferior de acciones */
.vm-rc-bar {
    display: flex; align-items: center; gap: .55rem;
    padding: 1.05rem 1rem .95rem;
    border-top: 1px solid var(--v-line-soft);
}
.vm-rc-bar__sp { flex: 1; }
.vm-rc-act { display: flex; gap: .45rem; align-items: center; }
.vm-ibtn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--v-bg); border: 1px solid var(--v-line);
    border-radius: 10px; color: var(--v-text-soft); cursor: pointer;
    transition: all .18s;
}
.vm-ibtn svg { width: 18px; height: 18px; }
.vm-ibtn:hover { border-color: var(--v-accent); color: var(--v-accent); background: var(--v-accent-soft); }
.vm-ibtn:focus-visible { outline: 2px solid var(--v-accent); outline-offset: 2px; }
.vm-ibtn.is-saved { background: var(--v-accent); border-color: var(--v-accent); color: var(--v-on-accent); }
.vm-pill {
    display: inline-flex; align-items: center; gap: .45rem;
    height: 42px; padding: 0 1.15rem;
    background: linear-gradient(180deg, var(--v-accent-2), var(--v-accent));
    color: var(--v-on-accent);
    border-radius: var(--v-pill); font-size: .85rem; font-weight: 700;
    letter-spacing: .02em; text-decoration: none;
    transition: filter .2s, box-shadow .2s;
    box-shadow: 0 4px 14px var(--v-accent-glow);
}
.vm-pill svg { width: 15px; height: 15px; stroke: currentColor; }
.vm-pill:hover { filter: brightness(1.08); box-shadow: 0 6px 18px var(--v-accent-glow); }
.vm-pill:focus-visible { outline: 2px solid var(--v-text); outline-offset: 2px; }
.vm-expand svg { transition: transform .3s var(--v-ease); }
.vm-rc.is-open .vm-expand svg { transform: rotate(180deg); }

/* Timeline desplegable de paradas */
.vm-rc-pts { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--v-ease); }
.vm-rc.is-open .vm-rc-pts { grid-template-rows: 1fr; }
.vm-rc-pts > div { overflow: hidden; }
.vm-rc-pts__inner {
    padding: .4rem 0 .6rem; position: relative;
    border-top: 1px solid var(--v-line-soft);
}
.vm-rc-pts__inner::before {
    /* Línea vertical naranja del timeline */
    content: ""; position: absolute;
    left: 2.05rem; top: 1.1rem; bottom: 1.1rem;
    width: 2px; background: linear-gradient(to bottom, var(--v-accent), var(--v-accent-soft));
    border-radius: 2px;
}
.vm-pt {
    display: flex; align-items: center; gap: .85rem;
    width: 100%; text-align: left; padding: .7rem 1rem .7rem 1rem;
    border: 0; background: transparent;
    cursor: pointer; transition: background .16s;
    position: relative; z-index: 1;
}
.vm-pt:hover { background: var(--v-accent-soft); }
.vm-pt.is-active { background: var(--v-accent-soft); }
.vm-pt:focus-visible { outline: 2px solid var(--v-accent); outline-offset: -2px; }
.vm-pt__n {
    width: 28px; height: 28px; flex: none; border-radius: 50%;
    background: var(--v-card); border: 2px solid var(--v-accent); color: var(--v-accent);
    display: grid; place-items: center; font-size: .78rem; font-weight: 700;
    position: relative; z-index: 2;
    box-shadow: 0 0 0 4px var(--v-card);
    transition: all .2s;
}
.vm-pt:hover .vm-pt__n, .vm-pt.is-active .vm-pt__n {
    background: var(--v-accent); color: var(--v-on-accent);
    transform: scale(1.06);
    box-shadow: 0 0 0 4px var(--v-card), 0 0 14px var(--v-accent-glow);
}
.vm-pt img {
    width: 48px; height: 48px; flex: none; border-radius: 9px;
    object-fit: cover; border: 1px solid var(--v-line);
    transition: border-color .2s;
}
.vm-pt:hover img, .vm-pt.is-active img { border-color: var(--v-accent); }
.vm-pt__i { flex: 1; min-width: 0; }
.vm-pt__nm { font-weight: 600; font-size: .92rem; color: var(--v-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vm-pt__ad {
    font-size: .78rem; color: var(--v-text-faint);
    display: flex; align-items: center; gap: .3rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 2px;
}
.vm-pt__ad svg { width: 12px; height: 12px; flex: none; stroke: var(--v-text-faint); }
.vm-pt__go {
    flex: none; width: 28px; height: 28px;
    display: grid; place-items: center;
    color: var(--v-text-faint); transition: color .2s, transform .2s;
}
.vm-pt:hover .vm-pt__go, .vm-pt.is-active .vm-pt__go {
    color: var(--v-accent); transform: translateX(2px);
}
.vm-pt__go svg { width: 16px; height: 16px; }

.vm-no-pts {
    padding: 1.1rem; text-align: center; color: var(--v-text-faint);
    font-size: .86rem; font-style: italic;
}
.vm-r-empty { padding: 3.5rem 1.5rem; text-align: center; color: var(--v-text-faint); }
.vm-r-empty svg { width: 42px; height: 42px; stroke: var(--v-line); margin-bottom: .9rem; }
.vm-r-empty p { margin: 0; line-height: 1.6; }

/* --- Mapa --- */
.vm-r-map { position: relative; background: var(--v-card-2); min-height: 0; }
#vm-map { width: 100%; height: 100%; }
.vm-map-badge {
    position: absolute; top: 1.1rem; left: 1.1rem; z-index: 600;
    display: inline-flex; align-items: center; gap: .55rem;
    background: rgba(20,22,26,.86); backdrop-filter: blur(10px);
    border: 1px solid var(--v-line);
    padding: .6rem 1.1rem; border-radius: var(--v-pill);
    font-family: var(--v-disp); font-size: .98rem; font-weight: 600; color: var(--v-text);
    pointer-events: none;
    box-shadow: var(--v-shadow);
}
.vm-map-badge::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--v-accent); box-shadow: 0 0 10px var(--v-accent);
    animation: vPulse 1.7s ease-in-out infinite;
}
@keyframes vPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.6); } }
.vm-route-line { animation: vDash 2s linear infinite; }
@keyframes vDash { to { stroke-dashoffset: -16; } }

/* Popup Leaflet refinado */
.leaflet-popup-content-wrapper {
    background: var(--v-card)!important; color: var(--v-text)!important;
    border: 1px solid var(--v-accent)!important;
    border-radius: var(--v-r-sm)!important;
    box-shadow: 0 0 0 1px var(--v-accent-soft), var(--v-shadow-lg)!important;
    padding: 0!important;
}
.leaflet-popup-content { margin: 0!important; width: 264px!important; }
.leaflet-popup-tip { background: var(--v-card)!important; border: 1px solid var(--v-accent); }
.leaflet-container a.leaflet-popup-close-button {
    color: var(--v-text-soft)!important; font-size: 19px!important;
    top: 7px!important; right: 8px!important; z-index: 20!important;
}
.vm-pc__cover { height: 130px; overflow: hidden; position: relative; }
.vm-pc__cover img { width: 100%; height: 100%; object-fit: cover; }
.vm-pc__cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, var(--v-card) 0%, transparent 60%);
}
.vm-pc__b { padding: .9rem 1rem 1rem; position: relative; }
.vm-pc__op { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--v-accent); font-weight: 700; }
.vm-pc__t { font-family: var(--v-disp); font-size: 1.12rem; font-weight: 600; margin: .3rem 0 .45rem; color: var(--v-text); line-height: 1.2; }
.vm-pc__d { font-size: .82rem; color: var(--v-text-soft); line-height: 1.55; margin: 0 0 .8rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vm-pc__btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    width: 100%; text-align: center;
    background: linear-gradient(180deg, var(--v-accent-2), var(--v-accent));
    color: var(--v-on-accent)!important;
    padding: .65rem 0; border-radius: 8px; font-size: .82rem; font-weight: 700;
    letter-spacing: .02em; text-decoration: none;
}
.vm-pc__btn:hover { filter: brightness(1.1); }

/* Conmutador móvil mapa/lista */
.vm-r-toggle {
    display: none; position: absolute; z-index: 620;
    bottom: 1.1rem; left: 50%; transform: translateX(-50%);
    align-items: center; gap: .55rem;
    background: linear-gradient(180deg, var(--v-accent-2), var(--v-accent));
    color: var(--v-on-accent); border: 0;
    padding: .85rem 1.5rem; border-radius: var(--v-pill);
    font-size: .88rem; font-weight: 700; letter-spacing: .02em;
    box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 4px rgba(255,94,20,.12);
    cursor: pointer;
}
.vm-r-toggle svg { width: 16px; height: 16px; transition: transform .3s var(--v-ease); }

/* Asa visible en bottom-sheet móvil */
.vm-r-handle {
    display: none;
    position: absolute; top: .55rem; left: 50%; transform: translateX(-50%);
    width: 44px; height: 4px; border-radius: 4px;
    background: var(--v-line-soft); z-index: 5;
}

/* Toast */
.vm-toast {
    position: fixed; left: 50%; bottom: 1.6rem;
    transform: translateX(-50%) translateY(180%);
    display: flex; align-items: center; gap: .65rem;
    background: var(--v-card); color: var(--v-text); border: 1px solid var(--v-accent);
    padding: .9rem 1.4rem; border-radius: var(--v-pill);
    box-shadow: var(--v-shadow-lg); font-size: .92rem; font-weight: 500;
    z-index: 100001; pointer-events: none;
    transition: transform .4s var(--v-ease);
    max-width: calc(100vw - 2rem);
}
.vm-toast.is-visible { transform: translateX(-50%) translateY(0); }
.vm-toast svg { width: 17px; height: 17px; stroke: var(--v-accent); flex: none; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (min-width: 980px) {
    #vm-results.is-visible { grid-template-columns: 430px 1fr; }
    .vm-r-panel { border-right: 1px solid var(--v-line); }
}
@media (max-width: 979px) {
    #vm-results.is-visible { grid-template-rows: 1fr; position: relative; }
    .vm-r-map { position: absolute; inset: 0; }
    .vm-r-panel {
        position: absolute; left: 0; right: 0; bottom: 0; z-index: 500;
        height: 64dvh; border-top: 1px solid var(--v-line);
        border-radius: var(--v-r) var(--v-r) 0 0;
        box-shadow: 0 -16px 50px rgba(0,0,0,.6);
        background: var(--v-bg);
        transition: transform .4s var(--v-ease);
    }
    .vm-r-handle { display: block; }
    .vm-r-head { padding-top: 1.25rem; }
    .vm-r-panel.is-collapsed { transform: translateY(calc(100% - 130px)); }
    .vm-r-toggle { display: inline-flex; bottom: calc(64dvh + .9rem); }
    .vm-r-panel.is-collapsed ~ .vm-r-toggle { bottom: 145px; }
    .vm-r-panel.is-collapsed ~ .vm-r-toggle svg { transform: rotate(180deg); }
}
@media (max-width: 560px) {
    .vm-options { grid-template-columns: 1fr; }
    .vm-r-panel { height: 70dvh; }
    .vm-r-panel.is-collapsed { transform: translateY(calc(100% - 118px)); }
    .vm-r-toggle { bottom: calc(70dvh + .9rem); }
}
@media (pointer: coarse) {
    .vm-btn, .vm-ibtn, .vm-pill, .vm-chip span, .vm-dropdown__item,
    .vm-pt, .vm-r-reset, .vm-stepper button { min-height: 46px; }
}

/* Tema claro de Core.css (si la web madre lo fuerza) */
body.light-theme #vm-app, body.light-theme #vm-results {
    --v-bg:#f5f2ec; --v-bg-2:#efeae1; --v-card:#fff; --v-card-2:#faf7f1;
    --v-line:#e3ddd2; --v-line-soft:#ece7dd;
    --v-text:#221f1a; --v-text-soft:#6a655c; --v-text-faint:#9b958a;
    --v-on-accent:#fff;
}