:root {
    --mad-blue: #426BAF;
    --mad-blue-dark: #284F8E;
    --mad-blue-soft: #EAF0FA;
    --mad-yellow: #FBC80E;
    --mad-yellow-soft: #FFF6CF;
    --ink: #172033;
    --muted: #6B7280;
    --surface: #FFFFFF;
    --background: #F4F7FC;
    --line: #E4E9F2;
    --success: #20A66A;
    --shadow: 0 22px 70px rgba(34, 54, 86, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% 5%, rgba(251, 200, 14, 0.18), transparent 24rem),
        radial-gradient(circle at 95% 95%, rgba(66, 107, 175, 0.16), transparent 28rem),
        var(--background);
}

button,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: min(760px, calc(100vh - 48px));
    margin: 24px auto;
    display: grid;
    grid-template-columns: minmax(330px, 0.9fr) minmax(440px, 1.35fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 30px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.assistant-panel {
    position: relative;
    display: flex;
    min-height: 720px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 38px;
    overflow: hidden;
    color: #FFFFFF;
    text-align: center;
    background:
        linear-gradient(160deg, rgba(40, 79, 142, 0.98), rgba(66, 107, 175, 0.94)),
        var(--mad-blue);
}

.assistant-panel::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 260px;
    height: 260px;
    border: 46px solid rgba(251, 200, 14, 0.22);
    border-radius: 50%;
}

.brand-mark {
    position: absolute;
    top: 28px;
    left: 30px;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    color: var(--mad-blue-dark);
    font-size: 24px;
    font-weight: 800;
    background: var(--mad-yellow);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.mascot-stage {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    width: min(330px, 78vw);
    height: 340px;
    flex-shrink: 0;

    margin-top: 18px;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 48% 52% 44% 56% / 55% 45% 55% 45%;

    background: rgba(255, 255, 255, 0.12);
}

.mascot-image {
    position: relative;
    z-index: 2;

    display: block;

    width: 82%;
    height: 82%;
    max-width: 82%;
    max-height: 82%;

    object-fit: contain;
    object-position: center;

    opacity: 1;
    transform: scale(1);

    filter: drop-shadow(
        0 14px 12px
        rgba(12, 31, 60, 0.24)
    );

    transition:
        opacity 260ms ease,
        transform 260ms cubic-bezier(
            0.22,
            1,
            0.36,
            1
        ),
        filter 260ms ease;

    will-change:
        opacity,
        transform,
        filter;
}

.mascot-image.is-changing {
    opacity: 0;
    transform: scale(0.965);

    filter:
        drop-shadow(
            0 10px 9px
            rgba(12, 31, 60, 0.18)
        )
        blur(1px);
}

.decor {
    position: absolute;
    z-index: 0;
    display: block;
    border-radius: 50%;
    background: var(--mad-yellow);
}

.decor-one {
    top: 25px;
    right: 35px;
    width: 22px;
    height: 22px;
}

.decor-two {
    left: 28px;
    bottom: 54px;
    width: 13px;
    height: 13px;
    opacity: 0.8;
}

.assistant-copy {
    position: relative;
    z-index: 2;
    max-width: 460px;
}

.eyebrow,
.chat-kicker {
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--mad-yellow);
}

.assistant-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.15rem);
    line-height: 1.05;
}

.assistant-copy h1 span {
    color: var(--mad-yellow);
}

.assistant-copy > p:last-child {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.96rem;
    line-height: 1.7;
}

.assistant-status {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 24px;
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.82rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #61E59F;
    box-shadow: 0 0 0 5px rgba(97, 229, 159, 0.14);
}

.status-dot.thinking {
    background: var(--mad-yellow);
    box-shadow: 0 0 0 5px rgba(251, 200, 14, 0.17);
    animation: pulse 1s infinite;
}

.chat-panel {
    display: flex;
    min-width: 0;
    min-height: 720px;
    flex-direction: column;
    padding: 32px;
    background: var(--surface);
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.chat-kicker {
    color: var(--mad-blue);
}

.chat-header h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
}

.ghost-button {
    border: 0;
    border-radius: 12px;
    padding: 10px 13px;
    color: var(--mad-blue-dark);
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--mad-blue-soft);
}

.messages {
    flex: 1;
    min-height: 260px;
    max-height: 390px;
    margin: 22px -8px 0 0;
    padding-right: 8px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #C9D4E7 transparent;
}

