/* PATCH223: independent chatbot UI; original bundled React widget hidden without modifications. */
html.fth223-active .fth-chat111{display:none!important}
.fth223{position:fixed;bottom:18px;right:18px;z-index:2147483000;font-family:inherit;color:#15253f;box-sizing:border-box}
.fth223 *{box-sizing:border-box}
.fth223 button{font-family:inherit;cursor:pointer}
.fth223-launch{border:0;border-radius:999px;background:#1359b2;color:white;padding:14px 19px;box-shadow:0 8px 30px #041e4270;font-weight:700}
.fth223-panel{position:absolute;bottom:62px;right:0;width:min(390px,calc(100vw - 26px));max-height:min(740px,calc(100dvh - 100px));overflow:hidden;background:#fff;border:1px solid #dde7f2;box-shadow:0 16px 50px #05163255;border-radius:18px;display:flex;flex-direction:column}
.fth223-panel[hidden]{display:none}
.fth223-header{display:flex;justify-content:space-between;align-items:center;background:#0a3f88;color:#fff;padding:14px 16px;gap:12px}
.fth223-header strong{display:block;font-size:15px}.fth223-header small{display:block;font-size:11px;opacity:.9;margin-top:3px}
.fth223-close{font-size:24px;border:0;background:transparent;color:white}
.fth223-modes{display:flex;flex-wrap:wrap;gap:6px;padding:10px 12px 0}
.fth223-mode{flex:1 1 auto;font-size:11px;border:1px solid #cedbed;background:#f6f9ff;color:#1d426f;border-radius:8px;padding:8px 7px;max-width:100%;}
.fth223-mode[aria-pressed=true]{background:#dbeafe;border-color:#4b8ddc;font-weight:700}
.fth223-subtitle{font-size:15px;margin:10px 14px 2px;color:#102c50}
.fth223-status{font-size:11px;line-height:1.55;color:#52667c;margin:0 14px 8px}
.fth223-log{min-height:140px;max-height:350px;overflow-y:auto;flex:1;padding:12px;background:#f6f8fc;display:flex;flex-direction:column;gap:8px}
.fth223-empty{font-size:13px;color:#64748b;text-align:center;margin:auto}
.fth223-message{display:flex;flex-direction:column;align-items:flex-start;max-width:88%}.fth223-message.mine{align-self:flex-end;align-items:flex-end}
.fth223-bubble{white-space:pre-wrap;overflow-wrap:anywhere;background:white;border:1px solid #e4eaf2;color:#163455;padding:10px 12px;border-radius:12px;font-size:13px;line-height:1.55}
.fth223-message.mine .fth223-bubble{background:#e2efff;border-color:#bfdbfe}.fth223-message small{font-size:10px;color:#64748b;margin:3px 4px}
.fth223-quick{display:flex;flex-wrap:wrap;gap:6px;overflow-y:auto;max-height:83px;padding:9px 12px}
.fth223-chip{font-size:11px;padding:7px 9px;white-space:normal;text-align:left;border-radius:7px;border:1px solid #a9c9ec;background:#f4f9ff;color:#173f72}
.fth223-error{font-size:12px;line-height:1.5;color:#9a2419;background:#fff3f2;padding:8px 12px;margin:4px 10px;border-radius:8px}
.fth223-form{display:flex;gap:8px;padding:10px 12px}.fth223-entry{width:100%;resize:vertical;min-height:47px;max-height:85px;font:inherit;font-size:13px;padding:9px;border-radius:9px;border:1px solid #cbd5e1;color:#17263b;background:#fff}
.fth223-send{border:0;border-radius:9px;background:#1359b2;color:white;padding:0 15px;font-size:13px;font-weight:600}
.fth223-send:disabled{opacity:.6;cursor:wait}
.fth223-footer{padding:0 12px 12px;display:flex;gap:6px;align-items:center;justify-content:space-between}
.fth223-consent{display:flex;align-items:start;gap:6px;line-height:1.4;max-width:270px;font-size:10px;color:#52627b}
.fth223-consent input{margin:1px 0 0}.fth223-reset{border:0;color:#1d5ea8;background:transparent;white-space:nowrap;font-size:11px}
.fth223-admin-trigger{position:fixed;top:86px;right:22px;z-index:2147482996;border:0;border-radius:10px;padding:10px 15px;background:#1459a8;color:#fff;font:600 13px inherit;box-shadow:0 4px 12px #1236}
.fth223-admin-panel{position:fixed;z-index:2147483002;top:105px;right:16px;bottom:16px;width:min(500px,calc(100vw - 32px));overflow-y:auto;background:#fff;color:#19344f;box-shadow:0 10px 42px #0005;border:1px solid #d8e4ee;border-radius:16px;padding:21px;font:14px/1.5 system-ui,sans-serif}
.fth223-admin-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.fth223-admin-title h2{font-size:20px;margin:0}.fth223-admin-title button{background:#e9eff7;color:#123456;border:0;border-radius:8px;padding:6px 12px}
.fth223-admin-panel>p{font-size:12px;color:#567;margin:12px 0}
.fth223-setting{display:flex;flex-direction:column;gap:5px;margin:12px 0;font-size:13px;font-weight:600}
.fth223-setting input:not([type=checkbox]),.fth223-setting select,.fth223-setting textarea{font:inherit;width:100%;background:white;color:#17253c;padding:10px;border:1px solid #bac8d7;border-radius:8px;font-weight:400}
.fth223-setting:has(input[type=checkbox]){flex-direction:row;align-items:center;justify-content:space-between}
.fth223-admin-actions{display:flex;flex-wrap:wrap;gap:10px}.fth223-admin-actions button{background:#e6eef7;color:#113e73;border:1px solid #b6c8db;border-radius:8px;padding:11px 14px}
.fth223-admin-actions button.fth223-primary{background:#155aac;color:#fff;border:0}.fth223-settings-feedback{font-size:12px;color:#15538d}
.fth223 :focus-visible,.fth223-admin-panel :focus-visible,.fth223-admin-trigger:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}
@media(max-width:460px){.fth223{right:10px;bottom:10px}.fth223-panel{bottom:57px;width:calc(100vw - 20px);max-height:calc(100dvh - 79px)}.fth223-log{max-height:300px}.fth223-admin-trigger{top:80px;right:10px}}
@media(prefers-reduced-motion:reduce){.fth223 *{scroll-behavior:auto}}
@media(prefers-color-scheme:dark){html[data-theme='dark'] .fth223-panel,html.dark .fth223-panel{background:#102034;color:#eaf2fc;border-color:#31445a}}

/* PATCH223B: restore the familiar blue circular chat bubble on public pages. */
.fth223-launch{
  display:grid;place-items:center;width:62px;height:62px;min-width:62px;min-height:62px;
  padding:0;border:1px solid rgba(255,255,255,.24);border-radius:50%;
  background:linear-gradient(135deg,#245bdd 0%,#168bdc 100%);color:#fff;
  box-shadow:0 7px 24px rgba(13,65,146,.36);line-height:1;
  transition:transform .18s ease, box-shadow .18s ease;
}
.fth223-launch svg{display:block;pointer-events:none;flex:none}
.fth223-launch:hover{transform:translateY(-3px);box-shadow:0 10px 26px rgba(13,65,146,.42)}
.fth223-launch:active{transform:translateY(-1px)}
.fth223-launch[aria-expanded=true]{box-shadow:0 0 0 3px rgba(44,128,237,.22),0 8px 24px rgba(13,65,146,.27)}
.fth223-panel{bottom:76px}
@media(max-width:460px){.fth223-launch{width:56px;height:56px;min-width:56px;min-height:56px}.fth223-panel{bottom:70px}}
@media(prefers-reduced-motion:reduce){.fth223-launch{transition:none}.fth223-launch:hover{transform:none}}

/* PATCH225 — preserve reading position, center expanded chat, blur the page behind. */
.fth225-backdrop[hidden]{display:none!important}
.fth225-backdrop{position:fixed;inset:0;background:rgba(7,19,45,.48);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);pointer-events:auto}
.fth225-header-controls{display:flex;align-items:center;gap:8px;flex:none}
.fth225-expand{border:1px solid rgba(255,255,255,.36);border-radius:8px;background:rgba(255,255,255,.14);color:#fff;padding:7px 11px;font-size:12px;line-height:1.3;font-weight:600}
.fth225-expand:hover{background:rgba(255,255,255,.24)}
.fth223-log{overflow-anchor:none;min-height:0;overscroll-behavior:contain}
.fth223.fth225-expanded{inset:0;top:0;left:0;right:0;bottom:0;width:100%;height:100dvh;pointer-events:none}
.fth223.fth225-expanded .fth223-launch{display:none}
.fth223.fth225-expanded .fth223-panel{position:fixed;left:50%;top:50%;right:auto;bottom:auto;transform:translate(-50%,-50%);width:min(980px,calc(100vw - 64px));height:min(780px,calc(100dvh - 64px));max-height:calc(100dvh - 64px);border-radius:20px;pointer-events:auto;box-shadow:0 22px 75px rgba(0,0,0,.36)}
.fth223.fth225-expanded .fth223-log{flex:1;min-height:0;max-height:none}
.fth223.fth225-expanded .fth223-bubble{font-size:14px;line-height:1.65}
.fth223.fth225-expanded .fth223-message{max-width:82%}
@media(max-width:650px){.fth223.fth225-expanded .fth223-panel{width:calc(100vw - 24px);height:calc(100dvh - 40px);max-height:calc(100dvh - 40px);border-radius:16px}.fth225-expand{font-size:11px;padding:7px 8px}.fth223.fth225-expanded .fth223-message{max-width:96%}}
@media(prefers-reduced-transparency:reduce){.fth225-backdrop{-webkit-backdrop-filter:none;backdrop-filter:none;background:rgba(7,19,45,.77)}}
