:root {
    --wpca-accent: #F39ca5;
    --wpca-accent-rgb: 243, 156, 165;
    --wpca-accent-deep: #c9707b;
    --wpca-accent-soft: #fce6e8;
    --wpca-accent-mist: #fdf1f2;
    --wpca-accent-ink: #6d3943;
    --wpca-text: #ffffff;
    --wpca-panel-bg: linear-gradient(180deg, #fff7f9 0%, #ffffff 100%);
    --wpca-ink: #452832;
}

#wpca-chatbot-root,
#wpca-chatbot-root * {
    box-sizing: border-box;
}

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

[hidden] {
    display: none !important;
}

#wpca-chatbot-root {
    position: fixed;
    right: 24px;
    bottom: 82px;
    z-index: 999999;
    font-family: "Aptos", "Segoe UI", sans-serif;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.wpca-launcher-shell {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

#wpca-chatbot-root.is-intro-active .wpca-launcher-shell {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(0.96);
}

.wpca-intro-cari {
    position: fixed;
    left: 50%;
    top: 50%;
    width: min(280px, calc(100vw - 32px));
    display: grid;
    justify-items: center;
    gap: 12px;
    pointer-events: none;
    z-index: 1000000;
    transform: translate(-50%, -50%) scale(1);
    animation: wpca-cari-intro-arrive 620ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.wpca-intro-cari.is-returning {
    animation: wpca-cari-intro-return 1150ms cubic-bezier(0.34, 1.1, 0.64, 1) both;
}

.wpca-intro-cari__bubble {
    max-width: 260px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.97);
    color: var(--wpca-ink);
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.18);
    box-shadow:
        0 20px 46px rgba(34, 24, 28, 0.16),
        0 10px 22px rgba(var(--wpca-accent-rgb), 0.14);
    font-size: 14px;
    line-height: 1.38;
    text-align: center;
}

.wpca-intro-cari__avatar .wpca-dock__avatar.wpca-cari-avatar {
    width: 116px;
    height: 116px;
}

@media (max-width: 640px) {
    .wpca-intro-cari__avatar .wpca-dock__avatar.wpca-cari-avatar {
        width: 82px;
        height: 82px;
    }
}

.wpca-launcher:hover .wpca-cari-img-wrap,
.wpca-launcher:focus-visible .wpca-cari-img-wrap,
.wpca-dock:hover .wpca-cari-img-wrap,
.wpca-dock:focus-visible .wpca-cari-img-wrap {
    animation: wpca-cari-edge-hover 900ms ease-in-out both;
}

.wpca-idle-bubble {
    position: absolute;
    width: max-content;
    max-width: min(240px, calc(100vw - 32px));
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--wpca-ink);
    font-size: 13px;
    line-height: 1.35;
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.16);
    box-shadow:
        0 16px 34px rgba(34, 24, 28, 0.14),
        0 8px 18px rgba(var(--wpca-accent-rgb), 0.12);
    transform: translateY(6px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    white-space: normal;
    overflow-wrap: break-word;
    transition: opacity 180ms ease, transform 180ms ease;
    z-index: 3;
}

.wpca-idle-bubble::after {
    content: "";
    position: absolute;
    width: 14px;
    height: 14px;
    background: inherit;
    transform: rotate(45deg);
}

.wpca-idle-bubble.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.wpca-idle-bubble.is-launcher {
    right: calc(100% - 94px);
    bottom: 56px;
}

.wpca-idle-bubble.is-launcher::after {
    right: -8px;
    bottom: 24px;
    border-top: 1px solid rgba(var(--wpca-accent-rgb), 0.16);
    border-right: 1px solid rgba(var(--wpca-accent-rgb), 0.16);
}

.wpca-idle-bubble.is-dock {
    right: calc(100% - 42px);
    bottom: 44px;
}

.wpca-idle-bubble.is-dock::after {
    right: -8px;
    bottom: 20px;
    border-top: 1px solid rgba(var(--wpca-accent-rgb), 0.16);
    border-right: 1px solid rgba(var(--wpca-accent-rgb), 0.16);
}

.wpca-idle-bubble.is-panel {
    right: calc(100% - 96px);
    top: 18px;
}

.wpca-idle-bubble.is-panel::after {
    right: -8px;
    top: 24px;
    border-top: 1px solid rgba(var(--wpca-accent-rgb), 0.16);
    border-right: 1px solid rgba(var(--wpca-accent-rgb), 0.16);
}

.wpca-launcher {
    display: inline-grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.46), transparent 34%),
        linear-gradient(145deg, #ffffff, var(--wpca-accent-mist) 72%, #ffffff);
    color: var(--wpca-ink);
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    box-shadow:
        0 26px 56px rgba(34, 24, 28, 0.18),
        0 12px 30px rgba(var(--wpca-accent-rgb), 0.16);
    cursor: pointer;
    min-width: 312px;
    max-width: min(360px, calc(100vw - 24px));
    backdrop-filter: blur(14px);
    transition: transform 160ms ease, box-shadow 160ms ease;
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.18);
    text-align: left;
    position: relative;
    overflow: visible;
    animation: wpca-launcher-enter 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.wpca-launcher-shell:not([hidden]) .wpca-launcher__cta::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    border: 2px solid rgba(var(--wpca-accent-rgb), 0.5);
    animation: wpca-cta-ring 2s ease-out 0.6s 2;
    pointer-events: none;
}

