/* Approved brand lavender palette. Site chrome only: no chat/design variables. */
body {
  --brand-main: #e7dcfa;
  --brand-main-text: #533774;
  --brand-accent: #eee7fa;
  --brand-accent-text: #684b8a;
  --brand-line: #e7e2ee;
  --brand-panel: #faf9fd;
  --brand-muted: #687288;
  --brand-hover: #ded0f2;
  --brand-focus: #8b6bad;
}
body.theme-dark-obsidian {
  --brand-main: #66517e;
  --brand-main-text: #f3ecff;
  --brand-accent: #2b2340;
  --brand-accent-text: #d8c7ef;
  --brand-line: #493c59;
  --brand-panel: #161c2b;
  --brand-muted: #b1bbce;
  --brand-hover: #765d92;
  --brand-focus: #bba0dc;
}

/* White page and panel surfaces; editor preview and broadcast canvas are excluded. */
body:is(.landing-body, .service-page, .v2-page):not(.theme-dark-obsidian) {
  background: #fff !important;
}
body:not(.theme-dark-obsidian) .global-header {
  background: #fff;
  border-color: var(--brand-line);
  color: #263149;
}
body:not(.theme-dark-obsidian) :is(.service-card, .service-empty,
  .styleshop-card, .styleshop-live-sidebar, .styleshop-submodal,
  .styleshop-page-hero, .business-footer) {
  background-color: #fff;
  border-color: var(--brand-line);
}
body:not(.theme-dark-obsidian) :is(.styleshop-card-body, .v2-col-library,
  .v2-lib-grid-wrap, .v2-controls, .v2-studio-layout, .v2-workspace) {
  background-color: #fff;
}
body.v2-page:not(.theme-dark-obsidian) :is(.v2-lib-header, .v2-lib-cat-sidebar,
  .v2-custom-header, .v2-custom-tabs, .v2-preview-header,
  .v2-ctrl-group, .v2-layer-box, .v2-styleshop-bar) {
  background-color: var(--brand-panel);
}
body:not(.theme-dark-obsidian) :is(.service-footer, .landing-footer,
  .styleshop-page-hero, .styleshop-card-actions, .live-sidebar-header,
  .v2-col-library, .v2-lib-header, .v2-lib-cat-sidebar, .v2-controls,
  .v2-custom-header, .v2-ctrl-group, .v2-ctrl-title, .v2-layer-box,
  .v2-styleshop-bar, .v2-preview-header) {
  border-color: var(--brand-line);
}

/* Main site actions. Payment actions keep their existing peach or PayPal colors. */
body :is(.nav-login-btn, .btn-make-chat, .btn-hero-primary,
  .styleshop-publish-btn, .styleshop-apply-btn, .pub-submit-btn,
  .btn-live-apply, .v2-btn-complete-obs, .v2-btn-styleshop) {
  background: var(--brand-main) !important;
  color: var(--brand-main-text) !important;
  border-color: var(--brand-line) !important;
  box-shadow: 0 3px 10px rgba(92, 68, 124, .08);
}
body.service-page :is(.service-button.primary, .primary):not(.paypal-button) {
  background: var(--brand-main) !important;
  color: var(--brand-main-text) !important;
  border-color: var(--brand-line) !important;
}
/* Keep main actions above the service page's generic dark button rules. */
body.theme-dark-obsidian.service-page :is(.nav-login-btn, .btn-hero-primary,
  .styleshop-publish-btn, .styleshop-apply-btn, .pub-submit-btn, .btn-live-apply,
  .service-button.primary, .primary):not(.paypal-button) {
  background: var(--brand-main) !important;
  color: var(--brand-main-text) !important;
  border-color: var(--brand-line) !important;
}
body :is(.nav-login-btn, .btn-make-chat, .btn-hero-primary,
  .styleshop-publish-btn, .styleshop-apply-btn, .pub-submit-btn,
  .btn-live-apply, .v2-btn-complete-obs, .v2-btn-styleshop):hover:not(:disabled) {
  background: var(--brand-hover) !important;
  filter: none;
  box-shadow: 0 5px 13px rgba(92, 68, 124, .12);
}
body.theme-dark-obsidian.service-page :is(.nav-login-btn, .btn-hero-primary,
  .styleshop-publish-btn, .styleshop-apply-btn, .pub-submit-btn, .btn-live-apply,
  .service-button.primary, .primary):not(.paypal-button):hover:not(:disabled) {
  background: var(--brand-hover) !important;
}

