/* V1.1.105 / front-end appearance. Shared group and private-chat palette only.
 * The preference is local to the browser and never affects access decisions. */
:root[data-chat-theme="dark"]{
  color-scheme:dark;
  --canvas:#171d29;--panel:#222b3a;--ink:#e9eef8;--muted:#a2afc2;
  --line:#394455;--ui-canvas:#171d29;--ui-surface:#222b3a;
  --ui-ink:#e9eef8;--ui-secondary:#a2afc2;--ui-muted:#91a1b7;
  --ui-border:#394455;--ui-line:#323c4b;--native-canvas:#171d29;
}
:root[data-chat-theme="dark"],:root[data-chat-theme="dark"] body{background:#171d29;color:#e9eef8}
:root[data-chat-theme="dark"] #member-app,
:root[data-chat-theme="dark"] #member-app .rail,
:root[data-chat-theme="dark"] #member-app .list-pane,
:root[data-chat-theme="dark"] #member-app .group-list,
:root[data-chat-theme="dark"] #member-app .contacts-list-view,
:root[data-chat-theme="dark"] #member-app .contacts-results,
:root[data-chat-theme="dark"] #member-app .profile-pane,
:root[data-chat-theme="dark"] #member-app .chat-pane,
:root[data-chat-theme="dark"] #member-app .messages,
:root[data-chat-theme="dark"] #member-app .list-top,
:root[data-chat-theme="dark"] #member-app .search-wrap,
:root[data-chat-theme="dark"] #member-app .contacts-title-row{background:#171d29;color:#e9eef8}
:root[data-chat-theme="dark"] #member-app .member-foot,
:root[data-chat-theme="dark"] #member-app .chat-header,
:root[data-chat-theme="dark"] #member-app .compose,
:root[data-chat-theme="dark"] #member-app .compose-panel,
:root[data-chat-theme="dark"] #member-app .compose-more-item,
:root[data-chat-theme="dark"] #member-app .chat-info-panel,
:root[data-chat-theme="dark"] #member-app .native-info-card,
:root[data-chat-theme="dark"] #member-app .native-manager-shortcuts,
:root[data-chat-theme="dark"] #member-app .native-manager-shortcuts button,
:root[data-chat-theme="dark"] #member-app .profile-card,
:root[data-chat-theme="dark"] #member-app .profile-section,
:root[data-chat-theme="dark"] #member-app .profile-menu-card,
:root[data-chat-theme="dark"] #member-app .mobile-tabs,
:root[data-chat-theme="dark"] #member-app .chat-info-mute-row,
:root[data-chat-theme="dark"] #member-app .chat-info-announcement,
:root[data-chat-theme="dark"] #member-app .group-row{background:#222b3a;color:#e9eef8;border-color:#394455}
:root[data-chat-theme="dark"] #member-app .group-row.chosen,
:root[data-chat-theme="dark"] #member-app .group-row.selected,
:root[data-chat-theme="dark"] #member-app .group-row.active,
:root[data-chat-theme="dark"] #member-app .dm-inbox-row.chosen,
:root[data-chat-theme="dark"] #member-app .dm-inbox-row.selected{background:#32435f!important}
:root[data-chat-theme="dark"] #member-app .group-row:hover,
:root[data-chat-theme="dark"] #member-app .profile-menu-action:hover,
:root[data-chat-theme="dark"] #member-app .native-manager-shortcuts button:hover{background:#2c384b}
:root[data-chat-theme="dark"] #member-app .group-info strong,
:root[data-chat-theme="dark"] #member-app .chat-heading h2,
:root[data-chat-theme="dark"] #member-app .profile-top h1,
:root[data-chat-theme="dark"] #member-app .profile-main strong,
:root[data-chat-theme="dark"] #member-app .profile-menu-row,
:root[data-chat-theme="dark"] #member-app .profile-row strong,
:root[data-chat-theme="dark"] #member-app .chat-info-head strong,
:root[data-chat-theme="dark"] #member-app .placeholder h3,
:root[data-chat-theme="dark"] #member-app .native-group-hero-text strong,
:root[data-chat-theme="dark"] #member-app .chat-info-row>span,
:root[data-chat-theme="dark"] #member-app .profile-menu-action{color:#e9eef8}
:root[data-chat-theme="dark"] #member-app .group-info small,
:root[data-chat-theme="dark"] #member-app .profile-main span,
:root[data-chat-theme="dark"] #member-app .profile-menu-row strong,
:root[data-chat-theme="dark"] #member-app .profile-setting-row small,
:root[data-chat-theme="dark"] #member-app .chat-heading p,
:root[data-chat-theme="dark"] #member-app .profile-row,
:root[data-chat-theme="dark"] #member-app .msg-alias,
:root[data-chat-theme="dark"] #member-app .msg-status,
:root[data-chat-theme="dark"] #member-app .chat-date,
:root[data-chat-theme="dark"] #member-app .placeholder,
:root[data-chat-theme="dark"] #member-app .profile-menu-row svg{color:#9cacc3;stroke:#9cacc3}
:root[data-chat-theme="dark"] #member-app .group-row,
:root[data-chat-theme="dark"] #member-app .profile-menu-row,
:root[data-chat-theme="dark"] #member-app .profile-setting-row,
:root[data-chat-theme="dark"] #member-app .profile-row{border-bottom-color:#354153}
:root[data-chat-theme="dark"] #member-app input,
:root[data-chat-theme="dark"] #member-app textarea,
:root[data-chat-theme="dark"] #member-app select,
:root[data-chat-theme="dark"] #member-app .contacts-search input,
:root[data-chat-theme="dark"] #member-app .search-wrap input,
:root[data-chat-theme="dark"] #member-app .compose-form textarea,
:root[data-chat-theme="dark"] #member-app .compose-form #message-text{background:#293649!important;color:#f0f4fa!important;border-color:#46536b!important;caret-color:#8cb8ff}
:root[data-chat-theme="dark"] #member-app input::placeholder,
:root[data-chat-theme="dark"] #member-app textarea::placeholder{color:#96a7bd!important}
:root[data-chat-theme="dark"] #member-app .msg-bubble{background:#2b394e;color:#f2f5fc;border:1px solid #394960}
:root[data-chat-theme="dark"] #member-app .msg-row.mine .msg-bubble{background:#295cb7;color:#fff;border-color:#3467bc}
:root[data-chat-theme="dark"] #member-app .chat-date{background:#303b4e}
:root[data-chat-theme="dark"] #member-app .compose-tool,
:root[data-chat-theme="dark"] #member-app .compose-mobile-tool,
:root[data-chat-theme="dark"] #member-app .chat-header-more{color:#bdcbe0}
:root[data-chat-theme="dark"] #member-app .compose-panel,
:root[data-chat-theme="dark"] #member-app .chat-info-panel,
:root[data-chat-theme="dark"] #member-app .profile-card{border-color:#394455}
:root[data-chat-theme="dark"] #member-app .group-dm-panel,
:root[data-chat-theme="dark"] #member-app .group-dm-panel .dm-head,
:root[data-chat-theme="dark"] #member-app .dm-toolbar,
:root[data-chat-theme="dark"] #member-app .dm-thread-list,
:root[data-chat-theme="dark"] #member-app .dm-message-list,
:root[data-chat-theme="dark"] #member-app .dm-message-section,
:root[data-chat-theme="dark"] #member-app .dm-compose,
:root[data-chat-theme="dark"] #member-app .group-dm-panel .dm-person,
:root[data-chat-theme="dark"] #member-app .group-dm-panel .dm-grant-row,
:root[data-chat-theme="dark"] #member-app .group-dm-panel.is-settings-overlay .dm-toolbar,
:root[data-chat-theme="dark"] #member-app .group-dm-panel.is-settings-overlay .dm-thread-list{background:#222b3a!important;color:#e9eef8;border-color:#394455}
:root[data-chat-theme="dark"] #member-app .dm-bubble{background:#2b394e;color:#e9eef8;border-color:#394960}
:root[data-chat-theme="dark"] #member-app .dm-message.mine .dm-bubble{background:#295cb7;color:#fff;border-color:#3467bc}
:root[data-chat-theme="dark"] #member-app .dm-hint,
:root[data-chat-theme="dark"] #member-app .dm-time,
:root[data-chat-theme="dark"] #member-app .dm-empty{color:#a2afc2}
:root[data-chat-theme="dark"] #member-app .group-dm-panel .dm-head h2,
:root[data-chat-theme="dark"] #member-app .group-dm-panel.is-settings-overlay .dm-head h2{color:#e9eef8}
:root[data-chat-theme="dark"] #member-app .group-dm-panel .dm-toolbar button{color:#a2afc2}
:root[data-chat-theme="dark"] #member-app .group-dm-panel .dm-toolbar button.active{color:#8ab7ff;border-color:#659fff}
:root[data-chat-theme="dark"] #member-app .group-dm-panel .dm-person:hover{background:#2c384b!important}
:root[data-chat-theme="dark"] #member-app .dm-header-button,
:root[data-chat-theme="dark"] #member-app .dm-person,
:root[data-chat-theme="dark"] #member-app .dm-grant-row{color:#e9eef8}
:root[data-chat-theme="dark"] #member-app .contacts-tabs,
:root[data-chat-theme="dark"] #member-app .list-tabs{background:#253044;color:#a2afc2}
:root[data-chat-theme="dark"] #member-app .contacts-tabs button.active{background:#354660;color:#dce9ff}
:root[data-chat-theme="dark"] #member-app .profile-logout{background:#293040;border-color:#684655;color:#ff9fa9}
:root[data-chat-theme="dark"] .chat-operation-dialog,
:root[data-chat-theme="dark"] .chat-operation-dialog textarea,
:root[data-chat-theme="dark"] .ui-dialog{background:#222b3a;color:#e9eef8;border-color:#46536b}
:root[data-chat-theme="dark"] .chat-operation-dialog h2{color:#e9eef8}
/* Appearance dialog: same centered, restrained language as operating dialogs. */
.appearance-dialog-backdrop{position:fixed;inset:0;z-index:4000;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(11,18,32,.45)}
.appearance-dialog{width:min(410px,100%);max-height:calc(100dvh - 32px);padding:22px;border-radius:15px;background:#fff;color:#263448;overflow:auto}
.appearance-dialog h2{font-size:17px;font-weight:650;margin:0 0 17px;text-align:center}
.appearance-choices{display:flex;flex-direction:column;gap:7px}
.appearance-choice{display:flex;align-items:center;gap:13px;width:100%;min-height:56px;padding:10px 15px;border:1px solid #e5eaf1;border-radius:10px;background:#fff;color:#27364c;text-align:left;font:inherit;font-size:14px;cursor:pointer}
.appearance-choice[aria-checked="true"]{border-color:#8db3ff;background:#eff5ff;color:#225fc4}
.appearance-choice-icon{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:9px;background:#f2f5fb;color:#5f718b;font-size:20px}
.appearance-choice-tick{margin-left:auto;opacity:0;color:#3478f6;font-size:19px}
.appearance-choice[aria-checked="true"] .appearance-choice-tick{opacity:1}
.appearance-dialog-cancel{display:block;width:100%;height:42px;margin-top:14px;border:1px solid #e5eaf1;border-radius:9px;background:#fff;color:#53647a;font:inherit;cursor:pointer}
.appearance-dialog button:focus-visible{outline:3px solid #83abf3;outline-offset:2px}
:root[data-chat-theme="dark"] .appearance-dialog{background:#222b3a;color:#e9eef8;border-color:#46536b}
:root[data-chat-theme="dark"] .appearance-choice{background:#273449;color:#e9eef8;border-color:#46536b}
:root[data-chat-theme="dark"] .appearance-choice[aria-checked="true"]{background:#324a6a;color:#dbe9ff;border-color:#6b99e1}
:root[data-chat-theme="dark"] .appearance-choice-icon{background:#34445b;color:#aec7ee}
:root[data-chat-theme="dark"] .appearance-dialog-cancel{background:#273449;color:#c2cee1;border-color:#46536b}
/* Whole row clickable and accessible; phone is plain text, never a navigation link. */
#member-app #profile-appearance{width:100%;text-align:left;border:0;background:transparent;font-family:inherit;cursor:pointer}
#member-app #profile-appearance:hover{background:#f6f8fc}
:root[data-chat-theme="dark"] #member-app #profile-appearance{color:#e9eef8}
:root[data-chat-theme="dark"] #member-app #profile-appearance:hover{background:#2c384b}
@media(max-width:760px){.appearance-dialog{width:min(390px,100%);padding:20px}.appearance-dialog-backdrop{padding:15px}}
:root[data-chat-theme="dark"] #member-app .profile-setting-row,
:root[data-chat-theme="dark"] #member-app .profile-setting-row>span,
:root[data-chat-theme="dark"] #member-app .profile-menu-row>span:first-child,
:root[data-chat-theme="dark"] #member-app .chat-info-mute-row,
:root[data-chat-theme="dark"] #member-app .chat-info-mute-row>span{color:#e5edf9}
:root[data-chat-theme="dark"] #member-app .profile-setting-row small,
:root[data-chat-theme="dark"] #member-app .chat-info-mute-row small{color:#9daec5}
