#linked-chat .chat-view{position:relative;padding:18px;gap:12px;height:640px;min-height:0;overflow:hidden}
#linked-chat .chat-heading{flex:0 0 auto}#linked-chat .chat-timeline{display:flex;flex-direction:column;gap:14px;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:10px 3px;overflow-anchor:none}
#linked-chat .chat-message{max-width:82%;align-self:flex-start;min-width:150px;overflow-wrap:anywhere;background:var(--panel);border:1px solid var(--border);border-radius:16px;padding:12px 14px}
#linked-chat .chat-message.mine{align-self:flex-end;background:var(--self)}#linked-chat .chat-message.highlight{outline:2px solid var(--accent)}
#linked-chat .chat-message p{white-space:pre-wrap;line-height:1.5}#linked-chat .chat-message a{color:var(--accent);overflow-wrap:anywhere}
#linked-chat .chat-message .chat-author{font-size:11px;color:var(--muted);margin-bottom:6px}#linked-chat .chat-meta{display:flex;gap:8px;justify-content:flex-end;align-items:center;font-size:11px;color:var(--muted);margin-top:8px}
#linked-chat .chat-receipt[data-status=read]{color:var(--receipt-read)}#linked-chat .chat-message-tools{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
#linked-chat .chat-message-tools button{border:0;background:transparent;padding:4px 0;color:var(--muted);font-size:11px;min-height:24px}#linked-chat .chat-message-tools button[aria-pressed=true]{color:#ff99bb}
#linked-chat .chat-input-area{position:relative;flex:0 0 auto}#linked-chat .chat-input-area .composer{padding:0;margin:0;align-items:center;gap:8px}#linked-chat .chat-input-area input{min-width:0;flex:1}#linked-chat #chat-status{padding-top:7px;font-size:11px}
#linked-chat .chat-popover{position:absolute;z-index:20;border:1px solid var(--border);border-radius:14px;background:#112f2b;box-shadow:0 16px 50px #0005;padding:8px;max-width:calc(100% - 30px)}
#linked-chat .chat-popover button{display:flex;gap:10px;align-items:center;background:transparent;border:0;border-radius:8px;text-align:left;width:100%;padding:11px 12px;font-size:13px}#linked-chat .chat-popover button:hover{background:var(--panel)}
#linked-chat .chat-more-menu{right:18px;top:66px;width:285px;max-height:490px;overflow:auto}#linked-chat .chat-plus-menu{bottom:calc(100% + 9px);left:0;width:230px}
#linked-chat .chat-reply{border-left:3px solid var(--accent);background:var(--panel);padding:8px 12px;border-radius:8px;font-size:12px;flex:0 0 auto}#linked-chat .chat-quote{display:block;text-align:left;width:100%;border:0;border-left:3px solid var(--accent);background:#071e2433;padding:8px;margin-bottom:8px;border-radius:6px;color:var(--muted);font-size:12px}
#linked-chat .chat-media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px}#linked-chat .chat-media-grid.single{grid-template-columns:1fr}
#linked-chat .chat-media-tile{position:relative;min-width:0;border:1px solid #58877d;border-radius:10px;overflow:hidden;padding:0;background:#0b252b;color:var(--text)}#linked-chat .chat-media-tile img{width:100%;height:140px;object-fit:cover;display:block}#linked-chat .chat-media-tile .chat-media-label{display:block;padding:9px;font-size:12px;overflow-wrap:anywhere}
#linked-chat .chat-sample-art{height:130px;display:grid;place-items:center;background:linear-gradient(140deg,#32605b,#102e3c);font-size:30px;color:#acf1dd}#linked-chat .chat-file-card{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--border);border-radius:10px;margin:8px 0;overflow-wrap:anywhere}
#linked-chat .chat-wave{height:38px;display:flex;align-items:center;gap:3px;min-width:70px;overflow:hidden}#linked-chat .chat-wave span{display:block;flex:1;min-width:2px;max-width:4px;border-radius:4px;background:var(--accent)}#linked-chat .chat-recording{display:flex;align-items:center;gap:10px}#linked-chat .chat-voice{display:flex;align-items:center;gap:12px;min-width:180px}#linked-chat .chat-voice audio{width:100%;max-width:300px;height:36px}
#linked-chat .chat-dialog{position:absolute;inset:12px 0 auto;margin:auto;width:calc(100% - 28px);max-width:680px;max-height:calc(100% - 24px);overflow-y:auto;border:1px solid var(--border);border-radius:18px;padding:20px;background:#102d28;color:var(--text);z-index:30;box-shadow:0 20px 80px #0008}
#linked-chat .chat-dialog::backdrop{background:#020d18aa}#linked-chat #chat-dialog-body{display:flex;flex-direction:column;gap:14px;margin-top:18px;min-width:0}
#linked-chat .chat-dialog img.chat-full-image{width:100%;max-height:370px;object-fit:contain;border-radius:12px;background:#071a20}#linked-chat .chat-dialog video{width:100%;max-height:370px;background:#071a20;border-radius:12px}#linked-chat .chat-dialog audio{width:100%}
#linked-chat .chat-dialog input[type=text],#linked-chat .chat-dialog textarea{width:100%;min-width:0;background:var(--bg);color:var(--text);padding:10px;border:1px solid var(--border);border-radius:9px;font:inherit}
#linked-chat .chat-toggle{display:flex;gap:12px;align-items:flex-start;padding:13px;border:1px solid var(--border);border-radius:12px}#linked-chat .chat-toggle .small{display:block;margin-top:4px;color:var(--muted)}
#linked-chat .chat-library-tabs{display:flex;gap:6px;flex-wrap:wrap}#linked-chat .chat-emoji-picker{display:flex;gap:12px;flex-wrap:wrap}#linked-chat .chat-emoji-picker button{font-size:24px}
@media(max-width:600px){#linked-chat .chat-view{padding:10px;height:640px}#linked-chat .chat-message{max-width:94%}#linked-chat .chat-heading{gap:10px}#linked-chat .chat-call-actions{gap:5px;flex-wrap:wrap}#linked-chat .chat-dialog{padding:14px}#linked-chat .chat-input-area .action{padding:8px;min-width:36px}#linked-chat .chat-more-menu{right:10px;top:90px}}

#linked-chat .chat-jump{position:absolute;right:26px;bottom:118px;border:1px solid var(--border);border-radius:25px;padding:10px 14px;background:var(--surface);color:var(--accent);box-shadow:0 4px 20px #0005;z-index:4}
#linked-chat .chat-view{flex:none;height:640px;max-height:640px;contain:size}
#linked-chat .chat-profile-button{display:flex;align-items:center;gap:11px;background:transparent;border:0;text-align:left;padding:0;color:inherit}
#linked-chat .chat-profile-button .avatar{width:42px;height:50px;object-fit:cover}
#linked-chat i[data-lucide]:empty{display:inline-block;width:18px;height:18px;line-height:18px;text-align:center;font-style:normal}
#linked-chat i[data-lucide=mic]:empty::before{content:'🎙'}#linked-chat i[data-lucide=send]:empty::before{content:'➤'}#linked-chat i[data-lucide=phone]:empty::before{content:'☎'}#linked-chat i[data-lucide=video]:empty::before{content:'▣'}#linked-chat i[data-lucide=image]:empty::before{content:'▧'}#linked-chat i[data-lucide=film]:empty::before{content:'▶'}#linked-chat i[data-lucide=file-text]:empty::before{content:'▤'}#linked-chat i[data-lucide=smile]:empty::before{content:'☺'}#linked-chat i[data-lucide=map-pin]:empty::before{content:'⌖'}#linked-chat i[data-lucide=languages]:empty::before{content:'文'}

#linked-chat .workspace{position:relative}
#linked-chat .sidebar{width:360px;flex:0 0 360px;min-width:0;padding:16px 12px;max-height:740px;overflow-y:auto;overscroll-behavior:contain}
#linked-chat .contact-list{display:flex;flex-direction:column;gap:10px;min-width:0}
#linked-chat .contact{flex:0 0 auto;display:flex;gap:8px;align-items:flex-start;padding:12px;border:1px solid var(--border);border-radius:14px;margin:0;width:100%;min-width:0;background:var(--surface)}
#linked-chat .contact.active{background:var(--panel);border-color:var(--accent)}
#linked-chat .contact.unread{background:#173c46;border-color:#397e77}
#linked-chat .contact-avatar{display:flex;align-items:center;justify-content:center;flex:0 0 46px;width:46px;height:60px;overflow:hidden;border-radius:12px;border:1px solid var(--border);background:var(--bg);color:var(--ink);padding:0}
#linked-chat .contact-avatar img{width:100%;height:100%;object-fit:cover}
#linked-chat .contact-open{display:flex;align-items:flex-start;gap:10px;min-width:0;flex:1;background:transparent;border:0;padding:0;text-align:start;color:inherit}
#linked-chat .contact-copy{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}
#linked-chat .contact-heading,#linked-chat .contact-location,#linked-chat .contact-preview{display:flex;align-items:center;gap:5px;min-width:0}
#linked-chat .contact .name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:600}
#linked-chat .contact-nickname{max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--accent);font-size:11px}
#linked-chat .contact-location{font-size:11px;color:var(--muted)}
#linked-chat .contact-place{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#linked-chat .contact-language{display:flex;align-items:center;gap:3px;flex-shrink:0;border:1px solid var(--border);border-radius:999px;background:var(--bg);padding:2px 5px;font-size:10px;font-weight:600}
#linked-chat .contact svg,#linked-chat .contact i{width:12px;height:12px;flex:0 0 12px}
#linked-chat .contact-snippet{min-width:0;flex:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px;color:var(--muted)}
#linked-chat .contact.unread .contact-snippet{color:var(--ink);font-weight:600}
#linked-chat .contact-time{font-size:10px;white-space:nowrap;color:var(--muted);font-variant-numeric:tabular-nums}
#linked-chat .contact-receipt{color:var(--muted);font-size:12px;letter-spacing:-4px;padding-right:4px;white-space:nowrap}
#linked-chat .contact-receipt.is-read{color:var(--receipt-read)}
#linked-chat .contact-trailing{width:30px;flex:0 0 30px;display:flex;align-items:center;flex-direction:column;gap:3px}
#linked-chat .contact-flag{font-size:22px;line-height:24px}
#linked-chat .contact-country-code{font-size:9px;color:var(--muted);line-height:12px}
#linked-chat .contact .badge{margin:2px 0 0;min-width:20px;text-align:center;font-size:10px}
#linked-chat .chat-call-record{align-self:center;width:min(100%,360px);display:flex;flex-direction:column;gap:6px;background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px}
#linked-chat .chat-call-record .call-record-head{display:flex;align-items:center;gap:8px}
#linked-chat .chat-call-record time{margin-left:auto;font-size:11px;color:var(--muted)}
#linked-chat .chat-call-record p{font-size:12px;color:var(--muted)}
@media(max-width:1050px){#linked-chat .sidebar{width:330px;flex-basis:330px}}
@media(max-width:760px){#linked-chat .sidebar{position:absolute;z-index:15;inset:0 auto 0 0;width:min(360px,calc(100% - 36px));max-height:none;border-right:1px solid var(--border);box-shadow:12px 0 28px #0008}#linked-chat .contact{padding:10px;gap:6px}#linked-chat .contact-avatar{width:40px;flex-basis:40px;height:54px}}


.linked-call{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:auto minmax(0,1fr) auto;height:min(760px,85dvh);background:#092a22;border:1px solid #3e6c62;border-radius:20px;overflow:hidden;margin:18px 0}.linked-call[hidden]{display:none}.linked-call-heading,.linked-call-controls{grid-column:1/-1;display:flex;gap:12px;align-items:center;justify-content:center;padding:14px;flex-wrap:wrap}.linked-call-stage{position:relative;min-height:0;background:#071b16}.linked-call-stage .remote{width:100%;height:100%;object-fit:contain}.linked-call-stage .local{position:absolute;right:16px;bottom:16px;width:25%;aspect-ratio:16/9;object-fit:cover;border-radius:12px;border:2px solid #51e3c2}.linked-call-captions{overflow:auto;min-height:0;padding:16px;overflow-wrap:anywhere;border-left:1px solid #3e6c62}.linked-call-captions p{padding:12px 0;border-bottom:1px solid #3e6c62}.linked-call-controls button{border:1px solid #3e6c62;background:#153c34;border-radius:10px;color:#e7fcf6;padding:12px}.linked-call-controls .hangup{background:#be364e}.linked-call:fullscreen{height:100dvh;border-radius:0;margin:0}@media(max-width:700px){.linked-call{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) 130px auto}.linked-call-captions{border-left:0;border-top:1px solid #3e6c62}}

.linked-call .remote.camera-off{visibility:hidden}.linked-call .hangup{display:inline-flex;align-items:center;gap:8px}

#linked-chat #start-audio-call,#linked-chat #start-video-call{width:44px;height:44px;padding:10px;flex:0 0 44px;display:inline-flex;align-items:center;justify-content:center}#linked-chat .chat-call-actions i[data-lucide]{display:block;width:22px;height:22px;background:currentColor}#linked-chat i[data-lucide=phone]{mask:url("./call-icons/phone.svg") center/contain no-repeat}#linked-chat i[data-lucide=video]{mask:url("./call-icons/video.svg") center/contain no-repeat}

/* Authenticated app uses the approved desktop shell across the viewport. */
body.chat-active{height:100dvh;overflow:hidden}
.chat-active #app{max-width:none;width:100%;height:100dvh;margin:0;border:0;border-radius:0;display:flex;flex-direction:column;overflow:hidden}
.chat-active #app>header{flex:0 0 auto;padding:14px 22px;min-height:72px}
.settings-toggle{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;padding:10px}
.settings-toggle svg{width:24px;height:24px}
.chat-active #app>#status:not(.error),.chat-active #connection-security,.chat-active #app>footer{display:none}
.chat-active #connected{width:100%;max-width:none;margin:0;gap:0;padding:0;flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.device-settings{padding:24px;overflow-y:auto;height:100%;max-width:1100px;width:100%;margin-inline:auto}
.device-settings>#close-devices{margin-bottom:22px}
#linked-chat{--text:var(--ink);--self:#125449;--receipt-unread:#a6a6a6;--receipt-read:#00deff;position:relative;display:grid;grid-template-columns:clamp(300px,31vw,400px) minmax(0,1fr);flex:1;height:100%;min-height:0;min-width:0;background:var(--bg);color:var(--ink);overflow:hidden;margin:0}
#linked-chat[hidden],#linked-chat [hidden],.settings-toggle[hidden]{display:none!important}
#linked-chat.sidebar-collapsed{grid-template-columns:minmax(0,1fr)}
#linked-chat aside{min-height:0;min-width:0;display:flex;flex-direction:column;gap:16px;padding:20px 16px;background:var(--surface);border-inline-end:1px solid var(--border)}
#linked-chat .chat-cards{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#linked-chat .chat-main{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}
#linked-chat .chat-toolbar{display:flex;gap:12px;align-items:center;padding:14px 18px;flex:0 0 auto;border-bottom:1px solid var(--border)}
#linked-chat .chat-toolbar svg{width:20px;height:20px}
#linked-chat .pill{padding:4px 10px;border-radius:22px;background:var(--panel);font-size:12px}
#linked-chat .chat-empty{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;color:var(--muted);padding:24px;text-align:center}
#linked-chat .chat-empty img{border-radius:18px}
#linked-chat .chat-view{flex:1;height:auto;max-height:none;min-height:0;min-width:0;display:flex;flex-direction:column;padding:20px;gap:14px;contain:none}
#linked-chat .row{display:flex;gap:10px;align-items:center}#linked-chat .between{justify-content:space-between}#linked-chat .grow{flex:1;min-width:0}#linked-chat .dim{color:var(--muted)}#linked-chat .small{font-size:12px}
#linked-chat .action{display:inline-flex;gap:8px;align-items:center;justify-content:center;border:1px solid var(--border);background:var(--surface);color:var(--ink);padding:9px 12px;border-radius:12px;min-height:42px}
#linked-chat .action:hover{background:var(--panel)}#linked-chat .primary{background:var(--accent);color:var(--bg)}
#linked-chat input,#linked-chat textarea{background:var(--bg);color:var(--ink);border:1px solid var(--border);border-radius:12px;padding:13px;min-width:0}
#linked-chat .chat-filters button{border-radius:24px;padding:7px 13px;font-size:13px}
#linked-chat .chat-filters [aria-pressed=true]{color:var(--accent);border-color:#3a897c;background:#153c40}
#linked-chat .chat-message{flex:0 0 auto;max-width:min(78%,780px);font-size:15px;padding:15px 18px;border-radius:18px}
#linked-chat .chat-timeline{padding:4px 4px 12px;gap:18px;scrollbar-gutter:stable}
#linked-chat .chat-heading{min-width:0;gap:12px;flex-wrap:wrap;padding-bottom:4px}
#linked-chat .chat-heading strong{font-size:18px;overflow-wrap:anywhere}
#linked-chat .chat-profile-button{min-width:0;flex:1}
#linked-chat .chat-profile-button .avatar{width:48px;height:58px;border-radius:14px;background:#2d5a65;display:flex;align-items:center;justify-content:center;flex-shrink:0}
#linked-chat .chat-call-actions{display:flex;gap:8px;align-items:center}
#linked-chat .chat-popover,#linked-chat .chat-dialog{background:var(--surface)}
#linked-chat .composer{display:flex}#linked-chat #message-input{height:48px}
#linked-chat #chat-status:empty{display:none}
#linked-chat .older{align-self:center}
#linked-chat .contact{padding:14px 12px;gap:10px;border-radius:16px}
#linked-chat .contact-avatar{width:50px;flex-basis:50px;height:64px}
#linked-chat .contact .name{font-size:15px}#linked-chat .contact-location{font-size:12px}#linked-chat .contact-snippet{font-size:13px}
#linked-chat .contact .badge{background:var(--accent);color:var(--bg);border-radius:20px;padding:2px 6px}
.chat-active #connected:has(.linked-call:not([hidden])) #linked-chat{display:none}
.chat-active .linked-call{flex:1;height:100%;margin:0;border-radius:0;min-height:0;background:var(--bg)}
.chat-active .linked-call-stage{background:var(--bg)}
@media(max-width:900px){#linked-chat{grid-template-columns:300px minmax(0,1fr)}#linked-chat .chat-view{padding:14px}#linked-chat .chat-heading strong{font-size:16px}}
@media(max-width:680px){.chat-active #app>header{padding:10px 14px;min-height:64px}.chat-active .language select{min-width:110px;max-width:150px}#linked-chat{grid-template-columns:minmax(0,1fr);position:relative}#linked-chat aside{position:absolute;z-index:25;inset:0 auto 0 0;width:min(360px,90%);box-shadow:12px 0 30px #0007}#linked-chat .chat-main{grid-column:1}#linked-chat .chat-view{height:auto;min-height:0;padding:12px}#linked-chat .chat-message{max-width:94%}#linked-chat .chat-call-actions{flex-wrap:nowrap}#linked-chat .chat-toolbar{padding:10px 12px}#linked-chat .chat-heading{align-items:center}}

#linked-chat .composer svg{width:22px;height:22px;display:block}

/* One compact scale for the complete desktop workspace. */
.chat-active{font-size:14px;line-height:1.45}
.chat-active #app>header{padding:9px 16px;min-height:60px;gap:10px}
.chat-active header>img{width:32px;height:32px;border-radius:10px}
.chat-active header>strong{font-size:19px}
.chat-active .language select{min-height:38px;padding-block:7px;font-size:12px}
.chat-active .settings-toggle{width:38px;height:38px;padding:8px}
#linked-chat{grid-template-columns:clamp(280px,25vw,340px) minmax(0,1fr)}
#linked-chat.sidebar-collapsed{grid-template-columns:minmax(0,1fr)}
#linked-chat aside{padding:16px 12px;gap:12px}
#linked-chat aside h2{font-size:17px}
#linked-chat .chat-toolbar{padding:10px 16px;gap:10px}
#linked-chat .action{min-height:36px;padding:7px 10px;border-radius:10px;font-size:13px}
#linked-chat .chat-filters button{padding:5px 11px;font-size:12px}
#linked-chat input,#linked-chat textarea{font-size:14px;padding:10px 12px;border-radius:11px}
#linked-chat #chat-list-search{height:42px}
#linked-chat .contact-list{gap:8px}
#linked-chat .contact{padding:10px;gap:9px;border-radius:13px}
#linked-chat .contact-avatar{width:40px;flex-basis:40px;height:52px;border-radius:10px}
#linked-chat .contact-copy{gap:3px}
#linked-chat .contact .name{font-size:14px}
#linked-chat .contact-location{font-size:11px}
#linked-chat .contact-snippet{font-size:12px}
#linked-chat .contact-time{font-size:10px}
#linked-chat .contact-trailing{width:27px;flex-basis:27px}
#linked-chat .contact-flag{font-size:19px;line-height:21px}
#linked-chat .chat-view{padding:16px;gap:12px}
#linked-chat .chat-heading{padding-bottom:2px;gap:10px}
#linked-chat .chat-heading strong{font-size:16px}
#linked-chat .chat-profile-button{gap:10px}
#linked-chat .chat-profile-button .avatar{width:40px;height:48px;border-radius:11px;overflow:hidden}
#linked-chat .chat-profile-button .avatar img{display:block;width:100%;height:100%;object-fit:cover}
#linked-chat .chat-call-actions{gap:6px}
#linked-chat #start-audio-call,#linked-chat #start-video-call,#linked-chat #chat-more{width:38px;height:38px;min-width:38px;flex-basis:38px;padding:8px}
#linked-chat .chat-call-actions i[data-lucide]{width:20px;height:20px}
#linked-chat .chat-message{font-size:14px;padding:11px 14px;border-radius:15px}
#linked-chat .chat-timeline{gap:12px;padding:4px 3px 10px}
#linked-chat .chat-meta{margin-top:6px;font-size:10px}
#linked-chat .chat-message-tools{margin-top:4px;gap:10px}
#linked-chat .chat-message-tools button{font-size:10px;min-height:22px}
#linked-chat #message-input{height:42px}
#linked-chat .composer .icon-btn{height:40px;width:40px;min-width:40px;padding:8px;flex-shrink:0}
#linked-chat .composer svg{width:20px;height:20px}
#linked-chat .chat-input-area .composer{gap:7px}
.chat-active .linked-call-controls button{font-size:13px;padding:9px 12px}
.chat-active .device-settings{font-size:14px}
@media(max-width:680px){#linked-chat{grid-template-columns:minmax(0,1fr)}#linked-chat aside{width:min(320px,90%)}#linked-chat .chat-view{padding:12px}#linked-chat .chat-toolbar{padding:9px 12px}.chat-active .language select{max-width:140px;min-width:105px}}

.chat-active #app>header{display:none}
#linked-chat .chat-device-link{align-self:flex-start;background:transparent;border:0;color:var(--muted);font-size:12px;padding:7px 2px;min-height:32px}
#linked-chat .chat-device-link:hover{color:var(--accent)}

#linked-chat .chat-main{position:relative}
#linked-chat .sidebar-reopen{position:absolute;inset-inline-start:14px;top:20px;width:34px;height:34px;min-height:34px;padding:7px;z-index:8}
#linked-chat .sidebar-reopen svg{width:19px;height:19px}
#linked-chat.sidebar-collapsed .chat-heading{padding-inline-start:44px}

#linked-chat [data-state=online]{--presence-color:#2fea72}#linked-chat [data-state=today]{--presence-color:#ffd43b}#linked-chat [data-state=yesterday]{--presence-color:#ff8a35}#linked-chat [data-state=recently]{--presence-color:#ff4d5f}#linked-chat [data-state=offline]{--presence-color:#9aa0a6}
#linked-chat .contact-avatar{position:relative;overflow:visible}#linked-chat .contact-avatar img{border-radius:9px}
#linked-chat .contact-presence{position:absolute;left:-3px;bottom:-3px;width:11px;height:11px;border-radius:50%;border:1.5px solid var(--surface);background:var(--presence-color)}
#linked-chat .chat-presence-label{display:inline-block;color:var(--presence-color);font-size:11px;font-weight:400;margin-inline-start:9px}
#linked-chat .chat-presence-label::before{content:'';display:inline-block;width:6px;height:6px;margin-inline-end:5px;border-radius:50%;background:var(--presence-color);vertical-align:middle}

/* Mobile media geometry: contain a single attachment; square cells for albums. */
#linked-chat .chat-media-grid{grid-template-columns:repeat(var(--media-columns,2),minmax(0,1fr));width:340px;max-width:100%;gap:2px;margin:0 0 8px;border-radius:13px;overflow:hidden}
#linked-chat .chat-media-grid.single{display:block;width:fit-content;max-width:100%}
#linked-chat .chat-media-tile{display:block;width:100%;aspect-ratio:1;border:0;border-radius:0;background:var(--bg);min-height:0;min-width:0}
#linked-chat .chat-media-grid.single .chat-media-tile{width:var(--media-width,260px);max-width:100%;aspect-ratio:var(--media-ratio,1);max-height:320px;border-radius:13px}
#linked-chat .chat-media-tile .chat-media-preview{display:block;width:100%;height:100%;object-fit:cover;margin:0}
#linked-chat .chat-media-grid.single .chat-media-preview{object-fit:contain}
#linked-chat .chat-media-play{position:absolute;inset:0;display:grid;place-content:center;pointer-events:none;background:#0001}
#linked-chat .chat-media-play svg{width:38px;height:38px;padding:9px;border-radius:50%;background:#071e24aa;color:#fff}
#linked-chat .chat-media-duration{position:absolute;bottom:6px;right:7px;background:#071e24b3;color:#fff;padding:2px 5px;border-radius:4px;font-size:10px}
#linked-chat .chat-media-loading{display:block;width:20px;height:20px;margin:auto;border:2px solid #51e3c230;border-top-color:var(--accent);border-radius:50%;animation:chat-loading .8s linear infinite}
#linked-chat .chat-media-error{display:block;font-size:11px;color:var(--muted);padding:14px}
#linked-chat .chat-media-tile.document{display:flex;align-items:center;gap:8px;aspect-ratio:auto;min-height:58px;padding:10px;text-align:left;border:1px solid var(--border);border-radius:9px}
#linked-chat .chat-document-icon svg{width:24px;height:24px;color:var(--accent)}#linked-chat .chat-document-name{flex:1;font-size:12px;overflow-wrap:anywhere}#linked-chat .chat-document-size{font-size:10px;color:var(--muted)}
#linked-chat .chat-voice-player{width:300px;max-width:100%}#linked-chat .chat-voice-line{display:flex;align-items:center;gap:7px;min-width:0}
#linked-chat .chat-voice-play{position:relative;width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;padding:6px;border:0;border-radius:50%;color:var(--accent);background:#51e3c226}
#linked-chat .chat-voice-play svg{width:19px;height:19px;pointer-events:none}#linked-chat .chat-voice-play.loading::after{content:'';position:absolute;inset:1px;border:2px solid #51e3c240;border-top-color:var(--accent);border-radius:50%;animation:chat-loading .8s linear infinite;pointer-events:none}
#linked-chat .chat-voice-track{position:relative;flex:1;min-width:60px;height:32px}#linked-chat .chat-voice-track .chat-wave{height:32px;gap:2px;min-width:0;color:var(--accent)}#linked-chat .chat-voice-track .chat-wave.no-samples::before{content:'';width:100%;height:3px;background:linear-gradient(to right,var(--accent) var(--voice-progress,0%),#acd5d55c var(--voice-progress,0%));border-radius:3px}
#linked-chat .chat-voice-seek{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;padding:0}#linked-chat .chat-voice-track:focus-within{outline:1px solid var(--accent);outline-offset:2px;border-radius:5px}
#linked-chat .chat-voice-time{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
#linked-chat .chat-voice-transcript-toggle{display:grid;place-items:center;width:24px;height:24px;flex:0 0 24px;padding:3px;border:0;background:transparent;color:var(--muted)}#linked-chat .chat-voice-transcript-toggle svg{width:18px;height:18px}#linked-chat .chat-voice-transcript-toggle[aria-expanded=true] svg{transform:rotate(180deg)}
#linked-chat .chat-voice-transcript p{font-size:12px;line-height:1.4;margin:7px 0 0}#linked-chat .voice-original{color:var(--muted)}#linked-chat .voice-translated{font-weight:600;color:var(--ink)}#linked-chat .chat-voice-error{font-size:11px;color:#ffafba;margin:7px 0 0}
#linked-chat .chat-recording{width:100%;min-height:44px;padding:7px 10px;border:1px solid var(--border);border-radius:14px;background:var(--surface);gap:9px}#linked-chat #chat-record-time{color:#ff9aa8;min-width:36px;font-variant-numeric:tabular-nums}#linked-chat #chat-recording button{flex-shrink:0;font-size:12px;padding:8px;border-radius:9px}#linked-chat #chat-record-cancel{color:#ffafba}#linked-chat #chat-recording .chat-wave{flex:1;min-width:20px;height:30px}
@keyframes chat-loading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#linked-chat .chat-media-loading,#linked-chat .chat-voice-play.loading::after{animation:none}}

/* One compact visual scale for the real chat and its auxiliary surfaces. */
#linked-chat{grid-template-columns:clamp(280px,25vw,320px) minmax(0,1fr);font-size:13px}
#linked-chat #chat-sidebar{padding:12px 10px 0;gap:10px}#linked-chat #chat-sidebar h2{font-size:17px;font-weight:650}#linked-chat #chat-list-search{height:36px;font-size:12px;border:0;border-radius:9px;padding:8px 11px;background:var(--surface)}
#linked-chat .contact-list{gap:2px}#linked-chat .contact{border:0;border-radius:9px;padding:9px 8px;gap:8px;background:transparent}#linked-chat .contact.active{background:var(--panel)}#linked-chat .contact.unread{background:color-mix(in srgb,var(--accent) 6%,transparent)}#linked-chat .contact.active.unread{background:var(--panel)}
#linked-chat .contact-avatar{width:38px;height:48px;flex-basis:38px;border:0;border-radius:9px}#linked-chat .contact .name{font-size:13px;font-weight:600}#linked-chat .contact-copy{gap:3px}#linked-chat .contact-location{font-size:10px}#linked-chat .contact-snippet{font-size:11px}#linked-chat .contact-language{border:0;background:transparent;padding:0;font-size:9px}#linked-chat .contact-flag{font-size:18px}#linked-chat .contact-country-code{font-size:8px}#linked-chat .contact-trailing{width:24px;flex-basis:24px}
#linked-chat #chat-content{padding:12px 18px 10px;gap:8px}#linked-chat .chat-heading{min-height:42px;margin:0;padding:0 0 9px;border-bottom:1px solid color-mix(in srgb,var(--border) 45%,transparent)}#linked-chat .chat-profile-button strong{font-size:14px}#linked-chat .chat-profile-button .avatar{width:34px;height:40px;border-radius:9px}#linked-chat .chat-call-actions .icon-btn{height:32px;width:32px;min-width:32px;padding:7px;border:0;background:transparent}#linked-chat .chat-call-actions .icon-btn:hover{background:var(--surface)}#linked-chat .chat-call-actions svg,#linked-chat .chat-call-actions img{width:18px;height:18px}
#linked-chat .chat-timeline{gap:7px;padding:12px 24px 12px 12px}#linked-chat .chat-message{position:relative;max-width:min(76%,520px);min-width:60px;border:0;border-radius:16px;padding:8px 10px;font-size:13px;line-height:1.42}#linked-chat .chat-message p{margin:0;line-height:1.42}#linked-chat .chat-message p.original{margin-top:4px;color:var(--muted);font-size:12px}#linked-chat .chat-meta{font-size:9px;gap:5px;margin-top:4px;line-height:1.2}#linked-chat .chat-receipt{font-size:12px}
#linked-chat .chat-message-actions{position:absolute;right:-21px;top:0;z-index:3}#linked-chat .chat-message-actions[open]{z-index:10}#linked-chat .chat-message-menu-toggle{display:grid;place-items:center;list-style:none;width:22px;height:24px;border-radius:6px;color:var(--muted);cursor:pointer;opacity:0;font-size:16px}#linked-chat .chat-message-menu-toggle::-webkit-details-marker{display:none}#linked-chat .chat-message:hover .chat-message-menu-toggle,#linked-chat .chat-message:focus-within .chat-message-menu-toggle,#linked-chat .chat-message-actions[open] .chat-message-menu-toggle{opacity:1;background:var(--surface)}
#linked-chat .chat-message-tools{position:absolute;right:0;top:24px;display:flex;flex-direction:column;min-width:140px;padding:5px;margin:0;gap:0;border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:0 6px 25px #0003}#linked-chat .chat-message-tools button{font-size:12px;text-align:left;padding:7px 10px;border-radius:6px;color:var(--ink);white-space:nowrap}#linked-chat .chat-message-tools button:hover{background:var(--panel)}
#linked-chat .composer{gap:6px}#linked-chat .composer .icon-btn{width:34px;height:36px;min-width:34px;padding:8px;border:0}#linked-chat #message-input{height:38px;font-size:13px;border:0;border-radius:12px;background:var(--surface)}#linked-chat #chat-status:empty{display:none}
#linked-chat .chat-account-bar{position:sticky;bottom:0;margin-top:auto;display:flex;align-items:center;gap:5px;padding:9px 2px;background:var(--bg);border-top:1px solid color-mix(in srgb,var(--border) 50%,transparent)}#linked-chat #chat-self-profile{display:flex;align-items:center;gap:8px;min-width:0;flex:1;background:transparent;border:0;padding:0;text-align:left;font-size:12px}#linked-chat .chat-own-avatar{width:30px;height:34px;flex:0 0 30px;display:grid;place-items:center;background:var(--surface);border-radius:8px;overflow:hidden}#linked-chat .chat-own-avatar img{width:100%;height:100%;object-fit:cover}#linked-chat .chat-own-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#linked-chat #chat-theme-toggle{border:0;background:transparent;width:30px;height:32px;padding:0;font-size:24px;color:var(--muted)}#linked-chat #chat-open-devices{margin:0;min-height:30px;padding:5px 3px;font-size:10px;border:0;background:transparent;color:var(--muted)}
/* Removing the chat list must also remove its grid track, including with a detail panel open. */
#linked-chat.detail-open{grid-template-columns:clamp(270px,23vw,310px) minmax(0,1fr) 310px}
#linked-chat.sidebar-collapsed.detail-open{grid-template-columns:minmax(0,1fr) 310px}
#linked-chat.sidebar-collapsed .chat-dialog.side-panel[open]{grid-column:2}
#linked-chat .chat-dialog.side-panel[open]{position:relative;grid-column:3;grid-row:1;inset:auto;width:310px;height:100%;max-width:none;max-height:none;margin:0;padding:14px;border:0;border-inline-start:1px solid var(--border);border-radius:0;background:var(--surface);box-shadow:none;overflow-y:auto;overscroll-behavior:contain}#linked-chat .side-panel h2{font-size:15px}#linked-chat .side-panel #chat-dialog-body{gap:12px;margin-top:16px}#linked-chat .side-panel .chat-full-image{max-height:270px;background:var(--bg)}#linked-chat .side-panel .profile-about{font-size:13px;line-height:1.5}#linked-chat .profile-media-link{font-size:12px;text-align:left;padding:10px;border:0;background:var(--panel)}
#linked-chat .chat-library-tabs{position:sticky;top:-14px;z-index:2;flex-wrap:wrap;gap:3px;padding:8px 0;background:var(--surface)}#linked-chat .chat-library-tabs button{font-size:11px;padding:5px 6px;border:0;background:transparent}#linked-chat .chat-library-tabs button[aria-pressed=true]{color:var(--accent);background:var(--panel)}#linked-chat .chat-library-content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}#linked-chat .chat-library-card{min-width:0}.chat-library-card>.small{display:block;font-size:9px;margin-top:3px}#linked-chat .chat-library-card .chat-media-tile{border-radius:7px}#linked-chat .chat-library-voice,#linked-chat .chat-library-link{grid-column:1/-1;min-width:0;padding:8px 0;border-bottom:1px solid var(--border)}#linked-chat .chat-library-link a{font-size:12px;overflow-wrap:anywhere;color:var(--accent)}#linked-chat .library-jump{display:block;font-size:10px;border:0;background:transparent;color:var(--muted);padding:5px 0}
#linked-chat .chat-popover{background:var(--surface);border-color:color-mix(in srgb,var(--border) 55%,transparent);border-radius:13px;padding:6px;box-shadow:0 10px 30px #0003}#linked-chat .chat-plus-menu{width:280px;max-height:min(470px,70dvh);overflow-y:auto}#linked-chat .chat-more-menu{width:290px;top:53px;right:16px;max-height:calc(100% - 108px)}#linked-chat .chat-menu-heading{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:650;padding:6px 9px;color:var(--muted)}#linked-chat button.chat-menu-row{gap:10px;padding:9px;border-radius:8px;font-size:12px}#linked-chat .chat-menu-row>svg{width:19px;height:19px;flex:0 0 19px;color:var(--accent)}#linked-chat .chat-menu-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}#linked-chat .chat-menu-copy small{font-size:10px;line-height:1.35;color:var(--muted)}#linked-chat .chat-menu-row.destructive{color:#ffafba}#linked-chat .chat-menu-row.destructive>svg{color:#ffafba}#linked-chat .chat-menu-back{padding:2px;width:24px}#linked-chat .chat-menu-back svg{width:18px;height:18px}
@media(hover:none){#linked-chat .chat-message-menu-toggle{opacity:.75}}@media(max-width:1100px){#linked-chat.detail-open{grid-template-columns:clamp(280px,25vw,320px) minmax(0,1fr)}#linked-chat.sidebar-collapsed.detail-open{grid-template-columns:minmax(0,1fr)}#linked-chat .chat-dialog.side-panel[open],#linked-chat.sidebar-collapsed .chat-dialog.side-panel[open]{position:absolute;grid-column:auto;grid-row:auto;inset-inline-end:0;top:0;bottom:0;z-index:25;width:min(340px,100%);box-shadow:-12px 0 25px #0003}}@media(max-width:680px){#linked-chat,#linked-chat.detail-open{grid-template-columns:minmax(0,1fr)}#linked-chat #chat-content{padding:10px}#linked-chat .chat-message{max-width:89%}#linked-chat .chat-dialog.side-panel[open]{width:100%}}
:root[data-theme=light]{color-scheme:light;--bg:#f1faf8;--surface:#ffffff;--panel:#e0f3ee;--border:#c8dfda;--ink:#12323d;--muted:#527670;--accent:#007f70;background:var(--bg);color:var(--ink)}
:root[data-theme=light] #linked-chat{--self:#d4f2e7;--receipt-unread:#696969;--receipt-read:#0052cc}:root[data-theme=light] #linked-chat .chat-message.mine{background:var(--self)}:root[data-theme=light] #linked-chat .chat-dialog,:root[data-theme=light] #linked-chat .chat-popover,:root[data-theme=light] #linked-chat .chat-dialog input,:root[data-theme=light] #linked-chat .chat-dialog textarea{background:var(--surface);color:var(--ink)}:root[data-theme=light] select{background-color:var(--surface)}:root[data-theme=light] #linked-chat .chat-menu-row.destructive,:root[data-theme=light] #linked-chat .chat-menu-row.destructive>svg,:root[data-theme=light] #linked-chat .chat-voice-error{color:#b32e44}
.linked-call{background:var(--surface);border:1px solid var(--border);border-radius:14px;margin:10px 0;grid-template-columns:minmax(0,1fr) 270px}.linked-call-heading,.linked-call-controls{padding:9px 12px;gap:8px}.linked-call-controls button{font-size:12px;padding:8px 10px;border:0;border-radius:9px;background:var(--panel);color:var(--ink)}.linked-call-controls .hangup{background:#be364e;color:white}.linked-call-captions{padding:12px;border-color:var(--border);font-size:13px;line-height:1.5}.linked-call-captions p{padding:9px 0;border-color:var(--border)}.linked-call-heading{font-size:13px}.linked-call-stage .local{border-width:1px;border-radius:10px}

/* Balanced Aquamarine surfaces in both appearances. */
#linked-chat #chat-theme-toggle{display:grid;place-items:center}#linked-chat #chat-theme-toggle svg{width:20px;height:20px}
#linked-chat #chat-sidebar{gap:10px;padding:14px 12px 0}#linked-chat .chat-filters{gap:6px}#linked-chat .chat-filters button{padding:5px 10px;font-size:11px}#linked-chat #chat-list-search{padding:9px 10px;font-size:12px}
#linked-chat .chat-account-bar{background:var(--surface)}#linked-chat .chat-dialog{background:var(--surface);color:var(--ink)}#linked-chat .chat-dialog h2{font-size:15px}#linked-chat .chat-dialog h3{font-size:13px}
#linked-chat .chat-message.mine .chat-message-tools{right:0}#linked-chat .chat-message-tools{bottom:24px;top:auto}#linked-chat .chat-message:first-child .chat-message-tools{top:24px;bottom:auto}
:root[data-theme=light] #linked-chat .contact.unread{background:#e5f5ef}:root[data-theme=light] #linked-chat .contact.active{background:#ccebe1}:root[data-theme=light] #linked-chat .chat-dialog img.chat-full-image{background:var(--panel)}
.linked-call{background:var(--surface);border-color:var(--border);color:var(--ink)}.linked-call-captions{border-color:var(--border)}.linked-call-captions p{border-color:var(--border)}.linked-call-controls button{background:var(--panel);border-color:var(--border);color:var(--ink)}.linked-call-controls .hangup{background:#be364e;border-color:#be364e;color:white}

:root[data-theme=light] #linked-chat .chat-filters [aria-pressed=true]{color:#006b5d;background:#ccebe1;border-color:#8ebcaf}:root[data-theme=light] #linked-chat .chat-presence-label{color:var(--muted)}
@media(max-width:700px){.linked-call{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) 130px auto}}

#linked-chat .chat-text-swap{display:inline-grid;place-items:center;border:0;background:transparent;color:var(--muted);padding:3px;width:22px;height:22px;border-radius:5px;cursor:pointer}#linked-chat .chat-text-swap:hover{color:var(--accent);background:var(--surface)}#linked-chat .chat-text-swap svg{width:16px;height:16px}#linked-chat .chat-meta:has(.chat-text-swap){margin-top:1px}/* Compact production call surface. The stage owns its height; only the text
   viewport scrolls. All media retain their own aspect ratio. */
.linked-call-v2{position:fixed;inset:0;z-index:35;display:grid;grid-template-rows:42px minmax(0,1fr) auto auto;background:var(--bg,#071d2b);color:var(--ink,#e8f8f6);font:13px/1.4 system-ui,sans-serif;min-width:0;min-height:0;overflow:hidden}
.linked-call-v2[hidden],.linked-call-v2 [hidden]{display:none!important}.linked-call-v2 *{box-sizing:border-box}.linked-call-v2 button,.linked-call-v2 select{font:inherit;color:inherit;background:var(--panel,#123040);border:1px solid var(--border,#2b5260);border-radius:9px;min-height:34px;padding:6px 10px;cursor:pointer}.linked-call-v2 button:disabled,.linked-call-v2 select:disabled{opacity:.42;cursor:default}.linked-call-v2 button:hover:not(:disabled){background:var(--self,#125449)}.linked-call-v2 button:focus-visible,.linked-call-v2 select:focus-visible{outline:2px solid #51e3c2;outline-offset:2px}.linked-call-v2 svg{width:19px;height:19px;display:block}.lc-top{display:flex;align-items:center;gap:12px;padding:4px 14px;border-bottom:1px solid var(--border,#2b5260);min-width:0}.lc-title{font-weight:600}.lc-state{color:var(--muted,#a5c9cc);flex:1;font-size:11px}.lc-top button{border:0}.lc-workspace{display:grid;grid-template-columns:minmax(0,1fr);min-height:0;min-width:0}.linked-call-v2[data-panel=true] .lc-workspace{grid-template-columns:minmax(0,1fr) clamp(240px,24vw,320px)}.lc-stage{position:relative;min-width:0;min-height:0;overflow:hidden;background:#030c12}.lc-main,.lc-screen{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}.lc-screen{z-index:2}.lc-no-video{position:absolute;inset:0;display:grid;place-content:center;color:#aac5c9;background:#0a202b}.lc-camera-off{opacity:0}.lc-camera{position:absolute;z-index:5;overflow:hidden;border:1px solid #47636b;border-radius:12px;background:#0a202b;box-shadow:0 5px 22px #0006;touch-action:none}.lc-camera video{width:100%;height:100%;object-fit:cover;display:block}.lc-camera[data-shape=circle]{border-radius:50%}.lc-camera .lc-move,.lc-camera .lc-resize{position:absolute;bottom:3px;right:3px;padding:3px;min-height:24px;border:0;background:#0008;color:white;opacity:0}.lc-camera .lc-move{right:auto;left:3px}.lc-camera:hover button,.lc-camera:focus-within button{opacity:1}.lc-caption-panel{min-height:0;min-width:0;display:flex;flex-direction:column;background:var(--panel,#123040);border-left:1px solid var(--border,#2b5260);overflow:hidden}.lc-caption-panel>header{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;flex:none;font-size:12px}.lc-caption-panel>header button{border:0;padding:4px;min-height:26px}.lc-captions{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 14px}.lc-captions article{padding:12px 0;border-bottom:1px solid var(--border,#2b5260);overflow-wrap:anywhere}.lc-captions article header{display:flex;justify-content:space-between;gap:8px;font-size:10px;color:var(--muted,#a5c9cc)}.lc-captions p{font-size:14px;margin:8px 0 0;line-height:1.55}.lc-captions .lc-original{font-size:12px;color:var(--muted,#a5c9cc)}.lc-text-form{padding:10px;margin:0;flex:none}.lc-text-form textarea{display:block;width:100%;resize:none;background:var(--bg,#071d2b);color:inherit;border:1px solid var(--border,#2b5260);border-radius:9px;padding:9px;font:inherit;max-height:100px}.lc-controls{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;padding:8px 12px;min-width:0;border-top:1px solid var(--border,#2b5260);background:var(--panel,#123040)}.lc-controls button{height:34px;min-width:34px;padding:7px}.lc-controls select{height:34px;max-width:235px;padding:4px 28px 4px 8px}.lc-controls .lc-shape{max-width:85px}.lc-controls .lc-end{background:#c83949;color:#fff;border-color:#c83949;min-width:46px}.lc-controls .lc-end:hover{background:#ae2434!important}.lc-controls .lc-accept{background:#008675;color:white}.lc-controls [aria-pressed=false].lc-mic,.lc-controls [aria-pressed=false].lc-video{color:#ff9a9f}.lc-peer-mode{font-size:10px;color:var(--muted,#a5c9cc);max-width:180px}.lc-error:empty{display:none}.lc-error{padding:5px 12px;color:#faacac;font-size:11px;background:var(--bg,#071d2b)}.lc-film-setup{position:absolute;z-index:6;left:50%;top:50%;transform:translate(-50%,-50%);width:min(520px,calc(100% - 28px));max-height:calc(100% - 28px);overflow:auto;padding:18px;background:var(--panel,#123040);border:1px solid var(--border,#2b5260);border-radius:14px}.lc-film-setup h3{font-size:15px;margin:0 0 8px}.lc-film-setup p{font-size:12px;line-height:1.5;margin:8px 0}.lc-share-note{color:var(--muted,#a5c9cc)}.lc-share-options{display:flex;flex-wrap:wrap;gap:8px}.lc-netflix{margin-top:12px}.lc-netflix label{display:block;margin:8px 0}.lc-netflix input,.lc-netflix select{width:100%;font:inherit;color:inherit;background:var(--bg,#071d2b);border:1px solid var(--border,#2b5260);padding:7px;border-radius:6px}.lc-netflix h2{font-size:15px}.lc-netflix button{margin:3px}.linked-call-v2:fullscreen{width:100vw;height:100dvh;grid-template-rows:minmax(0,1fr)}.linked-call-v2:fullscreen .lc-workspace{grid-row:1;min-height:0}.linked-call-v2:fullscreen .lc-top{position:absolute;top:0;left:0;right:0;z-index:8;background:#071d2bd9}.linked-call-v2:fullscreen .lc-controls{position:absolute;bottom:12px;left:12px;right:12px;z-index:8;border-radius:12px;background:#123040e8;transition:opacity .2s}.linked-call-v2:fullscreen .lc-error:not(:empty){position:absolute;bottom:75px;z-index:9}.linked-call-v2:fullscreen[data-controls-hidden=true] .lc-top,.linked-call-v2:fullscreen[data-controls-hidden=true] .lc-controls{opacity:0;pointer-events:none}.lc-pip-body{margin:0}.lc-floating .lc-top,.lc-floating .lc-shape,.lc-floating .lc-rotate,.lc-floating .lc-swap,.lc-floating .lc-film,.lc-floating .lc-mode,.lc-floating .lc-panel,.lc-floating .lc-full,.lc-floating .lc-pip,.lc-floating .lc-peer-mode{display:none}.lc-floating{grid-template-rows:minmax(0,1fr) auto auto}.lc-floating .lc-controls{padding:4px}.lc-floating .lc-controls button{height:30px;min-height:30px;padding:5px}
@media(max-width:850px){.lc-peer-mode{display:none}.lc-controls{gap:4px;padding:6px}.lc-controls select{font-size:11px}.lc-controls .lc-shape{max-width:72px}.linked-call-v2[data-panel=true] .lc-workspace{grid-template-columns:minmax(0,1fr) 240px}}
@media(max-width:580px){.linked-call-v2[data-panel=true] .lc-workspace{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(110px,1fr) minmax(100px,40%)}.lc-caption-panel{border-left:0;border-top:1px solid var(--border,#2b5260)}.lc-controls .lc-shape,.lc-controls .lc-rotate,.lc-controls .lc-swap{display:none}.lc-controls .lc-mode{max-width:180px}.lc-top{padding:4px 8px}.lc-state{font-size:10px}}

.linked-call-v2 .lc-captions article header{background:none;border:0;padding:0;margin:0;min-height:0;font-weight:400}.linked-call-v2 .lc-caption-panel>header{background:none;border:0;margin:0}.linked-call-v2 .lc-caption-panel>header strong{font-size:12px;letter-spacing:0}.linked-call-v2 .lc-top{margin:0}.lc-floating .lc-film-settings{display:none}

.linked-call-v2:fullscreen .lc-caption-panel{padding-top:42px;padding-bottom:78px}

.lc-return{position:fixed;right:18px;top:12px;z-index:32;padding:8px 12px;border:1px solid var(--border);border-radius:18px;background:var(--surface);color:var(--ink);font:12px system-ui}.lc-return[hidden]{display:none}

/* Small mobile-style reactions sit beside the bubble without increasing it. */
#linked-chat .chat-message:not(.mine){margin-right:34px;max-width:min(520px,calc(100% - 40px))}
#linked-chat .chat-like{position:absolute;right:-31px;bottom:3px;width:28px;height:28px;padding:5px;display:grid;place-items:center;border:0;background:transparent;color:var(--muted);cursor:pointer;opacity:.8;border-radius:50%}
#linked-chat .chat-like svg{width:17px;height:17px}#linked-chat .chat-like:hover{background:var(--panel);opacity:1}#linked-chat .chat-like.is-liked{color:#ff6477;opacity:1}#linked-chat .chat-like.is-liked svg{fill:currentColor}#linked-chat .chat-peer-heart{color:#ff6477;font-size:13px}
#linked-chat .chat-receipt,#linked-chat .contact-receipt{color:var(--receipt-unread);display:inline-flex;align-items:center;letter-spacing:0;line-height:1}#linked-chat .chat-receipt svg,#linked-chat .contact-receipt svg{width:18px;height:14px;display:block}
:root[data-theme=light] #linked-chat .chat-like.is-liked,:root[data-theme=light] #linked-chat .chat-peer-heart{color:#c7314b}

#linked-chat .call-record-head{display:flex;align-items:center;gap:9px}#linked-chat .call-record-head>svg{width:22px;height:22px;flex:0 0 22px}#linked-chat .call-record-head>strong{font-size:13px;flex:1}#linked-chat .call-record-head time{font-size:10px;color:var(--muted)}#linked-chat .chat-call-record{width:280px;max-width:90%;padding:11px 13px;border-radius:12px}#linked-chat .chat-call-record p{font-size:12px;margin:5px 0;color:var(--muted)}#linked-chat .chat-call-record button{padding:6px 10px;min-height:30px;font-size:12px;margin-top:4px}
#linked-chat .chat-sticker{width:140px;height:140px;object-fit:contain}#linked-chat .chat-expression-tabs{display:flex;gap:4px;overflow-x:auto;padding-bottom:9px;flex:none}#linked-chat .chat-expression-tabs button{min-width:38px;max-width:42px;padding:4px;background:var(--panel);border:0;border-radius:8px}#linked-chat .chat-expression-tabs img{width:32px;height:32px;object-fit:contain}#linked-chat .chat-sticker-picker{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;max-height:360px;overflow-y:auto}#linked-chat .chat-sticker-option{background:transparent;border:0;padding:4px}#linked-chat .chat-sticker-option img{width:100%;height:80px;object-fit:contain}#linked-chat .chat-emoji-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(36px,1fr));gap:3px;max-height:340px;overflow-y:auto}#linked-chat .chat-emoji-picker button{font-size:24px;border:0;background:transparent;padding:5px;min-width:36px}#linked-chat .chat-emoji-art{display:inline-grid;position:relative;vertical-align:middle;width:1.7em;height:1.7em;padding:0;border:0;background:transparent;font:inherit;color:inherit;cursor:pointer;place-items:center}#linked-chat .chat-emoji-animation{position:absolute;inset:0;pointer-events:none}#linked-chat .chat-emoji-art.is-animated .chat-emoji-static{visibility:hidden}
.instant-tooltip{position:fixed;z-index:2147483647;pointer-events:none;max-width:240px;padding:6px 9px;border:1px solid var(--border,#315560);border-radius:7px;background:var(--surface,#13303e);color:var(--ink,#f0faf8);font:12px/1.35 system-ui;box-shadow:0 3px 14px #0003}
.tv-mirroring{max-width:min(490px,calc(100vw - 32px));max-height:85dvh;overflow:auto;border:1px solid var(--border);border-radius:16px;padding:20px;background:var(--surface);color:var(--ink);font:13px/1.5 system-ui}.tv-mirroring h2{font-size:18px}.tv-mirroring h3{font-size:14px;margin-bottom:4px}.tv-mirroring p{margin:6px 0 12px}.tv-mirroring a{color:var(--accent)}.tv-mirroring::backdrop{background:#0007}#chat-tv{width:30px;height:30px;padding:5px;background:none;border:0;color:var(--muted)}#chat-tv svg{width:19px;height:19px}
/* Composer stays quiet even while focused; typing caret remains visible. */
#linked-chat #message-input,#linked-chat #message-input:focus,#linked-chat #message-input:focus-visible{outline:none;outline-offset:0;box-shadow:none;border:1px solid var(--border)}
#linked-chat .composer:focus-within{outline:none;box-shadow:none}
:root[dir=rtl] #linked-chat .contact-open{text-align:right}:root[dir=rtl] #linked-chat .chat-message-tools{text-align:right}:root[dir=rtl] .lc-caption-panel{border-left:0;border-right:1px solid var(--border)}

#linked-chat .chat-library-item-actions{display:flex;gap:7px;margin-top:5px}#linked-chat .chat-library-item-actions button{font-size:11px;padding:4px 7px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--ink)}#linked-chat .chat-library-tabs{flex-wrap:wrap;gap:4px}#linked-chat .chat-library-tabs button{white-space:normal;font-size:11px;padding:6px 8px}

/* Keep both handles inside the circular video at every supported frame size. */
.lc-camera[data-shape=circle] .lc-move{left:50%;right:auto;bottom:18%;transform:translateX(-112%)}
.lc-camera[data-shape=circle] .lc-resize{left:50%;right:auto;bottom:18%;transform:translateX(12%)}
.lc-top .lc-exit-film{font-size:12px;padding:6px 10px;min-height:30px;margin-inline-start:auto}
/* Sidebar search stays visible without the old heavy composer focus ring. */
#linked-chat #chat-list-search{border:1px solid color-mix(in srgb,var(--border) 78%,var(--muted));background:var(--bg);border-radius:9px;box-shadow:none}
#linked-chat #chat-list-search:focus{outline:none;border-color:var(--primary);box-shadow:none}

/* Keep timeline scrolling independent of the composer and browser smoothing. */
#linked-chat .chat-timeline{scroll-behavior:auto;scroll-padding-bottom:12px}
#linked-chat .chat-input-area{isolation:isolate;background:var(--bg)}

/* One microphone audio path; camera previews never mirror or play audio twice. */
.linked-call-v2 .lc-camera video,.linked-call-v2 .lc-main{transform:none}
.lc-invitation{flex:none;display:flex;align-items:center;gap:10px;margin:10px 18px 0;padding:10px 12px;border:1px solid var(--border,#2b5260);border-radius:12px;background:var(--panel,#123040);color:var(--ink,#e8f8f6);font:12px/1.4 system-ui;z-index:26}.lc-invitation[hidden]{display:none}.lc-invite-icon svg{width:22px;height:22px;display:block}.lc-invite-copy{min-width:0;flex:1}.lc-invite-copy strong,.lc-invite-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lc-invite-copy span,.lc-invitation time{color:var(--muted,#a5c9cc)}.lc-invitation time{font-variant-numeric:tabular-nums}.lc-invitation button{font:inherit;padding:7px 10px;border:0;border-radius:8px;cursor:pointer}.lc-invite-accept{background:#008675;color:white}.lc-invite-end{background:#c83949;color:white}.lc-invitation button:disabled{opacity:.5}.lc-invitation button[hidden]{display:none}
.lc-mixer{position:relative}.lc-mixer summary{list-style:none;cursor:pointer;border:1px solid var(--border,#2b5260);border-radius:9px;padding:7px;height:34px;box-sizing:border-box}.lc-mixer summary::-webkit-details-marker{display:none}.lc-mixer-popover{position:absolute;bottom:calc(100% + 10px);inset-inline-start:0;width:225px;max-width:70vw;z-index:30;padding:14px;background:var(--panel,#123040);border:1px solid var(--border,#2b5260);border-radius:12px;box-shadow:0 5px 24px #0005}.lc-mixer-popover>div{display:flex;justify-content:space-between;gap:12px}.lc-mix{display:block;width:100%;margin:12px 0;accent-color:#27bda5}.lc-mixer:focus-within summary{outline:2px solid var(--accent,#51e3c2);outline-offset:2px}
@media(max-width:580px){.lc-invitation{margin:8px;gap:7px;padding:8px}.lc-invite-icon{display:none}}

.linked-call-v2 .lc-original-audio{display:none}.linked-call-v2 .lc-controls button{display:inline-flex;align-items:center;justify-content:center}.linked-call-v2 .lc-controls .lc-end{padding:0}.linked-call-v2 .lc-controls .lc-end svg{flex:none;margin:0}

/* Keep the compact tick geometry; distinguish read receipts on both bubble and list surfaces. */
#linked-chat .chat-receipt[data-status=read] svg,#linked-chat .contact-receipt.is-read svg{stroke-width:1.8}

/* Recording fills the composer; cancel stays at the leading edge. */
#linked-chat #chat-recording .chat-wave{justify-content:space-between;gap:2px}
#linked-chat #chat-recording button{width:34px;height:34px;min-height:34px;padding:7px;display:grid;place-items:center}
#linked-chat #chat-recording button svg{width:20px;height:20px}
#linked-chat #chat-record-time{white-space:nowrap;color:var(--muted);font-size:11px}
#linked-chat .chat-recording.record-warning #chat-record-time{color:#f5bd54}
#linked-chat .chat-recording.record-critical #chat-record-time{color:#ff7188}
:root[data-theme=light] #linked-chat .chat-recording.record-warning #chat-record-time{color:#886000}
:root[data-theme=light] #linked-chat .chat-recording.record-critical #chat-record-time{color:#b32e44}
#linked-chat .chat-voice-track .chat-wave{justify-content:space-between}
/* Media uses the full viewport without cropping portrait or landscape content. */
#linked-chat .chat-dialog.media-viewer[open]{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;padding:14px 20px;background:var(--bg);display:flex;flex-direction:column;overflow:hidden}
#linked-chat .media-viewer> .row{flex:none;gap:12px;min-width:0}
#linked-chat .media-viewer h2{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
#linked-chat .media-viewer #chat-dialog-body{display:flex;flex-direction:column;flex:1;min-height:0;margin-top:8px;gap:8px}
#linked-chat .chat-viewer-stage{position:relative;flex:1;min-height:0;min-width:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:pan-y}
#linked-chat .media-viewer .chat-viewer-stage img.chat-full-image,#linked-chat .media-viewer .chat-viewer-stage video{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;border-radius:0;background:transparent}
#linked-chat .chat-viewer-controls{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;flex:none;padding:4px 0}
#linked-chat .chat-viewer-controls button{font-size:12px;min-height:32px;padding:6px 10px}
#linked-chat .chat-viewer-counter{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
#linked-chat .chat-viewer-arrow{position:absolute;top:50%;transform:translateY(-50%);width:40px;height:40px;padding:8px;border-radius:50%;display:grid;place-items:center;background:var(--surface);color:var(--ink);z-index:1}
#linked-chat .chat-viewer-arrow.prev{left:8px}#linked-chat .chat-viewer-arrow.next{right:8px}
#linked-chat .chat-viewer-arrow:disabled{visibility:hidden}#linked-chat .chat-viewer-arrow svg{width:22px;height:22px}
@media(max-width:680px){#linked-chat .chat-dialog.media-viewer[open]{padding:10px}.chat-viewer-controls .small{margin:0}}

#linked-chat .chat-message.expression-message,:root[data-theme=light] #linked-chat .chat-message.expression-message{background:transparent;border:0;box-shadow:none;padding:4px 6px}
#linked-chat .emoji-only .chat-text-content{font-size:36px;line-height:1.25;white-space:normal}
#linked-chat .emoji-only[data-emoji-count="1"] .chat-text-content{font-size:64px}
#linked-chat .emoji-only[data-emoji-count="2"] .chat-text-content{font-size:52px}
#linked-chat .emoji-only[data-emoji-count="3"] .chat-text-content{font-size:44px}
#linked-chat .emoji-only .chat-emoji-art{width:1.15em;height:1.15em}
#linked-chat .expression-message .chat-sticker{display:block;width:160px;height:160px}

/* Consent and recovery inherit the active palette, including light themes. */
.lc-share-invitation{position:fixed;inset-block-start:24px;inset-inline:16px;margin-inline:auto;z-index:160;width:min(480px,calc(100% - 32px));box-sizing:border-box;display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;padding:18px;border:1px solid var(--border);border-radius:18px;background:var(--panel);color:var(--ink);box-shadow:0 16px 48px #0003;font:13px/1.5 system-ui}.lc-share-invitation[hidden]{display:none!important}.lc-share-symbol{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:color-mix(in srgb,var(--accent) 14%,var(--panel));color:var(--accent)}.lc-share-symbol svg{width:23px;height:23px}.lc-share-copy strong{font-size:14px}.lc-share-copy p{margin:4px 0 0;color:var(--muted);overflow-wrap:anywhere}.lc-share-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px}.lc-share-actions button{font:inherit;border:1px solid var(--border);padding:9px 14px;border-radius:10px;background:var(--surface);color:var(--ink);cursor:pointer}.lc-share-actions .lc-share-accept{background:var(--accent);color:var(--bg);border-color:var(--accent);font-weight:600}.lc-share-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.lc-top .lc-retry-translation,.lc-top .lc-translation-toggle{display:inline-flex;align-items:center;gap:7px;font-size:11px;border:1px solid var(--border);background:var(--panel);color:var(--ink);border-radius:10px}.lc-top .lc-retry-translation{color:var(--accent)}.lc-retry-translation[aria-busy=true] svg{animation:lc-reconnecting 1.4s linear infinite}.lc-top{flex-wrap:wrap}.lc-top .lc-translation-toggle[aria-pressed=false]{color:var(--muted)}@keyframes lc-reconnecting{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.lc-retry-translation[aria-busy=true] svg{animation:none}}@media(max-width:600px){.lc-top .lc-translation-toggle span{display:none}}

/* Reset native popover placement; coordinates are clamped to the viewport. */
.instant-tooltip{inset:auto;margin:0;width:max-content;box-sizing:border-box;max-width:min(260px,calc(100vw - 12px));overflow-wrap:anywhere}

.permission-help{padding:14px 16px;margin:8px 0;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--ink);font-size:13px;line-height:1.5;text-align:start;max-width:640px;box-shadow:0 8px 24px #0001}
.permission-help p{margin:7px 0;color:var(--muted)}
.permission-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.permission-actions button{font-size:12px;min-height:34px;padding:6px 11px;border-radius:9px}

.contact-live-activity .contact-snippet{color:var(--accent);font-style:italic;font-weight:500}

/* Shared mobile text-bubble layout: one translation affordance at the text's
   upper trailing corner; the clock and receipts keep their own bottom line. */
#linked-chat .chat-text-body{position:relative;min-width:0}
#linked-chat .chat-text-body.has-translation{padding-inline-end:23px;min-height:20px}
#linked-chat .chat-text-body>.chat-text-swap{position:absolute;inset-block-start:-3px;inset-inline-end:-2px;width:22px;height:22px;padding:4px}
#linked-chat .chat-text-body>.chat-text-swap svg{width:14px;height:14px}
#linked-chat .chat-translation-pending{position:absolute;inset-block-start:1px;inset-inline-end:3px;width:12px;height:12px;box-sizing:border-box;border:1.7px solid color-mix(in srgb,var(--muted) 25%,transparent);border-top-color:var(--muted);border-inline-end-color:var(--muted);border-radius:50%;animation:chat-loading .85s linear infinite}
@media(prefers-reduced-motion:reduce){#linked-chat .chat-translation-pending{animation:none}}

/* A single softened corner language without changing hit targets or spacing. */
#linked-chat .icon-btn,#linked-chat .chat-call-actions button,#linked-chat #message-input,
#linked-chat #chat-record-stop,#linked-chat #chat-record-cancel,
.linked-call-v2 .lc-controls button,.linked-call-v2 .lc-controls select,
.linked-call-v2 .lc-top button,.linked-call-v2 .lc-caption-panel>header button,
.linked-call-v2 .lc-text-form textarea{border-radius:16px}

/* Mobile expression tray: a dedicated smile/keyboard toggle inside the field. */
#linked-chat .chat-composer-field{display:flex;align-items:center;flex:1;min-width:0;border:1px solid var(--border);border-radius:16px;background:var(--surface);padding-inline:3px}
#linked-chat .chat-composer-field #message-input{width:0;min-width:0;flex:1;border:0;background:transparent;padding-inline-start:4px}
#linked-chat #chat-expressions,#linked-chat #chat-expressions:hover{background:transparent;color:var(--muted);border:0;box-shadow:none;flex:none;align-self:center}
#linked-chat #chat-expressions[aria-expanded=true]{color:var(--accent);background:transparent}
#linked-chat .chat-expression-tray{position:absolute;bottom:calc(100% + 8px);inset-inline-start:0;z-index:30;width:min(400px,100%);height:clamp(190px,36dvh,278px);box-sizing:border-box;display:flex;flex-direction:column;gap:6px;padding:9px;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:0 -4px 24px #0002;overflow:hidden}
#linked-chat .chat-expression-tray[hidden]{display:none}
#linked-chat .chat-expression-tray button{display:grid;place-items:center;position:relative;min-height:32px;padding:4px;border:0;border-radius:12px;background:transparent;color:var(--ink);cursor:pointer}
#linked-chat .chat-expression-tray button:hover{background:color-mix(in srgb,var(--accent) 12%,transparent)}
#linked-chat .chat-expression-switch{display:flex;gap:6px;flex:none}
#linked-chat .chat-expression-switch button{display:flex;justify-content:center;align-items:center;gap:6px;flex:1;font-size:12px;border-radius:16px;padding:6px 10px}
#linked-chat .chat-expression-switch svg{width:17px;height:17px}
#linked-chat .chat-expression-switch [aria-selected=true],#linked-chat .chat-expression-categories [aria-pressed=true]{color:var(--accent);background:color-mix(in srgb,var(--accent) 13%,transparent)}
#linked-chat .chat-expression-quick,#linked-chat .chat-expression-categories{display:flex;gap:3px;overflow:auto;flex:none;scrollbar-width:thin;overscroll-behavior:contain}
#linked-chat .chat-expression-quick[hidden]{display:none}
#linked-chat .chat-expression-quick button{width:38px;height:38px;flex:none;font-size:25px}
#linked-chat .chat-expression-categories button{min-width:32px;height:32px;font-size:20px;flex:none}
#linked-chat .chat-expression-quick img{width:34px;height:34px;object-fit:contain}
#linked-chat .chat-expression-categories img{width:28px;height:28px;object-fit:contain}
#linked-chat .chat-expression-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:3px;overflow:auto;min-height:0;flex:1;align-content:start;overscroll-behavior:contain;scrollbar-width:thin}
#linked-chat .chat-expression-grid button{font-size:25px;aspect-ratio:1;min-width:0;min-height:32px}
#linked-chat .chat-expression-grid.stickers{grid-template-columns:repeat(auto-fit,minmax(56px,1fr))}
#linked-chat .chat-expression-grid.stickers button{max-height:72px}
#linked-chat .chat-expression-grid.stickers img{width:100%;height:100%;min-height:0;object-fit:contain}
#linked-chat .chat-expression-grid p{grid-column:1/-1;margin:8px}
#linked-chat .chat-expression-tray .is-favorite:after{content:'★';position:absolute;inset-block-start:0;inset-inline-end:1px;font:9px/1 system-ui;color:var(--accent)}

/* A compact in-app message alert never participates in chat layout. */
#linked-chat .chat-message-banner{position:fixed;inset-block-start:14px;inset-inline-end:18px;z-index:120;display:flex;align-items:center;width:min(340px,calc(100vw - 36px));border:1px solid var(--border);border-radius:16px;background:var(--surface);box-shadow:0 8px 30px #0003;overflow:hidden}
#linked-chat .chat-message-banner button{background:transparent;border:0;color:var(--ink);cursor:pointer}
#linked-chat .chat-message-banner-open{display:grid;gap:4px;text-align:start;min-width:0;flex:1;padding:12px 14px}
#linked-chat .chat-message-banner-open strong{font-size:13px}
#linked-chat .chat-message-banner-open span{font-size:12px;color:var(--muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#linked-chat .chat-message-banner-close{height:34px;width:34px;min-width:34px;font-size:20px;margin-inline-end:6px;border-radius:16px}

/* Conversation viewer: the footer never takes space from its own controls. */
#linked-chat .chat-gallery-footer{display:flex;align-items:center;flex:none;gap:12px;min-height:68px;min-width:0;border-top:1px solid var(--border);padding-top:8px}
#linked-chat .chat-gallery-rail{display:flex;align-items:center;gap:7px;flex:1;min-width:0;overflow:auto hidden;overscroll-behavior-x:contain;scrollbar-width:thin;padding:5px 3px}
#linked-chat .chat-gallery-rail .chat-media-tile{flex:0 0 50px;width:50px!important;height:50px;aspect-ratio:1;min-height:0;border:2px solid transparent;border-radius:10px;padding:0;background:var(--surface);overflow:hidden}
#linked-chat .chat-gallery-rail .chat-media-tile[aria-current=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
#linked-chat .chat-gallery-rail .chat-media-preview{width:100%;height:100%;object-fit:cover}
#linked-chat .chat-gallery-rail .chat-media-play{width:18px;height:18px}#linked-chat .chat-gallery-rail .chat-media-duration{display:none}
#linked-chat .chat-gallery-more{flex:none;width:28px;height:42px;border:0;background:transparent;padding:0}
#linked-chat .chat-gallery-footer>.chat-viewer-controls{flex:none;max-width:44%;gap:6px}
#linked-chat .chat-gallery-status:empty{display:none}#linked-chat .chat-gallery-status{flex:none;text-align:center;font-size:12px}
#linked-chat .chat-gallery-loading{color:var(--muted);font-size:13px}
#linked-chat .chat-dialog.media-library[open]{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:16px 24px;border:0;border-radius:0;display:flex;flex-direction:column;background:var(--bg);overflow:hidden}
#linked-chat .media-library #chat-dialog-body{flex:1;min-height:0;overflow:auto;margin-top:12px}
#linked-chat .media-library .chat-library-tabs{position:static;background:transparent;justify-content:center;margin-bottom:10px}
#linked-chat .media-library .chat-library-content{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
#linked-chat .media-library .chat-library-card{position:relative;aspect-ratio:1;overflow:hidden;border-radius:10px;background:var(--surface)}
#linked-chat .media-library .chat-library-card .chat-media-tile{width:100%;max-width:none;height:100%;aspect-ratio:1;min-height:0;border:0}
#linked-chat .media-library .chat-library-card .chat-media-preview{width:100%;height:100%;object-fit:cover}
#linked-chat .media-library .chat-library-card>.small,#linked-chat .media-library .chat-library-item-actions{display:none}
#linked-chat .media-library .library-more{display:block;margin:16px auto}
@media(max-width:800px){#linked-chat .chat-gallery-footer{flex-wrap:wrap;gap:6px}#linked-chat .chat-gallery-rail{flex-basis:70%}#linked-chat .chat-gallery-footer>.chat-viewer-controls{max-width:none;width:100%}#linked-chat .chat-gallery-all{font-size:11px;padding:6px}}

#linked-chat #message-form>button[type=submit][hidden]{display:none!important}
#linked-chat #chat-mic.chat-composer-primary{background:var(--accent);color:var(--bg);border-color:transparent;border-radius:50%;flex-shrink:0}
#linked-chat #chat-mic.chat-composer-primary svg{animation:composer-glyph-in 140ms ease-out;transform-origin:center}
@keyframes composer-glyph-in{from{opacity:0;transform:scale(.7) rotate(-18deg)}to{opacity:1;transform:scale(1) rotate(0)}}
@media(prefers-reduced-motion:reduce){#linked-chat #chat-mic.chat-composer-primary svg{animation:none}}

#linked-chat .media-library #chat-dialog-body{gap:6px}
#linked-chat .media-library .chat-library-tabs{padding:2px 0;margin-bottom:0;flex-shrink:0}
#linked-chat .media-library .chat-library-tabs button{min-height:28px;padding:4px 8px}
#linked-chat .media-library .chat-library-content{flex-shrink:0;margin-top:6px}

/* Four visible text rows; long dictation stays inside the composer. */
#linked-chat textarea#message-input{display:block;box-sizing:border-box;resize:none;min-height:38px;max-height:96px;height:38px;margin:0;padding:8px 10px;font:inherit;font-size:13px;line-height:20px;color:var(--ink);background:transparent;overflow-y:hidden;overscroll-behavior:contain;scrollbar-width:thin}
#linked-chat .chat-input-area .composer{align-items:flex-end}
#linked-chat .chat-composer-field #chat-expressions{align-self:flex-end;margin-block-end:2px}

/* Live voice draft shares the four-row composer, with one highlighted latest word. */
#linked-chat .chat-composer-field{position:relative}
#linked-chat .chat-live-transcript{position:absolute;box-sizing:border-box;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:14px;line-height:20px;pointer-events:none;color:var(--ink)}
#linked-chat #message-input.live-transcribing{color:transparent;caret-color:transparent}
#linked-chat .chat-live-word{color:var(--accent);animation:live-word-in 140ms ease-out}
#linked-chat.voice-capturing #chat-plus,#linked-chat.voice-capturing #chat-mic,#linked-chat.voice-capturing .chat-expression-toggle{visibility:hidden;pointer-events:none}
@keyframes live-word-in{from{opacity:.35}to{opacity:1}}
@media(prefers-reduced-motion:reduce){#linked-chat .chat-live-word{animation:none}}

/* Sender identity sits above received bubbles, like mobile; the tiny portrait is desktop/web only. */
#linked-chat .chat-message.has-peer-author{margin-block-start:20px}
#linked-chat .chat-peer-author{position:absolute;inset-block-end:100%;inset-inline-start:3px;display:flex;align-items:center;gap:5px;inline-size:max-content;max-inline-size:min(280px,calc(100vw - 64px));block-size:16px;margin-block-end:3px;line-height:1;font-size:10px;white-space:nowrap;color:var(--muted)}
#linked-chat .chat-peer-author-avatar{inline-size:16px;block-size:16px;flex:0 0 16px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:var(--panel);font-size:8px;color:var(--muted)}
#linked-chat .chat-peer-author-avatar img{display:block;inline-size:100%;block-size:100%;object-fit:cover;border-radius:50%}
#linked-chat .chat-peer-author-name{font-weight:600;max-inline-size:120px;overflow:hidden;text-overflow:ellipsis}
#linked-chat .chat-peer-author-nickname{font-weight:400;font-style:italic;color:var(--ink);min-inline-size:0;overflow:hidden;text-overflow:ellipsis}

/* Equal icon slots keep the account row balanced in narrow windows. */
#linked-chat .chat-account-bar{gap:4px;min-height:50px;box-sizing:border-box}
#linked-chat .chat-account-bar :is(#chat-update,#chat-theme-toggle,#chat-tv,#chat-open-devices){align-self:center;display:grid;place-items:center;flex:0 0 32px;min-width:32px;width:32px;min-height:32px;height:32px;margin:0;padding:0;border:0;border-radius:11px;background:transparent;color:var(--muted)}
#linked-chat .chat-account-bar :is(#chat-update,#chat-theme-toggle,#chat-tv,#chat-open-devices) svg{display:block;width:20px;height:20px}
#linked-chat .chat-account-bar #chat-update[data-update=available]{color:var(--accent)}
#linked-chat .chat-account-bar #chat-self-profile{overflow:hidden}
#linked-chat .chat-own-name{min-width:0}
@media(hover:hover) and (pointer:fine){#linked-chat .chat-account-bar :is(#chat-update,#chat-theme-toggle,#chat-tv,#chat-open-devices):hover{color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}}

/* Override older installed Mac shells as well as the current native style. */
html[data-desktop=mac] .linked-call-v2:fullscreen{grid-template-rows:minmax(0,1fr)}

/* One expanding composer: editable/live text above recording controls. */
#linked-chat.voice-draft-open .chat-composer-field{display:grid;grid-template-columns:minmax(0,1fr);padding:6px;border-radius:22px}
#linked-chat.voice-draft-open .chat-composer-field #message-input{width:100%;min-height:58px;padding:8px 10px;grid-row:1}
#linked-chat.voice-draft-open #chat-expressions{display:none!important}
#linked-chat.voice-draft-open #chat-recording{grid-row:2;box-sizing:border-box;width:100%;min-width:0;padding:4px;border:0;background:transparent;border-radius:0;gap:8px}
#linked-chat.voice-draft-open #chat-record-time{font-size:11px;color:var(--muted);white-space:nowrap}
#linked-chat.voice-capturing #chat-plus,#linked-chat.voice-capturing #chat-mic{display:none}
#linked-chat #chat-recording .chat-wave span{max-width:none;min-width:1px}
#linked-chat #chat-recording[hidden],#linked-chat .chat-live-transcript[hidden]{display:none!important}

/* A detached call has its own layout, independent of native desktop overrides. */
.lc-pip-back{display:none}
html body.lc-pip-body{margin:0;padding:0!important;overflow:hidden;width:100vw;height:100dvh}
html body.lc-pip-body .linked-call-v2.lc-floating{display:flex;flex-direction:column;width:100%;height:100%;min-height:0}
html body.lc-pip-body .lc-floating .lc-workspace{flex:1 1 0;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
html body.lc-pip-body .lc-floating :is(.lc-original-audio,.lc-top,.lc-caption-panel,.lc-film-setup){display:none!important}
html body.lc-pip-body .lc-floating .lc-error{flex:none;max-height:48px;overflow:auto}
html body.lc-pip-body .lc-floating .lc-error:empty{display:none}
html body.lc-pip-body .lc-floating .lc-controls{flex:none;flex-wrap:nowrap;gap:6px;padding:6px;min-height:46px}
html body.lc-pip-body .lc-floating .lc-controls>:not(.lc-pip-back):not(.lc-mic):not(.lc-video):not(.lc-shape):not(.lc-swap):not(.lc-end){display:none!important}
html body.lc-pip-body .lc-floating .lc-controls :is(.lc-pip-back,.lc-swap){display:flex}
html body.lc-pip-body .lc-floating .lc-controls button{display:grid;place-items:center;width:36px;height:34px;min-height:34px;padding:6px;flex:none}

html body.lc-pip-body .lc-floating .lc-controls .lc-shape{display:block;flex:0 1 88px;width:88px;min-width:60px;max-width:88px;height:34px;min-height:34px;padding:4px 22px 4px 7px;font-size:11px}

/* Local capture stays private until the explicit invitation is sent and accepted. */
.lc-film-setup .lc-share-preview{display:block;width:100%;height:clamp(100px,24vh,200px);object-fit:contain;background:var(--bg,#071d2b);border-radius:12px;margin:12px 0}
.lc-film-setup .lc-share-status{color:var(--muted,#a5c9cc);font-size:12px}
.lc-film-setup .lc-send-share{background:var(--accent,#51e3c2);color:var(--on-accent,#073b35);border-color:transparent;font-weight:600}

/* Compact call chrome: readable at narrow desktop widths, with touch targets intact. */
.linked-call-v2 .lc-top{gap:8px;padding:6px 12px;min-height:44px}
.linked-call-v2 .lc-top button{font-size:12px;gap:6px;min-height:34px}
.linked-call-v2 .lc-film-setup{width:min(460px,calc(100% - 24px));padding:16px;border-radius:18px}
.linked-call-v2 .lc-film-setup h3{font-size:16px;margin:0 0 10px}
.linked-call-v2 .lc-film-setup p{font-size:13px;line-height:1.5;margin:8px 0}
.linked-call-v2 .lc-share-options{gap:6px}
.linked-call-v2 .lc-share-note{font-size:11px;opacity:.8}
.lc-share-invitation{width:min(400px,calc(100% - 24px));padding:12px;gap:10px;border-radius:18px}
.lc-share-invitation .lc-share-symbol{width:36px;height:36px}
.lc-share-invitation .lc-share-copy strong{font-size:14px}
.lc-share-invitation .lc-share-copy p{font-size:13px;line-height:1.45;margin:4px 0}
@media (max-width:700px){.linked-call-v2 .lc-top{gap:6px}.linked-call-v2 .lc-top .lc-title{font-size:13px}.linked-call-v2 .lc-top .lc-state{flex-basis:100%;order:2}.linked-call-v2 .lc-controls{padding:6px 8px}.linked-call-v2 .lc-mode{max-width:190px}}
@media (pointer:coarse){.linked-call-v2 .lc-top button,.linked-call-v2 .lc-controls button,.linked-call-v2 .lc-controls summary{min-height:44px;min-width:44px}}

/* Shared source controls live in the same auto-hiding call toolbar. */
.lc-playback{display:flex;align-items:center;gap:8px;min-width:0}.lc-playback[hidden]{display:none}.lc-playback-seek{width:clamp(70px,12vw,160px);accent-color:var(--accent)}.lc-playback-time{font-size:12px;font-variant-numeric:tabular-nums}.lc-controls .lc-playback button{flex:none}.lc-controls .lc-playback input{min-width:0}

.lc-playback-help{font-size:12px;line-height:1.5;margin-top:10px}.lc-playback-help summary{cursor:pointer}.lc-playback-help p{font-size:12px;margin:8px 0}.lc-playback-help a{display:inline-block;margin-top:8px;color:var(--accent)}