.message-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.user-row {
    justify-content: flex-end;
}

.mini-avatar {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 10px;
    color: var(--mad-blue-dark);
    font-size: 0.85rem;
    font-weight: 800;
    background: var(--mad-yellow);
}

.message {
    max-width: min(78%, 520px);
    padding: 13px 15px;
    border-radius: 18px;
    font-size: 0.91rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.bot-message {
    border-bottom-left-radius: 6px;
    color: var(--ink);
    background: #F0F3F8;
}

.user-message {
    border-bottom-right-radius: 6px;
    color: #FFFFFF;
    background: var(--mad-blue);
}

.message-image {
    display: block;
    width: min(230px, 100%);
    margin-bottom: 8px;
    border-radius: 12px;
}

.quick-actions {
    display: flex;
    gap: 8px;
    margin: 14px 0 18px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.quick-actions::-webkit-scrollbar {
    display: none;
}

.quick-action {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid #D7E0EF;
    border-radius: 999px;
    color: var(--mad-blue-dark);
    font-size: 0.77rem;
    font-weight: 700;
    background: #FFFFFF;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.quick-action:hover {
    transform: translateY(-1px);
    border-color: var(--mad-blue);
    background: var(--mad-blue-soft);
}

.image-preview-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid #D7E0EF;
    border-radius: 14px;
    background: #F8FAFD;
}

.image-preview-wrapper[hidden] {
    display: none;
}

.image-preview-wrapper img {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    object-fit: cover;
}

.image-preview-wrapper div {
    min-width: 0;
}

.image-preview-wrapper strong {
    display: block;
    max-width: 360px;
    overflow: hidden;
    color: var(--ink);
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-preview-wrapper button {
    margin-top: 5px;
    padding: 0;
    border: 0;
    color: #A23737;
    font-size: 0.75rem;
    font-weight: 700;
    background: transparent;
}

.chat-form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 9px;
    padding: 8px;
    border: 1px solid #D7E0EF;
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 8px 28px rgba(40, 79, 142, 0.08);
}

.chat-form:focus-within {
    border-color: var(--mad-blue);
    box-shadow: 0 0 0 4px rgba(66, 107, 175, 0.11);
}

.chat-form textarea {
    width: 100%;
    max-height: 130px;
    resize: none;
    border: 0;
    outline: 0;
    padding: 11px 6px;
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.45;
    background: transparent;
}

.chat-form textarea::placeholder {
    color: #9BA4B2;
}

.icon-button,
.send-button {
    border: 0;
    border-radius: 13px;
    font-weight: 800;
}

.icon-button {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: var(--mad-blue-dark);
    font-size: 1.4rem;
    background: var(--mad-blue-soft);
}

.send-button {
    display: inline-flex;
    height: 43px;
    align-items: center;
    gap: 7px;
    padding: 0 15px;
    color: var(--mad-blue-dark);
    background: var(--mad-yellow);
}

button:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.disclaimer {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.45;
    text-align: center;
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.78); opacity: 0.58; }
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .assistant-panel {
        min-height: auto;
        padding: 28px 24px 30px;
    }

    .mascot-stage {
        height: 280px;
        margin-top: 24px;
    }

    .chat-panel {
        min-height: 680px;
    }
}

@media (max-width: 560px) {
    .app-shell {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

.assistant-panel {
    padding: 82px 18px 26px;
}

.corner-logo {
    top: 18px;
    left: 18px;
    width: 105px;
    height: 58px;
}

    .mascot-stage {
        width: min(290px, 85vw);
        height: 250px;
    }

    .assistant-copy > p:last-child {
        font-size: 0.86rem;
    }

    .chat-panel {
        min-height: 640px;
        padding: 22px 16px;
    }

    .chat-header {
        align-items: flex-start;
    }

    .message {
        max-width: 88%;
    }

    .send-button {
        width: 43px;
        padding: 0;
        justify-content: center;
        font-size: 0;
    }

    .send-button span {
        font-size: 1rem;
    }
}

.corner-logo {
    position: absolute;
    top: 28px;
    left: 30px;
    z-index: 10;

    display: block;

    width: 125px;
    height: 70px;

    object-fit: contain;
    object-position: left center;
}

/* Tamaño individual de cada estado de PELIK */

#mascot-image[src*="pelik_default.png"] {
    width: 86%;
    height: 86%;
    max-width: 86%;
    max-height: 86%;
}

