/* Mupo Assist — chat launcher and panel. Every class starts with mupo-assist- so nothing clashes with site styles. */
.mupo-assist-root{
    --mupo-assist-navy:#061b3a;
    --mupo-assist-navy-2:#0b2b5c;
    --mupo-assist-red:#e30613;
    --mupo-assist-red-dark:#b8050f;
    --mupo-assist-soft:#f5f7fa;
    --mupo-assist-chip:#f8fafc;
    --mupo-assist-line:#e2e8f0;
    --mupo-assist-text:#0f172a;
    --mupo-assist-muted:#5b6678;
    --mupo-assist-green:#22c55e;
    --mupo-assist-gap:24px;
    --mupo-assist-bottom:24px;
    --mupo-assist-right:24px;
    font-family:Inter,"Segoe UI",Roboto,Arial,sans-serif;
    font-size:15px;
    line-height:1.5;
    color:var(--mupo-assist-text);
    -webkit-font-smoothing:antialiased;
}
.mupo-assist-root *,.mupo-assist-root *::before,.mupo-assist-root *::after{box-sizing:border-box}
.mupo-assist-root button,.mupo-assist-root input,.mupo-assist-root textarea,.mupo-assist-root select{font-family:inherit;font-size:inherit;line-height:inherit;letter-spacing:normal;text-transform:none;margin:0}
.mupo-assist-root button{cursor:pointer;-webkit-appearance:none;appearance:none}
.mupo-assist-root svg{display:block;flex:0 0 auto}
.mupo-assist-root [hidden]{display:none!important}
.mupo-assist-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

/* ---------- Lesson page: above the 78 px lesson bar and left of the course panel ---------- */
.mupo-assist-root--lesson{--mupo-assist-bottom:calc(var(--mupo-bottom,78px) + 18px);--mupo-assist-right:calc(var(--mupo-side,0px) + 24px)}
body.mupo-focus-mode .mupo-assist-root--lesson{--mupo-assist-right:24px}

/* ---------- Existing back-to-top buttons move up so the launcher never covers them ---------- */
body.mupo-assist-on .back-top,body.mupo-assist-on #back-top{bottom:112px!important}
body.mupo-assist-on.mupo-assist-on--lesson #back-top{bottom:calc(var(--mupo-bottom,78px) + 108px)!important}
body.mupo-assist-open .back-top,body.mupo-assist-open #back-top{visibility:hidden!important}

