/* Scope all assistant styles. No global theme changes. */
.morsey-root{--m-bg:#fafaf6;--m-surface:#fff;--m-soft:#f5f8f2;--m-green:#174d3a;--m-on:#fff;--m-text:#14241b;--m-muted:#566c5d;--m-border:#dce5db;--m-focus:#5f9972;font-family:'DM Sans',system-ui,sans-serif;font-size:14px;line-height:1.5;color:var(--m-text);text-align:left;letter-spacing:normal;font-weight:400;position:relative;z-index:1000;isolation:isolate}
html[data-theme=dark] .morsey-root{--m-bg:#101a15;--m-surface:#18251d;--m-soft:#1e2e24;--m-green:#bdddb4;--m-on:#173021;--m-text:#eaf2e9;--m-muted:#b4c3b5;--m-border:#334a3a;--m-focus:#a9dba5}
.morsey-root *{box-sizing:border-box}.morsey-root [hidden]{display:none!important}.morsey-root button,.morsey-root input{font:inherit;letter-spacing:normal;color:inherit;min-width:0}.morsey-root button{cursor:pointer}.morsey-root :focus-visible{outline:3px solid var(--m-focus);outline-offset:2px}.morsey-root a{color:var(--m-green);text-decoration:underline;text-underline-offset:3px}.morsey-root button:disabled{opacity:.5;cursor:default}.morsey-launch{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));right:max(20px,env(safe-area-inset-right));display:flex;align-items:center;gap:10px;border:1px solid var(--m-green);border-radius:30px;background:var(--m-green);color:var(--m-on)!important;padding:10px 17px;min-height:52px;font-weight:700!important;box-shadow:0 4px 16px #14241b20}.morsey-mark{flex:none;display:flex;align-items:center;justify-content:center;gap:3px;width:40px;height:40px;background:var(--m-soft);border:1px solid var(--m-border);border-radius:12px;color:var(--m-green)}.morsey-mark i{width:5px;height:5px;background:currentColor;border-radius:5px}.morsey-mark i:nth-child(2){width:13px}.morsey-launch .morsey-mark{width:30px;height:30px;border-radius:50%}.morsey-panel{position:fixed;bottom:max(20px,env(safe-area-inset-bottom));right:max(20px,env(safe-area-inset-right));width:min(420px,calc(100vw - 32px));height:min(650px,calc(100dvh - 40px));min-height:0;display:flex;flex-direction:column;background:var(--m-surface);border:1px solid var(--m-border);border-radius:22px;overflow:hidden;box-shadow:0 8px 32px #14241b25;color:var(--m-text)}.morsey-header{display:flex;align-items:center;gap:12px;padding:15px 16px;background:var(--m-surface);border-bottom:1px solid var(--m-border);flex:none}.morsey-identity{display:flex;flex-direction:column;flex:1;min-width:0}.morsey-identity strong{font-size:18px;line-height:1.2;color:var(--m-text);font-weight:800}.morsey-identity span{font-size:12px;color:var(--m-muted)}.morsey-close{border:0;background:transparent;font-size:26px!important;width:44px;height:44px;border-radius:10px;padding:0}.morsey-progress{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:var(--m-soft);padding:12px 16px;border-bottom:1px solid var(--m-border);gap:8px;flex:none}.morsey-progress>div{display:flex;flex-direction:column;gap:2px;min-width:0}.morsey-progress small{font-size:10px;font-weight:600;color:var(--m-muted);white-space:normal}.morsey-progress strong{font-size:20px;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--m-green)}.morsey-chat{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px;background:var(--m-bg);display:flex;flex-direction:column;gap:12px;scrollbar-width:thin}.morsey-message{border:1px solid var(--m-border);border-radius:14px;padding:12px;max-width:94%;min-width:0;overflow-wrap:anywhere;flex:none}.morsey-message p{font:inherit;line-height:1.55;white-space:pre-wrap;margin:0;color:inherit;max-width:none}.morsey-bot{align-self:flex-start;background:var(--m-surface);border-bottom-left-radius:4px}.morsey-user{align-self:flex-end;background:var(--m-green);color:var(--m-on);border-color:var(--m-green);border-bottom-right-radius:4px}.morsey-response-actions,.morsey-actions{display:flex;flex-wrap:wrap;gap:6px}.morsey-response-actions{margin-top:10px}.morsey-response-actions button,.morsey-response-actions a,.morsey-actions button,.morsey-stop{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--m-border);background:var(--m-soft);color:var(--m-green);border-radius:8px;padding:7px 9px;font-size:12px;font-weight:650;text-decoration:none;min-height:36px;text-align:center}.morsey-response-actions button:hover,.morsey-actions button:hover,.morsey-response-actions a:hover{border-color:var(--m-green)}.morsey-actions{padding:10px 12px 0;background:var(--m-surface);flex:none}.morsey-audio{padding:6px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--m-soft);font-size:12px;color:var(--m-muted);flex:none}.morsey-form{display:flex;align-items:center;gap:8px;margin:0;padding:10px 12px;flex:none}.morsey-form input{flex:1;width:0;min-height:46px;padding:10px 12px;border:1px solid var(--m-border);border-radius:11px;background:var(--m-soft);color:var(--m-text);font-size:16px}.morsey-send{border:0;display:grid;place-items:center;min-height:46px;width:46px;border-radius:11px;background:var(--m-green);color:var(--m-on)!important;flex:none}.morsey-footer{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;padding:0 12px 12px;font-size:10px;color:var(--m-muted);background:var(--m-surface);flex:none}.morsey-footer>div{display:flex;align-items:center;gap:10px}.morsey-reset{padding:3px 0;background:transparent;border:0;font-size:11px!important;color:var(--m-muted)!important;text-decoration:underline}.morsey-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.morsey-embedded{z-index:auto}.morsey-embedded .morsey-panel{position:relative;width:100%;height:650px;right:auto;bottom:auto;box-shadow:none;max-width:none}.morsey-embedded .morsey-chat{padding:22px}.morsey-embedded .morsey-message{max-width:min(90%,650px)}.morsey-embedded .morsey-header{padding:18px 20px}.morsey-embedded .morsey-progress{padding:16px 20px}.morsey-embedded .morsey-progress strong{font-size:26px}
@media(max-width:480px){.morsey-launch{right:12px;bottom:max(12px,env(safe-area-inset-bottom));min-height:46px;padding:8px 13px}.morsey-panel{right:8px;bottom:max(8px,env(safe-area-inset-bottom));width:calc(100vw - 16px);height:min(680px,calc(100dvh - 16px));border-radius:16px}.morsey-header{padding:10px 12px}.morsey-chat{padding:12px}.morsey-embedded .morsey-panel{height:650px}.morsey-response-actions button,.morsey-response-actions a,.morsey-actions button{min-height:44px}.morsey-embedded .morsey-chat{padding:12px}}
@media(max-height:500px){.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-progress{padding:5px 12px}.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-header{padding:4px 12px}.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-actions{display:none}.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-footer{padding-bottom:4px}}

#morsey-learning{max-width:940px;margin-inline:auto}.morsey-embedded .morsey-panel{height:620px}
@media(max-width:480px){.morsey-embedded .morsey-panel{height:650px}}

/* Morsey character V2 — the approved illustration, animated as a whole. */
.morsey-launch{display:flex;flex-direction:column;align-items:center;gap:3px;padding:0;background:transparent;border:0;box-shadow:none;border-radius:18px;min-height:0;overflow:visible;max-width:136px;color:var(--m-on)!important}
.morsey-launch-character{display:block;width:116px;height:116px;overflow:hidden;border-radius:24px;border:1px solid var(--m-border);background:#f9f7f6;transform-origin:50% 88%;}
.morsey-launch-character img,.morsey-character img{display:block;width:100%;height:100%;object-fit:contain;max-width:none;user-select:none;pointer-events:none}
.morsey-launch-label{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;border-radius:24px;background:var(--m-green);color:var(--m-on);font-weight:700;font-size:13px;white-space:nowrap;border:1px solid var(--m-green)}
.morsey-character{flex:none;width:78px;height:78px;border-radius:16px;background:#f9f7f6;overflow:hidden;border:1px solid var(--m-border);transform-origin:50% 85%;}
.morsey-identity .morsey-character-status{font-size:11px;font-weight:700;color:var(--m-green);margin-top:4px}
.morsey-root .morsey-motion{padding:4px 0;background:transparent;border:0;font-size:11px;color:var(--m-muted);text-decoration:underline;min-height:28px}
.morsey-root .morsey-motion:disabled{cursor:default;text-decoration:none}
.morsey-root[data-motion=on] .morsey-launch-character{animation:morsey-idle 2.8s ease-in-out 2}
.morsey-root[data-motion=on] .morsey-launch:hover .morsey-launch-character,.morsey-root[data-motion=on] .morsey-launch:focus-visible .morsey-launch-character{animation:morsey-greet .8s ease-in-out 1}
.morsey-root[data-motion=on][data-state=greeting] .morsey-character{animation:morsey-greet .85s ease-in-out 2}
.morsey-root[data-motion=on][data-state=reply] .morsey-character{animation:morsey-nod .6s ease-out 1}
.morsey-root[data-motion=on][data-state=audio] .morsey-character{animation:morsey-listen 1.6s ease-in-out 3}
.morsey-root[data-motion=on][data-state=correct] .morsey-character,.morsey-root[data-motion=on][data-state=complete] .morsey-character{animation:morsey-celebrate .65s ease-out 2}
.morsey-root[data-motion=on][data-state=retry] .morsey-character{animation:morsey-nod .7s ease-in-out 1}
@keyframes morsey-idle{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes morsey-greet{0%,100%{transform:rotate(0)}25%{transform:rotate(-5deg)}75%{transform:rotate(4deg)}}
@keyframes morsey-nod{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(3px) rotate(-3deg)}}
@keyframes morsey-listen{0%,100%{transform:rotate(0)}50%{transform:rotate(3deg) scale(1.025)}}
@keyframes morsey-celebrate{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(-6px) scale(1.045)}}
.morsey-root[data-page-hidden=true] .morsey-character,.morsey-root[data-page-hidden=true] .morsey-launch-character{animation:none!important}
@media(max-width:480px){.morsey-launch{padding:0;max-width:108px}.morsey-launch-character{width:76px;height:76px;border-radius:17px}.morsey-launch-label{min-height:44px;padding:6px 12px;font-size:12px}.morsey-character{width:60px;height:60px;border-radius:13px}.morsey-header{gap:9px}.morsey-embedded .morsey-header{padding:10px 12px}.morsey-footer>div{gap:8px}.morsey-identity strong{font-size:17px}}
@media(max-height:500px){.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-character{width:44px;height:44px}.morsey-launch-character{width:60px;height:60px}}
@media(prefers-reduced-motion:reduce){.morsey-root .morsey-character,.morsey-root .morsey-launch-character{animation:none!important;transform:none!important}}

/* V3: visible conversational cues; no autoplay voice or simulated microphone. */
.morsey-welcome{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:190px;width:min(248px,calc(100vw - 32px));background:var(--m-surface);color:var(--m-text);border:1px solid var(--m-border);border-radius:15px;padding:10px 32px 10px 12px;box-shadow:0 4px 18px #14241b20;z-index:1}
.morsey-welcome:after{content:"";position:absolute;bottom:-7px;right:48px;width:12px;height:12px;background:var(--m-surface);border-right:1px solid var(--m-border);border-bottom:1px solid var(--m-border);transform:rotate(45deg)}
.morsey-welcome-open{background:none;border:0;text-align:left;padding:0;font-weight:750!important;line-height:1.5;display:block;width:100%}.morsey-welcome-open span{display:block;font-size:12px;font-weight:400;color:var(--m-muted)}
.morsey-welcome-close{position:absolute;right:2px;top:2px;width:30px;height:30px;border:0;background:none;font-size:20px!important;line-height:1}
.morsey-typing{align-self:flex-start;display:flex;align-items:center;gap:8px;color:var(--m-muted);font-size:12px;padding:8px 10px;background:var(--m-surface);border:1px solid var(--m-border);border-radius:12px;flex:none}.morsey-typing-dots,.morsey-speech-waves{display:flex;gap:3px;align-items:center}.morsey-typing-dots i{width:5px;height:5px;border-radius:50%;background:var(--m-green)}
.morsey-character{position:relative}.morsey-speech-waves{display:none;position:absolute;bottom:3px;left:50%;transform:translateX(-50%);height:15px;padding:3px 5px;border-radius:9px;background:#174d3a;color:white}.morsey-speech-waves i{width:3px;height:8px;border-radius:3px;background:currentColor;transform-origin:center}
.morsey-root[data-talking=true] .morsey-speech-waves{display:flex}.morsey-root[data-typing=true] .morsey-character-status{opacity:.65}
.morsey-root[data-motion=on] .morsey-welcome:not([hidden]){animation:morsey-bubble-in .35s ease-out both}.morsey-root[data-motion=on][data-talking=true] .morsey-speech-waves i{animation:morsey-speech .52s ease-in-out 8 alternate}.morsey-root[data-motion=on] .morsey-typing-dots i{animation:morsey-speech .42s ease-in-out 3 alternate}.morsey-root[data-motion=on] .morsey-typing-dots i:nth-child(2),.morsey-root[data-motion=on] .morsey-speech-waves i:nth-child(2){animation-delay:.12s}.morsey-root[data-motion=on] .morsey-typing-dots i:nth-child(3),.morsey-root[data-motion=on] .morsey-speech-waves i:nth-child(3){animation-delay:.24s}
.morsey-root[data-motion=on][data-talking=true][data-state=reply] .morsey-character{animation:morsey-nod .65s ease-in-out 4}
@keyframes morsey-speech{from{transform:scaleY(.4);opacity:.65}to{transform:scaleY(1);opacity:1}}@keyframes morsey-bubble-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
.morsey-root[data-page-hidden=true] .morsey-speech-waves i,.morsey-root[data-page-hidden=true] .morsey-typing-dots i{animation:none!important}
@media(max-width:480px){.morsey-welcome{right:12px;bottom:145px}}@media(max-height:500px){.morsey-welcome{bottom:125px}}@media(prefers-reduced-motion:reduce){.morsey-root .morsey-welcome,.morsey-root .morsey-speech-waves i,.morsey-root .morsey-typing-dots i{animation:none!important}}

/* V4: original artwork, independent paw and face rig. All motion is opt-out. */
.morsey-rig{display:block;width:100%;height:100%;overflow:hidden;pointer-events:none;user-select:none}
.morsey-paw{transform-origin:106px 319px;transform-box:view-box}
.morsey-blink,.morsey-happy-eyes,.morsey-mouth,.morsey-think{opacity:0}
.morsey-root[data-motion=on][data-blink=true] .morsey-blink{opacity:1}
.morsey-root[data-motion=on][data-state=greeting] .morsey-paw,.morsey-root[data-motion=on] .morsey-launch:hover .morsey-paw{animation:morsey-paw-wave .68s ease-in-out 3}
@keyframes morsey-paw-wave{0%,100%{transform:rotate(0)}30%{transform:rotate(-11deg)}70%{transform:rotate(10deg)}}
.morsey-root[data-motion=on][data-state=correct] .morsey-happy-eyes,.morsey-root[data-motion=on][data-state=complete] .morsey-happy-eyes{opacity:1}
.morsey-root[data-motion=on][data-typing=true] .morsey-think{opacity:1}
.morsey-root[data-motion=on][data-talking=true] .morsey-mouth{animation:morsey-mouth-talk .46s steps(1,end) infinite}
.morsey-root[data-motion=on][data-speaking=true] .morsey-mouth{animation:morsey-mouth-talk .32s steps(1,end) infinite}
@keyframes morsey-mouth-talk{0%,100%{opacity:0}40%,78%{opacity:1}}
.morsey-root[data-listening=true] .morsey-character{outline:2px solid var(--m-focus);outline-offset:2px}
.morsey-root[data-listening=true] .morsey-character-status,.morsey-root[data-speaking=true] .morsey-character-status{visibility:hidden;position:relative}
.morsey-root[data-listening=true] .morsey-character-status:after,.morsey-root[data-speaking=true] .morsey-character-status:after{visibility:visible;position:absolute;left:0;top:0;white-space:nowrap;content:'Listening to you'}
.morsey-root[data-speaking=true] .morsey-character-status:after{content:'Speaking…'}
.morsey-root[data-motion=off] .morsey-rig *,.morsey-root[data-page-hidden=true] .morsey-rig *{animation:none!important;transform:none!important}
.morsey-root[data-motion=off] :is(.morsey-mouth,.morsey-blink,.morsey-happy-eyes,.morsey-think),.morsey-root[data-page-hidden=true] :is(.morsey-mouth,.morsey-blink,.morsey-happy-eyes,.morsey-think){opacity:0!important}
.morsey-voice{flex:none;padding:6px 12px 0;background:var(--m-surface);min-width:0}
.morsey-voice-controls{display:flex;align-items:center;flex-wrap:wrap;gap:5px}
.morsey-root .morsey-voice-controls button{background:var(--m-soft);border:1px solid var(--m-border);border-radius:8px;color:var(--m-green);font-size:12px;font-weight:650;min-height:36px;padding:6px 9px}
.morsey-root .morsey-voice-controls button[aria-pressed=true]{background:var(--m-green);color:var(--m-on);border-color:var(--m-green)}
.morsey-root .morsey-voice-settings{margin-left:auto}
.morsey-voice-status{display:block;font-size:11px;color:var(--m-muted);overflow-wrap:anywhere;padding:5px 0}
.morsey-voice-options{border:1px solid var(--m-border);border-radius:10px;background:var(--m-soft);padding:9px;margin-top:6px;font-size:11px;max-height:126px;overflow:auto}
.morsey-voice-options label{display:block;font-weight:700;margin-bottom:4px}
.morsey-voice-options select{width:100%;max-width:100%;background:var(--m-surface);color:var(--m-text);border:1px solid var(--m-border);border-radius:6px;padding:5px;font:inherit}
.morsey-voice-options p{font:inherit;margin:6px 0;line-height:1.4}
.morsey-root[data-speaking=true] .morsey-speech-waves i{animation-iteration-count:infinite}
@media(max-width:480px){.morsey-root .morsey-voice-controls button{min-height:44px;padding:5px 8px}.morsey-root .morsey-voice-settings{margin-left:0}.morsey-embedded .morsey-panel{height:740px}}
@media(max-height:500px){.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-voice-options{max-height:70px}.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-voice-controls button{min-height:30px}.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-progress{display:none}}
@media(prefers-reduced-motion:reduce){.morsey-root .morsey-rig *{animation:none!important;transform:none!important}.morsey-root :is(.morsey-mouth,.morsey-blink,.morsey-happy-eyes,.morsey-think){opacity:0!important}.morsey-root .morsey-speech-waves i{animation:none!important}}

/* V5: compact contextual label and flexible quick actions; all V4 rig states preserved. */
.morsey-identity>span:first-of-type{overflow-wrap:anywhere;line-height:1.35}.morsey-root .morsey-actions{gap:5px}.morsey-root .morsey-actions button{flex:1 1 auto;white-space:nowrap;padding-inline:8px}.morsey-root .morsey-welcome-open span{overflow-wrap:anywhere}
@media(max-width:480px){.morsey-root .morsey-actions button{font-size:11px;padding-inline:6px}}

/* V6 academy: scoped, responsive dashboard. */
.morsey-academy{border:1px solid var(--m-border);border-radius:22px;background:var(--m-surface);padding:24px;margin-bottom:24px;display:grid;gap:20px}.ma-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.ma-head small{font-size:11px;letter-spacing:.09em;font-weight:700;color:var(--m-green)}.ma-head h2{font-size:clamp(22px,3vw,30px);line-height:1.2;margin:5px 0;color:var(--m-text)}.ma-head p,.ma-map p{margin:4px 0;color:var(--m-muted);font-size:13px}.ma-head label{display:grid;gap:5px;color:var(--m-muted);font-size:12px;font-weight:600}.ma-goal{background:var(--m-soft);color:var(--m-text);border:1px solid var(--m-border);border-radius:9px;min-height:40px;padding:6px 12px;font:inherit}.ma-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.ma-metrics>div{border:1px solid var(--m-border);background:var(--m-soft);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:5px;min-width:0}.ma-metrics small{color:var(--m-muted);font-size:12px}.ma-metrics strong{color:var(--m-green);font-size:clamp(18px,2.4vw,26px);line-height:1.25;font-variant-numeric:tabular-nums}.ma-bar{width:100%;height:7px;accent-color:var(--m-green)}.ma-activities{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ma-activities button{display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:5px;border:1px solid var(--m-border);border-radius:12px;padding:15px;background:var(--m-surface);min-height:84px}.ma-activities button:first-child{background:var(--m-green);color:var(--m-on)}.ma-activities button:hover{border-color:var(--m-green)}.ma-activities span{font-size:12px;line-height:1.4}.ma-map h3{font-size:17px;color:var(--m-text);margin:0 0 10px}.ma-letters{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:5px}.ma-letters span{display:grid;place-items:center;min-height:32px;border-radius:7px;background:var(--m-soft);color:var(--m-muted);border:1px solid var(--m-border);font-weight:700;font-size:13px}.ma-letters [data-status=mastered],.ma-key.mastered{background:var(--m-green);color:var(--m-on);border-color:var(--m-green)}.ma-letters [data-status=learning],.ma-key.learning{background:#d8e9dc;color:#174d3a;border-color:#a4c1ad}.ma-letters [data-status=due],.ma-key.due{background:#f8e6ba;color:#684614;border-color:#c89b47}.ma-key{display:inline-block;width:10px;height:10px;vertical-align:middle;border-radius:2px;background:var(--m-soft);border:1px solid var(--m-border);margin-left:6px}.ma-map small,.ma-storage{font-size:11px;color:var(--m-muted);line-height:1.5}.ma-storage{margin:0}.morsey-panel .morsey-actions{max-height:82px;overflow-y:auto;scrollbar-width:thin}.morsey-embedded .morsey-panel .morsey-actions{max-height:110px}
@media(max-width:760px){.ma-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.ma-letters{grid-template-columns:repeat(9,minmax(0,1fr))}.morsey-academy{padding:16px;gap:15px}}@media(max-width:480px){.ma-activities{grid-template-columns:minmax(0,1fr)}.ma-activities button{min-height:56px;padding:11px}.ma-letters{grid-template-columns:repeat(6,minmax(0,1fr))}.ma-metrics>div{padding:10px}.morsey-panel:not(.morsey-embedded .morsey-panel) .morsey-actions{max-height:72px}}

/* V7 account controls */
.morsey-root .morsey-memory{flex:none;padding:7px 12px;border-bottom:1px solid var(--mz-border,#dce5db);font-size:11px;line-height:1.35}.morsey-root .mm-status{margin:0 0 4px;font-weight:600}.morsey-root .mm-actions{display:flex;flex-wrap:wrap;align-items:center;gap:5px 9px}.morsey-root .mm-actions button,.morsey-root .mm-actions a{font:inherit;color:inherit;border:1px solid currentColor;border-radius:7px;padding:4px 7px;background:transparent;text-decoration:none;cursor:pointer}.morsey-root .mm-actions button:disabled{opacity:.55;cursor:default}.morsey-root .mm-actions [hidden]{display:none!important}

/* V9 source search */
.morsey-knowledge-status{font-size:.82rem;color:inherit;opacity:.8;padding:.5rem .7rem;margin:0;overflow-wrap:anywhere}.morsey-message p{overflow-wrap:anywhere}.morsey-knowledge-intro{margin:32px 0 48px}.morsey-response-actions a{overflow-wrap:anywhere}
/* V10 course, scoped to the Morsey workspace. */
.morsey-root .morsey-course{scroll-margin-top:100px}.morsey-course .mc-summary{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;margin:12px 0 18px}.morsey-course .mc-summary progress{width:100%;height:10px;accent-color:#398467;grid-column:1}.morsey-course .mc-summary button{grid-column:2;grid-row:1/span 2;background:#174d3a;color:#fff;border:1px solid #174d3a;border-radius:11px;padding:10px 15px;min-height:44px;font:inherit;font-weight:600;cursor:pointer}.morsey-course .mc-lessons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.morsey-course .mc-lessons button{display:flex;flex-direction:column;text-align:left;gap:6px;min-width:0;min-height:78px;padding:13px;border:1px solid var(--mz-border,#dce5db);border-radius:12px;background:transparent;color:inherit;font:inherit;cursor:pointer}.morsey-course .mc-lessons button:disabled{opacity:.55;cursor:not-allowed}.morsey-course .mc-lessons button:not(:disabled):hover{border-color:#398467}.morsey-course .mc-lessons span,.morsey-course .mc-note{font-size:.85rem;line-height:1.5;overflow-wrap:anywhere}.morsey-course button:focus-visible{outline:2px solid #398467;outline-offset:3px}@media(max-width:560px){.morsey-course .mc-lessons,.morsey-course .mc-summary{grid-template-columns:minmax(0,1fr)}.morsey-course .mc-summary button{grid-column:1;grid-row:auto}}

/* V12 — responsive conversation layout. Keep optional controls out of the composer. */
.morsey-root .morsey-panel{width:min(440px,calc(100vw - 24px));height:min(720px,calc(100vh - 24px));height:min(720px,calc(var(--m-visible-height,100dvh) - 24px));bottom:calc(max(12px,env(safe-area-inset-bottom)) + var(--m-keyboard-offset,0px));right:max(12px,env(safe-area-inset-right));}
.morsey-root .morsey-chat{flex:1 1 0;min-height:100px;min-width:0;overflow-y:auto;overflow-x:hidden;}
.morsey-root .morsey-message{max-width:100%;overflow-wrap:anywhere;min-width:0;}
.morsey-root .morsey-controls{flex:0 1 auto;min-height:44px;max-height:34%;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;border-top:1px solid var(--m-border);background:var(--m-surface);}
.morsey-root .morsey-controls .morsey-actions{display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;overflow-y:hidden;max-height:none;padding:8px 12px 5px;scrollbar-width:thin;}
.morsey-root .morsey-controls .morsey-actions button{flex:0 0 auto;min-height:44px;padding:6px 10px;font-size:12px;}
.morsey-root .morsey-voice{padding:4px 12px 6px;}
.morsey-root .morsey-voice-controls button{min-height:44px;}
.morsey-root .morsey-settings{margin:0 12px 6px;border-top:1px solid var(--m-border);font-size:12px;}
.morsey-root .morsey-settings summary{cursor:pointer;padding:8px 2px;font-weight:650;color:var(--m-green);min-height:36px;}
.morsey-root .morsey-settings .morsey-memory{padding:4px 2px 8px;}
.morsey-root .morsey-settings .mm-actions button,.morsey-root .morsey-settings .mm-actions a{min-height:36px;display:inline-flex;align-items:center;}
.morsey-root .morsey-settings .morsey-footer{padding:8px 2px;}
.morsey-root .morsey-form{flex:none;border-top:1px solid var(--m-border);background:var(--m-surface);padding:9px 12px;}
.morsey-root .morsey-form input{min-width:0;font-size:16px;}
.morsey-root .morsey-send{width:46px;min-height:46px;}
.morsey-root.morsey-embedded .morsey-panel{position:relative;right:auto;bottom:auto;width:100%;height:760px;}
.morsey-root.morsey-embedded .morsey-controls{max-height:38%;}
@media(max-width:480px){
 .morsey-root:not(.morsey-embedded) .morsey-panel{right:max(8px,env(safe-area-inset-right));bottom:calc(max(8px,env(safe-area-inset-bottom)) + var(--m-keyboard-offset,0px));width:calc(100vw - 16px);height:min(720px,calc(var(--m-visible-height,100dvh) - 16px));border-radius:16px;}
 .morsey-root .morsey-header{padding:8px 12px;gap:9px;}
 .morsey-root .morsey-character{width:56px;height:56px;}
 .morsey-root .morsey-progress{padding:7px 12px;}
 .morsey-root .morsey-progress strong{font-size:18px;}
 .morsey-root .morsey-chat{padding:12px;}
 .morsey-root .morsey-controls{max-height:32%;}
 .morsey-root .morsey-voice-controls{gap:5px;}
 .morsey-root .morsey-voice-controls button{padding:5px 8px;font-size:12px;}
 .morsey-root.morsey-embedded .morsey-panel{height:720px;}
}
@media(max-height:500px){
 .morsey-root:not(.morsey-embedded) .morsey-panel{height:calc(var(--m-visible-height,100dvh) - 16px);bottom:calc(8px + var(--m-keyboard-offset,0px));}
 .morsey-root:not(.morsey-embedded) .morsey-progress{display:none;}
 .morsey-root:not(.morsey-embedded) .morsey-header{padding:4px 10px;}
 .morsey-root:not(.morsey-embedded) .morsey-chat{min-height:64px;}
 .morsey-root:not(.morsey-embedded) .morsey-controls{max-height:28%;}
 .morsey-root:not(.morsey-embedded) .morsey-form{padding:5px 10px;}
}

/* V13 — conversation-first, no permanent suggestions or statistics above chat. */
.morsey-root .morsey-header{padding:10px 12px;gap:9px;flex:none;}
.morsey-root .morsey-character{width:54px;height:54px;border-radius:12px;}
.morsey-root .morsey-menu-toggle,.morsey-root .morsey-close{display:grid;place-items:center;flex:none;width:40px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--m-text);}
.morsey-root .morsey-menu-toggle:hover,.morsey-root .morsey-close:hover{background:var(--m-soft);}
.morsey-root .morsey-chat{flex:1 1 0;min-height:0;padding:16px 14px;gap:14px;font-size:15px;overflow:auto;}
.morsey-root .morsey-message{max-width:92%;padding:10px 13px;line-height:1.55;font-size:15px;}
.morsey-root .morsey-user{max-width:88%;}
.morsey-root .morsey-author{display:block;font-size:11px;font-weight:700;line-height:1.3;margin-bottom:5px;color:inherit;opacity:.82;}
.morsey-root .morsey-message-links{margin-top:8px;font-size:12px;}
.morsey-root .morsey-message-links summary{cursor:pointer;color:var(--m-green);font-weight:600;padding:4px 0;}
.morsey-root .morsey-message-links:not([open])>.morsey-source-actions{display:none;}
.morsey-root .morsey-controls[hidden]{display:none!important;}
.morsey-root .morsey-panel[data-menu-open=true] .morsey-chat{display:none;}
.morsey-root .morsey-controls{flex:1 1 0;min-height:0;max-height:none!important;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:12px;border:0;}
.morsey-root .morsey-controls h3{margin:0;font-size:14px;color:var(--m-text);}
.morsey-root .morsey-back,.morsey-root .morsey-read-last{border:1px solid var(--m-border);border-radius:9px;background:var(--m-soft);color:var(--m-green);padding:8px 12px;min-height:44px;text-align:left;font-weight:600;flex:none;}
.morsey-root .morsey-controls .morsey-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));max-height:none!important;overflow:visible;gap:6px;padding:0;flex:none;}
.morsey-root .morsey-controls .morsey-actions button{white-space:normal;text-align:left;justify-content:flex-start;}
.morsey-root .morsey-controls .morsey-progress{display:grid!important;flex:none;border:1px solid var(--m-border);border-radius:10px;padding:10px;}
.morsey-root .morsey-controls .morsey-voice{padding:0;flex:none;}
.morsey-root .morsey-controls .morsey-voice-options{max-height:none!important;}
.morsey-root .morsey-controls .morsey-settings{margin:0;flex:none;}
.morsey-root .morsey-form{flex:none;padding:9px 12px;}
.morsey-root .morsey-form input{font-size:16px;}
.morsey-root.morsey-embedded .morsey-panel{height:760px;}
@media(max-width:480px){.morsey-root .morsey-header{padding:8px 10px;gap:7px;}.morsey-root .morsey-character{width:46px;height:46px;}.morsey-root .morsey-menu-toggle,.morsey-root .morsey-close{width:36px;}.morsey-root .morsey-chat{padding:12px 10px;}.morsey-root.morsey-embedded .morsey-panel{height:650px;}}
@media(max-height:500px){.morsey-root:not(.morsey-embedded) .morsey-chat{min-height:0;}.morsey-root:not(.morsey-embedded) .morsey-header{padding:4px 10px;}.morsey-root:not(.morsey-embedded) .morsey-character{width:42px;height:42px;}}

/* V14 conversation menu and unobtrusive thinking state. */
.morsey-brain-toggle{align-self:flex-start;min-height:36px;padding:8px 12px;border:1px solid var(--m-border);border-radius:9px;background:var(--m-surface);color:var(--m-text);font:inherit;cursor:pointer}.morsey-brain-toggle[aria-pressed=true]{background:var(--m-green);color:var(--m-on)!important}.morsey-brain-note{font-size:12px;line-height:1.5;color:var(--m-muted);margin:0 0 8px;overflow-wrap:anywhere}.morsey-root[data-motion=on] .morsey-typing-dots i{animation-iteration-count:infinite}

/* V15 preferences are confined to the existing menu, not the conversation. */
.morsey-personal{border:1px solid var(--m-border,#d7e2d6);border-radius:9px;padding:10px;margin:6px 0 12px;color:inherit;min-width:0}
.morsey-personal summary{cursor:pointer;font-weight:650;font-size:13px;padding:3px 0}
.morsey-personal p{font-size:12px;line-height:1.5;margin:8px 0;overflow-wrap:anywhere}
.morsey-personal label{display:grid;gap:4px;font-size:12px;font-weight:600;margin:10px 0}
.morsey-personal label:has(.mp-enable){display:flex;align-items:center;gap:8px;font-size:13px}
.morsey-personal input:not([type=checkbox]),.morsey-personal select{box-sizing:border-box;width:100%;min-width:0;min-height:36px;padding:7px 9px;border:1px solid var(--m-border,#d7e2d6);border-radius:6px;font:inherit;color:inherit;background:var(--m-surface,transparent)}
.morsey-personal .mp-actions{display:flex;flex-wrap:wrap;gap:6px}
.morsey-personal .mp-actions button{max-width:100%;white-space:normal;text-align:left}
.morsey-root .morsey-personal .mp-enable{accent-color:var(--m-green)}
.morsey-root .morsey-personal .mp-actions button{border:1px solid var(--m-border);border-radius:7px;background:var(--m-soft);color:var(--m-text);font:inherit;font-size:12px;font-weight:600;padding:8px 10px;min-height:36px;cursor:pointer}
.morsey-root .morsey-personal .mp-actions button:first-child{background:var(--m-green);color:var(--m-on);border-color:var(--m-green)}
.morsey-root .morsey-personal .mp-actions button:disabled{opacity:.5;cursor:not-allowed}
.morsey-root .morsey-personal :is(button,input,select):focus-visible{outline:2px solid var(--m-focus);outline-offset:2px}


/* V16: restrained, message-driven expressions; no extra chat controls. */
.morsey-support-brows{opacity:0}
.morsey-root[data-motion=on][data-state=happy] .morsey-happy-eyes{opacity:1}
.morsey-root[data-motion=on][data-state=happy] .morsey-character{animation:morsey-v16-happy .7s ease-out 2}
.morsey-root[data-motion=on]:is([data-state=support],[data-state=encourage]) .morsey-support-brows{opacity:1}
.morsey-root[data-motion=on]:is([data-state=support],[data-state=encourage]) .morsey-character{animation:morsey-v16-listen 1.4s ease-in-out 1}
.morsey-root[data-motion=on][data-state=curious] .morsey-think{opacity:1}
.morsey-root[data-motion=on][data-state=curious] .morsey-character{animation:morsey-v16-listen 1.2s ease-in-out 1}
.morsey-root[data-motion=on][data-state=farewell] .morsey-paw{animation:morsey-paw-wave .68s ease-in-out 3}
@keyframes morsey-v16-happy{0%,100%{transform:translateY(0)}40%{transform:translateY(-2px) rotate(-3deg)}70%{transform:translateY(-1px) rotate(2deg)}}
@keyframes morsey-v16-listen{0%,100%{transform:rotate(0)}45%,65%{transform:rotate(4deg)}}
.morsey-root[data-motion=off] .morsey-support-brows,.morsey-root[data-page-hidden=true] .morsey-support-brows{opacity:0!important}
.morsey-root[data-page-hidden=true] .morsey-character,.morsey-root[data-motion=off] .morsey-character{animation:none!important}
@media(prefers-reduced-motion:reduce){.morsey-root .morsey-support-brows{opacity:0!important}.morsey-root .morsey-character{animation:none!important}}

/* V17: per-message bidirectional layout; language control stays in the menu. */
.morsey-language{display:grid;gap:6px;padding:10px 0;border-bottom:1px solid var(--morsey-border,#dce5dc)}
.morsey-language label{display:grid;gap:6px;font-weight:600;font-size:.82rem}
.morsey-language select{width:100%;min-height:38px;font:inherit;color:inherit;background:var(--morsey-surface,transparent);border:1px solid var(--morsey-border,#c9d6cc);border-radius:8px;padding:6px 8px}
.morsey-language p{font-size:.75rem;line-height:1.5;margin:0;opacity:.8}
.morsey-message p[dir=auto]{unicode-bidi:plaintext;overflow-wrap:anywhere;text-align:start}
.morsey-language-code{display:inline-block;direction:ltr;unicode-bidi:isolate;max-width:100%;overflow-wrap:anywhere;font-family:monospace}

/* V18: compact voice controls, no suggestion rows in conversation. */
.morsey-root .morsey-live-toggle{flex:none;min-height:44px;padding:0 9px;border:1px solid var(--m-border);border-radius:10px;background:var(--m-soft);color:var(--m-green);font-size:12px;font-weight:700}
.morsey-root .morsey-live-toggle[aria-pressed=true]{background:var(--m-green);color:var(--m-on)}
.morsey-root .morsey-live-voice{flex:none;display:flex;align-items:center;gap:6px;padding:6px 12px;background:var(--m-soft);border-top:1px solid var(--m-border);min-height:36px;font-size:12px}
.morsey-root .morsey-live-status{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.35;color:var(--m-text)}
.morsey-root .morsey-live-voice button{flex:none;border:1px solid var(--m-border);border-radius:8px;background:var(--m-surface);padding:5px 8px;min-height:40px;font-size:12px;font-weight:650;color:var(--m-green)}
.morsey-root .morsey-live-end{border-color:var(--m-green)!important}
@media(max-width:360px){.morsey-root .morsey-form{gap:5px}.morsey-root .morsey-live-toggle{padding:0 7px}.morsey-root .morsey-live-voice{padding:5px 8px}.morsey-root .morsey-live-voice button{padding:4px 6px}}

/* V19: external citation links remain visible in the conversation; optional modes live in the menu. */
.morsey-root .morsey-web-citation{font-weight:700;text-decoration:underline;color:var(--m-green);white-space:nowrap}.morsey-root .morsey-web-sources{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 8px;margin-top:10px;padding-top:8px;border-top:1px solid var(--m-border);font-size:11px;line-height:1.6;color:var(--m-muted);white-space:normal}.morsey-root .morsey-web-sources a{color:var(--m-text);text-decoration:underline;overflow-wrap:anywhere;max-width:100%}.morsey-root .morsey-web-citation:focus-visible,.morsey-root .morsey-web-sources a:focus-visible{outline:2px solid var(--m-green);outline-offset:2px}.morsey-root .morsey-advanced-menu{display:grid;gap:7px;padding:10px 0;border-top:1px solid var(--m-border)}.morsey-root .morsey-advanced-menu h3,.morsey-root .morsey-advanced-menu p{margin:0}.morsey-root .morsey-advanced-menu p{font-size:12px;line-height:1.5;color:var(--m-muted)}.morsey-root .morsey-advanced-menu>div{display:flex;flex-wrap:wrap;gap:7px}.morsey-root .morsey-advanced-menu button{min-height:36px;border:1px solid var(--m-border);border-radius:9px;padding:7px 10px;background:var(--m-surface);color:var(--m-text);font:inherit;font-size:12px;cursor:pointer}
