.meo-chat {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 100;
    display: grid;
    justify-items: end;
    gap: 10px;
    font: 14px/1.45 system-ui, sans-serif;
    color: #000;
}
.meo-chat button, .meo-chat input { font: inherit; }
.meo-chat button { cursor: pointer; }
.meo-chat [hidden] { display: none; }
.meo-launch {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}
.meo-face {
    display: grid;
    padding: 4px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 5px 18px #47312638;
}
.meo-face img { border-radius: 18px; }
.meo-panel {
    width: min(350px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid #ead7c5;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 48px #47312638;
    animation: meo-open .18s ease-out both;
}
.meo-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #fff;
}
.meo-header img { border-radius: 12px; }
.meo-header strong { flex: 1; font-size: 16px; }
.meo-close { border: 0; background: transparent; color: inherit; width: 36px; height: 36px; font-size: 22px !important; }
.meo-log {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: clamp(70px, calc(100dvh - 310px), 230px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
}
.meo-message {
    max-width: 86%;
    align-self: start;
    margin: 0;
    padding: 8px 10px;
    border-radius: 12px 12px 12px 3px;
    background: #f6f6f6;
    overflow-wrap: anywhere;
}
.meo-message--you { align-self: end; border-radius: 12px 12px 3px 12px; background: #ededed; color: #000; }
.meo-message a { color: #000; font-weight: 600; }
.meo-prompts { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 10px 8px; }
.meo-prompts button { padding: 4px 8px; border: 1px solid #dec4aa; border-radius: 12px; background: transparent; color: inherit; font-size: 12px; }
.meo-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid #ead7c5; }
.meo-form input { flex: 1; min-width: 0; padding: 7px 9px; border: 1px solid #dec4aa; border-radius: 9px; background: white; font-size: 16px; }
.meo-form button { border: 0; border-radius: 9px; padding: 0 12px; background: #ededed; color: #000; }
.meo-chat :focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.meo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@keyframes meo-open { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
    .meo-face, .meo-panel { animation: none; }
}

.meo-chat { color: #000; }
.meo-face {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform-origin: center bottom;
}
.meo-face :is(img, video) {
    display: block;
    width: clamp(75px, 11vw, 112px);
    height: auto;
    aspect-ratio: 106 / 166;
    object-fit: contain;
    pointer-events: none;
    border-radius: 0;
    filter: drop-shadow(0 5px 4px #00033);
    transform-origin: center bottom;
}
.meo-header { background: #f4f4f4; }
.meo-header img { object-fit: contain; }
.meo-panel { background: white; border-color: #dedede; }
.meo-message { background: #f1f1f1; }
.meo-message--you, .meo-form button { background: #f3f3f3; color: #000; }
.meo-prompts button, .meo-form, .meo-form input { border-color: #d5d5d5; }
.meo-controls {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 95;
    display: flex;
    align-items: flex-end;
    max-width: calc(100vw - 28px);
    gap: 6px;
}
.meo-chat[hidden] { display: none; }
.meo-music {
    border: 1px solid #ddd;
    border-radius: 20px;
    background: white;
    color: #000;
    padding: 7px 11px;
    font: 13px system-ui, sans-serif;
    cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
    .meo-face, .meo-face img { animation: none; }
}

.meo-form input, .meo-form input::placeholder { color: #000; opacity: 1; }


.meo-paw {
    width: 42px;
    height: 42px;
    padding: 0;
    flex: 0 0 auto;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: white;
    color: #000;
    font: 20px system-ui, sans-serif;
    cursor: pointer;
}

.meo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-bottom: 4px;
}

.meo-actions[hidden] { display: none; }

.meo-launch { align-items: flex-end; gap: clamp(3px, 1vw, 10px); }

.meo-companion {
    display: block;
    height: clamp(117.45px, 17.23vw, 175.4px);
    width: auto;
    max-width: 30vw;
    object-fit: contain;
    object-position: center bottom;
    pointer-events: none;
    filter: drop-shadow(0 4px 3px #0002);
}

.meo-youtube {
    position: fixed;
    z-index: 96;
    left: max(14px, env(safe-area-inset-left));
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + 66px);
    width: min(356px, calc(100vw - 28px));
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    font: 13px system-ui, sans-serif;
}
.meo-youtube iframe { display: block; width: 100%; height: 200px; border: 0; }
.meo-youtube a { display: inline-block; margin-top: 5px; color: #000; }
