*{box-sizing:border-box}html,body{margin:0;height:100%;background:#fff;color:#050505;font-family:Inter,Arial,sans-serif}button,a,input{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button{border:0;background:none}button:focus-visible,a:focus-visible{outline:2px solid #0084ff;outline-offset:3px}button:disabled{cursor:default}.chat{position:relative;display:flex;flex-direction:column;width:100%;height:100dvh;max-width:760px;margin:auto;overflow:hidden}.header{flex-shrink:0;display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #e4e6eb;box-shadow:0 1px 2px #00000008;z-index:3;background:#fff}.icon{padding:8px;color:#0084ff;display:flex;align-items:center;justify-content:center;border-radius:50%;flex-shrink:0}.icon:hover{background:#f0f2f5}.icon svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none}.back{padding:4px}.back svg{width:24px;height:24px}.header>.icon:not(.back){margin-left:-4px}.header>.icon+.icon{margin-left:-12px}.more{color:#050505}.more svg circle{fill:currentColor}.heading{flex:1;min-width:0}.heading h1{font-size:16px;line-height:24px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.heading p{font-size:12px;line-height:16px;color:#65676b;margin:0}.avatar{position:relative;flex-shrink:0}.avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.online:after{content:"";position:absolute;right:0;bottom:0;width:8px;height:8px;border:2px solid white;border-radius:50%;background:#31a24c}.small{width:32px;height:32px}.large{width:64px;height:64px}.conversation{flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}.conversation::-webkit-scrollbar{display:none}.profile{display:flex;align-items:center;flex-direction:column;padding:24px 0;transition:opacity .15s}.profile h2{font-size:18px;line-height:28px;font-weight:600;margin:12px 0 0}.profile p{font-size:14px;line-height:20px;color:#65676b;margin:0}.messages{padding:0 16px 16px;display:flex;flex-direction:column;gap:12px}.message{display:flex;align-items:flex-end;gap:8px;animation:appear .2s ease}.message>.avatar{width:28px;height:28px}.bubble{max-width:280px;min-width:0;padding:8px 16px;border-radius:16px;background:#f0f0f0;font-size:14px;line-height:20px;overflow-wrap:anywhere}.bubble p{margin:0;white-space:pre-wrap}.bubble p>div:last-child:empty{display:none}.bubble div:empty{min-height:1em}.bubble b{font-weight:700}.user{align-self:flex-end;max-width:280px;background:#0084ff;color:#fff;padding:8px 16px;border-radius:24px;font-size:14px;line-height:20px}.typing .bubble{display:flex;gap:4px;border-radius:30px;padding:12px 16px}.typing i{width:8px;height:8px;border-radius:50%;background:#65676b;animation:dot 1s infinite}.typing i:nth-child(2){animation-delay:.15s}.typing i:nth-child(3){animation-delay:.3s}.audio-bubble{border-radius:30px;padding:12px 16px;display:flex;gap:12px;align-items:center;max-width:280px;background:#f0f0f0}.play{padding:0;color:#65676b;display:flex}.play svg{width:24px;height:24px;fill:currentColor}.wave{display:flex;align-items:center;gap:2px;height:20px}.wave i{width:2px;background:#65676b;opacity:.6;border-radius:2px}.wave i.played{background:#0084ff;opacity:1}.duration{font-size:12px;color:#65676b;min-width:28px;margin-left:4px}.options{display:grid;gap:8px;margin:0 0 0 36px;align-self:flex-end;width:calc(85% - 30px)}.option,.checkout{display:flex;gap:12px;align-items:center;justify-content:space-between;background:#0084ff;border-radius:28px;padding:12px 16px;text-align:left;color:white;font-size:14px;line-height:20px;font-weight:500;text-decoration:none}.option:hover{background:#0073e6}.option span:last-child{font-size:24px;font-weight:400}.document{padding:0;overflow:hidden;width:280px}.document-info{display:flex;align-items:center;gap:12px;padding:16px;border-bottom:1px solid #e4e6eb}.pdf-icon{width:40px;height:40px;border-radius:4px;background:#fce3e4;color:#f44336;display:grid;place-items:center;font-size:12px;font-weight:bold;flex-shrink:0}.document-name{overflow:hidden}.document-name strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:500}.document-name small{color:#65676b;font-size:12px}.open-document{width:100%;padding:12px;color:#0084ff;font-size:14px;font-weight:500}.open-document:hover{background:#00000008}.checkout{align-self:flex-end;background:#16a34a;justify-content:center}.composer{display:flex;align-items:center;gap:8px;border-top:1px solid #e4e6eb;padding:8px 12px max(8px,env(safe-area-inset-bottom));flex-shrink:0}.composer .icon svg{width:24px;height:24px}.placeholder{flex:1;background:#f0f2f5;border-radius:30px;padding:8px 16px;color:#65676b;font-size:14px;line-height:20px}.like{padding:8px;font-size:24px;line-height:28px}.menu{position:absolute;right:16px;top:60px;z-index:5;padding:6px;background:#fff;box-shadow:0 6px 30px #0002;border:1px solid #e4e6eb;border-radius:12px}.menu button{display:block;width:100%;text-align:left;font-size:14px;padding:12px;border-radius:8px}.menu button:hover{background:#f0f2f5}.pdf-viewer{padding:0;border:0;width:min(100%,1000px);max-width:100%;height:94dvh;border-radius:12px;background:#f7f7f8}.pdf-viewer[open]{display:flex;flex-direction:column}.pdf-viewer::backdrop{background:#0009}.pdf-viewer header{display:flex;align-items:center;gap:16px;padding:12px;background:#fff}.return,.download{color:#0084ff;font-size:14px;padding:8px;text-decoration:none;white-space:nowrap}.pdf-title{flex:1;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdf-viewer iframe{width:100%;flex:1;border:0;background:#ececec}.pdf-viewer>p{font-size:12px;text-align:center;padding:0 12px}.pdf-fallback{color:#0084ff}.toast{position:fixed;bottom:82px;left:50%;transform:translateX(-50%);padding:12px 18px;width:max-content;max-width:90%;background:#262626;color:#fff;border-radius:12px;font-size:14px;z-index:20}.error{padding:32px}.error button{color:#0084ff}@media(min-width:768px) and (max-width:1023px){.chat{max-width:640px}}@media(max-width:359px){.header{gap:8px;padding-left:8px;padding-right:8px}.header .icon{padding:6px}.heading h1{font-size:14px}.bubble{max-width:calc(100vw - 80px)}.wave{gap:1.5px}.options{width:80%}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;scroll-behavior:auto!important}}@keyframes dot{50%{transform:translateY(-4px)}}@keyframes appear{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@font-face{font-family:Inter;src:url('./assets/inter-400.ttf') format('truetype');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:Inter;src:url('./assets/inter-600.ttf') format('truetype');font-style:normal;font-weight:500 600;font-display:swap}
@font-face{font-family:Inter;src:url('./assets/inter-700.ttf') format('truetype');font-style:normal;font-weight:700 800;font-display:swap}
.recording-indicator{display:flex;align-items:center;gap:8px;padding:2px 0}
.mic-badge{width:32px;height:32px;border-radius:50%;background:#9ca3af;color:#fff;display:grid;place-items:center;flex-shrink:0;box-shadow:0 1px 3px rgba(0,0,0,.12);animation:micPulse 1.4s ease-in-out infinite}
.mic-badge svg{width:16px;height:16px;fill:currentColor}
.recording-text{font-size:13px;line-height:18px;color:#65676b}
.header,.composer{pointer-events:none;user-select:none}
.option{background:#0084ff;transition:background .15s}
.option:hover{background:#0073e6}
.open-document{color:#0084ff}
.document-cover{position:relative;display:block;width:100%;aspect-ratio:210/297;padding:0;overflow:hidden;background:linear-gradient(110deg,#eceef1 25%,#f7f8fa 50%,#eceef1 75%);background-size:200% 100%;animation:coverShimmer 1.4s ease-in-out infinite;border-bottom:1px solid #e4e6eb}
.document-cover.loaded{animation:none;background:#fff}
.document-cover-canvas{display:block;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .25s ease,transform .25s ease}
.document-cover.loaded .document-cover-canvas{opacity:1}
.document-cover:hover .document-cover-canvas{transform:scale(1.02)}
.document-pages-badge{position:absolute;right:10px;bottom:10px;padding:4px 9px;border-radius:999px;background:rgba(15,23,42,.72);color:#fff;font-size:11px;font-weight:600;letter-spacing:.2px;backdrop-filter:blur(4px)}
@keyframes coverShimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.checkout{width:100%;align-self:stretch;background:#16a34a;border-radius:12px;padding:15px 20px;gap:10px;justify-content:center;font-size:16px;line-height:22px;font-weight:600;box-shadow:0 4px 12px rgba(22,163,74,.25);transition:background .15s,opacity .15s}
.checkout:hover{background:#15803d}
.checkout.loading{opacity:.9;cursor:wait;pointer-events:none}
.checkout svg{width:20px;height:20px;flex-shrink:0}
.spinner{width:18px;height:18px;border:2.5px solid rgba(255,255,255,.35);border-top-color:#fff;border-radius:50%;animation:spin .75s linear infinite;flex-shrink:0}
.spinner.dark{width:28px;height:28px;border:3px solid rgba(0,0,0,.12);border-top-color:#0084ff}
.pdf-viewer{padding:0;border:0;width:min(calc(100vw - 32px),860px);max-width:calc(100vw - 32px);height:min(calc(100dvh - 56px),840px);max-height:calc(100dvh - 56px);margin:auto;border-radius:16px;background:#f3f4f6;box-shadow:0 20px 60px rgba(0,0,0,.35);overflow:hidden}
.pdf-viewer::backdrop{background:rgba(0,0,0,.6);backdrop-filter:blur(2px)}
.pdf-header{display:flex;align-items:center;gap:10px;padding:10px 14px;background:#fff;border-bottom:1px solid #e4e6eb;flex-shrink:0}
.pdf-title{flex:1;font-size:14px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.pdf-zoom{display:flex;align-items:center;gap:6px;flex-shrink:0}
.pdf-tool{width:32px;height:32px;border-radius:8px;background:#f0f2f5;color:#050505;font-size:18px;font-weight:600;display:grid;place-items:center;transition:background .15s}
.pdf-tool:hover:not(:disabled){background:#e4e6eb}
.pdf-tool:disabled{opacity:.35}
.pdf-zoom-label{font-size:12px;color:#65676b;min-width:38px;text-align:center;font-variant-numeric:tabular-nums}
.pdf-stage{position:relative;flex:1;overflow:auto;display:grid;place-items:center;padding:12px;background:#eef0f3;-webkit-overflow-scrolling:touch}
.pdf-canvas-wrap{display:flex;align-items:center;justify-content:center}
.pdf-canvas{display:block;background:#fff;border-radius:6px;box-shadow:0 4px 18px rgba(0,0,0,.14)}
.pdf-loading{position:absolute;inset:0;display:grid;place-items:center;background:rgba(238,240,243,.7);z-index:2}
.pdf-loading[hidden]{display:none}
.pdf-nav{display:flex;align-items:center;justify-content:center;gap:20px;padding:10px 16px;background:#fff;border-top:1px solid #e4e6eb;flex-shrink:0}
.pdf-arrow{width:42px;height:42px;border-radius:50%;background:#0084ff;color:#fff;font-size:24px;line-height:1;display:grid;place-items:center;transition:background .15s,opacity .15s}
.pdf-arrow:hover:not(:disabled){background:#0073e6}
.pdf-arrow:disabled{background:#e4e6eb;color:#9ca3af;opacity:.7}
.pdf-page-info{font-size:14px;font-weight:500;color:#050505;min-width:68px;text-align:center;font-variant-numeric:tabular-nums}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes micPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.06);opacity:.78}}
