/* Theme preview colors remain available while another theme is active. */
:root {
  --color-theme-cherish-ball-preview-primary: #d6a84f;
  --color-theme-cherish-ball-preview-secondary: #fff8e8;
  --color-theme-cherish-ball-preview-tertiary: #17130d;
}

/* Gilded Vault theme for Cherish Dex application chrome. */
:root[data-app-theme='cherish-ball'] {
  color-scheme: dark;

  /* Surfaces */
  --color-bg-base: #0e0c09;
  --color-bg-deep: #120f0a;
  --color-bg-surface: #17130d;
  --color-bg-panel: #1d1810;
  --color-bg-card: #1a160f;
  --color-bg-popover: #211b12;
  --color-bg-elevated: #241e14;
  --color-bg-canvas: #090806;
  --color-bg-canvas-alt: #100d09;
  --color-bg-panel-subtle: #18140e;
  --color-bg-hero: #15110c;
  --color-bg-card-warm: #1f190f;
  --color-bg-card-warm-alt: #221b11;
  --color-bg-media: #2a2317;
  --color-bg-thumbnail: #302817;
  --color-bg-thumbnail-alt: #352b18;
  --color-bg-placeholder: #2c2417;
  --color-bg-success-edge: #18160d;
  --color-bg-danger-panel: #1f170d;
  --color-bg-step-inactive: #2a2418;
  --color-bg-tech: #14120d;

  /* Content */
  --color-text-primary: #fff8e8;
  --color-text-strong: #fffdf5;
  --color-text-soft: #f5ebd2;
  --color-text-body: #eadfc4;
  --color-text-body-strong: #fff3dc;
  --color-text-secondary: #d8c8a8;
  --color-text-caption: #bcae91;
  --color-text-caption-alt: #bcae91;
  --color-text-tertiary: #aa9a78;
  --color-text-low: #908167;
  --color-text-muted: #766a54;
  --color-text-subtle: #665b48;
  --color-text-placeholder: #8a7b61;
  --color-text-disabled: #5c5242;
  --color-text-ghost: #423a2e;
  --color-text-emphasis: #fffdf5;
  --color-text-control: #d8c8a8;
  --color-text-feature: #d8c8a8;
  --color-text-detail: #bcae91;
  --color-text-description: #c8b99a;
  --color-text-summary: #aa9a78;
  --color-text-plan-label: #aa9a78;
  --color-text-bulk: #bcae91;
  --color-text-code: #f1d58a;
  --color-text-bulk-subtle: #aa9a78;
  --color-text-scanner-label: #aa9a78;
  --color-text-confidence: #aa9a78;
  --color-text-limit: #908167;
  --color-text-detected: #f1d58a;
  --color-text-hint: #aa9a78;
  --color-text-referral-note: #aa9a78;
  --color-text-alert-note: #bcae91;
  --color-text-about-muted: #aa9a78;
  --color-text-card: #eadfc4;
  --color-text-card-alt: #eadfc4;
  --color-text-search: #eadfc4;
  --color-text-upload: #eadfc4;
  --color-text-scanner: #bcae91;
  --color-text-scanner-summary: #908167;
  --color-text-alert-description: #c8b99a;
  --color-text-manual: #d8c8a8;
  --color-text-referral: #d6a84f;
  --color-text-neutral: #d8c8a8;
  --color-on-accent: #120f0a;

  /* Product brand and application accents */
  --color-brand-primary: #d6a84f;
  --color-brand-primary-light: #f1d58a;
  --color-brand-primary-dark: #b9821b;
  --color-brand-primary-deep: #6e4a0e;
  --color-brand-soft: #fff1c2;
  --color-brand-muted: #d8c8a8;
  --color-brand-gold: #d6a84f;

  --color-brand-name-primary: var(--color-brand-primary-light);
  --color-brand-name-secondary: #fff8e8;
  --color-brand-name-dark: var(--color-brand-primary-dark);

  --color-accent-primary: var(--color-brand-primary);
  --color-accent-primary-light: var(--color-brand-primary-light);
  --color-accent-primary-dark: var(--color-brand-primary-dark);
  --color-accent-primary-deep: var(--color-brand-primary-deep);
  --color-accent-primary-soft: var(--color-brand-soft);
  --color-accent-primary-muted: #d8c8a8;

  --color-accent-violet-soft: #d8c8a8;
  --color-accent-violet: #bcae91;

  --color-accent-secondary: #fff8e8;
  --color-accent-secondary-light: #fffdf5;

  --color-accent-tertiary: #b9821b;
  --color-accent-fuchsia: #f1d58a;

  --color-accent-text: var(--color-brand-primary-light);
  --color-account-highlight: #ff1f48;
  --color-on-action-wishlist: #120f0a;

  --color-status-success-text: #f1d58a;
  --color-status-warning-text: #f1d58a;
  --color-status-danger-text: #f1d58a;
  --color-control-check-bg: var(--color-bg-elevated);
  --color-control-check-border: rgb(var(--rgb-overlay) / 18%);
  --color-control-check-border-hover: var(--color-accent-primary-light);
  --color-control-check-bg-checked: var(--color-accent-primary);
  --color-control-check-border-checked: var(--color-accent-primary-light);
  --color-control-check-mark: var(--color-on-accent);
  --color-scrollbar-track: rgb(var(--rgb-overlay) / 3%);
  --color-scrollbar-thumb: rgb(var(--rgb-accent-primary) / 42%);
  --color-scrollbar-thumb-hover: rgb(var(--rgb-accent-primary) / 68%);
  --color-control-field-bg: var(--color-bg-elevated);
  --color-control-field-border: rgb(var(--rgb-overlay) / 14%);
  --color-control-field-border-hover: var(--color-accent-primary-light);
  --color-control-menu-bg: var(--color-bg-popover);
  --color-control-option-hover: rgb(var(--rgb-accent-primary) / 12%);
  --color-control-option-selected: rgb(var(--rgb-accent-primary) / 20%);
  --color-control-stepper-bg: rgb(var(--rgb-overlay) / 5%);
  --color-control-stepper-hover: rgb(var(--rgb-accent-primary) / 16%);
  --color-control-slider-track: rgb(var(--rgb-overlay) / 13%);
  --color-control-slider-fill: var(--color-accent-primary);
  --color-control-slider-thumb: var(--color-accent-primary-light);
  --color-control-slider-thumb-ring: var(--color-bg-surface);

  --color-price-tcgplayer-text: #e0f2fe;
  --color-price-tcgplayer-bg: #10262f;
  --color-price-tcgplayer-border: #7dd3fc;
  --color-price-cardmarket-text: #fff1c2;
  --color-price-cardmarket-bg: #3a2a0e;
  --color-price-cardmarket-border: #d6a84f;
  /* Reacciones sociales (💗 me encanta, 👍 me gusta, ⭐ favorito). */
  --color-reaction-heart: #eb95b3;
  --color-reaction-like: #9db6ef;
  --color-reaction-star: #e6c15a;

  --rgb-accent-primary: 214 168 79;
  --rgb-accent-primary-200: 255 241 194;
  --rgb-accent-primary-300: 216 200 168;
  --rgb-accent-primary-light: 241 213 138;
  --rgb-accent-primary-dark: 185 130 27;

  --rgb-accent-secondary: 255 248 232;
  --rgb-accent-secondary-300: 255 253 245;
  --rgb-accent-secondary-500: 255 248 232;

  --rgb-accent-tertiary: 185 130 27;
  --rgb-accent-tertiary-300: 241 213 138;
  --rgb-accent-tertiary-400: 214 168 79;
  --rgb-accent-fuchsia: 241 213 138;

  /* Functional actions stay monochromatic for the premium tier. */
  --color-action-wishlist: #f1d58a;
  --color-action-wishlist-strong: #d6a84f;
  --color-action-wishlist-deep: #b9821b;
  --rgb-action-wishlist: 241 213 138;
  --rgb-action-wishlist-strong: 214 168 79;

  --color-action-destructive: #b9821b;
  --color-action-destructive-strong: #8e6114;
  --color-action-destructive-deep: #5f3f0b;
  --rgb-action-destructive: 185 130 27;
  --rgb-action-destructive-strong: 142 97 20;

  --color-action-cancel: #bcae91;
  --rgb-action-cancel: 188 174 145;

  /* RGB channels */
  --rgb-overlay: 255 248 232;
  --rgb-shadow: 0 0 0;
  --rgb-white: 255 255 255;
  --rgb-black: 0 0 0;
  --rgb-bg-base: 14 12 9;
  --rgb-bg-deep: 18 15 10;
  --rgb-bg-surface: 23 19 13;
  --rgb-bg-void: 9 8 6;
  --rgb-bg-tech: 20 18 13;
  --rgb-champagne: 241 213 138;

  /* Backwards-compatible aliases */
  --bg-base: var(--color-bg-base);
  --bg-surface: var(--color-bg-surface);
  --bg-elevated: var(--color-bg-elevated);
  --border: rgb(var(--rgb-overlay) / 12%);
  --text-primary: var(--color-text-primary);
  --text-secondary: var(--color-text-secondary);
  --text-muted: var(--color-text-disabled);
  --accent-cyan: var(--color-accent-secondary);
  --accent-purple: var(--color-accent-primary);
  --accent-pink: var(--color-accent-tertiary);
}
