:root{--bg: #f4f3ef;--surface: #ffffff;--surface-2: #ebe9e3;--ink: #15161a;--muted: #7d7f88;--line: rgba(20, 22, 30, .08);--accent: #2f5bea;--accent-ink: #ffffff;--accent-soft: rgba(47, 91, 234, .1);--bubble: #ffffff;--warn: #c2410c;--ok: #15915a;--shadow: 0 1px 2px rgba(20, 22, 30, .05), 0 8px 24px rgba(20, 22, 30, .06);--glass: rgba(244, 243, 239, .78);--sat: env(safe-area-inset-top, 0px);--sab: env(safe-area-inset-bottom, 0px);--font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;color-scheme:light dark}@media(prefers-color-scheme:dark){:root{--bg: #0d0e12;--surface: #181a20;--surface-2: #22252d;--ink: #f1f1f4;--muted: #8e919c;--line: rgba(255, 255, 255, .08);--accent: #5b82ff;--accent-soft: rgba(91, 130, 255, .16);--bubble: #1d2027;--warn: #fb923c;--ok: #34d399;--shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);--glass: rgba(13, 14, 18, .74)}}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{height:100%;margin:0}body{font-family:var(--font);background:var(--bg);color:var(--ink);font-size:16px;line-height:1.35;-webkit-font-smoothing:antialiased;overscroll-behavior:none;-webkit-text-size-adjust:100%}button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;padding:0}input,textarea{font:inherit;color:inherit}:focus-visible{outline:2px solid var(--accent);outline-offset:2px}#app{height:var(--vh, 100dvh);display:flex;overflow:hidden}.center{margin:auto;width:min(100% - 48px,380px);text-align:center;padding:calc(var(--sat) + 24px) 0 calc(var(--sab) + 24px)}.mark{width:68px;height:68px;border-radius:20px;background:var(--accent);display:grid;place-items:center;margin:0 auto 22px;box-shadow:var(--shadow)}.mark svg{width:36px;height:36px}.center h1{font-size:30px;letter-spacing:-.03em;margin:0 0 8px;font-weight:700}.center p{color:var(--muted);margin:0 0 22px}.field{width:100%;height:52px;border-radius:16px;border:1px solid var(--line);background:var(--surface);padding:0 18px;outline:none}.field:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}.btn{height:52px;border-radius:16px;background:var(--accent);color:var(--accent-ink);font-weight:600;width:100%;margin-top:12px;transition:transform .1s,opacity .2s}.btn:active{transform:scale(.98)}.btn[disabled]{opacity:.5}.btn.quiet{background:var(--surface-2);color:var(--ink)}.btn.danger{background:transparent;color:var(--warn)}.error{color:var(--warn);min-height:22px;margin-top:12px;font-size:14px}.qr{background:#fff;border-radius:28px;padding:18px;box-shadow:var(--shadow);width:min(100%,300px);margin:0 auto 22px;aspect-ratio:1;display:grid;place-items:center}.qr img{width:100%;height:100%;display:block;border-radius:8px}.steps{text-align:left;color:var(--muted);font-size:15px;padding-left:22px;margin:0 0 8px}.steps li{margin:6px 0}.spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--surface-2);border-top-color:var(--accent);animation:spin .9s linear infinite}@keyframes spin{to{transform:rotate(1turn)}}.pane{display:flex;flex-direction:column;min-width:0;height:100%;position:relative}.pane.list{width:100%}.pane.chat{position:fixed;inset:0;height:var(--vh, 100dvh);background:var(--bg);transform:translate(100%);transition:transform .28s cubic-bezier(.2,.8,.2,1);z-index:5}.pane.chat.open{transform:none}@media(min-width:860px){.pane.list{width:380px;flex:none;border-right:1px solid var(--line)}.pane.chat{position:relative;inset:auto;transform:none;flex:1;transition:none}.back{display:none!important}}.scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.list-head{padding:calc(var(--sat) + 14px) 20px 10px;position:sticky;top:0;z-index:2;background:var(--glass);backdrop-filter:saturate(1.6) blur(18px);-webkit-backdrop-filter:saturate(1.6) blur(18px)}.list-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.list-top h1{font-size:32px;letter-spacing:-.035em;margin:0;font-weight:750}.status{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--muted)}.dot{width:8px;height:8px;border-radius:50%;background:var(--warn)}.dot.on{background:var(--ok);box-shadow:0 0 0 4px color-mix(in srgb,var(--ok) 18%,transparent)}.icon-btn{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:var(--surface);box-shadow:0 0 0 1px var(--line)}.icon-btn svg{width:20px;height:20px}.head-actions{display:flex;gap:8px;align-items:center}.search{display:flex;align-items:center;gap:10px;height:42px;border-radius:14px;background:var(--surface-2);padding:0 14px;color:var(--muted)}.search svg{width:17px;height:17px;flex:none}.search input{flex:1;border:0;background:none;outline:none;min-width:0;color:var(--ink)}.rows{padding:6px 10px calc(var(--sab) + 96px)}.row{display:flex;gap:13px;align-items:center;width:100%;text-align:left;padding:11px 10px;border-radius:18px;transition:background .15s}.row:active,.row.active{background:var(--surface)}.avatar{width:50px;height:50px;border-radius:50%;flex:none;display:grid;place-items:center;font-weight:650;font-size:17px;color:#fff;letter-spacing:.01em}.avatar.sm{width:38px;height:38px;font-size:14px}.row-main{flex:1;min-width:0}.row-line{display:flex;align-items:baseline;gap:8px}.row-name{font-weight:620;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}.row-time{font-size:13px;color:var(--muted);flex:none}.row.unread .row-time{color:var(--accent);font-weight:600}.row-text{color:var(--muted);font-size:15px;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.row.unread .row-text{color:var(--ink)}.badge{min-width:21px;height:21px;border-radius:11px;background:var(--accent);color:var(--accent-ink);font-size:12px;font-weight:700;display:grid;place-items:center;padding:0 6px;flex:none}.empty{text-align:center;color:var(--muted);padding:60px 30px}.fab{position:absolute;right:20px;bottom:calc(var(--sab) + 22px);width:58px;height:58px;border-radius:22px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;box-shadow:0 10px 28px color-mix(in srgb,var(--accent) 40%,transparent);z-index:3}.fab svg{width:24px;height:24px}.drafts-card{margin:4px 10px 8px;padding:14px 16px;border-radius:20px;background:var(--accent-soft);display:flex;align-items:center;gap:12px;width:calc(100% - 20px);text-align:left}.drafts-card b{display:block;font-weight:650}.drafts-card b+span{font-size:14px;color:var(--muted)}.drafts-card .spark{color:#fff}.spark{width:36px;height:36px;border-radius:12px;background:var(--accent);color:#fff;display:grid;place-items:center;flex:none}.spark svg{width:18px;height:18px}.chat-head{display:flex;align-items:center;gap:10px;padding:calc(var(--sat) + 10px) 14px 10px;background:var(--glass);backdrop-filter:saturate(1.6) blur(18px);-webkit-backdrop-filter:saturate(1.6) blur(18px);border-bottom:1px solid var(--line);z-index:2}.back{width:38px;height:38px;display:grid;place-items:center;color:var(--accent);margin-left:-6px}.back svg{width:24px;height:24px}.chat-title{min-width:0;flex:1}.chat-title b{display:block;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.01em}.chat-title span{font-size:13px;color:var(--muted)}.msgs{padding:14px 12px 10px;display:flex;flex-direction:column;gap:3px}.day{align-self:center;font-size:12px;font-weight:600;color:var(--muted);background:var(--surface-2);padding:4px 11px;border-radius:10px;margin:12px 0 8px}.msg{max-width:min(80%,560px);padding:8px 12px 7px;background:var(--bubble);align-self:flex-start;box-shadow:0 1px 1px #14161e0a;word-break:break-word;overflow-wrap:anywhere;white-space:pre-wrap;border-radius:20px 20px 20px 7px}.msg.me{align-self:flex-end;background:var(--accent);color:var(--accent-ink);border-bottom-left-radius:20px;border-bottom-right-radius:7px}.msg.gap{margin-top:9px}.msg .who{font-size:13px;font-weight:650;color:var(--accent);margin-bottom:2px}.msg .meta{font-size:11px;opacity:.6;float:right;margin:6px 0 -1px 12px;display:inline-flex;align-items:center;gap:3px;white-space:nowrap}.msg .meta svg{width:15px;height:15px}.msg .meta .read{opacity:1;color:#9fe8ff}.msg img.photo{display:block;max-width:100%;width:260px;border-radius:14px;margin:-2px -6px 6px;max-width:calc(100% + 12px);background:var(--surface-2);min-height:120px;object-fit:cover}.chip{display:inline-flex;align-items:center;gap:7px;font-weight:600;font-size:14px;opacity:.92}.chip svg{width:17px;height:17px}.more{align-self:center;color:var(--accent);font-weight:600;font-size:14px;padding:8px 14px}.draft{margin:0 12px 8px;padding:14px 16px;border-radius:20px;background:var(--surface);box-shadow:var(--shadow);border:1px solid var(--accent-soft)}.draft-head{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:650;color:var(--accent);margin-bottom:6px}.draft-head svg{width:15px;height:15px}.draft p{margin:0 0 12px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:30vh;overflow-y:auto}.draft-actions{display:flex;gap:8px}.pill{height:38px;padding:0 16px;border-radius:12px;background:var(--surface-2);font-weight:600;font-size:14px}.pill.primary{background:var(--accent);color:var(--accent-ink)}.pill.ghost{background:none;color:var(--muted);margin-left:auto}.composer{display:flex;align-items:flex-end;gap:9px;padding:8px 12px calc(var(--sab) + 10px);background:var(--glass);backdrop-filter:saturate(1.6) blur(18px);-webkit-backdrop-filter:saturate(1.6) blur(18px)}.composer textarea{flex:1;resize:none;border:1px solid var(--line);background:var(--surface);border-radius:22px;padding:10px 16px;outline:none;max-height:140px;min-height:44px;line-height:1.35}.composer textarea:focus{border-color:var(--accent)}.send{width:44px;height:44px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none;transition:transform .12s,opacity .2s}.send[disabled]{opacity:.35}.send:active{transform:scale(.92)}.send svg{width:20px;height:20px}.placeholder{margin:auto;text-align:center;color:var(--muted);padding:30px}.banner{background:color-mix(in srgb,var(--warn) 14%,var(--bg));color:var(--warn);font-size:14px;font-weight:600;padding:9px 16px;text-align:center}.veil{position:fixed;inset:0;background:#08090c6b;z-index:20;display:flex;align-items:flex-end;justify-content:center;animation:fade .2s}.sheet{background:var(--bg);width:min(100%,520px);border-radius:28px 28px 0 0;padding:10px 20px calc(var(--sab) + 22px);animation:rise .3s cubic-bezier(.2,.8,.2,1);max-height:86vh;overflow-y:auto}@media(min-width:860px){.veil{align-items:center}.sheet{border-radius:28px}}.grab{width:38px;height:5px;border-radius:3px;background:var(--surface-2);margin:0 auto 16px}.sheet h2{font-size:22px;letter-spacing:-.02em;margin:0 0 14px}.card{background:var(--surface);border-radius:18px;padding:14px 16px;margin-bottom:10px}.card small{color:var(--muted);display:block;font-size:13px;margin-bottom:2px}.sheet .draft{margin:0 0 10px;box-shadow:none}@keyframes fade{0%{opacity:0}}@keyframes rise{0%{transform:translateY(40px);opacity:0}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
