.direct-chat{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;height:calc(100dvh - 245px);min-height:400px;border:1px solid var(--line);border-radius:24px;background:#fff;overflow:hidden}
.direct-chat-header{display:flex;align-items:center;gap:14px;padding:16px 20px;border-bottom:1px solid var(--line)}
.direct-chat-header>div{flex:1;min-width:0}.direct-chat-header strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:19px}.direct-chat-header small{display:block;color:var(--muted);margin-top:4px}
.chat-back{padding:0;width:40px;height:44px;min-height:44px;background:transparent;color:var(--ink);font-size:30px;flex:0 0 auto}
.direct-chat-log{min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px;display:flex;flex-direction:column;gap:12px;background:var(--chat-canvas,#f5f5fa);scrollbar-gutter:stable}
.direct-message{position:relative;display:flex;gap:4px;align-items:flex-start;max-width:min(85%,660px);padding:13px 12px 13px 17px;border-radius:18px;background:white;border:1px solid #e4e6ef;align-self:flex-start;overflow-wrap:anywhere}
.direct-message.own{align-self:flex-end;background:var(--chat-own-bg,#eae9ff);border-color:var(--chat-own-line,#dcdbf6);border-bottom-right-radius:6px}.direct-message.peer{border-bottom-left-radius:6px}
.direct-chat[data-chat-theme=lavender]{--chat-own-bg:#eae9ff;--chat-own-line:#dcdbf6;--chat-canvas:#f5f5fa}
.direct-chat[data-chat-theme=orange]{--chat-own-bg:#fff0ea;--chat-own-line:#f6dcd3;--chat-canvas:#faf6f4}
.chat-appearance-hint{margin:0 0 20px;color:var(--muted);font-size:14px;line-height:1.5}
.chat-theme-options{display:grid;gap:8px;min-width:0;margin:0;padding:0;border:0}
.chat-theme-option{display:flex;align-items:center;gap:12px;min-height:52px;margin:0;padding:12px;border:1px solid var(--line);border-radius:12px;color:var(--ink);font-size:15px;font-weight:600;line-height:1.4;cursor:pointer}
.chat-theme-option:has(input:checked){border-color:var(--navy);background:#f7f8fc}
.chat-theme-option input{flex:0 0 18px;width:18px;height:18px;min-height:0;margin:0;padding:0;accent-color:var(--navy)}
.chat-theme-option>span:not(.chat-theme-swatch){flex:1;min-width:0;overflow-wrap:anywhere}
.chat-theme-swatch{flex:0 0 44px;height:26px;border-radius:10px 10px 3px 10px;border:1px solid}
.chat-theme-swatch[data-theme=lavender]{background:#eae9ff;border-color:#dcdbf6}
.chat-theme-swatch[data-theme=orange]{background:#fff0ea;border-color:#f6dcd3}
.chat-appearance-status{margin:12px 0;color:var(--bad);font-size:14px;line-height:1.5}.chat-appearance-status:empty{display:none}
.chat-appearance .main-action{width:100%;margin:20px 0 0;min-height:48px;background:var(--accent);color:var(--accent-text,#fff);font-weight:650}
.chat-appearance .main-action:not(:disabled):hover{background:var(--accent-hover)}
.chat-appearance .main-action:disabled{background:#dce2ef;color:#4d5a78}
.direct-message-text{min-width:0;flex:1}.direct-message p{white-space:pre-wrap;font-size:16px;line-height:1.5;margin:0}.direct-message small{display:block;color:#66708e;white-space:pre-wrap;line-height:1.5;margin-top:7px}
.direct-chat-status{margin:0;padding:9px 20px;font-size:12px;color:var(--muted);line-height:1.5;border-top:1px solid var(--line)}
.direct-chat-status[data-audio-notice]{display:flex;align-items:center;flex-wrap:wrap;column-gap:12px;row-gap:4px}
.direct-chat-status[data-audio-notice]>span{flex:1 1 180px}
.direct-chat-status .chat-audio-retry{min-height:44px;max-width:100%;padding:4px 8px;border:0;background:transparent;color:var(--accent-ink);font-size:13px;font-weight:650;line-height:1.4}
.direct-chat-status:empty{display:none}.chat-language-setting{display:block;padding:10px 15px;font-size:12px;color:var(--muted)}.chat-language-setting select{display:block;width:100%;max-width:none;margin-top:6px;font-size:14px;height:44px}
.chat-day{position:relative;align-self:stretch;flex:none;height:0;min-height:0;padding:0;pointer-events:none}
.chat-day>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.direct-chat{position:relative;min-width:0}
.chat-scroll-date{position:absolute;top:88px;left:50%;z-index:2;max-width:calc(100% - 32px);transform:translateX(-50%);padding:5px 12px;border-radius:14px;background:#e8eaf1f5;color:#5d6782;font-size:12px;font-weight:600;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .18s ease,visibility .18s ease}
.chat-scroll-date.is-visible{opacity:1;visibility:visible}
@media(prefers-reduced-motion:reduce){.chat-scroll-date{transition:none}}
.direct-chat-composer{flex-wrap:wrap}
.reply-composer{grid-column:1 / -1;flex:0 0 100%;display:flex;align-items:center;gap:8px;min-width:0;width:100%;max-width:100%;box-sizing:border-box;padding:2px 0 2px 12px;border-left:3px solid var(--accent-ink)}
.reply-composer[hidden]{display:none!important}.reply-composer>div{flex:1;min-width:0}.reply-composer strong,.reply-composer span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.4}.reply-composer strong{color:var(--accent-ink);font-weight:650}
.reply-composer .reply-cancel{flex:none;width:44px;height:44px;min-height:44px;margin:0;padding:0;background:transparent;color:var(--muted);font-size:24px}
.direct-message .message-reply{display:block;width:100%;min-width:0;min-height:0;margin:0 0 8px;padding:4px 8px;border:0;border-left:3px solid var(--accent-ink);border-radius:4px;background:#ffffff60;color:var(--ink);text-align:start;box-shadow:none}
.message-reply strong,.message-reply span{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;line-height:1.35}.message-reply strong{color:var(--accent-ink)}
.direct-message.reply-ready::after{content:'↶';position:absolute;right:-28px;top:calc(50% - 12px);color:var(--navy);font-size:24px;line-height:1}
.direct-message.reply-highlight{outline:2px solid var(--accent-ink);outline-offset:2px}
.direct-chat-composer textarea:placeholder-shown{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.direct-chat-composer textarea::placeholder{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.composer-field{position:relative}.composer-counter{position:absolute;bottom:4px;right:12px;color:var(--muted);font-size:11px;line-height:1.2;white-space:nowrap;pointer-events:none;font-variant-numeric:tabular-nums}.composer-counter[hidden]{display:none}.composer-counter.over-limit{color:var(--bad)}.composer-field:has(.composer-counter:not([hidden])) textarea{padding-bottom:20px}
.settings-storage-link{width:100%;min-height:48px;margin:0 0 12px;padding:12px 0;background:transparent;color:var(--ink);text-align:start;border:0;border-bottom:1px solid var(--line);border-radius:0;font-size:15px}
.storage-settings>label{display:block;margin-top:20px;font-size:14px;font-weight:600}.storage-settings select{display:block;width:100%;margin-top:8px;font-size:16px;min-height:48px}.storage-settings .storage-used{margin:16px 0;font-size:14px;font-variant-numeric:tabular-nums}.storage-settings>.second{width:100%;margin-top:20px;min-height:48px}
.direct-chat .chat-send.recording{color:#fff;background:#b32821}
.number-check{margin:.5rem 0;padding:.45rem .65rem;border-radius:10px;background:#eff5f1;color:#315947;font-size:.8rem;overflow-wrap:anywhere}
.number-check-review{background:#fff4e5;color:#6c4319}
.number-check strong{font-size:inherit}
.number-check dl{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.2rem .6rem;margin:.35rem 0}
.number-check dt{font-weight:650}.number-check dd{margin:0}
.number-check-consent{display:flex;align-items:center;gap:.5rem;min-height:44px;margin:.3rem 0 0;font-size:inherit}
.number-check-consent input{width:1rem;height:1rem;margin:0;flex:none;accent-color:#ca452c}
.protocol-link{font-size:.9rem;font-weight:650;align-self:center;color:#a83929;text-underline-offset:.2em}
.cabinet-inbox{display:contents}
.cabinet-card.cabinet-invitation-highlight{border-color:var(--accent)}
.together-dialog{width:min(100% - 2rem,29rem)}
.together-dialog p{color:var(--muted);margin:0}
.together-dialog .together-feedback:not(:empty){margin-top:12px}
.together-dialog .together-feedback:empty{display:none}
.together-dialog .together-join{background:var(--accent);color:#fff;margin:20px 0 0}
.direct-chat-composer{display:flex;align-items:flex-end;gap:9px;padding:12px 16px;background:#fff}.direct-chat-composer textarea{flex:1;min-width:0;resize:none;min-height:46px;max-height:132px;font:inherit;font-size:16px;line-height:1.5;border:1px solid var(--line);border-radius:15px;padding:10px 13px;margin:0}
.direct-chat-composer select{width:116px;max-width:30%;height:46px;margin:0;font-size:13px;border-radius:13px}.chat-send{width:46px;height:46px;min-width:46px;padding:0;border-radius:50%;font-size:24px;background:var(--ink);color:#fff}.direct-chat-empty{margin:auto;text-align:center;color:var(--muted)}
.chat-menu{position:relative;flex:0 0 auto}.chat-menu summary{display:grid;place-items:center;list-style:none;width:36px;height:36px;cursor:pointer;font-size:25px;border-radius:10px;color:#6a7291}.chat-menu summary::-webkit-details-marker{display:none}.chat-menu summary:focus-visible{outline:2px solid #5264e9;outline-offset:2px}
.chat-menu[open] summary{background:#edf0f8}.chat-menu-items{position:absolute;right:0;top:40px;z-index:10;min-width:220px;max-width:75vw;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 12px 40px #1e244329;padding:6px}.chat-menu-items button{display:block;width:100%;text-align:left;border:0;white-space:normal;background:white;padding:13px 15px;font-size:14px;border-radius:10px}.chat-menu-items button:hover{background:#f3f4f9}
.direct-message .chat-menu summary{font-size:20px;width:28px;height:30px}.direct-message .chat-menu-items{top:32px}.direct-message .chat-menu{opacity:.55}.direct-message:hover .chat-menu,.direct-message:focus-within .chat-menu{opacity:1}
/* Media isolates its overlays. Raise the whole open message, not just the menu
   inside that stacking context, so later bubbles cannot cover its actions. */
.direct-message:has(>.chat-menu[open]){z-index:5}
.direct-message>.chat-menu[open]{opacity:1}
.direct-chat-header{position:relative;z-index:6}
@media(max-width:700px){.direct-chat{height:calc(100dvh - 250px);min-height:350px;border-radius:18px}.direct-chat-header{padding:11px 12px;gap:8px}.direct-chat-header strong{font-size:17px}.direct-chat-log{padding:14px 10px}.direct-message{max-width:93%;padding:11px 7px 11px 13px}.direct-chat-status{padding:7px 13px;font-size:11px}.direct-chat-composer{gap:6px;padding:10px}.direct-chat-composer select{width:82px;font-size:12px}.direct-chat-composer textarea{padding:10px;font-size:16px}.direct-chat-composer .chat-send{width:44px;min-width:44px;height:44px}}
html[data-duet-native="ios"] .direct-chat{height:calc(100dvh - 190px)}
html[data-duet-native="ios"][data-direct-chat="true"] #scr-cabinet{height:var(--direct-visible-height,100dvh);min-height:0;padding:var(--safe-top) 0 0;overflow:hidden}
html[data-duet-native="ios"][data-direct-chat="true"] .cabinet-header,html[data-duet-native="ios"][data-direct-chat="true"] #cabinet-title,html[data-duet-native="ios"][data-direct-chat="true"] #cabinet-description{display:none}
html[data-duet-native="ios"][data-direct-chat="true"] .cabinet-layout,html[data-duet-native="ios"][data-direct-chat="true"] .cabinet-main,html[data-duet-native="ios"][data-direct-chat="true"] #cabinet-content{height:100%;min-height:0;margin:0}
html[data-duet-native="ios"][data-direct-chat="true"] .direct-chat{height:100%;min-height:0;border:0;border-radius:0}
@media(max-width:899px){
 html[data-direct-chat="true"] #scr-cabinet{height:var(--direct-visible-height,100dvh);min-height:0;padding:var(--safe-top) 0 calc(80px + var(--safe-bottom));overflow:hidden}
 html[data-direct-chat="true"] .cabinet-header,html[data-direct-chat="true"] #cabinet-title,html[data-direct-chat="true"] #cabinet-description{display:none}
 html[data-direct-chat="true"] .cabinet-layout,html[data-direct-chat="true"] .cabinet-main,html[data-direct-chat="true"] #cabinet-content{height:100%;min-height:0;margin:0}
 html[data-direct-chat="true"] .direct-chat{height:100%;min-height:0;border:0;border-radius:0}
 html[data-duet-native="ios"][data-direct-chat="true"] #scr-cabinet{padding-bottom:0}
}
.admin-user-row{display:flex;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}.admin-user-row>span{flex:1;min-width:180px;overflow-wrap:anywhere}.admin-user-row select{width:150px;margin:0}.admin-user-row button{width:auto;margin:0}.admin-report{padding:18px 0;border-bottom:1px solid var(--line)}.admin-report p{white-space:pre-wrap;overflow-wrap:anywhere}.admin-section>input,.admin-section>select{font-size:16px}.admin-section>button{min-height:44px}.admin-section p{overflow-wrap:anywhere}
.direct-chat-composer,.direct-chat-composer:has(.business-tools){display:grid;grid-template-columns:minmax(0,1fr) 48px;align-items:end;gap:8px;padding:12px;flex-wrap:nowrap;background:#fff}
.chat-recording{flex:1;display:grid;grid-template-columns:7px minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0;width:100%;min-height:46px;padding:0 8px;color:var(--muted);font-size:14px;line-height:1.4}
.chat-recording[hidden]{display:none}.chat-recording time{flex:none;color:var(--ink);font-weight:650;font-variant-numeric:tabular-nums}
.direct-chat-composer [hidden],.direct-chat-composer.dictating .business-tools{display:none!important}
.chat-recording .recording-cancel{min-height:44px;width:auto;margin:0;padding:6px 4px;background:transparent;color:var(--accent-ink);font-size:14px;white-space:nowrap}
.recording-dot{flex:none;width:7px;height:7px;border-radius:50%;background:#d73832;animation:recording-pulse 1.2s ease-in-out infinite}
.direct-chat-composer .chat-send.recording{border-radius:14px;color:#fff;background:var(--accent);animation:none}
@keyframes recording-pulse{50%{opacity:.35}}
@media(prefers-reduced-motion:reduce){.recording-dot{animation:none}}
.composer-field{display:flex;align-items:flex-end;min-width:0;min-height:48px;padding:0 4px;border:1px solid #e0e4ed;border-radius:24px;background:#f5f7fb;transition:border-color .15s}
.composer-field:focus-within{border-color:#a4afd4}
.direct-chat-composer .composer-field textarea,.direct-chat-composer:has(.business-tools) .composer-field textarea{display:block;flex:1;width:0;min-width:0;min-height:46px;max-height:132px;padding:12px 10px;border:0;border-radius:0;background:transparent;box-shadow:none;outline:none;font-size:16px;line-height:22px;margin:0}
.composer-field .business-tools{display:flex;align-items:center;gap:0;height:46px;flex:0 0 auto}
.composer-field .business-tool,.composer-field .emoji-picker summary{display:grid;place-items:center;width:40px;height:44px;min-height:44px;margin:0;padding:9px;background:transparent;border:0;border-radius:50%;color:#737d99}
.business-tool svg,.emoji-picker summary svg{display:block;width:22px;height:22px}
.direct-chat-composer .chat-send{display:grid;place-items:center;width:48px;min-width:48px;height:48px;min-height:48px;padding:12px;margin:0;border:0;border-radius:0;background:transparent;color:#1d2852;box-shadow:none;transition:color .15s,transform .15s}
.chat-send svg{display:block;width:24px;height:24px}.direct-chat-composer .chat-send:disabled{background:transparent;color:#b0b8cc;opacity:1;cursor:default}.direct-chat-composer .chat-send:not(:disabled):active{transform:scale(.96)}
.chat-back{width:44px;min-width:44px}.chat-menu summary{width:44px;height:44px}.direct-message .chat-menu summary{width:28px;height:30px}
.chat-icon-button{display:grid;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:10px;margin:0;border:0;border-radius:0;background:transparent;color:#737d99}.chat-icon-button[aria-pressed="true"]{color:#1d2852}.chat-icon-button svg{width:22px;height:22px}
#t-composer{grid-template-columns:minmax(0,1fr) 48px;align-items:end;gap:8px}#t-composer textarea{min-height:48px;padding:12px 14px;font-size:16px;line-height:22px;border-radius:18px;background:#f5f7fb;border:1px solid #e0e4ed}#t-composer #t-send{display:grid;place-items:center;width:48px;height:48px;min-height:48px;padding:12px;margin:0;background:transparent;color:#1d2852;border:0;border-radius:0;box-shadow:none}#t-composer #t-send:disabled{background:transparent;color:#b0b8cc;opacity:1}#t-send svg{width:24px;height:24px}
@media(prefers-reduced-motion:reduce){.direct-chat *{scroll-behavior:auto}}
.chat-attachment{display:block;max-width:100%;width:340px;max-height:420px;object-fit:contain;border-radius:12px;background:#e4e7f0}.direct-message-text:has(.chat-attachment) p:empty,.direct-message-text:has(.chat-attachment) small:empty{display:none}
.chat-media{width:340px;max-width:100%;min-height:140px;border-radius:12px;overflow:hidden;background:#edf0f5}
.chat-media.loaded{min-height:0;background:transparent}.chat-media .chat-attachment{width:100%;height:auto}
.direct-message.media-message{width:min(340px,85%);max-width:min(85%,660px);padding:0;border:0;background:transparent;border-radius:16px;isolation:isolate}
.media-message>.direct-message-text{position:relative;width:100%;flex:1}.media-message .chat-media{width:100%;max-width:100%;border-radius:16px;overflow:hidden}.media-message .chat-attachment{display:block;border-radius:16px;margin:0}
.media-message>.chat-menu{position:absolute;top:0;right:0;z-index:4}.media-message>.chat-menu>summary{display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;margin:0;padding:12px;color:#fff;background:transparent;border:0;border-radius:0;box-shadow:none}.media-message>.chat-menu>summary svg{display:block;width:20px;height:20px;filter:drop-shadow(0 1px 2px #18203a99)}.media-message>.chat-menu .chat-menu-items{color:var(--ink)}
.direct-message.media-message .message-time{position:absolute;right:12px;bottom:12px;z-index:3;display:flex;align-items:center;gap:3px;width:max-content;margin:0;padding:3px 6px;border-radius:7px;color:#fff;background:#18203a99;font-size:11px;line-height:14px;pointer-events:none}
.media-message .message-time .message-receipt{color:#dce0e8}.media-message .message-time .message-receipt.is-read{color:#fff}
.media-message .message-reply{margin:0 0 6px;background:var(--card)}
.chat-media{position:relative}.chat-media img{cursor:zoom-in}
.chat-video-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:48px;height:48px;min-height:48px;margin:auto;padding:10px;border:0;border-radius:0;background:transparent;color:#fff;filter:drop-shadow(0 1px 4px #18203a99)}.chat-video-play svg{width:28px;height:28px}.chat-video-duration{position:absolute;top:12px;left:12px;padding:3px 6px;border-radius:7px;background:#18203a99;color:#fff;font-size:11px;line-height:14px;pointer-events:none}.chat-video-duration[hidden]{display:none}
.media-viewer[data-light-dismiss]{--duet-dialog-width:1100px;padding:16px;overflow:hidden}
.media-viewer>header{display:flex;align-items:center;gap:12px;margin-bottom:12px}.media-viewer>header h2{flex:1;min-width:0;margin:0;font-size:18px}.media-viewer-count{font-size:13px;color:var(--muted);white-space:nowrap}
.media-viewer>header button{display:flex;align-items:center;justify-content:center;flex:none;width:auto;min-height:44px;margin:0;padding:8px 12px;border:0;background:transparent;color:var(--ink);font-size:14px}.media-viewer>header .media-viewer-close{width:44px;padding:10px}.media-viewer-close svg{width:24px;height:24px}
.media-viewer-stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:180px;height:min(68dvh,760px);background:var(--bg);border-radius:12px;overflow:hidden}.media-viewer-stage>img,.media-viewer-stage>video{display:block;max-width:100%;max-height:100%;object-fit:contain}.media-viewer-stage>p{position:absolute;z-index:1;max-width:90%;margin:0;text-align:center;font-size:14px;color:var(--muted)}.media-viewer-stage>p[hidden]{display:none}.media-viewer-stage .media-viewer-retry{display:block;min-height:44px;margin:8px auto 0;padding:8px 12px;font-size:14px}
.media-viewer>nav{display:flex;justify-content:center;gap:24px;margin-top:8px}.media-viewer>nav button{width:44px;height:44px;min-height:44px;margin:0;padding:0;background:transparent;color:var(--ink);font-size:28px}.media-viewer>nav button:disabled{opacity:.3}
.chat-media [hidden]{display:none}.chat-media-feedback{display:flex;min-height:140px;padding:16px;box-sizing:border-box;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-size:13px;color:var(--muted);text-align:center}
.chat-media-feedback button{width:auto;min-height:44px;margin:0;padding:8px 14px;font-size:13px}
.business-tools{display:flex;align-items:center;gap:2px;flex:0 0 auto;position:relative}.business-tool,.emoji-picker summary{display:grid;place-items:center;background:transparent;color:var(--ink);font-size:27px;width:34px;height:44px;min-height:44px;padding:0;margin:0;cursor:pointer;list-style:none}.emoji-picker summary::-webkit-details-marker{display:none}.emoji-grid{position:absolute;bottom:54px;left:0;z-index:10;display:grid;grid-template-columns:repeat(4,44px);gap:4px;padding:10px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 30px #16244325}.emoji-grid button{width:44px;min-height:44px;padding:0;margin:0;border:0;background:#f7f7fb;font-size:25px;border-radius:12px}
.media-preview{max-width:min(520px,calc(100vw - 28px));max-height:calc(100dvh - 40px);border:1px solid var(--line);border-radius:24px;padding:22px;background:#fff;color:var(--ink)}.media-preview::backdrop{background:#11192c77;backdrop-filter:blur(4px)}.media-preview h2{font-size:22px;margin:0 0 16px}.media-preview img,.media-preview video{display:block;max-width:100%;max-height:55dvh;min-height:100px;object-fit:contain;border-radius:14px;background:#f1f3f9;margin:auto}.media-preview p{color:var(--muted);font-size:14px}.media-preview .row{display:flex;gap:10px}.media-preview .row button{flex:1;margin:0;min-height:48px}
@media(max-width:480px){.business-tools{gap:0}.business-tool,.emoji-picker summary{width:30px}.direct-chat-composer:has(.business-tools){flex-wrap:wrap}.direct-chat-composer:has(.business-tools) select{order:-1;width:100%;max-width:none;height:34px;border:0;background:transparent;padding:0 6px;font-size:12px}.direct-chat-composer:has(.business-tools) textarea{width:calc(100% - 125px)}}
/* Count conversations, keeping the chat list visually quiet. */
.unread-badge{display:inline-flex;align-items:center;justify-content:center;margin-inline-start:7px;min-width:19px;height:19px;padding:0 5px;border-radius:7px;background:#e8483b;color:#fff;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1;vertical-align:middle}
.unread-badge[hidden],.chat-unread-dot[hidden]{display:none}
.chat-unread-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#5069dc;margin-inline-start:10px;vertical-align:middle}
.direct-chat-header .chat-summary-button{flex:none;width:auto;min-height:44px;max-width:8.5em;line-height:1.2;padding:6px 8px;margin:0;background:#edf0f8;color:var(--navy);font-size:12px}
.chat-proposal{margin-top:10px;padding:9px 10px;border-radius:10px;background:#e9edf9;color:#354576;font-size:13px}
.chat-proposal-confirmed{background:#e0f3e9;color:#206345}.chat-proposal-rejected{background:#fbefdd;color:#744414}
.chat-proposal-actions,.chat-confirmation-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.chat-proposal-actions button,.chat-confirmation-actions button{width:auto;min-height:44px;margin:0;padding:6px 10px;font-size:13px}
.chat-confirm-primary{background:var(--navy);color:white}.chat-confirm-secondary{background:#fff;color:var(--navy)}
.chat-confirmation-actions .chat-protocol-download,.proposal button.proposal-primary{background:var(--accent-ink);color:#fff}
.proposal button.proposal-primary:disabled{background:#dbe1ee;color:#505a74}
.chat-confirmations{width:min(544px,calc(100% - 32px));max-height:min(75dvh,660px);padding:22px;border:1px solid var(--line);border-radius:22px;color:var(--ink);background:white}
.chat-confirmations::backdrop{background:#18203a70}.chat-confirmations h2{margin:0 0 14px;font-size:22px}
.chat-confirmation-list article{padding:10px 0;border-top:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere}
.chat-confirmation-list p{margin:7px 0}.chat-confirmation-list small{color:var(--muted)}

#t-back{display:none}
#t-invite-more>summary{width:auto;min-height:44px;padding-inline:10px;font-size:13px;white-space:nowrap}
#t-invite-more .chat-menu-items{top:0;transform:translateY(calc(-100% - 6px));z-index:8}
.conversation-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:8px;padding:6px 10px 6px 14px}
.conversation-row .conversation-open{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:4px;text-align:start;min-height:58px;padding:6px 0;margin:0;background:transparent;color:var(--ink);box-shadow:none}
.conversation-open strong,.conversation-open small{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conversation-open small{color:var(--muted);font-size:12px;font-weight:500}
.conversation-row .chat-menu summary{width:44px;min-height:44px;background:transparent}

@media (max-width:899px), (pointer:coarse){
  html:is([data-direct-chat="true"],[data-live-chat="true"]),html:is([data-direct-chat="true"],[data-live-chat="true"]) body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
  html[data-direct-chat="true"] #scr-cabinet,#talk:not(.hidden){position:fixed;inset-inline:0;top:var(--mobile-chat-top,0px);width:100%;max-width:none;height:var(--direct-visible-height,100dvh);min-height:0;margin:0;border:0;border-radius:0;box-sizing:border-box;overflow:hidden}
  html[data-direct-chat="true"] #scr-cabinet{padding:var(--safe-top) 0 0}
  html[data-direct-chat="true"] #cabinet-nav{display:none}
  html[data-direct-chat="true"] .cabinet-header,html[data-direct-chat="true"] #cabinet-title,html[data-direct-chat="true"] #cabinet-description{display:none}
  html[data-direct-chat="true"] :is(.cabinet-layout,.cabinet-main,#cabinet-content,.direct-chat){display:block;height:100%;min-height:0;margin:0;border:0;border-radius:0}
  html[data-direct-chat="true"] .direct-chat{display:grid}
  html[data-direct-chat="true"] .direct-chat-composer{padding:6px 10px calc(6px + var(--composer-safe-bottom,env(safe-area-inset-bottom,0px)));padding-inline:max(10px,env(safe-area-inset-left,0px)) max(10px,env(safe-area-inset-right,0px))}
  html[data-chat-keyboard="true"] .direct-chat-composer{--composer-safe-bottom:0px}
  #talk.fit-visual-viewport{position:fixed;top:var(--mobile-chat-top,0px);height:var(--direct-visible-height,100dvh)}
  #talk .top{gap:8px}
  #talk>.top>img,#talk .chat-site-back,#talk #t-exit{display:none}
  #talk #t-back{display:grid;place-items:center;flex:0 0 44px;min-height:44px;width:44px;margin:0;padding:0;border:0;background:transparent;color:inherit;box-shadow:none}
  #talk #log,.direct-chat-log{overscroll-behavior:contain;min-height:0}
  .direct-chat-log>:first-child{margin-block-start:auto}
  #talk .room-waiting{padding:16px 16px 12px}
  #talk .room-waiting>img{display:none}
  #talk .room-waiting #t-invite-actions{gap:8px;align-items:center;justify-content:center}
  #talk #t-share-invite{min-height:44px;padding:9px 14px}
  #talk #t-invite-more-label{background:transparent}
  #talk.keyboard-open #t-translation{display:none}
}

/* Anchor the conversation itself to the viewport, independently of the account layout. */
@media (max-width:899px), (pointer:coarse){
  html[data-direct-chat="true"] #scr-cabinet{padding:0}
  html[data-direct-chat="true"] #scr-cabinet .direct-chat{position:absolute;inset:var(--safe-top) var(--safe-right) 0 var(--safe-left);display:grid;height:auto;width:auto;min-height:0}
}
html[data-duet-native="ios"][data-direct-chat="true"] #scr-cabinet{position:fixed;inset-inline:0;top:var(--mobile-chat-top,0px);width:100%;max-width:none;height:var(--direct-visible-height,100dvh);padding:0;margin:0;overflow:hidden}
html[data-duet-native="ios"][data-direct-chat="true"] #scr-cabinet .direct-chat{position:absolute;inset:var(--safe-top) var(--safe-right) 0 var(--safe-left);display:grid;height:auto;width:auto;min-height:0}

/* The tablet welcome screen has its own composition, including Split View. */
@media (min-width:700px){
  html[data-duet-native="ios"] #scr-home{
    max-width:1320px;padding-inline:clamp(28px,6vw,88px);
  }
  html[data-duet-native="ios"] #scr-home .brandbar{margin-bottom:0}
  html[data-duet-native="ios"] #scr-home .home-grid{
    flex:1 0 auto;align-content:center;align-items:center;width:100%;max-width:none;
    grid-template-columns:minmax(0,1.03fr) minmax(0,1fr);grid-template-rows:auto auto;
    gap:28px clamp(24px,5vw,76px);padding-block:clamp(34px,7vh,100px);
  }
  html[data-duet-native="ios"] .home-intro{grid-column:1;align-self:end}
  html[data-duet-native="ios"] .home-intro h1{font-size:clamp(36px,5.25vw,72px);text-wrap:balance}
  html[data-duet-native="ios"] .home-intro p{max-width:31ch;margin-top:20px;font-size:clamp(17px,1.9vw,23px);line-height:1.55}
  html[data-duet-native="ios"] .home-demo{
    grid-column:2;grid-row:1 / span 2;align-self:center;min-height:clamp(255px,36vh,390px);
    display:flex;flex-direction:column;justify-content:center;gap:24px;
    padding:clamp(20px,3vw,44px);border-radius:36px;box-shadow:0 18px 60px #20356516;
  }
  html[data-duet-native="ios"] .home-demo h2{font-size:14px;margin:0}
  html[data-duet-native="ios"] .home-demo .demo-messages{gap:16px}
  html[data-duet-native="ios"] .home-demo .demo-message{padding:13px 15px;max-width:95%}
  html[data-duet-native="ios"] .home-demo strong{font-size:clamp(16px,1.9vw,22px)}
  html[data-duet-native="ios"] .home-demo small{font-size:clamp(13px,1.5vw,16px)}
  html[data-duet-native="ios"] .home-actions{grid-column:1;align-self:start;width:100%;max-width:315px}
  html[data-duet-native="ios"] #scr-home .app-links{margin-top:0;padding-top:0}
}

@media(max-width:420px){
  .direct-chat-header small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .direct-chat-header .chat-summary-button{max-width:7.5em}
}

.direct-chat .chat-menu-items{overflow-y:auto;overscroll-behavior:contain}
.direct-chat .summary-short{display:none}
@media(max-width:420px){.direct-chat .summary-full{display:none}.direct-chat .summary-short{display:inline}}

.media-preview-actions>button{width:100%;min-height:48px;margin:20px 0 0}.media-preview-actions .dialog-dismiss{margin-top:12px}

.emoji-panel{position:absolute;bottom:54px;left:0;z-index:15;width:min(328px,calc(100vw - 24px));padding:4px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 12px 36px #18203a24;color:var(--muted);font-size:13px;line-height:1.4}
.emoji-panel emoji-picker{width:100%;height:min(340px,calc(var(--direct-visible-height,100dvh) * .55));--num-columns:7;--emoji-size:26px;--emoji-padding:7px;--input-font-size:16px;--input-border-color:#e3e8f3;--input-border-radius:10px;--indicator-color:#ce3525;--border-size:0px;--background:#fff;--button-hover-background:#fff0ed;--button-active-background:#fff0ed}
@media(max-width:360px){.emoji-panel emoji-picker{--num-columns:6}}

.chat-menu-items{min-width:240px;max-width:calc(100vw - 24px);padding:5px;border-radius:15px;max-height:min(65dvh,520px);overflow:auto}
.chat-menu-items button{min-height:44px;margin:0;padding:10px 12px;line-height:1.3;font-size:15px;font-weight:500;background:#fff;color:var(--ink);box-shadow:none;text-align:start}
.direct-message .chat-menu-items button{font-size:14px}
.voice-room-invitation{display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;min-width:0;width:240px;max-width:100%;font-size:14px;font-weight:600;line-height:1.3}
.voice-room-icon,.voice-room-icon svg{width:18px;height:18px;color:var(--accent-ink)}
.voice-room-label{min-width:0;overflow-wrap:normal}
.voice-room-invitation .voice-room-join{width:auto;min-height:44px;margin:0;padding:6px 7px;background:transparent;color:var(--accent-ink);font-size:14px;font-weight:700}
.direct-message.control-message{padding:5px 5px 5px 12px;max-width:96%}
.control-message .chat-menu{align-self:center}.voice-room-invitation small{margin:0;font-size:11px}

html[data-voice-room="true"] #talk{display:flex;flex-direction:column;width:100%;max-width:none;height:var(--direct-visible-height,100dvh);min-height:0;margin:0;border:0;border-radius:0;box-shadow:none;background:#f5f7fc}
html[data-voice-room="true"] #talk .top{display:flex;align-items:center;flex:none;gap:10px;min-height:64px;padding:calc(10px + var(--safe-top)) 14px 10px;background:#fff;border-bottom:1px solid var(--line);color:var(--ink)}
html[data-voice-room="true"] #t-back{display:flex;align-items:center;gap:4px;flex:none;width:auto;min-width:44px;min-height:44px;padding:6px 3px;margin:0;background:transparent;color:var(--ink);font-size:14px}
html[data-voice-room="true"] #t-back svg{width:20px;height:20px}
html[data-voice-room="true"] #t-who{flex:1;min-width:0;font-size:16px;line-height:1.3}
html[data-voice-room="true"] #t-who strong,html[data-voice-room="true"] #t-who small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
html[data-voice-room="true"] #t-who small{margin-top:3px;font-size:11px;font-weight:400;color:var(--muted)}
html[data-voice-room="true"] #t-home,html[data-voice-room="true"] #t-mic-panel,html[data-voice-room="true"] #t-records-label{display:none!important}
html[data-voice-room="true"] #t-records{width:44px;min-height:44px;padding:10px;margin:0;border:0;color:var(--ink);background:transparent}
html[data-voice-room="true"] #talk #log{flex:1;min-height:0;width:100%;padding:16px 12px;background:#f5f7fc}
html[data-voice-room="true"] #talk .bottom{display:flex;flex:none;flex-direction:column;width:100%;padding-bottom:var(--safe-bottom);background:#fff}
html[data-voice-room="true"] #talk .mode-bar{order:1;display:block;width:100%;padding:12px 16px;border:0;background:#fff}
html[data-voice-room="true"] #talk #t-chat-actions{display:flex;align-items:center;justify-content:center;gap:12px;width:100%}
html[data-voice-room="true"] #t-chat-actions>button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;flex:none;width:60px;height:58px;min-height:58px;margin:0;padding:7px 4px;border:0;border-radius:16px;background:#f0f2f7;color:var(--ink);box-shadow:none}
html[data-voice-room="true"] #t-chat-actions>button svg{width:23px;height:23px;flex:none}
html[data-voice-room="true"] #t-chat-actions>button span{font-size:10px;line-height:1.2;white-space:nowrap}
html[data-voice-room="true"] #t-chat-actions #t-mute[aria-pressed="true"]{background:var(--accent);color:white}
html[data-voice-room="true"] #t-chat-actions #t-exit{background:#fff0ed;color:var(--accent-ink)}
html[data-voice-room="true"] #t-chat-actions>button:disabled{opacity:.45}
html[data-voice-room="true"] #t-composer{order:0;border:0;padding:8px 12px 0}
html[data-voice-room="true"]:not([data-room-text="true"]) #t-composer{display:none!important}
html:not([data-voice-room="true"]) #t-room-text,html:not([data-voice-room="true"]) #t-back span{display:none}
html[data-voice-room="true"] #t-waiting{background:transparent;border:0;border-radius:0;box-shadow:none;padding:24px;max-width:340px}
html[data-voice-room="true"] #t-waiting h2{font-size:20px}
html[data-voice-room="true"] #t-waiting p{font-size:14px;line-height:1.5}
@media(min-width:900px){html[data-voice-room="true"] #talk #log{padding-inline:max(24px,calc((100% - 850px)/2))}}
.chat-menu-items{display:flex;flex-direction:column;gap:4px}
details:not([open])>.chat-menu-items{display:none!important}
.composer-field .business-tools{gap:4px}.composer-field .business-tool,.composer-field .emoji-picker summary{width:44px}
html[data-voice-room="true"] #talk #t-back{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:4px;flex:none;width:auto;min-width:44px;padding:6px 3px}
html[data-voice-room="true"] #talk #t-chat-actions #t-exit{display:flex}
html[data-voice-room="true"] #talk #t-chat-actions>button span{display:block}
.emoji-browser{display:flex;flex-direction:column;max-height:min(360px,calc(var(--direct-visible-height,100dvh)*.55));padding:8px}
.emoji-browser-search{display:flex;align-items:center;gap:4px;flex:none}.emoji-browser-search .emoji-search{width:0;min-width:0;flex:1;height:44px;margin:0;padding:8px 10px;font-size:16px;border-radius:10px}
.emoji-browser .emoji-tone{flex:none;width:44px;min-height:44px;margin:0;padding:4px;border:0;background:transparent;font-size:24px;line-height:1}
.emoji-categories{display:flex;gap:2px;overflow:auto;flex:none;border-bottom:1px solid var(--line);padding-bottom:4px;margin:4px 0}
.emoji-categories>button{flex:1;min-width:30px;min-height:36px;margin:0;padding:4px 2px;border:0;border-radius:8px;background:transparent;font-size:18px}
.emoji-categories>button[aria-selected=true]{background:var(--accent-soft)}
.emoji-results{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px;overflow:auto;min-height:0;overscroll-behavior:contain}
.emoji-results>.emoji-choice{min-width:0;width:100%;min-height:40px;margin:0;padding:4px;border:0;border-radius:8px;background:transparent;font-size:26px;line-height:1.2}
.emoji-results>.emoji-choice:hover,.emoji-results>.emoji-choice:focus-visible{background:var(--accent-soft)}
.emoji-browser .emoji-more{min-height:32px;flex:none;display:grid;place-items:center;margin:4px 0 0;padding:4px;background:transparent;color:var(--accent-ink);border:0}
.emoji-browser [hidden]{display:none!important}.emoji-empty{margin:8px;font-size:13px}
.emoji-load-status{flex:none;margin:4px 8px;font-size:11px;line-height:1.4;color:var(--muted)}
/* Room presence is a fixed sibling of the scrolling transcript, never a message. */
.voice-presence{display:none}
html[data-voice-room="true"] #voice-presence{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;flex:none;padding:10px 16px;background:#fff8f6;border-bottom:1px solid var(--line)}
html[data-voice-room="true"] #voice-presence[hidden]{display:none!important}
.voice-presence>div{min-width:0}.voice-presence strong,.voice-presence small{display:block;overflow-wrap:anywhere}
.voice-presence strong{font-size:13px;font-weight:650;line-height:1.35}.voice-presence small{font-size:12px;line-height:1.4;color:var(--muted);margin-top:2px}
#voice-presence #t-room-invite{width:auto;min-height:44px;max-width:140px;margin:0;padding:8px 10px;border:0;border-radius:10px;background:transparent;color:var(--accent-ink);font-size:14px;font-weight:650;line-height:1.3}
html[data-voice-room="true"] #talk #t-waiting{display:none!important}
