.nodeWrap {
  width: 220px;
}

.handle {
  background: var(--stroke-handle);
  width: 8px;
  height: 8px;
}

.handleSide {
  background: var(--side-story-handle);
  width: 8px;
  height: 8px;
}

.card {
  box-sizing: border-box;
  width: 100%;
  border-radius: var(--scene-tile-radius);
  overflow: hidden;
  color: rgba(255, 255, 255, 0.92);
  padding: 8px;
  background: #18181b;
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.cardActive {
  border-color: rgba(167, 139, 250, 0.95);
  box-shadow:
    0 0 0 2px rgba(167, 139, 250, 0.35),
    0 25px 50px -12px rgba(167, 139, 250, 0.12);
}

.cardActiveSide {
  border-color: rgba(0, 120, 212, 0.95);
  box-shadow:
    0 0 0 2px rgba(0, 120, 212, 0.35),
    0 25px 50px -12px rgba(0, 120, 212, 0.12);
}

.previewShell {
  position: relative;
  width: 100%;
  height: 135px;
  border-radius: 10px;
  overflow: hidden;
  background: #0c0c0e;
}

.previewFill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.previewPlaceholder {
  position: absolute;
  inset: 0;
  background: #0c0c0e;
}

.badgeStart {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--accent-fill-solid);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-start-badge);
}

.badgeSideStory {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--side-story-fill-solid);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-side-story-badge);
}

.cornerBadges {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.mediaBadge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.badgeGlyph {
  display: block;
}

.imageCover,
.videoCover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.imageCover {
  user-select: none;
  pointer-events: none;
}

.nodeBody {
  padding-top: 8px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.title {
  font-weight: 900;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  min-width: 0;
}

.musicParams {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.musicParam {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: calc(14px * 0.7);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
  text-transform: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.musicParamIcon {
  flex-shrink: 0;
  color: #a78bfa;
  display: block;
}

.canvasWrap {
  height: 100%;
  width: 100%;
  position: relative;
}

.canvasWrap :global(.react-flow) {
  background-color: var(--bg0);
}

.canvasWrap :global(.react-flow__renderer) {
  background-color: var(--bg0);
}

.canvasWrap :global(.react-flow__attribution) {
  display: none;
}

.zoomPanel {
  margin: 0 0 14px;
}

.zoomBar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(24, 24, 27, 0.96);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.zoomBtn {
  display: grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
}

.zoomBtn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
}

.zoomPct {
  min-width: 44px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 600;
}

.zoomDivider {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.zoomFitIcon {
  display: block;
  opacity: 0.9;
}

.menuBackdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu-backdrop);
  border: none;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: default;
}

.ctxMenu {
  position: fixed;
  z-index: var(--z-file-menu);
  min-width: 200px;
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--color-surface-menu);
  box-shadow: var(--shadow-menu);
  display: grid;
  gap: 2px;
}

.ctxItem {
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text1);
  font-size: 13px;
  cursor: pointer;
  width: 100%;
}

.ctxItemDanger {
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--color-danger);
  font-size: 13px;
  cursor: pointer;
  width: 100%;
}
