/* Central palette tokens. Toxic preserves original color values. */
:root, [data-theme="toxic"] {
  --green: #65ff7d; --dark-green: #14391d; --black: #030704;
  --spectrum-bg: #030704; --spectrum-fg: #65ff7d;
  --tone-0: #0b180e;
  --tone-1: #020403;
  --tone-2: rgba(20, 255, 80, 0.025);
  --tone-3: rgba(0, 0, 0, 0.04);
  --tone-4: rgba(255, 255, 255, 0.025);
  --tone-5: rgba(0, 15, 5, 0.75);
  --tone-6: rgba(101, 255, 125, 0.25);
  --tone-7: rgba(32, 255, 75, 0.05);
  --tone-8: rgba(101, 255, 125, 0.8);
  --tone-9: rgba(50, 255, 100, 0.04);
  --tone-10: rgba(101, 255, 125, 0.5);
  --tone-11: rgba(101, 255, 125, 0.06);
  --tone-12: rgba(50, 255, 100, 0.05);
  --tone-13: #001705;
  --tone-14: rgba(101, 255, 125, 0.6);
  --tone-15: rgba(20, 255, 80, 0.03);
  --tone-16: rgba(101, 255, 125, 0.7);
  --tone-17: rgba(0, 255, 80, 0.025);
  --tone-18: rgba(0, 0, 0, 0.2);
  --tone-19: #102416;
  --tone-20: rgba(101, 255, 125, 0.45);
  --tone-21: rgba(0, 15, 5, 0.78);
  --tone-22: rgba(101, 255, 125, 0.16);
  --tone-23: rgba(101, 255, 125, 0.65);
  --tone-24: rgba(101, 255, 125, 0.35);
  --tone-25: #ff6868;
  --tone-26: rgba(101, 255, 125, 0.4);
  --tone-27: rgba(101,255,125,.35);
  --tone-28: rgba(101,255,125,.3);
  --tone-29: #001204;
  --tone-30: rgba(101,255,125,.25);
}
[data-theme="amber"] {
  --green: #ffd16a; --dark-green: #493415; --black: #090601;
  --spectrum-bg: #090601; --spectrum-fg: #ffd16a;
  --tone-0: #493415;
  --tone-1: #090601;
  --tone-2: rgba(255, 209, 106, 0.025);
  --tone-3: rgba(0, 0, 0, 0.04);
  --tone-4: rgba(255, 255, 255, 0.025);
  --tone-5: color-mix(in srgb, var(--black) 75.0%, transparent);
  --tone-6: rgba(255, 209, 106, 0.25);
  --tone-7: rgba(255, 209, 106, 0.05);
  --tone-8: rgba(255, 209, 106, 0.8);
  --tone-9: rgba(255, 209, 106, 0.04);
  --tone-10: rgba(255, 209, 106, 0.5);
  --tone-11: rgba(255, 209, 106, 0.06);
  --tone-12: rgba(255, 209, 106, 0.05);
  --tone-13: #090601;
  --tone-14: rgba(255, 209, 106, 0.6);
  --tone-15: rgba(255, 209, 106, 0.03);
  --tone-16: rgba(255, 209, 106, 0.7);
  --tone-17: rgba(255, 209, 106, 0.025);
  --tone-18: rgba(0, 0, 0, 0.2);
  --tone-19: #493415;
  --tone-20: rgba(255, 209, 106, 0.45);
  --tone-21: color-mix(in srgb, var(--black) 78.0%, transparent);
  --tone-22: rgba(255, 209, 106, 0.16);
  --tone-23: rgba(255, 209, 106, 0.65);
  --tone-24: rgba(255, 209, 106, 0.35);
  --tone-25: #ffd16a;
  --tone-26: rgba(255, 209, 106, 0.4);
  --tone-27: rgba(255, 209, 106, .35);
  --tone-28: rgba(255, 209, 106, .3);
  --tone-29: #090601;
  --tone-30: rgba(255, 209, 106, .25);
}
[data-theme="ice"] {
  --green: #8cdfff; --dark-green: #173b49; --black: #030709;
  --spectrum-bg: #030709; --spectrum-fg: #8cdfff;
  --tone-0: #173b49;
  --tone-1: #030709;
  --tone-2: rgba(140, 223, 255, 0.025);
  --tone-3: rgba(0, 0, 0, 0.04);
  --tone-4: rgba(255, 255, 255, 0.025);
  --tone-5: color-mix(in srgb, var(--black) 75.0%, transparent);
  --tone-6: rgba(140, 223, 255, 0.25);
  --tone-7: rgba(140, 223, 255, 0.05);
  --tone-8: rgba(140, 223, 255, 0.8);
  --tone-9: rgba(140, 223, 255, 0.04);
  --tone-10: rgba(140, 223, 255, 0.5);
  --tone-11: rgba(140, 223, 255, 0.06);
  --tone-12: rgba(140, 223, 255, 0.05);
  --tone-13: #030709;
  --tone-14: rgba(140, 223, 255, 0.6);
  --tone-15: rgba(140, 223, 255, 0.03);
  --tone-16: rgba(140, 223, 255, 0.7);
  --tone-17: rgba(140, 223, 255, 0.025);
  --tone-18: rgba(0, 0, 0, 0.2);
  --tone-19: #173b49;
  --tone-20: rgba(140, 223, 255, 0.45);
  --tone-21: color-mix(in srgb, var(--black) 78.0%, transparent);
  --tone-22: rgba(140, 223, 255, 0.16);
  --tone-23: rgba(140, 223, 255, 0.65);
  --tone-24: rgba(140, 223, 255, 0.35);
  --tone-25: #8cdfff;
  --tone-26: rgba(140, 223, 255, 0.4);
  --tone-27: rgba(140, 223, 255, .35);
  --tone-28: rgba(140, 223, 255, .3);
  --tone-29: #030709;
  --tone-30: rgba(140, 223, 255, .25);
}
[data-theme="blood"] {
  --green: #ff9696; --dark-green: #481b22; --black: #090304;
  --spectrum-bg: #090304; --spectrum-fg: #ff9696;
  --tone-0: #481b22;
  --tone-1: #090304;
  --tone-2: rgba(255, 150, 150, 0.025);
  --tone-3: rgba(0, 0, 0, 0.04);
  --tone-4: rgba(255, 255, 255, 0.025);
  --tone-5: color-mix(in srgb, var(--black) 75.0%, transparent);
  --tone-6: rgba(255, 150, 150, 0.25);
  --tone-7: rgba(255, 150, 150, 0.05);
  --tone-8: rgba(255, 150, 150, 0.8);
  --tone-9: rgba(255, 150, 150, 0.04);
  --tone-10: rgba(255, 150, 150, 0.5);
  --tone-11: rgba(255, 150, 150, 0.06);
  --tone-12: rgba(255, 150, 150, 0.05);
  --tone-13: #090304;
  --tone-14: rgba(255, 150, 150, 0.6);
  --tone-15: rgba(255, 150, 150, 0.03);
  --tone-16: rgba(255, 150, 150, 0.7);
  --tone-17: rgba(255, 150, 150, 0.025);
  --tone-18: rgba(0, 0, 0, 0.2);
  --tone-19: #481b22;
  --tone-20: rgba(255, 150, 150, 0.45);
  --tone-21: color-mix(in srgb, var(--black) 78.0%, transparent);
  --tone-22: rgba(255, 150, 150, 0.16);
  --tone-23: rgba(255, 150, 150, 0.65);
  --tone-24: rgba(255, 150, 150, 0.35);
  --tone-25: #ff9696;
  --tone-26: rgba(255, 150, 150, 0.4);
  --tone-27: rgba(255, 150, 150, .35);
  --tone-28: rgba(255, 150, 150, .3);
  --tone-29: #090304;
  --tone-30: rgba(255, 150, 150, .25);
}
[data-theme="violet"] {
  --green: #d3a0ff; --dark-green: #352044; --black: #070309;
  --spectrum-bg: #070309; --spectrum-fg: #d3a0ff;
  --tone-0: #352044;
  --tone-1: #070309;
  --tone-2: rgba(211, 160, 255, 0.025);
  --tone-3: rgba(0, 0, 0, 0.04);
  --tone-4: rgba(255, 255, 255, 0.025);
  --tone-5: color-mix(in srgb, var(--black) 75.0%, transparent);
  --tone-6: rgba(211, 160, 255, 0.25);
  --tone-7: rgba(211, 160, 255, 0.05);
  --tone-8: rgba(211, 160, 255, 0.8);
  --tone-9: rgba(211, 160, 255, 0.04);
  --tone-10: rgba(211, 160, 255, 0.5);
  --tone-11: rgba(211, 160, 255, 0.06);
  --tone-12: rgba(211, 160, 255, 0.05);
  --tone-13: #070309;
  --tone-14: rgba(211, 160, 255, 0.6);
  --tone-15: rgba(211, 160, 255, 0.03);
  --tone-16: rgba(211, 160, 255, 0.7);
  --tone-17: rgba(211, 160, 255, 0.025);
  --tone-18: rgba(0, 0, 0, 0.2);
  --tone-19: #352044;
  --tone-20: rgba(211, 160, 255, 0.45);
  --tone-21: color-mix(in srgb, var(--black) 78.0%, transparent);
  --tone-22: rgba(211, 160, 255, 0.16);
  --tone-23: rgba(211, 160, 255, 0.65);
  --tone-24: rgba(211, 160, 255, 0.35);
  --tone-25: #d3a0ff;
  --tone-26: rgba(211, 160, 255, 0.4);
  --tone-27: rgba(211, 160, 255, .35);
  --tone-28: rgba(211, 160, 255, .3);
  --tone-29: #070309;
  --tone-30: rgba(211, 160, 255, .25);
}

