html,body{width:100%;min-height:100%;overscroll-behavior:none}
.app{width:100%;max-width:none;height:100dvh;margin:0;border:0;border-radius:0;box-shadow:none}
.boot{z-index:90}
.sidebar,.active-chat{min-height:0}
.filters{flex-wrap:wrap;gap:7px;padding-bottom:15px}
.filters #filter-new-users{font-size:11px}
.entry-button{margin-top:26px}
.entry-options{display:grid;gap:12px}
.entry-options button{min-height:52px}
.remembered-account{display:flex;flex-direction:column;gap:3px;margin-bottom:20px!important;color:var(--muted);font-size:12px}
.account-help{margin-top:18px;margin-bottom:18px}
.member-name{text-align:left;padding:0;min-height:42px}
.member-name:disabled{opacity:1;cursor:default}
.person-row .remove-member-button{width:42px;height:42px;border-radius:10px;flex-shrink:0}
.sender-name{display:block;font-size:11px;font-weight:700;line-height:1.5;color:#257466;padding:0 22px 4px 0;text-align:left;max-width:100%;overflow-wrap:anywhere}
.mine .sender-name{color:#377443}
.bubble .message-text{overflow-wrap:anywhere;word-break:break-word}
.bubble{min-width:80px}
.history-loading{display:flex;align-items:center;justify-content:center;gap:9px;padding:12px;font-size:12px;color:var(--green-dark);background:#f4fbf5;border-radius:10px;margin:10px auto;position:sticky;top:0;z-index:2;width:fit-content;max-width:100%}
.small-spinner{width:16px;height:16px;border:2px solid #c4e2d3;border-top-color:var(--green);border-radius:50%;animation:spin .7s linear infinite;flex-shrink:0}
@keyframes spin{to{transform:rotate(360deg)}}
.composer textarea{min-width:0;overflow-y:auto}
.chat-identity{min-width:0}
.chat-identity-text{min-width:0}
.chat-identity-text b{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.chat-header .header-actions{flex-shrink:0}
.modal .form-error{margin-bottom:14px}
.modal input:invalid:not(:placeholder-shown){box-shadow:none}
.photo-avatar{overflow:hidden;flex-shrink:0;padding:0}
.photo-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.group-profile-cover{height:170px;border-radius:16px;overflow:hidden;margin-bottom:18px;background:#e8efe7}
.group-profile-cover img{width:100%;height:100%;object-fit:cover;display:block}
.group-cover-button{position:relative;display:block;padding:0;border-radius:24px}
.cover-edit-icon{position:absolute;right:-5px;bottom:-3px;background:var(--green);color:white;border:3px solid white;border-radius:50%;width:28px;height:28px;display:grid;place-items:center}
.cover-edit-icon svg{width:13px;height:13px}
.group-background-menu{position:fixed;z-index:110;min-width:195px;max-width:calc(100vw - 16px);background:white;padding:6px;border-radius:12px;box-shadow:0 8px 35px #14362735;border:1px solid #dbe6df}
.group-background-menu button{display:flex;align-items:center;gap:10px;text-align:left;width:100%;padding:12px 14px;border-radius:8px;font-size:13px;color:#244b3f}
.group-background-menu button:hover,.group-background-menu button:focus-visible{background:#edf6ee}
.group-background-menu svg{width:18px;height:18px}
.group-upload-status{position:fixed;z-index:120;left:50%;top:18px;transform:translateX(-50%);padding:12px 18px;max-width:calc(100% - 30px);border-radius:12px;background:#244b3f;color:white;font-size:12px;box-shadow:0 4px 20px #14362730}
.active-chat.has-wallpaper{background-color:#162d30;background-position:center;background-size:cover;background-repeat:no-repeat;isolation:isolate}
.active-chat.has-wallpaper .message-area{background-color:transparent;background-image:none}
.has-wallpaper>.chat-header,.has-wallpaper>.composer-wrap,.has-wallpaper>.message-search{background:rgba(10,20,25,.72);border-color:rgba(255,255,255,.14);-webkit-backdrop-filter:blur(18px) saturate(.7);backdrop-filter:blur(18px) saturate(.7);color:#f4faf7}
.has-wallpaper .chat-identity{color:#f4faf7}
.has-wallpaper .chat-identity-text small,.has-wallpaper .composer-hint,.has-wallpaper .message-search small{color:#d2ded8}
.has-wallpaper .chat-identity-text small.is-online{color:#9bf1bd}
.has-wallpaper .chat-header .icon-button,.has-wallpaper .composer>.icon-button,.has-wallpaper .message-search>.icon-button,.has-wallpaper .message-search>svg{color:#edf6f0}
.has-wallpaper .chat-header .icon-button:hover,.has-wallpaper .composer>.icon-button:hover,.has-wallpaper .message-search>.icon-button:hover{background:rgba(255,255,255,.12);color:#b8f8d0}
.has-wallpaper .composer textarea{background:rgba(8,18,22,.4);border-color:rgba(255,255,255,.22);color:#f4faf7;caret-color:#b8f8d0;color-scheme:dark;scrollbar-color:#6c8279 transparent}
.has-wallpaper .composer textarea::placeholder{color:#c8d6ce}
.has-wallpaper .composer textarea:focus{border-color:#97e8b5;box-shadow:0 0 0 2px rgba(151,232,181,.16)}
.has-wallpaper .message-search input{color:#f4faf7}
.has-wallpaper .message-search input::placeholder{color:#c8d6ce}
.has-wallpaper .recording-bar:not(.cancel) #recording-hint{color:#d2ded8}
.has-wallpaper .recording-bar:not(.cancel)>b{color:#ffc9c9}
.system-event{justify-content:center!important;margin:13px 0}
.system-event p{display:flex;gap:7px;align-items:center;padding:8px 12px;border-radius:10px;background:#f5f8f0eb;box-shadow:0 1px 3px #1d37251a;color:#51634c;font-size:11px;line-height:1.5;max-width:90%;overflow-wrap:anywhere;text-align:center}
.system-event svg{width:14px;height:14px;flex-shrink:0}
.system-event time{font-size:9px;white-space:nowrap;color:#6a7865}
.muted-badge{display:inline-block;vertical-align:middle;font-size:9px;line-height:1.6;letter-spacing:.2px;font-weight:700;color:#8b2635;background:#fbe2e6;padding:2px 6px;border-radius:5px;white-space:nowrap;margin-left:4px}
.moderation-notice{padding:10px 12px;margin-bottom:9px;border-radius:9px;background:#fff3d3;color:#704b12;font-size:12px;line-height:1.5}
.moderation-notice.permanent{color:#8b2635;background:#fbe2e6}
.composer textarea:disabled{opacity:1;color:#7b7775}
.emoji-glyph{font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;font-size:1.55em;line-height:1;vertical-align:-.12em;white-space:nowrap}
.bubble.emoji-only,.mine .bubble.emoji-only{background:transparent;box-shadow:none;padding:4px 8px;border-radius:0}
.bubble.emoji-only:before{display:none}
.emoji-only .message-text{padding:3px 20px 3px 0;line-height:1.4;white-space:pre-wrap}
.emoji-only .emoji-glyph{font-size:64px;line-height:1.15;vertical-align:middle}
.emoji-only.emoji-many .emoji-glyph{font-size:44px}
.emoji-only .message-meta{padding-top:4px}
.has-wallpaper .emoji-only .sender-name,.has-wallpaper .emoji-only .message-meta{color:#fff;text-shadow:0 1px 3px #000,0 0 6px #000}
.bubble.video-bubble{width:360px;max-width:88%;padding:10px}
.video-player{margin:5px 0;min-width:0}
.video-player video{display:block;width:100%;max-height:420px;border-radius:10px;background:#111b20;object-fit:contain}
.video-load{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;min-height:150px;background:#173b38;color:#fff;border-radius:10px;padding:22px 12px;text-align:center}
.video-load>svg{width:38px;height:38px}
.video-load-label{font-size:14px;font-weight:600}
.video-load small{font-size:11px;color:#c8e4d9}
.video-load:disabled{opacity:.8;cursor:wait}
.video-status{font-size:11px;line-height:1.5;margin:7px 0;color:#49634e}
.video-status:empty{display:none}
.video-name{display:block;font-size:10px;color:#617260;overflow-wrap:anywhere;margin-top:7px}
.emoji-panel{position:fixed;display:flex;flex-direction:column;gap:8px;bottom:auto;left:auto;padding:12px;width:400px;max-width:calc(100vw - 16px);max-height:430px;overflow:hidden;z-index:105;background:#fff;color:#244332}
.emoji-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0}
.emoji-heading>b{font-size:14px}
.emoji-heading .icon-button{width:28px;height:28px;padding:3px}
.emoji-panel>input,.emoji-panel>select{width:100%;min-height:36px;flex-shrink:0;padding:7px 10px;margin:0;font-size:13px;background:#f3f7f1;border:1px solid #dbe5d7;border-radius:8px;color:#244332}
.emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(39px,1fr));gap:3px;overflow-y:auto;min-height:0;flex:1;align-content:start;overscroll-behavior:contain;scrollbar-width:thin;touch-action:pan-y}
.emoji-grid [data-emoji]{font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;font-size:28px;line-height:1;min-height:43px;padding:6px 2px;text-align:center;white-space:nowrap}
.emoji-count{font-size:10px;color:#677b61;margin:0;flex-shrink:0}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-width:1800px){.app{height:100dvh;margin:0}.message-area{padding-left:7%;padding-right:7%}}
@media(max-width:680px){
 .app{height:var(--mobile-height,100dvh);position:fixed;inset:0}
 .chat-pane{position:absolute}
 .sidebar-heading{padding-top:max(20px,env(safe-area-inset-top))}
 .chat-header{height:calc(65px + env(safe-area-inset-top));min-height:calc(65px + env(safe-area-inset-top))}
 .chat-identity-text b{max-width:calc(100vw - 160px)}
 .chat-identity-text small{max-width:calc(100vw - 165px)}
 .filters{padding:12px 18px 15px}
 .filters button{padding:9px 12px}
 .sender-name{font-size:11px}
 .composer-wrap{padding-bottom:max(8px,env(safe-area-inset-bottom))}
 .composer textarea{padding-top:10px;padding-bottom:8px;max-height:110px}
 .bubble{max-width:92%}
 .audio-player{max-width:calc(100vw - 88px);min-width:0;width:250px}
 .file-card{min-width:0;max-width:calc(100vw - 98px)}
 .welcome{padding:22px 20px;min-height:100dvh}
 .join-layout{margin-top:24px;gap:22px}
 .join-story h1{font-size:34px}
 .join-story>p{font-size:13px}
 .join-card{padding:25px 22px}
 .modal{max-height:calc(var(--mobile-height,100dvh) - 24px);width:calc(100% - 24px);padding:22px 18px;margin:auto}
 .modal-heading h2{font-size:23px}
 .person-row{padding-left:3px;padding-right:3px}
 .message-area{padding-left:12px;padding-right:12px}
}
@media(max-width:370px){.composer>.icon-button{width:26px}.composer{gap:2px}.send-button{width:39px;height:42px}.join-story h1{font-size:30px}.chat-identity-text b{font-size:13px}.modal .field-row{grid-template-columns:1fr}}

/* Admins do grupo e vídeos sem balão. */
.admin-badge{display:inline-block;vertical-align:middle;font-size:9px;line-height:1.6;font-weight:700;color:#205e43;background:#dcefe1;padding:2px 6px;border-radius:5px;white-space:nowrap;margin-left:4px}
.group-options{flex-wrap:wrap;gap:8px}
.group-options button{flex:1 1 110px;white-space:nowrap}
.group-permission{display:flex;align-items:center;gap:18px;cursor:pointer;margin:12px 0 20px;text-transform:none;letter-spacing:normal}
.group-permission>span{flex:1;min-width:0}
.group-permission b{display:block;font-size:15px;color:#244332}
.group-permission small{display:block;font-weight:400;font-size:12px;line-height:1.6;color:#64745d;margin-top:8px}
.group-permission input{width:24px;height:24px;min-width:24px;margin:0;accent-color:#237b50;cursor:pointer}
.group-permission-summary,.moderation-notice.permission{padding:10px 12px;border-radius:9px;background:#e1eee4;color:#30523c;font-size:12px;line-height:1.5}
.group-members .member-actions-button,.group-members .remove-member-button{width:30px;min-width:30px;height:34px;padding:5px;flex-shrink:0}
.group-members .person-name{min-width:0}
.group-members .person-name b{white-space:normal;overflow-wrap:anywhere;line-height:1.6}
.bubble.video-bubble,.mine .bubble.video-bubble{background:transparent;box-shadow:none;padding:4px 8px;border-radius:0}
.bubble.video-bubble:before{display:none}
.has-wallpaper .video-bubble .sender-name,.has-wallpaper .video-bubble .message-meta,.has-wallpaper .video-bubble .message-text,.has-wallpaper .video-bubble .video-name,.has-wallpaper .video-bubble .video-status{color:#fff;text-shadow:0 1px 3px #000,0 0 6px #000}

/* Perfis, conversas e mensagens fixadas. */
.person-photo img,.photo-avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit;display:block}
.message-row:not(.system-event){flex-direction:row;align-items:flex-start;gap:10px}
.message-row.mine:not(.system-event){flex-direction:row-reverse}
.message-row>.message-avatar{width:34px;height:34px;min-width:34px;flex-shrink:0;border-radius:50%;font-size:11px;margin-top:1px;overflow:hidden;box-shadow:0 1px 4px #0002}
.message-row>.bubble{max-width:calc(100% - 48px)}
.message-row.system-event{flex-direction:row}
.message-row.system-event p{margin-left:auto;margin-right:auto}
.chat-pin-marker{display:inline-flex;vertical-align:middle;color:#168168;margin-right:5px}
.chat-pin-marker svg{height:13px;width:13px}
.pinned-message{display:flex;align-items:center;gap:8px;flex-shrink:0;z-index:2;background:#f5faf0d9;border-bottom:1px solid #c9dec6a6;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);padding:7px 18px;color:#244c3a;min-height:55px;max-height:82px}
.pinned-content{display:flex;align-items:center;gap:11px;text-align:left;flex:1;min-width:0;padding:3px;color:inherit}
.pinned-content>svg{width:19px;height:19px;flex-shrink:0}
.pinned-content>span{min-width:0;flex:1}
.pinned-content b,.pinned-content small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pinned-content b{font-size:11px;font-weight:700;margin-bottom:4px}
.pinned-content small{font-size:12px;line-height:1.4}
.pinned-message .icon-button{width:32px;height:32px;flex-shrink:0;color:inherit}
.has-wallpaper .pinned-message{background:#122b25c4;color:#effaf1;border-color:#ffffff21;text-shadow:0 1px 2px #0007}
#profile-bio{width:100%;min-height:88px;padding:12px;border:1px solid #dce5d5;border-radius:10px;resize:vertical;font:inherit;font-size:14px;line-height:1.6;background:#f8fbf5;color:#29442f;box-sizing:border-box}
.profile-bio{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.7;margin:18px 0;color:#3e5946}
.public-profile{text-align:center}
.public-profile .avatar{margin:6px auto}
.profile-full-photo{display:block;width:100%;max-height:360px;object-fit:contain;background:#eff4ed;border-radius:16px;margin:8px auto 18px}
.profile-edit-photo .avatar{border-radius:50%;overflow:hidden}
@media(max-width:680px){.message-row:not(.system-event){gap:8px}.message-row>.message-avatar{width:29px;height:29px;min-width:29px;font-size:10px}.message-row>.bubble{max-width:calc(100% - 37px);min-width:0}.bubble.video-bubble{width:360px;max-width:calc(100% - 37px)}.audio-player{width:100%;min-width:0;max-width:100%;gap:7px;grid-template-columns:32px minmax(0,1fr) 26px}.bubble:has(.audio-player){width:270px}.file-card{min-width:0;max-width:100%;margin-right:5px}.file-card b{max-width:140px}.message-image img{min-width:0}.bubble.image-bubble{width:320px}.pinned-message{padding:6px 12px;min-height:52px}.pinned-content b{font-size:10px}.pinned-content small{font-size:11px}#profile-bio{font-size:16px}}
/* Fotos maiores e conversa próxima às bordas. */
.message-area{padding-left:18px;padding-right:18px}
.message-row>.message-avatar{width:48px;height:48px;min-width:48px;font-size:16px}
.message-row>.bubble{max-width:calc(100% - 58px)}
@media(max-width:680px){
 .message-area{padding-left:10px;padding-right:10px}
 .message-row>.message-avatar{width:44px;height:44px;min-width:44px;font-size:14px}
 .message-row>.bubble,.bubble.video-bubble{max-width:calc(100% - 52px)}
}