.wpca-minimize {
    appearance: none;
    border: 0;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.92);
    color: var(--wpca-accent-deep);
    box-shadow:
        0 12px 24px rgba(34, 24, 28, 0.12),
        0 6px 16px rgba(var(--wpca-accent-rgb), 0.1);
    cursor: pointer;
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.18);
    font-size: 24px;
    line-height: 1;
    flex: 0 0 auto;
}

.wpca-minimize--panel {
    background: rgba(255, 255, 255, 0.18);
    color: var(--wpca-text);
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: none;
}

.wpca-dock {
    appearance: none;
    border: 0;
    width: 58px;
    min-height: 122px;
    border-radius: 24px 0 0 24px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 10px;
    padding: 14px 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(var(--wpca-accent-rgb), 0.12)),
        #ffffff;
    color: var(--wpca-accent-deep);
    box-shadow:
        0 24px 48px rgba(34, 24, 28, 0.18),
        0 10px 24px rgba(var(--wpca-accent-rgb), 0.16);
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.18);
    transform: translateX(16px);
    cursor: pointer;
}

.wpca-dock__avatar {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(var(--wpca-accent-rgb), 0.16);
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.2);
}

.wpca-launcher__avatar.is-idle-nudge,
.wpca-dock__avatar.is-idle-nudge,
.wpca-avatar.is-idle-nudge {
    animation: wpca-avatar-nudge 1.9s ease-in-out infinite;
}

.wpca-dock__icon {
    font-size: 24px;
    line-height: 1;
}

.wpca-launcher:hover,
.wpca-launcher:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 30px 60px rgba(34, 24, 28, 0.2),
        0 16px 34px rgba(var(--wpca-accent-rgb), 0.2);
}

.wpca-launcher__avatar {
    width: 54px;
    height: 54px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(var(--wpca-accent-rgb), 0.24), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 12px 24px rgba(var(--wpca-accent-rgb), 0.14);
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.wpca-cari-motion {
    transform-origin: 50% 92%;
    will-change: transform;
    animation: wpca-cari-think 3.6s ease-in-out infinite;
}

.wpca-cari-motion.is-thinking {
    animation: wpca-cari-think 3.6s ease-in-out infinite;
}

.wpca-cari-motion.is-happy {
    animation: wpca-cari-happy 0.62s ease-in-out 2 both;
}

.wpca-cari-motion.is-greeting {
    animation: wpca-cari-greet 1.5s ease-in-out infinite;
}

.wpca-avatar-anim.wpca-cari-motion {
    animation: none;
}

.wpca-launcher__content {
    display: grid;
    gap: 3px;
    text-align: left;
    min-width: 0;
    flex: 1 1 auto;
    position: relative;
    z-index: 1;
}

.wpca-launcher__eyebrow {
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wpca-accent-deep);
    opacity: 0.92;
}

.wpca-launcher__label {
    font-size: 16px;
    line-height: 1.2;
    color: var(--wpca-ink);
}

.wpca-launcher__description {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(69, 40, 50, 0.7);
}

.wpca-launcher__cta {
    display: inline-grid;
    justify-items: center;
    gap: 6px;
    padding: 10px 10px 8px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--wpca-accent-deep), var(--wpca-accent));
    color: var(--wpca-text);
    min-width: 72px;
    box-shadow: 0 14px 26px rgba(var(--wpca-accent-rgb), 0.22);
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
    position: relative;
    z-index: 1;
}

.wpca-launcher__pulse {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18);
    flex: 0 0 auto;
}

.wpca-launcher__ornaments {
    position: absolute;
    inset: -14px -10px -12px -10px;
    pointer-events: none;
}

.wpca-motif {
    position: absolute;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.22);
    box-shadow:
        0 12px 28px rgba(34, 24, 28, 0.12),
        0 6px 18px rgba(var(--wpca-accent-rgb), 0.12);
    color: var(--wpca-accent-deep);
    opacity: 0;
}

.wpca-motif svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.wpca-motif circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.wpca-motif--cross svg {
    fill: currentColor;
    stroke: none;
}

.wpca-launcher__ornaments .wpca-motif--cross {
    top: -10px;
    right: 68px;
    animation: wpca-motif-pop-a 7.4s ease-in-out infinite;
}

.wpca-launcher__ornaments .wpca-motif--stethoscope {
    left: -12px;
    bottom: 12px;
    animation: wpca-motif-pop-b 8.1s ease-in-out infinite 1s;
}

.wpca-launcher__ornaments .wpca-motif--syringe {
    right: -8px;
    top: 10px;
    animation: wpca-motif-pop-c 7.8s ease-in-out infinite 2s;
}

.wpca-panel {
    width: min(420px, calc(100vw - 24px));
    height: min(640px, calc(100svh - 110px));
    max-height: calc(100svh - 110px);
    margin-top: 12px;
    border-radius: 32px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at top right, rgba(var(--wpca-accent-rgb), 0.34), transparent 30%),
        radial-gradient(circle at bottom left, rgba(var(--wpca-accent-rgb), 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.18);
    box-shadow:
        0 40px 90px rgba(31, 20, 25, 0.22),
        0 18px 44px rgba(var(--wpca-accent-rgb), 0.18);
    animation: wpca-rise 240ms ease;
    backdrop-filter: blur(22px);
    position: relative;
}

