/* R42 coordinated theme palettes; existing IDs and saved preferences retained. */
html:root[data-theme="emerald_executive"]{--bg:#eaf1ee;--bg-soft:#f3f8f5;--panel:#fcfefc;--panel-2:#f4f9f6;--panel-muted:#ecf3ef;--text:#142737;--muted:#53616c;--faint:#53616c;--border:#c9cfd1;--border-strong:#9fa8ad;--accent:#166348;--accent-2:#165745;--accent-soft:#e0ebe6;--accent-ink:#166348;--signature:#166348;--signature-soft:#e0ebe6;--topbar-tint:#fcfefc;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f3e5e6;--success:#16724f;--success-soft:#e0ede7;--warning:#8a5a12;--warning-soft:#eeeae0;--line:#2564b4;--line-soft:#e2ecf3;--normal:#16724f;--normal-soft:#e0ede7;--special:#8a5a12;--special-soft:#eeeae0;--violet:#7050aa;--violet-soft:#ebe9f2;}
[data-theme-choice="emerald_executive"]{--gallery-canvas:#eaf1ee;--gallery-panel:#fcfefc;--gallery-accent:#166348;}
html:root[data-theme="equal_erp_original"]{--bg:#edf1f6;--bg-soft:#f6f8fa;--panel:#ffffff;--panel-2:#f8f9fa;--panel-muted:#f1f3f6;--text:#16263b;--muted:#556170;--faint:#556170;--border:#cccfd4;--border-strong:#a2a8b1;--accent:#365a7d;--accent-2:#305070;--accent-soft:#e7ebef;--accent-ink:#365a7d;--signature:#365a7d;--signature-soft:#e7ebef;--topbar-tint:#ffffff;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f5e6e9;--success:#16724f;--success-soft:#e3eeea;--warning:#8a5a12;--warning-soft:#f1ebe3;--line:#2564b4;--line-soft:#e5ecf6;--normal:#16724f;--normal-soft:#e3eeea;--special:#8a5a12;--special-soft:#f1ebe3;--violet:#7050aa;--violet-soft:#eeeaf5;}
[data-theme-choice="equal_erp_original"]{--gallery-canvas:#edf1f6;--gallery-panel:#ffffff;--gallery-accent:#365a7d;}
html:root[data-theme="sandstone_minimal"]{--bg:#f3ede5;--bg-soft:#f9f4ee;--panel:#fffcf7;--panel-2:#fcf6f0;--panel-muted:#f9f0e9;--text:#1e2536;--muted:#5b5f6a;--faint:#5b5f6a;--border:#cecdcd;--border-strong:#a5a6aa;--accent:#a34d30;--accent-2:#884531;--accent-soft:#f4e7df;--accent-ink:#a34d30;--signature:#a34d30;--signature-soft:#f4e7df;--topbar-tint:#fffcf7;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f5e4e2;--success:#16724f;--success-soft:#e3ebe3;--warning:#8a5a12;--warning-soft:#f1e9dc;--line:#2564b4;--line-soft:#e5eaef;--normal:#16724f;--normal-soft:#e3ebe3;--special:#8a5a12;--special-soft:#f1e9dc;--violet:#7050aa;--violet-soft:#eee7ee;}
[data-theme-choice="sandstone_minimal"]{--gallery-canvas:#f3ede5;--gallery-panel:#fffcf7;--gallery-accent:#a34d30;}
html:root[data-theme="royal_indigo"]{--bg:#eeedf8;--bg-soft:#f6f4fc;--panel:#fdfcff;--panel-2:#f7f6fd;--panel-muted:#f1effa;--text:#18253f;--muted:#565f73;--faint:#565f73;--border:#cbcdd5;--border-strong:#a1a6b2;--accent:#5446b8;--accent-2:#483fa0;--accent-soft:#e9e6f6;--accent-ink:#5446b8;--signature:#5446b8;--signature-soft:#e9e6f6;--topbar-tint:#fdfcff;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f3e4e9;--success:#16724f;--success-soft:#e1ebea;--warning:#8a5a12;--warning-soft:#efe9e3;--line:#2564b4;--line-soft:#e3eaf6;--normal:#16724f;--normal-soft:#e1ebea;--special:#8a5a12;--special-soft:#efe9e3;--violet:#7050aa;--violet-soft:#ece7f5;}
[data-theme-choice="royal_indigo"]{--gallery-canvas:#eeedf8;--gallery-panel:#fdfcff;--gallery-accent:#5446b8;}
html:root[data-theme="swiss_editorial"]{--bg:#f1eeee;--bg-soft:#f8f6f6;--panel:#fffdfd;--panel-2:#fcf6f7;--panel-muted:#f9eef0;--text:#1f2237;--muted:#5b5d6c;--faint:#5b5d6c;--border:#cecdd1;--border-strong:#a5a5ae;--accent:#ac2947;--accent-2:#902844;--accent-soft:#f5e4e7;--accent-ink:#ac2947;--signature:#ac2947;--signature-soft:#f5e4e7;--topbar-tint:#fffdfd;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f5e4e7;--success:#16724f;--success-soft:#e3ece8;--warning:#8a5a12;--warning-soft:#f1e9e1;--line:#2564b4;--line-soft:#e5ebf4;--normal:#16724f;--normal-soft:#e3ece8;--special:#8a5a12;--special-soft:#f1e9e1;--violet:#7050aa;--violet-soft:#eee8f3;}
[data-theme-choice="swiss_editorial"]{--gallery-canvas:#f1eeee;--gallery-panel:#fffdfd;--gallery-accent:#ac2947;}
html:root[data-theme="neo_brutalist"]{--bg:#ecece7;--bg-soft:#f6f6f0;--panel:#fffffa;--panel-2:#fffdf4;--panel-muted:#fefcee;--text:#242e38;--muted:#5f666c;--faint:#5f666c;--border:#cfd1cf;--border-strong:#a7abac;--accent:#f2cf53;--accent-2:#c9af4e;--accent-soft:#fdf9e6;--accent-ink:#242e38;--signature:#f2cf53;--signature-soft:#fdf9e6;--topbar-tint:#fffffa;--freight-primary-ink:#101c29;--danger:#ad3047;--danger-soft:#f5e6e5;--success:#16724f;--success-soft:#e3eee5;--warning:#8a5a12;--warning-soft:#f1ebde;--line:#2564b4;--line-soft:#e5ecf2;--normal:#16724f;--normal-soft:#e3eee5;--special:#8a5a12;--special-soft:#f1ebde;--violet:#7050aa;--violet-soft:#eeeaf0;}
[data-theme-choice="neo_brutalist"]{--gallery-canvas:#ecece7;--gallery-panel:#fffffa;--gallery-accent:#f2cf53;}
html:root[data-theme="dubai_midnight"]{--bg:#0c1627;--bg-soft:#101c30;--panel:#142238;--panel-2:#17283e;--panel-muted:#1a2e44;--text:#e7eaf0;--muted:#aeb4be;--faint:#aeb4be;--border:#424e60;--border-strong:#687282;--accent:#67c8e2;--accent-2:#81cfe5;--accent-soft:#1e364c;--accent-ink:#67c8e2;--signature:#67c8e2;--signature-soft:#1e364c;--topbar-tint:#142238;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#2f3146;--success:#8ed5b7;--success-soft:#233747;--warning:#e8c17b;--warning-soft:#2d3540;--line:#88b8f7;--line-soft:#22344f;--normal:#8ed5b7;--normal-soft:#233747;--special:#e8c17b;--special-soft:#2d3540;--violet:#c4b0f1;--violet-soft:#29334e;}
[data-theme-choice="dubai_midnight"]{--gallery-canvas:#0c1627;--gallery-panel:#142238;--gallery-accent:#67c8e2;}
html:root[data-theme="fathima_gold"]{--bg:#0e201b;--bg-soft:#142821;--panel:#192f27;--panel-2:#20342a;--panel-muted:#26392c;--text:#e8ebef;--muted:#b0b8b9;--faint:#b0b8b9;--border:#475853;--border-strong:#6c7a77;--accent:#d7b971;--accent-2:#dac38a;--accent-soft:#304030;--accent-ink:#d7b971;--signature:#d7b971;--signature-soft:#304030;--topbar-tint:#192f27;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#343c37;--success:#8ed5b7;--success-soft:#274338;--warning:#e8c17b;--warning-soft:#324131;--line:#88b8f7;--line-soft:#263f40;--normal:#8ed5b7;--normal-soft:#274338;--special:#e8c17b;--special-soft:#324131;--violet:#c4b0f1;--violet-soft:#2e3e3f;}
[data-theme-choice="fathima_gold"]{--gallery-canvas:#0e201b;--gallery-panel:#192f27;--gallery-accent:#d7b971;}
html:root[data-theme="copper_foundry"]{--bg:#201916;--bg-soft:#281f1b;--panel:#302520;--panel-2:#362923;--panel-muted:#3d2e26;--text:#e9eaef;--muted:#b7b5b7;--faint:#b7b5b7;--border:#59504e;--border-strong:#7a7473;--accent:#e3a479;--accent-2:#e4b291;--accent-soft:#45342b;--accent-ink:#e3a479;--signature:#e3a479;--signature-soft:#45342b;--topbar-tint:#302520;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#483330;--success:#8ed5b7;--success-soft:#3b3a32;--warning:#e8c17b;--warning-soft:#46382b;--line:#88b8f7;--line-soft:#3b373a;--normal:#8ed5b7;--normal-soft:#3b3a32;--special:#e8c17b;--special-soft:#46382b;--violet:#c4b0f1;--violet-soft:#423639;}
[data-theme-choice="copper_foundry"]{--gallery-canvas:#201916;--gallery-panel:#302520;--gallery-accent:#e3a479;}
html:root[data-theme="arctic"]{--bg:#eaf2f7;--bg-soft:#f2f8fb;--panel:#fbfdff;--panel-2:#f4f8fb;--panel-muted:#ecf3f8;--text:#15273d;--muted:#536171;--faint:#536171;--border:#c8ced4;--border-strong:#9fa7b1;--accent:#286a99;--accent-2:#245d87;--accent-soft:#e2ebf3;--accent-ink:#286a99;--signature:#286a99;--signature-soft:#e2ebf3;--topbar-tint:#fbfdff;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f2e4e9;--success:#16724f;--success-soft:#e0ecea;--warning:#8a5a12;--warning-soft:#ede9e3;--line:#2564b4;--line-soft:#e1ebf6;--normal:#16724f;--normal-soft:#e0ecea;--special:#8a5a12;--special-soft:#ede9e3;--violet:#7050aa;--violet-soft:#eae8f5;}
[data-theme-choice="arctic"]{--gallery-canvas:#eaf2f7;--gallery-panel:#fbfdff;--gallery-accent:#286a99;}
html:root[data-theme="amazon_forest"]{--bg:#111f18;--bg-soft:#16281e;--panel:#1b3025;--panel-2:#1f3529;--panel-muted:#243a2e;--text:#e8ebef;--muted:#b1b9b8;--faint:#b1b9b8;--border:#485951;--border-strong:#6d7b76;--accent:#95c59f;--accent-2:#a6cdaf;--accent-soft:#2a4234;--accent-ink:#95c59f;--signature:#95c59f;--signature-soft:#2a4234;--topbar-tint:#1b3025;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#353d35;--success:#8ed5b7;--success-soft:#294437;--warning:#e8c17b;--warning-soft:#34412f;--line:#88b8f7;--line-soft:#28403e;--normal:#8ed5b7;--normal-soft:#294437;--special:#e8c17b;--special-soft:#34412f;--violet:#c4b0f1;--violet-soft:#2f3f3d;}
[data-theme-choice="amazon_forest"]{--gallery-canvas:#111f18;--gallery-panel:#1b3025;--gallery-accent:#95c59f;}
html:root[data-theme="high_contrast_oled"]{--bg:#000000;--bg-soft:#080808;--panel:#101010;--panel-2:#181713;--panel-muted:#211d16;--text:#e7e9ee;--muted:#adaeb2;--faint:#adaeb2;--border:#e7e9ee;--border-strong:#e7e9ee;--accent:#ffcc66;--accent-2:#fad281;--accent-soft:#2d271a;--accent-ink:#ffcc66;--signature:#ffcc66;--signature-soft:#2d271a;--topbar-tint:#101010;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#2c2122;--success:#8ed5b7;--success-soft:#1f2824;--warning:#e8c17b;--warning-soft:#2a251d;--line:#88b8f7;--line-soft:#1e242c;--normal:#8ed5b7;--normal-soft:#1f2824;--special:#e8c17b;--special-soft:#2a251d;--violet:#c4b0f1;--violet-soft:#26232b;}
[data-theme-choice="high_contrast_oled"]{--gallery-canvas:#000000;--gallery-panel:#101010;--gallery-accent:#ffcc66;}
html:root[data-theme="high_contrast"]{--bg:#ffffff;--bg-soft:#ffffff;--panel:#ffffff;--panel-2:#f6f9fc;--panel-muted:#edf2fa;--text:#13253f;--muted:#536073;--faint:#536073;--border:#13253f;--border-strong:#13253f;--accent:#004cb3;--accent-2:#04449c;--accent-soft:#e0eaf6;--accent-ink:#004cb3;--signature:#004cb3;--signature-soft:#e0eaf6;--topbar-tint:#ffffff;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f5e6e9;--success:#16724f;--success-soft:#e3eeea;--warning:#8a5a12;--warning-soft:#f1ebe3;--line:#2564b4;--line-soft:#e5ecf6;--normal:#16724f;--normal-soft:#e3eeea;--special:#8a5a12;--special-soft:#f1ebe3;--violet:#7050aa;--violet-soft:#eeeaf5;}
[data-theme-choice="high_contrast"]{--gallery-canvas:#ffffff;--gallery-panel:#ffffff;--gallery-accent:#004cb3;}
html:root[data-theme="pacific_turquoise"]{--bg:#e6f2f3;--bg-soft:#f0f8f9;--panel:#faffff;--panel-2:#f2fafa;--panel-muted:#e9f5f6;--text:#13273b;--muted:#516170;--faint:#516170;--border:#c7cfd4;--border-strong:#9ea9b1;--accent:#096c78;--accent-2:#0b5e6c;--accent-soft:#ddedef;--accent-ink:#096c78;--signature:#096c78;--signature-soft:#ddedef;--topbar-tint:#faffff;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f1e6e9;--success:#16724f;--success-soft:#dfeeea;--warning:#8a5a12;--warning-soft:#edebe3;--line:#2564b4;--line-soft:#e0ecf6;--normal:#16724f;--normal-soft:#dfeeea;--special:#8a5a12;--special-soft:#edebe3;--violet:#7050aa;--violet-soft:#e9eaf5;}
[data-theme-choice="pacific_turquoise"]{--gallery-canvas:#e6f2f3;--gallery-panel:#faffff;--gallery-accent:#096c78;}
html:root[data-theme="nordic_rose"]{--bg:#f3eaf0;--bg-soft:#f9f2f6;--panel:#fffbfd;--panel-2:#fcf5f8;--panel-muted:#f9eef3;--text:#1e243a;--muted:#5b5e6f;--faint:#5b5e6f;--border:#ceccd2;--border-strong:#a5a5af;--accent:#a34270;--accent-2:#883c65;--accent-soft:#f4e5ec;--accent-ink:#a34270;--signature:#a34270;--signature-soft:#f4e5ec;--topbar-tint:#fffbfd;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f5e3e7;--success:#16724f;--success-soft:#e3ebe8;--warning:#8a5a12;--warning-soft:#f1e8e1;--line:#2564b4;--line-soft:#e5e9f4;--normal:#16724f;--normal-soft:#e3ebe8;--special:#8a5a12;--special-soft:#f1e8e1;--violet:#7050aa;--violet-soft:#eee6f3;}
[data-theme-choice="nordic_rose"]{--gallery-canvas:#f3eaf0;--gallery-panel:#fffbfd;--gallery-accent:#a34270;}
html:root[data-theme="solarized_abyss"]{--bg:#09262e;--bg-soft:#0e2e36;--panel:#12363d;--panel-2:#153b41;--panel-muted:#194046;--text:#e7ebf1;--muted:#adbac0;--faint:#adbac0;--border:#415e65;--border-strong:#677e85;--accent:#75c5b7;--accent-2:#8ccdc3;--accent-soft:#1e474c;--accent-ink:#75c5b7;--signature:#75c5b7;--signature-soft:#1e474c;--topbar-tint:#12363d;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#2d424a;--success:#8ed5b7;--success-soft:#21494c;--warning:#e8c17b;--warning-soft:#2c4744;--line:#88b8f7;--line-soft:#204653;--normal:#8ed5b7;--normal-soft:#21494c;--special:#e8c17b;--special-soft:#2c4744;--violet:#c4b0f1;--violet-soft:#274553;}
[data-theme-choice="solarized_abyss"]{--gallery-canvas:#09262e;--gallery-panel:#12363d;--gallery-accent:#75c5b7;}
html:root[data-theme="tokyo_cyber_neon"]{--bg:#171325;--bg-soft:#1e182d;--panel:#241c35;--panel-2:#29213c;--panel-muted:#2e2543;--text:#e8eaf0;--muted:#b3b2be;--faint:#b3b2be;--border:#4f495e;--border-strong:#726e80;--accent:#b2a0f9;--accent-2:#bdaff7;--accent-soft:#352c4d;--accent-ink:#b2a0f9;--signature:#b2a0f9;--signature-soft:#352c4d;--topbar-tint:#241c35;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#3d2b43;--success:#8ed5b7;--success-soft:#313245;--warning:#e8c17b;--warning-soft:#3c303d;--line:#88b8f7;--line-soft:#302f4c;--normal:#8ed5b7;--normal-soft:#313245;--special:#e8c17b;--special-soft:#3c303d;--violet:#c4b0f1;--violet-soft:#372e4c;}
[data-theme-choice="tokyo_cyber_neon"]{--gallery-canvas:#171325;--gallery-panel:#241c35;--gallery-accent:#b2a0f9;}
html:root[data-theme="sahara"]{--bg:#efe1cd;--bg-soft:#f7ecdc;--panel:#fff8ec;--panel-2:#fbf2e5;--panel-muted:#f7edde;--text:#1d2635;--muted:#5a5f66;--faint:#5a5f66;--border:#cdcac4;--border-strong:#a5a4a3;--accent:#8e5926;--accent-2:#774f29;--accent-soft:#f1e5d4;--accent-ink:#8e5926;--signature:#8e5926;--signature-soft:#f1e5d4;--topbar-tint:#fff8ec;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f5e0d8;--success:#16724f;--success-soft:#e3e8d9;--warning:#8a5a12;--warning-soft:#f1e5d2;--line:#2564b4;--line-soft:#e5e6e5;--normal:#16724f;--normal-soft:#e3e8d9;--special:#8a5a12;--special-soft:#f1e5d2;--violet:#7050aa;--violet-soft:#eee4e4;}
[data-theme-choice="sahara"]{--gallery-canvas:#efe1cd;--gallery-panel:#fff8ec;--gallery-accent:#8e5926;}
html:root[data-theme="freight_horizon"]{--bg:#101f32;--bg-soft:#16283d;--panel:#1b3048;--panel-2:#1f354e;--panel-muted:#233a53;--text:#e8ebf1;--muted:#b1b9c3;--faint:#b1b9c3;--border:#48596d;--border-strong:#6d7b8c;--accent:#8dbfe9;--accent-2:#9fc8eb;--accent-soft:#29415b;--accent-ink:#8dbfe9;--signature:#8dbfe9;--signature-soft:#29415b;--topbar-tint:#1b3048;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#353d54;--success:#8ed5b7;--success-soft:#294455;--warning:#e8c17b;--warning-soft:#34414e;--line:#88b8f7;--line-soft:#28405d;--normal:#8ed5b7;--normal-soft:#294455;--special:#e8c17b;--special-soft:#34414e;--violet:#c4b0f1;--violet-soft:#2f3f5c;}
[data-theme-choice="freight_horizon"]{--gallery-canvas:#101f32;--gallery-panel:#1b3048;--gallery-accent:#8dbfe9;}
html:root[data-theme="alabaster_minimal"]{--bg:#edf0f1;--bg-soft:#f6f8f8;--panel:#ffffff;--panel-2:#f8f9f9;--panel-muted:#f1f2f3;--text:#162539;--muted:#55606e;--faint:#55606e;--border:#cccfd3;--border-strong:#a2a8b0;--accent:#334b5a;--accent-2:#2d4353;--accent-soft:#e7e9eb;--accent-ink:#334b5a;--signature:#334b5a;--signature-soft:#e7e9eb;--topbar-tint:#ffffff;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f5e6e9;--success:#16724f;--success-soft:#e3eeea;--warning:#8a5a12;--warning-soft:#f1ebe3;--line:#2564b4;--line-soft:#e5ecf6;--normal:#16724f;--normal-soft:#e3eeea;--special:#8a5a12;--special-soft:#f1ebe3;--violet:#7050aa;--violet-soft:#eeeaf5;}
[data-theme-choice="alabaster_minimal"]{--gallery-canvas:#edf0f1;--gallery-panel:#ffffff;--gallery-accent:#334b5a;}
html:root[data-theme="champagne_luxe"]{--bg:#f0e9db;--bg-soft:#f8f2e8;--panel:#fffcf4;--panel-2:#fbf6ed;--panel-muted:#f6f1e6;--text:#1c2636;--muted:#596069;--faint:#596069;--border:#cdcdca;--border-strong:#a4a6a8;--accent:#805d32;--accent-2:#6c5233;--accent-soft:#f0e9dd;--accent-ink:#805d32;--signature:#805d32;--signature-soft:#f0e9dd;--topbar-tint:#fffcf4;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f5e4df;--success:#16724f;--success-soft:#e3ebe0;--warning:#8a5a12;--warning-soft:#f1e9d9;--line:#2564b4;--line-soft:#e5eaec;--normal:#16724f;--normal-soft:#e3ebe0;--special:#8a5a12;--special-soft:#f1e9d9;--violet:#7050aa;--violet-soft:#eee7eb;}
[data-theme-choice="champagne_luxe"]{--gallery-canvas:#f0e9db;--gallery-panel:#fffcf4;--gallery-accent:#805d32;}
html:root[data-theme="lumen_glass"]{--bg:#e7effa;--bg-soft:#f0f6fc;--panel:#f9fcff;--panel-2:#f2f7fc;--panel-muted:#ebf1f9;--text:#16273e;--muted:#536172;--faint:#536172;--border:#c7cdd5;--border-strong:#9ea7b2;--accent:#3663a8;--accent-2:#305793;--accent-soft:#e2eaf5;--accent-ink:#3663a8;--signature:#3663a8;--signature-soft:#e2eaf5;--topbar-tint:#f9fcff;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f0e4e9;--success:#16724f;--success-soft:#deebea;--warning:#8a5a12;--warning-soft:#ece9e3;--line:#2564b4;--line-soft:#e0eaf6;--normal:#16724f;--normal-soft:#deebea;--special:#8a5a12;--special-soft:#ece9e3;--violet:#7050aa;--violet-soft:#e9e7f5;}
[data-theme-choice="lumen_glass"]{--gallery-canvas:#e7effa;--gallery-panel:#f9fcff;--gallery-accent:#3663a8;}
html:root[data-theme="stealth_titanium"]{--bg:#191e25;--bg-soft:#1f262e;--panel:#252d37;--panel-2:#2a323d;--panel-muted:#2f3842;--text:#e9ebf0;--muted:#b4b8be;--faint:#b4b8be;--border:#505760;--border-strong:#737981;--accent:#aec3d7;--accent-2:#bacbdc;--accent-soft:#353f4a;--accent-ink:#aec3d7;--signature:#aec3d7;--signature-soft:#353f4a;--topbar-tint:#252d37;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#3e3a45;--success:#8ed5b7;--success-soft:#324146;--warning:#e8c17b;--warning-soft:#3c3f3f;--line:#88b8f7;--line-soft:#313e4e;--normal:#8ed5b7;--normal-soft:#324146;--special:#e8c17b;--special-soft:#3c3f3f;--violet:#c4b0f1;--violet-soft:#383d4d;}
[data-theme-choice="stealth_titanium"]{--gallery-canvas:#191e25;--gallery-panel:#252d37;--gallery-accent:#aec3d7;}
html:root[data-theme="bordeaux_luxe"]{--bg:#261923;--bg-soft:#2f202a;--panel:#382632;--panel-2:#3e2b37;--panel-muted:#442f3c;--text:#eaeaf0;--muted:#bab5bd;--faint:#bab5bd;--border:#5f515c;--border-strong:#7f747e;--accent:#e4adc6;--accent-2:#e5b9ce;--accent-soft:#4d3644;--accent-ink:#e4adc6;--signature:#e4adc6;--signature-soft:#4d3644;--topbar-tint:#382632;--freight-primary-ink:#101c29;--danger:#f69da9;--danger-soft:#4f3440;--success:#8ed5b7;--success-soft:#423b42;--warning:#e8c17b;--warning-soft:#4d393b;--line:#88b8f7;--line-soft:#42384a;--normal:#8ed5b7;--normal-soft:#423b42;--special:#e8c17b;--special-soft:#4d393b;--violet:#c4b0f1;--violet-soft:#493749;}
[data-theme-choice="bordeaux_luxe"]{--gallery-canvas:#261923;--gallery-panel:#382632;--gallery-accent:#e4adc6;}
html:root[data-theme="stripe_emerald"]{--bg:#e5f2eb;--bg-soft:#f0f8f4;--panel:#fafffc;--panel-2:#f2faf7;--panel-muted:#eaf5f1;--text:#142839;--muted:#52626e;--faint:#52626e;--border:#c7d0d1;--border-strong:#9ea9ae;--accent:#137562;--accent-2:#13665a;--accent-soft:#deeeea;--accent-ink:#137562;--signature:#137562;--signature-soft:#deeeea;--topbar-tint:#fafffc;--freight-primary-ink:#ffffff;--danger:#ad3047;--danger-soft:#f1e6e6;--success:#16724f;--success-soft:#dfeee7;--warning:#8a5a12;--warning-soft:#edebe0;--line:#2564b4;--line-soft:#e0ecf3;--normal:#16724f;--normal-soft:#dfeee7;--special:#8a5a12;--special-soft:#edebe0;--violet:#7050aa;--violet-soft:#e9eaf2;}
[data-theme-choice="stripe_emerald"]{--gallery-canvas:#e5f2eb;--gallery-panel:#fafffc;--gallery-accent:#137562;}

/* Keep application surfaces calm and controls coherent across light and dark palettes. */
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView .topbar{background:var(--panel)!important;border-bottom:1px solid var(--border)!important;box-shadow:0 2px 8px color-mix(in srgb,var(--text) 3%,transparent)!important}
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView #topNav .nav-tab{color:var(--muted)!important;background:transparent!important;border:1px solid transparent!important}
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView #topNav .nav-tab.active{background:var(--accent-soft)!important;border-color:color-mix(in srgb,var(--accent) 24%,var(--border))!important;color:var(--text)!important}
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView #page-calculator>.page-heading{background:linear-gradient(115deg,var(--accent-soft),var(--panel) 72%)!important;border-color:var(--border)!important;border-left-color:var(--accent)!important;box-shadow:0 4px 12px color-mix(in srgb,var(--text) 3%,transparent)!important}
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView :is(.top-actions,.command-actions,.dispatch-actions) .button{background:var(--panel)!important;color:var(--text)!important;border-color:var(--border)!important;box-shadow:0 1px 2px color-mix(in srgb,var(--text) 4%,transparent)!important}
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView #page-calculator .summary-metric{border-bottom-color:var(--border)!important;box-shadow:0 3px 9px color-mix(in srgb,var(--text) 5%,transparent)!important}
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView #page-calculator :is(.calculator-command-bar,.dispatch-planner,.table-panel){border-color:var(--border)!important;background:var(--panel)!important}
html:root[data-theme="lumen_glass"] body.freight-ui-r2 #mainView .main-content{background:radial-gradient(ellipse at 15% 5%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 65%),var(--bg)!important}
html:root[data-theme="stripe_emerald"] body.freight-ui-r2 #mainView #page-calculator :is(.panel,.summary-metric){border-color:var(--border)!important}
[data-theme-choice] .theme-preview i:nth-child(1),[data-theme-choice] .v480-swatch-art i:nth-child(1){background:var(--gallery-canvas)!important}
[data-theme-choice] .theme-preview i:nth-child(2),[data-theme-choice] .v480-swatch-art i:nth-child(2){background:var(--gallery-panel)!important}
[data-theme-choice] .theme-preview i:nth-child(3),[data-theme-choice] .v480-swatch-art i:nth-child(3),#recentThemeStrip [data-theme-choice]>i{background:var(--gallery-accent)!important}
html:root[data-theme="high_contrast"] #freightResultReveal,html:root[data-theme="high_contrast_oled"] #freightResultReveal{border:2px solid var(--text);box-shadow:none}
/* Keep the hosted workspace scroll area inside the full browser viewport. */
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView.app-shell {
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  max-height: 100dvh !important;
}
html:root body.freight-ui-r1.freight-ui-r2.freight-ui-r3 #mainView > .main-content {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
}
