@font-face { font-family: "Noto Sans SC"; src: url("../fonts/NotoSansSC-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("../fonts/NotoSansSC-Medium.otf") format("opentype"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Noto Sans SC"; src: url("../fonts/NotoSansSC-Bold.otf") format("opentype"); font-weight: 700 900; font-display: swap; }
:root {
  color-scheme: dark;
  --canvas: #111214;
  --surface-0: #17181a;
  --surface-1: #222325;
  --surface-2: #2c2d30;
  --surface-3: #34363a;
  --stroke: #3a3c40;
  --stroke-soft: #2b2d30;
  --stroke-strong: #55585f;
  --text: #f1f2f4;
  --text-secondary: #a2a5ac;
  --text-muted: #6f737b;
  --accent: #688bff;
  --accent-soft: rgba(104, 139, 255, 0.2);
  --accent-bright: #688bff;
  --selection-ring: #688bff;
  --selection-halo: rgba(104, 139, 255, 0.34);
  --edge-default: #626a79;
  --edge-selected: #688bff;
  --danger: #f05b68;
  --success: #52c78f;
  --sidebar: #1b1c1f;
  --field: #151618;
  --card: #1b1c1e;
  --toolbar: rgba(31, 32, 35, 0.94);
  --canvas-control-surface: rgba(37, 38, 41, 0.96);
  --canvas-control-border: #393b40;
  --canvas-control-radius: 11px;
  --canvas-control-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  --board-dot: rgba(149, 154, 166, 0.2);
  --hover-soft: rgba(255, 255, 255, 0.055);
  --scrim: rgba(5, 6, 7, 0.62);
  --overlay-scrim: rgba(7, 8, 10, 0.72);
  --overlay-panel: #222326;
  --overlay-border: #414348;
  --overlay-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  --panel-elevation: 0 18px 52px rgba(0, 0, 0, 0.42);
  --node-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  --node-selected-shadow: 0 0 0 1px rgba(104, 139, 255, 0.34), 0 12px 32px rgba(0, 0, 0, 0.25);
  --disabled-opacity: 0.42;
  --interaction-hover: rgba(255, 255, 255, 0.065);
  --interaction-pressed: rgba(104, 139, 255, 0.18);
  --motion-fast: 140ms;
  --motion-normal: 200ms;
  --motion-ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.42);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --control-hit-size: 36px;
  --control-height-sm: 28px;
  --control-height-md: 34px;
  --control-height-lg: 40px;
  --app-scrollbar-width: 9px;
  --app-scrollbar-thumb: #3d3f46;
  --app-scrollbar-thumb-hover: #52555d;
  --app-scrollbar-thumb-active: #63666e;
  --overlay-control-height: 34px;
  --overlay-padding: 8px;
  --overlay-radius: 12px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --font: "Noto Sans SC", sans-serif;
  --font-caption: 12px;
  --font-body: 13px;
  --font-action: 14px;
  --font-heading: 20px;
  --font-medium: 600;
  --line-body: 1.5;
}

:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f7f7f6;
  --surface-0: #ffffff;
  --surface-1: #f0f2f6;
  --surface-2: #e7eaf0;
  --surface-3: #dce0e8;
  --stroke: #d5d9e2;
  --stroke-soft: #e3e6ec;
  --stroke-strong: #b9c0cc;
  --text: #20232a;
  --text-secondary: #626978;
  --text-muted: #8a919f;
  --accent: #688bff;
  --accent-soft: rgba(104, 139, 255, 0.1);
  --accent-bright: #688bff;
  --selection-ring: #688bff;
  --selection-halo: rgba(104, 139, 255, 0.24);
  --edge-default: #7c8799;
  --edge-selected: #688bff;
  --danger: #d94656;
  --success: #2d9b69;
  --sidebar: #fbfcfe;
  --field: #f3f5f8;
  --card: #ffffff;
  --toolbar: rgba(255, 255, 255, 0.94);
  --canvas-control-surface: rgba(255, 255, 255, 0.96);
  --canvas-control-border: #d5d9e2;
  --canvas-control-radius: 11px;
  --canvas-control-shadow: 0 12px 30px rgba(43, 49, 63, 0.18);
  --board-dot: transparent;
  --hover-soft: rgba(31, 38, 53, 0.055);
  --scrim: rgba(31, 35, 43, 0.34);
  --overlay-scrim: rgba(225, 228, 235, 0.76);
  --overlay-panel: #ffffff;
  --overlay-border: #d5d9e2;
  --overlay-shadow: 0 28px 80px rgba(43, 49, 63, 0.2);
  --panel-elevation: 0 18px 46px rgba(43, 49, 63, 0.16);
  --node-shadow: 0 9px 25px rgba(40, 47, 60, 0.12);
  --node-selected-shadow: 0 0 0 1px rgba(104, 139, 255, 0.2), 0 12px 30px rgba(40, 47, 60, 0.16);
  --interaction-hover: rgba(31, 38, 53, 0.065);
  --interaction-pressed: rgba(104, 139, 255, 0.13);
  --shadow-lg: 0 18px 46px rgba(43, 49, 63, 0.16);
}

* {
  box-sizing: border-box;
}

/* WebView2 follows Chromium's overlay-scrollbar path when the standard
   scrollbar-width/scrollbar-color properties are set.  That path may
   auto-hide the thumb and bypass the locked ::-webkit geometry below. */

*::-webkit-scrollbar {
  width: var(--app-scrollbar-width);
  height: var(--app-scrollbar-width);
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--app-scrollbar-thumb);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--app-scrollbar-thumb-hover);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:active {
  background: var(--app-scrollbar-thumb-active);
  background-clip: padding-box;
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--font-body);
  line-height: var(--line-body);
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button {
  font-weight: var(--font-medium);
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}