/* Semantic interface palette; custom values are applied by the shared state service. */
:root {
  --ui-desktopBackground: var(--black);
  --ui-desktopLabels: var(--green);
  --ui-windowBackground: var(--black);
  --ui-titleActive: var(--green);
  --ui-titleInactive: var(--dark-green);
  --ui-titleText: var(--black);
  --ui-titleInactiveText: var(--green);
  --ui-border: var(--green);
  --ui-shadow: var(--dark-green);
  --ui-taskbar: var(--black);
  --ui-startMenu: var(--black);
  --ui-menu: var(--black);
  --ui-dropdown: var(--black);
  --ui-textPrimary: var(--green);
  --ui-textSecondary: var(--green);
  --ui-textMuted: var(--green);
  --ui-textDisabled: var(--dark-green);
  --ui-link: var(--green);
  --ui-linkHover: var(--green);
  --ui-linkVisited: var(--green);
  --ui-buttonBackground: var(--black);
  --ui-buttonText: var(--green);
  --ui-hoverBackground: var(--dark-green);
  --ui-hoverText: var(--green);
  --ui-inputBackground: var(--black);
  --ui-inputText: var(--green);
  --ui-selectionBackground: var(--green);
  --ui-selectionText: var(--black);
  --ui-focus: var(--green);
  --ui-accent: var(--green);
  --ui-panel: var(--dark-green);
  --ui-divider: var(--dark-green);
  --ui-scrollbarThumb: var(--green);
  --ui-scrollbarTrack: var(--black);
  --ui-tooltipBackground: var(--black);
  --ui-tooltipText: var(--green);
  --ui-radioBackground: #001204;
  --ui-radioAccent: var(--green);
  --ui-explorerBackground: var(--black);
  --ui-browserBackground: var(--black);
  --ui-pageBackground: #08140c;
  --ui-pageText: #b5edc0;
  --ui-radioPageBackground: #101a20;
  --ui-radioPageText: #c5e9ee;
  --ui-errorPageBackground: #211515;
  --ui-errorPageText: #ffd3c9;
  --ui-arcadeBackground: #0b1010;
  --ui-arcadeText: #a6ff85;
  --ui-arcadePanel: #14151b;
  --ui-arcadeAccent: #caa1ff;
  --ui-arcadeBorder: #9270be;
  --ui-arcadeButton: #142219;
}

