:root{--accent:#8062cf;--surface:#fff;--canvas:#f7f5fc;--soft:#f0ebfa;--ink:#352d49;--quiet:#82758f;--edge:#e9e4f0;--avatar:#ebe2fa;--badge:#cf6fa1;--radius:16px;--green:var(--accent)}
:root[data-appearance=blue]{--accent:#3675d7;--surface:#fff;--canvas:#f3f6fb;--soft:#edf3fc;--ink:#21334d;--quiet:#697c97;--edge:#e3eaf4;--avatar:#e1ecfd;--badge:#d95971;--radius:12px}
:root[data-appearance=orange]{--accent:#b85e37;--surface:#fffcf7;--canvas:#faf6f0;--soft:#f8ece1;--ink:#493a30;--quiet:#89745f;--edge:#ece2d5;--avatar:#f8e1cc;--badge:#bc684c;--radius:50%}
:root[data-appearance=night]{--accent:#82c1f6;--surface:#1c2737;--canvas:#151e2c;--soft:#23344a;--ink:#e4edf9;--quiet:#a3b2c6;--edge:#34445a;--avatar:#2b435e;--badge:#edaf78;--radius:8px}
body,.app,.app-view,.chat,.sidebar,.page-header,.person-card,#realGroupInfo{background:var(--canvas)!important;color:var(--ink)!important}
.page-header h1,.chat header b,.person-card h2,dialog h2,dialog h3,.profile-card b,.conversation-copy b,.contact-row b{color:var(--ink)!important}
.conversation-line,#inboxList,.profile-card,.settings-panel,.settings-panel button,.quick-actions,.list-panel,.real-friend,.contact-row,.composer,.chat>header,.call-actions,.profile-menu,.profile-menu>a,.profile-menu>button,.person-card .person-actions,.person-card .person-actions>label,.person-card .person-actions>button,.person-call-row,.person-call-row button,.person-card .person-actions>small,#realGroupInfo .setting-row,#managedMembersSection,#managedSettings>details,dialog{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--edge)!important}
.conversation-line.is-pinned,.inbox-row:hover,.account-entry{background:var(--soft)!important}.conversation-line:after{background:var(--edge)!important}.conversation-copy small,.conversation-meta,.quiet-label,.profile-card small,.person-note,.person-relation,.time,.setting-row small,dialog small,.section-label{color:var(--quiet)!important}
.search,.inbox-search,input:not([type=checkbox]):not([type=radio]),textarea,select{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--edge)!important}
input::placeholder,textarea::placeholder{color:var(--quiet)!important;opacity:1}.inbox-search input{text-align:left;font-size:13px}
.avatar,.avatar.green,.avatar.group,.profile-avatar,.person-avatar,#managedAvatarFallback{background:var(--avatar)!important;color:var(--accent)!important;border-radius:var(--radius)!important}.avatar img,.profile-avatar img,.person-avatar img{border-radius:inherit!important}
.bottom-nav,.sidebar .sidebar-nav{background:var(--surface)!important;border-color:var(--edge)!important}.bottom-nav .nav-item{color:var(--quiet)!important}.bottom-nav .nav-item.active{color:var(--accent)!important;background:none!important}.nav-item svg{fill:none!important;stroke:currentColor;stroke-width:1.7}.nav-item.active>span{background:var(--soft);border-radius:9px;width:43px;height:28px;display:grid;place-items:center}
.settings-panel .settings-icon,.ghost,.round-add,.emoji-toggle,#realVoiceStart,.real-image-button,.person-copy,.person-call-row button{color:var(--accent)!important}.round-add,.emoji-toggle,#realVoiceStart,.real-image-button{background:var(--soft)!important;border-color:var(--edge)!important}
.send,dialog button.send{background:var(--accent)!important;color:#fff!important}.mine .bubble{background:var(--soft)!important;border-color:var(--edge)!important;color:var(--ink)!important}.bubble{background:var(--surface);color:var(--ink);border-color:var(--edge)!important}.unread-badge{background:var(--badge)!important}.unread-badge.is-muted{background:var(--quiet)!important}.mention-all{color:var(--accent)!important}
dialog:not(.account-settings-pane) button:not(.send):not(.close):not(.person-close){background:var(--soft);color:var(--ink);border-color:var(--edge)}.person-card .person-actions button.danger,#managedClear{color:#d04b5c!important;background:var(--surface)!important}.person-close,#closeRealGroupInfo{background:var(--canvas)!important;color:var(--ink)!important}
.person-actions input[type=checkbox]:checked,.switch:checked{background:var(--accent)!important;border-color:var(--accent)!important}
.appearance-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.appearance-choices button{padding:12px!important;display:grid;gap:5px;text-align:left;border:2px solid var(--edge)!important;border-radius:12px!important}.appearance-choices button[aria-pressed=true]{border-color:var(--accent)!important}.appearance-choices strong{font-size:15px}.appearance-choices small{font-size:11px}.theme-swatch{height:44px;border:1px solid;display:flex;align-items:center;padding:8px;border-radius:8px}.theme-swatch i{width:26px;height:26px;border-radius:8px}.appearance-choices p{grid-column:1/-1;margin:0;font-size:12px}
#realComposer .real-image-button{display:inline-flex!important;vertical-align:middle;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;padding:0!important;margin:0 0 0 6px;border:1px solid;border-radius:8px;cursor:pointer;box-sizing:border-box}#realComposer .real-image-button svg{width:24px;height:24px;display:block}
:root[data-appearance=night] .send,:root[data-appearance=night] dialog button.send,:root[data-appearance=night] .unread-badge{color:#162033!important}
dialog:not(.account-settings-pane) button:not(.send):not(.close):not(.person-close){background:var(--soft)!important;color:var(--ink)!important;border-color:var(--edge)!important}
dialog .appearance-choices button[aria-pressed=true]{border-color:var(--accent)!important;box-shadow:0 0 0 1px var(--accent)}
dialog .settings-help,dialog p,dialog label{color:var(--ink)}
input:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible,[role=button]:focus-visible{outline:2px solid var(--accent)!important;outline-offset:2px}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important}}
