body[data-route=chat]{--chat-header-height:56px}
body[data-route=chat] #main{padding:0!important;min-height:0!important;max-width:none}
body[data-route=chat] #main>.content{max-width:none;width:100%}
.chat-frame{display:flex;flex-direction:column;height:calc(100dvh - var(--chat-header-height));min-height:0;background:var(--paper)}
.chat-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:16px}
.chat-transcript{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-end;gap:16px;min-height:100%;max-width:1000px;margin:auto}
.chat-bubble{max-width:85%;width:fit-content;padding:8px;border:0;font:400 16px/24px YaDiler,Arial,sans-serif;overflow-wrap:anywhere}
.chat-bot{align-self:flex-start;background:#f7f5f7;color:var(--text);border-radius:16px 16px 16px 2px}
.chat-user{align-self:flex-end;background:var(--brand);color:white;border-radius:16px 16px 2px 16px}
.chat-bubble time{display:block;text-align:right;font:12px/18px YaDiler;margin-top:4px;color:var(--muted)}
.chat-user time{color:#f2d9f5}
.chat-message-text{white-space:pre-wrap}
.chat-options{align-self:stretch;margin-top:8px;padding-bottom:0}
.chat-topic-prompt{font:500 16px/24px YaDiler;margin:0 0 6px}
.chat-chips{display:flex;flex-wrap:wrap;align-items:center;gap:7px}
.chat-chip{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:8px 16px;max-width:100%;min-height:43px;background:transparent;border:1px solid var(--ink);border-radius:26px;color:var(--ink);font:400 16px/24px YaDiler;text-align:center;overflow-wrap:anywhere}
.chat-chip>.icon{width:22px;height:22px}
.chat-chip:hover{background:#8b2bb00b}.chat-chip:active{background:#8b2bb01c}
.chat-feedback{padding:16px;align-self:flex-start;width:85%}
.chat-feedback p{margin:0 0 16px}.chat-feedback p:last-child{margin-bottom:0}
.chat-feedback .feedback-question{font-weight:600;margin-bottom:12px}
.chat-votes{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.chat-votes button{height:36px;border:1px solid var(--pink);border-radius:8px;background:transparent;color:var(--pink);font:600 16px YaDiler}
.chat-feedback time{margin-top:8px}
.chat-feedback form{display:flex;flex-direction:column;gap:14px}
.chat-feedback label{font:16px/24px YaDiler}
.chat-feedback textarea{display:block;width:100%;min-height:43px;max-height:140px;resize:vertical;padding:8px;border:1px solid #bdb9c7;border-radius:8px;background:var(--paper);color:var(--text);font:16px/24px YaDiler}
.chat-feedback-submit{width:100%;height:43px;border:1px solid white;border-radius:8px;background:var(--brand);color:white;font:16px YaDiler}
.chat-feedback p.chat-local-receipt{font-size:14px;color:var(--muted)}
.chat-error{font:13px/18px YaDiler;color:#b02349;margin:0}.chat-error:empty{display:none}
.chat-draft-status{display:block;font:11px/16px YaDiler;color:#efd3f1;margin-top:6px}
.chat-notice{align-self:stretch;margin:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--pale);color:var(--muted);font:13px/19px YaDiler}
.chat-composer{flex:none;background:#f3f1f6;border-top:1px solid var(--line);padding:8px 8px max(8px,env(safe-area-inset-bottom));max-width:1100px;width:100%;margin:auto}
.chat-composer-row{display:flex;align-items:center;gap:8px;min-width:0}
.chat-attach{display:flex;align-items:center;justify-content:center;width:26px;height:42px;flex:none;cursor:pointer;color:#8d779b;position:relative}
.chat-attach>.icon{width:24px;height:24px}
.chat-attach input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.chat-composer textarea{width:100%;min-width:0;height:43px;min-height:43px;max-height:120px;border:1px solid #d2ccd8;border-radius:24px;background:var(--paper);color:var(--text);padding:9px 12px;font:16px/23px YaDiler;resize:none}
.chat-send{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex:none;padding:4px;border:0;border-radius:50%;background:var(--brand);color:white}
.chat-send .icon{width:24px;height:24px}
.chat-files{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.chat-file{display:flex;align-items:center;gap:8px;max-width:100%;padding:7px 9px;border:1px solid #c8b8d2;border-radius:8px;font:13px/18px YaDiler;overflow-wrap:anywhere}
.chat-file>.icon{width:18px;height:18px}.chat-file>span{flex:1;min-width:0}.chat-file small{display:block;font-size:11px;opacity:.75}
.chat-file>button{padding:0;width:28px;height:28px;flex:none;border:0;background:transparent;color:inherit;font-size:22px}
.chat-user .chat-file{border-color:#ffffff55}
#chat-draft-files .chat-files{margin:0 0 8px}
.chat-composer>.chat-error{margin-bottom:6px}
body.dark .chat-bot{background:#392b42}body.dark .chat-chip{color:#d6a7ed;border-color:#b884d2}body.dark .chat-composer{background:#32223e}
@media(min-width:600px){
 body[data-route=chat]{--chat-header-height:64px}
 .chat-scroll{padding:24px var(--page-gutter)}
 .chat-bubble{max-width:min(80%,700px);padding:12px 16px;font-size:17px;line-height:26px}
 .chat-feedback{width:min(80%,700px);padding:20px}
 .chat-feedback label,.chat-feedback textarea,.chat-feedback-submit{font-size:17px}
 .chat-composer{padding:12px 20px}.chat-attach{width:36px}.chat-send{width:42px;height:42px}
 .chat-topic-prompt{font-size:17px}.chat-chip{padding:10px 18px;min-height:46px}
}
@media(min-width:1024px){
 body[data-route=chat]{--chat-header-height:72px}
 .chat-transcript{max-width:1100px;gap:20px}
 .chat-bubble{max-width:min(75%,720px)}
 .chat-feedback{width:min(75%,720px)}
 .chat-scroll{padding:28px clamp(24px,4vw,64px)}
 .chat-composer{max-width:1228px;padding:14px clamp(24px,4vw,64px)}
 .chat-options{max-width:100%}.chat-chips{gap:10px}
}
@media(max-width:359px){
 .chat-scroll{padding:12px}.chat-bubble{max-width:92%;font-size:15px;line-height:23px}
 .chat-feedback{width:92%;padding:12px}.chat-topic-prompt,.chat-chip{font-size:15px;line-height:22px}.chat-chip{padding:8px 12px}
 .chat-composer-row{gap:6px}.chat-attach{width:24px}.chat-send{width:32px;height:32px}
}
.chat-feedback textarea{min-height:68px;resize:none}
