/* Dark values live beside each component as fallbacks. This palette is shared
   by pages, SVG charts and both imported HUD engines. */
:root{color-scheme:dark}
:root[data-theme=light]{
  color-scheme:light;
  --ub-surface:#ffffff;--ub-raised:#edf2ef;--ub-border:#b9c9c0;
  --ub-text:#20332b;--ub-muted:#50675b;
  --ub-green:#086c47;--ub-teal:#086c70;--ub-blue:#245caa;
  --ub-red:#a82d43;--ub-orange:#925012;--ub-amber:#75600b;
  --ub-purple:#6d3da4;--ub-pink:#923b7e;
  --ub-tint-green:#cfebdd;--ub-tint-teal:#cce9e9;--ub-tint-blue:#d4e3f8;
  --ub-tint-red:#f4d5db;--ub-tint-orange:#f6dfc4;--ub-tint-amber:#eee7bd;
  --ub-tint-purple:#e5d9f5;--ub-tint-pink:#efd7e9;
  --ub-action-fold:#b6d6ed;--ub-action-call:#b2dfc4;--ub-action-allin:#d99db8;
  --ub-action-raise1:#f2a6ae;--ub-action-raise2:#e38da7;
  --ub-action-raise3:#d89ac0;--ub-action-raise4:#c3a3df;
  --ub-position-utg:#f2a6ae;--ub-position-hj:#ecd08e;--ub-position-co:#cbb4ef;
  --ub-position-btn:#a7dcd8;--ub-position-sb:#afd2ee;--ub-position-bb:#e9b1d4;
}
html[data-theme=light] body{background:#f4f7f6}
[data-theme=light] [data-ub-ink]{--ub-current-ink:var(--ub-day-ink)}
[data-theme=light] [data-ub-paper]{--ub-current-paper:var(--ub-day-paper)}
/* Transparent charcoal/teal artwork for every light-mode brand surface. */
[data-theme=light] .ub-logo{mix-blend-mode:normal;background:transparent;border-radius:0}
/* CSS also selects the artwork before DOMContentLoaded, avoiding a dark flash. */
[data-theme=light] img[src^="/brand/logo"]{content:url('/brand/logo-light.png?v=20261018-logo2')}
[data-theme=light] .ub-logo>img{width:117.5%;left:-9.5%;transform:translateY(-47.9%)}
[data-theme=light] img[src^="/brand/avatar"]{content:url('/brand/avatar-light.png?v=20261018-logo2')}
[data-theme=light] .ub-wordmark{color:var(--ub-text)}
[data-theme=light] .ub-wordmark>.ub-prefix{color:var(--ub-teal)}
/* Some components use one accent for both ink and a filled primary action. */
[data-theme=light] :is(.primary,.h2n-primary){background:var(--ub-tint-green);color:var(--ub-text)}
[data-theme=light] .reference-actions button>strong{color:var(--ub-text)}
[data-theme=light] .reference-composite-key button{color:var(--ub-text)}
[data-theme=light] :is(.range-cell,.reference-mini-matrix button,.reference-hand-label){text-shadow:none}
[data-theme=light] .range-cell small{color:inherit;opacity:1}
[data-theme=light] .h2n-range-cell small{color:var(--ub-muted)}
/* Only a few pixels beside the brand; it never floats over a chart or HUD. */
.ub-identity,.workspace-nav>.ub-identity{display:inline-flex;align-items:center;gap:6px;margin:0;padding:0;flex:0 0 auto;max-width:100%;width:auto;order:0}
button.ub-theme-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;min-width:30px;max-width:30px;height:30px;min-height:30px;padding:5px;margin:0;border:1px solid var(--ub-border,#394b42);border-radius:5px;background:var(--ub-surface,#14231c);color:var(--ub-text,#d5e7db);font:inherit;line-height:1;cursor:pointer;vertical-align:middle}
button.ub-theme-toggle:hover{border-color:var(--ub-teal,#80e2c1)}
button.ub-theme-toggle:focus-visible{outline:2px solid var(--ub-teal,#80e2c1);outline-offset:2px}
.ub-theme-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.hud-grid-window .ub-identity{flex-shrink:0}
@media(max-width:650px){.ub-identity{gap:5px}button.ub-theme-toggle{flex-basis:28px;min-width:28px;width:28px;height:28px;min-height:28px}}

[data-theme=light]{--ub-player-color-1:#086c47;--ub-player-color-2:#245caa;--ub-player-color-3:#826018;--ub-player-color-4:#a73477;--ub-player-color-5:#6144b0;--ub-player-color-6:#096c7a;--ub-player-color-7:#9c482d;--ub-player-color-8:#526f10;--ub-player-color-9:#8a3e9c;--ub-player-color-10:#8b542d;--ub-player-color-11:#376b69;--ub-player-color-12:#a03946;}

[data-theme=light] .range-cell.selected,[data-theme=light] .reference-mini-matrix button:hover{outline-color:var(--ub-teal);border-color:var(--ub-teal)}
.charts-only .ub-logo{width:110px}
.charts-only button.ub-theme-toggle{flex-basis:24px;min-width:24px;width:24px;max-width:24px;height:24px;min-height:24px;padding:3px}
[data-theme=light] .reference-library .range-cell.selected{color:var(--ub-text)}