#mascot-image[src*="pelik_thinking.png"] {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

#mascot-image[src*="pelik_answering.png"] {
    width: 120%;
    height: 120%;
    max-width: 120%;
    max-height: 120%;
}

/* ==================================================
   ACCIONES DENTRO DE LOS MENSAJES
================================================== */

.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
}

.message-action-link {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;

    padding: 8px 12px;

    border: 1px solid rgba(66, 107, 175, 0.24);
    border-radius: 999px;

    color: var(--mad-blue-dark);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;

    background: var(--mad-yellow);

    transition:
        transform 150ms ease,
        box-shadow 150ms ease;
}

.message-action-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(40, 79, 142, 0.14);
}


#messages .bot-row:first-child .bot-message {
    display: flex;
    align-items: left;
    justify-content: left;

    width: min(100%, 540px);
    max-width: 82%;
    min-height: 150px;

    padding: 30px 30px;

    text-align: left;
    line-height: 1.55;
}


/* ==================================================
   TÍTULO DEFINITIVO DEL ASISTENTE
================================================== */

.assistant-copy {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 410px;

    margin-inline: auto;
    padding-inline: 20px;

    text-align: center;
}

#assistant-title {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 5px !important;

    width: 100% !important;
    max-width: 370px !important;

    margin: 0 auto 15px !important;
    padding: 0 !important;

    font-family: "Montserrat", sans-serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;

    color: #ffffff !important;
    text-align: center !important;
    text-transform: none !important;
}

#assistant-title span {
    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    font: inherit !important;
    font-size: 18px !important;
    color: #ffffff !important;
}

#assistant-title strong {
    display: block !important;

    max-width: 350px;

    margin: 0 !important;
    padding: 0 !important;

    font-family: "Montserrat", sans-serif !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;

    color: var(--mad-yellow) !important;
    text-transform: none !important;
}

.assistant-copy > p {
    max-width: 390px;
    margin: 0 auto !important;

    color: rgba(255, 255, 255, 0.86);
    font-size: 14px !important;
    line-height: 1.65;
}

@media (max-width: 560px) {
    #assistant-title {
        max-width: 310px !important;
        font-size: 16px !important;
    }

    #assistant-title span {
        font-size: 16px !important;
    }

    #assistant-title strong {
        max-width: 300px;
        font-size: 19px !important;
    }

    .assistant-copy > p {
        max-width: 320px;
        font-size: 13px !important;
    }
}




/* ==================================================
   RESPUESTAS RÁPIDAS DEL ASISTENTE
================================================== */

.message-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    width: 100%;
    margin-top: 13px;
}

.message-quick-reply {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;

    padding: 7px 12px;

    border: 1px solid rgba(66, 107, 175, 0.35);
    border-radius: 999px;

    color: var(--mad-blue-dark);
    font-size: 0.74rem;
    font-weight: 800;

    background: #ffffff;

    transition:
        transform 150ms ease,
        border-color 150ms ease,
        background 150ms ease,
        opacity 150ms ease;
}

.message-quick-reply:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: var(--mad-blue);
    background: var(--mad-blue-soft);
}

.message-quick-reply:disabled {
    cursor: default;
    opacity: 0.48;
}






/* ==================================================
   RESULTADOS DE BÚSQUEDA VISUAL
================================================== */

.visual-match-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(145px, 1fr)
        );

    width: 100%;
    gap: 10px;
    margin-top: 15px;

    white-space: normal;
}

.visual-match-card {
    min-width: 0;
    overflow: hidden;

    border: 1px solid
        rgba(66, 107, 175, 0.2);
    border-radius: 14px;

    background: #ffffff;

    box-shadow:
        0 7px 18px
        rgba(40, 79, 142, 0.08);

    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.visual-match-card:hover {
    transform: translateY(-2px);

    border-color:
        rgba(66, 107, 175, 0.46);

    box-shadow:
        0 11px 24px
        rgba(40, 79, 142, 0.14);
}

.visual-match-image-link {
    display: block;

    width: 100%;
    height: 118px;

    overflow: hidden;

    color: var(--muted);
    text-decoration: none;

    background: #e9eef6;
}

.visual-match-image-link.is-unavailable {
    display: grid;
    place-items: center;

    padding: 12px;

    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
}

.visual-match-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;

    transition:
        transform 220ms ease;
}

