/*! ============================================================================
 *  fable-5.css v1.0 — Capa "FABLE 5" (v48)
 *  ----------------------------------------------------------------------------
 *  1. FAB Stack lateral      — Compartir · Voz · Asistente IA · Tarjeta digital
 *  2. Tarjeta digital        — QR "Escanéame" + copiar + vCard + WhatsApp
 *  3. Dock de navegación     — pill inferior estilo macOS con estado activo
 *  4. Panel de compartir     — red social + copiar enlace
 *  5. Overlay de voz         — mic escuchando con ondas
 *  6. Asistente IA (chat)    — burbujas, quick-replies, typing dots
 *  Respeta prefers-reduced-motion y pantallas táctiles.
 * ============================================================================ */

:root {
    --f5-bg: rgba(13, 18, 36, 0.92);
    --f5-bg-solid: #0e1428;
    --f5-border: rgba(255, 255, 255, 0.10);
    --f5-gold: #E8C766;
    --f5-pink: #F472B6;
    --f5-cyan: #38BDF8;
    --f5-purple: #A78BFA;
    --f5-green: #25D366;
    --f5-violet: #7C3AED;
    --f5-text: #EDF1FA;
    --f5-muted: #93A0BC;
    --f5-radius: 18px;
    --f5-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

/* ========================================================================
   1. FAB STACK LATERAL (derecha, centrado vertical)
   ======================================================================== */
.f5-fab-stack {
    position: fixed;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 8900;
}

.f5-fab {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--f5-bg);
    border: 1.5px solid var(--f5-border);
    color: var(--f5-text);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.40);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease, border-color .25s ease;
}
.f5-fab:hover { transform: translateX(-4px) scale(1.07); }
.f5-fab:active { transform: scale(0.94); }

/* Colores por botón (borde + icono + glow) — como la referencia */
.f5-fab-share  { border-color: rgba(232, 199, 102, 0.55); color: var(--f5-gold); }
.f5-fab-share:hover  { box-shadow: 0 10px 30px rgba(232, 199, 102, 0.30); }
.f5-fab-voice  { border-color: rgba(244, 114, 182, 0.55); color: var(--f5-pink); }
.f5-fab-voice:hover  { box-shadow: 0 10px 30px rgba(244, 114, 182, 0.30); }
.f5-fab-bot    { border-color: rgba(56, 189, 248, 0.55);  color: var(--f5-cyan); }
.f5-fab-bot:hover    { box-shadow: 0 10px 30px rgba(56, 189, 248, 0.30); }
.f5-fab-card   { border-color: rgba(167, 139, 250, 0.55); color: var(--f5-purple); }
.f5-fab-card:hover   { box-shadow: 0 10px 30px rgba(167, 139, 250, 0.30); }

/* Sparkle ✦ del bot (como la referencia) */
.f5-fab-bot::after {
    content: '✦';
    position: absolute;
    top: -7px;
    right: -6px;
    font-size: 12px;
    color: var(--f5-gold);
    text-shadow: 0 0 8px rgba(232, 199, 102, 0.8);
    animation: f5-sparkle 2.4s ease-in-out infinite;
}
@keyframes f5-sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: .9; }
    50%      { transform: scale(1.35) rotate(20deg); opacity: 1; }
}

/* Punto de notificación cian (tarjeta digital) */
.f5-fab-card .f5-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22D3EE;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.9);
    animation: f5-dot-pulse 2s ease-in-out infinite;
}
@keyframes f5-dot-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.35); }
}

/* Tooltip lateral */
.f5-fab::before {
    content: attr(data-tip);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: var(--f5-bg-solid);
    border: 1px solid var(--f5-border);
    color: var(--f5-text);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
@media (hover: hover) and (pointer: fine) {
    .f5-fab:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* Mic escuchando */
.f5-fab-voice.f5-listening {
    border-color: var(--f5-pink);
    color: #fff;
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.35), rgba(190, 24, 93, 0.35)), var(--f5-bg);
    animation: f5-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes f5-mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(244, 114, 182, 0.55); }
    60%      { box-shadow: 0 0 0 14px rgba(244, 114, 182, 0); }
}

/* ========================================================================
   2. OVERLAY GENÉRICO + MODALES
   ======================================================================== */
.f5-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 16, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
}
.f5-overlay.f5-open { opacity: 1; pointer-events: all; }

.f5-modal {
    width: 100%;
    max-width: 430px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: linear-gradient(160deg, rgba(28, 24, 58, 0.96), rgba(12, 16, 34, 0.97));
    border: 1px solid rgba(167, 139, 250, 0.35);
    border-radius: 26px;
    padding: 26px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(124, 58, 237, 0.18),
        0 0 60px rgba(124, 58, 237, 0.22);
    transform: translateY(26px) scale(0.96);
    transition: transform .32s cubic-bezier(.34, 1.4, .64, 1);
    font-family: 'Inter', sans-serif;
    color: var(--f5-text);
    scrollbar-width: thin;
}
.f5-overlay.f5-open .f5-modal { transform: none; }

