/* The conversation owns the space; secondary controls open on request. */
#rex-dock{--rx-red:#ff6658;--rx-line:rgba(255,255,255,.095);--rx-soft:#999da8;color:#f3f3f6;font:14px/1.5 Inter,system-ui,sans-serif}
#rex-dock [hidden],#rxd-controls [hidden],#rxd-jobs[hidden],#rxd-notice[hidden]{display:none!important}
#rxd-launch{position:fixed;right:22px;bottom:max(22px,env(safe-area-inset-bottom));z-index:1100;display:flex;align-items:center;gap:10px;padding:4px 19px 4px 7px;border:1px solid #ff77685c;border-radius:40px;background:#25252b;color:#fff;box-shadow:0 5px 26px #0007;cursor:pointer}
.rxd-mark{display:block;width:46px;height:46px;object-fit:contain;flex:none}.rxd-avatar{display:block;width:38px;height:38px;object-fit:contain;flex:none}#rxd-dot{width:8px;height:8px;background:#8fdaa9;border-radius:50%}
#rxd-panel{position:fixed;right:22px;bottom:86px;z-index:1100;width:min(520px,calc(100vw - 32px));height:min(780px,calc(100dvh - 112px));display:flex;flex-direction:column;border:1px solid #ffffff26;border-radius:20px;background:#1b1d24;box-shadow:0 20px 80px #0009;overflow:hidden}
.rxd-header{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--rx-line);flex-shrink:0}.rxd-header>div{flex:1;min-width:0}.rxd-header strong{font-size:16px}.rxd-header small{display:block;color:#adb2c0;font-size:11px}.rxd-header button{width:34px;height:34px;flex:none;color:#eee;background:#ffffff08;border:1px solid #ffffff1c;border-radius:9px;cursor:pointer;font-size:22px;box-shadow:none}
#rxd-content{min-height:0;display:flex;flex-direction:column;flex:1}#rxd-content .rx-conversation{display:flex;flex-direction:column;border:0;border-radius:0;min-height:0;flex:1;overflow:hidden}
#rxd-content .rx-conversation-bar,#rxd-content .rx-capabilities,#rxd-content #rx-voice-launch,#rxd-content .rx-chat-footnote,#rxd-content .rx-listen{display:none}
#rxd-content .rx-messages{height:auto;flex:1 1 0;min-height:72px;padding:20px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#626773 transparent}
#rxd-content .rx-welcome{min-height:0;padding:24px 8px}#rxd-content .rx-welcome .rx-avatar{display:none}#rxd-content .rx-welcome h3{font-size:21px}#rxd-content .rx-welcome p{font-size:13px}#rxd-content .rx-starters{display:none}
#rxd-content .rx-bubble{max-width:100%;overflow-wrap:anywhere;font-size:14px;line-height:1.7;white-space:pre-wrap}#rxd-content .rx-bubble-row{margin-bottom:24px}#rxd-content .rx-speaker{font-size:10px;margin-bottom:6px}#rxd-content .rx-bubble-row.user .rx-bubble{max-width:92%;background:#303541;border-color:#ffffff0c}
#rxd-content .rx-composer{padding:10px 12px;margin:4px 12px 12px;flex:0 0 auto;min-width:0;border-radius:14px;background:#14161d}
#rxd-content #rx-input{display:block;box-sizing:border-box;height:62px;min-height:48px;max-height:128px;resize:vertical;font-size:16px;line-height:1.5;margin:0 0 6px}
#rxd-content .rx-compose-bottom{padding-top:4px;gap:8px}#rxd-content #rx-voice-state{display:none}#rxd-content #rx-send{min-height:36px;padding:8px 16px;box-shadow:none;font-size:13px}
#rxd-content #rx-alert{padding:9px 13px;margin:0;border-radius:0;max-height:64px;overflow:auto;flex-shrink:0}#rxd-content #rx-working{padding:8px 16px;font-size:12px;flex-shrink:0;max-height:190px;overflow:auto}

/* Shared composer toolbar and its bounded settings popover. */
.rx-composer{position:relative}.rx-compose-bottom>.rxd-tools{gap:6px;min-width:0;flex:1}.rxd-tools #rxf-add{font-size:12px;padding:6px 9px;min-height:34px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:0 1 auto}.rxd-tools #rx-mic{padding:8px;min-height:34px}.rxd-tools #rx-mic span{display:none}
#rxd-controls{margin:0;position:static;color:#eef0f5}#rxd-options-toggle{display:flex;align-items:center;justify-content:center;list-style:none;width:34px;height:34px;box-sizing:border-box;border:1px solid #ffffff1b;border-radius:8px;background:#ffffff05;color:#b8c1d0;cursor:pointer}#rxd-options-toggle::-webkit-details-marker{display:none}#rxd-controls[open]>summary,#rxd-options-toggle:hover{background:#ffffff0e;color:#fff;border-color:#ffffff38}
#rxd-controls .rxd-options{position:absolute;bottom:calc(100% + 8px);left:0;right:0;z-index:12;box-sizing:border-box;max-height:min(420px,55dvh);overflow:auto;overscroll-behavior:contain;border:1px solid #ffffff28;border-radius:14px;background:#242730;padding:16px;box-shadow:0 10px 36px #0008;line-height:1.5;text-align:left}
#rxd-options-title{display:block;font-size:13px;margin-bottom:12px}#rxd-controls .rxd-selects{display:flex;gap:10px}#rxd-controls label{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0;font-size:11px;color:#afb6c5}#rxd-controls label:first-child{flex:1.65}#rxd-controls select{box-sizing:border-box;width:100%;min-height:36px;padding:6px 8px;background:#181b22;border:1px solid #ffffff25;border-radius:8px;color:#f4f4f6;font-size:13px}
#rxd-note,#rxd-controls #rxf-hint{display:block;font-size:11px;line-height:1.5;color:#aeb7c6;margin-top:10px}#rxd-error{font-size:12px;color:#ffbbad;margin:8px 0 0}
#rxd-status{margin-top:14px;padding-top:12px;border-top:1px solid #ffffff12;color:#d5dbe2;font-size:12px;line-height:1.5}#rxd-status .rxd-availability{border-left:2px solid #74889a;padding:3px 0 3px 9px}#rxd-status .rxd-warning{border-color:#eab56a}#rxd-status strong{font-weight:600}#rxd-status small{display:block;color:#aeb9c5;font-size:10px;margin-top:3px}#rxd-status p{margin:5px 0 0}#rxd-status details{margin-top:10px}#rxd-status summary{cursor:pointer;color:#c1ccda}#rxd-status ul{margin:8px 0 0;padding-left:18px}#rxd-status li{margin:6px 0}#rxd-status button{font:inherit;color:#ffd1a6;border:1px solid #ffffff20;background:transparent;border-radius:6px;padding:4px 7px;cursor:pointer}
#rxd-notice{display:block;flex:0 0 auto;text-align:left;color:#f5c9a5;background:#b57e3212;border:0;border-bottom:1px solid #b57e322b;border-radius:0;padding:8px 16px;font-family:inherit;font-size:12px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;box-shadow:none}

/* One small job summary; the error and progress stay available in its popover. */
#rxd-jobs{flex:0 0 auto;min-width:0;padding:0 13px 4px;font-size:11px}#rxd-job-details{position:relative}#rxd-job-details>summary{display:flex;align-items:center;gap:8px;list-style:none;min-height:32px;padding:0 5px;color:#aeb8c7;cursor:pointer;box-sizing:border-box}#rxd-job-details>summary::-webkit-details-marker{display:none}#rxd-job-details>summary>span:first-child{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rxd-job-state{color:#c4cddd}.rxd-job-state.is-attention{color:#ffc19f}
#rxd-jobs .rxd-job-list{position:absolute;bottom:calc(100% + 4px);left:0;right:0;z-index:11;max-height:min(320px,42dvh);overflow:auto;overscroll-behavior:contain;background:#252831;border:1px solid #ffffff28;border-radius:12px;padding:5px 12px;box-shadow:0 10px 30px #0008}
#rxd-jobs article{border-bottom:1px solid #ffffff15;margin:0;padding:11px 0;font-size:12px}#rxd-jobs article:last-child{border-bottom:0}#rxd-jobs article>div{display:flex;justify-content:space-between;gap:10px}#rxd-jobs strong{min-width:0;overflow-wrap:anywhere}#rxd-jobs article>div>span{white-space:nowrap;color:#ffc19f}#rxd-jobs p{margin:6px 0;color:#c0c9d7;overflow-wrap:anywhere}#rxd-jobs button{border:0;background:transparent;color:#ffb1a7;font:inherit;cursor:pointer;padding:4px 0;box-shadow:none}#rxd-jobs small{color:#9ea8b8}.rxd-answer-model{display:block;color:#929bab;font-size:10px;margin:5px 0 8px}

/* Attachments and optional questions can grow without moving the whole panel. */
#rx-chat-form #rxf-area:has(#rxf-list[hidden]):has(#rxf-error[hidden]){display:none}#rx-chat-form #rxf-area .rxf-actions{display:none}#rxd-content #rxf-list{max-height:88px;grid-template-columns:1fr}#rxd-content #rxf-area{margin:0 0 6px}#rxd-content #rxf-list .rxf-thumb{width:30px;height:30px}#rxd-content #rxf-list .rxf-file{padding:4px 6px}
#rxd-content .rx-checkin{flex:0 0 auto;max-height:min(230px,32dvh);overflow-y:auto;overscroll-behavior:contain;margin:0 12px 8px;padding:10px 12px}#rxd-content .rx-checkin textarea{min-height:48px;max-height:96px}#rxd-content .rx-checkin-footer{gap:8px}#rxd-content .rx-checkin-footer small{font-size:10px}
#rex-dock button:focus-visible,#rex-dock summary:focus-visible,#rxd-controls summary:focus-visible,#rxd-controls select:focus-visible,#rxd-job-details>summary:focus-visible{outline:2px solid #ffab94;outline-offset:2px}#rex-dock button:disabled{opacity:.5;cursor:default}
#rxd-panel.rxd-expanded{width:min(920px,calc(100vw - 44px));height:calc(100dvh - 112px)}#rxd-panel.rxd-expanded .rx-messages{padding:24px 32px}
@media(max-width:600px){
 #rxd-launch{right:12px;bottom:max(14px,env(safe-area-inset-bottom));padding:4px 14px 4px 7px}
 #rex-dock:has(#rxd-panel:not([hidden])) #rxd-launch{display:none}
 #rxd-panel,#rxd-panel.rxd-expanded{inset:8px 8px auto;width:auto;height:calc(100dvh - 16px - env(safe-area-inset-bottom));border-radius:15px}
 .rxd-header{padding:10px 12px}.rxd-header small{font-size:10px}#rxd-content .rx-messages,#rxd-panel.rxd-expanded .rx-messages{padding:16px}
 #rxd-content .rx-composer{margin:4px 10px 10px;padding:8px 10px}#rxd-content #rx-input{height:56px;max-height:106px}
 #rxd-content .rx-checkin{max-height:30dvh;margin-inline:10px}#rxd-content .rx-checkin-footer{flex-direction:row;align-items:center}#rxd-content .rx-checkin-footer small{max-width:55%}
}
@media(max-height:520px){
 #rxd-panel{bottom:74px;height:calc(100dvh - 90px)}.rxd-header{padding-block:6px}.rxd-header small{display:none}.rxd-avatar{width:30px;height:30px}
 #rxd-content #rx-input{height:44px;min-height:40px;max-height:68px}#rxd-content .rx-composer{padding:6px 9px;margin-bottom:8px}#rxd-content .rx-messages{min-height:48px;padding-block:10px}
 #rxd-content .rx-checkin{max-height:90px;padding:8px}#rxd-content #rxf-list{max-height:48px}#rxd-content #rx-working{max-height:96px;padding-block:5px}
 #rxd-controls .rxd-options{max-height:55dvh}#rxd-jobs .rxd-job-list{max-height:45dvh}
}
@media(max-width:600px) and (max-height:520px){#rxd-panel,#rxd-panel.rxd-expanded{bottom:auto;height:calc(100dvh - 16px - env(safe-area-inset-bottom))}}
@media print{#rex-dock{display:none!important}}