/* ---------- Launcher ---------- */
.mupo-assist-launcher{
    position:fixed;right:var(--mupo-assist-right);bottom:var(--mupo-assist-bottom);z-index:2147483000;
    width:236px;height:72px;border-radius:16px;border:1px solid rgba(255,255,255,.12);padding:6px 16px 6px 8px;
    background:var(--mupo-assist-navy);color:#fff;
    display:flex;align-items:center;justify-content:flex-start;gap:13px;text-align:left;
    box-shadow:0 14px 34px rgba(6,27,58,.28),0 4px 12px rgba(6,27,58,.16);
    transition:transform .18s ease,box-shadow .18s ease,background-color .18s ease;
}
.mupo-assist-launcher:hover{background:var(--mupo-assist-navy-2);transform:translateY(-2px);box-shadow:0 18px 38px rgba(6,27,58,.32),0 6px 14px rgba(6,27,58,.2)}
.mupo-assist-launcher:focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 6px var(--mupo-assist-navy)}
.mupo-assist-launcher-logo{width:60px;height:60px;border-radius:14px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 60px}
.mupo-assist-launcher-logo img{width:52px;height:52px;object-fit:contain;display:block}
.mupo-assist-launcher-copy{display:flex;flex-direction:column;justify-content:center;min-width:0;line-height:1.2}
.mupo-assist-launcher-title{display:block;color:#fff;font-size:20px;font-weight:750;line-height:1.15;white-space:nowrap}
.mupo-assist-launcher-status{display:flex;align-items:center;gap:7px;margin-top:5px;color:rgba(255,255,255,.86);font-size:14px;font-weight:600;line-height:1.1;white-space:nowrap}
.mupo-assist-launcher-status i{width:10px;height:10px;border-radius:50%;background:var(--mupo-assist-green);box-shadow:0 0 0 4px rgba(34,197,94,.19);flex:0 0 10px}
.mupo-assist-dot{position:absolute;top:2px;right:2px;width:16px;height:16px;border-radius:50%;background:var(--mupo-assist-red);border:3px solid #fff}
.mupo-assist-label{
    position:fixed;right:var(--mupo-assist-right);bottom:calc(var(--mupo-assist-bottom) + 84px);z-index:2147483000;
    background:#fff;color:var(--mupo-assist-navy);font-weight:700;font-size:14px;white-space:nowrap;
    padding:10px 14px;border-radius:12px;border:1px solid var(--mupo-assist-line);
    box-shadow:0 12px 30px rgba(6,27,58,.16);
    animation:mupo-assist-pop .22s ease both;
}
.mupo-assist-label::after{content:"";position:absolute;right:28px;top:auto;bottom:-7px;width:12px;height:12px;background:#fff;border-right:1px solid var(--mupo-assist-line);border-bottom:1px solid var(--mupo-assist-line);transform:rotate(45deg)}
.mupo-assist-root.is-open .mupo-assist-launcher,.mupo-assist-root.is-open .mupo-assist-label{display:none}
.mupo-assist-root.is-exam{display:none!important}

/* ---------- Panel ---------- */
.mupo-assist-panel{
    position:fixed;right:var(--mupo-assist-right);bottom:var(--mupo-assist-bottom);z-index:2147483001;
    width:400px;height:680px;max-height:85vh;max-width:calc(100vw - 32px);
    background:#fff;border-radius:16px;overflow:hidden;
    box-shadow:0 24px 60px rgba(6,27,58,.28);
    display:flex;flex-direction:column;
    animation:mupo-assist-rise .18s ease-out both;
}
.mupo-assist-root--lesson .mupo-assist-panel{max-height:calc(100vh - var(--mupo-head,74px) - var(--mupo-bottom,78px) - 36px)}

.mupo-assist-header{flex:0 0 76px;height:76px;background:var(--mupo-assist-navy);color:#fff;display:flex;align-items:center;gap:12px;padding:0 14px 0 16px}
.mupo-assist-logo{width:48px;height:48px;border-radius:12px;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;flex:0 0 48px}
.mupo-assist-logo img{width:42px;height:42px;object-fit:contain;display:block}
.mupo-assist-titles{flex:1 1 auto;min-width:0}
.mupo-assist-title{margin:0;padding:0;color:#fff;font-size:18px;font-weight:700;line-height:1.2;letter-spacing:0;border:0;background:none}
.mupo-assist-status{display:flex;align-items:center;gap:7px;margin-top:3px;color:rgba(255,255,255,.86);font-size:13px;font-weight:500}
.mupo-assist-status i{width:8px;height:8px;border-radius:50%;background:var(--mupo-assist-green);box-shadow:0 0 0 3px rgba(34,197,94,.22);flex:0 0 8px}
.mupo-assist-status.is-connecting i{background:#f59e0b;box-shadow:0 0 0 3px rgba(245,158,11,.22)}
.mupo-assist-hbtns{display:flex;gap:6px;flex:0 0 auto}
.mupo-assist-hbtn{position:relative;width:40px;height:40px;border-radius:10px;border:0;background:rgba(255,255,255,.12);color:#fff;display:flex;align-items:center;justify-content:center;padding:0;transition:background-color .15s ease}
.mupo-assist-hbtn:hover,.mupo-assist-hbtn[aria-expanded="true"]{background:rgba(255,255,255,.22)}
.mupo-assist-hbtn:focus-visible{outline:2px solid #fff;outline-offset:2px}
.mupo-assist-hbtn svg{width:20px;height:20px}
.mupo-assist-hbtn[data-tip]:hover::after,.mupo-assist-hbtn[data-tip]:focus-visible::after{
    content:attr(data-tip);position:absolute;top:calc(100% + 8px);right:0;z-index:5;white-space:nowrap;
    background:var(--mupo-assist-text);color:#fff;font-size:12px;font-weight:600;padding:5px 9px;border-radius:7px;pointer-events:none}

.mupo-assist-menu{position:absolute;top:70px;right:14px;z-index:6;min-width:230px;background:#fff;border:1px solid var(--mupo-assist-line);border-radius:12px;box-shadow:0 18px 40px rgba(6,27,58,.2);padding:6px;list-style:none;margin:0}
.mupo-assist-menu button{width:100%;display:flex;align-items:center;gap:10px;border:0;background:none;color:var(--mupo-assist-navy);font-weight:600;font-size:14px;text-align:left;padding:10px 11px;border-radius:8px}
.mupo-assist-menu button:hover,.mupo-assist-menu button:focus-visible{background:var(--mupo-assist-soft);outline:none}
.mupo-assist-menu svg{width:18px;height:18px;color:var(--mupo-assist-muted)}

.mupo-assist-notice{flex:0 0 auto;margin:12px 14px 0;padding:10px 12px;display:flex;gap:10px;align-items:flex-start;background:#f8fafc;border:1px solid var(--mupo-assist-line);border-radius:12px;color:#334155;font-size:13px;line-height:1.45}
.mupo-assist-notice svg{width:18px;height:18px;color:var(--mupo-assist-navy);margin-top:1px}
.mupo-assist-notice strong{color:var(--mupo-assist-navy)}

.mupo-assist-body{position:relative;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;background:var(--mupo-assist-soft);margin-top:12px;border-top:1px solid var(--mupo-assist-line)}
.mupo-assist-messages{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px 14px 10px;display:flex;flex-direction:column;gap:12px;scroll-behavior:smooth}
.mupo-assist-msg{display:flex;flex-direction:column;max-width:85%}
.mupo-assist-msg--assistant{align-self:flex-start;align-items:flex-start}
.mupo-assist-msg--user{align-self:flex-end;align-items:flex-end}
.mupo-assist-bubble{padding:11px 14px;border-radius:14px;font-size:14.5px;line-height:1.55;word-wrap:break-word;overflow-wrap:anywhere}
.mupo-assist-msg--assistant .mupo-assist-bubble{background:#fff;border:1px solid var(--mupo-assist-line);color:var(--mupo-assist-text);border-top-left-radius:6px}
.mupo-assist-msg--user .mupo-assist-bubble{background:var(--mupo-assist-navy);color:#fff;border-top-right-radius:6px;white-space:pre-wrap}
.mupo-assist-bubble p{margin:0 0 8px;padding:0;color:inherit;font-size:inherit;line-height:inherit}
.mupo-assist-bubble p:last-child,.mupo-assist-bubble ul:last-child,.mupo-assist-bubble ol:last-child{margin-bottom:0}
.mupo-assist-bubble ul,.mupo-assist-bubble ol{margin:0 0 8px;padding-left:20px}
.mupo-assist-bubble ul{list-style:disc}
.mupo-assist-bubble ol{list-style:decimal}
.mupo-assist-bubble li{margin:0 0 3px;padding:0;color:inherit;font-size:inherit;line-height:inherit;display:list-item}
.mupo-assist-bubble strong{font-weight:700;color:inherit}
.mupo-assist-bubble code{background:#eef2f7;border-radius:5px;padding:1px 5px;font-size:13px}
.mupo-assist-bubble a{color:#0b4fb3;text-decoration:underline;font-weight:600;word-break:break-word}
.mupo-assist-bubble a:hover{color:var(--mupo-assist-navy)}
.mupo-assist-meta{display:flex;align-items:center;gap:6px;margin-top:4px;font-size:11.5px;color:var(--mupo-assist-muted)}
.mupo-assist-fb{width:26px;height:26px;border:0;border-radius:7px;background:transparent;color:#94a3b8;display:inline-flex;align-items:center;justify-content:center;padding:0}
.mupo-assist-fb svg{width:15px;height:15px}
.mupo-assist-fb:hover{background:#e8edf4;color:var(--mupo-assist-navy)}
.mupo-assist-fb[aria-pressed="true"]{color:var(--mupo-assist-navy);background:#e2e8f0}
.mupo-assist-fb:focus-visible{outline:2px solid var(--mupo-assist-navy);outline-offset:1px}
.mupo-assist-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.mupo-assist-action{display:inline-flex;align-items:center;gap:7px;padding:8px 12px;border-radius:10px;background:var(--mupo-assist-navy);color:#fff!important;font-weight:700;font-size:13.5px;text-decoration:none!important;border:0;line-height:1.2}
.mupo-assist-action:hover{background:var(--mupo-assist-navy-2);color:#fff!important}
.mupo-assist-action--light{background:#fff;color:var(--mupo-assist-navy)!important;border:1px solid #cbd5e1}
.mupo-assist-action--light:hover{background:var(--mupo-assist-soft);color:var(--mupo-assist-navy)!important}
.mupo-assist-action--wa{background:#128c4a}
.mupo-assist-action--wa:hover{background:#0e6f3a}
.mupo-assist-action:focus-visible{outline:2px solid var(--mupo-assist-red);outline-offset:2px}
.mupo-assist-action svg{width:16px;height:16px}
.mupo-assist-system{align-self:center;max-width:92%;text-align:center;font-size:12.5px;color:#7c2d12;background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;padding:7px 11px}
.mupo-assist-typing{display:inline-flex;gap:5px;align-items:center;padding:4px 2px}
.mupo-assist-typing span{width:8px;height:8px;border-radius:50%;background:#94a3b8;animation:mupo-assist-blink 1.2s infinite ease-in-out}
.mupo-assist-typing span:nth-child(2){animation-delay:.18s}
.mupo-assist-typing span:nth-child(3){animation-delay:.36s}

.mupo-assist-chips{flex:0 0 auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 14px 4px;background:var(--mupo-assist-soft)}
.mupo-assist-chip{min-height:40px;padding:8px 10px;border:1px solid var(--mupo-assist-line);border-radius:10px;background:var(--mupo-assist-chip);color:var(--mupo-assist-navy);font-weight:700;font-size:14px;line-height:1.25;text-align:center;transition:background-color .15s ease,border-color .15s ease}
.mupo-assist-chip:first-child{grid-column:1 / -1}
.mupo-assist-chip:hover{background:#fff;border-color:#9fb0c7}
.mupo-assist-chip:focus-visible{outline:2px solid var(--mupo-assist-navy);outline-offset:1px}

.mupo-assist-compose{flex:0 0 auto;background:#fff;border-top:1px solid var(--mupo-assist-line);padding:10px 12px 8px}
.mupo-assist-inputrow{display:flex;align-items:flex-end;gap:8px}
.mupo-assist-input{
    flex:1 1 auto;min-width:0;resize:none;display:block;
    height:44px;min-height:44px;max-height:116px;overflow-y:auto;
    padding:11px 13px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;color:var(--mupo-assist-text);
    font-size:15px;line-height:20px;box-shadow:none;outline:none
}
.mupo-assist-input::placeholder{color:#7b8698;opacity:1}
.mupo-assist-input:focus{border-color:var(--mupo-assist-navy);box-shadow:0 0 0 3px rgba(6,27,58,.12)}
.mupo-assist-ibtn{width:44px;height:44px;flex:0 0 44px;border-radius:12px;border:0;display:flex;align-items:center;justify-content:center;padding:0;transition:background-color .15s ease,transform .1s ease}
.mupo-assist-ibtn svg{width:20px;height:20px}
.mupo-assist-mic{background:#eef2f6;color:#475569}
.mupo-assist-mic:hover{background:#e2e8f0;color:var(--mupo-assist-navy)}
.mupo-assist-mic[aria-pressed="true"]{background:#fee2e2;color:var(--mupo-assist-red);animation:mupo-assist-pulse 1.4s infinite}
.mupo-assist-send{background:var(--mupo-assist-red);color:#fff}
.mupo-assist-send:hover{background:var(--mupo-assist-red-dark)}
.mupo-assist-send:disabled{background:#f3a3a8;cursor:not-allowed}
.mupo-assist-ibtn:focus-visible{outline:2px solid var(--mupo-assist-navy);outline-offset:2px}
.mupo-assist-footnote{margin:7px 2px 0;font-size:11px;color:#6b7280;line-height:1.35;text-align:center}
.mupo-assist-count{font-size:11px;color:var(--mupo-assist-muted);text-align:right;margin-top:3px}
.mupo-assist-count.is-over{color:var(--mupo-assist-red);font-weight:700}

/* ---------- Sheets (hand-over, call-back, help) ---------- */
.mupo-assist-sheet{position:absolute;inset:0;z-index:7;background:rgba(6,27,58,.38);display:flex;align-items:flex-end;animation:mupo-assist-fade .15s ease both}
.mupo-assist-sheet-card{width:100%;max-height:100%;overflow-y:auto;background:#fff;border-radius:16px 16px 0 0;padding:18px 16px 16px;box-shadow:0 -10px 30px rgba(6,27,58,.16);animation:mupo-assist-up .18s ease-out both}
.mupo-assist-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.mupo-assist-sheet-head h3{margin:0;padding:0;font-size:17px;font-weight:700;color:var(--mupo-assist-navy);line-height:1.3;border:0;background:none}
.mupo-assist-sheet-close{width:34px;height:34px;border-radius:9px;border:0;background:var(--mupo-assist-soft);color:var(--mupo-assist-navy);display:flex;align-items:center;justify-content:center;padding:0}
.mupo-assist-sheet-close svg{width:18px;height:18px}
.mupo-assist-sheet-close:focus-visible{outline:2px solid var(--mupo-assist-navy);outline-offset:1px}
.mupo-assist-sheet p{margin:0 0 12px;color:#334155;font-size:14px;line-height:1.55}
.mupo-assist-sheet ul{margin:0 0 12px;padding-left:18px;color:#334155;font-size:14px;line-height:1.55;list-style:disc}
.mupo-assist-sheet li{margin-bottom:4px;display:list-item}
.mupo-assist-option{width:100%;display:flex;align-items:center;gap:12px;padding:12px;margin-bottom:8px;border:1px solid var(--mupo-assist-line);border-radius:12px;background:#fff;color:var(--mupo-assist-navy);text-align:left;text-decoration:none!important;transition:border-color .15s ease,background-color .15s ease}
.mupo-assist-option:hover{border-color:#9fb0c7;background:#fafcff;color:var(--mupo-assist-navy)}
.mupo-assist-option:focus-visible{outline:2px solid var(--mupo-assist-navy);outline-offset:1px}
.mupo-assist-option-icon{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:0 0 40px;color:#fff;background:var(--mupo-assist-navy)}
.mupo-assist-option-icon svg{width:20px;height:20px}
.mupo-assist-option--wa .mupo-assist-option-icon{background:#128c4a}
.mupo-assist-option--cb .mupo-assist-option-icon{background:var(--mupo-assist-red)}
.mupo-assist-option strong{display:block;font-size:14.5px;color:var(--mupo-assist-navy)}
.mupo-assist-option span{display:block;font-size:12.5px;color:var(--mupo-assist-muted);font-weight:500}
.mupo-assist-phone{font-size:13px;color:var(--mupo-assist-muted);text-align:center;margin-top:4px}
.mupo-assist-phone a{color:var(--mupo-assist-navy);font-weight:700}
.mupo-assist-form label{display:block;font-size:13px;font-weight:700;color:var(--mupo-assist-navy);margin:0 0 5px}
.mupo-assist-form .mupo-assist-field{margin-bottom:11px}
.mupo-assist-form input,.mupo-assist-form textarea{width:100%;display:block;border:1px solid #cbd5e1;border-radius:10px;padding:9px 11px;background:#fff;color:var(--mupo-assist-text);font-size:14.5px;line-height:1.4;box-shadow:none;outline:none;height:auto}
.mupo-assist-form textarea{min-height:76px;resize:vertical}
.mupo-assist-form input:focus,.mupo-assist-form textarea:focus{border-color:var(--mupo-assist-navy);box-shadow:0 0 0 3px rgba(6,27,58,.12)}
.mupo-assist-form .mupo-assist-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.mupo-assist-form small{display:block;color:var(--mupo-assist-muted);font-size:12px;margin-top:4px}
.mupo-assist-form-error{color:#b91c1c;font-size:13px;font-weight:600;margin:0 0 10px}
.mupo-assist-submit{width:100%;min-height:44px;border:0;border-radius:11px;background:var(--mupo-assist-red);color:#fff;font-weight:700;font-size:15px}
.mupo-assist-submit:hover{background:var(--mupo-assist-red-dark)}
.mupo-assist-submit:disabled{opacity:.6;cursor:wait}
.mupo-assist-submit:focus-visible{outline:2px solid var(--mupo-assist-navy);outline-offset:2px}
.mupo-assist-done{text-align:center;padding:10px 4px 6px}
.mupo-assist-done-icon{width:52px;height:52px;margin:0 auto 10px;border-radius:50%;background:#dcfce7;color:#15803d;display:flex;align-items:center;justify-content:center}
.mupo-assist-done-icon svg{width:26px;height:26px}

/* ---------- Guard against strong site rules (e.g. dashboard h2 / ul / li styles with !important) ---------- */
.mupo-assist-root .mupo-assist-title{color:#fff!important;font-size:18px!important;font-weight:700!important;line-height:1.2!important;margin:0!important;padding:0!important;text-transform:none!important;letter-spacing:0!important;font-family:inherit!important}
.mupo-assist-root .mupo-assist-sheet-head h3{color:var(--mupo-assist-navy)!important;font-size:17px!important;font-weight:700!important;margin:0!important;font-family:inherit!important}
.mupo-assist-root .mupo-assist-bubble ul{list-style:disc outside!important;padding-left:20px!important;margin:0 0 8px!important}
.mupo-assist-root .mupo-assist-bubble ol{list-style:decimal outside!important;padding-left:20px!important;margin:0 0 8px!important}
.mupo-assist-root .mupo-assist-bubble li,.mupo-assist-root .mupo-assist-sheet li{display:list-item!important;list-style:inherit!important;padding:0!important;background:none!important}
.mupo-assist-root .mupo-assist-bubble li::before,.mupo-assist-root .mupo-assist-sheet li::before{content:none!important;display:none!important}
.mupo-assist-root .mupo-assist-sheet ul{list-style:disc outside!important;padding-left:18px!important}
.mupo-assist-root .mupo-assist-msg--assistant .mupo-assist-bubble,.mupo-assist-root .mupo-assist-msg--assistant .mupo-assist-bubble p,.mupo-assist-root .mupo-assist-msg--assistant .mupo-assist-bubble li{color:var(--mupo-assist-text)!important}
.mupo-assist-root .mupo-assist-msg--user .mupo-assist-bubble{color:#fff!important}
.mupo-assist-root .mupo-assist-bubble p,.mupo-assist-root .mupo-assist-sheet p{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}
.mupo-assist-root .mupo-assist-action,.mupo-assist-root .mupo-assist-action:hover{color:#fff!important}
.mupo-assist-root .mupo-assist-action--light,.mupo-assist-root .mupo-assist-action--light:hover{color:var(--mupo-assist-navy)!important}

.mupo-assist-root .mupo-assist-input,.mupo-assist-root .mupo-assist-form input,.mupo-assist-root .mupo-assist-form textarea{border:1px solid #cbd5e1!important;background:#fff!important;color:var(--mupo-assist-text)!important;box-shadow:none!important;outline:none!important;margin:0!important}
.mupo-assist-root .mupo-assist-input{border-radius:12px!important;padding:11px 13px!important;font-size:15px!important;line-height:20px!important}
.mupo-assist-root .mupo-assist-input:focus,.mupo-assist-root .mupo-assist-form input:focus,.mupo-assist-root .mupo-assist-form textarea:focus{border-color:var(--mupo-assist-navy)!important;box-shadow:0 0 0 3px rgba(6,27,58,.12)!important}
@media (max-width:639.98px){.mupo-assist-root .mupo-assist-input{font-size:16px!important}}

/* ---------- Animations ---------- */
@keyframes mupo-assist-rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes mupo-assist-pop{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:none}}
@keyframes mupo-assist-fade{from{opacity:0}to{opacity:1}}
@keyframes mupo-assist-up{from{transform:translateY(24px)}to{transform:none}}
@keyframes mupo-assist-blink{0%,80%,100%{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
@keyframes mupo-assist-pulse{0%,100%{box-shadow:0 0 0 0 rgba(227,6,19,.3)}50%{box-shadow:0 0 0 6px rgba(227,6,19,0)}}

@media (prefers-reduced-motion:reduce){
    .mupo-assist-root *,.mupo-assist-root *::before,.mupo-assist-root *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

/* ---------- Phone: polished inset chat sheet ---------- */
@media (max-width:639.98px){
    .mupo-assist-root{--mupo-assist-bottom:14px;--mupo-assist-right:14px}
    .mupo-assist-root--lesson{--mupo-assist-bottom:calc(var(--mupo-bottom,70px) + 12px);--mupo-assist-right:14px}
    .mupo-assist-label{display:none}
    body.mupo-assist-on .back-top,body.mupo-assist-on #back-top{bottom:88px!important}
    .mupo-assist-panel,.mupo-assist-root--lesson .mupo-assist-panel{
        top:max(8px,env(safe-area-inset-top,0px));
        left:8px;right:8px;bottom:8px;
        width:auto;max-width:none;
        height:auto;max-height:none;
        border:1px solid rgba(6,27,58,.12);border-radius:18px;
        box-shadow:0 18px 48px rgba(6,27,58,.28);
        animation:mupo-assist-rise .16s ease-out both;
    }
    .mupo-assist-header{
        flex:0 0 auto;height:auto;min-height:70px;
        gap:9px;padding:9px 10px;
        align-items:center;border-radius:17px 17px 0 0;
    }
    .mupo-assist-logo{width:46px;height:46px;flex-basis:46px;border-radius:11px}
    .mupo-assist-logo img{width:40px;height:40px}
    .mupo-assist-titles{display:flex;flex-direction:column;justify-content:center;align-self:stretch;overflow:visible}
    .mupo-assist-root .mupo-assist-title{
        position:static!important;display:block!important;transform:none!important;overflow:visible!important;
        font-size:17px!important;line-height:21px!important;white-space:nowrap!important;
    }
    .mupo-assist-status{margin-top:2px;font-size:12.5px;line-height:17px;white-space:nowrap}
    .mupo-assist-hbtns{gap:5px}
    .mupo-assist-hbtn{width:38px;height:38px;flex:0 0 38px;border-radius:10px}
    .mupo-assist-hbtn svg{width:19px;height:19px}
    .mupo-assist-menu{top:66px;right:10px;max-width:calc(100% - 20px)}
    .mupo-assist-notice{margin:10px 10px 0;padding:9px 10px;gap:9px;border-radius:11px;font-size:12.5px;line-height:1.4}
    .mupo-assist-notice svg{width:17px;height:17px}
    .mupo-assist-body{margin-top:10px}
    .mupo-assist-messages{padding:12px 11px 9px;gap:10px}
    .mupo-assist-msg{max-width:90%}
    .mupo-assist-bubble{padding:10px 12px;border-radius:13px;font-size:14px;line-height:1.5}
    .mupo-assist-meta{font-size:11px;margin-top:3px}
    .mupo-assist-chips{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;padding:8px 10px 5px}
    .mupo-assist-chip{min-height:38px;padding:7px 8px;border-radius:10px;font-size:13px;line-height:1.25}
    .mupo-assist-compose{padding:9px 10px calc(7px + env(safe-area-inset-bottom,0px))}
    .mupo-assist-inputrow{gap:7px}
    .mupo-assist-root .mupo-assist-input{height:44px;min-height:44px;padding:11px 12px!important;font-size:16px!important}
    .mupo-assist-ibtn{width:44px;height:44px;flex-basis:44px;border-radius:12px}
    .mupo-assist-footnote{margin-top:6px;font-size:10.5px;line-height:1.25}
    html.mupo-assist-lock,html.mupo-assist-lock body{overflow:hidden!important}
    .mupo-assist-launcher{width:206px;height:64px;border-radius:14px;padding:6px 13px 6px 7px;gap:10px}
    .mupo-assist-launcher-logo{width:52px;height:52px;flex-basis:52px;border-radius:12px}
    .mupo-assist-launcher-logo img{width:45px;height:45px}
    .mupo-assist-launcher-title{font-size:18px}
    .mupo-assist-launcher-status{font-size:13px;margin-top:4px}
}
@media (max-width:360px){
    .mupo-assist-panel,.mupo-assist-root--lesson .mupo-assist-panel{left:5px;right:5px;bottom:5px;border-radius:15px}
    .mupo-assist-header{gap:7px;padding:8px;min-height:66px;border-radius:14px 14px 0 0}
    .mupo-assist-logo{width:42px;height:42px;flex-basis:42px;border-radius:10px}
    .mupo-assist-logo img{width:36px;height:36px}
    .mupo-assist-root .mupo-assist-title{font-size:15.5px!important;line-height:19px!important}
    .mupo-assist-status{font-size:11.5px;line-height:15px}
    .mupo-assist-hbtns{gap:3px}
    .mupo-assist-hbtn{width:34px;height:34px;flex-basis:34px;border-radius:9px}
    .mupo-assist-hbtn svg{width:17px;height:17px}
    .mupo-assist-notice{margin:8px 8px 0;padding:8px 9px}
    .mupo-assist-body{margin-top:8px}
    .mupo-assist-messages{padding-left:9px;padding-right:9px}
    .mupo-assist-chips{padding-left:8px;padding-right:8px;gap:6px}
    .mupo-assist-chip{font-size:12.25px;padding-left:6px;padding-right:6px}
    .mupo-assist-compose{padding-left:8px;padding-right:8px}
    .mupo-assist-inputrow{gap:6px}
    .mupo-assist-ibtn{width:42px;height:42px;flex-basis:42px}
}
@media (max-width:639.98px) and (max-height:620px){
    .mupo-assist-notice{display:none}
    .mupo-assist-body{margin-top:0}
    .mupo-assist-footnote{display:none}
    .mupo-assist-chips{padding-top:6px}
}