.visual-match-card:hover
.visual-match-image {
    transform: scale(1.035);
}

.visual-match-content {
    display: flex;
    min-height: 66px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;

    padding: 10px 11px;
}

.visual-match-title {
    display: block;

    color: var(--mad-blue-dark);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1.35;

    overflow-wrap: anywhere;
}

.visual-match-confidence {
    display: block;

    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.3;
    text-transform: capitalize;
}

@media (max-width: 560px) {
    .visual-match-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

    .visual-match-image-link {
        height: 108px;
    }
}

@media (max-width: 370px) {
    .visual-match-grid {
        grid-template-columns: 1fr;
    }

    .visual-match-image-link {
        height: 120px;
    }
}

/* ==================================================
   AJUSTE 2026-07-31:
   MASCOTA ESTABLE Y EXPERIENCIA MÓVIL
================================================== */

/*
 * Las tres imágenes normalizadas usan el mismo lienzo.
 * Estas reglas impiden que un estado cambie de tamaño
 * respecto a los demás.
 */
#mascot-image.mascot-image {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain;
    object-position: center;
}

@media (max-width: 900px) {
    html,
    body {
        width: 100%;
        height: 100%;
        min-height: 100%;
        overflow: hidden;
    }

    body {
        background: var(--surface);
    }

    .app-shell {
        display: flex;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        margin: 0;
        flex-direction: column;
        overflow: hidden;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .assistant-panel {
        display: grid;
        min-height: 0;
        flex: 0 0 auto;
        grid-template-columns: 104px minmax(0, 1fr) auto;
        grid-template-areas: "mascot copy status";
        align-items: center;
        justify-content: initial;
        gap: 14px;
        padding:
            max(12px, env(safe-area-inset-top))
            18px
            12px;
        overflow: hidden;
        text-align: left;
    }

    .assistant-panel::after {
        right: -72px;
        bottom: -96px;
        width: 190px;
        height: 190px;
        border-width: 32px;
    }

    .corner-logo {
        display: none;
    }

    .mascot-stage {
        grid-area: mascot;
        width: 104px;
        height: 104px;
        margin: 0;
        border-radius: 28px;
    }

    .assistant-copy {
        grid-area: copy;
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        text-align: left;
    }

    #assistant-title {
        align-items: flex-start !important;
        max-width: none !important;
        margin: 0 !important;
        gap: 2px !important;
        text-align: left !important;
    }

    #assistant-title span {
        font-size: 0.78rem !important;
        line-height: 1.2 !important;
    }

    #assistant-title strong {
        max-width: none;
        font-size: 1.04rem !important;
        line-height: 1.2 !important;
    }

    .assistant-copy > p {
        max-width: 510px;
        margin-top: 6px !important;
        font-size: 0.75rem !important;
        line-height: 1.4;
    }

    .assistant-status {
        grid-area: status;
        align-self: center;
        margin: 0;
        padding: 8px 11px;
        white-space: nowrap;
        font-size: 0.72rem;
    }

    .chat-panel {
        min-width: 0;
        min-height: 0;
        flex: 1 1 auto;
        padding:
            15px
            18px
            max(10px, env(safe-area-inset-bottom));
        overflow: hidden;
    }

    .chat-header {
        flex: 0 0 auto;
        padding-bottom: 12px;
    }

    .chat-header h2 {
        font-size: 1.22rem;
    }

    .ghost-button {
        padding: 8px 11px;
        font-size: 0.73rem;
    }

    .messages {
        min-height: 0;
        max-height: none;
        flex: 1 1 auto;
        margin: 12px -4px 0 0;
        padding-right: 4px;
        overscroll-behavior: contain;
    }

    .message-row {
        gap: 8px;
        margin-bottom: 12px;
    }

    .mini-avatar {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
        border-radius: 9px;
        font-size: 0.76rem;
    }

    .message {
        max-width: min(86%, 560px);
        padding: 11px 13px;
        font-size: 0.85rem;
        line-height: 1.48;
    }

    #messages .bot-row:first-child .bot-message {
        display: block;
        width: auto;
        max-width: min(86%, 560px);
        min-height: 0;
        padding: 11px 13px;
        text-align: left;
        line-height: 1.48;
    }

    .quick-actions {
        flex: 0 0 auto;
        margin: 8px 0 10px;
    }

    .quick-action {
        min-height: 35px;
        padding: 8px 10px;
        font-size: 0.7rem;
    }

    .image-preview-wrapper {
        flex: 0 0 auto;
        margin-bottom: 8px;
        padding: 8px;
    }

    .chat-form {
        flex: 0 0 auto;
        border-radius: 16px;
    }

    .chat-form textarea {
        min-height: 43px;
        padding: 10px 5px;
        /*
         * 16 px evita el zoom automático de iOS al
         * enfocar el campo.
         */
        font-size: 16px;
        line-height: 1.35;
    }

    .disclaimer {
        flex: 0 0 auto;
        margin-top: 7px;
        font-size: 0.62rem;
        line-height: 1.35;
    }
}

