/* Operator-only palettes. They never alter the public store widget. */
html[data-style]{--vht-accent:#0f70b7;--vht-highlight:#ef8c00;--vht-on-accent:#fff;--vht-on-highlight:#1d2e3c;--vht-page:#f4f7fa;--vht-surface:#fff;--vht-input:#fff;--vht-text:#183349;--vht-muted:#62798b;--vht-line:#d9e4ed;--vht-soft:#e4f1fb;--vht-bubble:#dceefa;--vht-note:#fff2d5}
html[data-style=sunset]{--vht-accent:#b94f0c;--vht-highlight:#e89621;--vht-page:#fff7ec;--vht-surface:#fffdf9;--vht-text:#422c20;--vht-muted:#795f4e;--vht-line:#e9d9c5;--vht-soft:#ffead3;--vht-bubble:#ffe2bd;--vht-note:#fff0bd}
html[data-style=aristocrat]{--vht-accent:#56334f;--vht-highlight:#b58a47;--vht-page:#f7f2ec;--vht-surface:#fffdfa;--vht-text:#302536;--vht-muted:#77697b;--vht-line:#e0d5d8;--vht-soft:#f0e7eb;--vht-bubble:#e9dfe6;--vht-note:#f7edcf}
html[data-style=sport]{--vht-accent:#bf4408;--vht-highlight:#ffab21;--vht-page:#edf1f3;--vht-surface:#fff;--vht-text:#1b2930;--vht-muted:#5a6870;--vht-line:#cbd7dd;--vht-soft:#ffe7d8;--vht-bubble:#ffddc8;--vht-note:#fff0ce}
html[data-style=ocean]{--vht-accent:#086679;--vht-highlight:#28a59d;--vht-page:#edf7f6;--vht-surface:#fff;--vht-text:#163d46;--vht-muted:#577780;--vht-line:#c8e0df;--vht-soft:#daf1ee;--vht-bubble:#d2ebe8;--vht-note:#fff1d5}
html[data-style=graphite]{--vht-accent:#42536a;--vht-highlight:#ba7345;--vht-page:#f0f2f4;--vht-surface:#fff;--vht-text:#263241;--vht-muted:#687583;--vht-line:#d2dbe2;--vht-soft:#e3e9ef;--vht-bubble:#dce5eb;--vht-note:#f5e9da}
html[data-style][data-theme=dark]{--vht-page:#111b25;--vht-surface:#1b2a38;--vht-input:#13212e;--vht-text:#eaf2f8;--vht-muted:#acc0ce;--vht-line:#395062;--vht-soft:#294157;--vht-bubble:#28516d;--vht-note:#554427}
html[data-style=sunset][data-theme=dark]{--vht-page:#211b17;--vht-surface:#30251e;--vht-input:#251c17;--vht-text:#fff1e1;--vht-muted:#d9bea7;--vht-line:#5b4536;--vht-soft:#543423;--vht-bubble:#653d25;--vht-note:#544623}
html[data-style=aristocrat][data-theme=dark]{--vht-page:#1d1721;--vht-surface:#2a2030;--vht-input:#211a27;--vht-text:#f4ebf0;--vht-muted:#c9b6c4;--vht-line:#564556;--vht-soft:#49344d;--vht-bubble:#60455f;--vht-note:#514329}
html[data-style=sport][data-theme=dark]{--vht-page:#10171b;--vht-surface:#1d272c;--vht-input:#131d22;--vht-text:#f0f5f7;--vht-muted:#b1c0c8;--vht-line:#354951;--vht-soft:#543527;--vht-bubble:#6a3b26;--vht-note:#554224}
html[data-style=ocean][data-theme=dark]{--vht-page:#0e2126;--vht-surface:#193139;--vht-input:#11272e;--vht-text:#eaf6f5;--vht-muted:#a6cbc9;--vht-line:#345a60;--vht-soft:#275059;--vht-bubble:#2a5a60;--vht-note:#564b2d}
html[data-style=graphite][data-theme=dark]{--vht-page:#171c22;--vht-surface:#242d36;--vht-input:#1b232b;--vht-text:#edf1f4;--vht-muted:#b3bdc7;--vht-line:#45515d;--vht-soft:#354452;--vht-bubble:#405464;--vht-note:#534639}

html[data-style] body,html[data-style] .shell{background:var(--vht-page);color:var(--vht-text)}
html[data-style] .sidebar,html[data-style] .top,html[data-style] .composer,html[data-style] .login,html[data-style] .history-dialog,html[data-style] .preferences-dialog{background:var(--vht-surface);color:var(--vht-text);border-color:var(--vht-line)}
html[data-style] .brand{background:var(--vht-surface);color:var(--vht-text);border-bottom:3px solid var(--vht-highlight)}
html[data-style] .brand b{color:var(--vht-accent)}
html[data-style] .brand button,html[data-style] .app-tools button,html[data-style] .filters button,html[data-style] .top button,html[data-style] .older,html[data-style] #more-list,html[data-style] .history-dialog button,html[data-style] .productivity-dialog button{background:var(--vht-surface);color:var(--vht-accent);border-color:var(--vht-line)}
html[data-style] .brand button:hover,html[data-style] .app-tools button:hover,html[data-style] .top button:hover,html[data-style] .history-dialog button:hover{background:var(--vht-soft)}
html[data-style] .filters .selected,html[data-style] .primary,html[data-style] .history-dialog .primary,html[data-style] .productivity-dialog .primary{background:var(--vht-accent);color:var(--vht-on-accent);border-color:var(--vht-accent)}
html[data-style] .chatrow{color:var(--vht-text);border-color:var(--vht-line)}
html[data-style] .chatrow:hover,html[data-style] .chatrow.active{background:var(--vht-soft)}
html[data-style] .chatrow.active{box-shadow:inset 4px 0 var(--vht-highlight)}
html[data-style] .chatrow small,html[data-style] .state,html[data-style] .muted,html[data-style] .empty,html[data-style] .account,html[data-style] .context,html[data-style] .message small,html[data-style] .history-dialog p{color:var(--vht-muted)}
html[data-style] .state,html[data-style] .productivity-card,html[data-style] .presence-team{background:var(--vht-soft);border-color:var(--vht-line)}
html[data-style] .presence-client,html[data-style] .options-dialog .options-choice{background:var(--vht-surface);color:var(--vht-text);border-color:var(--vht-line)}
html[data-style] .options-dialog .options-choice:hover,html[data-style] .options-dialog .options-choice:focus-visible{background:var(--vht-soft);border-color:var(--vht-accent)}
html[data-style] .options-choice small{color:var(--vht-muted)}
html[data-style] .messages{background-color:var(--vht-page)}
html[data-style] .message{background:var(--vht-surface);color:var(--vht-text)}
html[data-style] .message.operator{background:var(--vht-bubble)}
html[data-style] .message.internal{background:var(--vht-note);border-left-color:var(--vht-highlight)}
html[data-style] .search,html[data-style] input:not([type=checkbox]):not([type=radio]),html[data-style] select,html[data-style] textarea{background:var(--vht-input);color:var(--vht-text);border-color:var(--vht-line)}
html[data-style] .client-page{background:var(--vht-soft);color:var(--vht-text);border-color:var(--vht-line)}
html[data-style] .client-page a,html[data-style] .presence-clients-title{color:var(--vht-accent)}
html[data-style] .unread-badge{background:var(--vht-highlight);color:var(--vht-on-highlight)}
html[data-style] .chatrow:has(.unread-badge){box-shadow:inset 3px 0 var(--vht-highlight)}
html[data-style] .sidebar .tag-filter{background:var(--vht-input);color:var(--vht-text);border-color:var(--vht-line)}
html[data-style] #notice{background:var(--vht-accent);color:var(--vht-on-accent)}
html[data-style][data-background=blue] .messages{background-color:var(--vht-soft)}
html[data-style][data-background=dots] .messages{background-color:var(--vht-page);background-image:radial-gradient(var(--vht-line) 1px,transparent 1px);background-size:17px 17px}
html[data-style=aristocrat] .brand b,html[data-style=aristocrat] .top h2,html[data-style=aristocrat] .options-dialog h2{font-family:Georgia,'Times New Roman',serif;letter-spacing:.015em}
html[data-style=aristocrat] .brand,html[data-style=aristocrat] .top{border-bottom-color:var(--vht-highlight)}
html[data-style=sport] .brand b,html[data-style=sport] .top h2{font-weight:850;letter-spacing:.035em;text-transform:uppercase}
html[data-style=sport] .chatrow,html[data-style=sport] .app-tools button,html[data-style=sport] .primary{border-radius:7px}
html[data-density=compact] .chatrow{padding:10px 13px;margin-top:2px;margin-bottom:2px}
html[data-density=compact] .chatrow small{margin-top:3px}
html[data-density=compact] .app-tools button,html[data-density=compact] .filters button{min-height:32px;padding:5px 8px}
html[data-density=compact] .messages{padding:12px}
html[data-density=compact] .message{padding:9px 12px;margin:4px 0}
html[data-density=compact] .top,html[data-density=compact] .composer{padding:10px 13px}

.preferences-dialog{width:min(720px,calc(100vw - 20px));max-height:90dvh;overflow:auto}
.preferences-dialog .style-intro{margin:0 0 16px}
.preferences-dialog .style-presets{border:0;padding:0;margin:0}
.preferences-dialog .style-presets legend{font-weight:700;margin-bottom:10px}
.style-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.style-card{--card-header:#0f70b7;--card-page:#f4f7fa;--card-bubble:#f39200;display:flex!important;flex-direction:column;gap:4px;margin:0!important;padding:8px;border:2px solid #d4e1eb;border-radius:12px;cursor:pointer;min-width:0;background:var(--card-page);color:#203445}
.style-card[data-preset=sunset]{--card-header:#b94f0c;--card-page:#fff7ec;--card-bubble:#e89621}
.style-card[data-preset=aristocrat]{--card-header:#56334f;--card-page:#f7f2ec;--card-bubble:#b58a47}
.style-card[data-preset=sport]{--card-header:#222e35;--card-page:#edf1f3;--card-bubble:#e05212}
.style-card[data-preset=ocean]{--card-header:#086679;--card-page:#edf7f6;--card-bubble:#28a59d}
.style-card[data-preset=graphite]{--card-header:#42536a;--card-page:#f0f2f4;--card-bubble:#ba7345}
.style-card:has(input:checked){border-color:var(--card-header);box-shadow:0 0 0 2px var(--card-bubble)}
.style-card:focus-within{outline:2px solid var(--card-header);outline-offset:2px}
.style-card input{position:absolute;opacity:0;width:1px;height:1px}
.style-card-preview{height:58px;width:100%;background:var(--card-page);border:1px solid #0002;border-radius:7px;display:flex;flex-direction:column;gap:5px;overflow:hidden}
.style-card-preview i:first-child{height:16px;background:var(--card-header);flex:none}
.style-card-preview i:nth-child(2){height:12px;width:60%;margin-left:auto;margin-right:6px;border-radius:7px;background:var(--card-bubble)}
.style-card-preview i:nth-child(3){height:10px;width:46%;margin-left:6px;border-radius:7px;background:#fff;border:1px solid #0002}
.style-card strong{font-size:13px;line-height:1.2}.style-card small{font-size:11px;line-height:1.25;color:#536778}
.style-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;margin-top:16px}
.preferences-dialog .actions{flex-wrap:wrap}.preferences-dialog .reset-style{margin-right:auto;background:transparent;border:1px solid var(--vht-line,#ccd5dc);border-radius:7px;padding:10px;color:var(--vht-accent,#0f70b7)}
@media(max-width:590px){.style-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.style-settings{grid-template-columns:1fr}.preferences-dialog{padding:17px}.preferences-dialog .actions{justify-content:stretch}.preferences-dialog .actions button{flex:1 1 42%}}