/* Shell color controls inherit the existing palette until a custom theme sets them. */
:root {
  --ui-desktopSelectionBackground: var(--ui-hoverBackground);
  --ui-desktopSelectionText: var(--ui-hoverText);
  --ui-desktopSelectionBorder: var(--ui-border);
  --ui-taskbarButtonBackground: var(--ui-buttonBackground);
  --ui-taskbarButtonText: var(--ui-buttonText);
  --ui-taskbarButtonBorder: var(--ui-border);
  --ui-taskbarButtonActiveBackground: var(--ui-selectionBackground);
  --ui-taskbarButtonActiveText: var(--ui-selectionText);
  --ui-taskbarButtonHoverBackground: var(--ui-hoverBackground);
  --ui-taskbarButtonHoverText: var(--ui-hoverText);
  --ui-taskbarButtonFocus: var(--ui-focus);
  --ui-trayBackground: var(--ui-taskbar);
  --ui-trayText: var(--ui-textPrimary);
  --ui-trayBorder: var(--ui-panel);
  --ui-clockText: var(--ui-trayText);
  --ui-connectionText: var(--ui-trayText);
  --ui-radioStatusText: var(--ui-buttonText);
}

/* Store starts with its existing colors; custom controls are independent. */
:root {
  --ui-storeBackground: var(--ui-windowBackground);
  --ui-storeText: var(--ui-textPrimary);
  --ui-storePanel: var(--ui-panel);
  --ui-storeBorder: var(--ui-border);
  --ui-storeDivider: var(--ui-divider);
  --ui-storeButtonBackground: var(--ui-buttonBackground);
  --ui-storeButtonText: var(--ui-buttonText);
  --ui-storeHoverBackground: var(--ui-hoverBackground);
  --ui-storeHoverText: var(--ui-hoverText);
  --ui-storeInputBackground: var(--ui-inputBackground);
  --ui-storeInputText: var(--ui-inputText);
  --ui-storeDisabledText: var(--ui-textDisabled);
  --ui-storeFocus: var(--ui-focus);
  --ui-storeAccent: var(--ui-accent);
}
