/* Isolated prototype. Reuses the approved page typography and blue/cyan identity. */
.sf-assistant,.sf-dialog{--sf-surface:#f7fafc;--sf-ink:#091c30;--sf-muted:#526276;--sf-line:#d4dee9;--sf-accent:#0756e8;font-family:Arial,sans-serif;color:var(--sf-ink)}
[data-theme="dark"] .sf-assistant,[data-theme="dark"] .sf-dialog{--sf-surface:#101d2d;--sf-ink:#f4f7fa;--sf-muted:#b3c2d4;--sf-line:#34475f;--sf-accent:#63baff}
.sf-assistant{position:fixed;right:24px;bottom:24px;z-index:40}.sf-launch{display:flex;align-items:center;gap:12px;border:1px solid var(--sf-line);background:var(--sf-surface);color:var(--sf-ink);padding:12px 16px;min-height:56px;box-shadow:0 8px 32px #091c3018;border-radius:8px;text-align:left;cursor:pointer;font:inherit;font-size:12px}.sf-launch b{display:block;font-size:14px;margin-top:2px}.sf-launch>span:last-child{margin-left:8px;color:var(--sf-accent);font-size:22px}.sf-monogram{display:grid;place-items:center;flex:none;width:36px;height:36px;color:#0756e8;background:#e3efff;font-size:19px;font-weight:800;font-style:italic;letter-spacing:-2px;border-radius:4px;padding-right:3px}
.sf-dialog{padding:0;position:fixed;inset:auto 24px 24px auto;margin:0;width:388px;max-width:calc(100% - 32px);max-height:calc(100dvh - 40px);overflow:auto;background:var(--sf-surface);border:1px solid var(--sf-line);border-radius:12px;box-shadow:0 16px 64px #00152c30}.sf-dialog::backdrop{background:#07192c38;backdrop-filter:blur(2px)}.sf-dialog-head{display:flex;gap:12px;align-items:center;padding:20px;border-bottom:1px solid var(--sf-line)}.sf-dialog-head h2{font-size:16px;line-height:1.3;margin:0;font-weight:600;letter-spacing:0}.sf-dialog-head p{font-size:12px;margin:4px 0 0;color:var(--sf-muted)}.sf-dialog-head button{margin-left:auto;border:0;background:transparent;color:var(--sf-ink);font-size:26px;width:44px;height:44px;cursor:pointer;flex:none}.sf-demo-label{padding:12px 20px;background:#0756e810;color:var(--sf-accent);font-size:10px;letter-spacing:1.2px;font-weight:700}.sf-dialog-body{padding:24px 20px}.sf-welcome{font-size:24px;line-height:1.25;letter-spacing:-.7px;margin:0 0 12px;max-width:280px}.sf-helper{font-size:13px;line-height:1.6;color:var(--sf-muted);margin:0 0 20px}.sf-options{display:grid;gap:8px}.sf-options button{display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;font:inherit;font-size:14px;padding:16px;border:1px solid var(--sf-line);border-radius:4px;min-height:52px;background:transparent;color:var(--sf-ink);cursor:pointer}.sf-options button:hover{border-color:var(--sf-accent)}.sf-options span{color:var(--sf-accent)}.sf-dialog button:focus-visible,.sf-dialog a:focus-visible,.sf-launch:focus-visible{outline:3px solid var(--sf-accent);outline-offset:3px}.sf-answer-kicker{font-size:10px;letter-spacing:1px;color:var(--sf-muted);margin:24px 0 10px}.sf-dialog h3{font-size:20px;line-height:1.3;letter-spacing:-.4px;margin:0 0 12px}.sf-dialog #sf-answer-copy{font-size:14px;line-height:1.65;margin:0 0 20px}.sf-dialog #sf-alexander{display:flex;justify-content:space-between;gap:12px;padding:16px;background:#0756e8;color:white;text-decoration:none;border-radius:4px;font-size:14px}.sf-dialog small{display:block;font-size:11px;line-height:1.5;color:var(--sf-muted);margin-top:10px}.sf-dialog #sf-back{background:transparent;border:0;color:var(--sf-accent);padding:12px 0;font:inherit;font-size:13px;min-height:44px;cursor:pointer}.sf-dialog-foot{padding:16px 20px;border-top:1px solid var(--sf-line);font-size:11px;line-height:1.65;color:var(--sf-muted)}.sf-dialog [hidden]{display:none!important}
@media(max-width:600px){.sf-assistant{right:16px;bottom:max(16px,env(safe-area-inset-bottom))}.sf-launch{padding:10px 12px;gap:8px}.sf-dialog{right:16px;bottom:max(16px,env(safe-area-inset-bottom));max-height:calc(100dvh - 32px);width:calc(100% - 32px)}.sf-dialog-head{padding:16px}.sf-dialog-body{padding:20px 16px}.sf-dialog-foot{padding:14px 16px}.sf-welcome{font-size:23px}}

.sf-dialog-foot{display:block;grid-template-columns:none;width:auto;max-width:none}.sf-dialog-foot br{display:block}

.sf-dialog-head{flex-wrap:nowrap}.sf-dialog-head>div{min-width:0;flex:1}.sf-dialog-head .sf-monogram{margin:0}

/* Approved round companion: shell + full digital face, no animal features. */
.sf-avatar{display:block;flex:none;width:48px;height:48px;--shell-top:#f6fbff;--shell-mid:#f4f7fa;--shell-bottom:#b7cde7;--shell-edge:#9cbcdf;--shell-shine:#ffffff;--face-top:#001b45;--face-bottom:#091c30;--face-edge:#315779;--eyes:#4de6ff;--smile:#64efff}
.sf-avatar svg{display:block;width:100%;height:100%;overflow:visible}.sf-shell-top{stop-color:var(--shell-top)}.sf-shell-mid{stop-color:var(--shell-mid)}.sf-shell-bottom{stop-color:var(--shell-bottom)}.sf-face-top{stop-color:var(--face-top)}.sf-face-bottom{stop-color:var(--face-bottom)}.sf-shell-outline{stroke:var(--shell-edge);stroke-width:1}.sf-shell-shine{stroke:var(--shell-shine);opacity:.85}.sf-screen-outline{stroke:var(--face-edge);stroke-width:1.2}.sf-digital-eyes{stroke:var(--eyes)}.sf-digital-smile{stroke:var(--smile)}.sf-screen-reflection{stroke:#d3f4ff;opacity:.13}.sf-avatar-shadow{fill:#091c30;opacity:.14}
[data-theme="dark"] .sf-avatar{--shell-top:#315779;--shell-mid:#0a214e;--shell-bottom:#091c30;--shell-edge:#69c4ff;--shell-shine:#9cbcdf;--face-top:#091c30;--face-bottom:#091c30;--face-edge:#315779;--eyes:#4de6ff;--smile:#64efff}
.sf-launch .sf-avatar{width:44px;height:44px}.sf-dialog-head .sf-avatar{width:48px;height:48px}.sf-dialog-head>div{min-width:0}.sf-dialog-head h2{overflow-wrap:normal}
@media(max-width:360px){.sf-dialog-head{gap:8px;padding:12px}.sf-dialog-head .sf-avatar{width:42px;height:42px}.sf-dialog-head h2{font-size:14px}.sf-dialog-head p{font-size:11px}.sf-dialog-head button{width:40px;min-width:40px}}
@media(prefers-reduced-motion:reduce){.sf-avatar,.sf-avatar *{animation:none!important;transition:none!important}}

/* Face-only launcher. White shell in both themes; dimensional SVG, not WebGL. */
.sf-launch{width:64px;height:64px;min-height:64px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:transparent;box-shadow:none;gap:0}
.sf-launch .sf-avatar{width:64px;height:64px;margin:0;padding:0;font-size:inherit}.sf-launch>span:last-child{margin:0;font-size:inherit}.sf-launch .sf-avatar svg{filter:drop-shadow(0 5px 5px #001b4530)}
.sf-avatar,[data-theme="dark"] .sf-avatar{--shell-top:#f6fbff;--shell-mid:#f4f7fa;--shell-bottom:#b7cde7;--shell-edge:#9cbcdf;--shell-shine:#ffffff;--face-top:#001b45;--face-bottom:#091c30;--face-edge:#315779;--eyes:#4de6ff;--smile:#64efff}
[data-theme="dark"] .sf-launch .sf-avatar svg{filter:drop-shadow(0 5px 7px #001b4560) drop-shadow(0 0 1px #f4f7fa80)}
.sf-shell-outline{stroke-width:1.2}.sf-shell-shine{opacity:.95}.sf-screen-reflection{opacity:.2}
@keyframes sf-greeting-blink{0%,38%,52%,100%{transform:scaleY(1)}44%,46%{transform:scaleY(.12)}}
@keyframes sf-greeting-look{0%,100%{translate:0 0}22%,65%{translate:1px 0}}
html:not([data-paused="true"]) .sf-dialog[open] .sf-digital-eyes{transform-box:fill-box;transform-origin:center;animation:sf-greeting-blink 1.7s ease 1,sf-greeting-look 1.7s ease 1}
html[data-paused="true"] .sf-avatar *{animation:none!important}
@media(prefers-reduced-motion:reduce){.sf-avatar,.sf-avatar *{animation:none!important;transition:none!important}}

.sf-dialog{z-index:60}.sf-avatar{position:relative}.sf-avatar canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;filter:drop-shadow(0 3px 3px #001b4530)}.sf-avatar.has-depth>svg{visibility:hidden}.sf-avatar.has-depth *{animation:none!important}

/* Local QA simulation only; no browser/OS preference changes. */
.sf-qa-reduced .sf-avatar,.sf-qa-reduced .sf-avatar *{animation:none!important;transition:none!important}

/* No glow disc; shell geometry remains ivory. Fallback moves one eye only. */
.sf-launch .sf-avatar svg,[data-theme="dark"] .sf-launch .sf-avatar svg{filter:drop-shadow(0 3px 3px #001b4530)}
.sf-avatar canvas{filter:drop-shadow(0 3px 2px #001b4526)}
html .sf-dialog[open] .sf-digital-eyes{animation:none!important;transform:none;translate:none}
@keyframes sf-single-wink{0%,30%,65%,100%{transform:scaleY(1)}43%,52%{transform:scaleY(.12)}}
html:not([data-paused="true"]) .sf-dialog[open] .sf-digital-eyes ellipse:first-child{transform-box:fill-box;transform-origin:center;animation:sf-single-wink .7s ease 1}
html[data-paused="true"] .sf-avatar *,.sf-qa-reduced .sf-avatar *{animation:none!important}
@media(prefers-reduced-motion:reduce){.sf-avatar *{animation:none!important}}

/* Silhouette only; no accessory background, glow or fallback beneath canvas. */
.sf-assistant,.sf-launch,.sf-assistant .sf-avatar,.sf-avatar canvas{background:transparent!important;background-image:none!important;box-shadow:none!important}
.sf-assistant::before,.sf-assistant::after,.sf-launch::before,.sf-launch::after,.sf-avatar::before,.sf-avatar::after{content:none!important}
.sf-avatar.has-depth>svg{display:none!important}
.sf-launch .sf-avatar svg,[data-theme="dark"] .sf-launch .sf-avatar svg,.sf-avatar canvas{filter:none!important}
.sf-avatar *{animation:none!important}

/* Expanded navy face; thin neutral edge, no cyan middle ring. */
.sf-avatar{--shell-edge:#b7cde7;--face-edge:#091c30}.sf-screen-outline{stroke-width:.65}.sf-screen-reflection{opacity:.08}

/* Navy-blue screen, integrated into the ivory shell. */
.sf-avatar,[data-theme="dark"] .sf-avatar{--face-top:#0a214e;--face-bottom:#091c30;--face-edge:#315779}

/* Local detail inspection only; standard launcher stays64px. */
.sf-qa-detail .sf-assistant{right:40px;bottom:40px}.sf-qa-detail .sf-launch{width:192px;height:192px}.sf-qa-detail .sf-launch .sf-avatar{width:192px;height:192px}

/* Private conversation. Does not change the final avatar geometry or motion. */
.sf-chat-body{padding:18px 20px}.sf-chat-body .sf-welcome{font-size:22px;margin-bottom:10px}.sf-chat-topics{display:flex;flex-wrap:wrap;gap:7px;margin:14px 0}.sf-chat-topics button{width:auto;min-height:36px;padding:8px 10px;font-size:12px;border-radius:20px;display:block}.sf-chat-topics button span{display:none}
#sf-chat-log{height:160px;min-height:110px;overflow-y:auto;overscroll-behavior:contain;padding:4px 2px;margin:12px 0 16px}.sf-chat-message{padding:10px 12px;border:1px solid var(--sf-line);border-radius:10px;margin:0 12px 10px 0;font-size:13px;line-height:1.55;overflow-wrap:anywhere;white-space:pre-wrap}.sf-chat-message strong{display:block;font-size:10px;letter-spacing:.3px;margin-bottom:4px;color:var(--sf-muted)}.sf-chat-message span{display:block}.sf-user-message{margin-left:20px;margin-right:0;background:#0756e80c}.sf-bot-message{background:var(--sf-surface)}
#sf-chat-form label{display:block;font-size:13px;font-weight:600;margin-bottom:8px}#sf-message{display:block;width:100%;box-sizing:border-box;resize:vertical;max-height:120px;min-height:70px;border:1px solid var(--sf-line);border-radius:7px;background:var(--sf-surface);color:var(--sf-ink);padding:10px 12px;font:inherit;font-size:14px;line-height:1.5}#sf-message::placeholder{color:var(--sf-muted);opacity:1}#sf-message:focus-visible{outline:2px solid var(--sf-accent);outline-offset:2px}.sf-chat-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}.sf-chat-actions small{margin:0}#sf-send{min-height:42px;min-width:90px;border:0;border-radius:6px;background:#0756e8;color:#fff;padding:10px 16px;cursor:pointer;font:inherit;font-size:13px}#sf-send:disabled{opacity:.6;cursor:wait}#sf-chat-status{font-size:11px;line-height:1.45;color:var(--sf-muted);margin:8px 0;min-height:16px}.sf-chat-secondary{display:flex;gap:12px;align-items:center;justify-content:space-between;font-size:11px}.sf-chat-secondary button{border:0;background:transparent;color:var(--sf-accent);min-height:36px;padding:4px 0;font:inherit;cursor:pointer}.sf-chat-secondary a{color:var(--sf-accent)}.sf-dialog-foot p{margin:0 0 6px}.sf-dialog-foot p:last-child{margin:0}
@media(max-width:600px){.sf-chat-body{padding:14px 16px}.sf-chat-body .sf-welcome{font-size:21px}#sf-chat-log{height:130px}.sf-chat-topics{margin:10px 0}.sf-dialog-foot{font-size:10px}.sf-chat-secondary{font-size:11px}}
@media(max-height:700px){#sf-chat-log{height:95px;min-height:80px}.sf-chat-body{padding-top:12px;padding-bottom:12px}.sf-chat-body .sf-welcome{font-size:19px}.sf-helper{margin-bottom:8px}}

.sf-dialog[open]{display:flex;flex-direction:column;height:min(780px,calc(100dvh - 40px));overflow:hidden}.sf-dialog-head,.sf-demo-label,.sf-dialog-foot{flex-shrink:0}.sf-dialog-head{padding:12px 16px}.sf-demo-label{padding:9px 16px;line-height:1.45;font-size:9px}.sf-chat-body{flex:1;min-height:0;display:flex;flex-direction:column;overflow-y:auto;padding:12px 16px}.sf-chat-body .sf-welcome{font-size:19px;margin-bottom:7px}.sf-chat-body .sf-helper{font-size:11px;line-height:1.45;margin-bottom:5px}.sf-chat-topics{margin:8px 0;flex-shrink:0}#sf-chat-log{flex:1;min-height:90px;height:auto;margin:7px 0 12px}.sf-chat-message{font-size:12px}#sf-chat-form,.sf-chat-secondary{flex-shrink:0}.sf-dialog-foot{padding:10px 16px;font-size:10px;line-height:1.45}.sf-connection-details{margin-bottom:6px}.sf-connection-details summary{cursor:pointer;min-height:22px}.sf-connection-details p{padding-top:5px}#sf-runtime{overflow-wrap:anywhere}@media(max-width:600px){.sf-dialog[open]{height:calc(100dvh - 32px)}#sf-chat-log{min-height:80px}.sf-chat-body .sf-welcome{font-size:18px}.sf-chat-secondary{font-size:10px}}

/* Compact chat: the transcript is the only scrolling content region. */
.sf-dialog[open]{height:min(820px,calc(100dvh - 32px));width:420px;max-height:calc(100dvh - 32px);overflow:hidden}
.sf-dialog-head{padding:8px 12px;gap:10px}.sf-dialog-head .sf-avatar{width:40px;height:40px}.sf-dialog-head p{font-size:11px}.sf-dialog-head h2{font-size:15px}.sf-demo-label{padding:5px 12px;line-height:1.3;font-size:9px;letter-spacing:.6px}
.sf-chat-body{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:6px;overflow:hidden;min-height:0;padding:8px 12px}.sf-chat-body .sf-welcome{display:none}.sf-chat-body .sf-helper{font-size:10px;line-height:1.4;margin:0}.sf-chat-topics{margin:0;gap:6px;flex-wrap:nowrap}.sf-chat-topics button{min-height:34px;padding:6px 9px;font-size:11px;white-space:nowrap}
#sf-chat-log{height:auto;min-height:0;margin:0;padding:2px 1px;overflow-x:hidden;overflow-y:auto;scrollbar-gutter:stable;overscroll-behavior:contain}.sf-chat-message{padding:8px 10px;margin-bottom:7px;font-size:12px;line-height:1.5}.sf-chat-message strong{font-size:9px;margin-bottom:3px}
#sf-chat-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;align-items:start;margin:0}#sf-chat-form label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}#sf-message{height:52px;min-height:52px;max-height:52px;resize:none;padding:7px 10px;font-size:14px;line-height:1.3}.sf-chat-actions{margin:0;display:flex;flex-direction:column-reverse;gap:2px}.sf-chat-actions small{font-size:9px;line-height:1}.sf-chat-actions #sf-send{height:44px;min-height:44px;min-width:66px;padding:8px 10px;font-size:12px}#sf-chat-status{grid-column:1/-1;margin:0;min-height:0;font-size:10px;line-height:1.3}#sf-chat-status:empty{display:none}.sf-chat-secondary{min-height:28px;font-size:10px;gap:8px}.sf-chat-secondary button{min-height:28px}
.sf-dialog-foot{padding:5px 12px;font-size:9px;line-height:1.3}.sf-connection-details{margin-bottom:2px}.sf-connection-details summary{min-height:18px}.sf-connection-details p{padding-top:2px}
@media(max-width:600px){.sf-dialog[open]{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);width:calc(100% - 16px);max-width:calc(100% - 16px);right:8px;bottom:8px}.sf-chat-body{padding:7px 10px}.sf-dialog-head{padding:6px 10px}.sf-dialog-foot{padding:4px 10px}}
@media(max-height:550px){.sf-dialog-head p,.sf-dialog-foot>p{display:none}.sf-dialog-head .sf-avatar{width:32px;height:32px}.sf-chat-body .sf-helper{font-size:9px}.sf-dialog-head{padding-block:3px}.sf-demo-label{padding-block:3px}.sf-chat-topics button{min-height:28px}.sf-chat-body{gap:4px}}

html:has(#sf-demo[open]) { overflow:hidden; }

.sf-dialog-head #sf-close { line-height:1; padding:0; }

.sf-dialog .sf-dialog-head { height:56px; min-height:56px; max-height:56px; box-sizing:border-box; flex-wrap:nowrap; }

/* D — Conversacion directa. Existing avatar and local-only protocol preserved. */
.sf-dialog{--sf-surface:#fff;--sf-user:#e2efff;border-radius:18px}
[data-theme="dark"] .sf-dialog{--sf-surface:#0b1929;--sf-user:#193b69}
.sf-dialog[open]{width:390px;height:min(720px,calc(100dvh - 48px));max-height:calc(100dvh - 48px)}
.sf-dialog .sf-dialog-head{height:72px;min-height:72px;max-height:72px;padding:12px 18px;gap:12px}
.sf-dialog-head .sf-avatar{width:38px;height:38px}.sf-dialog-head h2{font-size:17px}.sf-dialog-head p{font-size:12px;margin-top:3px}
.sf-dialog-head #sf-close{font-size:25px;color:var(--sf-muted)}
.sf-demo-label{background:transparent;color:var(--sf-muted);padding:7px 20px 0;font-size:9px;letter-spacing:.4px}
.sf-chat-body{padding:8px 20px 0;grid-template-rows:auto minmax(0,1fr) auto auto auto;gap:10px}
.sf-chat-body .sf-helper{grid-row:1;font-size:10px;color:var(--sf-muted)}
#sf-chat-log{grid-row:2;padding:14px 2px 8px;scrollbar-width:thin;scrollbar-gutter:stable}
.sf-chat-message{font-size:15px;line-height:1.6;margin:0 0 22px;padding:0;border:0;border-radius:0;background:transparent}
.sf-bot-message{margin-right:6px}.sf-bot-message strong{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.sf-user-message{margin-left:24px;padding:0;background:transparent}.sf-user-message strong{font-size:11px;font-weight:400;margin:0 8px 5px}
.sf-user-message>span{padding:12px 15px;background:var(--sf-user);border-radius:14px}
.sf-chat-topics{grid-row:3;gap:7px;padding:0;justify-content:flex-start}
.sf-chat-topics button{border-radius:22px;min-height:36px;padding:6px 12px;font-size:11px;color:var(--sf-accent);border-color:color-mix(in srgb,var(--sf-accent) 30%,transparent);background:transparent}
#sf-chat-form{grid-row:4;gap:3px 10px;align-items:center}
#sf-message{height:48px;min-height:48px;max-height:48px;border:0;border-bottom:1px solid var(--sf-muted);border-radius:0;padding:12px 3px 7px;background:transparent;font-size:14px;line-height:1.5}
.sf-chat-actions{align-self:start;gap:0}.sf-chat-actions #sf-send{width:44px;min-width:44px;height:44px;min-height:44px;border-radius:50%;padding:0;font-size:26px;line-height:1;background:#0756e8;color:#fff}
.sf-chat-actions small{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#sf-chat-status{font-size:9px;line-height:1.3;padding-top:2px}
.sf-chat-secondary{grid-row:5;display:flex;justify-content:center;border-top:1px solid var(--sf-line);padding:5px 0 2px;min-height:35px}
.sf-chat-secondary a{display:flex;align-items:center;justify-content:center;min-height:36px;font-size:12px;text-decoration:none}
.sf-chat-secondary #sf-clear{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;min-height:0;padding:0}
.sf-chat-secondary #sf-clear:focus-visible{position:static;clip-path:none;width:auto;height:auto;min-height:36px;margin-right:12px}
.sf-dialog-foot{padding:0 20px 9px;border-top:0;font-size:9px}.sf-connection-details{margin:0}.sf-connection-details summary{min-height:22px}.sf-dialog-foot>p{font-size:9px;margin:0}
@media(max-width:600px){.sf-dialog[open]{width:calc(100% - 24px);max-width:calc(100% - 24px);height:min(720px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);right:12px;bottom:12px}.sf-dialog .sf-dialog-head{padding:10px 16px;height:66px;min-height:66px;max-height:66px}.sf-chat-body{padding:7px 16px 0;gap:8px}.sf-dialog-foot{padding-inline:16px}.sf-demo-label{padding-inline:16px}.sf-chat-message{font-size:14px;line-height:1.55}.sf-chat-topics{gap:6px}.sf-chat-topics button{padding-inline:10px}}
@media(max-height:550px){.sf-dialog .sf-dialog-head{height:52px;min-height:52px;max-height:52px}.sf-dialog-head p{display:block}.sf-dialog-head .sf-avatar{width:30px;height:30px}.sf-chat-body{gap:5px}.sf-demo-label{padding-top:3px}.sf-chat-message{margin-bottom:12px}.sf-chat-topics button{min-height:32px}.sf-dialog-foot>p{display:none}}

.sf-connection-details #sf-clear{border:0;background:transparent;color:var(--sf-accent);font:inherit;min-height:32px;padding:4px 0;cursor:pointer}
#sf-chat-log,.sf-chat-message,#sf-chat-form,.sf-chat-actions{position:relative}

/* Balanced outline send icon; keep the same accessible button and local submit. */
.sf-chat-actions #sf-send{display:grid;place-items:center;box-sizing:border-box;width:46px;height:46px;min-width:46px;min-height:46px;padding:0;background:#0756e8;border:1px solid transparent;box-shadow:none;transition:background-color .15s ease,box-shadow .15s ease}
#sf-send .sf-send-icon{display:block;width:22px;height:22px;transform:translate(-.5px,.5px);pointer-events:none;flex:none}
.sf-chat-actions #sf-send:hover:not(:disabled){background:#0648c7;box-shadow:0 3px 10px #0756e829}
.sf-chat-actions #sf-send:focus-visible{outline:3px solid var(--sf-accent);outline-offset:3px}
.sf-chat-actions #sf-send:disabled{background:#466caa;opacity:1;cursor:wait;box-shadow:none}
.sf-chat-actions #sf-send:disabled .sf-send-icon{opacity:.75}
@media(prefers-reduced-motion:reduce){.sf-chat-actions #sf-send{transition:none}}

.sf-chat-navigation{display:inline-flex;align-items:center;min-height:44px;color:var(--sf-accent);text-decoration:underline;text-underline-offset:3px}.sf-chat-navigation:focus-visible{outline:2px solid var(--sf-accent);outline-offset:3px}

/* Integration: isolate the existing companion from page resets and menu overlays. */
.sf-dialog{padding:0;box-sizing:border-box;margin:0;left:auto;top:auto;background:var(--sf-surface);font-family:Arial,sans-serif;line-height:1.5;letter-spacing:normal;text-align:left}
.sf-dialog::backdrop{background:rgb(9 28 48 / .22)}
.sf-dialog button,.sf-dialog input,.sf-dialog textarea{font-family:inherit}
.sf-dialog .sf-chat-topics button{min-height:44px}
.sf-dialog .sf-connection-details summary,.sf-dialog .sf-connection-details #sf-clear{min-height:44px}
.sf-dialog .sf-dialog-foot a{display:inline-flex;align-items:center;min-height:44px}
html:has(#menu-movil:not([hidden])) .sf-assistant{visibility:hidden}
/* Short viewports: keep the conversation readable; the body can scroll to controls. */
@media(max-height:550px){
 .sf-dialog .sf-chat-body{display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain}
 .sf-dialog #sf-chat-log{flex:0 0 auto;min-height:110px;max-height:180px;overflow-y:auto}
 .sf-dialog .sf-chat-body>*{flex-shrink:0}
}

.sf-launch[hidden]{display:none!important}