.wpca-panel[hidden] {
    display: none !important;
}

.wpca-panel-cari {
    position: absolute;
    right: 18px;
    bottom: -34px;
    width: 82px;
    height: 82px;
    pointer-events: none;
    z-index: 12;
}

.wpca-panel-cari .wpca-avatar-anim.wpca-cari-avatar {
    width: 82px;
    height: 82px;
}

.wpca-panel-cari .wpca-cari-bubble {
    display: none;
}

@media (max-width: 640px) {
    .wpca-panel-cari {
        right: 12px;
        bottom: -28px;
        width: 66px;
        height: 66px;
    }

    .wpca-panel-cari .wpca-avatar-anim.wpca-cari-avatar {
        width: 66px;
        height: 66px;
    }
}

.wpca-panel__header {
    padding: 18px 18px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background:
        linear-gradient(140deg, rgba(var(--wpca-accent-rgb), 0.96), rgba(var(--wpca-accent-rgb), 0.78)),
        linear-gradient(90deg, rgba(19, 31, 39, 0.82), transparent);
    color: var(--wpca-text);
    position: relative;
    isolation: isolate;
}

.wpca-panel__halo {
    position: absolute;
    inset: -24px auto auto -32px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.34), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.wpca-header__identity {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.wpca-avatar {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 14px 28px rgba(46, 23, 30, 0.22);
    flex: 0 0 auto;
    overflow: hidden;
}

.wpca-avatar__face {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

.wpca-avatar__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wpca-eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.76;
}

.wpca-panel__header h2 {
    margin: 0;
    font-size: 23px;
    line-height: 1.15;
    color: #ffffff;
}

.wpca-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wpca-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.wpca-close {
    appearance: none;
    border: 0;
    background: rgba(255, 255, 255, 0.18);
    color: var(--wpca-text);
    width: 38px;
    height: 38px;
    border-radius: 14px;
    font-size: 24px;
    cursor: pointer;
}

.wpca-panel__hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 8px;
    position: relative;
    overflow: hidden;
}

.wpca-panel__hero-copy {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.wpca-panel__eyebrow,
.wpca-panel__title {
    margin: 0;
}

.wpca-panel__eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--wpca-accent-ink);
}

.wpca-panel__title {
    margin-top: 5px;
    font-size: 15px;
    font-weight: 700;
    color: var(--wpca-ink);
}

.wpca-panel__intro {
    margin: 8px 0 0;
    max-width: 28ch;
    color: rgba(69, 40, 50, 0.78);
    font-size: 14px;
    line-height: 1.45;
}

.wpca-panel__hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 9px 14px;
    border-radius: 999px;
    background: linear-gradient(140deg, var(--wpca-accent-soft), #ffffff);
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.2);
    color: var(--wpca-accent-ink);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(var(--wpca-accent-rgb), 0.08);
    position: relative;
    z-index: 1;
}

.wpca-panel__motifs {
    position: absolute;
    inset: 8px 10px auto auto;
    width: 120px;
    height: 88px;
    pointer-events: none;
}

.wpca-panel__motifs .wpca-motif {
    opacity: 0.9;
    width: 28px;
    height: 28px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
}

.wpca-panel__motifs .wpca-motif svg {
    width: 15px;
    height: 15px;
}

.wpca-panel__motifs .wpca-motif--cross {
    top: 0;
    right: 8px;
    animation: wpca-panel-motif-a 9s ease-in-out infinite;
}

.wpca-panel__motifs .wpca-motif--stethoscope {
    top: 34px;
    right: 54px;
    animation: wpca-panel-motif-b 10s ease-in-out infinite 1.2s;
}

.wpca-panel__motifs .wpca-motif--syringe {
    top: 44px;
    right: 0;
    animation: wpca-panel-motif-c 8.5s ease-in-out infinite 2s;
}

.wpca-quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 4px 18px 8px;
}

.wpca-quick-actions__button {
    appearance: none;
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.46);
    background: #ffffff;
    color: var(--wpca-accent-deep);
    border-radius: 999px;
    padding: 10px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(var(--wpca-accent-rgb), 0.07);
    transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.wpca-quick-actions__button:hover,
.wpca-quick-actions__button:focus-visible {
    transform: translateY(-1px);
    background: var(--wpca-accent-mist);
    box-shadow: 0 12px 24px rgba(var(--wpca-accent-rgb), 0.12);
}

.wpca-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.wpca-message {
    display: flex;
}

.wpca-message--user {
    justify-content: flex-end;
}

.wpca-bubble {
    max-width: 85%;
    padding: 15px 16px;
    border-radius: 22px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--wpca-ink);
    background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.08);
    box-shadow:
        0 18px 34px rgba(35, 24, 28, 0.08),
        0 8px 18px rgba(var(--wpca-accent-rgb), 0.08);
}

.wpca-message--bot .wpca-bubble {
    border-top-left-radius: 8px;
}

.wpca-message--user .wpca-bubble {
    background: linear-gradient(135deg, var(--wpca-accent-deep), var(--wpca-accent));
    color: var(--wpca-text);
    border-color: transparent;
    border-top-right-radius: 8px;
}

.wpca-bubble p {
    margin: 0 0 10px;
}

.wpca-bubble p:last-child {
    margin-bottom: 0;
}

