/* One conversation surface for both authenticated participants. */
.room-chat-log{--room-chat-received:var(--surface,#fff);--room-chat-received-ink:var(--ink,#153932);--room-chat-ground:color-mix(in srgb,var(--quiet,#eef2ef) 88%,var(--surface,#fff));display:flex;flex-direction:column;gap:0!important;background-color:var(--room-chat-ground);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='144' height='130' fill='none' stroke='%237b8583' stroke-opacity='.11' stroke-width='1.1'%3E%3Cpath d='M14 20h16a5 5 0 0 1 5 5v10a5 5 0 0 1-5 5h-6l-7 5v-5h-3a5 5 0 0 1-5-5V25a5 5 0 0 1 5-5ZM82 83l9-15 9 15 17 4-12 12 2 18-16-8-16 8 2-18-12-12ZM96 21c-9-11-20 2-11 9l11 10 11-10c9-7-2-20-11-9ZM17 92l6-6 12 12-6 6ZM47 57l8 5-5 8-8-5Z'/%3E%3C/svg%3E");overscroll-behavior:contain;padding:24px 30px 15px;scrollbar-color:var(--control,#c4d1ca) transparent;scrollbar-width:thin}
.room-chat-log .room-chat-message{display:flex;align-items:flex-end;gap:8px;margin:0 0 17px;max-width:88%;position:relative;flex-shrink:0;align-self:flex-start;min-width:0}
.room-chat-log .room-chat-message.own{align-self:flex-end;flex-direction:row-reverse}
.room-chat-avatar{position:relative;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;flex:none;background:var(--mint,#e0f2ec);font-size:10px;font-weight:500;color:var(--action,#08796f);overflow:hidden}
.room-chat-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.room-chat-log .room-chat-bubble{position:relative;min-width:0;max-width:100%;min-height:35px;padding:11px 13px 8px;background:var(--room-chat-received);color:var(--room-chat-received-ink);border-radius:0 10px 10px 10px;box-shadow:0 1px 1px rgb(10 30 24 / .06);overflow-wrap:anywhere}
.room-chat-log .own .room-chat-bubble{border-radius:10px 0 10px 10px;background:var(--bubble-self,#d8f3df)}
.room-chat-log .room-chat-bubble>p{font-size:13px;line-height:1.65;white-space:pre-wrap;margin:0;overflow-wrap:anywhere}
.room-chat-log .room-chat-bubble>p:empty{display:none}
.room-chat-log .room-chat-meta{display:flex;justify-content:flex-end;align-items:center;gap:5px;color:var(--muted,#52665e);font-size:10px;margin-top:5px;line-height:1;font-variant-numeric:tabular-nums}
.room-chat-receipt{display:inline-flex;color:var(--muted,#52665e)}.room-chat-receipt.read{color:#2185c5}.room-chat-receipt svg{width:19px;height:14px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.room-chat-log .new-message{animation:room-chat-message-in 210ms cubic-bezier(.22,1,.36,1)}
.room-chat-log .chat-media-received{margin:0;padding:4px 0;border:0;max-width:100%;background:transparent;white-space:normal}.room-chat-log .chat-media-received img{display:block;max-width:100%;max-height:220px;object-fit:contain;border-radius:6px;margin-top:6px}.room-chat-log .chat-media-received :is(audio,video){max-width:100%;margin:4px 0}.room-chat-log .chat-media-received audio{width:230px;height:36px}
.room-chat-typing[hidden],.room-chat-connection[hidden]{display:none!important}
.room-chat-typing{display:flex;align-items:center;gap:8px;min-height:44px;margin-top:auto;margin-bottom:15px;flex-shrink:0;color:var(--muted,#52665e)}.room-chat-typing small{font-size:11px;font-weight:500;color:var(--room-chat-received-ink);background:var(--room-chat-received);border:1px solid var(--control,#b7c9bf);padding:5px 7px;border-radius:5px}.room-chat-typing-dots{display:flex;gap:4px;background:var(--room-chat-received);color:var(--room-chat-received-ink);border:1px solid var(--control,#b7c9bf);border-radius:0 12px 12px 12px;padding:13px 16px}.room-chat-typing-dots i{display:block;width:5px;height:5px;border-radius:50%;background:currentColor;animation:room-chat-typing 1050ms ease-in-out infinite}.room-chat-typing-dots i:nth-child(2){animation-delay:130ms}.room-chat-typing-dots i:nth-child(3){animation-delay:260ms}
.room-chat-connection{display:flex;align-items:center;gap:11px;flex-shrink:0;padding:12px 20px;background:var(--warning-bg,#fff5da);color:var(--warning,#765513);font-size:12px;line-height:1.6}.room-chat-connection strong{font-weight:500}.room-chat-connection small{display:block;font-size:11px;color:inherit}.room-chat-spinner{display:block;flex:none;width:18px;height:18px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:room-chat-spin 900ms linear infinite}
.room-chat-composer:is(.focus-composer,.chat-compose){position:relative;background:var(--surface,#fff);padding:12px 16px;border-top:1px solid var(--line,#dce5df)}
.room-chat-composer:is(.focus-composer,.chat-compose) textarea{background:var(--quiet,#f2f5f2);border:0;border-radius:10px;resize:none;padding:12px;min-height:46px;max-height:104px;line-height:1.5;font-size:13px;caret-color:var(--action,#08796f)}
.room-chat-composer :is(button,textarea):focus-visible{outline:2px solid var(--action,#08796f);outline-offset:3px}.room-chat-log ::selection,.room-chat-composer ::selection{background:var(--mint,#d8f3df);color:var(--ink,#153932)}
.room-chat-composer.room-chat-paused textarea{opacity:1}.room-chat-composer .chat-media-composer{padding:0;border:0}.room-chat-composer .chat-media-icon{min-width:40px;min-height:44px}.room-chat-composer .action-row{margin-top:8px}
.room-chat-entry{position:fixed;inset:0;z-index:100;background:var(--surface,#fff);color:var(--ink,#153932);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px}.room-chat-entry h1{font-size:27px;margin:27px 0 12px}.room-chat-entry p{font-size:13px;max-width:38ch;line-height:1.8;color:var(--muted,#52665e)}.room-chat-entry-number{font-size:24px;color:var(--action,#08796f);font-variant-numeric:tabular-nums;margin-top:25px;min-width:25px}.room-chat-entry-orbit{width:68px;height:68px;border:2px solid var(--line,#dce5df);border-top-color:var(--action,#08796f);border-right-color:var(--action,#08796f);border-radius:24px;animation:room-chat-spin 2400ms linear infinite}
@keyframes room-chat-spin{to{transform:rotate(360deg)}}@keyframes room-chat-message-in{from{opacity:.3;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}@keyframes room-chat-typing{0%,65%,100%{transform:translateY(0);opacity:.65}30%{transform:translateY(-4px);opacity:1}}
@media(max-width:1050px){.room-chat-log{padding:20px}.room-chat-log .room-chat-message{max-width:95%}}
@media(max-width:760px){.room-chat-log{padding:20px 15px 12px}.room-chat-log .room-chat-message{gap:6px}.room-chat-avatar{width:25px;height:25px;font-size:9px}.room-chat-composer:is(.focus-composer,.chat-compose){padding:10px 8px}.room-chat-composer:is(.focus-composer,.chat-compose) textarea{font-size:16px}.room-chat-connection{padding:10px 15px;font-size:11px}.room-chat-entry h1{font-size:24px}.room-chat-entry p{font-size:12px}}
@media(prefers-reduced-motion:reduce){:is(.room-chat-log,.room-chat-entry,.room-chat-connection),:is(.room-chat-log,.room-chat-entry,.room-chat-connection) *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
html[data-reduced=true] :is(.room-chat-log,.room-chat-entry,.room-chat-connection) *{animation:none!important;transition:none!important;scroll-behavior:auto!important}body.page-hidden :is(.room-chat-log,.room-chat-entry,.room-chat-connection) *{animation-play-state:paused!important}

/* WhatsApp-inspired palette; shared by both roles, without changing message state. */
html:not([data-theme=dark]) .room-chat-log{--room-chat-received:#fff;--room-chat-received-ink:#111b21;--room-chat-ground:#efeae2}
html[data-theme=dark] .room-chat-log{--room-chat-received:#202c33;--room-chat-received-ink:#e9edef;--room-chat-ground:#0b141a}
.room-chat-author{display:block;font-size:11px;font-weight:500;color:var(--action);margin-bottom:5px}.room-chat-log .own .room-chat-author{color:inherit}.room-chat-log .room-chat-system{align-self:center;max-width:92%;margin-block:7px 18px}.room-chat-log .room-chat-system .room-chat-bubble{border-radius:6px;background:var(--surface);box-shadow:none;padding:8px 12px;text-align:center}.room-chat-log .room-chat-system .room-chat-bubble>p{font-size:11px;color:var(--muted)}.room-chat-log .room-chat-system .room-chat-meta{justify-content:center}