/* Neutral controls and lavender selection affordances, not asset artwork. */
body:not(.theme-dark-obsidian) .nav-link-btn { color: #62687b; }
body:not(.theme-dark-obsidian) :is(.nav-lang-wrap, .btn-theme-toggle) {
  background: var(--brand-panel);
  border-color: var(--brand-line);
}
body:not(.theme-dark-obsidian) :is(.nav-link-btn:hover, .nav-link-btn.active,
  .nav-lang-btn.active, .styleshop-tab.active, .styleshop-tag-pill.active) {
  background: var(--brand-accent) !important;
  color: var(--brand-accent-text) !important;
  border-color: var(--brand-line) !important;
  box-shadow: none;
}
body:not(.theme-dark-obsidian) :is(.hero-badge, .shop-tag-mini,
  .styleshop-code-badge, .styleshop-live-input-row button, .btn-live-copy,
  .btn-hero-secondary, .v2-btn-temp-save, .v2-broadcast-preview-link,
  .v2-design-backup-bar button, .v2-design-backup-bar label) {
  background: var(--brand-accent);
  color: var(--brand-accent-text);
  border-color: var(--brand-line);
  box-shadow: none;
}
body:not(.theme-dark-obsidian) :is(.service-eyebrow, .live-preview-sub,
  .styleshop-code-badge .code-val, .v2-custom-sub, .v2-cat-count) {
  color: var(--brand-accent-text);
}
body:not(.theme-dark-obsidian) :is(.service-page input, .service-page textarea,
  .service-page select, .styleshop-sort-select, .styleshop-copy-code-btn,
  .styleshop-tag-pill, .v2-lib-search-bar input, .v2-hex-input,
  .v2-select, .v2-asset-card, .v2-deco-slot-btn, .v2-btn-mini,
  .v2-tool-btn, .v2-pill, .v2-nick-toggle-group, .v2-crop-details,
  .v2-preset-card, .v2-num-box) {
  border-color: var(--brand-line);
}
body.v2-page:not(.theme-dark-obsidian) :is(.v2-lib-tab-btn.active,
  .v2-cat-item.active, .v2-tab-btn.active, .v2-pill.active,
  .v2-preset-card.selected, .v2-deco-slot-btn.active,
  .v2-deco-slot-wrapper.active .v2-deco-slot-btn,
  .v2-num-box.active, .v2-nick-btn.active, .part-btn.selected) {
  background: var(--brand-accent) !important;
  color: var(--brand-accent-text) !important;
  border-color: var(--brand-focus) !important;
  box-shadow: none;
}
body.v2-page:not(.theme-dark-obsidian) .v2-asset-card.is-selected {
  background: var(--brand-panel) !important;
  border-color: var(--brand-focus) !important;
  box-shadow: 0 0 0 2px rgba(139, 107, 173, .16) !important;
}
body.service-page:not(.theme-dark-obsidian) .styleshop-card.selected-live {
  border-color: var(--brand-focus) !important;
  box-shadow: 0 0 0 2px rgba(139, 107, 173, .16) !important;
}
body.v2-page:not(.theme-dark-obsidian) .v2-custom-upload-card {
  background: var(--brand-panel) !important;
  border-color: var(--brand-focus) !important;
}
body.v2-page:not(.theme-dark-obsidian) :is(.v2-lib-tab-btn .badge,
  .v2-lib-tab-btn.active .badge, .v2-equipped-badge) {
  background: var(--brand-accent);
  color: var(--brand-accent-text);
}
body:not(.theme-dark-obsidian) .styleshop-page-hero > div:first-child {
  background: var(--brand-accent) !important;
  color: var(--brand-accent-text) !important;
  border-color: var(--brand-line) !important;
}
body:not(.theme-dark-obsidian) .styleshop-card-preview {
  background: var(--brand-panel) !important;
  border-color: var(--brand-line);
}
body:not(.theme-dark-obsidian) :is(.styleshop-search-box input,
  #shop-import-form input, .styleshop-live-input-row input,
  .publish-form input, .publish-form textarea) {
  border-color: var(--brand-line) !important;
}

/* The login card keeps provider marks and its existing layout. */
body:not(.theme-dark-obsidian) #modal-login {
  --login-surface: #fff;
  --login-text: #263149;
  --login-muted: #687288;
  --login-line: var(--brand-line);
  --login-tint: var(--brand-accent);
  --login-banner-end: var(--brand-panel);
}
body:not(.theme-dark-obsidian) #modal-login .social-btn:not(.login-card-browse) {
  border-color: var(--brand-line) !important;
}
body :is(.global-header, .g-modal, .service-main, .styleshop-page-container,
  .v2-col-library, .v2-controls, .v2-preview-header) :focus-visible {
  outline-color: var(--brand-focus);
}
body.v2-page :is(.v2-lib-search-bar, .v2-custom-body) :is(input[type="checkbox"], input[type="range"]) {
  accent-color: var(--brand-focus);
}