@media (max-width: 560px) {
    .assistant-panel {
        grid-template-columns: 86px minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "mascot copy"
            "mascot status";
        gap: 4px 12px;
        padding:
            max(8px, env(safe-area-inset-top))
            12px
            8px;
    }

    .mascot-stage {
        width: 86px;
        height: 86px;
        border-radius: 23px;
    }

    #assistant-title span {
        font-size: 0.7rem !important;
    }

    #assistant-title strong {
        font-size: 0.9rem !important;
    }

    .assistant-copy > p {
        display: none;
    }

    .assistant-status {
        justify-self: start;
        padding: 6px 9px;
        font-size: 0.66rem;
    }

    .status-dot {
        width: 7px;
        height: 7px;
        box-shadow: 0 0 0 4px rgba(97, 229, 159, 0.14);
    }

    .chat-panel {
        padding:
            12px
            12px
            max(8px, env(safe-area-inset-bottom));
    }

    .chat-header {
        align-items: center;
        gap: 10px;
        padding-bottom: 10px;
    }

    .chat-header h2 {
        font-size: 1.05rem;
        line-height: 1.2;
    }

    .messages {
        margin-top: 10px;
    }

    .message {
        max-width: calc(100% - 36px);
        font-size: 0.82rem;
    }

    #messages .bot-row:first-child .bot-message {
        max-width: calc(100% - 36px);
    }

    .quick-actions {
        gap: 6px;
        margin: 6px 0 8px;
    }

    .quick-action {
        min-height: 33px;
        padding: 7px 9px;
        font-size: 0.67rem;
    }

    .icon-button,
    .send-button {
        width: 41px;
        height: 41px;
        border-radius: 12px;
    }

    .chat-form {
        grid-template-columns: 41px minmax(0, 1fr) 41px;
        gap: 6px;
        padding: 6px;
    }

    .send-button {
        justify-content: center;
        padding: 0;
        font-size: 0;
    }

    .send-button span {
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .assistant-panel {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 3px 10px;
    }

    .mascot-stage {
        width: 76px;
        height: 76px;
        border-radius: 20px;
    }

    #assistant-title strong {
        font-size: 0.82rem !important;
    }

    .assistant-status {
        padding: 5px 8px;
    }

    .chat-panel {
        padding-inline: 9px;
    }
}

@media (max-width: 900px) and (max-height: 650px) {
    .assistant-panel {
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-areas:
            "mascot copy"
            "mascot status";
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .mascot-stage {
        width: 72px;
        height: 72px;
    }

    .assistant-copy > p {
        display: none;
    }

    .quick-actions {
        margin-block: 5px 6px;
    }

    .disclaimer {
        display: none;
    }
}

/* ==================================================
   ACTUALIZACIÓN DE ACCIONES RÁPIDAS — PELIK v27
   Mantiene la estética actual y permite cinco accesos
   sin saturar la interfaz.
================================================== */

@media (min-width: 901px) {
    .quick-actions {
        flex-wrap: wrap;
        overflow-x: visible;
        row-gap: 8px;
    }
}

.quick-action-featured {
    border-color: rgba(251, 200, 14, 0.78);
    background: var(--mad-yellow-soft);
}

.quick-action-featured:hover {
    border-color: var(--mad-yellow);
    background: #FFF1AC;
}

@media (max-width: 900px) {
    .quick-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .quick-action {
        scroll-snap-align: start;
    }
}
