/* Obsolete navigation entry cleanup */
nav a[href="/dashboard"],
nav a[href="/dashboard/"],
nav a[href="/promotions"],
nav a[href="/promotions/"],
nav div.relative.flex.flex-col.items-center:has(svg[aria-label="青空计划"]) {
  display: none !important;
  pointer-events: none !important;
}

#mirror-dashboard-host {
  display: none !important;
}

/* Avoid flashes while blocked routes are being redirected */
html[data-mirror-blocked-route="1"] #root > div.min-h-screen {
  visibility: hidden !important;
}

/* Sharpen local mirror nodes */
.react-flow__node,
.react-flow__node > div {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

.react-flow__node [class*="backdrop-blur"],
.react-flow__node .backdrop-blur-xl,
.react-flow__node .backdrop-blur-2xl,
.react-flow__node .backdrop-blur-md,
.react-flow__node .backdrop-blur-sm {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background-color: var(--c-node-bg, #1a1a1e) !important;
}

.absolute.bottom-10[class*="backdrop-blur"],
[class*="bg-[var(--c-bg-panel)]"][class*="backdrop-blur"] {
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
}

.react-flow__node canvas {
  image-rendering: auto;
}

/* Material panel scrolling and slider interaction */
[class*="z-[10030]"],
[data-testid="material-marking-dropdown"],
[data-testid="material-control-grid"] ~ * [class*="overflow-y-auto"] {
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

[class*="z-[10030]"]::-webkit-scrollbar,
[data-testid="material-marking-dropdown"]::-webkit-scrollbar {
  width: 8px;
}

[class*="z-[10030]"]::-webkit-scrollbar-thumb,
[data-testid="material-marking-dropdown"]::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 4px;
}

[data-testid^="material-"],
.absolute.bottom-10.left-1\/2,
[class*="z-[10030]"],
[class*="z-[10030]"] * {
  pointer-events: auto !important;
}

input.glow-slider[type="range"],
.elastic-slider-root input[type="range"],
[data-testid="material-control-grid"] input[type="range"],
.absolute.bottom-10 input[type="range"] {
  pointer-events: auto !important;
  touch-action: none;
  cursor: pointer;
  position: relative;
  z-index: 20;
}

input.glow-slider[type="range"]::-webkit-slider-thumb {
  pointer-events: auto;
}

/* 左下角「快捷键」浮层：原 bundle 使用 group-hover + pointer-events-none + mb-3 间隙，鼠标移向菜单会立刻消失 */
.relative.group:has(> .absolute.bottom-full.left-0) {
  position: relative;
}

.relative.group:has(> .absolute.bottom-full.left-0)::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 0.875rem;
  pointer-events: auto;
}

.relative.group > .absolute.bottom-full.left-0.mb-3 {
  pointer-events: auto !important;
  margin-bottom: 0 !important;
  padding-bottom: 0.75rem;
}
