.chat-heading {align-items: center;gap: 20px;}
.chat-layout {display: grid;grid-template-columns: 240px minmax(0,1fr);gap: 20px;align-items:start;}
.chat-sidebar {padding:18px;max-height:760px;overflow:auto;}
.chat-sidebar>.button {width:100%;margin-bottom:18px;}
.chat-history-item {display:block;width:100%;text-align:left;padding:14px 10px;border:1px solid transparent;background:transparent;color:inherit;border-radius:12px;cursor:pointer;}
.chat-history-item strong {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;}
.chat-history-item small {display:block;opacity:.5;margin-top:6px;}
.chat-history-item:hover,.chat-history-item.selected {background:rgba(67,200,220,.07);border-color:rgba(67,200,220,.22);}
.chat-main {overflow:hidden;background:radial-gradient(ellipse at top right,rgba(32,111,140,.13),transparent 60%),#0d121a;border:1px solid #233643;border-radius:24px;min-width:0;}
.chat-toolbar {padding:20px 24px;border-bottom:1px solid #23303b;}
.chat-toolbar h3 {margin:0;font-size:17px;}
.chat-messages {min-height:400px;max-height:600px;overflow:auto;padding:24px;scrollbar-width:thin;}
.chat-welcome {min-height:380px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}
.chat-orb {display:grid;place-items:center;width:82px;height:82px;border-radius:26px;background:linear-gradient(145deg,#16394b,#182036);border:1px solid #497d8a;box-shadow:0 0 60px #228b9c30;color:#8de4ed;font-size:44px;}
.chat-welcome h2 {font-size:clamp(24px,3vw,36px);letter-spacing:-1px;margin:12px 0;}
.chat-welcome>p {color:#8ca0b4;font-size:13px;}
.chat-suggestions {display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px;}
.chat-suggestions button {border:1px solid #30424f;background:#14212b;color:#bbd5de;border-radius:20px;padding:10px 14px;cursor:pointer;}
.chat-message {max-width:94%;margin-bottom:22px;line-height:1.8;}
.chat-message small {font-size:11px;letter-spacing:.04em;color:#8db5c4;}
.chat-message.from-user {margin-left:auto;background:#182a36;padding:16px 20px;border:1px solid #294553;border-radius:20px 20px 4px 20px;}
.chat-message.from-ai {padding:8px 4px;}
.chat-text {white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;color:#e0e8ee;}
.chat-receipt {font-size:11px;color:#738b9e;margin:12px 0 0;}
.chat-error {font-size:12px;color:#ddb983;}
.chat-thinking {display:flex;align-items:center;gap:6px;padding:22px 0;color:#91a6b8;font-size:13px;}
.chat-thinking i {width:6px;height:6px;border-radius:50%;background:#79d5e5;animation:chat-pulse 1.4s infinite alternate;}
.chat-thinking i:nth-child(2) {animation-delay:.2s;}.chat-thinking i:nth-child(3) {animation-delay:.4s;}.chat-thinking span {margin-left:10px;}
@keyframes chat-pulse {to {opacity:.25;transform:translateY(-4px);}}
.chat-compose {border-top:1px solid #23303b;padding:20px 24px;background:#101923;}
.chat-options {display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:12px;}
.chat-compose textarea {width:100%;min-height:100px;resize:vertical;margin:12px 0;background:#0c131d;}
.chat-compose .between {gap:16px;align-items:center;}.chat-compose .between p {flex:1;margin:0;}
.chat-rate {font-size:11px;color:#8da5b7;margin:10px 0 0;}
.chat-disclosure {margin-top:20px;color:#7f94a6;font-size:12px;line-height:1.8;}.chat-disclosure summary {cursor:pointer;}.chat-disclosure pre {white-space:pre-wrap;font:inherit;}
@media(max-width:1000px) {.chat-layout {grid-template-columns:1fr;}.chat-sidebar {max-height:220px;}.chat-history {display:flex;gap:8px;overflow:auto;}.chat-history-item {min-width:180px;max-width:220px;}.chat-messages {padding:16px;}.chat-compose {padding:16px;}}
@media(max-width:600px) {.chat-options {grid-template-columns:1fr;}.chat-compose .between {align-items:stretch;flex-direction:column;}.chat-messages {min-height:330px;max-height:60vh;}.chat-message {max-width:100%;}}
@media(prefers-reduced-motion:reduce) {.chat-thinking i {animation:none;}}
