/* Scoped schematic palette; instructional payloads and photograph coordinates stay untouched. */
[data-hotspot].hs {
  --hs-ink:var(--bw26-ink,#191923);
  --hs-surface:var(--bw26-paper,#f5f4f0);
  --hs-red:#9f2020; --hs-blue:#1557a0; --hs-green:#17633b; --hs-purple:#67428e; --hs-gold:#a44c00;
  background:var(--hs-surface); color:var(--hs-ink);
}
@media (prefers-color-scheme:dark) {
  [data-hotspot].hs {
    --hs-ink:var(--bw26-game-ink,#eef1f8); --hs-surface:var(--bw26-night,#10111b);
    --hs-red:#f87171; --hs-blue:#7cc4ff; --hs-green:#54d6a0; --hs-purple:#c084fc; --hs-gold:#fbbf24;
  }
}
[data-hotspot].hs svg { overflow:visible; background:var(--hs-surface); --hs-stroke:var(--hs-ink); }
/* Dimmed branches still meet contrast; selected branches also gain line weight.
   The conditional Horner flag remains hidden until the authored tracer enables it. */
[data-hotspot].hs svg :is(path,circle,rect,ellipse,line,polygon,polyline):not(.hs-dot):not(.hs-hit):not(.plx-horner):not(.plx-def) { opacity:1!important; stroke-opacity:1!important; }
[data-hotspot].hs .plx-def { opacity:.75!important; stroke-opacity:1!important; }
[data-hotspot].hs .plx-def.lit { opacity:1!important; stroke-width:6px; }
[data-hotspot].hs .plx-horner { visibility:hidden; }
[data-hotspot].hs.horner .plx-horner { visibility:visible; opacity:1!important; }
[data-hotspot].hs svg :is(path,circle,rect,ellipse,line,polygon,polyline)[stroke]:not(.hs-dot):not(.hs-hit),
[data-hotspot].hs .hs-outline { stroke:var(--hs-stroke)!important; }
/* Open, stroke-only paths must not acquire SVG's implicit black interior. */
[data-hotspot].hs svg path[stroke]:not([fill]) { fill:none!important; }
/* A subtle themed interior plus a contrasting outline replaces fixed dark fills.
   Image elements and interactive dot circles are not recolored here. */
[data-hotspot].hs svg :is(path,circle,rect,ellipse,polygon)[fill]:not([fill="none"]):not(.hs-dot):not(.hs-hit) {
  fill:color-mix(in srgb,var(--hs-ink) 8%,var(--hs-surface))!important;
  fill-opacity:1!important; stroke:var(--hs-stroke)!important;
}
[data-hotspot].hs svg > rect:not([x]):not([y]) { fill:var(--hs-surface)!important; stroke:none!important; }
/* Retain the authored color distinctions (notably crystal orientation and plexus branches). */
[data-hotspot].hs svg [stroke="#fbbf24"] { --hs-stroke:var(--hs-gold); }
[data-hotspot].hs svg :is([stroke="#7cc4ff"],[stroke="#60a5fa"]) { --hs-stroke:var(--hs-blue); }
[data-hotspot].hs svg [stroke="#f87171"] { --hs-stroke:var(--hs-red); }
[data-hotspot].hs svg [stroke="#34d399"] { --hs-stroke:var(--hs-green); }
[data-hotspot].hs svg [stroke="#c084fc"] { --hs-stroke:var(--hs-purple); }
[data-hotspot].hs svg text:not(.hs-badge) { fill:var(--hs-ink)!important; stroke:var(--hs-surface)!important; stroke-width:2px; paint-order:stroke fill; }
[data-hotspot].hs .hs-dot { fill:var(--hs-ink)!important; stroke:var(--hs-surface)!important; stroke-width:2; vector-effect:non-scaling-stroke; cursor:pointer; }
[data-hotspot].hs .hs-dot[aria-pressed="true"] { stroke-width:3; transform:scale(1.3); transform-origin:center; transform-box:fill-box; }
[data-hotspot].hs .hs-dot:focus-visible { outline:3px solid var(--hs-ink); outline-offset:4px; }
[data-hotspot].hs .hs-badge { fill:var(--hs-surface)!important; stroke:none!important; font-family:var(--sans,system-ui,sans-serif); font-weight:700; text-anchor:middle; dominant-baseline:middle; pointer-events:none; }
[data-hotspot].hs .hs-hit { fill:transparent; stroke:none; pointer-events:all; cursor:pointer; }
[data-hotspot].hs .hs-callout { fill:var(--hs-ink)!important; stroke:var(--hs-surface); stroke-width:3px; paint-order:stroke fill; font:600 9px var(--sans,system-ui,sans-serif); pointer-events:none; }
[data-hotspot].hs .hs-caption { color:var(--hs-ink); font:500 11px/1.5 var(--sans,system-ui,sans-serif); margin:8px 0 0; }
[data-hotspot].hs .hs-labels { display:flex; flex-wrap:wrap; gap:6px; margin:12px 0; }
[data-hotspot].hs .hs-label { font:600 11px/1.35 var(--sans,system-ui,sans-serif); color:var(--hs-ink); background:var(--hs-surface); border:1px solid var(--hs-ink); border-radius:6px; padding:6px 9px; min-height:44px; cursor:pointer; }
[data-hotspot].hs .hs-label[aria-pressed="true"] { border-width:2px; background:var(--hs-ink); color:var(--hs-surface); }
[data-hotspot].hs .hs-label:focus-visible { outline:3px solid var(--hs-ink); outline-offset:2px; }
[data-hotspot].hs .hs-out { color:var(--hs-ink); scroll-margin-bottom:calc(96px + env(safe-area-inset-bottom)); }
[data-hotspot].hs .hs-out b { color:var(--hs-ink); }
