/* Conversation-first creation: a calm canvas with one central composer. */
/* LXGW WenKai TC, OFL-1.1. A local web-font subset for this title only. */
@font-face {
    font-family:"Art Title WenKai";
    src:url("assets/fonts/agent-title-wenkai.woff2") format("woff2");
    font-style:normal;
    font-weight:400;
    font-display:swap;
    unicode-range:U+4E48,U+4E9B,U+4EC0,U+60F3,U+753B,U+FF1F;
}
#agentModal { position:fixed; inset:0; z-index:110; background:#fff; color:#292933; font-family:inherit; }
#agentModal.hidden { display:none; }
#agentModal [hidden] { display:none !important; }
#agentModal button { cursor:pointer; }
#agentModal button:disabled { cursor:wait; opacity:.5; }
#agentModal button:focus-visible, #agentModal select:focus-visible { outline:2px solid #8b7cf6; outline-offset:3px; }
.ac-shell { display:flex; height:100dvh; overflow:hidden; }
.ac-sidebar { width:236px; flex:none; background:#f7f7f9; border-right:1px solid #ededf1; padding:23px 16px 18px; display:flex; flex-direction:column; }
.ac-brand { display:flex; align-items:center; gap:11px; padding:0 7px 26px; text-align:left; font-size:22px; font-weight:700; }
.ac-brand-mark { font-size:30px; color:#7668bd; line-height:1; }
.ac-brand-sub { display:block; font-size:10px; font-weight:450; letter-spacing:2px; color:#92919d; margin-top:2px; }
.ac-back-icon { margin-left:auto; color:#a5a3af; font-size:17px; font-weight:400; }
.ac-new { display:flex; align-items:center; gap:10px; width:100%; border:1px solid #e3e2e8; background:white; border-radius:12px; padding:12px; font-size:12px; font-weight:550; transition:background .15s; }
.ac-new:hover { background:#f0edf8; }
.ac-new span { margin-left:auto; color:#92909d; font-size:17px; }
.ac-history-heading { margin:29px 10px 12px; font-size:10px; letter-spacing:1px; color:#9b99a6; }
.ac-history { flex:1; overflow:auto; min-height:0; }
.ac-history-item { display:block; width:100%; text-align:left; padding:12px 11px; border-radius:10px; margin-bottom:3px; font-size:12px; color:#66636f; }
.ac-history-item.active { background:#ebe8f1; color:#494252; }
.ac-history-item:hover { background:#efedf3; }
.ac-history-item strong { display:block; font-weight:500; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.ac-history-item small { display:block; font-size:9px; margin-top:5px; color:#9a96a3; }
.ac-history-empty { padding:10px; font-size:11px; color:#aaa6b1; }
.ac-sidebar-foot { color:#85818e; font-size:10px; line-height:1.9; padding:18px 9px 0; }
.ac-sidebar-foot > span:last-child { margin-left:12px; color:#a9a4b0; }
.ac-local-dot { display:inline-block; width:5px; height:5px; background:#aaa1c6; border-radius:50%; margin-right:5px; vertical-align:middle; }
.ac-main { min-width:0; flex:1; display:flex; flex-direction:column; position:relative; background:radial-gradient(ellipse at 50% 38%,#fcfbff 0,white 60%); }
.ac-header { height:74px; flex:none; padding:0 30px; display:flex; align-items:center; gap:15px; }
.ac-header-title { font-size:13px; font-weight:600; flex:1; }
.ac-header-title span { margin-left:9px; color:#a7a3b3; font-size:10px; font-weight:400; }
.ac-return { font-size:11px; color:#898391; padding:8px 0 8px 10px; }
.ac-return span { margin-left:8px; font-size:16px; }
.ac-icon-btn { width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; background:transparent; color:#817b8d; flex:none; }
.ac-icon-btn:hover { background:#f2eff7; }
#agentChatMenu { display:none; }
.ac-conversation { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:0 28px; }
.ac-welcome { text-align:center; padding:0 18px 26px; }
.ac-main.is-empty .ac-conversation { flex:0 0 auto; overflow:visible; margin-top:clamp(24px,13vh,154px); }
.ac-welcome-mark { font-size:40px; line-height:1; color:#8b7cc1; margin-bottom:24px; }
.ac-welcome h2 { font-family:"Art Title WenKai","Kaiti SC","STKaiti","KaiTi",serif; font-size:36px; font-weight:400; font-synthesis:none; line-height:1.4; letter-spacing:1.6px; color:#332e40; margin:0; }
.ac-title-punctuation { display:inline-block; margin-left:-.16em; letter-spacing:0; }
.ac-welcome-description { margin-top:15px; font-size:12px; color:#9c94a7; line-height:1.8; }
.ac-composer-wrap { width:100%; max-width:764px; margin:0 auto; padding:14px 28px 18px; flex:none; }
.ac-main.is-empty .ac-composer-wrap { padding-top:8px; }
.ac-composer { border:0; border-radius:25px; background:#f5f5f7; padding:20px 18px 13px; box-shadow:none; position:relative; transition:background .18s; }
.ac-composer:focus-within { background:#f2f2f5; box-shadow:none; }
/* The site's light-theme fields use !important. Keep their inset focus ring out of this composer. */
#agentModal #agentChatInput,
#agentModal #agentChatInput:focus { appearance:none; -webkit-appearance:none; border:0 !important; box-shadow:none !important; outline:none !important; background:transparent !important; color:#35353d !important; font-size:14px; line-height:1.85; width:100%; min-height:58px; max-height:160px; resize:none; padding:0 4px; display:block; }
#agentModal #agentChatInput::placeholder { color:#96969f !important; font-weight:400; }
.ac-composer-toolbar { display:flex; gap:5px; align-items:center; margin-top:7px; }
.ac-settings-toggle { display:flex; align-items:center; gap:8px; color:#84848e; font-size:11px; padding:7px 9px; border-radius:8px; max-width:65%; }
.ac-settings-toggle span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ac-settings-toggle:hover { background:#eaeaef; }
.ac-settings-toggle > i:last-child { font-size:10px; transition:transform .18s; }
.ac-settings-toggle[aria-expanded="true"] > i:last-child { transform:rotate(180deg); }
.ac-toolbar-spacer { flex:1; }
.ac-send { width:34px; height:34px; border-radius:50%; background:#2d2d34; color:white; font-size:13px; display:flex; align-items:center; justify-content:center; flex:none; transition:background .18s,color .18s; }
.ac-send:hover { background:#484852; }
.ac-composer:has(#agentChatInput:placeholder-shown) .ac-send { background:#e2e2e8; color:#9b9ba5; }
.ac-settings { position:absolute; z-index:6; left:18px; bottom:calc(100% + 12px); width:min(346px,calc(100vw - 68px)); display:flex; flex-direction:column; gap:2px; padding:10px; border:1px solid #f0f0f3; border-radius:17px; background:#fff; box-shadow:0 14px 48px #25253412,0 3px 10px #25253406; }
.ac-settings[data-placement="bottom"] { top:calc(100% + 12px); bottom:auto; }
.ac-settings label { display:flex; align-items:center; justify-content:space-between; gap:14px; min-height:43px; padding:0 10px; font-size:11px; color:#91919b; border-radius:9px; }
.ac-settings label:hover { background:#f7f7f9; }
#agentModal .ac-settings select,
#agentModal .ac-settings select:focus { appearance:none; -webkit-appearance:none; min-width:0; width:68%; margin:0; border:0 !important; box-shadow:none !important; outline:none !important; background:transparent !important; color:#45454f !important; font-family:inherit; font-size:12px; font-weight:450; text-align:right; text-overflow:ellipsis; border-radius:0; padding:9px 20px 9px 0; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m3 4.5 3 3 3-3' fill='none' stroke='%23a0a0aa' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; background-repeat:no-repeat !important; background-position:right center !important; }
#agentModal .ac-settings select:focus-visible { outline:1px solid #cacad5 !important; outline-offset:2px; border-radius:5px; }
.ac-settings-cost { margin:5px 10px 3px; color:#a1a1aa; text-align:right; font-size:10px; line-height:1.6; }
.ac-composer:has(.ac-settings[data-placement="bottom"]:not([hidden])) ~ .ac-cost,
.ac-composer:has(.ac-settings[data-placement="bottom"]:not([hidden])) ~ .ac-suggestions { visibility:hidden; }
.ac-cost { text-align:center; font-size:10px; color:#a1a1aa; margin:12px 0 0; line-height:1.7; }
.ac-suggestions { display:flex; flex-wrap:wrap; justify-content:center; gap:9px; margin-top:23px; }
.ac-suggestions button { border:0; padding:9px 12px; border-radius:10px; font-size:13px; color:#9a94a5; background:transparent; }
.ac-suggestions button span { font-size:10px; margin-left:7px; color:#96919f; }
.ac-suggestions button:hover { background:#f7f6f9; }
.ac-messages { max-width:708px; margin:0 auto; padding:25px 0 18px; }
.ac-message { margin-bottom:30px; font-size:13px; line-height:1.9; overflow-wrap:anywhere; }
.ac-message-user { display:flex; flex-direction:column; align-items:flex-end; }
.ac-user-bubble { background:#f0edf4; color:#4c4357; border-radius:19px 19px 5px 19px; padding:11px 17px; max-width:85%; white-space:pre-wrap; }
.ac-user-image { max-width:180px; max-height:150px; border-radius:14px; margin-bottom:8px; object-fit:contain; }
.ac-assistant-label { display:flex; align-items:center; gap:9px; font-size:10px; font-weight:550; color:#93849f; margin-bottom:10px; }
.ac-assistant-label span { font-size:20px; }
.ac-message-text { white-space:pre-wrap; color:#5d5269; }
.ac-image-wrap { position:relative; margin-top:13px; width:fit-content; max-width:100%; }
.ac-result-image { display:block; max-width:100%; width:auto; max-height:470px; border-radius:17px; border:1px solid #eee8f2; object-fit:contain; cursor:zoom-in; }
.ac-image-actions { display:flex; flex-wrap:wrap; gap:14px; margin-top:10px; font-size:10px; color:#968a9e; }
.ac-image-actions button,.ac-image-actions a { padding:4px 0; }
.ac-image-actions .is-selected { color:#8970a2; font-weight:600; }
.ac-pending { display:flex; align-items:center; gap:10px; margin:10px 0; color:#a18fae; font-size:12px; }
.ac-pending-dot { display:inline-block; width:6px; height:6px; background:#a899b9; border-radius:50%; animation:ac-breathe 1.5s ease-in-out infinite; }
.ac-pending-dot:nth-child(2) { animation-delay:.2s; }.ac-pending-dot:nth-child(3) { animation-delay:.4s; }
.ac-pending-dots { display:flex; gap:4px; }
.ac-error { color:#b46978; background:#fff7f8; border-radius:12px; padding:10px 13px; font-size:12px; }
.ac-retry { font-size:11px; color:#957798; padding-top:8px; }
.ac-attachment { display:flex; align-items:center; gap:10px; padding:1px 4px 13px; }
.ac-attachment img { width:42px; height:42px; object-fit:cover; border:1px solid #ede6f3; border-radius:9px; }
.ac-attachment span { font-size:10px; color:#9a8fa5; line-height:1.8; }
.ac-attachment button { margin-left:auto; color:#a396ad; width:26px; height:26px; border-radius:50%; }
.ac-notice { font-size:11px; color:#a36d7e; padding:8px 10px; margin-bottom:6px; }
.ac-sidebar-shade { display:none; }
@keyframes ac-breathe { 0%,80%,100%{ opacity:.3; transform:scale(.8); }40%{ opacity:1; transform:scale(1); } }
@media(prefers-reduced-motion:reduce){ .ac-pending-dot { animation:none; } }
@media(max-width:760px){
 .ac-sidebar { position:absolute; inset:0 auto 0 0; z-index:3; width:250px; transform:translateX(-100%); transition:transform .2s; }
 .ac-sidebar.is-open { transform:translateX(0); }
 .ac-sidebar-shade:not([hidden]) { display:block; position:absolute; inset:0; background:#2b23394a; z-index:2; }
 #agentChatMenu { display:inline-flex; }
 .ac-header { padding:0 16px; height:60px; gap:9px; }
 .ac-main.is-empty .ac-conversation { margin-top:clamp(25px,10vh,100px); }
 .ac-welcome h2 { font-size:30px; letter-spacing:1px; }.ac-welcome-description { font-size:11px; }
 .ac-welcome-mark { font-size:34px; margin-bottom:20px; }
 .ac-conversation { padding:0 18px; }.ac-messages { padding-top:15px; }
 .ac-composer-wrap { padding:12px 16px max(14px,env(safe-area-inset-bottom)); }
 .ac-composer { border-radius:22px; padding:18px 14px 11px; }
 #agentModal #agentChatInput, #agentModal #agentChatInput:focus { font-size:16px; }
 .ac-suggestions { gap:7px; margin-top:18px; }.ac-suggestions button { padding:9px; }
 .ac-settings { left:8px; width:min(346px,calc(100vw - 48px)); }
 .ac-result-image { max-height:390px; }
 .ac-return { font-size:10px; }
}
@media(max-height:650px){.ac-main.is-empty .ac-conversation { margin-top:12px; }.ac-welcome-mark{margin-bottom:13px;}.ac-welcome{padding-bottom:14px;}.ac-suggestions{margin-top:12px;}}
