:root{--paper:#eee8dc;--white:#faf7ef;--ink:#342f27;--muted:#766f61;--line:#ded5c4;--rust:#a34c33;--rust-dark:#873b28;--olive:#65704b;--gold:#c89d51;--select:#e6d8c5;--sans:Arial,'Helvetica Neue',sans-serif}*{box-sizing:border-box}html{color-scheme:light}body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.45 var(--sans)}[hidden]{display:none!important}button,input{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid var(--rust);outline-offset:3px}button,input{min-width:0}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}h1,h2,h3,p{margin:0}h1{font-size:24px;font-weight:650;letter-spacing:-.6px}h2{font-size:20px}h3{font-size:15px}.muted,.empty p{color:var(--muted)}.brand{display:flex;align-items:center;gap:8px;font: bold 23px Georgia,serif;letter-spacing:-1.3px;white-space:nowrap}.brand-accent{color:var(--rust)}.logo{display:grid;place-items:center;width:35px;height:35px;border-radius:11px;background:var(--rust);color:#fff8e9}.logo svg{width:23px;height:23px}.app-shell{display:grid;grid-template-columns:218px minmax(0,1fr);height:100vh;height:100dvh;overflow:hidden}.sidebar{display:flex;flex-direction:column;min-height:0;padding:24px 14px 14px;border-right:1px solid var(--line);background:#e9e1d2}.sidebar>.brand{padding:0 7px;margin-bottom:35px}.main-nav{display:grid;gap:5px}.nav-btn,.profile-btn{border:0;background:transparent;display:flex;align-items:center;gap:12px;padding:12px 13px;text-align:left;border-radius:10px;min-height:45px;font-weight:550}.nav-btn:hover,.profile-btn:hover{background:#dfd5c3}.nav-btn.active,.profile-btn.active{background:#d9c8ad;color:#743d28}.nav-btn.active svg{color:var(--rust)}.sidebar-bottom{margin-top:auto;display:grid;gap:12px}.top-status{display:flex;align-items:center;gap:7px;padding-left:13px;font-size:11px;color:var(--muted)}.status-dot{width:7px;height:7px;border-radius:50%;background:var(--olive)}.status-dot.offline{background:var(--rust)}.profile-btn{border-top:1px solid var(--line);padding:12px 6px 5px;gap:9px;max-width:100%}.profile-btn>span:nth-child(2){flex:1;min-width:0}.profile-btn b,.profile-btn small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.profile-btn small{font-size:11px;color:var(--muted);font-weight:400}.profile-btn>svg{width:16px}.avatar{display:grid;place-items:center;border-radius:50%;width:39px;height:39px;flex:none;background:var(--olive);color:#fffaf0;font-size:16px;font-weight:600}.avatar.big{width:72px;height:72px;font-size:29px}.main{min-height:0;min-width:0;background:var(--white);overflow:hidden}.workspace{height:100%;overflow:auto;padding:28px 30px}.page-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:22px;border-bottom:1px solid var(--line)}.intro-actions,.file-tools{display:flex;gap:8px;align-items:center}.btn{border:1px solid transparent;border-radius:9px;display:inline-flex;gap:7px;align-items:center;justify-content:center;min-height:40px;padding:9px 13px;font-weight:600;white-space:nowrap}.btn svg{width:18px;height:18px}.btn.primary{background:var(--rust);color:#fffaf2}.btn.primary:hover{background:var(--rust-dark)}.btn.secondary{background:#f4efe5;border-color:var(--line)}.btn.secondary:hover{background:#e9dfce}.btn.full{width:100%}.icon-btn{display:grid;place-items:center;border:0;border-radius:8px;background:transparent;width:38px;height:38px;padding:8px;flex:none;color:var(--muted)}.icon-btn:hover{background:var(--select);color:var(--ink)}.files-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:20px}.breadcrumbs{display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap;color:var(--muted);overflow-wrap:anywhere}.link{border:0;background:none;padding:0;color:var(--rust);font-weight:600;text-align:left;overflow-wrap:anywhere}.link:hover{text-decoration:underline}.search-box{display:flex;align-items:center;gap:8px;background:#eee8dc;border:1px solid transparent;border-radius:10px;padding:0 11px;min-width:0;height:40px;color:var(--muted)}.search-box svg{width:17px;height:17px}.search-box input{width:100%;outline:0;border:0;background:transparent;padding:8px 0;color:var(--ink)}.search-box:focus-within{border-color:var(--rust)}.file-tools .search-box{width:220px}.toggle{display:flex;gap:2px;padding:3px;border:1px solid var(--line);border-radius:9px}.toggle button{display:grid;place-items:center;border:0;background:transparent;border-radius:6px;padding:6px;color:var(--muted);height:31px;width:32px}.toggle button.selected{background:var(--select);color:var(--rust)}.file-count{font-size:12px;color:var(--muted);margin:19px 0 11px}.items{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;align-content:start}.file-card{min-width:0;display:flex;align-items:center;gap:2px;padding:5px;border:1px solid var(--line);border-radius:12px;background:#f7f2e9;min-height:82px}.file-card:hover{border-color:#c3b398}.file-open{min-width:0;flex:1;display:flex;align-items:center;gap:10px;padding:7px;border:0;text-align:left;background:transparent;border-radius:8px}.file-icon{width:42px;height:42px;flex:none;display:grid;place-items:center;border-radius:9px;background:#e8d7ad;color:#88611e}.file-icon svg{width:25px;height:25px}.file-icon.document{background:#e3e5d9;color:var(--olive)}.file-label{min-width:0}.file-label b,.file-label small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-label b{font-size:13px}.file-label small{font-size:11px;color:var(--muted);margin-top:3px}.file-card>.icon-btn{width:28px;height:36px;padding:4px}.items.list{grid-template-columns:1fr;gap:5px}.items.list .file-card{min-height:56px}.items.list .file-icon{width:34px;height:34px}.empty{grid-column:1/-1;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:9px;min-height:230px;color:var(--muted);padding:20px}.empty-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#e6dccb;color:var(--olive)}.empty-icon svg{width:26px;height:26px}.empty h3{color:var(--muted);font-weight:500}.empty p{font-size:13px}.empty p:empty{display:none}.upload-status{position:sticky;bottom:0;background:var(--select);border-radius:8px;padding:12px;margin-top:14px}.profile-card{display:flex;flex-direction:column;align-items:center;gap:12px;max-width:380px;margin:36px auto;padding:28px;background:var(--paper);border-radius:15px;border:1px solid var(--line)}.profile-card .btn{margin-top:10px}
#chatView{padding:0;overflow:hidden}.chat-layout{display:grid;grid-template-columns:minmax(240px,310px) minmax(0,1fr);height:100%;min-height:0}.chat-list{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--line);background:#f9f5ec}.chat-list-top{display:flex;align-items:center;justify-content:space-between;padding:21px 15px 14px}.new-chat-btn{background:#e6d8c5;color:var(--rust)}.chat-search{margin:0 12px 12px;flex:none}#chatList{overflow:auto;padding:0 7px 10px;flex:1}.chat-row{display:flex;align-items:center;gap:10px;width:100%;border:0;border-radius:10px;background:transparent;text-align:left;padding:11px 9px;min-height:67px}.chat-row:hover{background:#eee7d9}.chat-row.active{background:#e1d3be}.chat-row .avatar{width:44px;height:44px}.chat-row:nth-child(3n+2) .avatar{background:#a66b46}.chat-row:nth-child(3n) .avatar{background:#8a805d}.chat-row>div{min-width:0;flex:1}.chat-row b,.chat-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-row small{color:var(--muted);margin-top:4px;font-size:12px}.chat-row time{font-size:10px;color:var(--muted);align-self:flex-start;margin-top:4px;white-space:nowrap}#chatList>.muted{padding:20px 10px;text-align:center;font-size:13px}.conversation{display:flex;flex-direction:column;min-width:0;min-height:0;background:#eae4d6}.chat-header{display:flex;align-items:center;gap:11px;min-height:69px;padding:12px 22px;border-bottom:1px solid var(--line);background:var(--white)}.chat-header>div{min-width:0}.chat-header b,.chat-header small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-header small{font-size:11px;color:var(--muted);margin-top:2px}.chat-header small:empty{display:none}.mobile-back{display:none}.messages{min-height:0;flex:1;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:22px max(20px,calc((100% - 700px)/2));scrollbar-width:thin}.messages>.empty{flex:1}.bubble{align-self:flex-start;background:#faf7ee;max-width:min(84%,540px);padding:9px 13px 7px;border-radius:13px 13px 13px 4px;box-shadow:0 1px 1px #302d2310;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.mine{align-self:flex-end;background:#dfe2cc;border-radius:13px 13px 4px 13px}.bubble b{display:block;color:var(--olive);font-size:11px;margin-bottom:3px}.bubble small{display:block;text-align:right;font-size:10px;color:var(--muted);margin-top:3px}.composer{display:flex;gap:9px;padding:12px 18px;background:var(--white);border-top:1px solid var(--line)}.composer input{flex:1;border:1px solid var(--line);background:#f4efe4;border-radius:12px;padding:10px 13px;min-height:43px}.composer .btn{width:45px;border-radius:12px;padding:0}.composer .btn svg{width:21px;height:21px}
.auth-shell{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:22px;background:var(--paper)}.auth-pane{width:min(100%,400px);background:var(--white);border:1px solid var(--line);border-radius:18px;padding:30px;box-shadow:0 14px 50px #493a2210}.auth-brand{justify-content:center;margin:0 0 27px}.auth-inner h1{text-align:center;margin-bottom:22px}.auth-inner form,dialog form{display:grid;gap:14px}label:not(.search-box){display:grid;gap:6px;font-size:13px;font-weight:600}label:not(.search-box) input{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:#fffdf7;font-weight:400} .auth-switch{text-align:center;font-size:13px;margin-top:19px;color:var(--muted)}.error{color:#a23827;font-size:13px}.error:empty{display:none}dialog{width:min(calc(100% - 30px),420px);border:1px solid var(--line);border-radius:16px;padding:20px;background:var(--white);color:var(--ink)}dialog::backdrop{background:#29251e70}.modal-head,.modal-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.modal-head h2{overflow-wrap:anywhere;min-width:0}.modal-actions{justify-content:flex-end}.action-list{display:grid;gap:7px;max-height:50vh;overflow:auto}.action-list .btn{justify-content:flex-start}#toast{position:fixed;right:20px;bottom:20px;z-index:100;background:#3b392f;color:#fff9ed;padding:12px 16px;border-radius:10px;max-width:calc(100% - 40px);box-shadow:0 4px 20px #0002}.mobile-nav,.mobile-head{display:none}
@media(max-width:920px){.app-shell{grid-template-columns:186px minmax(0,1fr)}.sidebar{padding:20px 10px 12px}.sidebar>.brand{font-size:20px;padding:0 3px}.workspace{padding:22px}.file-tools .search-box{width:150px}.chat-layout{grid-template-columns:minmax(220px,260px) minmax(0,1fr)}}
@media(max-width:720px){.app-shell{display:flex;flex-direction:column}.sidebar{display:none}.main{flex:1;display:flex;flex-direction:column}.mobile-head{display:flex;align-items:center;padding:11px 16px;border-bottom:1px solid var(--line);min-height:53px;flex:none}.mobile-head .brand{font-size:20px;gap:4px}.mobile-head .logo{width:29px;height:29px;margin-right:4px;border-radius:9px}.mobile-head .logo svg{width:19px;height:19px}.workspace{padding:18px 14px;flex:1;min-height:0}.page-head{flex-wrap:wrap;padding-bottom:15px}.page-head h1{font-size:22px}.intro-actions{gap:6px}.btn{padding:8px 10px;min-height:39px;font-size:13px}.files-heading{flex-direction:column;align-items:stretch;gap:10px;margin-top:14px}.file-tools .search-box{flex:1;width:auto}.file-count{margin:13px 0 9px}.items{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.file-card{min-height:72px;gap:0;padding:3px}.file-open{gap:6px;padding:4px}.file-icon{width:31px;height:34px}.file-icon svg{width:21px;height:21px}.file-label b{font-size:12px}.file-card>.icon-btn{width:25px;padding:3px}.mobile-nav{display:grid;grid-template-columns:repeat(4,1fr);padding:5px 7px max(5px,env(safe-area-inset-bottom));gap:4px;background:#eee8dc;border-top:1px solid var(--line);flex:none}.mobile-nav button{border:0;background:transparent;border-radius:10px;color:var(--muted);min-height:49px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;font-size:11px}.mobile-nav button.active{background:#ddceb5;color:var(--rust)}.mobile-nav svg{width:21px;height:21px}.chat-layout{display:flex}.chat-list{width:100%;border:0}.chat-list-top{padding:13px 14px 9px}.chat-list-top h1{font-size:22px}.conversation{display:none;width:100%}.chat-layout.open .chat-list{display:none}.chat-layout.open .conversation{display:flex}.mobile-back{display:grid}.chat-header{min-height:58px;padding:8px 10px;gap:8px}.messages{padding:15px 12px}.composer{padding:8px 10px}.bubble{max-width:86%}.auth-pane{padding:24px}.profile-card{margin:25px auto}#toast{bottom:76px;right:12px;max-width:calc(100% - 24px)}}
@media(max-width:360px){.items{grid-template-columns:1fr}.auth-pane{padding:20px}.page-head{gap:8px}}
/* Keep short conversations close to the composer, without clipping long histories. */
.messages>.bubble:first-child{margin-top:auto}.file-label b{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;overflow-wrap:anywhere}.items:not(.list){grid-template-columns:repeat(auto-fill,minmax(225px,1fr))}.items.list .file-label b{display:block;white-space:nowrap}.file-open{min-height:52px}
@media(max-width:720px){.items:not(.list){grid-template-columns:repeat(2,minmax(0,1fr))}.file-label b{font-size:12px}.file-open{min-height:55px}}@media(max-width:360px){.items:not(.list){grid-template-columns:1fr}}

.verification-code{font-variant-numeric:tabular-nums;letter-spacing:.3em;font-size:22px;text-align:center}