.f5-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--f5-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--f5-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}
.f5-close:hover { background: rgba(255, 255, 255, 0.12); color: #fff; transform: rotate(90deg); }

/* ========================================================================
   3. TARJETA DIGITAL (vCard + QR)
   ======================================================================== */
.f5-card { position: relative; }

.f5-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-right: 40px;
}
.f5-card-logo {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    background: #fff;
    padding: 4px;
    box-shadow: 0 8px 22px rgba(124, 58, 237, 0.35);
}
.f5-card-name {
    font-family: 'Sora', 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
    margin: 0;
}
.f5-card-role {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--f5-purple);
    margin-top: 4px;
}

/* Panel del QR */
.f5-qr-panel {
    display: flex;
    gap: 16px;
    align-items: center;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--f5-border);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 18px;
}
.f5-qr-box {
    flex: 0 0 auto;
    width: 128px;
    height: 128px;
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.f5-qr-box img, .f5-qr-box canvas { width: 100% !important; height: 100% !important; border-radius: 4px; }
.f5-qr-info h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}
.f5-qr-info p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--f5-muted);
}

/* Filas de contacto */
.f5-contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: border-color .2s ease, background .2s ease;
}
.f5-contact-row:hover { border-color: rgba(167, 139, 250, 0.35); background: rgba(255, 255, 255, 0.07); }
.f5-contact-row i.f5-ci {
    width: 20px;
    text-align: center;
    font-size: 14px;
    flex: 0 0 auto;
}
.f5-ci-phone { color: var(--f5-gold); }
.f5-ci-mail  { color: var(--f5-pink); }
.f5-ci-web   { color: var(--f5-cyan); }
.f5-contact-val {
    flex: 1;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--f5-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.f5-copy-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--f5-muted);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color .2s ease, background .2s ease;
}
.f5-copy-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.f5-copy-btn.f5-copied { color: #34D399; }

/* Botones de acción */
.f5-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}
.f5-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 12px;
    border-radius: 14px;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.f5-action-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.f5-action-btn:active { transform: scale(0.97); }
.f5-btn-save {
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    box-shadow: 0 10px 26px rgba(124, 58, 237, 0.40);
}
.f5-btn-wa {
    background: linear-gradient(135deg, #16A34A, #25D366);
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.35);
}
/* Botón ancho: Descargar CV en varios formatos */
.f5-btn-cv {
    width: 100%;
    margin-top: 12px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #B45309, #F59E0B);
    box-shadow: 0 10px 26px rgba(245, 158, 11, 0.35);
}
.f5-cv-formats {
    font-size: 10.5px;
    font-weight: 600;
    opacity: 0.85;
    letter-spacing: 0.04em;
    background: rgba(0, 0, 0, 0.22);
    padding: 3px 9px;
    border-radius: 999px;
}

/* ========================================================================
   4. PANEL DE COMPARTIR
   ======================================================================== */
.f5-share-title {
    font-family: 'Sora', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 4px;
    padding-right: 40px;
}
.f5-share-sub {
    font-size: 12.5px;
    color: var(--f5-muted);
    margin: 0 0 18px;
}
.f5-share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.f5-share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--f5-border);
    border-radius: 16px;
    padding: 14px 6px;
    cursor: pointer;
    color: var(--f5-text);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.f5-share-item:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.08); }
