/* Original chat typography, row sizes, composer and bubble colors. */
.chat-subtitle{margin:0 0 16px;color:var(--secondary);font-size:15px}
.chat-fishing{display:flex;gap:12px;text-align:left;margin-bottom:16px}.chat-fishing span{display:flex;flex-direction:column;gap:4px}.chat-fishing small{font-size:11px;font-weight:400;color:var(--secondary)}
.chat-section-heading{margin-top:18px;margin-bottom:8px}.chat-section-heading button{background:none;border:0;color:var(--primary);font-size:13px}
.chat-directory-row{display:flex;align-items:center;gap:12px;width:100%;padding:14px 12px;border:0;border-bottom:1px solid #00d1db1f;background:none;color:white;text-align:left;font-family:inherit}.chat-directory-row:last-child{border-bottom:0}.chat-directory-row>svg{width:12px;height:16px;flex-shrink:0;color:var(--primary)}
.chat-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;flex:0 0 44px}.chat-group-avatar{display:flex;align-items:center;justify-content:center;background:#00d1db24;color:var(--primary)}.chat-group-avatar svg{width:24px;height:24px}
.chat-identity{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.chat-title-row,.chat-preview-row{display:flex;gap:4px;align-items:baseline}.chat-title-row strong{font-size:18px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.chat-title-row small{font-size:11px;color:var(--secondary)}.chat-preview-row>span{font-size:16px;color:var(--secondary);line-height:20px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;flex:1}.chat-unread{background:var(--primary);color:white;border-radius:20px;padding:3px 8px;font-size:11px;flex-shrink:0}
.chat-native .detail-header{gap:8px}.chat-native .detail-header h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.chat-native .detail-header>.sonar-button{margin-left:auto;width:38px;height:38px;flex-shrink:0}
.chat-conversation .native-scroll.detail-scroll{bottom:85px;padding-bottom:0;overflow:hidden;display:flex;flex-direction:column;gap:16px}.chat-conversation .chat-segments{height:38px;flex-shrink:0}.chat-messages{overflow:auto;flex:1;min-height:0;display:flex;flex-direction:column;gap:8px;padding:0 0 4px;scrollbar-width:none}.chat-date{align-self:center;color:var(--secondary);font-size:11px;padding:4px 10px;background:#030508a8;border-radius:16px}.chat-message-row{display:flex;padding-right:50px}.chat-message-row.outgoing{justify-content:flex-end;padding-right:0;padding-left:50px}.chat-bubble{background:#ffffff1f;border-radius:18px;padding:8px 12px;max-width:100%;min-width:0}.outgoing .chat-bubble{background:#00d1db59}.chat-bubble p{margin:0 0 4px;font-size:17px;line-height:22px;overflow-wrap:anywhere}.chat-bubble>small{display:block;text-align:right;font-size:11px;color:var(--secondary)}
.chat-composer{position:absolute;bottom:22px;left:20px;right:20px;display:flex;align-items:flex-end;gap:8px;z-index:15}.chat-composer>button{width:48px;height:48px;background:none;border:0;padding:10px;color:var(--primary);flex-shrink:0}.chat-composer>button:last-child{width:36px;padding:6px}.chat-composer svg{width:24px;height:24px}.chat-input-shell{margin:0;flex:1;min-width:0;display:flex;align-items:center;height:48px;border:1px solid #00d1db52;border-radius:16px;background:#ffffff0f;padding:0 12px}.chat-input-shell input{width:100%;min-width:0;border:0;background:none;color:white;font:16px -apple-system,BlinkMacSystemFont,system-ui,sans-serif;padding:0;outline:none}
.chat-share{display:flex;flex-direction:column;gap:4px;width:100%;border:0;border-radius:14px;background:#030508b3;color:white;text-align:left;padding:8px;margin:4px 0;font-family:inherit}.chat-share img{width:100%;height:120px;object-fit:cover;border-radius:10px}.chat-share strong{font-size:17px}.chat-share small{font-size:11px;color:var(--secondary)}.chat-share>span{display:flex;align-items:center;gap:4px;color:var(--primary);font-size:13px}.chat-share svg{width:12px;height:12px}.chat-shared-title{font-size:17px;margin:0}.chat-friend-check{display:flex;align-items:center;gap:8px}.chat-friend-check input{width:auto}

/* Bottom anchoring keeps short chats next to the composer, without clipping long ones. */
.chat-conversation.chat-writing .native-scroll.detail-scroll{bottom:74px}
.chat-conversation:not(.chat-writing) .native-scroll.detail-scroll{bottom:22px}
.chat-messages{display:block;padding-bottom:4px;overflow-anchor:none}
.chat-message-stack{min-height:100%;display:flex;flex-direction:column;gap:8px}
.chat-message-stack> *{flex-shrink:0}
.chat-writing .chat-message-stack>:first-child{margin-top:auto}

.chat-messages{overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:#00d1db70 transparent}
.chat-messages:focus-visible{outline:none}
