.flow-node.flow-node-frame,
.flow-node.flow-node-frame:hover,
.flow-node.flow-node-frame.selected,
.flow-node.flow-node-frame.selected:hover {
  z-index: 0;
  min-width: 200px;
  min-height: 120px;
  border: 6px solid var(--flow-frame-color, #5b9dff);
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
  pointer-events: none;
  color: var(--flow-frame-color, #5b9dff);
}
.flow-node.flow-node-frame.selected {
  outline: 2px solid rgba(var(--flow-frame-rgb), .35);
  outline-offset: 4px;
}
.flow-node.flow-node-frame::after { display: none; }
.flow-node.flow-node-loop,
html.lg-shell .flow-node.flow-node-loop {
  background: transparent !important;
}
html.lg-shell .flow-node.flow-node-frame {
  background: transparent !important;
  border-color: var(--flow-frame-color, #5b9dff) !important;
  color: var(--flow-frame-color, #5b9dff) !important;
  box-shadow: none !important;
}
.flow-frame-header {
  position: absolute;
  left: -6px;
  top: -34px;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  height: 30px;
  pointer-events: auto;
  cursor: move;
}
html.lg-shell .flow-node-frame .flow-frame-header {
  background: transparent !important;
  color: inherit;
}
.flow-frame-grip { font-size: 20px; line-height: 1; opacity: .75; }
.flow-frame-name {
  width: 190px;
  max-width: calc(100% - 28px);
  min-width: 60px;
  padding: 4px 7px;
  color: inherit;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: none;
  background: transparent;
  font: 600 13px/20px "Microsoft YaHei UI", sans-serif;
  text-overflow: ellipsis;
  cursor: text;
}
.flow-frame-name:hover, .flow-frame-name:focus {
  border-color: rgba(var(--flow-frame-rgb), .45);
  background: rgba(var(--flow-frame-rgb), .08);
}
html.lg-shell #flow-node-layer .flow-frame-name {
  color: inherit !important;
  background: transparent !important;
  border-color: transparent !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
html.lg-shell #flow-node-layer .flow-frame-name:hover,
html.lg-shell #flow-node-layer .flow-frame-name:focus {
  border-color: rgba(var(--flow-frame-rgb), .45) !important;
  background: rgba(var(--flow-frame-rgb), .08) !important;
}
.flow-frame-edge { position: absolute; z-index: 1; pointer-events: auto; cursor: move; }
.flow-frame-edge-top, .flow-frame-edge-bottom { left: -4px; right: -4px; height: 10px; }
.flow-frame-edge-top { top: -5px; }
.flow-frame-edge-bottom { bottom: -5px; }
.flow-frame-edge-left, .flow-frame-edge-right { top: 5px; bottom: 5px; width: 10px; }
.flow-frame-edge-left { left: -5px; }
.flow-frame-edge-right { right: -5px; }
.flow-frame-resize {
  position: absolute;
  z-index: 3;
  right: -9px;
  bottom: -9px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  cursor: nwse-resize;
  pointer-events: auto;
}
.flow-frame-resize::after {
  position: absolute;
  content: "";
  right: 5px;
  bottom: 5px;
  width: 8px;
  height: 8px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  border-radius: 0 0 3px;
}
.flow-frame-resize:hover { background: rgba(var(--flow-frame-rgb), .15); }
.flow-frame-wave {
  display: none;
  position: absolute;
  inset: -6px;
  border: var(--flow-frame-wave-width, 2px) solid currentColor;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
}
.has-frame-ripple > .flow-frame-wave {
  display: block;
  animation: flow-frame-water 2.8s ease-out infinite;
}
.has-frame-ripple > .flow-frame-wave-second { animation-delay: -1.4s; }
@keyframes flow-frame-water {
  0% { inset: -6px; opacity: var(--flow-frame-wave-opacity); }
  100% { inset: calc(-1 * var(--flow-frame-wave-spread)); opacity: 0; }
}
.flow-viewport.is-flow-low-power .flow-frame-wave,
.flow-viewport.is-flow-paused .flow-frame-wave { animation-play-state: paused; opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .has-frame-ripple > .flow-frame-wave { animation: none; display: none; }
}
.flow-frame-style-panel {
  position: absolute;
  z-index: 65;
  width: 248px;
  max-width: calc(100% - 24px);
  padding: 16px;
  border: 1px solid var(--line, rgba(150, 175, 200, .24));
  border-radius: 16px;
  color: var(--lg-text, #e8eceb);
  background: var(--lg-fill, #202d3b);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .25);
  backdrop-filter: blur(20px);
  box-sizing: border-box;
  font-size: 12px;
}
.flow-frame-style-panel > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.flow-frame-style-panel > header strong { font-size: 13px; }
.flow-frame-style-panel > header button { width: 24px; height: 24px; border: 0; border-radius: 7px; background: transparent; color: inherit; cursor: pointer; font-size: 19px; }
.flow-frame-style-panel > header button:hover { background: rgba(128, 151, 174, .16); }
.flow-frame-color-row, .flow-frame-ripple-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flow-frame-style-panel label { margin: 0; font-size: 12px; font-weight: 500; }
.flow-frame-color-row input { width: 38px; height: 28px; padding: 2px; border: 1px solid rgba(140, 160, 180, .3); border-radius: 7px; background: transparent; cursor: pointer; }
.flow-frame-swatches { display: flex; gap: 8px; margin: 13px 0 18px; }
.flow-frame-swatches button { width: 24px; height: 24px; padding: 0; border: 3px solid transparent; border-radius: 50%; background: var(--swatch); background-clip: padding-box; cursor: pointer; }
.flow-frame-swatches button[aria-pressed="true"] { outline: 2px solid var(--swatch); outline-offset: 1px; }
.flow-frame-ripple-row { position: relative; cursor: pointer; }
.flow-frame-ripple-row > input { position: absolute; opacity: 0; right: 0; width: 34px; height: 22px; margin: 0; }
.flow-frame-switch { width: 34px; height: 20px; border-radius: 20px; background: rgba(128, 151, 174, .4); transition: background .2s; }
.flow-frame-switch::after { display: block; content: ""; width: 14px; height: 14px; margin: 3px; border-radius: 50%; background: white; transition: transform .2s; }
.flow-frame-ripple-row > input:checked + .flow-frame-switch { background: #408dff; }
.flow-frame-ripple-row > input:checked + .flow-frame-switch::after { transform: translateX(14px); }
.flow-frame-ripple-row > input:focus-visible + .flow-frame-switch { outline: 2px solid #83b5ff; outline-offset: 3px; }
.flow-frame-style-panel .flow-frame-intensity { display: grid; gap: 10px; margin-top: 18px; }
.flow-frame-intensity > span { display: flex; justify-content: space-between; }
.flow-frame-intensity output { opacity: .65; font-variant-numeric: tabular-nums; }
.flow-frame-intensity input { width: 100%; margin: 0; accent-color: #5b9dff; cursor: pointer; }
.flow-frame-intensity input:disabled { opacity: .35; cursor: default; }
.flow-frame-style-panel > p { margin: 14px 0 0; opacity: .5; font-size: 10px; }