.f5-share-item i { font-size: 21px; }
.f5-sh-wa i { color: #25D366; }
.f5-sh-fb i { color: #3B82F6; }
.f5-sh-x  i { color: #E2E8F0; }
.f5-sh-in i { color: #38BDF8; }
.f5-sh-tg i { color: #29ABE2; }
.f5-sh-mail i { color: var(--f5-pink); }
.f5-sh-native i { color: var(--f5-gold); }
.f5-sh-copy i { color: var(--f5-purple); }

.f5-share-link {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(167, 139, 250, 0.4);
    border-radius: 12px;
    padding: 11px 14px;
}
.f5-share-link span {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--f5-cyan);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================================================================
   5. OVERLAY DE VOZ
   ======================================================================== */
.f5-voice-panel { text-align: center; position: relative; }
.f5-voice-mic {
    width: 92px;
    height: 92px;
    margin: 8px auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EC4899, #BE185D);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #fff;
    position: relative;
    box-shadow: 0 14px 40px rgba(236, 72, 153, 0.45);
}
.f5-voice-mic::before, .f5-voice-mic::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(236, 72, 153, 0.5);
    animation: f5-wave 2s ease-out infinite;
}
.f5-voice-mic::after { animation-delay: 1s; }
@keyframes f5-wave {
    0%   { transform: scale(0.85); opacity: 1; }
    100% { transform: scale(1.55); opacity: 0; }
}
.f5-voice-status {
    font-family: 'Sora', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}
.f5-voice-transcript {
    min-height: 26px;
    font-size: 14px;
    color: var(--f5-cyan);
    font-style: italic;
    margin-bottom: 16px;
}
.f5-voice-cmds {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.f5-voice-chip {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--f5-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--f5-border);
    border-radius: 999px;
    padding: 5px 12px;
}
.f5-voice-chip b { color: var(--f5-pink); font-weight: 600; }

/* ========================================================================
   6. ASISTENTE IA — CHAT
   ======================================================================== */
.f5-chat-wrap {
    position: fixed;
    right: 84px;
    bottom: 24px;
    width: min(390px, calc(100vw - 28px));
    height: min(560px, calc(100vh - 110px));
    background: linear-gradient(165deg, rgba(16, 22, 44, 0.97), rgba(10, 14, 30, 0.98));
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 22px;
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(56, 189, 248, 0.15);
    z-index: 10400;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    opacity: 0;
    transform: translateY(24px) scale(0.95);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s cubic-bezier(.34, 1.4, .64, 1);
}
.f5-chat-wrap.f5-open { opacity: 1; transform: none; pointer-events: all; }

.f5-chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(56, 189, 248, 0.08);
    border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}
.f5-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(135deg, #0EA5E9, #38BDF8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 6px 16px rgba(56, 189, 248, 0.4);
}
.f5-chat-title { flex: 1; }
.f5-chat-title strong {
    display: block;
    color: #fff;
    font-size: 14.5px;
    font-family: 'Sora', sans-serif;
}
.f5-chat-title small {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #34D399;
    font-size: 11px;
    font-weight: 600;
}
.f5-chat-title small::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.9);
    animation: f5-dot-pulse 2s infinite;
}
.f5-chat-close {
    background: transparent;
    border: none;
    color: var(--f5-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: color .2s;
}
.f5-chat-close:hover { color: #fff; }

.f5-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, .3) transparent;
}
.f5-msg {
    max-width: 84%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.55;
    animation: f5-msg-in .3s ease both;
}
@keyframes f5-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}
.f5-msg-bot {
    align-self: flex-start;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.22);
    color: var(--f5-text);
    border-bottom-left-radius: 5px;
}
.f5-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #7C3AED, #8B5CF6);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.f5-msg a { color: var(--f5-cyan); font-weight: 600; }

/* typing dots */
.f5-typing {
    align-self: flex-start;
    display: flex;
    gap: 5px;
    padding: 12px 16px;
    background: rgba(56, 189, 248, 0.10);
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 16px;
    border-bottom-left-radius: 5px;
}
.f5-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--f5-cyan);
    animation: f5-typing 1.2s ease-in-out infinite;
}
.f5-typing span:nth-child(2) { animation-delay: .18s; }
.f5-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes f5-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: .5; }
    30%           { transform: translateY(-5px); opacity: 1; }
}

/* quick replies */
.f5-quick-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}
.f5-quick {
    background: rgba(167, 139, 250, 0.10);
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: var(--f5-purple);
    border-radius: 999px;
    padding: 7px 13px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}
.f5-quick:hover {
    background: rgba(167, 139, 250, 0.22);
    color: #fff;
    transform: translateY(-1px);
}

.f5-chat-input-row {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--f5-border);
    background: rgba(255, 255, 255, 0.03);
}
.f5-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--f5-border);
    border-radius: 12px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 13.5px;
    padding: 10px 14px;
    outline: none;
    transition: border-color .2s;
}
.f5-chat-input:focus { border-color: rgba(56, 189, 248, 0.55); }
.f5-chat-input::placeholder { color: var(--f5-muted); }
.f5-chat-send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #0EA5E9, #38BDF8);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}
.f5-chat-send:hover { transform: scale(1.06); filter: brightness(1.1); }

/* ========================================================================
   7. DOCK DE NAVEGACIÓN INFERIOR (estilo macOS — magnify real por cursor)
   ----------------------------------------------------------------------
   Cada .f5-dock-item recibe su escala vía la variable --mag (0 a 1),
   calculada en JS según la distancia del cursor al centro del ítem.
   El contenedor usa align-items:flex-end para que el "crecimiento"
   se vea hacia arriba, igual que un dock real.
   ======================================================================== */
