#creationChat {padding:24px clamp(16px,4vw,64px);}
.creation-chat-shell {max-width:960px;margin:auto;height:calc(100dvh - 126px);min-height:440px;display:flex;flex-direction:column;background:#fff;border:1px solid #e8e9ed;border-radius:20px;box-shadow:0 12px 40px #19202c06;overflow:hidden;color:#171d29;}
.creation-chat-header {padding:13px 20px;display:flex;align-items:center;gap:16px;border-bottom:1px solid #f0f0f2;flex-shrink:0;}
.creation-chat-header button,.creation-chat-header summary {border:0;background:#f6f6f8;color:#596170;border-radius:8px;padding:8px 12px;cursor:pointer;font-size:12px;white-space:nowrap;}
.creation-chat-heading {flex:1;min-width:0;}.creation-chat-heading h2{font-size:17px;line-height:1.5;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.creation-chat-heading p{font-size:12px;color:#8a919d;margin:3px 0 0;}
/* A separate dialog keeps history clear without covering the composer dropdown. */
.chat-header-actions{display:flex;gap:8px;align-items:center;}
.creation-chat-header .chat-header-actions button{display:flex;align-items:center;gap:7px;border:1px solid #e7e9ee;background:#fff;color:#495568;padding:9px 12px;border-radius:10px;font-weight:600;transition:background .15s;}
.creation-chat-header .chat-header-actions button:hover{background:#f6f7fa;}
.creation-chat-header .chat-header-actions .chat-library-button{color:#df3448;background:#fff1f3;border-color:#ffd9df;}
.chat-header-actions svg,.chat-history-symbol svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
.chat-header-actions [hidden]{display:none!important;}
.chat-history-dialog{width:min(520px,calc(100vw - 40px));max-height:75dvh;box-sizing:border-box;border:1px solid #e8eaf0;border-radius:20px;padding:24px;background:#fff;color:#202632;box-shadow:0 24px 90px #1a233426;}
.chat-history-dialog::backdrop{background:#10182740;backdrop-filter:blur(3px);}
.chat-history-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;}
.chat-history-heading h3{font-size:19px;margin:0 0 6px;}.chat-history-heading p{font-size:12px;color:#8a94a2;margin:0;}
.chat-history-heading button{border:0;border-radius:50%;background:#f4f5f8;color:#768191;width:32px;height:32px;font-size:23px;cursor:pointer;}
#chatHistorySearch{width:100%;box-sizing:border-box;border:1px solid #e5e8ee;background:#f8f9fb;color:#253044;border-radius:10px;padding:11px 13px;font:inherit;font-size:13px;margin-bottom:14px;outline:0;}
#chatHistorySearch:focus{border-color:#f699a5;box-shadow:0 0 0 3px #fff0f3;}
.chat-history-list{max-height:48dvh;overflow:auto;scrollbar-width:thin;}
.chat-history-item{display:flex;align-items:center;width:100%;gap:12px;text-align:left;border:1px solid transparent;background:#fff;border-radius:12px;padding:13px 10px;cursor:pointer;margin:3px 0;color:#283346;}
.chat-history-item:hover{background:#f7f8fb;}.chat-history-item.is-current{border-color:#ffd8df;background:#fff5f6;}
.chat-history-symbol{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:10px;background:#f3f5f8;color:#8996aa;}
.is-current .chat-history-symbol{background:#ffe5ea;color:#e34153;}
.chat-history-info{flex:1;min-width:0;}.chat-history-info strong{display:block;font-size:13px;font-weight:600;line-height:1.6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.chat-history-info small{display:block;font-size:11px;color:#9099a6;margin-top:4px;}
.chat-history-mark{font-size:12px;color:#e4495c;flex-shrink:0;}.chat-history-empty{padding:24px;color:#9aa3af;font-size:13px;text-align:center;}
.chat-messages {flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:20px clamp(18px,4vw,42px);}
.chat-message{margin:0 0 22px;}.chat-role{display:flex;align-items:center;gap:9px;font-size:13px;font-weight:600;color:#3c495c;margin-bottom:10px;}.chat-role small{font-size:10px;font-weight:400;color:#a0a8b4;padding:2px 6px;border-radius:4px;background:#f6f7f9;}.chat-avatar{width:32px;height:32px;border-radius:11px;overflow:hidden;flex-shrink:0;background:#eef3ff;border:1px solid #e9edf5;}.chat-avatar img{display:block;width:100%;height:100%;object-fit:contain;}.chat-avatar-ai{background:#fff1f3;border-color:#ffe0e5;}.chat-avatar-ai img{transform:none;}.chat-message-body{font-size:15px;line-height:1.8;overflow-wrap:anywhere;}.chat-message-body h2{font-size:17px;margin:24px 0 10px;}.chat-message-body h3{font-size:16px;}.chat-message-body p{margin:8px 0;}.chat-message-body img{max-width:100%;}.chat-message-body a{color:#e94551;}
.chat-user .chat-message-body{display:inline-block;background:#f0f5ff;border:1px solid #e6edfb;padding:12px 18px;border-radius:4px 14px 14px 14px;}.chat-user .chat-role{color:#5473a7;}.chat-message-body,.chat-message-tools{margin-left:41px;}
.chat-message-tools{display:flex;gap:6px;align-items:center;margin-top:12px;}.chat-message-tools button{display:flex;gap:6px;align-items:center;border:0;background:transparent;color:#8b929d;padding:6px 8px;font-size:12px;border-radius:6px;cursor:pointer;}.chat-message-tools button:hover{background:#fff1f2;color:#ec4353;}.chat-message-tools svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;}.chat-message-tools button:disabled{opacity:.4;cursor:wait;}
.chat-composer {margin:0 24px 20px;padding:10px 14px;border:1px solid #e2e4e9;border-radius:16px;display:flex;align-items:flex-end;gap:12px;flex-shrink:0;}.chat-composer:focus-within{border-color:#f79ca3;box-shadow:0 0 0 3px #ef444408;}.chat-composer textarea{border:0;resize:none;outline:0;flex:1;background:transparent;color:#171d29;font:inherit;line-height:1.6;min-height:64px;max-height:180px;}.chat-composer button{border:0;background:#f34352;color:white;border-radius:10px;width:40px;height:36px;font-size:22px;cursor:pointer;}.chat-composer button:disabled{opacity:.4;}
.chat-working{display:flex;align-items:center;gap:8px;color:#959ba5;font-size:13px;padding-bottom:20px;}.chat-working i{width:7px;height:7px;background:#f44352;border-radius:50%;animation:chat-pulse 1s infinite alternate;}.chat-error{padding:14px;background:#fff5f5;border-radius:10px;color:#b3323d;font-size:13px;}.chat-error button{border:0;background:transparent;color:#d73f4c;cursor:pointer;}
@keyframes chat-pulse{to{opacity:.3;}}
@media(max-width:680px){#creationChat{padding:10px;}.creation-chat-shell{height:calc(100dvh - 108px);border-radius:14px;}.creation-chat-header{padding:12px;gap:8px;}.creation-chat-header button{padding:6px 8px;}.chat-composer{margin:0 12px 12px;}}

@media(max-width:760px){.creation-chat-header{flex-wrap:wrap;}.chat-header-actions{margin-left:auto;}.creation-chat-heading{min-width:150px;}.chat-messages{padding:20px 16px;}.chat-message-body,.chat-message-tools{margin-left:0;}.chat-role{margin-bottom:12px;}.chat-history-dialog{padding:18px;}}

/* History is a side drawer, preserving the conversation behind it. */
.chat-history-dialog{position:fixed;top:0;right:0;bottom:0;left:auto;margin:0;width:min(420px,88vw);height:100dvh;max-height:100dvh;border-radius:18px 0 0 18px;padding:24px;border-right:0;}
.chat-history-dialog[open]{display:flex;flex-direction:column;}.chat-history-heading,#chatHistorySearch{flex-shrink:0;}.chat-history-list{flex:1;max-height:none;min-height:0;}.chat-history-dialog::backdrop{backdrop-filter:none;}

#homeChatHistory{margin-left:auto;display:flex;align-items:center;gap:7px;padding:7px 11px;min-height:32px;border:1px solid #ffd8df;background:#fff3f5;color:#dc3f52;border-radius:9px;font-size:12px;cursor:pointer;font-weight:600;}#homeChatHistory svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}#homeChatHistory:hover{background:#ffeaf0;}.creation-chat-header #chatNew{font-size:20px;padding:4px 10px;}

#homeChatHistory{margin-right:120px;}@media(max-width:680px){#homeChatHistory{margin-right:76px;padding:7px 9px;gap:5px;}}

/* Shared, quiet model controls: custom buttons instead of native select boxes. */
.chat-composer{flex-wrap:wrap;gap:8px 12px;}.chat-composer textarea{min-width:0;}
.model-picker{position:relative;z-index:1100;flex-shrink:0;}.chat-model-picker{flex-basis:100%;display:flex;padding-top:2px;}
.model-picker .model-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;width:auto;height:30px;margin:0;padding:0 10px;border:1px solid #e7e9ee;border-radius:999px;background:#fff;color:#526071;font-size:12px;font-weight:550;line-height:1;cursor:pointer;box-shadow:0 1px 2px #18202d03;}
.model-trigger:hover,.model-trigger[aria-expanded="true"]{border-color:#f3bdc5;background:#fff8f9;}.model-trigger:disabled{opacity:.45;cursor:default;}.model-dot{width:6px;height:6px;border-radius:50%;background:#e7495b;flex-shrink:0;}.model-dot.is-claude{background:#bc7d61;}.model-trigger svg{width:13px;height:13px;fill:none;stroke:#8e98a6;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}
.model-menu{position:absolute;bottom:calc(100% + 9px);left:0;width:230px;box-sizing:border-box;padding:5px;background:#fff;border:1px solid #e7e9ee;border-radius:14px;box-shadow:0 12px 36px #1722321a;}
.home-model-picker .model-menu{top:auto;bottom:calc(100% + 9px);}
.model-menu .model-option{display:flex;align-items:center;justify-content:space-between;gap:18px;text-align:left;width:100%;height:auto;border:0;border-radius:9px;background:#fff;color:#344154;padding:10px 12px;margin:0;cursor:pointer;}.model-option:hover{background:#f7f8fa;}.model-option.is-selected{background:#fff3f5;}.model-option strong{display:block;font-size:13px;line-height:1.5;font-weight:600;}.model-option small{display:block;margin-top:1px;color:#929ba8;font-size:11px;line-height:1.5;}.model-check{font-size:15px;color:#e4465a;}
@media(max-width:680px){.home-model-picker .model-trigger{padding:0 8px;font-size:11px;gap:5px;}.model-menu{width:210px;}}

/* Quiet conversational workspace. */
.creation-chat-shell{background:#fffaf7;border-color:#eaded7;box-shadow:0 12px 40px #70402006;}.creation-chat-header{background:#fffaf7;border-color:#f0e5df;}.creation-chat-heading p{display:none;}.creation-chat-header .chat-header-actions button,.creation-chat-header #chatBack{border-radius:999px;background:#fff;border:1px solid #ecded6;color:#857164;}.chat-role{font-weight:500;color:#9a8475;font-size:12px;}.chat-avatar{border-radius:50%;width:30px;height:30px;border:0;}.chat-role small{display:none;}.chat-message-body,.chat-message-tools{margin-left:0;}.chat-assistant .chat-message-body{background:#fff;border-radius:4px 20px 20px;padding:14px 18px;}.chat-user{margin-left:15%;}.chat-user .chat-role{flex-direction:row-reverse;justify-content:flex-start;color:#9a8475;}.chat-user .chat-message-body{display:block;background:#f3e8df;border:0;border-radius:20px 4px 20px 20px;padding:12px 18px;}.chat-message-tools{gap:4px;margin-top:7px;}.chat-message-tools button{width:30px;height:30px;padding:7px;color:#a38e7e;}.chat-composer{background:white;border-color:#eadbd1;border-radius:24px;}.chat-composer #chatSend{background:#cc3c32;border-radius:50%;}
.chat-draft-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 20px;border-bottom:1px solid #f0e5df;flex:none;}.chat-draft-bar[hidden]{display:none;}.chat-draft-bar button{border:0;background:transparent;font:inherit;font-size:12px;color:#967c6a;cursor:pointer;}.chat-draft-bar span{margin-left:8px;color:#b29c8b;font-size:11px;}.chat-draft-bar #chatSaveDraft{padding:7px 14px;background:#cc3c32;color:white;border-radius:999px;}.chat-draft-bar #chatSaveDraft:disabled{background:#f2e9e2;color:#b09a89;cursor:default;}.chat-draft-dialog{width:min(760px,calc(100vw - 32px));max-height:80dvh;border:1px solid #eadbd1;border-radius:24px;background:#fffaf7;color:#342a23;padding:24px;box-sizing:border-box;}.chat-draft-dialog::backdrop{background:#30201450;}.chat-draft-dialog header{display:flex;align-items:center;justify-content:space-between;}.chat-draft-dialog header button{border:0;border-radius:50%;width:32px;height:32px;background:#f1e6dd;color:#957c69;font-size:22px;cursor:pointer;}#chatDraftBody{line-height:1.8;font-size:15px;}#chatDraftBody h2{font-size:17px;margin:24px 0 10px;}
.chat-message-tools button{width:30px;height:30px;padding:8px;color:#a6a09a;background:none;border:0;box-shadow:none;}.chat-message-tools svg{width:14px;height:14px;stroke-width:1.5;}.chat-message-tools button:hover{background:#f5efea;color:#746c65;}
.chat-message{margin-bottom:20px;}.chat-user{margin-left:18%;}.chat-user .chat-message-body{background:#f3e3da;}.chat-assistant{margin-right:6%;}
.creation-chat-shell .chat-composer{display:grid;grid-template-columns:minmax(0,1fr) 40px;grid-template-rows:auto auto;gap:6px 12px;align-items:end;}.creation-chat-shell .chat-composer textarea{grid-column:1 / -1;grid-row:1;width:100%;box-sizing:border-box;}.creation-chat-shell .chat-composer #chatModelPicker{grid-column:1;grid-row:2;align-self:end;}.creation-chat-shell .chat-composer #chatSend{grid-column:2;grid-row:2;align-self:end;margin:0;}

/* Home model selection belongs with the input toolbar. */
#dashboard .chat-primary-tools{display:flex;align-items:center;gap:10px;}
#dashboard .chat-primary-tools .home-model-picker{margin:0;align-self:center;}
#dashboard .home-model-picker .model-trigger{height:36px;}
@media(max-width:680px){#dashboard .chat-primary-tools{gap:6px;}#dashboard .home-model-picker .model-trigger{height:32px;}}

.chat-message-tools svg{stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;}.chat-message-tools button{color:#8d7769;border-radius:6px;}.chat-message-tools button:hover{background:#f4e9e1;}

.chat-message-tools [data-copy-message]{width:28px;height:28px;padding:8px;}.chat-message-tools [data-copy-message] svg{width:12px;height:12px;opacity:.82;}
