/* Dark mode for the search page: dark values for the Buskool kit's color tokens, used when the device is set to dark
   (the owner's choice, 2026-11-29). The kit has light colors only, so these are ours: the kit's own neutral family
   (zinc) in reverse, and the violet accent one step lighter so text and buttons keep their contrast on dark.
   Only tokens change; the kit files (kit/) are not edited. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    /* Base */
    --ink: #f4f4f5;
    --muted: #a1a1aa;
    --line: #2e2e33;
    --bg: #111113;
    --n-50: #1f1f23;
    --n-100: #26262a;
    --n-150: #2e2e33;
    --n-200: #3a3a40;
    --soft: var(--n-100);

    /* Violet accent, lighter for dark backgrounds */
    --violet: #8b5cf6;
    --violet-hover: #7c3aed;
    --violet-active: #6d28d9;
    --violet-50: #2a2140;
    --violet-100: #33284f;
    --violet-200: #3e3060;
    --ds-on-primary: #fff;
    --ds-focus: #a78bfa;

    /* Surfaces and text */
    --ds-surface: #1c1c1f;
    --ds-surface-line: #2e2e33;
    --ds-border-strong: #3a3a40;
    --ds-text-strong: #e4e4e7;
    --ds-text-body: #d4d4d8;
    --ds-skeleton: #26262a;
    --ds-skeleton-shine: #2e2e33;

    /* Inputs */
    --ds-input-bg: #1c1c1f;
    --ds-input-border: #3a3a40;
    --ds-input-border-hover: #52525b;
    --ds-input-border-focus: var(--violet);
    --ds-input-ring: #8b5cf633;
    --ds-input-bg-disabled: #26262a;
    --ds-input-text: var(--ink);
    --ds-input-placeholder: #71717a;
    --ds-input-muted: var(--muted);
    --ds-addon-bg: #26262a;
    --ds-switch-off: #52525b;

    /* Status colors */
    --ds-danger: #f87171;
    --ds-danger-hover: #fca5a5;
    --ds-danger-active: #fecaca;
    --ds-danger-bg: #3b1d1d;
    --ds-danger-bg-active: #4a2222;
    --ds-danger-border: #7f2d2d;
    --ds-danger-ring: #f8717133;
    --ds-success: #34d399;
    --ds-success-bg: #10302a;
    --ds-success-border: #1f5a4c;
    --ds-warning: #fbbf24;
    --ds-warning-bg: #3a2c0f;
    --ds-warning-border: #6b5216;
    --ds-info: #60a5fa;
    --ds-info-bg: #172a46;
    --ds-info-border: #284a78;
    --ds-dot-success: #4ade80;
    --ds-dot-warning: #fbbf24;

    /* Overlays: deeper shadows, so raised surfaces still read as raised on dark */
    --ds-scrim: #000000a6;
    --ds-shadow: 0 3px 16px #00000066, 0 1px 4px #00000040;
    --ds-shadow-pop: 0 8px 30px #00000080;
    --ds-shadow-modal: 0 12px 40px #000000a6;
    --ds-snack-bg: #f4f4f5;
    --ds-snack-text: #18181b;
    --ds-snack-accent: #7c3aed;
  }

  /* The price-age chips sit on product photos with a fixed dark background; their text takes the light-mode surface
     and warning-border colors (white and pale gold), which the dark tokens above would turn dark. */
  /* .pc prefix: this file loads before cards.css, so the selectors must outrank the cards' own chip rules. */
  .pc .pc-chip { color: #fff; }
  .pc .pc-chip.old { color: #f0dcae; }
}
