:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;color:#18263a;background:#f4f7fb;font-synthesis:none}
*{box-sizing:border-box}
html,body,#app{margin:0;width:100%;min-height:100%;}
body{-webkit-tap-highlight-color:transparent}
button,input,textarea{font:inherit}
button{cursor:pointer;touch-action:manipulation;user-select:none}
button:active,.link:active{transform:scale(.97)}
button:disabled{opacity:.5;cursor:default}
input,textarea{font-size:16px}
.icon{width:22px;height:22px;flex:none;display:inline-block;vertical-align:middle;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.shell{min-height:100dvh;max-width:760px;margin:auto;background:#fff;box-shadow:0 0 40px rgba(14,32,58,.08)}
.top{height:72px;padding:0 18px;display:flex;align-items:center;gap:14px;background:#152945;color:#fff;padding-top:env(safe-area-inset-top);height:calc(72px + env(safe-area-inset-top))}
.top h1,.top h2{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;font-size:23px;letter-spacing:-.02em}
.top h2{font-size:19px}
.top .grow{flex:1;min-width:0}
.top small{display:block;color:#bdd0e8;font-size:13px;margin-top:2px}
.iconbtn{width:42px;height:42px;border:0;border-radius:12px;background:transparent;color:inherit;display:grid;place-items:center;flex:none}
.iconbtn:hover{background:rgba(255,255,255,.1)}
.avatar{width:48px;height:48px;border-radius:50%;background:#d9e6f9;color:#294b7a;display:grid;place-items:center;flex:none;font-size:18px;font-weight:700;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar.small{width:42px;height:42px;font-size:16px}
.people{padding:10px 0 40px}
.person{display:flex;align-items:center;gap:14px;width:100%;padding:14px 18px;text-align:left;background:#fff;border:0;border-bottom:1px solid #eef0f4;color:#18263a}
.person:hover{background:#f8faff}
.person .info{min-width:0;flex:1}
.person strong{font-size:17px;font-weight:650}
.person p{margin:4px 0 0;color:#6b7b91;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
.person .chevron{color:#8999b0}
.empty{padding:50px 25px;text-align:center;color:#697d96;line-height:1.5}
.login-page{min-height:100dvh;display:grid;place-items:center;padding:25px;background:linear-gradient(155deg,#142741,#2f5d9b)}
.login-card{width:min(100%,390px);padding:30px 26px 28px;background:white;border-radius:24px;box-shadow:0 18px 50px rgba(0,0,0,.2)}
.brand{width:60px;height:60px;border-radius:18px;background:linear-gradient(135deg,#3478ef,#875fea);display:grid;place-items:center;color:#fff;margin-bottom:22px}
.login-card h1{margin:0 0 8px;font-size:30px;letter-spacing:-.03em}
.login-card p{margin:0 0 27px;color:#697d96;font-size:16px}
.field{display:block;margin:16px 0;font-size:14px;font-weight:600}
.field input{display:block;margin-top:8px;width:100%;height:50px;padding:0 14px;border:1px solid #c9d2df;border-radius:12px;background:#fff;color:#17243a}
.field input:focus{outline:2px solid #3676ea;outline-offset:1px}
.primary{height:50px;padding:0 18px;border:0;border-radius:12px;background:#3274ec;color:#fff;font-weight:700;font-size:16px}
.primary:hover{background:#2064d9}
.full{width:100%}
.error{color:#b62532;font-size:14px;min-height:20px;margin:8px 0}
.chat{display:flex;flex-direction:column;height:100dvh}
.chat .top{flex:none}
.timeline{flex:1;overflow:auto;padding:20px 14px 12px;background:#f1f4f9;overscroll-behavior:contain}
.bubble-row{display:flex;margin:6px 0}
.bubble-row.mine{justify-content:flex-end}
.bubble{max-width:min(84%,500px);padding:10px 13px 8px;border-radius:17px 17px 17px 5px;background:#fff;box-shadow:0 1px 3px rgba(18,41,69,.07);word-wrap:break-word;overflow-wrap:anywhere;line-height:1.4;white-space:pre-wrap}
.mine .bubble{background:#dceafd;border-radius:17px 17px 5px 17px}
.bubble .meta{display:block;margin-top:4px;text-align:right;font-size:11px;color:#70849f}
.bubble a{color:#225ec5}
.bubble audio,.bubble video{max-width:100%;width:250px;display:block}
.bubble video.video-note{width:190px;height:190px;border-radius:50%;object-fit:cover;background:#162740}
.bubble img{max-width:100%;max-height:300px;border-radius:10px;display:block}
.file-link{display:flex;align-items:center;gap:8px;text-decoration:none;font-weight:600}
.composer{display:flex;align-items:end;gap:6px;padding:10px 10px calc(10px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e4e9f0}
.composer textarea{flex:1;min-width:0;resize:none;max-height:120px;min-height:43px;padding:10px 12px;border:1px solid #dae1ea;border-radius:14px;outline:none;line-height:1.35}
.composer textarea:focus{border-color:#3980ec}
.composer .iconbtn{color:#506985}
.composer .send{background:#3274ec;color:#fff;border-radius:50%;width:44px;height:44px}
.recording-bar{display:flex;align-items:center;gap:12px;padding:10px 15px;background:#fff3f3;color:#ad2636;font-weight:700}
.recording-bar .grow{flex:1}
.recording-bar button{border:0;background:#fff;border-radius:9px;padding:8px 12px}
.dialog-backdrop{position:fixed;inset:0;z-index:20;background:rgba(13,26,43,.56);display:grid;place-items:center;padding:16px}
.dialog{width:min(100%,430px);max-height:calc(100dvh - 32px);overflow:auto;padding:22px;background:#fff;border-radius:20px;box-shadow:0 18px 60px rgba(0,0,0,.23)}
.dialog h2{margin:0 0 15px;font-size:23px}
.dialog .row{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
.dialog .secondary{height:45px;padding:0 16px;border:1px solid #d3dce8;border-radius:11px;background:#fff;color:#213a59;font-weight:700}
.dialog p{line-height:1.45}
.copybox{padding:13px;border:1px solid #cbd6e5;border-radius:10px;background:#f5f8fc;font-family:ui-monospace,SFMono-Regular,monospace;word-break:break-all}
.call-screen{position:fixed;inset:0;z-index:30;background:#101c30;color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:calc(30px + env(safe-area-inset-top)) 18px calc(25px + env(safe-area-inset-bottom))}
.call-screen h2{margin:0;font-size:25px;text-align:center}
.call-screen p{color:#bdcbe0}
.remote-video{width:min(100%,900px);max-height:55dvh;object-fit:contain;background:#1e2e46;border-radius:16px}
.local-video{position:absolute;right:18px;bottom:105px;width:95px;height:135px;object-fit:cover;border:2px solid #fff;border-radius:12px;background:#203853;transform:scaleX(-1)}
.call-actions{display:flex;gap:17px}
.call-actions button{width:58px;height:58px;border:0;border-radius:50%;display:grid;place-items:center;background:#2c425d;color:white}
.call-actions button.hang{background:#e44757}
.call-actions button.accept{background:#27a568}
.call-actions .icon{width:27px;height:27px}
.status{padding:10px 18px;color:#647991;font-size:13px}
@media(min-width:761px){.shell{border-left:1px solid #e7ebf2;border-right:1px solid #e7ebf2}}
