:root{color-scheme:dark;--bg:#11131b;--panel:#191c26;--card:#202430;--line:#303545;--muted:#a4abbd;--text:#f2f3f8;--accent:#a38cff;--lime:#d2ef9a;--red:#ff9d9d}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,textarea{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:wait;opacity:.5}button,input,textarea,a{outline-offset:4px}button:focus-visible,a:focus-visible{outline:2px solid var(--accent)}input,textarea{color:var(--text);background:#141721;border:1px solid var(--line);border-radius:10px;padding:13px 14px;width:100%;outline:none}input:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #a38cff18}label{display:block;font-size:13px;color:#d4d8e4}label input{margin:8px 0 18px}a{color:#baa9ff;text-underline-offset:3px;overflow-wrap:anywhere}p{line-height:1.7;color:var(--muted)}.hidden{display:none!important}.brand{font-size:24px;font-weight:750;display:flex;align-items:center;letter-spacing:-1px}.brand span{color:var(--accent)}.brand img{width:36px;height:36px;margin-right:10px}.brand small{font-size:9px;letter-spacing:1.6px;margin-left:20px;padding:7px 9px;border:1px solid #474257;border-radius:7px;color:#c1b9d5}.primary{background:var(--accent);color:#18122b;border:0;border-radius:10px;padding:13px 20px;font-weight:650}.primary:hover{background:#b5a3ff}.secondary{border:1px solid var(--line);background:var(--panel);border-radius:9px;padding:10px 14px}.secondary:hover{background:#292d3c}.text-button{border:0;background:none;color:var(--muted);padding:8px 0;font-size:12px}.text-button:hover{color:var(--text)}.icon-button{border:0;background:none;border-radius:8px;font-size:23px;padding:6px 10px;line-height:1;color:var(--muted)}.icon-button:hover{background:var(--card);color:var(--text)}.auth-shell{min-height:100vh;display:grid;grid-template-columns:54% 46%}.intro{padding:42px 6vw 24px;background:radial-gradient(ellipse at 20% 40%,#332c5144,transparent 65%),#151722;display:flex;flex-direction:column;border-right:1px solid #292d3a}.intro-content{margin:auto 0;padding:45px 0}.eyebrow{font-size:10px;letter-spacing:2px;color:var(--lime);font-weight:650}h1{font-size:clamp(32px,3.3vw,48px);letter-spacing:-1.8px;line-height:1.18;font-weight:650;margin:24px 0}h1 em{font-style:normal;color:var(--accent)}.intro-content>p{font-size:15px;max-width:390px}.sample{display:flex;gap:13px;background:#20232e;border:1px solid #353547;border-radius:15px;max-width:400px;padding:20px;margin-top:30px;box-shadow:0 20px 55px #0002;transform:rotate(-1deg)}.sample-avatar,.avatar{border-radius:12px;background:#a38cff22;color:#c5b5ff;display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;font-weight:650;font-size:17px}.sample small{color:var(--muted);font-size:11px}.sample p{color:var(--text);margin:7px 0 12px}.sample-link{padding:9px 12px;border-radius:7px;background:#303142;color:#c6b7ff;font-size:12px}.retention{display:flex;gap:25px;margin-top:35px}.retention span{font-size:10px;color:var(--muted)}.retention strong{display:block;font-size:13px;font-weight:550;color:#e3e6ed;margin-bottom:5px}footer{font-size:10px;color:#7d869c;letter-spacing:.3px}.auth-panel{padding:42px 5vw 24px;display:flex;flex-direction:column}.auth-top{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted)}.auth-top button{margin-left:auto}.dot{width:6px;height:6px;background:var(--lime);border-radius:50%}.auth-card{width:100%;max-width:380px;margin:auto;padding:40px 0}.auth-card h2{font-size:27px;letter-spacing:-.8px;margin:0}.auth-card>p{margin:8px 0 25px}.tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);margin-bottom:25px}.tabs button{background:none;border:0;color:var(--muted);padding:12px 10px}.tabs .active{color:var(--accent);border-bottom:2px solid var(--accent)}#auth-submit{width:100%;text-align:left;margin:4px 0 13px}#auth-submit span{float:right;font-size:18px}.auth-actions{display:flex;justify-content:space-between;gap:10px}.fine{font-size:11px;line-height:1.7!important;color:#8c95ab}.auth-card .fine{margin-top:25px}#auth-message{color:var(--lime);line-height:1.6;font-size:12px;margin:8px 0}.connection{position:fixed;top:0;left:0;right:0;padding:10px;background:#633e25;color:#ffe4c5;text-align:center;font-size:12px;z-index:10}.connection+*{padding-top:0}.chat-shell{height:100vh;display:grid;grid-template-columns:300px 1fr}.sidebar{background:#171a24;border-right:1px solid var(--line);padding:24px 18px 18px;display:flex;flex-direction:column;overflow:hidden}.sidebar header{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.sidebar .brand{font-size:22px}.profile{display:flex;align-items:center;gap:12px;margin-bottom:22px}.profile strong{display:block;font-size:13px}.profile small{display:block;color:var(--muted);font-size:10px;margin-top:5px}.sidebar>.primary{width:100%;padding:12px}.room-search{display:flex;align-items:center;border:1px solid var(--line);background:#11141d;border-radius:9px;margin:17px 0 24px;padding:0 10px;color:var(--muted)}.room-search input{border:0;background:none;margin:0;padding:11px 8px;font-size:12px;box-shadow:none}.section-label{font-size:9px;letter-spacing:1.5px;color:#868fa5;display:flex;justify-content:space-between;padding:0 4px;margin-bottom:9px}#rooms{overflow:auto;flex:1}.room-item{display:flex;gap:11px;background:none;border:0;width:100%;text-align:left;border-radius:10px;padding:12px 10px;margin:3px 0}.room-item:hover{background:#252838}.room-item.active{background:#a38cff18;border:1px solid #a38cff3a}.room-item .avatar{width:36px;height:36px;font-size:14px;border-radius:10px}.room-copy{min-width:0;flex:1}.room-copy strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.room-copy small{color:#949cb0;font-size:10px;display:block;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge{background:var(--lime);color:#213518;border-radius:20px;min-width:18px;height:18px;padding:2px 5px;font-size:10px}.sidebar-bottom{border-top:1px solid var(--line);padding-top:12px;display:grid;gap:3px}.sidebar-bottom button{text-align:left}.sidebar-bottom small{font-size:9px;color:#747e94;padding-top:12px}.conversation{min-width:0;min-height:0;background:radial-gradient(ellipse at 80% 10%,#30284215,transparent 55%),var(--bg)}.welcome{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:30px}.welcome-icon{width:70px;height:70px;display:grid;place-items:center;font-size:38px;background:#a38cff12;color:var(--accent);border-radius:22px;border:1px solid #a38cff30;margin-bottom:35px}.welcome .eyebrow{font-size:9px}.welcome h2{font-size:31px;letter-spacing:-1px;margin:18px 0 0}.welcome p{font-size:13px;margin-bottom:25px}.welcome-notes{display:flex;gap:36px;margin-top:55px}.welcome-notes strong{display:block;font-size:20px;color:#c7bcf0}.welcome-notes span{display:block;color:var(--muted);font-size:10px;margin-top:7px}#active-room{height:100%;display:flex;flex-direction:column}.room-header{display:flex;align-items:center;gap:12px;padding:22px 27px;border-bottom:1px solid var(--line)}.room-heading{flex:1;min-width:0}.room-heading h2{font-size:16px;margin:0 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.room-heading small{font-size:10px;color:var(--muted)}.room-header .secondary{font-size:11px}.expiry-strip{display:flex;justify-content:space-between;gap:15px;padding:10px 27px;background:#191c2566;font-size:9px;color:#7f8aa3;border-bottom:1px solid #272b37}.messages{flex:1;overflow:auto;padding:25px 30px;scroll-behavior:smooth}.message{display:flex;flex-direction:column;align-items:flex-start;margin:0 0 18px;max-width:83%}.message.mine{margin-left:auto;align-items:flex-end}.message-meta{font-size:9px;color:#8f99b0;margin:0 4px 7px}.bubble{padding:12px 15px;background:#222633;border:1px solid #303648;border-radius:3px 14px 14px 14px;line-height:1.6;font-size:13px;overflow-wrap:anywhere;max-width:100%;min-width:80px}.mine .bubble{background:#342e4d;border-color:#49405f;border-radius:14px 3px 14px 14px}.message-body{white-space:pre-wrap}.file-card{display:flex;gap:10px;align-items:center;padding:9px 0;min-width:200px}.file-details{flex:1;min-width:0}.file-details strong{display:block;font-size:11px;word-break:break-word}.file-details small{font-size:9px;color:var(--muted)}.file-card button{font-size:11px;padding:6px 10px}.preview-image{display:block;max-width:300px;max-height:240px;border-radius:8px;margin-bottom:6px;cursor:zoom-in}audio,video{display:block;max-width:100%;width:280px;margin:8px 0}video{max-height:250px}.expired{color:#9398a9;font-size:11px}.composer{border-top:1px solid var(--line);background:#161923;padding:17px 26px 12px}.compose-row{display:flex;gap:10px;align-items:center;border:1px solid #41465a;border-radius:12px;padding:8px;background:#11141e}.compose-row textarea{border:0;resize:none;background:none;padding:9px 0;max-height:120px;box-shadow:none;line-height:1.5}.send-button{border:0;border-radius:9px;background:var(--accent);color:#221837;font-size:22px;font-weight:600;width:36px;height:36px;flex-shrink:0}.compose-help{display:flex;justify-content:space-between;font-size:9px;color:#79849c;margin-top:9px}.upload-status{padding:10px 26px;background:#242b2a;display:flex;gap:15px;align-items:center;color:var(--lime);font-size:11px}.upload-status progress{width:100px;accent-color:var(--lime)}.draft-files{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}.draft-file{background:#2c3040;border-radius:7px;padding:7px 10px;font-size:11px}.draft-file button{background:none;border:0;margin-left:8px;color:var(--red)}.recording{color:#ff9292!important;background:#7a353533!important}.recording::after{content:' ●'}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#303448;color:#f2f3f8;border:1px solid #5b617a;padding:15px 22px;border-radius:12px;box-shadow:0 10px 40px #0008;z-index:30;max-width:min(600px,90vw);font-size:12px;line-height:1.6}dialog{color:var(--text);background:var(--panel);border:1px solid #48485e;border-radius:18px;padding:26px;width:460px;max-width:92vw;max-height:85vh;overflow:auto;box-shadow:0 30px 100px #0008}dialog::backdrop{background:#070912ba;backdrop-filter:blur(4px)}dialog header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}dialog h2{font-size:21px;margin:0}dialog p{font-size:12px}dialog .primary{width:100%;margin:8px 0}#user-results{max-height:190px;overflow:auto}.user-result{padding:12px 8px;border:0;border-bottom:1px solid var(--line);background:none;width:100%;display:flex;align-items:center;gap:12px;text-align:left}.user-result .avatar{width:30px;height:30px;font-size:13px}.check-label{display:flex;align-items:center;gap:10px;margin:20px 0}.check-label input{width:auto;margin:0}.selected-chip{display:inline-block;background:#a38cff26;border:0;border-radius:20px;padding:7px 12px;font-size:11px;margin:8px 5px 0 0}#admin-users .admin-row{display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid var(--line);padding:14px 0;font-size:11px}#admin-users small{display:block;color:var(--muted);margin-top:4px}#admin-users button{font-size:10px}.account-page{min-height:100vh;display:grid;place-items:center;padding:25px}.account-card{max-width:480px;width:100%;background:var(--panel);border:1px solid var(--line);padding:35px;border-radius:18px}.account-card h1{font-size:25px;letter-spacing:-.6px}.account-card .primary{width:100%;margin:10px 0 20px}#mobile-back{display:none}.empty{color:var(--muted);font-size:12px;text-align:center;padding:30px 10px}#voice-draft{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}#voice-draft button{font-size:11px;padding:10px}#voice-preview{margin:0;width:250px}@media(max-width:1050px){.intro{padding:32px 35px}.auth-panel{padding:32px 35px}.brand small{display:none}.chat-shell{grid-template-columns:265px 1fr}.room-header{padding:18px}.room-header .secondary{padding:9px}.expiry-strip span:last-child{display:none}.room-header .avatar{display:none}.messages{padding:20px}.retention{gap:20px}}@media(max-width:750px), (max-width:950px) and (max-height:500px){.auth-shell{display:block}.intro{display:none}.auth-panel{min-height:100vh;padding:30px}.auth-card{padding:40px 0}.chat-shell{display:block}.sidebar{height:100vh;width:100%}.chat-shell.room-open .sidebar{display:none}.conversation{display:none;height:100vh}.chat-shell.room-open .conversation{display:block}.room-header{gap:8px;flex-wrap:wrap;padding:14px}.room-heading{flex:1}.room-header .secondary{font-size:9px}.expiry-strip{padding:10px 14px}#mobile-back{display:block}.composer{padding:12px}.messages{padding:16px}.message{max-width:95%}.preview-image{max-width:220px}.welcome-notes{gap:20px}.compose-help{font-size:8px}}
/* 0.2: local appearance controls and an original Aero-inspired skin. */
select{font:inherit;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:9px;width:100%;padding:12px;margin:8px 0 20px}select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.appearance-bar{position:fixed;right:18px;bottom:15px;z-index:9}.appearance-button{font-size:11px;padding:9px 13px;border:1px solid var(--line);border-radius:20px;color:var(--text);background:var(--panel);box-shadow:0 3px 15px #0003}.sidebar-bottom{padding-bottom:38px}.invite-button{border:1px solid #85995b;background:linear-gradient(135deg,#d2ef9a,#a8d77a);color:#23331a;padding:12px 14px;border-radius:10px;font-weight:650;margin-bottom:9px}.invite-button:hover{filter:brightness(1.06)}.invite-button:focus-visible{outline:3px solid var(--accent)}#invite-result{min-height:24px;overflow-wrap:anywhere}html[data-theme="aero"]{color-scheme:light;--bg:#edf5fb;--panel:#f5faff;--card:#e3eff9;--line:#9db9d0;--muted:#435c70;--text:#152c40;--accent:#166eb7;--lime:#267643;--red:#a12c35}html[data-theme="aero"] body{background:linear-gradient(135deg,#76b8df,#d6eefd 45%,#b9daee)}html[data-theme="aero"] .intro{background:radial-gradient(ellipse at 10% 20%,#ffffffcc,transparent 60%),linear-gradient(140deg,#bddff4cc,#91c5e4aa);border-color:#83a7bf}html[data-theme="aero"] .auth-panel{background:#eff8ffdd}html[data-theme="aero"] .brand small{color:#2d506e;border-color:#6b9ab9}html[data-theme="aero"] .sidebar,html[data-theme="aero"] .room-header{background:linear-gradient(#e9f7ffb8,#a8cfe6b8);backdrop-filter:blur(14px);box-shadow:inset 0 1px #fff}html[data-theme="aero"] .sidebar{border-color:#86afcb}html[data-theme="aero"] .conversation{background:radial-gradient(ellipse at 90% 0,#c2e5fb,transparent 70%),#f1f7fc}html[data-theme="aero"] input,html[data-theme="aero"] textarea,html[data-theme="aero"] .room-search{background:#ffffffd9;color:#152c40;border-color:#9db9d0}html[data-theme="aero"] label{color:#203f58}html[data-theme="aero"] a{color:#005a9e}html[data-theme="aero"] .primary,html[data-theme="aero"] .send-button{background:linear-gradient(#e6f5ff 0%,#a3d0ee 48%,#78b9e2 49%,#b2dcf5);border:1px solid #5793ba;color:#15364f;box-shadow:inset 0 1px #fff,0 2px 3px #35608020;border-radius:7px}html[data-theme="aero"] .primary:hover,html[data-theme="aero"] .send-button:hover{filter:brightness(1.06)}html[data-theme="aero"] .secondary{background:linear-gradient(#fff,#d9eaf6);color:#1e405d;border-color:#91b2ca}html[data-theme="aero"] .secondary:hover{background:#c9e4f7}html[data-theme="aero"] .avatar,html[data-theme="aero"] .sample-avatar{background:linear-gradient(#edfaff,#afd7ef);color:#1b5984;border:1px solid #8db7d2}html[data-theme="aero"] .sample{background:#f5fbff;border-color:#8fb4cf}html[data-theme="aero"] .sample-link{background:#dceef9;color:#225880}html[data-theme="aero"] .retention strong{color:#203f58}html[data-theme="aero"] footer,html[data-theme="aero"] .fine,html[data-theme="aero"] .section-label,html[data-theme="aero"] .sidebar-bottom small,html[data-theme="aero"] .compose-help{color:#486176}html[data-theme="aero"] .room-item:hover{background:#d4eafa}html[data-theme="aero"] .room-item.active{background:linear-gradient(#e9f7ff,#b6d9f0);border-color:#78a9cc}html[data-theme="aero"] .room-copy small{color:#4b667b}html[data-theme="aero"] .bubble{background:#fff;border-color:#b1c8d9;color:#19334a;box-shadow:0 2px 5px #4a789615}html[data-theme="aero"] .mine .bubble{background:linear-gradient(#e7f5ff,#d0eafa);border-color:#8fbad7}html[data-theme="aero"] .message-meta{color:#486176}html[data-theme="aero"] .composer{background:#dcecf7}html[data-theme="aero"] .compose-row{background:#fff;border-color:#8eb3cc}html[data-theme="aero"] .compose-row textarea{background:none}html[data-theme="aero"] .expiry-strip{background:#e0eef8;color:#405f77;border-color:#bad0df}html[data-theme="aero"] .welcome-icon{background:#dceefb;border-color:#aacbe2}html[data-theme="aero"] .welcome-notes strong{color:#28688f}html[data-theme="aero"] dialog{background:linear-gradient(#f8fdff,#e5f1fa);border-color:#79a5c2;box-shadow:0 20px 70px #28567555}html[data-theme="aero"] .selected-chip,html[data-theme="aero"] .draft-file{background:#d4e9f7;color:#1b4566}html[data-theme="aero"] .toast{background:#f5fbff;color:#193c56;border-color:#7eaac9}html[data-theme="aero"] .upload-status{background:#e1f2e7;color:#205435}html[data-theme="aero"] .account-card{background:#f6fbff}html[data-theme="aero"] .expired{color:#596b79}html[data-theme="aero"] #auth-message{color:#24623b}@media(max-width:750px), (max-width:950px) and (max-height:500px){.appearance-bar{right:12px;bottom:12px}.auth-panel{padding-bottom:55px}.sidebar-bottom{padding-bottom:44px}.room-open~.appearance-bar{position:fixed}.compose-help{padding-bottom:28px}.appearance-button{font-size:10px}.preview-image{max-width:100%}}@media(prefers-reduced-transparency:reduce){html[data-theme="aero"] .sidebar,html[data-theme="aero"] .room-header{background:#d9ebf8;backdrop-filter:none}}
/* Keep appearance controls inside the reserved sidebar space on desktop. */
@media(min-width:751px){body:has(#chat:not(.hidden)) .appearance-bar{left:18px;right:auto}}

/* Presence and profile thumbnails in the browser edition. */
.avatar{position:relative;overflow:visible}.avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}.presence-dot{position:absolute;right:-3px;bottom:-3px;width:11px;height:11px;border-radius:50%;border:2px solid var(--panel);z-index:1;background:#cf4353}.presence-dot.online{background:#36ba73}.presence-dot.busy{background:#f1a536}.presence-dot.typing::after{content:'';position:absolute;inset:-4px;border:2px solid #ef5365;border-radius:50%;animation:typing-halo 1.6s ease-in-out infinite}@keyframes typing-halo{0%,100%{opacity:.3;box-shadow:0 0 0 0 #ef53654d}50%{opacity:1;box-shadow:0 0 0 5px #ef536500}}.contact-status{display:block;font-size:9px;color:var(--muted);margin-top:4px}.room-copy .typing-label{color:var(--accent)}.room-copy .draft-label{font-style:italic}.presence-control{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:11px}.presence-control select{width:auto;flex:1;padding:7px 9px;margin:0;min-height:36px}.avatar-settings{border-bottom:1px solid var(--line);padding-bottom:15px;margin-bottom:18px}.avatar-large{width:72px;height:72px;margin:0 auto 12px;font-size:28px}.avatar-picker input{font-size:12px;max-width:100%}#avatar-canvas{display:block;width:128px;height:128px;border-radius:12px;margin:12px auto}#avatar-crop label{margin:8px 0;font-size:11px}#avatar-crop input[type=range]{padding:0;margin:8px 0;height:24px;accent-color:var(--accent)}#avatar-save{width:100%}#avatar-remove{display:block;margin:auto}@media(prefers-reduced-motion:reduce){.presence-dot.typing::after{animation:none;opacity:.8}}@media(max-width:1050px){.room-header #room-avatar{display:grid;width:32px;height:32px;font-size:13px}} 
/* Account sign-in and profile controls */
@font-face{font-family:GoogleSans;src:url("google-sans-medium.ttf") format("truetype");font-weight:500;font-style:normal;font-display:swap}.google-button{width:100%;display:flex;justify-content:center;align-items:center;gap:10px;padding:10px 12px;min-height:44px;background:#fff;color:#1f1f1f;border:1px solid #747775;border-radius:6px;font:500 14px/20px GoogleSans,system-ui;cursor:pointer}.google-button:disabled{opacity:.65;cursor:default}.google-logo{width:20px;height:20px;object-fit:contain;flex-shrink:0}.auth-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:11px;margin:18px 0}.auth-divider::before,.auth-divider::after{content:'';height:1px;background:var(--line);flex:1}#google-setup{margin:8px 0}#profile-email{overflow-wrap:anywhere}#google-link{width:100%;margin:10px 0}#profile-result{overflow-wrap:anywhere}
/* Contact consent and removing a conversation for the current user. */
.contact-tools{display:flex;flex-direction:column;gap:6px;margin:8px 20px}.contact-tools button{font-size:12px;padding:8px}.has-requests{border-color:var(--accent)!important}.room-entry{position:relative}.room-entry .room-item{width:100%;padding-right:35px}.room-remove{position:absolute;right:9px;top:16px;border:0;background:transparent;color:var(--muted);font-size:22px;cursor:pointer;padding:3px 5px}.room-remove:hover{color:#e96d7e}.directory-row,.request-row{padding:14px 0;border-bottom:1px solid var(--line)}.directory-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.directory-profile{display:flex;align-items:center;gap:12px;min-width:0}.directory-profile strong{overflow-wrap:anywhere}.directory-profile small{display:block;color:var(--muted);font-size:12px;margin-top:3px}.directory-profile .avatar{flex-shrink:0}.request-actions,.remove-actions{display:flex;gap:10px;flex-wrap:wrap}.request-actions button,.remove-actions button{width:auto}.pending-contact{padding:14px 24px;margin:0;color:var(--text);background:var(--panel);border-bottom:1px solid var(--line)}.danger-button{background:#a52d43;color:white;border:1px solid #cf5670;border-radius:10px;padding:12px 16px;cursor:pointer}#directory-users{max-height:50vh;overflow:auto}#requests-count{display:inline-block;margin-left:4px}#remove-room{flex-shrink:0}
@media(max-width:600px){.directory-row{align-items:flex-start;flex-direction:column}.directory-row button{width:100%}.room-header{flex-wrap:wrap}.room-heading{min-width:120px}.room-header #export-chat,.room-header #export-links{font-size:11px;padding:7px}.contact-tools{margin:8px 16px}.remove-actions button{width:100%}}
.sidebar header{margin-bottom:16px}.profile{margin-bottom:14px}.contact-tools{display:grid;grid-template-columns:1fr 1fr;margin:8px 0;gap:6px}.contact-tools button{font-size:11px;padding:7px;min-height:40px}.room-search{margin:10px 0 16px}.presence-control{margin-bottom:10px}.sidebar{padding-top:18px}

/* Browser notification preferences */
.privacy-settings {border-top:1px solid var(--line);margin-top:20px;padding-top:14px}
#sounds-dialog label {margin-top:18px} #sounds-dialog input[type="range"] {width:100%;padding:0}
#sounds-dialog output {font-size:12px;color:var(--muted)}
#sound-state {font-size:13px;color:var(--accent);margin-top:16px}
.muted-marker {font-size:14px;color:var(--muted);flex:none} #mute-room.is-muted {opacity:.75}
#mute-current {font-size:13px} .room-header {flex-wrap:wrap}

.presence-dot.chatty{background:#39b9ee}.presence-dot.hidden{background:#8793a4}.directory-profile .contact-status{font-size:12px}
/* WWW 0.7: sender tools and responsive conversation layout. */
.sos-banner{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--text);flex:0 0 auto;padding:3px 8px;min-height:48px}.sos-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:13px 5px 5px 5px;background:#0f5ef7;color:#fff;font:bold 15px system-ui;box-shadow:0 3px 10px #0f5ef72e}.sos-copy{display:grid;gap:3px;overflow:hidden}.sos-copy strong{font:bold 17.92px 'Bodoni 72',Georgia,serif;white-space:nowrap}.sos-copy small{font:11.2px 'Avenir Next',system-ui,sans-serif;white-space:nowrap}.sos-letter{display:inline-block}.sos-animate .sos-letter{animation:sos-letter-in 1.15s cubic-bezier(.16,1,.3,1) both}.from-top{--sos-y:-1.2em;--sos-r:-3deg}.from-bottom{--sos-y:1.2em;--sos-r:3deg}@keyframes sos-letter-in{from{opacity:0;transform:translateY(var(--sos-y)) rotate(var(--sos-r))}to{opacity:1;transform:none}}
.extra-room-tools,.compose-options{display:flex;gap:8px;flex-wrap:wrap;padding:7px 14px;background:var(--panel);border-bottom:1px solid var(--line)}.extra-room-tools .secondary{font-size:11px;padding:7px 10px}.compose-options{padding:0 0 7px;border:0;background:transparent}.compose-options button{font-size:11px;padding:5px 6px}.room-filter{margin:4px 0 10px;padding:7px;font-size:11px}.password-settings{border-top:1px solid var(--line);padding-top:15px;margin-top:20px}.password-settings .secondary{width:100%;margin:8px 0}.message-tools{display:flex;gap:4px;align-items:center;flex-wrap:wrap;margin:7px 0 0;max-width:100%}.message-tools .text-button{font-size:10px;padding:5px 7px}.reactions{display:flex;gap:4px}.reaction{border:1px solid var(--line);background:var(--panel);border-radius:14px;padding:3px 7px;font-size:12px;color:var(--text)}.reaction.selected,.poll-options .selected{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent)}.message-expiry{font-size:9px;color:var(--muted);margin-top:4px}.edited-label,.pin-label{font-size:9px}.pin-label{color:var(--accent)}.reply-quote{display:block;width:100%;text-align:left;border:0;border-left:3px solid var(--accent);background:var(--panel);color:var(--muted);padding:7px 9px;margin-bottom:8px;font-size:11px;border-radius:4px}.reply-preview{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;border-left:3px solid var(--accent);padding:8px;margin-bottom:8px;background:var(--panel)}.audio-speed{width:85px;padding:5px;margin:3px 0;font-size:11px}.poll-options{display:grid;gap:7px;margin-top:8px}.poll-options button{text-align:left;font-size:12px}.search-result{border-bottom:1px solid var(--line);padding:14px 0}.search-result p{white-space:pre-wrap;overflow-wrap:anywhere}.search-result small{color:var(--muted)}.search-result button{margin:4px;font-size:11px}.message-highlight .bubble{outline:3px solid var(--accent)}#private-view-dialog{width:min(90vw,700px)}#private-image{display:block;max-width:100%;max-height:65dvh;object-fit:contain;margin:auto;user-select:none;-webkit-user-select:none}#private-time{display:block;text-align:center;font-size:20px;margin:10px}#edit-message-body,#poll-choices,#schedule-text{width:100%;resize:vertical}#fullscreen{font-size:23px;margin-left:4px;flex-shrink:0}#google-link{display:none!important}
html[data-theme=light],html[data-theme=gg],html[data-theme=glass]{color-scheme:light;--bg:#f1f5f9;--panel:#fff;--line:#c4d1dd;--muted:#506376;--text:#162b3c;--accent:#2469aa;--lime:#237a49;--red:#b52a42}
html[data-theme=gg]{--bg:#fff8df;--panel:#fffdf0;--line:#e0ce8d;--accent:#986009;--text:#49350b;--muted:#76612e}html[data-theme=glass]{--bg:#e8f2f9;--panel:#ffffffb8;--line:#a5c8da;--accent:#0b70ae;--text:#143449;--muted:#48687a}
html[data-theme=midnight]{--bg:#07151f;--panel:#102633;--line:#274957;--accent:#65ded4;--text:#e2f5f4;--muted:#91b2ba}
html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) :is(.sidebar,.auth-panel,.composer,.extra-room-tools,.compose-row,.room-search,.bubble,.sample,.account-card){background:var(--panel);color:var(--text);border-color:var(--line)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) :is(input,textarea,select){background:var(--panel);color:var(--text);border-color:var(--line)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) .mine .bubble{background:var(--bg);border-color:var(--accent)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) :is(.room-copy small,.fine,.message-meta,.compose-help,.section-label,.expiry-strip){color:var(--muted)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) :is(.secondary,.text-button,.icon-button){color:var(--text)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) .secondary{background:var(--bg);border-color:var(--line)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) .room-item.active{background:var(--bg);border-color:var(--accent)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) .room-item:hover{background:var(--bg)}html[data-theme=glass] body{background:linear-gradient(135deg,#8bcced,#dbeffb,#badcc9)}html[data-theme=glass] :is(.sidebar,.room-header,dialog){background:#ffffffb8;backdrop-filter:blur(18px);box-shadow:inset 0 1px 1px #fff,0 5px 18px #38576b20}html[data-theme=glass] .bubble{border-radius:20px;box-shadow:0 3px 10px #38576b15}html[data-theme=midnight] :is(.sidebar,.composer,.compose-row,.bubble,.room-search){background:var(--panel);border-color:var(--line)}
.chat-shell,.sidebar,.conversation{height:100dvh}.room-header{flex-wrap:wrap;gap:10px}.room-heading{flex:1 1 100px}.messages{overscroll-behavior:contain}.composer{padding-bottom:max(12px,env(safe-area-inset-bottom))}dialog{max-height:85dvh}.sidebar{padding-top:max(18px,env(safe-area-inset-top));padding-bottom:max(18px,env(safe-area-inset-bottom))}
@media(max-width:1100px){.sos-copy small{display:none}.sos-banner{gap:7px}.room-header{padding:12px 15px}.room-header .secondary{font-size:10px;padding:7px}}
@media(max-width:750px), (max-width:950px) and (max-height:500px){.chat-shell{height:100dvh}.sidebar{height:100dvh;overflow:auto}.conversation{height:100dvh}.room-header{padding-top:max(10px,env(safe-area-inset-top))}.sos-banner{margin-left:auto;padding:0}.sos-mark{width:32px;height:32px;font-size:11px;border-radius:10px 4px 4px 4px}.sos-copy strong{font-size:15px}.room-heading{flex-basis:90px}.room-header .secondary{min-height:32px}.extra-room-tools{gap:4px;padding:5px 9px}.extra-room-tools .secondary{font-size:10px;min-height:32px;padding:5px}.composer{padding:8px 9px max(9px,env(safe-area-inset-bottom))}.compose-row textarea,input,select{font-size:16px}.compose-row{gap:7px}.compose-row .icon-button{padding:7px}.compose-help{padding-bottom:0;font-size:8px}.appearance-bar{bottom:max(8px,env(safe-area-inset-bottom));right:8px}body:has(.room-open) .appearance-bar{display:none}.message{max-width:94%}.message-tools{gap:3px}.message-tools .text-button{min-height:32px;padding:5px 7px}.reaction{min-height:30px}audio{max-width:100%}.sos-copy small{display:none}.sidebar header{margin-bottom:18px}.profile{margin-bottom:12px}.contact-tools{margin:7px 0}.sidebar-bottom{padding-bottom:40px}.auth-panel{min-height:100dvh}}
@media(prefers-reduced-motion:reduce){.sos-animate .sos-letter{animation:none}.messages{scroll-behavior:auto}}@media(prefers-reduced-transparency:reduce){html[data-theme=glass] :is(.sidebar,.room-header,dialog){background:#f0f6fa;backdrop-filter:none}}

.voice-file-actions{display:flex;flex-direction:column;gap:12px;align-items:stretch}.voice-file-actions>.text-button{padding:4px 8px}

html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) label{color:var(--text)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) a{color:#305b91}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) .expiry-strip{background:var(--panel)}.password-settings{margin-top:20px}.password-settings form{display:grid;gap:8px}#profile-form~button{margin:8px 8px 0 0}

html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) .intro{background:var(--bg);border-color:var(--line)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) :is(.retention strong,.sample p){color:var(--text)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) :is(.avatar,.sample-avatar){color:var(--accent)}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) .primary{color:#fff}html:is([data-theme=light],[data-theme=gg],[data-theme=glass]) .primary:hover{background:var(--accent);filter:brightness(1.08)}

/* Collapsible account options keep the conversation list usable on small screens. */
.sidebar-bottom{flex-shrink:0}
#sidebar-options-panel{display:flex;flex-direction:column;gap:4px;max-height:38dvh;overflow-y:auto;padding-bottom:8px}
#sidebar-options-panel.hidden{display:none}
#sidebar-options-panel .appearance-button{position:static;width:100%;background:transparent;box-shadow:none;border:0;text-align:left;padding:9px 12px;color:var(--text)}
.options-button{width:100%;min-height:42px;border:1px solid #b16a1b;border-radius:10px;background:linear-gradient(#ffcd7b,#efa33f);color:#49300d;font-weight:750;box-shadow:inset 0 1px 0 #ffe6bc,0 2px 6px #0002;padding:10px 12px;cursor:pointer}
.options-button:hover{background:linear-gradient(#ffdc9e,#f6b251)}
.options-button[aria-expanded=true]{box-shadow:inset 0 2px 5px #80551d40}
.options-button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
body:has(#chat:not(.hidden))>.appearance-bar{display:none}
.profile-alerts{border-top:1px solid var(--line);margin:16px 0;padding-top:12px;display:flex;flex-wrap:wrap;gap:10px}
.profile-alerts h3{flex-basis:100%;margin:0 0 2px}

/* Foldery sits nearer the contact name; the two brands share letter motion. */
.room-banners{display:flex;align-items:center;justify-content:center;gap:24px;flex:0 1 auto;max-width:100%}.foldery-banner{border:1px solid #b0cbc4;background:linear-gradient(135deg,#edf7f2,#c6e0d8);border-radius:12px;color:#223a36!important;padding:3px 10px;box-shadow:inset 0 1px 0 #fff9,0 2px 7px #679d9718}.foldery-mark{width:42px;height:42px;flex-shrink:0}.foldery-banner .sos-copy strong{font:bold 18px system-ui,sans-serif;letter-spacing:-.5px}.foldery-banner .sos-copy small{color:#45635d;font-size:10px;display:block}.room-banners a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media(max-width:1100px){.room-banners{gap:14px}.foldery-banner .sos-copy small{display:block;font-size:9px}}
@media(max-width:750px), (max-width:950px) and (max-height:500px){.room-banners{flex:1 0 100%;gap:20px;order:1}.room-banners .sos-banner{margin-left:0;min-height:40px}.foldery-banner{padding:2px 8px!important}.foldery-mark{width:32px;height:32px}.foldery-banner .sos-copy strong{font-size:15px}.foldery-banner .sos-copy small{font-size:8px}.room-header>.secondary{order:2}}

/* Keep every text action aligned in the expanded options menu. */
#sidebar-options-panel>.text-button{display:block;width:100%;margin:0;padding:9px 12px;text-align:left;font-size:12px;line-height:1.4;border:0}

#sidebar-options-panel>.text-button,#sidebar-options-panel>.appearance-button{padding:9px 12px!important;margin:0!important;text-align:left!important;width:100%;font-size:12px}
#sidebar-options-panel>small{display:block;margin:0;padding:9px 12px;text-align:left;line-height:1.4}
.group-candidates{display:flex;flex-direction:column;gap:8px;max-height:34dvh;overflow-y:auto;margin:12px 0}.group-candidate{display:flex;align-items:center;gap:10px}.group-candidate .directory-profile{flex:1;min-width:0}.group-candidate .secondary{flex-shrink:0}#limited-video{width:100%;max-height:70dvh}

/* Keep at least one contact reachable when Options are expanded. */
.sidebar{overflow-y:auto}#rooms{min-height:90px}
/* Web 0.9: receipt labels and local QR invitations. */
.read-receipt{display:block;margin:6px 8px 0;color:var(--muted);font-size:11px;text-align:right}
.qr-invitation{margin-top:22px;padding-top:15px;border-top:1px solid var(--border)}
#invite-qr-canvas{display:block;max-width:240px;width:100%;height:auto;margin:18px auto;background:white;border-radius:0}
#invite-qr-link{width:100%;font-size:12px}
.qr-buttons{display:flex;flex-wrap:wrap;gap:8px}
.qr-contact{display:flex;align-items:center;gap:12px;margin:20px 0}

/* Compact four-action sidebar panel; notes is inserted after new-room. */
.sidebar .contact-tools{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-auto-rows:1fr;gap:6px;margin:8px 0;flex-shrink:0}
.sidebar .contact-tools>button{width:100%;min-width:0;min-height:40px;margin:0;padding:7px 8px;font-size:11px;line-height:1.35;text-align:center}

/* Phone layout: compact header, readable typing and touch-sized controls. */
.mobile-room-tools{display:none}
.compose-row textarea{min-height:44px}
@media(max-width:750px), (max-width:950px) and (max-height:500px){
 .chat-shell,.sidebar,.conversation{height:var(--mobile-view-height,100dvh)}
 .chat-shell{overflow:hidden}.sidebar{min-height:0}.conversation,#active-room{overflow:hidden}#active-room{min-height:0}
 #active-room>.room-header,#active-room>.extra-room-tools,#active-room>.expiry-strip,#active-room>.composer,#active-room>.pending-contact,#active-room>.upload-status{flex-shrink:0}
 .messages{min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px 12px}
 .room-header{padding:8px 10px;gap:6px}.room-heading{min-width:0;flex:1 1 70px}.room-heading h2{font-size:16px}.room-heading small{font-size:12px}
 .room-header>.avatar{width:36px;height:36px}.room-header>.icon-button{width:44px;height:44px;padding:8px;flex-shrink:0}
 .room-header>.mobile-room-tools{display:block;max-width:104px;min-height:44px;font-size:12px;padding:7px 9px;order:0}
 .room-header>#remove-room{display:none}
 .room-header>:is(#export-links,#export-chat,#mute-room),#active-room>.extra-room-tools{display:none}
 .mobile-tools-open .room-header>:is(#export-links,#export-chat,#mute-room){display:block;min-height:44px;font-size:12px;flex:1 1 auto;padding:8px}
 .mobile-tools-open .room-header>#remove-room{display:block;order:2}
 #active-room.mobile-tools-open>.extra-room-tools{display:flex;gap:6px;padding:6px 10px}
 .extra-room-tools>.secondary{min-height:44px;font-size:12px;padding:8px;flex:1 1 auto}
 .room-banners{gap:16px;margin-top:2px}.room-banners .sos-banner{min-height:44px}.room-banners .sos-copy strong{font-size:16px}.room-banners .sos-copy small{font-size:9px}
 .expiry-strip{padding:6px 12px;font-size:10px}.expiry-strip>span:last-child{display:none}
 .composer{padding:6px 8px max(8px,env(safe-area-inset-bottom))}.compose-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;padding:0 0 5px}.compose-options button{min-width:0;min-height:44px;font-size:12px;line-height:1.25;padding:5px 2px}
 .compose-row{gap:4px;padding:4px}.compose-row textarea{min-width:0;flex:1;min-height:44px;max-height:96px;font-size:16px;line-height:1.45;padding:10px 2px}
 .compose-row .icon-button,.compose-row .send-button{width:44px;height:44px;min-width:44px;padding:7px;flex-shrink:0}.compose-help{font-size:10px;gap:8px;margin-top:5px}.compose-help #compose-hint{display:none}.compose-help #file-limit{margin-left:auto}
 .sidebar .contact-tools>button{min-height:48px;font-size:13px}.room-item{min-height:64px}.room-item strong{font-size:14px}.room-item .preview{font-size:12px}#sidebar-options,.sidebar-bottom button{min-height:44px}.room-filter{min-height:44px;font-size:16px}.room-search input{font-size:16px}
 dialog{padding:18px;max-width:calc(100vw - 20px);max-height:calc(var(--mobile-view-height,100dvh) - 24px)}dialog input,dialog textarea,dialog select{font-size:16px}dialog .icon-button,dialog .secondary,dialog .text-button{min-height:44px}dialog h2{font-size:20px}
 .message-meta,.message-expiry{font-size:11px}.bubble{font-size:15px;overflow-wrap:anywhere}.message-tools .text-button{min-height:40px;font-size:12px}.reaction{min-height:36px}
 html.mobile-keyboard .room-banners,html.mobile-keyboard .expiry-strip{display:none}
}
@media(max-width:950px) and (max-height:500px){.room-banners,.expiry-strip{display:none}.compose-help{display:none}.room-header{padding-top:5px;padding-bottom:5px}.compose-options button{min-height:36px}}

/* Status timing and standalone safe areas. */
.status-timing{padding:0 18px 8px;flex-shrink:0;font-size:12px}.status-timing label{display:flex;align-items:center;gap:8px;margin:0}.status-timing label>span{flex:1}.status-timing select{max-width:155px;min-width:0;padding:5px;font-size:12px}.status-timing small{display:block;margin-top:4px;opacity:.75}.status-timing #status-custom{display:flex;gap:6px;margin-top:6px}.status-timing #status-custom.hidden{display:none}.status-timing input{width:80px;min-width:0}.status-timing button{padding:5px 9px}#homescreen-steps{padding-left:22px;line-height:1.6}#homescreen-steps li{margin-bottom:10px}
@media(max-width:750px),(max-width:950px) and (max-height:500px){.status-timing{padding:0 12px 6px}.status-timing select,.status-timing input{font-size:16px;min-height:44px}.status-timing small{font-size:11px}}
@media(display-mode:standalone){body{padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}html,body{overscroll-behavior-y:none}}

/* Discovery controls keep the existing layout and themes. */
#conversations-toggle{width:100%;margin:7px 0;flex-shrink:0}#conversations-panel{flex-shrink:0}.sidebar #conversations-panel.hidden{display:none}.presence-dot.away{background:#a48ac4}#profile-number{font-weight:600}#login-hidden-label{margin:10px 0}.sidebar #conversations-panel .contact-tools{margin-top:0}
.break-marker{position:absolute;right:-5px;top:-7px;font-size:15px;line-height:1;z-index:2;pointer-events:none}

.room-poke{position:absolute;left:13px;bottom:4px;width:24px;height:24px;min-height:0;padding:0;background:var(--panel);border:1px solid var(--line);border-radius:50%;color:#25965b;font-size:15px;cursor:pointer;z-index:2}.room-poke:hover{box-shadow:0 0 0 3px #36ba7333}.room-poke:disabled{opacity:.4;cursor:default}.room-poke:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Match the status picker to the duration picker, including column alignment. */
.presence-control{padding:0 18px;gap:8px;font-size:12px}
.presence-control,.status-timing>label{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,155px);align-items:center;gap:8px}
.presence-control select,.status-timing>label>select{width:100%;max-width:155px;min-width:0;min-height:0;margin:0;padding:5px;font-size:12px}
@media(max-width:750px),(max-width:950px) and (max-height:500px){.presence-control{padding:0 12px}.presence-control select,.status-timing>label>select{font-size:16px;min-height:44px}}

.profile-number-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;margin:12px 0}.profile-number-row #profile-number{margin:0;min-width:0;overflow-wrap:anywhere}.profile-number-row #number-password-shortcut{margin:0;padding:10px 14px;min-height:44px;white-space:nowrap}

#vault-dialog{width:min(680px,calc(100vw - 24px));max-height:85dvh;overflow:auto}#vault-dialog progress{width:100%;margin:10px 0}#vault-drop{border:2px dashed #6598b6;border-radius:12px;padding:18px;margin:14px 0}#vault-files .vault-file{border-top:1px solid #9db9cb;padding:14px 0;overflow-wrap:anywhere}#vault-dialog section{margin:16px 0}

#conversations-toggle,#sidebar-options{width:80%;margin-left:auto;margin-right:auto;text-align:center;align-self:center;display:block}#conversations-panel .contact-tools>.room-search,#conversations-panel .contact-tools>.room-filter{width:100%;min-width:0;margin:0;min-height:40px;font-size:11px;border-radius:9px}#conversations-panel .contact-tools>.room-search{padding:0 7px;gap:4px;align-items:center}#conversations-panel .room-search input{min-width:0;margin:0;padding:7px 0;font-size:11px}#conversations-panel .contact-tools>.room-filter{padding:7px 8px}@media(max-width:750px),(max-width:950px) and (max-height:500px){#conversations-panel .contact-tools>.room-search,#conversations-panel .contact-tools>.room-filter{min-height:48px}#conversations-panel .room-search input,#conversations-panel .contact-tools>.room-filter{font-size:16px}}

/* Compact desktop sidebar: scale the column and shared button widths by 0.85. */
@media (min-width:951px),(min-width:751px) and (min-height:501px){.chat-shell{--soul-sidebar-width:255px;grid-template-columns:var(--soul-sidebar-width) minmax(0,1fr)}.sidebar{padding-left:15.225px;padding-right:15.225px;--sidebar-item-width:calc((var(--soul-sidebar-width) - 31.45px)*.8)}#conversations-toggle,#sidebar-options{width:var(--sidebar-item-width);max-width:100%}#rooms .room-entry{width:var(--sidebar-item-width);max-width:100%;margin-left:auto;margin-right:auto}}
@media (min-width:751px) and (max-width:1050px) and (min-height:501px),(min-width:951px) and (max-width:1050px){.chat-shell{--soul-sidebar-width:225.25px}}
@media(max-width:750px),(max-width:950px) and (max-height:500px){#rooms .room-entry{width:80%;margin-left:auto;margin-right:auto}}

@media (min-width:951px),(min-width:751px) and (min-height:501px){.presence-control,.status-timing{padding-left:0;padding-right:0}.presence-control,.status-timing>label{grid-template-columns:minmax(0,1fr) minmax(0,85.25px)}.presence-control select,.status-timing>label>select{max-width:85.25px}.presence-control>span,.status-timing>label>span{overflow-wrap:anywhere}}

/* Compact action buttons in Options, preserving their height. */
#sidebar-options-panel>#invite-open,#sidebar-options-panel>#vault-open,#sidebar-options-panel>#feedback-open{width:85%;max-width:85%;align-self:center;margin-left:auto!important;margin-right:auto!important;white-space:normal;overflow-wrap:anywhere}

/* The Conversations button already labels this list. */
.sidebar>.section-label{display:none}

/* Keep status labels, fields and expiry note together. */
@media (min-width:951px),(min-width:751px) and (min-height:501px){.presence-control,.status-timing>label{grid-template-columns:80px 85.25px;gap:6px}.presence-control{margin-bottom:3px}.status-timing{padding-bottom:4px}.status-timing small{margin-top:2px;font-size:10px;line-height:1.3}}

/* Status and duration use the same orange panel style as Conversations. */
.presence-control,.status-timing>label{width:80%;max-width:100%;margin-left:auto;margin-right:auto;min-height:42px;border:1px solid #b16a1b;border-radius:10px;background:linear-gradient(#ffcd7b,#efa33f);color:#49300d;box-shadow:inset 0 1px 0 #ffe6bc,0 2px 6px #0002;padding:6px 8px;font-weight:750;grid-template-columns:minmax(0,1fr) 85.25px;gap:6px}
.presence-control{margin-bottom:5px;flex-shrink:0}
.status-timing{padding:0 0 5px}
#status-timing-note{display:none}
@media (min-width:951px),(min-width:751px) and (min-height:501px){.presence-control,.status-timing>label{width:var(--sidebar-item-width);padding:6px 8px;grid-template-columns:minmax(0,1fr) 85.25px}.status-timing{padding:0 0 5px}}

/* One shared left edge, 16 CSS pixels from the sidebar edge. */
.sidebar{padding-left:16px;padding-right:16px}
.presence-control,.status-timing>label,#conversations-toggle,#sidebar-options,#rooms .room-entry{margin-left:0;margin-right:auto;align-self:flex-start}
.status-timing{padding-left:0;padding-right:0}
#rooms .room-item{padding-left:0}
#rooms .room-poke{left:3px}
#sidebar-options-panel>#invite-open,#sidebar-options-panel>#vault-open,#sidebar-options-panel>#feedback-open{margin-left:0!important;margin-right:auto!important;align-self:flex-start}

/* Equal 20px visual gutters; the right border is included in that distance. */
.sidebar{padding-left:20px;padding-right:19px}
@media (min-width:951px),(min-width:751px) and (min-height:501px){.chat-shell{--soul-sidebar-width:218.8359375px}.sidebar{--sidebar-item-width:178.8359375px}}
@media (min-width:751px) and (max-width:1050px) and (min-height:501px),(min-width:951px) and (max-width:1050px){.chat-shell{--soul-sidebar-width:195.0390625px}.sidebar{--sidebar-item-width:155.0390625px}}
@media(max-width:750px),(max-width:950px) and (max-height:500px){.presence-control,.status-timing>label,#conversations-toggle,#sidebar-options,#rooms .room-entry{width:100%}}

/* Remaining minutes appear between the duration label and select. */
.status-timing>label{grid-template-columns:minmax(0,1fr) auto 85.25px;gap:3px}
#status-minutes-left{color:#b00020;font-size:inherit;font-weight:inherit;font-variant-numeric:tabular-nums;flex:none}
#status-minutes-left[hidden]{display:none}
.status-timing>label:has(#status-minutes-left[hidden]){grid-template-columns:minmax(0,1fr) 85.25px}

#room-ftp{color:#b00020;font-weight:750}

/* A short alternating letter motion once every 20 seconds. */
.sidebar .brand .soul-brand-text,.sidebar .brand .soul-brand-word{color:inherit;white-space:nowrap}
.sidebar .brand .soul-brand-chat{color:var(--accent)}
.sidebar .brand .soul-brand-letter{display:inline-block;color:inherit;animation:soul-brand-motion 20s cubic-bezier(.16,1,.3,1) infinite;--brand-y:-.7em;--brand-r:-4deg}
.sidebar .brand .soul-brand-letter:nth-child(even){--brand-y:.7em;--brand-r:4deg}
@keyframes soul-brand-motion{0%,8%,100%{transform:none;opacity:1}2%{transform:translateY(var(--brand-y)) rotate(var(--brand-r));opacity:.35}7%{transform:none;opacity:1}}
.soul-brand-word .soul-brand-letter:nth-child(1){animation-delay:0.0s}
.soul-brand-word .soul-brand-letter:nth-child(2){animation-delay:0.09s}
.soul-brand-word .soul-brand-letter:nth-child(3){animation-delay:0.18s}
.soul-brand-word .soul-brand-letter:nth-child(4){animation-delay:0.27s}
.soul-brand-chat .soul-brand-letter:nth-child(1){animation-delay:0.36s}
.soul-brand-chat .soul-brand-letter:nth-child(2){animation-delay:0.45s}
.soul-brand-chat .soul-brand-letter:nth-child(3){animation-delay:0.54s}
.soul-brand-chat .soul-brand-letter:nth-child(4){animation-delay:0.63s}
@media(prefers-reduced-motion:reduce){.sidebar .brand .soul-brand-letter{animation:none}}

#room-ftp2{color:#0756bb;font-weight:750}

/* Freak Frame: animate the whole logo tile, independently of banner lettering. */
.room-banners{flex-wrap:wrap}
.freak-frame-banner{display:grid;place-items:center;flex:0 0 72px;width:72px;min-height:54px;border:1px solid #595959;border-radius:9px;background:linear-gradient(135deg,#111,#272727);padding:3px;text-decoration:none;animation:freak-frame-orbit 20s ease-in-out infinite;transform-origin:center;box-shadow:0 2px 7px #0003}
.freak-frame-banner img{display:block;width:64px;height:48px;object-fit:contain}
.freak-frame-banner:hover{border-color:#78d5ef;box-shadow:0 0 12px #3da4c560}
.freak-frame-banner:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@keyframes freak-frame-orbit{0%,75%,100%{transform:none;box-shadow:0 2px 7px #0003}80%{transform:rotate(-4deg) scale(1.04);box-shadow:0 0 13px #64c9e870}86%{transform:rotate(4deg) scale(1.04);box-shadow:0 0 13px #64c9e870}93%{transform:none}}
@media(max-width:750px),(max-width:950px) and (max-height:500px){.room-banners{gap:10px}.freak-frame-banner{flex-basis:52px;width:52px;min-height:44px;padding:2px}.freak-frame-banner img{width:48px;height:36px}}
@media(prefers-reduced-motion:reduce){.freak-frame-banner{animation:none}}

/* Status controls are part of the same collapsible Conversations menu. */
#conversations-panel .contact-tools{grid-auto-rows:auto}
#conversations-panel .contact-tools>.presence-control,#conversations-panel .contact-tools>.status-timing{grid-column:1 / -1;width:100%;min-width:0;margin:0}
#conversations-panel .status-timing{padding:0}
#conversations-panel .status-timing>label{width:100%;margin:0}

#vault-chat-buttons{display:inline-flex;gap:6px}#vault-chat-buttons[hidden],#vault-chat-invites[hidden]{display:none}
.vault-shared-button{color:#b00020;font-weight:750}.vault-shared-button[data-secondary=true]{color:#0756bb}
.vault-chat-invite{max-width:560px;margin:8px 0 16px;padding:14px 16px;border:1px solid #86afcb;border-radius:12px;background:var(--panel);color:var(--text);box-shadow:0 2px 6px #0001}.vault-chat-invite p{margin:8px 0 12px}.vault-chat-invite .request-actions button{min-height:44px}

/* One chat-options disclosure for desktop and phone. */
.room-action-menu{position:relative;flex:0 0 auto}
.room-action-menu>.mobile-room-tools{display:block;white-space:nowrap}
.room-action-panel{position:absolute;top:calc(100% + 8px);right:0;z-index:20;display:grid;gap:6px;min-width:180px;max-width:calc(100vw - 24px);padding:8px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 24px #0004}
.room-header .room-action-panel>.secondary{width:100%;min-height:40px;padding:9px 12px;font-size:13px;text-align:left;white-space:nowrap}
@media(max-width:750px), (max-width:950px) and (max-height:500px){.room-action-menu{order:0}.room-action-menu>.mobile-room-tools{min-height:44px;padding:8px;font-size:12px}.room-header .room-action-panel>.secondary{min-height:44px;font-size:14px}}
