/* Account rail and settings: logical properties also support Arabic. */
.rooms-account{order:10;flex:none;margin-block-start:auto;padding-block-start:12px;border-top:1px solid #eadfdd}
.rooms-account .account-pill{width:100%;max-width:none;height:62px;display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:1fr 1fr;column-gap:10px;text-align:start;border-radius:14px;padding:9px 12px;background:#fff7f4;border:1px solid #eadfdd}
.rooms-account .account-pill .account-avatar{grid-column:1;grid-row:1/3;width:36px;height:36px;align-self:center}
.rooms-account .account-pill strong{display:block!important;grid-column:2;grid-row:1;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;align-self:end}
.rooms-account .account-pill small{display:block!important;grid-column:2;grid-row:2;font-size:11px;color:#877370;align-self:start}
.topbar-actions #inboxButton{order:2}.topbar-actions #conversationToggle{order:3}.topbar-actions #taskCountButton{order:1}
#conversationToggle .stop-icon svg{transform:rotate(135deg)}
#inboxButton svg,#conversationToggle svg,.settings-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
#profileDialog.settings-dialog{width:min(900px,calc(100vw - 32px));max-width:900px;height:min(720px,calc(100dvh - 40px));max-height:calc(100dvh - 40px);padding:0;border:1px solid #e7dcd7;border-radius:22px;overflow:hidden;background:#fffdfb;color:#3f302e}
#profileDialog #profileForm{display:flex;flex-direction:column;gap:0;width:100%;max-width:none;height:100%;max-height:none;padding:0;overflow:hidden;background:transparent}
#settingsTitle{margin:0;padding:22px 26px 18px;font-size:20px;border-bottom:1px solid #eee5df}
#profileDialog .dialog-close{inset-inline-end:16px;inset-inline-start:auto;top:14px;z-index:2}
.settings-shell{display:grid;grid-template-columns:190px minmax(0,1fr);flex:1;min-height:0}
.settings-nav{padding:14px 10px;background:#f8f3ef;display:flex;flex-direction:column;gap:5px;border-inline-end:1px solid #eee5df;overflow:auto}
#profileDialog .settings-nav button{display:flex;align-items:center;gap:10px;width:100%;flex:none;min-height:44px;margin:0;padding:11px 12px;background:transparent;border:0;border-radius:11px;text-align:start;font-size:13px;font-weight:500;box-shadow:none;color:#74625c}
#profileDialog .settings-nav button[aria-selected=true]{background:#f3dfd8;color:#a73c2d;font-weight:650}
#profileDialog .settings-nav button:hover{background:#eee4dd}
.settings-content{overflow:auto;min-width:0;overscroll-behavior:contain;padding:24px 28px}
.settings-panel{display:flex;flex-direction:column;gap:12px;min-width:0}
.settings-panel[hidden],#profileDialog [hidden]{display:none!important}
.settings-panel h3{margin:0 0 10px;font-size:17px}
.settings-panel label,.settings-panel legend{font-size:13px}
#profileDialog .settings-panel input:not([type=checkbox]),#profileDialog .settings-panel textarea,#profileDialog .settings-panel select{width:100%;min-width:0;box-sizing:border-box;font:inherit;font-size:16px;border-radius:10px;border:1px solid #e3d7d0;padding:10px 12px;background:#fff}
#profileDialog .settings-panel input[type=checkbox]{width:17px;height:17px;flex:none;accent-color:#b74836}
#profileDialog .profile-section{margin:8px 0 0;padding:16px;min-width:0;border:1px solid #e9e0da;border-radius:14px}
#profileDialog .profile-avatar-control{justify-content:flex-start;margin:0 0 10px}
#profileDialog .profile-avatar-preview{width:60px;height:60px}
#profileDialog .settings-panel button{font-size:13px;min-height:42px;margin:0;border-radius:10px}
#profileStatus{flex:none;max-height:80px;overflow:auto;margin:0!important;padding:0 24px;background:#fffaf5;font-size:13px}
#profileStatus:not(:empty){padding-block:12px;border-top:1px solid #eee5df}
.settings-info,.settings-panel p{font-size:13px;line-height:1.65;color:#7c6861;margin:0}
.settings-usage{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:20px;background:#f8eee8;border:1px solid #eadbd2;border-radius:14px;font-size:13px}.settings-usage strong{font-size:26px;color:#ac4936}
.settings-device{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid #eee5df}.settings-device>div{min-width:0}.settings-device strong,.settings-device small{display:block;overflow-wrap:anywhere}.settings-device strong{font-size:13px}.settings-device small{margin-top:5px;font-size:11px;color:#8a746c}.settings-device button{flex:none}
.settings-recipients{max-height:160px;overflow:auto;border:1px solid #e3d7d0;border-radius:10px;padding:10px}.settings-recipients label{display:flex;gap:8px;padding:6px;overflow-wrap:anywhere}
.system-notifications{border-bottom:1px solid #eaded8;padding-bottom:16px;margin-bottom:16px}.system-notifications h3{font-size:15px}.system-notice{padding:14px;border:1px solid #eee2db;border-radius:12px;margin-block:8px;overflow-wrap:anywhere}.system-notice[data-unread=true]{background:#fff3ed;border-color:#e9b7a8}.system-notice small{display:block;margin-top:5px;color:#8a746c}.system-notice p{white-space:pre-wrap;font-size:14px}.system-notice button{font-size:12px}
@media(max-width:600px){#profileDialog.settings-dialog{width:calc(100vw - 16px);height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);border-radius:18px}#settingsTitle{padding:20px;font-size:18px}.settings-shell{display:flex;flex-direction:column}.settings-nav{flex-direction:row;flex:none;border-inline-end:0;border-bottom:1px solid #eee5df;padding:8px;gap:4px;overflow-x:auto;scrollbar-width:thin}#profileDialog .settings-nav button{width:auto;white-space:nowrap;padding:10px;font-size:12px;gap:6px}.settings-nav svg{width:17px;height:17px}.settings-content{padding:18px 16px;flex:1}.settings-device{flex-wrap:wrap}#profileDialog .profile-section{padding:12px}}
#profileDialog .dialog-close{position:absolute;margin:0;inset-block-start:12px;inset-inline-end:14px;inset-inline-start:auto;width:44px;height:44px}
#settingsTitle{padding-inline-end:72px}
#profileDialog .settings-nav button{font-size:13px!important}
#profileDialog .settings-panel button{font-size:13px!important}

/* The same Tutou mark travels between the header and the conversation rail. */
.topbar .brand{display:flex!important}
.rooms-brand{display:flex;align-items:center;gap:9px;min-height:44px;padding-inline:10px;text-decoration:none;color:inherit}
.rooms-brand img{display:block;width:28px;height:28px;border-radius:8px}
.rooms-heading .rooms-brand strong{padding:0;font-size:17px}
body.rooms-menu-open .topbar .brand,body.rooms-menu-open .topbar-copy{visibility:hidden;pointer-events:none}
.rooms-logo-flight:popover-open{display:block;position:fixed;inset:auto;margin:0;padding:0;border:0;overflow:visible;background:transparent;pointer-events:none;transform-origin:top left}
.rooms-logo-flight img{display:block;width:100%;height:100%;border-radius:8px}
.rooms-logo-flight::backdrop{background:transparent;pointer-events:none}
@media(max-width:380px){.topbar-copy strong{display:none}}

/* Active conversation title occupies the center; room rename is shared by both entry points. */
body.has-conversation-title .topbar-copy{display:none}
.conversation-title{min-width:0;flex:1;align-self:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border:0;background:transparent;color:inherit;text-align:center;font-size:14px!important;font-weight:600;padding:10px 6px;min-height:44px;border-radius:10px;cursor:pointer}
.conversation-title:hover{background:#f5ece7}.conversation-title:focus-visible{outline:2px solid #ef4148}
.rooms-name-dialog{width:min(420px,calc(100vw - 32px));padding:20px;border:1px solid #e5d9d3;border-radius:18px;background:#fffdfb;color:#3f302e}
.rooms-name-dialog::backdrop{background:#0005}
.rooms-name-dialog .rooms-rename-form{display:block;position:static;margin:0;padding:0;box-shadow:none;border:0;background:transparent}
.rooms-name-dialog .rooms-rename-form[hidden]{display:none}
.rooms-name-dialog label{font-size:14px}.rooms-name-dialog input{box-sizing:border-box;font-size:16px}.rooms-name-dialog button{min-height:44px;padding:8px 14px;border:0;border-radius:10px;font-size:14px}
@media(max-width:380px){.conversation-title{font-size:12px!important;padding-inline:2px}}

.rooms-account .account-pill{grid-template-columns:38px minmax(0,1fr) 20px}
.account-settings-icon{grid-column:3;grid-row:1/3;align-self:center;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;color:#927a72;pointer-events:none}
.rooms-account .account-pill:hover .account-settings-icon{color:#b74836}
/* Personal profile card and touch-friendly image editor. */
#profileDialog .profile-hero{display:flex;align-items:center;gap:22px;padding:24px;border:1px solid #efd6cc;border-radius:20px;background:radial-gradient(ellipse at 100% 0,#f5d0b980,transparent 70%),linear-gradient(125deg,#fff6eb,#f9e8e2);margin-bottom:8px}
#profileDialog .profile-avatar-control{display:flex;flex-direction:column;gap:10px;margin:0;flex:none}
#profileDialog .profile-avatar-preview{width:88px;height:88px;object-fit:cover;border:4px solid #fff;box-shadow:0 6px 18px #85463320;border-radius:50%}
#profileDialog .avatar-change-button{padding:5px 9px;border-radius:20px;background:#fff9;font-size:12px;color:#a94837;cursor:pointer}
.profile-intro{min-width:0}.profile-eyebrow{font-size:10px;letter-spacing:.09em;color:#a55e4a;text-transform:uppercase}.profile-intro h3{font-size:22px;line-height:1.35;margin:7px 0!important}.profile-intro p{overflow-wrap:anywhere}
#profileDialog .profile-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:20px}.profile-field{display:flex;flex-direction:column;gap:7px;min-width:0}.profile-field-wide,.profile-grid>button{grid-column:1/-1}
#profileDialog #memorySummary{min-height:260px;resize:vertical;line-height:1.7;background:#fffcf9}
.avatar-editor{width:min(430px,calc(100vw - 24px));box-sizing:border-box;padding:22px;border-radius:22px}.avatar-editor h2{font-size:20px;margin:0 0 12px}.avatar-editor p,.avatar-editor small{font-size:13px;color:#856c61;line-height:1.6}.avatar-editor canvas{display:block;width:min(100%,300px);height:auto;aspect-ratio:1;margin:18px auto;border-radius:50%;background:repeating-conic-gradient(#f7eee8 0 25%,#fff 0 50%) 50%/16px 16px;touch-action:none;cursor:grab;border:2px solid #cf8a70}.avatar-editor label{display:flex;align-items:center;gap:14px;font-size:13px}.avatar-editor input[type=range]{flex:1;min-width:0;accent-color:#b85540}.avatar-editor footer{display:flex;gap:8px;margin-top:18px;flex-wrap:wrap}.avatar-editor button{padding:10px 14px;border:1px solid #e8d5cc;border-radius:12px;font-size:13px}
@media(max-width:600px){#profileDialog .profile-hero{padding:18px;gap:14px}#profileDialog .profile-grid{grid-template-columns:1fr;padding:14px}.profile-intro h3{font-size:19px}#profileDialog .profile-avatar-preview{width:76px;height:76px}}
.chat-search{width:min(700px,calc(100vw - 24px))}.chat-search .ct-content{display:flex;flex-direction:column;gap:14px}.search-room-title{color:#8b7166;margin:0}.chat-search form{display:flex;flex-direction:column;gap:12px}.search-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.search-filters label{min-width:0;display:flex;flex-direction:column;gap:6px;font-size:12px;color:#81695f}.chat-search input,.chat-search select{width:100%;min-width:0;box-sizing:border-box;padding:10px;border:1px solid #e3d7d0;border-radius:10px;background:#fff;font-size:16px}.search-results{display:flex;flex-direction:column;gap:12px}.search-results article{padding:15px;border:1px solid #eaded6;border-radius:14px;background:#fffaf6;min-width:0}.search-results article header{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12px}.search-results time{font-size:11px;color:#917b71}.search-results p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6}.search-file{display:block;max-width:100%;text-align:start;overflow-wrap:anywhere;background:#f4e7df;color:#a14936;border:0;border-radius:9px;padding:10px 12px;margin:7px 0}.search-results audio{max-width:100%}@media(max-width:420px){.search-filters{grid-template-columns:minmax(0,1fr)}.search-filters label:first-child{grid-column:auto}}

/* Native Safari date inputs must shrink inside the search grid. */
.chat-search .ct-content{flex-wrap:nowrap;min-width:0}
.chat-search form,.chat-search .search-filters{min-width:0;width:100%}
.chat-search input,.chat-search select{display:block;min-width:0;max-width:100%;height:44px;min-height:44px;line-height:20px;-webkit-appearance:none;appearance:none;margin:0}
.chat-search input::-webkit-date-and-time-value{min-width:0;text-align:start}
.chat-search input::-webkit-datetime-edit{min-width:0;padding:0}
.chat-search .search-room-title{overflow-wrap:anywhere}
.chat-search form>.primary-button{min-height:44px;width:100%;margin:0}
@media(max-width:600px){.chat-search .search-filters{grid-template-columns:minmax(0,1fr)}}