.wpca-sources {
    padding: 0 18px 12px;
    color: var(--wpca-accent-ink);
    font-size: 12px;
}

.wpca-sources ul {
    margin: 0;
    padding-left: 18px;
}

.wpca-sources a {
    color: var(--wpca-accent-deep);
    font-weight: 700;
}

.wpca-form {
    margin: 0 16px 0;
    padding: 12px;
    border-top: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 10px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.94)),
        linear-gradient(90deg, rgba(var(--wpca-accent-rgb), 0.04), transparent);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.14);
    border-radius: 22px;
    box-shadow:
        0 18px 32px rgba(34, 24, 28, 0.08),
        0 8px 18px rgba(var(--wpca-accent-rgb), 0.08);
}

.wpca-form textarea {
    resize: none;
    min-height: 52px;
    max-height: 140px;
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.22);
    border-radius: 18px;
    padding: 14px 16px;
    font: inherit;
    color: var(--wpca-ink);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.wpca-form button {
    border: 0;
    border-radius: 18px;
    min-height: 52px;
    padding: 0 20px;
    background: linear-gradient(135deg, var(--wpca-accent-deep), var(--wpca-accent));
    color: var(--wpca-text);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 26px rgba(var(--wpca-accent-rgb), 0.2);
}

.wpca-footnote {
    margin: 10px 18px 16px;
    text-align: center;
    font-size: 11px;
    line-height: 1.35;
    color: rgba(69, 40, 50, 0.58);
}

.wpca-bubble--typing {
    min-width: 74px;
    padding: 14px 18px;
}

.wpca-typing {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wpca-typing span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(166, 75, 93, 0.7);
    animation: wpca-typing 1s ease-in-out infinite;
}

.wpca-typing span:nth-child(2) {
    animation-delay: 0.16s;
}

.wpca-typing span:nth-child(3) {
    animation-delay: 0.32s;
}

.wpca-language {
    padding: 14px 18px 10px;
    border-bottom: 1px solid rgba(var(--wpca-accent-rgb), 0.16);
    background: rgba(255, 255, 255, 0.72);
}

.wpca-language__label {
    margin: 0 0 4px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--wpca-accent-ink);
}

.wpca-language__hint {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(var(--wpca-accent-rgb), 0.78);
}

