:root{--bg:#f7f7fa;--surface:#fff;--ink:#202130;--muted:#85849a;--accent:#7660cf;--pale:#eeebf8;--border:#e3e2ec;--radius:16px;font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button,input,textarea{outline-offset:4px}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent)}button{transition:background .15s,transform .15s}button:hover{filter:brightness(.96)}button:active{transform:translateY(1px)}[hidden]{display:none!important}svg{width:22px;height:22px;display:inline-block;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}h1,h2,p{margin-top:0}small{font-size:13px}.muted{color:var(--muted);line-height:1.65}.brand{display:flex;align-items:center;gap:15px;font-size:29px;font-weight:700;letter-spacing:-1px}.brand svg{width:49px;height:49px;color:var(--accent);stroke-width:1.5}.icon-button,.circle{display:inline-grid;place-items:center;background:none;border:0;color:#74738b;width:42px;height:42px;flex-shrink:0}.circle{border:1px solid #d8d3e9;border-radius:50%;width:48px;height:48px}.primary{background:var(--accent);color:white;border:0;border-radius:10px;padding:16px 22px;font-weight:600;display:flex;justify-content:center;align-items:center;gap:16px}.wide{width:100%}.auth{display:grid;grid-template-columns:46% 54%;min-height:100dvh}.auth-story{background:#efecf8;padding:54px 10%;display:flex;flex-direction:column;justify-content:space-between}.auth-story h1{font-size:clamp(40px,4vw,64px);font-weight:600;line-height:1.1;letter-spacing:-2.5px;margin:26px 0}.auth-story p{line-height:1.8;color:#77718c;font-size:18px}.auth-story small{color:#8d839d;letter-spacing:2px}.story-icon svg{width:100px;height:100px;color:var(--accent);stroke-width:1.1}.auth-form{display:grid;place-items:center;padding:40px}.auth-form form{width:100%;max-width:430px}.auth-form h2{font-size:30px;letter-spacing:-1px;margin-bottom:10px}.auth-form label{display:block;margin:25px 0 0;font-size:14px;font-weight:600}.auth-form input{width:100%;height:52px;border:1px solid var(--border);border-radius:9px;background:#fff;padding:0 15px;margin-top:10px;color:var(--ink)}input::placeholder,textarea::placeholder{color:#a09bad}.password{position:relative}.password input{padding-right:50px}.password button{position:absolute;right:5px;top:15px}.auth-note{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--muted);font-size:12px;margin-top:30px}.auth-note svg{width:16px}.error{color:#b63855;font-size:13px;line-height:1.4;margin:12px 0;min-height:0}.error:empty{margin:0}.auth-form .primary{margin-top:25px}.mobile-brand{display:none}.setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin-top:25px}fieldset{border:1px solid var(--border);border-radius:10px;padding:14px}legend{font-size:13px;color:var(--accent)}.setup-grid label{margin-top:8px}.setup-grid+small{display:block;margin-top:15px}.app{height:100dvh;display:grid;grid-template-columns:280px minmax(0,1fr)}aside{border-right:1px solid var(--border);padding:48px 18px 25px;display:flex;flex-direction:column}aside .brand{padding-left:8px}.tagline{font-size:13px;color:#77758d;margin:3px 0 42px 72px;white-space:nowrap}aside h3{font-size:11px;letter-spacing:.7px;color:#8b899d;margin:0 8px 18px}.contact{display:flex;gap:15px;align-items:center;padding:14px;border-radius:12px}.selected{background:var(--pale)}.avatar{width:49px;height:49px;border-radius:50%;background:#b0a0e3;color:white;display:inline-flex;align-items:center;justify-content:center;font-weight:600;font-size:21px;flex-shrink:0}.contact strong,.account strong{font-size:14px;display:block}.contact small,.account small{display:block;color:var(--muted);font-size:12px;margin-top:5px}.presence:before{content:'';display:inline-block;width:8px;height:8px;border:1.5px solid #aaa3bd;border-radius:50%;margin-right:6px}.presence.online:before{background:#69b873;border-color:#69b873}.account{margin-top:auto;display:flex;align-items:center;gap:12px;padding:0 6px}.account .avatar{width:40px;height:40px;font-size:17px}.account button{margin-left:auto;border-left:1px solid var(--border);padding-left:14px;width:48px}.dot{width:8px;height:8px;border-radius:50%;background:#69b873;display:inline-block;margin-right:4px}main{display:flex;flex-direction:column;min-height:0;min-width:0}header{display:flex;align-items:center;gap:17px;background:white;padding:24px 28px;border-bottom:1px solid var(--border);flex-shrink:0}header h2{font-size:22px;margin:0 0 4px;letter-spacing:-.5px}header small{color:#807b96}header small svg{width:15px;height:15px;margin-right:4px}.header-actions{margin-left:auto;display:flex;gap:12px}.messages{flex:1;overflow:auto;position:relative;padding:24px 32px;scroll-behavior:smooth}.empty{height:100%;min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding-bottom:30px}.empty>span svg{width:145px;height:145px;stroke-width:1.1;color:var(--accent)}.empty h1{font-size:28px;letter-spacing:-.8px;margin:19px 0 14px}.empty p{font-size:16px;color:#817b94;line-height:1.7}.compose-area{padding:16px 26px 25px;position:relative}#composer{display:flex;align-items:center;gap:9px;background:white;border:1px solid var(--border);border-radius:15px;padding:10px 12px;box-shadow:0 2px 8px #28213f02}#composer>.icon-button+button{border-left:1px solid var(--border);border-right:1px solid var(--border);border-radius:0;width:48px}textarea{border:0;resize:none;background:none;flex:1;min-width:0;padding:10px;line-height:24px;max-height:140px;color:var(--ink)}.send{width:44px;height:44px;border:0;border-radius:50%;background:var(--accent);color:white;flex-shrink:0}.message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 18px;gap:6px}.message.mine{align-items:flex-end}.bubble{max-width:min(75%,560px);background:white;border:1px solid var(--border);border-radius:16px 16px 16px 4px;padding:12px 16px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:14px}.mine .bubble{background:var(--accent);border-color:var(--accent);color:white;border-radius:16px 16px 4px 16px}.message small{color:#9590a6;font-size:11px}.bubble img{max-width:100%;max-height:320px;display:block;object-fit:contain;border-radius:8px;cursor:zoom-in}.bubble p{margin:8px 0 0}.bubble p:empty{display:none}.text-button{display:block;margin:0 auto 24px;color:var(--accent);border:0;background:none;font-size:12px}#connection{background:#fff1d8;padding:8px 20px;text-align:center;font-size:12px;color:#805e22}#attachment{display:flex;align-items:center;gap:12px;background:white;padding:10px;border:1px solid var(--border);border-radius:12px;margin-bottom:10px}#attachment img{width:48px;height:48px;object-fit:cover;border-radius:6px}#attachment span{font-size:12px;overflow:hidden;text-overflow:ellipsis}#attachment button{margin-left:auto}#emojiPicker{position:absolute;bottom:100%;left:28px;display:grid;grid-template-columns:repeat(6,40px);padding:10px;background:white;border:1px solid var(--border);border-radius:12px;box-shadow:0 8px 30px #26203f12}#emojiPicker button{border:0;background:none;font-size:23px;padding:8px}dialog{border:1px solid var(--border);border-radius:20px;padding:30px;color:var(--ink);box-shadow:0 20px 100px #211b4133;max-width:calc(100% - 24px)}dialog::backdrop{background:#1b173b80;backdrop-filter:blur(5px)}#callDialog{width:620px;text-align:center;background:#f9f8fc}.call-top{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--accent);font-size:13px;margin-bottom:18px}#callDialog h2{margin-bottom:8px}#callStatus{color:var(--muted);font-size:14px}.video-stage{height:290px;border-radius:14px;position:relative;overflow:hidden;background:#eae6f5;display:grid;place-items:center;margin:25px 0}.video-stage .avatar{width:90px;height:90px;font-size:34px}#remoteVideo{width:100%;height:100%;object-fit:cover;position:absolute}#localVideo{position:absolute;bottom:12px;right:12px;width:120px;max-height:100px;object-fit:cover;z-index:1;border-radius:10px;transform:scaleX(-1)}.call-controls{display:flex;justify-content:center;gap:12px}.danger{background:#cc526d;border:0;color:white;border-radius:30px;padding:12px 20px}.danger svg{width:18px;margin-right:5px}.call-help{font-size:11px;color:var(--muted);margin:20px 0 0}.circle[aria-pressed=true]{background:#f8dce2;color:#b63855}#imageDialog{padding:12px;background:#fff}#imageDialog img{display:block;max-width:80vw;max-height:80dvh;object-fit:contain}#closeImage{position:absolute;right:20px;top:20px;background:white}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#2e2744;color:white;border-radius:10px;padding:14px 22px;z-index:5;max-width:90%;font-size:14px}.mobile-only{display:none}@media(max-width:760px){.app{grid-template-columns:1fr}aside{display:none}header{padding:16px;gap:12px}header .avatar{width:40px;height:40px;font-size:18px}header h2{font-size:18px}header small{font-size:11px}.header-actions{gap:6px}.circle{width:38px;height:38px}.mobile-only{display:inline-grid;width:32px}.messages{padding:20px 16px}.empty>span svg{width:110px;height:110px}.empty h1{font-size:23px}.empty p{font-size:14px;max-width:270px}.compose-area{padding:10px 12px 14px}#composer{gap:0;padding:6px}#composer .icon-button{width:34px}#composer>.icon-button+button{width:38px}textarea{font-size:16px;padding:8px}.send{width:38px;height:38px}.bubble{max-width:86%}.auth{grid-template-columns:1fr}.auth-story{display:none}.auth-form{padding:30px 24px}.mobile-brand{display:block;color:var(--accent);font-size:26px;font-weight:700;margin-bottom:60px}.auth-form h2{font-size:28px}.video-stage{height:230px}#callDialog{padding:22px 18px}.setup-grid{gap:10px}fieldset{padding:10px}.account{display:none}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(min-width:1200px){.app{grid-template-columns:350px minmax(0,1fr)}aside{padding:62px 14px 32px}.brand{font-size:32px;gap:18px}.brand svg{width:64px;height:64px}.tagline{font-size:16px;margin:2px 0 42px 98px}aside h3{font-size:14px;margin:0 16px 18px}.contact{padding:12px 18px;gap:18px}.avatar{width:62px;height:62px;font-size:25px}.contact strong,.account strong{font-size:17px}.contact small,.account small{font-size:15px}header{padding:23px 28px;gap:23px}header h2{font-size:28px}header small{font-size:16px}.header-actions .circle{width:60px;height:60px}.header-actions svg{width:28px;height:28px}.empty>span svg{width:175px;height:175px}.empty h1{font-size:34px}.empty p{font-size:20px}.compose-area{padding:16px 28px 30px}#composer{padding:11px 12px;gap:14px}#composer textarea{font-size:20px;line-height:30px}.send{width:56px;height:56px}.send svg{width:28px;height:28px}.account{padding:0 16px;gap:18px}.account .avatar{width:50px;height:50px;font-size:22px}.empty{padding-bottom:5px}}
