:root{color-scheme:light;--ink:#232038;--muted:#5d586f;--line:#e9e5f2;--white:#fff;--canvas:#faf9ff;--side:#f2eefc;--purple:#5b3ec8;--purple-dark:#4529a9;--soft:#e5dcfc;--danger:#9c344a;--green:#207764;--shadow:0 18px 70px #3023591f;font:16px/1.52 system-ui,"Malgun Gothic","Apple SD Gothic Neo",sans-serif}
*{box-sizing:border-box}
body{margin:0;color:var(--ink);background:var(--canvas);min-width:300px}
[hidden]{display:none!important}
button,input,textarea{font:inherit}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.55}
button:focus-visible,input:focus-visible,textarea:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
button,textarea,input{color:inherit}
a{color:var(--purple-dark)}
h1,h2,h3,p{margin:0}
svg{width:19px;height:19px;display:block;flex:none;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
.icon-button,.plain,.primary,.secondary,.studio-button{border:0;display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:10px;background:transparent;vertical-align:middle}
.icon-button{width:38px;height:38px;padding:0;color:var(--muted);flex:none}
.icon-button:hover,.plain:hover,.studio-button:hover{background:#e9e2f9;color:var(--purple-dark)}
.icon-button.mini{width:31px;height:31px}
.icon-button.mini svg{width:17px;height:17px}
.primary{background:var(--purple);color:white;font-weight:700;padding:10px 16px;min-height:44px}
.primary:hover{background:var(--purple-dark)}
.primary.danger-submit{background:var(--danger)}
.primary.danger-submit:hover{background:#78243a}
.plain{padding:8px 12px;color:var(--purple-dark);font-size:.9rem;font-weight:650}
.secondary{padding:7px 10px;background:#f3efff;color:var(--purple-dark);font-size:.875rem;font-weight:650;min-height:38px}
.muted{color:var(--muted);font-size:.875rem;overflow-wrap:anywhere}
.error{color:var(--danger);font-size:.875rem;overflow-wrap:anywhere}
.auth{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:28px;background:radial-gradient(ellipse at 12% 15%,#e0d5fb 0,transparent 52%),radial-gradient(ellipse at 90% 94%,#e9dcff 0,transparent 50%),#f8f6ff}
.auth-card{width:min(100%,440px);padding:38px 42px;border:1px solid #fff;background:#ffffffed;box-shadow:var(--shadow);border-radius:28px}
.brand-icon{border-radius:16px;display:block;margin-bottom:21px}
.auth-card h1{font-size:2.55rem;letter-spacing:-.09em;line-height:1.15}
.auth-intro{color:var(--muted);margin:10px 0 26px;word-break:keep-all}
.form{display:grid;gap:13px}
.form label{display:grid;gap:6px;font-weight:650;font-size:.9rem}
.form input:not([type=file]),.dialog-input{width:100%;min-width:0;padding:10px 12px;border:1px solid #dcd5e9;border-radius:10px;background:white;font-size:1rem}
.form select{appearance:none;width:100%;min-width:0;padding:10px 36px 10px 12px;border:1px solid #dcd5e9;border-radius:10px;background:white;color:var(--ink);font:inherit;background-image:linear-gradient(45deg,transparent 50%,#6b627d 50%),linear-gradient(135deg,#6b627d 50%,transparent 50%);background-position:calc(100% - 17px) 50%,calc(100% - 12px) 50%;background-size:5px 5px;background-repeat:no-repeat}
.form select:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
.form input[type=file]{font-size:.9rem;width:100%}
.form input[type=file]::file-selector-button{border:0;border-radius:8px;padding:7px 11px;background:#f3efff;color:var(--purple-dark);margin-right:8px;cursor:pointer}
.auth-install{margin-top:16px;padding-left:0}
.workspace{height:100vh;height:100dvh;display:grid;grid-template-columns:246px minmax(0,1fr) 315px;overflow:hidden}
.workspace.studio-closed{grid-template-columns:246px minmax(0,1fr)}
.workspace.studio-closed .studio{display:none}
.sidebar,.studio,.chat{min-width:0;min-height:0;display:flex;flex-direction:column}
.sidebar{background:var(--side);border-right:1px solid #e3dbf3}
.brand{height:70px;display:flex;gap:11px;align-items:center;padding:0 17px;border-bottom:1px solid #e4dcf3;flex:none}
.brand strong{font-size:1.45rem;letter-spacing:-.08em}
.brand img{border-radius:11px}
.brand-install{margin-left:auto}
.navigation{padding:13px 12px 22px;overflow:auto;flex:1;scrollbar-color:#cfc1ec transparent}
.navigation section+section{margin-top:24px}
.section-heading{display:flex;align-items:center;justify-content:space-between;min-height:32px;padding:0 4px 0 9px;margin-bottom:4px}
.section-heading h2{font-size:.875rem;font-weight:730;color:var(--muted)}
.section-heading small{font-size:.78rem;font-weight:650;margin-left:3px}
.section-actions{display:flex;align-items:center;flex:none}
.channel-list{display:grid;gap:3px}
.channel-button{display:flex;align-items:center;width:100%;gap:10px;min-height:41px;border:0;border-radius:10px;padding:7px 10px;background:none;text-align:left;color:#4e4767;font-size:.94rem}
.channel-button:hover{background:#ebe3fa}
.channel-button[aria-current=true]{background:var(--soft);color:#422597;font-weight:750}
.channel-button svg{width:17px;height:17px}
.channel-button .room-count{margin-left:auto;font-size:.78rem}
.channel-button span:first-of-type,.voice-controls strong,.account-name strong,.member-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.room-members{display:grid;gap:2px;margin:1px 0 5px 26px;font-size:.85rem;color:var(--muted)}
.room-person{min-height:25px;display:flex;align-items:center;gap:6px}
.room-person svg{width:14px;height:14px}
.contact-lists{display:grid;gap:8px}
.contact-group{min-width:0;border:1px solid transparent;border-radius:10px;transition:background-color .15s,border-color .15s}
.contact-group-head{min-height:30px;display:flex;align-items:center;gap:5px;justify-content:space-between;padding:0 5px 0 9px;color:var(--muted)}
.contact-group-head h3{min-width:0;font-size:.875rem;line-height:1.3;overflow-wrap:anywhere}
.contact-drop-new{width:100%;margin:4px 0 6px;padding:8px 6px;color:var(--purple-dark);background:#f8f4ff;border:1px dashed #ac95d7;border-radius:10px;font-size:.82rem}
.dragging-contact .contact-group{min-height:42px;border-style:dashed;border-color:#c9b6eb}
.contact-drop-new.contact-drop-active,.dragging-contact .contact-group.contact-drop-active{background:#e6dafc;border-color:var(--purple)}
.member-list{display:grid;gap:3px;padding:0 4px;min-width:0}
.contact-row{display:flex;align-items:center;gap:1px;min-width:0}
.member{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:.88rem;min-width:0;flex:1;padding:3px 4px}
.member-contact{border:0;border-radius:8px;background:transparent;text-align:left;cursor:grab}
.member-contact:hover{background:#e9e2f9;color:var(--purple-dark)}
.member-contact[aria-current=true]{background:var(--soft);color:var(--purple-dark)}
.contact-name{display:grid;line-height:1.26;min-width:0;flex:1}
.contact-id{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.75rem;color:var(--muted)}
.contact-action{width:28px;height:31px}
.contact-action svg{width:15px;height:15px}
.contact-row .unread{margin-left:0}
@media(pointer:coarse){.contact-action{width:41px;height:41px}.contact-row .member{min-height:41px}.member-contact{cursor:pointer}}
.room-count{display:flex;align-items:center;gap:3px}.channel-button .room-count svg{width:13px;height:13px}
.main-room{font-size:.72rem;font-weight:700;white-space:nowrap;color:var(--purple-dark);background:#f2edff;border-radius:6px;padding:1px 5px}
.unread{width:7px;height:7px;flex:none;border-radius:50%;background:var(--purple);margin-left:auto}.room-count+.unread{margin-left:2px}
.contact-row.offline .avatar{opacity:.55}
.avatar{display:grid;place-items:center;width:37px;height:37px;border-radius:12px;background:#ede3fd;color:#4d3396;font-weight:750;font-size:.92rem;flex:none}
.avatar[data-color="1"]{background:#dff2ed;color:#186454}.avatar[data-color="2"]{background:#f8e8db;color:#8c4927}.avatar[data-color="3"]{background:#e1eafa;color:#315491}.avatar[data-color="4"]{background:#f6e2f0;color:#893962}
.avatar.small{width:35px;height:35px;border-radius:10px}
.avatar.tiny{width:24px;height:24px;border-radius:8px;font-size:.72rem}
.member i,.connection i{width:8px;height:8px;border-radius:50%;background:#a8a2b3;flex:none}
.contact-row:not(.offline) .member i,.connection.live i{background:#2b947c}
.account{display:flex;align-items:center;gap:8px;min-height:68px;border-top:1px solid #e2daf2;padding:9px 12px max(9px,env(safe-area-inset-bottom));background:#ece6fa}
.account-name{flex:1;min-width:0;display:grid;line-height:1.3}
.account-name strong{font-size:.91rem}.account-name span{color:var(--muted);font-size:.78rem}
.voice-controls{display:flex;align-items:center;gap:3px;background:#e6f4ef;margin:6px 9px 8px;padding:6px 4px 6px 9px;border-radius:12px;color:#1b6858}
.voice-controls div{display:grid;flex:1;min-width:0;line-height:1.3}.voice-controls strong{font-size:.9rem}.voice-controls span{font-size:.72rem}
.voice-controls .icon-button{width:34px;height:36px}.danger{color:var(--danger)}
.chat{background:var(--white);position:relative}
.topbar{height:70px;display:flex;align-items:center;gap:14px;padding:0 22px;border-bottom:1px solid var(--line);flex:none;background:var(--white)}
.heading{display:flex;align-items:center;gap:9px;min-width:0;flex:1}.heading h1{font-size:1.13rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.heading-icon{color:var(--purple)}
.connection{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:.8125rem;color:var(--muted)}
.studio-button{padding:8px 10px;white-space:nowrap;background:#f4f0ff;color:var(--purple-dark);font-size:.85rem;font-weight:700;min-height:38px}
.studio-button.joined{background:#e6f4ef;color:var(--green)}
.only-mobile,.mobile-voice{display:none}
.chat-scroll{overflow:auto;flex:1;min-height:0;scrollbar-color:#dcd4ee transparent;background:linear-gradient(175deg,#fdfcff,#fff 55%)}
.timeline{min-height:100%;max-width:900px;padding:24px 22px 14px;margin:0 auto;display:flex;flex-direction:column}
.older{align-self:center;margin-bottom:17px;background:#f3effd}
.empty{margin:auto;max-width:350px;text-align:center;padding:28px 10px;color:var(--muted)}
.empty-icon{display:grid;place-items:center;background:#f0e8ff;color:var(--purple);border-radius:21px;width:62px;height:62px;margin:0 auto 12px}.empty-icon svg{width:29px;height:29px}
.empty h2{color:var(--ink);font-size:1.25rem;margin-bottom:5px}.empty p{font-size:.92rem;word-break:keep-all}
.messages{display:grid;gap:18px}.message-row{display:flex;align-items:flex-start;gap:11px;min-width:0}.message-content{min-width:0;flex:1}
.message-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:1px 9px;line-height:1.4;margin-bottom:3px}.message-heading strong{font-size:.94rem;overflow-wrap:anywhere}.message-heading time{font-size:.75rem;color:var(--muted)}
.body-text{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.95rem}
.attachments{display:grid;gap:8px;margin-top:6px;max-width:430px}.attachment{border:1px solid var(--line);border-radius:13px;overflow:hidden;background:#fcfaff}.attachment img,.attachment video{display:block;max-width:100%;max-height:300px;background:#f0eaf9;object-fit:contain;margin:auto}.attachment audio{width:calc(100% - 18px);margin:8px 9px 1px}.attachment picture{display:block}
.attachment-meta{display:flex;align-items:center;gap:8px;padding:8px 9px;color:var(--muted);min-height:47px}.attachment-meta svg{width:17px;height:17px}
.attachment-meta div{min-width:0;flex:1;display:grid;line-height:1.4}.attachment-meta strong{font-weight:680;font-size:.87rem;color:var(--ink);overflow-wrap:anywhere}.attachment-meta small{font-size:.76rem}.attachment-meta .icon-button{width:32px;height:32px}
.composer-wrap{padding:9px clamp(9px,3vw,23px) max(16px,env(safe-area-inset-bottom));background:white;flex:none}
.archived-chat-note{padding:10px 18px 0;color:var(--muted);font-size:.875rem;text-align:center}
@media(max-width:440px){.direct-chat .connection span{display:none}}
.composer{max-width:858px;margin:0 auto;background:#f8f6fd;border:1px solid #e4dcf1;border-radius:15px;overflow:hidden}.composer:focus-within{border-color:#a892ed}.compose-row{display:flex;align-items:flex-end;gap:6px;padding:6px 7px 6px 5px}
.attach{height:39px}.compose-row textarea{background:transparent;border:0;resize:none;min-width:0;flex:1;min-height:39px;max-height:125px;padding:8px 1px;line-height:23px}.compose-row textarea:focus{outline:0}.compose-row textarea::placeholder{color:#6b627d}.send{width:40px;min-height:39px;padding:0}.send svg{margin-left:-1px}
.file-queue{list-style:none;display:flex;gap:6px;flex-wrap:wrap;margin:0;padding:7px 8px 0}.file-queue li{display:flex;align-items:center;gap:1px;min-width:0;max-width:100%;padding-left:7px;border-radius:8px;background:#ebe2fa;font-size:.82rem}.file-queue span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.file-queue button{width:29px;height:29px}.file-queue svg{width:14px;height:14px}
progress{height:5px;width:100%;display:block;accent-color:var(--purple)}
.drop-overlay{display:grid;place-content:center;justify-items:center;gap:16px;position:absolute;inset:75px 8px 8px;border:2px dashed #8764d9;border-radius:20px;background:#f3eafceb;color:var(--purple-dark);font-weight:750;pointer-events:none;z-index:3}.drop-overlay svg{width:42px;height:42px}
.studio{border-left:1px solid var(--line);background:#faf8ff}.studio-header{height:70px;display:flex;align-items:center;justify-content:space-between;padding:0 12px 0 16px;border-bottom:1px solid var(--line);flex:none}.studio-title{display:flex;align-items:center;gap:8px}.studio-title span{color:var(--purple)}.studio-title h2{font-size:1rem}
.studio-scroll{overflow:auto;scrollbar-color:#d6caef transparent;padding:13px;display:flex;flex-direction:column;gap:10px}.effects{display:grid;gap:10px}
.panel{background:white;border:1px solid #e9e2f4;border-radius:13px;padding:11px 12px;min-width:0}.panel-heading{display:flex;gap:8px;align-items:center;justify-content:space-between;min-height:26px}.panel-heading h3{font-size:.93rem;font-weight:740}.meter{width:100%}.meter-panel meter{display:block;width:100%;height:15px;margin:7px 0;appearance:none}.meter-panel meter::-webkit-meter-bar{background:#eee9f7;border:0;border-radius:10px}.meter-panel meter::-webkit-meter-optimum-value{background:linear-gradient(90deg,#47a68b,#7b66d6);border-radius:10px}.meter-label{font-size:.75rem;color:var(--muted);font-variant-numeric:tabular-nums}.meter-footer{display:flex;margin-top:8px}.meter-footer svg{width:16px;height:16px}.meter-panel p{margin-top:7px}
.toggle{appearance:none;width:35px;height:20px;border-radius:20px;background:#b2a9c5;margin:0;position:relative;cursor:pointer;flex:none}.toggle::after{content:"";display:block;width:14px;height:14px;border-radius:50%;background:white;position:absolute;top:3px;left:3px;transition:transform .15s}.toggle:checked{background:var(--purple)}.toggle:checked::after{transform:translateX(15px)}
.settings-lines{display:grid;gap:6px;margin-top:7px}.setting-slider{display:grid;grid-template-columns:1fr auto;gap:2px 5px;align-items:center;font-size:.82rem;color:var(--muted)}.setting-slider output{font-variant-numeric:tabular-nums}.setting-slider input{grid-column:1/-1;width:100%;height:16px;margin:0;accent-color:var(--purple)}
.plug-panel p{margin-top:4px}.plugin-list{display:grid;gap:5px;margin-top:4px}.plugin-row{display:flex;align-items:center;gap:8px}.plugin-row span{flex:1;font-size:.84rem;overflow-wrap:anywhere}.plugin-row .icon-button{width:27px;height:29px}
.shade{position:fixed;inset:0;border:0;z-index:4;background:#24203370}
.notice{position:fixed;z-index:20;bottom:max(24px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);padding:11px 15px;width:max-content;max-width:calc(100vw - 22px);border-radius:12px;background:#292043;color:white;font-size:.9rem;text-align:center;box-shadow:var(--shadow)}
.update{padding:6px 20px;background:#eee6ff;color:#422597;display:flex;justify-content:space-between;align-items:center;gap:4px;font-size:.9rem}
dialog{padding:18px 20px 20px;border:1px solid #e2d9f0;border-radius:17px;background:white;color:var(--ink);width:min(93vw,470px);box-shadow:var(--shadow);max-height:calc(100dvh - 24px);overflow:auto}dialog::backdrop{background:#21193777}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:13px}.dialog-head h2{font-size:1.15rem;overflow-wrap:anywhere}.dialog-head .icon-button{margin-right:-5px}.dialog-stack{display:grid;gap:12px}.dialog-stack ul{margin:0;padding-left:19px}.dialog-stack li+li{margin-top:5px}.text-preview{white-space:pre-wrap;overflow:auto;overflow-wrap:anywhere;font: .89rem/1.6 ui-monospace,Consolas,monospace;max-height:55dvh;background:#f8f6fd;padding:10px;border-radius:10px}
@media(max-width:1050px){.workspace{grid-template-columns:205px minmax(0,1fr) 280px}.workspace.studio-closed{grid-template-columns:205px minmax(0,1fr)}.topbar{padding:0 13px;gap:9px}.timeline{padding-left:14px;padding-right:14px}}
@media(max-width:840px){.workspace,.workspace.studio-closed{grid-template-columns:205px minmax(0,1fr)}.workspace:not(.show-studio) .studio{display:none}.workspace.show-studio .studio{display:flex}.studio{position:fixed;top:0;right:0;bottom:0;width:min(91vw,320px);z-index:5}.studio-header{padding-top:env(safe-area-inset-top)}}
@media(max-width:620px){.workspace,.workspace.studio-closed{grid-template-columns:minmax(0,1fr)}.sidebar{position:fixed;top:0;bottom:0;left:0;width:min(86vw,280px);z-index:5;display:none}.workspace.show-nav .sidebar{display:flex}.only-mobile,.mobile-voice{display:inline-flex}.brand{padding-top:env(safe-area-inset-top)}.topbar{height:58px;padding:0 9px;gap:4px}.topbar .heading{gap:5px}.heading h1{font-size:1rem}.studio-button{width:38px;padding:0}.studio-button span{display:none}.connection{padding:0 4px;font-size:.75rem}.timeline{padding-top:16px}.composer-wrap{padding-bottom:max(9px,env(safe-area-inset-bottom))}.auth-card{padding:26px 22px}.auth{padding:17px}.chat-scroll{scrollbar-width:thin}.compose-row textarea{font-size:1rem}.account{min-height:60px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