.f5-dock {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: rgba(13, 18, 36, 0.86);
    border: 1px solid var(--f5-border);
    border-radius: 22px;
    padding: 9px 12px;
    z-index: 8800;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.50), inset 0 1px 0 rgba(255,255,255,0.06);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1), opacity .35s ease;
}
.f5-dock.f5-dock-hidden {
    transform: translateX(-50%) translateY(90px);
    opacity: 0;
    pointer-events: none;
}

.f5-dock-item {
    --mag: 0;                 /* 0 = reposo, 1 = pico de magnificación (bajo cursor) */
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B9C3D8;
    font-size: 18px;
    text-decoration: none;
    border: 1.5px solid transparent;
    flex-shrink: 0;
    transform: translateY(calc(var(--mag) * -14px)) scale(calc(1 + var(--mag) * 0.62));
    transform-origin: bottom center;
    transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), color .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    will-change: transform;
}
.f5-dock-item:hover,
.f5-dock-item:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.f5-dock-item:active { transform: translateY(calc(var(--mag) * -14px)) scale(calc((1 + var(--mag) * 0.62) * 0.92)); }

/* Glow morado intenso en el ítem bajo el cursor (pico de magnificación) */
.f5-dock-item:hover {
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.45), 0 0 0 1.5px rgba(167, 139, 250, 0.55);
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.35), rgba(99, 102, 241, 0.22));
}

/* Estado activo — cuadro con borde morado + punto indicador */
.f5-dock-item.f5-active {
    color: #fff;
    background: rgba(124, 58, 237, 0.18);
    border-color: rgba(167, 139, 250, 0.65);
    box-shadow: 0 0 18px rgba(124, 58, 237, 0.35);
}
.f5-dock-item.f5-active::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--f5-purple);
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.9);
    opacity: calc(1 - var(--mag) * 0.7);
}

/* Tooltip superior del dock — pill oscuro, aparece sobre el ítem magnificado */
.f5-dock-item::before {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(6px) scale(calc(1 / (1 + var(--mag) * 0.62)));
    background: var(--f5-bg-solid);
    border: 1px solid var(--f5-border);
    color: var(--f5-text);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 13px;
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    transition: opacity .18s ease, transform .18s ease;
}
@media (hover: hover) and (pointer: fine) {
    .f5-dock-item:hover::before {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(calc(1 / (1 + var(--mag) * 0.62)));
    }
}

/* separador vertical antes de WhatsApp */
.f5-dock-sep {
    width: 1px;
    height: 28px;
    align-self: center;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 2px;
    flex-shrink: 0;
}
.f5-dock-wa {
    color: var(--f5-green);
    border-color: rgba(37, 211, 102, 0.40);
}
.f5-dock-wa:hover {
    color: #fff;
    background: linear-gradient(145deg, rgba(37, 211, 102, 0.35), rgba(18, 140, 126, 0.22));
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45), 0 0 0 1.5px rgba(74, 222, 128, 0.55);
}

/* Táctil/móvil: sin magnify por cursor, solo tap-scale sutil */
@media (pointer: coarse) {
    .f5-dock-item { transform: none !important; }
    .f5-dock-item:active { transform: scale(0.93) !important; }
}
@media (prefers-reduced-motion: reduce) {
    .f5-dock-item { transition: none; }
}

/* ========================================================================
   8. RESPONSIVE + ACCESIBILIDAD
   ======================================================================== */
@media (max-width: 640px) {
    .f5-fab-stack { right: 10px; gap: 11px; }
    .f5-fab { width: 46px; height: 46px; font-size: 17px; border-radius: 14px; }
    .f5-dock { bottom: 12px; padding: 6px 8px; gap: 4px; border-radius: 17px; }
    .f5-dock-item { width: 40px; height: 40px; font-size: 16px; border-radius: 12px; }
    .f5-chat-wrap {
        right: 50%;
        transform: translateX(50%) translateY(24px) scale(0.95);
        bottom: 76px;
        height: min(520px, calc(100vh - 150px));
    }
    .f5-chat-wrap.f5-open { transform: translateX(50%); }
    .f5-qr-panel { flex-direction: column; text-align: center; }
    .f5-modal { padding: 20px; border-radius: 22px; }
    .f5-card-actions { grid-template-columns: 1fr; }
    .f5-share-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
}

/* En móvil el audio player sube para no chocar con el dock */
@media (max-width: 640px) {
    .audio-player { bottom: 74px !important; left: 12px !important; }
    .up-backtop { bottom: 140px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .f5-fab, .f5-dock-item, .f5-modal, .f5-chat-wrap { transition: none !important; }
    .f5-fab-bot::after, .f5-fab-card .f5-dot, .f5-voice-mic::before,
    .f5-voice-mic::after, .f5-typing span { animation: none !important; }
}