.wpca-language__choices {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wpca-language__button {
    appearance: none;
    border: 1px solid rgba(var(--wpca-accent-rgb), 0.3);
    background: #ffffff;
    color: var(--wpca-accent-ink);
    border-radius: 999px;
    padding: 8px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.wpca-language__button.is-active {
    background: linear-gradient(135deg, var(--wpca-accent-deep), var(--wpca-accent));
    color: #ffffff;
    border-color: transparent;
}

.wpca-messages::-webkit-scrollbar {
    width: 10px;
}

.wpca-messages::-webkit-scrollbar-thumb {
    background: rgba(var(--wpca-accent-rgb), 0.22);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.wpca-form.is-loading button,
.wpca-form button:disabled {
    opacity: 0.7;
    cursor: progress;
}

@media (max-width: 640px) {
    #wpca-chatbot-root {
        right: 10px;
        left: 10px;
        bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    .wpca-launcher-shell {
        width: 100%;
        justify-content: flex-end;
    }

    .wpca-launcher {
        margin-left: auto;
        max-width: min(100%, 100%);
        min-width: 0;
    }

    .wpca-launcher__ornaments .wpca-motif--cross {
        right: 54px;
    }

    .wpca-panel {
        width: 100%;
        height: min(78svh, 700px);
        max-height: calc(100svh - 88px);
        border-radius: 28px;
    }

    .wpca-panel__header {
        padding: 18px 18px 14px;
    }

    .wpca-panel__header h2 {
        font-size: 20px;
    }

    .wpca-avatar {
        width: 58px;
        height: 58px;
        border-radius: 20px;
    }

    .wpca-messages {
        padding: 16px;
        gap: 12px;
    }

    .wpca-bubble {
        max-width: 90%;
        padding: 13px 14px;
    }

    .wpca-sources {
        padding: 0 16px 10px;
    }

    .wpca-form {
        margin: 0 14px 0;
        padding: 12px;
        gap: 8px;
    }

    .wpca-dock {
        width: 52px;
        min-height: 104px;
        transform: translateX(12px);
    }

    .wpca-idle-bubble.is-launcher {
        right: calc(100% - 78px);
        bottom: 54px;
    }

    .wpca-idle-bubble.is-dock {
        right: calc(100% - 38px);
        bottom: 34px;
    }

    .wpca-idle-bubble.is-panel {
        right: calc(100% - 82px);
        top: 22px;
    }

    .wpca-language {
        padding: 12px 16px 8px;
    }
}

@media (max-width: 480px) {
    #wpca-chatbot-root {
        right: 8px;
        left: 8px;
    }

    .wpca-launcher {
        width: 100%;
        max-width: 100%;
        font-size: 14px;
        grid-template-columns: auto 1fr;
    }

    .wpca-launcher__cta {
        grid-column: 1 / -1;
        justify-self: start;
        padding: 8px 12px;
        min-width: 0;
        grid-auto-flow: column;
        align-items: center;
    }

    .wpca-launcher__ornaments {
        inset: -10px -4px -10px -4px;
    }

    .wpca-launcher__ornaments .wpca-motif--stethoscope,
    .wpca-launcher__ornaments .wpca-motif--syringe {
        display: none;
    }

    .wpca-minimize {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        font-size: 22px;
    }

    .wpca-dock {
        width: 48px;
        min-height: 92px;
        border-radius: 18px 0 0 18px;
        padding: 10px 8px;
        gap: 8px;
    }

    .wpca-idle-bubble {
        max-width: min(220px, calc(100vw - 32px));
        font-size: 12px;
        padding: 9px 11px;
    }

    .wpca-idle-bubble.is-launcher {
        right: calc(100% - 68px);
        bottom: 62px;
    }

    .wpca-idle-bubble.is-dock {
        right: calc(100% - 36px);
        bottom: 22px;
    }

    .wpca-idle-bubble.is-panel {
        right: calc(100% - 70px);
        top: 18px;
    }

    .wpca-panel {
        height: min(82svh, 760px);
        max-height: calc(100svh - 72px);
        border-radius: 24px;
    }

    .wpca-header__identity {
        gap: 10px;
    }

    .wpca-avatar {
        width: 46px;
        height: 46px;
    }

    .wpca-panel__header h2 {
        font-size: 18px;
    }

    .wpca-eyebrow {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .wpca-close {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        font-size: 22px;
    }

    .wpca-status-pill {
        display: none;
    }

    .wpca-messages {
        padding: 14px;
    }

    .wpca-sources ul {
        padding-left: 16px;
    }

    .wpca-form {
        grid-template-columns: 1fr;
    }

    .wpca-form button {
        width: 100%;
    }

    .wpca-language__choices {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpca-panel,
    .wpca-launcher,
    .wpca-dock,
    .wpca-idle-bubble,
    .wpca-typing span,
    .wpca-motif,
    .wpca-launcher__avatar.is-idle-nudge,
    .wpca-dock__avatar.is-idle-nudge,
    .wpca-avatar.is-idle-nudge,
    .wpca-launcher-shell:not([hidden]) .wpca-launcher__cta::after {
        animation: none !important;
        transition: none !important;
    }
}

@keyframes wpca-rise {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wpca-typing {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    40% {
        transform: translateY(-3px);
        opacity: 1;
    }
}

@keyframes wpca-motif-pop-a {
    0%, 12%, 100% {
        opacity: 0;
        transform: translate3d(0, 10px, 0) scale(0.82) rotate(-10deg);
    }
    20%, 54% {
        opacity: 1;
        transform: translate3d(0, -6px, 0) scale(1) rotate(0deg);
    }
    66% {
        opacity: 0;
        transform: translate3d(0, -16px, 0) scale(0.9) rotate(6deg);
    }
}

@keyframes wpca-motif-pop-b {
    0%, 16%, 100% {
        opacity: 0;
        transform: translate3d(-4px, 10px, 0) scale(0.78) rotate(-14deg);
    }
    24%, 58% {
        opacity: 1;
        transform: translate3d(2px, -8px, 0) scale(1) rotate(2deg);
    }
    70% {
        opacity: 0;
        transform: translate3d(6px, -18px, 0) scale(0.88) rotate(12deg);
    }
}

@keyframes wpca-motif-pop-c {
    0%, 10%, 100% {
        opacity: 0;
        transform: translate3d(0, 8px, 0) scale(0.8) rotate(14deg);
    }
    18%, 48% {
        opacity: 1;
        transform: translate3d(-2px, -10px, 0) scale(1) rotate(4deg);
    }
    60% {
        opacity: 0;
        transform: translate3d(-4px, -18px, 0) scale(0.86) rotate(-8deg);
    }
}

@keyframes wpca-panel-motif-a {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-8px, -10px, 0) scale(1.06);
    }
}

@keyframes wpca-panel-motif-b {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    50% {
        transform: translate3d(8px, -6px, 0) rotate(7deg);
    }
}

@keyframes wpca-panel-motif-c {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(-6px, -12px, 0) scale(0.96);
    }
}

@keyframes wpca-avatar-nudge {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    20% {
        transform: translate3d(-1px, -2px, 0) scale(1.02);
    }
    40% {
        transform: translate3d(1px, -4px, 0) scale(1.03);
    }
    60% {
        transform: translate3d(-1px, -2px, 0) scale(1.015);
    }
    80% {
        transform: translate3d(0, -1px, 0) scale(1.005);
    }
}

@keyframes wpca-cari-intro-arrive {
    from {
        opacity: 0;
        transform: translate(-50%, -42%) scale(0.72);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes wpca-cari-intro-return {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(50vw - 142px), calc(50vh - 166px)) scale(0.62);
    }
}

@keyframes wpca-cari-edge-hover {
    0%, 100% {
        transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(0) rotate(0deg) scale(1);
    }
    18% {
        transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(-8px) rotate(-5deg) scale(1.05);
    }
    36% {
        transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(-2px) rotate(5deg) scale(1.02);
    }
    56% {
        transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(-7px) rotate(-3deg) scale(1.04);
    }
    74% {
        transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(0) rotate(2deg) scale(1.01);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpca-intro-cari,
    .wpca-intro-cari.is-returning,
    .wpca-launcher:hover .wpca-cari-img-wrap,
    .wpca-launcher:focus-visible .wpca-cari-img-wrap,
    .wpca-dock:hover .wpca-cari-img-wrap,
    .wpca-dock:focus-visible .wpca-cari-img-wrap {
        animation: none !important;
    }
}

@keyframes wpca-launcher-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wpca-cta-ring {
    0% {
        opacity: 0.9;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.55);
    }
}

.wpca-launcher__cta {
    position: relative;
}

/* ══════════════════════════════════════════════
   CARI – freistehende Figur über dem Eingabefeld
   ══════════════════════════════════════════════ */

/* Stage: strip zwischen Nachrichten und Formular */
.wpca-cari-stage {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 72px 16px 4px;
    pointer-events: none;
    position: relative;
    overflow: visible;
    z-index: 4;
}

/* Wrapper – kein Hintergrund, kein Rahmen */
.wpca-avatar-anim {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
}

/* Das Bild selbst */
.wpca-cari-img-wrap {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
    transform-origin: center bottom;
    will-change: transform, filter;
}

.wpca-cari-img-wrap img,
.wpca-cari-img-wrap .wpca-avatar__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.18));
}

