#mp-voice-root{
    position:fixed;
    right:16px;
    bottom:calc(82px + env(safe-area-inset-bottom));
    z-index:99990;
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.mp-voice-toggle{
    border:0;
    border-radius:999px;
    padding:9px 14px 9px 9px;
    display:flex;
    align-items:center;
    gap:10px;
    cursor:pointer;
    color:#fff;
    background:linear-gradient(135deg,#16b889,#14a9c8);
    box-shadow:0 15px 45px rgba(8,35,54,.35);
}

.mp-voice-orb{
    width:42px;
    height:42px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:rgba(255,255,255,.18);
    position:relative;
}

.mp-voice-orb:before,
.mp-voice-orb:after,
.mp-voice-orb span{
    content:"";
    display:block;
    width:3px;
    border-radius:999px;
    background:white;
}

.mp-voice-orb:before{height:11px}
.mp-voice-orb span{height:20px;margin:0 4px}
.mp-voice-orb:after{height:14px}

.mp-voice-orb{
    grid-template-columns:auto auto auto;
}

.mp-voice-toggle-copy{
    display:grid;
    text-align:left;
    line-height:1.15;
}

.mp-voice-toggle-copy strong{
    font-size:13px;
}

.mp-voice-toggle-copy small{
    opacity:.82;
    font-size:10px;
    margin-top:3px;
}

.mp-voice-panel{
    position:absolute;
    right:0;
    bottom:64px;
    width:min(390px,calc(100vw - 28px));
    max-height:min(650px,calc(100vh - 130px));
    overflow:hidden;
    border:1px solid rgba(148,163,184,.20);
    border-radius:24px;
    background:var(--mp-panel,#0c1928);
    color:var(--mp-text,#f4f8fc);
    box-shadow:0 25px 80px rgba(0,0,0,.38);
}

.mp-voice-panel[hidden]{
    display:none;
}

.mp-voice-head{
    display:grid;
    grid-template-columns:46px 1fr 36px;
    align-items:center;
    gap:11px;
    padding:15px;
    border-bottom:1px solid rgba(148,163,184,.15);
}

.mp-voice-avatar{
    width:44px;
    height:44px;
    display:grid;
    place-items:center;
    border-radius:15px;
    font-weight:900;
    color:white;
    background:linear-gradient(135deg,#20c98f,#23c7e6);
}

.mp-voice-head > div:nth-child(2){
    display:grid;
    gap:2px;
}

.mp-voice-head strong{
    font-size:14px;
}

.mp-voice-head small{
    color:var(--mp-muted,#8fa4b8);
    font-size:11px;
}

.mp-voice-close{
    width:34px;
    height:34px;
    border:0;
    border-radius:50%;
    cursor:pointer;
    color:inherit;
    background:rgba(148,163,184,.12);
    font-size:21px;
}

.mp-voice-feed{
    min-height:150px;
    max-height:310px;
    overflow:auto;
    display:flex;
    flex-direction:column;
    gap:9px;
    padding:15px;
}

.mp-voice-message{
    max-width:88%;
    padding:10px 12px;
    border-radius:15px;
    font-size:13px;
    line-height:1.45;
    white-space:pre-line;
}

.mp-voice-message.assistant{
    align-self:flex-start;
    background:rgba(35,199,230,.10);
    border:1px solid rgba(35,199,230,.14);
}

.mp-voice-message.user{
    align-self:flex-end;
    background:rgba(32,201,143,.16);
    border:1px solid rgba(32,201,143,.18);
}

.mp-voice-choices{
    display:grid;
    gap:7px;
    margin-top:8px;
}

.mp-voice-choice,
.mp-voice-confirm,
.mp-voice-cancel{
    border:0;
    border-radius:11px;
    padding:9px 11px;
    font-weight:800;
    cursor:pointer;
    text-decoration:none;
    text-align:center;
}

.mp-voice-choice,
.mp-voice-confirm{
    color:white;
    background:#14a579;
}

.mp-voice-cancel{
    color:inherit;
    background:rgba(148,163,184,.14);
}

.mp-voice-form{
    border-top:1px solid rgba(148,163,184,.15);
    padding:12px;
}

.mp-voice-form textarea{
    width:100%;
    resize:none;
    border:1px solid rgba(148,163,184,.22);
    border-radius:14px;
    padding:11px 12px;
    outline:none;
    background:rgba(0,0,0,.12);
    color:inherit;
}

.mp-voice-form textarea:focus{
    border-color:#20c98f;
    box-shadow:0 0 0 3px rgba(32,201,143,.12);
}

.mp-voice-actions{
    display:flex;
    gap:8px;
    margin-top:8px;
}

.mp-voice-mic,
.mp-voice-send{
    border:0;
    border-radius:12px;
    min-height:42px;
    cursor:pointer;
}

.mp-voice-mic{
    width:46px;
    background:rgba(35,199,230,.12);
    color:inherit;
}

.mp-voice-mic.is-listening{
    background:#dc3545;
    color:white;
    animation:mpVoicePulse 1s infinite;
}

.mp-voice-send{
    flex:1;
    color:white;
    font-weight:900;
    background:linear-gradient(135deg,#20c98f,#15a9c7);
}

.mp-voice-melavoice{
    display:block;
    margin:0 12px 10px;
    padding:10px 12px;
    border-radius:12px;
    text-align:center;
    text-decoration:none;
    color:#8fe8ff;
    background:rgba(35,199,230,.08);
    border:1px solid rgba(35,199,230,.15);
    font-size:12px;
    font-weight:800;
}

.mp-voice-privacy{
    padding:0 14px 14px;
    color:var(--mp-muted,#8fa4b8);
    font-size:10px;
    line-height:1.45;
}

@keyframes mpVoicePulse{
    50%{transform:scale(1.05)}
}

@media(max-width:900px){
    #mp-voice-root{
        right:12px;
        bottom:calc(88px + env(safe-area-inset-bottom));
    }

    .mp-voice-toggle-copy{
        display:none;
    }

    .mp-voice-toggle{
        padding:8px;
    }

    .mp-voice-orb{
        width:45px;
        height:45px;
    }
}

@media(prefers-reduced-motion:reduce){
    .mp-voice-mic.is-listening{
        animation:none;
    }
}
