/* =====================================================================
   El Pana: widget flotante + pagina /el-pana/ (estilos compartidos).
   Solo verdes de marca y neutros (scripts/check_colors.py). El rojo de los CTA
   queda reservado a "Reservar": aqui no se usa.
   ===================================================================== */

.pana-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------- Mensajes ----------------------------- */
.pana-log {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pana-turn { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 90px; }
.pana-msg { display: flex; gap: 8px; align-items: flex-start; scroll-margin-top: 90px; }
.pana-msg--user { justify-content: flex-end; }
@media (prefers-reduced-motion: no-preference) {
    .pana-msg, .pana-results, .pana-chips { animation: panaIn .28s ease-out; }
}
@keyframes panaIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.pana-avatar {
    width: 30px; height: 30px;
    flex: 0 0 30px;
    border-radius: 50%;
    background: var(--gp-primary, #2c8a3e);
    display: inline-flex; align-items: center; justify-content: center;
    margin-top: 2px;
}
.pana-avatar svg, .pana-avatar img { width: 60%; height: 60%; object-fit: contain; display: block; }

.pana-bubble {
    max-width: 88%;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 11px 15px;
    border-radius: 4px 18px 18px 18px;
    font-size: .92rem;
    line-height: 1.55;
    color: var(--gp-text, #0f1e1a);
    background: var(--gp-bg, #fff);
    border: 1px solid var(--gp-border, #e8eaed);
}
.pana-bubble p { margin: 0; }
.pana-bubble ul { margin: 6px 0; padding-left: 20px; }
.pana-bubble li { margin: 2px 0; }
.pana-bubble strong { font-weight: 600; }
.pana-msg--user .pana-bubble {
    background: var(--gp-primary-dark, #205f2c);
    border-color: var(--gp-primary-dark, #205f2c);
    color: #fff;
    border-radius: 18px 4px 18px 18px;
    max-width: 80%;
}

/* Mencion [Nombre](/restaurantes/slug/): resaltada, lleva a su tarjeta. */
.pana-mention {
    color: var(--gp-primary-dark, #205f2c);
    background: var(--gp-primary-light, #eaf5ec);
    font-weight: 600;
    padding: 0 4px;
    border-radius: var(--gp-radius-xs, 4px);
    text-decoration: none;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}
.pana-mention:hover { text-decoration: underline; color: var(--gp-primary-dark, #205f2c); }
.pana-mention:focus-visible, .pana-root a:focus-visible, .pana-root button:focus-visible {
    outline: 2px solid var(--gp-primary, #2c8a3e);
    outline-offset: 2px;
}

/* Cargando */
.pana-bubble--thinking { display: inline-flex; align-items: center; gap: 10px; color: var(--gp-text-secondary, #5a5a72); font-size: .86rem; }
.pana-dots { display: inline-flex; gap: 4px; }
.pana-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--gp-primary, #2c8a3e); opacity: .4; }
@media (prefers-reduced-motion: no-preference) {
    .pana-dots i { animation: panaDot 1.2s ease-in-out infinite; }
    .pana-dots i:nth-child(2) { animation-delay: .15s; }
    .pana-dots i:nth-child(3) { animation-delay: .3s; }
}
@keyframes panaDot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.pana-skeletons { display: flex; gap: 10px; padding-left: 38px; overflow: hidden; }
.pana-skel {
    flex: 0 0 min(220px, 60%);
    height: 150px;
    border-radius: var(--gp-radius-lg, 14px);
    background: linear-gradient(90deg, var(--gp-border-light, #f0f1f3) 25%, var(--gp-bg-gray, #f7faf8) 50%, var(--gp-border-light, #f0f1f3) 75%);
    background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
    .pana-skel { animation: panaShimmer 1.4s linear infinite; }
}
@keyframes panaShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Error honesto */
.pana-bubble--error {
    background: var(--gp-gold-light, #fdf3e0);
    border-color: var(--gp-gold-border, #f3ddb0);
}
.pana-retry {
    margin-top: 10px;
    min-height: 40px;
    padding: 8px 18px;
    border-radius: var(--gp-radius-full, 999px);
    border: 1.5px solid var(--gp-primary-dark, #205f2c);
    background: var(--gp-bg, #fff);
    color: var(--gp-primary-dark, #205f2c);
    font-weight: 600;
    font-size: .86rem;
    cursor: pointer;
}
.pana-retry:hover { background: var(--gp-primary-light, #eaf5ec); }

/* ------------------------------ Chips ------------------------------ */
.pana-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 38px; }
.pana-chip {
    min-height: 40px;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 8px 14px;
    border-radius: var(--gp-radius-full, 999px);
    border: 1px solid var(--gp-border, #e8eaed);
    background: var(--gp-bg, #fff);
    color: var(--gp-text, #0f1e1a);
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    text-align: left;
    transition: border-color var(--gp-transition-fast, 150ms ease), background var(--gp-transition-fast, 150ms ease);
}
.pana-chip:hover { border-color: var(--gp-primary, #2c8a3e); background: var(--gp-primary-light, #eaf5ec); color: var(--gp-primary-dark, #205f2c); }
.pana-chip--followup { background: var(--gp-primary-light, #eaf5ec); border-color: transparent; color: var(--gp-primary-dark, #205f2c); }
.pana-chip--followup:hover { border-color: var(--gp-primary, #2c8a3e); }
.pana-chip--geo { border-style: dashed; color: var(--gp-primary-dark, #205f2c); }
.pana-chip--geo.is-on { border-style: solid; border-color: var(--gp-primary, #2c8a3e); background: var(--gp-primary-light, #eaf5ec); }
.pana-chip:disabled { cursor: default; opacity: .8; }

/* ----------------------------- Tarjetas ----------------------------- */
.pana-results { padding-left: 38px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pana-cards {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 6px;
    margin: 0 -2px;
    scrollbar-width: thin;
}
.pana-card {
    background: var(--gp-bg, #fff);
    border: 1px solid var(--gp-border, #e8eaed);
    border-radius: var(--gp-radius-lg, 14px);
    color: var(--gp-text, #0f1e1a);
    overflow: hidden;
    transition: box-shadow var(--gp-transition, 200ms ease), border-color var(--gp-transition, 200ms ease);
    scroll-margin: 12px;
}
.pana-card:hover { box-shadow: var(--gp-shadow-md, 0 4px 12px rgba(0,0,0,.08)); }
.pana-card:focus { outline: none; }
.pana-card:focus-visible, .pana-card.is-flash {
    border-color: var(--gp-primary, #2c8a3e);
    box-shadow: 0 0 0 3px var(--gp-primary-light, #eaf5ec);
}
.pana-card--featured {
    flex: 0 0 78%;
    max-width: 300px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}
.pana-cards--single .pana-card--featured { flex-basis: 100%; max-width: 100%; }

.pana-card__media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--gp-primary-light, #eaf5ec);
    border-bottom: 1px solid var(--gp-border-light, #f0f1f3);
    overflow: hidden;
}
.pana-card__media img, .pana-card__thumb img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}
.pana-card__fallback {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 20% 25%, rgba(44,138,62,.10) 0 18%, transparent 19%),
        radial-gradient(circle at 80% 80%, rgba(44,138,62,.10) 0 22%, transparent 23%),
        var(--gp-primary-light, #eaf5ec);
    color: var(--gp-primary, #2c8a3e);
}
.pana-card__fallback svg { position: absolute; width: 56%; height: 56%; max-width: 88px; fill: none; stroke: currentColor; stroke-width: 1; opacity: .35; }
.pana-card__initial { position: relative; font-weight: 700; font-size: 1.5rem; color: var(--gp-primary-dark, #205f2c); }

.pana-card__body { padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 auto; }
.pana-card__name { margin: 0; font-size: .98rem; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.pana-card__name a {
    color: inherit; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pana-card__name a:hover { color: var(--gp-primary-dark, #205f2c); text-decoration: underline; }
.pana-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .8rem; color: var(--gp-text-secondary, #5a5a72); }
.pana-rating {
    display: inline-flex; align-items: center; gap: 3px;
    background: var(--gp-primary-dark, #205f2c);
    color: #fff;
    font-weight: 700;
    font-size: .76rem;
    padding: 1px 7px 1px 5px;
    border-radius: var(--gp-radius-xs, 4px);
}
.pana-rating svg { width: 11px; height: 11px; fill: currentColor; }
.pana-count { margin-left: -4px; }
.pana-price { font-weight: 600; color: var(--gp-text, #0f1e1a); letter-spacing: .02em; }
.pana-open { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: .76rem; }
.pana-open::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pana-open--yes { color: var(--gp-primary-dark, #205f2c); }
.pana-open--no { color: var(--gp-text-secondary, #5a5a72); }
.pana-card__place { font-size: .8rem; color: var(--gp-text-secondary, #5a5a72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pana-card__reason {
    margin: 2px 0 0;
    font-size: .82rem;
    line-height: 1.4;
    color: var(--gp-text, #0f1e1a);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pana-card__reason span { color: var(--gp-primary-dark, #205f2c); font-weight: 600; }

.pana-card__actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; }
.pana-act {
    flex: 1 1 auto;
    min-height: 40px;
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    padding: 6px 10px;
    border-radius: var(--gp-radius-md, 10px);
    border: 1px solid var(--gp-border, #e8eaed);
    background: var(--gp-bg, #fff);
    color: var(--gp-text, #0f1e1a);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.pana-act svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.pana-act:hover { text-decoration: none; border-color: var(--gp-primary, #2c8a3e); color: var(--gp-primary-dark, #205f2c); background: var(--gp-primary-light, #eaf5ec); }
.pana-act--wa { background: var(--gp-primary-dark, #205f2c); border-color: var(--gp-primary-dark, #205f2c); color: #fff; }
.pana-act--wa:hover { background: var(--gp-primary, #2c8a3e); border-color: var(--gp-primary, #2c8a3e); color: #fff; }

/* Compactas: los no citados en el texto */
.pana-more { display: flex; flex-direction: column; gap: 6px; }
.pana-more__title { margin: 2px 0 0; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--gp-text-secondary, #5a5a72); }
.pana-card--compact { display: flex; align-items: center; gap: 10px; padding: 8px; }
.pana-card__thumb {
    position: relative;
    flex: 0 0 56px; width: 56px; height: 56px;
    border-radius: var(--gp-radius-md, 10px);
    overflow: hidden;
    background: var(--gp-primary-light, #eaf5ec);
}
.pana-card__thumb .pana-card__initial { font-size: 1.1rem; }
.pana-card--compact .pana-card__body { padding: 0; gap: 3px; }
.pana-card--compact .pana-card__name { font-size: .88rem; }
.pana-card--compact .pana-card__name a { -webkit-line-clamp: 1; }
.pana-card__place-inline { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ----------------------------- Feedback ----------------------------- */
.pana-fb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-left: 38px; font-size: .8rem; color: var(--gp-text-secondary, #5a5a72); }
.pana-fb__label { margin-right: 2px; }
.pana-fb__btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    filter: grayscale(1);
    opacity: .75;
}
.pana-fb__btn:hover, .pana-fb__btn[aria-expanded="true"] { filter: none; opacity: 1; background: var(--gp-primary-light, #eaf5ec); }
.pana-fb__reasons { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.pana-fb__ask { font-weight: 600; color: var(--gp-text, #0f1e1a); margin-right: 2px; }
.pana-chip--reason { min-height: 36px; padding: 6px 12px; font-size: .8rem; }
.pana-fb__thanks { color: var(--gp-primary-dark, #205f2c); font-weight: 500; }

/* ----------------------------- Composer ----------------------------- */
.pana-composer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 16px;
    background: var(--gp-bg, #fff);
    border: 1.5px solid var(--gp-border, #e8eaed);
    border-radius: var(--gp-radius-full, 999px);
    transition: border-color var(--gp-transition-fast, 150ms ease);
}
.pana-composer:focus-within { border-color: var(--gp-primary, #2c8a3e); box-shadow: 0 0 0 3px var(--gp-primary-light, #eaf5ec); }
.pana-composer__input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 1rem; /* >=16px: iOS no hace zoom al enfocar */
    color: var(--gp-text, #0f1e1a);
    padding: 8px 0;
}
.pana-composer__input::placeholder { color: var(--gp-text-muted, #8e8ea0); }
.pana-composer__send {
    flex: 0 0 44px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--gp-primary, #2c8a3e);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.pana-composer__send:hover { background: var(--gp-primary-dark, #205f2c); }
.pana-composer__send:disabled { opacity: .5; cursor: not-allowed; }
.pana-composer__send svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.pana-undo {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-bottom: 8px;
    padding: 8px 8px 8px 14px;
    border-radius: var(--gp-radius-md, 10px);
    background: var(--gp-text, #0f1e1a);
    color: #fff;
    font-size: .85rem;
}
.pana-undo__btn {
    min-height: 36px;
    padding: 4px 12px;
    border: 0; border-radius: var(--gp-radius-sm, 6px);
    background: transparent;
    color: var(--gp-primary-on-dark, #6db33f);
    font-weight: 700;
    cursor: pointer;
}
.pana-undo__btn:hover { background: rgba(255,255,255,.08); }

.pana-iconbtn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-width: 40px; height: 40px;
    padding: 0 10px;
    border-radius: var(--gp-radius-full, 999px);
    border: 0;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}
.pana-iconbtn:hover { background: rgba(255,255,255,.26); }
.pana-iconbtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pana-iconbtn[hidden] { display: none; }

/* =========================== Botón flotante =========================== */
.pana-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9998;
    display: flex;
    align-items: center;
}
.pana-fab__label {
    background: var(--gp-bg, #fff);
    color: var(--gp-text, #0f1e1a);
    font-size: .82rem;
    font-weight: 600;
    padding: 7px 18px 7px 14px;
    margin-right: -12px;
    border-radius: var(--gp-radius-full, 999px) 0 0 var(--gp-radius-full, 999px);
    box-shadow: var(--gp-shadow-md, 0 4px 12px rgba(0,0,0,.08));
    white-space: nowrap;
    pointer-events: none;
}
.pana-fab.is-open .pana-fab__label { display: none; }
.pana-fab__btn {
    position: relative;
    width: 56px; height: 56px;
    border-radius: 50%;
    border: 0;
    background: var(--gp-primary-dark, #205f2c);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(32, 95, 44, .35), 0 1px 3px rgba(0,0,0,.12);
    cursor: pointer;
    transition: transform var(--gp-transition, 200ms ease), background var(--gp-transition, 200ms ease);
}
.pana-fab__btn:hover { background: var(--gp-primary, #2c8a3e); transform: scale(1.05); }
.pana-fab__btn:focus-visible { outline: 3px solid var(--gp-primary-on-dark, #6db33f); outline-offset: 3px; }
.pana-fab__btn svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pana-fab__icon-close { display: none; }
.pana-fab.is-open .pana-fab__icon-open { display: none; }
.pana-fab.is-open .pana-fab__icon-close { display: block; }

/* =========================== Widget flotante ===========================
   Popover compacto: la altura la da el contenido (sin zona de chat vacia). */
.pana-chat {
    --pa-green: var(--gp-primary-dark, #205f2c);
    --pa-ink: #1A1A2E;
    --pa-soft: #5A5A72;
    --pa-cream: #F4EEE3;
    --pa-sand: #E6DCCB;
    position: fixed;
    right: 20px;
    bottom: 88px;
    z-index: 9999;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    box-sizing: border-box;
    font-family: 'Poppins', var(--gp-font, sans-serif);
    color: var(--pa-ink);
    background: var(--pa-cream);
    border: 2px solid var(--pa-ink);
    border-radius: 16px;
    box-shadow: 6px 6px 0 var(--pa-ink);
    opacity: 0;
    transform: translateY(12px) scale(.98);
    transition: opacity .22s ease, transform .22s ease;
}
.pana-chat.is-open { opacity: 1; transform: none; }
.pana-chat[hidden] { display: none; }
.pana-chat__head { display: flex; align-items: center; gap: 10px; }
.pana-chat .pana-chat__head .pana-avatar {
    width: 34px; height: 34px; flex: 0 0 34px; margin: 0;
    background: var(--pa-green);
    border: 1.5px solid var(--pa-ink);
    box-shadow: 2px 2px 0 var(--pa-green);
}
.pana-chat .pana-avatar svg circle:first-child { fill: var(--pa-cream); stroke: none; }
.pana-chat .pana-avatar svg circle:not(:first-child), .pana-chat .pana-avatar svg path { fill: var(--pa-green); stroke: none; }
.pana-chat__title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.25; color: var(--pa-ink); }
.pana-chat .pana-iconbtn {
    flex: 0 0 auto; min-width: 36px; height: 36px; padding: 0;
    background: #FFFFFF; color: var(--pa-ink);
    border: 1.5px solid var(--pa-ink);
}
.pana-chat .pana-iconbtn:hover { background: var(--pa-sand); }
.pana-chat__lead { margin: 0; font-size: .85rem; line-height: 1.45; color: var(--pa-soft); }
.pana-chat .pana-composer {
    padding: 4px 4px 4px 14px;
    background: #FFFFFF;
    border: 2px solid var(--pa-ink);
}
.pana-chat .pana-composer:focus-within { border-color: var(--pa-ink); box-shadow: 0 0 0 3px var(--gp-primary-light, #eaf5ec); }
.pana-chat .pana-composer__input { font-family: inherit; }
.pana-chat .pana-composer__send { flex-basis: 40px; width: 40px; height: 40px; background: var(--pa-green); }
.pana-chat .pana-composer__send:hover { background: var(--gp-primary, #2c8a3e); }
.pana-chat .pana-chips { padding-left: 0; gap: 6px; }
.pana-chat .pana-chip {
    min-height: 32px; padding: 5px 11px;
    font-family: inherit; font-size: .78rem; font-weight: 500;
    background: #FFFFFF; color: var(--pa-ink);
    border: 1.5px solid var(--pa-ink);
}
.pana-chat .pana-chip:hover { background: var(--pa-sand); border-color: var(--pa-ink); color: var(--pa-ink); }
.pana-chat__hint { margin: 0; font-size: .7rem; line-height: 1.4; color: var(--pa-soft); }

@media (max-width: 600px) {
    .pana-fab { right: 14px; bottom: 14px; }
    .pana-fab__label { display: none; }
    .pana-chat {
        /* Hoja inferior: por encima del header fijo del sitio (z 99999). */
        z-index: 100000;
        inset: auto 0 0 0;
        width: 100%;
        max-width: none;
        max-height: 90vh;
        max-height: 90dvh;
        padding: 16px 16px max(16px, env(safe-area-inset-bottom));
        border-width: 2px 0 0;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 0 var(--pa-ink);
    }
    html.pana-widget-open .pana-fab { display: none; }
}

/* ============================ Pagina /el-pana/ ============================
   Maquetas: docs/superpowers/specs/2026-11-20-el-pana-nuevo/Pana.dc.html (escritorio,
   tres columnas) y PanaMovil.dc.html (movil: una columna, historial y panel en cajones).
   El verde de la maqueta (00584B) se traduce al verde de marca --gp-primary-dark, como
   en home-v2.css (la maqueta traia la paleta vieja; scripts/check_colors.py). */
.pana-pagina #toTop { display: none !important; } /* caeria encima del boton de enviar */
/* La pagina es una app a pantalla completa: sin pie del sitio (asomaba una franja y en
   movil habia dos barras de desplazamiento). Los enlaces del pie siguen en el resto del sitio. */
.pana-pagina > footer { display: none; }

/* Cabecera del sitio en /el-pana/ (solo con .pana-pagina): a todo lo ancho, con el mismo
   margen que las columnas (logo alineado con el historial, cuenta con el panel derecho),
   ~56 px de alto y la navegacion de la maqueta en el centro. En movil, la cabecera normal. */
.gp-header-nav { display: none; }
@media (min-width: 1101px) {
    .pana-pagina header.header_in { padding: 0; height: 56px; box-sizing: border-box; }
    .pana-pagina header.header_in > .container {
        max-width: none !important; /* style.css fija 1280px con !important */
        width: 100%; height: 100%;
        padding: 0 18px 0 16px; /* gutter del historial (16) y del panel (18) */
        margin: 0;
        position: relative;
    }
    .pana-pagina header.header_in #logo { display: flex; align-items: center; height: 100%; margin: 0; padding: 0; }
    .pana-pagina header.header_in #logo a { display: flex; align-items: center; }
    .pana-pagina header.header_in #logo .logo_normal { height: 30px; width: auto; display: block; margin: 0; }
    .pana-pagina header.header_in #logo .logo_sticky { display: none; } /* misma imagen; aqui no hay estado pegado */
    .pana-pagina .gp-header-nav {
        display: flex; align-items: center; gap: 28px;
        position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
        font-family: 'Poppins', var(--gp-font, sans-serif);
        font-size: 14px; font-weight: 500;
    }
    .pana-pagina .gp-header-nav a { color: #1A1A2E; text-decoration: none; white-space: nowrap; }
    .pana-pagina .gp-header-nav a:hover { color: var(--gp-primary-dark, #205f2c); }
    .pana-pagina .gp-header-nav .gp-header-nav__rest { color: var(--gp-primary-dark, #205f2c); font-weight: 600; }
}

.pana-app {
    --pa-green: var(--gp-primary-dark, #205f2c);
    --pa-accent: var(--gp-primary, #2c8a3e);
    --pa-ink: #1A1A2E;
    --pa-soft: #5A5A72;
    --pa-cream: #F4EEE3;
    --pa-sand: #E6DCCB;
    --pa-line: #EFE7DA;
    --pa-photo: #EDE3D3;
    --pa-gold: #F5A623;
    position: relative;
    font-family: 'Poppins', var(--gp-font, sans-serif);
    color: var(--pa-ink);
    background: #FFFFFF;
    border-top: 1px solid var(--pa-line);
}
.pana-app__body {
    display: grid;
    grid-template-columns: 288px minmax(0, 1fr) 320px;
    /* --pana-head lo mide el-pana.js (la cabecera cambia con sesion y en movil). */
    height: calc(100vh - var(--pana-head, 77px) - 1px); /* 1px: borde superior de .pana-app */
    height: calc(100dvh - var(--pana-head, 77px) - 1px);
    min-height: 640px;
}
.pana-app svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pana-app a { text-decoration: none; }
.pana-app [hidden] { display: none !important; }
.pana-solo-movil { display: none !important; }

/* Botones redondos de icono */
.pana-ib {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--pa-ink);
    background: #FFFFFF;
    color: var(--pa-ink);
    cursor: pointer;
    padding: 0;
}
.pana-ib:hover { color: var(--pa-ink); background: var(--pa-cream); }

/* ---------- Columna izquierda ---------- */
.pana-side {
    background: var(--pa-cream);
    border-right: 2px solid var(--pa-ink);
    display: flex; flex-direction: column; gap: 18px;
    padding: 20px 16px;
    overflow: auto;
    min-height: 0;
}
.pana-newchat {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px;
    border-radius: 14px;
    background: var(--pa-green);
    color: #FFFFFF;
    font: inherit; font-weight: 700; font-size: 15px;
    border: 2px solid var(--pa-ink);
    box-shadow: 4px 4px 0 var(--pa-ink);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.pana-newchat:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--pa-ink); }
.pana-sfind {
    display: flex; align-items: center; gap: 8px;
    min-height: 42px; margin: 0;
    padding: 0 12px;
    border-radius: 12px;
    background: #FFFFFF;
    border: 1.5px solid var(--pa-sand);
    color: var(--pa-soft);
    font-size: 14px;
}
.pana-sfind input { border: none; outline: none; background: transparent; font: inherit; flex: 1; min-width: 0; color: var(--pa-ink); }
.pana-hist { display: flex; flex-direction: column; gap: 4px; }
.pana-hist__vacio, .pana-ctx__vacio { margin: 0; font-size: 13px; line-height: 1.45; color: var(--pa-soft); }
.pana-hist__vacio { padding: 4px 6px; }
.pana-glabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pa-soft); margin: 4px 6px 0; }
.pana-conv {
    display: flex; align-items: center; gap: 10px;
    padding: 10px;
    border-radius: 12px;
    color: var(--pa-ink);
    border: 1.5px solid transparent;
    background: transparent;
    font: inherit; text-align: left;
    cursor: pointer;
    transition: background .2s ease;
}
.pana-conv:hover { color: var(--pa-ink); background: #FFFFFF; }
.pana-conv.is-on { background: #FFFFFF; border-color: var(--pa-ink); box-shadow: 3px 3px 0 var(--pa-green); }
.pana-conv b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pana-conv small { display: block; font-size: 12px; color: var(--pa-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pana-hist--invitar {
    gap: 8px;
    padding: 16px;
    border-radius: 16px;
    border: 1.5px dashed var(--pa-green);
    background: #FFFFFF;
}
.pana-hist__titulo { margin: 0; font-size: 14px; font-weight: 700; line-height: 1.35; }
.pana-hist__texto { margin: 0; font-size: 13px; line-height: 1.45; color: var(--pa-soft); }
.pana-hist__entrar {
    align-self: flex-start;
    display: inline-flex; align-items: center;
    min-height: 40px; padding: 0 18px; margin-top: 4px;
    border-radius: 999px;
    border: 2px solid var(--pa-ink);
    background: #FFFFFF;
    color: var(--pa-ink);
    font-size: 14px; font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease;
}
.pana-hist__entrar:hover { color: var(--pa-ink); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--pa-ink); }
.pana-wacard {
    margin-top: auto;
    padding: 16px;
    border-radius: 16px;
    background: #FFFFFF;
    border: 2px solid var(--pa-ink);
    display: flex; flex-direction: column; gap: 8px;
}
.pana-wacard__titulo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.pana-wacard__titulo svg { color: var(--pa-green); }
.pana-wacard__texto { font-size: 13px; color: var(--pa-soft); line-height: 1.45; }
.pana-wacard__link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--pa-green); }
.pana-wacard__link:hover { color: var(--pa-ink); }

/* ---------- Centro: chat ---------- */
.pana-chatcol { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #FFFFFF; }
.pana-chathead {
    flex: none;
    display: flex; align-items: center; gap: 12px;
    padding: 14px 24px;
    border-bottom: 1.5px solid var(--pa-line);
}
.pana-ava {
    position: relative; flex: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--pa-green);
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--pa-ink);
    box-shadow: 2px 2px 0 var(--pa-green);
}
.pana-ava img { width: 58%; height: 58%; object-fit: contain; display: block; }
.pana-ava__dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--pa-accent); border: 2px solid #FFFFFF; }
.pana-chathead__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pana-chathead__txt h1 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--pa-ink); }
.pana-chathead__txt small { font-size: 12px; color: var(--pa-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pana-app .pana-mchips { display: none; } /* gana a .pana-tags: solo en movil */
.pana-scrollbox { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.pana-thread {
    max-width: 860px; width: 100%;
    margin: 0 auto;
    padding: 28px 24px 12px;
    box-sizing: border-box;
    gap: 18px;
}

/* Mensajes (render actual de el-pana-render.js) con el aspecto de la maqueta */
.pana-app .pana-msg { gap: 12px; }
.pana-app .pana-avatar {
    width: 34px; height: 34px; flex-basis: 34px;
    background: var(--pa-green);
    border: 1.5px solid var(--pa-ink);
    box-shadow: 2px 2px 0 var(--pa-green);
}
.pana-app .pana-avatar svg circle:first-child { fill: var(--pa-cream); stroke: none; }
.pana-app .pana-avatar svg circle:not(:first-child), .pana-app .pana-avatar svg path { fill: var(--pa-green); stroke: none; }
.pana-app .pana-bubble {
    max-width: 640px;
    padding: 14px 18px;
    border: 0;
    border-radius: 6px 20px 20px 20px;
    background: var(--pa-cream);
    color: var(--pa-ink);
    font-size: 15px;
    line-height: 1.55;
}
.pana-app .pana-msg--user .pana-bubble {
    background: var(--pa-green);
    color: #FFFFFF;
    font-weight: 500;
    border-radius: 20px 20px 6px 20px;
}
.pana-app .pana-mention {
    color: var(--pa-green);
    background: #FFFFFF;
    border: 1.5px solid var(--pa-green);
    border-radius: 8px;
    padding: 0 6px;
    font-weight: 700;
}

/* Escritorio: tarjetas grandes en lista vertical, foto a la izquierda. */
@media (min-width: 768px) {
    .pana-app .pana-cards { flex-direction: column; overflow: visible; scroll-snap-type: none; }
    .pana-app .pana-card--featured { flex: 1 1 auto; max-width: none; display: grid; grid-template-columns: 220px 1fr; grid-template-rows: 1fr auto; }
    .pana-app .pana-card--featured .pana-card__media { grid-row: 1 / span 2; aspect-ratio: auto; min-height: 150px; border-bottom: 0; border-right: 1px solid var(--gp-border-light, #f0f1f3); }
    .pana-app .pana-card--featured .pana-card__actions { justify-content: flex-start; }
    .pana-app .pana-card--featured .pana-act { flex: 0 0 auto; }
    .pana-app .pana-more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .pana-app .pana-more__title { grid-column: 1 / -1; }
}

/* Muro de registro */
.pana-muro {
    max-width: 812px;
    width: calc(100% - 48px); /* mismo margen que el hilo; deja ver la sombra */
    margin: 4px auto 20px;
    padding: 20px;
    border-radius: 18px;
    border: 2px solid var(--pa-ink);
    box-shadow: 6px 6px 0 var(--pa-green);
    background: var(--pa-cream);
    display: flex; flex-direction: column; gap: 14px;
    box-sizing: border-box;
}
.pana-muro__texto { margin: 0; font-size: 15px; line-height: 1.55; font-weight: 500; }
.pana-muro__acciones { display: flex; flex-wrap: wrap; gap: 10px; }
.pana-muro__btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 0 22px;
    border-radius: 999px;
    border: 2px solid var(--pa-ink);
    font-size: 15px; font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease;
}
.pana-muro__btn--entrar { background: var(--pa-green); color: #FFFFFF; }
.pana-muro__btn--crear { background: #FFFFFF; color: var(--pa-ink); }
.pana-muro__btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--pa-ink); }
.pana-muro__btn--entrar:hover { color: #FFFFFF; }
.pana-muro__btn--crear:hover { color: var(--pa-ink); }
.pana-muro__btn[hidden], .pana-muro__texto[hidden] { display: none; }

/* Caja de texto */
.pana-composer-wrap { flex: none; padding: 12px 24px 16px; border-top: 1.5px solid var(--pa-line); background: #FFFFFF; }
.pana-cbox {
    max-width: 812px;
    margin: 0 auto;
    display: flex; align-items: center; gap: 8px;
    padding: 6px 6px 6px 8px;
    border-radius: 999px;
    border: 2px solid var(--pa-ink);
    box-shadow: 4px 4px 0 var(--pa-ink);
    background: #FFFFFF;
}
.pana-cbox:focus-within { box-shadow: 4px 4px 0 var(--pa-green); }
.pana-cloc {
    flex: none;
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 38px; padding: 0 12px;
    border-radius: 999px;
    background: var(--pa-cream);
    color: var(--pa-ink);
    font: inherit; font-size: 13px; font-weight: 600;
    border: none;
    cursor: pointer;
}
.pana-cbox__input {
    flex: 1; min-width: 0;
    padding-left: 10px;
    border: none; outline: none;
    font: inherit; font-size: 15px;
    color: var(--pa-ink);
    background: transparent;
}
.pana-cbox__input::placeholder { color: var(--pa-soft); }
.pana-cbox__input:disabled { cursor: not-allowed; }
.pana-cbox__send {
    flex: none;
    width: 46px; height: 46px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--pa-green);
    border: none;
    color: #FFFFFF;
    cursor: pointer;
}
.pana-cbox__send:disabled { opacity: .5; cursor: not-allowed; }
.pana-disc { max-width: 812px; margin: 8px auto 0; font-size: 11px; line-height: 1.45; color: var(--pa-soft); text-align: center; }

/* ---------- Columna derecha ---------- */
.pana-ctx {
    border-left: 1.5px solid var(--pa-line);
    padding: 20px 18px;
    overflow: auto;
    min-height: 0;
    display: flex; flex-direction: column; gap: 22px;
    background: #FFFFFF;
}
.pana-ctx__bloque { display: flex; flex-direction: column; gap: 12px; }
.pana-ctx__h { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pa-soft); }
.pana-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.pana-tag {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 34px; padding: 0 6px 0 12px;
    border-radius: 999px;
    background: var(--pa-cream);
    border: 1.5px solid var(--pa-ink);
    font-size: 13px; font-weight: 600;
    color: var(--pa-ink);
}
.pana-tag em { font-style: normal; font-weight: 500; color: var(--pa-soft); }
.pana-tag button {
    width: 22px; height: 22px; padding: 0;
    border-radius: 50%; border: none;
    background: #FFFFFF; color: var(--pa-ink);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.pana-addtag {
    align-self: flex-start;
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 34px; padding: 0 12px;
    border-radius: 999px;
    border: 1.5px dashed var(--pa-green);
    color: var(--pa-green);
    font: inherit; font-size: 13px; font-weight: 600;
    background: #FFFFFF;
    cursor: pointer;
}
.pana-tgl {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin: 0;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    position: relative;
}
.pana-tgl__input { position: absolute; opacity: 0; width: 44px; height: 26px; right: 0; margin: 0; cursor: pointer; }
.pana-sw {
    width: 44px; height: 26px;
    border-radius: 999px;
    background: var(--pa-sand);
    position: relative; flex: none;
    border: 1.5px solid var(--pa-ink);
    transition: background .2s ease;
}
.pana-sw::after {
    content: "";
    position: absolute; left: 3px; top: 3px;
    width: 17px; height: 17px;
    border-radius: 50%;
    background: #FFFFFF;
    transition: transform .2s ease;
}
.pana-tgl__input:checked + .pana-sw { background: var(--pa-green); }
.pana-tgl__input:checked + .pana-sw::after { transform: translateX(18px); }
.pana-tgl__input:focus-visible + .pana-sw { outline: 2px solid var(--pa-accent); outline-offset: 2px; }
.pana-map {
    position: relative;
    height: 220px;
    border-radius: 16px;
    border: 2px solid var(--pa-ink);
    overflow: hidden;
    background-color: var(--gp-primary-light, #eaf5ec);
    background-image: linear-gradient(#FFFFFF 2px, transparent 2px), linear-gradient(90deg, #FFFFFF 2px, transparent 2px);
    background-size: 38px 38px;
    z-index: 0;
}
.pana-map__vacio {
    position: absolute; left: 12px; right: 12px; bottom: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #FFFFFF;
    font-size: 12px; line-height: 1.4;
    color: var(--pa-soft);
}
.pana-map__leyenda { font-size: 12px; color: var(--pa-soft); }
.pana-map__leyenda:empty { display: none; }
.pana-guardados { display: flex; flex-direction: column; gap: 10px; }
.pana-mini {
    display: flex; align-items: center; gap: 10px;
    padding: 8px;
    border-radius: 14px;
    border: 1.5px solid var(--pa-sand);
    background: #FFFFFF;
    color: var(--pa-ink);
    min-width: 0;
    transition: border-color .2s ease;
}
.pana-mini:hover { color: var(--pa-ink); border-color: var(--pa-ink); }
.pana-mini img { width: 52px; height: 52px; border-radius: 10px; flex: none; display: block; object-fit: cover; background: var(--pa-photo); }
.pana-mini b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pana-mini small { display: block; font-size: 12px; color: var(--pa-soft); }

.pana-velo { display: none; }
.pana-turnstile { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 100002; }

/* ---------- Iconos de los chips (sustituyen a los emojis) ---------- */
.pana-chip__ico { display: inline-flex; flex: none; color: var(--gp-primary-dark, #205f2c); }
.pana-chip__ico svg { width: 16px; height: 16px; display: block; fill: none; stroke: currentColor; }

/* ---------- Tarjetas de la pagina (Pana.dc.html) ---------- */
.pana-app .pana-results--page { padding-left: 46px; gap: 12px; }
.pana-resgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pana-resgrid--single { grid-template-columns: minmax(0, 1fr); max-width: 420px; }
/* Varias tarjetas: carrusel horizontal (2 a la vista y asoma la siguiente) con flechas. */
.pana-carousel { position: relative; min-width: 0; }
.pana-carousel > .pana-resgrid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 2px 2px 8px; scrollbar-width: none;
}
.pana-carousel > .pana-resgrid::-webkit-scrollbar { display: none; }
.pana-carousel > .pana-resgrid > .pana-res { flex: 0 0 calc((100% - 28px) / 2.3); scroll-snap-align: start; }
.pana-carousel__nav {
    position: absolute; top: 96px; z-index: 2;
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #FFFFFF; color: var(--pa-ink); border: 2px solid var(--pa-ink);
    box-shadow: 2px 2px 0 var(--pa-ink); cursor: pointer;
    transition: opacity .15s ease, transform .15s ease;
}
.pana-carousel__nav:hover { transform: translateY(-1px); }
.pana-carousel__nav:disabled { opacity: 0; pointer-events: none; }
.pana-carousel__nav--prev { left: -12px; }
.pana-carousel__nav--next { right: -12px; }
.pana-res {
    display: flex; flex-direction: column;
    background: #FFFFFF;
    border: 2px solid var(--pa-ink);
    border-radius: 18px;
    overflow: hidden;
    min-width: 0;
    transition: transform .2s ease, box-shadow .2s ease;
}
.pana-res:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--pa-green); }
.pana-res.is-flash { box-shadow: 0 0 0 3px var(--pa-accent); }
.pana-res__img { position: relative; aspect-ratio: 16 / 9; background: var(--pa-photo); overflow: hidden; }
.pana-res__img img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.pana-res__img .pana-card__fallback { position: absolute; inset: 0; }
.pana-res__img:not(.is-fallback) .pana-card__fallback { display: none; }
.pana-res__n, .pana-mini__n {
    position: absolute; z-index: 2;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--pa-gold);
    color: var(--pa-ink);
    font-weight: 700;
    border: 1.5px solid var(--pa-ink);
}
.pana-res__n { left: 10px; top: 10px; width: 28px; height: 28px; font-size: 13px; }
.pana-res__save {
    position: absolute; right: 10px; top: 10px; z-index: 2;
    width: 36px; height: 36px; padding: 0;
    border-radius: 50%;
    background: #FFFFFF;
    border: 1.5px solid var(--pa-ink);
    color: var(--pa-ink);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.pana-res__save.is-on { color: var(--pa-green); }
.pana-res__save.is-on svg { fill: currentColor; }
.pana-res__save:disabled { opacity: .6; cursor: wait; }
.pana-res__hours {
    position: absolute; left: 10px; bottom: 10px; z-index: 2;
    display: inline-flex; align-items: center; gap: 6px;
    max-width: calc(100% - 20px);
    padding: 4px 10px;
    border-radius: 999px;
    background: #FFFFFF;
    font-size: 12px; font-weight: 600;
    color: var(--pa-ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pana-res__hours svg { flex: none; color: var(--pa-green); }
.pana-res__hours.is-closed svg { color: var(--pa-soft); }
.pana-res__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.pana-res__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pana-res__name { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.25; }
.pana-res__name a { color: var(--pa-ink); }
.pana-res__name a:hover { color: var(--pa-green); }
.pana-res__score { flex: none; padding: 3px 8px; border-radius: 8px; background: var(--pa-accent); color: #FFFFFF; font-size: 13px; font-weight: 700; }
.pana-res__meta { margin: 0; font-size: 13px; color: var(--pa-soft); }
.pana-res__why {
    display: flex; gap: 8px; align-items: flex-start;
    margin: 4px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--pa-cream);
    font-size: 13px; line-height: 1.45;
    color: var(--pa-ink);
}
.pana-res__spark { color: var(--pa-green); margin-top: 2px; flex: none; display: flex; }
.pana-app .pana-res__spark svg { fill: currentColor; stroke: none; }
/* Una sola fila en todas las tarjetas: iconos redondos a la izquierda y «Ver ficha» a la derecha.
   WhatsApp va como círculo verde (el texto queda para lectores de pantalla) para que no empuje
   «Ver ficha» a otra línea y todas las tarjetas queden alineadas. */
.pana-res__acts { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; margin-top: auto; padding-top: 6px; }
.pana-res__wa > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pana-res__wa {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px; padding: 0;
    border-radius: 50%;
    background: var(--pa-green);
    color: #FFFFFF;
    font-weight: 700; font-size: 13px;
    border: 1.5px solid var(--pa-ink);
}
.pana-res__wa:hover { color: #FFFFFF; }
.pana-res__ib {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--pa-ink);
    color: var(--pa-ink);
    background: #FFFFFF;
}
.pana-res__ib:hover { color: var(--pa-ink); background: var(--pa-cream); }
.pana-res__ficha { margin-left: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--pa-green); }
.pana-res__ficha:hover { color: var(--pa-ink); }
.pana-glabel--res { margin: 2px 0 0; }
.pana-minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pana-mini__img {
    position: relative; flex: none;
    width: 52px; height: 52px;
    border-radius: 10px;
    background: var(--pa-photo);
    display: flex; align-items: center; justify-content: center;
}
.pana-mini__img img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; border-radius: 10px; object-fit: cover; } /* tapa la inicial al cargar */
.pana-mini__img .pana-card__initial { font-weight: 700; color: var(--pa-soft); }
.pana-mini__n { left: -6px; top: -6px; width: 22px; height: 22px; font-size: 11px; }
.pana-mini__txt { min-width: 0; display: block; }
.pana-mini.is-flash { border-color: var(--pa-accent); }

/* Pregunta de zona: ubicacion o zonas sugeridas */
.pana-loc {
    margin-left: 46px;
    display: flex; flex-direction: column; gap: 12px;
    padding: 14px;
    border-radius: 16px;
    border: 2px dashed var(--pa-green);
    background: #FFFFFF;
}
.pana-loc__txt { margin: 0; font-size: 14px; line-height: 1.5; }
.pana-loc__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pana-app .pana-qr {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 38px; padding: 0 14px;
    border-radius: 999px;
    border: 1.5px solid var(--pa-green);
    background: #FFFFFF;
    color: var(--pa-green);
    font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.pana-app .pana-qr:hover { background: var(--pa-green); color: #FFFFFF; }
.pana-app .pana-qr--geo { background: var(--pa-cream); border-color: var(--pa-ink); border-style: solid; color: var(--pa-ink); }
.pana-app .pana-qr--geo:hover { background: var(--pa-sand); color: var(--pa-ink); }
.pana-app .pana-qr--geo .pana-chip__ico { color: currentColor; }

/* Pildora quitada o «solo abiertos»: nota en vez de repetir la pregunta */
.pana-refino { align-self: flex-end; font-size: 12px; font-weight: 600; color: var(--pa-soft); padding: 4px 12px; border-radius: 999px; background: var(--pa-cream); }
.pana-chat .pana-refino { margin-left: auto; }

/* Pregunta pendiente tras el login */
.pana-pendiente {
    max-width: 812px;
    margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 10px 10px 16px;
    border-radius: 14px;
    background: var(--pa-cream);
    border: 1.5px solid var(--pa-ink);
    font-size: 14px; font-weight: 500;
}
.pana-pendiente__btn {
    flex: none;
    min-height: 40px; padding: 0 20px;
    border-radius: 999px;
    border: 2px solid var(--pa-ink);
    background: var(--pa-green);
    color: #FFFFFF;
    font: inherit; font-weight: 700; font-size: 14px;
    cursor: pointer;
}

/* Historial y guardados */
.pana-conv__txt { min-width: 0; display: block; }
.pana-hist__mas {
    align-self: flex-start;
    margin: 4px 6px 0;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1.5px solid var(--pa-ink);
    background: #FFFFFF;
    color: var(--pa-ink);
    font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.pana-saved { position: relative; }
.pana-saved .pana-mini { padding-right: 40px; }
.pana-saved__ini {
    flex: none;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--pa-photo);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--pa-soft);
}
.pana-saved__x {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 28px; height: 28px; padding: 0;
    border-radius: 50%;
    border: 1.5px solid var(--pa-sand);
    background: #FFFFFF;
    color: var(--pa-ink);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.pana-saved__x:hover { border-color: var(--pa-ink); }

/* Mapa: marcadores numerados como las tarjetas */
.pana-map .leaflet-container, .pana-map.leaflet-container { font-family: inherit; }
.pana-map__vacio { z-index: 500; }
.pana-pin { background: none; border: 0; }
.pana-map .leaflet-attribution-flag { display: none !important; } /* .pana-app svg le quita el relleno */
.pana-pin__n {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: var(--pa-green);
    border: 2px solid var(--pa-ink);
    color: #FFFFFF;
    font-size: 12px; font-weight: 700;
    box-sizing: border-box;
}
.pana-pin__n > * { transform: rotate(45deg); }
.pana-pin__n { transition: transform .15s ease, background-color .15s ease; transform-origin: 50% 50%; }
.pana-pin.is-hot .pana-pin__n { background: var(--pa-amber, #F2A516); color: var(--pa-ink); transform: rotate(-45deg) scale(1.3); }

/* ---------- Tableta y movil: una columna, historial y panel en cajones ---------- */
@media (max-width: 1100px) {
    .pana-app__body { grid-template-columns: minmax(0, 1fr); }
    .pana-solo-movil { display: inline-flex !important; }
    .pana-app .pana-mchips {
        display: flex; flex-wrap: nowrap; gap: 8px;
        overflow-x: auto;
        padding: 10px 16px;
        border-bottom: 1.5px solid var(--pa-line);
        scrollbar-width: none;
        flex: none;
    }
    .pana-mchips::-webkit-scrollbar { display: none; }
    .pana-mchips .pana-tag { flex: none; }
    .pana-side, .pana-ctx {
        position: fixed; top: 0; bottom: 0;
        z-index: 100001; /* por encima de la cabecera del sitio (99999) */
        width: min(88vw, 340px);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }
    .pana-side { left: 0; transform: translateX(-102%); border-right: 2px solid var(--pa-ink); }
    .pana-ctx { right: 0; transform: translateX(102%); border-left: 2px solid var(--pa-ink); }
    .pana-side.is-open, .pana-ctx.is-open { transform: none; visibility: visible; transition: transform .25s ease; }
    .pana-ctx__cerrar, .pana-side__cerrar { align-self: flex-end; margin-bottom: -12px; flex: none; }
    html.pana-cajon-abierto, html.pana-cajon-abierto body { overflow: hidden; }
    .pana-velo {
        display: block;
        position: fixed; inset: 0;
        z-index: 100000;
        background: rgba(26, 26, 46, .45);
    }
}
@media (max-width: 600px) {
    .pana-app__body { height: calc(100vh - var(--pana-head, 58px) - 1px); height: calc(100dvh - var(--pana-head, 58px) - 1px); min-height: 480px; }
    .pana-chathead { padding: 12px 16px; gap: 10px; }
    .pana-thread { padding: 18px 14px 10px; gap: 14px; }
    .pana-app .pana-msg > .pana-avatar { display: none; }
    .pana-app .pana-bubble { font-size: 14px; max-width: 100%; }
    .pana-app .pana-results, .pana-app .pana-chips, .pana-app .pana-fb, .pana-app .pana-skeletons { padding-left: 0; }
    .pana-app .pana-cards { margin-right: -14px; padding-right: 14px; }
    .pana-composer-wrap { padding: 10px 12px max(14px, env(safe-area-inset-bottom)); }
    .pana-cloc__txt { display: none; }
    .pana-disc { font-size: 10.5px; }
    .pana-muro { margin: 4px 14px 16px; width: auto; }
    .pana-app .pana-results--page { padding-left: 0; }
    .pana-resgrid {
        display: flex; overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin: 0 -14px; padding: 2px 14px 10px; scroll-padding: 0 14px;
        scrollbar-width: none;
    }
    .pana-resgrid::-webkit-scrollbar { display: none; }
    .pana-resgrid > .pana-res { flex: 0 0 84%; scroll-snap-align: start; }
    .pana-resgrid--single > .pana-res { flex-basis: 100%; }
    .pana-carousel > .pana-resgrid { margin: 0 -14px; padding: 2px 14px 10px; scroll-padding: 0 14px; }
    /* Móvil: tarjetas más compactas; asoma la siguiente para invitar a deslizar. */
    .pana-carousel > .pana-resgrid > .pana-res { flex-basis: 74%; }
    .pana-resgrid .pana-res__img { aspect-ratio: 2 / 1; }
    .pana-resgrid .pana-res__name { font-size: 15.5px; }
    .pana-resgrid .pana-res__meta { font-size: 12.5px; }
    .pana-resgrid .pana-res__why {  /* dos líneas; el borde (no el padding) hace de margen y tapa el resto */
        font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
        padding-bottom: 0; border-bottom: 10px solid var(--pa-cream);
    }
    .pana-resgrid .pana-res__why .pana-res__spark { display: inline-flex; vertical-align: -2px; margin-right: 6px; }
    .pana-app .pana-scrollbox { overflow-x: hidden; }
    /* El Pana a pantalla completa: sin la cabecera del sitio (logo y usuario); se cierra con la X. */
    body.pana-pagina > header, body.pana-pagina header.header { display: none; }
    .pana-carousel__nav { display: none; }  /* en móvil se desliza con el dedo */
    /* Tarjeta estrecha: más aire abajo y botones algo menores para que quepa «Ver ficha». */
    .pana-res__body { padding: 14px 14px 18px; gap: 8px; }
    .pana-res__acts { gap: 6px; padding-top: 10px; }
    .pana-res__wa, .pana-res__ib { width: 36px; height: 36px; }
    .pana-res__ficha { font-size: 12.5px; }
    .pana-res:hover { transform: none; box-shadow: none; }
    .pana-minis { grid-template-columns: minmax(0, 1fr); }
    .pana-loc { margin-left: 0; }
    .pana-pendiente { margin: 0 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .pana-side, .pana-ctx, .pana-newchat, .pana-muro__btn, .pana-hist__entrar, .pana-sw, .pana-sw::after { transition: none !important; }
}
@media (max-width: 420px) {
    .pana-chat .pana-results, .pana-chat .pana-chips, .pana-chat .pana-fb, .pana-chat .pana-skeletons { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .pana-chat, .pana-fab__btn, .pana-card, .pana-chip { transition: none !important; }
}

/* Burbuja flotante: las chips llevan a /el-pana/?q=... (son enlaces) */
.pana-chips--widget { padding-left: 0; }
a.pana-chip { text-decoration: none; }