/* ── Gedankenblase (Thinking & Quip) ── */
.wpca-cari-bubble {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    left: auto;
    background: rgba(255,255,255,0.96);
    color: #444;
    font-size: 0.78rem;
    line-height: 1.45;
    padding: 6px 12px;
    border-radius: 14px;
    white-space: nowrap;
    max-width: 260px;
    white-space: normal;
    opacity: 0;
    transform: scale(0.8) translateY(6px);
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
    pointer-events: none;
    box-shadow: 0 3px 12px rgba(0,0,0,.14);
    z-index: 10;
}
.wpca-cari-bubble::after {
    content: "";
    position: absolute;
    bottom: -7px;
    right: 22px;
    border: 7px solid transparent;
    border-top-color: rgba(255,255,255,0.96);
}

/* Thinking state: keep Cari quiet unless a real quip is shown. */
.wpca-avatar-anim.is-thinking .wpca-cari-bubble {
    opacity: 0;
    transform: scale(0.8) translateY(6px);
    max-width: 60px;
    white-space: nowrap;
    font-style: italic;
    color: #6a8db5;
}

/* Quip state: volle Breite, leicht gefärbt */
.wpca-cari-bubble.is-quip {
    opacity: 1;
    transform: scale(1) translateY(0);
    min-width: 150px;
    max-width: 230px;
    white-space: normal;
    font-style: normal;
    color: #444;
    background: linear-gradient(135deg, #fff8fb 0%, #fff 100%);
    border: 1px solid rgba(243,156,165,.3);
}

.wpca-avatar-anim.is-thinking .wpca-cari-bubble.is-quip {
    opacity: 1;
    transform: scale(1) translateY(0);
    min-width: 150px;
    max-width: 230px;
    white-space: normal;
}

/* ────────────────────────────
   IDLE — sanftes Schweben
   ──────────────────────────── */
.wpca-cari-img-wrap {
    animation: wpca-cari-think 3.6s ease-in-out infinite;
}

@keyframes wpca-cari-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    35%       { transform: translateY(-6px) rotate(1deg); }
    65%       { transform: translateY(-3px) rotate(-0.6deg); }
}

/* ────────────────────────────
   THINKING — bläulich, neigt sich, Gedankenblase
   ──────────────────────────── */
.wpca-avatar-anim.is-thinking .wpca-cari-img-wrap {
    animation: wpca-cari-think 3.6s ease-in-out infinite;
}

.wpca-avatar-anim.is-thinking .wpca-cari-bubble {
    opacity: 0;
    transform: scale(0.8) translateY(6px);
}

@keyframes wpca-cari-think {
    0%   { transform: translateX(var(--wpca-cari-shift-x, 0px)) rotate(-2.5deg) translateY(0); }
    50%  { transform: translateX(var(--wpca-cari-shift-x, 0px)) rotate(3deg) translateY(-7px); }
    100% { transform: translateX(var(--wpca-cari-shift-x, 0px)) rotate(-2.5deg) translateY(0); }
}

/* ────────────────────────────
   HAPPY — warm/golden, fröhlicher Bounce
   ──────────────────────────── */
.wpca-avatar-anim.is-happy .wpca-cari-img-wrap {
    animation: wpca-cari-happy 0.62s ease-in-out 2 both;
}

@keyframes wpca-cari-happy {
    0%   { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(0) scale(1, 1); }
    18%  { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(0) scale(1.07, .93); }
    50%  { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(-34px) scale(.96, 1.05); }
    78%  { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(0) scale(1.07, .93); }
    100% { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(0) scale(1, 1); }
}

/* ────────────────────────────
   GREETING — Wink-Sequenz, leicht pink
   ──────────────────────────── */
.wpca-avatar-anim.is-greeting .wpca-cari-img-wrap {
    animation: wpca-cari-greet 1.5s ease-in-out infinite;
    transform-origin: center bottom;
}

@keyframes wpca-cari-greet {
    0%, 100% { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(0) rotate(0deg); }
    25%      { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(-7px) rotate(1.6deg); }
    50%      { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(0) rotate(0deg); }
    75%      { transform: translateX(var(--wpca-cari-shift-x, 0px)) translateY(-7px) rotate(-1.6deg); }
}

/* ────────────────────────────
   Herzen & Funken (Happy)
   ──────────────────────────── */
.wpca-avatar-heart {
    position: absolute;
    font-size: 1rem;
    pointer-events: none;
    opacity: 0;
    user-select: none;
}

