:root{color-scheme:light;--bg:#fff;--panel:#f9f9f9;--sidebar:#f7f7f8;--text:#262626;--muted:#777;--line:#e7e7e7;--accent:#202123;--soft:#f1f1f1;--green:#16865b;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:15px}.app-shell{display:flex;min-height:100dvh}.sidebar{width:270px;background:var(--sidebar);padding:15px 12px;display:flex;flex-direction:column;flex-shrink:0;border-right:1px solid var(--line)}.side-top{display:flex;align-items:center;justify-content:space-between;padding:3px 7px 20px}.brand{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--text);font-weight:700;font-size:17px}.brand-mark,.welcome-mark{display:grid;place-items:center;background:#202123;color:white;border-radius:11px;font-weight:750}.brand-mark{width:31px;height:31px}.new-chat,.nav-item{height:42px;border:1px solid #dedede;background:transparent;border-radius:9px;text-align:left;padding:0 12px;margin-bottom:8px;color:var(--text);font:inherit;cursor:pointer}.new-chat span,.nav-item span{font-size:19px;margin-right:9px}.nav-item{border-color:transparent}.new-chat:hover,.nav-item:hover,.suggestion:hover{background:#ededee}.history-heading{font-size:12px;font-weight:650;color:var(--muted);padding:22px 10px 9px}.conversation-list{overflow:auto;max-height:55vh}.history-item{width:100%;border:0;background:transparent;text-align:left;padding:10px;border-radius:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--text);cursor:pointer;font:inherit;font-size:13px}.history-item:hover,.history-item.active{background:#eaeaec}.sidebar-spacer{flex:1;min-height:24px}.profile-area{border-top:1px solid var(--line);padding:13px 4px 3px;display:flex;align-items:center;gap:9px}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#d9e8df;color:#225c42;font-weight:700}.profile-copy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}.profile-copy strong{font-size:13px}.profile-copy span{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis}.icon-button{border:0;background:transparent;color:inherit;width:36px;height:36px;border-radius:8px;font-size:22px;cursor:pointer}.icon-button:hover{background:#eaeaec}.mobile-close,.menu-button,.mobile-brand{display:none}.main-panel{display:flex;flex-direction:column;min-width:0;flex:1;min-height:100dvh}.topbar{height:58px;display:flex;align-items:center;padding:0 22px;gap:12px}.model-button{border:0;background:transparent;font-weight:650;color:var(--text);font-size:14px;padding:8px 10px}.model-button span{color:var(--muted);margin-left:5px}.top-spacer{flex:1}.text-button{border:1px solid var(--line);background:white;border-radius:20px;padding:8px 14px;font-weight:600;color:var(--text);cursor:pointer}.chat-stage{width:100%;max-width:850px;margin:0 auto;flex:1;display:flex;flex-direction:column;padding:30px 28px 15px}.welcome{margin:auto 0;display:flex;flex-direction:column;align-items:center;text-align:center;padding:35px 0 28px}.welcome-mark{width:48px;height:48px;font-size:23px;border-radius:15px;margin-bottom:22px}.welcome h1{font-size:29px;letter-spacing:-.8px;font-weight:650;margin:0 0 10px}.welcome>p{margin:0;color:var(--muted);font-size:15px}.suggestions{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:min(100%,590px);margin-top:38px}.suggestion{border:1px solid var(--line);border-radius:13px;background:white;padding:14px;text-align:left;display:flex;flex-direction:column;gap:6px;cursor:pointer;color:var(--text)}.suggestion strong{font-size:13px}.suggestion span{font-size:12px;color:var(--muted)}.messages{display:flex;flex-direction:column;gap:25px;padding:10px 0 30px}.message{max-width:100%;display:flex;flex-direction:column;gap:8px}.message.user{align-self:flex-end;max-width:min(80%,650px);background:#f3f3f3;border-radius:20px;padding:12px 17px}.message.assistant{align-self:stretch;padding:0 3px}.message-role{font-size:12px;color:var(--muted);font-weight:650}.message-content{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:15px}.composer-wrap{width:min(100%,850px);padding:8px 28px 18px;margin:0 auto}.composer{border:1px solid #d9d9d9;border-radius:24px;padding:12px 14px 9px;box-shadow:0 3px 14px #0000000a;background:white}.composer textarea{width:100%;border:0;outline:0;resize:none;max-height:180px;font:inherit;font-size:15px;line-height:1.5;padding:4px 4px 10px;background:transparent;color:var(--text)}.composer textarea::placeholder{color:#898989}.composer-bottom,.composer-tools,.composer-actions{display:flex;align-items:center}.composer-bottom{justify-content:space-between}.composer-tools,.composer-actions{gap:10px}.tool-button{border:0;background:transparent;border-radius:50%;width:34px;height:34px;font-size:24px;color:#555}.tool-hint,.model-hint{font-size:11px;color:#999}.send-button{width:34px;height:34px;border:0;border-radius:50%;background:#202123;color:white;font-size:21px;cursor:pointer}.send-button:disabled,.tool-button:disabled{opacity:.35}.disclaimer{text-align:center;font-size:10px;color:#999;margin:9px 0 0}.security-note{background:#fff6e8;color:#79521c;border:1px solid #f0dfc3;padding:10px 13px;border-radius:10px;font-size:12px;line-height:1.5;margin-bottom:10px}.modal-backdrop{position:fixed;inset:0;background:#0008;display:grid;place-items:center;padding:18px;z-index:10}.modal-backdrop[hidden],.security-note[hidden]{display:none}.auth-modal{position:relative;background:white;border-radius:18px;width:min(100%,410px);padding:30px;box-shadow:0 15px 50px #0003}.modal-close{position:absolute;right:12px;top:12px}.small-mark{width:40px;height:40px;font-size:20px;margin:0 auto 14px}.auth-modal h2{text-align:center;font-size:21px;margin:0 0 8px}.auth-modal>.muted{text-align:center;font-size:13px;line-height:1.5}.auth-tabs{display:flex;background:#f2f2f2;padding:4px;border-radius:9px;margin:22px 0 18px}.auth-tabs button{flex:1;border:0;border-radius:7px;background:transparent;padding:9px;font:inherit;font-size:13px;cursor:pointer}.auth-tabs button.active{background:white;box-shadow:0 1px 4px #0001;font-weight:650}.auth-modal label{display:block;font-size:12px;font-weight:650;margin:13px 0 6px}.auth-modal input{width:100%;height:43px;border:1px solid #ddd;border-radius:9px;padding:0 12px;font:inherit;font-size:14px}.primary-button{width:100%;margin-top:20px;height:44px;border:0;border-radius:9px;background:#202123;color:white;font:inherit;font-weight:650;cursor:pointer}.form-error{color:#b42318;font-size:12px;min-height:16px}.muted{color:var(--muted)}.small{font-size:12px;padding:0 10px}.toast{position:fixed;bottom:25px;left:50%;transform:translate(-50%,20px);opacity:0;background:#202123;color:white;padding:10px 15px;border-radius:9px;font-size:13px;transition:.2s;pointer-events:none;z-index:20}.toast.show{opacity:1;transform:translate(-50%,0)}@media(max-width:760px){.sidebar{position:fixed;z-index:8;left:0;top:0;bottom:0;width:min(84vw,310px);transform:translateX(-105%);transition:transform .22s ease;box-shadow:8px 0 28px #00000012}.sidebar.open{transform:translateX(0)}.mobile-close,.menu-button,.mobile-brand{display:block}.side-top{padding-bottom:18px}.topbar{height:54px;padding:0 12px;gap:8px}.mobile-brand{font-weight:700;font-size:15px}.model-button{margin-left:auto;font-size:12px}.chat-stage{padding:20px 16px 8px}.welcome{padding:25px 0}.welcome h1{font-size:24px;max-width:330px}.welcome>p{font-size:13px}.suggestions{grid-template-columns:1fr 1fr;gap:8px;margin-top:28px}.suggestion{padding:11px;min-height:76px}.suggestion strong{font-size:12px}.suggestion span{font-size:11px}.composer-wrap{padding:8px 10px calc(12px + env(safe-area-inset-bottom))}.composer{border-radius:21px;padding:10px 11px 8px}.tool-hint{display:none}.message.user{max-width:90%}.auth-modal{padding:26px 21px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Keep the composer anchored while the conversation scrolls on mobile. */
@media(max-width:760px){
  html,body{height:100%;overflow:hidden}
  .app-shell{height:100dvh;min-height:0;overflow:hidden}
  .main-panel{height:100%;min-height:0;overflow:hidden}
  .chat-stage{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .composer-wrap{flex:0 0 auto;position:relative;z-index:2;background:var(--bg);padding-bottom:calc(12px + env(safe-area-inset-bottom))}
}
