html:root[data-web-palette="pink"] {
  color-scheme: light; --ws-bg:#fff5fa; --ws-surface:#fffafd; --ws-raised:#f9e9f1;
  --ws-text:#38212e; --ws-muted:#795566; --ws-line:#ddbacd; --ws-accent:#a32c66;
  --ws-selected:#f5dbe8; --web-action:#a32c66; --web-on-action:#fff; --web-hover:#852451;
}
html:root[data-web-palette="purple"] {
  color-scheme: dark; --ws-bg:#191620; --ws-surface:#24202e; --ws-raised:#302939;
  --ws-text:#f2edf8; --ws-muted:#baadc8; --ws-line:#51445e; --ws-accent:#d2b5ff;
  --ws-selected:#3b2c50; --web-action:#d2b5ff; --web-on-action:#29143f; --web-hover:#e3d2ff;
}
html:root[data-web-palette="black"] {
  color-scheme: dark; --ws-bg:#101112; --ws-surface:#1b1d1f; --ws-raised:#292c2f;
  --ws-text:#f1f3f5; --ws-muted:#b2b8bd; --ws-line:#454a50; --ws-accent:#e5e9ed;
  --ws-selected:#34383d; --web-action:#e5e9ed; --web-on-action:#191b1d; --web-hover:#fff;
}
html:root[data-web-palette="white"] {
  color-scheme: light; --ws-bg:#f6f7f8; --ws-surface:#fff; --ws-raised:#eceef0;
  --ws-text:#20252b; --ws-muted:#59616b; --ws-line:#cbd0d6; --ws-accent:#344152;
  --ws-selected:#e2e7ed; --web-action:#344152; --web-on-action:#fff; --web-hover:#202c3a;
}
html[data-web-palette]:not([data-web-palette="classic"]) {
  --page:var(--ws-bg); --surface:var(--ws-surface); --text:var(--ws-text); --muted:var(--ws-muted);
  --border:var(--ws-line); --line:var(--ws-line); --field-border:var(--ws-line); --head:var(--ws-raised);
  --accent:var(--web-action); --selected:var(--ws-selected); --chart-rx:var(--ws-accent);
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) {
  --accent:var(--web-action); --accent-strong:var(--ws-accent); --accent2:var(--ws-accent);
  --accent-gradient:linear-gradient(var(--web-action),var(--web-action));
}
html[data-web-palette]:not([data-web-palette="classic"]) [data-workspace-page="account"] {
  --cyan:var(--web-action); --cyan-strong:var(--ws-accent); --pink:var(--ws-accent);
}
html[data-web-palette]:not([data-web-palette="classic"]) [data-workspace-page="account"] :is(.primary,.primary:hover) {
  background:var(--web-action); color:var(--web-on-action); border-color:var(--web-action);
}
html[data-web-palette]:not([data-web-palette="classic"]) [data-workspace-page="account"] :is(dialog,.notice) {
  background:var(--ws-surface); color:var(--ws-text); border-color:var(--ws-line);
}
html[data-web-palette]:not([data-web-palette="classic"]) [data-workspace-page="account"] .segmented button.active {
  background:var(--ws-selected); color:var(--ws-accent);
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) body :is(.toolbar button.active,button:not(.ghost):not(.danger),.button:not(.ghost)) {
  background:var(--web-action) !important; color:var(--web-on-action) !important;
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) .presence-modes input:checked + span {
  background:var(--web-action); color:var(--web-on-action);
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) .command-card .status.on {
  background:var(--web-action); color:var(--web-on-action); border-color:var(--web-action);
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) .command-card .status.off {
  background:var(--ws-raised); color:var(--ws-text); border-color:var(--ws-line);
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) body .command-card button.ghost {
  background:var(--ws-surface) !important; color:var(--ws-text) !important; border-color:var(--ws-line) !important;
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) body .command-card button.ghost:hover {
  background:var(--ws-selected) !important; color:var(--ws-text) !important;
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) body .guild-list button:not(.ghost):not(.danger) {
  background:var(--ws-surface) !important; color:var(--ws-text) !important;
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) body .guild-list button:not(.ghost):not(.danger).active {
  background:var(--ws-selected) !important; color:var(--ws-text) !important;
}
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) body .guild-list button :is(strong,span) { color:var(--ws-text) !important; }
html[data-cloud-dashboard][data-web-palette]:not([data-web-palette="classic"]) body .guild-list button small { color:var(--ws-muted) !important; }
[data-workspace-page] { font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Yu Gothic","Microsoft JhengHei",sans-serif; }
html[data-web-palette]:not([data-web-palette="classic"]) .theme-select { display:none; }
.web-preference-tools { display:flex; align-items:center; gap:8px; margin-left:auto; flex-shrink:0; }
.web-preference-menu { position:relative; border:0; padding:0; margin:0; }
.web-preference-menu > summary {
  display:flex; align-items:center; justify-content:center; width:44px; height:44px;
  list-style:none; cursor:pointer; border:1px solid var(--ws-line); border-radius:6px;
  background:var(--ws-surface) !important; color:var(--ws-text) !important;
}
.web-preference-menu > summary::-webkit-details-marker { display:none; }
.web-preference-menu[open] > summary { background:var(--ws-selected) !important; color:var(--ws-accent) !important; }
.web-preference-popover {
  position:absolute; right:0; top:52px; margin:0; padding:12px; width:216px; max-width:calc(100vw - 32px);
  border:1px solid var(--ws-line); border-radius:8px; background:var(--ws-surface); color:var(--ws-text);
  box-shadow:0 8px 24px #0003; display:grid; gap:4px; z-index:70;
}
.web-preference-popover legend { float:left; width:100%; padding:0 8px 8px; font-size:12px; font-weight:650; color:var(--ws-muted); }
.web-preference-popover label { display:flex !important; align-items:center; gap:10px; padding:8px; min-height:44px; border-radius:4px; cursor:pointer; margin:0; color:var(--ws-text) !important; font-size:14px; }
.web-preference-popover label:hover, .web-preference-popover label:has(input:checked) { background:var(--ws-selected); }
.web-preference-popover input[type="radio"] { width:16px !important; height:16px; margin:0; min-height:0; flex:0 0 16px; accent-color:var(--ws-accent); }
.web-swatch { display:block; width:20px; height:20px; flex:0 0 20px; border:1px solid #8888; border-radius:50%; }
[data-swatch="classic"] { background:#78d9c4; } [data-swatch="pink"] { background:#ed9dc3; }
[data-swatch="purple"] { background:#b68be5; } [data-swatch="black"] { background:#151719; } [data-swatch="white"] { background:#fff; }
html[data-cloud-dashboard] .language-switch { display:none !important; }
@media(max-width:960px) {
  .workspace-header { gap:16px; }
  .workspace-nav a { padding-inline:10px; }
}
@media(max-width:600px) {
  .workspace-header { grid-template-columns:minmax(0,1fr) auto; }
  .workspace-brand { min-width:0; }
  .workspace-brand strong { overflow-wrap:anywhere; }
  .web-preference-tools { grid-column:2; grid-row:1; gap:6px; }
  .web-preference-menu > summary { width:40px; height:40px; }
  .web-preference-menu:first-child .web-preference-popover { right:-46px; }
  .workspace-nav { grid-column:1 / -1; grid-row:2; }
  .workspace-nav a { white-space:normal; min-width:0; text-align:center; font-size:12px; line-height:1.4; }
  .workspace-header:has(.workspace-nav a[hidden]) .workspace-nav a { flex:1; }
  html[lang="en"] .workspace-options > summary { max-width:148px; font-size:12px; }
}