.wpca-avatar-heart--1 { top: 8px;  right: -10px; }
.wpca-avatar-heart--2 { top: 16px; left:  -12px; }
.wpca-avatar-heart--3 { top: 0;    right:  4px;  font-size: 0.72rem; }

.wpca-avatar-anim.is-happy .wpca-avatar-heart--1 {
    animation: wpca-heart-rise 1.3s ease-out 0.05s forwards;
}
.wpca-avatar-anim.is-happy .wpca-avatar-heart--2 {
    animation: wpca-heart-rise 1.2s ease-out 0.22s forwards;
}
.wpca-avatar-anim.is-happy .wpca-avatar-heart--3 {
    animation: wpca-heart-rise 1.1s ease-out 0.4s forwards;
}

@keyframes wpca-heart-rise {
    0%   { opacity: 0.9; transform: translateY(0)    scale(1); }
    100% { opacity: 0;   transform: translateY(-36px) scale(0.5); }
}

/* ────────────────────────────
   Reduced motion
   ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .wpca-cari-img-wrap,
    .wpca-avatar-anim.is-thinking .wpca-cari-img-wrap,
    .wpca-avatar-anim.is-happy    .wpca-cari-img-wrap,
    .wpca-avatar-anim.is-greeting .wpca-cari-img-wrap,
    .wpca-avatar-heart {
        animation: none !important;
        filter: none !important;
    }
    .wpca-avatar-anim.is-thinking .wpca-cari-bubble {
        opacity: 0;
        transform: none;
    }
}

.wpca-cari-avatar {
    position: relative;
    display: inline-grid;
    place-items: center;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    transform-origin: 50% 92%;
    will-change: transform;
    --wpca-cari-shift-x: 0px;
    z-index: 3;
}

.wpca-launcher__avatar.wpca-cari-avatar {
    width: 70px;
    height: 70px;
    margin: -8px 0;
    border-radius: 0;
}

.wpca-dock__avatar.wpca-cari-avatar {
    width: 48px;
    height: 48px;
    border-radius: 0;
}

.wpca-avatar-anim.wpca-cari-avatar {
    width: 96px;
    height: 96px;
}

.wpca-cari-avatar .wpca-cari-img-wrap,
.wpca-cari-avatar.wpca-avatar-anim.is-thinking .wpca-cari-img-wrap,
.wpca-cari-avatar.wpca-avatar-anim.is-happy .wpca-cari-img-wrap,
.wpca-cari-avatar.wpca-avatar-anim.is-greeting .wpca-cari-img-wrap {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    overflow: visible;
    animation: none;
    filter: none;
    position: relative;
    z-index: 2;
}

.wpca-cari-avatar__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(34, 24, 28, 0.22));
    user-select: none;
    pointer-events: none;
}

.wpca-cari-motion.is-thinking {
    animation: wpca-cari-think 3.6s ease-in-out infinite;
}

.wpca-cari-motion.is-happy {
    animation: wpca-cari-happy 0.62s ease-in-out 2 both;
}

.wpca-cari-motion.is-greeting {
    animation: wpca-cari-greet 1.5s ease-in-out infinite;
}

.wpca-cari-motion.is-happy .wpca-avatar-heart--1 {
    animation: wpca-heart-rise 1.3s ease-out 0.05s forwards;
}

.wpca-cari-motion.is-happy .wpca-avatar-heart--2 {
    animation: wpca-heart-rise 1.2s ease-out 0.22s forwards;
}

.wpca-cari-motion.is-happy .wpca-avatar-heart--3 {
    animation: wpca-heart-rise 1.1s ease-out 0.4s forwards;
}

.wpca-cari-avatar .wpca-cari-bubble {
    right: 8px;
    bottom: calc(100% + 34px);
    min-width: 150px;
    max-width: 230px;
    text-align: left;
    z-index: 40;
}

.wpca-cari-avatar .wpca-cari-bubble::after {
    right: 28px;
    bottom: -9px;
}

@media (prefers-reduced-motion: reduce) {
    .wpca-cari-motion,
    .wpca-cari-motion.is-thinking,
    .wpca-cari-motion.is-happy,
    .wpca-cari-motion.is-greeting {
        animation: none !important;
    }
}

.wpca-launcher-shell {
    align-items: center;
}

.wpca-launcher {
    min-width: 0;
    width: 104px;
    height: 112px;
    max-width: none;
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    text-align: center;
}

.wpca-launcher:hover,
.wpca-launcher:focus-visible {
    transform: translateY(-3px);
    box-shadow: none;
}

.wpca-launcher__avatar.wpca-cari-avatar {
    width: 104px;
    height: 104px;
    margin: 0;
}

.wpca-dock {
    width: 88px;
    min-height: 104px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.wpca-dock__avatar.wpca-cari-avatar {
    width: 82px;
    height: 82px;
}

.wpca-dock__icon {
    display: none;
}

.wpca-cari-face {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.wpca-cari-lid {
    position: absolute;
    z-index: 2;
    display: block;
    pointer-events: none;
    background: linear-gradient(180deg, #f7eff7 0%, #eaddec 100%);
    box-shadow: inset 0 -2px 4px rgba(130, 90, 120, 0.16);
    opacity: 0.96;
    transform: scaleY(0);
    animation: wpca-cari-blink 5.4s ease-in-out infinite;
}

.wpca-cari-lid--left-top {
    left: 32.6%;
    top: 27.4%;
    width: 12.6%;
    height: 8.2%;
    border-radius: 48% 48% 16% 16%;
    transform-origin: 50% 0%;
}

.wpca-cari-lid--left-bottom {
    left: 32.4%;
    top: 34.8%;
    width: 12.6%;
    height: 6.4%;
    border-radius: 16% 16% 48% 48%;
    transform-origin: 50% 100%;
}

.wpca-cari-lid--right-top {
    left: 57.4%;
    top: 30.8%;
    width: 14%;
    height: 8%;
    border-radius: 48% 48% 16% 16%;
    transform-origin: 50% 0%;
}

.wpca-cari-lid--right-bottom {
    left: 57.6%;
    top: 37.4%;
    width: 13.8%;
    height: 7.2%;
    border-radius: 16% 16% 48% 48%;
    transform-origin: 50% 100%;
}

@keyframes wpca-cari-blink {
    0%, 88%, 100% {
        transform: scaleY(0);
    }
    92%, 96% {
        transform: scaleY(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpca-cari-lid {
        animation: none !important;
    }
}

@media (max-width: 640px) {
    .wpca-cari-stage {
        justify-content: flex-end;
        padding: 70px 0 0 0;
        min-height: 124px;
    }

    .wpca-avatar-anim.wpca-cari-avatar {
        width: 64px !important;
        height: 64px !important;
        --wpca-cari-shift-x: 18px;
    }

    .wpca-cari-avatar .wpca-cari-bubble {
        right: -6px;
        bottom: calc(100% + 30px);
        min-width: 145px;
        max-width: min(230px, calc(100vw - 44px));
        font-size: 0.74rem;
        line-height: 1.35;
        padding: 7px 10px;
    }

    .wpca-cari-avatar .wpca-cari-bubble::after {
        right: 22px;
    }

    .wpca-form {
        margin-top: 2px;
    }
}

@media (max-width: 420px) {
    .wpca-cari-stage {
        min-height: 116px;
        padding-right: 0;
    }

    .wpca-avatar-anim.wpca-cari-avatar {
        width: 58px !important;
        height: 58px !important;
        --wpca-cari-shift-x: 22px;
    }

    .wpca-cari-avatar .wpca-cari-bubble {
        right: -10px;
        bottom: calc(100% + 28px);
        max-width: min(210px, calc(100vw - 38px));
        min-width: 132px;
    }

    .wpca-form {
        margin-right: 10px;
        margin-left: 10px;
    }
}

@media (max-width: 640px) {
    #wpca-chatbot-root {
        right: 6px;
        left: auto;
        bottom: calc(44px + env(safe-area-inset-bottom, 0px));
        max-width: calc(100vw - 12px);
        align-items: flex-end;
    }

    .wpca-launcher-shell {
        width: auto;
        justify-content: flex-end;
    }

    .wpca-launcher {
        width: 72px;
        height: 78px;
    }

    .wpca-launcher__avatar.wpca-cari-avatar {
        width: 72px;
        height: 72px;
    }

    .wpca-dock {
        width: 62px;
        min-height: 80px;
    }

    .wpca-dock__avatar.wpca-cari-avatar {
        width: 56px;
        height: 56px;
    }

    .wpca-panel {
        width: min(420px, calc(100vw - 16px));
        height: min(82svh, 700px);
        max-height: calc(100svh - 72px);
    }

    .wpca-cari-stage {
        min-height: 132px;
        padding: 78px 18px 8px 0;
    }

    .wpca-avatar-anim.wpca-cari-avatar {
        width: 58px !important;
        height: 58px !important;
        --wpca-cari-shift-x: 8px;
    }

    .wpca-cari-avatar .wpca-cari-bubble {
        right: 0;
        bottom: calc(100% + 32px);
        max-width: min(220px, calc(100vw - 54px));
        min-width: 138px;
        font-size: 0.74rem;
        line-height: 1.35;
        padding: 7px 10px;
    }

    .wpca-cari-avatar .wpca-cari-bubble::after {
        right: 22px;
    }

    .wpca-form {
        margin: 8px 12px 10px;
    }

    .wpca-idle-bubble.is-launcher,
    .wpca-idle-bubble.is-dock {
        display: none !important;
    }
}

@media (max-width: 420px) {
    #wpca-chatbot-root {
        right: 4px;
        max-width: calc(100vw - 8px);
    }

    .wpca-launcher {
        width: 64px;
        height: 70px;
    }

    .wpca-launcher__avatar.wpca-cari-avatar {
        width: 64px;
        height: 64px;
    }

    .wpca-panel {
        width: calc(100vw - 10px);
        max-height: calc(100svh - 64px);
    }

    .wpca-cari-stage {
        min-height: 126px;
        padding: 74px 14px 10px 0;
    }

    .wpca-avatar-anim.wpca-cari-avatar {
        width: 52px !important;
        height: 52px !important;
        --wpca-cari-shift-x: 8px;
    }

    .wpca-cari-avatar .wpca-cari-bubble {
        right: -2px;
        bottom: calc(100% + 30px);
        min-width: 130px;
        max-width: min(205px, calc(100vw - 42px));
    }

    .wpca-form {
        margin: 10px 10px 10px;
    }
}
