:root{--primary: #306090;--primary-light: #4080b0;--primary-dark: #204060;--bg: #ffffff;--surface: #f5f7fa;--text: #1a1a2e;--text-secondary: #696969;--border: #e0e0e0;--error: #e74c3c;--success: #2ecc71;--bubble-out: #306090;--bubble-in: #e8ecf1;--bubble-out-text: #ffffff;--bubble-in-text: #1a1a2e;--input-bg: #f0f0f5;--placeholder: #a0a0b0;--badge: #e74c3c}@media (prefers-color-scheme: dark){:root{--bg: #1a1a2e;--surface: #16213e;--text: #ffffff;--text-secondary: #a0a0b0;--border: #2a2a4a;--bubble-in: #2a2a4a;--bubble-in-text: #ffffff;--input-bg: #2a2a4a;--placeholder: #606080}}*{margin:0;padding:0;box-sizing:border-box}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;overscroll-behavior:none}#root{height:100dvh;display:flex;flex-direction:column}.header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:var(--primary);color:#fff;min-height:56px;flex-shrink:0}.header h1{font-size:20px;font-weight:700}.header button{background:none;border:none;color:#fff;font-size:24px;cursor:pointer;padding:4px 8px}.header .back{font-size:20px}.page{display:flex;flex-direction:column;height:100dvh;background:var(--bg)}.setup-page{justify-content:space-between;padding:48px 24px 24px}.setup-header{text-align:center}.setup-header .logo{font-size:36px;font-weight:800;color:var(--primary);margin-bottom:12px}.setup-header .welcome{font-size:28px;font-weight:700;margin-bottom:8px}.setup-header .instruction{font-size:16px;color:var(--text-secondary);line-height:1.5}.setup-form{display:flex;flex-direction:column;gap:16px}.setup-footer{text-align:center;font-size:13px;color:var(--text-secondary);line-height:1.5}.input{background:var(--input-bg);border:1px solid var(--border);border-radius:12px;padding:14px 16px;font-size:16px;color:var(--text);outline:none;width:100%}.input::placeholder{color:var(--placeholder)}.input:focus{border-color:var(--primary)}.btn{background:var(--primary);color:#fff;border:none;border-radius:12px;padding:14px;font-size:17px;font-weight:600;cursor:pointer;display:flex;align-items:center;justify-content:center;min-height:48px}.btn:disabled{opacity:.5;cursor:not-allowed}.btn:hover:not(:disabled){background:var(--primary-dark)}.btn-secondary{background:var(--bg);color:var(--primary);border:1.5px solid var(--primary)}.btn-secondary:hover:not(:disabled){background:var(--surface)}.conv-list{flex:1;overflow-y:auto}.conv-item{display:flex;align-items:center;padding:10px 16px;cursor:pointer;border-bottom:1px solid var(--border)}.conv-item:hover{background:var(--surface)}.conv-avatar{width:52px;height:52px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-right:16px;flex-shrink:0;font-size:20px;font-weight:700;color:#fff}.conv-body{flex:1;min-width:0}.conv-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.conv-name{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.conv-name.unread{font-weight:700}.conv-time{font-size:12px;color:var(--text-secondary);flex-shrink:0;margin-left:8px}.conv-bottom{display:flex;justify-content:space-between;align-items:center}.conv-preview{font-size:14px;color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.conv-preview.unread{color:var(--text);font-weight:500}.conv-badge{background:var(--badge);color:#fff;border-radius:999px;min-width:20px;height:20px;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 6px;margin-left:8px}.fab{position:fixed;right:24px;bottom:24px;width:56px;height:56px;border-radius:50%;background:var(--primary);color:#fff;border:none;font-size:28px;cursor:pointer;box-shadow:0 3px 8px #0000004d;display:flex;align-items:center;justify-content:center}.fab:hover{background:var(--primary-dark)}.fab-menu{position:fixed;right:24px;bottom:90px;background:var(--bg);border:1px solid var(--border);border-radius:12px;box-shadow:0 4px 16px #00000026;overflow:hidden;z-index:10}.fab-menu button{display:block;width:100%;padding:14px 24px;background:none;border:none;border-bottom:1px solid var(--border);font-size:16px;color:var(--text);cursor:pointer;text-align:left}.fab-menu button:last-child{border-bottom:none}.fab-menu button:hover{background:var(--surface)}.chat-messages{flex:1;overflow-y:auto;padding:8px 0;display:flex;flex-direction:column-reverse}.bubble-wrapper{padding:4px 16px}.bubble-wrapper.outgoing{align-self:flex-end}.bubble-wrapper.incoming{align-self:flex-start}.bubble-sender{font-size:12px;font-weight:600;color:var(--primary-light);margin-bottom:2px;margin-left:4px}.bubble{max-width:min(80vw,400px);padding:8px 14px 4px;border-radius:16px;word-wrap:break-word;display:inline-block}.bubble.outgoing{background:var(--bubble-out);color:var(--bubble-out-text);border-bottom-right-radius:4px}.bubble.incoming{background:var(--bubble-in);color:var(--bubble-in-text);border-bottom-left-radius:4px}.bubble-text{font-size:16px;line-height:1.4}.bubble-time{font-size:11px;text-align:right;margin-top:4px;opacity:.7}.bubble-media{max-width:100%;max-height:200px;border-radius:12px;margin-bottom:4px}.chat-input-bar{display:flex;align-items:flex-end;padding:8px;border-top:1px solid var(--border);background:var(--surface);gap:8px}.chat-input-bar .attach-btn{width:36px;height:36px;border-radius:50%;background:var(--input-bg);border:none;font-size:22px;color:var(--primary);cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center}.chat-input-bar textarea{flex:1;background:var(--input-bg);border:none;border-radius:20px;padding:8px 16px;font-size:16px;color:var(--text);resize:none;outline:none;max-height:120px;min-height:36px;font-family:inherit;line-height:1.4}.chat-input-bar textarea::placeholder{color:var(--placeholder)}.chat-input-bar .send-btn{width:36px;height:36px;border-radius:50%;background:var(--primary);border:none;color:#fff;font-size:18px;font-weight:700;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;padding:48px 24px;text-align:center}.empty-state .icon{font-size:48px;margin-bottom:16px}.empty-state h3{font-size:18px;font-weight:600;margin-bottom:8px}.empty-state p{font-size:14px;color:var(--text-secondary)}.card{background:var(--bg);border:1px solid var(--border);border-radius:12px;padding:16px}.card-title{font-size:18px;font-weight:600;margin-bottom:16px}.divider-row{display:flex;align-items:center;margin:24px 0;gap:16px}.divider-line{flex:1;height:1px;background:var(--border)}.divider-text{font-size:14px;font-weight:600;color:var(--text-secondary)}.settings-scroll{flex:1;overflow-y:auto;padding-bottom:48px}.section-header{font-size:13px;font-weight:600;color:var(--text-secondary);padding:24px 16px 8px;letter-spacing:.5px}.section{background:var(--bg);border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:8px 16px}.section-row{display:flex;justify-content:space-between;align-items:center;padding:8px 0}.section-row-label{flex:1;margin-right:16px}.section-row-label .title{font-size:16px}.section-row-label .subtitle{font-size:13px;color:var(--text-secondary);margin-top:2px}.retention-options{display:flex;flex-wrap:wrap;gap:8px;padding:8px 0}.retention-btn{padding:8px 16px;border-radius:24px;border:1px solid var(--border);background:var(--input-bg);font-size:14px;color:var(--text);cursor:pointer}.retention-btn.active{background:var(--primary);border-color:var(--primary);color:#fff;font-weight:600}.contact-row{display:flex;align-items:center;padding:10px 16px;cursor:pointer;border-bottom:1px solid var(--border)}.contact-row:hover{background:var(--surface)}.checkbox{width:24px;height:24px;border-radius:6px;border:2px solid var(--border);display:flex;align-items:center;justify-content:center;margin-right:16px;flex-shrink:0}.checkbox.selected{background:var(--primary);border-color:var(--primary)}.checkbox .check{font-size:14px;font-weight:700;color:#fff}.contact-avatar{width:40px;height:40px;border-radius:50%;background:var(--primary-light);display:flex;align-items:center;justify-content:center;margin-right:16px;flex-shrink:0;font-size:16px;font-weight:700;color:#fff}.contact-name{font-size:16px;flex:1}.accept-content{flex:1;display:flex;align-items:center;justify-content:center;padding:16px}.from-label{font-size:14px;color:var(--text-secondary);margin-bottom:4px}.sender-name{font-size:22px;font-weight:700}.divider{height:1px;background:var(--border);margin:24px 0}.input-label{font-size:14px;color:var(--text-secondary);margin-bottom:8px}.decline-btn{background:none;border:none;color:var(--error);font-size:16px;font-weight:500;padding:8px;cursor:pointer;width:100%;margin-top:8px}.link-container{display:flex;flex-direction:column;gap:8px}.link-label{font-size:14px;font-weight:600;color:var(--text-secondary)}.link-text{font-size:14px;color:var(--primary);background:var(--input-bg);padding:8px;border-radius:8px;word-break:break-all;-webkit-user-select:all;user-select:all}.scroll-content{padding:16px 16px 48px}.loading{display:flex;align-items:center;justify-content:center;flex:1}.spinner{width:32px;height:32px;border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:100}.dialog{background:var(--bg);border-radius:16px;padding:24px;max-width:320px;width:90%;text-align:center}.dialog h3{margin-bottom:8px;font-size:18px}.dialog p{color:var(--text-secondary);font-size:14px;margin-bottom:20px}.dialog-actions{display:flex;gap:12px}.dialog-actions button{flex:1;padding:12px;border-radius:10px;font-size:15px;font-weight:600;cursor:pointer}.dialog-cancel{background:var(--surface);border:1px solid var(--border);color:var(--text)}.dialog-danger{background:var(--error);border:none;color:#fff}.footer-bar{padding:16px;border-top:1px solid var(--border)}.hint{font-size:13px;color:var(--text-secondary);text-align:center;margin-top:8px}.copy-hint{font-size:13px;color:var(--primary-light);cursor:pointer}.version-text{font-size:14px;color:var(--text-secondary)}
