.moros-agent-trigger{position:fixed;right:24px;bottom:25px;z-index:65;width:54px;height:54px;display:grid;place-items:center;border:1px solid #c6ff2455;border-radius:50%;background:#c6ff24;color:#142026;box-shadow:0 8px 30px #0005;cursor:pointer}
.moros-agent-trigger svg{width:25px;height:25px}

/* The chat owns its viewport; home and transcript each have one scroll surface. */
html.agent-page,body.agent-page{overflow:hidden!important;overscroll-behavior:none;height:100%;background:#101c20}
body.agent-page{min-height:0;margin:0;padding:0}
body.agent-page>:not(#morosChatPage):not(#appCameraDialog){display:none!important}
.moros-agent-page[hidden],.moros-agent-page [hidden]{display:none!important}
.moros-agent-page{position:fixed;top:var(--agent-top,0px);left:0;right:0;height:var(--agent-height,100dvh);overflow:hidden;background:#101c20;color:#edf3f3;isolation:isolate;font-family:inherit;color-scheme:dark}
.moros-agent-page *{box-sizing:border-box}
.moros-agent-panel{display:flex;flex-direction:column;height:100%;width:100%;min-height:0;overflow:hidden;padding-top:env(safe-area-inset-top)}
.moros-agent-page button{font-family:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.moros-agent-page button:disabled{cursor:default;opacity:.45}
.moros-agent-page button:focus-visible,.moros-agent-page textarea:focus-visible,.moros-agent-result:focus-visible{outline:2px solid #c6ff24;outline-offset:3px}
.moros-agent-head{display:flex;align-items:center;gap:14px;width:100%;max-width:1080px;align-self:center;padding:18px 28px 12px;flex-shrink:0}
.moros-agent-back,.moros-agent-new,.moros-agent-more{background:transparent;color:#c9d6d9;border:0;border-radius:50%;width:44px;height:44px;flex:none;display:grid;place-items:center;padding:0;transition:background .15s}
.moros-agent-back:hover,.moros-agent-new:hover,.moros-agent-more:hover{background:#24373d}
.moros-agent-back{font-size:30px}
.moros-agent-new{margin-left:auto}
.moros-agent-new svg,.moros-agent-more svg{width:22px;height:22px}
.moros-agent-identity{display:flex;align-items:center;gap:12px}
.moros-agent-identity i{font-size:27px;font-style:normal;color:#c6ff24}
.moros-agent-identity h2{font-size:16px;letter-spacing:.04em;margin:0;line-height:1.4}
.moros-agent-identity span{display:block;font-size:11px;color:#8fa6ac;margin-top:1px}
.moros-agent-more-wrap{position:relative;margin-left:-8px;flex:none}
.moros-agent-menu{position:absolute;right:0;top:calc(100% + 8px);width:200px;padding:6px;background:#22343b;border:1px solid #3a5159;border-radius:16px;box-shadow:0 12px 36px #0005;z-index:4}
.moros-agent-menu button{display:flex;align-items:center;gap:11px;width:100%;min-height:46px;padding:12px;border:0;border-radius:10px;background:transparent;color:#dce7e9;font-size:14px;text-align:left}
.moros-agent-menu button:hover,.moros-agent-menu button:focus-visible{background:#30464e}
.moros-agent-menu svg{width:19px;height:19px;color:#a9bec4}
.moros-agent-body{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.moros-agent-body.is-home{overflow-y:auto;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;padding:32px 0 max(48px,env(safe-area-inset-bottom));scrollbar-width:thin;scrollbar-color:#3b5057 transparent}

.moros-agent-thread{position:relative;flex:1;min-height:0;overflow:hidden}
.moros-agent-result,.moros-agent-manager{height:100%;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:#3b5057 transparent;overflow-anchor:none;scroll-padding-block:24px}
.moros-agent-result{padding:26px max(28px,calc((100% - 760px)/2)) 20px}
.moros-agent-manager{flex:1;padding:24px max(28px,calc((100% - 760px)/2)) 36px}
.moros-agent-welcome{flex:none;width:min(100%,760px);align-self:center;margin:auto 0 18px;padding:0 22px;text-align:center}
.moros-agent-welcome>p{font-size:16px;line-height:1.5;color:#9eb2b8;margin:0 0 9px}
.moros-agent-welcome h3{font-size:32px;font-weight:550;letter-spacing:-.035em;line-height:1.2;margin:0;text-wrap:balance}
.moros-agent-starters{display:flex;flex-direction:column;align-self:center;flex:none;gap:2px;width:min(100%,760px);padding:6px 14px 0;margin:0 0 auto}
.moros-agent-starters button{display:flex;align-items:center;gap:12px;align-self:flex-start;max-width:100%;min-height:44px;text-align:left;color:#a9bdc3;background:transparent;border:0;border-radius:12px;padding:10px 13px;font-size:14px;line-height:1.45;transition:background .15s,color .15s}
.moros-agent-starters button:hover{background:#1c2e35;color:#ecf3f4}
.moros-agent-starters button>span:first-child{font-size:17px;line-height:1.2;width:22px;flex:none;text-align:center}
.is-home .moros-agent-composer{padding-bottom:8px}
.moros-agent-message{margin:0 0 28px;min-width:0;animation:agentMessageIn .18s ease-out}
.moros-agent-message.user{background:#24373e;border:1px solid #30464d;border-radius:23px;padding:13px 18px;margin-left:auto;width:fit-content;max-width:85%}
.moros-agent-message.assistant{padding:4px 0}
.moros-agent-speaker{display:block;font-size:10px;letter-spacing:.06em;color:#a6c070;font-weight:650;margin-bottom:9px}
.moros-agent-message.user .moros-agent-speaker{display:none}
.moros-agent-message-text{overflow-wrap:anywhere;font-size:16px;line-height:1.7}
.moros-agent-reveal-word{animation:agentWordIn .14s ease-out both}
.moros-agent-message-text p{margin:0 0 14px}
.moros-agent-message-text p:last-child{margin-bottom:0}
.moros-agent-message-text strong{color:#f8fbfb;font-weight:650}
.moros-agent-message-text h4{font-size:16px;margin:20px 0 9px;font-weight:650}
.moros-agent-message-text ul,.moros-agent-message-text ol{padding-left:23px;margin:8px 0 16px}
.moros-agent-message-text li{padding-left:3px;margin:7px 0}
.moros-agent-message-text code{font-size:.9em;background:#243b43;border-radius:4px;padding:1px 4px}
.moros-agent-message-media{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.moros-agent-photo{padding:0;background:#15262c;border:0;border-radius:14px;overflow:hidden;max-width:260px;min-width:100px;min-height:80px}
.moros-agent-photo img{display:block;max-width:100%;max-height:280px;object-fit:contain}
.moros-agent-message audio{width:280px;max-width:100%;height:40px}
.moros-agent-working{display:flex;align-items:center;gap:11px;min-height:44px;margin:0 0 20px;color:#a6bbc2;font-size:14px}
.moros-agent-thinking-dot{display:block;flex:none;width:10px;height:10px;border-radius:50%;background:#c6ff24;box-shadow:0 0 0 4px #c6ff2412;animation:agentThinking 1.4s ease-in-out infinite}
.moros-agent-latest{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);display:grid;place-items:center;width:40px;height:40px;border:1px solid #3b5159;border-radius:50%;background:#24373e;color:#e7eff1;font-size:23px;box-shadow:0 3px 16px #0005;z-index:1}
.moros-agent-confirm{border:1px solid #a4c05e;background:#c6ff24;color:#152025;padding:12px 18px;border-radius:20px;font-weight:650}
.moros-agent-status{font-size:13px;line-height:1.5;color:#b4c9ce;padding:8px 18px;flex-shrink:0;max-height:78px;overflow:auto;width:min(100%,796px);align-self:center}
.moros-agent-status.error{color:#f1c3b5}

.moros-agent-composer{flex-shrink:0;width:min(100%,804px);align-self:center;padding:10px 22px max(16px,env(safe-area-inset-bottom));background:#101c20}
.moros-agent-input{padding:14px 14px 10px;border:1px solid #3d535b;border-radius:25px;background:#1b2c32;transition:border-color .15s}
.moros-agent-input:focus-within{border-color:#71877b}
.moros-agent-input textarea{display:block;box-sizing:border-box;width:100%;resize:none;min-height:28px;max-height:160px;padding:0 2px 4px;border:0;outline:none!important;background:transparent;color:#edf5f5;font:400 16px/1.5 inherit;line-height:1.5;font-size:16px;font-family:inherit;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin}
.moros-agent-input textarea::placeholder{color:#819ba4}
.moros-agent-actions{display:flex;align-items:center;gap:8px;margin-top:8px}
.moros-agent-actions button{width:40px;height:40px;border:0;border-radius:50%;display:grid;place-items:center;padding:0}
.moros-agent-actions svg{width:22px;height:22px}
.moros-agent-attach,.moros-agent-mic{color:#cbdadd;background:transparent}
.moros-agent-attach:hover,.moros-agent-mic:hover{background:#30464f}
.moros-agent-mic{margin-left:auto}
.moros-agent-send{background:#c6ff24;color:#142024}
.moros-agent-send:disabled{background:#405359;color:#8da5ac}
.moros-agent-send.is-working{opacity:1;background:#2c4149}
.moros-agent-send.is-working svg{display:none}
.moros-agent-send.is-working:after{content:'';width:16px;height:16px;border-radius:50%;border:2px solid #687e86;border-top-color:#e6efef;animation:agentSpin .9s linear infinite}
.moros-agent-attach-wrap{position:relative}
.moros-agent-attach-menu{position:absolute;left:0;bottom:50px;width:205px;padding:7px;background:#263b42;border:1px solid #496068;border-radius:15px;box-shadow:0 8px 30px #0005;z-index:2}
.moros-agent-attach-menu button{display:flex;justify-content:flex-start;gap:10px;width:100%;border-radius:9px;padding:11px;color:#e4eeee;font-size:13px;min-height:44px;height:auto;background:transparent}
.moros-agent-attach-menu button:hover{background:#354f58}
.moros-agent-attachments{display:flex;gap:10px;overflow:auto;padding:5px 2px 10px;overscroll-behavior:contain}
.moros-agent-attachment{position:relative;flex:none}
.moros-agent-attachment img{display:block;height:78px;width:90px;object-fit:cover;border:1px solid #4f666d;border-radius:12px}
.moros-agent-attachment button{position:absolute;right:-2px;top:-4px;width:27px;height:27px;border-radius:50%;border:1px solid #536a72;background:#0d1c22;color:#fff;font-size:18px;padding:0}
.moros-agent-attachment audio{width:260px;height:42px;margin:14px 8px 8px 0}
.moros-agent-recording{display:flex;align-items:center;gap:12px;min-height:102px;padding:15px 14px;border:1px solid #3d535b;border-radius:25px;background:#1b2c32;color:#dce8eb;animation:agentMessageIn .16s ease-out}
.moros-agent-recording button{display:grid;place-items:center;flex:none;width:40px;height:40px;padding:0;border:0;border-radius:50%;color:#d8e5e8;background:#30464e}
.moros-agent-recording button svg{width:22px;height:22px}
.moros-agent-recording .moros-agent-cancel-audio{background:transparent}
.moros-agent-recording .moros-agent-cancel-audio:hover{background:#30464e}
.moros-agent-recording .moros-agent-send-audio{background:#c6ff24;color:#142024}
.moros-agent-audio-center{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:7px}
.moros-agent-waveform{display:flex;align-items:center;justify-content:center;gap:3px;width:100%;max-width:320px;height:34px;overflow:hidden}
.moros-agent-waveform i{display:block;flex:1;min-width:2px;max-width:4px;height:3px;border-radius:3px;background:#c6ff24;transition:height .07s linear}
.moros-agent-audio-caption{display:flex;justify-content:center;align-items:center;gap:7px;max-width:100%;font-size:11px;line-height:1.4;color:#9eb5bd}
.moros-agent-audio-state{white-space:nowrap}
.moros-agent-audio-time{font-variant-numeric:tabular-nums;color:#dce8eb}
.moros-agent-recording.is-processing .moros-agent-waveform{opacity:.45;animation:agentThinking 1.4s ease-in-out infinite}
.moros-agent-manager-head{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}
.moros-agent-manager h3{font-size:22px;margin:3px 0 14px}
.moros-agent-manager button{color:#d9e7e9;background:#243940;border:1px solid #405960;border-radius:12px;padding:10px 12px;font-size:13px;min-height:42px}
.moros-agent-manager-note,.moros-agent-empty{font-size:14px;line-height:1.6;color:#94aeb6}
.moros-agent-history-row{display:flex;gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #2b4048}
.moros-agent-history-row>button:first-child{flex:1;text-align:left;background:transparent;border:0;padding:8px 0;min-width:0}
.moros-agent-history-row strong{font-weight:550;display:block;overflow-wrap:anywhere}
.moros-agent-history-row small{display:block;color:#7f9aa3;margin-top:6px;font-size:11px}
.moros-agent-memory-row{border:1px solid #334a53;padding:15px;border-radius:17px;margin:16px 0;background:#17292f}
.moros-agent-memory-row label{font-size:14px;font-weight:600}
.moros-agent-memory-row textarea{font-family:inherit;font-size:16px;line-height:1.5;display:block;resize:vertical;width:100%;min-height:90px;margin:10px 0 12px;padding:10px;border:1px solid #3c5863;border-radius:10px;background:#101f25;color:#dae7ea}
.moros-agent-memory-row>div{display:flex;justify-content:space-between;gap:8px}
.moros-agent-lightbox{padding:48px 10px 10px;max-width:95vw;max-height:95dvh;background:#101c20;border:1px solid #3d535b;border-radius:15px}
.moros-agent-lightbox::backdrop{background:#000e}
.moros-agent-lightbox img{max-width:90vw;max-height:80dvh;display:block;object-fit:contain}
.moros-agent-lightbox button{position:absolute;right:8px;top:3px;border:0;background:transparent;color:white;font-size:28px;width:40px;height:40px}
@keyframes agentWordIn{from{opacity:.15}to{opacity:1}}
@keyframes agentThinking{50%{opacity:.4;transform:scale(.8)}}
@keyframes agentSpin{to{transform:rotate(360deg)}}
@keyframes agentMessageIn{from{opacity:.35;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:760px){
 .moros-agent-trigger{right:17px;bottom:calc(94px + env(safe-area-inset-bottom));width:47px;height:47px}
 .moros-agent-head{padding:8px 12px 6px;gap:8px}
 .moros-agent-identity h2{font-size:15px}
 .moros-agent-identity span{font-size:10px}
 .moros-agent-result,.moros-agent-manager{padding:18px 20px 22px}
 .moros-agent-body.is-home{padding-top:24px;padding-bottom:max(40px,env(safe-area-inset-bottom))}
 .moros-agent-welcome{margin-bottom:20px;padding:0 22px}
 .moros-agent-welcome h3{font-size:28px}
 .moros-agent-welcome>p{font-size:15px}
 .moros-agent-starters{padding:8px 18px 0}
 .moros-agent-starters button{font-size:14px}
 .moros-agent-message{margin-bottom:26px}
 .moros-agent-message.user{max-width:90%;padding:11px 16px}
 .moros-agent-message-text{font-size:15px;line-height:1.7}
 .moros-agent-composer{padding:6px 12px max(10px,env(safe-area-inset-bottom))}
 .moros-agent-input{padding:12px 10px 8px}
 .moros-agent-recording{min-height:98px;padding:12px 10px;gap:8px}
 .moros-agent-status{padding:7px 20px;font-size:12px}
 .moros-agent-photo{max-width:220px}
 .moros-agent-manager-head h3{font-size:20px}
 .moros-agent-manager-close{flex:none;max-width:100px}
 .moros-agent-page.keyboard-visible .moros-agent-composer{padding-bottom:8px}
 .moros-agent-page.keyboard-visible .moros-agent-body.is-home{padding:12px 0}
 .moros-agent-page.keyboard-visible .moros-agent-welcome{margin-top:0;margin-bottom:10px}
 .moros-agent-page.keyboard-visible .moros-agent-welcome h3{font-size:24px}
 .moros-agent-page.keyboard-visible .moros-agent-welcome>p{font-size:14px;margin-bottom:5px}
 .moros-agent-page.keyboard-visible .moros-agent-starters{padding-top:2px}
}
@media(prefers-reduced-motion:reduce){
 .moros-agent-page *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}

.moros-agent-identity h2{font-size:clamp(13px,3.7vw,18px);line-height:1.25;letter-spacing:0;overflow-wrap:normal}
.moros-agent-identity{min-width:0}
.moros-agent-identity>div{min-width:0}
.moros-agent-speaker{overflow-wrap:anywhere}
