#aiscan-chat-window.kw-chat-workspace{width:min(480px,calc(100vw - 24px));height:min(750px,calc(100dvh - 36px));border-radius:22px;background:#fff;box-shadow:0 20px 70px #09281c30;overflow:hidden}
.kw-chat-workspace .aiscan-chat-header{gap:8px;padding:13px 14px;min-height:76px;flex-shrink:0}
.kw-chat-workspace .aiscan-header-actions{gap:2px}.kw-chat-workspace .aiscan-header-actions button{width:27px;height:29px}
.kw-chat-workspace .aiscan-chat-title-group{flex:1}.kw-chat-workspace .aiscan-header-title-row{font-size:14px}.kw-chat-workspace .aiscan-provider-badge{font-size:9px;max-width:155px}
.kw-chat-workspace .aiscan-avatar-circle{width:30px!important;height:30px!important;min-width:30px!important;border-radius:11px!important;font-size:19px;font-weight:800;display:grid!important;place-items:center;color:white}
.kw-chat-drag{border:0;background:transparent;color:#6c8076;padding:2px;cursor:grab;touch-action:none;font-size:21px}
.kw-chat-toolbar{display:flex;gap:3px;border-bottom:1px solid #e7eeea;padding:8px 12px;flex-shrink:0;background:#fff}
.kw-chat-toolbar button{flex:1;padding:7px 4px;font-size:11px;border:0;background:transparent;color:#61736b;border-radius:8px;font-weight:600}
.kw-chat-toolbar button[aria-pressed=true]{background:#e9f7ef;color:#075e40}.kw-chat-toolbar button:hover{background:#f0f7f3;color:#075e40}
.kw-chat-workspace .aiscan-chat-body{background:#fff;padding:18px;min-height:0}.kw-chat-workspace .aiscan-welcome-container{padding:22px 0 8px;text-align:center}
.kw-chat-workspace .aiscan-welcome-container h3{font-size:19px;letter-spacing:-.4px;margin:17px 0 7px;color:#132e22}
.kw-chat-mark{width:52px;height:52px;display:grid;place-items:center;background:#087b53;color:#fff;font-size:31px;font-weight:800;border-radius:18px;margin:auto;box-shadow:0 7px 18px #087b5324}
.kw-chat-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:23px;text-align:left}
.kw-chat-shortcuts button{display:grid;grid-template-columns:28px 1fr;gap:5px 8px;border:1px solid #e2eae5;background:#fff;border-radius:13px;padding:14px 11px;text-align:left;box-shadow:0 2px 3px #0b332008;color:#17362b;transition:background .15s,border-color .15s}
.kw-chat-shortcuts button:hover{background:#f3fbf6;border-color:#9fceb7}.kw-chat-shortcuts i{grid-row:span 2;color:#087b53;background:#eaf6ef;width:28px;height:30px;display:grid;place-items:center;border-radius:8px;font-size:12px}
.kw-chat-shortcuts strong{font-size:12px;line-height:1.4}.kw-chat-shortcuts small{font-size:10px;line-height:1.45;color:#738479}
.kw-chat-workspace .aiscan-chat-footer{padding:12px 15px;border-top:1px solid #e6ede8}.kw-chat-style-label{color:#086b46;font-size:10px;font-weight:650;margin-bottom:7px}
.kw-chat-workspace .aiscan-input-pill{border-radius:20px;background:#f5f8f6;box-shadow:none;align-items:flex-end;padding:6px;min-height:48px}
.kw-chat-workspace .aiscan-input-pill textarea{font-size:13px;background:transparent}.kw-chat-workspace .aiscan-msg{font-size:13px;border-radius:14px}.kw-chat-workspace .aiscan-disclaimer{font-size:9px;color:#7d8b82}
.kw-chat-panel{min-height:0;flex:1;overflow:auto;padding:16px 18px;background:#fbfdfb}.kw-chat-panel[hidden]{display:none}
.kw-chat-panel-open .aiscan-chat-body,.kw-chat-panel-open .aiscan-chat-footer,.kw-chat-panel-open .aiscan-file-preview{display:none!important}
.kw-chat-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:13px}.kw-chat-panel-heading h3{font-size:16px;line-height:1.4;color:#183b2b;margin:0}
.kw-chat-button{border:1px solid #dbe7df;border-radius:8px;background:#fff;color:#176043;padding:7px 10px;font-size:11px;line-height:1.5;cursor:pointer}
.kw-chat-note{font-size:11px;line-height:1.6;color:#6a7e70;margin:9px 0}.kw-chat-workspace>p.kw-chat-note:empty{display:none}
.kw-chat-field{display:flex;flex-direction:column;gap:5px;margin:11px 0}.kw-chat-field label{font-size:11px;font-weight:650;color:#254c38}
.kw-chat-field input,.kw-chat-field select,.kw-chat-field textarea{width:100%;border:1px solid #d6e3da;border-radius:8px;padding:9px 10px;font-size:12px;background:#fff;color:#19392a;box-sizing:border-box}.kw-chat-field textarea{min-height:82px;resize:vertical}
.kw-chat-field input[type=checkbox]{width:17px;height:17px}.kw-chat-inline{display:flex;gap:7px;flex-wrap:wrap}
.kw-chat-history-card{border:1px solid #dfebe2;background:#fff;border-radius:12px;padding:13px;margin:12px 0;display:flex;flex-direction:column;gap:8px}
.kw-chat-history-card small{color:#708677;font-size:10px}.kw-chat-history-card p{font-size:12px;line-height:1.5;margin:0}.kw-chat-history-title{border:0;padding:0;text-align:left;color:#173d29;background:none;font-size:13px;font-weight:700}
.kw-chat-style-card{display:flex;flex-direction:column;gap:6px;text-align:left;width:100%;padding:16px;border:1px solid #dbe7df;border-radius:12px;background:#fff;color:#173e2b;margin:12px 0;font-size:13px;font-weight:650}
.kw-chat-style-card small{font-size:11px;color:#75867b;font-weight:400}.kw-chat-style-card[aria-pressed=true]{border-color:#0e8856;background:#eef9f2;box-shadow:0 0 0 1px #0e8856}
.kw-chat-primary{border:0;border-radius:9px;background:#087c51;color:#fff;font-size:12px;padding:11px 15px;font-weight:650}.kw-chat-primary:disabled,.kw-chat-button:disabled{opacity:.55;cursor:wait}
#aiscan-chat-window.kw-chat-expanded{width:min(1100px,calc(100vw - 32px));height:calc(100dvh - 32px);left:50%!important;top:16px!important;right:auto!important;bottom:auto!important;transform:translateX(-50%)}
.kw-chat-expanded .kw-chat-shortcuts{max-width:580px;margin:25px auto}.kw-chat-expanded .aiscan-msg{max-width:85%}.kw-chat-expanded .kw-chat-panel{padding:22px max(22px,calc((100% - 700px)/2))}
.kw-chat-workspace button:focus-visible,.kw-chat-workspace input:focus-visible,.kw-chat-workspace select:focus-visible,.kw-chat-workspace textarea:focus-visible{outline:3px solid #8fd9b2;outline-offset:2px}
@media(max-width:540px){#aiscan-chat-window.kw-chat-workspace{width:calc(100vw - 16px);height:calc(100dvh - 16px);right:8px;bottom:8px}.kw-chat-workspace .aiscan-chat-header{padding:10px;gap:5px}.kw-chat-workspace .aiscan-header-title-row{font-size:13px}.kw-chat-drag{display:none}.kw-chat-workspace .aiscan-header-actions button{width:24px}.kw-chat-toolbar{padding:7px}.kw-chat-toolbar button{font-size:10px}.kw-chat-shortcuts button{padding:12px 9px}.kw-chat-workspace .aiscan-chat-body{padding:14px}}

/* Compact EmilMar-inspired layout, retaining Kontai branding and read-only capabilities. */
#aiscan-chat-window.kw-chat-workspace{width:min(400px,calc(100vw - 24px));height:min(560px,calc(100dvh - 32px));border:1px solid #e2e5e9;border-radius:22px;box-shadow:0 16px 42px #15283d20,0 1px 3px #15283d0c}
.kw-chat-workspace .aiscan-chat-header{min-height:59px;height:59px;padding:10px 12px;gap:7px;border-bottom:1px solid #eef0f3;background:white;position:relative}
.kw-chat-workspace .aiscan-chat-title-group{min-width:0;gap:0;flex:1}.kw-chat-workspace .aiscan-chat-title-group>.aiscan-avatar-circle{display:none!important}
.kw-chat-workspace .aiscan-header-title-row{font-size:12px;gap:4px;flex-wrap:nowrap;white-space:nowrap;color:#14202b;font-weight:700;letter-spacing:-.2px}
.kw-chat-workspace .aiscan-provider-badge{font-size:8px;max-width:82px;padding:3px 5px;border:1px solid #d8e1ed;background:#f4f7fb;color:#42536c;border-radius:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500;letter-spacing:0}
.kw-chat-workspace .aiscan-header-subtitle{font-size:9px;color:#7c8491;margin-top:4px;max-width:145px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kw-chat-workspace #aiscan-header-company{display:none}.kw-chat-workspace .aiscan-header-actions{gap:0;flex-shrink:0;align-items:center}
.kw-chat-workspace .aiscan-header-actions button{width:22px;height:28px;padding:0;color:#7a8397;border-radius:6px;font-size:11px;display:inline-flex;align-items:center;justify-content:center;background:none;border:0}
.kw-chat-workspace .aiscan-header-actions button:hover,.kw-chat-workspace .aiscan-header-actions button[aria-pressed=true]{background:#f0f5f2;color:#087b53}
.kw-chat-workspace .kw-chat-toolbar{display:flex;border:0;padding:0;gap:0;background:none;flex-shrink:0}
.kw-chat-workspace .kw-chat-toolbar button{flex:none}
.kw-chat-workspace .kw-chat-drag{width:27px;height:27px;min-width:27px;padding:0;border-radius:50%;background:#0e191c;color:#29ce9a;display:grid;place-items:center;font-size:20px;font-weight:800;box-shadow:0 2px 5px #0e191c14}
.kw-chat-workspace .aiscan-chat-body{padding:25px 25px;display:flex;flex-direction:column;background:#fff;overflow-y:auto}
.kw-chat-workspace .aiscan-welcome-container{width:100%;margin:auto 0;padding:0;text-align:center}
.kw-chat-workspace .aiscan-welcome-container h3{font-size:18px;line-height:1.35;letter-spacing:-.4px;margin:16px 0 23px;color:#111b23;font-weight:650}
.kw-chat-workspace .kw-chat-mark{width:45px;height:45px;font-size:31px;border-radius:50%;background:#0e191c;color:#29ce9a;box-shadow:0 5px 13px #15283d22}
.kw-chat-workspace #aiscan-messages-list:empty{display:none}
.kw-chat-workspace .kw-chat-shortcuts{gap:8px;margin:0;text-align:left}
.kw-chat-workspace .kw-chat-shortcuts button{grid-template-columns:24px 1fr;column-gap:8px;row-gap:3px;padding:11px 10px;min-height:68px;border:1px solid #e0e5ec;border-radius:13px;box-shadow:0 2px 3px #21334c05;align-content:center}
.kw-chat-workspace .kw-chat-shortcuts strong{font-size:11px;font-weight:550;color:#193048;line-height:1.35}
.kw-chat-workspace .kw-chat-shortcuts small{font-size:9px;line-height:1.45;color:#77879a}
.kw-chat-workspace .kw-chat-shortcuts i{width:24px;height:26px;font-size:12px;border-radius:7px;align-self:start;color:#467aff;background:#f0f5ff}
.kw-chat-workspace .kw-chat-shortcuts button:nth-child(2) i{color:#12ad79;background:#effbf5}
.kw-chat-workspace .kw-chat-shortcuts button:nth-child(3) i{color:#e7a125;background:#fff9ec}
.kw-chat-workspace .kw-chat-shortcuts button:nth-child(4) i{color:#8b5cf6;background:#f6f1ff}
.kw-chat-workspace .aiscan-chat-footer{padding:10px 13px 9px;border-top:1px solid #edf0f3;background:#fff}
.kw-chat-workspace .aiscan-input-pill{min-height:44px;padding:4px 7px;border-radius:24px;background:#f5f5f7;border:1px solid #e1e3e8;gap:4px;align-items:center}
.kw-chat-workspace .aiscan-input-pill:focus-within{border-color:#b6cfc4;box-shadow:0 0 0 2px #087b530a}
.kw-chat-workspace .aiscan-attach-btn{font-size:20px;width:25px;min-width:25px;color:#8995a5;padding:0;text-align:center}
.kw-chat-workspace .kw-chat-mode{display:inline-flex;align-items:center;gap:4px;padding:5px 8px;border:1px solid #b5ebcc;border-radius:16px;background:#effdf4;color:#07975a;font-size:9px;font-weight:600;white-space:nowrap;flex-shrink:0;cursor:pointer}
.kw-chat-workspace .kw-chat-mode i{font-size:9px}.kw-chat-workspace .aiscan-input-pill textarea{min-width:0;flex:1;font-size:11px;line-height:1.5;padding:9px 2px;min-height:32px!important}
.kw-chat-workspace #aiscan-chat-voice{width:24px!important;min-width:24px!important;height:30px!important;font-size:11px}
.kw-chat-workspace .aiscan-send-btn{width:29px;height:29px;min-width:29px;font-size:12px;background:#e5e7ec;color:#a3abba;box-shadow:none}
.kw-chat-workspace .aiscan-input-pill:has(textarea:not(:placeholder-shown)) .aiscan-send-btn{background:#087b53;color:#fff}
.kw-chat-workspace .aiscan-disclaimer{font-size:8px;line-height:1.4;margin-top:8px;color:#8793a3}
.kw-chat-workspace .kw-chat-expanded .kw-chat-shortcuts{max-width:400px}
@media(max-width:440px){.kw-chat-workspace .aiscan-chat-header{padding:10px;gap:5px}.kw-chat-workspace .aiscan-header-actions button{width:21px}.kw-chat-workspace .aiscan-provider-badge{max-width:65px}.kw-chat-workspace .aiscan-chat-body{padding:22px}.kw-chat-workspace .aiscan-header-title-row{font-size:11px}.kw-chat-workspace .kw-chat-drag{display:grid}.kw-chat-workspace .aiscan-header-subtitle{max-width:120px;font-size:8px}.kw-chat-workspace .kw-chat-shortcuts button{padding:10px 8px;column-gap:6px}.kw-chat-workspace .kw-chat-shortcuts strong{font-size:10px}}
.kw-chat-workspace .kw-chat-shortcuts strong,.kw-chat-workspace .kw-chat-shortcuts small{grid-column:2}
.kw-chat-workspace .kw-chat-shortcuts button>svg{grid-column:1;grid-row:1/span 2;align-self:start;width:24px;height:26px;padding:6px;box-sizing:border-box;border-radius:7px;color:#467aff;background:#f0f5ff}
.kw-chat-workspace .kw-chat-shortcuts button:nth-child(2)>svg{color:#12ad79;background:#effbf5}
.kw-chat-workspace .kw-chat-shortcuts button:nth-child(3)>svg{color:#e7a125;background:#fff9ec}
.kw-chat-workspace .kw-chat-shortcuts button:nth-child(4)>svg{color:#8b5cf6;background:#f6f1ff}
.kw-chat-workspace .kw-chat-mark>.aiscan-openai-icon{width:100%;height:100%;padding:9px;box-sizing:border-box}
.kw-chat-workspace .kw-chat-drag>.aiscan-openai-icon{width:100%;height:100%;padding:5px;box-sizing:border-box}
.kw-chat-workspace .kw-chat-mode-agent{background:#6652ec;border-color:#6652ec;color:#fff;box-shadow:0 2px 5px #6652ec30}
.kw-agent-progress{padding:10px 13px;border-bottom:1px solid #e4deff;background:#f8f6ff;color:#493c76;font-size:11px;line-height:1.5;flex-shrink:0}
.kw-agent-progress[hidden]{display:none}.kw-agent-progress button{border:1px solid #c9c0ed;border-radius:7px;background:#fff;color:#594796;padding:5px 8px;margin-left:8px;font-size:10px}.kw-agent-progress .kw-agent-confirm{background:#6652ec;color:#fff;border-color:#6652ec}.kw-agent-progress p{margin:7px 0}
