/* JUZO 剧造 · 已确认的「片场手稿」主题。组件尺寸和交互沿用现有实现。 */
:root,
[data-works-theme="light"],
[data-theme="light"] {
  --juzo-bg: #f4f1ea;
  --juzo-bg-rgb: 244, 241, 234;
  --juzo-panel: #fffdfa;
  --juzo-rail: #eae7df;
  --juzo-text: #242522;
  --juzo-muted: #6c6e67;
  --juzo-line: #dcddd5;
  --juzo-action: #bc3d2e;
  --juzo-hover: #a93225;
  --juzo-pressed: #8e291f;
  --juzo-onAction: #ffffff;
  --juzo-soft: #eae7df;
  --juzo-selected: #f5e6df;
  --juzo-success: #347362;
  --juzo-warning: #8a641d;
  --juzo-danger: #b42332;
  --juzo-info: #3a6387;
  --juzo-grid: #d7d8d0;
  --juzo-edge: #777d74;
  --juzo-wordmark: url("/brand/juzoWordmark.svg");
  --juzo-wordmark-image: url("/brand/juzoWordmark.png");
}

.dark,
[data-works-theme="dark"],
[data-theme="dark"],
.juzoDirector {
  --juzo-bg: #191d1b;
  --juzo-bg-rgb: 25, 29, 27;
  --juzo-panel: #232825;
  --juzo-rail: #171b19;
  --juzo-text: #ecefe8;
  --juzo-muted: #a4ada4;
  --juzo-line: #39423b;
  --juzo-action: #ed8b73;
  --juzo-hover: #f2a089;
  --juzo-pressed: #df785f;
  --juzo-onAction: #211b17;
  --juzo-soft: #2d352f;
  --juzo-selected: #3b2925;
  --juzo-success: #8bc2ac;
  --juzo-warning: #deb86a;
  --juzo-danger: #fa92a2;
  --juzo-info: #9ab9d5;
  --juzo-grid: #343d36;
  --juzo-edge: #8d998e;
  --juzo-wordmark: url("/brand/juzoWordmarkLight.svg");
  --juzo-wordmark-image: url("/brand/juzoWordmarkLight.png");
}

img:is([src="/logo-full.png"], [src="/site/kaki-logo.png"]) {
  content: var(--juzo-wordmark-image);
  object-fit: contain;
}

.unit-screen > .unit-sidebar.sidebar-polished .sidebar-brand-wordmark > img {
  content: var(--juzo-wordmark);
  width: 72px;
  height: 30.24px;
  object-fit: contain;
  position: static;
}

.portal-brand-mark > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.portal-brand-mark:has(> img) {
  background: transparent;
}

.bg-primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: var(--juzo-hover);
}

.bg-primary:active:not(:disabled):not([aria-disabled="true"]) {
  background-color: var(--juzo-pressed);
}

.bg-primary.text-white {
  color: var(--juzo-onAction);
}

[data-sidebar="menu-button"][data-active="true"] {
  background-color: var(--juzo-selected);
  color: var(--juzo-action);
  box-shadow: inset 2px 0 var(--juzo-action);
}

:is(button, a, input, select, textarea):focus-visible {
  outline-color: var(--juzo-action);
}

.react-flow {
  --xy-background-color-default: var(--juzo-bg);
  --xy-background-pattern-dots-color-default: var(--juzo-grid);
  --xy-node-background-color-default: var(--juzo-panel);
  --xy-node-color-default: var(--juzo-text);
  --xy-node-border-default: 1px solid var(--juzo-line);
  --xy-node-boxshadow-selected-default: 0 0 0 1px var(--juzo-action);
  --xy-edge-stroke-default: var(--juzo-edge);
  --xy-edge-stroke-selected-default: var(--juzo-action);
  --xy-handle-background-color-default: var(--juzo-action);
  --xy-handle-border-color-default: var(--juzo-panel);
  --xy-minimap-background-color-default: var(--juzo-panel);
  --xy-minimap-node-background-color-default: var(--juzo-line);
  --xy-controls-button-background-color-default: var(--juzo-panel);
  --xy-controls-button-background-color-hover-default: var(--juzo-soft);
  --xy-controls-button-color-default: var(--juzo-text);
  --xy-controls-button-border-color-default: var(--juzo-line);
}

.site-root {
  --site-sans: var(--font-ui);
  --site-zh: var(--font-ui);
  --site-mono: var(--font-code);
  --accent: var(--juzo-action);
  --site-accent: var(--juzo-action);
  --site-bg: var(--juzo-bg);
  --site-bg-2: var(--juzo-panel);
  --site-panel: var(--juzo-panel);
  --site-panel-2: var(--juzo-rail);
  --site-ink: var(--juzo-text);
  --site-fg: var(--juzo-text);
  --site-muted: var(--juzo-muted);
  --site-muted-2: var(--juzo-muted);
}

.juzoBrandName {
  display: flex;
  align-items: center;
  gap: 4px;
}

.juzoBrandName .juzoWordmark {
  content: var(--juzo-wordmark);
  width: 72px;
  height: 17.28px;
  object-fit: contain;
  flex-shrink: 0;
}
